@openelement/ui 0.44.0-beta.2.2 → 1.0.0-alpha.10
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/CUSTOMIZATION.md +272 -0
- package/README.md +67 -34
- package/package.json +34 -12
- package/src/component-recipes.js +80 -84
- package/src/generated-manifest.json +19 -8
- package/src/index.d.ts +14 -0
- package/src/index.js +14 -47
- package/src/instance-state.d.ts +16 -0
- package/src/instance-state.js +30 -25
- package/src/manifest.d.ts +5 -0
- package/src/manifest.js +6 -10
- package/src/open-badge.d.ts +139 -0
- package/src/open-badge.js +208 -354
- package/src/open-button.d.ts +359 -0
- package/src/open-button.js +1163 -1834
- package/src/open-callout.d.ts +261 -0
- package/src/open-callout.js +483 -829
- package/src/open-card.d.ts +138 -0
- package/src/open-card.js +208 -400
- package/src/open-code-block.d.ts +182 -0
- package/src/open-code-block.js +242 -565
- package/src/open-dialog.d.ts +271 -0
- package/src/open-dialog.js +705 -1197
- package/src/open-dropdown.d.ts +225 -0
- package/src/open-dropdown.js +353 -667
- package/src/open-input.d.ts +481 -0
- package/src/open-input.js +1809 -2888
- package/src/open-tabs.d.ts +190 -0
- package/src/open-tabs.js +302 -515
- package/src/open-theme-toggle.d.ts +196 -0
- package/src/open-theme-toggle.js +527 -1059
- package/src/register.d.ts +4 -0
- package/src/register.js +27 -59
- package/src/theme.css +205 -0
- package/src/open-props-tokens.css +0 -386
- package/src/open-props-tokens.js +0 -400
package/src/register.js
CHANGED
|
@@ -1,62 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
// program owns the tag), so the registration table lives here, beside the
|
|
13
|
-
// class imports. Keep aligned with manifest.declarations order.
|
|
1
|
+
import { OpenButton } from "./open-button.js";
|
|
2
|
+
import { OpenCard } from "./open-card.js";
|
|
3
|
+
import { OpenInput } from "./open-input.js";
|
|
4
|
+
import { OpenCodeBlock } from "./open-code-block.js";
|
|
5
|
+
import { OpenBadge } from "./open-badge.js";
|
|
6
|
+
import { OpenThemeToggle } from "./open-theme-toggle.js";
|
|
7
|
+
import { OpenDialog } from "./open-dialog.js";
|
|
8
|
+
import { OpenCallout } from "./open-callout.js";
|
|
9
|
+
import { OpenDropdown } from "./open-dropdown.js";
|
|
10
|
+
import { OpenTabs } from "./open-tabs.js";
|
|
11
|
+
//#region src/register.ts
|
|
14
12
|
const COMPONENTS = [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
OpenButton
|
|
26
|
-
],
|
|
27
|
-
[
|
|
28
|
-
'open-input',
|
|
29
|
-
OpenInput
|
|
30
|
-
],
|
|
31
|
-
[
|
|
32
|
-
'open-theme-toggle',
|
|
33
|
-
OpenThemeToggle
|
|
34
|
-
],
|
|
35
|
-
[
|
|
36
|
-
'open-code-block',
|
|
37
|
-
OpenCodeBlock
|
|
38
|
-
],
|
|
39
|
-
[
|
|
40
|
-
'open-badge',
|
|
41
|
-
OpenBadge
|
|
42
|
-
],
|
|
43
|
-
[
|
|
44
|
-
'open-dialog',
|
|
45
|
-
OpenDialog
|
|
46
|
-
],
|
|
47
|
-
[
|
|
48
|
-
'open-dropdown',
|
|
49
|
-
OpenDropdown
|
|
50
|
-
],
|
|
51
|
-
[
|
|
52
|
-
'open-tabs',
|
|
53
|
-
OpenTabs
|
|
54
|
-
]
|
|
13
|
+
["open-card", OpenCard],
|
|
14
|
+
["open-callout", OpenCallout],
|
|
15
|
+
["open-button", OpenButton],
|
|
16
|
+
["open-input", OpenInput],
|
|
17
|
+
["open-theme-toggle", OpenThemeToggle],
|
|
18
|
+
["open-code-block", OpenCodeBlock],
|
|
19
|
+
["open-badge", OpenBadge],
|
|
20
|
+
["open-dialog", OpenDialog],
|
|
21
|
+
["open-dropdown", OpenDropdown],
|
|
22
|
+
["open-tabs", OpenTabs]
|
|
55
23
|
];
|
|
56
|
-
/** Explicitly register every first-party UI element. Safe to call repeatedly. */
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
24
|
+
/** Explicitly register every first-party UI element. Safe to call repeatedly. */
|
|
25
|
+
function registerOpenUi(registry = globalThis.customElements) {
|
|
26
|
+
if (!registry) return;
|
|
27
|
+
for (const [tagName, constructor] of COMPONENTS) if (!registry.get(tagName)) registry.define(tagName, constructor);
|
|
61
28
|
}
|
|
62
|
-
//#
|
|
29
|
+
//#endregion
|
|
30
|
+
export { registerOpenUi };
|
package/src/theme.css
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
2
|
+
The real @theme role source — shadcn semantic roles on the Tailwind
|
|
3
|
+
default scale (#1504 draft, #1505 C2 handoff executed).
|
|
4
|
+
|
|
5
|
+
C2 handoff (executed): with Tailwind 4.x installed (4.3.3, @tailwindcss/
|
|
6
|
+
vite — the v3-lts line is forbidden), this file's hand-carried scale
|
|
7
|
+
layer is replaced by the real @theme mechanism: the Tailwind build's own
|
|
8
|
+
theme layer provides every scale variable (--spacing, the color ramps,
|
|
9
|
+
the type/motion scales) from the INSTALLED tailwindcss theme.css, and the
|
|
10
|
+
role declarations below moved into the @theme block verbatim. Role names
|
|
11
|
+
are the migration contract, not this file's selector shape.
|
|
12
|
+
|
|
13
|
+
Version note (4.3.3 vs the v4.1.16 text the retired hand-carried scale
|
|
14
|
+
layer was evaluated against): the installed 4.3.3 defaults prevail per
|
|
15
|
+
the C2 handoff. Differences touching this package's vocabulary:
|
|
16
|
+
- --color-zinc-50: oklch(98.5% 0 0) → oklch(98.5% 0 none) (achromatic
|
|
17
|
+
ramps spell the hue component `none`; visually identical at chroma 0).
|
|
18
|
+
- --font-sans: the default system stack grew (-apple-system,
|
|
19
|
+
BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans',
|
|
20
|
+
Arial now precede sans-serif).
|
|
21
|
+
No carried ramp step other than zinc-50 changed value between the two
|
|
22
|
+
versions. With the alpha9 C5 twin removal this file has no compiled
|
|
23
|
+
shadow form: the installed Tailwind defaults are the only scale
|
|
24
|
+
evaluation, reached exclusively through the preset's build.
|
|
25
|
+
|
|
26
|
+
Rules the roles obey (umbrella rulings, do not relitigate):
|
|
27
|
+
|
|
28
|
+
- Role values are expressed with Tailwind default theme variables
|
|
29
|
+
(var(--color-<ramp>-<step>)); no role carries a color literal.
|
|
30
|
+
- Dark pairs follow the shadcn v4 convention; the '.dark' selector is
|
|
31
|
+
re-pointed at this repo's theme mechanism
|
|
32
|
+
(:root[data-theme='dark'], :host([data-theme='dark'])) — the preset's
|
|
33
|
+
Tailwind build compiles no @custom-variant here yet.
|
|
34
|
+
- One deliberate divergence from the shadcn default palette: light
|
|
35
|
+
--color-destructive sits on red-700, not red-600 — red-600 clears 4.5:1
|
|
36
|
+
on the background but drops to ~3.8:1 on the 10% badge wash of itself
|
|
37
|
+
that open-badge paints; red-700 clears both (measured in the ui suite).
|
|
38
|
+
- Three non-shadcn status roles (--color-success/-warning/-info) joined
|
|
39
|
+
the table in C3 (#1506): the components' status tones need theme-aware
|
|
40
|
+
inks and the alias layer that used to carry them is deleted. Their light
|
|
41
|
+
steps are the AA-tuned ones the alias layer measured (same floor rule as
|
|
42
|
+
destructive above); forced-colors re-seats them on CanvasText like
|
|
43
|
+
destructive — high-contrast palettes own hue, so status is carried by
|
|
44
|
+
the label and the border, not by color.
|
|
45
|
+
|
|
46
|
+
Consumption: the @openelement/router tailwind preset compiles this file
|
|
47
|
+
into the bundle's theme layer (`tailwind: { theme: [...] }`). The ui
|
|
48
|
+
package emits no values itself (the theme-tokens twin is deleted): a
|
|
49
|
+
consumer without the preset writes its own table using these role names
|
|
50
|
+
— the OFF contract in CUSTOMIZATION.md ("Value delivery").
|
|
51
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
52
|
+
|
|
53
|
+
@theme {
|
|
54
|
+
/* ── shadcn semantic roles (light), over the TW4 default scale.
|
|
55
|
+
Violet-anchored roles (the brand reads violet); neutral surfaces stay
|
|
56
|
+
zinc so the page base keeps its near-neutral paper feel. ── */
|
|
57
|
+
|
|
58
|
+
--color-background: var(--color-white);
|
|
59
|
+
--color-foreground: var(--color-zinc-950);
|
|
60
|
+
|
|
61
|
+
--color-card: var(--color-white);
|
|
62
|
+
--color-card-foreground: var(--color-zinc-950);
|
|
63
|
+
|
|
64
|
+
--color-popover: var(--color-white);
|
|
65
|
+
--color-popover-foreground: var(--color-zinc-950);
|
|
66
|
+
|
|
67
|
+
--color-primary: var(--color-violet-700);
|
|
68
|
+
--color-primary-foreground: var(--color-violet-50);
|
|
69
|
+
|
|
70
|
+
--color-secondary: var(--color-violet-100);
|
|
71
|
+
--color-secondary-foreground: var(--color-violet-900);
|
|
72
|
+
|
|
73
|
+
--color-muted: var(--color-zinc-100);
|
|
74
|
+
--color-muted-foreground: var(--color-zinc-600);
|
|
75
|
+
|
|
76
|
+
--color-accent: var(--color-violet-100);
|
|
77
|
+
--color-accent-foreground: var(--color-violet-900);
|
|
78
|
+
|
|
79
|
+
--color-destructive: var(--color-red-700);
|
|
80
|
+
--color-destructive-foreground: var(--color-white);
|
|
81
|
+
|
|
82
|
+
/* Status inks (non-shadcn addition — see the header note). */
|
|
83
|
+
--color-success: var(--color-green-800);
|
|
84
|
+
--color-warning: var(--color-amber-800);
|
|
85
|
+
--color-info: var(--color-blue-700);
|
|
86
|
+
|
|
87
|
+
--color-border: var(--color-violet-200);
|
|
88
|
+
--color-input: var(--color-violet-200);
|
|
89
|
+
--color-ring: var(--color-violet-500);
|
|
90
|
+
|
|
91
|
+
--color-chart-1: var(--color-violet-500);
|
|
92
|
+
--color-chart-2: var(--color-sky-500);
|
|
93
|
+
--color-chart-3: var(--color-emerald-500);
|
|
94
|
+
--color-chart-4: var(--color-amber-500);
|
|
95
|
+
--color-chart-5: var(--color-rose-500);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Dark pairs (shadcn v4 convention, selector re-pointed — see header). */
|
|
99
|
+
:root[data-theme='dark'],
|
|
100
|
+
:host([data-theme='dark']) {
|
|
101
|
+
--color-background: var(--color-zinc-950);
|
|
102
|
+
--color-foreground: var(--color-zinc-50);
|
|
103
|
+
|
|
104
|
+
--color-card: var(--color-zinc-900);
|
|
105
|
+
--color-card-foreground: var(--color-zinc-50);
|
|
106
|
+
|
|
107
|
+
--color-popover: var(--color-zinc-900);
|
|
108
|
+
--color-popover-foreground: var(--color-zinc-50);
|
|
109
|
+
|
|
110
|
+
--color-primary: var(--color-violet-400);
|
|
111
|
+
--color-primary-foreground: var(--color-violet-950);
|
|
112
|
+
|
|
113
|
+
--color-secondary: var(--color-zinc-800);
|
|
114
|
+
--color-secondary-foreground: var(--color-zinc-100);
|
|
115
|
+
|
|
116
|
+
--color-muted: var(--color-zinc-800);
|
|
117
|
+
--color-muted-foreground: var(--color-zinc-400);
|
|
118
|
+
|
|
119
|
+
--color-accent: var(--color-zinc-800);
|
|
120
|
+
--color-accent-foreground: var(--color-zinc-100);
|
|
121
|
+
|
|
122
|
+
--color-destructive: var(--color-red-400);
|
|
123
|
+
--color-destructive-foreground: var(--color-red-950);
|
|
124
|
+
|
|
125
|
+
--color-success: var(--color-green-400);
|
|
126
|
+
--color-warning: var(--color-amber-400);
|
|
127
|
+
--color-info: var(--color-blue-400);
|
|
128
|
+
|
|
129
|
+
--color-border: var(--color-zinc-800);
|
|
130
|
+
--color-input: var(--color-zinc-800);
|
|
131
|
+
--color-ring: var(--color-violet-400);
|
|
132
|
+
|
|
133
|
+
--color-chart-1: var(--color-violet-400);
|
|
134
|
+
--color-chart-2: var(--color-sky-400);
|
|
135
|
+
--color-chart-3: var(--color-emerald-400);
|
|
136
|
+
--color-chart-4: var(--color-amber-400);
|
|
137
|
+
--color-chart-5: var(--color-rose-400);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* Forced-colors layer: every role re-seats on a system color. The mapping is
|
|
141
|
+
theme-independent (the UA owns the palette in forced-colors mode); the
|
|
142
|
+
duplicate dark pair exists so both selectors stay total if a UA applies
|
|
143
|
+
author dark resolution before forcing. Values are system keywords — no
|
|
144
|
+
author color survives the forcing. */
|
|
145
|
+
@media (forced-colors: active) {
|
|
146
|
+
:root {
|
|
147
|
+
--color-background: Canvas;
|
|
148
|
+
--color-foreground: CanvasText;
|
|
149
|
+
--color-card: Canvas;
|
|
150
|
+
--color-card-foreground: CanvasText;
|
|
151
|
+
--color-popover: Canvas;
|
|
152
|
+
--color-popover-foreground: CanvasText;
|
|
153
|
+
--color-primary: ButtonText;
|
|
154
|
+
--color-primary-foreground: Canvas;
|
|
155
|
+
--color-secondary: ButtonFace;
|
|
156
|
+
--color-secondary-foreground: ButtonText;
|
|
157
|
+
--color-muted: Canvas;
|
|
158
|
+
--color-muted-foreground: GrayText;
|
|
159
|
+
--color-accent: ButtonFace;
|
|
160
|
+
--color-accent-foreground: ButtonText;
|
|
161
|
+
--color-destructive: CanvasText;
|
|
162
|
+
--color-destructive-foreground: Canvas;
|
|
163
|
+
--color-success: CanvasText;
|
|
164
|
+
--color-warning: CanvasText;
|
|
165
|
+
--color-info: CanvasText;
|
|
166
|
+
--color-border: CanvasText;
|
|
167
|
+
--color-input: CanvasText;
|
|
168
|
+
--color-ring: Highlight;
|
|
169
|
+
--color-chart-1: LinkText;
|
|
170
|
+
--color-chart-2: Mark;
|
|
171
|
+
--color-chart-3: GrayText;
|
|
172
|
+
--color-chart-4: Highlight;
|
|
173
|
+
--color-chart-5: CanvasText;
|
|
174
|
+
}
|
|
175
|
+
:root[data-theme='dark'],
|
|
176
|
+
:host([data-theme='dark']) {
|
|
177
|
+
--color-background: Canvas;
|
|
178
|
+
--color-foreground: CanvasText;
|
|
179
|
+
--color-card: Canvas;
|
|
180
|
+
--color-card-foreground: CanvasText;
|
|
181
|
+
--color-popover: Canvas;
|
|
182
|
+
--color-popover-foreground: CanvasText;
|
|
183
|
+
--color-primary: ButtonText;
|
|
184
|
+
--color-primary-foreground: Canvas;
|
|
185
|
+
--color-secondary: ButtonFace;
|
|
186
|
+
--color-secondary-foreground: ButtonText;
|
|
187
|
+
--color-muted: Canvas;
|
|
188
|
+
--color-muted-foreground: GrayText;
|
|
189
|
+
--color-accent: ButtonFace;
|
|
190
|
+
--color-accent-foreground: ButtonText;
|
|
191
|
+
--color-destructive: CanvasText;
|
|
192
|
+
--color-destructive-foreground: Canvas;
|
|
193
|
+
--color-success: CanvasText;
|
|
194
|
+
--color-warning: CanvasText;
|
|
195
|
+
--color-info: CanvasText;
|
|
196
|
+
--color-border: CanvasText;
|
|
197
|
+
--color-input: CanvasText;
|
|
198
|
+
--color-ring: Highlight;
|
|
199
|
+
--color-chart-1: LinkText;
|
|
200
|
+
--color-chart-2: Mark;
|
|
201
|
+
--color-chart-3: GrayText;
|
|
202
|
+
--color-chart-4: Highlight;
|
|
203
|
+
--color-chart-5: CanvasText;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @openelement/ui - Open Props Token Sheet
|
|
3
|
-
*
|
|
4
|
-
* Shared design tokens (spacing, gray palette, border radius, typography,
|
|
5
|
-
* semantic brand/text/bg/border tokens) that all openElement components
|
|
6
|
-
* can adopt via `static styles`.
|
|
7
|
-
*
|
|
8
|
-
* Cleaned dead tokens; only used tokens survive.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
:host {
|
|
12
|
-
display: block;
|
|
13
|
-
min-height: 1px;
|
|
14
|
-
contain: layout style;
|
|
15
|
-
|
|
16
|
-
/* ═══════════════════════════════════════════════
|
|
17
|
-
Spacing scale
|
|
18
|
-
═══════════════════════════════════════════════ */
|
|
19
|
-
--size-1: 4px;
|
|
20
|
-
--size-2: 8px;
|
|
21
|
-
--size-3: 12px;
|
|
22
|
-
--size-4: 16px;
|
|
23
|
-
--size-5: 20px;
|
|
24
|
-
--size-6: 24px;
|
|
25
|
-
--size-7: 28px;
|
|
26
|
-
--size-8: 32px;
|
|
27
|
-
--size-9: 36px;
|
|
28
|
-
--size-10: 40px;
|
|
29
|
-
--size-12: 48px;
|
|
30
|
-
--size-16: 64px;
|
|
31
|
-
|
|
32
|
-
/* ═══════════════════════════════════════════════
|
|
33
|
-
Gray palette (light mode base)
|
|
34
|
-
═══════════════════════════════════════════════ */
|
|
35
|
-
--gray-0: #f8f9fa;
|
|
36
|
-
--gray-1: #f1f3f5;
|
|
37
|
-
--gray-2: #e9ecef;
|
|
38
|
-
--gray-3: #dee2e6;
|
|
39
|
-
--gray-4: #ced4da;
|
|
40
|
-
--gray-5: #adb5bd;
|
|
41
|
-
--gray-6: #868e96;
|
|
42
|
-
--gray-7: #495057;
|
|
43
|
-
--gray-8: #343a40;
|
|
44
|
-
--gray-9: #212529;
|
|
45
|
-
--gray-10: #16191d;
|
|
46
|
-
--gray-11: #0d0f12;
|
|
47
|
-
--gray-12: #030507;
|
|
48
|
-
|
|
49
|
-
/* ═══════════════════════════════════════════════
|
|
50
|
-
Border radius
|
|
51
|
-
═══════════════════════════════════════════════ */
|
|
52
|
-
--radius-1: 6px;
|
|
53
|
-
--radius-2: 8px;
|
|
54
|
-
--radius-3: 12px;
|
|
55
|
-
--radius-4: 20px;
|
|
56
|
-
--radius-round: 9999px;
|
|
57
|
-
|
|
58
|
-
/* ═══════════════════════════════════════════════
|
|
59
|
-
Border size
|
|
60
|
-
═══════════════════════════════════════════════ */
|
|
61
|
-
--border-size-1: 1px;
|
|
62
|
-
--border-size-2: 2px;
|
|
63
|
-
|
|
64
|
-
/* ═══════════════════════════════════════════════
|
|
65
|
-
Shadows
|
|
66
|
-
═══════════════════════════════════════════════ */
|
|
67
|
-
--shadow-1: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
68
|
-
|
|
69
|
-
/* ═══════════════════════════════════════════════
|
|
70
|
-
Typography
|
|
71
|
-
═══════════════════════════════════════════════ */
|
|
72
|
-
--font-sans: 'JetBrains Mono', monospace;
|
|
73
|
-
--font-mono: 'JetBrains Mono', monospace;
|
|
74
|
-
--font-serif: 'Instrument Serif', serif;
|
|
75
|
-
--font-size-00: 0.75rem;
|
|
76
|
-
--font-size-0: 0.875rem;
|
|
77
|
-
--font-size-1: 1rem;
|
|
78
|
-
--font-size-2: 1.25rem;
|
|
79
|
-
--font-size-3: 1.5rem;
|
|
80
|
-
--font-size-4: 2rem;
|
|
81
|
-
--font-size-5: 2.5rem;
|
|
82
|
-
--font-size-6: 3.125rem;
|
|
83
|
-
--font-size-7: 4rem;
|
|
84
|
-
--font-size-8: 5.5rem;
|
|
85
|
-
--font-weight-4: 400;
|
|
86
|
-
--font-weight-5: 500;
|
|
87
|
-
--font-weight-6: 600;
|
|
88
|
-
--font-weight-7: 700;
|
|
89
|
-
--font-weight-8: 800;
|
|
90
|
-
--font-weight-9: 900;
|
|
91
|
-
--font-letterspacing-0: 0;
|
|
92
|
-
--font-letterspacing-1: 0;
|
|
93
|
-
--font-letterspacing-2: 0;
|
|
94
|
-
--font-letterspacing-3: 0;
|
|
95
|
-
--font-letterspacing-4: 0.04em;
|
|
96
|
-
--font-letterspacing-5: 0.08em;
|
|
97
|
-
--font-lineheight-1: 0.95;
|
|
98
|
-
--font-lineheight-3: 1.5;
|
|
99
|
-
--font-lineheight-4: 1.75;
|
|
100
|
-
|
|
101
|
-
/* ═══════════════════════════════════════════════
|
|
102
|
-
Animation easing
|
|
103
|
-
═══════════════════════════════════════════════ */
|
|
104
|
-
--ease-1: cubic-bezier(0.25, 0, 0.5, 1);
|
|
105
|
-
--ease-2: cubic-bezier(0.45, 0, 0.25, 1);
|
|
106
|
-
--ease-3: cubic-bezier(0.5, 0, 0, 1);
|
|
107
|
-
--duration-2: 200ms;
|
|
108
|
-
--motion-fast: 160ms;
|
|
109
|
-
--motion-medium: 320ms;
|
|
110
|
-
--motion-standard: cubic-bezier(.2,.8,.2,1);
|
|
111
|
-
--focus-size: 2px;
|
|
112
|
-
--focus-offset: 3px;
|
|
113
|
-
|
|
114
|
-
/* ═══════════════════════════════════════════════
|
|
115
|
-
Brand tokens
|
|
116
|
-
═══════════════════════════════════════════════ */
|
|
117
|
-
--brand: var(--violet-6);
|
|
118
|
-
--brand-hover: var(--violet-7);
|
|
119
|
-
--brand-light: var(--violet-4);
|
|
120
|
-
--brand-pale: var(--violet-1);
|
|
121
|
-
--brand-deep: var(--violet-11);
|
|
122
|
-
--brand-subtle: color-mix(in srgb, var(--brand) 12%, transparent);
|
|
123
|
-
--brand-glow: color-mix(in srgb, var(--brand) 24%, transparent);
|
|
124
|
-
--on-brand: var(--gray-0);
|
|
125
|
-
--site-container: 1120px;
|
|
126
|
-
--site-container-wide: 1240px;
|
|
127
|
-
--site-container-reading: 760px;
|
|
128
|
-
--site-section-block: var(--size-16);
|
|
129
|
-
--site-section-gap: var(--size-8);
|
|
130
|
-
|
|
131
|
-
/* ═══════════════════════════════════════════════
|
|
132
|
-
Component semantic defaults
|
|
133
|
-
═══════════════════════════════════════════════ */
|
|
134
|
-
--btn-padding-x: var(--size-4);
|
|
135
|
-
--btn-padding-y: var(--size-2);
|
|
136
|
-
--btn-radius: var(--radius-1);
|
|
137
|
-
--btn-font-size: var(--font-size-0);
|
|
138
|
-
--btn-font-weight: var(--font-weight-7);
|
|
139
|
-
--btn-text-case: none;
|
|
140
|
-
--card-padding: var(--size-6);
|
|
141
|
-
--card-radius: var(--radius-1);
|
|
142
|
-
--badge-padding-x: var(--size-2);
|
|
143
|
-
--badge-padding-y: 2px;
|
|
144
|
-
--badge-radius: var(--radius-1);
|
|
145
|
-
--badge-font-size: var(--font-size-00);
|
|
146
|
-
--alert-padding: var(--size-4);
|
|
147
|
-
--alert-radius: var(--radius-2);
|
|
148
|
-
--input-padding-x: var(--size-3);
|
|
149
|
-
--input-padding-y: var(--size-2);
|
|
150
|
-
--input-radius: var(--radius-1);
|
|
151
|
-
--input-font-size: var(--font-size-0);
|
|
152
|
-
--input-border-color: var(--border);
|
|
153
|
-
--divider-margin: var(--size-4) 0;
|
|
154
|
-
--divider-color: var(--border);
|
|
155
|
-
--tooltip-bg: var(--gray-9);
|
|
156
|
-
--tooltip-color: var(--gray-0);
|
|
157
|
-
--tooltip-radius: var(--radius-1);
|
|
158
|
-
--tooltip-padding: var(--size-1) var(--size-2);
|
|
159
|
-
--modal-bg: var(--bg-elevated);
|
|
160
|
-
--modal-radius: var(--radius-3);
|
|
161
|
-
--modal-padding: var(--size-6);
|
|
162
|
-
--menu-padding: var(--size-2);
|
|
163
|
-
--menu-radius: var(--radius-2);
|
|
164
|
-
--menu-item-padding: var(--size-2) var(--size-4);
|
|
165
|
-
--dropdown-bg: var(--bg-elevated);
|
|
166
|
-
--dropdown-radius: var(--radius-2);
|
|
167
|
-
--tab-padding: var(--size-2) var(--size-4);
|
|
168
|
-
--tab-radius: var(--radius-1);
|
|
169
|
-
|
|
170
|
-
/* Shared component recipes: primitives consume these semantic roles only. */
|
|
171
|
-
--focus-ring: color-mix(in srgb, var(--brand-light) 84%, white);
|
|
172
|
-
--ui-control-text: var(--text-primary);
|
|
173
|
-
--ui-control-bg: color-mix(in srgb, var(--bg-elevated) 78%, transparent);
|
|
174
|
-
--ui-control-border: color-mix(in srgb, var(--border) 72%, var(--brand));
|
|
175
|
-
--ui-control-border-hover: color-mix(in srgb, var(--brand-light) 74%, var(--border));
|
|
176
|
-
--ui-control-radius: var(--radius-1);
|
|
177
|
-
--ui-control-highlight: inset 0 1px 0 color-mix(in srgb, white 12%, transparent);
|
|
178
|
-
--surface-glass: linear-gradient(145deg, color-mix(in srgb, var(--brand) 9%, var(--bg-card)), color-mix(in srgb, var(--bg-card) 90%, transparent));
|
|
179
|
-
--surface-overlay: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
|
|
180
|
-
--surface-border: color-mix(in srgb, var(--border) 78%, var(--brand));
|
|
181
|
-
--surface-border-strong: color-mix(in srgb, var(--border-hover) 62%, var(--brand));
|
|
182
|
-
--surface-radius: var(--radius-2);
|
|
183
|
-
--overlay-radius: var(--radius-3);
|
|
184
|
-
--surface-highlight: inset 0 1px 0 color-mix(in srgb, white 8%, transparent);
|
|
185
|
-
--surface-shadow: 0 20px 60px color-mix(in srgb, var(--gray-12) 20%, transparent);
|
|
186
|
-
--overlay-shadow: 0 28px 90px color-mix(in srgb, var(--gray-12) 48%, transparent);
|
|
187
|
-
|
|
188
|
-
/* ═══════════════════════════════════════════════
|
|
189
|
-
UI Semantic Tokens (light defaults)
|
|
190
|
-
Dark mode overrides via :root[data-theme="dark"] in SSG
|
|
191
|
-
═══════════════════════════════════════════════ */
|
|
192
|
-
--text-primary: var(--gray-9);
|
|
193
|
-
--text-secondary: var(--gray-8);
|
|
194
|
-
--text-muted: var(--gray-5);
|
|
195
|
-
--bg-base: color-mix(in srgb, var(--violet-0) 42%, var(--gray-0));
|
|
196
|
-
--bg-surface: color-mix(in srgb, var(--violet-0) 32%, var(--gray-1));
|
|
197
|
-
--bg-card: color-mix(in srgb, var(--violet-0) 18%, var(--gray-0));
|
|
198
|
-
--bg-elevated: #ffffff;
|
|
199
|
-
--bg-hover: var(--gray-2);
|
|
200
|
-
--bg-muted: var(--gray-1);
|
|
201
|
-
--bg-code: var(--gray-11);
|
|
202
|
-
--code-border: var(--gray-8);
|
|
203
|
-
--code-text: var(--gray-2);
|
|
204
|
-
--border: var(--gray-3);
|
|
205
|
-
--border-hover: var(--gray-4);
|
|
206
|
-
--error: #dc3545;
|
|
207
|
-
--error-subtle: rgba(220, 53, 69, 0.1);
|
|
208
|
-
--success: #16a34a;
|
|
209
|
-
--success-subtle: rgba(22, 163, 74, 0.1);
|
|
210
|
-
--warning: #d97706;
|
|
211
|
-
--warning-subtle: rgba(217, 119, 6, 0.1);
|
|
212
|
-
--info: #2563eb;
|
|
213
|
-
--info-subtle: rgba(37, 99, 235, 0.1);
|
|
214
|
-
--overlay: rgba(0, 0, 0, 0.4);
|
|
215
|
-
--nav-bg: color-mix(in srgb, var(--bg-base) 86%, transparent);
|
|
216
|
-
--nav-height: 72px;
|
|
217
|
-
--nav-link-color: var(--text-primary);
|
|
218
|
-
--nav-link-hover: var(--brand);
|
|
219
|
-
--nav-link-size: var(--font-size-0);
|
|
220
|
-
|
|
221
|
-
/* ═══════════════════════════════════════════════
|
|
222
|
-
Open Props Color Scales (light mode)
|
|
223
|
-
https://open-props.style
|
|
224
|
-
═══════════════════════════════════════════════ */
|
|
225
|
-
--indigo-6: #4c6ef5;
|
|
226
|
-
--green-0: #ebfbee;
|
|
227
|
-
--green-1: #d3f9d8;
|
|
228
|
-
--green-2: #b2f2bb;
|
|
229
|
-
--green-3: #8ce99a;
|
|
230
|
-
--green-4: #69db7c;
|
|
231
|
-
--green-5: #51cf66;
|
|
232
|
-
--green-6: #40c057;
|
|
233
|
-
--green-7: #37b24d;
|
|
234
|
-
--green-8: #2f9e44;
|
|
235
|
-
--green-9: #2b8a3e;
|
|
236
|
-
--green-10: #226231;
|
|
237
|
-
--green-11: #1a4725;
|
|
238
|
-
--green-12: #0f2d18;
|
|
239
|
-
--red-0: #fff5f5;
|
|
240
|
-
--red-1: #ffe3e3;
|
|
241
|
-
--red-2: #ffc9c9;
|
|
242
|
-
--red-3: #ffa8a8;
|
|
243
|
-
--red-4: #ff8787;
|
|
244
|
-
--red-5: #ff6b6b;
|
|
245
|
-
--red-6: #fa5252;
|
|
246
|
-
--red-7: #f03e3e;
|
|
247
|
-
--red-8: #e03131;
|
|
248
|
-
--red-9: #c92a2a;
|
|
249
|
-
--red-10: #a61e1e;
|
|
250
|
-
--red-11: #821515;
|
|
251
|
-
--red-12: #540d0d;
|
|
252
|
-
--orange-0: #fff4e6;
|
|
253
|
-
--orange-1: #ffe8cc;
|
|
254
|
-
--orange-2: #ffd8a8;
|
|
255
|
-
--orange-3: #ffc078;
|
|
256
|
-
--orange-4: #ffa94d;
|
|
257
|
-
--orange-5: #ff922b;
|
|
258
|
-
--orange-6: #fd7e14;
|
|
259
|
-
--orange-7: #f76707;
|
|
260
|
-
--orange-8: #e8590c;
|
|
261
|
-
--orange-9: #d9480f;
|
|
262
|
-
--orange-10: #b03a00;
|
|
263
|
-
--orange-11: #872a00;
|
|
264
|
-
--orange-12: #5c1a00;
|
|
265
|
-
--violet-0: #fbf7ff;
|
|
266
|
-
--violet-1: #f3eaff;
|
|
267
|
-
--violet-2: #e6d8ff;
|
|
268
|
-
--violet-3: #d0bdff;
|
|
269
|
-
--violet-4: #b59cff;
|
|
270
|
-
--violet-5: #9c7df2;
|
|
271
|
-
--violet-6: #8262db;
|
|
272
|
-
--violet-7: #6d4cc4;
|
|
273
|
-
--violet-8: #58399e;
|
|
274
|
-
--violet-9: #422774;
|
|
275
|
-
--violet-10: #2f1c52;
|
|
276
|
-
--violet-11: #21143b;
|
|
277
|
-
--violet-12: #130a22;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
/* ═══════════════════════════════════════════════
|
|
281
|
-
Dark Mode — matches hosts with data-theme="dark".
|
|
282
|
-
Document-level overrides live in openPropsRootSheet
|
|
283
|
-
(:root[data-theme="dark"]) so all shadow DOMs inherit.
|
|
284
|
-
═══════════════════════════════════════════════ */
|
|
285
|
-
:host([data-theme='dark']) {
|
|
286
|
-
--gray-0: #030507;
|
|
287
|
-
--gray-1: #0d0f12;
|
|
288
|
-
--gray-2: #16191d;
|
|
289
|
-
--gray-3: #212529;
|
|
290
|
-
--gray-4: #343a40;
|
|
291
|
-
--gray-5: #495057;
|
|
292
|
-
--gray-6: #868e96;
|
|
293
|
-
--gray-7: #adb5bd;
|
|
294
|
-
--gray-8: #ced4da;
|
|
295
|
-
--gray-9: #dee2e6;
|
|
296
|
-
--gray-10: #e9ecef;
|
|
297
|
-
--gray-11: #f1f3f5;
|
|
298
|
-
--gray-12: #f8f9fa;
|
|
299
|
-
--brand: var(--violet-6);
|
|
300
|
-
--brand-hover: var(--violet-7);
|
|
301
|
-
--brand-light: var(--violet-4);
|
|
302
|
-
--brand-deep: var(--violet-12);
|
|
303
|
-
--brand-subtle: color-mix(in srgb, var(--brand) 16%, transparent);
|
|
304
|
-
--brand-glow: color-mix(in srgb, var(--brand) 22%, transparent);
|
|
305
|
-
--on-brand: var(--gray-12);
|
|
306
|
-
--text-primary: var(--gray-10);
|
|
307
|
-
--text-secondary: var(--gray-8);
|
|
308
|
-
--text-muted: var(--gray-6);
|
|
309
|
-
--bg-base: color-mix(in srgb, var(--violet-0) 18%, var(--gray-0));
|
|
310
|
-
--bg-surface: color-mix(in srgb, var(--violet-1) 14%, var(--gray-1));
|
|
311
|
-
--bg-card: color-mix(in srgb, var(--violet-2) 10%, var(--gray-2));
|
|
312
|
-
--bg-elevated: var(--gray-1);
|
|
313
|
-
--bg-hover: var(--gray-3);
|
|
314
|
-
--bg-code: var(--gray-1);
|
|
315
|
-
--code-border: var(--gray-4);
|
|
316
|
-
--code-text: var(--gray-10);
|
|
317
|
-
--border: var(--gray-3);
|
|
318
|
-
--border-hover: var(--gray-4);
|
|
319
|
-
--error: #f87171;
|
|
320
|
-
--error-subtle: rgba(248, 113, 113, 0.15);
|
|
321
|
-
--success: #4ade80;
|
|
322
|
-
--success-subtle: rgba(74, 222, 128, 0.1);
|
|
323
|
-
--warning: #fbbf24;
|
|
324
|
-
--warning-subtle: rgba(251, 191, 36, 0.1);
|
|
325
|
-
--info: #60a5fa;
|
|
326
|
-
--info-subtle: rgba(96, 165, 250, 0.1);
|
|
327
|
-
--overlay: rgba(0, 0, 0, 0.6);
|
|
328
|
-
--nav-bg: color-mix(in srgb, var(--bg-base) 86%, transparent);
|
|
329
|
-
--nav-link-color: var(--text-primary);
|
|
330
|
-
--nav-link-hover: var(--brand-light);
|
|
331
|
-
|
|
332
|
-
/* Open Props Color Scales (dark mode inversion) */
|
|
333
|
-
--indigo-6: #4c6ef5;
|
|
334
|
-
--green-0: #0f2d18;
|
|
335
|
-
--green-1: #1a4725;
|
|
336
|
-
--green-2: #226231;
|
|
337
|
-
--green-3: #2b8a3e;
|
|
338
|
-
--green-4: #2f9e44;
|
|
339
|
-
--green-5: #37b24d;
|
|
340
|
-
--green-6: #40c057;
|
|
341
|
-
--green-7: #51cf66;
|
|
342
|
-
--green-8: #69db7c;
|
|
343
|
-
--green-9: #8ce99a;
|
|
344
|
-
--green-10: #b2f2bb;
|
|
345
|
-
--green-11: #d3f9d8;
|
|
346
|
-
--green-12: #ebfbee;
|
|
347
|
-
--red-0: #540d0d;
|
|
348
|
-
--red-1: #821515;
|
|
349
|
-
--red-2: #a61e1e;
|
|
350
|
-
--red-3: #c92a2a;
|
|
351
|
-
--red-4: #e03131;
|
|
352
|
-
--red-5: #f03e3e;
|
|
353
|
-
--red-6: #fa5252;
|
|
354
|
-
--red-7: #ff6b6b;
|
|
355
|
-
--red-8: #ff8787;
|
|
356
|
-
--red-9: #ffa8a8;
|
|
357
|
-
--red-10: #ffc9c9;
|
|
358
|
-
--red-11: #ffe3e3;
|
|
359
|
-
--red-12: #fff5f5;
|
|
360
|
-
--orange-0: #5c1a00;
|
|
361
|
-
--orange-1: #872a00;
|
|
362
|
-
--orange-2: #b03a00;
|
|
363
|
-
--orange-3: #d9480f;
|
|
364
|
-
--orange-4: #e8590c;
|
|
365
|
-
--orange-5: #f76707;
|
|
366
|
-
--orange-6: #fd7e14;
|
|
367
|
-
--orange-7: #ff922b;
|
|
368
|
-
--orange-8: #ffa94d;
|
|
369
|
-
--orange-9: #ffc078;
|
|
370
|
-
--orange-10: #ffd8a8;
|
|
371
|
-
--orange-11: #ffe8cc;
|
|
372
|
-
--orange-12: #fff4e6;
|
|
373
|
-
--violet-0: #130a22;
|
|
374
|
-
--violet-1: #21143b;
|
|
375
|
-
--violet-2: #2f1c52;
|
|
376
|
-
--violet-3: #422774;
|
|
377
|
-
--violet-4: #58399e;
|
|
378
|
-
--violet-5: #6d4cc4;
|
|
379
|
-
--violet-6: #8262db;
|
|
380
|
-
--violet-7: #9c7df2;
|
|
381
|
-
--violet-8: #b59cff;
|
|
382
|
-
--violet-9: #d0bdff;
|
|
383
|
-
--violet-10: #e6d8ff;
|
|
384
|
-
--violet-11: #f3eaff;
|
|
385
|
-
--violet-12: #fbf7ff;
|
|
386
|
-
}
|