@slurp-ui/react 1.1.1 → 1.3.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 (207) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/AvatarGroup/AvatarGroup.d.ts +26 -0
  3. package/dist/AvatarGroup/AvatarGroup.js +46 -0
  4. package/dist/AvatarGroup/AvatarGroup.js.map +1 -0
  5. package/dist/AvatarGroup/index.d.ts +3 -0
  6. package/dist/AvatarGroup/index.js +2 -0
  7. package/dist/Bloom/Bloom.js +3 -2
  8. package/dist/Bloom/Bloom.js.map +1 -1
  9. package/dist/Calendar/Calendar.d.ts +42 -0
  10. package/dist/Calendar/Calendar.js +178 -0
  11. package/dist/Calendar/Calendar.js.map +1 -0
  12. package/dist/Calendar/dates.d.ts +3 -0
  13. package/dist/Calendar/dates.js +46 -0
  14. package/dist/Calendar/dates.js.map +1 -0
  15. package/dist/Calendar/index.d.ts +3 -0
  16. package/dist/Calendar/index.js +2 -0
  17. package/dist/Carousel/Carousel.js +2 -0
  18. package/dist/Carousel/Carousel.js.map +1 -1
  19. package/dist/Choice/Choice.js +2 -0
  20. package/dist/Choice/Choice.js.map +1 -1
  21. package/dist/Code/Code.d.ts +38 -0
  22. package/dist/Code/Code.js +82 -0
  23. package/dist/Code/Code.js.map +1 -0
  24. package/dist/Code/index.d.ts +3 -0
  25. package/dist/Code/index.js +2 -0
  26. package/dist/Compare/Compare.d.ts +23 -0
  27. package/dist/Compare/Compare.js +61 -0
  28. package/dist/Compare/Compare.js.map +1 -0
  29. package/dist/Compare/index.d.ts +3 -0
  30. package/dist/Compare/index.js +2 -0
  31. package/dist/Consent/Consent.d.ts +30 -0
  32. package/dist/Consent/Consent.js +70 -0
  33. package/dist/Consent/Consent.js.map +1 -0
  34. package/dist/Consent/index.d.ts +3 -0
  35. package/dist/Consent/index.js +2 -0
  36. package/dist/Contents/Contents.d.ts +35 -0
  37. package/dist/Contents/Contents.js +63 -0
  38. package/dist/Contents/Contents.js.map +1 -0
  39. package/dist/Contents/index.d.ts +3 -0
  40. package/dist/Contents/index.js +2 -0
  41. package/dist/DateField/DateField.d.ts +29 -0
  42. package/dist/DateField/DateField.js +118 -0
  43. package/dist/DateField/DateField.js.map +1 -0
  44. package/dist/DateField/index.d.ts +3 -0
  45. package/dist/DateField/index.js +2 -0
  46. package/dist/Dialog/Dialog.d.ts +2 -0
  47. package/dist/Dialog/Dialog.js +89 -30
  48. package/dist/Dialog/Dialog.js.map +1 -1
  49. package/dist/Dock/Dock.d.ts +5 -0
  50. package/dist/Dock/Dock.js +13 -2
  51. package/dist/Dock/Dock.js.map +1 -1
  52. package/dist/ErrorSummary/ErrorSummary.d.ts +26 -0
  53. package/dist/ErrorSummary/ErrorSummary.js +68 -0
  54. package/dist/ErrorSummary/ErrorSummary.js.map +1 -0
  55. package/dist/ErrorSummary/index.d.ts +3 -0
  56. package/dist/ErrorSummary/index.js +2 -0
  57. package/dist/FileDrop/FileDrop.d.ts +34 -0
  58. package/dist/FileDrop/FileDrop.js +145 -0
  59. package/dist/FileDrop/FileDrop.js.map +1 -0
  60. package/dist/FileDrop/index.d.ts +3 -0
  61. package/dist/FileDrop/index.js +2 -0
  62. package/dist/Filters/Filters.js +2 -0
  63. package/dist/Filters/Filters.js.map +1 -1
  64. package/dist/Footer/Footer.d.ts +37 -0
  65. package/dist/Footer/Footer.js +63 -0
  66. package/dist/Footer/Footer.js.map +1 -0
  67. package/dist/Footer/index.d.ts +3 -0
  68. package/dist/Footer/index.js +2 -0
  69. package/dist/Hairline/Hairline.d.ts +16 -0
  70. package/dist/Hairline/Hairline.js +23 -0
  71. package/dist/Hairline/Hairline.js.map +1 -0
  72. package/dist/Hairline/index.d.ts +3 -0
  73. package/dist/Hairline/index.js +2 -0
  74. package/dist/Hint/Hint.js +20 -1
  75. package/dist/Hint/Hint.js.map +1 -1
  76. package/dist/Kbd/Kbd.d.ts +7 -0
  77. package/dist/Kbd/Kbd.js +20 -0
  78. package/dist/Kbd/Kbd.js.map +1 -0
  79. package/dist/Kbd/index.d.ts +3 -0
  80. package/dist/Kbd/index.js +2 -0
  81. package/dist/Lightbox/Lightbox.d.ts +30 -0
  82. package/dist/Lightbox/Lightbox.js +74 -0
  83. package/dist/Lightbox/Lightbox.js.map +1 -0
  84. package/dist/Lightbox/index.d.ts +3 -0
  85. package/dist/Lightbox/index.js +2 -0
  86. package/dist/ListRow/ListRow.d.ts +5 -1
  87. package/dist/ListRow/ListRow.js +5 -1
  88. package/dist/ListRow/ListRow.js.map +1 -1
  89. package/dist/Media/Media.d.ts +28 -0
  90. package/dist/Media/Media.js +65 -0
  91. package/dist/Media/Media.js.map +1 -0
  92. package/dist/Media/index.d.ts +3 -0
  93. package/dist/Media/index.js +2 -0
  94. package/dist/Menu/Menu.d.ts +13 -0
  95. package/dist/Menu/Menu.js +43 -11
  96. package/dist/Menu/Menu.js.map +1 -1
  97. package/dist/Menu/index.d.ts +2 -2
  98. package/dist/Menu/index.js +1 -1
  99. package/dist/MultiSuggest/MultiSuggest.d.ts +39 -0
  100. package/dist/MultiSuggest/MultiSuggest.js +267 -0
  101. package/dist/MultiSuggest/MultiSuggest.js.map +1 -0
  102. package/dist/MultiSuggest/index.d.ts +3 -0
  103. package/dist/MultiSuggest/index.js +2 -0
  104. package/dist/Notice/Notice.js +2 -0
  105. package/dist/Notice/Notice.js.map +1 -1
  106. package/dist/NumberField/NumberField.d.ts +32 -0
  107. package/dist/NumberField/NumberField.js +126 -0
  108. package/dist/NumberField/NumberField.js.map +1 -0
  109. package/dist/NumberField/index.d.ts +3 -0
  110. package/dist/NumberField/index.js +2 -0
  111. package/dist/PageNav/PageNav.d.ts +25 -0
  112. package/dist/PageNav/PageNav.js +57 -0
  113. package/dist/PageNav/PageNav.js.map +1 -0
  114. package/dist/PageNav/index.d.ts +3 -0
  115. package/dist/PageNav/index.js +2 -0
  116. package/dist/Pages/Pages.js +2 -0
  117. package/dist/Pages/Pages.js.map +1 -1
  118. package/dist/PinField/PinField.d.ts +26 -0
  119. package/dist/PinField/PinField.js +73 -0
  120. package/dist/PinField/PinField.js.map +1 -0
  121. package/dist/PinField/index.d.ts +3 -0
  122. package/dist/PinField/index.js +2 -0
  123. package/dist/Prose/Prose.d.ts +15 -0
  124. package/dist/Prose/Prose.js +25 -0
  125. package/dist/Prose/Prose.js.map +1 -0
  126. package/dist/Prose/index.d.ts +3 -0
  127. package/dist/Prose/index.js +2 -0
  128. package/dist/Quote/Quote.d.ts +19 -0
  129. package/dist/Quote/Quote.js +52 -0
  130. package/dist/Quote/Quote.js.map +1 -0
  131. package/dist/Quote/index.d.ts +3 -0
  132. package/dist/Quote/index.js +2 -0
  133. package/dist/Rail/Rail.d.ts +37 -0
  134. package/dist/Rail/Rail.js +61 -0
  135. package/dist/Rail/Rail.js.map +1 -0
  136. package/dist/Rail/index.d.ts +3 -0
  137. package/dist/Rail/index.js +2 -0
  138. package/dist/Rating/Rating.js +2 -0
  139. package/dist/Rating/Rating.js.map +1 -1
  140. package/dist/Search/Search.js +2 -0
  141. package/dist/Search/Search.js.map +1 -1
  142. package/dist/SecretField/SecretField.d.ts +17 -0
  143. package/dist/SecretField/SecretField.js +59 -0
  144. package/dist/SecretField/SecretField.js.map +1 -0
  145. package/dist/SecretField/index.d.ts +3 -0
  146. package/dist/SecretField/index.js +2 -0
  147. package/dist/Settings/Settings.js +2 -0
  148. package/dist/Settings/Settings.js.map +1 -1
  149. package/dist/Sheet/Sheet.d.ts +8 -3
  150. package/dist/Sheet/Sheet.js +1 -1
  151. package/dist/Sheet/Sheet.js.map +1 -1
  152. package/dist/Sheet/index.d.ts +2 -2
  153. package/dist/SkipLink/SkipLink.d.ts +22 -0
  154. package/dist/SkipLink/SkipLink.js +32 -0
  155. package/dist/SkipLink/SkipLink.js.map +1 -0
  156. package/dist/SkipLink/index.d.ts +3 -0
  157. package/dist/SkipLink/index.js +2 -0
  158. package/dist/SlurpProvider/SlurpProvider.d.ts +7 -1
  159. package/dist/SlurpProvider/SlurpProvider.js +14 -6
  160. package/dist/SlurpProvider/SlurpProvider.js.map +1 -1
  161. package/dist/Steps/Steps.js +2 -0
  162. package/dist/Steps/Steps.js.map +1 -1
  163. package/dist/Suggest/Suggest.js +2 -0
  164. package/dist/Suggest/Suggest.js.map +1 -1
  165. package/dist/Table/Table.d.ts +12 -0
  166. package/dist/Table/Table.js +56 -10
  167. package/dist/Table/Table.js.map +1 -1
  168. package/dist/Tag/Tag.d.ts +14 -0
  169. package/dist/Tag/Tag.js +26 -0
  170. package/dist/Tag/Tag.js.map +1 -0
  171. package/dist/Tag/index.d.ts +3 -0
  172. package/dist/Tag/index.js +2 -0
  173. package/dist/Timeline/Timeline.d.ts +23 -0
  174. package/dist/Timeline/Timeline.js +49 -0
  175. package/dist/Timeline/Timeline.js.map +1 -0
  176. package/dist/Timeline/index.d.ts +3 -0
  177. package/dist/Timeline/index.js +2 -0
  178. package/dist/Toast/Toast.js +31 -7
  179. package/dist/Toast/Toast.js.map +1 -1
  180. package/dist/Tree/Tree.d.ts +24 -0
  181. package/dist/Tree/Tree.js +113 -0
  182. package/dist/Tree/Tree.js.map +1 -0
  183. package/dist/Tree/index.d.ts +3 -0
  184. package/dist/Tree/index.js +2 -0
  185. package/dist/index.d.ts +63 -8
  186. package/dist/index.js +31 -2
  187. package/dist/internal/labels.js +12 -0
  188. package/dist/internal/labels.js.map +1 -0
  189. package/dist/lib/labels.d.ts +210 -0
  190. package/dist/lib/labels.js +139 -0
  191. package/dist/lib/labels.js.map +1 -0
  192. package/dist/lib/theme.d.ts +134 -4
  193. package/dist/lib/theme.js.map +1 -1
  194. package/dist/styles.css +1912 -138
  195. package/dist/tokens.css +9 -0
  196. package/dist/utils/focus.d.ts +1 -1
  197. package/dist/utils/focus.js +2 -2
  198. package/dist/utils/focus.js.map +1 -1
  199. package/dist/utils/index.d.ts +3 -1
  200. package/dist/utils/index.js +3 -1
  201. package/dist/utils/useClipboard.d.ts +14 -0
  202. package/dist/utils/useClipboard.js +30 -0
  203. package/dist/utils/useClipboard.js.map +1 -0
  204. package/dist/utils/useScrollSpy.d.ts +14 -0
  205. package/dist/utils/useScrollSpy.js +27 -0
  206. package/dist/utils/useScrollSpy.js.map +1 -0
  207. package/package.json +5 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labels.js","names":[],"sources":["../../src/lib/labels.ts"],"sourcesContent":["// Texts of the components, per language. Not an i18n system: every component keeps its Italian defaults and its\n// `labels` prop; a SlurpProvider can swap them all at once with a preset ('en') or an object.\nimport type { CarouselLabels } from '../Carousel/Carousel';\nimport type { SecretFieldLabels } from '../SecretField/SecretField';\nimport type { NumberFieldLabels } from '../NumberField/NumberField';\nimport type { FileDropLabels } from '../FileDrop/FileDrop';\nimport type { ErrorSummaryLabels } from '../ErrorSummary/ErrorSummary';\nimport type { DateFieldLabels } from '../DateField/DateField';\nimport type { CalendarLabels } from '../Calendar/Calendar';\nimport type { CodeLabels } from '../Code/Code';\nimport type { ContentsLabels } from '../Contents/Contents';\nimport type { PageNavLabels } from '../PageNav/PageNav';\nimport type { SkipLinkLabels } from '../SkipLink/SkipLink';\nimport type { ChoiceLabels } from '../Choice/Choice';\nimport type { DialogLabels } from '../Dialog/Dialog';\nimport type { DockLabels } from '../Dock/Dock';\nimport type { FiltersLabels } from '../Filters/Filters';\nimport type { NoticeLabels } from '../Notice/Notice';\nimport type { PagesLabels } from '../Pages/Pages';\nimport type { RatingLabels } from '../Rating/Rating';\nimport type { SearchLabels } from '../Search/Search';\nimport type { SettingsLabels } from '../Settings/Settings';\nimport type { StepsLabels } from '../Steps/Steps';\nimport type { AvatarGroupLabels } from '../AvatarGroup/AvatarGroup';\nimport type { CompareLabels } from '../Compare/Compare';\nimport type { ConsentLabels } from '../Consent/Consent';\nimport type { LightboxLabels } from '../Lightbox/Lightbox';\nimport type { MultiSuggestLabels } from '../MultiSuggest/MultiSuggest';\nimport type { SuggestLabels } from '../Suggest/Suggest';\nimport type { TableLabels } from '../Table/Table';\nimport type { ToastLabels } from '../Toast/Toast';\n\n/** The texts of every component that has some, by component. Dialog's also apply to Sheet. */\nexport interface SlurpLabels {\n SecretField?: Partial<SecretFieldLabels>;\n NumberField?: Partial<NumberFieldLabels>;\n FileDrop?: Partial<FileDropLabels>;\n ErrorSummary?: Partial<ErrorSummaryLabels>;\n DateField?: Partial<DateFieldLabels>;\n Calendar?: Partial<CalendarLabels>;\n Carousel?: Partial<CarouselLabels>;\n Choice?: Partial<ChoiceLabels>;\n Code?: Partial<CodeLabels>;\n Contents?: Partial<ContentsLabels>;\n Dialog?: Partial<DialogLabels>;\n Dock?: Partial<DockLabels>;\n Filters?: Partial<FiltersLabels>;\n Notice?: Partial<NoticeLabels>;\n PageNav?: Partial<PageNavLabels>;\n Pages?: Partial<PagesLabels>;\n Rating?: Partial<RatingLabels>;\n Search?: Partial<SearchLabels>;\n Settings?: Partial<SettingsLabels>;\n SkipLink?: Partial<SkipLinkLabels>;\n Steps?: Partial<StepsLabels>;\n AvatarGroup?: Partial<AvatarGroupLabels>;\n Compare?: Partial<CompareLabels>;\n Consent?: Partial<ConsentLabels>;\n Lightbox?: Partial<LightboxLabels>;\n MultiSuggest?: Partial<MultiSuggestLabels>;\n Suggest?: Partial<SuggestLabels>;\n Table?: Partial<TableLabels>;\n Toast?: Partial<ToastLabels>;\n}\n\n/** A built-in language (a plain string, so a server component can pass it) or your own texts. */\nexport type LabelsInput = 'it' | 'en' | SlurpLabels;\n\n/** English texts for every component. Italian is the components' own default. */\nexport const labelsEn = {\n Calendar: { previous: 'Previous month', next: 'Next month' },\n DateField: { placeholder: 'Pick a date' },\n ErrorSummary: {\n title: (n) => (n === 1 ? 'There is 1 error to fix' : `There are ${n} errors to fix`),\n },\n FileDrop: {\n browse: 'Choose files',\n drop: 'or drop them here',\n remove: (name) => `Remove ${name}`,\n },\n NumberField: { decrement: 'Decrease', increment: 'Increase' },\n SecretField: { show: 'Show the password' },\n Carousel: {\n previous: 'Previous',\n next: 'Next',\n slide: (i, n) => `${i} of ${n}`,\n show: (i, n) => `Show ${i} of ${n}`,\n picker: 'Choose what to show',\n },\n Choice: { placeholder: 'Choose…' },\n Code: { copy: 'Copy the code', copied: 'Copied', region: 'Code' },\n Contents: { title: 'On this page' },\n Dialog: { close: 'Close' },\n Dock: {\n navigation: 'Navigation',\n crumbs: 'Path',\n back: 'Back',\n search: 'Search',\n searchPlaceholder: 'Search…',\n noResults: 'No results',\n matches: (i, n) => `${n === 1 ? '1 match' : `${n} matches`}, ${i} of ${n}`,\n nextMatch: (i, n) => `Go to the next match: ${i} of ${n}`,\n resultsHint: 'Arrow down to browse the results, Escape to close them.',\n },\n Filters: { title: 'Filters', reset: 'Reset filters' },\n Notice: {\n neutral: 'Note',\n success: 'Done',\n warning: 'Warning',\n danger: 'Error',\n dismiss: 'Dismiss notice',\n },\n PageNav: { label: 'Previous and next page', previous: 'Previous', next: 'Next' },\n Pages: {\n label: 'Pages',\n previous: 'Previous page',\n next: 'Next page',\n page: (n) => `Page ${n}`,\n status: (n, count) => `${n} of ${count}`,\n },\n Rating: {\n value: (v, max) => `${v} out of ${max}`,\n star: (n) => (n === 1 ? '1 star' : `${n} stars`),\n },\n Search: {\n label: 'Search',\n placeholder: 'Search…',\n clear: 'Clear the search',\n results: (n) => (n === 0 ? 'No results' : n === 1 ? '1 result' : `${n} results`),\n },\n Settings: {\n open: 'Settings',\n close: 'Close settings',\n title: 'Settings',\n theme: 'Theme',\n system: 'Automatic',\n light: 'Light',\n dark: 'Dark',\n language: 'Language',\n },\n SkipLink: { label: 'Skip to content' },\n Steps: { label: 'Steps', done: 'completed' },\n AvatarGroup: { more: (n) => (n === 1 ? 'one more person' : `${n} more people`) },\n Compare: { handle: 'Compare before and after' },\n Lightbox: {\n previous: 'Previous image',\n next: 'Next image',\n position: (i, n) => `${i} of ${n}`,\n },\n Consent: {\n region: 'Cookie preferences',\n accept: 'Accept',\n reject: 'Reject',\n customize: 'Customise',\n },\n MultiSuggest: {\n results: (n) => (n === 1 ? '1 suggestion' : `${n} suggestions`),\n empty: 'No suggestions',\n remove: (label) => `Remove ${label}`,\n chosen: 'Chosen',\n },\n Suggest: {\n results: (n) => (n === 1 ? '1 suggestion' : `${n} suggestions`),\n empty: 'No suggestions',\n },\n Table: { empty: 'No items', selectAll: 'Select all rows', selectRow: 'Select row' },\n Toast: { region: 'Notifications', dismiss: 'Dismiss notification' },\n} satisfies Required<SlurpLabels>;\n\n/** Italian, the components' own defaults: nothing to swap. */\nexport const labelsIt: SlurpLabels = {};\n\n/** Resolves a provider's `labels` prop to texts by component. */\nexport function resolveLabels(input: LabelsInput | undefined): SlurpLabels | undefined {\n if (input === undefined) return undefined;\n if (input === 'en') return labelsEn;\n if (input === 'it') return labelsIt;\n return input;\n}\n"],"mappings":";;;AAqEA,MAAa,WAAW;CACtB,UAAU;EAAE,UAAU;EAAkB,MAAM;CAAa;CAC3D,WAAW,EAAE,aAAa,cAAc;CACxC,cAAc,EACZ,QAAQ,MAAO,MAAM,IAAI,4BAA4B,aAAa,EAAE,gBACtE;CACA,UAAU;EACR,QAAQ;EACR,MAAM;EACN,SAAS,SAAS,UAAU;CAC9B;CACA,aAAa;EAAE,WAAW;EAAY,WAAW;CAAW;CAC5D,aAAa,EAAE,MAAM,oBAAoB;CACzC,UAAU;EACR,UAAU;EACV,MAAM;EACN,QAAQ,GAAG,MAAM,GAAG,EAAE,MAAM;EAC5B,OAAO,GAAG,MAAM,QAAQ,EAAE,MAAM;EAChC,QAAQ;CACV;CACA,QAAQ,EAAE,aAAa,UAAU;CACjC,MAAM;EAAE,MAAM;EAAiB,QAAQ;EAAU,QAAQ;CAAO;CAChE,UAAU,EAAE,OAAO,eAAe;CAClC,QAAQ,EAAE,OAAO,QAAQ;CACzB,MAAM;EACJ,YAAY;EACZ,QAAQ;EACR,MAAM;EACN,QAAQ;EACR,mBAAmB;EACnB,WAAW;EACX,UAAU,GAAG,MAAM,GAAG,MAAM,IAAI,YAAY,GAAG,EAAE,UAAU,IAAI,EAAE,MAAM;E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mB,WAAW;CAAa;CAClF,OAAO;EAAE,QAAQ;EAAiB,SAAS;CAAuB;AACpE;;AAGA,MAAa,WAAwB,CAAC;;AAGtC,SAAgB,cAAc,OAAyD;CACrF,IAAI,UAAU,KAAA,GAAW,OAAO,KAAA;CAChC,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,UAAU,MAAM,OAAO;CAC3B,OAAO;AACT"}
@@ -2,54 +2,80 @@
2
2
  import { SlurpCss } from "./css.js";
3
3
  import { AccentScopeProps } from "../AccentScope/AccentScope.js";
4
4
  import { AvatarProps } from "../Avatar/Avatar.js";
5
+ import { AvatarGroupProps } from "../AvatarGroup/AvatarGroup.js";
5
6
  import { BentoProps } from "../Bento/Bento.js";
6
7
  import { BloomProps } from "../Bloom/Bloom.js";
7
8
  import { ButtonProps } from "../Button/Button.js";
8
9
  import { BubbleProps } from "../Bubble/Bubble.js";
10
+ import { CalendarProps } from "../Calendar/Calendar.js";
9
11
  import { CardProps } from "../Card/Card.js";
10
12
  import { CarouselProps } from "../Carousel/Carousel.js";
11
13
  import { CellProps } from "../Cell/Cell.js";
12
14
  import { CheckboxProps } from "../Checkbox/Checkbox.js";
13
15
  import { ChipProps } from "../Chip/Chip.js";
14
16
  import { ChoiceProps } from "../Choice/Choice.js";
17
+ import { CodeProps } from "../Code/Code.js";
18
+ import { CompareProps } from "../Compare/Compare.js";
19
+ import { ConsentProps } from "../Consent/Consent.js";
20
+ import { ContentsProps } from "../Contents/Contents.js";
15
21
  import { CountProps } from "../Count/Count.js";
22
+ import { DateFieldProps } from "../DateField/DateField.js";
16
23
  import { DialogProps } from "../Dialog/Dialog.js";
17
24
  import { DockProps } from "../Dock/Dock.js";
18
25
  import { EmptyProps } from "../Empty/Empty.js";
26
+ import { ErrorSummaryProps } from "../ErrorSummary/ErrorSummary.js";
19
27
  import { FactProps } from "../Fact/Fact.js";
20
28
  import { FieldProps } from "../Field/Field.js";
29
+ import { FileDropProps } from "../FileDrop/FileDrop.js";
21
30
  import { FiltersProps } from "../Filters/Filters.js";
22
31
  import { FlowProps } from "../Flow/Flow.js";
23
32
  import { FoldProps } from "../Fold/Fold.js";
33
+ import { FooterProps } from "../Footer/Footer.js";
24
34
  import { FrameProps } from "../Frame/Frame.js";
35
+ import { HairlineProps } from "../Hairline/Hairline.js";
25
36
  import { HintProps } from "../Hint/Hint.js";
37
+ import { KbdProps } from "../Kbd/Kbd.js";
38
+ import { LightboxProps } from "../Lightbox/Lightbox.js";
26
39
  import { LinkProps } from "../Link/Link.js";
27
40
  import { ListProps, ListRowProps } from "../ListRow/ListRow.js";
41
+ import { MediaProps } from "../Media/Media.js";
28
42
  import { MenuProps } from "../Menu/Menu.js";
43
+ import { SuggestProps } from "../Suggest/Suggest.js";
44
+ import { MultiSuggestProps } from "../MultiSuggest/MultiSuggest.js";
29
45
  import { NoticeProps } from "../Notice/Notice.js";
46
+ import { NumberFieldProps } from "../NumberField/NumberField.js";
47
+ import { PageNavProps } from "../PageNav/PageNav.js";
30
48
  import { PagesProps } from "../Pages/Pages.js";
49
+ import { PinFieldProps } from "../PinField/PinField.js";
31
50
  import { PlaceholderProps } from "../Placeholder/Placeholder.js";
32
51
  import { ProgressProps } from "../Progress/Progress.js";
52
+ import { ProseProps } from "../Prose/Prose.js";
53
+ import { QuoteProps } from "../Quote/Quote.js";
33
54
  import { RadioGroupProps, RadioProps } from "../Radio/Radio.js";
55
+ import { RailProps } from "../Rail/Rail.js";
34
56
  import { RangeProps } from "../Range/Range.js";
35
57
  import { RatingProps } from "../Rating/Rating.js";
36
58
  import { ResultRowProps } from "../ResultRow/ResultRow.js";
37
59
  import { ScoreProps } from "../Score/Score.js";
38
60
  import { SearchProps } from "../Search/Search.js";
61
+ import { SecretFieldProps } from "../SecretField/SecretField.js";
39
62
  import { SegmentedProps } from "../Segmented/Segmented.js";
40
63
  import { SettingsProps } from "../Settings/Settings.js";
41
64
  import { SheetProps } from "../Sheet/Sheet.js";
42
65
  import { ShelfProps } from "../Shelf/Shelf.js";
43
- import { StageProps } from "../Stage/Stage.js";
44
- import { TileProps } from "../Tile/Tile.js";
66
+ import { SkipLinkProps } from "../SkipLink/SkipLink.js";
45
67
  import { StepsProps } from "../Steps/Steps.js";
46
- import { SuggestProps } from "../Suggest/Suggest.js";
47
68
  import { TableProps } from "../Table/Table.js";
69
+ import { StageProps } from "../Stage/Stage.js";
70
+ import { TileProps } from "../Tile/Tile.js";
48
71
  import { SurfaceProps } from "../Surface/Surface.js";
49
72
  import { SwatchGroupProps, SwatchProps } from "../Swatch/Swatch.js";
50
73
  import { SwitchProps } from "../Switch/Switch.js";
51
74
  import { TabsProps } from "../Tabs/Tabs.js";
52
75
  import { TextProps } from "../Text/Text.js";
76
+ import { TreeProps } from "../Tree/Tree.js";
77
+ import { TimelineProps } from "../Timeline/Timeline.js";
78
+ import { TagProps } from "../Tag/Tag.js";
53
79
  import { GhostKind, SlurpDefaults } from "@slurp-ui/motion";
54
80
  import { ColorToken, HueToken, RadiusToken, SpaceToken, blur, shadow } from "@slurp-ui/tokens";
55
81
  export type ColorSchemeMode = 'light' | 'dark' | 'system';
@@ -76,10 +102,114 @@ export interface MotionOptions extends Pick<SlurpDefaults, 'duration' | 'stagger
76
102
  }
77
103
  /** Components that read defaults and `css` overrides from the theme, with their parts. */
78
104
  export interface ThemeComponents {
105
+ Lightbox: {
106
+ props: LightboxProps;
107
+ parts: 'root';
108
+ };
109
+ Compare: {
110
+ props: CompareProps;
111
+ parts: 'root';
112
+ };
113
+ Tree: {
114
+ props: TreeProps;
115
+ parts: 'root';
116
+ };
117
+ Consent: {
118
+ props: ConsentProps;
119
+ parts: 'root';
120
+ };
121
+ Timeline: {
122
+ props: TimelineProps;
123
+ parts: 'root';
124
+ };
125
+ AvatarGroup: {
126
+ props: AvatarGroupProps;
127
+ parts: 'root';
128
+ };
129
+ MultiSuggest: {
130
+ props: MultiSuggestProps;
131
+ parts: 'root' | 'label' | 'control' | 'list' | 'option' | 'tags' | 'tag' | 'hint' | 'error';
132
+ };
133
+ DateField: {
134
+ props: DateFieldProps;
135
+ parts: 'root';
136
+ };
137
+ Calendar: {
138
+ props: CalendarProps;
139
+ parts: 'root';
140
+ };
141
+ FileDrop: {
142
+ props: FileDropProps;
143
+ parts: 'root';
144
+ };
145
+ ErrorSummary: {
146
+ props: ErrorSummaryProps;
147
+ parts: 'root';
148
+ };
149
+ PinField: {
150
+ props: PinFieldProps;
151
+ parts: 'root';
152
+ };
153
+ NumberField: {
154
+ props: NumberFieldProps;
155
+ parts: 'root';
156
+ };
157
+ SecretField: {
158
+ props: SecretFieldProps;
159
+ parts: 'root';
160
+ };
161
+ Footer: {
162
+ props: FooterProps;
163
+ parts: 'root';
164
+ };
165
+ Media: {
166
+ props: MediaProps;
167
+ parts: 'root' | 'frame' | 'media' | 'caption';
168
+ };
169
+ Quote: {
170
+ props: QuoteProps;
171
+ parts: 'root' | 'quote' | 'caption';
172
+ };
173
+ Kbd: {
174
+ props: KbdProps;
175
+ parts: 'root';
176
+ };
177
+ Tag: {
178
+ props: TagProps;
179
+ parts: 'root';
180
+ };
79
181
  AccentScope: {
80
182
  props: AccentScopeProps;
81
183
  parts: 'root';
82
184
  };
185
+ Code: {
186
+ props: CodeProps;
187
+ parts: 'root' | 'bar' | 'filename' | 'copy' | 'pre';
188
+ };
189
+ Contents: {
190
+ props: ContentsProps;
191
+ parts: 'root' | 'title' | 'list' | 'item' | 'link';
192
+ };
193
+ Hairline: {
194
+ props: HairlineProps;
195
+ parts: 'root';
196
+ };
197
+ PageNav: {
198
+ props: PageNavProps;
199
+ parts: 'root';
200
+ };
201
+ Prose: {
202
+ props: ProseProps;
203
+ parts: 'root';
204
+ };
205
+ Rail: {
206
+ props: RailProps;
207
+ parts: 'root';
208
+ };
209
+ SkipLink: {
210
+ props: SkipLinkProps;
211
+ parts: 'root';
212
+ };
83
213
  Bento: {
84
214
  props: BentoProps;
85
215
  parts: 'root';
@@ -114,7 +244,7 @@ export interface ThemeComponents {
114
244
  };
115
245
  ListRow: {
116
246
  props: ListRowProps;
117
- parts: 'root' | 'mark' | 'title' | 'tag' | 'meta' | 'value' | 'action';
247
+ parts: 'root' | 'mark' | 'title' | 'link' | 'tag' | 'meta' | 'value' | 'action';
118
248
  };
119
249
  ResultRow: {
120
250
  props: ResultRowProps;
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","names":[],"sources":["../../src/lib/theme.ts"],"sourcesContent":["// createTheme() and the stylesheet that applies a theme. Server-safe: a theme is plain, serialisable data,\n// so it can be created in a server component and passed to <SlurpProvider>.\nimport { MOTION_DEFAULTS, type GhostKind, type SlurpDefaults } from '@slurp-ui/motion';\nimport type { blur, ColorToken, HueToken, RadiusToken, shadow, SpaceToken } from '@slurp-ui/tokens';\n\nimport type { AccentScopeProps } from '../AccentScope/AccentScope';\nimport type { BentoProps } from '../Bento/Bento';\nimport type { CardProps } from '../Card/Card';\nimport type { DockProps } from '../Dock/Dock';\nimport type { EmptyProps } from '../Empty/Empty';\nimport type { FactProps } from '../Fact/Fact';\nimport type { FiltersProps } from '../Filters/Filters';\nimport type { LinkProps } from '../Link/Link';\nimport type { ListProps, ListRowProps } from '../ListRow/ListRow';\nimport type { ResultRowProps } from '../ResultRow/ResultRow';\nimport type { ScoreProps } from '../Score/Score';\nimport type { SettingsProps } from '../Settings/Settings';\nimport type { ShelfProps } from '../Shelf/Shelf';\nimport type { StageProps } from '../Stage/Stage';\nimport type { TileProps } from '../Tile/Tile';\nimport type { CarouselProps } from '../Carousel/Carousel';\nimport type { PagesProps } from '../Pages/Pages';\nimport type { RatingProps } from '../Rating/Rating';\nimport type { StepsProps } from '../Steps/Steps';\nimport type { SuggestProps } from '../Suggest/Suggest';\nimport type { TableProps } from '../Table/Table';\nimport type { AvatarProps } from '../Avatar/Avatar';\nimport type { BloomProps } from '../Bloom/Bloom';\nimport type { BubbleProps } from '../Bubble/Bubble';\nimport type { ButtonProps } from '../Button/Button';\nimport type { CellProps } from '../Cell/Cell';\nimport type { CheckboxProps } from '../Checkbox/Checkbox';\nimport type { ChipProps } from '../Chip/Chip';\nimport type { ChoiceProps } from '../Choice/Choice';\nimport type { CountProps } from '../Count/Count';\nimport type { DialogProps } from '../Dialog/Dialog';\nimport type { FieldProps } from '../Field/Field';\nimport type { FlowProps } from '../Flow/Flow';\nimport type { FoldProps } from '../Fold/Fold';\nimport type { FrameProps } from '../Frame/Frame';\nimport type { HintProps } from '../Hint/Hint';\nimport type { MenuProps } from '../Menu/Menu';\nimport type { NoticeProps } from '../Notice/Notice';\nimport type { PlaceholderProps } from '../Placeholder/Placeholder';\nimport type { ProgressProps } from '../Progress/Progress';\nimport type { RadioGroupProps, RadioProps } from '../Radio/Radio';\nimport type { RangeProps } from '../Range/Range';\nimport type { SearchProps } from '../Search/Search';\nimport type { SegmentedProps } from '../Segmented/Segmented';\nimport type { SheetProps } from '../Sheet/Sheet';\nimport type { SurfaceProps } from '../Surface/Surface';\nimport type { SwatchGroupProps, SwatchProps } from '../Swatch/Swatch';\nimport type { SwitchProps } from '../Switch/Switch';\nimport type { TabsProps } from '../Tabs/Tabs';\nimport type { TextProps } from '../Text/Text';\nimport { accentVars, resolveAccent } from './color';\nimport { hash, LAYER_ORDER, type SlurpCss } from './css';\n\nexport type ColorSchemeMode = 'light' | 'dark' | 'system';\nexport type ResolvedColorScheme = 'light' | 'dark';\n/** A `hue-*` preset (used as is) or any hex colour (turned into an accent with `vivid()`). */\nexport type AccentInput = `hue-${HueToken}` | `#${string}`;\n\ntype Themed = string | { light: string; dark: string };\ntype Length = string | number;\n\nexport interface TokenOverrides {\n color?: Partial<Record<ColorToken | `hue-${HueToken}`, Themed>>;\n space?: Partial<Record<SpaceToken, Length>>;\n radius?: Partial<Record<RadiusToken, Length>>;\n shadow?: Partial<Record<keyof typeof shadow, Themed>>;\n blur?: Partial<Record<keyof typeof blur, Length>>;\n}\n\n/** Defaults of the collapse / expand transitions started with useSlurp() (serialisable values only). */\nexport interface MotionOptions extends Pick<\n SlurpDefaults,\n 'duration' | 'stagger' | 'curve' | 'swell' | 'drop' | 'reducedMotion' | 'interrupt'\n> {\n goo: boolean | 'auto';\n ghost: GhostKind;\n order: 'distance' | 'dom';\n}\n\nconst { duration, stagger, curve, swell, drop, reducedMotion, interrupt } = MOTION_DEFAULTS;\nconst DEFAULT_MOTION: MotionOptions = {\n duration,\n stagger,\n curve,\n swell,\n drop,\n reducedMotion,\n interrupt,\n goo: 'auto',\n ghost: 'shape',\n order: 'distance',\n};\n\n/** Components that read defaults and `css` overrides from the theme, with their parts. */\nexport interface ThemeComponents {\n AccentScope: { props: AccentScopeProps; parts: 'root' };\n Bento: { props: BentoProps; parts: 'root' };\n Card: { props: CardProps; parts: 'root' | 'media' | 'badge' | 'title' | 'description' };\n Dock: { props: DockProps; parts: 'root' };\n Empty: { props: EmptyProps; parts: 'root' };\n Fact: { props: FactProps; parts: 'root' };\n Filters: { props: FiltersProps; parts: 'root' };\n Link: { props: LinkProps; parts: 'root' };\n List: { props: ListProps; parts: 'root' };\n ListRow: {\n props: ListRowProps;\n parts: 'root' | 'mark' | 'title' | 'tag' | 'meta' | 'value' | 'action';\n };\n ResultRow: { props: ResultRowProps; parts: 'root' };\n Score: { props: ScoreProps; parts: 'root' };\n Settings: { props: SettingsProps; parts: 'root' };\n Shelf: { props: ShelfProps; parts: 'root' };\n Stage: { props: StageProps; parts: 'root' };\n Tile: {\n props: TileProps;\n parts: 'root' | 'blob' | 'text' | 'title' | 'subtitle' | 'badge' | 'media';\n };\n Avatar: { props: AvatarProps; parts: 'root' };\n Bloom: { props: BloomProps; parts: 'root' | 'surface' | 'trigger' | 'panel' };\n Bubble: { props: BubbleProps; parts: 'root' };\n Button: { props: ButtonProps; parts: 'root' | 'icon' | 'label' | 'endIcon' };\n Cell: { props: CellProps; parts: 'root' };\n Checkbox: { props: CheckboxProps; parts: 'root' | 'input' | 'box' | 'label' };\n Chip: { props: ChipProps; parts: 'root' };\n Choice: { props: ChoiceProps; parts: 'root' };\n Count: { props: CountProps; parts: 'root' };\n Dialog: {\n props: DialogProps;\n parts: 'root' | 'header' | 'title' | 'description' | 'body' | 'footer' | 'close';\n };\n Field: { props: FieldProps; parts: 'root' | 'label' | 'control' | 'hint' | 'error' };\n Flow: { props: FlowProps; parts: 'root' };\n Fold: { props: FoldProps; parts: 'root' | 'heading' | 'trigger' | 'region' };\n Frame: { props: FrameProps; parts: 'root' };\n Hint: { props: HintProps; parts: 'root' };\n Menu: { props: MenuProps; parts: 'root' };\n Notice: { props: NoticeProps; parts: 'root' | 'icon' | 'title' | 'body' | 'dismiss' };\n Placeholder: { props: PlaceholderProps; parts: 'root' };\n Progress: { props: ProgressProps; parts: 'root' };\n Radio: { props: RadioProps; parts: 'root' | 'input' | 'dot' | 'label' };\n RadioGroup: { props: RadioGroupProps; parts: 'root' | 'legend' };\n Range: { props: RangeProps; parts: 'root' | 'label' | 'value' | 'control' };\n Search: { props: SearchProps; parts: 'root' | 'icon' | 'control' | 'clear' | 'status' };\n Segmented: { props: SegmentedProps; parts: 'root' | 'item' };\n Sheet: {\n props: SheetProps;\n parts: 'root' | 'header' | 'title' | 'description' | 'body' | 'footer' | 'close';\n };\n Surface: { props: SurfaceProps; parts: 'root' };\n Swatch: { props: SwatchProps; parts: 'root' };\n SwatchGroup: { props: SwatchGroupProps; parts: 'root' };\n Switch: { props: SwitchProps; parts: 'root' | 'input' | 'track' | 'thumb' | 'label' };\n Tabs: { props: TabsProps; parts: 'root' | 'list' | 'tab' | 'indicator' | 'panel' };\n Text: { props: TextProps; parts: 'root' };\n Suggest: {\n props: SuggestProps;\n parts: 'root' | 'label' | 'control' | 'list' | 'option' | 'hint' | 'error';\n };\n Pages: { props: PagesProps; parts: 'root' | 'list' | 'item' | 'previous' | 'next' | 'status' };\n Steps: { props: StepsProps; parts: 'root' | 'list' | 'step' };\n Rating: { props: RatingProps; parts: 'root' };\n Table: { props: TableProps; parts: 'root' | 'table' | 'caption' };\n Carousel: {\n props: CarouselProps;\n parts: 'root' | 'track' | 'slide' | 'controls' | 'previous' | 'next' | 'dot';\n };\n}\nexport type ComponentName = keyof ThemeComponents;\n\nexport type ComponentsConfig = {\n [K in ComponentName]?: {\n defaults?: Partial<Omit<ThemeComponents[K]['props'], 'ref' | 'children' | 'css'>>;\n css?: Partial<Record<ThemeComponents[K]['parts'], SlurpCss>>;\n };\n};\n\nexport interface ThemeOptions {\n /** Initial colour scheme, until the person chooses one (default `system`). */\n colorScheme?: ColorSchemeMode;\n /** Default `hue-violet`. */\n accent?: AccentInput;\n /** Used only by Intl (numbers, prices). Not an i18n system. Default `it-IT`. */\n locale?: string;\n tokens?: TokenOverrides;\n motion?: Partial<MotionOptions>;\n components?: ComponentsConfig;\n}\n\nexport interface Theme {\n colorScheme: ColorSchemeMode;\n accent: AccentInput;\n /** The accent actually painted (hex). */\n accentColor: string;\n locale: string;\n tokens: TokenOverrides;\n motion: MotionOptions;\n components: ComponentsConfig;\n}\n\nconst DEFAULT_ACCENT: AccentInput = 'hue-violet';\n\n/** localStorage key of the chosen colour scheme (same as the design system's setTheme()). */\nexport const DEFAULT_STORAGE_KEY = 'slurp-theme';\n\nexport function createTheme(options: ThemeOptions = {}): Theme {\n const accent = options.accent ?? DEFAULT_ACCENT;\n return {\n colorScheme: options.colorScheme ?? 'system',\n accent,\n accentColor: resolveAccent(accent),\n locale: options.locale ?? 'it-IT',\n tokens: options.tokens ?? {},\n motion: { ...DEFAULT_MOTION, ...options.motion },\n components: options.components ?? {},\n };\n}\n\nexport const defaultTheme: Theme = createTheme();\n\nconst px = (v: Length) => (typeof v === 'number' ? `${v}px` : v);\n\n/** Light / dark declarations of the token overrides of a theme. */\nfunction overrideDeclarations(tokens: TokenOverrides) {\n const light: string[] = [];\n const dark: string[] = [];\n const add = (name: string, v: Themed | number) => {\n if (typeof v === 'object') {\n light.push(`--slurp-${name}:${v.light}`);\n dark.push(`--slurp-${name}:${v.dark}`);\n } else light.push(`--slurp-${name}:${px(v)}`);\n };\n for (const [k, v] of Object.entries(tokens.color ?? {})) if (v !== undefined) add(k, v);\n for (const [k, v] of Object.entries(tokens.space ?? {}))\n if (v !== undefined) add(`space-${k}`, v);\n for (const [k, v] of Object.entries(tokens.radius ?? {}))\n if (v !== undefined) add(`radius-${k}`, v);\n for (const [k, v] of Object.entries(tokens.shadow ?? {}))\n if (v !== undefined) add(`shadow-${k}`, v);\n for (const [k, v] of Object.entries(tokens.blur ?? {})) if (v !== undefined) add(`blur-${k}`, v);\n return { light, dark };\n}\n\nfunction selectors(scope: string | undefined) {\n if (!scope) {\n return {\n base: ':root,[data-theme]',\n dark: \"[data-theme='dark']\",\n systemDark: \":root:not([data-theme='light'])\",\n };\n }\n const s = `[data-slurp-theme=\"${scope}\"]`;\n return {\n base: `${s},${s} [data-theme]`,\n dark: `:root[data-theme='dark'] ${s},${s} [data-theme='dark']`,\n systemDark: `:root:not([data-theme='light']) ${s}`,\n };\n}\n\n/**\n * The stylesheet of a theme: accent variables and token overrides, on the root (or on a nested provider's `scope`)\n * and on every `data-theme` subtree, so derived values re-resolve per theme. Empty for the default theme.\n * tokens.css uses `:where()`, so these plain selectors win whatever the stylesheet order.\n */\nexport function themeCss(theme: Theme, scope?: string): string {\n const { light, dark } = overrideDeclarations(theme.tokens);\n const accent =\n theme.accent === DEFAULT_ACCENT\n ? []\n : Object.entries(accentVars(theme.accentColor)).map(([k, v]) => `${k}:${v}`);\n const base = [...accent, ...light];\n if (!base.length && !dark.length) return '';\n const sel = selectors(scope);\n const rules = [`${sel.base}{${base.join(';')}}`];\n if (dark.length) {\n rules.push(\n `${sel.dark}{${dark.join(';')}}`,\n `@media (prefers-color-scheme: dark){${sel.systemDark}{${dark.join(';')}}}`,\n );\n }\n return `${LAYER_ORDER}@layer slurp.base{${rules.join('')}}`;\n}\n\n/** Stable id of a stylesheet, for React's <style href> de-duplication. */\nexport const styleId = (prefix: string, css: string) => `slurp-${prefix}-${hash(css)}`;\n"],"mappings":";;;;;AAoFA,MAAM,EAAE,UAAU,SAAS,OAAO,OAAO,MAAM,eAAe,cAAc;AAC5E,MAA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names":[],"sources":["../../src/lib/theme.ts"],"sourcesContent":["// createTheme() and the stylesheet that applies a theme. Server-safe: a theme is plain, serialisable data,\n// so it can be created in a server component and passed to <SlurpProvider>.\nimport { MOTION_DEFAULTS, type GhostKind, type SlurpDefaults } from '@slurp-ui/motion';\nimport type { blur, ColorToken, HueToken, RadiusToken, shadow, SpaceToken } from '@slurp-ui/tokens';\n\nimport type { AccentScopeProps } from '../AccentScope/AccentScope';\nimport type { BentoProps } from '../Bento/Bento';\nimport type { CardProps } from '../Card/Card';\nimport type { DockProps } from '../Dock/Dock';\nimport type { EmptyProps } from '../Empty/Empty';\nimport type { FactProps } from '../Fact/Fact';\nimport type { FiltersProps } from '../Filters/Filters';\nimport type { LinkProps } from '../Link/Link';\nimport type { ListProps, ListRowProps } from '../ListRow/ListRow';\nimport type { ResultRowProps } from '../ResultRow/ResultRow';\nimport type { ScoreProps } from '../Score/Score';\nimport type { SettingsProps } from '../Settings/Settings';\nimport type { ShelfProps } from '../Shelf/Shelf';\nimport type { StageProps } from '../Stage/Stage';\nimport type { TileProps } from '../Tile/Tile';\nimport type { CarouselProps } from '../Carousel/Carousel';\nimport type { PagesProps } from '../Pages/Pages';\nimport type { RatingProps } from '../Rating/Rating';\nimport type { StepsProps } from '../Steps/Steps';\nimport type { SuggestProps } from '../Suggest/Suggest';\nimport type { TableProps } from '../Table/Table';\nimport type { AvatarProps } from '../Avatar/Avatar';\nimport type { BloomProps } from '../Bloom/Bloom';\nimport type { BubbleProps } from '../Bubble/Bubble';\nimport type { ButtonProps } from '../Button/Button';\nimport type { CellProps } from '../Cell/Cell';\nimport type { CheckboxProps } from '../Checkbox/Checkbox';\nimport type { ChipProps } from '../Chip/Chip';\nimport type { ChoiceProps } from '../Choice/Choice';\nimport type { CountProps } from '../Count/Count';\nimport type { DialogProps } from '../Dialog/Dialog';\nimport type { FieldProps } from '../Field/Field';\nimport type { FlowProps } from '../Flow/Flow';\nimport type { FoldProps } from '../Fold/Fold';\nimport type { FrameProps } from '../Frame/Frame';\nimport type { HintProps } from '../Hint/Hint';\nimport type { MenuProps } from '../Menu/Menu';\nimport type { NoticeProps } from '../Notice/Notice';\nimport type { PlaceholderProps } from '../Placeholder/Placeholder';\nimport type { ProgressProps } from '../Progress/Progress';\nimport type { RadioGroupProps, RadioProps } from '../Radio/Radio';\nimport type { RangeProps } from '../Range/Range';\nimport type { SearchProps } from '../Search/Search';\nimport type { SegmentedProps } from '../Segmented/Segmented';\nimport type { SheetProps } from '../Sheet/Sheet';\nimport type { SurfaceProps } from '../Surface/Surface';\nimport type { SwatchGroupProps, SwatchProps } from '../Swatch/Swatch';\nimport type { SwitchProps } from '../Switch/Switch';\nimport type { TabsProps } from '../Tabs/Tabs';\nimport type { TextProps } from '../Text/Text';\nimport type { LightboxProps } from '../Lightbox/Lightbox';\nimport type { CompareProps } from '../Compare/Compare';\nimport type { TreeProps } from '../Tree/Tree';\nimport type { ConsentProps } from '../Consent/Consent';\nimport type { TimelineProps } from '../Timeline/Timeline';\nimport type { AvatarGroupProps } from '../AvatarGroup/AvatarGroup';\nimport type { MultiSuggestProps } from '../MultiSuggest/MultiSuggest';\nimport type { DateFieldProps } from '../DateField/DateField';\nimport type { CalendarProps } from '../Calendar/Calendar';\nimport type { FileDropProps } from '../FileDrop/FileDrop';\nimport type { ErrorSummaryProps } from '../ErrorSummary/ErrorSummary';\nimport type { PinFieldProps } from '../PinField/PinField';\nimport type { NumberFieldProps } from '../NumberField/NumberField';\nimport type { SecretFieldProps } from '../SecretField/SecretField';\nimport type { FooterProps } from '../Footer/Footer';\nimport type { MediaProps } from '../Media/Media';\nimport type { QuoteProps } from '../Quote/Quote';\nimport type { KbdProps } from '../Kbd/Kbd';\nimport type { TagProps } from '../Tag/Tag';\nimport type { CodeProps } from '../Code/Code';\nimport type { ContentsProps } from '../Contents/Contents';\nimport type { HairlineProps } from '../Hairline/Hairline';\nimport type { PageNavProps } from '../PageNav/PageNav';\nimport type { ProseProps } from '../Prose/Prose';\nimport type { RailProps } from '../Rail/Rail';\nimport type { SkipLinkProps } from '../SkipLink/SkipLink';\nimport { accentVars, resolveAccent } from './color';\nimport { hash, LAYER_ORDER, type SlurpCss } from './css';\n\nexport type ColorSchemeMode = 'light' | 'dark' | 'system';\nexport type ResolvedColorScheme = 'light' | 'dark';\n/** A `hue-*` preset (used as is) or any hex colour (turned into an accent with `vivid()`). */\nexport type AccentInput = `hue-${HueToken}` | `#${string}`;\n\ntype Themed = string | { light: string; dark: string };\ntype Length = string | number;\n\nexport interface TokenOverrides {\n color?: Partial<Record<ColorToken | `hue-${HueToken}`, Themed>>;\n space?: Partial<Record<SpaceToken, Length>>;\n radius?: Partial<Record<RadiusToken, Length>>;\n shadow?: Partial<Record<keyof typeof shadow, Themed>>;\n blur?: Partial<Record<keyof typeof blur, Length>>;\n}\n\n/** Defaults of the collapse / expand transitions started with useSlurp() (serialisable values only). */\nexport interface MotionOptions extends Pick<\n SlurpDefaults,\n 'duration' | 'stagger' | 'curve' | 'swell' | 'drop' | 'reducedMotion' | 'interrupt'\n> {\n goo: boolean | 'auto';\n ghost: GhostKind;\n order: 'distance' | 'dom';\n}\n\nconst { duration, stagger, curve, swell, drop, reducedMotion, interrupt } = MOTION_DEFAULTS;\nconst DEFAULT_MOTION: MotionOptions = {\n duration,\n stagger,\n curve,\n swell,\n drop,\n reducedMotion,\n interrupt,\n goo: 'auto',\n ghost: 'shape',\n order: 'distance',\n};\n\n/** Components that read defaults and `css` overrides from the theme, with their parts. */\nexport interface ThemeComponents {\n Lightbox: { props: LightboxProps; parts: 'root' };\n Compare: { props: CompareProps; parts: 'root' };\n Tree: { props: TreeProps; parts: 'root' };\n Consent: { props: ConsentProps; parts: 'root' };\n Timeline: { props: TimelineProps; parts: 'root' };\n AvatarGroup: { props: AvatarGroupProps; parts: 'root' };\n MultiSuggest: {\n props: MultiSuggestProps;\n parts: 'root' | 'label' | 'control' | 'list' | 'option' | 'tags' | 'tag' | 'hint' | 'error';\n };\n DateField: { props: DateFieldProps; parts: 'root' };\n Calendar: { props: CalendarProps; parts: 'root' };\n FileDrop: { props: FileDropProps; parts: 'root' };\n ErrorSummary: { props: ErrorSummaryProps; parts: 'root' };\n PinField: { props: PinFieldProps; parts: 'root' };\n NumberField: { props: NumberFieldProps; parts: 'root' };\n SecretField: { props: SecretFieldProps; parts: 'root' };\n Footer: { props: FooterProps; parts: 'root' };\n Media: { props: MediaProps; parts: 'root' | 'frame' | 'media' | 'caption' };\n Quote: { props: QuoteProps; parts: 'root' | 'quote' | 'caption' };\n Kbd: { props: KbdProps; parts: 'root' };\n Tag: { props: TagProps; parts: 'root' };\n AccentScope: { props: AccentScopeProps; parts: 'root' };\n Code: { props: CodeProps; parts: 'root' | 'bar' | 'filename' | 'copy' | 'pre' };\n Contents: { props: ContentsProps; parts: 'root' | 'title' | 'list' | 'item' | 'link' };\n Hairline: { props: HairlineProps; parts: 'root' };\n PageNav: { props: PageNavProps; parts: 'root' };\n Prose: { props: ProseProps; parts: 'root' };\n Rail: { props: RailProps; parts: 'root' };\n SkipLink: { props: SkipLinkProps; parts: 'root' };\n Bento: { props: BentoProps; parts: 'root' };\n Card: { props: CardProps; parts: 'root' | 'media' | 'badge' | 'title' | 'description' };\n Dock: { props: DockProps; parts: 'root' };\n Empty: { props: EmptyProps; parts: 'root' };\n Fact: { props: FactProps; parts: 'root' };\n Filters: { props: FiltersProps; parts: 'root' };\n Link: { props: LinkProps; parts: 'root' };\n List: { props: ListProps; parts: 'root' };\n ListRow: {\n props: ListRowProps;\n parts: 'root' | 'mark' | 'title' | 'link' | 'tag' | 'meta' | 'value' | 'action';\n };\n ResultRow: { props: ResultRowProps; parts: 'root' };\n Score: { props: ScoreProps; parts: 'root' };\n Settings: { props: SettingsProps; parts: 'root' };\n Shelf: { props: ShelfProps; parts: 'root' };\n Stage: { props: StageProps; parts: 'root' };\n Tile: {\n props: TileProps;\n parts: 'root' | 'blob' | 'text' | 'title' | 'subtitle' | 'badge' | 'media';\n };\n Avatar: { props: AvatarProps; parts: 'root' };\n Bloom: { props: BloomProps; parts: 'root' | 'surface' | 'trigger' | 'panel' };\n Bubble: { props: BubbleProps; parts: 'root' };\n Button: { props: ButtonProps; parts: 'root' | 'icon' | 'label' | 'endIcon' };\n Cell: { props: CellProps; parts: 'root' };\n Checkbox: { props: CheckboxProps; parts: 'root' | 'input' | 'box' | 'label' };\n Chip: { props: ChipProps; parts: 'root' };\n Choice: { props: ChoiceProps; parts: 'root' };\n Count: { props: CountProps; parts: 'root' };\n Dialog: {\n props: DialogProps;\n parts: 'root' | 'header' | 'title' | 'description' | 'body' | 'footer' | 'close';\n };\n Field: { props: FieldProps; parts: 'root' | 'label' | 'control' | 'hint' | 'error' };\n Flow: { props: FlowProps; parts: 'root' };\n Fold: { props: FoldProps; parts: 'root' | 'heading' | 'trigger' | 'region' };\n Frame: { props: FrameProps; parts: 'root' };\n Hint: { props: HintProps; parts: 'root' };\n Menu: { props: MenuProps; parts: 'root' };\n Notice: { props: NoticeProps; parts: 'root' | 'icon' | 'title' | 'body' | 'dismiss' };\n Placeholder: { props: PlaceholderProps; parts: 'root' };\n Progress: { props: ProgressProps; parts: 'root' };\n Radio: { props: RadioProps; parts: 'root' | 'input' | 'dot' | 'label' };\n RadioGroup: { props: RadioGroupProps; parts: 'root' | 'legend' };\n Range: { props: RangeProps; parts: 'root' | 'label' | 'value' | 'control' };\n Search: { props: SearchProps; parts: 'root' | 'icon' | 'control' | 'clear' | 'status' };\n Segmented: { props: SegmentedProps; parts: 'root' | 'item' };\n Sheet: {\n props: SheetProps;\n parts: 'root' | 'header' | 'title' | 'description' | 'body' | 'footer' | 'close';\n };\n Surface: { props: SurfaceProps; parts: 'root' };\n Swatch: { props: SwatchProps; parts: 'root' };\n SwatchGroup: { props: SwatchGroupProps; parts: 'root' };\n Switch: { props: SwitchProps; parts: 'root' | 'input' | 'track' | 'thumb' | 'label' };\n Tabs: { props: TabsProps; parts: 'root' | 'list' | 'tab' | 'indicator' | 'panel' };\n Text: { props: TextProps; parts: 'root' };\n Suggest: {\n props: SuggestProps;\n parts: 'root' | 'label' | 'control' | 'list' | 'option' | 'hint' | 'error';\n };\n Pages: { props: PagesProps; parts: 'root' | 'list' | 'item' | 'previous' | 'next' | 'status' };\n Steps: { props: StepsProps; parts: 'root' | 'list' | 'step' };\n Rating: { props: RatingProps; parts: 'root' };\n Table: { props: TableProps; parts: 'root' | 'table' | 'caption' };\n Carousel: {\n props: CarouselProps;\n parts: 'root' | 'track' | 'slide' | 'controls' | 'previous' | 'next' | 'dot';\n };\n}\nexport type ComponentName = keyof ThemeComponents;\n\nexport type ComponentsConfig = {\n [K in ComponentName]?: {\n defaults?: Partial<Omit<ThemeComponents[K]['props'], 'ref' | 'children' | 'css'>>;\n css?: Partial<Record<ThemeComponents[K]['parts'], SlurpCss>>;\n };\n};\n\nexport interface ThemeOptions {\n /** Initial colour scheme, until the person chooses one (default `system`). */\n colorScheme?: ColorSchemeMode;\n /** Default `hue-violet`. */\n accent?: AccentInput;\n /** Used only by Intl (numbers, prices). Not an i18n system. Default `it-IT`. */\n locale?: string;\n tokens?: TokenOverrides;\n motion?: Partial<MotionOptions>;\n components?: ComponentsConfig;\n}\n\nexport interface Theme {\n colorScheme: ColorSchemeMode;\n accent: AccentInput;\n /** The accent actually painted (hex). */\n accentColor: string;\n locale: string;\n tokens: TokenOverrides;\n motion: MotionOptions;\n components: ComponentsConfig;\n}\n\nconst DEFAULT_ACCENT: AccentInput = 'hue-violet';\n\n/** localStorage key of the chosen colour scheme (same as the design system's setTheme()). */\nexport const DEFAULT_STORAGE_KEY = 'slurp-theme';\n\nexport function createTheme(options: ThemeOptions = {}): Theme {\n const accent = options.accent ?? DEFAULT_ACCENT;\n return {\n colorScheme: options.colorScheme ?? 'system',\n accent,\n accentColor: resolveAccent(accent),\n locale: options.locale ?? 'it-IT',\n tokens: options.tokens ?? {},\n motion: { ...DEFAULT_MOTION, ...options.motion },\n components: options.components ?? {},\n };\n}\n\nexport const defaultTheme: Theme = createTheme();\n\nconst px = (v: Length) => (typeof v === 'number' ? `${v}px` : v);\n\n/** Light / dark declarations of the token overrides of a theme. */\nfunction overrideDeclarations(tokens: TokenOverrides) {\n const light: string[] = [];\n const dark: string[] = [];\n const add = (name: string, v: Themed | number) => {\n if (typeof v === 'object') {\n light.push(`--slurp-${name}:${v.light}`);\n dark.push(`--slurp-${name}:${v.dark}`);\n } else light.push(`--slurp-${name}:${px(v)}`);\n };\n for (const [k, v] of Object.entries(tokens.color ?? {})) if (v !== undefined) add(k, v);\n for (const [k, v] of Object.entries(tokens.space ?? {}))\n if (v !== undefined) add(`space-${k}`, v);\n for (const [k, v] of Object.entries(tokens.radius ?? {}))\n if (v !== undefined) add(`radius-${k}`, v);\n for (const [k, v] of Object.entries(tokens.shadow ?? {}))\n if (v !== undefined) add(`shadow-${k}`, v);\n for (const [k, v] of Object.entries(tokens.blur ?? {})) if (v !== undefined) add(`blur-${k}`, v);\n return { light, dark };\n}\n\nfunction selectors(scope: string | undefined) {\n if (!scope) {\n return {\n base: ':root,[data-theme]',\n dark: \"[data-theme='dark']\",\n systemDark: \":root:not([data-theme='light'])\",\n };\n }\n const s = `[data-slurp-theme=\"${scope}\"]`;\n return {\n base: `${s},${s} [data-theme]`,\n dark: `:root[data-theme='dark'] ${s},${s} [data-theme='dark']`,\n systemDark: `:root:not([data-theme='light']) ${s}`,\n };\n}\n\n/**\n * The stylesheet of a theme: accent variables and token overrides, on the root (or on a nested provider's `scope`)\n * and on every `data-theme` subtree, so derived values re-resolve per theme. Empty for the default theme.\n * tokens.css uses `:where()`, so these plain selectors win whatever the stylesheet order.\n */\nexport function themeCss(theme: Theme, scope?: string): string {\n const { light, dark } = overrideDeclarations(theme.tokens);\n const accent =\n theme.accent === DEFAULT_ACCENT\n ? []\n : Object.entries(accentVars(theme.accentColor)).map(([k, v]) => `${k}:${v}`);\n const base = [...accent, ...light];\n if (!base.length && !dark.length) return '';\n const sel = selectors(scope);\n const rules = [`${sel.base}{${base.join(';')}}`];\n if (dark.length) {\n rules.push(\n `${sel.dark}{${dark.join(';')}}`,\n `@media (prefers-color-scheme: dark){${sel.systemDark}{${dark.join(';')}}}`,\n );\n }\n return `${LAYER_ORDER}@layer slurp.base{${rules.join('')}}`;\n}\n\n/** Stable id of a stylesheet, for React's <style href> de-duplication. */\nexport const styleId = (prefix: string, css: string) => `slurp-${prefix}-${hash(css)}`;\n"],"mappings":";;;;;AA8GA,MAAM,EAAE,UAAU,SAAS,OAAO,OAAO,MAAM,eAAe,cAAc;AAC5E,MAAM,iBAAgC;CACpC;CACA;CACA;CACA;CACA;CACA;CACA;CACA,KAAK;CACL,OAAO;CACP,OAAO;AACT;AAyIA,MAAM,iBAA8B;;AAGpC,MAAa,sBAAsB;AAEnC,SAAgB,YAAY,UAAwB,CAAC,GAAU;CAC7D,MAAM,SAAS,QAAQ,UAAU;CACjC,OAAO;EACL,aAAa,QAAQ,eAAe;EACpC;EACA,aAAa,cAAc,MAAM;EACjC,QAAQ,QAAQ,UAAU;EAC1B,QAAQ,QAAQ,UAAU,CAAC;EAC3B,QAAQ;GAAE,GAAG;GAAgB,GAAG,QAAQ;EAAO;EAC/C,YAAY,QAAQ,cAAc,CAAC;CACrC;AACF;AAEA,MAAa,eAAsB,YAAY;AAE/C,MAAM,MAAM,MAAe,OAAO,MAAM,WAAW,GAAG,EAAE,MAAM;;AAG9D,SAAS,qBAAqB,QAAwB;CACpD,MAAM,QAAkB,CAAC;CACzB,MAAM,OAAiB,CAAC;CACxB,MAAM,OAAO,MAAc,MAAuB;EAChD,IAAI,OAAO,MAAM,UAAU;GACzB,MAAM,KAAK,WAAW,KAAK,GAAG,EAAE,OAAO;GACvC,KAAK,KAAK,WAAW,KAAK,GAAG,EAAE,MAAM;EACvC,OAAO,MAAM,KAAK,WAAW,KAAK,GAAG,GAAG,CAAC,GAAG;CAC9C;CACA,KAAK,MAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,OAAO,SAAS,CAAC,CAAC,GAAG,IAAI,MAAM,KAAA,GAAW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