@sigx/zero-daisyui 0.2.0-beta.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 +21 -0
- package/README.md +115 -0
- package/dist/components.d.ts +478 -0
- package/dist/components.js +76 -0
- package/dist/css/components/accordion.css +165 -0
- package/dist/css/components/alert.css +126 -0
- package/dist/css/components/avatar.css +94 -0
- package/dist/css/components/badge.css +82 -0
- package/dist/css/components/breadcrumbs.css +102 -0
- package/dist/css/components/button.css +252 -0
- package/dist/css/components/card.css +97 -0
- package/dist/css/components/carousel.css +196 -0
- package/dist/css/components/chat.css +167 -0
- package/dist/css/components/checkbox.css +245 -0
- package/dist/css/components/collapsible.css +157 -0
- package/dist/css/components/combobox.css +251 -0
- package/dist/css/components/countdown.css +83 -0
- package/dist/css/components/dialog.css +313 -0
- package/dist/css/components/diff.css +120 -0
- package/dist/css/components/divider.css +70 -0
- package/dist/css/components/drawer.css +285 -0
- package/dist/css/components/field.css +111 -0
- package/dist/css/components/file-upload.css +198 -0
- package/dist/css/components/indicator.css +166 -0
- package/dist/css/components/input.css +151 -0
- package/dist/css/components/join.css +122 -0
- package/dist/css/components/kbd.css +84 -0
- package/dist/css/components/menu.css +382 -0
- package/dist/css/components/native-select.css +128 -0
- package/dist/css/components/navbar.css +93 -0
- package/dist/css/components/number-input.css +211 -0
- package/dist/css/components/pagination.css +203 -0
- package/dist/css/components/popover.css +263 -0
- package/dist/css/components/progress.css +109 -0
- package/dist/css/components/radial-progress.css +129 -0
- package/dist/css/components/radio-group.css +176 -0
- package/dist/css/components/rating-group.css +143 -0
- package/dist/css/components/select.css +212 -0
- package/dist/css/components/skeleton.css +74 -0
- package/dist/css/components/slider.css +182 -0
- package/dist/css/components/spinner.css +75 -0
- package/dist/css/components/stats.css +115 -0
- package/dist/css/components/status.css +66 -0
- package/dist/css/components/steps.css +208 -0
- package/dist/css/components/swap.css +116 -0
- package/dist/css/components/switch.css +126 -0
- package/dist/css/components/table.css +124 -0
- package/dist/css/components/tabs.css +137 -0
- package/dist/css/components/textarea.css +131 -0
- package/dist/css/components/timeline.css +204 -0
- package/dist/css/components/toast.css +234 -0
- package/dist/css/components/toggle-group.css +164 -0
- package/dist/css/components/toggle.css +139 -0
- package/dist/css/components/tooltip.css +226 -0
- package/dist/css/components/tree-view.css +197 -0
- package/dist/css/index.css +8521 -0
- package/dist/css/tokens.css +265 -0
- package/dist/design-system.d.ts +5 -0
- package/dist/design-system.d.ts.map +1 -0
- package/dist/design-system.js +46 -0
- package/dist/design-system.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/lynx/components/accordion.css +87 -0
- package/dist/lynx/components/alert.css +108 -0
- package/dist/lynx/components/avatar.css +83 -0
- package/dist/lynx/components/badge.css +80 -0
- package/dist/lynx/components/breadcrumbs.css +61 -0
- package/dist/lynx/components/button.css +173 -0
- package/dist/lynx/components/card.css +62 -0
- package/dist/lynx/components/carousel.css +124 -0
- package/dist/lynx/components/chat.css +105 -0
- package/dist/lynx/components/checkbox.css +163 -0
- package/dist/lynx/components/collapsible.css +79 -0
- package/dist/lynx/components/combobox.css +195 -0
- package/dist/lynx/components/countdown.css +43 -0
- package/dist/lynx/components/dialog.css +227 -0
- package/dist/lynx/components/diff.css +59 -0
- package/dist/lynx/components/divider.css +60 -0
- package/dist/lynx/components/drawer.css +184 -0
- package/dist/lynx/components/field.css +63 -0
- package/dist/lynx/components/file-upload.css +147 -0
- package/dist/lynx/components/indicator.css +108 -0
- package/dist/lynx/components/input.css +112 -0
- package/dist/lynx/components/join.css +60 -0
- package/dist/lynx/components/kbd.css +81 -0
- package/dist/lynx/components/menu.css +282 -0
- package/dist/lynx/components/native-select.css +100 -0
- package/dist/lynx/components/navbar.css +91 -0
- package/dist/lynx/components/number-input.css +156 -0
- package/dist/lynx/components/pagination.css +155 -0
- package/dist/lynx/components/popover.css +184 -0
- package/dist/lynx/components/progress.css +43 -0
- package/dist/lynx/components/radial-progress.css +59 -0
- package/dist/lynx/components/radio-group.css +149 -0
- package/dist/lynx/components/rating-group.css +69 -0
- package/dist/lynx/components/select.css +163 -0
- package/dist/lynx/components/skeleton.css +34 -0
- package/dist/lynx/components/slider.css +136 -0
- package/dist/lynx/components/spinner.css +49 -0
- package/dist/lynx/components/stats.css +95 -0
- package/dist/lynx/components/status.css +45 -0
- package/dist/lynx/components/steps.css +171 -0
- package/dist/lynx/components/swap.css +60 -0
- package/dist/lynx/components/switch.css +95 -0
- package/dist/lynx/components/table.css +74 -0
- package/dist/lynx/components/tabs.css +105 -0
- package/dist/lynx/components/textarea.css +104 -0
- package/dist/lynx/components/timeline.css +123 -0
- package/dist/lynx/components/toast.css +200 -0
- package/dist/lynx/components/toggle-group.css +114 -0
- package/dist/lynx/components/toggle.css +112 -0
- package/dist/lynx/components/tooltip.css +153 -0
- package/dist/lynx/components/tree-view.css +161 -0
- package/dist/lynx/index.css +6223 -0
- package/dist/lynx/manifest.json +1758 -0
- package/dist/lynx/tokens.css +425 -0
- package/dist/manifest.json +1752 -0
- package/dist/recipes.d.ts +188 -0
- package/dist/recipes.d.ts.map +1 -0
- package/dist/recipes.js +5128 -0
- package/dist/recipes.js.map +1 -0
- package/dist/register.d.ts +507 -0
- package/dist/register.js +4 -0
- package/dist/report.json +10752 -0
- package/dist/tokens.d.ts +150 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +306 -0
- package/dist/tokens.js.map +1 -0
- package/package.json +61 -0
- package/src/design-system.ts +52 -0
- package/src/index.ts +14 -0
- package/src/recipes.ts +5236 -0
- package/src/tokens.ts +321 -0
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* zero-daisyui tokens — daisyUI's "light" and "dark" theme values on the
|
|
3
|
+
* zero contract. Values match the daisy presets `@sigx/daisyui` ships, so a
|
|
4
|
+
* zero app skinned with this package sits visually next to a daisy app.
|
|
5
|
+
*/
|
|
6
|
+
import type { TokensInput } from '@sigx/zero-kit';
|
|
7
|
+
/** daisyUI's color vocabulary — the recommended eight roles, declared explicitly. */
|
|
8
|
+
export declare const roles: {
|
|
9
|
+
readonly primary: {};
|
|
10
|
+
readonly secondary: {};
|
|
11
|
+
readonly accent: {};
|
|
12
|
+
readonly neutral: {};
|
|
13
|
+
readonly info: {};
|
|
14
|
+
readonly success: {};
|
|
15
|
+
readonly warning: {};
|
|
16
|
+
readonly error: {};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* daisy's non-color token values — declared once for the design system rather
|
|
20
|
+
* than restated per theme, with the three radii per-theme overridden below
|
|
21
|
+
* where daisy's own themes differ.
|
|
22
|
+
*
|
|
23
|
+
* The radii are `light`/`dark`'s real shipped values. They used to be
|
|
24
|
+
* `selector: 1.5rem` / `field: .5rem` / `box: 1rem`, which no daisyUI 5 theme
|
|
25
|
+
* declares for any of the three — and `1.5rem` in particular is a value
|
|
26
|
+
* `--radius-selector` never takes in any of daisy's 35 themes. The error was
|
|
27
|
+
* masked on the checkbox alone by a compensating `calc(… / 3)` in `recipes.ts`
|
|
28
|
+
* (`1.5rem / 3` = the `.5rem` daisy uses undivided); every other reader —
|
|
29
|
+
* `switch.control`, `switch.thumb`, `progress`, the rating focus rings — was
|
|
30
|
+
* simply 3× too round. Source: daisyUI 5's shipped `themes.css`, parsed across
|
|
31
|
+
* all 35 themes.
|
|
32
|
+
*/
|
|
33
|
+
export declare const system: {
|
|
34
|
+
readonly radius: {
|
|
35
|
+
readonly selector: '0.5rem';
|
|
36
|
+
readonly field: '0.25rem';
|
|
37
|
+
readonly box: '0.5rem';
|
|
38
|
+
};
|
|
39
|
+
readonly size: {
|
|
40
|
+
readonly selector: '0.25rem';
|
|
41
|
+
readonly field: '0.25rem';
|
|
42
|
+
};
|
|
43
|
+
readonly typography: {
|
|
44
|
+
readonly fonts: {
|
|
45
|
+
readonly sans: 'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif';
|
|
46
|
+
readonly mono: 'ui-monospace, SFMono-Regular, Menlo, monospace';
|
|
47
|
+
};
|
|
48
|
+
readonly weights: {
|
|
49
|
+
readonly normal: 400;
|
|
50
|
+
readonly medium: 500;
|
|
51
|
+
readonly semibold: 600;
|
|
52
|
+
readonly bold: 700;
|
|
53
|
+
};
|
|
54
|
+
readonly leading: {
|
|
55
|
+
readonly none: 1;
|
|
56
|
+
readonly tight: 1.25;
|
|
57
|
+
readonly normal: 1.5;
|
|
58
|
+
};
|
|
59
|
+
readonly tracking: {
|
|
60
|
+
readonly normal: '0em';
|
|
61
|
+
readonly wide: '0.05em';
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
readonly spacing: {
|
|
65
|
+
readonly '2xs': '0.125rem';
|
|
66
|
+
readonly xs: '0.25rem';
|
|
67
|
+
readonly sm: '0.375rem';
|
|
68
|
+
readonly md: '0.5rem';
|
|
69
|
+
readonly lg: '0.75rem';
|
|
70
|
+
readonly xl: '1rem';
|
|
71
|
+
readonly '2xl': '1.25rem';
|
|
72
|
+
};
|
|
73
|
+
readonly shadow: {
|
|
74
|
+
readonly xs: '0 1px 2px oklch(0% 0 0 / 0.08)';
|
|
75
|
+
readonly sm: '0 1px 2px oklch(0% 0 0 / 0.15)';
|
|
76
|
+
readonly md: '0 1px 2px oklch(0% 0 0 / 0.2)';
|
|
77
|
+
readonly lg: '0 12px 32px -8px oklch(0% 0 0 / 0.3)';
|
|
78
|
+
readonly xl: '0 25px 50px -12px oklch(0% 0 0 / 0.4)';
|
|
79
|
+
};
|
|
80
|
+
readonly motion: {
|
|
81
|
+
readonly durations: {
|
|
82
|
+
readonly instant: '100ms';
|
|
83
|
+
readonly fast: '150ms';
|
|
84
|
+
readonly normal: '200ms';
|
|
85
|
+
readonly slow: '300ms';
|
|
86
|
+
};
|
|
87
|
+
readonly easings: {
|
|
88
|
+
readonly standard: 'ease';
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
readonly border: '1px';
|
|
92
|
+
readonly disabledOpacity: '0.3';
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* daisy's two non-contract knobs. `--depth` needs `syntax: '<number>'` so
|
|
96
|
+
* `calc(var(--depth) * 10%)` interpolates rather than resolving to a guess.
|
|
97
|
+
*/
|
|
98
|
+
export declare const custom: {
|
|
99
|
+
readonly depth: {
|
|
100
|
+
readonly description: "daisy's inset-shadow depth: 1 = shadowed, 0 = flat.";
|
|
101
|
+
readonly syntax: '<number>';
|
|
102
|
+
};
|
|
103
|
+
readonly 'depth-shade': {
|
|
104
|
+
readonly description: 'The black inset paint --depth scales.';
|
|
105
|
+
};
|
|
106
|
+
readonly 'depth-sheen': {
|
|
107
|
+
readonly description: 'The white inset paint --depth scales.';
|
|
108
|
+
};
|
|
109
|
+
readonly noise: {
|
|
110
|
+
readonly description: "daisy's fractal-noise overlay strength (0–1).";
|
|
111
|
+
readonly syntax: '<number>';
|
|
112
|
+
};
|
|
113
|
+
readonly 'fx-noise': {
|
|
114
|
+
readonly description: "daisy's fractal-noise tile.";
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* The `variant` axis vocabulary — what button's variants.variant keys on.
|
|
119
|
+
* Declared so a recipe typo is a build error, not a minted value; exported
|
|
120
|
+
* `as const` so `defineApi` can narrow the api declaration against it.
|
|
121
|
+
*
|
|
122
|
+
* `dash` and `link` are daisyUI 5's `btn-dash` / `btn-link` (#332). daisy
|
|
123
|
+
* documents `dash` (with `outline` and `soft`) on badge and alert too, but
|
|
124
|
+
* this package wires `variant` on button only — the repo-wide decision
|
|
125
|
+
* (#175) — so the union below IS button's vocabulary, and the `scopes`
|
|
126
|
+
* entry makes that claim explicit.
|
|
127
|
+
*/
|
|
128
|
+
export declare const variants: readonly ['solid', 'outline', 'soft', 'ghost', 'dash', 'link'];
|
|
129
|
+
/**
|
|
130
|
+
* daisyUI 5's button modifier set (#332), each a documented `btn-*` class:
|
|
131
|
+
* `btn-wide`, `btn-block`, `btn-square`, `btn-circle`, `btn-active`, and
|
|
132
|
+
* the loading spinner (daisy renders it as a `loading loading-spinner`
|
|
133
|
+
* span; here the recipe draws it, no DOM change). All six were boolean
|
|
134
|
+
* props on the old `@sigx/daisyui` Button — the api declaration routes
|
|
135
|
+
* them back to those names.
|
|
136
|
+
*
|
|
137
|
+
* `glass` is deliberately NOT here: daisyUI 5 no longer documents it on
|
|
138
|
+
* any component (a v4 relic whose v5 survival is a compatibility style
|
|
139
|
+
* with open breakage — saadeghi/daisyui#3316, #3501), and the old
|
|
140
|
+
* `@sigx/daisyui` Button never exposed it either.
|
|
141
|
+
*/
|
|
142
|
+
export declare const modifiers: readonly ['wide', 'block', 'square', 'circle', 'active', 'loading'];
|
|
143
|
+
/**
|
|
144
|
+
* daisyUI's table looks (#340): `table-zebra` and the row-level `hover`
|
|
145
|
+
* class, spelled as presence-only mods on the table root. Kept apart from
|
|
146
|
+
* the button set so `scopes` can hand each scope exactly its own names.
|
|
147
|
+
*/
|
|
148
|
+
export declare const tableModifiers: readonly ['zebra', 'hover'];
|
|
149
|
+
export declare const tokens: TokensInput<typeof roles, typeof system>;
|
|
150
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAA2C,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE3F,qFAAqF;AACrF,eAAO,MAAM,KAAK;;;;;;;;;CAG2B,CAAC;AAE9C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,MAAM;;iBACL,QAAQ,EAAE,QAAQ;iBAAE,KAAK,EAAE,SAAS;iBAAE,GAAG,EAAE,QAAQ;;;iBACrD,QAAQ,EAAE,SAAS;iBAAE,KAAK,EAAE,SAAS;;;iBAIzC,KAAK;qBACD,IAAI,EAAE,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;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,YAAI,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAE7F;;;;GAIG;AACH,eAAO,MAAM,cAAc,YAAI,OAAO,EAAE,OAAO,CAAU,CAAC;AAE1D,eAAO,MAAM,MAAM,EAAE,WAAW,CAAC,OAAO,KAAK,EAAE,OAAO,MAAM,CA4K3D,CAAC"}
|
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/** daisyUI's color vocabulary — the recommended eight roles, declared explicitly. */
|
|
2
|
+
export const roles = {
|
|
3
|
+
primary: {}, secondary: {}, accent: {}, neutral: {},
|
|
4
|
+
info: {}, success: {}, warning: {}, error: {},
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* daisy's non-color token values — declared once for the design system rather
|
|
8
|
+
* than restated per theme, with the three radii per-theme overridden below
|
|
9
|
+
* where daisy's own themes differ.
|
|
10
|
+
*
|
|
11
|
+
* The radii are `light`/`dark`'s real shipped values. They used to be
|
|
12
|
+
* `selector: 1.5rem` / `field: .5rem` / `box: 1rem`, which no daisyUI 5 theme
|
|
13
|
+
* declares for any of the three — and `1.5rem` in particular is a value
|
|
14
|
+
* `--radius-selector` never takes in any of daisy's 35 themes. The error was
|
|
15
|
+
* masked on the checkbox alone by a compensating `calc(… / 3)` in `recipes.ts`
|
|
16
|
+
* (`1.5rem / 3` = the `.5rem` daisy uses undivided); every other reader —
|
|
17
|
+
* `switch.control`, `switch.thumb`, `progress`, the rating focus rings — was
|
|
18
|
+
* simply 3× too round. Source: daisyUI 5's shipped `themes.css`, parsed across
|
|
19
|
+
* all 35 themes.
|
|
20
|
+
*/
|
|
21
|
+
export const system = {
|
|
22
|
+
radius: { selector: '0.5rem', field: '0.25rem', box: '0.5rem' },
|
|
23
|
+
size: { selector: '0.25rem', field: '0.25rem' },
|
|
24
|
+
// Typography. `fonts` is FAMILIES — sizes are the --text-* ramp, which
|
|
25
|
+
// this design system inherits from @sigx/zero's fallbacks.
|
|
26
|
+
typography: {
|
|
27
|
+
fonts: {
|
|
28
|
+
sans: 'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
|
|
29
|
+
mono: 'ui-monospace, SFMono-Regular, Menlo, monospace',
|
|
30
|
+
},
|
|
31
|
+
weights: { normal: 400, medium: 500, semibold: 600, bold: 700 },
|
|
32
|
+
leading: { none: 1, tight: 1.25, normal: 1.5 },
|
|
33
|
+
tracking: { normal: '0em', wide: '0.05em' },
|
|
34
|
+
},
|
|
35
|
+
// daisy runs a slightly roomier ramp than basic — the `xl`/`2xl` steps
|
|
36
|
+
// are where its cards and modals get their air.
|
|
37
|
+
spacing: {
|
|
38
|
+
'2xs': '0.125rem',
|
|
39
|
+
xs: '0.25rem',
|
|
40
|
+
sm: '0.375rem',
|
|
41
|
+
md: '0.5rem',
|
|
42
|
+
lg: '0.75rem',
|
|
43
|
+
xl: '1rem',
|
|
44
|
+
'2xl': '1.25rem',
|
|
45
|
+
},
|
|
46
|
+
// daisy leans on many barely-separated low elevations; preserved exactly.
|
|
47
|
+
shadow: {
|
|
48
|
+
xs: '0 1px 2px oklch(0% 0 0 / 0.08)',
|
|
49
|
+
sm: '0 1px 2px oklch(0% 0 0 / 0.15)',
|
|
50
|
+
md: '0 1px 2px oklch(0% 0 0 / 0.2)',
|
|
51
|
+
lg: '0 12px 32px -8px oklch(0% 0 0 / 0.3)',
|
|
52
|
+
xl: '0 25px 50px -12px oklch(0% 0 0 / 0.4)',
|
|
53
|
+
},
|
|
54
|
+
// daisy's own timings, unchanged in value — 0.15s/0.2s/0.3s as authored.
|
|
55
|
+
// `instant` is the 100ms daisy writes as a literal `.1s` in the checkbox
|
|
56
|
+
// tick's and the toggle knob's transition DELAY. Declared as a token so no
|
|
57
|
+
// literal time appears in a recipe, and — unlike daisy's own — so the kit's
|
|
58
|
+
// reduced-motion block collapses the delay along with every duration.
|
|
59
|
+
motion: {
|
|
60
|
+
durations: { instant: '100ms', fast: '150ms', normal: '200ms', slow: '300ms' },
|
|
61
|
+
easings: { standard: 'ease' },
|
|
62
|
+
},
|
|
63
|
+
border: '1px',
|
|
64
|
+
disabledOpacity: '0.3',
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* daisy's fractal-noise tile, verbatim from its own `:root` — the `--fx-noise`
|
|
68
|
+
* layer its checkboxes, toggles and buttons carry at `--noise` strength.
|
|
69
|
+
*/
|
|
70
|
+
const FX_NOISE = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E\")";
|
|
71
|
+
/**
|
|
72
|
+
* The two paints `--depth` scales, named rather than inlined.
|
|
73
|
+
*
|
|
74
|
+
* daisy writes `oklch(0% 0 0 / calc(var(--depth) * .1))` straight into every
|
|
75
|
+
* inset box-shadow. Written that way in a recipe the validator flags a
|
|
76
|
+
* hardcoded colour — its scrim exemption parses the literal, and a
|
|
77
|
+
* `calc(var(…))` alpha does not survive `stripVars`. Naming them keeps the
|
|
78
|
+
* recipes var-only, which is the rule the exemption exists to protect.
|
|
79
|
+
*/
|
|
80
|
+
const DEPTH_SHADE = 'oklch(0% 0 0 / calc(var(--depth) * 0.1))';
|
|
81
|
+
const DEPTH_SHEEN = 'oklch(100% 0 0 / calc(var(--depth) * 0.1))';
|
|
82
|
+
/**
|
|
83
|
+
* daisy's two non-contract knobs. `--depth` needs `syntax: '<number>'` so
|
|
84
|
+
* `calc(var(--depth) * 10%)` interpolates rather than resolving to a guess.
|
|
85
|
+
*/
|
|
86
|
+
export const custom = {
|
|
87
|
+
depth: { description: "daisy's inset-shadow depth: 1 = shadowed, 0 = flat.", syntax: '<number>' },
|
|
88
|
+
'depth-shade': { description: 'The black inset paint --depth scales.' },
|
|
89
|
+
'depth-sheen': { description: 'The white inset paint --depth scales.' },
|
|
90
|
+
noise: { description: "daisy's fractal-noise overlay strength (0–1).", syntax: '<number>' },
|
|
91
|
+
'fx-noise': { description: "daisy's fractal-noise tile." },
|
|
92
|
+
};
|
|
93
|
+
/** Per-theme values for `custom` — only `--depth` actually varies. */
|
|
94
|
+
const fx = (depth) => ({
|
|
95
|
+
depth,
|
|
96
|
+
'depth-shade': DEPTH_SHADE,
|
|
97
|
+
'depth-sheen': DEPTH_SHEEN,
|
|
98
|
+
noise: '0',
|
|
99
|
+
'fx-noise': FX_NOISE,
|
|
100
|
+
});
|
|
101
|
+
/**
|
|
102
|
+
* The `variant` axis vocabulary — what button's variants.variant keys on.
|
|
103
|
+
* Declared so a recipe typo is a build error, not a minted value; exported
|
|
104
|
+
* `as const` so `defineApi` can narrow the api declaration against it.
|
|
105
|
+
*
|
|
106
|
+
* `dash` and `link` are daisyUI 5's `btn-dash` / `btn-link` (#332). daisy
|
|
107
|
+
* documents `dash` (with `outline` and `soft`) on badge and alert too, but
|
|
108
|
+
* this package wires `variant` on button only — the repo-wide decision
|
|
109
|
+
* (#175) — so the union below IS button's vocabulary, and the `scopes`
|
|
110
|
+
* entry makes that claim explicit.
|
|
111
|
+
*/
|
|
112
|
+
export const variants = ['solid', 'outline', 'soft', 'ghost', 'dash', 'link'];
|
|
113
|
+
/**
|
|
114
|
+
* daisyUI 5's button modifier set (#332), each a documented `btn-*` class:
|
|
115
|
+
* `btn-wide`, `btn-block`, `btn-square`, `btn-circle`, `btn-active`, and
|
|
116
|
+
* the loading spinner (daisy renders it as a `loading loading-spinner`
|
|
117
|
+
* span; here the recipe draws it, no DOM change). All six were boolean
|
|
118
|
+
* props on the old `@sigx/daisyui` Button — the api declaration routes
|
|
119
|
+
* them back to those names.
|
|
120
|
+
*
|
|
121
|
+
* `glass` is deliberately NOT here: daisyUI 5 no longer documents it on
|
|
122
|
+
* any component (a v4 relic whose v5 survival is a compatibility style
|
|
123
|
+
* with open breakage — saadeghi/daisyui#3316, #3501), and the old
|
|
124
|
+
* `@sigx/daisyui` Button never exposed it either.
|
|
125
|
+
*/
|
|
126
|
+
export const modifiers = ['wide', 'block', 'square', 'circle', 'active', 'loading'];
|
|
127
|
+
/**
|
|
128
|
+
* daisyUI's table looks (#340): `table-zebra` and the row-level `hover`
|
|
129
|
+
* class, spelled as presence-only mods on the table root. Kept apart from
|
|
130
|
+
* the button set so `scopes` can hand each scope exactly its own names.
|
|
131
|
+
*/
|
|
132
|
+
export const tableModifiers = ['zebra', 'hover'];
|
|
133
|
+
export const tokens = {
|
|
134
|
+
roles,
|
|
135
|
+
custom,
|
|
136
|
+
variants,
|
|
137
|
+
modifiers: [...modifiers, ...tableModifiers],
|
|
138
|
+
/**
|
|
139
|
+
* Per-scope vocabulary claims (#294). Button wires `variant` and the
|
|
140
|
+
* `btn-*` modifier set (#175); restating that union is the explicit
|
|
141
|
+
* claim "yes, button carries all of it", the same grammar zero-basic's
|
|
142
|
+
* button entry uses. Table (#340) narrows to its own two looks — the
|
|
143
|
+
* "later scope adopts part of the axis" case this block predicted.
|
|
144
|
+
*/
|
|
145
|
+
scopes: {
|
|
146
|
+
button: {
|
|
147
|
+
variants: [...variants],
|
|
148
|
+
modifiers: [...modifiers],
|
|
149
|
+
},
|
|
150
|
+
table: { modifiers: [...tableModifiers] },
|
|
151
|
+
},
|
|
152
|
+
system,
|
|
153
|
+
defaultLight: 'light',
|
|
154
|
+
defaultDark: 'dark',
|
|
155
|
+
themes: {
|
|
156
|
+
light: {
|
|
157
|
+
colorScheme: 'light',
|
|
158
|
+
pair: 'dark',
|
|
159
|
+
softMix: 0.12,
|
|
160
|
+
colors: {
|
|
161
|
+
'base-100': 'oklch(100% 0 0)',
|
|
162
|
+
'base-200': 'oklch(98% 0 0)',
|
|
163
|
+
'base-300': 'oklch(95% 0 0)',
|
|
164
|
+
'base-content': 'oklch(21% 0.006 285.885)',
|
|
165
|
+
primary: 'oklch(45% 0.24 277.023)',
|
|
166
|
+
'primary-content': 'oklch(93% 0.034 272.788)',
|
|
167
|
+
secondary: 'oklch(65% 0.241 354.308)',
|
|
168
|
+
'secondary-content': 'oklch(94% 0.028 342.258)',
|
|
169
|
+
accent: 'oklch(77% 0.152 181.912)',
|
|
170
|
+
'accent-content': 'oklch(38% 0.063 188.416)',
|
|
171
|
+
neutral: 'oklch(14% 0.005 285.823)',
|
|
172
|
+
'neutral-content': 'oklch(92% 0.004 286.32)',
|
|
173
|
+
info: 'oklch(74% 0.16 232.661)',
|
|
174
|
+
'info-content': 'oklch(29% 0.066 243.157)',
|
|
175
|
+
success: 'oklch(76% 0.177 163.223)',
|
|
176
|
+
'success-content': 'oklch(37% 0.077 168.94)',
|
|
177
|
+
warning: 'oklch(82% 0.189 84.429)',
|
|
178
|
+
'warning-content': 'oklch(41% 0.112 45.904)',
|
|
179
|
+
error: 'oklch(71% 0.194 13.428)',
|
|
180
|
+
'error-content': 'oklch(27% 0.105 12.094)',
|
|
181
|
+
},
|
|
182
|
+
custom: fx('1'),
|
|
183
|
+
},
|
|
184
|
+
dark: {
|
|
185
|
+
colorScheme: 'dark',
|
|
186
|
+
pair: 'light',
|
|
187
|
+
softMix: 0.16,
|
|
188
|
+
colors: {
|
|
189
|
+
'base-100': 'oklch(25.33% 0.016 252.42)',
|
|
190
|
+
'base-200': 'oklch(23.26% 0.014 253.1)',
|
|
191
|
+
'base-300': 'oklch(21.15% 0.012 254.09)',
|
|
192
|
+
'base-content': 'oklch(97.807% 0.029 256.847)',
|
|
193
|
+
primary: 'oklch(58% 0.233 277.117)',
|
|
194
|
+
'primary-content': 'oklch(96% 0.018 272.314)',
|
|
195
|
+
secondary: 'oklch(65% 0.241 354.308)',
|
|
196
|
+
'secondary-content': 'oklch(94% 0.028 342.258)',
|
|
197
|
+
accent: 'oklch(77% 0.152 181.912)',
|
|
198
|
+
'accent-content': 'oklch(38% 0.063 188.416)',
|
|
199
|
+
neutral: 'oklch(14% 0.005 285.823)',
|
|
200
|
+
'neutral-content': 'oklch(92% 0.004 286.32)',
|
|
201
|
+
info: 'oklch(74% 0.16 232.661)',
|
|
202
|
+
'info-content': 'oklch(29% 0.066 243.157)',
|
|
203
|
+
success: 'oklch(76% 0.177 163.223)',
|
|
204
|
+
'success-content': 'oklch(37% 0.077 168.94)',
|
|
205
|
+
warning: 'oklch(82% 0.189 84.429)',
|
|
206
|
+
'warning-content': 'oklch(41% 0.112 45.904)',
|
|
207
|
+
error: 'oklch(71% 0.194 13.428)',
|
|
208
|
+
'error-content': 'oklch(27% 0.105 12.094)',
|
|
209
|
+
},
|
|
210
|
+
custom: fx('1'),
|
|
211
|
+
},
|
|
212
|
+
// The N-theme proof (#132; docs/architecture.md, "The theme model"):
|
|
213
|
+
// three more of daisyUI's own
|
|
214
|
+
// themes. `defaultLight`/`defaultDark` stay light/dark, so the `:root`
|
|
215
|
+
// light-dark() emission is untouched and these live purely in their
|
|
216
|
+
// own [data-theme] blocks. A `dim` theme is a THEME whose scheme is
|
|
217
|
+
// dark — not a third scheme. Unpaired on purpose: `toggle()` falls
|
|
218
|
+
// back to the scheme default, which is what a one-off theme wants.
|
|
219
|
+
dim: {
|
|
220
|
+
colorScheme: 'dark',
|
|
221
|
+
softMix: 0.16,
|
|
222
|
+
colors: {
|
|
223
|
+
'base-100': 'oklch(30.857% 0.023 264.149)',
|
|
224
|
+
'base-200': 'oklch(28.036% 0.019 264.182)',
|
|
225
|
+
'base-300': 'oklch(26.346% 0.018 262.177)',
|
|
226
|
+
'base-content': 'oklch(82.901% 0.031 222.959)',
|
|
227
|
+
primary: 'oklch(86.133% 0.141 139.549)',
|
|
228
|
+
'primary-content': 'oklch(17.226% 0.028 139.549)',
|
|
229
|
+
secondary: 'oklch(73.375% 0.165 35.353)',
|
|
230
|
+
'secondary-content': 'oklch(14.675% 0.033 35.353)',
|
|
231
|
+
accent: 'oklch(74.229% 0.133 311.379)',
|
|
232
|
+
'accent-content': 'oklch(14.845% 0.026 311.379)',
|
|
233
|
+
neutral: 'oklch(24.731% 0.02 264.094)',
|
|
234
|
+
'neutral-content': 'oklch(82.901% 0.031 222.959)',
|
|
235
|
+
info: 'oklch(86.078% 0.142 206.182)',
|
|
236
|
+
'info-content': 'oklch(17.215% 0.028 206.182)',
|
|
237
|
+
success: 'oklch(86.171% 0.142 166.534)',
|
|
238
|
+
'success-content': 'oklch(17.234% 0.028 166.534)',
|
|
239
|
+
warning: 'oklch(86.163% 0.142 94.818)',
|
|
240
|
+
'warning-content': 'oklch(17.232% 0.028 94.818)',
|
|
241
|
+
error: 'oklch(82.418% 0.099 33.756)',
|
|
242
|
+
'error-content': 'oklch(16.483% 0.019 33.756)',
|
|
243
|
+
},
|
|
244
|
+
system: { radius: { selector: '1rem', field: '0.5rem', box: '1rem' } },
|
|
245
|
+
custom: fx('0'),
|
|
246
|
+
},
|
|
247
|
+
nord: {
|
|
248
|
+
colorScheme: 'light',
|
|
249
|
+
softMix: 0.12,
|
|
250
|
+
colors: {
|
|
251
|
+
'base-100': 'oklch(95.127% 0.007 260.731)',
|
|
252
|
+
'base-200': 'oklch(93.299% 0.01 261.788)',
|
|
253
|
+
'base-300': 'oklch(89.925% 0.016 262.749)',
|
|
254
|
+
'base-content': 'oklch(32.437% 0.022 264.182)',
|
|
255
|
+
primary: 'oklch(59.435% 0.077 254.027)',
|
|
256
|
+
'primary-content': 'oklch(11.887% 0.015 254.027)',
|
|
257
|
+
secondary: 'oklch(69.651% 0.059 248.687)',
|
|
258
|
+
'secondary-content': 'oklch(13.93% 0.011 248.687)',
|
|
259
|
+
accent: 'oklch(77.464% 0.062 217.469)',
|
|
260
|
+
'accent-content': 'oklch(15.492% 0.012 217.469)',
|
|
261
|
+
neutral: 'oklch(45.229% 0.035 264.131)',
|
|
262
|
+
'neutral-content': 'oklch(89.925% 0.016 262.749)',
|
|
263
|
+
info: 'oklch(69.207% 0.062 332.664)',
|
|
264
|
+
'info-content': 'oklch(13.841% 0.012 332.664)',
|
|
265
|
+
success: 'oklch(76.827% 0.074 131.063)',
|
|
266
|
+
'success-content': 'oklch(15.365% 0.014 131.063)',
|
|
267
|
+
warning: 'oklch(85.486% 0.089 84.093)',
|
|
268
|
+
'warning-content': 'oklch(17.097% 0.017 84.093)',
|
|
269
|
+
error: 'oklch(60.61% 0.12 15.341)',
|
|
270
|
+
'error-content': 'oklch(12.122% 0.024 15.341)',
|
|
271
|
+
},
|
|
272
|
+
// `field`/`box` already match the system default.
|
|
273
|
+
system: { radius: { selector: '1rem' } },
|
|
274
|
+
custom: fx('0'),
|
|
275
|
+
},
|
|
276
|
+
sunset: {
|
|
277
|
+
colorScheme: 'dark',
|
|
278
|
+
softMix: 0.16,
|
|
279
|
+
colors: {
|
|
280
|
+
'base-100': 'oklch(22% 0.019 237.69)',
|
|
281
|
+
'base-200': 'oklch(20% 0.019 237.69)',
|
|
282
|
+
'base-300': 'oklch(18% 0.019 237.69)',
|
|
283
|
+
'base-content': 'oklch(77.383% 0.043 245.096)',
|
|
284
|
+
primary: 'oklch(74.703% 0.158 39.947)',
|
|
285
|
+
'primary-content': 'oklch(14.94% 0.031 39.947)',
|
|
286
|
+
secondary: 'oklch(72.537% 0.177 2.72)',
|
|
287
|
+
'secondary-content': 'oklch(14.507% 0.035 2.72)',
|
|
288
|
+
accent: 'oklch(71.294% 0.166 299.844)',
|
|
289
|
+
'accent-content': 'oklch(14.258% 0.033 299.844)',
|
|
290
|
+
neutral: 'oklch(26% 0.019 237.69)',
|
|
291
|
+
'neutral-content': 'oklch(70% 0.019 237.69)',
|
|
292
|
+
info: 'oklch(85.559% 0.085 206.015)',
|
|
293
|
+
'info-content': 'oklch(17.111% 0.017 206.015)',
|
|
294
|
+
success: 'oklch(85.56% 0.085 144.778)',
|
|
295
|
+
'success-content': 'oklch(17.112% 0.017 144.778)',
|
|
296
|
+
warning: 'oklch(85.569% 0.084 74.427)',
|
|
297
|
+
'warning-content': 'oklch(17.113% 0.016 74.427)',
|
|
298
|
+
error: 'oklch(85.511% 0.078 16.886)',
|
|
299
|
+
'error-content': 'oklch(17.102% 0.015 16.886)',
|
|
300
|
+
},
|
|
301
|
+
system: { radius: { selector: '1rem', field: '0.5rem', box: '1rem' } },
|
|
302
|
+
custom: fx('0'),
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
};
|
|
306
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAOA,qFAAqF;AACrF,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE;IACnD,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE;CACJ,CAAC;AAE9C;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,MAAM,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE;IAC/D,IAAI,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IAC/C,uEAAuE;IACvE,2DAA2D;IAC3D,UAAU,EAAE;QACR,KAAK,EAAE;YACH,IAAI,EAAE,0DAA0D;YAChE,IAAI,EAAE,gDAAgD;SACzD;QACD,OAAO,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE;QAC/D,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE;QAC9C,QAAQ,EAAE,EAAE,MAAM,EAAE,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AM,EAAE,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;YACtE,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC;SAClB;KACJ;CACJ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sigx/zero-daisyui",
|
|
3
|
+
"version": "0.2.0-beta.1",
|
|
4
|
+
"description": "DaisyUI-flavored design system for SignalX Zero — daisy's token values and component look as a pure tokens+recipes skin over @sigx/zero primitives. No Tailwind, no daisyUI plugin required.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./register": {
|
|
14
|
+
"types": "./dist/register.d.ts",
|
|
15
|
+
"import": "./dist/register.js"
|
|
16
|
+
},
|
|
17
|
+
"./components": {
|
|
18
|
+
"types": "./dist/components.d.ts",
|
|
19
|
+
"import": "./dist/components.js"
|
|
20
|
+
},
|
|
21
|
+
"./css": "./dist/css/index.css",
|
|
22
|
+
"./lynx/index.css": "./dist/lynx/index.css",
|
|
23
|
+
"./lynx/tokens.css": "./dist/lynx/tokens.css",
|
|
24
|
+
"./lynx/manifest.json": "./dist/lynx/manifest.json",
|
|
25
|
+
"./css/tokens": "./dist/css/tokens.css",
|
|
26
|
+
"./css/*": "./dist/css/components/*.css",
|
|
27
|
+
"./manifest.json": "./dist/manifest.json",
|
|
28
|
+
"./report.json": "./dist/report.json"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"src"
|
|
33
|
+
],
|
|
34
|
+
"sideEffects": false,
|
|
35
|
+
"author": "Andreas Ekdahl",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/signalxjs/zero.git",
|
|
40
|
+
"directory": "packages/zero-daisyui"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://sigx.dev/zero/",
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/signalxjs/zero/issues"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@sigx/zero": "^0.2.0-beta.1"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"typescript": "^6.0.3",
|
|
51
|
+
"@sigx/zero": "^0.2.0-beta.1",
|
|
52
|
+
"@sigx/zero-kit": "^0.2.0-beta.1"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsgo -p tsconfig.json && node build.mjs",
|
|
59
|
+
"typecheck": "tsgo --noEmit"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { DesignSystemInput } from '@sigx/zero-kit';
|
|
2
|
+
import { defineApi } from '@sigx/zero-kit/define';
|
|
3
|
+
import { modifiers, roles, system, tableModifiers, tokens, variants } from './tokens.js';
|
|
4
|
+
import { recipes } from './recipes.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The daisy-native API (#332): the third api-declaring design system after
|
|
8
|
+
* zero-heroui (#179) and zero-carbon (#183), and the first to combine an api
|
|
9
|
+
* with the recommended orthogonal colour axis. daisy's own docs already say
|
|
10
|
+
* `color` and `variant` — its CSS composes `btn-outline` WITH `btn-primary`,
|
|
11
|
+
* which is why the old `@sigx/daisyui` fused ButtonVariant union was a
|
|
12
|
+
* modeling artifact rather than the real shape — so no axis is renamed and
|
|
13
|
+
* no value respelled: `variant: {}` is the explicit `exact` claim. What the
|
|
14
|
+
* api adds is the modifier surface: the old library's boolean props
|
|
15
|
+
* (`wide`, `block`, `square`, `circle`, `active`, `loading`) surface under
|
|
16
|
+
* their own names on the generated `./components` module, so
|
|
17
|
+
* `<Button wide loading variant="dash" color="primary">` is fully typed from
|
|
18
|
+
* one import. None of the six collides with `RESERVED_PROPS_BY_SCOPE` — the
|
|
19
|
+
* validator checks exactly that for every identity-named modifier.
|
|
20
|
+
*
|
|
21
|
+
* `defineApi` from `@sigx/zero-kit/define`, the node:-free authoring
|
|
22
|
+
* subpath (#318): this module is in the package's RUNTIME graph (the barrel
|
|
23
|
+
* re-exports `designSystem`), and the kit's BARREL is Node-only — but the
|
|
24
|
+
* define surface is importable from a browser graph by contract, pinned by
|
|
25
|
+
* zero-kit's `ds-runtime-imports.test.ts`. The two-argument form narrows
|
|
26
|
+
* modifier names and any `values` keys against the declared vocabulary.
|
|
27
|
+
*/
|
|
28
|
+
const api = defineApi(
|
|
29
|
+
{ variants, modifiers: [...modifiers, ...tableModifiers] },
|
|
30
|
+
{
|
|
31
|
+
variant: {},
|
|
32
|
+
modifiers: {
|
|
33
|
+
wide: {},
|
|
34
|
+
block: {},
|
|
35
|
+
square: {},
|
|
36
|
+
circle: {},
|
|
37
|
+
active: {},
|
|
38
|
+
loading: {},
|
|
39
|
+
zebra: {},
|
|
40
|
+
hover: {},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
export const designSystem: DesignSystemInput<typeof roles, typeof system> = {
|
|
46
|
+
name: 'daisyui',
|
|
47
|
+
tokens,
|
|
48
|
+
recipes,
|
|
49
|
+
api,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default designSystem;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @sigx/zero-daisyui runtime — theme metadata registration.
|
|
3
|
+
* The CSS is the design system (`@sigx/zero-daisyui/css`).
|
|
4
|
+
*/
|
|
5
|
+
import { registerThemes } from '@sigx/zero';
|
|
6
|
+
import { tokens } from './tokens.js';
|
|
7
|
+
|
|
8
|
+
export { tokens } from './tokens.js';
|
|
9
|
+
export { recipes } from './recipes.js';
|
|
10
|
+
export { designSystem } from './design-system.js';
|
|
11
|
+
|
|
12
|
+
export function installThemes(): void {
|
|
13
|
+
registerThemes(tokens);
|
|
14
|
+
}
|