@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
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCard.d.ts","sourceRoot":"","sources":["../../../src/components/HoverCard/HoverCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,SAAS,EAAoF,MAAM,oBAAoB,CAAC;AAEhK,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,MAAM,MAAM,cAAc,GAAG;IAC3B,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uCAAuC;IACvC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,+CAA+C;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oCAAoC;IACpC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,yHAAyH;IACzH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB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,GAAG,OAAO,aAAa,GAAG;IAC/C,OAAO,EAAE,OAAO,gBAAgB,CAAC;IACjC,OAAO,EAAE,OAAO,gBAAgB,CAAC;CAClC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,kBAGtB,CAAC"}
@@ -1,6 +1,8 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { autoUpdate, flip, offset, safePolygon, shift, useDismiss, useFloating, useFocus, useHover, useInteractions } from "@floating-ui/react";
3
4
  import { useControllableState } from "@sixthshift/design-system/hooks";
5
+ import { closestBrand } from "../../internal/brandScope.js";
4
6
  import { HoverCardContent } from "./components/HoverCardContent.js";
5
7
  import { HoverCardContext } from "./components/HoverCardContext.js";
6
8
  import { HoverCardTrigger } from "./components/HoverCardTrigger.js";
@@ -32,6 +34,8 @@ const HoverCardRoot = ({ open: controlledOpen, onOpenChange, defaultOpen = false
32
34
  setFloating: refs.setFloating,
33
35
  },
34
36
  floatingStyles,
37
+ // Read at render: `domReference` is state, so this updates once the trigger mounts.
38
+ inheritedBrand: closestBrand(context.elements.domReference),
35
39
  getReferenceProps,
36
40
  getFloatingProps,
37
41
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCard.js","sourceRoot":"","sources":["../../../src/components/HoverCard/HoverCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAkB,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChK,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAqBjE,MAAM,aAAa,GA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 -1,4 +1,18 @@
1
1
  import * as React from "react";
2
- export type HoverCardContentProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const HoverCardContent: React.ForwardRefExoticComponent<HoverCardContentProps & React.RefAttributes<HTMLDivElement>>;
2
+ export type HoverCardContentProps = React.HTMLAttributes<HTMLDivElement> & {
3
+ /**
4
+ * Name of a brand the theme defines, rendered as `data-brand`. Omitted, the
5
+ * body copies the brand scope of its trigger, which the portal would
6
+ * otherwise leave behind.
7
+ */
8
+ brand?: string | undefined;
9
+ };
10
+ export declare const HoverCardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
11
+ /**
12
+ * Name of a brand the theme defines, rendered as `data-brand`. Omitted, the
13
+ * body copies the brand scope of its trigger, which the portal would
14
+ * otherwise leave behind.
15
+ */
16
+ brand?: string | undefined;
17
+ } & React.RefAttributes<HTMLDivElement>>;
4
18
  //# sourceMappingURL=HoverCardContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCardContent.d.ts","sourceRoot":"","sources":["../../../../src/components/HoverCard/components/HoverCardContent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEzE,eAAO,MAAM,gBAAgB,8FAqB3B,CAAC"}
1
+ {"version":3,"file":"HoverCardContent.d.ts","sourceRoot":"","sources":["../../../../src/components/HoverCard/components/HoverCardContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IACzE;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,gBAAgB;IAR3B;;;;OAIG;YACK,MAAM,GAAG,SAAS;wCAyB1B,CAAC"}
@@ -1,10 +1,11 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { FloatingPortal } from "@floating-ui/react";
3
4
  import { cn } from "@sixthshift/design-system/utils";
4
5
  import * as React from "react";
5
6
  import { useHoverCardContext } from "./HoverCardContext.js";
6
- export const HoverCardContent = React.forwardRef(({ className, children, ...props }, forwardedRef) => {
7
- const { open, refs, floatingStyles, getFloatingProps } = useHoverCardContext();
7
+ export const HoverCardContent = React.forwardRef(({ className, brand, children, ...props }, forwardedRef) => {
8
+ const { open, refs, floatingStyles, inheritedBrand, getFloatingProps } = useHoverCardContext();
8
9
  if (!open)
9
10
  return null;
10
11
  return (_jsx(FloatingPortal, { children: _jsx("div", { ref: (node) => {
@@ -13,7 +14,7 @@ export const HoverCardContent = React.forwardRef(({ className, children, ...prop
13
14
  forwardedRef(node);
14
15
  else if (forwardedRef)
15
16
  forwardedRef.current = node;
16
- }, style: floatingStyles, className: cn("z-popover w-80 rounded-lg border border-border-normal bg-bg-normal p-4 shadow-lg", className), ...getFloatingProps(props), children: children }) }));
17
+ }, style: floatingStyles, "data-brand": brand ?? inheritedBrand, className: cn("z-popover w-80 rounded-lg border border-border-normal bg-bg-normal p-4 shadow-lg", className), ...getFloatingProps(props), children: children }) }));
17
18
  });
18
19
  HoverCardContent.displayName = "HoverCardContent";
19
20
  //# sourceMappingURL=HoverCardContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCardContent.js","sourceRoot":"","sources":["../../../../src/components/HoverCard/components/HoverCardContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAIzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAwC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE;IAC1I,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,gBAAgB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAE/E,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,OAAO,CACL,KAAC,cAAc,cACb,cACE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;gBACZ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;gBACvB,IAAI,OAAO,YAAY,KAAK,UAAU;oBAAE,YAAY,CAAC,IAAI,CAAC,CAAC;qBACtD,IAAI,YAAY;oBAAE,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;YACrD,CAAC,EACD,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,EAAE,CAAC,kFAAkF,EAAE,SAAS,CAAC,KACxG,gBAAgB,CAAC,KAAK,CAAC,YAE1B,QAAQ,GACL,GACS,CAClB,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
1
+ {"version":3,"file":"HoverCardContent.js","sourceRoot":"","sources":["../../../../src/components/HoverCard/components/HoverCardContent.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAWzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAwC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE;IACjJ,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAE/F,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,OAAO,CACL,KAAC,cAAc,cACb,cACE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;gBACZ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;gBACvB,IAAI,OAAO,YAAY,KAAK,UAAU;oBAAE,YAAY,CAAC,IAAI,CAAC,CAAC;qBACtD,IAAI,YAAY;oBAAE,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;YACrD,CAAC,EACD,KAAK,EAAE,cAAc,gBACT,KAAK,IAAI,cAAc,EACnC,SAAS,EAAE,EAAE,CAAC,kFAAkF,EAAE,SAAS,CAAC,KACxG,gBAAgB,CAAC,KAAK,CAAC,YAE1B,QAAQ,GACL,GACS,CAClB,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
@@ -5,6 +5,8 @@ export type HoverCardContextValue = {
5
5
  setFloating: (node: HTMLElement | null) => void;
6
6
  };
7
7
  floatingStyles: React.CSSProperties;
8
+ /** The trigger's brand scope, re-stamped on the portalled body. */
9
+ inheritedBrand: string | undefined;
8
10
  getReferenceProps: (props?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
9
11
  getFloatingProps: (props?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
10
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCardContext.d.ts","sourceRoot":"","sources":["../../../../src/components/HoverCard/components/HoverCardContext.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE;QACJ,YAAY,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;QACjD,WAAW,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;KACjD,CAAC;IACF,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC;IACpC,iBAAiB,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrF,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrF,CAAC;AAEF,eAAO,MAAM,gBAAgB,uDAAoD,CAAC;AAElF,wBAAgB,mBAAmB,0BAMlC"}
1
+ {"version":3,"file":"HoverCardContext.d.ts","sourceRoot":"","sources":["../../../../src/components/HoverCard/components/HoverCardContext.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE;QACJ,YAAY,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;QACjD,WAAW,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;KACjD,CAAC;IACF,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC;IACpC,mEAAmE;IACnE,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,iBAAiB,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrF,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrF,CAAC;AAEF,eAAO,MAAM,gBAAgB,uDAAoD,CAAC;AAElF,wBAAgB,mBAAmB,0BAMlC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { createContext, useContext } from "react";
2
3
  export const HoverCardContext = createContext(null);
3
4
  export function useHoverCardContext() {
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCardContext.js","sourceRoot":"","sources":["../../../../src/components/HoverCard/components/HoverCardContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAalD,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAA+B,IAAI,CAAC,CAAC;AAElF,MAAM,UAAU,mBAAmB;IACjC,MAAM,OAAO,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
1
+ {"version":3,"file":"HoverCardContext.js","sourceRoot":"","sources":["../../../../src/components/HoverCard/components/HoverCardContext.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAelD,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAA+B,IAAI,CAAC,CAAC;AAElF,MAAM,UAAU,mBAAmB;IACjC,MAAM,OAAO,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCardTrigger.d.ts","sourceRoot":"","sources":["../../../../src/components/HoverCard/components/HoverCardTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG;IACtE,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,gBAAgB;IAJ3B,sGAAsG;cAC5F,OAAO;qCAuBjB,CAAC"}
1
+ {"version":3,"file":"HoverCardTrigger.d.ts","sourceRoot":"","sources":["../../../../src/components/HoverCard/components/HoverCardTrigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG;IACtE,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,gBAAgB;IAJ3B,sGAAsG;cAC5F,OAAO;qCAuBjB,CAAC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import * as React from "react";
3
4
  import { Slot } from "../../../internal/Slot.js";
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCardTrigger.js","sourceRoot":"","sources":["../../../../src/components/HoverCard/components/HoverCardTrigger.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAOzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAqC,CAAC,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE;IACvJ,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IAErC,OAAO,CACL,KAAC,IAAI,IACH,GAAG,EAAE,CAAC,IAAwB,EAAE,EAAE;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,UAAU;gBAAE,YAAY,CAAC,IAAI,CAAC,CAAC;iBACtD,IAAI,YAAY;gBAAG,YAAsD,CAAC,OAAO,GAAG,IAAI,CAAC;QAChG,CAAC;QACD,0EAA0E;QAC1E,uEAAuE;QACvE,+DAA+D;QAC/D,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,SAAS,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,KAC9D,iBAAiB,CAAC,KAAK,CAAC,YAE3B,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
@@ -4,7 +4,7 @@ import * as React from "react";
4
4
  * Geometry only, plus the three `--message-*` component tokens.
5
5
  *
6
6
  * Every colour reads a `--message-*` component token whose value is decided by
7
- * src/theme/recipes/message.css. That file is the mapping from `intent` to a
7
+ * src/components/Message/message.recipe.css. That file is the mapping from `intent` to a
8
8
  * semantic token — the layer that used to be the `intent` entry in `variants`
9
9
  * here, compiled into class-name literals and unreachable from outside.
10
10
  * `size` stays here: it is pure geometry (padding, gap, font-size), not
@@ -24,6 +24,8 @@ export type MessageIntentName = "neutral" | "success" | "warning" | "danger";
24
24
  export type MessageIntent = Loose<MessageIntentName>;
25
25
  export type MessageProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof messageVariants> & {
26
26
  intent?: MessageIntent | undefined;
27
+ /** Name of a brand the theme defines, rendered as `data-brand`. Omitted, the message follows the nearest `data-brand` ancestor. */
28
+ brand?: string | undefined;
27
29
  /** Simple API: Optional title displayed above children */
28
30
  title?: React.ReactNode;
29
31
  /** Simple API: Optional icon displayed on the left */
@@ -58,6 +60,8 @@ export declare const Message: React.ForwardRefExoticComponent<React.HTMLAttribut
58
60
  size?: "sm" | "md" | null | undefined;
59
61
  } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
60
62
  intent?: MessageIntent | undefined;
63
+ /** Name of a brand the theme defines, rendered as `data-brand`. Omitted, the message follows the nearest `data-brand` ancestor. */
64
+ brand?: string | undefined;
61
65
  /** Simple API: Optional title displayed above children */
62
66
  title?: React.ReactNode;
63
67
  /** Simple API: Optional icon displayed on the left */
@@ -1 +1 @@
1
- {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/components/Message/Message.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;8EAgB3B,CAAC;AAEF;;;;;GAKG;AACH,KAAK,KAAK,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC7E,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAC7D,YAAY,CAAC,OAAO,eAAe,CAAC,GAAG;IACrC,MAAM,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACnC,0DAA0D;IAC1D,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,sDAAsD;IACtD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,CAAC;AAsBJ;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,OAAO;;;aApDP,aAAa,GAAG,SAAS;IAClC,0DAA0D;YAClD,KAAK,CAAC,SAAS;IACvB,sDAAsD;WAC/C,KAAK,CAAC,SAAS;wCAsExB,CAAC"}
1
+ {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/components/Message/Message.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;8EAgB3B,CAAC;AAEF;;;;;GAKG;AACH,KAAK,KAAK,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC7E,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAC7D,YAAY,CAAC,OAAO,eAAe,CAAC,GAAG;IACrC,MAAM,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACnC,mIAAmI;IACnI,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,0DAA0D;IAC1D,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,sDAAsD;IACtD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,CAAC;AAsBJ;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,OAAO;;;aAtDP,aAAa,GAAG,SAAS;IAClC,mIAAmI;YAC3H,MAAM,GAAG,SAAS;IAC1B,0DAA0D;YAClD,KAAK,CAAC,SAAS;IACvB,sDAAsD;WAC/C,KAAK,CAAC,SAAS;wCAwEzB,CAAC"}
@@ -10,7 +10,7 @@ import { MessageTitle } from "./components/MessageTitle.js";
10
10
  * Geometry only, plus the three `--message-*` component tokens.
11
11
  *
12
12
  * Every colour reads a `--message-*` component token whose value is decided by
13
- * src/theme/recipes/message.css. That file is the mapping from `intent` to a
13
+ * src/components/Message/message.recipe.css. That file is the mapping from `intent` to a
14
14
  * semantic token — the layer that used to be the `intent` entry in `variants`
15
15
  * here, compiled into class-name literals and unreachable from outside.
16
16
  * `size` stays here: it is pure geometry (padding, gap, font-size), not
@@ -75,10 +75,10 @@ function intentRole(intent) {
75
75
  * simple API can't express. Message detects which one is in use by
76
76
  * inspecting its children, so the two aren't meant to be mixed.
77
77
  */
78
- export const Message = React.forwardRef(({ className, intent = "neutral", size, title, icon, children, ...props }, ref) => {
78
+ export const Message = React.forwardRef(({ className, intent = "neutral", brand, size, title, icon, children, ...props }, ref) => {
79
79
  const hasCompoundChildren = React.Children.toArray(children).some((child) => React.isValidElement(child) &&
80
80
  (child.type === MessageIcon || child.type === MessageBody || child.type === MessageTitle || child.type === MessageDescription));
81
- return (_jsx("div", { ref: ref, role: intentRole(intent), "data-intent": intent, className: cn(messageVariants({ size, className })), ...props, children: hasCompoundChildren ? (children) : (_jsxs(_Fragment, { children: [icon && _jsx(MessageIcon, { children: icon }), _jsxs(MessageBody, { children: [title && _jsx(MessageTitle, { children: title }), _jsx(MessageDescription, { children: children })] })] })) }));
81
+ return (_jsx("div", { ref: ref, role: intentRole(intent), "data-intent": intent, "data-brand": brand, className: cn(messageVariants({ size, className })), ...props, children: hasCompoundChildren ? (children) : (_jsxs(_Fragment, { children: [icon && _jsx(MessageIcon, { children: icon }), _jsxs(MessageBody, { children: [title && _jsx(MessageTitle, { children: title }), _jsx(MessageDescription, { children: children })] })] })) }));
82
82
  });
83
83
  Message.displayName = "Message";
84
84
  //# sourceMappingURL=Message.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../src/components/Message/Message.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC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AAE,QAAQ,GAAsB,IACvC,IACb,CACJ,GACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC"}
@@ -12,15 +12,23 @@ export type ModalProps = Pick<HTMLAttributes<HTMLDivElement>, "className" | "sty
12
12
  /** Children - use Modal.Header, Modal.Body, Modal.Footer */
13
13
  children: ReactNode;
14
14
  /**
15
- * When true (default), clicking outside closes the modal.
15
+ * When true (default), clicking outside — and, for a directly-mounted
16
+ * modal, pressing Escape — closes the modal.
16
17
  * When false, the modal can only be closed programmatically.
17
- * Note: Escape key is handled by OverlayContext for proper stack ordering.
18
+ * Note: for modals opened via `useModal()`, Escape is handled by
19
+ * OverlayContext for proper stack ordering.
18
20
  */
19
21
  dismissable?: boolean;
20
22
  /** When true, shows a close (X) button in the modal header */
21
23
  closable?: boolean;
22
24
  /** Vertical alignment on desktop. "center" (default) or "top" (anchored near top, content grows down) */
23
25
  align?: "center" | "top";
26
+ /**
27
+ * Name of a brand the theme defines, rendered as `data-brand` on the dialog.
28
+ * Omitted, the modal takes the brand scope of the control that opened it
29
+ * (whatever held focus), since the portal leaves the trigger's scope behind.
30
+ */
31
+ brand?: string | undefined;
24
32
  };
25
33
  /**
26
34
  * A centered, backdrop-dimmed dialog that fully interrupts the page — the
@@ -40,11 +48,12 @@ export type ModalProps = Pick<HTMLAttributes<HTMLDivElement>, "className" | "sty
40
48
  * Modal is mount-driven — a parent (or `useModal`'s stack) decides whether it
41
49
  * renders at all, so there's no `open` prop. `onOpenChange` still exists,
42
50
  * firing only with `false` on dismissal, so every overlay in this library
43
- * shares one open/close shape. Escape is *not* wired inside Modal itself:
44
- * `OverlayProvider` owns it globally so a stack of modals closes
45
- * topmost-first. That means Escape only closes a Modal opened through
46
- * `useModal()` — one a parent mounts directly from its own boolean state
47
- * won't respond to Escape unless the app wires that separately.
51
+ * shares one open/close shape. Escape closes the modal: a directly-mounted
52
+ * Modal handles it itself (via `useDismiss`, so `dismissable={false}` turns
53
+ * it off along with outside-press), while one opened through `useModal()`
54
+ * defers to `OverlayProvider`, which closes a stack of modals topmost-first.
55
+ * Either way, an Escape pressed while a transient overlay (Select dropdown,
56
+ * Popover, picker) is open above the modal closes only that overlay.
48
57
  *
49
58
  * Focus moves into the modal on mount and is trapped there
50
59
  * (`FloatingFocusManager modal`) until it unmounts, then returns to whatever
@@ -71,15 +80,23 @@ export declare const Modal: import("react").ForwardRefExoticComponent<Pick<HTMLA
71
80
  /** Children - use Modal.Header, Modal.Body, Modal.Footer */
72
81
  children: ReactNode;
73
82
  /**
74
- * When true (default), clicking outside closes the modal.
83
+ * When true (default), clicking outside — and, for a directly-mounted
84
+ * modal, pressing Escape — closes the modal.
75
85
  * When false, the modal can only be closed programmatically.
76
- * Note: Escape key is handled by OverlayContext for proper stack ordering.
86
+ * Note: for modals opened via `useModal()`, Escape is handled by
87
+ * OverlayContext for proper stack ordering.
77
88
  */
78
89
  dismissable?: boolean;
79
90
  /** When true, shows a close (X) button in the modal header */
80
91
  closable?: boolean;
81
92
  /** Vertical alignment on desktop. "center" (default) or "top" (anchored near top, content grows down) */
82
93
  align?: "center" | "top";
94
+ /**
95
+ * Name of a brand the theme defines, rendered as `data-brand` on the dialog.
96
+ * Omitted, the modal takes the brand scope of the control that opened it
97
+ * (whatever held focus), since the portal leaves the trigger's scope behind.
98
+ */
99
+ brand?: string | undefined;
83
100
  } & import("react").RefAttributes<HTMLDivElement>> & {
84
101
  Header: import("react").ForwardRefExoticComponent<import("./components/index.js").ModalHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
85
102
  Body: import("react").ForwardRefExoticComponent<import("./components/index.js").ModalBodyProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAgE,MAAM,OAAO,CAAC;AAOt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AE,OAAO,KAAK,IAAI,CAAC;IACvC,iBAAiB;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IACnC,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yGAAyG;IACzG,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IACzB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAwKF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,KAAK;IA1OhB;;;;;OAKG;mBACY,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI;IACtC,iBAAiB;WACV,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM;IAClC,4DAA4D;cAClD,SAAS;IACnB;;;;;;OAMG;kBACW,OAAO;IACrB,8DAA8D;eACnD,OAAO;IAClB,yGAAyG;YACjG,QAAQ,GAAG,KAAK;IACxB;;;;OAIG;YACK,MAAM,GAAG,SAAS;;;;;CAkN1B,CAAC"}
@@ -1,8 +1,11 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { FloatingFocusManager, FloatingOverlay, useDismiss, useFloating, useInteractions, useRole } from "@floating-ui/react";
3
+ import { FloatingFocusManager, FloatingOverlay, FloatingPortal, useDismiss, useFloating, useInteractions, useRole } from "@floating-ui/react";
3
4
  import { useMergedFloatingRef, usePresence } from "@sixthshift/design-system/hooks";
4
5
  import { cn } from "@sixthshift/design-system/utils";
5
6
  import { forwardRef, useCallback, useContext, useEffect, useId, useMemo, useState } from "react";
7
+ import { useOpenerBrand } from "../../internal/brandScope.js";
8
+ import { hasOpenEscapeLayer, useEscapeDialog } from "../../internal/escapeLayers.js";
6
9
  import { ModalBody, ModalContext, ModalFooter, ModalHeader } from "./components/index.js";
7
10
  // =============================================================================
8
11
  // Size classes
@@ -16,9 +19,12 @@ const sizeClasses = {
16
19
  // =============================================================================
17
20
  // Modal
18
21
  // =============================================================================
19
- const ModalRoot = forwardRef(({ onOpenChange, size = "md", className, style, children, dismissable = true, closable, align = "center", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, }, ref) => {
22
+ const ModalRoot = forwardRef(({ onOpenChange, size = "md", className, style, children, dismissable = true, closable, align = "center", brand, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, }, ref) => {
20
23
  // Prefer explicit prop over context (context is set by useModal's overlay system)
21
24
  const contextValue = useContext(ModalContext);
25
+ // A context means useModal's stack owns this modal — and with it, Escape
26
+ // ordering. Without one the modal is mounted directly and handles its own.
27
+ const isStackManaged = contextValue != null;
22
28
  // Context provides a parameterless onClose for programmatic modals; adapt to the boolean shape.
23
29
  const handleDismiss = useCallback(() => {
24
30
  if (onOpenChange)
@@ -27,6 +33,8 @@ const ModalRoot = forwardRef(({ onOpenChange, size = "md", className, style, chi
27
33
  contextValue?.onClose();
28
34
  }, [onOpenChange, contextValue]);
29
35
  const { ref: presenceRef, state, isMounted, show, hide } = usePresence();
36
+ // Mount-driven, so the modal is open for as long as it exists.
37
+ const openerBrand = useOpenerBrand(true);
30
38
  useEffect(() => {
31
39
  show();
32
40
  }, [show]);
@@ -35,16 +43,23 @@ const ModalRoot = forwardRef(({ onOpenChange, size = "md", className, style, chi
35
43
  }, [handleDismiss, hide]);
36
44
  const { refs, context } = useFloating({
37
45
  open: true,
38
- onOpenChange: (nextOpen) => {
39
- if (!nextOpen)
40
- handleClose();
46
+ onOpenChange: (nextOpen, _event, reason) => {
47
+ if (nextOpen)
48
+ return;
49
+ // A transient overlay (Select dropdown, Popover, picker) open above
50
+ // this modal consumes the Escape itself — don't also close the modal.
51
+ if (reason === "escape-key" && hasOpenEscapeLayer())
52
+ return;
53
+ handleClose();
41
54
  },
42
55
  });
43
56
  const mergedRef = useMergedFloatingRef(refs, presenceRef, ref);
44
57
  const dismiss = useDismiss(context, {
45
58
  enabled: dismissable,
46
- // OverlayContext handles escape key for proper stack ordering
47
- escapeKey: false,
59
+ // Stack-managed modals leave Escape to OverlayContext, which closes
60
+ // topmost-first. A directly-mounted modal has no stack above it and
61
+ // handles its own Escape here.
62
+ escapeKey: !isStackManaged,
48
63
  outsidePress: true,
49
64
  outsidePressEvent: "mousedown",
50
65
  });
@@ -63,19 +78,28 @@ const ModalRoot = forwardRef(({ onOpenChange, size = "md", className, style, chi
63
78
  // never see their own string win.
64
79
  const labelledBy = ariaLabelledBy ?? (ariaLabel || !hasTitle ? undefined : titleId);
65
80
  const modalContextValue = useMemo(() => ({ onClose: handleClose, closable, titleId, registerTitle }), [closable, handleClose, titleId, registerTitle]);
81
+ // While mounted (exit animation included), a non-modal Sheet underneath
82
+ // must leave Escape to this dialog.
83
+ useEscapeDialog(isMounted);
66
84
  if (!isMounted)
67
85
  return null;
68
86
  const isEntering = state === "entering";
69
87
  const isExiting = state === "exiting";
70
- return (_jsx(FloatingFocusManager, { context: context, modal: true, children: _jsx(FloatingOverlay, { lockScroll: true, className: cn("modal-overlay fixed inset-0 z-modal bg-(--modal-overlay-bg)", isEntering && "animate-fade-in", isExiting && "animate-fade-out"), children: _jsx("div", { ref: mergedRef, role: "dialog", "aria-modal": "true", "aria-label": ariaLabel, "aria-labelledby": labelledBy, "aria-describedby": ariaDescribedBy, tabIndex: -1, "data-state": state, className: cn("modal fixed flex flex-col overflow-hidden outline-hidden", "border-(color:--modal-border) rounded-xl border bg-(--modal-bg)",
71
- // Size
72
- sizeClasses[size],
73
- // Cap height so ModalBody scrolls instead of overflowing the viewport
74
- "max-h-[95%]",
75
- // Mobile: slide up from bottom, full width
76
- "max-sm:inset-x-0 max-sm:bottom-0 max-sm:rounded-b-none", isEntering && "max-sm:animate-slide-up-in", isExiting && "max-sm:animate-slide-up-out",
77
- // Desktop: horizontal center + vertical alignment
78
- "sm:left-1/2 sm:-translate-x-1/2", align === "center" && "sm:top-1/2 sm:-translate-y-1/2", align === "top" && "sm:top-[15vh]", isEntering && "sm:animate-fade-in", isExiting && "sm:animate-fade-out", className), style: style, ...getFloatingProps({}), children: _jsx(ModalContext.Provider, { value: modalContextValue, children: children }) }) }) }));
88
+ return (
89
+ // Self-portalled: `position: fixed` resolves against the nearest
90
+ // transformed/filtered ancestor, so a modal rendered in place inside a
91
+ // `transform` container would be positioned (and clipped) by it. Nested
92
+ // FloatingPortals attach to the parent portal's node, so a stack-managed
93
+ // modal stays inside the `OverlayProvider`'s custom `modal` root.
94
+ _jsx(FloatingPortal, { children: _jsx(FloatingFocusManager, { context: context, modal: true, children: _jsx(FloatingOverlay, { lockScroll: true, className: cn("modal-overlay fixed inset-0 z-modal bg-(--modal-overlay-bg)", isEntering && "animate-fade-in", isExiting && "animate-fade-out"), children: _jsx("div", { ref: mergedRef, role: "dialog", "aria-modal": "true", "aria-label": ariaLabel, "aria-labelledby": labelledBy, "aria-describedby": ariaDescribedBy, tabIndex: -1, "data-state": state, "data-brand": brand ?? openerBrand, className: cn("modal fixed flex flex-col overflow-hidden outline-hidden", "border-(color:--modal-border) rounded-xl border bg-(--modal-bg)",
95
+ // Size
96
+ sizeClasses[size],
97
+ // Cap height so ModalBody scrolls instead of overflowing the viewport
98
+ "max-h-[95%]",
99
+ // Mobile: slide up from bottom, full width
100
+ "max-sm:inset-x-0 max-sm:bottom-0 max-sm:rounded-b-none", isEntering && "max-sm:animate-slide-up-in", isExiting && "max-sm:animate-slide-up-out",
101
+ // Desktop: horizontal center + vertical alignment
102
+ "sm:left-1/2 sm:-translate-x-1/2", align === "center" && "sm:top-1/2 sm:-translate-y-1/2", align === "top" && "sm:top-[15vh]", isEntering && "sm:animate-fade-in", isExiting && "sm:animate-fade-out", className), style: style, ...getFloatingProps({}), children: _jsx(ModalContext.Provider, { value: modalContextValue, children: children }) }) }) }) }));
79
103
  });
80
104
  ModalRoot.displayName = "Modal";
81
105
  // =============================================================================
@@ -99,11 +123,12 @@ ModalRoot.displayName = "Modal";
99
123
  * Modal is mount-driven — a parent (or `useModal`'s stack) decides whether it
100
124
  * renders at all, so there's no `open` prop. `onOpenChange` still exists,
101
125
  * firing only with `false` on dismissal, so every overlay in this library
102
- * shares one open/close shape. Escape is *not* wired inside Modal itself:
103
- * `OverlayProvider` owns it globally so a stack of modals closes
104
- * topmost-first. That means Escape only closes a Modal opened through
105
- * `useModal()` — one a parent mounts directly from its own boolean state
106
- * won't respond to Escape unless the app wires that separately.
126
+ * shares one open/close shape. Escape closes the modal: a directly-mounted
127
+ * Modal handles it itself (via `useDismiss`, so `dismissable={false}` turns
128
+ * it off along with outside-press), while one opened through `useModal()`
129
+ * defers to `OverlayProvider`, which closes a stack of modals topmost-first.
130
+ * Either way, an Escape pressed while a transient overlay (Select dropdown,
131
+ * Popover, picker) is open above the modal closes only that overlay.
107
132
  *
108
133
  * Focus moves into the modal on mount and is trapped there
109
134
  * (`FloatingFocusManager modal`) until it unmounts, then returns to whatever
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC9H,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAE,UAAU,EAAuC,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtI,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA8BjF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;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;IAC5C,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,WAAW;CACpB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/components/ModalContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC;AAEjC,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,YAAY,mDAAgD,CAAC;AAE1E,wBAAgB,eAAe,sBAM9B;AAED,eAAO,MAAM,oBAAoB,oCAAqC,iBAAiB,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,gCAGhI,CAAC"}
1
+ {"version":3,"file":"ModalContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/components/ModalContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC;AAEjC,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,YAAY,mDAAgD,CAAC;AAE1E,wBAAgB,eAAe,sBAM9B;AAED,eAAO,MAAM,oBAAoB,oCAAqC,iBAAiB,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,gCAGhI,CAAC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { createContext, useContext, useMemo } from "react";
3
4
  export const ModalContext = createContext(null);
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContext.js","sourceRoot":"","sources":["../../../../src/components/Modal/components/ModalContext.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAA0B,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AA2BnF,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAA2B,IAAI,CAAC,CAAC;AAE1E,MAAM,UAAU,eAAe;IAC7B,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAA+D,EAAE,EAAE;IACnI,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC1E,OAAO,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAyB,CAAC;AACjF,CAAC,CAAC"}
1
+ {"version":3,"file":"ModalContext.js","sourceRoot":"","sources":["../../../../src/components/Modal/components/ModalContext.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,aAAa,EAA0B,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AA2BnF,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAA2B,IAAI,CAAC,CAAC;AAE1E,MAAM,UAAU,eAAe;IAC7B,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAA+D,EAAE,EAAE;IACnI,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC1E,OAAO,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAyB,CAAC;AACjF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/components/ModalHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEpE,eAAO,MAAM,WAAW,yFAgCtB,CAAC"}
1
+ {"version":3,"file":"ModalHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/components/ModalHeader.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEpE,eAAO,MAAM,WAAW,yFAgCtB,CAAC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { cn } from "@sixthshift/design-system/utils";
3
4
  import { X } from "lucide-react";
@@ -1 +1 @@
1
- {"version":3,"file":"ModalHeader.js","sourceRoot":"","sources":["../../../../src/components/Modal/components/ModalHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAmC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC3H,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC/C,MAAM,QAAQ,GAAG,OAAO,EAAE,QAAQ,CAAC;IACnC,MAAM,OAAO,GAAG,OAAO,EAAE,OAAO,CAAC;IACjC,MAAM,aAAa,GAAG,OAAO,EAAE,aAAa,CAAC;IAE7C,8EAA8E;IAC9E,0EAA0E;IAC1E,8EAA8E;IAC9E,4EAA4E;IAC5E,6EAA6E;IAC7E,MAAM,WAAW,GAAG,EAAE,KAAK,SAAS,CAAC;IACrC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,aAAa,EAAE,CAAC,WAAW,CAAC,CAAC;QAC7B,OAAO,GAAG,EAAE,CAAC,aAAa,EAAE,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC,EAAE,CAAC,aAAa,EAAE,WAAW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W,GAAG,EAAE,KAAK,SAAS,CAAC;IACrC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,aAAa,EAAE,CAAC,WAAW,CAAC,CAAC;QAC7B,OAAO,GAAG,EAAE,CAAC,aAAa,EAAE,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC,EAAE,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC;IAEjC,OAAO,CACL,eAAK,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,QAAQ,IAAI,OAAO,EAAE,SAAS,CAAC,KAAM,KAAK,aACjI,QAAQ,EACR,QAAQ,IAAI,CACX,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,gBACL,OAAO,EAClB,SAAS,EAAC,sLAAsL,YAEhM,KAAC,CAAC,IAAC,IAAI,EAAE,EAAE,GAAI,GACR,CACV,IACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC"}
@@ -47,7 +47,9 @@ export declare const Popover: (({ open: controlledOpen, onOpenChange, defaultOpe
47
47
  Trigger: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
48
48
  asChild?: boolean;
49
49
  } & React.RefAttributes<HTMLButtonElement>>;
50
- Body: React.ForwardRefExoticComponent<import("./index.js").PopoverBodyProps & React.RefAttributes<HTMLDivElement>>;
50
+ Body: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
51
+ brand?: string | undefined;
52
+ } & React.RefAttributes<HTMLDivElement>>;
51
53
  Close: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
52
54
  asChild?: boolean;
53
55
  } & React.RefAttributes<HTMLButtonElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,SAAS,EAA6D,MAAM,oBAAoB,CAAC;AAEzI,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAOpC,MAAM,MAAM,YAAY,GAAG;IACzB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uCAAuC;IACvC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,+CAA+C;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mDAAmD;IACnD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAgDF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,OAAO,wFA3E4G,YAAY;;;;;;;;CA+E1I,CAAC"}
1
+ {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA4B,KAAK,SAAS,EAA6D,MAAM,oBAAoB,CAAC;AAEzI,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AASpC,MAAM,MAAM,YAAY,GAAG;IACzB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uCAAuC;IACvC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,+CAA+C;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mDAAmD;IACnD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAsDF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,OAAO,wFAjF4G,YAAY;;;;;;;;;;CAqF1I,CAAC"}
@@ -1,7 +1,10 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { autoUpdate, flip, offset, shift, useClick, useDismiss, useFloating, useInteractions } from "@floating-ui/react";
3
4
  import { useControllableState } from "@sixthshift/design-system/hooks";
4
5
  import { useId } from "react";
6
+ import { closestBrand } from "../../internal/brandScope.js";
7
+ import { useEscapeLayer } from "../../internal/escapeLayers.js";
5
8
  import { PopoverBody } from "./components/PopoverBody.js";
6
9
  import { PopoverClose } from "./components/PopoverClose.js";
7
10
  import { PopoverContext } from "./components/PopoverContext.js";
@@ -23,6 +26,9 @@ const PopoverRoot = ({ open: controlledOpen, onOpenChange, defaultOpen = false,
23
26
  const click = useClick(context);
24
27
  const dismiss = useDismiss(context);
25
28
  const { getReferenceProps, getFloatingProps } = useInteractions([click, dismiss]);
29
+ // While open, an Escape press dismisses this popover and must not also
30
+ // close a Modal/Sheet underneath it.
31
+ useEscapeLayer(open);
26
32
  const id = useId();
27
33
  const contentId = `popover-content-${id}`;
28
34
  // `Popover.Body` is a `role="dialog"`, and a dialog with no accessible name is
@@ -39,6 +45,8 @@ const PopoverRoot = ({ open: controlledOpen, onOpenChange, defaultOpen = false,
39
45
  setFloating: refs.setFloating,
40
46
  },
41
47
  floatingStyles,
48
+ // Read at render: `domReference` is state, so this updates once the trigger mounts.
49
+ inheritedBrand: closestBrand(context.elements.domReference),
42
50
  getReferenceProps,
43
51
  getFloatingProps,
44
52
  contentId,
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAkB,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACzI,OAAO,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AG,mBAAmB,EAAE,EAAE,CAAC;IAE1C,MAAM,YAAY,GAAG;QACnB,IAAI;QACJ,YAAY,EAAE,OAAO;QACrB,IAAI,EAAE;YACJ,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B;QACD,cAAc;QACd,oFAAoF;QACpF,cAAc,EAAE,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;QAC3D,iBAAiB;QACjB,gBAAgB;QAChB,SAAS;QACT,SAAS;KACV,CAAC;IAEF,OAAO,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YAAG,QAAQ,GAA2B,CAAC;AAC5F,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE;IAChD,OAAO,EAAE,cAAc;IACvB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,YAAY;CACpB,CAAC,CAAC"}
@@ -1,4 +1,18 @@
1
1
  import * as React from "react";
2
- export type PopoverBodyProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const PopoverBody: React.ForwardRefExoticComponent<PopoverBodyProps & React.RefAttributes<HTMLDivElement>>;
2
+ export type PopoverBodyProps = React.HTMLAttributes<HTMLDivElement> & {
3
+ /**
4
+ * Name of a brand the theme defines, rendered as `data-brand`. Omitted, the
5
+ * body copies the brand scope of its trigger, which the portal would
6
+ * otherwise leave behind.
7
+ */
8
+ brand?: string | undefined;
9
+ };
10
+ export declare const PopoverBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
11
+ /**
12
+ * Name of a brand the theme defines, rendered as `data-brand`. Omitted, the
13
+ * body copies the brand scope of its trigger, which the portal would
14
+ * otherwise leave behind.
15
+ */
16
+ brand?: string | undefined;
17
+ } & React.RefAttributes<HTMLDivElement>>;
4
18
  //# sourceMappingURL=PopoverBody.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverBody.d.ts","sourceRoot":"","sources":["../../../../src/components/Popover/components/PopoverBody.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEpE,eAAO,MAAM,WAAW,yFA4BtB,CAAC"}
1
+ {"version":3,"file":"PopoverBody.d.ts","sourceRoot":"","sources":["../../../../src/components/Popover/components/PopoverBody.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IACpE;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,WAAW;IARtB;;;;OAIG;YACK,MAAM,GAAG,SAAS;wCAgC1B,CAAC"}