@seed-design/react 0.0.1-alpha-20250210081704

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 (356) hide show
  1. package/README.md +7 -0
  2. package/lib/components/ActionButton/ActionButton.d.ts +24 -0
  3. package/lib/components/ActionButton/ActionButton.d.ts.map +1 -0
  4. package/lib/components/ActionButton/ActionButton.namespace.d.ts +2 -0
  5. package/lib/components/ActionButton/ActionButton.namespace.d.ts.map +1 -0
  6. package/lib/components/ActionButton/index.d.ts +3 -0
  7. package/lib/components/ActionButton/index.d.ts.map +1 -0
  8. package/lib/components/ActionChip/ActionChip.d.ts +23 -0
  9. package/lib/components/ActionChip/ActionChip.d.ts.map +1 -0
  10. package/lib/components/ActionChip/ActionChip.namespace.d.ts +2 -0
  11. package/lib/components/ActionChip/ActionChip.namespace.d.ts.map +1 -0
  12. package/lib/components/ActionChip/index.d.ts +3 -0
  13. package/lib/components/ActionChip/index.d.ts.map +1 -0
  14. package/lib/components/ActionSheet/ActionSheet.d.ts +47 -0
  15. package/lib/components/ActionSheet/ActionSheet.d.ts.map +1 -0
  16. package/lib/components/ActionSheet/ActionSheet.namespace.d.ts +2 -0
  17. package/lib/components/ActionSheet/ActionSheet.namespace.d.ts.map +1 -0
  18. package/lib/components/ActionSheet/index.d.ts +3 -0
  19. package/lib/components/ActionSheet/index.d.ts.map +1 -0
  20. package/lib/components/Avatar/Avatar.d.ts +21 -0
  21. package/lib/components/Avatar/Avatar.d.ts.map +1 -0
  22. package/lib/components/Avatar/Avatar.namespace.d.ts +2 -0
  23. package/lib/components/Avatar/Avatar.namespace.d.ts.map +1 -0
  24. package/lib/components/Avatar/index.d.ts +3 -0
  25. package/lib/components/Avatar/index.d.ts.map +1 -0
  26. package/lib/components/Badge/Badge.d.ts +10 -0
  27. package/lib/components/Badge/Badge.d.ts.map +1 -0
  28. package/lib/components/Badge/Badge.namespace.d.ts +2 -0
  29. package/lib/components/Badge/Badge.namespace.d.ts.map +1 -0
  30. package/lib/components/Badge/index.d.ts +3 -0
  31. package/lib/components/Badge/index.d.ts.map +1 -0
  32. package/lib/components/BottomSheet/BottomSheet.d.ts +42 -0
  33. package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -0
  34. package/lib/components/BottomSheet/BottomSheet.namespace.d.ts +2 -0
  35. package/lib/components/BottomSheet/BottomSheet.namespace.d.ts.map +1 -0
  36. package/lib/components/BottomSheet/index.d.ts +3 -0
  37. package/lib/components/BottomSheet/index.d.ts.map +1 -0
  38. package/lib/components/Box/Box.d.ts +50 -0
  39. package/lib/components/Box/Box.d.ts.map +1 -0
  40. package/lib/components/Box/index.d.ts +2 -0
  41. package/lib/components/Box/index.d.ts.map +1 -0
  42. package/lib/components/Callout/Callout.d.ts +33 -0
  43. package/lib/components/Callout/Callout.d.ts.map +1 -0
  44. package/lib/components/Callout/Callout.namespace.d.ts +2 -0
  45. package/lib/components/Callout/Callout.namespace.d.ts.map +1 -0
  46. package/lib/components/Callout/index.d.ts +3 -0
  47. package/lib/components/Callout/index.d.ts.map +1 -0
  48. package/lib/components/Celcius/Celcius.d.ts +6 -0
  49. package/lib/components/Celcius/Celcius.d.ts.map +1 -0
  50. package/lib/components/Celcius/index.d.ts +2 -0
  51. package/lib/components/Celcius/index.d.ts.map +1 -0
  52. package/lib/components/Checkbox/Checkbox.d.ts +31 -0
  53. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -0
  54. package/lib/components/Checkbox/Checkbox.namespace.d.ts +2 -0
  55. package/lib/components/Checkbox/Checkbox.namespace.d.ts.map +1 -0
  56. package/lib/components/Checkbox/index.d.ts +3 -0
  57. package/lib/components/Checkbox/index.d.ts.map +1 -0
  58. package/lib/components/ChipTabs/ChipTabs.d.ts +26 -0
  59. package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -0
  60. package/lib/components/ChipTabs/ChipTabs.namespace.d.ts +2 -0
  61. package/lib/components/ChipTabs/ChipTabs.namespace.d.ts.map +1 -0
  62. package/lib/components/ChipTabs/index.d.ts +3 -0
  63. package/lib/components/ChipTabs/index.d.ts.map +1 -0
  64. package/lib/components/Columns/Columns.d.ts +10 -0
  65. package/lib/components/Columns/Columns.d.ts.map +1 -0
  66. package/lib/components/Columns/index.d.ts +2 -0
  67. package/lib/components/Columns/index.d.ts.map +1 -0
  68. package/lib/components/ControlChip/ControlChip.d.ts +25 -0
  69. package/lib/components/ControlChip/ControlChip.d.ts.map +1 -0
  70. package/lib/components/ControlChip/ControlChip.namespace.d.ts +2 -0
  71. package/lib/components/ControlChip/ControlChip.namespace.d.ts.map +1 -0
  72. package/lib/components/ControlChip/index.d.ts +3 -0
  73. package/lib/components/ControlChip/index.d.ts.map +1 -0
  74. package/lib/components/Dialog/Dialog.d.ts +34 -0
  75. package/lib/components/Dialog/Dialog.d.ts.map +1 -0
  76. package/lib/components/Dialog/Dialog.namespace.d.ts +2 -0
  77. package/lib/components/Dialog/Dialog.namespace.d.ts.map +1 -0
  78. package/lib/components/Dialog/index.d.ts +3 -0
  79. package/lib/components/Dialog/index.d.ts.map +1 -0
  80. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.d.ts +54 -0
  81. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.d.ts.map +1 -0
  82. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.d.ts +2 -0
  83. package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.d.ts.map +1 -0
  84. package/lib/components/ExtendedActionSheet/index.d.ts +3 -0
  85. package/lib/components/ExtendedActionSheet/index.d.ts.map +1 -0
  86. package/lib/components/ExtendedFab/ExtendedFab.d.ts +13 -0
  87. package/lib/components/ExtendedFab/ExtendedFab.d.ts.map +1 -0
  88. package/lib/components/ExtendedFab/ExtendedFab.namespace.d.ts +2 -0
  89. package/lib/components/ExtendedFab/ExtendedFab.namespace.d.ts.map +1 -0
  90. package/lib/components/ExtendedFab/index.d.ts +3 -0
  91. package/lib/components/ExtendedFab/index.d.ts.map +1 -0
  92. package/lib/components/Fab/Fab.d.ts +11 -0
  93. package/lib/components/Fab/Fab.d.ts.map +1 -0
  94. package/lib/components/Fab/Fab.namespace.d.ts +2 -0
  95. package/lib/components/Fab/Fab.namespace.d.ts.map +1 -0
  96. package/lib/components/Fab/index.d.ts +3 -0
  97. package/lib/components/Fab/index.d.ts.map +1 -0
  98. package/lib/components/Flex/Flex.d.ts +12 -0
  99. package/lib/components/Flex/Flex.d.ts.map +1 -0
  100. package/lib/components/Flex/index.d.ts +2 -0
  101. package/lib/components/Flex/index.d.ts.map +1 -0
  102. package/lib/components/HelpBubble/HelpBubble.d.ts +47 -0
  103. package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -0
  104. package/lib/components/HelpBubble/HelpBubble.namespace.d.ts +2 -0
  105. package/lib/components/HelpBubble/HelpBubble.namespace.d.ts.map +1 -0
  106. package/lib/components/HelpBubble/index.d.ts +3 -0
  107. package/lib/components/HelpBubble/index.d.ts.map +1 -0
  108. package/lib/components/Inline/Inline.d.ts +6 -0
  109. package/lib/components/Inline/Inline.d.ts.map +1 -0
  110. package/lib/components/Inline/index.d.ts +2 -0
  111. package/lib/components/Inline/index.d.ts.map +1 -0
  112. package/lib/components/InlineBanner/InlineBanner.d.ts +36 -0
  113. package/lib/components/InlineBanner/InlineBanner.d.ts.map +1 -0
  114. package/lib/components/InlineBanner/InlineBanner.namespace.d.ts +2 -0
  115. package/lib/components/InlineBanner/InlineBanner.namespace.d.ts.map +1 -0
  116. package/lib/components/InlineBanner/index.d.ts +3 -0
  117. package/lib/components/InlineBanner/index.d.ts.map +1 -0
  118. package/lib/components/MannerTempBadge/MannerTempBadge.d.ts +10 -0
  119. package/lib/components/MannerTempBadge/MannerTempBadge.d.ts.map +1 -0
  120. package/lib/components/MannerTempBadge/MannerTempBadge.namespace.d.ts +2 -0
  121. package/lib/components/MannerTempBadge/MannerTempBadge.namespace.d.ts.map +1 -0
  122. package/lib/components/MannerTempBadge/index.d.ts +3 -0
  123. package/lib/components/MannerTempBadge/index.d.ts.map +1 -0
  124. package/lib/components/ProgressCircle/ProgressCircle.d.ts +12 -0
  125. package/lib/components/ProgressCircle/ProgressCircle.d.ts.map +1 -0
  126. package/lib/components/ProgressCircle/ProgressCircle.namespace.d.ts +2 -0
  127. package/lib/components/ProgressCircle/ProgressCircle.namespace.d.ts.map +1 -0
  128. package/lib/components/ProgressCircle/index.d.ts +3 -0
  129. package/lib/components/ProgressCircle/index.d.ts.map +1 -0
  130. package/lib/components/PullToRefresh/PullToRefresh.d.ts +12 -0
  131. package/lib/components/PullToRefresh/PullToRefresh.d.ts.map +1 -0
  132. package/lib/components/PullToRefresh/PullToRefresh.namespace.d.ts +2 -0
  133. package/lib/components/PullToRefresh/PullToRefresh.namespace.d.ts.map +1 -0
  134. package/lib/components/PullToRefresh/index.d.ts +3 -0
  135. package/lib/components/PullToRefresh/index.d.ts.map +1 -0
  136. package/lib/components/ReactionButton/ReactionButton.d.ts +22 -0
  137. package/lib/components/ReactionButton/ReactionButton.d.ts.map +1 -0
  138. package/lib/components/ReactionButton/ReactionButton.namespace.d.ts +2 -0
  139. package/lib/components/ReactionButton/ReactionButton.namespace.d.ts.map +1 -0
  140. package/lib/components/ReactionButton/index.d.ts +3 -0
  141. package/lib/components/ReactionButton/index.d.ts.map +1 -0
  142. package/lib/components/SegmentedControl/SegmentedControl.d.ts +19 -0
  143. package/lib/components/SegmentedControl/SegmentedControl.d.ts.map +1 -0
  144. package/lib/components/SegmentedControl/SegmentedControl.namespace.d.ts +2 -0
  145. package/lib/components/SegmentedControl/SegmentedControl.namespace.d.ts.map +1 -0
  146. package/lib/components/SegmentedControl/index.d.ts +3 -0
  147. package/lib/components/SegmentedControl/index.d.ts.map +1 -0
  148. package/lib/components/SelectBox/CheckSelectBox.d.ts +32 -0
  149. package/lib/components/SelectBox/CheckSelectBox.d.ts.map +1 -0
  150. package/lib/components/SelectBox/CheckSelectBox.namespace.d.ts +2 -0
  151. package/lib/components/SelectBox/CheckSelectBox.namespace.d.ts.map +1 -0
  152. package/lib/components/SelectBox/RadioSelectBox.d.ts +28 -0
  153. package/lib/components/SelectBox/RadioSelectBox.d.ts.map +1 -0
  154. package/lib/components/SelectBox/RadioSelectBox.namespace.d.ts +2 -0
  155. package/lib/components/SelectBox/RadioSelectBox.namespace.d.ts.map +1 -0
  156. package/lib/components/SelectBox/index.d.ts +5 -0
  157. package/lib/components/SelectBox/index.d.ts.map +1 -0
  158. package/lib/components/Skeleton/Skeleton.d.ts +7 -0
  159. package/lib/components/Skeleton/Skeleton.d.ts.map +1 -0
  160. package/lib/components/Skeleton/index.d.ts +2 -0
  161. package/lib/components/Skeleton/index.d.ts.map +1 -0
  162. package/lib/components/Snackbar/Snackbar.d.ts +35 -0
  163. package/lib/components/Snackbar/Snackbar.d.ts.map +1 -0
  164. package/lib/components/Snackbar/Snackbar.namespace.d.ts +2 -0
  165. package/lib/components/Snackbar/Snackbar.namespace.d.ts.map +1 -0
  166. package/lib/components/Snackbar/index.d.ts +5 -0
  167. package/lib/components/Snackbar/index.d.ts.map +1 -0
  168. package/lib/components/Snackbar/useSnackbarAdapter.d.ts +11 -0
  169. package/lib/components/Snackbar/useSnackbarAdapter.d.ts.map +1 -0
  170. package/lib/components/Stack/Stack.d.ts +6 -0
  171. package/lib/components/Stack/Stack.d.ts.map +1 -0
  172. package/lib/components/Stack/index.d.ts +2 -0
  173. package/lib/components/Stack/index.d.ts.map +1 -0
  174. package/lib/components/Switch/Switch.d.ts +19 -0
  175. package/lib/components/Switch/Switch.d.ts.map +1 -0
  176. package/lib/components/Switch/Switch.namespace.d.ts +2 -0
  177. package/lib/components/Switch/Switch.namespace.d.ts.map +1 -0
  178. package/lib/components/Switch/index.d.ts +3 -0
  179. package/lib/components/Switch/index.d.ts.map +1 -0
  180. package/lib/components/Tabs/Tabs.d.ts +32 -0
  181. package/lib/components/Tabs/Tabs.d.ts.map +1 -0
  182. package/lib/components/Tabs/Tabs.namespace.d.ts +2 -0
  183. package/lib/components/Tabs/Tabs.namespace.d.ts.map +1 -0
  184. package/lib/components/Tabs/index.d.ts +3 -0
  185. package/lib/components/Tabs/index.d.ts.map +1 -0
  186. package/lib/components/Text/Text.d.ts +36 -0
  187. package/lib/components/Text/Text.d.ts.map +1 -0
  188. package/lib/components/Text/index.d.ts +2 -0
  189. package/lib/components/Text/index.d.ts.map +1 -0
  190. package/lib/components/TextButton/TextButton.d.ts +17 -0
  191. package/lib/components/TextButton/TextButton.d.ts.map +1 -0
  192. package/lib/components/TextButton/TextButton.namespace.d.ts +2 -0
  193. package/lib/components/TextButton/TextButton.namespace.d.ts.map +1 -0
  194. package/lib/components/TextButton/index.d.ts +3 -0
  195. package/lib/components/TextButton/index.d.ts.map +1 -0
  196. package/lib/components/TextField/TextField.d.ts +65 -0
  197. package/lib/components/TextField/TextField.d.ts.map +1 -0
  198. package/lib/components/TextField/TextField.namespace.d.ts +2 -0
  199. package/lib/components/TextField/TextField.namespace.d.ts.map +1 -0
  200. package/lib/components/TextField/index.d.ts +3 -0
  201. package/lib/components/TextField/index.d.ts.map +1 -0
  202. package/lib/components/ToggleButton/ToggleButton.d.ts +22 -0
  203. package/lib/components/ToggleButton/ToggleButton.d.ts.map +1 -0
  204. package/lib/components/ToggleButton/ToggleButton.namespace.d.ts +2 -0
  205. package/lib/components/ToggleButton/ToggleButton.namespace.d.ts.map +1 -0
  206. package/lib/components/ToggleButton/index.d.ts +3 -0
  207. package/lib/components/ToggleButton/index.d.ts.map +1 -0
  208. package/lib/components/VisuallyHidden/VisuallyHidden.d.ts +6 -0
  209. package/lib/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
  210. package/lib/components/VisuallyHidden/index.d.ts +2 -0
  211. package/lib/components/VisuallyHidden/index.d.ts.map +1 -0
  212. package/lib/components/index.d.ts +38 -0
  213. package/lib/components/index.d.ts.map +1 -0
  214. package/lib/components/private/Icon.d.ts +5 -0
  215. package/lib/components/private/Icon.d.ts.map +1 -0
  216. package/lib/components/private/useDismissible.d.ts +1665 -0
  217. package/lib/components/private/useDismissible.d.ts.map +1 -0
  218. package/lib/components/private/usePendingButton.d.ts +831 -0
  219. package/lib/components/private/usePendingButton.d.ts.map +1 -0
  220. package/lib/index.d.ts +2 -0
  221. package/lib/index.d.ts.map +1 -0
  222. package/lib/index.js +2309 -0
  223. package/lib/index.js.map +7 -0
  224. package/lib/index.mjs +2318 -0
  225. package/lib/index.mjs.map +7 -0
  226. package/lib/primitive.d.ts +12 -0
  227. package/lib/primitive.d.ts.map +1 -0
  228. package/lib/primitive.js +31 -0
  229. package/lib/primitive.js.map +7 -0
  230. package/lib/primitive.mjs +13 -0
  231. package/lib/primitive.mjs.map +7 -0
  232. package/lib/utils/createStyleContext.d.ts +24 -0
  233. package/lib/utils/createStyleContext.d.ts.map +1 -0
  234. package/lib/utils/createWithStateProps.d.ts +10 -0
  235. package/lib/utils/createWithStateProps.d.ts.map +1 -0
  236. package/lib/vars.d.ts +2 -0
  237. package/lib/vars.d.ts.map +1 -0
  238. package/lib/vars.js +21 -0
  239. package/lib/vars.js.map +7 -0
  240. package/lib/vars.mjs +3 -0
  241. package/lib/vars.mjs.map +7 -0
  242. package/package.json +80 -0
  243. package/src/components/ActionButton/ActionButton.namespace.ts +14 -0
  244. package/src/components/ActionButton/ActionButton.tsx +98 -0
  245. package/src/components/ActionButton/index.ts +16 -0
  246. package/src/components/ActionChip/ActionChip.namespace.ts +14 -0
  247. package/src/components/ActionChip/ActionChip.tsx +54 -0
  248. package/src/components/ActionChip/index.ts +16 -0
  249. package/src/components/ActionSheet/ActionSheet.namespace.ts +28 -0
  250. package/src/components/ActionSheet/ActionSheet.tsx +150 -0
  251. package/src/components/ActionSheet/index.ts +30 -0
  252. package/src/components/Avatar/Avatar.namespace.ts +12 -0
  253. package/src/components/Avatar/Avatar.tsx +69 -0
  254. package/src/components/Avatar/index.ts +14 -0
  255. package/src/components/Badge/Badge.namespace.ts +6 -0
  256. package/src/components/Badge/Badge.tsx +21 -0
  257. package/src/components/Badge/index.ts +8 -0
  258. package/src/components/BottomSheet/BottomSheet.namespace.ts +26 -0
  259. package/src/components/BottomSheet/BottomSheet.tsx +123 -0
  260. package/src/components/BottomSheet/index.ts +28 -0
  261. package/src/components/Box/Box.tsx +303 -0
  262. package/src/components/Box/index.ts +1 -0
  263. package/src/components/Callout/Callout.namespace.ts +20 -0
  264. package/src/components/Callout/Callout.tsx +101 -0
  265. package/src/components/Callout/index.ts +22 -0
  266. package/src/components/Celcius/Celcius.tsx +9 -0
  267. package/src/components/Celcius/index.ts +4 -0
  268. package/src/components/Checkbox/Checkbox.namespace.ts +12 -0
  269. package/src/components/Checkbox/Checkbox.tsx +96 -0
  270. package/src/components/Checkbox/index.ts +14 -0
  271. package/src/components/ChipTabs/ChipTabs.namespace.ts +16 -0
  272. package/src/components/ChipTabs/ChipTabs.tsx +80 -0
  273. package/src/components/ChipTabs/index.ts +18 -0
  274. package/src/components/Columns/Columns.tsx +38 -0
  275. package/src/components/Columns/index.ts +1 -0
  276. package/src/components/ControlChip/ControlChip.namespace.ts +15 -0
  277. package/src/components/ControlChip/ControlChip.tsx +63 -0
  278. package/src/components/ControlChip/index.ts +17 -0
  279. package/src/components/Dialog/Dialog.namespace.ts +22 -0
  280. package/src/components/Dialog/Dialog.tsx +94 -0
  281. package/src/components/Dialog/index.ts +24 -0
  282. package/src/components/ExtendedActionSheet/ExtendedActionSheet.namespace.ts +32 -0
  283. package/src/components/ExtendedActionSheet/ExtendedActionSheet.tsx +181 -0
  284. package/src/components/ExtendedActionSheet/index.ts +34 -0
  285. package/src/components/ExtendedFab/ExtendedFab.namespace.ts +8 -0
  286. package/src/components/ExtendedFab/ExtendedFab.tsx +44 -0
  287. package/src/components/ExtendedFab/index.ts +10 -0
  288. package/src/components/Fab/Fab.namespace.ts +6 -0
  289. package/src/components/Fab/Fab.tsx +22 -0
  290. package/src/components/Fab/index.ts +8 -0
  291. package/src/components/Flex/Flex.tsx +19 -0
  292. package/src/components/Flex/index.ts +1 -0
  293. package/src/components/HelpBubble/HelpBubble.namespace.ts +25 -0
  294. package/src/components/HelpBubble/HelpBubble.tsx +158 -0
  295. package/src/components/HelpBubble/index.ts +28 -0
  296. package/src/components/Inline/Inline.tsx +18 -0
  297. package/src/components/Inline/index.ts +1 -0
  298. package/src/components/InlineBanner/InlineBanner.namespace.ts +22 -0
  299. package/src/components/InlineBanner/InlineBanner.tsx +105 -0
  300. package/src/components/InlineBanner/index.ts +24 -0
  301. package/src/components/MannerTempBadge/MannerTempBadge.namespace.ts +6 -0
  302. package/src/components/MannerTempBadge/MannerTempBadge.tsx +32 -0
  303. package/src/components/MannerTempBadge/index.ts +8 -0
  304. package/src/components/ProgressCircle/ProgressCircle.namespace.ts +8 -0
  305. package/src/components/ProgressCircle/ProgressCircle.tsx +31 -0
  306. package/src/components/ProgressCircle/index.ts +10 -0
  307. package/src/components/PullToRefresh/PullToRefresh.namespace.ts +8 -0
  308. package/src/components/PullToRefresh/PullToRefresh.tsx +25 -0
  309. package/src/components/PullToRefresh/index.ts +10 -0
  310. package/src/components/ReactionButton/ReactionButton.namespace.ts +12 -0
  311. package/src/components/ReactionButton/ReactionButton.tsx +80 -0
  312. package/src/components/ReactionButton/index.ts +14 -0
  313. package/src/components/SegmentedControl/SegmentedControl.namespace.ts +12 -0
  314. package/src/components/SegmentedControl/SegmentedControl.tsx +53 -0
  315. package/src/components/SegmentedControl/index.ts +14 -0
  316. package/src/components/SelectBox/CheckSelectBox.namespace.ts +18 -0
  317. package/src/components/SelectBox/CheckSelectBox.tsx +79 -0
  318. package/src/components/SelectBox/RadioSelectBox.namespace.ts +18 -0
  319. package/src/components/SelectBox/RadioSelectBox.tsx +73 -0
  320. package/src/components/SelectBox/index.ts +40 -0
  321. package/src/components/Skeleton/Skeleton.tsx +13 -0
  322. package/src/components/Skeleton/index.ts +1 -0
  323. package/src/components/Snackbar/Snackbar.namespace.ts +20 -0
  324. package/src/components/Snackbar/Snackbar.tsx +100 -0
  325. package/src/components/Snackbar/index.ts +32 -0
  326. package/src/components/Snackbar/useSnackbarAdapter.ts +28 -0
  327. package/src/components/Stack/Stack.tsx +8 -0
  328. package/src/components/Stack/index.ts +1 -0
  329. package/src/components/Switch/Switch.namespace.ts +12 -0
  330. package/src/components/Switch/Switch.tsx +50 -0
  331. package/src/components/Switch/index.ts +14 -0
  332. package/src/components/Tabs/Tabs.namespace.ts +20 -0
  333. package/src/components/Tabs/Tabs.tsx +94 -0
  334. package/src/components/Tabs/index.ts +22 -0
  335. package/src/components/Text/Text.tsx +139 -0
  336. package/src/components/Text/index.tsx +1 -0
  337. package/src/components/TextButton/TextButton.namespace.ts +10 -0
  338. package/src/components/TextButton/TextButton.tsx +41 -0
  339. package/src/components/TextButton/index.ts +12 -0
  340. package/src/components/TextField/TextField.namespace.tsx +38 -0
  341. package/src/components/TextField/TextField.tsx +258 -0
  342. package/src/components/TextField/index.tsx +40 -0
  343. package/src/components/ToggleButton/ToggleButton.namespace.ts +12 -0
  344. package/src/components/ToggleButton/ToggleButton.tsx +75 -0
  345. package/src/components/ToggleButton/index.ts +14 -0
  346. package/src/components/VisuallyHidden/VisuallyHidden.tsx +13 -0
  347. package/src/components/VisuallyHidden/index.tsx +1 -0
  348. package/src/components/index.ts +37 -0
  349. package/src/components/private/Icon.tsx +15 -0
  350. package/src/components/private/useDismissible.tsx +86 -0
  351. package/src/components/private/usePendingButton.tsx +45 -0
  352. package/src/index.tsx +1 -0
  353. package/src/primitive.ts +11 -0
  354. package/src/utils/createStyleContext.tsx +125 -0
  355. package/src/utils/createWithStateProps.tsx +28 -0
  356. package/src/vars.ts +1 -0
@@ -0,0 +1,12 @@
1
+ export {
2
+ ToggleButtonLabel as Label,
3
+ ToggleButtonPrefixIcon as PrefixIcon,
4
+ ToggleButtonProgressIndicator as ProgressIndicator,
5
+ ToggleButtonRoot as Root,
6
+ ToggleButtonSuffixIcon as SuffixIcon,
7
+ type ToggleButtonLabelProps as LabelProps,
8
+ type ToggleButtonPrefixIconProps as PrefixIconProps,
9
+ type ToggleButtonProgressIndicatorProps as ProgressIndicatorProps,
10
+ type ToggleButtonRootProps as RootProps,
11
+ type ToggleButtonSuffixIconProps as SuffixIconProps,
12
+ } from "./ToggleButton";
@@ -0,0 +1,75 @@
1
+ import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
2
+ import { Toggle as TogglePrimitive, useToggleContext } from "@seed-design/react-toggle";
3
+ import { toggleButton, type ToggleButtonVariantProps } from "@seed-design/recipe/toggleButton";
4
+ import clsx from "clsx";
5
+ import * as React from "react";
6
+ import { createStyleContext } from "../../utils/createStyleContext";
7
+ import { createWithStateProps } from "../../utils/createWithStateProps";
8
+ import { Icon, type IconProps } from "../private/Icon";
9
+ import {
10
+ PendingButtonProvider,
11
+ usePendingButton,
12
+ usePendingButtonContext,
13
+ type UsePendingButtonProps,
14
+ } from "../private/usePendingButton";
15
+
16
+ const { ClassNamesProvider, withContext } = createStyleContext(toggleButton);
17
+ const withStateProps = createWithStateProps([usePendingButtonContext, useToggleContext]);
18
+
19
+ export interface ToggleButtonRootProps
20
+ extends ToggleButtonVariantProps,
21
+ UsePendingButtonProps,
22
+ TogglePrimitive.RootProps {}
23
+
24
+ export const ToggleButtonRoot = React.forwardRef<HTMLButtonElement, ToggleButtonRootProps>(
25
+ ({ variant = "brandSolid", size = "small", loading = false, className, ...otherProps }, ref) => {
26
+ const classNames = toggleButton({ variant, size });
27
+ const api = usePendingButton({ loading, disabled: otherProps.disabled });
28
+
29
+ return (
30
+ <ClassNamesProvider value={classNames}>
31
+ <PendingButtonProvider value={api}>
32
+ <TogglePrimitive.Root
33
+ ref={ref}
34
+ className={clsx(classNames.root, className)}
35
+ {...api.stateProps}
36
+ {...otherProps}
37
+ />
38
+ </PendingButtonProvider>
39
+ </ClassNamesProvider>
40
+ );
41
+ },
42
+ );
43
+ ToggleButtonRoot.displayName = "ToggleButton";
44
+
45
+ export interface ToggleButtonLabelProps
46
+ extends PrimitiveProps,
47
+ React.HTMLAttributes<HTMLSpanElement> {}
48
+
49
+ export const ToggleButtonLabel = withContext<HTMLSpanElement, ToggleButtonLabelProps>(
50
+ withStateProps(Primitive.span),
51
+ "label",
52
+ );
53
+
54
+ export interface ToggleButtonPrefixIconProps extends IconProps {}
55
+
56
+ export const ToggleButtonPrefixIcon = withContext<SVGSVGElement, ToggleButtonPrefixIconProps>(
57
+ withStateProps(Icon),
58
+ "prefixIcon",
59
+ );
60
+
61
+ export interface ToggleButtonSuffixIconProps extends IconProps {}
62
+
63
+ export const ToggleButtonSuffixIcon = withContext<SVGSVGElement, ToggleButtonSuffixIconProps>(
64
+ withStateProps(Icon),
65
+ "suffixIcon",
66
+ );
67
+
68
+ export interface ToggleButtonProgressIndicatorProps
69
+ extends PrimitiveProps,
70
+ React.HTMLAttributes<HTMLDivElement> {}
71
+
72
+ export const ToggleButtonProgressIndicator = withContext<
73
+ HTMLDivElement,
74
+ ToggleButtonProgressIndicatorProps
75
+ >(withStateProps(Primitive.div), "progressIndicator");
@@ -0,0 +1,14 @@
1
+ export {
2
+ ToggleButtonLabel,
3
+ ToggleButtonPrefixIcon,
4
+ ToggleButtonProgressIndicator,
5
+ ToggleButtonRoot,
6
+ ToggleButtonSuffixIcon,
7
+ type ToggleButtonLabelProps,
8
+ type ToggleButtonPrefixIconProps,
9
+ type ToggleButtonProgressIndicatorProps,
10
+ type ToggleButtonRootProps,
11
+ type ToggleButtonSuffixIconProps,
12
+ } from "./ToggleButton";
13
+
14
+ export * as ToggleButton from "./ToggleButton.namespace";
@@ -0,0 +1,13 @@
1
+ import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
2
+ import { visuallyHidden } from "@seed-design/recipe/visuallyHidden";
3
+ import type * as React from "react";
4
+ import { createStyleContext } from "../../utils/createStyleContext";
5
+
6
+ const { withProvider } = createStyleContext(visuallyHidden);
7
+
8
+ export interface VisuallyHiddenProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {}
9
+
10
+ export const VisuallyHidden = withProvider<HTMLDivElement, VisuallyHiddenProps>(
11
+ Primitive.div,
12
+ "root",
13
+ );
@@ -0,0 +1 @@
1
+ export { VisuallyHidden, type VisuallyHiddenProps } from "./VisuallyHidden";
@@ -0,0 +1,37 @@
1
+ export * from "./ActionButton";
2
+ export * from "./ActionChip";
3
+ export * from "./ActionSheet";
4
+ export * from "./Avatar";
5
+ export * from "./Badge";
6
+ export * from "./BottomSheet";
7
+ export * from "./Box";
8
+ export * from "./Callout";
9
+ export * from "./Celcius";
10
+ export * from "./Checkbox";
11
+ export * from "./ChipTabs";
12
+ export * from "./Columns";
13
+ export * from "./ControlChip";
14
+ export * from "./Dialog";
15
+ export * from "./ExtendedActionSheet";
16
+ export * from "./ExtendedFab";
17
+ export * from "./Fab";
18
+ export * from "./Flex";
19
+ export * from "./HelpBubble";
20
+ export * from "./Inline";
21
+ export * from "./InlineBanner";
22
+ export * from "./MannerTempBadge";
23
+ export * from "./ProgressCircle";
24
+ export * from "./PullToRefresh";
25
+ export * from "./ReactionButton";
26
+ export * from "./SegmentedControl";
27
+ export * from "./SelectBox";
28
+ export * from "./Skeleton";
29
+ export * from "./Snackbar";
30
+ export * from "./Stack";
31
+ export * from "./Switch";
32
+ export * from "./Tabs";
33
+ export * from "./Text";
34
+ export * from "./TextButton";
35
+ export * from "./TextField";
36
+ export * from "./ToggleButton";
37
+ export * from "./VisuallyHidden";
@@ -0,0 +1,15 @@
1
+ import { Primitive } from "@seed-design/react-primitive";
2
+ import { forwardRef } from "react";
3
+
4
+ export interface IconProps {
5
+ svg: React.ReactNode;
6
+ }
7
+
8
+ export const Icon = forwardRef<SVGSVGElement, IconProps>(({ svg, ...otherProps }, ref) => {
9
+ return (
10
+ // biome-ignore lint/a11y/noSvgWithoutTitle: SVG is used as a child of a button element, so it is not required to have a title
11
+ <Primitive.svg ref={ref} aria-hidden asChild {...otherProps}>
12
+ {svg}
13
+ </Primitive.svg>
14
+ );
15
+ });
@@ -0,0 +1,86 @@
1
+ import { useControllableState } from "@radix-ui/react-use-controllable-state";
2
+ import { buttonProps, elementProps, mergeProps } from "@seed-design/dom-utils";
3
+ import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
4
+ import * as React from "react";
5
+
6
+ export interface UseDismissibleProps {
7
+ defaultOpen?: boolean;
8
+ open?: boolean;
9
+ onDismiss?: () => void;
10
+ }
11
+
12
+ export type UseDismissibleReturn = ReturnType<typeof useDismissible>;
13
+
14
+ export function useDismissible(props: UseDismissibleProps) {
15
+ const [open = true, setOpen] = useControllableState({
16
+ prop: props.open,
17
+ defaultProp: props.defaultOpen,
18
+ onChange: (open) => {
19
+ if (!open) {
20
+ props.onDismiss?.();
21
+ }
22
+ },
23
+ });
24
+
25
+ const dismiss = React.useCallback(() => setOpen(false), [setOpen]);
26
+
27
+ return {
28
+ open,
29
+ dismiss,
30
+
31
+ rootProps: elementProps({}),
32
+
33
+ dismissButtonProps: buttonProps({
34
+ onClick: (e) => {
35
+ if (e.defaultPrevented) return;
36
+
37
+ dismiss();
38
+ },
39
+ }),
40
+ };
41
+ }
42
+
43
+ const DismissibleContext = React.createContext<ReturnType<typeof useDismissible> | null>(null);
44
+
45
+ export const DismissibleProvider = DismissibleContext.Provider;
46
+
47
+ export const useDismissibleContext = () => {
48
+ const context = React.useContext(DismissibleContext);
49
+ if (context === null) {
50
+ throw new Error("useDismissibleContext should be used within DismissibleProvider");
51
+ }
52
+
53
+ return context;
54
+ };
55
+
56
+ export interface DismissibleRootProps
57
+ extends PrimitiveProps,
58
+ UseDismissibleProps,
59
+ React.HTMLAttributes<HTMLDivElement> {}
60
+
61
+ export const DismissibleRoot = React.forwardRef<HTMLDivElement, DismissibleRootProps>(
62
+ ({ defaultOpen, open, onDismiss, ...otherProps }, ref) => {
63
+ const api = useDismissible({ defaultOpen, open, onDismiss });
64
+
65
+ if (!api.open) return null;
66
+
67
+ return (
68
+ <DismissibleProvider value={api}>
69
+ <Primitive.div ref={ref} {...otherProps} />
70
+ </DismissibleProvider>
71
+ );
72
+ },
73
+ );
74
+
75
+ export interface DismissibleDismissButtonProps
76
+ extends PrimitiveProps,
77
+ React.HTMLAttributes<HTMLButtonElement> {}
78
+
79
+ export const DismissibleDismissButton = React.forwardRef<
80
+ HTMLButtonElement,
81
+ DismissibleDismissButtonProps
82
+ >((props, ref) => {
83
+ const { dismissButtonProps } = useDismissibleContext();
84
+
85
+ return <Primitive.button ref={ref} {...mergeProps(dismissButtonProps, props)} />;
86
+ });
@@ -0,0 +1,45 @@
1
+ import { elementProps } from "@seed-design/dom-utils";
2
+ import * as React from "react";
3
+
4
+ export interface UsePendingButtonProps {
5
+ /**
6
+ * 버튼에 등록된 비동기 작업이 진행 중임을 사용자에게 알립니다.
7
+ * @default false
8
+ */
9
+ loading?: boolean;
10
+
11
+ /**
12
+ * 버튼의 비활성화 여부를 나타냅니다.
13
+ * @default false
14
+ */
15
+ disabled?: boolean;
16
+ }
17
+
18
+ export type UsePendingButtonReturn = ReturnType<typeof usePendingButton>;
19
+
20
+ export function usePendingButton(props: UsePendingButtonProps) {
21
+ const { loading, disabled } = props;
22
+ const stateProps = elementProps({
23
+ "data-loading": loading ? "" : undefined,
24
+ "data-disabled": disabled ? "" : undefined,
25
+ });
26
+
27
+ return {
28
+ loading,
29
+ disabled,
30
+ stateProps,
31
+ };
32
+ }
33
+
34
+ const PendingButtonContext = React.createContext<ReturnType<typeof usePendingButton> | null>(null);
35
+
36
+ export const PendingButtonProvider = PendingButtonContext.Provider;
37
+
38
+ export const usePendingButtonContext = () => {
39
+ const context = React.useContext(PendingButtonContext);
40
+ if (context === null) {
41
+ throw new Error("usePendingButtonContext should be used within UsePendingButtonProvider");
42
+ }
43
+
44
+ return context;
45
+ };
package/src/index.tsx ADDED
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1,11 @@
1
+ export * from "@seed-design/react-avatar";
2
+ export * from "@seed-design/react-checkbox";
3
+ export * from "@seed-design/react-dialog";
4
+ export * from "@seed-design/react-popover";
5
+ export * from "@seed-design/react-progress";
6
+ export * from "@seed-design/react-pull-to-refresh";
7
+ export * from "@seed-design/react-radio-group";
8
+ export * from "@seed-design/react-snackbar";
9
+ export * from "@seed-design/react-switch";
10
+ export * from "@seed-design/react-tabs";
11
+ export * from "@seed-design/react-toggle";
@@ -0,0 +1,125 @@
1
+ import clsx from "clsx";
2
+ import { createContext, forwardRef, useContext } from "react";
3
+
4
+ type Recipe<
5
+ Props extends Record<string, string | boolean | undefined>,
6
+ Classnames extends Record<string, string>,
7
+ > = ((props?: Props) => Classnames) & {
8
+ splitVariantProps: <T extends Props>(props: T) => [Props, Omit<T, keyof Props>];
9
+ };
10
+
11
+ export function createStyleContext<
12
+ Props extends Record<string, string | boolean | undefined>,
13
+ Classnames extends Record<string, string>,
14
+ >(recipe: Recipe<Props, Classnames>) {
15
+ const ClassNamesContext = createContext<Classnames | null>(null);
16
+ const PropsContext = createContext<Props | null>(null);
17
+
18
+ const ClassNamesProvider = ({
19
+ children,
20
+ value,
21
+ }: { children: React.ReactNode; value: Classnames }) => {
22
+ return <ClassNamesContext.Provider value={value}>{children}</ClassNamesContext.Provider>;
23
+ };
24
+
25
+ const PropsProvider = ({ children, value }: { children: React.ReactNode; value: Props }) => {
26
+ return <PropsContext.Provider value={value}>{children}</PropsContext.Provider>;
27
+ };
28
+
29
+ function useClassNames() {
30
+ const context = useContext(ClassNamesContext);
31
+ if (context === null) {
32
+ throw new Error(
33
+ "useClassNames must be used within a ClassNamesProvider. Did you forget to wrap your component in a ClassNamesProvider?",
34
+ );
35
+ }
36
+
37
+ return context;
38
+ }
39
+
40
+ function useProps() {
41
+ return useContext(PropsContext);
42
+ }
43
+
44
+ const withRootProvider = <P,>(
45
+ Component: React.ElementType<any>,
46
+ options?: {
47
+ defaultProps?: Partial<P>;
48
+ },
49
+ ): React.ForwardRefExoticComponent<React.PropsWithoutRef<P>> => {
50
+ const { defaultProps } = options ?? {};
51
+
52
+ const StyledComponent = (innerProps: any) => {
53
+ const props = { ...(defaultProps ?? {}), ...useProps(), ...innerProps } as Props &
54
+ React.HTMLAttributes<HTMLElement>;
55
+ const [variantProps, otherProps] = recipe.splitVariantProps(props);
56
+ const classNames = recipe(variantProps); // TODO: should we memoize this?
57
+
58
+ return (
59
+ <ClassNamesProvider value={classNames}>
60
+ <Component {...otherProps} />
61
+ </ClassNamesProvider>
62
+ );
63
+ };
64
+
65
+ // @ts-ignore
66
+ StyledComponent.displayName = Component.displayName || Component.name;
67
+
68
+ return StyledComponent as any;
69
+ };
70
+
71
+ const withProvider = <T, P>(
72
+ Component: React.ElementType<any>,
73
+ slot: keyof Classnames,
74
+ options?: {
75
+ defaultProps?: Partial<P>;
76
+ },
77
+ ): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>> => {
78
+ const { defaultProps } = options ?? {};
79
+
80
+ const StyledComponent = forwardRef<any, any>((innerProps, ref) => {
81
+ const props = { ...(defaultProps ?? {}), ...useProps(), ...innerProps } as Props &
82
+ React.HTMLAttributes<HTMLElement>;
83
+ const [variantProps, otherProps] = recipe.splitVariantProps(props);
84
+ const classNames = recipe(variantProps); // TODO: should we memoize this?
85
+ const className = classNames[slot as keyof typeof classNames];
86
+
87
+ return (
88
+ <ClassNamesProvider value={classNames}>
89
+ <Component ref={ref} {...otherProps} className={clsx(className, props.className)} />
90
+ </ClassNamesProvider>
91
+ );
92
+ });
93
+
94
+ // @ts-ignore
95
+ StyledComponent.displayName = Component.displayName || Component.name;
96
+
97
+ return StyledComponent as any;
98
+ };
99
+
100
+ const withContext = <T, P>(
101
+ Component: React.ElementType<any>,
102
+ slot?: keyof Classnames,
103
+ ): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>> => {
104
+ const StyledComponent = forwardRef<any, React.HTMLAttributes<HTMLElement>>((props, ref) => {
105
+ const classNames = useClassNames();
106
+ const className = classNames?.[slot as keyof typeof classNames];
107
+
108
+ return <Component ref={ref} {...props} className={clsx(className, props.className)} />;
109
+ });
110
+
111
+ // @ts-ignore
112
+ StyledComponent.displayName = Component.displayName || Component.name;
113
+ return StyledComponent as any;
114
+ };
115
+
116
+ return {
117
+ ClassNamesProvider,
118
+ PropsProvider,
119
+ useClassNames,
120
+ useProps,
121
+ withRootProvider,
122
+ withProvider,
123
+ withContext,
124
+ };
125
+ }
@@ -0,0 +1,28 @@
1
+ import { forwardRef } from "react";
2
+
3
+ type AtLeastOne<T> = [T, ...T[]];
4
+
5
+ export function createWithStateProps(
6
+ useContexts: AtLeastOne<
7
+ (prop?: { strict?: boolean }) => { stateProps: React.HTMLAttributes<HTMLElement> } | null
8
+ >,
9
+ options?: { strict?: boolean },
10
+ ) {
11
+ const strict = options?.strict ?? true;
12
+
13
+ return function withStateProps<P, R>(Component: React.ComponentType<P & React.RefAttributes<R>>) {
14
+ const Node = forwardRef<R, P>((props, ref) => {
15
+ const stateProps = {};
16
+ for (const useContext of useContexts) {
17
+ Object.assign(stateProps, useContext({ strict })?.stateProps);
18
+ }
19
+
20
+ // @ts-ignore
21
+ return <Component ref={ref} {...stateProps} {...props} />;
22
+ });
23
+
24
+ Node.displayName = Component.displayName || Component.name;
25
+
26
+ return Node;
27
+ };
28
+ }
package/src/vars.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "@seed-design/vars";