@seed-design/react 0.0.1-rc.2 → 0.0.1-rc.4

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 (403) hide show
  1. package/lib/components/ActionButton/ActionButton.cjs +57 -0
  2. package/lib/components/ActionButton/ActionButton.d.ts +3 -3
  3. package/lib/components/ActionButton/ActionButton.js +34 -0
  4. package/lib/components/ActionButton/index.cjs +9 -0
  5. package/lib/components/ActionButton/index.d.ts +1 -1
  6. package/lib/components/ActionButton/index.js +1 -0
  7. package/lib/components/ActionChip/ActionChip.cjs +17 -0
  8. package/lib/components/ActionChip/ActionChip.d.ts +2 -2
  9. package/lib/components/ActionChip/ActionChip.js +13 -0
  10. package/lib/components/ActionChip/index.cjs +9 -0
  11. package/lib/components/ActionChip/index.d.ts +1 -1
  12. package/lib/components/ActionChip/index.js +1 -0
  13. package/lib/components/ActionSheet/ActionSheet.cjs +66 -0
  14. package/lib/components/ActionSheet/ActionSheet.d.ts +4 -4
  15. package/lib/components/ActionSheet/ActionSheet.js +52 -0
  16. package/lib/components/ActionSheet/ActionSheet.namespace.cjs +19 -0
  17. package/lib/components/ActionSheet/ActionSheet.namespace.d.ts +1 -1
  18. package/lib/components/ActionSheet/ActionSheet.namespace.js +1 -0
  19. package/lib/components/ActionSheet/index.cjs +21 -0
  20. package/lib/components/ActionSheet/index.d.ts +2 -2
  21. package/lib/components/ActionSheet/index.js +3 -0
  22. package/lib/components/Avatar/Avatar.cjs +62 -0
  23. package/lib/components/Avatar/Avatar.d.ts +4 -4
  24. package/lib/components/Avatar/Avatar.js +36 -0
  25. package/lib/components/Avatar/Avatar.namespace.cjs +13 -0
  26. package/lib/components/Avatar/Avatar.namespace.d.ts +1 -1
  27. package/lib/components/Avatar/Avatar.namespace.js +1 -0
  28. package/lib/components/Avatar/index.cjs +15 -0
  29. package/lib/components/Avatar/index.d.ts +2 -2
  30. package/lib/components/Avatar/index.js +3 -0
  31. package/lib/components/Badge/Badge.cjs +12 -0
  32. package/lib/components/Badge/Badge.d.ts +2 -2
  33. package/lib/components/Badge/Badge.js +8 -0
  34. package/lib/components/Badge/index.cjs +9 -0
  35. package/lib/components/Badge/index.d.ts +1 -1
  36. package/lib/components/Badge/index.js +1 -0
  37. package/lib/components/BottomSheet/BottomSheet.cjs +65 -0
  38. package/lib/components/BottomSheet/BottomSheet.d.ts +16 -15
  39. package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
  40. package/lib/components/BottomSheet/BottomSheet.js +51 -0
  41. package/lib/components/BottomSheet/BottomSheet.namespace.cjs +19 -0
  42. package/lib/components/BottomSheet/BottomSheet.namespace.d.ts +1 -1
  43. package/lib/components/BottomSheet/BottomSheet.namespace.js +1 -0
  44. package/lib/components/BottomSheet/index.cjs +21 -0
  45. package/lib/components/BottomSheet/index.d.ts +2 -2
  46. package/lib/components/BottomSheet/index.js +3 -0
  47. package/lib/components/Box/Box.cjs +35 -0
  48. package/lib/components/Box/Box.d.ts +1 -1
  49. package/lib/components/Box/Box.js +12 -0
  50. package/lib/components/Box/index.cjs +9 -0
  51. package/lib/components/Box/index.d.ts +1 -1
  52. package/lib/components/Box/index.js +1 -0
  53. package/lib/components/Callout/Callout.cjs +38 -0
  54. package/lib/components/Callout/Callout.d.ts +3 -3
  55. package/lib/components/Callout/Callout.js +29 -0
  56. package/lib/components/Callout/Callout.namespace.cjs +14 -0
  57. package/lib/components/Callout/Callout.namespace.d.ts +1 -1
  58. package/lib/components/Callout/Callout.namespace.js +1 -0
  59. package/lib/components/Callout/index.cjs +16 -0
  60. package/lib/components/Callout/index.d.ts +2 -2
  61. package/lib/components/Callout/index.js +3 -0
  62. package/lib/components/Celcius/Celcius.cjs +9 -0
  63. package/lib/components/Celcius/Celcius.js +5 -0
  64. package/lib/components/Celcius/index.cjs +9 -0
  65. package/lib/components/Celcius/index.d.ts +1 -1
  66. package/lib/components/Celcius/index.js +1 -0
  67. package/lib/components/Checkbox/Checkbox.cjs +61 -0
  68. package/lib/components/Checkbox/Checkbox.d.ts +9 -8
  69. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  70. package/lib/components/Checkbox/Checkbox.js +53 -0
  71. package/lib/components/Checkbox/Checkbox.namespace.cjs +13 -0
  72. package/lib/components/Checkbox/Checkbox.namespace.d.ts +1 -1
  73. package/lib/components/Checkbox/Checkbox.namespace.js +1 -0
  74. package/lib/components/Checkbox/index.cjs +15 -0
  75. package/lib/components/Checkbox/index.d.ts +2 -2
  76. package/lib/components/Checkbox/index.js +3 -0
  77. package/lib/components/ChipTabs/ChipTabs.cjs +40 -0
  78. package/lib/components/ChipTabs/ChipTabs.d.ts +9 -8
  79. package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -1
  80. package/lib/components/ChipTabs/ChipTabs.js +31 -0
  81. package/lib/components/ChipTabs/ChipTabs.namespace.cjs +14 -0
  82. package/lib/components/ChipTabs/ChipTabs.namespace.d.ts +1 -1
  83. package/lib/components/ChipTabs/ChipTabs.namespace.js +1 -0
  84. package/lib/components/ChipTabs/index.cjs +16 -0
  85. package/lib/components/ChipTabs/index.d.ts +2 -2
  86. package/lib/components/ChipTabs/index.js +3 -0
  87. package/lib/components/Columns/Columns.cjs +58 -0
  88. package/lib/components/Columns/Columns.d.ts +1 -1
  89. package/lib/components/Columns/Columns.js +34 -0
  90. package/lib/components/Columns/index.cjs +10 -0
  91. package/lib/components/Columns/index.d.ts +1 -1
  92. package/lib/components/Columns/index.js +1 -0
  93. package/lib/components/ConsistentWidth/ConsistentWidth.cjs +23 -0
  94. package/lib/components/ConsistentWidth/ConsistentWidth.d.ts +3 -2
  95. package/lib/components/ConsistentWidth/ConsistentWidth.d.ts.map +1 -1
  96. package/lib/components/ConsistentWidth/ConsistentWidth.js +19 -0
  97. package/lib/components/ConsistentWidth/index.cjs +9 -0
  98. package/lib/components/ConsistentWidth/index.d.ts +1 -1
  99. package/lib/components/ConsistentWidth/index.js +1 -0
  100. package/lib/components/ControlChip/ControlChip.cjs +16 -0
  101. package/lib/components/ControlChip/ControlChip.d.ts +2 -2
  102. package/lib/components/ControlChip/ControlChip.js +12 -0
  103. package/lib/components/ControlChip/index.cjs +9 -0
  104. package/lib/components/ControlChip/index.d.ts +1 -1
  105. package/lib/components/ControlChip/index.js +1 -0
  106. package/lib/components/Count/Count.cjs +15 -0
  107. package/lib/components/Count/Count.d.ts +2 -1
  108. package/lib/components/Count/Count.d.ts.map +1 -1
  109. package/lib/components/Count/Count.js +11 -0
  110. package/lib/components/Count/index.cjs +9 -0
  111. package/lib/components/Count/index.d.ts +1 -1
  112. package/lib/components/Count/index.d.ts.map +1 -1
  113. package/lib/components/Count/index.js +1 -0
  114. package/lib/components/Dialog/Dialog.cjs +58 -0
  115. package/lib/components/Dialog/Dialog.d.ts +14 -13
  116. package/lib/components/Dialog/Dialog.d.ts.map +1 -1
  117. package/lib/components/Dialog/Dialog.js +45 -0
  118. package/lib/components/Dialog/Dialog.namespace.cjs +18 -0
  119. package/lib/components/Dialog/Dialog.namespace.d.ts +1 -1
  120. package/lib/components/Dialog/Dialog.namespace.js +1 -0
  121. package/lib/components/Dialog/index.cjs +20 -0
  122. package/lib/components/Dialog/index.d.ts +2 -2
  123. package/lib/components/Dialog/index.js +3 -0
  124. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.cjs +53 -0
  125. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.d.ts +4 -4
  126. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.js +38 -0
  127. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.cjs +20 -0
  128. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.d.ts +1 -1
  129. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.js +1 -0
  130. package/lib/components/ExtendedActionSheet/index.cjs +22 -0
  131. package/lib/components/ExtendedActionSheet/index.d.ts +2 -2
  132. package/lib/components/ExtendedActionSheet/index.js +3 -0
  133. package/lib/components/ExtendedFab/ExtendedFab.cjs +21 -0
  134. package/lib/components/ExtendedFab/ExtendedFab.d.ts +4 -3
  135. package/lib/components/ExtendedFab/ExtendedFab.d.ts.map +1 -1
  136. package/lib/components/ExtendedFab/ExtendedFab.js +17 -0
  137. package/lib/components/ExtendedFab/index.cjs +9 -0
  138. package/lib/components/ExtendedFab/index.d.ts +1 -1
  139. package/lib/components/ExtendedFab/index.js +1 -0
  140. package/lib/components/Fab/Fab.cjs +12 -0
  141. package/lib/components/Fab/Fab.d.ts +2 -2
  142. package/lib/components/Fab/Fab.js +8 -0
  143. package/lib/components/Fab/index.cjs +9 -0
  144. package/lib/components/Fab/index.d.ts +1 -1
  145. package/lib/components/Fab/index.js +1 -0
  146. package/lib/components/Flex/Flex.cjs +33 -0
  147. package/lib/components/Flex/Flex.d.ts +1 -1
  148. package/lib/components/Flex/Flex.js +10 -0
  149. package/lib/components/Flex/index.cjs +9 -0
  150. package/lib/components/Flex/index.d.ts +1 -1
  151. package/lib/components/Flex/index.js +1 -0
  152. package/lib/components/HelpBubble/HelpBubble.cjs +93 -0
  153. package/lib/components/HelpBubble/HelpBubble.d.ts +16 -15
  154. package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -1
  155. package/lib/components/HelpBubble/HelpBubble.js +79 -0
  156. package/lib/components/HelpBubble/HelpBubble.namespace.cjs +19 -0
  157. package/lib/components/HelpBubble/HelpBubble.namespace.d.ts +1 -1
  158. package/lib/components/HelpBubble/HelpBubble.namespace.js +1 -0
  159. package/lib/components/HelpBubble/index.cjs +21 -0
  160. package/lib/components/HelpBubble/index.d.ts +2 -2
  161. package/lib/components/HelpBubble/index.js +3 -0
  162. package/lib/components/Icon/Icon.cjs +118 -0
  163. package/lib/components/Icon/Icon.d.ts +5 -4
  164. package/lib/components/Icon/Icon.d.ts.map +1 -1
  165. package/lib/components/Icon/Icon.js +110 -0
  166. package/lib/components/Icon/index.cjs +11 -0
  167. package/lib/components/Icon/index.d.ts +1 -1
  168. package/lib/components/Icon/index.d.ts.map +1 -1
  169. package/lib/components/Icon/index.js +1 -0
  170. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.cjs +62 -0
  171. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.d.ts +2 -2
  172. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.js +38 -0
  173. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.cjs +10 -0
  174. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.d.ts +1 -1
  175. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.js +1 -0
  176. package/lib/components/IdentityPlaceholder/index.cjs +12 -0
  177. package/lib/components/IdentityPlaceholder/index.d.ts +2 -2
  178. package/lib/components/IdentityPlaceholder/index.js +3 -0
  179. package/lib/components/Inline/Inline.cjs +43 -0
  180. package/lib/components/Inline/Inline.d.ts +1 -1
  181. package/lib/components/Inline/Inline.js +20 -0
  182. package/lib/components/Inline/index.cjs +9 -0
  183. package/lib/components/Inline/index.d.ts +1 -1
  184. package/lib/components/Inline/index.js +1 -0
  185. package/lib/components/InlineBanner/InlineBanner.cjs +41 -0
  186. package/lib/components/InlineBanner/InlineBanner.d.ts +3 -3
  187. package/lib/components/InlineBanner/InlineBanner.js +32 -0
  188. package/lib/components/InlineBanner/InlineBanner.namespace.cjs +14 -0
  189. package/lib/components/InlineBanner/InlineBanner.namespace.d.ts +1 -1
  190. package/lib/components/InlineBanner/InlineBanner.namespace.js +1 -0
  191. package/lib/components/InlineBanner/index.cjs +16 -0
  192. package/lib/components/InlineBanner/index.d.ts +2 -2
  193. package/lib/components/InlineBanner/index.js +3 -0
  194. package/lib/components/LinkContent/LinkContent.cjs +16 -0
  195. package/lib/components/LinkContent/LinkContent.d.ts +8 -0
  196. package/lib/components/LinkContent/LinkContent.d.ts.map +1 -0
  197. package/lib/components/LinkContent/LinkContent.js +12 -0
  198. package/lib/components/LinkContent/index.cjs +9 -0
  199. package/lib/components/LinkContent/index.d.ts +2 -0
  200. package/lib/components/LinkContent/index.d.ts.map +1 -0
  201. package/lib/components/LinkContent/index.js +1 -0
  202. package/lib/components/LoadingIndicator/LoadingIndicator.cjs +27 -0
  203. package/lib/components/LoadingIndicator/LoadingIndicator.d.ts +2 -1
  204. package/lib/components/LoadingIndicator/LoadingIndicator.d.ts.map +1 -1
  205. package/lib/components/LoadingIndicator/LoadingIndicator.js +23 -0
  206. package/lib/components/LoadingIndicator/index.cjs +9 -0
  207. package/lib/components/LoadingIndicator/index.d.ts +1 -1
  208. package/lib/components/LoadingIndicator/index.js +1 -0
  209. package/lib/components/LoadingIndicator/usePendingButton.cjs +51 -0
  210. package/lib/components/LoadingIndicator/usePendingButton.js +26 -0
  211. package/lib/components/MannerTempBadge/MannerTempBadge.cjs +15 -0
  212. package/lib/components/MannerTempBadge/MannerTempBadge.d.ts +2 -2
  213. package/lib/components/MannerTempBadge/MannerTempBadge.js +11 -0
  214. package/lib/components/MannerTempBadge/index.cjs +9 -0
  215. package/lib/components/MannerTempBadge/index.d.ts +1 -1
  216. package/lib/components/MannerTempBadge/index.js +1 -0
  217. package/lib/components/ProgressCircle/ProgressCircle.cjs +25 -0
  218. package/lib/components/ProgressCircle/ProgressCircle.d.ts +6 -5
  219. package/lib/components/ProgressCircle/ProgressCircle.d.ts.map +1 -1
  220. package/lib/components/ProgressCircle/ProgressCircle.js +19 -0
  221. package/lib/components/ProgressCircle/ProgressCircle.namespace.cjs +11 -0
  222. package/lib/components/ProgressCircle/ProgressCircle.namespace.d.ts +1 -1
  223. package/lib/components/ProgressCircle/ProgressCircle.namespace.js +1 -0
  224. package/lib/components/ProgressCircle/index.cjs +13 -0
  225. package/lib/components/ProgressCircle/index.d.ts +2 -2
  226. package/lib/components/ProgressCircle/index.js +3 -0
  227. package/lib/components/PullToRefresh/PullToRefresh.cjs +22 -0
  228. package/lib/components/PullToRefresh/PullToRefresh.d.ts +6 -5
  229. package/lib/components/PullToRefresh/PullToRefresh.d.ts.map +1 -1
  230. package/lib/components/PullToRefresh/PullToRefresh.js +16 -0
  231. package/lib/components/PullToRefresh/PullToRefresh.namespace.cjs +11 -0
  232. package/lib/components/PullToRefresh/PullToRefresh.namespace.d.ts +1 -1
  233. package/lib/components/PullToRefresh/PullToRefresh.namespace.js +1 -0
  234. package/lib/components/PullToRefresh/index.cjs +13 -0
  235. package/lib/components/PullToRefresh/index.d.ts +2 -2
  236. package/lib/components/PullToRefresh/index.js +3 -0
  237. package/lib/components/ReactionButton/ReactionButton.cjs +50 -0
  238. package/lib/components/ReactionButton/ReactionButton.d.ts +3 -3
  239. package/lib/components/ReactionButton/ReactionButton.js +27 -0
  240. package/lib/components/ReactionButton/index.cjs +9 -0
  241. package/lib/components/ReactionButton/index.d.ts +1 -1
  242. package/lib/components/ReactionButton/index.js +1 -0
  243. package/lib/components/SegmentedControl/SegmentedControl.cjs +25 -0
  244. package/lib/components/SegmentedControl/SegmentedControl.d.ts +8 -7
  245. package/lib/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  246. package/lib/components/SegmentedControl/SegmentedControl.js +18 -0
  247. package/lib/components/SegmentedControl/SegmentedControl.namespace.cjs +12 -0
  248. package/lib/components/SegmentedControl/SegmentedControl.namespace.d.ts +1 -1
  249. package/lib/components/SegmentedControl/SegmentedControl.namespace.js +1 -0
  250. package/lib/components/SegmentedControl/index.cjs +14 -0
  251. package/lib/components/SegmentedControl/index.d.ts +2 -2
  252. package/lib/components/SegmentedControl/index.js +3 -0
  253. package/lib/components/SelectBox/CheckSelectBox.cjs +52 -0
  254. package/lib/components/SelectBox/CheckSelectBox.d.ts +12 -11
  255. package/lib/components/SelectBox/CheckSelectBox.d.ts.map +1 -1
  256. package/lib/components/SelectBox/CheckSelectBox.js +41 -0
  257. package/lib/components/SelectBox/CheckSelectBox.namespace.cjs +16 -0
  258. package/lib/components/SelectBox/CheckSelectBox.namespace.d.ts +1 -1
  259. package/lib/components/SelectBox/CheckSelectBox.namespace.js +1 -0
  260. package/lib/components/SelectBox/RadioSelectBox.cjs +50 -0
  261. package/lib/components/SelectBox/RadioSelectBox.d.ts +12 -11
  262. package/lib/components/SelectBox/RadioSelectBox.d.ts.map +1 -1
  263. package/lib/components/SelectBox/RadioSelectBox.js +39 -0
  264. package/lib/components/SelectBox/RadioSelectBox.namespace.cjs +16 -0
  265. package/lib/components/SelectBox/RadioSelectBox.namespace.d.ts +1 -1
  266. package/lib/components/SelectBox/RadioSelectBox.namespace.js +1 -0
  267. package/lib/components/SelectBox/index.cjs +29 -0
  268. package/lib/components/SelectBox/index.d.ts +4 -4
  269. package/lib/components/SelectBox/index.js +6 -0
  270. package/lib/components/Skeleton/Skeleton.cjs +16 -0
  271. package/lib/components/Skeleton/Skeleton.d.ts +3 -3
  272. package/lib/components/Skeleton/Skeleton.js +12 -0
  273. package/lib/components/Skeleton/index.cjs +9 -0
  274. package/lib/components/Skeleton/index.d.ts +1 -1
  275. package/lib/components/Skeleton/index.js +1 -0
  276. package/lib/components/Snackbar/Snackbar.cjs +64 -0
  277. package/lib/components/Snackbar/Snackbar.d.ts +13 -12
  278. package/lib/components/Snackbar/Snackbar.d.ts.map +1 -1
  279. package/lib/components/Snackbar/Snackbar.js +52 -0
  280. package/lib/components/Snackbar/Snackbar.namespace.cjs +17 -0
  281. package/lib/components/Snackbar/Snackbar.namespace.d.ts +1 -1
  282. package/lib/components/Snackbar/Snackbar.namespace.js +1 -0
  283. package/lib/components/Snackbar/index.cjs +26 -0
  284. package/lib/components/Snackbar/index.d.ts +4 -4
  285. package/lib/components/Snackbar/index.js +5 -0
  286. package/lib/components/Snackbar/useSnackbarAdapter.cjs +28 -0
  287. package/lib/components/Snackbar/useSnackbarAdapter.d.ts +1 -1
  288. package/lib/components/Snackbar/useSnackbarAdapter.js +24 -0
  289. package/lib/components/Stack/Stack.cjs +32 -0
  290. package/lib/components/Stack/Stack.d.ts +1 -1
  291. package/lib/components/Stack/Stack.js +9 -0
  292. package/lib/components/Stack/index.cjs +9 -0
  293. package/lib/components/Stack/index.d.ts +1 -1
  294. package/lib/components/Stack/index.js +1 -0
  295. package/lib/components/Switch/Switch.cjs +35 -0
  296. package/lib/components/Switch/Switch.d.ts +9 -8
  297. package/lib/components/Switch/Switch.d.ts.map +1 -1
  298. package/lib/components/Switch/Switch.js +27 -0
  299. package/lib/components/Switch/Switch.namespace.cjs +13 -0
  300. package/lib/components/Switch/Switch.namespace.d.ts +1 -1
  301. package/lib/components/Switch/Switch.namespace.js +1 -0
  302. package/lib/components/Switch/index.cjs +15 -0
  303. package/lib/components/Switch/index.d.ts +2 -2
  304. package/lib/components/Switch/index.js +3 -0
  305. package/lib/components/Tabs/Tabs.cjs +49 -0
  306. package/lib/components/Tabs/Tabs.d.ts +4 -4
  307. package/lib/components/Tabs/Tabs.js +38 -0
  308. package/lib/components/Tabs/Tabs.namespace.cjs +16 -0
  309. package/lib/components/Tabs/Tabs.namespace.d.ts +1 -1
  310. package/lib/components/Tabs/Tabs.namespace.js +1 -0
  311. package/lib/components/Tabs/index.cjs +18 -0
  312. package/lib/components/Tabs/index.d.ts +2 -2
  313. package/lib/components/Tabs/index.js +3 -0
  314. package/lib/components/Text/Text.cjs +85 -0
  315. package/lib/components/Text/Text.d.ts +2 -2
  316. package/lib/components/Text/Text.js +81 -0
  317. package/lib/components/Text/index.cjs +9 -0
  318. package/lib/components/Text/index.d.ts +1 -1
  319. package/lib/components/Text/index.d.ts.map +1 -1
  320. package/lib/components/Text/index.js +1 -0
  321. package/lib/components/TextField/TextField.cjs +150 -0
  322. package/lib/components/TextField/TextField.d.ts +4 -4
  323. package/lib/components/TextField/TextField.js +129 -0
  324. package/lib/components/TextField/TextField.namespace.cjs +26 -0
  325. package/lib/components/TextField/TextField.namespace.d.ts +1 -1
  326. package/lib/components/TextField/TextField.namespace.d.ts.map +1 -1
  327. package/lib/components/TextField/TextField.namespace.js +1 -0
  328. package/lib/components/TextField/index.cjs +28 -0
  329. package/lib/components/TextField/index.d.ts +2 -2
  330. package/lib/components/TextField/index.d.ts.map +1 -1
  331. package/lib/components/TextField/index.js +3 -0
  332. package/lib/components/ToggleButton/ToggleButton.cjs +50 -0
  333. package/lib/components/ToggleButton/ToggleButton.d.ts +3 -3
  334. package/lib/components/ToggleButton/ToggleButton.js +27 -0
  335. package/lib/components/ToggleButton/index.cjs +9 -0
  336. package/lib/components/ToggleButton/index.d.ts +1 -1
  337. package/lib/components/ToggleButton/index.js +1 -0
  338. package/lib/components/VisuallyHidden/VisuallyHidden.cjs +15 -0
  339. package/lib/components/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  340. package/lib/components/VisuallyHidden/VisuallyHidden.js +11 -0
  341. package/lib/components/VisuallyHidden/index.cjs +9 -0
  342. package/lib/components/VisuallyHidden/index.d.ts +1 -1
  343. package/lib/components/VisuallyHidden/index.d.ts.map +1 -1
  344. package/lib/components/VisuallyHidden/index.js +1 -0
  345. package/lib/components/index.cjs +274 -0
  346. package/lib/components/index.d.ts +42 -42
  347. package/lib/components/index.d.ts.map +1 -1
  348. package/lib/components/index.js +85 -0
  349. package/lib/components/private/Icon.cjs +15 -0
  350. package/lib/components/private/Icon.d.ts +2 -1
  351. package/lib/components/private/Icon.d.ts.map +1 -1
  352. package/lib/components/private/Icon.js +11 -0
  353. package/lib/components/private/useDismissible.cjs +78 -0
  354. package/lib/components/private/useDismissible.d.ts +1 -1
  355. package/lib/components/private/useDismissible.js +51 -0
  356. package/lib/index.cjs +274 -0
  357. package/lib/index.d.ts +1 -1
  358. package/lib/index.d.ts.map +1 -1
  359. package/lib/index.js +85 -2174
  360. package/lib/primitive.cjs +84 -0
  361. package/lib/primitive.d.ts +11 -11
  362. package/lib/primitive.js +11 -31
  363. package/lib/utils/createStyleContext.cjs +76 -0
  364. package/lib/utils/createStyleContext.js +72 -0
  365. package/lib/utils/createWithStateProps.cjs +23 -0
  366. package/lib/utils/createWithStateProps.d.ts +2 -1
  367. package/lib/utils/createWithStateProps.d.ts.map +1 -1
  368. package/lib/utils/createWithStateProps.js +19 -0
  369. package/lib/utils/styled.cjs +190 -0
  370. package/lib/utils/styled.d.ts +3 -2
  371. package/lib/utils/styled.d.ts.map +1 -1
  372. package/lib/utils/styled.js +185 -0
  373. package/lib/vars.cjs +14 -0
  374. package/lib/vars.d.ts +1 -1
  375. package/lib/vars.js +1 -21
  376. package/package.json +16 -25
  377. package/src/components/LinkContent/LinkContent.tsx +19 -0
  378. package/src/components/LinkContent/index.ts +4 -0
  379. package/src/components/index.ts +1 -1
  380. package/lib/components/LinkWithIcon/LinkWithIcon.d.ts +0 -8
  381. package/lib/components/LinkWithIcon/LinkWithIcon.d.ts.map +0 -1
  382. package/lib/components/LinkWithIcon/index.d.ts +0 -2
  383. package/lib/components/LinkWithIcon/index.d.ts.map +0 -1
  384. package/lib/index.js.map +0 -7
  385. package/lib/index.mjs +0 -2184
  386. package/lib/index.mjs.map +0 -7
  387. package/lib/primitive.js.map +0 -7
  388. package/lib/primitive.mjs +0 -13
  389. package/lib/primitive.mjs.map +0 -7
  390. package/lib/seed.css +0 -5017
  391. package/lib/seed.min.css +0 -1
  392. package/lib/vars.js.map +0 -7
  393. package/lib/vars.mjs +0 -3
  394. package/lib/vars.mjs.map +0 -7
  395. package/src/components/LinkWithIcon/LinkWithIcon.tsx +0 -22
  396. package/src/components/LinkWithIcon/index.ts +0 -4
  397. /package/src/components/Count/{index.tsx → index.ts} +0 -0
  398. /package/src/components/Icon/{index.tsx → index.ts} +0 -0
  399. /package/src/components/Text/{index.tsx → index.ts} +0 -0
  400. /package/src/components/TextField/{TextField.namespace.tsx → TextField.namespace.ts} +0 -0
  401. /package/src/components/TextField/{index.tsx → index.ts} +0 -0
  402. /package/src/components/VisuallyHidden/{index.tsx → index.ts} +0 -0
  403. /package/src/{index.tsx → index.ts} +0 -0
package/lib/index.mjs DELETED
@@ -1,2184 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
- // src/components/ActionButton/ActionButton.tsx
8
- import {
9
- actionButton
10
- } from "@seed-design/css/recipes/action-button";
11
- import { Primitive } from "@seed-design/react-primitive";
12
- import clsx2 from "clsx";
13
- import * as React2 from "react";
14
-
15
- // src/utils/createStyleContext.tsx
16
- import clsx from "clsx";
17
- import { createContext, forwardRef, useContext } from "react";
18
- import { jsx } from "react/jsx-runtime";
19
- function createStyleContext(recipe) {
20
- const ClassNamesContext = createContext(null);
21
- const PropsContext = createContext(null);
22
- const ClassNamesProvider4 = ({
23
- children,
24
- value
25
- }) => {
26
- return /* @__PURE__ */ jsx(ClassNamesContext.Provider, { value, children });
27
- };
28
- const PropsProvider2 = ({ children, value }) => {
29
- return /* @__PURE__ */ jsx(PropsContext.Provider, { value, children });
30
- };
31
- function useClassNames4() {
32
- const context = useContext(ClassNamesContext);
33
- if (context === null) {
34
- throw new Error(
35
- "useClassNames must be used within a ClassNamesProvider. Did you forget to wrap your component in a ClassNamesProvider?"
36
- );
37
- }
38
- return context;
39
- }
40
- function useProps() {
41
- return useContext(PropsContext);
42
- }
43
- const withRootProvider6 = (Component, options) => {
44
- const { defaultProps } = options != null ? options : {};
45
- const StyledComponent = (innerProps) => {
46
- const props = { ...defaultProps != null ? defaultProps : {}, ...useProps(), ...innerProps };
47
- const [variantProps, otherProps] = recipe.splitVariantProps(props);
48
- const classNames = recipe(variantProps);
49
- return /* @__PURE__ */ jsx(ClassNamesProvider4, { value: classNames, children: /* @__PURE__ */ jsx(Component, { ...otherProps }) });
50
- };
51
- StyledComponent.displayName = Component.displayName || Component.name;
52
- return StyledComponent;
53
- };
54
- const withProvider25 = (Component, slot, options) => {
55
- const { defaultProps } = options != null ? options : {};
56
- const StyledComponent = forwardRef((innerProps, ref) => {
57
- const props = { ...defaultProps != null ? defaultProps : {}, ...useProps(), ...innerProps };
58
- const [variantProps, otherProps] = recipe.splitVariantProps(props);
59
- const classNames = recipe(variantProps);
60
- const className = classNames[slot];
61
- return /* @__PURE__ */ jsx(ClassNamesProvider4, { value: classNames, children: /* @__PURE__ */ jsx(Component, { ref, ...otherProps, className: clsx(className, props.className) }) });
62
- });
63
- StyledComponent.displayName = Component.displayName || Component.name;
64
- return StyledComponent;
65
- };
66
- const withContext20 = (Component, slot) => {
67
- const StyledComponent = forwardRef((props, ref) => {
68
- const classNames = useClassNames4();
69
- const className = classNames == null ? void 0 : classNames[slot];
70
- return /* @__PURE__ */ jsx(Component, { ref, ...props, className: clsx(className, props.className) });
71
- });
72
- StyledComponent.displayName = Component.displayName || Component.name;
73
- return StyledComponent;
74
- };
75
- return {
76
- ClassNamesProvider: ClassNamesProvider4,
77
- PropsProvider: PropsProvider2,
78
- useClassNames: useClassNames4,
79
- useProps,
80
- withRootProvider: withRootProvider6,
81
- withProvider: withProvider25,
82
- withContext: withContext20
83
- };
84
- }
85
-
86
- // src/components/LoadingIndicator/usePendingButton.tsx
87
- import { elementProps } from "@seed-design/dom-utils";
88
- import * as React from "react";
89
- function usePendingButton(props) {
90
- const { loading, disabled } = props;
91
- const stateProps = elementProps({
92
- "data-loading": loading ? "" : void 0,
93
- "data-disabled": disabled ? "" : void 0
94
- });
95
- return {
96
- loading,
97
- disabled,
98
- stateProps
99
- };
100
- }
101
- var PendingButtonContext = React.createContext(null);
102
- var PendingButtonProvider = PendingButtonContext.Provider;
103
- var usePendingButtonContext = () => {
104
- const context = React.useContext(PendingButtonContext);
105
- if (context === null) {
106
- throw new Error("usePendingButtonContext should be used within UsePendingButtonProvider");
107
- }
108
- return context;
109
- };
110
-
111
- // src/components/Icon/Icon.tsx
112
- import { Slot } from "@radix-ui/react-slot";
113
- import { useLayoutEffect } from "@radix-ui/react-use-layout-effect";
114
- import { createContext as createContext3, forwardRef as forwardRef2, useCallback, useContext as useContext3, useMemo, useRef } from "react";
115
- import { jsx as jsx2 } from "react/jsx-runtime";
116
- var PrefixIcon = forwardRef2(
117
- ({ svg, ...otherProps }, ref) => {
118
- return /* @__PURE__ */ jsx2(
119
- Slot,
120
- {
121
- ref,
122
- "aria-hidden": true,
123
- className: "seed-prefix-icon",
124
- ...otherProps,
125
- children: svg
126
- }
127
- );
128
- }
129
- );
130
- var SuffixIcon = forwardRef2(
131
- ({ svg, ...otherProps }, ref) => {
132
- return /* @__PURE__ */ jsx2(
133
- Slot,
134
- {
135
- ref,
136
- "aria-hidden": true,
137
- className: "seed-suffix-icon",
138
- ...otherProps,
139
- children: svg
140
- }
141
- );
142
- }
143
- );
144
- var IconContext = createContext3(null);
145
- var IconRequired = ({
146
- children,
147
- enabled
148
- }) => {
149
- const registeredRef = useRef(false);
150
- const parentContext = useContext3(IconContext);
151
- const register = useCallback(() => {
152
- if (true) {
153
- if (registeredRef.current) {
154
- throw new Error(
155
- "Icon-only Component must render only one <Icon /> under children. Check if you are rendering multiple <Icon />."
156
- );
157
- }
158
- }
159
- registeredRef.current = true;
160
- }, []);
161
- const unregister = useCallback(() => {
162
- registeredRef.current = false;
163
- }, []);
164
- useLayoutEffect(() => {
165
- if (!enabled) {
166
- return;
167
- }
168
- if (true) {
169
- if (parentContext) {
170
- throw new Error(
171
- "Icon-only Component must not be nested within another Icon-Only. Check if you are using Icon-Only inside another Icon-Only."
172
- );
173
- }
174
- if (!registeredRef.current) {
175
- throw new Error(
176
- "Icon-only Component must render <Icon /> as a child. Check if you are using raw svg icon instead of <Icon svg={} />."
177
- );
178
- }
179
- }
180
- }, [parentContext, enabled]);
181
- const providerValue = useMemo(() => {
182
- if (!enabled) {
183
- if (parentContext) {
184
- return parentContext;
185
- }
186
- return null;
187
- }
188
- return { register, unregister };
189
- }, [enabled, parentContext, register, unregister]);
190
- return /* @__PURE__ */ jsx2(IconContext.Provider, { value: providerValue, children });
191
- };
192
- var Icon = forwardRef2(({ svg, ...otherProps }, ref) => {
193
- const context = useContext3(IconContext);
194
- useLayoutEffect(() => {
195
- context == null ? void 0 : context.register();
196
- return () => {
197
- context == null ? void 0 : context.unregister();
198
- };
199
- }, [context]);
200
- return /* @__PURE__ */ jsx2(
201
- Slot,
202
- {
203
- ref,
204
- "aria-hidden": true,
205
- className: "seed-icon",
206
- ...otherProps,
207
- children: svg
208
- }
209
- );
210
- });
211
- function withIconRequired(Component, enabledPredicate) {
212
- const Node = forwardRef2((props, ref) => {
213
- const enabled = enabledPredicate(props);
214
- return /* @__PURE__ */ jsx2(IconRequired, { enabled, children: /* @__PURE__ */ jsx2(Component, { ref, ...props }) });
215
- });
216
- Node.displayName = Component.displayName || Component.name;
217
- return Node;
218
- }
219
-
220
- // src/components/ActionButton/ActionButton.tsx
221
- import { jsx as jsx3 } from "react/jsx-runtime";
222
- var { ClassNamesProvider } = createStyleContext(actionButton);
223
- var ActionButton = React2.forwardRef(
224
- ({ variant, size, loading = false, layout = "withText", className, children, ...otherProps }, ref) => {
225
- const classNames = actionButton({ variant, layout, size });
226
- const api = usePendingButton({ loading, disabled: otherProps.disabled });
227
- if (layout === "iconOnly" && !(otherProps["aria-label"] || otherProps["aria-labelledby"])) {
228
- console.warn(
229
- "When layout is 'iconOnly', 'aria-label' or 'aria-labelledby' should be provided."
230
- );
231
- }
232
- return /* @__PURE__ */ jsx3(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx3(PendingButtonProvider, { value: api, children: /* @__PURE__ */ jsx3(IconRequired, { enabled: layout === "iconOnly", children: /* @__PURE__ */ jsx3(
233
- Primitive.button,
234
- {
235
- ref,
236
- className: clsx2(classNames.root, className),
237
- ...api.stateProps,
238
- ...otherProps,
239
- children
240
- }
241
- ) }) }) });
242
- }
243
- );
244
- ActionButton.displayName = "ActionButton";
245
-
246
- // src/components/ActionChip/ActionChip.tsx
247
- import { Primitive as Primitive2 } from "@seed-design/react-primitive";
248
- import { actionChip } from "@seed-design/css/recipes/action-chip";
249
- var { withProvider } = createStyleContext(actionChip);
250
- var ActionChip = withIconRequired(
251
- withProvider(Primitive2.button, "root"),
252
- (props) => props.layout === "iconOnly"
253
- );
254
- ActionChip.displayName = "ActionChip";
255
-
256
- // src/components/ActionSheet/ActionSheet.tsx
257
- import { Dialog as DialogPrimitive, useDialogContext } from "@seed-design/react-dialog";
258
- import { Primitive as Primitive3 } from "@seed-design/react-primitive";
259
- import { actionSheet } from "@seed-design/css/recipes/action-sheet";
260
- import {
261
- actionSheetItem
262
- } from "@seed-design/css/recipes/action-sheet-item";
263
-
264
- // src/utils/createWithStateProps.tsx
265
- import { forwardRef as forwardRef4 } from "react";
266
- import { jsx as jsx4 } from "react/jsx-runtime";
267
- function createWithStateProps(useContexts, options) {
268
- var _a;
269
- const strict = (_a = options == null ? void 0 : options.strict) != null ? _a : true;
270
- return function withStateProps12(Component) {
271
- const Node = forwardRef4((props, ref) => {
272
- var _a2;
273
- const stateProps = {};
274
- for (const useContext5 of useContexts) {
275
- Object.assign(stateProps, (_a2 = useContext5({ strict })) == null ? void 0 : _a2.stateProps);
276
- }
277
- return /* @__PURE__ */ jsx4(Component, { ref, ...stateProps, ...props });
278
- });
279
- Node.displayName = Component.displayName || Component.name;
280
- return Node;
281
- };
282
- }
283
-
284
- // src/components/ActionSheet/ActionSheet.tsx
285
- var { withRootProvider, withContext } = createStyleContext(actionSheet);
286
- var { withProvider: withItemProvider } = createStyleContext(actionSheetItem);
287
- var withStateProps = createWithStateProps([useDialogContext]);
288
- var ActionSheetRoot = withRootProvider(DialogPrimitive.Root, {
289
- defaultProps: {
290
- lazyMount: true,
291
- unmountOnExit: true
292
- }
293
- });
294
- var ActionSheetTrigger = DialogPrimitive.Trigger;
295
- var ActionSheetPositioner = withContext(
296
- DialogPrimitive.Positioner,
297
- "positioner"
298
- );
299
- var ActionSheetBackdrop = withContext(
300
- DialogPrimitive.Backdrop,
301
- "backdrop"
302
- );
303
- var ActionSheetContent = withContext(
304
- DialogPrimitive.Content,
305
- "content"
306
- );
307
- var ActionSheetHeader = withContext(
308
- withStateProps(Primitive3.div),
309
- "header"
310
- );
311
- var ActionSheetTitle = withContext(
312
- withStateProps(Primitive3.h2),
313
- "title"
314
- );
315
- var ActionSheetDescription = withContext(withStateProps(Primitive3.p), "description");
316
- var ActionSheetList = withContext(
317
- withStateProps(Primitive3.div),
318
- "list"
319
- );
320
- var ActionSheetItem = withItemProvider(
321
- withStateProps(Primitive3.button),
322
- "root"
323
- );
324
- var ActionSheetCloseButton = withContext(
325
- DialogPrimitive.CloseButton,
326
- "closeButton"
327
- );
328
-
329
- // src/components/ActionSheet/ActionSheet.namespace.ts
330
- var ActionSheet_namespace_exports = {};
331
- __export(ActionSheet_namespace_exports, {
332
- Backdrop: () => ActionSheetBackdrop,
333
- CloseButton: () => ActionSheetCloseButton,
334
- Content: () => ActionSheetContent,
335
- Description: () => ActionSheetDescription,
336
- Header: () => ActionSheetHeader,
337
- Item: () => ActionSheetItem,
338
- List: () => ActionSheetList,
339
- Positioner: () => ActionSheetPositioner,
340
- Root: () => ActionSheetRoot,
341
- Title: () => ActionSheetTitle,
342
- Trigger: () => ActionSheetTrigger
343
- });
344
-
345
- // src/components/Avatar/Avatar.tsx
346
- import { Avatar as AvatarPrimitive } from "@seed-design/react-avatar";
347
- import { Primitive as Primitive4 } from "@seed-design/react-primitive";
348
- import { avatar } from "@seed-design/css/recipes/avatar";
349
- import { avatarStack } from "@seed-design/css/recipes/avatar-stack";
350
- import clsx3 from "clsx";
351
- import * as React3 from "react";
352
- import { useMemo as useMemo2 } from "react";
353
- import { jsx as jsx5 } from "react/jsx-runtime";
354
- var { PropsProvider, withProvider: withProvider2, withContext: withContext2 } = createStyleContext(avatar);
355
- var AvatarRoot = withProvider2(
356
- AvatarPrimitive.Root,
357
- "root"
358
- );
359
- var AvatarImage = withContext2(
360
- AvatarPrimitive.Image,
361
- "image"
362
- );
363
- var AvatarFallback = withContext2(
364
- AvatarPrimitive.Fallback,
365
- "fallback"
366
- );
367
- var AvatarBadge = withContext2(Primitive4.div, "badge");
368
- var AvatarStack = React3.forwardRef(
369
- ({ className, children, size, ...otherProps }, ref) => {
370
- const classNames = avatarStack({ size });
371
- const avatars = React3.Children.toArray(children);
372
- return /* @__PURE__ */ jsx5(PropsProvider, { value: useMemo2(() => ({ size }), [size]), children: /* @__PURE__ */ jsx5("div", { ref, className: clsx3(classNames.root, className), ...otherProps, children: avatars.map((avatar2, index) => (
373
- // biome-ignore lint/suspicious/noArrayIndexKey: There is no unique key for each child
374
- /* @__PURE__ */ jsx5("div", { className: classNames.item, children: avatar2 }, index)
375
- )) }) });
376
- }
377
- );
378
-
379
- // src/components/Avatar/Avatar.namespace.ts
380
- var Avatar_namespace_exports = {};
381
- __export(Avatar_namespace_exports, {
382
- Badge: () => AvatarBadge,
383
- Fallback: () => AvatarFallback,
384
- Image: () => AvatarImage,
385
- Root: () => AvatarRoot,
386
- Stack: () => AvatarStack
387
- });
388
-
389
- // src/components/Badge/Badge.tsx
390
- import { Primitive as Primitive5 } from "@seed-design/react-primitive";
391
- import { badge } from "@seed-design/css/recipes/badge";
392
- var { withProvider: withProvider3 } = createStyleContext(badge);
393
- var Badge = withProvider3(Primitive5.span, "root");
394
-
395
- // src/components/BottomSheet/BottomSheet.tsx
396
- import { Dialog as DialogPrimitive2, useDialogContext as useDialogContext2 } from "@seed-design/react-dialog";
397
- import { Primitive as Primitive6 } from "@seed-design/react-primitive";
398
- import { bottomSheet } from "@seed-design/css/recipes/bottom-sheet";
399
-
400
- // src/utils/styled.tsx
401
- import { vars } from "@seed-design/css/vars";
402
- import { forwardRef as forwardRef6 } from "react";
403
- import { jsx as jsx6 } from "react/jsx-runtime";
404
- function handleColor(color) {
405
- var _a;
406
- if (!color) {
407
- return void 0;
408
- }
409
- const [type, value] = color.split(".");
410
- return (_a = vars.$color[type][value]) != null ? _a : void 0;
411
- }
412
- function handleDimension(dimension) {
413
- var _a, _b, _c;
414
- if (dimension == null) {
415
- return void 0;
416
- }
417
- if (typeof dimension === "number") {
418
- return `${dimension}px`;
419
- }
420
- if (dimension === "full") {
421
- return "100%";
422
- }
423
- const [type, value] = dimension.split(".");
424
- return (_c = (_b = vars.$dimension[dimension]) != null ? _b : (_a = vars.$dimension[type]) == null ? void 0 : _a[value]) != null ? _c : dimension;
425
- }
426
- function handleRadius(radius) {
427
- var _a;
428
- if (radius == null) {
429
- return void 0;
430
- }
431
- return (_a = vars.$radius[radius]) != null ? _a : radius;
432
- }
433
- function handleDisplay(display) {
434
- if (!display) {
435
- return void 0;
436
- }
437
- return {
438
- block: "block",
439
- flex: "flex",
440
- inlineFlex: "inline-flex",
441
- inline: "inline",
442
- inlineBlock: "inline-block",
443
- none: "none"
444
- }[display];
445
- }
446
- function handleFlexDirection(flexDirection) {
447
- if (!flexDirection) {
448
- return void 0;
449
- }
450
- return {
451
- row: "row",
452
- column: "column",
453
- rowReverse: "row-reverse",
454
- columnReverse: "column-reverse"
455
- }[flexDirection];
456
- }
457
- function handleJustifyContent(justifyContent) {
458
- if (!justifyContent) {
459
- return void 0;
460
- }
461
- return {
462
- flexStart: "flex-start",
463
- flexEnd: "flex-end",
464
- center: "center",
465
- spaceBetween: "space-between",
466
- spaceAround: "space-around"
467
- }[justifyContent];
468
- }
469
- function handleAlignItems(alignItems) {
470
- if (!alignItems) {
471
- return void 0;
472
- }
473
- return {
474
- flexStart: "flex-start",
475
- flexEnd: "flex-end",
476
- center: "center",
477
- stretch: "stretch"
478
- }[alignItems];
479
- }
480
- function useStyleProps(props) {
481
- const {
482
- background,
483
- color,
484
- borderColor,
485
- borderWidth,
486
- borderTopWidth,
487
- borderRightWidth,
488
- borderBottomWidth,
489
- borderLeftWidth,
490
- borderRadius,
491
- borderTopLeftRadius,
492
- borderTopRightRadius,
493
- borderBottomRightRadius,
494
- borderBottomLeftRadius,
495
- width,
496
- minWidth,
497
- maxWidth,
498
- height,
499
- minHeight,
500
- maxHeight,
501
- padding,
502
- paddingX,
503
- paddingY,
504
- paddingTop,
505
- paddingRight,
506
- paddingBottom,
507
- paddingLeft,
508
- bottom,
509
- left,
510
- right,
511
- top,
512
- display,
513
- position,
514
- overflowX,
515
- overflowY,
516
- flexGrow,
517
- flexShrink,
518
- flexDirection,
519
- flexWrap,
520
- justifyContent,
521
- alignItems,
522
- alignContent,
523
- alignSelf,
524
- gap,
525
- style,
526
- ...restProps
527
- } = props;
528
- return {
529
- style: {
530
- "--seed-box-background": handleColor(background),
531
- "--seed-box-color": handleColor(color),
532
- "--seed-box-border-color": handleColor(borderColor),
533
- "--seed-box-border-width": borderWidth !== void 0 ? `${borderWidth}px` : void 0,
534
- "--seed-box-border-top-width": borderTopWidth !== void 0 ? `${borderTopWidth}px` : void 0,
535
- "--seed-box-border-right-width": borderRightWidth !== void 0 ? `${borderRightWidth}px` : void 0,
536
- "--seed-box-border-bottom-width": borderBottomWidth !== void 0 ? `${borderBottomWidth}px` : void 0,
537
- "--seed-box-border-left-width": borderLeftWidth !== void 0 ? `${borderLeftWidth}px` : void 0,
538
- "--seed-box-border-radius": handleRadius(borderRadius),
539
- "--seed-box-border-top-left-radius": handleRadius(borderTopLeftRadius),
540
- "--seed-box-border-top-right-radius": handleRadius(borderTopRightRadius),
541
- "--seed-box-border-bottom-right-radius": handleRadius(borderBottomRightRadius),
542
- "--seed-box-border-bottom-left-radius": handleRadius(borderBottomLeftRadius),
543
- "--seed-box-width": handleDimension(width),
544
- "--seed-box-min-width": handleDimension(minWidth),
545
- "--seed-box-max-width": handleDimension(maxWidth),
546
- "--seed-box-height": handleDimension(height),
547
- "--seed-box-min-height": handleDimension(minHeight),
548
- "--seed-box-max-height": handleDimension(maxHeight),
549
- "--seed-box-padding": handleDimension(padding),
550
- "--seed-box-padding-x": handleDimension(paddingX),
551
- "--seed-box-padding-y": handleDimension(paddingY),
552
- "--seed-box-padding-top": handleDimension(paddingTop),
553
- "--seed-box-padding-right": handleDimension(paddingRight),
554
- "--seed-box-padding-bottom": handleDimension(paddingBottom),
555
- "--seed-box-padding-left": handleDimension(paddingLeft),
556
- "--seed-box-top": top,
557
- "--seed-box-left": left,
558
- "--seed-box-right": right,
559
- "--seed-box-bottom": bottom,
560
- "--seed-box-gap": handleDimension(gap),
561
- "--seed-box-display": handleDisplay(display),
562
- "--seed-box-position": position,
563
- "--seed-box-overflow-x": overflowX,
564
- "--seed-box-overflow-y": overflowY,
565
- "--seed-box-flex-grow": flexGrow,
566
- "--seed-box-flex-shrink": flexShrink,
567
- "--seed-box-flex-direction": handleFlexDirection(flexDirection),
568
- "--seed-box-flex-wrap": flexWrap,
569
- "--seed-box-justify-content": handleJustifyContent(justifyContent),
570
- "--seed-box-align-items": handleAlignItems(alignItems),
571
- "--seed-box-align-content": handleAlignItems(alignContent),
572
- "--seed-box-align-self": handleAlignItems(alignSelf),
573
- ...style
574
- },
575
- restProps
576
- };
577
- }
578
- function withStyleProps(Component) {
579
- const Node = forwardRef6((props, ref) => {
580
- const { style, restProps } = useStyleProps(props);
581
- return /* @__PURE__ */ jsx6(Component, { ref, style, ...restProps });
582
- });
583
- Node.displayName = Component.displayName || Component.name;
584
- return Node;
585
- }
586
-
587
- // src/components/BottomSheet/BottomSheet.tsx
588
- var { withRootProvider: withRootProvider2, withContext: withContext3 } = createStyleContext(bottomSheet);
589
- var withStateProps2 = createWithStateProps([useDialogContext2]);
590
- var BottomSheetRoot = withRootProvider2(DialogPrimitive2.Root, {
591
- defaultProps: {
592
- lazyMount: true,
593
- unmountOnExit: true
594
- }
595
- });
596
- var BottomSheetTrigger = DialogPrimitive2.Trigger;
597
- var BottomSheetPositioner = withContext3(
598
- DialogPrimitive2.Positioner,
599
- "positioner"
600
- );
601
- var BottomSheetBackdrop = withContext3(
602
- DialogPrimitive2.Backdrop,
603
- "backdrop"
604
- );
605
- var BottomSheetContent = withContext3(
606
- DialogPrimitive2.Content,
607
- "content"
608
- );
609
- var BottomSheetHeader = withContext3(
610
- withStateProps2(Primitive6.div),
611
- "header"
612
- );
613
- var BottomSheetTitle = withContext3(
614
- withStateProps2(Primitive6.h2),
615
- "title"
616
- );
617
- var BottomSheetDescription = withContext3(withStateProps2(Primitive6.p), "description");
618
- var BottomSheetBody = withContext3(
619
- withStyleProps(withStateProps2(Primitive6.div)),
620
- "body"
621
- );
622
- var BottomSheetFooter = withContext3(
623
- withStateProps2(Primitive6.div),
624
- "footer"
625
- );
626
- var BottomSheetCloseButton = withContext3(
627
- DialogPrimitive2.CloseButton,
628
- "closeButton"
629
- );
630
-
631
- // src/components/BottomSheet/BottomSheet.namespace.ts
632
- var BottomSheet_namespace_exports = {};
633
- __export(BottomSheet_namespace_exports, {
634
- Backdrop: () => BottomSheetBackdrop,
635
- Body: () => BottomSheetBody,
636
- CloseButton: () => BottomSheetCloseButton,
637
- Content: () => BottomSheetContent,
638
- Description: () => BottomSheetDescription,
639
- Footer: () => BottomSheetFooter,
640
- Header: () => BottomSheetHeader,
641
- Positioner: () => BottomSheetPositioner,
642
- Root: () => BottomSheetRoot,
643
- Title: () => BottomSheetTitle,
644
- Trigger: () => BottomSheetTrigger
645
- });
646
-
647
- // src/components/Box/Box.tsx
648
- import clsx4 from "clsx";
649
- import * as React4 from "react";
650
- import { jsx as jsx7 } from "react/jsx-runtime";
651
- var Box = React4.forwardRef((props, ref) => {
652
- const { style, restProps } = useStyleProps(props);
653
- const { as: Comp = "div", className, ...nativeProps } = restProps;
654
- return /* @__PURE__ */ jsx7(Comp, { ref, className: clsx4("seed-box", className), style, ...nativeProps });
655
- });
656
-
657
- // src/components/Callout/Callout.tsx
658
- import { Primitive as Primitive8 } from "@seed-design/react-primitive";
659
- import { callout } from "@seed-design/css/recipes/callout";
660
-
661
- // src/components/private/useDismissible.tsx
662
- import { useControllableState } from "@radix-ui/react-use-controllable-state";
663
- import { buttonProps, elementProps as elementProps2, mergeProps } from "@seed-design/dom-utils";
664
- import { Primitive as Primitive7 } from "@seed-design/react-primitive";
665
- import * as React5 from "react";
666
- import { jsx as jsx8 } from "react/jsx-runtime";
667
- function useDismissible(props) {
668
- const [open = true, setOpen] = useControllableState({
669
- prop: props.open,
670
- defaultProp: props.defaultOpen,
671
- onChange: (open2) => {
672
- var _a;
673
- if (!open2) {
674
- (_a = props.onDismiss) == null ? void 0 : _a.call(props);
675
- }
676
- }
677
- });
678
- const dismiss = React5.useCallback(() => setOpen(false), [setOpen]);
679
- return {
680
- open,
681
- dismiss,
682
- rootProps: elementProps2({}),
683
- dismissButtonProps: buttonProps({
684
- onClick: (e) => {
685
- if (e.defaultPrevented) return;
686
- dismiss();
687
- }
688
- })
689
- };
690
- }
691
- var DismissibleContext = React5.createContext(null);
692
- var DismissibleProvider = DismissibleContext.Provider;
693
- var useDismissibleContext = () => {
694
- const context = React5.useContext(DismissibleContext);
695
- if (context === null) {
696
- throw new Error("useDismissibleContext should be used within DismissibleProvider");
697
- }
698
- return context;
699
- };
700
- var DismissibleRoot = React5.forwardRef(
701
- ({ defaultOpen, open, onDismiss, ...otherProps }, ref) => {
702
- const api = useDismissible({ defaultOpen, open, onDismiss });
703
- if (!api.open) return null;
704
- return /* @__PURE__ */ jsx8(DismissibleProvider, { value: api, children: /* @__PURE__ */ jsx8(Primitive7.div, { ref, ...otherProps }) });
705
- }
706
- );
707
- var DismissibleCloseButton = React5.forwardRef((props, ref) => {
708
- const { dismissButtonProps } = useDismissibleContext();
709
- return /* @__PURE__ */ jsx8(Primitive7.button, { ref, ...mergeProps(dismissButtonProps, props) });
710
- });
711
-
712
- // src/components/Callout/Callout.tsx
713
- var { withContext: withContext4, withProvider: withProvider4 } = createStyleContext(callout);
714
- var CalloutRoot = withProvider4(DismissibleRoot, "root");
715
- var CalloutContent = withContext4(
716
- Primitive8.div,
717
- "content"
718
- );
719
- var CalloutTitle = withContext4(
720
- Primitive8.span,
721
- "title"
722
- );
723
- var CalloutDescription = withContext4(
724
- Primitive8.span,
725
- "description"
726
- );
727
- var CalloutLink = withContext4(
728
- Primitive8.button,
729
- "link"
730
- );
731
- var CalloutCloseButton = withContext4(
732
- DismissibleCloseButton,
733
- "closeButton"
734
- );
735
-
736
- // src/components/Callout/Callout.namespace.ts
737
- var Callout_namespace_exports = {};
738
- __export(Callout_namespace_exports, {
739
- CloseButton: () => CalloutCloseButton,
740
- Content: () => CalloutContent,
741
- Description: () => CalloutDescription,
742
- Link: () => CalloutLink,
743
- Root: () => CalloutRoot,
744
- Title: () => CalloutTitle
745
- });
746
-
747
- // src/components/Celcius/Celcius.tsx
748
- var Celcius = (props) => {
749
- return `${props.value}\xB0C`;
750
- };
751
-
752
- // src/components/Checkbox/Checkbox.tsx
753
- import { mergeProps as mergeProps2 } from "@seed-design/dom-utils";
754
- import { Checkbox as CheckboxPrimitive, useCheckboxContext } from "@seed-design/react-checkbox";
755
- import { Primitive as Primitive9 } from "@seed-design/react-primitive";
756
- import { checkbox } from "@seed-design/css/recipes/checkbox";
757
- import { forwardRef as forwardRef10 } from "react";
758
-
759
- // src/components/private/Icon.tsx
760
- import { Slot as Slot2 } from "@radix-ui/react-slot";
761
- import { forwardRef as forwardRef9 } from "react";
762
- import { jsx as jsx9 } from "react/jsx-runtime";
763
- var InternalIcon = forwardRef9(
764
- ({ svg, ...otherProps }, ref) => {
765
- return /* @__PURE__ */ jsx9(Slot2, { ref, "aria-hidden": true, ...otherProps, children: svg });
766
- }
767
- );
768
-
769
- // src/components/Checkbox/Checkbox.tsx
770
- import { jsx as jsx10 } from "react/jsx-runtime";
771
- var { withProvider: withProvider5, withContext: withContext5, useClassNames } = createStyleContext(checkbox);
772
- var withStateProps3 = createWithStateProps([useCheckboxContext]);
773
- var CheckboxRoot = withProvider5(
774
- CheckboxPrimitive.Root,
775
- "root"
776
- );
777
- var CheckboxControl = withContext5(
778
- CheckboxPrimitive.Control,
779
- "control"
780
- );
781
- var CheckboxIndicator = forwardRef10(
782
- ({
783
- unchecked: uncheckedSvg,
784
- checked: checkedSvg,
785
- indeterminate: indeterminateSvg,
786
- ...otherProps
787
- }, ref) => {
788
- const { stateProps, checked, indeterminate } = useCheckboxContext();
789
- const classNames = useClassNames();
790
- const mergedProps = mergeProps2(
791
- stateProps,
792
- { className: classNames.icon },
793
- otherProps
794
- );
795
- if (indeterminate && !indeterminateSvg) {
796
- console.warn(
797
- "CheckboxIndicator: the `indeterminate` prop must be provided when the checkbox is in an indeterminate state."
798
- );
799
- }
800
- if (indeterminate) return /* @__PURE__ */ jsx10(InternalIcon, { ref, svg: indeterminateSvg, ...mergedProps });
801
- if (checked) return /* @__PURE__ */ jsx10(InternalIcon, { ref, svg: checkedSvg, ...mergedProps });
802
- if (uncheckedSvg) return /* @__PURE__ */ jsx10(InternalIcon, { ref, svg: uncheckedSvg, ...mergedProps });
803
- return null;
804
- }
805
- );
806
- CheckboxIndicator.displayName = "CheckboxIndicator";
807
- var CheckboxLabel = withContext5(
808
- withStateProps3(Primitive9.span),
809
- "label"
810
- );
811
- var CheckboxHiddenInput = CheckboxPrimitive.HiddenInput;
812
-
813
- // src/components/Checkbox/Checkbox.namespace.ts
814
- var Checkbox_namespace_exports = {};
815
- __export(Checkbox_namespace_exports, {
816
- Control: () => CheckboxControl,
817
- HiddenInput: () => CheckboxHiddenInput,
818
- Indicator: () => CheckboxIndicator,
819
- Label: () => CheckboxLabel,
820
- Root: () => CheckboxRoot
821
- });
822
-
823
- // src/components/ChipTabs/ChipTabs.tsx
824
- import { chipTabs } from "@seed-design/css/recipes/chip-tabs";
825
- import { Tabs as TabsPrimitive } from "@seed-design/react-tabs";
826
- var { withProvider: withProvider6, withContext: withContext6 } = createStyleContext(chipTabs);
827
- var ChipTabsRoot = withProvider6(
828
- TabsPrimitive.Root,
829
- "root"
830
- );
831
- var ChipTabsList = withContext6(
832
- TabsPrimitive.List,
833
- "list"
834
- );
835
- var ChipTabsTrigger = withContext6(
836
- TabsPrimitive.Trigger,
837
- "trigger"
838
- );
839
- var ChipTabsContent = withContext6(
840
- TabsPrimitive.Content,
841
- "content"
842
- );
843
- var ChipTabsCarousel = withContext6(
844
- TabsPrimitive.Carousel,
845
- "carousel"
846
- );
847
- var ChipTabsCarouselCamera = withContext6(
848
- TabsPrimitive.CarouselCamera,
849
- "carouselCamera"
850
- );
851
-
852
- // src/components/ChipTabs/ChipTabs.namespace.ts
853
- var ChipTabs_namespace_exports = {};
854
- __export(ChipTabs_namespace_exports, {
855
- Carousel: () => ChipTabsCarousel,
856
- CarouselCamera: () => ChipTabsCarouselCamera,
857
- Content: () => ChipTabsContent,
858
- List: () => ChipTabsList,
859
- Root: () => ChipTabsRoot,
860
- Trigger: () => ChipTabsTrigger
861
- });
862
-
863
- // src/components/Columns/Columns.tsx
864
- import * as React6 from "react";
865
- import { jsx as jsx11 } from "react/jsx-runtime";
866
- var Columns = React6.forwardRef((props, ref) => {
867
- return /* @__PURE__ */ jsx11(
868
- Box,
869
- {
870
- ref,
871
- display: "flex",
872
- flexDirection: "row",
873
- flexWrap: "nowrap",
874
- justifyContent: "flexStart",
875
- ...props
876
- }
877
- );
878
- });
879
- var Column = React6.forwardRef((props, ref) => {
880
- const { width, ...otherProps } = props;
881
- return /* @__PURE__ */ jsx11(
882
- Box,
883
- {
884
- ref,
885
- display: "flex",
886
- flexDirection: "column",
887
- width: width !== "content" ? "full" : void 0,
888
- flexShrink: width ? 0 : void 0,
889
- flexGrow: width ? 0 : 1,
890
- ...otherProps
891
- }
892
- );
893
- });
894
-
895
- // src/components/ConsistentWidth/ConsistentWidth.tsx
896
- import { Primitive as Primitive10 } from "@seed-design/react-primitive";
897
- import clsx5 from "clsx";
898
- import { forwardRef as forwardRef12 } from "react";
899
- import { jsx as jsx12 } from "react/jsx-runtime";
900
- var ConsistentWidth = forwardRef12((props, ref) => {
901
- const { className, ...otherProps } = props;
902
- return /* @__PURE__ */ jsx12(
903
- Primitive10.span,
904
- {
905
- "data-text": props.children,
906
- ref,
907
- className: clsx5("seed-consistent-width", className),
908
- ...otherProps
909
- }
910
- );
911
- });
912
-
913
- // src/components/ControlChip/ControlChip.tsx
914
- import { controlChip } from "@seed-design/css/recipes/control-chip";
915
- import { Primitive as Primitive11 } from "@seed-design/react-primitive";
916
- var { withProvider: withProvider7 } = createStyleContext(controlChip);
917
- var ControlChip = withIconRequired(
918
- withProvider7(Primitive11.button, "root"),
919
- (props) => props.layout === "iconOnly"
920
- );
921
-
922
- // src/components/Count/Count.tsx
923
- import { Primitive as Primitive12 } from "@seed-design/react-primitive";
924
- import clsx6 from "clsx";
925
- import { forwardRef as forwardRef13 } from "react";
926
- import { jsx as jsx13 } from "react/jsx-runtime";
927
- var Count = forwardRef13((props, ref) => {
928
- const { className, ...otherProps } = props;
929
- return /* @__PURE__ */ jsx13(Primitive12.span, { ref, className: clsx6("seed-count", className), ...otherProps });
930
- });
931
-
932
- // src/components/Dialog/Dialog.tsx
933
- import { Dialog as DialogPrimitive3, useDialogContext as useDialogContext3 } from "@seed-design/react-dialog";
934
- import { Primitive as Primitive13 } from "@seed-design/react-primitive";
935
- import { dialog } from "@seed-design/css/recipes/dialog";
936
- import { forwardRef as forwardRef14 } from "react";
937
- import { jsx as jsx14 } from "react/jsx-runtime";
938
- var { withRootProvider: withRootProvider3, withContext: withContext7 } = createStyleContext(dialog);
939
- var withStateProps4 = createWithStateProps([useDialogContext3]);
940
- var DialogRoot = withRootProvider3(DialogPrimitive3.Root, {
941
- defaultProps: {
942
- lazyMount: true,
943
- unmountOnExit: true
944
- }
945
- });
946
- var DialogTrigger = DialogPrimitive3.Trigger;
947
- var DialogPositioner = withContext7(
948
- DialogPrimitive3.Positioner,
949
- "positioner"
950
- );
951
- var DialogBackdrop = withContext7(
952
- DialogPrimitive3.Backdrop,
953
- "backdrop"
954
- );
955
- var DialogContent = withContext7(
956
- DialogPrimitive3.Content,
957
- "content"
958
- );
959
- var DialogHeader = withContext7(Primitive13.div, "header");
960
- var DialogTitle = withContext7(
961
- withStateProps4(Primitive13.span),
962
- "title"
963
- );
964
- var DialogDescription = withContext7(
965
- withStateProps4(Primitive13.div),
966
- "description"
967
- );
968
- var DialogFooter = withContext7(Primitive13.div, "footer");
969
- var DialogAction = forwardRef14((props, ref) => {
970
- const api = useDialogContext3();
971
- return /* @__PURE__ */ jsx14(Primitive13.button, { ...props, ref, onClick: () => api.setOpen(false) });
972
- });
973
-
974
- // src/components/Dialog/Dialog.namespace.ts
975
- var Dialog_namespace_exports = {};
976
- __export(Dialog_namespace_exports, {
977
- Action: () => DialogAction,
978
- Backdrop: () => DialogBackdrop,
979
- Content: () => DialogContent,
980
- Description: () => DialogDescription,
981
- Footer: () => DialogFooter,
982
- Header: () => DialogHeader,
983
- Positioner: () => DialogPositioner,
984
- Root: () => DialogRoot,
985
- Title: () => DialogTitle,
986
- Trigger: () => DialogTrigger
987
- });
988
-
989
- // src/components/ExtendedActionSheet/ExtendedActionSheet.tsx
990
- import { Dialog as DialogPrimitive4, useDialogContext as useDialogContext4 } from "@seed-design/react-dialog";
991
- import { Primitive as Primitive14 } from "@seed-design/react-primitive";
992
- import {
993
- extendedActionSheet
994
- } from "@seed-design/css/recipes/extended-action-sheet";
995
- import {
996
- extendedActionSheetItem
997
- } from "@seed-design/css/recipes/extended-action-sheet-item";
998
- var { withRootProvider: withRootProvider4, withContext: withContext8 } = createStyleContext(extendedActionSheet);
999
- var { withProvider: withItemProvider2 } = createStyleContext(extendedActionSheetItem);
1000
- var withStateProps5 = createWithStateProps([useDialogContext4]);
1001
- var ExtendedActionSheetRoot = withRootProvider4(
1002
- DialogPrimitive4.Root,
1003
- {
1004
- defaultProps: {
1005
- lazyMount: true,
1006
- unmountOnExit: true
1007
- }
1008
- }
1009
- );
1010
- var ExtendedActionSheetTrigger = DialogPrimitive4.Trigger;
1011
- var ExtendedActionSheetPositioner = withContext8(DialogPrimitive4.Positioner, "positioner");
1012
- var ExtendedActionSheetBackdrop = withContext8(DialogPrimitive4.Backdrop, "backdrop");
1013
- var ExtendedActionSheetContent = withContext8(DialogPrimitive4.Content, "content");
1014
- var ExtendedActionSheetHeader = withContext8(withStateProps5(Primitive14.div), "header");
1015
- var ExtendedActionSheetTitle = withContext8(withStateProps5(Primitive14.h2), "title");
1016
- var ExtendedActionSheetList = withContext8(
1017
- withStateProps5(Primitive14.div),
1018
- "list"
1019
- );
1020
- var ExtendedActionSheetGroup = withContext8(
1021
- withStateProps5(Primitive14.div),
1022
- "group"
1023
- );
1024
- var ExtendedActionSheetItem = withItemProvider2(withStateProps5(Primitive14.button), "root");
1025
- var ExtendedActionSheetFooter = withContext8(withStateProps5(Primitive14.div), "footer");
1026
- var ExtendedActionSheetCloseButton = withContext8(DialogPrimitive4.CloseButton, "closeButton");
1027
-
1028
- // src/components/ExtendedActionSheet/ExtendedActionSheet.namespace.ts
1029
- var ExtendedActionSheet_namespace_exports = {};
1030
- __export(ExtendedActionSheet_namespace_exports, {
1031
- Backdrop: () => ExtendedActionSheetBackdrop,
1032
- CloseButton: () => ExtendedActionSheetCloseButton,
1033
- Content: () => ExtendedActionSheetContent,
1034
- Footer: () => ExtendedActionSheetFooter,
1035
- Group: () => ExtendedActionSheetGroup,
1036
- Header: () => ExtendedActionSheetHeader,
1037
- Item: () => ExtendedActionSheetItem,
1038
- List: () => ExtendedActionSheetList,
1039
- Positioner: () => ExtendedActionSheetPositioner,
1040
- Root: () => ExtendedActionSheetRoot,
1041
- Title: () => ExtendedActionSheetTitle,
1042
- Trigger: () => ExtendedActionSheetTrigger
1043
- });
1044
-
1045
- // src/components/ExtendedFab/ExtendedFab.tsx
1046
- import { Primitive as Primitive15 } from "@seed-design/react-primitive";
1047
- import { extendedFab } from "@seed-design/css/recipes/extended-fab";
1048
- var { withProvider: withProvider8 } = createStyleContext(extendedFab);
1049
- var ExtendedFab = withProvider8(
1050
- Primitive15.button,
1051
- "root",
1052
- {
1053
- defaultProps: {
1054
- variant: "neutralSolid",
1055
- size: "medium"
1056
- }
1057
- }
1058
- );
1059
-
1060
- // src/components/Fab/Fab.tsx
1061
- import { Primitive as Primitive16 } from "@seed-design/react-primitive";
1062
- import { fab } from "@seed-design/css/recipes/fab";
1063
- var { withProvider: withProvider9 } = createStyleContext(fab);
1064
- var Fab = withProvider9(Primitive16.button, "root");
1065
-
1066
- // src/components/Flex/Flex.tsx
1067
- import * as React7 from "react";
1068
- import { jsx as jsx15 } from "react/jsx-runtime";
1069
- var Flex = React7.forwardRef((props, ref) => {
1070
- const { direction, wrap, ...rest } = props;
1071
- return /* @__PURE__ */ jsx15(Box, { ref, display: "flex", flexDirection: direction, flexWrap: wrap, ...rest });
1072
- });
1073
-
1074
- // src/components/HelpBubble/HelpBubble.tsx
1075
- import { Popover as PopoverPrimitive, usePopoverContext } from "@seed-design/react-popover";
1076
- import { Primitive as Primitive17 } from "@seed-design/react-primitive";
1077
- import { helpBubble } from "@seed-design/css/recipes/help-bubble";
1078
- import { forwardRef as forwardRef16 } from "react";
1079
- import { jsx as jsx16 } from "react/jsx-runtime";
1080
- var { withRootProvider: withRootProvider5, withContext: withContext9 } = createStyleContext(helpBubble);
1081
- var withStateProps6 = createWithStateProps([usePopoverContext]);
1082
- var HelpBubbleRoot = withRootProvider5(PopoverPrimitive.Root, {
1083
- defaultProps: {
1084
- placement: "top",
1085
- gutter: 4,
1086
- overflowPadding: 16,
1087
- arrowPadding: 14,
1088
- flip: true,
1089
- slide: true,
1090
- strategy: "absolute"
1091
- }
1092
- });
1093
- var HelpBubbleAnchor = PopoverPrimitive.Anchor;
1094
- var HelpBubbleTrigger = PopoverPrimitive.Trigger;
1095
- var HelpBubblePositioner = withContext9(
1096
- PopoverPrimitive.Positioner,
1097
- "positioner"
1098
- );
1099
- var HelpBubbleBackdrop = withContext9(
1100
- withStateProps6(Primitive17.div),
1101
- "backdrop"
1102
- );
1103
- var HelpBubbleContent = withContext9(
1104
- withStyleProps(withStateProps6(Primitive17.div)),
1105
- "content"
1106
- );
1107
- var HelpBubbleArrow = withContext9(
1108
- PopoverPrimitive.Arrow,
1109
- "arrow"
1110
- );
1111
- var HelpBubbleArrowTip = forwardRef16(
1112
- (props, ref) => {
1113
- var _a, _b;
1114
- const { tipRadius = 1, ...otherProps } = props;
1115
- const api = usePopoverContext();
1116
- const width = ((_a = api.rects.arrow) == null ? void 0 : _a.width) || 0;
1117
- const height = ((_b = api.rects.arrow) == null ? void 0 : _b.height) || 0;
1118
- const pathData = `M0,0
1119
- H${width}
1120
- L${width / 2 + tipRadius},${height - tipRadius}
1121
- Q${width / 2},${height} ${width / 2 - tipRadius},${height - tipRadius}
1122
- Z`;
1123
- return /* @__PURE__ */ jsx16(
1124
- "svg",
1125
- {
1126
- "aria-hidden": "true",
1127
- width,
1128
- height: width,
1129
- viewBox: `0 0 ${width} ${height > width ? height : width}`,
1130
- ref,
1131
- ...otherProps,
1132
- children: /* @__PURE__ */ jsx16("path", { stroke: "none", d: pathData })
1133
- }
1134
- );
1135
- }
1136
- );
1137
- var HelpBubbleCloseButton = withContext9(
1138
- PopoverPrimitive.CloseButton,
1139
- "closeButton"
1140
- );
1141
- var HelpBubbleTitle = withContext9(
1142
- withStateProps6(Primitive17.span),
1143
- "title"
1144
- );
1145
- var HelpBubbleDescription = withContext9(
1146
- withStateProps6(Primitive17.div),
1147
- "description"
1148
- );
1149
-
1150
- // src/components/HelpBubble/HelpBubble.namespace.ts
1151
- var HelpBubble_namespace_exports = {};
1152
- __export(HelpBubble_namespace_exports, {
1153
- Anchor: () => HelpBubbleAnchor,
1154
- Arrow: () => HelpBubbleArrow,
1155
- ArrowTip: () => HelpBubbleArrowTip,
1156
- Backdrop: () => HelpBubbleBackdrop,
1157
- CloseButton: () => HelpBubbleCloseButton,
1158
- Content: () => HelpBubbleContent,
1159
- Description: () => HelpBubbleDescription,
1160
- Positioner: () => HelpBubblePositioner,
1161
- Root: () => HelpBubbleRoot,
1162
- Title: () => HelpBubbleTitle,
1163
- Trigger: () => HelpBubbleTrigger
1164
- });
1165
-
1166
- // src/components/IdentityPlaceholder/IdentityPlaceholder.tsx
1167
- import {
1168
- identityPlaceholder
1169
- } from "@seed-design/css/recipes/identity-placeholder";
1170
- import { mergeProps as mergeProps3 } from "@seed-design/dom-utils";
1171
- import { Primitive as Primitive18 } from "@seed-design/react-primitive";
1172
- import * as React8 from "react";
1173
- import { jsx as jsx17 } from "react/jsx-runtime";
1174
- var { useClassNames: useClassNames2, withProvider: withProvider10 } = createStyleContext(identityPlaceholder);
1175
- var IdentityPlaceholderRoot = withProvider10(
1176
- Primitive18.div,
1177
- "root"
1178
- );
1179
- var IdentityPlaceholderImage = React8.forwardRef((props, ref) => {
1180
- const classNames = useClassNames2();
1181
- return /* @__PURE__ */ jsx17(
1182
- "svg",
1183
- {
1184
- ref,
1185
- viewBox: "0 0 640 640",
1186
- fill: "none",
1187
- xmlns: "http://www.w3.org/2000/svg",
1188
- role: "img",
1189
- "aria-label": "Identity placeholder",
1190
- ...mergeProps3({ className: classNames.image }, props),
1191
- children: /* @__PURE__ */ jsx17(
1192
- "path",
1193
- {
1194
- fillRule: "evenodd",
1195
- clipRule: "evenodd",
1196
- d: "M481 301c0 56-29 106-72 135a264 264 0 0 1 175 248c0 18-118 38-264 38S56 702 56 684c0-114 73-211 174-248a162 162 0 1 1 251-135Zm-203-1c8 0 14-9 14-20s-6-20-14-20-15 9-15 20 7 20 15 20Zm83 0c8 0 15-9 15-20s-7-20-15-20-15 9-15 20 7 20 15 20Zm-88 25c4-2 9-1 11 4 4 7 15 19 36 19s32-12 36-19a8 8 0 1 1 15 8c-7 12-23 27-51 27s-44-15-50-27c-3-5-1-10 3-12Z"
1197
- }
1198
- )
1199
- }
1200
- );
1201
- });
1202
- IdentityPlaceholderImage.displayName = "IdentityPlaceholderImage";
1203
-
1204
- // src/components/IdentityPlaceholder/IdentityPlaceholder.namespace.ts
1205
- var IdentityPlaceholder_namespace_exports = {};
1206
- __export(IdentityPlaceholder_namespace_exports, {
1207
- Image: () => IdentityPlaceholderImage,
1208
- Root: () => IdentityPlaceholderRoot
1209
- });
1210
-
1211
- // src/components/Inline/Inline.tsx
1212
- import * as React9 from "react";
1213
- import { jsx as jsx18 } from "react/jsx-runtime";
1214
- var Inline = React9.forwardRef((props, ref) => {
1215
- return /* @__PURE__ */ jsx18(
1216
- Box,
1217
- {
1218
- ref,
1219
- display: "flex",
1220
- flexDirection: "row",
1221
- flexWrap: "wrap",
1222
- alignItems: "flexStart",
1223
- justifyContent: "flexStart",
1224
- ...props
1225
- }
1226
- );
1227
- });
1228
-
1229
- // src/components/InlineBanner/InlineBanner.tsx
1230
- import {
1231
- inlineBanner
1232
- } from "@seed-design/css/recipes/inline-banner";
1233
- import { Primitive as Primitive19 } from "@seed-design/react-primitive";
1234
- var { withContext: withContext10, withProvider: withProvider11 } = createStyleContext(inlineBanner);
1235
- var InlineBannerRoot = withProvider11(
1236
- DismissibleRoot,
1237
- "root"
1238
- );
1239
- var InlineBannerContent = withContext10(
1240
- Primitive19.div,
1241
- "content"
1242
- );
1243
- var InlineBannerTitle = withContext10(
1244
- Primitive19.span,
1245
- "title"
1246
- );
1247
- var InlineBannerDescription = withContext10(
1248
- Primitive19.span,
1249
- "description"
1250
- );
1251
- var InlineBannerLink = withContext10(
1252
- Primitive19.button,
1253
- "link"
1254
- );
1255
- var InlineBannerCloseButton = withContext10(
1256
- DismissibleCloseButton,
1257
- "closeButton"
1258
- );
1259
-
1260
- // src/components/InlineBanner/InlineBanner.namespace.ts
1261
- var InlineBanner_namespace_exports = {};
1262
- __export(InlineBanner_namespace_exports, {
1263
- CloseButton: () => InlineBannerCloseButton,
1264
- Content: () => InlineBannerContent,
1265
- Description: () => InlineBannerDescription,
1266
- Link: () => InlineBannerLink,
1267
- Root: () => InlineBannerRoot,
1268
- Title: () => InlineBannerTitle
1269
- });
1270
-
1271
- // src/components/LinkWithIcon/LinkWithIcon.tsx
1272
- import { Primitive as Primitive20 } from "@seed-design/react-primitive";
1273
- import {
1274
- linkWithIcon
1275
- } from "@seed-design/css/recipes/link-with-icon";
1276
- var { withProvider: withProvider12 } = createStyleContext(linkWithIcon);
1277
- var LinkWithIcon = withProvider12(
1278
- withStyleProps(Primitive20.button),
1279
- "root"
1280
- );
1281
-
1282
- // src/components/LoadingIndicator/LoadingIndicator.tsx
1283
- import { mergeProps as mergeProps4 } from "@seed-design/dom-utils";
1284
- import { Primitive as Primitive21 } from "@seed-design/react-primitive";
1285
- import { forwardRef as forwardRef19 } from "react";
1286
- import { Fragment, jsx as jsx19, jsxs } from "react/jsx-runtime";
1287
- var LoadingIndicator = forwardRef19((props, ref) => {
1288
- const { indicator, children, ...otherProps } = props;
1289
- const { stateProps } = usePendingButtonContext();
1290
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1291
- /* @__PURE__ */ jsx19(
1292
- Primitive21.span,
1293
- {
1294
- ref,
1295
- ...mergeProps4(stateProps, { className: "seed-loading-indicator" }, otherProps),
1296
- children: indicator
1297
- }
1298
- ),
1299
- /* @__PURE__ */ jsx19(Primitive21.span, { style: { opacity: 0, display: "inherit", gap: "inherit" }, children })
1300
- ] });
1301
- });
1302
-
1303
- // src/components/MannerTempBadge/MannerTempBadge.tsx
1304
- import { Primitive as Primitive22 } from "@seed-design/react-primitive";
1305
- import {
1306
- mannerTempBadge
1307
- } from "@seed-design/css/recipes/manner-temp-badge";
1308
- var { withProvider: withProvider13 } = createStyleContext(mannerTempBadge);
1309
- var MannerTempBadge = withProvider13(
1310
- Primitive22.span,
1311
- "root"
1312
- );
1313
-
1314
- // src/components/ProgressCircle/ProgressCircle.tsx
1315
- import { ProgressCircle as ProgressCirclePrimitive } from "@seed-design/react-progress";
1316
- import {
1317
- progressCircle
1318
- } from "@seed-design/css/recipes/progress-circle";
1319
- var { withContext: withContext11, withProvider: withProvider14 } = createStyleContext(progressCircle);
1320
- var ProgressCircleRoot = withProvider14(
1321
- ProgressCirclePrimitive.Root,
1322
- "root"
1323
- );
1324
- var ProgressCircleTrack = withContext11(
1325
- ProgressCirclePrimitive.Track,
1326
- "track"
1327
- );
1328
- var ProgressCircleRange = withContext11(
1329
- ProgressCirclePrimitive.Range,
1330
- "range"
1331
- );
1332
-
1333
- // src/components/ProgressCircle/ProgressCircle.namespace.ts
1334
- var ProgressCircle_namespace_exports = {};
1335
- __export(ProgressCircle_namespace_exports, {
1336
- Range: () => ProgressCircleRange,
1337
- Root: () => ProgressCircleRoot,
1338
- Track: () => ProgressCircleTrack
1339
- });
1340
-
1341
- // src/components/PullToRefresh/PullToRefresh.tsx
1342
- import { PullToRefresh as PullToRefreshPrimitive } from "@seed-design/react-pull-to-refresh";
1343
- import {
1344
- pullToRefresh
1345
- } from "@seed-design/css/recipes/pull-to-refresh";
1346
- var { withContext: withContext12, withProvider: withProvider15 } = createStyleContext(pullToRefresh);
1347
- var PullToRefreshRoot = withProvider15(
1348
- PullToRefreshPrimitive.Root,
1349
- "root"
1350
- );
1351
- var PullToRefreshIndicator = withContext12(
1352
- PullToRefreshPrimitive.Indicator,
1353
- "indicator"
1354
- );
1355
- var PullToRefreshContent = PullToRefreshPrimitive.Content;
1356
-
1357
- // src/components/PullToRefresh/PullToRefresh.namespace.ts
1358
- var PullToRefresh_namespace_exports = {};
1359
- __export(PullToRefresh_namespace_exports, {
1360
- Content: () => PullToRefreshContent,
1361
- Indicator: () => PullToRefreshIndicator,
1362
- Root: () => PullToRefreshRoot
1363
- });
1364
-
1365
- // src/components/ReactionButton/ReactionButton.tsx
1366
- import {
1367
- reactionButton
1368
- } from "@seed-design/css/recipes/reaction-button";
1369
- import { Toggle as TogglePrimitive } from "@seed-design/react-toggle";
1370
- import clsx7 from "clsx";
1371
- import * as React10 from "react";
1372
- import { jsx as jsx20 } from "react/jsx-runtime";
1373
- var { ClassNamesProvider: ClassNamesProvider2 } = createStyleContext(reactionButton);
1374
- var ReactionButton = React10.forwardRef(
1375
- ({ size = "small", loading = false, className, ...otherProps }, ref) => {
1376
- const classNames = reactionButton({ size });
1377
- const api = usePendingButton({ loading, disabled: otherProps.disabled });
1378
- return /* @__PURE__ */ jsx20(ClassNamesProvider2, { value: classNames, children: /* @__PURE__ */ jsx20(PendingButtonProvider, { value: api, children: /* @__PURE__ */ jsx20(
1379
- TogglePrimitive.Root,
1380
- {
1381
- ref,
1382
- className: clsx7(classNames.root, className),
1383
- ...api.stateProps,
1384
- ...otherProps
1385
- }
1386
- ) }) });
1387
- }
1388
- );
1389
- ReactionButton.displayName = "ReactionButton";
1390
-
1391
- // src/components/SegmentedControl/SegmentedControl.tsx
1392
- import {
1393
- segmentedControl
1394
- } from "@seed-design/css/recipes/segmented-control";
1395
- import { Primitive as Primitive23 } from "@seed-design/react-primitive";
1396
- import { SegmentedControl as SegmentedControlPrimitive } from "@seed-design/react-segmented-control";
1397
- var { withProvider: withProvider16, withContext: withContext13 } = createStyleContext(segmentedControl);
1398
- var SegmentedControlRoot = withProvider16(
1399
- SegmentedControlPrimitive.Root,
1400
- "root"
1401
- );
1402
- var SegmentedControlIndicator = withContext13(Primitive23.div, "indicator");
1403
- var SegmentedControlItem = withContext13(
1404
- SegmentedControlPrimitive.Item,
1405
- "item"
1406
- );
1407
- var SegmentedControlItemHiddenInput = SegmentedControlPrimitive.ItemHiddenInput;
1408
-
1409
- // src/components/SegmentedControl/SegmentedControl.namespace.ts
1410
- var SegmentedControl_namespace_exports = {};
1411
- __export(SegmentedControl_namespace_exports, {
1412
- Indicator: () => SegmentedControlIndicator,
1413
- Item: () => SegmentedControlItem,
1414
- ItemHiddenInput: () => SegmentedControlItemHiddenInput,
1415
- Root: () => SegmentedControlRoot
1416
- });
1417
-
1418
- // src/components/SelectBox/CheckSelectBox.tsx
1419
- import { Checkbox as CheckboxPrimitive2, useCheckboxContext as useCheckboxContext2 } from "@seed-design/react-checkbox";
1420
- import { Primitive as Primitive24 } from "@seed-design/react-primitive";
1421
- import { selectBox } from "@seed-design/css/recipes/select-box";
1422
- import { selectBoxGroup } from "@seed-design/css/recipes/select-box-group";
1423
- import { forwardRef as forwardRef21 } from "react";
1424
- import { jsx as jsx21 } from "react/jsx-runtime";
1425
- var { withProvider: withGroupProvider } = createStyleContext(selectBoxGroup);
1426
- var { withProvider: withProvider17, withContext: withContext14 } = createStyleContext(selectBox);
1427
- var withStateProps7 = createWithStateProps([useCheckboxContext2]);
1428
- var CheckSelectBoxGroup = withGroupProvider(
1429
- forwardRef21((props, ref) => /* @__PURE__ */ jsx21(Primitive24.div, { ref, role: "group", ...props })),
1430
- "root"
1431
- );
1432
- var CheckSelectBoxRoot = withProvider17(
1433
- CheckboxPrimitive2.Root,
1434
- "root"
1435
- );
1436
- var CheckSelectBoxContent = withContext14(
1437
- withStateProps7(Primitive24.div),
1438
- "content"
1439
- );
1440
- var CheckSelectBoxLabel = withContext14(
1441
- withStateProps7(Primitive24.span),
1442
- "label"
1443
- );
1444
- var CheckSelectBoxDescription = withContext14(withStateProps7(Primitive24.span), "description");
1445
- var CheckSelectBoxControl = withContext14(
1446
- CheckboxPrimitive2.Control,
1447
- "checkboxControl"
1448
- );
1449
- var CheckSelectBoxIcon = withContext14(
1450
- withStateProps7(InternalIcon),
1451
- "checkboxIcon"
1452
- );
1453
- var CheckSelectBoxHiddenInput = CheckboxPrimitive2.HiddenInput;
1454
-
1455
- // src/components/SelectBox/RadioSelectBox.tsx
1456
- import { Primitive as Primitive25 } from "@seed-design/react-primitive";
1457
- import {
1458
- RadioGroup as RadioGroupPrimitive,
1459
- useRadioGroupItemContext
1460
- } from "@seed-design/react-radio-group";
1461
- import { selectBox as selectBox2 } from "@seed-design/css/recipes/select-box";
1462
- import { selectBoxGroup as selectBoxGroup2 } from "@seed-design/css/recipes/select-box-group";
1463
- var { withProvider: withGroupProvider2 } = createStyleContext(selectBoxGroup2);
1464
- var { withProvider: withProvider18, withContext: withContext15 } = createStyleContext(selectBox2);
1465
- var withStateProps8 = createWithStateProps([useRadioGroupItemContext]);
1466
- var RadioSelectBoxRoot = withGroupProvider2(
1467
- RadioGroupPrimitive.Root,
1468
- "root"
1469
- );
1470
- var RadioSelectBoxItem = withProvider18(
1471
- RadioGroupPrimitive.Item,
1472
- "root"
1473
- );
1474
- var RadioSelectBoxContent = withContext15(
1475
- withStateProps8(Primitive25.div),
1476
- "content"
1477
- );
1478
- var RadioSelectBoxLabel = withContext15(
1479
- withStateProps8(Primitive25.span),
1480
- "label"
1481
- );
1482
- var RadioSelectBoxDescription = withContext15(withStateProps8(Primitive25.span), "description");
1483
- var RadioSelectBoxControl = withContext15(
1484
- RadioGroupPrimitive.ItemControl,
1485
- "radioControl"
1486
- );
1487
- var RadioSelectBoxIcon = withContext15(
1488
- withStateProps8(InternalIcon),
1489
- "radioIcon"
1490
- );
1491
- var RadioSelectBoxHiddenInput = RadioGroupPrimitive.ItemHiddenInput;
1492
-
1493
- // src/components/SelectBox/CheckSelectBox.namespace.ts
1494
- var CheckSelectBox_namespace_exports = {};
1495
- __export(CheckSelectBox_namespace_exports, {
1496
- Content: () => CheckSelectBoxContent,
1497
- Control: () => CheckSelectBoxControl,
1498
- Description: () => CheckSelectBoxDescription,
1499
- Group: () => CheckSelectBoxGroup,
1500
- HiddenInput: () => CheckSelectBoxHiddenInput,
1501
- Icon: () => CheckSelectBoxIcon,
1502
- Label: () => CheckSelectBoxLabel,
1503
- Root: () => CheckSelectBoxRoot
1504
- });
1505
-
1506
- // src/components/SelectBox/RadioSelectBox.namespace.ts
1507
- var RadioSelectBox_namespace_exports = {};
1508
- __export(RadioSelectBox_namespace_exports, {
1509
- Content: () => RadioSelectBoxContent,
1510
- Control: () => RadioSelectBoxControl,
1511
- Description: () => RadioSelectBoxDescription,
1512
- HiddenInput: () => RadioSelectBoxHiddenInput,
1513
- Icon: () => RadioSelectBoxIcon,
1514
- Item: () => RadioSelectBoxItem,
1515
- Label: () => RadioSelectBoxLabel,
1516
- Root: () => RadioSelectBoxRoot
1517
- });
1518
-
1519
- // src/components/Skeleton/Skeleton.tsx
1520
- import { Primitive as Primitive26 } from "@seed-design/react-primitive";
1521
- import { skeleton } from "@seed-design/css/recipes/skeleton";
1522
- var { withProvider: withProvider19 } = createStyleContext(skeleton);
1523
- var Skeleton = withProvider19(
1524
- withStyleProps(Primitive26.div),
1525
- "root"
1526
- );
1527
-
1528
- // src/components/Snackbar/Snackbar.tsx
1529
- import { Primitive as Primitive27 } from "@seed-design/react-primitive";
1530
- import { Snackbar as SnackbarPrimitive } from "@seed-design/react-snackbar";
1531
- import { snackbar } from "@seed-design/css/recipes/snackbar";
1532
- import { snackbarRegion } from "@seed-design/css/recipes/snackbar-region";
1533
- import { visuallyHidden } from "@seed-design/css/recipes/visually-hidden";
1534
- import clsx8 from "clsx";
1535
- import { forwardRef as forwardRef22, useMemo as useMemo3 } from "react";
1536
- import { jsx as jsx22 } from "react/jsx-runtime";
1537
- var { withProvider: withRegionProvider } = createStyleContext(snackbarRegion);
1538
- var { withProvider: withProvider20, withContext: withContext16 } = createStyleContext(snackbar);
1539
- var SnackbarRootProvider = SnackbarPrimitive.RootProvider;
1540
- var SnackbarRegion = withRegionProvider(
1541
- SnackbarPrimitive.Region,
1542
- "root"
1543
- );
1544
- var SnackbarRoot = withProvider20(
1545
- SnackbarPrimitive.Root,
1546
- "root"
1547
- );
1548
- var SnackbarMessage = withContext16(
1549
- Primitive27.span,
1550
- "message"
1551
- );
1552
- var SnackbarPrefixIcon = withContext16(
1553
- InternalIcon,
1554
- "prefixIcon"
1555
- );
1556
- var SnackbarActionButton = withContext16(
1557
- Primitive27.button,
1558
- "actionButton"
1559
- );
1560
- var SnackbarCloseButton = forwardRef22(
1561
- (props, ref) => {
1562
- const { className, ...otherProps } = props;
1563
- const classNames = useMemo3(() => visuallyHidden(), []);
1564
- return /* @__PURE__ */ jsx22(
1565
- SnackbarPrimitive.CloseButton,
1566
- {
1567
- ref,
1568
- className: clsx8(classNames.root, className),
1569
- ...otherProps
1570
- }
1571
- );
1572
- }
1573
- );
1574
- var SnackbarRenderer = SnackbarPrimitive.Renderer;
1575
- var SnackbarAvoidOverlap = SnackbarPrimitive.AvoidOverlap;
1576
-
1577
- // src/components/Snackbar/index.ts
1578
- import {
1579
- useSnackbarContext as useSnackbarContext2
1580
- } from "@seed-design/react-snackbar";
1581
-
1582
- // src/components/Snackbar/useSnackbarAdapter.ts
1583
- import { useSnackbarContext } from "@seed-design/react-snackbar";
1584
- import { useMemo as useMemo4 } from "react";
1585
- function useSnackbarAdapter() {
1586
- const api = useSnackbarContext();
1587
- const adapter = useMemo4(
1588
- () => ({
1589
- visible: api.visible,
1590
- create: (options) => {
1591
- var _a, _b;
1592
- return api.create({
1593
- timeout: (_a = options.timeout) != null ? _a : 5e3,
1594
- removeDelay: (_b = options.removeDelay) != null ? _b : 200,
1595
- onClose: options.onClose,
1596
- render: options.render
1597
- });
1598
- },
1599
- dismiss: api.dismiss
1600
- }),
1601
- [api]
1602
- );
1603
- return adapter;
1604
- }
1605
-
1606
- // src/components/Snackbar/Snackbar.namespace.ts
1607
- var Snackbar_namespace_exports = {};
1608
- __export(Snackbar_namespace_exports, {
1609
- ActionButton: () => SnackbarActionButton,
1610
- AvoidOverlap: () => SnackbarAvoidOverlap,
1611
- CloseButton: () => SnackbarCloseButton,
1612
- Message: () => SnackbarMessage,
1613
- PrefixIcon: () => SnackbarPrefixIcon,
1614
- Region: () => SnackbarRegion,
1615
- Renderer: () => SnackbarRenderer,
1616
- Root: () => SnackbarRoot,
1617
- RootProvider: () => SnackbarRootProvider
1618
- });
1619
-
1620
- // src/components/Stack/Stack.tsx
1621
- import * as React11 from "react";
1622
- import { jsx as jsx23 } from "react/jsx-runtime";
1623
- var Stack = React11.forwardRef((props, ref) => {
1624
- return /* @__PURE__ */ jsx23(Box, { ref, display: "flex", flexDirection: "column", ...props });
1625
- });
1626
-
1627
- // src/components/Switch/Switch.tsx
1628
- import { Switch as SwitchPrimitive, useSwitchContext } from "@seed-design/react-switch";
1629
- import { switchStyle } from "@seed-design/css/recipes/switch";
1630
- import { Primitive as Primitive28 } from "@seed-design/react-primitive";
1631
- var { withProvider: withProvider21, withContext: withContext17 } = createStyleContext(switchStyle);
1632
- var withStateProps9 = createWithStateProps([useSwitchContext]);
1633
- var SwitchRoot = withProvider21(
1634
- SwitchPrimitive.Root,
1635
- "root"
1636
- );
1637
- var SwitchControl = withContext17(
1638
- SwitchPrimitive.Control,
1639
- "control"
1640
- );
1641
- var SwitchThumb = withContext17(
1642
- SwitchPrimitive.Thumb,
1643
- "thumb"
1644
- );
1645
- var SwitchLabel = withContext17(
1646
- withStateProps9(Primitive28.span),
1647
- "label"
1648
- );
1649
- var SwitchHiddenInput = SwitchPrimitive.HiddenInput;
1650
-
1651
- // src/components/Switch/Switch.namespace.ts
1652
- var Switch_namespace_exports = {};
1653
- __export(Switch_namespace_exports, {
1654
- Control: () => SwitchControl,
1655
- HiddenInput: () => SwitchHiddenInput,
1656
- Label: () => SwitchLabel,
1657
- Root: () => SwitchRoot,
1658
- Thumb: () => SwitchThumb
1659
- });
1660
-
1661
- // src/components/Tabs/Tabs.tsx
1662
- import { Primitive as Primitive29 } from "@seed-design/react-primitive";
1663
- import {
1664
- Tabs as TabsPrimitive2,
1665
- useTabsContext,
1666
- useTabsTriggerContext
1667
- } from "@seed-design/react-tabs";
1668
- import { tabs } from "@seed-design/css/recipes/tabs";
1669
- var { withProvider: withProvider22, withContext: withContext18 } = createStyleContext(tabs);
1670
- var withStateProps10 = createWithStateProps([useTabsContext, useTabsTriggerContext], {
1671
- strict: false
1672
- });
1673
- var TabsRoot = withProvider22(TabsPrimitive2.Root, "root");
1674
- var TabsList = withContext18(TabsPrimitive2.List, "list");
1675
- var TabsTrigger = withContext18(
1676
- TabsPrimitive2.Trigger,
1677
- "trigger"
1678
- );
1679
- var TabsTriggerNotification = withContext18(
1680
- withStateProps10(Primitive29.div),
1681
- "triggerNotification"
1682
- );
1683
- var TabsIndicator = withContext18(
1684
- TabsPrimitive2.Indicator,
1685
- "indicator"
1686
- );
1687
- var TabsContent = withContext18(
1688
- TabsPrimitive2.Content,
1689
- "content"
1690
- );
1691
- var TabsCarousel = withContext18(
1692
- TabsPrimitive2.Carousel,
1693
- "carousel"
1694
- );
1695
- var TabsCarouselCamera = withContext18(
1696
- TabsPrimitive2.CarouselCamera,
1697
- "carouselCamera"
1698
- );
1699
-
1700
- // src/components/Tabs/Tabs.namespace.ts
1701
- var Tabs_namespace_exports = {};
1702
- __export(Tabs_namespace_exports, {
1703
- Carousel: () => TabsCarousel,
1704
- CarouselCamera: () => TabsCarouselCamera,
1705
- Content: () => TabsContent,
1706
- Indicator: () => TabsIndicator,
1707
- List: () => TabsList,
1708
- Root: () => TabsRoot,
1709
- Trigger: () => TabsTrigger,
1710
- TriggerNotification: () => TabsTriggerNotification
1711
- });
1712
-
1713
- // src/components/Text/Text.tsx
1714
- import { text } from "@seed-design/css/recipes/text";
1715
- import {
1716
- vars as vars2
1717
- } from "@seed-design/css/vars";
1718
- import clsx9 from "clsx";
1719
- import { useMemo as useMemo5 } from "react";
1720
- import { jsx as jsx24 } from "react/jsx-runtime";
1721
- function handleColor2(color) {
1722
- var _a;
1723
- if (!color) {
1724
- return void 0;
1725
- }
1726
- const [type, value] = color.split(".");
1727
- return (_a = vars2.$color[type][value]) != null ? _a : void 0;
1728
- }
1729
- function handleFontWeight(fontWeight) {
1730
- var _a;
1731
- if (!fontWeight) {
1732
- return void 0;
1733
- }
1734
- return (_a = vars2.$fontWeight[fontWeight]) != null ? _a : void 0;
1735
- }
1736
- function handleFontSize(size) {
1737
- var _a;
1738
- if (!size) {
1739
- return void 0;
1740
- }
1741
- return (_a = vars2.$fontSize[size]) != null ? _a : size;
1742
- }
1743
- function handleLineHeight(lineHeight) {
1744
- var _a;
1745
- if (!lineHeight) {
1746
- return void 0;
1747
- }
1748
- return (_a = vars2.$lineHeight[lineHeight]) != null ? _a : lineHeight;
1749
- }
1750
- function mapMaxLines(maxLines) {
1751
- if (maxLines === void 0) {
1752
- return "none";
1753
- }
1754
- if (maxLines === 1) {
1755
- return "single";
1756
- }
1757
- return "multi";
1758
- }
1759
- var Text = ({
1760
- as,
1761
- color,
1762
- textStyle,
1763
- fontSize,
1764
- lineHeight,
1765
- fontWeight,
1766
- maxLines,
1767
- children,
1768
- className,
1769
- style,
1770
- ...otherProps
1771
- }) => {
1772
- const Comp = as || "span";
1773
- const classNames = useMemo5(
1774
- () => text({
1775
- textStyle,
1776
- maxLines: mapMaxLines(maxLines)
1777
- }),
1778
- [textStyle, maxLines]
1779
- );
1780
- return /* @__PURE__ */ jsx24(
1781
- Comp,
1782
- {
1783
- className: clsx9(classNames.root, className),
1784
- style: {
1785
- "--seed-max-lines": maxLines,
1786
- "--seed-text-color": handleColor2(color),
1787
- "--seed-font-size": handleFontSize(fontSize),
1788
- "--seed-line-height": handleLineHeight(lineHeight != null ? lineHeight : fontSize),
1789
- "--seed-font-weight": handleFontWeight(fontWeight),
1790
- "--seed-text-align": otherProps.align,
1791
- ...style
1792
- },
1793
- ...otherProps,
1794
- children
1795
- }
1796
- );
1797
- };
1798
-
1799
- // src/components/TextField/TextField.tsx
1800
- import { useLayoutEffect as useLayoutEffect2 } from "@radix-ui/react-use-layout-effect";
1801
- import { Primitive as Primitive30 } from "@seed-design/react-primitive";
1802
- import { TextField, useTextFieldContext } from "@seed-design/react-text-field";
1803
- import { textField } from "@seed-design/css/recipes/text-field";
1804
- import clsx10 from "clsx";
1805
- import { forwardRef as forwardRef24, useCallback as useCallback3, useRef as useRef2 } from "react";
1806
- import { composeRefs } from "@radix-ui/react-compose-refs";
1807
- import { Fragment as Fragment2, jsx as jsx25, jsxs as jsxs2 } from "react/jsx-runtime";
1808
- var { withProvider: withProvider23, withContext: withContext19, useClassNames: useClassNames3 } = createStyleContext(textField);
1809
- var withStateProps11 = createWithStateProps([useTextFieldContext]);
1810
- var TextFieldRoot = withProvider23(
1811
- TextField.Root,
1812
- "root"
1813
- );
1814
- var TextFieldHeader = withContext19(
1815
- withStateProps11(Primitive30.div),
1816
- "header"
1817
- );
1818
- var TextFieldLabel = withContext19(
1819
- TextField.Label,
1820
- "label"
1821
- );
1822
- var TextFieldIndicator = forwardRef24(
1823
- (props, ref) => {
1824
- const { className, ...otherProps } = props;
1825
- const classNames = useClassNames3();
1826
- return /* @__PURE__ */ jsxs2(Fragment2, { children: [
1827
- /* @__PURE__ */ jsx25(Primitive30.span, { children: " " }),
1828
- /* @__PURE__ */ jsx25(
1829
- Primitive30.span,
1830
- {
1831
- ref,
1832
- className: clsx10(classNames.indicator, className),
1833
- ...otherProps
1834
- }
1835
- )
1836
- ] });
1837
- }
1838
- );
1839
- var TextFieldField = withContext19(
1840
- withStateProps11(Primitive30.div),
1841
- "field"
1842
- );
1843
- var TextFieldPrefixIcon = withContext19(
1844
- withStateProps11(InternalIcon),
1845
- "prefixIcon"
1846
- );
1847
- var TextFieldPrefixText = withContext19(
1848
- withStateProps11(Primitive30.span),
1849
- "prefixText"
1850
- );
1851
- var TextFieldSuffixIcon = withContext19(
1852
- withStateProps11(InternalIcon),
1853
- "suffixIcon"
1854
- );
1855
- var TextFieldSuffixText = withContext19(
1856
- withStateProps11(Primitive30.span),
1857
- "suffixText"
1858
- );
1859
- var TextFieldInput = withContext19(
1860
- TextField.Input,
1861
- "value"
1862
- );
1863
- var TextFieldTextarea = forwardRef24(
1864
- (props, ref) => {
1865
- var _a;
1866
- const { className, autoresize = true, ...otherProps } = props;
1867
- const classNames = useClassNames3();
1868
- const { value } = useTextFieldContext();
1869
- const inputRef = useRef2(null);
1870
- const onHeightChange = useCallback3(() => {
1871
- var _a2;
1872
- if (!inputRef.current) return;
1873
- if ((_a2 = otherProps.style) == null ? void 0 : _a2.height) return;
1874
- if (!autoresize) return;
1875
- const input = inputRef.current;
1876
- const prevAlignment = input.style.alignSelf;
1877
- const prevOverflow = input.style.overflow;
1878
- const isFirefox = "MozAppearance" in input.style;
1879
- if (!isFirefox) {
1880
- input.style.overflow = "hidden";
1881
- }
1882
- input.style.alignSelf = "start";
1883
- input.style.height = "auto";
1884
- input.style.height = `${input.scrollHeight + (input.offsetHeight - input.clientHeight)}px`;
1885
- input.style.overflow = prevOverflow;
1886
- input.style.alignSelf = prevAlignment;
1887
- }, [inputRef, (_a = otherProps.style) == null ? void 0 : _a.height, autoresize]);
1888
- useLayoutEffect2(() => {
1889
- if (inputRef.current) {
1890
- onHeightChange();
1891
- }
1892
- }, [onHeightChange, value, inputRef]);
1893
- return /* @__PURE__ */ jsx25(
1894
- TextField.Textarea,
1895
- {
1896
- ref: composeRefs(inputRef, ref),
1897
- ...otherProps,
1898
- className: clsx10(classNames.value, className)
1899
- }
1900
- );
1901
- }
1902
- );
1903
- var TextFieldFooter = withContext19(
1904
- withStateProps11(Primitive30.div),
1905
- "footer"
1906
- );
1907
- var TextFieldDescription = withContext19(
1908
- TextField.Description,
1909
- "description"
1910
- );
1911
- var TextFieldErrorMessage = withContext19(
1912
- TextField.ErrorMessage,
1913
- "errorMessage"
1914
- );
1915
- var TextFieldErrorIcon = withContext19(
1916
- withStateProps11(InternalIcon),
1917
- "errorIcon"
1918
- );
1919
- var TextFieldCharacterCountArea = withContext19(withStateProps11(Primitive30.div), "characterCountArea");
1920
- var TextFieldCharacterCount = withContext19(
1921
- TextField.GraphemeCount,
1922
- "characterCount"
1923
- );
1924
- var TextFieldMaxCharacterCount = withContext19(withStateProps11(Primitive30.span), "maxCharacterCount");
1925
-
1926
- // src/components/TextField/TextField.namespace.tsx
1927
- var TextField_namespace_exports = {};
1928
- __export(TextField_namespace_exports, {
1929
- CharacterCount: () => TextFieldCharacterCount,
1930
- CharacterCountArea: () => TextFieldCharacterCountArea,
1931
- Description: () => TextFieldDescription,
1932
- ErrorIcon: () => TextFieldErrorIcon,
1933
- ErrorMessage: () => TextFieldErrorMessage,
1934
- Field: () => TextFieldField,
1935
- Footer: () => TextFieldFooter,
1936
- Header: () => TextFieldHeader,
1937
- Indicator: () => TextFieldIndicator,
1938
- Input: () => TextFieldInput,
1939
- Label: () => TextFieldLabel,
1940
- MaxCharacterCount: () => TextFieldMaxCharacterCount,
1941
- PrefixIcon: () => TextFieldPrefixIcon,
1942
- PrefixText: () => TextFieldPrefixText,
1943
- Root: () => TextFieldRoot,
1944
- SuffixIcon: () => TextFieldSuffixIcon,
1945
- SuffixText: () => TextFieldSuffixText,
1946
- Textarea: () => TextFieldTextarea
1947
- });
1948
-
1949
- // src/components/ToggleButton/ToggleButton.tsx
1950
- import { Toggle as TogglePrimitive2 } from "@seed-design/react-toggle";
1951
- import {
1952
- toggleButton
1953
- } from "@seed-design/css/recipes/toggle-button";
1954
- import clsx11 from "clsx";
1955
- import * as React12 from "react";
1956
- import { jsx as jsx26 } from "react/jsx-runtime";
1957
- var { ClassNamesProvider: ClassNamesProvider3 } = createStyleContext(toggleButton);
1958
- var ToggleButton = React12.forwardRef(
1959
- ({ variant = "brandSolid", size = "small", loading = false, className, ...otherProps }, ref) => {
1960
- const classNames = toggleButton({ variant, size });
1961
- const api = usePendingButton({ loading, disabled: otherProps.disabled });
1962
- return /* @__PURE__ */ jsx26(ClassNamesProvider3, { value: classNames, children: /* @__PURE__ */ jsx26(PendingButtonProvider, { value: api, children: /* @__PURE__ */ jsx26(
1963
- TogglePrimitive2.Root,
1964
- {
1965
- ref,
1966
- className: clsx11(classNames.root, className),
1967
- ...api.stateProps,
1968
- ...otherProps
1969
- }
1970
- ) }) });
1971
- }
1972
- );
1973
- ToggleButton.displayName = "ToggleButton";
1974
-
1975
- // src/components/VisuallyHidden/VisuallyHidden.tsx
1976
- import { Primitive as Primitive31 } from "@seed-design/react-primitive";
1977
- import { visuallyHidden as visuallyHidden2 } from "@seed-design/css/recipes/visually-hidden";
1978
- var { withProvider: withProvider24 } = createStyleContext(visuallyHidden2);
1979
- var VisuallyHidden = withProvider24(
1980
- Primitive31.div,
1981
- "root"
1982
- );
1983
- export {
1984
- ActionButton,
1985
- ActionChip,
1986
- ActionSheet_namespace_exports as ActionSheet,
1987
- ActionSheetBackdrop,
1988
- ActionSheetCloseButton,
1989
- ActionSheetContent,
1990
- ActionSheetDescription,
1991
- ActionSheetHeader,
1992
- ActionSheetItem,
1993
- ActionSheetList,
1994
- ActionSheetPositioner,
1995
- ActionSheetRoot,
1996
- ActionSheetTitle,
1997
- ActionSheetTrigger,
1998
- Avatar_namespace_exports as Avatar,
1999
- AvatarBadge,
2000
- AvatarFallback,
2001
- AvatarImage,
2002
- AvatarRoot,
2003
- AvatarStack,
2004
- Badge,
2005
- BottomSheet_namespace_exports as BottomSheet,
2006
- BottomSheetBackdrop,
2007
- BottomSheetBody,
2008
- BottomSheetCloseButton,
2009
- BottomSheetContent,
2010
- BottomSheetDescription,
2011
- BottomSheetFooter,
2012
- BottomSheetHeader,
2013
- BottomSheetPositioner,
2014
- BottomSheetRoot,
2015
- BottomSheetTitle,
2016
- BottomSheetTrigger,
2017
- Box,
2018
- Callout_namespace_exports as Callout,
2019
- CalloutCloseButton,
2020
- CalloutContent,
2021
- CalloutDescription,
2022
- CalloutLink,
2023
- CalloutRoot,
2024
- CalloutTitle,
2025
- Celcius,
2026
- CheckSelectBox_namespace_exports as CheckSelectBox,
2027
- CheckSelectBoxContent,
2028
- CheckSelectBoxControl,
2029
- CheckSelectBoxDescription,
2030
- CheckSelectBoxGroup,
2031
- CheckSelectBoxHiddenInput,
2032
- CheckSelectBoxIcon,
2033
- CheckSelectBoxLabel,
2034
- CheckSelectBoxRoot,
2035
- Checkbox_namespace_exports as Checkbox,
2036
- CheckboxControl,
2037
- CheckboxHiddenInput,
2038
- CheckboxIndicator,
2039
- CheckboxLabel,
2040
- CheckboxRoot,
2041
- ChipTabs_namespace_exports as ChipTabs,
2042
- ChipTabsCarousel,
2043
- ChipTabsCarouselCamera,
2044
- ChipTabsContent,
2045
- ChipTabsList,
2046
- ChipTabsRoot,
2047
- ChipTabsTrigger,
2048
- Column,
2049
- Columns,
2050
- ConsistentWidth,
2051
- ControlChip,
2052
- Count,
2053
- Dialog_namespace_exports as Dialog,
2054
- DialogAction,
2055
- DialogBackdrop,
2056
- DialogContent,
2057
- DialogDescription,
2058
- DialogFooter,
2059
- DialogHeader,
2060
- DialogPositioner,
2061
- DialogRoot,
2062
- DialogTitle,
2063
- DialogTrigger,
2064
- ExtendedActionSheet_namespace_exports as ExtendedActionSheet,
2065
- ExtendedActionSheetBackdrop,
2066
- ExtendedActionSheetCloseButton,
2067
- ExtendedActionSheetContent,
2068
- ExtendedActionSheetFooter,
2069
- ExtendedActionSheetGroup,
2070
- ExtendedActionSheetHeader,
2071
- ExtendedActionSheetItem,
2072
- ExtendedActionSheetList,
2073
- ExtendedActionSheetPositioner,
2074
- ExtendedActionSheetRoot,
2075
- ExtendedActionSheetTitle,
2076
- ExtendedActionSheetTrigger,
2077
- ExtendedFab,
2078
- Fab,
2079
- Flex,
2080
- HelpBubble_namespace_exports as HelpBubble,
2081
- HelpBubbleAnchor,
2082
- HelpBubbleArrow,
2083
- HelpBubbleArrowTip,
2084
- HelpBubbleBackdrop,
2085
- HelpBubbleCloseButton,
2086
- HelpBubbleContent,
2087
- HelpBubbleDescription,
2088
- HelpBubblePositioner,
2089
- HelpBubbleRoot,
2090
- HelpBubbleTitle,
2091
- HelpBubbleTrigger,
2092
- Icon,
2093
- IdentityPlaceholder_namespace_exports as IdentityPlaceholder,
2094
- IdentityPlaceholderImage,
2095
- IdentityPlaceholderRoot,
2096
- Inline,
2097
- InlineBanner_namespace_exports as InlineBanner,
2098
- InlineBannerCloseButton,
2099
- InlineBannerContent,
2100
- InlineBannerDescription,
2101
- InlineBannerLink,
2102
- InlineBannerRoot,
2103
- InlineBannerTitle,
2104
- LinkWithIcon,
2105
- LoadingIndicator,
2106
- MannerTempBadge,
2107
- PrefixIcon,
2108
- ProgressCircle_namespace_exports as ProgressCircle,
2109
- ProgressCircleRange,
2110
- ProgressCircleRoot,
2111
- ProgressCircleTrack,
2112
- PullToRefresh_namespace_exports as PullToRefresh,
2113
- PullToRefreshContent,
2114
- PullToRefreshIndicator,
2115
- PullToRefreshRoot,
2116
- RadioSelectBox_namespace_exports as RadioSelectBox,
2117
- RadioSelectBoxContent,
2118
- RadioSelectBoxControl,
2119
- RadioSelectBoxDescription,
2120
- RadioSelectBoxHiddenInput,
2121
- RadioSelectBoxIcon,
2122
- RadioSelectBoxItem,
2123
- RadioSelectBoxLabel,
2124
- RadioSelectBoxRoot,
2125
- ReactionButton,
2126
- SegmentedControl_namespace_exports as SegmentedControl,
2127
- SegmentedControlIndicator,
2128
- SegmentedControlItem,
2129
- SegmentedControlItemHiddenInput,
2130
- SegmentedControlRoot,
2131
- Skeleton,
2132
- Snackbar_namespace_exports as Snackbar,
2133
- SnackbarActionButton,
2134
- SnackbarAvoidOverlap,
2135
- SnackbarCloseButton,
2136
- SnackbarMessage,
2137
- SnackbarPrefixIcon,
2138
- SnackbarRegion,
2139
- SnackbarRenderer,
2140
- SnackbarRoot,
2141
- SnackbarRootProvider,
2142
- Stack,
2143
- SuffixIcon,
2144
- Switch_namespace_exports as Switch,
2145
- SwitchControl,
2146
- SwitchHiddenInput,
2147
- SwitchLabel,
2148
- SwitchRoot,
2149
- SwitchThumb,
2150
- Tabs_namespace_exports as Tabs,
2151
- TabsCarousel,
2152
- TabsCarouselCamera,
2153
- TabsContent,
2154
- TabsIndicator,
2155
- TabsList,
2156
- TabsRoot,
2157
- TabsTrigger,
2158
- TabsTriggerNotification,
2159
- Text,
2160
- TextField_namespace_exports as TextField,
2161
- TextFieldCharacterCount,
2162
- TextFieldCharacterCountArea,
2163
- TextFieldDescription,
2164
- TextFieldErrorIcon,
2165
- TextFieldErrorMessage,
2166
- TextFieldField,
2167
- TextFieldFooter,
2168
- TextFieldHeader,
2169
- TextFieldIndicator,
2170
- TextFieldInput,
2171
- TextFieldLabel,
2172
- TextFieldMaxCharacterCount,
2173
- TextFieldPrefixIcon,
2174
- TextFieldPrefixText,
2175
- TextFieldRoot,
2176
- TextFieldSuffixIcon,
2177
- TextFieldSuffixText,
2178
- TextFieldTextarea,
2179
- ToggleButton,
2180
- VisuallyHidden,
2181
- useSnackbarAdapter,
2182
- useSnackbarContext2 as useSnackbarContext
2183
- };
2184
- //# sourceMappingURL=index.mjs.map