@heyramzi/ui 1.53.0 → 1.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPONENTS.md +6 -0
- package/package.json +2 -2
- package/scripts/lib/sync-core.mjs +1 -1
- package/scripts/sync-shadcn.mjs +11 -11
- package/scripts/sync-transitions.mjs +7 -7
- package/src/agents/agent-avatar.svelte +14 -15
- package/src/agents/agent-cast.svelte +2 -2
- package/src/agents/demo.svelte +1 -1
- package/src/agents/helpers.ts +10 -1
- package/src/agents/index.ts +2 -2
- package/src/agents/page-state.ts +1 -1
- package/src/agents/types.ts +3 -3
- package/src/components/copy/copy-button.test.ts +3 -1
- package/src/components/data-table/infinite-scroll.svelte +1 -1
- package/src/components/data-table/pagination.svelte +1 -1
- package/src/components/data-table/row-arrow.svelte +1 -1
- package/src/components/data-table/row-context-menu.svelte +1 -1
- package/src/components/data-table/sortable-head.svelte +2 -2
- package/src/components/data-table/table-skeleton.svelte +1 -1
- package/src/components/docs/doc-page.svelte +161 -0
- package/src/components/docs/index.ts +12 -0
- package/src/components/docs/on-this-page.svelte +217 -0
- package/src/components/docs/scroll-spy.svelte.ts +97 -0
- package/src/components/field-row/field-row.svelte +57 -0
- package/src/components/field-row/index.ts +1 -0
- package/src/components/hold-to-confirm/hold-to-confirm.svelte +2 -2
- package/src/components/icon/icon.svelte +1 -1
- package/src/components/list-page/detail-empty.svelte +1 -1
- package/src/components/list-page/detail-header.svelte +1 -1
- package/src/components/list-page/detail-panel.svelte +1 -1
- package/src/components/list-page/detail-row.svelte +1 -1
- package/src/components/list-page/detail-stack.svelte +1 -1
- package/src/components/list-page/filter-item.svelte +1 -1
- package/src/components/list-page/filter-popover.svelte +1 -1
- package/src/components/list-page/grouped-list.svelte +1 -1
- package/src/components/list-page/list-page-shell.svelte +1 -1
- package/src/components/list-page/master-detail.svelte +1 -1
- package/src/components/list-page/prev-next.svelte +1 -1
- package/src/components/list-page/rail-body.svelte +1 -1
- package/src/components/list-page/rail-head.svelte +1 -1
- package/src/components/list-page/rail-row.svelte +1 -1
- package/src/components/list-page/section-label.svelte +1 -1
- package/src/components/list-page/toolbar-search.svelte +2 -2
- package/src/components/list-page/toolbar-trigger.ts +1 -1
- package/src/components/locale-switch/locale-switch.svelte +1 -1
- package/src/components/mark/mark.svelte +1 -1
- package/src/components/picker/mark-picker.svelte +1 -1
- package/src/components/picker/picker.svelte +1 -1
- package/src/components/picker/trigger.ts +2 -2
- package/src/components/section-card/index.ts +1 -0
- package/src/components/section-card/section-card.svelte +43 -0
- package/src/components/section-header/index.ts +1 -0
- package/src/components/section-header/section-header.svelte +54 -0
- package/src/components/section-header/section-header.test.ts +25 -0
- package/src/components/segmented/animated-tabs.svelte +2 -2
- package/src/components/segmented/collapse.test.ts +10 -0
- package/src/components/segmented/collapse.ts +5 -0
- package/src/components/segmented/segment.svelte +2 -2
- package/src/components/segmented/segmented-filter.svelte +6 -5
- package/src/components/segmented/segmented-nav.svelte +1 -1
- package/src/components/segmented/segmented-overflow.svelte +1 -1
- package/src/components/segmented/segmented-track.svelte +29 -4
- package/src/components/segmented/segmented.test.ts +1 -1
- package/src/components/segmented/segmented.ts +2 -2
- package/src/components/star-rating-input/star-rating-input.svelte +11 -4
- package/src/components/table-view/index.ts +3 -0
- package/src/components/table-view/table-view.svelte +103 -0
- package/src/components/table-view/table-view.test.ts +53 -0
- package/src/components/table-view/types.ts +14 -0
- package/src/components/theme/index.ts +17 -0
- package/src/components/theme/theme-provider.svelte +47 -0
- package/src/components/theme/theme-provider.test.ts +61 -0
- package/src/effects/animated-beam/diagrams/BeamSvg.svelte +1 -1
- package/src/effects/animated-beam/path-calculator.svelte.ts +1 -1
- package/src/effects/border-beam/types.ts +1 -1
- package/src/effects/interactive-hover-button/InteractiveHoverButton.svelte +1 -1
- package/src/effects/shader-gradient/shaders.ts +1 -1
- package/src/effects/spotlight/Spotlight.svelte +1 -2
- package/src/icons/trades.ts +3 -3
- package/src/lib/sliding-pill.ts +3 -3
- package/src/lib/tone.test.ts +10 -0
- package/src/lib/tone.ts +1 -1
- package/src/shadcn/badge/badge.svelte +1 -1
- package/src/shadcn/button/button.svelte +10 -1
- package/src/shadcn/button/button.test.ts +19 -0
- package/src/shadcn/checkbox/checkbox.svelte +1 -1
- package/src/shadcn/context-menu/context-menu-separator.svelte +4 -1
- package/src/shadcn/dropdown-menu/dropdown-menu-separator.svelte +4 -1
- package/src/shadcn/input/input.svelte +2 -2
- package/src/shadcn/progress/progress.svelte +8 -2
- package/src/shadcn/progress/tone.test.ts +13 -0
- package/src/shadcn/progress/tone.ts +15 -0
- package/src/shadcn/sidebar/sidebar-group-label.svelte +1 -1
- package/src/shadcn/table/table-cell.svelte +21 -1
- package/src/shadcn/table/table-cell.test.ts +16 -0
- package/src/tokens/base.css +183 -0
- package/src/tokens/craft.css +179 -0
- package/src/tokens/index.css +19 -0
- package/src/tokens/palette.css +410 -0
- package/src/tokens/primitives.css +223 -0
- package/scripts/relative-imports.mjs +0 -39
- package/src/tokens.css +0 -993
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/* ── Radius, by role not by size ─────────────────────────────
|
|
2
|
+
A chip inside a control inside a card has to read as nested, which needs
|
|
3
|
+
three radii that step, not one radius reused. The Tailwind names are the
|
|
4
|
+
home so `rounded-lg` on a button already resolves to the control radius and
|
|
5
|
+
no component has to learn a new class. */
|
|
6
|
+
@theme {
|
|
7
|
+
--radius-xs: 4px; /* tag, dot, inline code */
|
|
8
|
+
--radius-sm: 6px; /* chip, badge, small pill */
|
|
9
|
+
--radius-md: 7px; /* between a chip and a control */
|
|
10
|
+
--radius-lg: 8px; /* control: button, input, select, menu item */
|
|
11
|
+
--radius-xl: 10px; /* card, panel, stage */
|
|
12
|
+
--radius-2xl: 14px; /* overlay: dialog, sheet, command palette */
|
|
13
|
+
--radius-3xl: 20px; /* hero surface, full-bleed panel */
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* ── Elevation ───────────────────────────────────────────────
|
|
17
|
+
Four steps of lift, plus the two edges that are not lift.
|
|
18
|
+
|
|
19
|
+
WHY the steps are shadow-only and the hairline is its own token: most boxes
|
|
20
|
+
in a kit already draw a border, and an elevation that bakes a `0 0 0 1px`
|
|
21
|
+
ring into every step gives those boxes two edges a pixel apart. Compose them
|
|
22
|
+
where a component drops its border:
|
|
23
|
+
|
|
24
|
+
box-shadow: var(--elev-hairline), var(--elev-card);
|
|
25
|
+
|
|
26
|
+
WHY each step is stacked rather than one blurred drop: a single shadow reads
|
|
27
|
+
as a sticker. Depth is several offsets falling off together, which is what
|
|
28
|
+
the eye reads as distance. They cost nothing extra because every stop is the
|
|
29
|
+
same colour at a different alpha.
|
|
30
|
+
|
|
31
|
+
WHY the blur radii are large and the alphas small: a 4px blur at 20% draws a
|
|
32
|
+
visible grey edge, which the eye reads as a second border. A 28px blur at 7%
|
|
33
|
+
is barely a colour anywhere and reads as height. Reach for more blur before
|
|
34
|
+
more alpha, every time.
|
|
35
|
+
|
|
36
|
+
`--elev-tint` is the one knob an app turns. Pure black greys a warm palette
|
|
37
|
+
out; the hue of the app's own darkest surface keeps the shadow in the
|
|
38
|
+
family. */
|
|
39
|
+
:root {
|
|
40
|
+
|
|
41
|
+
/* Resting on the page. A button, a chip, a row. */
|
|
42
|
+
--elev-btn:
|
|
43
|
+
0 1px 1px -0.5px color-mix(in oklab, var(--elev-tint) 7%, transparent),
|
|
44
|
+
0 2px 5px -2px color-mix(in oklab, var(--elev-tint) 6%, transparent);
|
|
45
|
+
|
|
46
|
+
/* Sitting on the page. A card, a stage, a panel. */
|
|
47
|
+
--elev-card:
|
|
48
|
+
0 1px 2px -1px color-mix(in oklab, var(--elev-tint) 7%, transparent),
|
|
49
|
+
0 4px 9px -3px color-mix(in oklab, var(--elev-tint) 6%, transparent),
|
|
50
|
+
0 14px 28px -10px color-mix(in oklab, var(--elev-tint) 7%, transparent);
|
|
51
|
+
|
|
52
|
+
/* Lifted off the page. A hovered card, a popover, a menu. */
|
|
53
|
+
--elev-raised:
|
|
54
|
+
0 1px 2px -1px color-mix(in oklab, var(--elev-tint) 8%, transparent),
|
|
55
|
+
0 6px 13px -4px color-mix(in oklab, var(--elev-tint) 9%, transparent),
|
|
56
|
+
0 20px 40px -12px color-mix(in oklab, var(--elev-tint) 12%, transparent);
|
|
57
|
+
|
|
58
|
+
/* Floating over a dimmed page. A dialog, a sheet, a command palette. */
|
|
59
|
+
--elev-overlay:
|
|
60
|
+
0 2px 4px -1px color-mix(in oklab, var(--elev-tint) 8%, transparent),
|
|
61
|
+
0 12px 26px -8px color-mix(in oklab, var(--elev-tint) 12%, transparent),
|
|
62
|
+
0 40px 72px -20px color-mix(in oklab, var(--elev-tint) 20%, transparent);
|
|
63
|
+
|
|
64
|
+
/* The two edges. A hairline separates a surface from what is behind it; a rim
|
|
65
|
+
is the light catching its top edge, which is what makes a filled control
|
|
66
|
+
read as a physical key rather than a coloured rectangle. */
|
|
67
|
+
--elev-hairline: 0 0 0 1px var(--color-border, var(--border));
|
|
68
|
+
--elev-rim: inset 0 1px 0 color-mix(in oklab, white 16%, transparent);
|
|
69
|
+
|
|
70
|
+
/* A field is the one box that goes in rather than up. */
|
|
71
|
+
--elev-field: inset 0 1px 2px color-mix(in oklab, var(--elev-tint) 7%, transparent);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* A dark surface cannot cast a darker shadow than the page it sits on, so the
|
|
75
|
+
hairline does the separating and the shadow only sinks what is behind it. On
|
|
76
|
+
dark the hairline is white at a low alpha, which is what reads as a lit edge
|
|
77
|
+
rather than as a drawn border. */
|
|
78
|
+
.dark {
|
|
79
|
+
--elev-btn: 0 1px 2px color-mix(in oklab, black 30%, transparent);
|
|
80
|
+
--elev-card:
|
|
81
|
+
0 1px 2px color-mix(in oklab, black 24%, transparent),
|
|
82
|
+
0 4px 12px -4px color-mix(in oklab, black 30%, transparent);
|
|
83
|
+
--elev-raised:
|
|
84
|
+
0 2px 6px color-mix(in oklab, black 30%, transparent),
|
|
85
|
+
0 10px 24px -6px color-mix(in oklab, black 38%, transparent);
|
|
86
|
+
--elev-overlay:
|
|
87
|
+
0 4px 10px color-mix(in oklab, black 34%, transparent),
|
|
88
|
+
0 24px 56px -12px color-mix(in oklab, black 50%, transparent);
|
|
89
|
+
|
|
90
|
+
--elev-hairline: 0 0 0 1px color-mix(in oklab, white 10%, transparent);
|
|
91
|
+
--elev-rim: inset 0 1px 0 color-mix(in oklab, white 10%, transparent);
|
|
92
|
+
--elev-field: inset 0 1px 2px color-mix(in oklab, black 40%, transparent);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* ── Focus ───────────────────────────────────────────────────
|
|
96
|
+
One ring, two parts: a solid edge that redraws the control's own outline in
|
|
97
|
+
the accent, and a soft halo that carries it off the surface. Written as a
|
|
98
|
+
variable so a component spends one line on it and every control focuses the
|
|
99
|
+
same way. */
|
|
100
|
+
:root {
|
|
101
|
+
--ring-color: var(--color-ring, var(--ring));
|
|
102
|
+
--ring-halo: color-mix(in oklab, var(--ring-color) 16%, transparent);
|
|
103
|
+
/* A solid pixel redrawing the control's own edge, then a wide soft band. At a
|
|
104
|
+
higher alpha the band reads as a second border rather than as a glow, which
|
|
105
|
+
is why it is 16% over 4px and not 30% over 2px. */
|
|
106
|
+
--ring-focus: 0 0 0 1px var(--ring-color), 0 0 0 5px var(--ring-halo);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* ── Motion ──────────────────────────────────────────────────
|
|
110
|
+
The transitions-dev scale, verbatim, so a snippet pasted from that skill and
|
|
111
|
+
a component written here read from the same names.
|
|
112
|
+
|
|
113
|
+
The doctrine in one line: an open is an invitation and a close should get out
|
|
114
|
+
of the way, so every close is shorter than its open and no close bounces. */
|
|
115
|
+
:root {
|
|
116
|
+
--duration-stagger: 40ms;
|
|
117
|
+
--duration-micro: 80ms;
|
|
118
|
+
--duration-quick: 150ms; /* every close, text swap, tooltip in */
|
|
119
|
+
--duration-fast: 250ms; /* every open, tabs, icon swap, page slide */
|
|
120
|
+
--duration-medium: 350ms; /* panel close, toast close */
|
|
121
|
+
--duration-slow: 400ms; /* panel open, skeleton reveal */
|
|
122
|
+
--duration-very-slow: 500ms; /* emphasis: badge, text reveal, success check */
|
|
123
|
+
|
|
124
|
+
--ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1); /* all surface motion */
|
|
125
|
+
--ease-in-out: ease-in-out; /* swaps and cross-fades */
|
|
126
|
+
--ease-out: ease-out; /* tooltips */
|
|
127
|
+
--ease-linear: linear; /* shimmer, pulse, spinner */
|
|
128
|
+
|
|
129
|
+
--distance-micro: 4px;
|
|
130
|
+
--distance-small: 6px;
|
|
131
|
+
--distance-base: 8px;
|
|
132
|
+
--distance-medium: 12px;
|
|
133
|
+
--distance-large: 30px;
|
|
134
|
+
|
|
135
|
+
--scale-large: 0.96; /* modal */
|
|
136
|
+
--scale-medium: 0.97; /* dropdown, popover open */
|
|
137
|
+
--scale-small: 0.98; /* tooltip */
|
|
138
|
+
--scale-tiny: 0.99; /* dropdown close */
|
|
139
|
+
|
|
140
|
+
--blur-small: 2px;
|
|
141
|
+
--blur-medium: 3px;
|
|
142
|
+
--blur-large: 8px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Tailwind utility aliases, so `shadow-card`, `duration-fast` and
|
|
146
|
+
`ease-smooth-out` exist as classes and a component can stay in utilities
|
|
147
|
+
instead of dropping into a style block for one shadow. */
|
|
148
|
+
@theme inline {
|
|
149
|
+
--shadow-hairline: var(--elev-hairline);
|
|
150
|
+
--shadow-btn: var(--elev-btn);
|
|
151
|
+
--shadow-card: var(--elev-card);
|
|
152
|
+
--shadow-raised: var(--elev-raised);
|
|
153
|
+
--shadow-overlay: var(--elev-overlay);
|
|
154
|
+
--shadow-field: var(--elev-field);
|
|
155
|
+
--shadow-rim: var(--elev-rim);
|
|
156
|
+
/* A filled control: the lit top edge and the resting lift, in one class,
|
|
157
|
+
because the two never appear apart and utilities cannot be stacked. */
|
|
158
|
+
--shadow-key: var(--elev-rim), var(--elev-btn);
|
|
159
|
+
/* The composed pair, for a surface that draws no border of its own. */
|
|
160
|
+
--shadow-edge-card: var(--elev-hairline), var(--elev-card);
|
|
161
|
+
--shadow-edge-raised: var(--elev-hairline), var(--elev-raised);
|
|
162
|
+
--shadow-edge-overlay: var(--elev-hairline), var(--elev-overlay);
|
|
163
|
+
|
|
164
|
+
--ease-smooth-out: var(--ease-smooth-out);
|
|
165
|
+
|
|
166
|
+
/* WHY the durations are re-declared under a second name: Tailwind's
|
|
167
|
+
`duration-*` utility reads `--transition-duration-*`, not `--duration-*`, so
|
|
168
|
+
the six names above generated no class at all. `duration-fast` therefore
|
|
169
|
+
compiled to nothing and the element ended up at `transition-duration: 0s`:
|
|
170
|
+
no error, no warning, and a component that simply does not animate. The
|
|
171
|
+
comment at the top of this block had claimed `duration-fast` was a class
|
|
172
|
+
since the block was written. Found 31 Aug 2026 by probing a live page. */
|
|
173
|
+
--transition-duration-micro: var(--duration-micro);
|
|
174
|
+
--transition-duration-quick: var(--duration-quick);
|
|
175
|
+
--transition-duration-fast: var(--duration-fast);
|
|
176
|
+
--transition-duration-medium: var(--duration-medium);
|
|
177
|
+
--transition-duration-slow: var(--duration-slow);
|
|
178
|
+
--transition-duration-very-slow: var(--duration-very-slow);
|
|
179
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* tokens.css
|
|
2
|
+
*
|
|
3
|
+
* The shared style layer for @heyramzi/ui, imported once after Tailwind:
|
|
4
|
+
*
|
|
5
|
+
* @import "tailwindcss";
|
|
6
|
+
* @import "@heyramzi/ui/tokens.css";
|
|
7
|
+
* @import "@heyramzi/ui/animations";
|
|
8
|
+
* @import "@heyramzi/ui/shadcn/utilities.css"; // only if you use Attachment or Message
|
|
9
|
+
*
|
|
10
|
+
* It carries three things: the color palette and semantic tokens, the craft
|
|
11
|
+
* layer (radius, elevation, focus and motion), and the small set of motion
|
|
12
|
+
* primitives the components share. Override any variable on :root to retheme.
|
|
13
|
+
* The parts load in this order because later blocks read earlier variables.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
@import "./palette.css";
|
|
17
|
+
@import "./base.css";
|
|
18
|
+
@import "./craft.css";
|
|
19
|
+
@import "./primitives.css";
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
2
|
+
|
|
3
|
+
/* Font families */
|
|
4
|
+
@theme {
|
|
5
|
+
--font-sans: var(--font-satoshi), system-ui, sans-serif;
|
|
6
|
+
--font-heading: var(--font-manrope), system-ui, sans-serif;
|
|
7
|
+
--font-mono: var(--font-space-grotesk), ui-monospace, monospace;
|
|
8
|
+
--font-quote: var(--font-space-grotesk), ui-monospace, monospace;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* OKLCH Color Variables - Single source of truth for all colors */
|
|
12
|
+
/* Palette: indigo, sand and terra, with a neutral gray scale. */
|
|
13
|
+
:root {
|
|
14
|
+
color-scheme: light;
|
|
15
|
+
/* === Font Variables === */
|
|
16
|
+
/* Each consuming app defines @font-face and sets these to the actual font family names */
|
|
17
|
+
--font-satoshi: "Satoshi", system-ui, sans-serif;
|
|
18
|
+
--font-manrope: "Manrope", system-ui, sans-serif;
|
|
19
|
+
--font-space-grotesk: "Space Grotesk", ui-monospace, monospace;
|
|
20
|
+
|
|
21
|
+
/* === Core Gray Scale (7 shades, zero-chroma neutral) === */
|
|
22
|
+
--gray-50: oklch(0.98 0 0); /* Almost white — backgrounds */
|
|
23
|
+
--gray-100: oklch(0.94 0 0); /* Very light gray — subtle backgrounds */
|
|
24
|
+
--gray-200: oklch(0.92 0 0); /* Light gray — borders */
|
|
25
|
+
--gray-300: oklch(0.84 0 0); /* Muted — disabled, placeholder text */
|
|
26
|
+
--gray-500: oklch(0.65 0 0); /* Medium gray — secondary text */
|
|
27
|
+
--gray-700: oklch(0.45 0 0); /* Dark gray — body text */
|
|
28
|
+
--gray-900: oklch(0.15 0 0); /* Near-black — headings, primary text */
|
|
29
|
+
|
|
30
|
+
/* === Accent Colors (3 chromatic) — 60/30/10 split === */
|
|
31
|
+
--brand-indigo: oklch(0.5 0.2 272); /* Primary 60% — CTAs, links, active states, brand mark */
|
|
32
|
+
--brand-indigo-light: oklch(0.68 0.16 272); /* Dark mode variant */
|
|
33
|
+
--brand-sand: oklch(0.78 0.08 40); /* Warmth 30% — highlights, badges, soft accents */
|
|
34
|
+
--brand-terra: oklch(0.65 0.2 30); /* Signal 10% — warnings, attention, energy */
|
|
35
|
+
|
|
36
|
+
/* === Surface System (6 named colors) === */
|
|
37
|
+
/* Dark surfaces (indigo-tinted, h258-264) Light pendants (warm-tinted, h55) */
|
|
38
|
+
--brand-ink: oklch(0.12 0.04 258); /* Base — page background */
|
|
39
|
+
--brand-night: oklch(0.18 0.05 262); /* Surface — cards, panels ↔ Linen */
|
|
40
|
+
--brand-veil: oklch(0.28 0.06 264); /* Borders, dividers ↔ Mist */
|
|
41
|
+
--brand-dusk: oklch(0.22 0.05 262); /* Between night/veil — hover surfaces, inputs */
|
|
42
|
+
--brand-cream: oklch(0.97 0.01 55); /* On-dark text, light backgrounds */
|
|
43
|
+
--brand-linen: oklch(0.985 0.003 55); /* Light surface — cards ↔ Night */
|
|
44
|
+
--brand-mist: oklch(0.9 0.006 55); /* Light borders, dividers ↔ Veil */
|
|
45
|
+
|
|
46
|
+
/* === Indigo Tint Scale (5-step, core = 600) === */
|
|
47
|
+
--indigo-100: oklch(0.92 0.04 272);
|
|
48
|
+
--indigo-200: oklch(0.82 0.08 272);
|
|
49
|
+
--indigo-400: oklch(0.68 0.16 272);
|
|
50
|
+
--indigo-600: oklch(0.5 0.2 272); /* = --brand-indigo */
|
|
51
|
+
--indigo-800: oklch(0.34 0.18 272);
|
|
52
|
+
|
|
53
|
+
/* === Sand Tint Scale (5-step, core = 400) === */
|
|
54
|
+
--sand-100: oklch(0.94 0.02 40);
|
|
55
|
+
--sand-200: oklch(0.88 0.04 40);
|
|
56
|
+
--sand-400: oklch(0.78 0.08 40); /* = --brand-sand */
|
|
57
|
+
--sand-600: oklch(0.64 0.1 40);
|
|
58
|
+
--sand-800: oklch(0.5 0.08 40);
|
|
59
|
+
|
|
60
|
+
/* === Terra Tint Scale (5-step, core = 400) === */
|
|
61
|
+
--terra-100: oklch(0.92 0.05 30);
|
|
62
|
+
--terra-200: oklch(0.82 0.1 30);
|
|
63
|
+
--terra-400: oklch(0.65 0.2 30); /* = --brand-terra */
|
|
64
|
+
--terra-600: oklch(0.52 0.2 30);
|
|
65
|
+
--terra-800: oklch(0.38 0.15 30);
|
|
66
|
+
|
|
67
|
+
/* === Status Tint Scales (5-step, mirror indigo/sand/terra) === */
|
|
68
|
+
/* WHY: status badges use bg-X-100 text-X-600 dark:bg-X-800/30 dark:text-X-400 */
|
|
69
|
+
/* Success (green) — positive states */
|
|
70
|
+
--success-100: oklch(0.94 0.05 150);
|
|
71
|
+
--success-200: oklch(0.88 0.09 148);
|
|
72
|
+
--success-400: oklch(0.75 0.15 146);
|
|
73
|
+
--success-600: oklch(0.62 0.17 145); /* = --success */
|
|
74
|
+
--success-800: oklch(0.45 0.13 148);
|
|
75
|
+
/* Warning (amber) — attention, caution */
|
|
76
|
+
--warning-100: oklch(0.95 0.05 85);
|
|
77
|
+
--warning-200: oklch(0.9 0.09 82);
|
|
78
|
+
--warning-400: oklch(0.82 0.13 78);
|
|
79
|
+
--warning-600: oklch(0.68 0.14 70);
|
|
80
|
+
--warning-800: oklch(0.5 0.11 65);
|
|
81
|
+
/* Info (blue) — informational */
|
|
82
|
+
--info-100: oklch(0.93 0.04 250);
|
|
83
|
+
--info-200: oklch(0.85 0.08 250);
|
|
84
|
+
--info-400: oklch(0.72 0.14 250);
|
|
85
|
+
--info-600: oklch(0.6 0.16 252);
|
|
86
|
+
--info-800: oklch(0.45 0.15 255);
|
|
87
|
+
|
|
88
|
+
/* === Categorical Palette (diagram groups, tags, chart series) === */
|
|
89
|
+
/* WHY: identity colors for grouping/visual distinction, not semantic state. */
|
|
90
|
+
--cat-blue: oklch(0.62 0.18 250);
|
|
91
|
+
--cat-green: oklch(0.65 0.17 150);
|
|
92
|
+
--cat-amber: oklch(0.75 0.14 75);
|
|
93
|
+
--cat-pink: oklch(0.65 0.21 350);
|
|
94
|
+
--cat-teal: oklch(0.68 0.12 195);
|
|
95
|
+
--cat-orange: oklch(0.7 0.19 45);
|
|
96
|
+
--cat-rose: oklch(0.64 0.22 15);
|
|
97
|
+
--cat-cyan: oklch(0.7 0.12 220);
|
|
98
|
+
--cat-yellow: oklch(0.85 0.16 95);
|
|
99
|
+
--cat-indigo: oklch(0.58 0.2 272);
|
|
100
|
+
--cat-purple: oklch(0.58 0.22 305);
|
|
101
|
+
|
|
102
|
+
/* === Semantic Colors === */
|
|
103
|
+
--success: oklch(0.62 0.17 145); /* Green — positive states */
|
|
104
|
+
--error: oklch(0.6 0.2 25); /* Terra-dark — destructive actions */
|
|
105
|
+
--warning: oklch(0.78 0.14 75); /* Amber — warnings, attention */
|
|
106
|
+
--info: oklch(0.68 0.16 250); /* Blue — informational */
|
|
107
|
+
|
|
108
|
+
/* === Pure Colors === */
|
|
109
|
+
--white: oklch(1 0 0);
|
|
110
|
+
--black: oklch(0 0 0);
|
|
111
|
+
|
|
112
|
+
/* === Sidebar Colors === */
|
|
113
|
+
/* Sidebar is one shade darker than content — Linear-style depth */
|
|
114
|
+
--sidebar: oklch(0.96 0 0);
|
|
115
|
+
--sidebar-foreground: oklch(0.45 0 0);
|
|
116
|
+
--sidebar-primary: oklch(0.15 0 0);
|
|
117
|
+
--sidebar-primary-foreground: oklch(0.98 0 0);
|
|
118
|
+
--sidebar-accent: oklch(0.92 0 0);
|
|
119
|
+
--sidebar-accent-foreground: oklch(0.15 0 0);
|
|
120
|
+
--sidebar-border: oklch(0.91 0 0);
|
|
121
|
+
--sidebar-ring: var(--brand-indigo);
|
|
122
|
+
|
|
123
|
+
/* === Shadow tint ===
|
|
124
|
+
The one knob the design layer exposes. Pure black greys out warm surfaces,
|
|
125
|
+
so the shadow takes the darkest surface's hue. Radius, focus and motion live there. */
|
|
126
|
+
--elev-tint: oklch(0.12 0.04 258); /* = --brand-ink */
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@theme {
|
|
130
|
+
/* Gray scale utilities (bg-gray-100, border-gray-200, text-gray-300, etc.) */
|
|
131
|
+
--color-gray-50: var(--gray-50);
|
|
132
|
+
--color-gray-100: var(--gray-100);
|
|
133
|
+
--color-gray-200: var(--gray-200);
|
|
134
|
+
--color-gray-300: var(--gray-300);
|
|
135
|
+
--color-gray-500: var(--gray-500);
|
|
136
|
+
--color-gray-700: var(--gray-700);
|
|
137
|
+
--color-gray-900: var(--gray-900);
|
|
138
|
+
|
|
139
|
+
/* Brand colors (V6 names) */
|
|
140
|
+
--color-brand-indigo: var(--brand-indigo);
|
|
141
|
+
--color-brand-indigo-light: var(--brand-indigo-light);
|
|
142
|
+
--color-brand-sand: var(--brand-sand);
|
|
143
|
+
--color-brand-terra: var(--brand-terra);
|
|
144
|
+
/* Surface system */
|
|
145
|
+
--color-brand-ink: var(--brand-ink);
|
|
146
|
+
--color-brand-night: var(--brand-night);
|
|
147
|
+
--color-brand-veil: var(--brand-veil);
|
|
148
|
+
--color-brand-dusk: var(--brand-dusk);
|
|
149
|
+
--color-brand-cream: var(--brand-cream);
|
|
150
|
+
--color-brand-linen: var(--brand-linen);
|
|
151
|
+
--color-brand-mist: var(--brand-mist);
|
|
152
|
+
|
|
153
|
+
/* Tint scales */
|
|
154
|
+
--color-indigo-100: var(--indigo-100);
|
|
155
|
+
--color-indigo-200: var(--indigo-200);
|
|
156
|
+
--color-indigo-400: var(--indigo-400);
|
|
157
|
+
--color-indigo-600: var(--indigo-600);
|
|
158
|
+
--color-indigo-800: var(--indigo-800);
|
|
159
|
+
--color-sand-100: var(--sand-100);
|
|
160
|
+
--color-sand-200: var(--sand-200);
|
|
161
|
+
--color-sand-400: var(--sand-400);
|
|
162
|
+
--color-sand-600: var(--sand-600);
|
|
163
|
+
--color-sand-800: var(--sand-800);
|
|
164
|
+
--color-terra-100: var(--terra-100);
|
|
165
|
+
--color-terra-200: var(--terra-200);
|
|
166
|
+
--color-terra-400: var(--terra-400);
|
|
167
|
+
--color-terra-600: var(--terra-600);
|
|
168
|
+
--color-terra-800: var(--terra-800);
|
|
169
|
+
|
|
170
|
+
/* Semantic colors */
|
|
171
|
+
--color-success: var(--success);
|
|
172
|
+
--color-error: var(--error);
|
|
173
|
+
--color-warning: var(--warning);
|
|
174
|
+
--color-info: var(--info);
|
|
175
|
+
|
|
176
|
+
/* Status tint scales (bg-success-100, text-warning-600, etc.) */
|
|
177
|
+
--color-success-100: var(--success-100);
|
|
178
|
+
--color-success-200: var(--success-200);
|
|
179
|
+
--color-success-400: var(--success-400);
|
|
180
|
+
--color-success-600: var(--success-600);
|
|
181
|
+
--color-success-800: var(--success-800);
|
|
182
|
+
--color-warning-100: var(--warning-100);
|
|
183
|
+
--color-warning-200: var(--warning-200);
|
|
184
|
+
--color-warning-400: var(--warning-400);
|
|
185
|
+
--color-warning-600: var(--warning-600);
|
|
186
|
+
--color-warning-800: var(--warning-800);
|
|
187
|
+
--color-info-100: var(--info-100);
|
|
188
|
+
--color-info-200: var(--info-200);
|
|
189
|
+
--color-info-400: var(--info-400);
|
|
190
|
+
--color-info-600: var(--info-600);
|
|
191
|
+
--color-info-800: var(--info-800);
|
|
192
|
+
|
|
193
|
+
/* Categorical palette (diagram groups, tags, chart series) */
|
|
194
|
+
--color-cat-blue: var(--cat-blue);
|
|
195
|
+
--color-cat-green: var(--cat-green);
|
|
196
|
+
--color-cat-amber: var(--cat-amber);
|
|
197
|
+
--color-cat-pink: var(--cat-pink);
|
|
198
|
+
--color-cat-teal: var(--cat-teal);
|
|
199
|
+
--color-cat-orange: var(--cat-orange);
|
|
200
|
+
--color-cat-rose: var(--cat-rose);
|
|
201
|
+
--color-cat-cyan: var(--cat-cyan);
|
|
202
|
+
--color-cat-yellow: var(--cat-yellow);
|
|
203
|
+
--color-cat-indigo: var(--cat-indigo);
|
|
204
|
+
--color-cat-purple: var(--cat-purple);
|
|
205
|
+
|
|
206
|
+
/* A hue as text or icon on its own tint: 40% toward the foreground clears AA in both themes.
|
|
207
|
+
A tone's 10% tint under plain destructive text is 3.6:1; the ink mix is not. */
|
|
208
|
+
--color-cat-cyan-ink: color-mix(in oklab, var(--color-cat-cyan) 60%, var(--color-foreground));
|
|
209
|
+
--color-cat-teal-ink: color-mix(in oklab, var(--color-cat-teal) 60%, var(--color-foreground));
|
|
210
|
+
--color-cat-purple-ink: color-mix(in oklab, var(--color-cat-purple) 60%, var(--color-foreground));
|
|
211
|
+
--color-cat-amber-ink: color-mix(in oklab, var(--color-cat-amber) 60%, var(--color-foreground));
|
|
212
|
+
--color-success-ink: color-mix(in oklab, var(--color-success) 60%, var(--color-foreground));
|
|
213
|
+
--color-destructive-ink: color-mix(in oklab, var(--color-destructive) 60%, var(--color-foreground));
|
|
214
|
+
|
|
215
|
+
/* Light theme color system — uses named surface colors (linen/mist pendants of night/veil) */
|
|
216
|
+
--color-background: var(--gray-50);
|
|
217
|
+
--color-foreground: var(--gray-900);
|
|
218
|
+
--color-foreground-muted: var(--gray-700);
|
|
219
|
+
|
|
220
|
+
--color-card: var(--brand-linen); /* Surface — pendant of night */
|
|
221
|
+
--color-card-foreground: var(--gray-900);
|
|
222
|
+
|
|
223
|
+
--color-popover: var(--brand-linen);
|
|
224
|
+
--color-popover-foreground: var(--gray-900);
|
|
225
|
+
|
|
226
|
+
--color-primary: var(--gray-900);
|
|
227
|
+
--color-primary-foreground: var(--gray-50);
|
|
228
|
+
|
|
229
|
+
--color-secondary: var(--gray-100);
|
|
230
|
+
--color-secondary-foreground: var(--gray-900);
|
|
231
|
+
|
|
232
|
+
--color-muted: var(--gray-100);
|
|
233
|
+
--color-muted-foreground: var(--gray-700);
|
|
234
|
+
|
|
235
|
+
--color-accent: var(--gray-100);
|
|
236
|
+
--color-accent-foreground: var(--gray-900);
|
|
237
|
+
|
|
238
|
+
--color-destructive: var(--error);
|
|
239
|
+
--color-destructive-foreground: var(--gray-50);
|
|
240
|
+
|
|
241
|
+
--color-border: var(--brand-mist); /* Borders — pendant of veil */
|
|
242
|
+
--color-input: var(--brand-mist);
|
|
243
|
+
/* WHY the accent, not gray-900: a near-black halo reads as an error first.
|
|
244
|
+
Focus is the one moment the brand speaks in chrome. */
|
|
245
|
+
--color-ring: var(--brand-indigo);
|
|
246
|
+
|
|
247
|
+
/* Sidebar colors */
|
|
248
|
+
--color-sidebar: var(--sidebar);
|
|
249
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
250
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
251
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
252
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
253
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
254
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
255
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
256
|
+
|
|
257
|
+
/* A spinner reads as a speed. Tailwind's 1s looks like thinking, not working,
|
|
258
|
+
and `animate-spin` is on every loading glyph, so this is a cheap win. */
|
|
259
|
+
--animate-spin: spin 700ms linear infinite;
|
|
260
|
+
|
|
261
|
+
/* Every bare `transition-colors` / `transition-all` reads these two. Tailwind's
|
|
262
|
+
150ms is the right beat on the wrong ease, and ~200 call sites used it. */
|
|
263
|
+
--default-transition-duration: var(--duration-quick);
|
|
264
|
+
--default-transition-timing-function: var(--ease-smooth-out);
|
|
265
|
+
|
|
266
|
+
/* Collapsible animations, on the craft layer's scale and asymmetric: an open
|
|
267
|
+
invites, a close gets out of the way. The old `0.2s ease-out` was off-scale. */
|
|
268
|
+
--animate-collapsible-down: collapsible-down var(--duration-fast) var(--ease-smooth-out);
|
|
269
|
+
--animate-collapsible-up: collapsible-up var(--duration-quick) var(--ease-smooth-out);
|
|
270
|
+
|
|
271
|
+
@keyframes collapsible-down {
|
|
272
|
+
from {
|
|
273
|
+
height: 0;
|
|
274
|
+
}
|
|
275
|
+
to {
|
|
276
|
+
height: var(--bits-collapsible-content-height);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@keyframes collapsible-up {
|
|
281
|
+
from {
|
|
282
|
+
height: var(--bits-collapsible-content-height);
|
|
283
|
+
}
|
|
284
|
+
to {
|
|
285
|
+
height: 0;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* Accordion animations, on the same scale and the same asymmetry. */
|
|
290
|
+
--animate-accordion-down: accordion-down var(--duration-fast) var(--ease-smooth-out);
|
|
291
|
+
--animate-accordion-up: accordion-up var(--duration-quick) var(--ease-smooth-out);
|
|
292
|
+
|
|
293
|
+
@keyframes accordion-down {
|
|
294
|
+
from {
|
|
295
|
+
height: 0;
|
|
296
|
+
}
|
|
297
|
+
to {
|
|
298
|
+
height: var(--bits-accordion-content-height);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@keyframes accordion-up {
|
|
303
|
+
from {
|
|
304
|
+
height: var(--bits-accordion-content-height);
|
|
305
|
+
}
|
|
306
|
+
to {
|
|
307
|
+
height: 0;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.dark {
|
|
313
|
+
/* WHY: LayerChart halos axis labels with light-dark(), which reads color-scheme, not the .dark class. */
|
|
314
|
+
color-scheme: dark;
|
|
315
|
+
/* Dark theme — named surface system (ink/night/veil) */
|
|
316
|
+
--color-background: var(--brand-ink); /* Base — page background */
|
|
317
|
+
--color-foreground: var(--brand-cream);
|
|
318
|
+
--color-foreground-muted: var(--gray-300);
|
|
319
|
+
|
|
320
|
+
--color-card: var(--brand-night); /* Surface — cards, panels */
|
|
321
|
+
--color-card-foreground: var(--brand-cream);
|
|
322
|
+
|
|
323
|
+
--color-popover: var(--brand-night);
|
|
324
|
+
--color-popover-foreground: var(--brand-cream);
|
|
325
|
+
|
|
326
|
+
--color-primary: var(--brand-cream);
|
|
327
|
+
--color-primary-foreground: var(--gray-900);
|
|
328
|
+
|
|
329
|
+
--color-secondary: var(--brand-dusk); /* Between night (0.18) and veil (0.28) */
|
|
330
|
+
--color-secondary-foreground: var(--brand-cream);
|
|
331
|
+
|
|
332
|
+
--color-muted: var(--brand-dusk); /* Between night and veil — hover surfaces */
|
|
333
|
+
--color-muted-foreground: var(--gray-300);
|
|
334
|
+
|
|
335
|
+
--color-accent: var(--brand-dusk); /* Between night and veil — accent surfaces */
|
|
336
|
+
--color-accent-foreground: var(--brand-cream);
|
|
337
|
+
|
|
338
|
+
--color-destructive: var(--terra-400); /* Lighter terra for dark bg */
|
|
339
|
+
--color-destructive-foreground: var(--brand-cream);
|
|
340
|
+
|
|
341
|
+
--color-border: var(--brand-veil); /* Named border color */
|
|
342
|
+
--color-input: var(--brand-dusk); /* Between night and veil — input surfaces */
|
|
343
|
+
--color-ring: var(--brand-indigo-light);
|
|
344
|
+
|
|
345
|
+
/* Brand colors for dark theme — lighter variants for contrast on ink bg */
|
|
346
|
+
--color-brand-indigo: var(--brand-indigo-light); /* L=0.68 on ink L=0.12 = ΔL 0.56 ✓ */
|
|
347
|
+
|
|
348
|
+
/* Dark sidebar — uses named surface system */
|
|
349
|
+
--sidebar: var(--brand-night);
|
|
350
|
+
--sidebar-foreground: var(--brand-cream);
|
|
351
|
+
--sidebar-primary: var(--brand-indigo-light);
|
|
352
|
+
--sidebar-primary-foreground: oklch(1 0 0);
|
|
353
|
+
--sidebar-accent: oklch(0.24 0.05 262); /* Between night and veil */
|
|
354
|
+
--sidebar-accent-foreground: var(--brand-cream);
|
|
355
|
+
--sidebar-border: var(--brand-veil);
|
|
356
|
+
--sidebar-ring: var(--brand-indigo-light);
|
|
357
|
+
|
|
358
|
+
--color-sidebar: var(--sidebar);
|
|
359
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
360
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
361
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
362
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
363
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
364
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
365
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* === shadcn bare-name bridge ===
|
|
369
|
+
WHY: shared packages with raw CSS read `var(--card)` and friends with a light
|
|
370
|
+
fallback. We name them `--color-*`, so they painted white cards on ink. */
|
|
371
|
+
|
|
372
|
+
/* One `:root` block covers both themes, since `.dark` sits on html too. Set a
|
|
373
|
+
`--color-*` on a subtree and you must override the bare name there as well. */
|
|
374
|
+
:root {
|
|
375
|
+
--background: var(--color-background);
|
|
376
|
+
--foreground: var(--color-foreground);
|
|
377
|
+
|
|
378
|
+
--card: var(--color-card);
|
|
379
|
+
--card-foreground: var(--color-card-foreground);
|
|
380
|
+
|
|
381
|
+
--popover: var(--color-popover);
|
|
382
|
+
--popover-foreground: var(--color-popover-foreground);
|
|
383
|
+
|
|
384
|
+
--primary: var(--color-primary);
|
|
385
|
+
--primary-foreground: var(--color-primary-foreground);
|
|
386
|
+
|
|
387
|
+
--secondary: var(--color-secondary);
|
|
388
|
+
--secondary-foreground: var(--color-secondary-foreground);
|
|
389
|
+
|
|
390
|
+
--muted: var(--color-muted);
|
|
391
|
+
--muted-foreground: var(--color-muted-foreground);
|
|
392
|
+
|
|
393
|
+
--accent: var(--color-accent);
|
|
394
|
+
--accent-foreground: var(--color-accent-foreground);
|
|
395
|
+
|
|
396
|
+
--destructive: var(--color-destructive);
|
|
397
|
+
--destructive-foreground: var(--color-destructive-foreground);
|
|
398
|
+
|
|
399
|
+
--border: var(--color-border);
|
|
400
|
+
--input: var(--color-input);
|
|
401
|
+
--ring: var(--color-ring);
|
|
402
|
+
|
|
403
|
+
/* Chart series. Indigo leads, green second. Terra sits at 4 since a rate gauge
|
|
404
|
+
reads as caution, not identity. Every value has a dark variant. */
|
|
405
|
+
--chart-1: var(--color-brand-indigo);
|
|
406
|
+
--chart-2: var(--cat-green);
|
|
407
|
+
--chart-3: var(--brand-sand);
|
|
408
|
+
--chart-4: var(--brand-terra);
|
|
409
|
+
--chart-5: var(--cat-cyan);
|
|
410
|
+
}
|