Files
whenkit/demo/index.html
CatoandClaude Sonnet 5.5 a198f6a9f7 fix: icon scales with the field's text; codemod skips comments (0.3.1)
A fixed 20px calendar icon made a dense 12px input taller than its
neighbours (34px vs 30px). The icon is now 1.25em. The browser check has a
compact input and fails on the old icon (it first passed on it — the limit
was exactly the old height; tightened and re-proven).

The codemod no longer edits comments or files already on whenkit (it
rewrote its own shim, whose comment mentioned the tag).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
2026-10-08 14:56:11 +02:00

104 lines
3.1 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>whenkit demo</title>
<link rel="stylesheet" href="../node_modules/@bitbaum/design-tokens/tokens.css" />
<link rel="stylesheet" href="../styles.css" />
<style>
/* Page chrome only — the picker's look comes from styles.css + tokens. */
body {
margin: 0;
font-family: system-ui, sans-serif;
}
.theme {
padding: 24px 16px;
background: hsl(var(--surface-page, 0 0% 98%));
color: hsl(var(--text-primary, 0 0% 10%));
min-height: 100vh;
box-sizing: border-box;
}
.grid {
display: grid;
gap: 32px;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
max-width: 1200px;
margin: 0 auto;
}
h2 {
font-size: 14px;
margin: 0 0 12px;
opacity: 0.6;
font-weight: 500;
}
/* Shaped like a modal dialog (shadcn/Radix DialogContent): a grid whose
column is sized by its content. A picker that props this open
pushes the dialog's buttons off-screen. */
.dialog-like {
display: grid;
gap: 16px;
width: calc(100% - 32px);
max-width: 28rem;
margin: 32px auto 0;
padding: 24px;
border: 1px solid hsl(var(--border-default, 0 0% 82%));
border-radius: 12px;
background: hsl(var(--surface-base, 0 0% 100%));
box-sizing: border-box;
}
/* An app's OWN input class, unlayered plain CSS and a layered utility: both
must beat whenkit's defaults (they live in @layer base). */
.app-input {
padding: 2px 6px;
border: 3px solid rgb(255, 0, 0);
border-radius: 0;
}
/* A dense app input: 12px text, tight padding (e.g. Loki's ui-input-tight). */
.compact-input {
font-size: 12px;
padding: 6px 10px;
line-height: 1.3;
}
@layer utilities {
.util-input {
border-width: 5px;
border-style: dashed;
border-color: rgb(0, 0, 255);
}
}
.resolved {
font-size: 11px;
opacity: 0.5;
white-space: pre-wrap;
word-break: break-all;
}
</style>
</head>
<body>
<main class="theme">
<div class="grid">
<section>
<h2>Hourly — a session</h2>
<div id="hourly"></div>
</section>
<section>
<h2>Daily — a studio by the day</h2>
<div id="daily"></div>
</section>
<section>
<h2>A plain date field</h2>
<div id="field"></div>
</section>
</div>
<div class="grid" style="margin-top: 24px">
<section><div id="own-class"></div></section>
<section><div id="util-class"></div></section>
<section><div id="compact-class"></div></section>
</div>
<div class="dialog-like" id="dialog"></div>
</main>
<script src="./dist/demo.js"></script>
</body>
</html>