@thomasfosterau/components 0.1.0 → 0.2.0

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 (240) hide show
  1. package/README.md +241 -56
  2. package/dist/canvas/VectorCanvas.svelte +89 -8
  3. package/dist/canvas/VectorCanvas.svelte.d.ts +19 -1
  4. package/dist/canvas/types.d.ts +1 -1
  5. package/dist/charts/types.d.ts +1 -1
  6. package/dist/citations/list-format.js +3 -1
  7. package/dist/data/ChatBubble.svelte +48 -0
  8. package/dist/data/ChatBubble.svelte.d.ts +33 -0
  9. package/dist/data/DescriptionList.svelte +9 -3
  10. package/dist/data/DescriptionList.svelte.d.ts +1 -1
  11. package/dist/data/DescriptionRow.svelte +6 -5
  12. package/dist/data/MessageThread.svelte +29 -0
  13. package/dist/data/MessageThread.svelte.d.ts +17 -0
  14. package/dist/data/Pagination.svelte +5 -5
  15. package/dist/data/Pagination.svelte.d.ts +8 -0
  16. package/dist/data/PaginationFooter.svelte +2 -1
  17. package/dist/data/PaginationFooter.svelte.d.ts +2 -0
  18. package/dist/data/Table.svelte +9 -3
  19. package/dist/data/description-context.d.ts +12 -6
  20. package/dist/data/description-context.js +6 -5
  21. package/dist/data/index.d.ts +2 -0
  22. package/dist/data/index.js +2 -0
  23. package/dist/data/table-types.d.ts +7 -0
  24. package/dist/feedback/Dialog.svelte +19 -49
  25. package/dist/feedback/Dialog.svelte.d.ts +0 -1
  26. package/dist/feedback/DialogFrame.svelte +64 -0
  27. package/dist/feedback/DialogFrame.svelte.d.ts +23 -0
  28. package/dist/feedback/Drawer.svelte +43 -0
  29. package/dist/feedback/Drawer.svelte.d.ts +43 -0
  30. package/dist/feedback/SegmentBar.svelte.d.ts +1 -0
  31. package/dist/feedback/StatTile.svelte.d.ts +1 -0
  32. package/dist/feedback/Steps.svelte +72 -0
  33. package/dist/feedback/Steps.svelte.d.ts +61 -0
  34. package/dist/feedback/Timeline.svelte.d.ts +3 -0
  35. package/dist/feedback/index.d.ts +3 -0
  36. package/dist/feedback/index.js +2 -0
  37. package/dist/feedback/sizes.d.ts +14 -0
  38. package/dist/feedback/sizes.js +28 -0
  39. package/dist/fields/Calendar.svelte +60 -0
  40. package/dist/fields/Calendar.svelte.d.ts +11 -0
  41. package/dist/fields/CalendarMonths.svelte +86 -0
  42. package/dist/fields/CalendarMonths.svelte.d.ts +30 -0
  43. package/dist/fields/Checkbox.svelte +1 -1
  44. package/dist/fields/Checkbox.svelte.d.ts +6 -0
  45. package/dist/fields/Combobox.svelte +61 -54
  46. package/dist/fields/Combobox.svelte.d.ts +38 -3
  47. package/dist/fields/DateField.svelte +37 -0
  48. package/dist/fields/DateField.svelte.d.ts +20 -0
  49. package/dist/fields/DateInput.svelte +1 -1
  50. package/dist/fields/DateInput.svelte.d.ts +6 -0
  51. package/dist/fields/DatePicker.svelte +47 -0
  52. package/dist/fields/DatePicker.svelte.d.ts +25 -0
  53. package/dist/fields/DateRangePicker.svelte +70 -0
  54. package/dist/fields/DateRangePicker.svelte.d.ts +43 -0
  55. package/dist/fields/Dropzone.svelte +232 -0
  56. package/dist/fields/Dropzone.svelte.d.ts +103 -0
  57. package/dist/fields/Fieldset.svelte +7 -2
  58. package/dist/fields/Fieldset.svelte.d.ts +3 -2
  59. package/dist/fields/FileInput.svelte +3 -2
  60. package/dist/fields/FileInput.svelte.d.ts +6 -0
  61. package/dist/fields/FormField.svelte +27 -3
  62. package/dist/fields/ImageInput.svelte.d.ts +6 -0
  63. package/dist/fields/MultiSelect.svelte +112 -0
  64. package/dist/fields/MultiSelect.svelte.d.ts +75 -0
  65. package/dist/fields/NumberField.svelte +190 -0
  66. package/dist/fields/NumberField.svelte.d.ts +76 -0
  67. package/dist/fields/PasswordInput.svelte +95 -0
  68. package/dist/fields/PasswordInput.svelte.d.ts +58 -0
  69. package/dist/fields/PickerPopover.svelte +47 -0
  70. package/dist/fields/PickerPopover.svelte.d.ts +16 -0
  71. package/dist/fields/PinInput.svelte +83 -0
  72. package/dist/fields/PinInput.svelte.d.ts +66 -0
  73. package/dist/fields/RadioGroup.svelte +3 -0
  74. package/dist/fields/RangeCalendar.svelte +51 -0
  75. package/dist/fields/RangeCalendar.svelte.d.ts +23 -0
  76. package/dist/fields/Rating.svelte +127 -0
  77. package/dist/fields/Rating.svelte.d.ts +86 -0
  78. package/dist/fields/SearchInput.svelte +2 -1
  79. package/dist/fields/SegmentGroup.svelte +91 -0
  80. package/dist/fields/SegmentGroup.svelte.d.ts +20 -0
  81. package/dist/fields/Select.svelte +1 -1
  82. package/dist/fields/Select.svelte.d.ts +6 -0
  83. package/dist/fields/Slider.svelte +194 -0
  84. package/dist/fields/Slider.svelte.d.ts +100 -0
  85. package/dist/fields/TagsInput.svelte +256 -0
  86. package/dist/fields/TagsInput.svelte.d.ts +102 -0
  87. package/dist/fields/TextInput.svelte +1 -1
  88. package/dist/fields/TextInput.svelte.d.ts +6 -0
  89. package/dist/fields/Textarea.svelte +1 -1
  90. package/dist/fields/Textarea.svelte.d.ts +6 -0
  91. package/dist/fields/TimeField.svelte +30 -0
  92. package/dist/fields/TimeField.svelte.d.ts +19 -0
  93. package/dist/fields/Toggle.svelte +1 -1
  94. package/dist/fields/Toggle.svelte.d.ts +6 -0
  95. package/dist/fields/VideoInput.svelte.d.ts +6 -0
  96. package/dist/fields/calendar-props.d.ts +119 -0
  97. package/dist/fields/calendar-props.js +51 -0
  98. package/dist/fields/dates.d.ts +28 -0
  99. package/dist/fields/dates.js +26 -0
  100. package/dist/fields/field-types.d.ts +29 -0
  101. package/dist/fields/field-types.js +32 -0
  102. package/dist/fields/file-validation.d.ts +30 -0
  103. package/dist/fields/file-validation.js +51 -0
  104. package/dist/fields/index.d.ts +9 -0
  105. package/dist/fields/index.js +8 -0
  106. package/dist/fields/latest-search.svelte.d.ts +38 -0
  107. package/dist/fields/latest-search.svelte.js +85 -0
  108. package/dist/fields/number-format.d.ts +52 -0
  109. package/dist/fields/number-format.js +89 -0
  110. package/dist/fields/segmented-field.d.ts +128 -0
  111. package/dist/fields/segmented-field.js +52 -0
  112. package/dist/fields/slider-keys.d.ts +21 -0
  113. package/dist/fields/slider-keys.js +37 -0
  114. package/dist/formatting/Countdown.svelte +110 -0
  115. package/dist/formatting/Countdown.svelte.d.ts +35 -0
  116. package/dist/formatting/Duration.svelte +18 -0
  117. package/dist/formatting/Duration.svelte.d.ts +20 -0
  118. package/dist/formatting/Highlight.svelte +4 -0
  119. package/dist/formatting/Highlight.svelte.d.ts +4 -0
  120. package/dist/formatting/duration.d.ts +44 -0
  121. package/dist/formatting/duration.js +125 -0
  122. package/dist/formatting/index.d.ts +3 -0
  123. package/dist/formatting/index.js +3 -0
  124. package/dist/forms/EntityForm.svelte +53 -45
  125. package/dist/forms/EntityForm.svelte.d.ts +12 -3
  126. package/dist/hotkeys/index.d.ts +5 -0
  127. package/dist/hotkeys/index.js +5 -0
  128. package/dist/hotkeys/match.js +12 -10
  129. package/dist/hotkeys/types.d.ts +4 -2
  130. package/dist/index.d.ts +2 -1
  131. package/dist/index.js +2 -1
  132. package/dist/infobox/Infobox.svelte +2 -2
  133. package/dist/infobox/Infobox.svelte.d.ts +7 -0
  134. package/dist/infobox/InfoboxHeader.svelte +15 -7
  135. package/dist/infobox/InfoboxHeader.svelte.d.ts +7 -0
  136. package/dist/infobox/types.d.ts +5 -5
  137. package/dist/layout/AppShell.svelte +50 -0
  138. package/dist/layout/AppShell.svelte.d.ts +28 -0
  139. package/dist/layout/Cluster.svelte +28 -0
  140. package/dist/layout/Cluster.svelte.d.ts +27 -0
  141. package/dist/layout/Fits.svelte +27 -0
  142. package/dist/layout/Fits.svelte.d.ts +13 -0
  143. package/dist/layout/Flow.svelte +46 -0
  144. package/dist/layout/Flow.svelte.d.ts +16 -0
  145. package/dist/layout/Grid.svelte +23 -0
  146. package/dist/layout/Grid.svelte.d.ts +26 -0
  147. package/dist/layout/HStack.svelte +12 -0
  148. package/dist/layout/HStack.svelte.d.ts +34 -0
  149. package/dist/layout/Hero.svelte +76 -0
  150. package/dist/layout/Hero.svelte.d.ts +36 -0
  151. package/dist/layout/Navbar.svelte +2 -2
  152. package/dist/layout/Sidebar.svelte +1 -1
  153. package/dist/layout/Spacer.svelte +12 -0
  154. package/dist/layout/Spacer.svelte.d.ts +6 -0
  155. package/dist/layout/VStack.svelte +12 -0
  156. package/dist/layout/VStack.svelte.d.ts +29 -0
  157. package/dist/layout/index.d.ts +9 -0
  158. package/dist/layout/index.js +9 -0
  159. package/dist/layout/space.d.ts +44 -0
  160. package/dist/layout/space.js +76 -0
  161. package/dist/search/types.d.ts +3 -0
  162. package/dist/seo/og-image.d.ts +4 -3
  163. package/dist/seo/og-image.js +4 -3
  164. package/dist/tips/tip-stack.d.ts +1 -0
  165. package/dist/tips/tip-store.svelte.d.ts +2 -1
  166. package/dist/ui/Accordion.svelte +75 -0
  167. package/dist/ui/Accordion.svelte.d.ts +50 -0
  168. package/dist/ui/AccordionItem.svelte +73 -0
  169. package/dist/ui/AccordionItem.svelte.d.ts +18 -0
  170. package/dist/ui/Button.svelte +3 -2
  171. package/dist/ui/ButtonGroup.svelte +24 -0
  172. package/dist/ui/ButtonGroup.svelte.d.ts +17 -0
  173. package/dist/ui/ContextMenu.svelte +75 -0
  174. package/dist/ui/ContextMenu.svelte.d.ts +25 -0
  175. package/dist/ui/Disclosure.svelte +7 -0
  176. package/dist/ui/Disclosure.svelte.d.ts +2 -2
  177. package/dist/ui/Divider.svelte +47 -0
  178. package/dist/ui/Divider.svelte.d.ts +28 -0
  179. package/dist/ui/DropdownMenu.svelte +44 -0
  180. package/dist/ui/DropdownMenu.svelte.d.ts +30 -0
  181. package/dist/ui/Menu.svelte +17 -47
  182. package/dist/ui/Menu.svelte.d.ts +3 -24
  183. package/dist/ui/MenuCheckboxItem.svelte +33 -0
  184. package/dist/ui/MenuCheckboxItem.svelte.d.ts +20 -0
  185. package/dist/ui/MenuItem.svelte +29 -31
  186. package/dist/ui/MenuItem.svelte.d.ts +2 -2
  187. package/dist/ui/MenuRadioGroup.svelte +25 -0
  188. package/dist/ui/MenuRadioGroup.svelte.d.ts +20 -0
  189. package/dist/ui/MenuRadioItem.svelte +20 -0
  190. package/dist/ui/MenuRadioItem.svelte.d.ts +15 -0
  191. package/dist/ui/MenuSeparator.svelte +12 -11
  192. package/dist/ui/MenuSub.svelte +24 -0
  193. package/dist/ui/MenuSub.svelte.d.ts +15 -0
  194. package/dist/ui/Spinner.svelte +41 -0
  195. package/dist/ui/Spinner.svelte.d.ts +35 -0
  196. package/dist/ui/Stack.svelte +36 -0
  197. package/dist/ui/Stack.svelte.d.ts +48 -0
  198. package/dist/ui/ToggleButton.svelte +58 -0
  199. package/dist/ui/ToggleButton.svelte.d.ts +45 -0
  200. package/dist/ui/ToggleGroup.svelte +142 -0
  201. package/dist/ui/ToggleGroup.svelte.d.ts +86 -0
  202. package/dist/ui/Toolbar.svelte +40 -0
  203. package/dist/ui/Toolbar.svelte.d.ts +20 -0
  204. package/dist/ui/ToolbarButton.svelte +29 -0
  205. package/dist/ui/ToolbarButton.svelte.d.ts +21 -0
  206. package/dist/ui/ToolbarLink.svelte +21 -0
  207. package/dist/ui/ToolbarLink.svelte.d.ts +12 -0
  208. package/dist/ui/ToolbarSeparator.svelte +22 -0
  209. package/dist/ui/ToolbarSeparator.svelte.d.ts +12 -0
  210. package/dist/ui/ToolbarToggleGroup.svelte +66 -0
  211. package/dist/ui/ToolbarToggleGroup.svelte.d.ts +52 -0
  212. package/dist/ui/accordion-context.d.ts +26 -0
  213. package/dist/ui/accordion-context.js +23 -0
  214. package/dist/ui/context-menu.d.ts +13 -0
  215. package/dist/ui/context-menu.js +13 -0
  216. package/dist/ui/index.d.ts +19 -0
  217. package/dist/ui/index.js +18 -0
  218. package/dist/ui/menu-context.d.ts +13 -15
  219. package/dist/ui/menu-context.js +14 -18
  220. package/dist/ui/menu-parts/CheckboxItemPart.svelte +26 -0
  221. package/dist/ui/menu-parts/CheckboxItemPart.svelte.d.ts +5 -0
  222. package/dist/ui/menu-parts/ItemPart.svelte +29 -0
  223. package/dist/ui/menu-parts/ItemPart.svelte.d.ts +5 -0
  224. package/dist/ui/menu-parts/RadioGroupPart.svelte +24 -0
  225. package/dist/ui/menu-parts/RadioGroupPart.svelte.d.ts +5 -0
  226. package/dist/ui/menu-parts/RadioItemPart.svelte +22 -0
  227. package/dist/ui/menu-parts/RadioItemPart.svelte.d.ts +5 -0
  228. package/dist/ui/menu-parts/SeparatorPart.svelte +16 -0
  229. package/dist/ui/menu-parts/SeparatorPart.svelte.d.ts +5 -0
  230. package/dist/ui/menu-parts/SubPart.svelte +28 -0
  231. package/dist/ui/menu-parts/SubPart.svelte.d.ts +5 -0
  232. package/dist/ui/menu-parts/menu-parts.d.ts +104 -0
  233. package/dist/ui/menu-parts/menu-parts.js +31 -0
  234. package/dist/ui/menu-parts/parts.d.ts +12 -0
  235. package/dist/ui/menu-parts/parts.js +27 -0
  236. package/dist/ui/toggle-classes.d.ts +39 -0
  237. package/dist/ui/toggle-classes.js +36 -0
  238. package/dist/ui/tones.d.ts +35 -0
  239. package/dist/ui/tones.js +90 -0
  240. package/package.json +34 -18
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The one set of bits-ui menu parts, for `DropdownMenu` and `ContextMenu` to
3
+ * lend their children. Importing this module is what reaches bits-ui's menu
4
+ * runtime, so only those two components import it.
5
+ *
6
+ * Internal: not re-exported from the `ui` barrel.
7
+ *
8
+ * @module
9
+ */
10
+ import type { MenuParts } from './menu-parts.ts';
11
+ /** The parts for a menu of the given kind. */
12
+ export declare function menuParts(kind: MenuParts['kind']): MenuParts;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The one set of bits-ui menu parts, for `DropdownMenu` and `ContextMenu` to
3
+ * lend their children. Importing this module is what reaches bits-ui's menu
4
+ * runtime, so only those two components import it.
5
+ *
6
+ * Internal: not re-exported from the `ui` barrel.
7
+ *
8
+ * @module
9
+ */
10
+ import CheckboxItemPart from './CheckboxItemPart.svelte';
11
+ import ItemPart from './ItemPart.svelte';
12
+ import RadioGroupPart from './RadioGroupPart.svelte';
13
+ import RadioItemPart from './RadioItemPart.svelte';
14
+ import SeparatorPart from './SeparatorPart.svelte';
15
+ import SubPart from './SubPart.svelte';
16
+ /** The parts for a menu of the given kind. */
17
+ export function menuParts(kind) {
18
+ return {
19
+ kind,
20
+ item: ItemPart,
21
+ separator: SeparatorPart,
22
+ checkboxItem: CheckboxItemPart,
23
+ radioGroup: RadioGroupPart,
24
+ radioItem: RadioItemPart,
25
+ sub: SubPart,
26
+ };
27
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The pressed / unpressed look `ToggleButton` and `ToggleGroup` share, and the `ToggleGroup` item type.
3
+ *
4
+ * Pressed is never colour alone: the unpressed `variant` (ghost, outline…)
5
+ * is dropped for a filled tone plus daisyUI's `btn-active`, so the two
6
+ * states differ in fill and depth as well as hue.
7
+ *
8
+ * @module
9
+ */
10
+ import type { Snippet } from 'svelte';
11
+ import { type ButtonVariant, type Tone } from './tones.ts';
12
+ /** The classes of a toggle in `pressed` state, besides `btn` and the size. */
13
+ export declare function toggleClasses(pressed: boolean, tone: Tone, variant: ButtonVariant): string;
14
+ /** One item of a `ToggleGroup`. */
15
+ export interface ToggleGroupItem<Value extends string = string> {
16
+ readonly value: Value;
17
+ /** The item's accessible name, shown unless `iconOnly`. */
18
+ readonly label: string;
19
+ /** Leading icon. */
20
+ readonly icon?: Snippet<[]> | undefined;
21
+ /** Hide the label visually; it stays the accessible name. */
22
+ readonly iconOnly?: boolean | undefined;
23
+ readonly disabled?: boolean | undefined;
24
+ }
25
+ /**
26
+ * The two writers bits-ui's toggle-group `bind:value` needs, for single and
27
+ * multiple mode. In single mode `''` (the selected item pressed off) is
28
+ * refused when `required()`. Otherwise the value goes to `assign` and then
29
+ * to `notify()`. `ToggleGroup` and `ToolbarToggleGroup` share it, so
30
+ * `required` means the same in both.
31
+ */
32
+ export declare function toggleSetters<V extends string>(options: {
33
+ readonly required: () => boolean;
34
+ readonly assign: (value: V | '' | V[]) => void;
35
+ readonly notify: () => ((value: never) => void) | undefined;
36
+ }): {
37
+ readonly single: (next: string) => void;
38
+ readonly multiple: (next: string[]) => void;
39
+ };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The pressed / unpressed look `ToggleButton` and `ToggleGroup` share, and the `ToggleGroup` item type.
3
+ *
4
+ * Pressed is never colour alone: the unpressed `variant` (ghost, outline…)
5
+ * is dropped for a filled tone plus daisyUI's `btn-active`, so the two
6
+ * states differ in fill and depth as well as hue.
7
+ *
8
+ * @module
9
+ */
10
+ import { buttonTone, buttonVariant } from "./tones.js";
11
+ /** The classes of a toggle in `pressed` state, besides `btn` and the size. */
12
+ export function toggleClasses(pressed, tone, variant) {
13
+ return pressed ? `${buttonTone[tone]} btn-active` : buttonVariant[variant];
14
+ }
15
+ /**
16
+ * The two writers bits-ui's toggle-group `bind:value` needs, for single and
17
+ * multiple mode. In single mode `''` (the selected item pressed off) is
18
+ * refused when `required()`. Otherwise the value goes to `assign` and then
19
+ * to `notify()`. `ToggleGroup` and `ToolbarToggleGroup` share it, so
20
+ * `required` means the same in both.
21
+ */
22
+ export function toggleSetters(options) {
23
+ // SAFETY: bits-ui only ever reports values of the group's own items, or ''.
24
+ const write = (next) => {
25
+ options.assign(next);
26
+ options.notify()?.(next);
27
+ };
28
+ return {
29
+ single: (next) => {
30
+ if (options.required() && next === '')
31
+ return;
32
+ write(next);
33
+ },
34
+ multiple: (next) => write(next),
35
+ };
36
+ }
@@ -40,6 +40,35 @@ export declare const alertTone: Record<StatusTone, string>;
40
40
  export declare const alertVariant: Record<AlertVariant, string>;
41
41
  /** Literal daisyUI class per `Tone` for `ProgressBar`; a lookup table so Tailwind's scanner sees every class. */
42
42
  export declare const progressTone: Record<Tone, string>;
43
+ /**
44
+ * Literal daisyUI class per `Tone` for `Steps`; a lookup table so Tailwind's scanner sees every class.
45
+ * Two adjacent toned steps colour the connector between them too.
46
+ */
47
+ export declare const stepTone: Record<Tone, string>;
48
+ /**
49
+ * Literal daisyUI class per `Tone` for `Slider`; a lookup table so Tailwind's scanner sees every class.
50
+ * Each sets `color` (the fill, read as `currentColor`) and `--range-thumb` (the thumb face).
51
+ */
52
+ export declare const rangeTone: Record<Tone, string>;
53
+ /** Where a `Divider`'s label sits along the rule. */
54
+ export type DividerAlign = 'start' | 'center' | 'end';
55
+ /** Literal daisyUI class per `Tone` for `Divider`; a lookup table so Tailwind's scanner sees every class. */
56
+ export declare const dividerTone: Record<Tone, string>;
57
+ /** Literal daisyUI class per `DividerAlign` for `Divider`; a lookup table so Tailwind's scanner sees every class. */
58
+ export declare const dividerAlign: Record<DividerAlign, string>;
59
+ /**
60
+ * Literal daisyUI class per rule direction for `Divider`. daisyUI names the
61
+ * LAYOUT, not the rule: `divider-horizontal` sits between side-by-side items
62
+ * and so draws a vertical rule. This table hides the inversion behind the
63
+ * direction the rule actually runs.
64
+ */
65
+ export declare const dividerOrientation: Record<'horizontal' | 'vertical', string>;
66
+ /** The daisyUI `loading` shapes `Spinner` draws. */
67
+ export type SpinnerVariant = 'spinner' | 'dots' | 'ring' | 'ball' | 'bars' | 'infinity';
68
+ /** Literal daisyUI class per `SpinnerVariant` for `Spinner`; a lookup table so Tailwind's scanner sees every class. */
69
+ export declare const loadingVariant: Record<SpinnerVariant, string>;
70
+ /** Literal daisyUI class per `Size` for `Spinner`; a lookup table so Tailwind's scanner sees every class. */
71
+ export declare const loadingSize: Record<Size, string>;
43
72
  /** Plain background classes, for a segment or swatch without a component prefix. */
44
73
  export declare const backgroundTone: Record<Tone, string>;
45
74
  /** Text colour classes, the foreground half of {@link backgroundTone}. */
@@ -66,3 +95,9 @@ export type ChipSize = 'sm' | 'md';
66
95
  export declare const chipSize: Record<ChipSize, string>;
67
96
  /** The swatch square beside a chip's label, sized to match {@link chipSize}. */
68
97
  export declare const chipSwatchSize: Record<ChipSize, string>;
98
+ /** Which side the items behind a `Stack`'s top item peek out from. */
99
+ export type StackDirection = 'top' | 'bottom' | 'start' | 'end';
100
+ /** Literal daisyUI class per `StackDirection` for `Stack`; a lookup table so Tailwind's scanner sees every class. */
101
+ export declare const stackDirection: Record<StackDirection, string>;
102
+ /** Literal daisyUI class per `Tone` for `ChatBubble`; a lookup table so Tailwind's scanner sees every class. */
103
+ export declare const chatBubbleTone: Record<Tone, string>;
package/dist/ui/tones.js CHANGED
@@ -90,6 +90,78 @@ export const progressTone = {
90
90
  warning: 'progress-warning',
91
91
  error: 'progress-error',
92
92
  };
93
+ /**
94
+ * Literal daisyUI class per `Tone` for `Steps`; a lookup table so Tailwind's scanner sees every class.
95
+ * Two adjacent toned steps colour the connector between them too.
96
+ */
97
+ export const stepTone = {
98
+ neutral: 'step-neutral',
99
+ primary: 'step-primary',
100
+ secondary: 'step-secondary',
101
+ accent: 'step-accent',
102
+ info: 'step-info',
103
+ success: 'step-success',
104
+ warning: 'step-warning',
105
+ error: 'step-error',
106
+ };
107
+ /**
108
+ * Literal daisyUI class per `Tone` for `Slider`; a lookup table so Tailwind's scanner sees every class.
109
+ * Each sets `color` (the fill, read as `currentColor`) and `--range-thumb` (the thumb face).
110
+ */
111
+ export const rangeTone = {
112
+ neutral: 'range-neutral',
113
+ primary: 'range-primary',
114
+ secondary: 'range-secondary',
115
+ accent: 'range-accent',
116
+ info: 'range-info',
117
+ success: 'range-success',
118
+ warning: 'range-warning',
119
+ error: 'range-error',
120
+ };
121
+ /** Literal daisyUI class per `Tone` for `Divider`; a lookup table so Tailwind's scanner sees every class. */
122
+ export const dividerTone = {
123
+ neutral: 'divider-neutral',
124
+ primary: 'divider-primary',
125
+ secondary: 'divider-secondary',
126
+ accent: 'divider-accent',
127
+ info: 'divider-info',
128
+ success: 'divider-success',
129
+ warning: 'divider-warning',
130
+ error: 'divider-error',
131
+ };
132
+ /** Literal daisyUI class per `DividerAlign` for `Divider`; a lookup table so Tailwind's scanner sees every class. */
133
+ export const dividerAlign = {
134
+ start: 'divider-start',
135
+ center: '',
136
+ end: 'divider-end',
137
+ };
138
+ /**
139
+ * Literal daisyUI class per rule direction for `Divider`. daisyUI names the
140
+ * LAYOUT, not the rule: `divider-horizontal` sits between side-by-side items
141
+ * and so draws a vertical rule. This table hides the inversion behind the
142
+ * direction the rule actually runs.
143
+ */
144
+ export const dividerOrientation = {
145
+ horizontal: 'divider-vertical',
146
+ vertical: 'divider-horizontal',
147
+ };
148
+ /** Literal daisyUI class per `SpinnerVariant` for `Spinner`; a lookup table so Tailwind's scanner sees every class. */
149
+ export const loadingVariant = {
150
+ spinner: 'loading-spinner',
151
+ dots: 'loading-dots',
152
+ ring: 'loading-ring',
153
+ ball: 'loading-ball',
154
+ bars: 'loading-bars',
155
+ infinity: 'loading-infinity',
156
+ };
157
+ /** Literal daisyUI class per `Size` for `Spinner`; a lookup table so Tailwind's scanner sees every class. */
158
+ export const loadingSize = {
159
+ xs: 'loading-xs',
160
+ sm: 'loading-sm',
161
+ md: 'loading-md',
162
+ lg: 'loading-lg',
163
+ xl: 'loading-xl',
164
+ };
93
165
  /** Plain background classes, for a segment or swatch without a component prefix. */
94
166
  export const backgroundTone = {
95
167
  neutral: 'bg-neutral',
@@ -148,3 +220,21 @@ export const chipSwatchSize = {
148
220
  sm: 'size-2',
149
221
  md: 'size-2.5',
150
222
  };
223
+ /** Literal daisyUI class per `StackDirection` for `Stack`; a lookup table so Tailwind's scanner sees every class. */
224
+ export const stackDirection = {
225
+ top: 'stack-top',
226
+ bottom: 'stack-bottom',
227
+ start: 'stack-start',
228
+ end: 'stack-end',
229
+ };
230
+ /** Literal daisyUI class per `Tone` for `ChatBubble`; a lookup table so Tailwind's scanner sees every class. */
231
+ export const chatBubbleTone = {
232
+ neutral: 'chat-bubble-neutral',
233
+ primary: 'chat-bubble-primary',
234
+ secondary: 'chat-bubble-secondary',
235
+ accent: 'chat-bubble-accent',
236
+ info: 'chat-bubble-info',
237
+ success: 'chat-bubble-success',
238
+ warning: 'chat-bubble-warning',
239
+ error: 'chat-bubble-error',
240
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package",
3
3
  "name": "@thomasfosterau/components",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
5
  "private": false,
6
6
  "description": "Accessible Svelte 5 UI primitives — Tailwind CSS 4 and daisyUI 5 for styling, bits-ui for interaction, every string a prop",
7
7
  "keywords": [
@@ -54,6 +54,16 @@
54
54
  "svelte": "./dist/tips/index.js",
55
55
  "default": "./dist/tips/index.js"
56
56
  },
57
+ "./dates": {
58
+ "types": "./dist/fields/dates.d.ts",
59
+ "svelte": "./dist/fields/dates.js",
60
+ "default": "./dist/fields/dates.js"
61
+ },
62
+ "./hotkeys": {
63
+ "types": "./dist/hotkeys/index.d.ts",
64
+ "svelte": "./dist/hotkeys/index.js",
65
+ "default": "./dist/hotkeys/index.js"
66
+ },
57
67
  "./seo": {
58
68
  "types": "./dist/seo/index.d.ts",
59
69
  "svelte": "./dist/seo/index.js",
@@ -64,36 +74,42 @@
64
74
  "svelte": "./dist/forms/entity-form.js",
65
75
  "default": "./dist/forms/entity-form.js"
66
76
  },
77
+ "./context-menu": {
78
+ "types": "./dist/ui/context-menu.d.ts",
79
+ "svelte": "./dist/ui/context-menu.js",
80
+ "default": "./dist/ui/context-menu.js"
81
+ },
67
82
  "./theme.css": "./dist/theme.css"
68
83
  },
69
84
  "dependencies": {
70
85
  "@internationalized/date": "^3.8.1",
71
- "@lucide/svelte": "^1.52.0",
72
- "bits-ui": "^2.19.5"
86
+ "@lucide/svelte": "^1.69.0",
87
+ "bits-ui": "^2.20.2"
73
88
  },
74
89
  "devDependencies": {
75
- "@storybook/addon-a11y": "^10.6.1",
76
- "@storybook/addon-svelte-csf": "^5.1.5",
77
- "@storybook/sveltekit": "^10.6.1",
78
- "@sveltejs/kit": "3.0.1",
79
- "@sveltejs/package": "3.0.0",
90
+ "@storybook/addon-a11y": "^10.6.5",
91
+ "@storybook/addon-svelte-csf": "^5.1.6",
92
+ "@storybook/sveltekit": "^10.6.5",
93
+ "@sveltejs/kit": "3.1.1",
94
+ "@sveltejs/package": "3.0.2",
80
95
  "@sveltejs/vite-plugin-svelte": "^7.3.1",
81
96
  "@tailwindcss/vite": "^4.3.3",
82
97
  "@testing-library/jest-dom": "^7.0.1",
83
- "@thomasfosterau/effect-forms-svelte": "^0.2.0",
84
- "@types/node": "^26.6.4",
85
- "@vitest/browser-playwright": "5.0.3",
86
- "daisyui": "^5.7.47",
87
- "effect": "4.0.2",
88
- "playwright": "1.64.0",
89
- "storybook": "^10.6.1",
90
- "svelte": "^5.57.2",
91
- "svelte-check": "^4.7.6",
98
+ "@thomasfosterau/effect-forms-svelte": "^0.3.1",
99
+ "@types/node": "^26.6.6",
100
+ "@vitest/browser-playwright": "5.0.5",
101
+ "daisyui": "^5.7.50",
102
+ "effect": "4.1.2",
103
+ "playwright": "1.64.1",
104
+ "storybook": "^10.6.5",
105
+ "svelte": "^5.57.3",
106
+ "svelte-check": "^4.7.7",
92
107
  "tailwindcss": "^4.3.3",
108
+ "vitest": "5.0.5",
93
109
  "vitest-browser-svelte": "^3.1.0"
94
110
  },
95
111
  "peerDependencies": {
96
- "@thomasfosterau/effect-forms-svelte": "^0.2.0",
112
+ "@thomasfosterau/effect-forms-svelte": "^0.3.1",
97
113
  "svelte": "^5.40.0"
98
114
  },
99
115
  "peerDependenciesMeta": {