@human-synthesis/norns-ui 0.0.2 → 0.0.5

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 (145) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +77 -129
  3. package/package.json +23 -15
  4. package/src/auto-import.js +96 -22
  5. package/src/components/Accordion.n +38 -0
  6. package/src/components/Audio.n +24 -0
  7. package/src/components/Autocomplete.n +59 -0
  8. package/src/components/Avatar.n +27 -0
  9. package/src/components/AvatarGroup.n +25 -0
  10. package/src/components/Badge.n +20 -0
  11. package/src/components/Banner.n +25 -0
  12. package/src/components/Breadcrumbs.n +22 -0
  13. package/src/components/Btn.n +29 -8
  14. package/src/components/ButtonGroup.n +14 -0
  15. package/src/components/Calendar.n +153 -0
  16. package/src/components/Card.n +34 -0
  17. package/src/components/Carousel.n +66 -0
  18. package/src/components/Chip.n +27 -0
  19. package/src/components/Collapsible.n +32 -0
  20. package/src/components/ColorPicker.n +62 -0
  21. package/src/components/ContextMenu.n +48 -0
  22. package/src/components/CopyButton.n +50 -0
  23. package/src/components/DataTable.n +61 -0
  24. package/src/components/DatePicker.n +68 -0
  25. package/src/components/DateRangePicker.n +59 -0
  26. package/src/components/Dialog.n +54 -0
  27. package/src/components/Drawer.n +49 -0
  28. package/src/components/Dropdown.n +41 -0
  29. package/src/components/Field.n +29 -20
  30. package/src/components/Form.n +22 -0
  31. package/src/components/GradientText.n +21 -0
  32. package/src/components/Header.n +23 -0
  33. package/src/components/HeroBanner.n +37 -0
  34. package/src/components/HierarchicalMenu.n +38 -0
  35. package/src/components/Icon.n +16 -0
  36. package/src/components/Image.n +31 -0
  37. package/src/components/MegaMenu.n +36 -0
  38. package/src/components/MultiSelect.n +56 -0
  39. package/src/components/NumberInput.n +49 -0
  40. package/src/components/OtpField.n +67 -0
  41. package/src/components/Pagination.n +73 -0
  42. package/src/components/Popover.n +32 -0
  43. package/src/components/PreviewCard.n +30 -0
  44. package/src/components/Progress.n +26 -0
  45. package/src/components/ProgressCircular.n +52 -0
  46. package/src/components/RichTooltip.n +33 -0
  47. package/src/components/RippleButton.n +56 -0
  48. package/src/components/ScrollArea.n +31 -0
  49. package/src/components/Separator.n +12 -0
  50. package/src/components/Sheet.n +55 -0
  51. package/src/components/ShinyButton.n +36 -0
  52. package/src/components/Skeleton.n +27 -0
  53. package/src/components/Stepper.n +35 -0
  54. package/src/components/Surface.n +10 -0
  55. package/src/components/Tabs.n +28 -0
  56. package/src/components/TagsInput.n +66 -0
  57. package/src/components/ThemeToggler.n +43 -0
  58. package/src/components/TimePicker.n +166 -0
  59. package/src/components/Timeline.n +27 -0
  60. package/src/components/ToastProvider.n +16 -0
  61. package/src/components/ToggleButton.n +29 -0
  62. package/src/components/ToggleButtonGroup.n +34 -0
  63. package/src/components/Toolbar.n +15 -0
  64. package/src/components/Tooltip.n +34 -0
  65. package/src/components/Tree.n +57 -0
  66. package/src/components/Uploader.n +88 -0
  67. package/src/components/Video.n +26 -0
  68. package/src/index.js +76 -0
  69. package/src/lib/toast.svelte.js +42 -0
  70. package/src/motion/AnimatedNumber.n +55 -0
  71. package/src/motion/GradientBackground.n +25 -0
  72. package/src/motion/LiquidButton.n +48 -0
  73. package/src/motion/Reveal.n +37 -0
  74. package/src/motion/Sparkles.n +53 -0
  75. package/src/motion/index.js +18 -0
  76. package/src/styles/atoms.css +1794 -71
  77. package/src/styles/tokens.css +171 -40
  78. package/src/types/Accordion.d.ts +17 -0
  79. package/src/types/AnimatedNumber.d.ts +15 -0
  80. package/src/types/Audio.d.ts +18 -0
  81. package/src/types/Autocomplete.d.ts +17 -0
  82. package/src/types/Avatar.d.ts +14 -0
  83. package/src/types/AvatarGroup.d.ts +15 -0
  84. package/src/types/Badge.d.ts +14 -0
  85. package/src/types/Banner.d.ts +15 -0
  86. package/src/types/Breadcrumbs.d.ts +15 -0
  87. package/src/types/Btn.d.ts +10 -0
  88. package/src/types/ButtonGroup.d.ts +10 -0
  89. package/src/types/Calendar.d.ts +20 -0
  90. package/src/types/Card.d.ts +19 -0
  91. package/src/types/Carousel.d.ts +23 -0
  92. package/src/types/Chip.d.ts +12 -0
  93. package/src/types/Collapsible.d.ts +12 -0
  94. package/src/types/ColorPicker.d.ts +15 -0
  95. package/src/types/ContextMenu.d.ts +19 -0
  96. package/src/types/CopyButton.d.ts +16 -0
  97. package/src/types/DataTable.d.ts +27 -0
  98. package/src/types/DatePicker.d.ts +18 -0
  99. package/src/types/DateRangePicker.d.ts +17 -0
  100. package/src/types/Dialog.d.ts +17 -0
  101. package/src/types/Drawer.d.ts +18 -0
  102. package/src/types/Dropdown.d.ts +23 -0
  103. package/src/types/Field.d.ts +14 -3
  104. package/src/types/Form.d.ts +17 -0
  105. package/src/types/GradientBackground.d.ts +14 -0
  106. package/src/types/GradientText.d.ts +19 -0
  107. package/src/types/Header.d.ts +12 -0
  108. package/src/types/HeroBanner.d.ts +17 -0
  109. package/src/types/HierarchicalMenu.d.ts +20 -0
  110. package/src/types/Icon.d.ts +21 -0
  111. package/src/types/Image.d.ts +15 -0
  112. package/src/types/LiquidButton.d.ts +15 -0
  113. package/src/types/MegaMenu.d.ts +29 -0
  114. package/src/types/MultiSelect.d.ts +13 -0
  115. package/src/types/NumberInput.d.ts +17 -0
  116. package/src/types/OtpField.d.ts +13 -0
  117. package/src/types/Pagination.d.ts +13 -0
  118. package/src/types/Popover.d.ts +18 -0
  119. package/src/types/PreviewCard.d.ts +16 -0
  120. package/src/types/Progress.d.ts +14 -0
  121. package/src/types/ProgressCircular.d.ts +14 -0
  122. package/src/types/Reveal.d.ts +20 -0
  123. package/src/types/RichTooltip.d.ts +16 -0
  124. package/src/types/RippleButton.d.ts +15 -0
  125. package/src/types/ScrollArea.d.ts +11 -0
  126. package/src/types/Separator.d.ts +9 -0
  127. package/src/types/Sheet.d.ts +20 -0
  128. package/src/types/ShinyButton.d.ts +15 -0
  129. package/src/types/Skeleton.d.ts +13 -0
  130. package/src/types/Sparkles.d.ts +13 -0
  131. package/src/types/Stepper.d.ts +19 -0
  132. package/src/types/Surface.d.ts +10 -0
  133. package/src/types/Tabs.d.ts +17 -0
  134. package/src/types/TagsInput.d.ts +17 -0
  135. package/src/types/ThemeToggler.d.ts +17 -0
  136. package/src/types/TimePicker.d.ts +20 -0
  137. package/src/types/Timeline.d.ts +17 -0
  138. package/src/types/ToastProvider.d.ts +15 -0
  139. package/src/types/ToggleButton.d.ts +15 -0
  140. package/src/types/ToggleButtonGroup.d.ts +20 -0
  141. package/src/types/Toolbar.d.ts +12 -0
  142. package/src/types/Tooltip.d.ts +15 -0
  143. package/src/types/Tree.d.ts +20 -0
  144. package/src/types/Uploader.d.ts +15 -0
  145. package/src/types/Video.d.ts +20 -0
@@ -1,42 +1,145 @@
1
1
  /*
2
2
  * Norns UI — design tokens.
3
3
  *
4
- * Tailwind v4 `@theme` block. Users override by re-declaring `@theme { ... }`
5
- * after `@import '@human-synthesis/norns-ui/styles'` in their own app.css —
6
- * Tailwind merges layered theme blocks. Same goes for dark mode via the
7
- * `[data-theme="dark"]` selector at the bottom.
4
+ * Tailwind v4 `@theme` block. Two layers:
5
+ *
6
+ * 1. Color *scales* (50–950) for primary + success + warning + danger + info.
7
+ * These generate utilities like `bg-success-500`, `text-danger-700`. Stay
8
+ * identical in light + dark — oklch is perceptually uniform.
9
+ *
10
+ * 2. *Role tokens* (`--color-fg`, `--color-bg`, `--color-border`, …). Atoms
11
+ * reference these so dark-mode swap is a single point of change. The
12
+ * `[data-theme='dark']` block at the bottom remaps every role token from
13
+ * a light-friendly scale step to a dark-friendly one — utilities like
14
+ * `bg-bg`, `text-fg`, `border-border` follow automatically.
15
+ *
16
+ * Typography: `--font-sans` / `--font-mono` set the default `font-sans` /
17
+ * `font-mono` utilities. Heading sizes come from Tailwind's defaults; the
18
+ * `@layer base` block in atoms.css applies them.
8
19
  */
9
20
 
10
21
  @theme {
11
- /* Brand color (violet) keeps Norns's existing violet-500 accent. */
12
- --color-primary-50: oklch(97.7% 0.014 308.299);
13
- --color-primary-100: oklch(94.6% 0.033 307.174);
14
- --color-primary-200: oklch(90.2% 0.063 306.703);
15
- --color-primary-300: oklch(81.1% 0.111 293.571);
16
- --color-primary-400: oklch(70.2% 0.183 293.541);
17
- --color-primary-500: oklch(60.6% 0.25 292.717);
18
- --color-primary-600: oklch(54.1% 0.281 293.009);
19
- --color-primary-700: oklch(49.1% 0.27 292.581);
20
- --color-primary-800: oklch(43.2% 0.232 292.759);
21
- --color-primary-900: oklch(38% 0.189 293.745);
22
- --color-primary-950: oklch(28.3% 0.141 291.089);
23
-
24
- /* Semantic surface colors derived from neutral + primary. Components
25
- * reference `--color-fg`, `--color-muted`, etc. so consumer themes can
26
- * remap surfaces without overriding every utility. */
27
- --color-fg: var(--color-neutral-900);
28
- --color-fg-muted: var(--color-neutral-600);
29
- --color-fg-subtle: var(--color-neutral-400);
22
+ /* === Brand: Primary (violet) === */
23
+ --color-primary-50: oklch(97.7% 0.014 308.3);
24
+ --color-primary-100: oklch(94.6% 0.033 307.2);
25
+ --color-primary-200: oklch(90.2% 0.063 306.7);
26
+ --color-primary-300: oklch(81.1% 0.111 293.6);
27
+ --color-primary-400: oklch(70.2% 0.183 293.5);
28
+ --color-primary-500: oklch(60.6% 0.25 292.7);
29
+ --color-primary-600: oklch(54.1% 0.281 293);
30
+ --color-primary-700: oklch(49.1% 0.27 292.6);
31
+ --color-primary-800: oklch(43.2% 0.232 292.8);
32
+ --color-primary-900: oklch(38% 0.189 293.7);
33
+ --color-primary-950: oklch(28.3% 0.141 291.1);
34
+
35
+ /* === Success (green) === */
36
+ --color-success-50: oklch(98.2% 0.018 155.8);
37
+ --color-success-100: oklch(96.2% 0.044 156.7);
38
+ --color-success-200: oklch(92.5% 0.084 155.9);
39
+ --color-success-300: oklch(87.1% 0.15 154.4);
40
+ --color-success-400: oklch(79.2% 0.209 151.7);
41
+ --color-success-500: oklch(72.3% 0.219 149.6);
42
+ --color-success-600: oklch(62.7% 0.194 149.2);
43
+ --color-success-700: oklch(52.7% 0.155 150.1);
44
+ --color-success-800: oklch(44.8% 0.119 151.3);
45
+ --color-success-900: oklch(39.3% 0.095 152.5);
46
+ --color-success-950: oklch(26.6% 0.065 152.9);
47
+
48
+ /* === Warning (amber) === */
49
+ --color-warning-50: oklch(98.7% 0.022 95.3);
50
+ --color-warning-100: oklch(96.2% 0.06 95.6);
51
+ --color-warning-200: oklch(92.4% 0.12 95.7);
52
+ --color-warning-300: oklch(87.9% 0.169 91.6);
53
+ --color-warning-400: oklch(82.8% 0.189 84.4);
54
+ --color-warning-500: oklch(76.9% 0.188 70.1);
55
+ --color-warning-600: oklch(66.6% 0.179 58.3);
56
+ --color-warning-700: oklch(55.5% 0.163 48.9);
57
+ --color-warning-800: oklch(47.3% 0.137 46.2);
58
+ --color-warning-900: oklch(41.4% 0.112 45.9);
59
+ --color-warning-950: oklch(27.9% 0.077 45.6);
60
+
61
+ /* === Danger (red) === */
62
+ --color-danger-50: oklch(97.1% 0.013 17.4);
63
+ --color-danger-100: oklch(93.6% 0.032 17.7);
64
+ --color-danger-200: oklch(88.5% 0.062 18.3);
65
+ --color-danger-300: oklch(80.8% 0.114 19.6);
66
+ --color-danger-400: oklch(70.4% 0.191 22.2);
67
+ --color-danger-500: oklch(63.7% 0.237 25.3);
68
+ --color-danger-600: oklch(57.7% 0.245 27.3);
69
+ --color-danger-700: oklch(50.5% 0.213 27.5);
70
+ --color-danger-800: oklch(44.4% 0.177 26.9);
71
+ --color-danger-900: oklch(39.6% 0.141 25.7);
72
+ --color-danger-950: oklch(25.8% 0.092 26);
73
+
74
+ /* === Info (sky blue) === */
75
+ --color-info-50: oklch(97.7% 0.013 236.6);
76
+ --color-info-100: oklch(95.1% 0.026 236.8);
77
+ --color-info-200: oklch(90.1% 0.058 230.9);
78
+ --color-info-300: oklch(82.8% 0.111 230.3);
79
+ --color-info-400: oklch(74.6% 0.16 232.7);
80
+ --color-info-500: oklch(68.5% 0.169 237.3);
81
+ --color-info-600: oklch(58.8% 0.158 241.5);
82
+ --color-info-700: oklch(50% 0.134 242.7);
83
+ --color-info-800: oklch(44.3% 0.11 240.8);
84
+ --color-info-900: oklch(39.1% 0.09 240.9);
85
+ --color-info-950: oklch(29.3% 0.066 243.2);
86
+
87
+ /* === Role tokens (light-mode defaults) ===
88
+ * Atoms reference these, never raw scales. Dark mode swaps the right-hand
89
+ * sides at the bottom of this file.
90
+ */
91
+
92
+ /* Foreground (text) */
93
+ --color-fg: oklch(20.4% 0 0); /* neutral-950ish */
94
+ --color-fg-muted: oklch(43.9% 0 0); /* neutral-600 */
95
+ --color-fg-subtle: oklch(56.6% 0 0); /* neutral-500 */
96
+ --color-fg-on-primary: white;
97
+
98
+ /* Background (surfaces) */
30
99
  --color-bg: white;
31
- --color-bg-muted: var(--color-neutral-100);
32
- --color-bg-subtle: var(--color-neutral-50);
33
- --color-border: var(--color-neutral-200);
34
- --color-border-strong: var(--color-neutral-300);
100
+ --color-bg-muted: oklch(96.7% 0 0); /* neutral-100 */
101
+ --color-bg-subtle: oklch(98.5% 0 0); /* neutral-50 */
102
+ --color-bg-elevated: white;
103
+ --color-bg-inverse: oklch(20.4% 0 0); /* used for tooltips, dark surfaces on light */
35
104
 
36
- /* Component sizing — kept minimal; most sizing is via Tailwind utilities. */
105
+ /* Borders */
106
+ --color-border: oklch(92.2% 0 0); /* neutral-200 */
107
+ --color-border-strong: oklch(86.9% 0 0); /* neutral-300 */
108
+
109
+ /* Focus ring — semi-transparent so it composes on any bg */
110
+ --color-ring: var(--color-primary-500);
111
+
112
+ /* Feedback role tokens — referenced by Banner / toast / Field error */
113
+ --color-success-bg: var(--color-success-50);
114
+ --color-success-fg: var(--color-success-900);
115
+ --color-success-border: var(--color-success-200);
116
+ --color-warning-bg: var(--color-warning-50);
117
+ --color-warning-fg: var(--color-warning-900);
118
+ --color-warning-border: var(--color-warning-200);
119
+ --color-danger-bg: var(--color-danger-50);
120
+ --color-danger-fg: var(--color-danger-900);
121
+ --color-danger-border: var(--color-danger-200);
122
+ --color-info-bg: var(--color-info-50);
123
+ --color-info-fg: var(--color-info-900);
124
+ --color-info-border: var(--color-info-200);
125
+
126
+ /* === Typography ===
127
+ * Default sans is Outfit — geometric humanist with a distinct framework feel.
128
+ * Consumers self-host via `import '@fontsource-variable/outfit'` (already a
129
+ * dependency of this package). Falls back to system if the variable file
130
+ * isn't loaded. Override `--font-sans` in your own @theme block to swap.
131
+ */
132
+ --font-sans:
133
+ 'Outfit Variable', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
134
+ 'Helvetica Neue', Arial, sans-serif;
135
+ --font-mono:
136
+ ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono',
137
+ 'Courier New', monospace;
138
+
139
+ /* === Component sizing === */
37
140
  --ui-radius-sm: 0.25rem;
38
- --ui-radius: 0.375rem;
39
- --ui-radius-lg: 0.5rem;
141
+ --ui-radius: 0.5rem;
142
+ --ui-radius-lg: 0.75rem;
40
143
  --ui-radius-full: 9999px;
41
144
 
42
145
  --ui-h-sm: 1.75rem; /* 28px */
@@ -44,15 +147,43 @@
44
147
  --ui-h-lg: 2.75rem; /* 44px */
45
148
  }
46
149
 
47
- /* Dark theme — user toggles via <html data-theme="dark">. Override surfaces;
48
- * primary scale stays the same (Tailwind primaries already work on dark). */
150
+ /* === Dark theme ===
151
+ * User toggles via <html data-theme="dark">. Only role tokens change; scales
152
+ * are perceptually uniform across both modes. Tuned for WCAG AA contrast at
153
+ * the body-text level.
154
+ */
49
155
  [data-theme='dark'] {
50
- --color-fg: var(--color-neutral-100);
51
- --color-fg-muted: var(--color-neutral-400);
52
- --color-fg-subtle: var(--color-neutral-500);
53
- --color-bg: var(--color-neutral-900);
54
- --color-bg-muted: var(--color-neutral-800);
55
- --color-bg-subtle: var(--color-neutral-850, oklch(25% 0 0));
56
- --color-border: var(--color-neutral-800);
57
- --color-border-strong: var(--color-neutral-700);
156
+ /* Foreground */
157
+ --color-fg: oklch(98.5% 0 0); /* near-white */
158
+ --color-fg-muted: oklch(70.8% 0 0); /* neutral-400 */
159
+ --color-fg-subtle: oklch(56.6% 0 0); /* neutral-500 */
160
+ --color-fg-on-primary: white;
161
+
162
+ /* Background */
163
+ --color-bg: oklch(14.5% 0 0); /* deep neutral, slightly above true black */
164
+ --color-bg-muted: oklch(20.4% 0 0); /* neutral-900ish */
165
+ --color-bg-subtle: oklch(17.5% 0 0); /* between bg and bg-muted */
166
+ --color-bg-elevated: oklch(23.5% 0 0); /* one step up — Cards/Dialogs */
167
+ --color-bg-inverse: oklch(98.5% 0 0);
168
+
169
+ /* Borders */
170
+ --color-border: oklch(27.5% 0 0); /* neutral-800 */
171
+ --color-border-strong: oklch(37.1% 0 0); /* neutral-700 */
172
+
173
+ /* Ring brightens slightly so it stays visible on dark surfaces */
174
+ --color-ring: var(--color-primary-400);
175
+
176
+ /* Feedback — flip to deep tinted bg + light fg */
177
+ --color-success-bg: oklch(28% 0.05 152);
178
+ --color-success-fg: var(--color-success-200);
179
+ --color-success-border: oklch(38% 0.08 151);
180
+ --color-warning-bg: oklch(28% 0.05 65);
181
+ --color-warning-fg: var(--color-warning-200);
182
+ --color-warning-border: oklch(38% 0.08 60);
183
+ --color-danger-bg: oklch(28% 0.07 27);
184
+ --color-danger-fg: var(--color-danger-200);
185
+ --color-danger-border: oklch(38% 0.11 27);
186
+ --color-info-bg: oklch(28% 0.05 240);
187
+ --color-info-fg: var(--color-info-200);
188
+ --color-info-border: oklch(38% 0.08 240);
58
189
  }
@@ -0,0 +1,17 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+
3
+ export type AccordionItem = {
4
+ value: string;
5
+ title: string;
6
+ content?: Snippet;
7
+ };
8
+
9
+ export type AccordionProps = {
10
+ items?: AccordionItem[];
11
+ multiple?: boolean;
12
+ value?: string | string[];
13
+ class?: string;
14
+ };
15
+
16
+ declare const Accordion: Component<AccordionProps>;
17
+ export default Accordion;
@@ -0,0 +1,15 @@
1
+ import type { Component } from 'svelte';
2
+
3
+ export type AnimatedNumberProps = {
4
+ value: number;
5
+ from?: number;
6
+ /** Duration in seconds. */
7
+ duration?: number;
8
+ decimals?: number;
9
+ /** Custom number-to-string formatter. */
10
+ format?: (n: number) => string;
11
+ class?: string;
12
+ };
13
+
14
+ declare const AnimatedNumber: Component<AnimatedNumberProps>;
15
+ export default AnimatedNumber;
@@ -0,0 +1,18 @@
1
+ import type { Component } from 'svelte';
2
+
3
+ export type AudioSource = { src: string; type?: string };
4
+
5
+ export type AudioProps = {
6
+ src?: string;
7
+ sources?: AudioSource[];
8
+ controls?: boolean;
9
+ autoplay?: boolean;
10
+ loop?: boolean;
11
+ muted?: boolean;
12
+ preload?: 'none' | 'metadata' | 'auto';
13
+ fallback?: string;
14
+ class?: string;
15
+ };
16
+
17
+ declare const Audio: Component<AudioProps>;
18
+ export default Audio;
@@ -0,0 +1,17 @@
1
+ import type { Component } from 'svelte';
2
+
3
+ export type ComboboxItem = { value: string; label: string };
4
+
5
+ export type AutocompleteProps = {
6
+ items?: ComboboxItem[];
7
+ value?: string;
8
+ open?: boolean;
9
+ placeholder?: string;
10
+ disabled?: boolean;
11
+ name?: string;
12
+ id?: string;
13
+ error?: boolean;
14
+ };
15
+
16
+ declare const Autocomplete: Component<AutocompleteProps>;
17
+ export default Autocomplete;
@@ -0,0 +1,14 @@
1
+ import type { Component } from 'svelte';
2
+
3
+ export type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
4
+
5
+ export type AvatarProps = {
6
+ src?: string;
7
+ /** Display name; first + last initial used as fallback when `src` is missing. */
8
+ name?: string;
9
+ size?: AvatarSize;
10
+ class?: string;
11
+ };
12
+
13
+ declare const Avatar: Component<AvatarProps>;
14
+ export default Avatar;
@@ -0,0 +1,15 @@
1
+ import type { Component } from 'svelte';
2
+ import type { AvatarSize } from './Avatar';
3
+
4
+ export type AvatarGroupItem = { src?: string; name?: string };
5
+
6
+ export type AvatarGroupProps = {
7
+ items?: AvatarGroupItem[];
8
+ max?: number;
9
+ size?: AvatarSize;
10
+ label?: string;
11
+ class?: string;
12
+ };
13
+
14
+ declare const AvatarGroup: Component<AvatarGroupProps>;
15
+ export default AvatarGroup;
@@ -0,0 +1,14 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+
3
+ export type BadgeVariant = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info';
4
+ export type BadgeSize = 'sm' | 'md';
5
+
6
+ export type BadgeProps = {
7
+ variant?: BadgeVariant;
8
+ size?: BadgeSize;
9
+ children?: Snippet;
10
+ class?: string;
11
+ };
12
+
13
+ declare const Badge: Component<BadgeProps>;
14
+ export default Badge;
@@ -0,0 +1,15 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+
3
+ export type BannerVariant = 'info' | 'success' | 'warning' | 'danger';
4
+
5
+ export type BannerProps = {
6
+ variant?: BannerVariant;
7
+ /** Iconify icon name (e.g. `"lucide:alert-triangle"`). */
8
+ icon?: string;
9
+ actions?: Snippet;
10
+ children?: Snippet;
11
+ class?: string;
12
+ };
13
+
14
+ declare const Banner: Component<BannerProps>;
15
+ export default Banner;
@@ -0,0 +1,15 @@
1
+ import type { Component } from 'svelte';
2
+
3
+ export type BreadcrumbItem = {
4
+ label: string;
5
+ href?: string;
6
+ };
7
+
8
+ export type BreadcrumbsProps = {
9
+ items?: BreadcrumbItem[];
10
+ separator?: string;
11
+ class?: string;
12
+ };
13
+
14
+ declare const Breadcrumbs: Component<BreadcrumbsProps>;
15
+ export default Breadcrumbs;
@@ -15,6 +15,16 @@ export type BtnProps = Omit<HTMLButtonAttributes, 'class' | 'children'> & {
15
15
  loading?: boolean;
16
16
  disabled?: boolean;
17
17
  type?: 'button' | 'submit' | 'reset';
18
+ /**
19
+ * Convenience: Iconify icon name (e.g. `"lucide:save"`). Renders an
20
+ * `<Icon>` in the leading slot. If you also pass a `leading` snippet,
21
+ * the snippet wins.
22
+ */
23
+ icon?: string;
24
+ /** When set, renders as an `<a>` styled like the button. */
25
+ href?: string;
26
+ target?: string;
27
+ rel?: string;
18
28
  class?: string;
19
29
  children?: Snippet;
20
30
  leading?: Snippet;
@@ -0,0 +1,10 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+
3
+ export type ButtonGroupProps = {
4
+ orientation?: 'horizontal' | 'vertical';
5
+ children?: Snippet;
6
+ class?: string;
7
+ };
8
+
9
+ declare const ButtonGroup: Component<ButtonGroupProps>;
10
+ export default ButtonGroup;
@@ -0,0 +1,20 @@
1
+ import type { Component } from 'svelte';
2
+
3
+ export type CalendarDateRange = { start: string; end: string };
4
+
5
+ export type CalendarProps = {
6
+ /** ISO YYYY-MM-DD. Bindable. */
7
+ value?: string;
8
+ /** Range mode. Bindable. Use instead of `value` when `range` is true. */
9
+ rangeValue?: CalendarDateRange;
10
+ range?: boolean;
11
+ /** ISO YYYY-MM-DD inclusive. */
12
+ min?: string;
13
+ max?: string;
14
+ label?: string;
15
+ onchange?: (next: string | CalendarDateRange) => void;
16
+ class?: string;
17
+ };
18
+
19
+ declare const Calendar: Component<CalendarProps>;
20
+ export default Calendar;
@@ -0,0 +1,19 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+
3
+ export type CardProps = {
4
+ /** Wrap body in `.card-body` (default true). Set false for full-bleed content. */
5
+ padded?: boolean;
6
+ /** Apply `.card-interactive` hover/focus treatment. Implicit if `href` is set. */
7
+ interactive?: boolean;
8
+ /** Renders as `<a>` instead of `<div>` when set. */
9
+ href?: string;
10
+ target?: string;
11
+ rel?: string;
12
+ header?: Snippet;
13
+ footer?: Snippet;
14
+ children?: Snippet;
15
+ class?: string;
16
+ };
17
+
18
+ declare const Card: Component<CardProps>;
19
+ export default Card;
@@ -0,0 +1,23 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+
3
+ export type CarouselSlide = {
4
+ src?: string;
5
+ alt?: string;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export type CarouselProps = {
10
+ slides?: CarouselSlide[];
11
+ index?: number;
12
+ autoplay?: boolean;
13
+ /** Autoplay interval in milliseconds. Default 5000. */
14
+ interval?: number;
15
+ /** Default aspect ratio applied if no explicit `class="aspect-..."` is passed. */
16
+ aspect?: 'video' | 'square' | 'wide' | 'none';
17
+ /** Custom slide renderer; receives `(slide, i)` and runs only for slides without `src`. */
18
+ children?: Snippet<[CarouselSlide, number]>;
19
+ class?: string;
20
+ };
21
+
22
+ declare const Carousel: Component<CarouselProps>;
23
+ export default Carousel;
@@ -0,0 +1,12 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+
3
+ export type ChipProps = {
4
+ icon?: string;
5
+ removable?: boolean;
6
+ onremove?: (event: MouseEvent) => void;
7
+ children?: Snippet;
8
+ class?: string;
9
+ };
10
+
11
+ declare const Chip: Component<ChipProps>;
12
+ export default Chip;
@@ -0,0 +1,12 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+
3
+ export type CollapsibleProps = {
4
+ open?: boolean;
5
+ title?: string;
6
+ trigger?: Snippet;
7
+ children?: Snippet;
8
+ class?: string;
9
+ };
10
+
11
+ declare const Collapsible: Component<CollapsibleProps>;
12
+ export default Collapsible;
@@ -0,0 +1,15 @@
1
+ import type { Component } from 'svelte';
2
+
3
+ export type ColorPickerProps = {
4
+ /** Hex value with leading `#`. Bindable. */
5
+ value?: string;
6
+ disabled?: boolean;
7
+ /** Hide the clipboard-copy button. */
8
+ hideCopy?: boolean;
9
+ name?: string;
10
+ id?: string;
11
+ class?: string;
12
+ };
13
+
14
+ declare const ColorPicker: Component<ColorPickerProps>;
15
+ export default ColorPicker;
@@ -0,0 +1,19 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+
3
+ export type ContextMenuItem = {
4
+ label?: string;
5
+ icon?: string;
6
+ separator?: boolean;
7
+ disabled?: boolean;
8
+ onSelect?: (event: Event) => void;
9
+ children?: ContextMenuItem[];
10
+ };
11
+
12
+ export type ContextMenuProps = {
13
+ items?: ContextMenuItem[];
14
+ trigger?: Snippet;
15
+ triggerClass?: string;
16
+ };
17
+
18
+ declare const ContextMenu: Component<ContextMenuProps>;
19
+ export default ContextMenu;
@@ -0,0 +1,16 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+
3
+ export type CopyButtonProps = {
4
+ value?: string | number;
5
+ variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'link';
6
+ size?: 'sm' | 'md' | 'lg';
7
+ icon?: string;
8
+ disabled?: boolean;
9
+ label?: string;
10
+ oncopy?: (value: string | number) => void;
11
+ children?: Snippet;
12
+ class?: string;
13
+ };
14
+
15
+ declare const CopyButton: Component<CopyButtonProps>;
16
+ export default CopyButton;
@@ -0,0 +1,27 @@
1
+ import type { Component } from 'svelte';
2
+
3
+ export type DataTableColumn = {
4
+ key: string;
5
+ label?: string;
6
+ width?: string;
7
+ class?: string;
8
+ cellClass?: string;
9
+ sortable?: boolean;
10
+ };
11
+
12
+ export type DataTableProps = {
13
+ columns?: DataTableColumn[];
14
+ rows?: Record<string, unknown>[];
15
+ striped?: boolean;
16
+ dense?: boolean;
17
+ stickyHeader?: boolean;
18
+ emptyMessage?: string;
19
+ /** Currently-sorted column key. Bindable. */
20
+ sortKey?: string;
21
+ sortDir?: 'asc' | 'desc';
22
+ onrowclick?: (row: Record<string, unknown>, index: number) => void;
23
+ class?: string;
24
+ };
25
+
26
+ declare const DataTable: Component<DataTableProps>;
27
+ export default DataTable;
@@ -0,0 +1,18 @@
1
+ import type { Component } from 'svelte';
2
+
3
+ export type DatePickerProps = {
4
+ /** ISO date string (YYYY-MM-DD). Bindable. */
5
+ value?: string;
6
+ min?: string;
7
+ max?: string;
8
+ disabled?: boolean;
9
+ readonly?: boolean;
10
+ required?: boolean;
11
+ name?: string;
12
+ id?: string;
13
+ error?: boolean;
14
+ class?: string;
15
+ };
16
+
17
+ declare const DatePicker: Component<DatePickerProps>;
18
+ export default DatePicker;
@@ -0,0 +1,17 @@
1
+ import type { Component } from 'svelte';
2
+
3
+ export type DateRange = { start: string; end: string };
4
+
5
+ export type DateRangePickerProps = {
6
+ value?: DateRange;
7
+ min?: string;
8
+ max?: string;
9
+ disabled?: boolean;
10
+ required?: boolean;
11
+ /** Form name. The two inputs serialize as `${name}_start` and `${name}_end`. */
12
+ name?: string;
13
+ class?: string;
14
+ };
15
+
16
+ declare const DateRangePicker: Component<DateRangePickerProps>;
17
+ export default DateRangePicker;
@@ -0,0 +1,17 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+
3
+ export type DialogProps = {
4
+ open?: boolean;
5
+ title?: string;
6
+ description?: string;
7
+ hideClose?: boolean;
8
+ trigger?: Snippet;
9
+ actions?: Snippet;
10
+ children?: Snippet;
11
+ triggerClass?: string;
12
+ overlayClass?: string;
13
+ class?: string;
14
+ };
15
+
16
+ declare const Dialog: Component<DialogProps>;
17
+ export default Dialog;
@@ -0,0 +1,18 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+
3
+ export type DrawerSide = 'left' | 'right';
4
+
5
+ export type DrawerProps = {
6
+ open?: boolean;
7
+ side?: DrawerSide;
8
+ title?: string;
9
+ description?: string;
10
+ hideClose?: boolean;
11
+ trigger?: Snippet;
12
+ children?: Snippet;
13
+ triggerClass?: string;
14
+ class?: string;
15
+ };
16
+
17
+ declare const Drawer: Component<DrawerProps>;
18
+ export default Drawer;