@hirobius/design-system 0.8.1
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/LICENSE/main.tsx +21 -0
- package/README.md +124 -0
- package/dist/chunks/TokenDisplayContext-B3gxyQN7.js +95 -0
- package/dist/chunks/form-DnGRy27o.js +63 -0
- package/dist/cn.js +8 -0
- package/dist/contexts.js +133 -0
- package/dist/form.js +62 -0
- package/dist/hirobius-ui.js +5611 -0
- package/dist/manifest.js +28 -0
- package/dist/tokens.css +1 -0
- package/dist/tokens.js +693 -0
- package/dist/types/src/app/components/activity-feed.d.ts +43 -0
- package/dist/types/src/app/components/alert.d.ts +18 -0
- package/dist/types/src/app/components/asset-img.d.ts +54 -0
- package/dist/types/src/app/components/avatar.d.ts +23 -0
- package/dist/types/src/app/components/badge.d.ts +20 -0
- package/dist/types/src/app/components/breadcrumb.d.ts +26 -0
- package/dist/types/src/app/components/button.d.ts +37 -0
- package/dist/types/src/app/components/callout.d.ts +23 -0
- package/dist/types/src/app/components/card.d.ts +119 -0
- package/dist/types/src/app/components/checkbox.d.ts +20 -0
- package/dist/types/src/app/components/cinematic-link.d.ts +13 -0
- package/dist/types/src/app/components/code-block.d.ts +29 -0
- package/dist/types/src/app/components/combobox.d.ts +46 -0
- package/dist/types/src/app/components/component-instance-matrix.d.ts +21 -0
- package/dist/types/src/app/components/container.d.ts +31 -0
- package/dist/types/src/app/components/dialog.d.ts +73 -0
- package/dist/types/src/app/components/disclosure.d.ts +32 -0
- package/dist/types/src/app/components/divider.d.ts +21 -0
- package/dist/types/src/app/components/doc-link-card.d.ts +26 -0
- package/dist/types/src/app/components/empty-state.d.ts +24 -0
- package/dist/types/src/app/components/error-boundary.d.ts +25 -0
- package/dist/types/src/app/components/error-pattern.d.ts +9 -0
- package/dist/types/src/app/components/field.d.ts +25 -0
- package/dist/types/src/app/components/form.d.ts +106 -0
- package/dist/types/src/app/components/foundation-swatch.d.ts +39 -0
- package/dist/types/src/app/components/grid.d.ts +65 -0
- package/dist/types/src/app/components/heading-stack.d.ts +42 -0
- package/dist/types/src/app/components/history-card.d.ts +12 -0
- package/dist/types/src/app/components/icon-button.d.ts +23 -0
- package/dist/types/src/app/components/icon.d.ts +30 -0
- package/dist/types/src/app/components/info-page.d.ts +10 -0
- package/dist/types/src/app/components/inline-code.d.ts +12 -0
- package/dist/types/src/app/components/inline-link.d.ts +17 -0
- package/dist/types/src/app/components/input.d.ts +46 -0
- package/dist/types/src/app/components/lab/tokenUtils.d.ts +38 -0
- package/dist/types/src/app/components/menu.d.ts +56 -0
- package/dist/types/src/app/components/nav-group.d.ts +24 -0
- package/dist/types/src/app/components/nav-item.d.ts +21 -0
- package/dist/types/src/app/components/not-found-pattern.d.ts +1 -0
- package/dist/types/src/app/components/page.d.ts +43 -0
- package/dist/types/src/app/components/pagination.d.ts +24 -0
- package/dist/types/src/app/components/popover.d.ts +44 -0
- package/dist/types/src/app/components/progress.d.ts +25 -0
- package/dist/types/src/app/components/radio.d.ts +18 -0
- package/dist/types/src/app/components/segmented-control.d.ts +33 -0
- package/dist/types/src/app/components/skeleton.d.ts +25 -0
- package/dist/types/src/app/components/sketch.d.ts +13 -0
- package/dist/types/src/app/components/slider.d.ts +22 -0
- package/dist/types/src/app/components/spinner.d.ts +20 -0
- package/dist/types/src/app/components/stack.d.ts +39 -0
- package/dist/types/src/app/components/stat.d.ts +24 -0
- package/dist/types/src/app/components/status-list-item.d.ts +25 -0
- package/dist/types/src/app/components/status-tile.d.ts +22 -0
- package/dist/types/src/app/components/stepper-field.d.ts +13 -0
- package/dist/types/src/app/components/surface-padding.d.ts +18 -0
- package/dist/types/src/app/components/surface.d.ts +30 -0
- package/dist/types/src/app/components/table.d.ts +40 -0
- package/dist/types/src/app/components/tabs.d.ts +27 -0
- package/dist/types/src/app/components/tag.d.ts +32 -0
- package/dist/types/src/app/components/text-lockup.d.ts +38 -0
- package/dist/types/src/app/components/text.d.ts +26 -0
- package/dist/types/src/app/components/tile-grid.d.ts +17 -0
- package/dist/types/src/app/components/toast.d.ts +56 -0
- package/dist/types/src/app/components/toggle.d.ts +18 -0
- package/dist/types/src/app/components/token.d.ts +59 -0
- package/dist/types/src/app/components/tooltip.d.ts +33 -0
- package/dist/types/src/app/context/DemoStateContext.d.ts +21 -0
- package/dist/types/src/app/context/FontContext.d.ts +4 -0
- package/dist/types/src/app/context/LanguageContext.d.ts +23 -0
- package/dist/types/src/app/context/RouterContext.d.ts +61 -0
- package/dist/types/src/app/context/TenantContext.d.ts +29 -0
- package/dist/types/src/app/context/ThemeContext.d.ts +18 -0
- package/dist/types/src/app/context/TokenDisplayContext.d.ts +11 -0
- package/dist/types/src/app/context/index.d.ts +19 -0
- package/dist/types/src/app/data/manifest-types.d.ts +128 -0
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +586 -0
- package/dist/types/src/app/design-system/generated-token-values.d.ts +223 -0
- package/dist/types/src/app/design-system/theme.d.ts +32 -0
- package/dist/types/src/app/design-system/tokens.d.ts +333 -0
- package/dist/types/src/app/hooks/useFocusVisible.d.ts +9 -0
- package/dist/types/src/app/hooks/useInteractionState.d.ts +27 -0
- package/dist/types/src/app/layouts/CaseStudyLayout.d.ts +21 -0
- package/dist/types/src/app/layouts/DocLayout.d.ts +16 -0
- package/dist/types/src/app/layouts/EmbeddedDocLayoutContext.d.ts +6 -0
- package/dist/types/src/app/lib/nav-active.d.ts +16 -0
- package/dist/types/src/app/lib/navLevels.d.ts +4 -0
- package/dist/types/src/app/pages/hds/HdsSystemDocLayout.d.ts +7 -0
- package/dist/types/src/form/hds-form.d.ts +61 -0
- package/dist/types/src/form/index.d.ts +30 -0
- package/dist/types/src/form/use-hds-form.d.ts +23 -0
- package/dist/types/src/index.d.ts +2276 -0
- package/dist/types/src/lib/deprecation.d.ts +4 -0
- package/dist/types/src/lib/manifest-entry.d.ts +3 -0
- package/dist/types/src/lib/utils.d.ts +3 -0
- package/dist/variables.css +461 -0
- package/hirobius.tokens.json +2220 -0
- package/package.json +366 -0
- package/protocol/envelope.mjs +201 -0
- package/protocol/figma-snapshot.schema.json +190 -0
- package/public/hds-manifest.json +11230 -0
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,693 @@
|
|
|
1
|
+
const a = {
|
|
2
|
+
primitive: {
|
|
3
|
+
color: {
|
|
4
|
+
neutral: {
|
|
5
|
+
50: "#fafafa",
|
|
6
|
+
100: "#f5f5f5",
|
|
7
|
+
200: "#e5e5e5",
|
|
8
|
+
300: "#d4d4d4",
|
|
9
|
+
400: "#a3a3a3",
|
|
10
|
+
500: "#737373",
|
|
11
|
+
600: "#525252",
|
|
12
|
+
700: "#404040",
|
|
13
|
+
800: "#262626",
|
|
14
|
+
850: "#1a1a1a",
|
|
15
|
+
900: "#111111",
|
|
16
|
+
950: "#0a0a0a",
|
|
17
|
+
white: "#ffffff",
|
|
18
|
+
black: "#000000"
|
|
19
|
+
},
|
|
20
|
+
blue: {
|
|
21
|
+
50: "oklch(0.96 0.03 266.54)",
|
|
22
|
+
100: "oklch(0.92 0.04 266.54)",
|
|
23
|
+
200: "oklch(0.88 0.07 266.54)",
|
|
24
|
+
300: "oklch(0.70 0.2903 266.54)",
|
|
25
|
+
400: "oklch(0.65 0.2903 266.54)",
|
|
26
|
+
450: "oklch(0.56 0.29 266.60)",
|
|
27
|
+
500: "#1E2EFD",
|
|
28
|
+
600: "oklch(0.45 0.2903 266.54)",
|
|
29
|
+
700: "oklch(0.44 0.2903 266.54)",
|
|
30
|
+
800: "oklch(0.30 0.07 266.54)",
|
|
31
|
+
900: "oklch(0.22 0.05 266.54)"
|
|
32
|
+
},
|
|
33
|
+
red: {
|
|
34
|
+
50: "#fef2f2",
|
|
35
|
+
400: "#f87171",
|
|
36
|
+
700: "#b91c1c",
|
|
37
|
+
950: "#450a0a"
|
|
38
|
+
},
|
|
39
|
+
green: {
|
|
40
|
+
50: "#ecfdf5",
|
|
41
|
+
400: "#34d399",
|
|
42
|
+
700: "#047857",
|
|
43
|
+
950: "#022c22"
|
|
44
|
+
},
|
|
45
|
+
amber: {
|
|
46
|
+
50: "#fffbeb",
|
|
47
|
+
400: "#fbbf24",
|
|
48
|
+
800: "#92400e",
|
|
49
|
+
950: "#451a03"
|
|
50
|
+
},
|
|
51
|
+
stone: {
|
|
52
|
+
100: "#F5EFE7",
|
|
53
|
+
400: "#D0B492",
|
|
54
|
+
450: "#BC9D7E",
|
|
55
|
+
500: "#A8896A",
|
|
56
|
+
600: "#8B6F47",
|
|
57
|
+
700: "#75593A",
|
|
58
|
+
800: "#5C432A",
|
|
59
|
+
950: "#3A2E1F"
|
|
60
|
+
},
|
|
61
|
+
projectBrand: {
|
|
62
|
+
microsoftGameDev: {
|
|
63
|
+
100: "#E5E5FC",
|
|
64
|
+
500: "#6d31fb",
|
|
65
|
+
900: "oklch(0.22 0.16 304)"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
space: {
|
|
70
|
+
0: "0px",
|
|
71
|
+
1: "4px",
|
|
72
|
+
2: "8px",
|
|
73
|
+
3: "12px",
|
|
74
|
+
4: "16px",
|
|
75
|
+
5: "20px",
|
|
76
|
+
6: "24px",
|
|
77
|
+
7: "28px",
|
|
78
|
+
8: "32px",
|
|
79
|
+
10: "40px",
|
|
80
|
+
12: "48px",
|
|
81
|
+
16: "64px",
|
|
82
|
+
20: "80px",
|
|
83
|
+
24: "96px",
|
|
84
|
+
32: "128px",
|
|
85
|
+
px1: "1px",
|
|
86
|
+
px2: "2px",
|
|
87
|
+
px6: "6px",
|
|
88
|
+
px10: "10px"
|
|
89
|
+
},
|
|
90
|
+
blur: {
|
|
91
|
+
8: "8px",
|
|
92
|
+
16: "16px"
|
|
93
|
+
},
|
|
94
|
+
radius: {
|
|
95
|
+
0: "0px",
|
|
96
|
+
2: "2px",
|
|
97
|
+
4: "4px",
|
|
98
|
+
8: "8px",
|
|
99
|
+
12: "12px",
|
|
100
|
+
full: "9999px"
|
|
101
|
+
},
|
|
102
|
+
typography: {
|
|
103
|
+
family: {
|
|
104
|
+
primary: ["Satoshi", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "sans-serif"],
|
|
105
|
+
display: ["Clash Display", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "sans-serif"],
|
|
106
|
+
mono: ["Geist Mono", "Courier New", "monospace"]
|
|
107
|
+
},
|
|
108
|
+
size: {
|
|
109
|
+
"2xs": "10px",
|
|
110
|
+
xs: "13px",
|
|
111
|
+
sm: "15px",
|
|
112
|
+
base: "17px",
|
|
113
|
+
lg: "20px",
|
|
114
|
+
xl: "24px",
|
|
115
|
+
"2xl": "30px",
|
|
116
|
+
"3xl": "36px",
|
|
117
|
+
"4xl": "48px",
|
|
118
|
+
"5xl": "80px",
|
|
119
|
+
"7xl": "72px"
|
|
120
|
+
},
|
|
121
|
+
weight: {
|
|
122
|
+
light: "300",
|
|
123
|
+
regular: "400",
|
|
124
|
+
medium: "500",
|
|
125
|
+
semibold: "600",
|
|
126
|
+
bold: "700"
|
|
127
|
+
},
|
|
128
|
+
lineHeight: {
|
|
129
|
+
compact: "0.95",
|
|
130
|
+
none: "1",
|
|
131
|
+
tight: "1.25",
|
|
132
|
+
snug: "1.375",
|
|
133
|
+
normal: "1.5",
|
|
134
|
+
relaxed: "1.625"
|
|
135
|
+
},
|
|
136
|
+
letterSpacing: {
|
|
137
|
+
tighter: "-0.02em",
|
|
138
|
+
tight: "-0.01em",
|
|
139
|
+
normal: "0em",
|
|
140
|
+
wide: "0.01em",
|
|
141
|
+
wider: "0.02em",
|
|
142
|
+
caps: "0.06em"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
duration: {
|
|
146
|
+
instant: "100ms",
|
|
147
|
+
short: "150ms",
|
|
148
|
+
medium: "250ms",
|
|
149
|
+
long: "400ms"
|
|
150
|
+
},
|
|
151
|
+
easing: {
|
|
152
|
+
emphasized: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
153
|
+
decelerate: "cubic-bezier(0, 0, 0.2, 1)",
|
|
154
|
+
accelerate: "cubic-bezier(0.4, 0, 1, 1)",
|
|
155
|
+
elastic: "spring(300, 20, 1)"
|
|
156
|
+
},
|
|
157
|
+
shadow: {
|
|
158
|
+
color: "220 13% 18%"
|
|
159
|
+
},
|
|
160
|
+
breakpoint: {
|
|
161
|
+
xs: "375px",
|
|
162
|
+
sm: "640px",
|
|
163
|
+
md: "768px",
|
|
164
|
+
lg: "1024px",
|
|
165
|
+
xl: "1280px"
|
|
166
|
+
},
|
|
167
|
+
size: {
|
|
168
|
+
8: "8px",
|
|
169
|
+
10: "10px",
|
|
170
|
+
12: "12px",
|
|
171
|
+
16: "16px",
|
|
172
|
+
20: "20px",
|
|
173
|
+
24: "24px",
|
|
174
|
+
32: "32px",
|
|
175
|
+
40: "40px",
|
|
176
|
+
48: "48px",
|
|
177
|
+
64: "64px",
|
|
178
|
+
80: "80px",
|
|
179
|
+
96: "96px",
|
|
180
|
+
interactive: {
|
|
181
|
+
min: "44px"
|
|
182
|
+
},
|
|
183
|
+
width: {
|
|
184
|
+
96: "96px",
|
|
185
|
+
760: "760px",
|
|
186
|
+
1200: "1200px",
|
|
187
|
+
"50ch": "50ch"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
grid: {
|
|
191
|
+
columns: {
|
|
192
|
+
1: "1",
|
|
193
|
+
2: "2",
|
|
194
|
+
3: "3"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
zIndex: {
|
|
198
|
+
0: "0",
|
|
199
|
+
10: "10",
|
|
200
|
+
100: "100",
|
|
201
|
+
1e3: "1000"
|
|
202
|
+
},
|
|
203
|
+
borderWidth: {
|
|
204
|
+
xs: "1px",
|
|
205
|
+
sm: "2px",
|
|
206
|
+
md: "4px"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}, i = {
|
|
210
|
+
primitive: {
|
|
211
|
+
breakpoint: {
|
|
212
|
+
xs: "var(--primitive-breakpoint-xs)",
|
|
213
|
+
sm: "var(--primitive-breakpoint-sm)",
|
|
214
|
+
md: "var(--primitive-breakpoint-md)",
|
|
215
|
+
lg: "var(--primitive-breakpoint-lg)",
|
|
216
|
+
xl: "var(--primitive-breakpoint-xl)"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
semantic: {
|
|
220
|
+
layout: {
|
|
221
|
+
container: {
|
|
222
|
+
maxWidth: "var(--semantic-layout-container-maxWidth)"
|
|
223
|
+
},
|
|
224
|
+
content: {
|
|
225
|
+
maxWidth: "var(--semantic-layout-content-maxWidth)"
|
|
226
|
+
},
|
|
227
|
+
prose: {
|
|
228
|
+
maxWidth: "var(--semantic-layout-prose-maxWidth)"
|
|
229
|
+
},
|
|
230
|
+
section: {
|
|
231
|
+
paddingY: "var(--semantic-layout-section-paddingY)"
|
|
232
|
+
},
|
|
233
|
+
grid: {
|
|
234
|
+
gap: "var(--semantic-layout-grid-gap)"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
typography: {
|
|
238
|
+
display: {
|
|
239
|
+
fontFamily: "var(--semantic-typography-display-font-family)",
|
|
240
|
+
fontSize: "var(--semantic-typography-display-font-size)",
|
|
241
|
+
fontWeight: "var(--semantic-typography-display-font-weight)",
|
|
242
|
+
letterSpacing: "var(--semantic-typography-display-letter-spacing)",
|
|
243
|
+
lineHeight: "var(--semantic-typography-display-line-height)"
|
|
244
|
+
},
|
|
245
|
+
h1: {
|
|
246
|
+
fontFamily: "var(--semantic-typography-h1-font-family)",
|
|
247
|
+
fontSize: "var(--semantic-typography-h1-font-size)",
|
|
248
|
+
fontWeight: "var(--semantic-typography-h1-font-weight)",
|
|
249
|
+
letterSpacing: "var(--semantic-typography-h1-letter-spacing)",
|
|
250
|
+
lineHeight: "var(--semantic-typography-h1-line-height)"
|
|
251
|
+
},
|
|
252
|
+
h2: {
|
|
253
|
+
fontFamily: "var(--semantic-typography-h2-font-family)",
|
|
254
|
+
fontSize: "var(--semantic-typography-h2-font-size)",
|
|
255
|
+
fontWeight: "var(--semantic-typography-h2-font-weight)",
|
|
256
|
+
letterSpacing: "var(--semantic-typography-h2-letter-spacing)",
|
|
257
|
+
lineHeight: "var(--semantic-typography-h2-line-height)"
|
|
258
|
+
},
|
|
259
|
+
h3: {
|
|
260
|
+
fontFamily: "var(--semantic-typography-h3-font-family)",
|
|
261
|
+
fontSize: "var(--semantic-typography-h3-font-size)",
|
|
262
|
+
fontWeight: "var(--semantic-typography-h3-font-weight)",
|
|
263
|
+
letterSpacing: "var(--semantic-typography-h3-letter-spacing)",
|
|
264
|
+
lineHeight: "var(--semantic-typography-h3-line-height)"
|
|
265
|
+
},
|
|
266
|
+
body: {
|
|
267
|
+
fontFamily: "var(--semantic-typography-body-font-family)",
|
|
268
|
+
fontSize: "var(--semantic-typography-body-font-size)",
|
|
269
|
+
fontWeight: "var(--semantic-typography-body-font-weight)",
|
|
270
|
+
letterSpacing: "var(--semantic-typography-body-letter-spacing)",
|
|
271
|
+
lineHeight: "var(--semantic-typography-body-line-height)",
|
|
272
|
+
maxWidth: "var(--semantic-typography-body-max-width)"
|
|
273
|
+
},
|
|
274
|
+
ui: {
|
|
275
|
+
fontFamily: "var(--semantic-typography-ui-font-family)",
|
|
276
|
+
fontSize: "var(--semantic-typography-ui-font-size)",
|
|
277
|
+
fontWeight: "var(--semantic-typography-ui-font-weight)",
|
|
278
|
+
letterSpacing: "var(--semantic-typography-ui-letter-spacing)",
|
|
279
|
+
lineHeight: "var(--semantic-typography-ui-line-height)",
|
|
280
|
+
maxWidth: "var(--semantic-typography-ui-max-width)"
|
|
281
|
+
},
|
|
282
|
+
eyebrow: {
|
|
283
|
+
fontFamily: "var(--semantic-typography-eyebrow-font-family)",
|
|
284
|
+
fontSize: "var(--semantic-typography-eyebrow-font-size)",
|
|
285
|
+
fontWeight: "var(--semantic-typography-eyebrow-font-weight)",
|
|
286
|
+
letterSpacing: "var(--semantic-typography-eyebrow-letter-spacing)",
|
|
287
|
+
lineHeight: "var(--semantic-typography-eyebrow-line-height)",
|
|
288
|
+
textTransform: "var(--semantic-typography-eyebrow-text-transform)"
|
|
289
|
+
},
|
|
290
|
+
mono: {
|
|
291
|
+
fontFamily: "var(--semantic-typography-mono-font-family)",
|
|
292
|
+
fontSize: "var(--semantic-typography-mono-font-size)",
|
|
293
|
+
fontWeight: "var(--semantic-typography-mono-font-weight)",
|
|
294
|
+
letterSpacing: "var(--semantic-typography-mono-letter-spacing)",
|
|
295
|
+
lineHeight: "var(--semantic-typography-mono-line-height)",
|
|
296
|
+
maxWidth: "var(--semantic-typography-mono-max-width)"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
accent: {
|
|
300
|
+
rest: "var(--semantic-accent-rest)",
|
|
301
|
+
hover: "var(--semantic-accent-hover)",
|
|
302
|
+
pressed: "var(--semantic-accent-pressed)",
|
|
303
|
+
disabled: "var(--semantic-accent-disabled)",
|
|
304
|
+
subtle: "var(--semantic-accent-subtle)"
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
function c(r) {
|
|
309
|
+
const t = r ? "dark" : "light";
|
|
310
|
+
return {
|
|
311
|
+
// Backgrounds
|
|
312
|
+
bg: e.color.surface.page[t],
|
|
313
|
+
panelBg: e.color.surface.raised[t],
|
|
314
|
+
fill: "var(--semantic-color-surface-raised)",
|
|
315
|
+
hover: "var(--semantic-color-surface-accentSubtle)",
|
|
316
|
+
brandTint: "var(--semantic-color-surface-accentSubtle)",
|
|
317
|
+
// Content
|
|
318
|
+
content: {
|
|
319
|
+
primary: "var(--semantic-color-content-primary)",
|
|
320
|
+
secondary: "var(--semantic-color-content-secondary)",
|
|
321
|
+
subtle: "var(--semantic-color-content-secondary)",
|
|
322
|
+
faint: "var(--semantic-color-content-disabled)"
|
|
323
|
+
},
|
|
324
|
+
// Borders & dividers
|
|
325
|
+
border: "var(--semantic-color-border-default)",
|
|
326
|
+
rule: "var(--semantic-color-border-default)",
|
|
327
|
+
// Brand & semantic
|
|
328
|
+
accent: e.color.brand,
|
|
329
|
+
blueBar: r ? e.color.blue[400] : e.color.blue[300],
|
|
330
|
+
success: e.color.feedback.success[t],
|
|
331
|
+
danger: e.color.feedback.error[t],
|
|
332
|
+
warning: e.color.feedback.warning[t],
|
|
333
|
+
info: e.color.feedback.info[t]
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
const o = "var(--primitive-typography-family-primary)", n = "var(--primitive-typography-family-mono)", p = (r) => parseFloat(r) / 1e3, s = {
|
|
337
|
+
productive: {
|
|
338
|
+
duration: p(a.primitive.duration.short),
|
|
339
|
+
easing: [0, 0, 0.2, 1]
|
|
340
|
+
},
|
|
341
|
+
expressive: {
|
|
342
|
+
duration: p(a.primitive.duration.medium),
|
|
343
|
+
easing: { type: "spring", stiffness: 300, damping: 20, mass: 1 }
|
|
344
|
+
},
|
|
345
|
+
spatial: {
|
|
346
|
+
duration: p(a.primitive.duration.long),
|
|
347
|
+
easing: [0.4, 0, 0.2, 1]
|
|
348
|
+
},
|
|
349
|
+
exit: {
|
|
350
|
+
duration: p(a.primitive.duration.instant),
|
|
351
|
+
easing: [0.4, 0, 1, 1]
|
|
352
|
+
}
|
|
353
|
+
}, e = {
|
|
354
|
+
// ── Colors ──────────────────────────────────────────────────────────────────
|
|
355
|
+
color: {
|
|
356
|
+
brand: "var(--primitive-color-blue-500)",
|
|
357
|
+
// primitive — use only where dark mode adaptation isn't needed (e.g. bg fills)
|
|
358
|
+
content: {
|
|
359
|
+
primary: "var(--semantic-color-content-primary)",
|
|
360
|
+
// semantic — main content and headings
|
|
361
|
+
secondary: "var(--semantic-color-content-secondary)",
|
|
362
|
+
// semantic — subdued content and captions
|
|
363
|
+
disabled: "var(--semantic-color-content-disabled)",
|
|
364
|
+
// semantic — disabled / placeholder content
|
|
365
|
+
inverse: "var(--semantic-color-content-inverse)",
|
|
366
|
+
// semantic — content on dark surfaces
|
|
367
|
+
accent: "var(--semantic-color-content-accent)",
|
|
368
|
+
// semantic — links and interactive content
|
|
369
|
+
onAccent: "var(--semantic-color-content-onAccent)"
|
|
370
|
+
// semantic — content on accent surfaces
|
|
371
|
+
},
|
|
372
|
+
brandPressed: "var(--primitive-color-blue-600)",
|
|
373
|
+
brandRGB: "30,46,253",
|
|
374
|
+
white: "var(--primitive-color-neutral-white)",
|
|
375
|
+
surface: {
|
|
376
|
+
page: { dark: "var(--semantic-color-surface-page)", light: "var(--semantic-color-surface-page)" },
|
|
377
|
+
raised: { dark: "var(--semantic-color-surface-raised)", light: "var(--semantic-color-surface-raised)" }
|
|
378
|
+
},
|
|
379
|
+
blue: {
|
|
380
|
+
50: "var(--primitive-color-blue-50)",
|
|
381
|
+
100: "var(--primitive-color-blue-100)",
|
|
382
|
+
200: "var(--primitive-color-blue-200)",
|
|
383
|
+
300: "var(--primitive-color-blue-300)",
|
|
384
|
+
400: "var(--primitive-color-blue-400)",
|
|
385
|
+
450: "var(--primitive-color-blue-450)",
|
|
386
|
+
500: "var(--primitive-color-blue-500)",
|
|
387
|
+
600: "var(--primitive-color-blue-600)",
|
|
388
|
+
700: "var(--primitive-color-blue-700)",
|
|
389
|
+
800: "var(--primitive-color-blue-800)",
|
|
390
|
+
900: "var(--primitive-color-blue-900)"
|
|
391
|
+
},
|
|
392
|
+
feedback: {
|
|
393
|
+
success: { dark: a.primitive.color.green[400], light: a.primitive.color.green[700] },
|
|
394
|
+
warning: { dark: a.primitive.color.amber[400], light: a.primitive.color.amber[800] },
|
|
395
|
+
error: { dark: a.primitive.color.red[400], light: a.primitive.color.red[700] },
|
|
396
|
+
info: { dark: a.primitive.color.blue[300], light: a.primitive.color.blue[500] }
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
// ── Typography ───────────────────────────────────────────────────────────────
|
|
400
|
+
fontFamily: o,
|
|
401
|
+
monoFamily: n,
|
|
402
|
+
fontSize: {
|
|
403
|
+
"2xs": "var(--primitive-typography-size-2xs)",
|
|
404
|
+
xs: "var(--primitive-typography-size-xs)",
|
|
405
|
+
sm: "var(--primitive-typography-size-sm)",
|
|
406
|
+
base: "var(--primitive-typography-size-base)",
|
|
407
|
+
lg: "var(--primitive-typography-size-lg)",
|
|
408
|
+
xl: "var(--primitive-typography-size-xl)",
|
|
409
|
+
"2xl": "var(--primitive-typography-size-2xl)",
|
|
410
|
+
"3xl": "var(--primitive-typography-size-3xl)",
|
|
411
|
+
"4xl": "var(--primitive-typography-size-4xl)",
|
|
412
|
+
"5xl": "var(--primitive-typography-size-5xl)"
|
|
413
|
+
},
|
|
414
|
+
fontWeight: {
|
|
415
|
+
regular: "var(--primitive-typography-weight-regular)",
|
|
416
|
+
medium: "var(--primitive-typography-weight-medium)",
|
|
417
|
+
semibold: "var(--primitive-typography-weight-semibold)",
|
|
418
|
+
bold: "var(--primitive-typography-weight-bold)"
|
|
419
|
+
},
|
|
420
|
+
lineHeight: {
|
|
421
|
+
compact: "var(--primitive-typography-lineHeight-compact)",
|
|
422
|
+
none: "var(--primitive-typography-lineHeight-none)",
|
|
423
|
+
tight: "var(--primitive-typography-lineHeight-tight)",
|
|
424
|
+
snug: "var(--primitive-typography-lineHeight-snug)",
|
|
425
|
+
normal: "var(--primitive-typography-lineHeight-normal)",
|
|
426
|
+
relaxed: "var(--primitive-typography-lineHeight-relaxed)"
|
|
427
|
+
},
|
|
428
|
+
letterSpacing: {
|
|
429
|
+
tighter: "var(--primitive-typography-letterSpacing-tighter)",
|
|
430
|
+
tight: "var(--primitive-typography-letterSpacing-tight)",
|
|
431
|
+
normal: "var(--primitive-typography-letterSpacing-normal)",
|
|
432
|
+
wide: "var(--primitive-typography-letterSpacing-wide)",
|
|
433
|
+
wider: "var(--primitive-typography-letterSpacing-wider)"
|
|
434
|
+
},
|
|
435
|
+
semantic: {
|
|
436
|
+
color: {
|
|
437
|
+
accent: {
|
|
438
|
+
rest: i.semantic.accent.rest,
|
|
439
|
+
hover: i.semantic.accent.hover,
|
|
440
|
+
pressed: i.semantic.accent.pressed,
|
|
441
|
+
subtle: i.semantic.accent.subtle,
|
|
442
|
+
disabled: i.semantic.accent.disabled
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
space: {
|
|
446
|
+
subgrid: {
|
|
447
|
+
gap: "var(--semantic-space-subgrid-gap)",
|
|
448
|
+
hairline: "var(--semantic-space-subgrid-hairline)",
|
|
449
|
+
xs: "var(--semantic-space-subgrid-xs)"
|
|
450
|
+
},
|
|
451
|
+
component: {
|
|
452
|
+
padding: "var(--semantic-space-component-padding)",
|
|
453
|
+
gap: "var(--semantic-space-component-gap)"
|
|
454
|
+
},
|
|
455
|
+
stack: {
|
|
456
|
+
gap: "var(--semantic-space-section-stack)"
|
|
457
|
+
},
|
|
458
|
+
layout: {
|
|
459
|
+
gutter: "var(--semantic-space-layout-gutter)",
|
|
460
|
+
gap: "var(--semantic-space-layout-gap)",
|
|
461
|
+
section: "var(--semantic-layout-section-paddingY)"
|
|
462
|
+
},
|
|
463
|
+
section: {
|
|
464
|
+
stack: "var(--semantic-space-section-stack)",
|
|
465
|
+
inset: "var(--semantic-space-section-inset)"
|
|
466
|
+
},
|
|
467
|
+
sidebar: {
|
|
468
|
+
indent: "var(--semantic-space-sidebar-indent)",
|
|
469
|
+
gap: "var(--semantic-space-sidebar-gap)",
|
|
470
|
+
sectionGap: "var(--semantic-space-sidebar-sectionGap)",
|
|
471
|
+
railPadding: "var(--semantic-space-sidebar-railPadding)"
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
typography: {
|
|
475
|
+
label: i.semantic.typography.ui,
|
|
476
|
+
labelDescriptive: i.semantic.typography.ui,
|
|
477
|
+
labelTechnical: i.semantic.typography.mono
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
// Each style object spreads directly into a React inline style prop.
|
|
481
|
+
// CSS vars resolve at paint time — no hardcoded pixel values.
|
|
482
|
+
typeStyles: {
|
|
483
|
+
// ── Canonical composites (Adrian directive 2026-05-04) ────────────────────
|
|
484
|
+
// 7 roles. body/ui/eyebrow/mono carry maxWidth: 60ch where appropriate.
|
|
485
|
+
// Eyebrow bakes text-transform: uppercase + caps tracking into the token —
|
|
486
|
+
// never re-apply textTransform inline. Casing changes are eyebrow-only.
|
|
487
|
+
display: i.semantic.typography.display,
|
|
488
|
+
h1: i.semantic.typography.h1,
|
|
489
|
+
h2: i.semantic.typography.h2,
|
|
490
|
+
h3: i.semantic.typography.h3,
|
|
491
|
+
body: i.semantic.typography.body,
|
|
492
|
+
ui: i.semantic.typography.ui,
|
|
493
|
+
eyebrow: i.semantic.typography.eyebrow,
|
|
494
|
+
mono: i.semantic.typography.mono,
|
|
495
|
+
// ── Migration aliases → canonical composites ──────────────────────────────
|
|
496
|
+
// Pre-2026-05-04 names map to the new roles. small → ui; caption → ui
|
|
497
|
+
// (sentence-case secondary text); the eyebrow-pattern callsites migrate
|
|
498
|
+
// explicitly to typeStyles.eyebrow as part of the ops-dashboard sweep.
|
|
499
|
+
small: i.semantic.typography.ui,
|
|
500
|
+
caption: i.semantic.typography.ui,
|
|
501
|
+
heading1: i.semantic.typography.h1,
|
|
502
|
+
heading2: i.semantic.typography.h2,
|
|
503
|
+
heading3: i.semantic.typography.h3,
|
|
504
|
+
technical: i.semantic.typography.mono,
|
|
505
|
+
badge: i.semantic.typography.eyebrow,
|
|
506
|
+
micro: i.semantic.typography.eyebrow,
|
|
507
|
+
displayXl: i.semantic.typography.display,
|
|
508
|
+
display1: i.semantic.typography.display,
|
|
509
|
+
display2: i.semantic.typography.h1,
|
|
510
|
+
headingHero: i.semantic.typography.h1,
|
|
511
|
+
headingSection: i.semantic.typography.h3,
|
|
512
|
+
title: i.semantic.typography.body,
|
|
513
|
+
body2: i.semantic.typography.body,
|
|
514
|
+
bodyLarge: i.semantic.typography.body,
|
|
515
|
+
bodySmall: i.semantic.typography.ui,
|
|
516
|
+
monoXs: i.semantic.typography.mono,
|
|
517
|
+
monoSm: i.semantic.typography.mono,
|
|
518
|
+
label: i.semantic.typography.ui,
|
|
519
|
+
labelDescriptive: i.semantic.typography.ui,
|
|
520
|
+
labelTechnical: i.semantic.typography.mono
|
|
521
|
+
},
|
|
522
|
+
// ── Icons ────────────────────────────────────────────────────────────────────
|
|
523
|
+
iconSize: {
|
|
524
|
+
small: "var(--primitive-typography-size-base)",
|
|
525
|
+
// 16px — default icon size
|
|
526
|
+
medium: "var(--primitive-typography-size-lg)",
|
|
527
|
+
// 20px — prominent icons
|
|
528
|
+
large: "var(--primitive-typography-size-xl)"
|
|
529
|
+
// 24px — hero / large empty states
|
|
530
|
+
},
|
|
531
|
+
// ── Density-aware spacing ────────────────────────────────────────────────────
|
|
532
|
+
// These vars respond to [data-density="compact"] on <html>.
|
|
533
|
+
// Use for component padding/gap that should tighten in compact mode.
|
|
534
|
+
// hds.space.px* for fixed measurements that never participate in density.
|
|
535
|
+
density: {
|
|
536
|
+
xs: "var(--hds-space-xs)",
|
|
537
|
+
// 4px comfortable / 2px compact
|
|
538
|
+
sm: "var(--hds-space-sm)",
|
|
539
|
+
// 8px comfortable / 6px compact
|
|
540
|
+
md: "var(--hds-space-md)",
|
|
541
|
+
// 16px comfortable / 12px compact
|
|
542
|
+
lg: "var(--hds-space-lg)",
|
|
543
|
+
// 24px comfortable / 20px compact
|
|
544
|
+
xl: "var(--hds-space-xl)",
|
|
545
|
+
// 32px comfortable / 24px compact
|
|
546
|
+
xl2: "var(--hds-space-2xl)",
|
|
547
|
+
// 48px comfortable / 40px compact
|
|
548
|
+
xl3: "var(--hds-space-3xl)",
|
|
549
|
+
// 64px comfortable / 48px compact
|
|
550
|
+
xl4: "var(--hds-space-4xl)"
|
|
551
|
+
// 80px comfortable / 64px compact
|
|
552
|
+
},
|
|
553
|
+
// ── Spacing ──────────────────────────────────────────────────────────────────
|
|
554
|
+
// CSS var strings — valid in any inline style property that accepts a length.
|
|
555
|
+
// Note: avoid interpolating these into template literal shorthand strings,
|
|
556
|
+
// e.g. `margin: \`0 0 ${hds.space.px20}\`` — use individual properties instead.
|
|
557
|
+
// For component spacing that adapts to density, use hds.density.* instead.
|
|
558
|
+
space: {
|
|
559
|
+
px1: "var(--primitive-space-px1)",
|
|
560
|
+
px2: "var(--primitive-space-px2)",
|
|
561
|
+
px4: "var(--primitive-space-1)",
|
|
562
|
+
px6: "var(--primitive-space-px6)",
|
|
563
|
+
px8: "var(--primitive-space-2)",
|
|
564
|
+
px10: "var(--primitive-space-px10)",
|
|
565
|
+
px12: "var(--primitive-space-3)",
|
|
566
|
+
px16: "var(--primitive-space-4)",
|
|
567
|
+
px20: "var(--primitive-space-5)",
|
|
568
|
+
px24: "var(--primitive-space-6)",
|
|
569
|
+
px28: "var(--primitive-space-7)",
|
|
570
|
+
px32: "var(--primitive-space-8)",
|
|
571
|
+
px40: "var(--primitive-space-10)",
|
|
572
|
+
px48: "var(--primitive-space-12)",
|
|
573
|
+
px64: "var(--primitive-space-16)",
|
|
574
|
+
px80: "var(--primitive-space-20)",
|
|
575
|
+
px96: "var(--primitive-space-24)",
|
|
576
|
+
px128: "var(--primitive-space-32)"
|
|
577
|
+
},
|
|
578
|
+
// ── Border width ─────────────────────────────────────────────────────────────
|
|
579
|
+
borderWidth: {
|
|
580
|
+
xs: "var(--primitive-borderWidth-xs)",
|
|
581
|
+
// 1px — standard hairline
|
|
582
|
+
sm: "var(--primitive-borderWidth-sm)",
|
|
583
|
+
// 2px — brand accent, selection ring
|
|
584
|
+
md: "var(--primitive-borderWidth-md)",
|
|
585
|
+
// 4px — indicator bar, callout border
|
|
586
|
+
default: "var(--semantic-borderWidth-default)",
|
|
587
|
+
emphasis: "var(--semantic-borderWidth-emphasis)"
|
|
588
|
+
},
|
|
589
|
+
// ── Border radius ────────────────────────────────────────────────────────────
|
|
590
|
+
borderRadius: {
|
|
591
|
+
0: "var(--primitive-radius-0)",
|
|
592
|
+
2: "var(--primitive-radius-2)",
|
|
593
|
+
4: "var(--primitive-radius-4)",
|
|
594
|
+
8: "var(--primitive-radius-8)",
|
|
595
|
+
full: "var(--primitive-radius-full)",
|
|
596
|
+
circle: "50%",
|
|
597
|
+
/** Named aliases for common radii — prefer these over numeric keys in new code. */
|
|
598
|
+
sm: "var(--primitive-radius-4)",
|
|
599
|
+
// 4px — tight: tags, badges, small chips
|
|
600
|
+
md: "var(--primitive-radius-8)",
|
|
601
|
+
// 8px — default: cards, panels, inputs
|
|
602
|
+
/** Global action radius — toggle one token to round all buttons, inputs, selects. */
|
|
603
|
+
action: "var(--semantic-radius-action)"
|
|
604
|
+
},
|
|
605
|
+
// ── Duration (CSS transition timing — use in transition: shorthand values) ──
|
|
606
|
+
duration: {
|
|
607
|
+
/** 100ms — binary toggles, instant dismissals */
|
|
608
|
+
instant: "var(--primitive-duration-instant)",
|
|
609
|
+
/** 150ms — micro-interactions, hover/focus/press (productive default) */
|
|
610
|
+
fast: "var(--primitive-duration-short)",
|
|
611
|
+
/** 250ms — entrances, teaching moments (expressive) */
|
|
612
|
+
normal: "var(--primitive-duration-medium)",
|
|
613
|
+
/** 400ms — spatial movement, page travel (slow / spatial) */
|
|
614
|
+
slow: "var(--primitive-duration-long)"
|
|
615
|
+
},
|
|
616
|
+
effect: {
|
|
617
|
+
blur: {
|
|
618
|
+
subtle: "var(--primitive-blur-8)",
|
|
619
|
+
lightboxBackdrop: "var(--component-lightbox-backdrop-blur)"
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
zIndex: {
|
|
623
|
+
base: "var(--primitive-zIndex-0)",
|
|
624
|
+
focus: "var(--primitive-zIndex-10)",
|
|
625
|
+
overlay: "var(--primitive-zIndex-100)",
|
|
626
|
+
modal: "var(--primitive-zIndex-1000)"
|
|
627
|
+
},
|
|
628
|
+
// ── Breakpoints (read-only reference values — use in JS checks and docs) ─────
|
|
629
|
+
breakpoints: {
|
|
630
|
+
xs: 375,
|
|
631
|
+
// iPhone mini baseline
|
|
632
|
+
sm: 640,
|
|
633
|
+
// Large phone / landscape — Tailwind sm
|
|
634
|
+
md: 768,
|
|
635
|
+
// Tablet / mobile boundary — Tailwind md
|
|
636
|
+
lg: 1024,
|
|
637
|
+
// Desktop — Tailwind lg
|
|
638
|
+
xl: 1280,
|
|
639
|
+
// Wide desktop — Tailwind xl
|
|
640
|
+
// CSS custom property names for use in @media queries
|
|
641
|
+
css: {
|
|
642
|
+
xs: i.primitive.breakpoint.xs,
|
|
643
|
+
sm: i.primitive.breakpoint.sm,
|
|
644
|
+
md: i.primitive.breakpoint.md,
|
|
645
|
+
lg: i.primitive.breakpoint.lg,
|
|
646
|
+
xl: i.primitive.breakpoint.xl
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
// ── Layout ───────────────────────────────────────────────────────────────────
|
|
650
|
+
layout: {
|
|
651
|
+
pageGutterH: "var(--semantic-layout-page-gutter-x)",
|
|
652
|
+
mobileGutterH: "var(--semantic-layout-page-gutter-x-mobile)",
|
|
653
|
+
sectionPad: "var(--semantic-layout-section-padding-y-shell)",
|
|
654
|
+
sectionPadSm: "var(--semantic-layout-section-padding-y-shell-tight)",
|
|
655
|
+
panelGap: "var(--semantic-layout-panel-gap)",
|
|
656
|
+
panelGapMob: "var(--semantic-layout-panel-gap-mobile)",
|
|
657
|
+
containerMaxWidth: i.semantic.layout.container.maxWidth,
|
|
658
|
+
contentMaxWidth: i.semantic.layout.content.maxWidth,
|
|
659
|
+
proseMaxWidth: i.semantic.layout.prose.maxWidth,
|
|
660
|
+
sectionPaddingY: i.semantic.layout.section.paddingY,
|
|
661
|
+
gridColumnGap: i.semantic.layout.grid.gap
|
|
662
|
+
},
|
|
663
|
+
size: {
|
|
664
|
+
8: "var(--primitive-size-8)",
|
|
665
|
+
10: "var(--primitive-size-10)",
|
|
666
|
+
12: "var(--primitive-size-12)",
|
|
667
|
+
16: "var(--primitive-size-16)",
|
|
668
|
+
20: "var(--primitive-size-20)",
|
|
669
|
+
24: "var(--primitive-size-24)",
|
|
670
|
+
32: "var(--primitive-size-32)",
|
|
671
|
+
40: "var(--primitive-size-40)",
|
|
672
|
+
48: "var(--primitive-size-48)",
|
|
673
|
+
64: "var(--primitive-size-64)",
|
|
674
|
+
80: "var(--primitive-size-80)",
|
|
675
|
+
96: "var(--primitive-size-96)",
|
|
676
|
+
interactive: {
|
|
677
|
+
min: "var(--primitive-size-interactive-min)"
|
|
678
|
+
},
|
|
679
|
+
width: {
|
|
680
|
+
96: "var(--primitive-size-width-96)",
|
|
681
|
+
760: "var(--primitive-size-width-760)",
|
|
682
|
+
1200: "var(--primitive-size-width-1200)",
|
|
683
|
+
"50ch": "var(--primitive-size-width-50ch)"
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
// ── Duration (seconds — Motion / CSS transition values) ──────────────────────
|
|
687
|
+
motion: s
|
|
688
|
+
};
|
|
689
|
+
export {
|
|
690
|
+
c as ct,
|
|
691
|
+
e as default,
|
|
692
|
+
a as tokenValues
|
|
693
|
+
};
|