vunor 0.0.2

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.
Files changed (60) hide show
  1. package/README.md +33 -0
  2. package/dist/theme.d.ts +133 -0
  3. package/dist/theme.mjs +1149 -0
  4. package/dist/vite.d.ts +5 -0
  5. package/dist/vite.mjs +13 -0
  6. package/package.json +83 -0
  7. package/src/components/AppLayout/AppLayout.vue +114 -0
  8. package/src/components/Button/Button.vue +49 -0
  9. package/src/components/Button/ButtonBase.vue +43 -0
  10. package/src/components/Button/index.ts +1 -0
  11. package/src/components/Button/shortcuts.ts +29 -0
  12. package/src/components/Card/Card.vue +47 -0
  13. package/src/components/Card/CardHeader.vue +26 -0
  14. package/src/components/Card/CardInner.vue +5 -0
  15. package/src/components/Card/index.ts +3 -0
  16. package/src/components/Card/pi.ts +46 -0
  17. package/src/components/Card/shortcuts.ts +19 -0
  18. package/src/components/Checkbox/Checkbox.vue +59 -0
  19. package/src/components/Checkbox/index.ts +1 -0
  20. package/src/components/Checkbox/shortcuts.ts +27 -0
  21. package/src/components/Combobox/Combobox.vue +502 -0
  22. package/src/components/Combobox/index.ts +2 -0
  23. package/src/components/Combobox/shortcuts.ts +12 -0
  24. package/src/components/Combobox/types.ts +33 -0
  25. package/src/components/Icon/Icon.vue +9 -0
  26. package/src/components/Icon/index.ts +1 -0
  27. package/src/components/Input/Input.vue +109 -0
  28. package/src/components/Input/InputShell.vue +133 -0
  29. package/src/components/Input/index.ts +4 -0
  30. package/src/components/Input/pi.ts +18 -0
  31. package/src/components/Input/types.ts +52 -0
  32. package/src/components/Input/utils.ts +108 -0
  33. package/src/components/Label/Label.vue +6 -0
  34. package/src/components/Label/index.ts +1 -0
  35. package/src/components/Loading/LoadingIndicator.vue +23 -0
  36. package/src/components/Loading/index.ts +1 -0
  37. package/src/components/Loading/shortcuts.ts +9 -0
  38. package/src/components/Menu/Menu.vue +100 -0
  39. package/src/components/Menu/MenuItem.vue +20 -0
  40. package/src/components/Menu/index.ts +2 -0
  41. package/src/components/Menu/shortcuts.ts +6 -0
  42. package/src/components/OverflowContainer/OverflowContainer.vue +120 -0
  43. package/src/components/OverflowContainer/index.ts +1 -0
  44. package/src/components/Pagination/Pagination.vue +71 -0
  45. package/src/components/Popover/Popover.vue +58 -0
  46. package/src/components/Popover/index.ts +1 -0
  47. package/src/components/RadioGroup/RadioGroup.vue +83 -0
  48. package/src/components/RadioGroup/index.ts +1 -0
  49. package/src/components/RadioGroup/shortcuts.ts +34 -0
  50. package/src/components/Select/Select.vue +93 -0
  51. package/src/components/Select/SelectBase.vue +148 -0
  52. package/src/components/Select/index.ts +3 -0
  53. package/src/components/Select/shortcuts.ts +30 -0
  54. package/src/components/Select/types.ts +30 -0
  55. package/src/components/Slider/Slider.vue +73 -0
  56. package/src/components/Slider/index.ts +1 -0
  57. package/src/components/Slider/shortcuts.ts +23 -0
  58. package/src/components/shortcuts.ts +21 -0
  59. package/src/components/utils/index.ts +1 -0
  60. package/src/components/utils/provide-inject.ts +39 -0
package/dist/theme.mjs ADDED
@@ -0,0 +1,1149 @@
1
+ import "vue";
2
+ import R, { defu as w } from "defu";
3
+ import { presetWind as N } from "unocss";
4
+ import { palitra as m, color as v } from "@prostojs/palitra";
5
+ function o(r) {
6
+ let e = "";
7
+ for (const [t, c] of Object.entries(r)) {
8
+ const i = W(c);
9
+ e += `${i.map((a) => `${t}${a}`).join(" ")} `;
10
+ }
11
+ return e.trim();
12
+ }
13
+ function W(r) {
14
+ if (typeof r == "string")
15
+ return r.split(" ");
16
+ if (Array.isArray(r))
17
+ return r;
18
+ const e = [];
19
+ for (const [t, c] of Object.entries(r))
20
+ e.push(...W(c).map((i) => `${t}${i}`));
21
+ return e;
22
+ }
23
+ const L = {
24
+ btn: o({
25
+ "": "h-fingertip flex items-center justify-center px-$m gap-$xs select-none fw-bold tracking-wide relative",
26
+ "[&.btn-round]:": "px-fingertip-half rounded-fingertip-half",
27
+ "[&.btn-square]:": "size-fingertip px-0",
28
+ "[&.btn-round.btn-square]:": "px-0",
29
+ "disabled:": "opacity-80 cursor-not-allowed",
30
+ "[&>span]:data-[loading]:": "opacity-0 pointer-events-none",
31
+ "[&>div:not(.loading-indicator-wrapper)]:data-[loading]:": "opacity-0 pointer-events-none",
32
+ "[&>.loading-indicator-wrapper]:": "absolute left-0 top-0 right-0 bottom-0 flex items-center justify-center cursor-wait"
33
+ }),
34
+ "btn-square": o({
35
+ "": ""
36
+ }),
37
+ "btn-label": o({
38
+ "": "lh-1em ellipsis whitespace-nowrap overflow-x-clip overflow-y-visible",
39
+ "group-[.btn-square]/btn:": "hidden"
40
+ }),
41
+ "btn-icon": o({
42
+ "": "size-1em font-size-1.25em",
43
+ "group-[.btn-round]/btn:[&.btn-icon-left]:": "ml-[-0.5em]",
44
+ "group-[.btn-round]/btn:[&.btn-icon-right]:": "mr-[-0.5em]",
45
+ "group-[.btn-square]/btn:": "font-size-1.5em m-0!",
46
+ "group-[.btn-round.btn-square]/btn:": "m-0!"
47
+ })
48
+ }, V = [
49
+ "h1",
50
+ "h2",
51
+ "h3",
52
+ "h4",
53
+ "h5",
54
+ "h6",
55
+ "subheading",
56
+ "body-l",
57
+ "body",
58
+ "body-s",
59
+ "callout"
60
+ ], q = {
61
+ card: `data-[rounded=true]:rounded-$card-spacing data-[dense=true]:card-dense! ${V.map((r) => `data-[level=${r}]:card-${r}`).join(" ")}`
62
+ }, C = {
63
+ "checkbox-root": o({
64
+ "": "text-body select-none flex gap-$m cursor-default current-bg-scope-color-500 current-border-scope-color-500",
65
+ "data-[error=true]:": "current-border-error-500",
66
+ "aria-[disabled=true]:": "scope-grey opacity-50 cursor-not-allowed"
67
+ }),
68
+ checkbox: o({
69
+ "": "cursor-default shrink-0 select-none rounded-[0.28em] transition-all transition-duration-100 flex size-1.5em appearance-none items-center justify-center bg-current/0 backdrop-blur-sm border-current border-[0.16em] current-icon-white",
70
+ "group-active/cb:enabled:": "current-bg-scope-color-500 bg-current/20 current-icon-scope-color-500",
71
+ // 'group-hover/cb:enabled:': 'border-current',
72
+ "disabled:": "cursor-not-allowed border-1px backdrop-blur-sm",
73
+ "group-[[data-error=true]]/cb:enabled:": "current-border-error-500 border-current",
74
+ "data-[state=unchecked]": "current-border-grey-500 border-current/40"
75
+ }),
76
+ "checkbox-indicator": o({
77
+ "": "bg-current icon-current h-full w-full flex items-center justify-center"
78
+ }),
79
+ "checkbox-icon": o({
80
+ "": "size-0.9em animate-cb-appear animate-duration-200 animate-ease"
81
+ }),
82
+ "checkbox-label": o({
83
+ "": "select-none text-body lh-1.5em"
84
+ })
85
+ }, T = {
86
+ "combobox-multi-input": "i8-input relative flex items-center",
87
+ "combobox-multi-items": "text-ellipsis overflow-hidden whitespace-nowrap absolute max-w-full pr-$m lh-1em",
88
+ "combobox-embedded-input": "text-left outline-0 outline-offset-0",
89
+ "combobox-c8-icon": o({
90
+ "": "hover:current-icon-scope-color-500 hover:icon-current cursor-pointer",
91
+ "group-[[aria-expanded=true]]/i8:": "-scale-100"
92
+ })
93
+ }, D = {
94
+ "loading-indicator": "cursor-wait",
95
+ "loading-indicator-ring": o({
96
+ "": "animate-spin animate-duration-1500",
97
+ "[&>circle]:": "animate-loading-dashoffset animate-count-infinite animate-duration-2500"
98
+ })
99
+ }, M = {
100
+ "menu-root": "flex flex-col overflow-hidden",
101
+ "menu-item": "justify-start c8-flat gap-$m w-full fw-400"
102
+ }, X = {
103
+ "rb-container": o({
104
+ "": "flex flex-col gap-$s text-body"
105
+ }),
106
+ "rb-label": o({
107
+ "": "text-label text-grey-400"
108
+ }),
109
+ "rb-root": o({
110
+ "": "flex gap-x-$l gap-y-$m",
111
+ "[&.rb-row]:": "flex-wrap",
112
+ "not-[.rb-row]:": "flex-col"
113
+ }),
114
+ "rb-item-wrapper": o({
115
+ "": "flex"
116
+ }),
117
+ "rb-item": o({
118
+ "": "select-none shrink-0 current-bg-scope-color-500 bg-current/0 size-1.25em rounded-full cursor-default current-border-grey-500 border-current/40 border-[0.16em] transition-none backdrop-blur-sm",
119
+ "data-[state=checked]:not-[[data-error='true']]:": "current-border-scope-color-500 border-current",
120
+ "data-[state=checked]:": "bg-current",
121
+ "active:enabled:": "bg-current/20",
122
+ "aria-[disabled=true]:": "scope-grey opacity-50 cursor-not-allowed",
123
+ "data-[error=true]:": "current-border-error-500 current-bg-error-500"
124
+ }),
125
+ "rb-item-indicator": o({
126
+ "": "flex items-center justify-center w-full h-full rounded-full relative after:content-[''] after:block after:size-[0.5em] after:rounded-[50%] after:bg-white animate-zoom-in animate-duration-100"
127
+ }),
128
+ "rb-item-label": o({
129
+ "": "select-none px-$s text-body leading-none lh-1.25em",
130
+ "aria-[disabled=true]:": "scope-grey opacity-50 cursor-not-allowed"
131
+ })
132
+ }, Y = {
133
+ "select-content": o({
134
+ "": "min-w-[60px] rounded-base surface-0 bg-current/70 backdrop-blur-xl overflow-hidden shadow-xl z-[100] current-border-grey-400 border-current/20 ",
135
+ "data-[design=round]:": "rounded-fingertip-half",
136
+ "[&>div[data-radix-combobox-viewport]]:": "max-h-[var(--radix-popper-available-height)] [scrollbar-width:auto]",
137
+ "[&>div[data-radix-combobox-viewport]::-webkit-scrollbar]:": "block"
138
+ // 'data-[side=top]:': 'animate-slide-down-and-fade',
139
+ // 'data-[side=right]:': 'animate-slide-left-and-fade',
140
+ // 'data-[side=bottom]:': 'animate-slide-up-and-fade',
141
+ // 'data-[side=left]:': 'animate-slide-right-and-fade',
142
+ }),
143
+ "select-scroll-btn": "flex items-center justify-center h-fingertip cursor-default",
144
+ "select-grp-label": o({
145
+ "": "px-$m h-fingertip flex items-center ",
146
+ "group-data-[design=round]:": "px-fingertip-half",
147
+ "[&>span]:": "text-label text-grey-400"
148
+ }),
149
+ "select-item": o({
150
+ "": "text-body leading-none flex items-center h-fingertip relative select-none relative",
151
+ "data-[disabled]:": "opacity-40 pointer-events-none",
152
+ "data-[highlighted]:": "outline-none bg-scope-color-500/15",
153
+ "[&>span]:": "px-$m",
154
+ "group-data-[design=round]:[&>span]:": "px-fingertip-half",
155
+ "[&>span]:data-[state=checked]:": "text-scope-color-500 fw-700!"
156
+ }),
157
+ "select-separator": "h-[1px] bg-grey-500/10 mx-$s"
158
+ }, A = {
159
+ slider: o({
160
+ "": "relative flex items-center select-none touch-none min-w-2em min-h-2em"
161
+ }),
162
+ "slider-track": o({
163
+ "": "bg-grey-500/20 relative grow rounded-full h-[0.25em]"
164
+ }),
165
+ "slider-range": o({
166
+ "": "absolute bg-scope-color-500 rounded-full h-full"
167
+ }),
168
+ "slider-thumb": o({
169
+ "": "block w-[1.5em] h-[1.5em] bg-scope-color-500 rounded-full border-scope-light-0 border-[3px] outline-scope-color-500/10 outline-0px outline-solid",
170
+ "dark:": "border-scope-dark-0",
171
+ "not-[[disabled]]:": o({
172
+ "": "cursor-grab",
173
+ "hover:": "shadow-md",
174
+ "active:": "cursor-grabbing",
175
+ "focus:": "outline-[0.5em]"
176
+ })
177
+ })
178
+ }, ar = [
179
+ q,
180
+ M,
181
+ L,
182
+ C,
183
+ X,
184
+ Y,
185
+ T,
186
+ A,
187
+ D
188
+ ], x = 0.08;
189
+ function B(r) {
190
+ const e = R(r, I), t = {
191
+ count: 5,
192
+ preserveInputColor: !1,
193
+ luminance: { dark: e.darkest, light: e.darkest + x, useMiddle: !1 },
194
+ saturate: { dark: -0.2, light: -0.2 },
195
+ vivid: { dark: 0, light: 0 },
196
+ suffixes: ["dark-0", "dark-1", "dark-2", "dark-3", "dark-4"]
197
+ }, c = m(z(e.colors, 5), t).toStrings();
198
+ t.suffixes = ["light-0", "light-1", "light-2", "light-3", "light-4"].reverse(), t.luminance = { dark: 1 - x, light: 1, useMiddle: !1 };
199
+ const i = m(z(e.colors, 5), t).toStrings(), a = m(
200
+ {
201
+ primary: {
202
+ color: e.colors.primary,
203
+ preserveInputColor: !0,
204
+ saturate: { dark: -0.2, light: -0.2 }
205
+ },
206
+ grey: { color: e.colors.grey, saturate: { dark: 0, light: 0 } },
207
+ secondary: { color: e.colors.secondary, vivid: { dark: 0.4, light: 0.4 } },
208
+ neutral: { color: e.colors.neutral, vivid: { dark: 0.1, light: 0.1 } },
209
+ good: { color: e.colors.good, vivid: { dark: 0.2, light: 0.5 } },
210
+ warn: { color: e.colors.warn, vivid: { dark: 0.2, light: 0.3 } },
211
+ error: { color: e.colors.error }
212
+ },
213
+ {
214
+ count: 10,
215
+ preserveInputColor: !1,
216
+ luminance: {
217
+ dark: e.darkest + x + 0.02,
218
+ light: e.lightest,
219
+ useMiddle: !0,
220
+ middle: 0.62
221
+ },
222
+ saturate: { dark: -0.25, light: -0.25 },
223
+ vivid: { dark: 0.1, light: 0.2 }
224
+ }
225
+ ).toStrings();
226
+ return {
227
+ colors: {
228
+ ...c,
229
+ ...i,
230
+ ...a
231
+ },
232
+ surfaces: {
233
+ // | bg | text | border | dark:bg | dark:text | dark:border |
234
+ 0: ["light-0", "dark-1", "color-100", "dark-0", "light-1", "color-800"],
235
+ 1: ["light-1", "dark-1", "color-100", "dark-1", "light-1", "color-800"],
236
+ 2: ["light-2", "dark-1", "color-100", "dark-2", "light-1", "color-800"],
237
+ 3: ["light-3", "dark-1", "color-100", "dark-3", "light-1", "color-800"],
238
+ 4: ["light-4", "dark-1", "color-100", "dark-4", "light-1", "color-800"],
239
+ 50: ["color-50", "color-700", "color-200", "color-900", "color-200", "color-500"],
240
+ 100: ["color-100", "color-800", "color-200", "color-800", "color-200", "color-500"],
241
+ 200: ["color-200", "color-800", "color-400", "color-700", "color-100", "color-400"],
242
+ 300: ["color-300", "color-900", "color-500", "color-600", "color-100", "color-300"],
243
+ 400: ["color-400", "color-50", "color-200", "color-500", "color-50", "color-200"],
244
+ 500: ["color-500", "color-50", "color-200", "color-400", "color-50", "color-100"],
245
+ 600: ["color-600", "color-100", "color-300", "color-300", "color-900", "color-700"],
246
+ 700: ["color-700", "color-100", "color-300", "color-200", "color-800", "color-600"],
247
+ 800: ["color-800", "color-200", "color-400", "color-100", "color-800", "color-500"],
248
+ 900: ["color-900", "color-200", "color-400", "color-50", "color-700", "color-500"]
249
+ }
250
+ };
251
+ }
252
+ function z(r, e = 2) {
253
+ const t = {};
254
+ for (const [c, i] of Object.entries(r)) {
255
+ const [a, l, s] = v(i).hsl();
256
+ t[c] = v(a, l / e, s, "hsl").hex();
257
+ }
258
+ return t;
259
+ }
260
+ const I = {
261
+ colors: {
262
+ primary: "#004eaf",
263
+ grey: "#858892",
264
+ secondary: "#edd812",
265
+ neutral: "#5da0c5",
266
+ good: "#7bc76a",
267
+ warn: "#ef9421",
268
+ error: "#bf5a5f"
269
+ },
270
+ darkest: 0.24,
271
+ lightest: 0.97
272
+ };
273
+ function P() {
274
+ return [
275
+ [
276
+ /^layer-([0-4])$/,
277
+ ([, r], { theme: e }) => {
278
+ let t = Number(r), c = Number(r);
279
+ return e.reverseDarkLayers && (t = 4 - Number(r)), e.reverseLightLayers && (c = 4 - Number(r)), o({
280
+ "": `current-bg-scope-light-${c} current-text-scope-dark-2 current-icon-scope-dark-2 bg-current text-current`,
281
+ "dark:": `current-bg-scope-dark-${t} current-text-scope-light-2 current-icon-scope-light-2`,
282
+ "[&.dark]:": `current-bg-scope-dark-${t} current-text-scope-light-2 current-icon-scope-light-2`
283
+ });
284
+ }
285
+ ],
286
+ [
287
+ /^surface-(\d+)$/,
288
+ ([, r], { theme: e }) => e.surfaces[r] ? o({
289
+ "": `current-bg-scope-${e.surfaces[r][0]} current-text-scope-${e.surfaces[r][1]} current-icon-scope-${e.surfaces[r][1]} current-border-scope-${e.surfaces[r][2]} bg-current text-current border-current icon-current`,
290
+ "dark:": `current-bg-scope-${e.surfaces[r][3]} current-text-scope-${e.surfaces[r][4]} current-icon-scope-${e.surfaces[r][4]} current-border-scope-${e.surfaces[r][5]} shadow-black/30`,
291
+ "[&.dark]:": `current-bg-scope-${e.surfaces[r][3]} current-text-scope-${e.surfaces[r][4]} current-icon-scope-${e.surfaces[r][4]} current-border-scope-${e.surfaces[r][5]} shadow-black/30`
292
+ }) : ""
293
+ ],
294
+ {
295
+ surface: "surface-100"
296
+ }
297
+ ];
298
+ }
299
+ function g(r, e = 0) {
300
+ const t = 10 ** e;
301
+ return Math.round(r * t) / t;
302
+ }
303
+ function b(r, e, t = 3) {
304
+ var a;
305
+ const c = Number.parseFloat(r), i = ((a = /(px|em|rem|%)$/.exec(r)) == null ? void 0 : a[1]) || "";
306
+ return `${g(c * e, t)}${i}`;
307
+ }
308
+ const E = {
309
+ getCSS: ({ theme: r }) => `${f("body", r.fontSize.body) + // renderFontCss('label', theme.fontSize.label) +
310
+ f("figcaption", r.fontSize.caption) + f("h1", r.fontSize.h1) + f("h2", r.fontSize.h2) + f("h3", r.fontSize.h3) + f("h4", r.fontSize.h4) + f("h5", r.fontSize.h5) + f("h6", r.fontSize.h6)}
311
+ :root {
312
+ --un-default-border-color: rgba(0,0,0,10%);
313
+ --scope-black: 0 0 0;
314
+ --scope-white: 255 255 255;
315
+ --v-fingertip: ${r.spacing["fingertip-m"] || "3em"};
316
+ --v-fingertip-half: ${b(r.spacing["fingertip-m"] || "3em", 0.5)};
317
+ }
318
+
319
+ html.dark, .dark {
320
+ --un-default-border-color: rgba(255,255,255,10%);
321
+ }
322
+
323
+ ::-webkit-scrollbar {
324
+ width: 10px;
325
+ height: 10px;
326
+ }
327
+
328
+ ::-webkit-scrollbar-track {
329
+ background: rgba(0,0,0,0.05);
330
+ border-radius: 5px;
331
+ }
332
+
333
+ ::-webkit-scrollbar-thumb {
334
+ background-color: rgba(0,0,0,0.2);
335
+ border-radius: 5px;
336
+ border: 2px solid transparent;
337
+ background-clip: padding-box;
338
+ }
339
+
340
+ ::-webkit-scrollbar-thumb:hover {
341
+ background-color: rgba(0,0,0,0.3);
342
+ }
343
+
344
+
345
+ .dark ::-webkit-scrollbar-track {
346
+ background: rgba(255,255,255,0.05);
347
+ }
348
+
349
+ .dark ::-webkit-scrollbar-thumb {
350
+ background-color: rgba(255,255,255,0.2);
351
+ }
352
+
353
+ .dark ::-webkit-scrollbar-thumb:hover {
354
+ background-color: rgba(255,255,255,0.3);
355
+ }
356
+ `
357
+ };
358
+ function f(r, e) {
359
+ return `${r} { font-size: ${e[0]}; ${Object.entries(e[1]).map((t) => `${t[0]}: ${t[1]};`).join(" ")} }
360
+ `;
361
+ }
362
+ function d(r) {
363
+ const [e, t, c, i] = v(r).rgba();
364
+ return `${e} ${t} ${c}`;
365
+ }
366
+ function S(r) {
367
+ return {
368
+ bg: "--un-bg-opacity",
369
+ text: "--un-text-opacity",
370
+ fill: "--un-text-opacity",
371
+ stroke: "--un-text-opacity",
372
+ icon: "--un-icon-opacity",
373
+ border: "--un-border-opacity",
374
+ outline: "--un-outline-opacity",
375
+ caret: "--un-caret-opacity"
376
+ }[r];
377
+ }
378
+ function F(r) {
379
+ return {
380
+ bg: "background-color",
381
+ text: "color",
382
+ fill: "fill",
383
+ stroke: "stroke",
384
+ icon: "color",
385
+ border: "border-color",
386
+ outline: "outline-color",
387
+ caret: "caret-color"
388
+ }[r];
389
+ }
390
+ const G = [
391
+ [
392
+ /^current-(text|bg|icon|border|outline|caret)-(.+)$/,
393
+ (r, { theme: e }) => {
394
+ const t = r[1], c = r[2];
395
+ if (c.startsWith("scope-"))
396
+ return {
397
+ [`--current-${t}`]: `var(--${c})`
398
+ };
399
+ const i = e.colors[c] || c;
400
+ if (i)
401
+ return {
402
+ [`--current-${t}`]: d(i)
403
+ };
404
+ }
405
+ ],
406
+ [
407
+ /^(text|bg|icon|border|outline|caret|fill)-current(-text|-bg|-icon|-border|-outline|-caret)?(\/\d{1,3})?$/,
408
+ (r, { theme: e }) => {
409
+ const t = r[1], c = r[2] || `-${t}`, i = S(t), a = F(t), l = r[3], s = l ? Number(l.slice(1)) / 100 : 1, u = s === 1 ? `var(${i})` : s;
410
+ return t === "icon" ? {
411
+ [i]: s
412
+ } : {
413
+ [i]: s,
414
+ [a]: `rgb(var(--current${c}) / ${u})`
415
+ };
416
+ }
417
+ ],
418
+ [
419
+ /^scope-(.*)$/,
420
+ (r, { theme: e }) => {
421
+ const t = r[1], c = e.colors[t];
422
+ if (c)
423
+ return {
424
+ "--scope-color": d(c),
425
+ "--scope-color-50": d(e.colors[`${t}-50`]) || "",
426
+ "--scope-color-100": d(e.colors[`${t}-100`]) || "",
427
+ "--scope-color-200": d(e.colors[`${t}-200`]) || "",
428
+ "--scope-color-300": d(e.colors[`${t}-300`]) || "",
429
+ "--scope-color-400": d(e.colors[`${t}-400`]) || "",
430
+ "--scope-color-500": d(e.colors[`${t}-500`]) || "",
431
+ "--scope-color-600": d(e.colors[`${t}-600`]) || "",
432
+ "--scope-color-700": d(e.colors[`${t}-700`]) || "",
433
+ "--scope-color-800": d(e.colors[`${t}-800`]) || "",
434
+ "--scope-color-900": d(e.colors[`${t}-900`]) || "",
435
+ "--scope-light-0": d(e.colors[`${t}-light-0`]) || "",
436
+ "--scope-light-1": d(e.colors[`${t}-light-1`]) || "",
437
+ "--scope-light-2": d(e.colors[`${t}-light-2`]) || "",
438
+ "--scope-light-3": d(e.colors[`${t}-light-3`]) || "",
439
+ "--scope-light-4": d(e.colors[`${t}-light-4`]) || "",
440
+ "--scope-dark-0": d(e.colors[`${t}-dark-0`]) || "",
441
+ "--scope-dark-1": d(e.colors[`${t}-dark-1`]) || "",
442
+ "--scope-dark-2": d(e.colors[`${t}-dark-2`]) || "",
443
+ "--scope-dark-3": d(e.colors[`${t}-dark-3`]) || "",
444
+ "--scope-dark-4": d(e.colors[`${t}-dark-4`]) || ""
445
+ };
446
+ }
447
+ ],
448
+ [
449
+ /^(bg|text|fill|stroke|border|outline|icon|caret)-scope-((?:color|dark|light|text|bg|white|black|icon)(?:-\d+)?)(\/\d{1,3})?$/,
450
+ (r, { theme: e }) => {
451
+ const t = F(r[1]), c = S(r[1]), i = r[2], a = r[3], l = a ? Number(a.slice(1)) / 100 : 1, s = i.startsWith("color") ? `grey-${i.slice(6)}` : `grey-${i}`, u = l === 1 ? `var(${c})` : l;
452
+ return {
453
+ [c]: l,
454
+ [t]: `rgb(var(--scope-${i}, ${e.colors[s] || ""}) / ${u})`
455
+ };
456
+ }
457
+ ],
458
+ [
459
+ /^icon-opacity-(\d{1,3})$/,
460
+ (r, { theme: e }) => {
461
+ const t = r[1];
462
+ return {
463
+ "--un-icon-opacity": Number(t) / 100
464
+ };
465
+ }
466
+ ],
467
+ [
468
+ /^icon-color$/,
469
+ () => ({
470
+ color: "rgb(var(--current-icon) / var(--un-icon-opacity, 1))"
471
+ })
472
+ ]
473
+ ], J = [
474
+ [
475
+ // special text margin (vertical) that compensates
476
+ // the line height
477
+ /^text-m([bty])?-(.*)$/,
478
+ (r, { theme: e }) => {
479
+ const t = r[1], c = r[2], i = t ? { y: ["top", "bottom"], t: ["top"], b: ["bottom"] }[t] : ["top", "bottom", "left", "right"], a = {};
480
+ if (e.spacing[c]) {
481
+ for (const l of i)
482
+ a[`margin-${l}`] = ["left", "right"].includes(l) ? e.spacing[c] : `calc(${e.spacing[c]} + var(--font-${l === "top" ? "tc" : "bc"}))`;
483
+ return a;
484
+ } else if (/^\d+(em|rem|px)?$/.test(c)) {
485
+ let l = c;
486
+ /^[\d.]+$/.test(c) && (l = `${Number(c) * 0.25}rem`);
487
+ for (const s of i)
488
+ a[`margin-${s}`] = ["left", "right"].includes(s) ? l : `calc(${l} + var(--font-${s === "top" ? "tc" : "bc"}))`;
489
+ return a;
490
+ }
491
+ },
492
+ { layer: "utilities" }
493
+ ],
494
+ [
495
+ /^card-dense$/,
496
+ (r, { theme: e }) => ({
497
+ "--card-spacing": "var(--card-spacing-dense)"
498
+ }),
499
+ { layer: "utilities" }
500
+ ],
501
+ [
502
+ /^card-(.*)$/,
503
+ (r, { theme: e }) => {
504
+ const t = r[1];
505
+ if (e.fontSize[t]) {
506
+ const c = e.fontSize[t][1];
507
+ return {
508
+ "--card-spacing": `${b(c["--font-corrected"], e.cardSpacingFactor.regular)}`,
509
+ "--card-spacing-dense": `${b(
510
+ c["--font-corrected"],
511
+ e.cardSpacingFactor.dense
512
+ )}`,
513
+ "--card-heading-size": c["--font-size"],
514
+ "--card-heading-bold": c["--font-bold"],
515
+ "--card-heading-corrected": c["--font-corrected"],
516
+ "--card-heading-weight": c["font-weight"],
517
+ "--card-heading-lh": c["line-height"],
518
+ "--card-heading-ls": c["letter-spacing"],
519
+ "--card-heading-bc": c["--font-bc"],
520
+ "--card-heading-tc": c["--font-tc"],
521
+ padding: "var(--card-spacing)"
522
+ };
523
+ }
524
+ }
525
+ ],
526
+ [
527
+ /^fingertip-(.*)/,
528
+ (r, { theme: e }) => {
529
+ const t = r[1];
530
+ if (t.startsWith("[") && t.endsWith("]"))
531
+ return {
532
+ "--v-fingertip": t.slice(1, -1),
533
+ "--v-fingertip-half": b(t.slice(1, -1), 0.5)
534
+ };
535
+ if (["xs", "s", "m", "l", "xl"].includes(t))
536
+ return {
537
+ "--v-fingertip": e.spacing[`fingertip-${t}`],
538
+ "--v-fingertip-half": b(e.spacing[`fingertip-${t}`], 0.5)
539
+ };
540
+ if (e.spacing[t])
541
+ return {
542
+ "--v-fingertip": e.spacing[t],
543
+ "--v-fingertip-half": b(e.spacing[t], 0.5)
544
+ };
545
+ }
546
+ ]
547
+ ], K = [...J, ...G], Q = {
548
+ // FILLED
549
+ "c8-filled": o({
550
+ "": "current-bg-scope-color-500 rounded-base current-text-white current-icon-white icon-current/100 bg-current text-current",
551
+ "hover:": "c8-filled-hover",
552
+ "focus-visible:": "c8-filled-hover",
553
+ "data-[highlighted]:": "c8-filled-hover",
554
+ "active:": "c8-filled-active",
555
+ "data-[active]:": "c8-filled-active"
556
+ }),
557
+ "c8-filled-hover": o({
558
+ "not-([disabled]):": "current-bg-scope-color-400",
559
+ "dark:not-([disabled]):": "current-bg-scope-color-600"
560
+ }),
561
+ "c8-filled-active": o({
562
+ "not-([disabled]):": "current-bg-scope-color-600",
563
+ "dark:not-([disabled]):": "current-bg-scope-color-400"
564
+ }),
565
+ // FLAT (Transparent)
566
+ "c8-flat": o({
567
+ "": "current-bg-scope-color-500 rounded-base current-text-black current-icon-black bg-current/0 text-current/80 icon-current/50",
568
+ "dark:": "current-text-white current-icon-white",
569
+ "hover:": "c8-flat-hover",
570
+ "focus-visible:": "c8-flat-hover",
571
+ "data-[highlighted]:": "c8-flat-hover",
572
+ "active:": "c8-flat-active",
573
+ "data-[active]:": "c8-flat-active",
574
+ "data-[selected=true]:": "c8-flat-selected",
575
+ "aria-[selected=true]:": "c8-flat-selected",
576
+ "aria-[pressed=true]:": "c8-flat-selected"
577
+ }),
578
+ "c8-flat-hover": o({
579
+ "not-([disabled]):": "bg-current/05 backdrop-blur-xl"
580
+ }),
581
+ "c8-flat-active": o({
582
+ "not-([disabled]):": "bg-current/10 backdrop-blur-xl"
583
+ }),
584
+ "c8-flat-selected": o({
585
+ "": "c8-flat-hover current-text-scope-color-500 text-current current-icon-scope-color-500 icon-current/100",
586
+ "dark:": "current-text-scope-color-400 current-icon-scope-color-400"
587
+ }),
588
+ // OUTLINED (Bordered)
589
+ "c8-outlined": o({
590
+ "": "c8-flat border-scope-color-500 rounded-base border current-text-scope-color-500 current-icon-scope-color-500 icon-current/100",
591
+ "dark:": "current-text-scope-color-400 current-icon-scope-color-400",
592
+ "hover:": "c8-outlined-hover",
593
+ "focus-visible:": "c8-outlined-hover",
594
+ "data-[highlighted]:": "c8-outlined-hover",
595
+ "active:": "c8-outlined-active",
596
+ "data-[active]:": "c8-outlined-active"
597
+ }),
598
+ "c8-outlined-hover": "c8-flat-hover",
599
+ "c8-outlined-active": "c8-flat-active",
600
+ // LIGHT (Filled/Transparent)
601
+ "c8-light": o({
602
+ "": "current-bg-scope-color-500 rounded-base current-text-scope-color-500 current-icon-scope-color-500 bg-current/10 text-current icon-current/80 backdrop-blur-xl",
603
+ "dark:": "current-text-scope-color-400 current-icon-scope-color-400",
604
+ "hover:": "c8-light-hover",
605
+ "focus-visible:": "c8-light-hover",
606
+ "data-[highlighted]:": "c8-light-hover",
607
+ "active:": "c8-light-active",
608
+ "data-[active]:": "c8-light-active",
609
+ "data-[selected=true]:": "c8-light-hover",
610
+ "aria-[selected=true]:": "c8-light-hover",
611
+ "aria-[pressed=true]:": "c8-light-hover"
612
+ }),
613
+ "c8-light-hover": o({
614
+ "not-([disabled]):": "bg-current/15"
615
+ }),
616
+ "c8-light-active": o({
617
+ "not-([disabled]):": "bg-current/20"
618
+ })
619
+ }, U = {
620
+ i8: o({
621
+ "": "h-fingertip min-w-3em flex items-center select-none relative current-icon-grey-500 icon-current/75 content-box current-border-grey-500 border-current/20",
622
+ "data-[type=textarea]": "min-h-fingertip h-auto items-start",
623
+ "data-[active=true]:": "current-icon-scope-color-500 icon-current/100 current-bg-white",
624
+ // 'dark:': '',
625
+ "[&.i8-flat]:": {
626
+ "": "border-b"
627
+ },
628
+ "[&.i8-filled]:": {
629
+ "": " current-bg-scope-light-0 bg-current/75 border border-current/20 rounded-base backdrop-blur-xl",
630
+ "data-[active=true]:": "current-bg-scope-light-0 bg-current/100 current-outline-scope-color-500 outline-current/50 outline-2px outline",
631
+ "dark:": {
632
+ "": "current-bg-scope-dark-2",
633
+ "data-[active=true]:": "current-bg-scope-dark-0"
634
+ }
635
+ },
636
+ "[&.i8-no-border]:": "border-0! outline-none! rounded-0!",
637
+ "[&.i8-transparent]:": "bg-transparent!",
638
+ "[&.i8-round]:": "rounded-fingertip-half border border-current/20",
639
+ "aria-[disabled=true]:": "opacity-50 cursor-not-allowed",
640
+ // error
641
+ "group-[[data-error=true]]/i8:": {
642
+ "": "current-border-error-500 border-current"
643
+ }
644
+ }),
645
+ "i8-underline": o({
646
+ "group-[.i8-filled]/i8:": "hidden",
647
+ "": "absolute left-50% h-2px right-50% bottom-[-1px] pointer-events-none transition-all transition-duration-300 will-change-left will-change-right current-bg-scope-color-500 bg-current",
648
+ "group-[[data-active=true]]/i8:": "left-0 right-0"
649
+ }),
650
+ segmented: o({
651
+ "": {
652
+ "first-of-type:": "rounded-r-0!",
653
+ "last-of-type:": "rounded-lt-0! rounded-lb-0!",
654
+ "not-last-of-type:not-first-of-type:": "rounded-0!",
655
+ "not-first-of-type:": "border-l-0! border-l-grey-500/20",
656
+ "data-[active=true]:": "z-2"
657
+ },
658
+ "[&.i8-flat]:": {
659
+ "not-first-of-type:": "ml-$xs"
660
+ }
661
+ }),
662
+ "i8-input-wrapper": o({
663
+ "": "relative w-full h-full"
664
+ }),
665
+ "i8-input": o({
666
+ "": "w-full outline-none h-full bg-transparent",
667
+ "group-[.i8-flat]/i8:data-[has-prepend=true]": "pl-$s",
668
+ "group-[.i8-flat]/i8:data-[has-append=true]": "pr-$s",
669
+ "group-[.i8-filled]/i8:": "px-$m",
670
+ "selection:": "bg-scope-color-500 text-white",
671
+ "group-[.i8-round]/i8:[&[data-has-prepend='false']]:": "pl-fingertip-half",
672
+ "group-[.i8-round]/i8:[&[data-has-append='false']]:": "pr-fingertip-half",
673
+ "group-[[data-has-label]]/i8:": "pt-$m",
674
+ // groupped inputs paddings
675
+ "group-[.segmented:not(.i8-flat):not(:first-child)]/i8:": "pl-$m",
676
+ "group-[.segmented:not(.i8-flat):not(:last-child)]/i8:": "pr-$m"
677
+ }),
678
+ "i8-textarea": o({
679
+ "": "w-full outline-none h-full bg-transparent text-body",
680
+ // !
681
+ "group-[.i8-flat]/i8:data-[has-prepend=true]": "pl-$s",
682
+ "group-[.i8-flat]/i8:data-[has-append=true]": "pr-$s",
683
+ "group-[.i8-filled]/i8:": "px-$m",
684
+ "selection:": "bg-scope-color-500 text-white",
685
+ "group-[.i8-round]/i8:[&[data-has-prepend='false']]:": "pl-fingertip-half",
686
+ "group-[.i8-round]/i8:[&[data-has-append='false']]:": "pr-fingertip-half",
687
+ // groupped inputs paddings
688
+ "group-[.segmented:not(.i8-flat):not(:first-child)]/i8:": "pl-$m",
689
+ "group-[.segmented:not(.i8-flat):not(:last-child)]/i8:": "pr-$m"
690
+ }),
691
+ "i8-ta-wrapper": o({
692
+ "": "w-full pt-0.75em",
693
+ "group-[[data-has-label]]/i8:": "mt-$m"
694
+ }),
695
+ "i8-label": o({
696
+ "": "absolute top-0 h-fingertip text-body text-grey-400 lh-fingertip transition-all transition-duration-300 truncate text-ellipsis overflow-hidden max-w-70%",
697
+ "group-[[data-active=true]]/i8:": "h-[2em] lh-2em text-label font-size-[0.7em] text-scope-color-500",
698
+ "group-[[data-has-placeholder]]/i8:": "h-[2em] lh-2em text-label font-size-[0.7em]",
699
+ "group-[[data-has-value]]/i8:": "h-[2em] lh-2em text-label font-size-[0.7em]"
700
+ // 'data-[required=true]:after:': "content-['*'] text-error-500",
701
+ }),
702
+ "i8-label-wrapper": o({
703
+ "": "pointer-events-none absolute left-0 right-0 bottom-0 top-0",
704
+ // paddings
705
+ "group-[.i8-flat]/i8:data-[has-prepend=true]": "pl-$s",
706
+ "group-[.i8-flat]/i8:data-[has-append=true]": "pr-$s",
707
+ "group-[.i8-filled]/i8:": "px-$m",
708
+ "group-[.i8-round]/i8:[&[data-has-prepend='false']]:": "pl-fingertip-half",
709
+ "group-[.i8-round]/i8:[&[data-has-append='false']]:": "pr-fingertip-half",
710
+ // groupped inputs paddings
711
+ "group-[.segmented:not(.i8-flat):not(:first-child)]/i8:": "pl-$m",
712
+ "group-[.segmented:not(.i8-flat):not(:last-child)]/i8:": "pr-$m"
713
+ }),
714
+ "i8-hint": o({
715
+ "": "text-caption pt-$xs text-grey-400 flex-1"
716
+ }),
717
+ "i8-counter": o({
718
+ "": "text-caption pt-$xs text-grey-400"
719
+ }),
720
+ "i8-hint-wrapper": o({
721
+ "": "relative flex justify-between",
722
+ "group-[.i8-round]/i8:": "px-fingertip-half",
723
+ "group-[.i8-filled]/i8:": "px-$m"
724
+ }),
725
+ "i8-hint-wrapper-stack": o({
726
+ "": "relative flex justify-between"
727
+ }),
728
+ "i8-stack-label": o({
729
+ "": "relative pb-$xxs"
730
+ }),
731
+ "i8-prepend": o({
732
+ "": "my-1em",
733
+ "group-[.i8-filled]/i8:": "pl-$m",
734
+ "group-[.i8-round]/i8:": "pl-$m",
735
+ // groupped inputs paddings
736
+ "group-[.segmented:not(.i8-flat):not(:first-child)]/i8:": "pl-$m"
737
+ }),
738
+ "i8-append": o({
739
+ "": "my-1em flex gap-$s items-center",
740
+ "group-[.i8-filled]/i8:": "pr-$m",
741
+ "group-[.i8-round]/i8:": "pr-$m",
742
+ // groupped inputs paddings
743
+ "group-[.segmented:not(.i8-flat):not(:last-child)]/i8:": "pr-$m"
744
+ }),
745
+ "i8-before": o({
746
+ "": "h-fingertip flex items-center pr-$m current-icon-grey-500 icon-current/75",
747
+ "group-[[data-group-active=true]]/i8:": "current-icon-scope-color-500 icon-current/100"
748
+ }),
749
+ "i8-after": o({
750
+ "": "h-fingertip flex items-center pl-$m current-icon-grey-500 icon-current/75",
751
+ "group-[[data-group-active=true]]/i8:": "current-icon-scope-color-500 icon-current/100"
752
+ }),
753
+ "i8-icon-clickable": o({
754
+ "[&>.icon-color]:": "cursor-pointer",
755
+ "[&>.icon-color:hover]:": "current-icon-scope-color-500 icon-current"
756
+ })
757
+ };
758
+ function p(r, e, t, c, i) {
759
+ return {
760
+ weight: r,
761
+ boldWeight: e,
762
+ size: t,
763
+ height: c,
764
+ spacing: i
765
+ };
766
+ }
767
+ function n(r, e = 1) {
768
+ return e * 1.618 ** r;
769
+ }
770
+ const Z = {
771
+ h1: (
772
+ /* */
773
+ p(
774
+ 400,
775
+ 700,
776
+ n(3.5),
777
+ /* */
778
+ n(0.5),
779
+ -0.025
780
+ )
781
+ ),
782
+ h2: (
783
+ /* */
784
+ p(
785
+ 400,
786
+ 700,
787
+ n(2.5),
788
+ /* */
789
+ n(0.5),
790
+ -0.022
791
+ )
792
+ ),
793
+ h3: (
794
+ /* */
795
+ p(
796
+ 400,
797
+ 700,
798
+ n(2),
799
+ /* */
800
+ n(0.5),
801
+ -0.022
802
+ )
803
+ ),
804
+ h4: (
805
+ /* */
806
+ p(
807
+ 400,
808
+ 600,
809
+ n(1),
810
+ /* */
811
+ n(0.5),
812
+ -0.02
813
+ )
814
+ ),
815
+ h5: (
816
+ /* */
817
+ p(
818
+ 400,
819
+ 600,
820
+ n(0.5),
821
+ /* */
822
+ n(0.5),
823
+ -0.017
824
+ )
825
+ ),
826
+ h6: (
827
+ /* */
828
+ p(
829
+ 600,
830
+ 700,
831
+ n(0.25),
832
+ /* */
833
+ n(0.5),
834
+ -0.014
835
+ )
836
+ ),
837
+ subheading: (
838
+ /* */
839
+ p(
840
+ 400,
841
+ 600,
842
+ n(-0.2),
843
+ /* */
844
+ n(0.5),
845
+ -7e-3
846
+ )
847
+ ),
848
+ "body-l": (
849
+ /* */
850
+ p(
851
+ 400,
852
+ 600,
853
+ n(0.5),
854
+ /* */
855
+ n(0.75),
856
+ -0.014
857
+ )
858
+ ),
859
+ body: (
860
+ /* */
861
+ p(
862
+ 400,
863
+ 600,
864
+ n(0),
865
+ /* */
866
+ n(0.75),
867
+ -0.011
868
+ )
869
+ ),
870
+ "body-s": (
871
+ /* */
872
+ p(
873
+ 400,
874
+ 600,
875
+ n(-0.5),
876
+ /* */
877
+ n(1),
878
+ 0
879
+ )
880
+ ),
881
+ callout: (
882
+ /* */
883
+ p(
884
+ 400,
885
+ 600,
886
+ n(-0.25),
887
+ /* */
888
+ n(0.5),
889
+ -9e-3
890
+ )
891
+ ),
892
+ label: (
893
+ /* */
894
+ p(
895
+ 500,
896
+ 700,
897
+ n(-0.25),
898
+ /* */
899
+ n(0.5),
900
+ -4e-3
901
+ )
902
+ ),
903
+ caption: (
904
+ /* */
905
+ p(
906
+ 400,
907
+ 600,
908
+ n(-0.5),
909
+ /* */
910
+ n(0.5),
911
+ -7e-3
912
+ )
913
+ ),
914
+ overline: (
915
+ /* */
916
+ p(
917
+ 400,
918
+ 600,
919
+ n(-0.5),
920
+ /* */
921
+ n(0.5),
922
+ 0.0618
923
+ )
924
+ )
925
+ };
926
+ function _(r, e, t, c, i, a = 1, l = 0.5) {
927
+ const s = r * a, h = (c * r - s) / r, $ = s / 2, O = s * l - $ + h / 2, H = s * (1 - l) - $ + h / 2, k = g(O, 4), y = g(H, 4);
928
+ return {
929
+ mt: k,
930
+ mb: y,
931
+ size: r,
932
+ correctedSize: s,
933
+ theme: [
934
+ `${r}em`,
935
+ {
936
+ "--font-bold": t,
937
+ "--font-size": `${r}em`,
938
+ "--font-corrected": `${s}em`,
939
+ "--font-bc": `${-y}em`,
940
+ "--font-tc": `${-k}em`,
941
+ "font-weight": e,
942
+ "line-height": `${c}em`,
943
+ "letter-spacing": `${i}em`
944
+ // margins are compensationg font-height + extra font glyphs spacing
945
+ // 'margin-top': `${-mt}em`,
946
+ // 'margin-bottom': `${-mb}em`,
947
+ }
948
+ // actualFontHeightFactor,
949
+ ]
950
+ };
951
+ }
952
+ const rr = (r) => {
953
+ const e = {
954
+ // canonical
955
+ $xxs: `${g(1 / r.spacingFactor ** 3, 3)}em`,
956
+ $xs: `${g(1 / r.spacingFactor ** 2, 3)}em`,
957
+ $s: `${g(1 / r.spacingFactor, 3)}em`,
958
+ $m: "1em",
959
+ $l: `${g(r.spacingFactor, 3)}em`,
960
+ $xl: `${g(r.spacingFactor ** 2, 3)}em`,
961
+ $xxl: `${g(r.spacingFactor ** 3, 3)}em`,
962
+ fingertip: "var(--v-fingertip)",
963
+ "fingertip-half": "var(--v-fingertip-half)",
964
+ "fingertip-xs": r.fingertip.xs,
965
+ "fingertip-s": r.fingertip.s,
966
+ "fingertip-m": r.fingertip.m,
967
+ "fingertip-l": r.fingertip.l,
968
+ "fingertip-xl": r.fingertip.xl,
969
+ // font-based
970
+ "$font-tc": "var(--font-bc)",
971
+ "$font-bc": "var(--font-tc)",
972
+ "$font-size": "var(--font-size)",
973
+ "$font-corrected": "var(--font-corrected)",
974
+ // cards
975
+ "$card-spacing": "var(--card-spacing)",
976
+ "$card-spacing-dense": "var(--card-spacing-dense)",
977
+ "$card-heading-size": "var(--card-heading-size)",
978
+ "$card-heading-corrected": "var(--card-heading-corrected)",
979
+ // radius
980
+ "base-radius": r.baseRadius
981
+ }, t = {
982
+ fingertip: "var(--v-fingertip)",
983
+ "fingertip-half": "var(--v-fingertip-half)",
984
+ "fingertip-xs": r.fingertip.xs,
985
+ "fingertip-s": r.fingertip.s,
986
+ "fingertip-m": r.fingertip.m,
987
+ "fingertip-l": r.fingertip.l,
988
+ "fingertip-xl": r.fingertip.xl
989
+ }, c = {
990
+ ...e,
991
+ base: r.baseRadius
992
+ }, i = {
993
+ $bold: "var(--font-bold)"
994
+ }, a = {
995
+ "card-header": [
996
+ "var(--card-heading-size)",
997
+ {
998
+ "--font-bold": "var(--card-heading-bold)",
999
+ "--font-size": "var(--card-heading-size)",
1000
+ "--font-corrected": "var(--card-heading-corrected)",
1001
+ "--font-bc": "var(--card-heading-bc)",
1002
+ "--font-tc": "var(--card-heading-tc)",
1003
+ "font-weight": "var(--card-heading-weight)",
1004
+ "line-height": "var(--card-heading-lh)",
1005
+ "letter-spacing": "var(--card-heading-ls)"
1006
+ }
1007
+ ]
1008
+ };
1009
+ for (const [s, u] of Object.entries(r.typography))
1010
+ if (u != null && u.size) {
1011
+ const h = _(
1012
+ u.size || 1,
1013
+ u.weight || 400,
1014
+ u.boldWeight || 700,
1015
+ u.height || 1,
1016
+ u.spacing || 0,
1017
+ u.actualHeightFactor || r.actualFontHeightFactor,
1018
+ u.actualHeightTopBottomRatio || r.actualFontHeightTopBottomRatio
1019
+ );
1020
+ a[s] = h.theme, e[s] = `${h.size}em`;
1021
+ }
1022
+ const l = B(r.palette);
1023
+ return {
1024
+ colors: l.colors,
1025
+ surfaces: l.surfaces,
1026
+ borderColor: "red",
1027
+ reverseLightLayers: r.layers.reverseLight,
1028
+ reverseDarkLayers: r.layers.reverseDark,
1029
+ lineHeight: t,
1030
+ spacing: e,
1031
+ fontWeight: i,
1032
+ actualFontHeightFactor: r.actualFontHeightFactor,
1033
+ cardSpacingFactor: r.cardSpacingFactor,
1034
+ fontSize: a,
1035
+ width: e,
1036
+ height: e,
1037
+ maxWidth: e,
1038
+ maxHeight: e,
1039
+ minWidth: e,
1040
+ minHeight: e,
1041
+ borderRadius: c,
1042
+ animation: {
1043
+ durations: {
1044
+ "slide-down-and-fade": "100ms",
1045
+ "slide-left-and-fade": "100ms",
1046
+ "slide-up-and-fade": "100ms",
1047
+ "slide-right-and-fade": "100ms",
1048
+ "zoom-fade-in": "100ms"
1049
+ },
1050
+ keyframes: {
1051
+ "slide-down-and-fade": `{
1052
+ from { opacity: 0; transform: translateY(-6px) }
1053
+ to { opacity: 1; transform: translateY(0) }
1054
+ }`,
1055
+ "slide-left-and-fade": `{
1056
+ from { opacity: 0; transform: translateX(6px) }
1057
+ to { opacity: 1; transform: translateX(0) }
1058
+ }`,
1059
+ "slide-up-and-fade": `{
1060
+ from { opacity: 0; transform: translateY(6px) }
1061
+ to { opacity: 1; transform: translateY(0) }
1062
+ }`,
1063
+ "slide-right-and-fade": `{
1064
+ from { opacity: 0; transform: translateX(-6px) }
1065
+ to { opacity: 1; transform: translateX(0) }
1066
+ }`,
1067
+ "zoom-fade-in": `{
1068
+ from { opacity: 0; transform: scale(1.02) }
1069
+ to { opacity: 1; transform: scale(1) }
1070
+ }`,
1071
+ "loading-dashoffset": `{
1072
+ from {
1073
+ stroke-dashoffset: 0;
1074
+ }
1075
+ to {
1076
+ stroke-dashoffset: -76;
1077
+ }
1078
+ }`,
1079
+ "cb-appear": `{
1080
+ from {
1081
+ clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
1082
+ }
1083
+ to {
1084
+ clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
1085
+ }
1086
+ }`
1087
+ }
1088
+ }
1089
+ // animation: {
1090
+ // slideDownAndFade: 'slideDownAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
1091
+ // slideLeftAndFade: 'slideLeftAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
1092
+ // slideUpAndFade: 'slideUpAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
1093
+ // slideRightAndFade: 'slideRightAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
1094
+ // },
1095
+ };
1096
+ };
1097
+ function j(r, e = 1) {
1098
+ return e * Math.sqrt(1.618) ** r;
1099
+ }
1100
+ const er = {
1101
+ spacingFactor: 1.618,
1102
+ actualFontHeightFactor: 1,
1103
+ actualFontHeightTopBottomRatio: 0.52,
1104
+ cardSpacingFactor: {
1105
+ regular: 1,
1106
+ dense: 0.6
1107
+ },
1108
+ typography: Z,
1109
+ layers: {
1110
+ reverseDark: !1,
1111
+ reverseLight: !1
1112
+ },
1113
+ fingertip: {
1114
+ xs: `${g(j(-2, 3), 3)}em`,
1115
+ s: `${g(j(-1, 3), 3)}em`,
1116
+ m: "3em",
1117
+ l: "3.5em",
1118
+ xl: "4em"
1119
+ },
1120
+ baseRadius: `${g(1 / 1.618, 3)}em`
1121
+ }, lr = (r) => {
1122
+ const e = w(r, er), t = tr();
1123
+ t.preflights || (t.preflights = []), t.preflights.push(E), t.rules || (t.rules = []), t.rules.push(...K);
1124
+ const c = P();
1125
+ return {
1126
+ ...t,
1127
+ name: "vunor",
1128
+ theme: w(rr(e), t.theme),
1129
+ shortcuts: [...c, Q, U],
1130
+ layers: {
1131
+ preflights: 0,
1132
+ shortcuts: 1,
1133
+ default: 2,
1134
+ utilities: 3
1135
+ }
1136
+ };
1137
+ };
1138
+ function tr() {
1139
+ var e;
1140
+ const r = N();
1141
+ return (e = r.rules) == null || e.forEach((t) => {
1142
+ t[0] instanceof RegExp && (t[0].source.startsWith("^m-") || t[0].source.startsWith("^ma?") || t[0].source.startsWith("^p-?") || t[0].source.startsWith("^pa?")) && (t[2] = t[2] || {}, t[2].layer = "utilities");
1143
+ }), r;
1144
+ }
1145
+ export {
1146
+ lr as presetVunor,
1147
+ o as scFromObject,
1148
+ ar as shortcuts
1149
+ };