@sixthshift/design-system 0.5.0 → 0.7.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 (433) hide show
  1. package/README.md +132 -87
  2. package/dist/components/Badge/Badge.d.ts +12 -4
  3. package/dist/components/Badge/Badge.d.ts.map +1 -1
  4. package/dist/components/Badge/Badge.js +8 -6
  5. package/dist/components/Badge/Badge.js.map +1 -1
  6. package/dist/components/Button/Button.d.ts +26 -3
  7. package/dist/components/Button/Button.d.ts.map +1 -1
  8. package/dist/components/Button/Button.js +14 -5
  9. package/dist/components/Button/Button.js.map +1 -1
  10. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  11. package/dist/components/Calendar/Calendar.js +1 -0
  12. package/dist/components/Calendar/Calendar.js.map +1 -1
  13. package/dist/components/Calendar/CalendarView.d.ts +0 -11
  14. package/dist/components/Calendar/CalendarView.d.ts.map +1 -1
  15. package/dist/components/Calendar/CalendarView.js +1 -0
  16. package/dist/components/Calendar/CalendarView.js.map +1 -1
  17. package/dist/components/Calendar/calendar.hooks.d.ts.map +1 -1
  18. package/dist/components/Calendar/calendar.hooks.js +1 -0
  19. package/dist/components/Calendar/calendar.hooks.js.map +1 -1
  20. package/dist/components/Card/Card.d.ts +2 -2
  21. package/dist/components/Card/Card.d.ts.map +1 -1
  22. package/dist/components/Card/Card.js +3 -2
  23. package/dist/components/Card/Card.js.map +1 -1
  24. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  25. package/dist/components/Checkbox/Checkbox.js +1 -0
  26. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  27. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
  28. package/dist/components/CheckboxGroup/CheckboxGroup.js +1 -0
  29. package/dist/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
  30. package/dist/components/Code/Editor/Editor.d.ts.map +1 -1
  31. package/dist/components/Code/Editor/Editor.js +1 -0
  32. package/dist/components/Code/Editor/Editor.js.map +1 -1
  33. package/dist/components/Code/Workspace/StatusBar.d.ts.map +1 -1
  34. package/dist/components/Code/Workspace/StatusBar.js +1 -0
  35. package/dist/components/Code/Workspace/StatusBar.js.map +1 -1
  36. package/dist/components/Code/Workspace/Toolbar.d.ts.map +1 -1
  37. package/dist/components/Code/Workspace/Toolbar.js +1 -0
  38. package/dist/components/Code/Workspace/Toolbar.js.map +1 -1
  39. package/dist/components/Code/Workspace/Workspace.d.ts.map +1 -1
  40. package/dist/components/Code/Workspace/Workspace.js +1 -0
  41. package/dist/components/Code/Workspace/Workspace.js.map +1 -1
  42. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  43. package/dist/components/DatePicker/DatePicker.js +7 -1
  44. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  45. package/dist/components/DatePicker/DateSegments.d.ts.map +1 -1
  46. package/dist/components/DatePicker/DateSegments.js +1 -0
  47. package/dist/components/DatePicker/DateSegments.js.map +1 -1
  48. package/dist/components/DatePicker/datepicker.hooks.d.ts.map +1 -1
  49. package/dist/components/DatePicker/datepicker.hooks.js +1 -0
  50. package/dist/components/DatePicker/datepicker.hooks.js.map +1 -1
  51. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  52. package/dist/components/DateRangePicker/DateRangePicker.js +1 -0
  53. package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
  54. package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
  55. package/dist/components/DateTimePicker/DateTimePicker.js +7 -1
  56. package/dist/components/DateTimePicker/DateTimePicker.js.map +1 -1
  57. package/dist/components/DateTimePicker/DateTimeSegments.d.ts.map +1 -1
  58. package/dist/components/DateTimePicker/DateTimeSegments.js +1 -0
  59. package/dist/components/DateTimePicker/DateTimeSegments.js.map +1 -1
  60. package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
  61. package/dist/components/DateTimeRangePicker/DateTimeRangePicker.js +7 -1
  62. package/dist/components/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
  63. package/dist/components/FormField/FormField.d.ts +31 -10
  64. package/dist/components/FormField/FormField.d.ts.map +1 -1
  65. package/dist/components/FormField/FormField.js +46 -17
  66. package/dist/components/FormField/FormField.js.map +1 -1
  67. package/dist/components/FormField/index.d.ts +2 -2
  68. package/dist/components/FormField/index.d.ts.map +1 -1
  69. package/dist/components/FormField/index.js +1 -1
  70. package/dist/components/FormField/index.js.map +1 -1
  71. package/dist/components/HoverCard/HoverCard.d.ts.map +1 -1
  72. package/dist/components/HoverCard/HoverCard.js +4 -0
  73. package/dist/components/HoverCard/HoverCard.js.map +1 -1
  74. package/dist/components/HoverCard/components/HoverCardContent.d.ts +16 -2
  75. package/dist/components/HoverCard/components/HoverCardContent.d.ts.map +1 -1
  76. package/dist/components/HoverCard/components/HoverCardContent.js +4 -3
  77. package/dist/components/HoverCard/components/HoverCardContent.js.map +1 -1
  78. package/dist/components/HoverCard/components/HoverCardContext.d.ts +2 -0
  79. package/dist/components/HoverCard/components/HoverCardContext.d.ts.map +1 -1
  80. package/dist/components/HoverCard/components/HoverCardContext.js +1 -0
  81. package/dist/components/HoverCard/components/HoverCardContext.js.map +1 -1
  82. package/dist/components/HoverCard/components/HoverCardTrigger.d.ts.map +1 -1
  83. package/dist/components/HoverCard/components/HoverCardTrigger.js +1 -0
  84. package/dist/components/HoverCard/components/HoverCardTrigger.js.map +1 -1
  85. package/dist/components/Message/Message.d.ts +5 -1
  86. package/dist/components/Message/Message.d.ts.map +1 -1
  87. package/dist/components/Message/Message.js +3 -3
  88. package/dist/components/Message/Message.js.map +1 -1
  89. package/dist/components/Modal/Modal.d.ts +26 -9
  90. package/dist/components/Modal/Modal.d.ts.map +1 -1
  91. package/dist/components/Modal/Modal.js +46 -21
  92. package/dist/components/Modal/Modal.js.map +1 -1
  93. package/dist/components/Modal/components/ModalContext.d.ts.map +1 -1
  94. package/dist/components/Modal/components/ModalContext.js +1 -0
  95. package/dist/components/Modal/components/ModalContext.js.map +1 -1
  96. package/dist/components/Modal/components/ModalHeader.d.ts.map +1 -1
  97. package/dist/components/Modal/components/ModalHeader.js +1 -0
  98. package/dist/components/Modal/components/ModalHeader.js.map +1 -1
  99. package/dist/components/Popover/Popover.d.ts +3 -1
  100. package/dist/components/Popover/Popover.d.ts.map +1 -1
  101. package/dist/components/Popover/Popover.js +8 -0
  102. package/dist/components/Popover/Popover.js.map +1 -1
  103. package/dist/components/Popover/components/PopoverBody.d.ts +16 -2
  104. package/dist/components/Popover/components/PopoverBody.d.ts.map +1 -1
  105. package/dist/components/Popover/components/PopoverBody.js +4 -3
  106. package/dist/components/Popover/components/PopoverBody.js.map +1 -1
  107. package/dist/components/Popover/components/PopoverClose.d.ts.map +1 -1
  108. package/dist/components/Popover/components/PopoverClose.js +1 -0
  109. package/dist/components/Popover/components/PopoverClose.js.map +1 -1
  110. package/dist/components/Popover/components/PopoverContext.d.ts +2 -0
  111. package/dist/components/Popover/components/PopoverContext.d.ts.map +1 -1
  112. package/dist/components/Popover/components/PopoverContext.js +1 -0
  113. package/dist/components/Popover/components/PopoverContext.js.map +1 -1
  114. package/dist/components/Popover/components/PopoverTrigger.d.ts.map +1 -1
  115. package/dist/components/Popover/components/PopoverTrigger.js +1 -0
  116. package/dist/components/Popover/components/PopoverTrigger.js.map +1 -1
  117. package/dist/components/RadioButton/RadioButton.d.ts.map +1 -1
  118. package/dist/components/RadioButton/RadioButton.js +1 -0
  119. package/dist/components/RadioButton/RadioButton.js.map +1 -1
  120. package/dist/components/RadioButtonGroup/RadioButtonGroup.d.ts.map +1 -1
  121. package/dist/components/RadioButtonGroup/RadioButtonGroup.js +1 -0
  122. package/dist/components/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  123. package/dist/components/SearchInput/SearchInput.d.ts +10 -7
  124. package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
  125. package/dist/components/SearchInput/SearchInput.js +11 -6
  126. package/dist/components/SearchInput/SearchInput.js.map +1 -1
  127. package/dist/components/Select/Select.d.ts +6 -0
  128. package/dist/components/Select/Select.d.ts.map +1 -1
  129. package/dist/components/Select/Select.js +11 -4
  130. package/dist/components/Select/Select.js.map +1 -1
  131. package/dist/components/Select/SelectDropdown.d.ts +3 -1
  132. package/dist/components/Select/SelectDropdown.d.ts.map +1 -1
  133. package/dist/components/Select/SelectDropdown.js +3 -2
  134. package/dist/components/Select/SelectDropdown.js.map +1 -1
  135. package/dist/components/Select/SelectTrigger.d.ts.map +1 -1
  136. package/dist/components/Select/SelectTrigger.js +5 -1
  137. package/dist/components/Select/SelectTrigger.js.map +1 -1
  138. package/dist/components/Select/useSelectKeyboard.d.ts.map +1 -1
  139. package/dist/components/Select/useSelectKeyboard.js +1 -0
  140. package/dist/components/Select/useSelectKeyboard.js.map +1 -1
  141. package/dist/components/Sheet/Sheet.d.ts +12 -0
  142. package/dist/components/Sheet/Sheet.d.ts.map +1 -1
  143. package/dist/components/Sheet/Sheet.js +26 -10
  144. package/dist/components/Sheet/Sheet.js.map +1 -1
  145. package/dist/components/Sheet/components/SheetContext.d.ts.map +1 -1
  146. package/dist/components/Sheet/components/SheetContext.js +1 -0
  147. package/dist/components/Sheet/components/SheetContext.js.map +1 -1
  148. package/dist/components/Sheet/components/SheetHeader.d.ts.map +1 -1
  149. package/dist/components/Sheet/components/SheetHeader.js +1 -0
  150. package/dist/components/Sheet/components/SheetHeader.js.map +1 -1
  151. package/dist/components/Spinner/Spinner.d.ts +2 -2
  152. package/dist/components/Spinner/Spinner.js +2 -2
  153. package/dist/components/Switch/Switch.d.ts.map +1 -1
  154. package/dist/components/Switch/Switch.js +1 -0
  155. package/dist/components/Switch/Switch.js.map +1 -1
  156. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  157. package/dist/components/Tabs/Tabs.js +1 -0
  158. package/dist/components/Tabs/Tabs.js.map +1 -1
  159. package/dist/components/Tabs/components/TabsContext.d.ts.map +1 -1
  160. package/dist/components/Tabs/components/TabsContext.js +1 -0
  161. package/dist/components/Tabs/components/TabsContext.js.map +1 -1
  162. package/dist/components/Tabs/components/TabsList.d.ts.map +1 -1
  163. package/dist/components/Tabs/components/TabsList.js +1 -0
  164. package/dist/components/Tabs/components/TabsList.js.map +1 -1
  165. package/dist/components/Tabs/components/TabsPanels.d.ts.map +1 -1
  166. package/dist/components/Tabs/components/TabsPanels.js +1 -0
  167. package/dist/components/Tabs/components/TabsPanels.js.map +1 -1
  168. package/dist/components/Tabs/components/TabsTrigger.d.ts.map +1 -1
  169. package/dist/components/Tabs/components/TabsTrigger.js +2 -1
  170. package/dist/components/Tabs/components/TabsTrigger.js.map +1 -1
  171. package/dist/components/TagChip/TagChip.d.ts.map +1 -1
  172. package/dist/components/TagChip/TagChip.js +1 -0
  173. package/dist/components/TagChip/TagChip.js.map +1 -1
  174. package/dist/components/TagInput/TagInput.d.ts +8 -2
  175. package/dist/components/TagInput/TagInput.d.ts.map +1 -1
  176. package/dist/components/TagInput/TagInput.js +8 -5
  177. package/dist/components/TagInput/TagInput.js.map +1 -1
  178. package/dist/components/Textarea/Textarea.d.ts +21 -5
  179. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  180. package/dist/components/Textarea/Textarea.js +31 -5
  181. package/dist/components/Textarea/Textarea.js.map +1 -1
  182. package/dist/components/TimePicker/PeriodSelector.d.ts.map +1 -1
  183. package/dist/components/TimePicker/PeriodSelector.js +1 -0
  184. package/dist/components/TimePicker/PeriodSelector.js.map +1 -1
  185. package/dist/components/TimePicker/TimeColumn.d.ts.map +1 -1
  186. package/dist/components/TimePicker/TimeColumn.js +1 -0
  187. package/dist/components/TimePicker/TimeColumn.js.map +1 -1
  188. package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
  189. package/dist/components/TimePicker/TimePicker.js +7 -1
  190. package/dist/components/TimePicker/TimePicker.js.map +1 -1
  191. package/dist/components/TimePicker/TimeSegments.d.ts.map +1 -1
  192. package/dist/components/TimePicker/TimeSegments.js +1 -0
  193. package/dist/components/TimePicker/TimeSegments.js.map +1 -1
  194. package/dist/components/Toast/Toast.d.ts +16 -2
  195. package/dist/components/Toast/Toast.d.ts.map +1 -1
  196. package/dist/components/Toast/Toast.js +17 -7
  197. package/dist/components/Toast/Toast.js.map +1 -1
  198. package/dist/components/Toggle/Toggle.d.ts +5 -1
  199. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  200. package/dist/components/Toggle/Toggle.js +4 -3
  201. package/dist/components/Toggle/Toggle.js.map +1 -1
  202. package/dist/components/ToggleGroup/ToggleGroupMultiple.d.ts +3 -0
  203. package/dist/components/ToggleGroup/ToggleGroupMultiple.d.ts.map +1 -1
  204. package/dist/components/ToggleGroup/ToggleGroupMultiple.js +4 -3
  205. package/dist/components/ToggleGroup/ToggleGroupMultiple.js.map +1 -1
  206. package/dist/components/ToggleGroup/ToggleGroupSingle.d.ts +3 -0
  207. package/dist/components/ToggleGroup/ToggleGroupSingle.d.ts.map +1 -1
  208. package/dist/components/ToggleGroup/ToggleGroupSingle.js +4 -3
  209. package/dist/components/ToggleGroup/ToggleGroupSingle.js.map +1 -1
  210. package/dist/components/ToggleGroup/toggleGroup.types.d.ts +13 -0
  211. package/dist/components/ToggleGroup/toggleGroup.types.d.ts.map +1 -1
  212. package/dist/components/Tooltip/Tooltip.d.ts +3 -1
  213. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  214. package/dist/components/Tooltip/Tooltip.js +4 -0
  215. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  216. package/dist/components/Tooltip/components/TooltipBody.d.ts +16 -2
  217. package/dist/components/Tooltip/components/TooltipBody.d.ts.map +1 -1
  218. package/dist/components/Tooltip/components/TooltipBody.js +4 -3
  219. package/dist/components/Tooltip/components/TooltipBody.js.map +1 -1
  220. package/dist/components/Tooltip/components/TooltipContext.d.ts +2 -0
  221. package/dist/components/Tooltip/components/TooltipContext.d.ts.map +1 -1
  222. package/dist/components/Tooltip/components/TooltipContext.js +1 -0
  223. package/dist/components/Tooltip/components/TooltipContext.js.map +1 -1
  224. package/dist/components/Tooltip/components/TooltipTrigger.d.ts.map +1 -1
  225. package/dist/components/Tooltip/components/TooltipTrigger.js +1 -0
  226. package/dist/components/Tooltip/components/TooltipTrigger.js.map +1 -1
  227. package/dist/hooks/useCollapsible.d.ts.map +1 -1
  228. package/dist/hooks/useCollapsible.js +1 -0
  229. package/dist/hooks/useCollapsible.js.map +1 -1
  230. package/dist/hooks/useControllableState.d.ts.map +1 -1
  231. package/dist/hooks/useControllableState.js +1 -0
  232. package/dist/hooks/useControllableState.js.map +1 -1
  233. package/dist/hooks/useDebouncedCallback.d.ts.map +1 -1
  234. package/dist/hooks/useDebouncedCallback.js +1 -0
  235. package/dist/hooks/useDebouncedCallback.js.map +1 -1
  236. package/dist/hooks/useDebouncedState.d.ts.map +1 -1
  237. package/dist/hooks/useDebouncedState.js +1 -0
  238. package/dist/hooks/useDebouncedState.js.map +1 -1
  239. package/dist/hooks/useDeviceFormFactor.d.ts.map +1 -1
  240. package/dist/hooks/useDeviceFormFactor.js +1 -0
  241. package/dist/hooks/useDeviceFormFactor.js.map +1 -1
  242. package/dist/hooks/useLocalStorage.d.ts.map +1 -1
  243. package/dist/hooks/useLocalStorage.js +1 -0
  244. package/dist/hooks/useLocalStorage.js.map +1 -1
  245. package/dist/hooks/useMergedFloatingRef.d.ts.map +1 -1
  246. package/dist/hooks/useMergedFloatingRef.js +1 -0
  247. package/dist/hooks/useMergedFloatingRef.js.map +1 -1
  248. package/dist/hooks/usePresence.d.ts.map +1 -1
  249. package/dist/hooks/usePresence.js +1 -0
  250. package/dist/hooks/usePresence.js.map +1 -1
  251. package/dist/hooks/useStack.d.ts.map +1 -1
  252. package/dist/hooks/useStack.js +34 -10
  253. package/dist/hooks/useStack.js.map +1 -1
  254. package/dist/hooks/useTheme.d.ts.map +1 -1
  255. package/dist/hooks/useTheme.js +1 -0
  256. package/dist/hooks/useTheme.js.map +1 -1
  257. package/dist/internal/PickerField.d.ts.map +1 -1
  258. package/dist/internal/PickerField.js +1 -0
  259. package/dist/internal/PickerField.js.map +1 -1
  260. package/dist/internal/SegmentedField.d.ts.map +1 -1
  261. package/dist/internal/SegmentedField.js +1 -0
  262. package/dist/internal/SegmentedField.js.map +1 -1
  263. package/dist/internal/brandScope.d.ts +25 -0
  264. package/dist/internal/brandScope.d.ts.map +1 -0
  265. package/dist/internal/brandScope.js +37 -0
  266. package/dist/internal/brandScope.js.map +1 -0
  267. package/dist/internal/escapeLayers.d.ts +12 -0
  268. package/dist/internal/escapeLayers.d.ts.map +1 -0
  269. package/dist/internal/escapeLayers.js +48 -0
  270. package/dist/internal/escapeLayers.js.map +1 -0
  271. package/dist/lib/ErrorBoundary.d.ts.map +1 -1
  272. package/dist/lib/ErrorBoundary.js +1 -0
  273. package/dist/lib/ErrorBoundary.js.map +1 -1
  274. package/dist/lib/contexts/ComponentsContext/ComponentsContext.d.ts.map +1 -1
  275. package/dist/lib/contexts/ComponentsContext/ComponentsContext.js +1 -0
  276. package/dist/lib/contexts/ComponentsContext/ComponentsContext.js.map +1 -1
  277. package/dist/lib/contexts/OverlayContext/OverlayContext.d.ts +9 -4
  278. package/dist/lib/contexts/OverlayContext/OverlayContext.d.ts.map +1 -1
  279. package/dist/lib/contexts/OverlayContext/OverlayContext.js +25 -12
  280. package/dist/lib/contexts/OverlayContext/OverlayContext.js.map +1 -1
  281. package/dist/lib/contexts/OverlayContext/ToastStack.d.ts +20 -0
  282. package/dist/lib/contexts/OverlayContext/ToastStack.d.ts.map +1 -0
  283. package/dist/lib/contexts/OverlayContext/ToastStack.js +45 -0
  284. package/dist/lib/contexts/OverlayContext/ToastStack.js.map +1 -0
  285. package/dist/lib/contexts/OverlayContext/hooks/useModal.d.ts.map +1 -1
  286. package/dist/lib/contexts/OverlayContext/hooks/useModal.js +1 -0
  287. package/dist/lib/contexts/OverlayContext/hooks/useModal.js.map +1 -1
  288. package/dist/lib/contexts/OverlayContext/hooks/useToast.d.ts +27 -10
  289. package/dist/lib/contexts/OverlayContext/hooks/useToast.d.ts.map +1 -1
  290. package/dist/lib/contexts/OverlayContext/hooks/useToast.js +31 -49
  291. package/dist/lib/contexts/OverlayContext/hooks/useToast.js.map +1 -1
  292. package/dist/lib/contexts/OverlayContext/index.d.ts +2 -0
  293. package/dist/lib/contexts/OverlayContext/index.d.ts.map +1 -1
  294. package/dist/lib/contexts/OverlayContext/index.js +2 -0
  295. package/dist/lib/contexts/OverlayContext/index.js.map +1 -1
  296. package/dist/lib/contexts/OverlayContext/toastStore.d.ts +68 -0
  297. package/dist/lib/contexts/OverlayContext/toastStore.d.ts.map +1 -0
  298. package/dist/lib/contexts/OverlayContext/toastStore.js +69 -0
  299. package/dist/lib/contexts/OverlayContext/toastStore.js.map +1 -0
  300. package/dist/lib/withErrorBoundary.d.ts.map +1 -1
  301. package/dist/lib/withErrorBoundary.js +1 -0
  302. package/dist/lib/withErrorBoundary.js.map +1 -1
  303. package/dist/lib/withSuspenseAndErrorBoundary.d.ts.map +1 -1
  304. package/dist/lib/withSuspenseAndErrorBoundary.js +1 -0
  305. package/dist/lib/withSuspenseAndErrorBoundary.js.map +1 -1
  306. package/dist/{theme/schema.d.ts → theming/vocabulary.d.ts} +4 -4
  307. package/dist/theming/vocabulary.d.ts.map +1 -0
  308. package/dist/{theme/schema.js → theming/vocabulary.js} +4 -4
  309. package/dist/theming/vocabulary.js.map +1 -0
  310. package/package.json +18 -6
  311. package/src/components/Badge/Badge.tsx +12 -6
  312. package/src/components/Button/Button.tsx +25 -5
  313. package/src/{theme/recipes/button.css → components/Button/button.recipe.css} +2 -2
  314. package/src/components/Calendar/Calendar.tsx +2 -0
  315. package/src/components/Calendar/CalendarView.tsx +2 -0
  316. package/src/components/Calendar/calendar.hooks.ts +2 -0
  317. package/src/components/Card/Card.tsx +4 -2
  318. package/src/components/Checkbox/Checkbox.tsx +2 -0
  319. package/src/components/CheckboxGroup/CheckboxGroup.tsx +2 -0
  320. package/src/components/Code/Editor/Editor.tsx +2 -0
  321. package/src/components/Code/Workspace/StatusBar.tsx +2 -0
  322. package/src/components/Code/Workspace/Toolbar.tsx +2 -0
  323. package/src/components/Code/Workspace/Workspace.tsx +2 -0
  324. package/src/components/DatePicker/DatePicker.tsx +10 -0
  325. package/src/components/DatePicker/DateSegments.tsx +2 -0
  326. package/src/components/DatePicker/datepicker.hooks.ts +2 -0
  327. package/src/components/DateRangePicker/DateRangePicker.tsx +2 -0
  328. package/src/components/DateTimePicker/DateTimePicker.tsx +10 -1
  329. package/src/components/DateTimePicker/DateTimeSegments.tsx +2 -0
  330. package/src/components/DateTimeRangePicker/DateTimeRangePicker.tsx +10 -1
  331. package/src/components/FormField/FormField.tsx +94 -42
  332. package/src/components/FormField/index.ts +2 -2
  333. package/src/components/HoverCard/HoverCard.tsx +5 -0
  334. package/src/components/HoverCard/components/HoverCardContent.tsx +13 -3
  335. package/src/components/HoverCard/components/HoverCardContext.tsx +4 -0
  336. package/src/components/HoverCard/components/HoverCardTrigger.tsx +2 -0
  337. package/src/components/Message/Message.tsx +27 -23
  338. package/src/components/Modal/Modal.tsx +88 -51
  339. package/src/components/Modal/components/ModalContext.tsx +2 -0
  340. package/src/components/Modal/components/ModalHeader.tsx +2 -0
  341. package/src/components/Popover/Popover.tsx +10 -0
  342. package/src/components/Popover/components/PopoverBody.tsx +13 -3
  343. package/src/components/Popover/components/PopoverClose.tsx +2 -0
  344. package/src/components/Popover/components/PopoverContext.tsx +4 -0
  345. package/src/components/Popover/components/PopoverTrigger.tsx +2 -0
  346. package/src/components/RadioButton/RadioButton.tsx +2 -0
  347. package/src/components/RadioButtonGroup/RadioButtonGroup.tsx +2 -0
  348. package/src/components/SearchInput/SearchInput.tsx +15 -8
  349. package/src/components/Select/Select.tsx +27 -2
  350. package/src/components/Select/SelectDropdown.tsx +6 -0
  351. package/src/components/Select/SelectTrigger.tsx +5 -0
  352. package/src/components/Select/useSelectKeyboard.ts +2 -0
  353. package/src/components/Sheet/Sheet.tsx +59 -34
  354. package/src/components/Sheet/components/SheetContext.tsx +2 -0
  355. package/src/components/Sheet/components/SheetHeader.tsx +2 -0
  356. package/src/components/Spinner/Spinner.tsx +2 -2
  357. package/src/components/Switch/Switch.tsx +2 -0
  358. package/src/components/Tabs/Tabs.tsx +2 -0
  359. package/src/components/Tabs/components/TabsContext.tsx +2 -0
  360. package/src/components/Tabs/components/TabsList.tsx +2 -0
  361. package/src/components/Tabs/components/TabsPanels.tsx +2 -0
  362. package/src/components/Tabs/components/TabsTrigger.tsx +3 -1
  363. package/src/{theme/recipes/tabs.css → components/Tabs/tabs.recipe.css} +1 -1
  364. package/src/components/TagChip/TagChip.tsx +2 -0
  365. package/src/components/TagInput/TagInput.tsx +15 -6
  366. package/src/components/Textarea/Textarea.tsx +42 -6
  367. package/src/{theme/recipes/textarea.css → components/Textarea/textarea.recipe.css} +1 -1
  368. package/src/components/TimePicker/PeriodSelector.tsx +2 -0
  369. package/src/components/TimePicker/TimeColumn.tsx +2 -0
  370. package/src/components/TimePicker/TimePicker.tsx +10 -0
  371. package/src/components/TimePicker/TimeSegments.tsx +2 -0
  372. package/src/components/Toast/Toast.tsx +26 -6
  373. package/src/components/Toggle/Toggle.tsx +20 -3
  374. package/src/components/ToggleGroup/ToggleGroupMultiple.tsx +8 -1
  375. package/src/components/ToggleGroup/ToggleGroupSingle.tsx +8 -0
  376. package/src/components/ToggleGroup/toggleGroup.types.ts +13 -0
  377. package/src/components/Tooltip/Tooltip.tsx +5 -0
  378. package/src/components/Tooltip/components/TooltipBody.tsx +13 -3
  379. package/src/components/Tooltip/components/TooltipContext.tsx +4 -0
  380. package/src/components/Tooltip/components/TooltipTrigger.tsx +2 -0
  381. package/src/hooks/useCollapsible.ts +2 -0
  382. package/src/hooks/useControllableState.ts +2 -0
  383. package/src/hooks/useDebouncedCallback.ts +2 -0
  384. package/src/hooks/useDebouncedState.ts +2 -0
  385. package/src/hooks/useDeviceFormFactor.ts +2 -0
  386. package/src/hooks/useLocalStorage.ts +2 -0
  387. package/src/hooks/useMergedFloatingRef.ts +2 -0
  388. package/src/hooks/usePresence.ts +2 -0
  389. package/src/hooks/useStack.ts +35 -12
  390. package/src/hooks/useTheme.ts +2 -0
  391. package/src/internal/PickerField.tsx +2 -0
  392. package/src/internal/SegmentedField.tsx +2 -0
  393. package/src/internal/brandScope.ts +39 -0
  394. package/src/internal/escapeLayers.ts +53 -0
  395. package/src/lib/ErrorBoundary.tsx +2 -0
  396. package/src/lib/contexts/ComponentsContext/ComponentsContext.tsx +2 -0
  397. package/src/lib/contexts/OverlayContext/OverlayContext.tsx +42 -26
  398. package/src/lib/contexts/OverlayContext/ToastStack.tsx +71 -0
  399. package/src/lib/contexts/OverlayContext/hooks/useModal.tsx +2 -0
  400. package/src/lib/contexts/OverlayContext/hooks/useToast.ts +30 -73
  401. package/src/lib/contexts/OverlayContext/index.ts +2 -0
  402. package/src/lib/contexts/OverlayContext/toastStore.ts +138 -0
  403. package/src/lib/withErrorBoundary.tsx +2 -0
  404. package/src/lib/withSuspenseAndErrorBoundary.tsx +2 -0
  405. package/src/theme/linen/index.css +11 -0
  406. package/src/theme/linen/palette.css +87 -0
  407. package/src/theme/linen/theme.css +371 -0
  408. package/src/theming/tailwind.css +356 -0
  409. package/src/{theme/schema.ts → theming/vocabulary.ts} +3 -3
  410. package/dist/theme/index.d.ts +0 -9
  411. package/dist/theme/index.d.ts.map +0 -1
  412. package/dist/theme/index.js +0 -8
  413. package/dist/theme/index.js.map +0 -1
  414. package/dist/theme/schema.d.ts.map +0 -1
  415. package/dist/theme/schema.js.map +0 -1
  416. package/src/theme/index.ts +0 -39
  417. package/src/theme/recipes/index.css +0 -28
  418. package/src/theme/tokens.css +0 -824
  419. /package/src/{theme/recipes/badge.css → components/Badge/badge.recipe.css} +0 -0
  420. /package/src/{theme/recipes/card.css → components/Card/card.recipe.css} +0 -0
  421. /package/src/{theme/recipes/checkbox.css → components/Checkbox/checkbox.recipe.css} +0 -0
  422. /package/src/{theme/recipes/field.css → components/Field/field.recipe.css} +0 -0
  423. /package/src/{theme/recipes/input.css → components/Input/input.recipe.css} +0 -0
  424. /package/src/{theme/recipes/message.css → components/Message/message.recipe.css} +0 -0
  425. /package/src/{theme/recipes/modal.css → components/Modal/modal.recipe.css} +0 -0
  426. /package/src/{theme/recipes/radio-button.css → components/RadioButton/radio-button.recipe.css} +0 -0
  427. /package/src/{theme/recipes/search-input.css → components/SearchInput/search-input.recipe.css} +0 -0
  428. /package/src/{theme/recipes/select.css → components/Select/select.recipe.css} +0 -0
  429. /package/src/{theme/recipes/sheet.css → components/Sheet/sheet.recipe.css} +0 -0
  430. /package/src/{theme/recipes/spinner.css → components/Spinner/spinner.recipe.css} +0 -0
  431. /package/src/{theme/recipes/switch.css → components/Switch/switch.recipe.css} +0 -0
  432. /package/src/{theme/recipes/tag-chip.css → components/TagChip/tag-chip.recipe.css} +0 -0
  433. /package/src/{theme/recipes/toggle.css → components/Toggle/toggle.recipe.css} +0 -0
@@ -0,0 +1,69 @@
1
+ // =============================================================================
2
+ // Defaults
3
+ // =============================================================================
4
+ export const DEFAULT_TOAST_DURATION = 5000;
5
+ export const DEFAULT_MAX_TOASTS = 3;
6
+ /** The lifetime an intent gets when none is given: failures stay, everything else expires. */
7
+ export function defaultToastDuration(intent) {
8
+ return intent === "danger" ? 0 : DEFAULT_TOAST_DURATION;
9
+ }
10
+ let opened = 0;
11
+ const nextId = () => `toast-${++opened}`;
12
+ // =============================================================================
13
+ // Store
14
+ // =============================================================================
15
+ const EMPTY = [];
16
+ export function createToastStore({ max = DEFAULT_MAX_TOASTS, newId = nextId } = {}) {
17
+ let toasts = EMPTY;
18
+ const listeners = new Set();
19
+ const set = (next) => {
20
+ toasts = next.length === 0 ? EMPTY : next;
21
+ for (const listener of [...listeners])
22
+ listener();
23
+ };
24
+ const close = (id) => {
25
+ const record = toasts.find((toast) => toast.id === id);
26
+ if (record === undefined || record.closing)
27
+ return;
28
+ set(toasts.map((toast) => (toast === record ? { ...toast, closing: true } : toast)));
29
+ };
30
+ return {
31
+ subscribe(listener) {
32
+ listeners.add(listener);
33
+ return () => void listeners.delete(listener);
34
+ },
35
+ snapshot: () => toasts,
36
+ open(options) {
37
+ const id = newId();
38
+ const record = { id, options, duration: options.duration ?? defaultToastDuration(options.intent), closing: false };
39
+ set([...toasts, record].slice(-max));
40
+ return { id, close: () => close(id) };
41
+ },
42
+ close,
43
+ remove(id) {
44
+ const next = toasts.filter((toast) => toast.id !== id);
45
+ if (next.length !== toasts.length)
46
+ set(next);
47
+ },
48
+ clear() {
49
+ if (toasts.every((toast) => toast.closing))
50
+ return;
51
+ set(toasts.map((toast) => ({ ...toast, closing: true })));
52
+ },
53
+ };
54
+ }
55
+ /** The app's one stack: what `OverlayProvider` renders unless handed another. */
56
+ export const toastStore = createToastStore();
57
+ /** Open a toast on the app's stack, from anywhere. Returns its id and a way to close it early. */
58
+ export function toast(options) {
59
+ return toastStore.open(options);
60
+ }
61
+ /** Begin a toast's exit on the app's stack. */
62
+ export function closeToast(id) {
63
+ toastStore.close(id);
64
+ }
65
+ /** Begin every toast's exit on the app's stack. */
66
+ export function closeAllToasts() {
67
+ toastStore.clear();
68
+ }
69
+ //# sourceMappingURL=toastStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toastStore.js","sourceRoot":"","sources":["../../../../src/lib/contexts/OverlayContext/toastStore.ts"],"names":[],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"withErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/lib/withErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,kBAAkB,KAAK,SAAS,CAAC;YAC7G,CAAC;;EAWpC"}
1
+ {"version":3,"file":"withErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/lib/withErrorBoundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,kBAAkB,KAAK,SAAS,CAAC;YAC7G,CAAC;;EAWpC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { ErrorBoundary } from "./ErrorBoundary.js";
3
4
  export function withErrorBoundary(Component, fallback) {
@@ -1 +1 @@
1
- {"version":3,"file":"withErrorBoundary.js","sourceRoot":"","sources":["../../src/lib/withErrorBoundary.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAA2B,MAAM,iBAAiB,CAAC;AAEzE,MAAM,UAAU,iBAAiB,CAAmB,SAA2B,EAAE,QAAgE;IAC/I,SAAS,iBAAiB,CAAC,KAAQ;QACjC,OAAO,CACL,KAAC,aAAa,IAAC,QAAQ,EAAE,QAAQ,YAC/B,KAAC,SAAS,OAAK,KAAK,GAAI,GACV,CACjB,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,WAAW,GAAG,qBAAqB,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,GAAG,CAAC;IAE/G,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
1
+ {"version":3,"file":"withErrorBoundary.js","sourceRoot":"","sources":["../../src/lib/withErrorBoundary.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,aAAa,EAA2B,MAAM,iBAAiB,CAAC;AAEzE,MAAM,UAAU,iBAAiB,CAAmB,SAA2B,EAAE,QAAgE;IAC/I,SAAS,iBAAiB,CAAC,KAAQ;QACjC,OAAO,CACL,KAAC,aAAa,IAAC,QAAQ,EAAE,QAAQ,YAC/B,KAAC,SAAS,OAAK,KAAK,GAAI,GACV,CACjB,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,WAAW,GAAG,qBAAqB,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,GAAG,CAAC;IAE/G,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"withSuspenseAndErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/lib/withSuspenseAndErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,kBAAkB,KAAK,SAAS,CAAC,CAAC;CACvE,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO;YAG7D,CAAC;;EAa/C"}
1
+ {"version":3,"file":"withSuspenseAndErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/lib/withSuspenseAndErrorBoundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,kBAAkB,KAAK,SAAS,CAAC,CAAC;CACvE,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO;YAG7D,CAAC;;EAa/C"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { Suspense } from "react";
3
4
  import { ErrorBoundary } from "./ErrorBoundary.js";
@@ -1 +1 @@
1
- {"version":3,"file":"withSuspenseAndErrorBoundary.js","sourceRoot":"","sources":["../../src/lib/withSuspenseAndErrorBoundary.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAA2B,MAAM,iBAAiB,CAAC;AAOzE,MAAM,UAAU,4BAA4B,CAAmB,SAA2B,EAAE,OAAgB;IAC1G,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAE5C,SAAS,4BAA4B,CAAC,KAAQ;QAC5C,OAAO,CACL,KAAC,aAAa,IAAC,QAAQ,EAAE,aAAa,YACpC,KAAC,QAAQ,IAAC,QAAQ,EAAE,QAAQ,YAC1B,KAAC,SAAS,OAAK,KAAK,GAAI,GACf,GACG,CACjB,CAAC;IACJ,CAAC;IAED,4BAA4B,CAAC,WAAW,GAAG,gCAAgC,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,GAAG,CAAC;IAErI,OAAO,4BAA4B,CAAC;AACtC,CAAC"}
1
+ {"version":3,"file":"withSuspenseAndErrorBoundary.js","sourceRoot":"","sources":["../../src/lib/withSuspenseAndErrorBoundary.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAA2B,MAAM,iBAAiB,CAAC;AAOzE,MAAM,UAAU,4BAA4B,CAAmB,SAA2B,EAAE,OAAgB;IAC1G,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAE5C,SAAS,4BAA4B,CAAC,KAAQ;QAC5C,OAAO,CACL,KAAC,aAAa,IAAC,QAAQ,EAAE,aAAa,YACpC,KAAC,QAAQ,IAAC,QAAQ,EAAE,QAAQ,YAC1B,KAAC,SAAS,OAAK,KAAK,GAAI,GACf,GACG,CACjB,CAAC;IACJ,CAAC;IAED,4BAA4B,CAAC,WAAW,GAAG,gCAAgC,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,GAAG,CAAC;IAErI,OAAO,4BAA4B,CAAC;AACtC,CAAC"}
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Theme Schema
2
+ * Token naming vocabulary
3
3
  *
4
4
  * The naming convention for design tokens, as types and as data:
5
5
  *
6
6
  * {context}-[on-]{intent}[-{weight}][-{state}]
7
7
  *
8
- * src/theme/tokens.css is the only place tokens are defined, and nothing derives
9
- * TypeScript from it. These types describe the *shape* a token name can take
8
+ * The theme sources (src/theme/<name>/ plus src/theming/tailwind.css) are the only place
9
+ * tokens are defined, and nothing derives TypeScript from them. These types describe the *shape* a token name can take
10
10
  * rather than enumerating the names that happen to exist today, which is why the
11
11
  * vocabulary below is the thing to edit when the system grows a new axis.
12
12
  *
@@ -78,4 +78,4 @@ export type ThemeSchema = {
78
78
  /** Type-safe CSS var reference */
79
79
  export declare function cssVar(token: ColorToken): string;
80
80
  export {};
81
- //# sourceMappingURL=schema.d.ts.map
81
+ //# sourceMappingURL=vocabulary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../../src/theming/vocabulary.ts"],"names":[],"mappings":"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"}
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Theme Schema
2
+ * Token naming vocabulary
3
3
  *
4
4
  * The naming convention for design tokens, as types and as data:
5
5
  *
6
6
  * {context}-[on-]{intent}[-{weight}][-{state}]
7
7
  *
8
- * src/theme/tokens.css is the only place tokens are defined, and nothing derives
9
- * TypeScript from it. These types describe the *shape* a token name can take
8
+ * The theme sources (src/theme/<name>/ plus src/theming/tailwind.css) are the only place
9
+ * tokens are defined, and nothing derives TypeScript from them. These types describe the *shape* a token name can take
10
10
  * rather than enumerating the names that happen to exist today, which is why the
11
11
  * vocabulary below is the thing to edit when the system grows a new axis.
12
12
  *
@@ -46,4 +46,4 @@ export const standaloneTokens = ["focus-ring"];
46
46
  export function cssVar(token) {
47
47
  return `var(--${token})`;
48
48
  }
49
- //# sourceMappingURL=schema.js.map
49
+ //# sourceMappingURL=vocabulary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/theming/vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAYH,gFAAgF;AAChF,aAAa;AACb,gFAAgF;AAEhF,gDAAgD;AAChD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAU,CAAC;AAGxD,0CAA0C;AAC1C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAGjE,mCAAmC;AACnC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAC;AAGlE,oBAAoB;AACpB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAG,SAAS,EAAE,GAAG,QAAQ,CAAU,CAAC;AAG9D,gFAAgF;AAChF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAG,SAAS,EAAE,OAAO,EAAE,SAAS,CAAU,CAAC;AAGnE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAGrD,yBAAyB;AACzB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAU,CAAC;AAGlE,0DAA0D;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,YAAY,CAAU,CAAC;AAiDxD,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF,kCAAkC;AAClC,MAAM,UAAU,MAAM,CAAC,KAAiB;IACtC,OAAO,SAAS,KAAK,GAAG,CAAC;AAC3B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sixthshift/design-system",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Personal design system - tokens, theme, and component library",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -38,10 +38,10 @@
38
38
  "!src/testing"
39
39
  ],
40
40
  "exports": {
41
- "./theme.css": "./src/theme/tokens.css",
42
- "./theme": {
43
- "types": "./dist/theme/index.d.ts",
44
- "import": "./dist/theme/index.js"
41
+ "./themes/linen.css": "./src/theme/linen/index.css",
42
+ "./theming": {
43
+ "types": "./dist/theming/vocabulary.d.ts",
44
+ "import": "./dist/theming/vocabulary.js"
45
45
  },
46
46
  "./utils": {
47
47
  "types": "./dist/lib/utils.d.ts",
@@ -318,11 +318,12 @@
318
318
  },
319
319
  "scripts": {
320
320
  "prepare": "bun run build",
321
- "build": "bun run clean:dist && bun run build:js && bun run scripts/check-exports.ts",
321
+ "build": "bun run clean:dist && bun run scripts/check-use-client.ts && bun run build:js && bun run scripts/check-exports.ts",
322
322
  "build:js": "tsc -p tsconfig.build.json && bun run scripts/fix-extensions.ts",
323
323
  "dev": "storybook dev -p 6006 --no-open",
324
324
  "build:storybook": "storybook build",
325
325
  "test": "vitest run --project unit --project date-time --project ssr --reporter=dot",
326
+ "test:coverage": "vitest run --project unit --project date-time --project ssr --coverage --reporter=dot",
326
327
  "test:verbose": "vitest run --project unit --project date-time --project ssr",
327
328
  "test:watch": "vitest --project unit --project date-time --project ssr",
328
329
  "test:ssr": "vitest run --project ssr",
@@ -340,6 +341,13 @@
340
341
  "check:fix": "biome check --write .",
341
342
  "check:recipes": "bun run scripts/check-recipes.ts",
342
343
  "check:contrast": "bun run scripts/check-contrast.ts",
344
+ "check:api": "bun run scripts/api-snapshot.ts --check",
345
+ "check:size": "bun run scripts/check-size.ts",
346
+ "api:update": "bun run scripts/api-snapshot.ts",
347
+ "check:published": "bun run scripts/check-published.ts",
348
+ "check:consumer-resolution": "bun run scripts/check-consumer-resolution.ts",
349
+ "check:use-client": "bun run scripts/check-use-client.ts",
350
+ "clean:artifacts": "rm -rf coverage .vitest-attachments",
343
351
  "clean": "rm -rf dist node_modules *.tsbuildinfo",
344
352
  "clean:dist": "rm -rf dist"
345
353
  },
@@ -352,6 +360,7 @@
352
360
  "tailwind-merge": "^3.4.0"
353
361
  },
354
362
  "devDependencies": {
363
+ "@arethetypeswrong/cli": "^0.18.5",
355
364
  "@biomejs/biome": "2.4.15",
356
365
  "@fontsource-variable/inter": "^5.2.8",
357
366
  "@fontsource-variable/jetbrains-mono": "^5.2.8",
@@ -374,12 +383,15 @@
374
383
  "@vitest/coverage-v8": "4.1.7",
375
384
  "@vitest/ui": "4.1.7",
376
385
  "commander": "^14.0.2",
386
+ "esbuild": "^0.28.2",
377
387
  "happy-dom": "^20.9.0",
378
388
  "monaco-editor": "^0.55.1",
379
389
  "playwright": "^1.57.0",
390
+ "publint": "^0.3.24",
380
391
  "react": "^18.2.0",
381
392
  "react-dom": "^18.2.0",
382
393
  "react-markdown": "^10.1.0",
394
+ "remark-gfm": "^4.0.1",
383
395
  "storybook": "^10.1.8",
384
396
  "tailwindcss": "^4",
385
397
  "typescript": "~5.7.2",
@@ -6,7 +6,7 @@ import * as React from "react";
6
6
  * Geometry and behaviour only.
7
7
  *
8
8
  * Every colour reads a `--badge-*` component token whose value is decided by
9
- * src/theme/recipes/badge.css. That file is the mapping from
9
+ * src/components/Badge/badge.recipe.css. That file is the mapping from
10
10
  * `(variant, intent)` to a semantic token — the layer that used to be
11
11
  * `compoundVariants` here, where it was compiled into class-name literals and
12
12
  * unreachable from outside. Nothing in this file names a colour, which is the
@@ -55,23 +55,29 @@ export type BadgeIntent = Loose<BadgeIntentName>;
55
55
  export type BadgeRecipeProps = VariantProps<typeof badgeVariants> & {
56
56
  variant?: BadgeVariant | undefined;
57
57
  intent?: BadgeIntent | undefined;
58
+ /** Re-points this element's brand tokens to a brand the theme defines. See the Scoped brands docs. */
59
+ brand?: string | undefined;
58
60
  className?: string | undefined;
59
61
  };
60
62
 
61
63
  /**
62
- * The class string plus the two attributes the recipe selects on.
64
+ * The class string plus the attributes the recipe selects on. `data-brand` is
65
+ * omitted unless `brand` is set, same as `buttonRecipe`.
63
66
  */
64
- export function badgeRecipe({ variant = "solid", intent = "brand", className }: BadgeRecipeProps) {
67
+ export function badgeRecipe({ variant = "solid", intent = "brand", brand, className }: BadgeRecipeProps) {
65
68
  return {
66
69
  className: cn(variantStructure[variant], badgeVariants({ className })),
67
70
  "data-variant": variant,
68
71
  "data-intent": intent,
72
+ "data-brand": brand,
69
73
  };
70
74
  }
71
75
 
72
76
  export type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {
73
77
  variant?: BadgeVariant | undefined;
74
78
  intent?: BadgeIntent | undefined;
79
+ /** Name of a brand the theme defines, rendered as `data-brand`. Omitted, the badge follows the nearest `data-brand` ancestor. */
80
+ brand?: string | undefined;
75
81
  };
76
82
 
77
83
  /**
@@ -85,12 +91,12 @@ export type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {
85
91
  * does not manage an accessible name of its own.
86
92
  *
87
93
  * Colour is not decided here: each `(variant, intent)` pairing resolves
88
- * through a `--badge-*` component token (src/theme/recipes/badge.css), the
94
+ * through a `--badge-*` component token (src/components/Badge/badge.recipe.css), the
89
95
  * same seam Button uses, so a consumer can re-point a cell without a
90
96
  * release.
91
97
  */
92
- export const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(({ className, variant = "solid", intent = "brand", ...props }, ref) => {
93
- return <span ref={ref} {...badgeRecipe({ variant, intent, className })} {...props} />;
98
+ export const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(({ className, variant = "solid", intent = "brand", brand, ...props }, ref) => {
99
+ return <span ref={ref} {...badgeRecipe({ variant, intent, brand, className })} {...props} />;
94
100
  });
95
101
  Badge.displayName = "Badge";
96
102
 
@@ -7,7 +7,7 @@ import { Slot } from "../../internal/Slot";
7
7
  * Geometry and behaviour only.
8
8
  *
9
9
  * Every colour reads a `--button-*` component token whose value is decided by
10
- * src/theme/recipes/button.css. That file is the mapping from
10
+ * src/components/Button/button.recipe.css. That file is the mapping from
11
11
  * `(variant, intent, state)` to a semantic token — the layer that used to be
12
12
  * `compoundVariants` here, where it was compiled into class-name literals and
13
13
  * unreachable from outside. Nothing in this file names a colour, which is the
@@ -86,18 +86,23 @@ export type ButtonIntent = Loose<ButtonIntentName>;
86
86
  export type ButtonRecipeProps = VariantProps<typeof buttonVariants> & {
87
87
  variant?: ButtonVariant | undefined;
88
88
  intent?: ButtonIntent | undefined;
89
+ /** Re-points this element's brand tokens to a brand the theme defines. See the Scoped brands docs. */
90
+ brand?: string | undefined;
89
91
  iconOnly?: boolean | undefined;
90
92
  className?: string | undefined;
91
93
  };
92
94
 
93
95
  /**
94
- * The class string plus the two attributes the recipe selects on.
96
+ * The class string plus the attributes the recipe selects on.
97
+ *
98
+ * `data-brand` is only emitted when `brand` is set: `undefined` makes React
99
+ * omit the attribute, so the element takes its brand from its surroundings.
95
100
  *
96
101
  * Shared with Toggle and ToggleGroupItem, which are built on Button's look. The
97
102
  * data attributes are half the contract now, so anything reusing that look has
98
103
  * to emit them as well or it lands on the recipe's floor instead of a cell.
99
104
  */
100
- export function buttonRecipe({ variant = "solid", intent = "neutral", size, iconOnly = false, className }: ButtonRecipeProps) {
105
+ export function buttonRecipe({ variant = "solid", intent = "neutral", brand, size, iconOnly = false, className }: ButtonRecipeProps) {
101
106
  return {
102
107
  className: cn(
103
108
  variantStructure[variant],
@@ -106,6 +111,7 @@ export function buttonRecipe({ variant = "solid", intent = "neutral", size, icon
106
111
  ),
107
112
  "data-variant": variant,
108
113
  "data-intent": intent,
114
+ "data-brand": brand,
109
115
  };
110
116
  }
111
117
 
@@ -113,6 +119,12 @@ export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &
113
119
  VariantProps<typeof buttonVariants> & {
114
120
  variant?: ButtonVariant | undefined;
115
121
  intent?: ButtonIntent | undefined;
122
+ /**
123
+ * Name of a brand the theme defines, rendered as `data-brand`. Re-points
124
+ * every brand token on this element, so `intent="brand"` takes that brand's
125
+ * colour. Omitted, the button follows the nearest `data-brand` ancestor.
126
+ */
127
+ brand?: string | undefined;
116
128
  /** Square the button at its current size, for an icon with no label. */
117
129
  iconOnly?: boolean;
118
130
  asChild?: boolean;
@@ -147,15 +159,23 @@ export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &
147
159
  * `aria-label`, since there is no text to name it. It is a separate prop rather
148
160
  * than a size, so `size="sm" iconOnly` is expressible.
149
161
  *
162
+ * `brand` scopes the `brand` intent to one of the theme's named brands
163
+ * (`<Button intent="brand" brand="mint">`), for a theme with more than one
164
+ * brand colour. It renders `data-brand` and nothing else; the theme's CSS gives
165
+ * the name meaning, and an unknown name falls back to the surrounding brand.
166
+ *
150
167
  * `asChild` renders the child element with Button's styling instead of a
151
168
  * `<button>`, for links that should look like buttons. `loading` shows a spinner
152
169
  * and disables the control, so it does not need `disabled` as well.
153
170
  */
154
171
  const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
155
- ({ className, variant = "solid", intent = "neutral", size, iconOnly = false, asChild = false, loading = false, children, disabled, ...props }, ref) => {
172
+ (
173
+ { className, variant = "solid", intent = "neutral", brand, size, iconOnly = false, asChild = false, loading = false, children, disabled, ...props },
174
+ ref
175
+ ) => {
156
176
  const Comp = asChild ? Slot : "button";
157
177
  return (
158
- <Comp {...buttonRecipe({ variant, intent, size, iconOnly, className })} ref={ref} disabled={disabled || loading} {...props}>
178
+ <Comp {...buttonRecipe({ variant, intent, brand, size, iconOnly, className })} ref={ref} disabled={disabled || loading} {...props}>
159
179
  {loading ? (
160
180
  <>
161
181
  <svg className="animate-spin" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" aria-hidden="true">
@@ -8,7 +8,7 @@
8
8
  * or intent the library never shipped.
9
9
  *
10
10
  * The grammar is `--button-{context}[-{state}]` — the same `context` and
11
- * `state` words the semantic layer uses (src/theme/schema.ts). Note what is
11
+ * `state` words the semantic layer uses (src/theming/vocabulary.ts). Note what is
12
12
  * deliberately *absent*: intent and weight never appear in a token name. They
13
13
  * select, via the `data-` attributes below. Putting them in the name
14
14
  * (`--button-bg-danger`) would restore the combinatorial explosion this layer
@@ -47,7 +47,7 @@
47
47
  --button-fg: var(--fg-on-brand);
48
48
  }
49
49
 
50
- /* `neutral` means *no colour family* — the grey tiers. It used to resolve to
50
+ /* `neutral` means *no colour family* — the grey ramp. It used to resolve to
51
51
  the brand fill, which made `intent="neutral"` mean one thing on Button and
52
52
  another on Badge and Message, where it was already grey. Button
53
53
  was the outlier; this is the cell that ends that. A brand-coloured button
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import * as React from "react";
2
4
  import { useCallback, useMemo } from "react";
3
5
  import {
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  /**
2
4
  * CalendarView — the Temporal-typed calendar grid.
3
5
  *
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import { useCallback, useMemo } from "react";
2
4
  import { addDays, formatDateMediumYear, isPlainDate, isSameDay, isSameMonth, startOfMonth, startOfWeek, Temporal, today } from "../../date-time";
3
5
  import type { DateRangeValue, DateSelectionState, DisabledDateMatcher, SelectionMode } from "./calendar.types";
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import { cn } from "@sixthshift/design-system/utils";
2
4
  import { cva, type VariantProps } from "class-variance-authority";
3
5
  import * as React from "react";
@@ -6,7 +8,7 @@ import * as React from "react";
6
8
  * Geometry only, plus the five `--card-*` component tokens.
7
9
  *
8
10
  * Every colour reads a `--card-*` token whose value is decided by
9
- * src/theme/recipes/card.css. `size` stays here: it is pure geometry
11
+ * src/components/Card/card.recipe.css. `size` stays here: it is pure geometry
10
12
  * (padding, header gap, corner radius), not colour, so it has no reason to
11
13
  * move — the same split Message.tsx documents.
12
14
  *
@@ -108,7 +110,7 @@ export type CardProps = Omit<React.HTMLAttributes<HTMLDivElement>, "title"> &
108
110
  * `role="button"`, `tabIndex={0}`, and both Enter and Space activate it, not
109
111
  * just a pointer click. Omit `onClick` for a purely presentational card.
110
112
  *
111
- * Colour reads `--card-*` component tokens (src/theme/recipes/card.css) —
113
+ * Colour reads `--card-*` component tokens (src/components/Card/card.recipe.css) —
112
114
  * the same seam Button and Badge use — so a consumer can re-point them
113
115
  * without a release.
114
116
  */
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import { useControllableState } from "@sixthshift/design-system/hooks";
2
4
  import { Label } from "@sixthshift/design-system/label";
3
5
  import { cn } from "@sixthshift/design-system/utils";
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import { Checkbox } from "@sixthshift/design-system/checkbox";
2
4
  import { useControllableState } from "@sixthshift/design-system/hooks";
3
5
  import { cn } from "@sixthshift/design-system/utils";
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import MonacoEditor from "@monaco-editor/react";
2
4
  import type { editor } from "monaco-editor";
3
5
  import type { HTMLAttributes } from "react";
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import type { HTMLAttributes, ReactNode } from "react";
2
4
 
3
5
  export type StatusBarItem = {
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import type { HTMLAttributes, ReactNode } from "react";
2
4
  import { Button } from "../../Button";
3
5
 
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import type { HTMLAttributes, ReactNode } from "react";
2
4
  import { useState } from "react";
3
5
  import { Editor } from "../Editor";
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import { autoUpdate, FloatingPortal, flip, offset, shift, useClick, useDismiss, useFloating, useInteractions } from "@floating-ui/react";
2
4
  import { useControllableState } from "@sixthshift/design-system/hooks";
3
5
  import { cn } from "@sixthshift/design-system/utils";
@@ -19,6 +21,8 @@ import {
19
21
  toISODateRange,
20
22
  } from "../../date-time";
21
23
  import { PickerField } from "../../internal";
24
+ import { closestBrand } from "../../internal/brandScope";
25
+ import { useEscapeLayer } from "../../internal/escapeLayers";
22
26
  import { CalendarView } from "../Calendar/CalendarView";
23
27
  import { isDateDisabled } from "../Calendar/calendar.hooks";
24
28
  import type { PresetOption } from "../Calendar/calendar.types";
@@ -236,6 +240,10 @@ export const DatePicker = React.forwardRef<HTMLDivElement, DatePickerProps>((pro
236
240
 
237
241
  const click = useClick(context);
238
242
  const dismiss = useDismiss(context);
243
+
244
+ // While open, an Escape press closes this picker's popover and must not
245
+ // also close a Modal/Sheet it is rendered inside.
246
+ useEscapeLayer(open);
239
247
  const { getReferenceProps, getFloatingProps } = useInteractions([click, dismiss]);
240
248
 
241
249
  // IDs for accessibility
@@ -532,6 +540,8 @@ export const DatePicker = React.forwardRef<HTMLDivElement, DatePickerProps>((pro
532
540
  role="dialog"
533
541
  aria-label="Choose date"
534
542
  style={floatingStyles}
543
+ // Portalled out of the trigger's brand scope, so carry it across.
544
+ data-brand={closestBrand(context.elements.domReference)}
535
545
  className="z-popover rounded-xl border border-border-normal bg-bg-normal p-4 shadow-lg"
536
546
  {...getFloatingProps()}
537
547
  >
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import { type Temporal, today, toISODate } from "../../date-time";
2
4
  import { SegmentedField, type SegmentSpec, type SegmentValues } from "../../internal";
3
5
  import type { DateSegmentOrder } from "./datepicker.types";
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import { useCallback } from "react";
2
4
  import { formatDateMediumYear, isPlainDate, Temporal } from "../../date-time";
3
5
  import type { DatePickerMode, DateRangeValue, DateSelectionState, DisabledDateMatcher } from "./datepicker.types";
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import * as React from "react";
2
4
  import { useMemo } from "react";
3
5
  import { addDaysISO, startOfMonthISO, todayISO } from "../../date-time";
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import { autoUpdate, FloatingPortal, flip, offset, shift, useClick, useDismiss, useFloating, useInteractions } from "@floating-ui/react";
2
4
  import { useControllableState } from "@sixthshift/design-system/hooks";
3
5
  import { cn } from "@sixthshift/design-system/utils";
@@ -13,8 +15,9 @@ import {
13
15
  today,
14
16
  toISOInstantOrUndefined,
15
17
  } from "../../date-time";
16
-
17
18
  import { PickerField } from "../../internal";
19
+ import { closestBrand } from "../../internal/brandScope";
20
+ import { useEscapeLayer } from "../../internal/escapeLayers";
18
21
  import { Button } from "../Button";
19
22
  import { CalendarView } from "../Calendar/CalendarView";
20
23
  import { isDateDisabled } from "../Calendar/calendar.hooks";
@@ -251,6 +254,10 @@ export const DateTimePicker = React.forwardRef<HTMLDivElement, DateTimePickerPro
251
254
 
252
255
  const click = useClick(context);
253
256
  const dismiss = useDismiss(context);
257
+
258
+ // While open, an Escape press closes this picker's popover and must not
259
+ // also close a Modal/Sheet it is rendered inside.
260
+ useEscapeLayer(open);
254
261
  const { getReferenceProps, getFloatingProps } = useInteractions([click, dismiss]);
255
262
 
256
263
  // IDs for accessibility
@@ -404,6 +411,8 @@ export const DateTimePicker = React.forwardRef<HTMLDivElement, DateTimePickerPro
404
411
  role="dialog"
405
412
  aria-label="Choose date and time"
406
413
  style={floatingStyles}
414
+ // Portalled out of the trigger's brand scope, so carry it across.
415
+ data-brand={closestBrand(context.elements.domReference)}
407
416
  className="z-popover rounded-xl border border-border-normal bg-bg-normal p-4 shadow-lg"
408
417
  {...getFloatingProps()}
409
418
  >
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import { Temporal } from "../../date-time";
2
4
  import { SegmentedField, type SegmentSpec, type SegmentValues } from "../../internal";
3
5
  import { dateFromSegments, dateSpec, dateToSegments, parseDatePasteIn } from "../DatePicker/DateSegments";
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import { autoUpdate, FloatingPortal, flip, offset, shift, useClick, useDismiss, useFloating, useInteractions } from "@floating-ui/react";
2
4
  import { useControllableState } from "@sixthshift/design-system/hooks";
3
5
  import { cn } from "@sixthshift/design-system/utils";
@@ -16,8 +18,9 @@ import {
16
18
  toISOInstant,
17
19
  toISOInstantRange,
18
20
  } from "../../date-time";
19
-
20
21
  import { PickerField } from "../../internal";
22
+ import { closestBrand } from "../../internal/brandScope";
23
+ import { useEscapeLayer } from "../../internal/escapeLayers";
21
24
  import { Button } from "../Button";
22
25
  import { CalendarView } from "../Calendar/CalendarView";
23
26
  import { isDateDisabled } from "../Calendar/calendar.hooks";
@@ -412,6 +415,10 @@ export const DateTimeRangePicker = React.forwardRef<HTMLDivElement, DateTimeRang
412
415
 
413
416
  const click = useClick(context);
414
417
  const dismiss = useDismiss(context);
418
+
419
+ // While open, an Escape press closes this picker's popover and must not
420
+ // also close a Modal/Sheet it is rendered inside.
421
+ useEscapeLayer(open);
415
422
  const { getReferenceProps, getFloatingProps } = useInteractions([click, dismiss]);
416
423
 
417
424
  // IDs for accessibility
@@ -624,6 +631,8 @@ export const DateTimeRangePicker = React.forwardRef<HTMLDivElement, DateTimeRang
624
631
  role="dialog"
625
632
  aria-label="Choose date and time range"
626
633
  style={floatingStyles}
634
+ // Portalled out of the trigger's brand scope, so carry it across.
635
+ data-brand={closestBrand(context.elements.domReference)}
627
636
  className="z-popover rounded-xl border border-border-normal bg-bg-normal p-4 shadow-lg"
628
637
  {...getFloatingProps()}
629
638
  >