@seed-design/react 1.2.14 → 2.0.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 (387) hide show
  1. package/lib/components/Accordion/Accordion.cjs +42 -0
  2. package/lib/components/Accordion/Accordion.d.ts +35 -0
  3. package/lib/components/Accordion/Accordion.d.ts.map +1 -0
  4. package/lib/components/Accordion/Accordion.js +32 -0
  5. package/lib/components/Accordion/Accordion.namespace.cjs +22 -0
  6. package/lib/components/Accordion/Accordion.namespace.d.ts +2 -0
  7. package/lib/components/Accordion/Accordion.namespace.d.ts.map +1 -0
  8. package/lib/components/Accordion/Accordion.namespace.js +17 -0
  9. package/lib/components/Accordion/index.cjs +19 -0
  10. package/lib/components/Accordion/index.d.ts +3 -0
  11. package/lib/components/Accordion/index.d.ts.map +1 -0
  12. package/lib/components/Accordion/index.js +3 -0
  13. package/lib/components/ActionButton/ActionButton.cjs +1 -1
  14. package/lib/components/ActionButton/ActionButton.d.ts +1 -1
  15. package/lib/components/ActionButton/ActionButton.d.ts.map +1 -1
  16. package/lib/components/ActionButton/ActionButton.js +1 -1
  17. package/lib/components/ActionSheet/ActionSheet.cjs +12 -12
  18. package/lib/components/ActionSheet/ActionSheet.d.ts +22 -22
  19. package/lib/components/ActionSheet/ActionSheet.js +12 -12
  20. package/lib/components/Article/Article.d.ts +2 -3
  21. package/lib/components/Article/Article.d.ts.map +1 -1
  22. package/lib/components/AspectRatio/AspectRatio.d.ts +2 -2
  23. package/lib/components/AspectRatio/AspectRatio.d.ts.map +1 -1
  24. package/lib/components/AttachmentDisplay/AttachmentDisplay.cjs +63 -0
  25. package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts +43 -0
  26. package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts.map +1 -0
  27. package/lib/components/AttachmentDisplay/AttachmentDisplay.js +49 -0
  28. package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.cjs +37 -0
  29. package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.d.ts +5 -0
  30. package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.d.ts.map +1 -0
  31. package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.js +32 -0
  32. package/lib/components/AttachmentDisplay/AttachmentDisplayItem.cjs +110 -0
  33. package/lib/components/AttachmentDisplay/AttachmentDisplayItem.d.ts +30 -0
  34. package/lib/components/AttachmentDisplay/AttachmentDisplayItem.d.ts.map +1 -0
  35. package/lib/components/AttachmentDisplay/AttachmentDisplayItem.js +100 -0
  36. package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.cjs +50 -0
  37. package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.d.ts +18 -0
  38. package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.d.ts.map +1 -0
  39. package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.js +45 -0
  40. package/lib/components/AttachmentDisplay/index.cjs +34 -0
  41. package/lib/components/AttachmentDisplay/index.d.ts +6 -0
  42. package/lib/components/AttachmentDisplay/index.d.ts.map +1 -0
  43. package/lib/components/AttachmentDisplay/index.js +5 -0
  44. package/lib/components/AttachmentInput/AttachmentInput.cjs +37 -0
  45. package/lib/components/AttachmentInput/AttachmentInput.d.ts +23 -0
  46. package/lib/components/AttachmentInput/AttachmentInput.d.ts.map +1 -0
  47. package/lib/components/AttachmentInput/AttachmentInput.js +30 -0
  48. package/lib/components/AttachmentInput/AttachmentInput.namespace.cjs +35 -0
  49. package/lib/components/AttachmentInput/AttachmentInput.namespace.d.ts +6 -0
  50. package/lib/components/AttachmentInput/AttachmentInput.namespace.d.ts.map +1 -0
  51. package/lib/components/AttachmentInput/AttachmentInput.namespace.js +30 -0
  52. package/lib/components/AttachmentInput/AttachmentInput.test.d.ts +2 -0
  53. package/lib/components/AttachmentInput/AttachmentInput.test.d.ts.map +1 -0
  54. package/lib/components/AttachmentInput/AttachmentInputDropzone.cjs +12 -0
  55. package/lib/components/AttachmentInput/AttachmentInputDropzone.d.ts +9 -0
  56. package/lib/components/AttachmentInput/AttachmentInputDropzone.d.ts.map +1 -0
  57. package/lib/components/AttachmentInput/AttachmentInputDropzone.js +10 -0
  58. package/lib/components/AttachmentInput/AttachmentInputItem.cjs +138 -0
  59. package/lib/components/AttachmentInput/AttachmentInputItem.d.ts +36 -0
  60. package/lib/components/AttachmentInput/AttachmentInputItem.d.ts.map +1 -0
  61. package/lib/components/AttachmentInput/AttachmentInputItem.js +126 -0
  62. package/lib/components/AttachmentInput/AttachmentInputTrigger.cjs +54 -0
  63. package/lib/components/AttachmentInput/AttachmentInputTrigger.d.ts +21 -0
  64. package/lib/components/AttachmentInput/AttachmentInputTrigger.d.ts.map +1 -0
  65. package/lib/components/AttachmentInput/AttachmentInputTrigger.js +49 -0
  66. package/lib/components/AttachmentInput/index.cjs +32 -0
  67. package/lib/components/AttachmentInput/index.d.ts +7 -0
  68. package/lib/components/AttachmentInput/index.d.ts.map +1 -0
  69. package/lib/components/AttachmentInput/index.js +6 -0
  70. package/lib/components/BottomSheet/BottomSheet.cjs +36 -9
  71. package/lib/components/BottomSheet/BottomSheet.d.ts +3 -4
  72. package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
  73. package/lib/components/BottomSheet/BottomSheet.js +35 -9
  74. package/lib/components/Box/Box.cjs +10 -3
  75. package/lib/components/Box/Box.d.ts +4 -2
  76. package/lib/components/Box/Box.d.ts.map +1 -1
  77. package/lib/components/Box/Box.js +10 -3
  78. package/lib/components/Checkbox/Checkbox.cjs +2 -6
  79. package/lib/components/Checkbox/Checkbox.d.ts +1 -7
  80. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  81. package/lib/components/Checkbox/Checkbox.js +2 -6
  82. package/lib/components/Chip/Chip.cjs +1 -1
  83. package/lib/components/Chip/Chip.js +1 -1
  84. package/lib/components/ChipTabs/ChipTabs.cjs +0 -1
  85. package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -1
  86. package/lib/components/ChipTabs/ChipTabs.js +0 -1
  87. package/lib/components/Columns/Columns.d.ts +4 -4
  88. package/lib/components/Columns/Columns.d.ts.map +1 -1
  89. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.cjs +13 -13
  90. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.d.ts +24 -24
  91. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.js +13 -13
  92. package/lib/components/FieldButton/FieldButton.cjs +22 -3
  93. package/lib/components/FieldButton/FieldButton.d.ts +3 -2
  94. package/lib/components/FieldButton/FieldButton.d.ts.map +1 -1
  95. package/lib/components/FieldButton/FieldButton.js +23 -3
  96. package/lib/components/Flex/Flex.d.ts +5 -3
  97. package/lib/components/Flex/Flex.d.ts.map +1 -1
  98. package/lib/components/Footer/Footer.namespace.cjs +11 -0
  99. package/lib/components/Footer/Footer.namespace.d.ts +2 -0
  100. package/lib/components/Footer/Footer.namespace.d.ts.map +1 -0
  101. package/lib/components/Footer/Footer.namespace.js +6 -0
  102. package/lib/components/Footer/FooterLinkText.cjs +23 -0
  103. package/lib/components/Footer/FooterLinkText.d.ts +7 -0
  104. package/lib/components/Footer/FooterLinkText.d.ts.map +1 -0
  105. package/lib/components/Footer/FooterLinkText.js +20 -0
  106. package/lib/components/Footer/index.cjs +10 -0
  107. package/lib/components/Footer/index.d.ts +3 -0
  108. package/lib/components/Footer/index.d.ts.map +1 -0
  109. package/lib/components/Footer/index.js +3 -0
  110. package/lib/components/Grid/Grid.cjs +7 -2
  111. package/lib/components/Grid/Grid.d.ts +7 -5
  112. package/lib/components/Grid/Grid.d.ts.map +1 -1
  113. package/lib/components/Grid/Grid.js +7 -2
  114. package/lib/components/GridItem/GridItem.d.ts +3 -2
  115. package/lib/components/GridItem/GridItem.d.ts.map +1 -1
  116. package/lib/components/HelpBubble/HelpBubble.cjs +4 -7
  117. package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -1
  118. package/lib/components/HelpBubble/HelpBubble.js +4 -7
  119. package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.cjs +64 -0
  120. package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.d.ts +60 -0
  121. package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.d.ts.map +1 -0
  122. package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.js +52 -0
  123. package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.cjs +23 -0
  124. package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.d.ts +2 -0
  125. package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.d.ts.map +1 -0
  126. package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.js +18 -0
  127. package/lib/components/HelpBubbleTooltip/index.cjs +20 -0
  128. package/lib/components/HelpBubbleTooltip/index.d.ts +3 -0
  129. package/lib/components/HelpBubbleTooltip/index.d.ts.map +1 -0
  130. package/lib/components/HelpBubbleTooltip/index.js +3 -0
  131. package/lib/components/Icon/Icon.d.ts +2 -1
  132. package/lib/components/Icon/Icon.d.ts.map +1 -1
  133. package/lib/components/ImageFrame/ImageFrame.cjs +3 -2
  134. package/lib/components/ImageFrame/ImageFrame.d.ts +3 -8
  135. package/lib/components/ImageFrame/ImageFrame.d.ts.map +1 -1
  136. package/lib/components/ImageFrame/ImageFrame.js +3 -2
  137. package/lib/components/Inline/Inline.d.ts +2 -2
  138. package/lib/components/Inline/Inline.d.ts.map +1 -1
  139. package/lib/components/Layout/Layout.cjs +12 -0
  140. package/lib/components/Layout/Layout.d.ts +10 -0
  141. package/lib/components/Layout/Layout.d.ts.map +1 -0
  142. package/lib/components/Layout/Layout.js +10 -0
  143. package/lib/components/Layout/Layout.namespace.cjs +14 -0
  144. package/lib/components/Layout/Layout.namespace.d.ts +2 -0
  145. package/lib/components/Layout/Layout.namespace.d.ts.map +1 -0
  146. package/lib/components/Layout/Layout.namespace.js +9 -0
  147. package/lib/components/Layout/index.cjs +11 -0
  148. package/lib/components/Layout/index.d.ts +3 -0
  149. package/lib/components/Layout/index.d.ts.map +1 -0
  150. package/lib/components/Layout/index.js +3 -0
  151. package/lib/components/List/List.cjs +1 -1
  152. package/lib/components/List/List.d.ts +1 -1
  153. package/lib/components/List/List.d.ts.map +1 -1
  154. package/lib/components/List/List.js +1 -1
  155. package/lib/components/Menu/Menu.cjs +76 -0
  156. package/lib/components/Menu/Menu.d.ts +42 -0
  157. package/lib/components/Menu/Menu.d.ts.map +1 -0
  158. package/lib/components/Menu/Menu.js +62 -0
  159. package/lib/components/Menu/Menu.namespace.cjs +24 -0
  160. package/lib/components/Menu/Menu.namespace.d.ts +2 -0
  161. package/lib/components/Menu/Menu.namespace.d.ts.map +1 -0
  162. package/lib/components/Menu/Menu.namespace.js +19 -0
  163. package/lib/components/Menu/index.cjs +21 -0
  164. package/lib/components/Menu/index.d.ts +3 -0
  165. package/lib/components/Menu/index.d.ts.map +1 -0
  166. package/lib/components/Menu/index.js +3 -0
  167. package/lib/components/MenuSheet/MenuSheet.cjs +48 -0
  168. package/lib/components/MenuSheet/MenuSheet.d.ts +96 -0
  169. package/lib/components/MenuSheet/MenuSheet.d.ts.map +1 -1
  170. package/lib/components/MenuSheet/MenuSheet.js +48 -0
  171. package/lib/components/NavigationMenu/NavigationMenu.cjs +76 -0
  172. package/lib/components/NavigationMenu/NavigationMenu.d.ts +42 -0
  173. package/lib/components/NavigationMenu/NavigationMenu.d.ts.map +1 -0
  174. package/lib/components/NavigationMenu/NavigationMenu.js +62 -0
  175. package/lib/components/NavigationMenu/NavigationMenu.namespace.cjs +24 -0
  176. package/lib/components/NavigationMenu/NavigationMenu.namespace.d.ts +2 -0
  177. package/lib/components/NavigationMenu/NavigationMenu.namespace.d.ts.map +1 -0
  178. package/lib/components/NavigationMenu/NavigationMenu.namespace.js +19 -0
  179. package/lib/components/NavigationMenu/index.cjs +21 -0
  180. package/lib/components/NavigationMenu/index.d.ts +3 -0
  181. package/lib/components/NavigationMenu/index.d.ts.map +1 -0
  182. package/lib/components/NavigationMenu/index.js +3 -0
  183. package/lib/components/RadioGroup/RadioGroup.cjs +1 -1
  184. package/lib/components/RadioGroup/RadioGroup.js +1 -1
  185. package/lib/components/ResponsivePair/ResponsivePair.cjs +8 -5
  186. package/lib/components/ResponsivePair/ResponsivePair.d.ts +3 -2
  187. package/lib/components/ResponsivePair/ResponsivePair.d.ts.map +1 -1
  188. package/lib/components/ResponsivePair/ResponsivePair.js +8 -5
  189. package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.cjs +184 -0
  190. package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.d.ts +65 -0
  191. package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.d.ts.map +1 -0
  192. package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.js +170 -0
  193. package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.cjs +24 -0
  194. package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.d.ts +2 -0
  195. package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.d.ts.map +1 -0
  196. package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.js +19 -0
  197. package/lib/components/ResponsiveSidePanel/index.cjs +22 -0
  198. package/lib/components/ResponsiveSidePanel/index.d.ts +3 -0
  199. package/lib/components/ResponsiveSidePanel/index.d.ts.map +1 -0
  200. package/lib/components/ResponsiveSidePanel/index.js +3 -0
  201. package/lib/components/SelectBox/CheckSelectBox.cjs +2 -2
  202. package/lib/components/SelectBox/CheckSelectBox.d.ts +1 -1
  203. package/lib/components/SelectBox/CheckSelectBox.d.ts.map +1 -1
  204. package/lib/components/SelectBox/CheckSelectBox.js +1 -1
  205. package/lib/components/SideNavigation/SideNavigation.cjs +175 -0
  206. package/lib/components/SideNavigation/SideNavigation.d.ts +59 -0
  207. package/lib/components/SideNavigation/SideNavigation.d.ts.map +1 -0
  208. package/lib/components/SideNavigation/SideNavigation.js +157 -0
  209. package/lib/components/SideNavigation/SideNavigation.namespace.cjs +28 -0
  210. package/lib/components/SideNavigation/SideNavigation.namespace.d.ts +3 -0
  211. package/lib/components/SideNavigation/SideNavigation.namespace.d.ts.map +1 -0
  212. package/lib/components/SideNavigation/SideNavigation.namespace.js +23 -0
  213. package/lib/components/SideNavigation/index.cjs +25 -0
  214. package/lib/components/SideNavigation/index.d.ts +4 -0
  215. package/lib/components/SideNavigation/index.d.ts.map +1 -0
  216. package/lib/components/SideNavigation/index.js +3 -0
  217. package/lib/components/SidePanel/SidePanel.cjs +100 -0
  218. package/lib/components/SidePanel/SidePanel.d.ts +41 -0
  219. package/lib/components/SidePanel/SidePanel.d.ts.map +1 -0
  220. package/lib/components/SidePanel/SidePanel.js +87 -0
  221. package/lib/components/SidePanel/SidePanel.namespace.cjs +23 -0
  222. package/lib/components/SidePanel/SidePanel.namespace.d.ts +2 -0
  223. package/lib/components/SidePanel/SidePanel.namespace.d.ts.map +1 -0
  224. package/lib/components/SidePanel/SidePanel.namespace.js +18 -0
  225. package/lib/components/SidePanel/index.cjs +20 -0
  226. package/lib/components/SidePanel/index.d.ts +3 -0
  227. package/lib/components/SidePanel/index.d.ts.map +1 -0
  228. package/lib/components/SidePanel/index.js +3 -0
  229. package/lib/components/Slider/Slider.cjs +2 -2
  230. package/lib/components/Slider/Slider.js +2 -2
  231. package/lib/components/Snackbar/Snackbar.cjs +2 -2
  232. package/lib/components/Snackbar/Snackbar.d.ts +1 -1
  233. package/lib/components/Snackbar/Snackbar.d.ts.map +1 -1
  234. package/lib/components/Snackbar/Snackbar.js +2 -2
  235. package/lib/components/Stack/Stack.d.ts +4 -6
  236. package/lib/components/Stack/Stack.d.ts.map +1 -1
  237. package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.cjs +123 -0
  238. package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts +60 -0
  239. package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts.map +1 -0
  240. package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.js +104 -0
  241. package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.cjs +29 -0
  242. package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.d.ts +2 -0
  243. package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.d.ts.map +1 -0
  244. package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.js +24 -0
  245. package/lib/components/SwipeableMenuSheet/index.cjs +26 -0
  246. package/lib/components/SwipeableMenuSheet/index.d.ts +3 -0
  247. package/lib/components/SwipeableMenuSheet/index.d.ts.map +1 -0
  248. package/lib/components/SwipeableMenuSheet/index.js +3 -0
  249. package/lib/components/Switch/Switch.cjs +1 -5
  250. package/lib/components/Switch/Switch.d.ts +1 -7
  251. package/lib/components/Switch/Switch.d.ts.map +1 -1
  252. package/lib/components/Switch/Switch.js +1 -5
  253. package/lib/components/TagGroup/TagGroup.cjs +1 -1
  254. package/lib/components/TagGroup/TagGroup.js +1 -1
  255. package/lib/components/TextField/TextField.cjs +1 -1
  256. package/lib/components/TextField/TextField.js +1 -1
  257. package/lib/components/index.cjs +249 -0
  258. package/lib/components/index.d.ts +12 -0
  259. package/lib/components/index.d.ts.map +1 -1
  260. package/lib/components/index.js +30 -1
  261. package/lib/components/private/useDismissible.d.ts +6 -6
  262. package/lib/hooks/useBreakpoint.cjs +15 -0
  263. package/lib/hooks/useBreakpoint.d.ts +12 -0
  264. package/lib/hooks/useBreakpoint.d.ts.map +1 -0
  265. package/lib/hooks/useBreakpoint.js +13 -0
  266. package/lib/hooks/useBreakpoint.test.d.ts +2 -0
  267. package/lib/hooks/useBreakpoint.test.d.ts.map +1 -0
  268. package/lib/hooks/useBreakpointValue.cjs +23 -0
  269. package/lib/hooks/useBreakpointValue.d.ts +8 -0
  270. package/lib/hooks/useBreakpointValue.d.ts.map +1 -0
  271. package/lib/hooks/useBreakpointValue.js +22 -0
  272. package/lib/hooks/useBreakpointValue.test.d.ts +2 -0
  273. package/lib/hooks/useBreakpointValue.test.d.ts.map +1 -0
  274. package/lib/index.cjs +255 -0
  275. package/lib/index.d.ts +6 -0
  276. package/lib/index.d.ts.map +1 -1
  277. package/lib/index.js +33 -1
  278. package/lib/primitive.cjs +45 -0
  279. package/lib/primitive.d.ts +5 -0
  280. package/lib/primitive.d.ts.map +1 -1
  281. package/lib/primitive.js +5 -0
  282. package/lib/primitives/breakpoint-store.cjs +52 -0
  283. package/lib/primitives/breakpoint-store.d.ts +7 -0
  284. package/lib/primitives/breakpoint-store.d.ts.map +1 -0
  285. package/lib/primitives/breakpoint-store.js +50 -0
  286. package/lib/providers/BreakpointProvider.cjs +20 -0
  287. package/lib/providers/BreakpointProvider.d.ts +8 -0
  288. package/lib/providers/BreakpointProvider.d.ts.map +1 -0
  289. package/lib/providers/BreakpointProvider.js +19 -0
  290. package/lib/types/responsive.cjs +7 -0
  291. package/lib/types/responsive.d.ts +12 -0
  292. package/lib/types/responsive.d.ts.map +1 -0
  293. package/lib/types/responsive.js +7 -0
  294. package/lib/utils/createRenderTrackingContext.cjs +45 -0
  295. package/lib/utils/createRenderTrackingContext.d.ts +28 -0
  296. package/lib/utils/createRenderTrackingContext.d.ts.map +1 -0
  297. package/lib/utils/createRenderTrackingContext.js +44 -0
  298. package/lib/utils/getHelpBubbleArrowTipPath.cjs +14 -0
  299. package/lib/utils/getHelpBubbleArrowTipPath.d.ts +7 -0
  300. package/lib/utils/getHelpBubbleArrowTipPath.d.ts.map +1 -0
  301. package/lib/utils/getHelpBubbleArrowTipPath.js +14 -0
  302. package/lib/utils/styled.cjs +49 -75
  303. package/lib/utils/styled.d.ts +180 -62
  304. package/lib/utils/styled.d.ts.map +1 -1
  305. package/lib/utils/styled.js +49 -76
  306. package/package.json +33 -26
  307. package/src/components/Accordion/Accordion.namespace.ts +22 -0
  308. package/src/components/Accordion/Accordion.tsx +119 -0
  309. package/src/components/Accordion/index.ts +24 -0
  310. package/src/components/ActionButton/ActionButton.tsx +1 -1
  311. package/src/components/ActionSheet/ActionSheet.tsx +22 -22
  312. package/src/components/Article/Article.tsx +1 -1
  313. package/src/components/AspectRatio/AspectRatio.tsx +2 -2
  314. package/src/components/AttachmentDisplay/AttachmentDisplay.namespace.ts +57 -0
  315. package/src/components/AttachmentDisplay/AttachmentDisplay.tsx +165 -0
  316. package/src/components/AttachmentDisplay/AttachmentDisplayItem.tsx +204 -0
  317. package/src/components/AttachmentDisplay/AttachmentDisplayTrigger.tsx +82 -0
  318. package/src/components/AttachmentDisplay/index.ts +59 -0
  319. package/src/components/AttachmentInput/AttachmentInput.namespace.ts +54 -0
  320. package/src/components/AttachmentInput/AttachmentInput.test.tsx +161 -0
  321. package/src/components/AttachmentInput/AttachmentInput.tsx +77 -0
  322. package/src/components/AttachmentInput/AttachmentInputDropzone.tsx +25 -0
  323. package/src/components/AttachmentInput/AttachmentInputItem.tsx +246 -0
  324. package/src/components/AttachmentInput/AttachmentInputTrigger.tsx +85 -0
  325. package/src/components/AttachmentInput/index.ts +56 -0
  326. package/src/components/BottomSheet/BottomSheet.tsx +54 -18
  327. package/src/components/Box/Box.tsx +30 -7
  328. package/src/components/Checkbox/Checkbox.tsx +3 -31
  329. package/src/components/ChipTabs/ChipTabs.tsx +0 -6
  330. package/src/components/Columns/Columns.tsx +4 -3
  331. package/src/components/ExtendedActionSheet/ExtendedActionSheet.tsx +24 -24
  332. package/src/components/FieldButton/FieldButton.tsx +36 -8
  333. package/src/components/Flex/Flex.tsx +5 -3
  334. package/src/components/Footer/Footer.namespace.ts +4 -0
  335. package/src/components/Footer/FooterLinkText.tsx +23 -0
  336. package/src/components/Footer/index.ts +3 -0
  337. package/src/components/Grid/Grid.tsx +15 -8
  338. package/src/components/GridItem/GridItem.tsx +3 -2
  339. package/src/components/HelpBubble/HelpBubble.tsx +2 -5
  340. package/src/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.ts +24 -0
  341. package/src/components/HelpBubbleTooltip/HelpBubbleTooltip.tsx +169 -0
  342. package/src/components/HelpBubbleTooltip/index.ts +26 -0
  343. package/src/components/Icon/Icon.tsx +2 -1
  344. package/src/components/ImageFrame/ImageFrame.test.tsx +1 -3
  345. package/src/components/ImageFrame/ImageFrame.tsx +25 -23
  346. package/src/components/Inline/Inline.tsx +2 -1
  347. package/src/components/Layout/Layout.namespace.ts +6 -0
  348. package/src/components/Layout/Layout.tsx +21 -0
  349. package/src/components/Layout/index.ts +8 -0
  350. package/src/components/List/List.tsx +5 -1
  351. package/src/components/Menu/Menu.namespace.ts +26 -0
  352. package/src/components/Menu/Menu.tsx +157 -0
  353. package/src/components/Menu/index.ts +28 -0
  354. package/src/components/MenuSheet/MenuSheet.tsx +96 -0
  355. package/src/components/NavigationMenu/NavigationMenu.namespace.ts +26 -0
  356. package/src/components/NavigationMenu/NavigationMenu.tsx +172 -0
  357. package/src/components/NavigationMenu/index.ts +28 -0
  358. package/src/components/ResponsivePair/ResponsivePair.tsx +13 -7
  359. package/src/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.ts +26 -0
  360. package/src/components/ResponsiveSidePanel/ResponsiveSidePanel.tsx +316 -0
  361. package/src/components/ResponsiveSidePanel/index.ts +29 -0
  362. package/src/components/SelectBox/CheckSelectBox.tsx +1 -1
  363. package/src/components/SideNavigation/SideNavigation.namespace.ts +37 -0
  364. package/src/components/SideNavigation/SideNavigation.tsx +342 -0
  365. package/src/components/SideNavigation/index.ts +39 -0
  366. package/src/components/SidePanel/SidePanel.namespace.ts +24 -0
  367. package/src/components/SidePanel/SidePanel.tsx +216 -0
  368. package/src/components/SidePanel/index.ts +26 -0
  369. package/src/components/Snackbar/Snackbar.tsx +2 -4
  370. package/src/components/Stack/Stack.tsx +4 -3
  371. package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.ts +36 -0
  372. package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.tsx +269 -0
  373. package/src/components/SwipeableMenuSheet/index.ts +38 -0
  374. package/src/components/Switch/Switch.tsx +3 -26
  375. package/src/components/index.ts +12 -0
  376. package/src/hooks/useBreakpoint.test.tsx +94 -0
  377. package/src/hooks/useBreakpoint.ts +24 -0
  378. package/src/hooks/useBreakpointValue.test.tsx +102 -0
  379. package/src/hooks/useBreakpointValue.ts +33 -0
  380. package/src/index.ts +8 -0
  381. package/src/primitive.ts +5 -0
  382. package/src/primitives/breakpoint-store.ts +69 -0
  383. package/src/providers/BreakpointProvider.tsx +26 -0
  384. package/src/types/responsive.ts +19 -0
  385. package/src/utils/createRenderTrackingContext.tsx +50 -0
  386. package/src/utils/getHelpBubbleArrowTipPath.ts +11 -0
  387. package/src/utils/styled.tsx +387 -268
@@ -1,22 +1,41 @@
1
1
  import { bottomSheet, type BottomSheetVariantProps } from "@seed-design/css/recipes/bottom-sheet";
2
+ import { composeRefs } from "@radix-ui/react-compose-refs";
2
3
  import { dataAttr } from "@seed-design/dom-utils";
3
- import { Drawer, useDrawerContext } from "@seed-design/react-drawer";
4
+ import { Drawer } from "@seed-design/react-drawer";
4
5
  import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
6
+ import clsx from "clsx";
5
7
  import { forwardRef } from "react";
8
+ import { createRenderTrackingContext } from "../../utils/createRenderTrackingContext";
6
9
  import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
7
10
  import { withStyleProps, type StyleProps } from "../../utils/styled";
8
11
 
9
- const { withRootProvider, withContext } = createSlotRecipeContext(bottomSheet);
12
+ const { withContext, useClassNames, ClassNamesProvider } = createSlotRecipeContext(bottomSheet);
10
13
 
11
- ////////////////////////////////////////////////////////////////////////////////////
14
+ const closeButtonTracker = createRenderTrackingContext("BottomSheetCloseButton");
12
15
 
13
- export interface BottomSheetRootProps extends BottomSheetVariantProps, Drawer.RootProps {}
16
+ ////////////////////////////////////////////////////////////////////////////////////
14
17
 
15
- export const BottomSheetRoot = withRootProvider<BottomSheetRootProps>(Drawer.Root, {
16
- defaultProps: {
17
- direction: "bottom",
18
- },
19
- });
18
+ export interface BottomSheetRootProps
19
+ extends BottomSheetVariantProps,
20
+ Omit<Drawer.RootProps, "direction"> {}
21
+
22
+ export function BottomSheetRoot(props: BottomSheetRootProps) {
23
+ const [variantProps, otherProps] = bottomSheet.splitVariantProps({
24
+ direction: "bottom" as const,
25
+ lazyMount: true,
26
+ unmountOnExit: true,
27
+ ...props,
28
+ });
29
+ const classNames = bottomSheet(variantProps);
30
+
31
+ return (
32
+ <ClassNamesProvider value={classNames}>
33
+ <closeButtonTracker.Provider>
34
+ <Drawer.Root {...otherProps} />
35
+ </closeButtonTracker.Provider>
36
+ </ClassNamesProvider>
37
+ );
38
+ }
20
39
 
21
40
  ////////////////////////////////////////////////////////////////////////////////////
22
41
 
@@ -64,15 +83,20 @@ export const BottomSheetHeader = withContext<HTMLDivElement, BottomSheetHeaderPr
64
83
 
65
84
  export interface BottomSheetTitleProps extends Drawer.TitleProps {}
66
85
 
67
- export const BottomSheetTitle = withContext<HTMLHeadingElement, BottomSheetTitleProps>(
68
- forwardRef<HTMLHeadingElement, BottomSheetTitleProps>((props, ref) => {
69
- const { isCloseButtonRendered } = useDrawerContext();
86
+ export const BottomSheetTitle = forwardRef<HTMLHeadingElement, BottomSheetTitleProps>(
87
+ ({ className, ...props }, ref) => {
88
+ const classNames = useClassNames();
89
+ const { isRendered } = closeButtonTracker.useRenderTracking();
70
90
 
71
91
  return (
72
- <Drawer.Title ref={ref} data-show-close-button={dataAttr(isCloseButtonRendered)} {...props} />
92
+ <Drawer.Title
93
+ ref={ref}
94
+ data-show-close-button={dataAttr(isRendered)}
95
+ className={clsx(classNames.title, className)}
96
+ {...props}
97
+ />
73
98
  );
74
- }),
75
- "title",
99
+ },
76
100
  );
77
101
 
78
102
  BottomSheetTitle.displayName = "BottomSheetTitle";
@@ -116,7 +140,19 @@ export const BottomSheetFooter = withContext<HTMLDivElement, BottomSheetFooterPr
116
140
 
117
141
  export interface BottomSheetCloseButtonProps extends Drawer.CloseButtonProps {}
118
142
 
119
- export const BottomSheetCloseButton = withContext<HTMLButtonElement, BottomSheetCloseButtonProps>(
120
- Drawer.CloseButton,
121
- "closeButton",
143
+ export const BottomSheetCloseButton = forwardRef<HTMLButtonElement, BottomSheetCloseButtonProps>(
144
+ ({ className, ...props }, ref) => {
145
+ const classNames = useClassNames();
146
+ const { trackRef } = closeButtonTracker.useRenderTracking();
147
+
148
+ return (
149
+ <Drawer.CloseButton
150
+ ref={composeRefs(ref, trackRef)}
151
+ className={clsx(classNames.closeButton, className)}
152
+ {...props}
153
+ />
154
+ );
155
+ },
122
156
  );
157
+
158
+ BottomSheetCloseButton.displayName = "BottomSheetCloseButton";
@@ -1,23 +1,46 @@
1
1
  import clsx from "clsx";
2
2
  import * as React from "react";
3
+ import type { BreakpointThreshold } from "../../types/responsive";
3
4
  import { useStyleProps, type StyleProps } from "../../utils/styled";
4
5
  import { Slot } from "@radix-ui/react-slot";
5
6
 
6
- export interface BoxProps extends StyleProps, Omit<React.HTMLAttributes<HTMLDivElement>, "color"> {
7
- as?: React.ElementType;
7
+ export type BoxProps = StyleProps &
8
+ Omit<React.HTMLAttributes<HTMLDivElement>, "color"> & {
9
+ as?: React.ElementType;
8
10
 
9
- asChild?: boolean;
10
- }
11
+ asChild?: boolean;
12
+
13
+ hideFrom?: BreakpointThreshold;
14
+ };
11
15
 
12
16
  export const Box = React.forwardRef<HTMLDivElement, BoxProps>((props, ref) => {
13
- const { style, restProps } = useStyleProps(props);
17
+ const { hideFrom, ...rest } = props;
18
+ const { style, restProps } = useStyleProps(rest);
14
19
  const { as: Comp = "div", asChild = false, className, ...nativeProps } = restProps;
15
20
 
16
21
  if (asChild) {
17
22
  return (
18
- <Slot ref={ref} className={clsx("seed-box", className)} style={style} {...nativeProps} />
23
+ <Slot
24
+ ref={ref}
25
+ className={clsx("seed-box", className)}
26
+ style={{
27
+ ...style,
28
+ ...(hideFrom && { [`--seed-box-display-${hideFrom}`]: "none" }),
29
+ }}
30
+ {...nativeProps}
31
+ />
19
32
  );
20
33
  }
21
34
 
22
- return <Comp ref={ref} className={clsx("seed-box", className)} style={style} {...nativeProps} />;
35
+ return (
36
+ <Comp
37
+ ref={ref}
38
+ className={clsx("seed-box", className)}
39
+ style={{
40
+ ...style,
41
+ ...(hideFrom && { [`--seed-box-display-${hideFrom}`]: "none" }),
42
+ }}
43
+ {...nativeProps}
44
+ />
45
+ );
23
46
  });
@@ -35,43 +35,15 @@ export const CheckboxGroup = withGroupContext<HTMLDivElement, CheckboxGroupProps
35
35
 
36
36
  ////////////////////////////////////////////////////////////////////////////////////
37
37
 
38
- /**
39
- * @deprecated Use `regular` or `bold` instead of `default` or `stronger`
40
- */
41
- type CheckboxVariantDeprecatedWeightProps = "default" | "stronger";
42
-
43
38
  export interface CheckboxRootProps
44
- extends Omit<CheckboxVariantProps, "weight">,
39
+ extends CheckboxVariantProps,
45
40
  CheckmarkVariantProps,
46
- CheckboxPrimitive.RootProps {
47
- weight?: CheckboxVariantProps["weight"] | CheckboxVariantDeprecatedWeightProps;
48
- }
41
+ CheckboxPrimitive.RootProps {}
49
42
 
50
43
  export const CheckboxRoot = Object.assign(
51
44
  forwardRef<HTMLLabelElement, CheckboxRootProps>(({ className, ...props }, ref) => {
52
- if (
53
- process.env.NODE_ENV !== "production" &&
54
- (props.weight === "default" || props.weight === "stronger")
55
- ) {
56
- console.warn(
57
- `[SEED Design System] Checkbox weight='${props.weight}' is deprecated and will be removed in @seed-design/react@2.0.0. Use weight='${props.weight === "default" ? "regular" : "bold"}' instead.`,
58
- );
59
- }
60
-
61
45
  const [{ checkbox: checkboxVariantProps, checkmark: checkmarkVariantProps }, otherProps] =
62
- splitMultipleVariantsProps(
63
- {
64
- ...props,
65
- // TODO: replace this mapping completely
66
- weight:
67
- props.weight === "stronger"
68
- ? "bold"
69
- : props.weight === "default"
70
- ? "regular"
71
- : props.weight,
72
- },
73
- { checkbox, checkmark },
74
- );
46
+ splitMultipleVariantsProps(props, { checkbox, checkmark });
75
47
 
76
48
  const classNames = checkbox(checkboxVariantProps);
77
49
 
@@ -12,12 +12,6 @@ export interface ChipTabsRootProps extends ChipTabsVariantProps, TabsPrimitive.R
12
12
 
13
13
  export const ChipTabsRoot = forwardRef<HTMLDivElement, ChipTabsRootProps>(
14
14
  ({ className, ...props }, ref) => {
15
- if (process.env.NODE_ENV !== "production" && props.variant === "brandSolid") {
16
- console.warn(
17
- "[SEED Design System] ChipTabs variant='brandSolid' is deprecated and will be removed in @seed-design/react@2.0.0. Use variant='neutralSolid' or variant='neutralOutline' instead.",
18
- );
19
- }
20
-
21
15
  const [variantProps, otherProps] = chipTabs.splitVariantProps(props);
22
16
  const classNames = chipTabs(variantProps);
23
17
 
@@ -1,10 +1,11 @@
1
1
  import * as React from "react";
2
+ import type { DistributiveOmit } from "../../utils/styled";
2
3
  import { Box, type BoxProps } from "../Box/Box";
3
4
 
4
5
  /**
5
6
  * @deprecated Use `HStack` instead.
6
7
  */
7
- export interface ColumnsProps extends Omit<BoxProps, "display" | "direction"> {}
8
+ export type ColumnsProps = DistributiveOmit<BoxProps, "display" | "direction">;
8
9
 
9
10
  /**
10
11
  * @deprecated Use `HStack` instead.
@@ -25,9 +26,9 @@ export const Columns = React.forwardRef<HTMLDivElement, ColumnsProps>((props, re
25
26
  /**
26
27
  * @deprecated Use `HStack` instead.
27
28
  */
28
- export interface ColumnProps extends Omit<BoxProps, "display" | "flexDirection" | "width"> {
29
+ export type ColumnProps = DistributiveOmit<BoxProps, "display" | "flexDirection" | "width"> & {
29
30
  width?: BoxProps["width"] | "content";
30
- }
31
+ };
31
32
 
32
33
  /**
33
34
  * @deprecated Use `HStack` instead.
@@ -20,7 +20,7 @@ const withStateProps = createWithStateProps([useDialogContext]);
20
20
  ////////////////////////////////////////////////////////////////////////////////////
21
21
 
22
22
  /**
23
- * @deprecated Use `MenuSheet` instead.
23
+ * @deprecated Use `SwipeableMenuSheet` instead.
24
24
  */
25
25
  export interface ExtendedActionSheetRootProps
26
26
  extends ExtendedActionSheetVariantProps,
@@ -36,7 +36,7 @@ export interface ExtendedActionSheetRootProps
36
36
  }
37
37
 
38
38
  /**
39
- * @deprecated Use `MenuSheet` instead.
39
+ * @deprecated Use `SwipeableMenuSheet` instead.
40
40
  */
41
41
  export const ExtendedActionSheetRoot = withRootProvider<ExtendedActionSheetRootProps>(
42
42
  DialogPrimitive.Root,
@@ -51,24 +51,24 @@ export const ExtendedActionSheetRoot = withRootProvider<ExtendedActionSheetRootP
51
51
  ////////////////////////////////////////////////////////////////////////////////////
52
52
 
53
53
  /**
54
- * @deprecated Use `MenuSheet` instead.
54
+ * @deprecated Use `SwipeableMenuSheet` instead.
55
55
  */
56
56
  export interface ExtendedActionSheetTriggerProps extends DialogPrimitive.TriggerProps {}
57
57
 
58
58
  /**
59
- * @deprecated Use `MenuSheet` instead.
59
+ * @deprecated Use `SwipeableMenuSheet` instead.
60
60
  */
61
61
  export const ExtendedActionSheetTrigger = DialogPrimitive.Trigger;
62
62
 
63
63
  ////////////////////////////////////////////////////////////////////////////////////
64
64
 
65
65
  /**
66
- * @deprecated Use `MenuSheet` instead.
66
+ * @deprecated Use `SwipeableMenuSheet` instead.
67
67
  */
68
68
  export interface ExtendedActionSheetPositionerProps extends DialogPrimitive.PositionerProps {}
69
69
 
70
70
  /**
71
- * @deprecated Use `MenuSheet` instead.
71
+ * @deprecated Use `SwipeableMenuSheet` instead.
72
72
  */
73
73
  export const ExtendedActionSheetPositioner = withContext<
74
74
  HTMLDivElement,
@@ -78,12 +78,12 @@ export const ExtendedActionSheetPositioner = withContext<
78
78
  ////////////////////////////////////////////////////////////////////////////////////
79
79
 
80
80
  /**
81
- * @deprecated Use `MenuSheet` instead.
81
+ * @deprecated Use `SwipeableMenuSheet` instead.
82
82
  */
83
83
  export interface ExtendedActionSheetBackdropProps extends DialogPrimitive.BackdropProps {}
84
84
 
85
85
  /**
86
- * @deprecated Use `MenuSheet` instead.
86
+ * @deprecated Use `SwipeableMenuSheet` instead.
87
87
  */
88
88
  export const ExtendedActionSheetBackdrop = withContext<
89
89
  HTMLDivElement,
@@ -93,12 +93,12 @@ export const ExtendedActionSheetBackdrop = withContext<
93
93
  ////////////////////////////////////////////////////////////////////////////////////
94
94
 
95
95
  /**
96
- * @deprecated Use `MenuSheet` instead.
96
+ * @deprecated Use `SwipeableMenuSheet` instead.
97
97
  */
98
98
  export interface ExtendedActionSheetContentProps extends DialogPrimitive.ContentProps {}
99
99
 
100
100
  /**
101
- * @deprecated Use `MenuSheet` instead.
101
+ * @deprecated Use `SwipeableMenuSheet` instead.
102
102
  */
103
103
  export const ExtendedActionSheetContent = withContext<
104
104
  HTMLDivElement,
@@ -108,14 +108,14 @@ export const ExtendedActionSheetContent = withContext<
108
108
  ////////////////////////////////////////////////////////////////////////////////////
109
109
 
110
110
  /**
111
- * @deprecated Use `MenuSheet` instead.
111
+ * @deprecated Use `SwipeableMenuSheet` instead.
112
112
  */
113
113
  export interface ExtendedActionSheetHeaderProps
114
114
  extends PrimitiveProps,
115
115
  React.HTMLAttributes<HTMLDivElement> {}
116
116
 
117
117
  /**
118
- * @deprecated Use `MenuSheet` instead.
118
+ * @deprecated Use `SwipeableMenuSheet` instead.
119
119
  */
120
120
  export const ExtendedActionSheetHeader = withContext<
121
121
  HTMLDivElement,
@@ -125,12 +125,12 @@ export const ExtendedActionSheetHeader = withContext<
125
125
  ////////////////////////////////////////////////////////////////////////////////////
126
126
 
127
127
  /**
128
- * @deprecated Use `MenuSheet` instead.
128
+ * @deprecated Use `SwipeableMenuSheet` instead.
129
129
  */
130
130
  export interface ExtendedActionSheetTitleProps extends DialogPrimitive.TitleProps {}
131
131
 
132
132
  /**
133
- * @deprecated Use `MenuSheet` instead.
133
+ * @deprecated Use `SwipeableMenuSheet` instead.
134
134
  */
135
135
  export const ExtendedActionSheetTitle = withContext<
136
136
  HTMLHeadingElement,
@@ -140,14 +140,14 @@ export const ExtendedActionSheetTitle = withContext<
140
140
  ////////////////////////////////////////////////////////////////////////////////////
141
141
 
142
142
  /**
143
- * @deprecated Use `MenuSheet` instead.
143
+ * @deprecated Use `SwipeableMenuSheet` instead.
144
144
  */
145
145
  export interface ExtendedActionSheetListProps
146
146
  extends PrimitiveProps,
147
147
  React.HTMLAttributes<HTMLDivElement> {}
148
148
 
149
149
  /**
150
- * @deprecated Use `MenuSheet` instead.
150
+ * @deprecated Use `SwipeableMenuSheet` instead.
151
151
  */
152
152
  export const ExtendedActionSheetList = withContext<HTMLDivElement, ExtendedActionSheetListProps>(
153
153
  withStateProps(Primitive.div),
@@ -157,12 +157,12 @@ export const ExtendedActionSheetList = withContext<HTMLDivElement, ExtendedActio
157
157
  ////////////////////////////////////////////////////////////////////////////////////
158
158
 
159
159
  /**
160
- * @deprecated Use `MenuSheet` instead.
160
+ * @deprecated Use `SwipeableMenuSheet` instead.
161
161
  */
162
162
  export interface ExtendedActionSheetGroupProps extends React.HTMLAttributes<HTMLDivElement> {}
163
163
 
164
164
  /**
165
- * @deprecated Use `MenuSheet` instead.
165
+ * @deprecated Use `SwipeableMenuSheet` instead.
166
166
  */
167
167
  export const ExtendedActionSheetGroup = withContext<HTMLDivElement, ExtendedActionSheetGroupProps>(
168
168
  withStateProps(Primitive.div),
@@ -172,7 +172,7 @@ export const ExtendedActionSheetGroup = withContext<HTMLDivElement, ExtendedActi
172
172
  ////////////////////////////////////////////////////////////////////////////////////
173
173
 
174
174
  /**
175
- * @deprecated Use `MenuSheet` instead.
175
+ * @deprecated Use `SwipeableMenuSheet` instead.
176
176
  */
177
177
  export interface ExtendedActionSheetItemProps
178
178
  extends PrimitiveProps,
@@ -180,7 +180,7 @@ export interface ExtendedActionSheetItemProps
180
180
  React.HTMLAttributes<HTMLButtonElement> {}
181
181
 
182
182
  /**
183
- * @deprecated Use `MenuSheet` instead.
183
+ * @deprecated Use `SwipeableMenuSheet` instead.
184
184
  */
185
185
  export const ExtendedActionSheetItem = withItemContext<
186
186
  HTMLButtonElement,
@@ -190,14 +190,14 @@ export const ExtendedActionSheetItem = withItemContext<
190
190
  ////////////////////////////////////////////////////////////////////////////////////
191
191
 
192
192
  /**
193
- * @deprecated Use `MenuSheet` instead.
193
+ * @deprecated Use `SwipeableMenuSheet` instead.
194
194
  */
195
195
  export interface ExtendedActionSheetFooterProps
196
196
  extends PrimitiveProps,
197
197
  React.HTMLAttributes<HTMLDivElement> {}
198
198
 
199
199
  /**
200
- * @deprecated Use `MenuSheet` instead.
200
+ * @deprecated Use `SwipeableMenuSheet` instead.
201
201
  */
202
202
  export const ExtendedActionSheetFooter = withContext<
203
203
  HTMLDivElement,
@@ -207,12 +207,12 @@ export const ExtendedActionSheetFooter = withContext<
207
207
  ////////////////////////////////////////////////////////////////////////////////////
208
208
 
209
209
  /**
210
- * @deprecated Use `MenuSheet` instead.
210
+ * @deprecated Use `SwipeableMenuSheet` instead.
211
211
  */
212
212
  export interface ExtendedActionSheetCloseButtonProps extends DialogPrimitive.CloseButtonProps {}
213
213
 
214
214
  /**
215
- * @deprecated Use `MenuSheet` instead.
215
+ * @deprecated Use `SwipeableMenuSheet` instead.
216
216
  */
217
217
  export const ExtendedActionSheetCloseButton = withContext<
218
218
  HTMLDivElement,
@@ -1,17 +1,24 @@
1
1
  import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
2
2
  import { FieldButton, useFieldButtonContext } from "@seed-design/react-field-button";
3
3
  import * as React from "react";
4
+ import { forwardRef } from "react";
4
5
  import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
5
6
  import { createWithStateProps } from "../../utils/createWithStateProps";
7
+ import { splitMultipleVariantsProps } from "../../utils/splitMultipleVariantsProps";
6
8
  import { field, type FieldVariantProps } from "@seed-design/css/recipes/field";
7
9
  import { fieldLabel, type FieldLabelVariantProps } from "@seed-design/css/recipes/field-label";
8
10
  import { InternalIcon, type InternalIconProps } from "../private/Icon";
9
- import { inputButton } from "@seed-design/css/recipes/input-button";
11
+ import { inputButton, type InputButtonVariantProps } from "@seed-design/css/recipes/input-button";
10
12
  import clsx from "clsx";
11
13
 
12
- const { withContext: withFieldContext, withProvider: withFieldProvider } =
14
+ const { ClassNamesProvider: FieldClassNamesProvider, withContext: withFieldContext } =
13
15
  createSlotRecipeContext(field);
14
- const { withProvider, withContext, useClassNames } = createSlotRecipeContext(inputButton);
16
+ const {
17
+ withProvider,
18
+ withContext,
19
+ useClassNames,
20
+ PropsProvider: InputButtonPropsProvider,
21
+ } = createSlotRecipeContext(inputButton);
15
22
  const {
16
23
  withProvider: withLabelProvider,
17
24
  withContext: withLabelContext,
@@ -22,12 +29,32 @@ const withStateProps = createWithStateProps([useFieldButtonContext]);
22
29
 
23
30
  ////////////////////////////////////////////////////////////////////////////////////
24
31
 
25
- export interface FieldButtonRootProps extends FieldVariantProps, FieldButton.RootProps {}
32
+ export interface FieldButtonRootProps
33
+ extends FieldVariantProps,
34
+ InputButtonVariantProps,
35
+ FieldButton.RootProps {}
26
36
 
27
- export const FieldButtonRoot = withFieldProvider<HTMLDivElement, FieldButtonRootProps>(
28
- FieldButton.Root,
29
- "root",
37
+ export const FieldButtonRoot = forwardRef<HTMLDivElement, FieldButtonRootProps>(
38
+ ({ className, ...props }, ref) => {
39
+ const [{ field: fieldVariantProps, inputButton: inputButtonVariantProps }, otherProps] =
40
+ splitMultipleVariantsProps(props, { field, inputButton });
41
+
42
+ const fieldClassNames = field(fieldVariantProps);
43
+
44
+ return (
45
+ <InputButtonPropsProvider value={inputButtonVariantProps}>
46
+ <FieldClassNamesProvider value={fieldClassNames}>
47
+ <FieldButton.Root
48
+ ref={ref}
49
+ className={clsx(fieldClassNames.root, className)}
50
+ {...otherProps}
51
+ />
52
+ </FieldClassNamesProvider>
53
+ </InputButtonPropsProvider>
54
+ );
55
+ },
30
56
  );
57
+ FieldButtonRoot.displayName = "FieldButtonRoot";
31
58
 
32
59
  ////////////////////////////////////////////////////////////////////////////////////
33
60
 
@@ -189,7 +216,8 @@ export const FieldButtonButton = withContext<HTMLButtonElement, FieldButtonButto
189
216
  );
190
217
 
191
218
  export interface FieldButtonControlProps
192
- extends PrimitiveProps,
219
+ extends InputButtonVariantProps,
220
+ PrimitiveProps,
193
221
  React.HTMLAttributes<HTMLDivElement> {}
194
222
 
195
223
  export const FieldButtonControl = withProvider<HTMLDivElement, FieldButtonControlProps>(
@@ -1,11 +1,13 @@
1
1
  import * as React from "react";
2
+ import type { ResponsiveValue } from "../../types/responsive";
3
+ import type { DistributiveOmit } from "../../utils/styled";
2
4
  import { Box, type BoxProps } from "../Box/Box";
3
5
 
4
- export interface FlexProps extends Omit<BoxProps, "display"> {
6
+ export type FlexProps = DistributiveOmit<BoxProps, "display"> & {
5
7
  /**
6
8
  * @default "flex"
7
9
  */
8
- display?: "flex" | "none";
10
+ display?: ResponsiveValue<"flex" | "none">;
9
11
 
10
12
  /**
11
13
  * Shorthand for `flexDirection`.
@@ -36,7 +38,7 @@ export interface FlexProps extends Omit<BoxProps, "display"> {
36
38
  * Shorthand for `flexShrink`.
37
39
  */
38
40
  shrink?: BoxProps["flexShrink"];
39
- }
41
+ };
40
42
 
41
43
  export const Flex = React.forwardRef<HTMLDivElement, FlexProps>((props, ref) => {
42
44
  const { direction, wrap, align, justify, grow, shrink, ...rest } = props;
@@ -0,0 +1,4 @@
1
+ export {
2
+ FooterLinkText as LinkText,
3
+ type FooterLinkTextProps as LinkTextProps,
4
+ } from "./FooterLinkText";
@@ -0,0 +1,23 @@
1
+ import { footer, type FooterVariantProps } from "@seed-design/css/recipes/footer";
2
+ import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
3
+ import clsx from "clsx";
4
+ import * as React from "react";
5
+
6
+ export interface FooterLinkTextProps
7
+ extends FooterVariantProps,
8
+ PrimitiveProps,
9
+ React.AnchorHTMLAttributes<HTMLAnchorElement> {}
10
+
11
+ export const FooterLinkText = React.forwardRef<HTMLAnchorElement, FooterLinkTextProps>(
12
+ ({ className, children, ...props }, ref) => {
13
+ const [variantProps, restProps] = footer.splitVariantProps(props);
14
+ const classNames = footer(variantProps);
15
+
16
+ return (
17
+ <Primitive.a ref={ref} className={clsx(classNames.linkText, className)} {...restProps}>
18
+ {children}
19
+ </Primitive.a>
20
+ );
21
+ },
22
+ );
23
+ FooterLinkText.displayName = "FooterLinkText";
@@ -0,0 +1,3 @@
1
+ export { FooterLinkText, type FooterLinkTextProps } from "./FooterLinkText";
2
+
3
+ export * as Footer from "./Footer.namespace";
@@ -1,12 +1,14 @@
1
1
  import { mergeProps } from "@seed-design/dom-utils";
2
2
  import * as React from "react";
3
+ import type { ResponsiveValue } from "../../types/responsive";
4
+ import { resolveResponsive, type DistributiveOmit } from "../../utils/styled";
3
5
  import { Box, type BoxProps } from "../Box/Box";
4
6
 
5
- export interface GridProps extends Omit<BoxProps, "display"> {
7
+ export type GridProps = DistributiveOmit<BoxProps, "display"> & {
6
8
  /**
7
9
  * @default "grid"
8
10
  */
9
- display?: "grid" | "none";
11
+ display?: ResponsiveValue<"grid" | "none">;
10
12
 
11
13
  /**
12
14
  * Shorthand for `alignItems`.
@@ -24,13 +26,13 @@ export interface GridProps extends Omit<BoxProps, "display"> {
24
26
  * Shorthand for `gridTemplateColumns`.
25
27
  * If number, `repeat({columns}, minmax(0, 1fr))` is applied.
26
28
  */
27
- columns?: number | string;
29
+ columns?: ResponsiveValue<number | string>;
28
30
 
29
31
  /**
30
32
  * Shorthand for `gridTemplateRows`.
31
33
  * If number, `repeat({rows}, minmax(0, 1fr))` is applied.
32
34
  */
33
- rows?: number | string;
35
+ rows?: ResponsiveValue<number | string>;
34
36
 
35
37
  // NOTE: grid-template-areas not currently supported here.
36
38
  // since grid-area is a shorthand of grid-column/row (in a grid item),
@@ -50,6 +52,10 @@ export interface GridProps extends Omit<BoxProps, "display"> {
50
52
  * Shorthand for `gridAutoRows`.
51
53
  */
52
54
  autoRows?: string;
55
+ };
56
+
57
+ function handleGridTemplate(v: number | string): string {
58
+ return typeof v === "number" ? `repeat(${v}, minmax(0, 1fr))` : v;
53
59
  }
54
60
 
55
61
  export const Grid = React.forwardRef<HTMLDivElement, GridProps>((props, ref) => {
@@ -57,17 +63,18 @@ export const Grid = React.forwardRef<HTMLDivElement, GridProps>((props, ref) =>
57
63
  props;
58
64
 
59
65
  return (
60
- // @ts-expect-error: display: "grid" is not allowed in the Box component
61
66
  <Box
62
67
  ref={ref}
68
+ display="grid"
63
69
  alignItems={align}
64
70
  justifyContent={justify}
65
71
  {...mergeProps(rest, {
66
72
  className: "seed-grid",
67
73
  style: {
68
- "--seed-grid-columns":
69
- typeof columns === "number" ? `repeat(${columns}, minmax(0, 1fr))` : columns,
70
- "--seed-grid-rows": typeof rows === "number" ? `repeat(${rows}, minmax(0, 1fr))` : rows,
74
+ ...(columns !== undefined &&
75
+ resolveResponsive("--seed-grid-columns", columns, handleGridTemplate)),
76
+ ...(rows !== undefined &&
77
+ resolveResponsive("--seed-grid-rows", rows, handleGridTemplate)),
71
78
  "--seed-grid-auto-flow": autoFlow,
72
79
  "--seed-grid-auto-columns": autoColumns,
73
80
  "--seed-grid-auto-rows": autoRows,
@@ -1,7 +1,8 @@
1
1
  import * as React from "react";
2
+ import type { DistributiveOmit } from "../../utils/styled";
2
3
  import { Box, type BoxProps } from "../Box/Box";
3
4
 
4
- export interface GridItemProps extends Omit<BoxProps, "gridColumn" | "gridRow" | "gridArea"> {
5
+ export type GridItemProps = DistributiveOmit<BoxProps, "gridColumn" | "gridRow" | "gridArea"> & {
5
6
  /**
6
7
  * If true, the component will render its children directly without a wrapper element.
7
8
  * @default false
@@ -39,7 +40,7 @@ export interface GridItemProps extends Omit<BoxProps, "gridColumn" | "gridRow" |
39
40
  rowEnd?: number;
40
41
 
41
42
  // NOTE: grid-area is not currently supported here: see Grid.tsx
42
- }
43
+ };
43
44
 
44
45
  export const GridItem = React.forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {
45
46
  const { asChild = false, colSpan, colStart, colEnd, rowSpan, rowStart, rowEnd, ...rest } = props;