@studiocubics/components 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (433) hide show
  1. package/dist/Cards/Card/Card.d.ts +49 -0
  2. package/dist/Cards/Card/Card.js +45 -0
  3. package/dist/Cards/Card/Card.js.map +1 -0
  4. package/dist/Cards/Card/Card.module.css.js +4 -0
  5. package/dist/Cards/Card/Card.module.css.js.map +1 -0
  6. package/dist/Cards/CollectionItemCard/CollectionItemCard.d.ts +55 -0
  7. package/dist/Cards/CollectionItemCard/CollectionItemCard.js +48 -0
  8. package/dist/Cards/CollectionItemCard/CollectionItemCard.js.map +1 -0
  9. package/dist/Cards/CollectionItemCard/CollectionItemCard.module.css.js +4 -0
  10. package/dist/Cards/CollectionItemCard/CollectionItemCard.module.css.js.map +1 -0
  11. package/dist/Cards/CollectionItemCard/CollectionItemCardActions.d.ts +19 -0
  12. package/dist/Cards/CollectionItemCard/CollectionItemCardActions.js +34 -0
  13. package/dist/Cards/CollectionItemCard/CollectionItemCardActions.js.map +1 -0
  14. package/dist/Cards/GlassCard/GlassCard.d.ts +7 -0
  15. package/dist/Cards/GlassCard/GlassCard.js +52 -0
  16. package/dist/Cards/GlassCard/GlassCard.js.map +1 -0
  17. package/dist/Cards/GlassCard/GlassCard.module.css.js +4 -0
  18. package/dist/Cards/GlassCard/GlassCard.module.css.js.map +1 -0
  19. package/dist/Display/Accordion/Accordion.d.ts +14 -0
  20. package/dist/Display/Accordion/Accordion.js +28 -0
  21. package/dist/Display/Accordion/Accordion.js.map +1 -0
  22. package/dist/Display/Accordion/Accordion.module.css.js +4 -0
  23. package/dist/Display/Accordion/Accordion.module.css.js.map +1 -0
  24. package/dist/Display/Accordion/AccordionItem.d.ts +15 -0
  25. package/dist/Display/Accordion/AccordionItem.js +56 -0
  26. package/dist/Display/Accordion/AccordionItem.js.map +1 -0
  27. package/dist/Display/Chip/Chip.d.ts +46 -0
  28. package/dist/Display/Chip/Chip.js +43 -0
  29. package/dist/Display/Chip/Chip.js.map +1 -0
  30. package/dist/Display/Chip/Chip.module.css.js +4 -0
  31. package/dist/Display/Chip/Chip.module.css.js.map +1 -0
  32. package/dist/Display/IdentityDisplay/IdentityDisplay.d.ts +21 -0
  33. package/dist/Display/IdentityDisplay/IdentityDisplay.js +36 -0
  34. package/dist/Display/IdentityDisplay/IdentityDisplay.js.map +1 -0
  35. package/dist/Display/IdentityDisplay/IdentityDisplay.module.css.js +4 -0
  36. package/dist/Display/IdentityDisplay/IdentityDisplay.module.css.js.map +1 -0
  37. package/dist/Display/InputErrors/InputErrors.d.ts +11 -0
  38. package/dist/Display/InputErrors/InputErrors.js +25 -0
  39. package/dist/Display/InputErrors/InputErrors.js.map +1 -0
  40. package/dist/Display/InputErrors/InputErrors.module.css.js +4 -0
  41. package/dist/Display/InputErrors/InputErrors.module.css.js.map +1 -0
  42. package/dist/Display/Kbd/Kbd.d.ts +8 -0
  43. package/dist/Display/Kbd/Kbd.js +19 -0
  44. package/dist/Display/Kbd/Kbd.js.map +1 -0
  45. package/dist/Display/Kbd/Kbd.module.css.js +4 -0
  46. package/dist/Display/Kbd/Kbd.module.css.js.map +1 -0
  47. package/dist/Display/Kbd/buttonList.d.ts +324 -0
  48. package/dist/Display/Kbd/buttonList.js +198 -0
  49. package/dist/Display/Kbd/buttonList.js.map +1 -0
  50. package/dist/Display/LabeledValue/LabeledValue.d.ts +9 -0
  51. package/dist/Display/LabeledValue/LabeledValue.js +11 -0
  52. package/dist/Display/LabeledValue/LabeledValue.js.map +1 -0
  53. package/dist/Display/LabeledValue/LabeledValue.module.css.js +4 -0
  54. package/dist/Display/LabeledValue/LabeledValue.module.css.js.map +1 -0
  55. package/dist/Display/List/List.d.ts +50 -0
  56. package/dist/Display/List/List.js +96 -0
  57. package/dist/Display/List/List.js.map +1 -0
  58. package/dist/Display/List/List.module.css.js +4 -0
  59. package/dist/Display/List/List.module.css.js.map +1 -0
  60. package/dist/Display/PasswordStrength/PasswordStrength.d.ts +4 -0
  61. package/dist/Display/PasswordStrength/PasswordStrength.js +17 -0
  62. package/dist/Display/PasswordStrength/PasswordStrength.js.map +1 -0
  63. package/dist/Display/PasswordStrength/PasswordStrength.module.css.js +4 -0
  64. package/dist/Display/PasswordStrength/PasswordStrength.module.css.js.map +1 -0
  65. package/dist/Display/PasswordStrength/usePasswordStrength.d.ts +42 -0
  66. package/dist/Display/PasswordStrength/usePasswordStrength.js +49 -0
  67. package/dist/Display/PasswordStrength/usePasswordStrength.js.map +1 -0
  68. package/dist/Display/Skeleton/Skeleton.d.ts +8 -0
  69. package/dist/Display/Skeleton/Skeleton.js +11 -0
  70. package/dist/Display/Skeleton/Skeleton.js.map +1 -0
  71. package/dist/Display/Skeleton/Skeleton.module.css.js +4 -0
  72. package/dist/Display/Skeleton/Skeleton.module.css.js.map +1 -0
  73. package/dist/Display/Toast/Toaster.d.ts +1 -0
  74. package/dist/Display/Toast/Toaster.js +45 -0
  75. package/dist/Display/Toast/Toaster.js.map +1 -0
  76. package/dist/Display/Toast/toast.d.ts +12 -0
  77. package/dist/Display/Toast/toast.js +32 -0
  78. package/dist/Display/Toast/toast.js.map +1 -0
  79. package/dist/Display/Tooltip/Tooltip.d.ts +8 -0
  80. package/dist/Display/Tooltip/Tooltip.js +45 -0
  81. package/dist/Display/Tooltip/Tooltip.js.map +1 -0
  82. package/dist/Display/Tooltip/Tooltip.module.css.js +4 -0
  83. package/dist/Display/Tooltip/Tooltip.module.css.js.map +1 -0
  84. package/dist/Display/Tooltip/getArrowDirection.d.ts +1 -0
  85. package/dist/Display/Tooltip/getArrowDirection.js +48 -0
  86. package/dist/Display/Tooltip/getArrowDirection.js.map +1 -0
  87. package/dist/Display/Tooltip/useTooltip.d.ts +8 -0
  88. package/dist/Display/Tooltip/useTooltip.js +48 -0
  89. package/dist/Display/Tooltip/useTooltip.js.map +1 -0
  90. package/dist/Forms/ConfirmationForm/ConfirmationForm.d.ts +15 -0
  91. package/dist/Forms/ConfirmationForm/ConfirmationForm.js +12 -0
  92. package/dist/Forms/ConfirmationForm/ConfirmationForm.js.map +1 -0
  93. package/dist/Forms/ConfirmationForm/ConfirmationForm.module.css.js +4 -0
  94. package/dist/Forms/ConfirmationForm/ConfirmationForm.module.css.js.map +1 -0
  95. package/dist/Inputs/Button/Button.d.ts +83 -0
  96. package/dist/Inputs/Button/Button.js +56 -0
  97. package/dist/Inputs/Button/Button.js.map +1 -0
  98. package/dist/Inputs/Button/Button.module.css.js +4 -0
  99. package/dist/Inputs/Button/Button.module.css.js.map +1 -0
  100. package/dist/Inputs/Checkbox/Checkbox.d.ts +23 -0
  101. package/dist/Inputs/Checkbox/Checkbox.js +55 -0
  102. package/dist/Inputs/Checkbox/Checkbox.js.map +1 -0
  103. package/dist/Inputs/Checkbox/Checkbox.module.css.js +4 -0
  104. package/dist/Inputs/Checkbox/Checkbox.module.css.js.map +1 -0
  105. package/dist/Inputs/Checkbox/CheckboxGroup/CheckboxGroup.d.ts +15 -0
  106. package/dist/Inputs/Checkbox/CheckboxGroup/CheckboxGroup.js +35 -0
  107. package/dist/Inputs/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -0
  108. package/dist/Inputs/Checkbox/CheckboxGroup/CheckboxGroup.module.css.js +4 -0
  109. package/dist/Inputs/Checkbox/CheckboxGroup/CheckboxGroup.module.css.js.map +1 -0
  110. package/dist/Inputs/Checkbox/CheckboxSelectAll.d.ts +5 -0
  111. package/dist/Inputs/Checkbox/CheckboxSelectAll.js +19 -0
  112. package/dist/Inputs/Checkbox/CheckboxSelectAll.js.map +1 -0
  113. package/dist/Inputs/PasswordInput/PasswordInput.d.ts +31 -0
  114. package/dist/Inputs/PasswordInput/PasswordInput.js +45 -0
  115. package/dist/Inputs/PasswordInput/PasswordInput.js.map +1 -0
  116. package/dist/Inputs/PasswordInput/PasswordInput.module.css.js +4 -0
  117. package/dist/Inputs/PasswordInput/PasswordInput.module.css.js.map +1 -0
  118. package/dist/Inputs/Select/Select.d.ts +22 -0
  119. package/dist/Inputs/Select/Select.js +26 -0
  120. package/dist/Inputs/Select/Select.js.map +1 -0
  121. package/dist/Inputs/Select/Select.module.css.js +4 -0
  122. package/dist/Inputs/Select/Select.module.css.js.map +1 -0
  123. package/dist/Inputs/Switch/Switch.d.ts +43 -0
  124. package/dist/Inputs/Switch/Switch.js +81 -0
  125. package/dist/Inputs/Switch/Switch.js.map +1 -0
  126. package/dist/Inputs/Switch/Switch.module.css.js +4 -0
  127. package/dist/Inputs/Switch/Switch.module.css.js.map +1 -0
  128. package/dist/Inputs/TextAreaInput/TextAreaInput.d.ts +17 -0
  129. package/dist/Inputs/TextAreaInput/TextAreaInput.js +30 -0
  130. package/dist/Inputs/TextAreaInput/TextAreaInput.js.map +1 -0
  131. package/dist/Inputs/TextAreaInput/TextAreaInput.module.css.js +4 -0
  132. package/dist/Inputs/TextAreaInput/TextAreaInput.module.css.js.map +1 -0
  133. package/dist/Inputs/TextInput/TextInput.d.ts +27 -0
  134. package/dist/Inputs/TextInput/TextInput.js +23 -0
  135. package/dist/Inputs/TextInput/TextInput.js.map +1 -0
  136. package/dist/Inputs/TextInput/TextInput.module.css.js +4 -0
  137. package/dist/Inputs/TextInput/TextInput.module.css.js.map +1 -0
  138. package/dist/Inputs/ThemeToggle/ThemeToggleListItem.d.ts +16 -0
  139. package/dist/Inputs/ThemeToggle/ThemeToggleListItem.js +31 -0
  140. package/dist/Inputs/ThemeToggle/ThemeToggleListItem.js.map +1 -0
  141. package/dist/Inputs/ThemeToggle/_index.d.ts +1 -0
  142. package/dist/Layout/Dialog/Dialog.d.ts +13 -0
  143. package/dist/Layout/Dialog/Dialog.js +74 -0
  144. package/dist/Layout/Dialog/Dialog.js.map +1 -0
  145. package/dist/Layout/Dialog/Dialog.module.css.js +4 -0
  146. package/dist/Layout/Dialog/Dialog.module.css.js.map +1 -0
  147. package/dist/Layout/PageLayout/PageLayout.d.ts +28 -0
  148. package/dist/Layout/PageLayout/PageLayout.js +25 -0
  149. package/dist/Layout/PageLayout/PageLayout.js.map +1 -0
  150. package/dist/Layout/PageLayout/PageLayout.module.css.js +4 -0
  151. package/dist/Layout/PageLayout/PageLayout.module.css.js.map +1 -0
  152. package/dist/Layout/PageLayoutPagination/PageLayoutPagination.d.ts +7 -0
  153. package/dist/Layout/PageLayoutPagination/PageLayoutPagination.js +13 -0
  154. package/dist/Layout/PageLayoutPagination/PageLayoutPagination.js.map +1 -0
  155. package/dist/Layout/PageLayoutPagination/PageLayoutPagination.module.css.js +4 -0
  156. package/dist/Layout/PageLayoutPagination/PageLayoutPagination.module.css.js.map +1 -0
  157. package/dist/Layout/PageLayoutTabs/PageLayoutTabs.d.ts +14 -0
  158. package/dist/Layout/PageLayoutTabs/PageLayoutTabs.js +22 -0
  159. package/dist/Layout/PageLayoutTabs/PageLayoutTabs.js.map +1 -0
  160. package/dist/Layout/PageLayoutTabs/PageLayoutTabs.module.css.js +4 -0
  161. package/dist/Layout/PageLayoutTabs/PageLayoutTabs.module.css.js.map +1 -0
  162. package/dist/Layout/Popover/Popover.d.ts +14 -0
  163. package/dist/Layout/Popover/Popover.js +103 -0
  164. package/dist/Layout/Popover/Popover.js.map +1 -0
  165. package/dist/Layout/Popover/Popover.module.css.js +4 -0
  166. package/dist/Layout/Popover/Popover.module.css.js.map +1 -0
  167. package/dist/Layout/SectionWrapper/SectionWrapper.d.ts +14 -0
  168. package/dist/Layout/SectionWrapper/SectionWrapper.js +11 -0
  169. package/dist/Layout/SectionWrapper/SectionWrapper.js.map +1 -0
  170. package/dist/Layout/SectionWrapper/SectionWrapper.module.css.js +4 -0
  171. package/dist/Layout/SectionWrapper/SectionWrapper.module.css.js.map +1 -0
  172. package/dist/Layout/Sidebar/Sidebar.d.ts +15 -0
  173. package/dist/Layout/Sidebar/Sidebar.js +25 -0
  174. package/dist/Layout/Sidebar/Sidebar.js.map +1 -0
  175. package/dist/Layout/Sidebar/Sidebar.module.css.js +4 -0
  176. package/dist/Layout/Sidebar/Sidebar.module.css.js.map +1 -0
  177. package/dist/Layout/Sidebar/SidebarBody/SidebarBody.d.ts +2 -0
  178. package/dist/Layout/Sidebar/SidebarBody/SidebarBody.js +14 -0
  179. package/dist/Layout/Sidebar/SidebarBody/SidebarBody.js.map +1 -0
  180. package/dist/Layout/Sidebar/SidebarBody/SidebarBody.module.css.js +4 -0
  181. package/dist/Layout/Sidebar/SidebarBody/SidebarBody.module.css.js.map +1 -0
  182. package/dist/Layout/Sidebar/SidebarDrawer/SidebarDrawer.d.ts +2 -0
  183. package/dist/Layout/Sidebar/SidebarDrawer/SidebarDrawer.js +14 -0
  184. package/dist/Layout/Sidebar/SidebarDrawer/SidebarDrawer.js.map +1 -0
  185. package/dist/Layout/Sidebar/SidebarDrawer/SidebarDrawer.module.css.js +4 -0
  186. package/dist/Layout/Sidebar/SidebarDrawer/SidebarDrawer.module.css.js.map +1 -0
  187. package/dist/Layout/Sidebar/SidebarFooter/SidebarFooter.d.ts +2 -0
  188. package/dist/Layout/Sidebar/SidebarFooter/SidebarFooter.js +14 -0
  189. package/dist/Layout/Sidebar/SidebarFooter/SidebarFooter.js.map +1 -0
  190. package/dist/Layout/Sidebar/SidebarFooter/SidebarFooter.module.css.js +4 -0
  191. package/dist/Layout/Sidebar/SidebarFooter/SidebarFooter.module.css.js.map +1 -0
  192. package/dist/Layout/Sidebar/SidebarHeader/SidebarHeader.d.ts +2 -0
  193. package/dist/Layout/Sidebar/SidebarHeader/SidebarHeader.js +12 -0
  194. package/dist/Layout/Sidebar/SidebarHeader/SidebarHeader.js.map +1 -0
  195. package/dist/Layout/Sidebar/SidebarViewport/SidebarViewport.d.ts +2 -0
  196. package/dist/Layout/Sidebar/SidebarViewport/SidebarViewport.js +11 -0
  197. package/dist/Layout/Sidebar/SidebarViewport/SidebarViewport.js.map +1 -0
  198. package/dist/Layout/Sidebar/SidebarViewport/SidebarViewport.module.css.js +4 -0
  199. package/dist/Layout/Sidebar/SidebarViewport/SidebarViewport.module.css.js.map +1 -0
  200. package/dist/Layout/Table/Table.d.ts +54 -0
  201. package/dist/Layout/Table/Table.js +131 -0
  202. package/dist/Layout/Table/Table.js.map +1 -0
  203. package/dist/Layout/Table/Table.module.css.js +4 -0
  204. package/dist/Layout/Table/Table.module.css.js.map +1 -0
  205. package/dist/Layout/Table/TableFooter.d.ts +1 -0
  206. package/dist/Layout/Table/TableFooter.js +9 -0
  207. package/dist/Layout/Table/TableFooter.js.map +1 -0
  208. package/dist/Layout/Table/TableHeader.d.ts +1 -0
  209. package/dist/Layout/Table/TableHeader.js +9 -0
  210. package/dist/Layout/Table/TableHeader.js.map +1 -0
  211. package/dist/Layout/Table/tableUtils.d.ts +52 -0
  212. package/dist/Layout/Table/tableUtils.js +124 -0
  213. package/dist/Layout/Table/tableUtils.js.map +1 -0
  214. package/dist/Layout/Table/types.d.ts +43 -0
  215. package/dist/Misc/Cursor/Cursor.d.ts +1 -0
  216. package/dist/Misc/Cursor/Cursor.js +59 -0
  217. package/dist/Misc/Cursor/Cursor.js.map +1 -0
  218. package/dist/Misc/Cursor/Cursor.module.css.js +4 -0
  219. package/dist/Misc/Cursor/Cursor.module.css.js.map +1 -0
  220. package/dist/Misc/Logos.d.ts +14 -0
  221. package/dist/Misc/Logos.js +29 -0
  222. package/dist/Misc/Logos.js.map +1 -0
  223. package/dist/Misc/PoweredByBanner/PoweredByBanner.d.ts +3 -0
  224. package/dist/Misc/PoweredByBanner/PoweredByBanner.js +11 -0
  225. package/dist/Misc/PoweredByBanner/PoweredByBanner.js.map +1 -0
  226. package/dist/Misc/PoweredByBanner/PoweredByBanner.module.css.js +4 -0
  227. package/dist/Misc/PoweredByBanner/PoweredByBanner.module.css.js.map +1 -0
  228. package/dist/Misc/Ripple/Ripple.d.ts +21 -0
  229. package/dist/Misc/Ripple/Ripple.js +62 -0
  230. package/dist/Misc/Ripple/Ripple.js.map +1 -0
  231. package/dist/Misc/Ripple/Ripple.module.css.js +4 -0
  232. package/dist/Misc/Ripple/Ripple.module.css.js.map +1 -0
  233. package/dist/Misc/Spinner/Spinner.d.ts +2 -0
  234. package/dist/Misc/Spinner/Spinner.js +12 -0
  235. package/dist/Misc/Spinner/Spinner.js.map +1 -0
  236. package/dist/Misc/Spinner/Spinner.module.css.js +4 -0
  237. package/dist/Misc/Spinner/Spinner.module.css.js.map +1 -0
  238. package/dist/Misc/TransitionAnimation/TransitionAnimation.d.ts +71 -0
  239. package/dist/Misc/TransitionAnimation/TransitionAnimation.js +87 -0
  240. package/dist/Misc/TransitionAnimation/TransitionAnimation.js.map +1 -0
  241. package/dist/Misc/TransitionAnimation/TransitionAnimation.module.css.js +4 -0
  242. package/dist/Misc/TransitionAnimation/TransitionAnimation.module.css.js.map +1 -0
  243. package/dist/Navigation/Breadcrumbs/Breadcrumbs.d.ts +39 -0
  244. package/dist/Navigation/Breadcrumbs/Breadcrumbs.js +36 -0
  245. package/dist/Navigation/Breadcrumbs/Breadcrumbs.js.map +1 -0
  246. package/dist/Navigation/Breadcrumbs/Breadcrumbs.module.css.js +4 -0
  247. package/dist/Navigation/Breadcrumbs/Breadcrumbs.module.css.js.map +1 -0
  248. package/dist/Navigation/Breadcrumbs/BreadcrumbsItem.d.ts +10 -0
  249. package/dist/Navigation/Breadcrumbs/BreadcrumbsItem.js +15 -0
  250. package/dist/Navigation/Breadcrumbs/BreadcrumbsItem.js.map +1 -0
  251. package/dist/Navigation/Breadcrumbs/useBreadcrumbs.d.ts +7 -0
  252. package/dist/Navigation/Breadcrumbs/useBreadcrumbs.js +44 -0
  253. package/dist/Navigation/Breadcrumbs/useBreadcrumbs.js.map +1 -0
  254. package/dist/Navigation/Pagination/Pagination.d.ts +52 -0
  255. package/dist/Navigation/Pagination/Pagination.js +61 -0
  256. package/dist/Navigation/Pagination/Pagination.js.map +1 -0
  257. package/dist/Navigation/Pagination/Pagination.module.css.js +4 -0
  258. package/dist/Navigation/Pagination/Pagination.module.css.js.map +1 -0
  259. package/dist/Navigation/Pagination/PaginationItem.d.ts +8 -0
  260. package/dist/Navigation/Pagination/PaginationItem.js +14 -0
  261. package/dist/Navigation/Pagination/PaginationItem.js.map +1 -0
  262. package/dist/Navigation/Pagination/usePagination.d.ts +6 -0
  263. package/dist/Navigation/Pagination/usePagination.js +38 -0
  264. package/dist/Navigation/Pagination/usePagination.js.map +1 -0
  265. package/dist/Navigation/Tabs/Tab/Tab.d.ts +46 -0
  266. package/dist/Navigation/Tabs/Tab/Tab.js +70 -0
  267. package/dist/Navigation/Tabs/Tab/Tab.js.map +1 -0
  268. package/dist/Navigation/Tabs/Tab/Tab.module.css.js +4 -0
  269. package/dist/Navigation/Tabs/Tab/Tab.module.css.js.map +1 -0
  270. package/dist/Navigation/Tabs/Tabs.d.ts +12 -0
  271. package/dist/Navigation/Tabs/Tabs.js +22 -0
  272. package/dist/Navigation/Tabs/Tabs.js.map +1 -0
  273. package/dist/Navigation/Tabs/TabsBar/TabsBar.d.ts +12 -0
  274. package/dist/Navigation/Tabs/TabsBar/TabsBar.js +44 -0
  275. package/dist/Navigation/Tabs/TabsBar/TabsBar.js.map +1 -0
  276. package/dist/Navigation/Tabs/TabsBar/TabsBar.module.css.js +4 -0
  277. package/dist/Navigation/Tabs/TabsBar/TabsBar.module.css.js.map +1 -0
  278. package/dist/Typography/ClampedText/ClampedText.d.ts +38 -0
  279. package/dist/Typography/ClampedText/ClampedText.js +44 -0
  280. package/dist/Typography/ClampedText/ClampedText.js.map +1 -0
  281. package/dist/Typography/ClampedText/ClampedText.module.css.js +4 -0
  282. package/dist/Typography/ClampedText/ClampedText.module.css.js.map +1 -0
  283. package/dist/Typography/CopyableText/CopyableText.d.ts +16 -0
  284. package/dist/Typography/CopyableText/CopyableText.js +39 -0
  285. package/dist/Typography/CopyableText/CopyableText.js.map +1 -0
  286. package/dist/Typography/CopyableText/CopyableText.module.css.js +4 -0
  287. package/dist/Typography/CopyableText/CopyableText.module.css.js.map +1 -0
  288. package/dist/Typography/PageTitle/PageTitle.d.ts +9 -0
  289. package/dist/Typography/PageTitle/PageTitle.js +10 -0
  290. package/dist/Typography/PageTitle/PageTitle.js.map +1 -0
  291. package/dist/Typography/PageTitle/PageTitle.module.css.js +4 -0
  292. package/dist/Typography/PageTitle/PageTitle.module.css.js.map +1 -0
  293. package/dist/index.css +2392 -0
  294. package/dist/index.js +64 -0
  295. package/dist/index.js.map +1 -0
  296. package/package.json +4 -4
  297. package/CHANGELOG.md +0 -11
  298. package/eslint.config.js +0 -21
  299. package/src/Cards/Card/Card.module.css +0 -27
  300. package/src/Cards/Card/Card.tsx +0 -105
  301. package/src/Cards/CollectionItemCard/CollectionItemCard.module.css +0 -84
  302. package/src/Cards/CollectionItemCard/CollectionItemCard.tsx +0 -170
  303. package/src/Cards/CollectionItemCard/CollectionItemCardActions.tsx +0 -85
  304. package/src/Cards/GlassCard/GlassCard.module.css +0 -71
  305. package/src/Cards/GlassCard/GlassCard.tsx +0 -80
  306. package/src/Display/Accordion/Accordion.module.css +0 -69
  307. package/src/Display/Accordion/Accordion.tsx +0 -61
  308. package/src/Display/Accordion/AccordionItem.tsx +0 -135
  309. package/src/Display/Chip/Chip.module.css +0 -64
  310. package/src/Display/Chip/Chip.tsx +0 -105
  311. package/src/Display/IdentityDisplay/IdentityDisplay.module.css +0 -95
  312. package/src/Display/IdentityDisplay/IdentityDisplay.tsx +0 -119
  313. package/src/Display/InputErrors/InputErrors.module.css +0 -6
  314. package/src/Display/InputErrors/InputErrors.tsx +0 -52
  315. package/src/Display/Kbd/Kbd.module.css +0 -29
  316. package/src/Display/Kbd/Kbd.tsx +0 -39
  317. package/src/Display/Kbd/buttonList.tsx +0 -246
  318. package/src/Display/LabeledValue/LabeledValue.module.css +0 -32
  319. package/src/Display/LabeledValue/LabeledValue.tsx +0 -20
  320. package/src/Display/List/List.module.css +0 -143
  321. package/src/Display/List/List.tsx +0 -298
  322. package/src/Display/PasswordStrength/PasswordStrength.module.css +0 -45
  323. package/src/Display/PasswordStrength/PasswordStrength.tsx +0 -41
  324. package/src/Display/PasswordStrength/usePasswordStrength.tsx +0 -77
  325. package/src/Display/Skeleton/Skeleton.module.css +0 -54
  326. package/src/Display/Skeleton/Skeleton.tsx +0 -28
  327. package/src/Display/Toast/Toaster.tsx +0 -58
  328. package/src/Display/Toast/toast.ts +0 -44
  329. package/src/Display/Tooltip/Tooltip.module.css +0 -128
  330. package/src/Display/Tooltip/Tooltip.tsx +0 -93
  331. package/src/Display/Tooltip/getArrowDirection.ts +0 -55
  332. package/src/Display/Tooltip/useTooltip.tsx +0 -63
  333. package/src/Forms/ConfirmationForm/ConfirmationForm.module.css +0 -23
  334. package/src/Forms/ConfirmationForm/ConfirmationForm.tsx +0 -60
  335. package/src/Inputs/Button/Button.module.css +0 -131
  336. package/src/Inputs/Button/Button.tsx +0 -178
  337. package/src/Inputs/Checkbox/Checkbox.module.css +0 -77
  338. package/src/Inputs/Checkbox/Checkbox.tsx +0 -191
  339. package/src/Inputs/Checkbox/CheckboxGroup/CheckboxGroup.module.css +0 -10
  340. package/src/Inputs/Checkbox/CheckboxGroup/CheckboxGroup.tsx +0 -83
  341. package/src/Inputs/Checkbox/CheckboxSelectAll.tsx +0 -34
  342. package/src/Inputs/PasswordInput/PasswordInput.module.css +0 -111
  343. package/src/Inputs/PasswordInput/PasswordInput.tsx +0 -229
  344. package/src/Inputs/Select/Select.module.css +0 -138
  345. package/src/Inputs/Select/Select.tsx +0 -136
  346. package/src/Inputs/Switch/Switch.module.css +0 -119
  347. package/src/Inputs/Switch/Switch.tsx +0 -195
  348. package/src/Inputs/TextAreaInput/TextAreaInput.module.css +0 -65
  349. package/src/Inputs/TextAreaInput/TextAreaInput.tsx +0 -97
  350. package/src/Inputs/TextInput/TextInput.module.css +0 -112
  351. package/src/Inputs/TextInput/TextInput.tsx +0 -142
  352. package/src/Inputs/ThemeToggle/ThemeToggleListItem.tsx +0 -80
  353. package/src/Inputs/ThemeToggle/_index.ts +0 -1
  354. package/src/Layout/Dialog/Dialog.module.css +0 -15
  355. package/src/Layout/Dialog/Dialog.tsx +0 -115
  356. package/src/Layout/PageLayout/PageLayout.module.css +0 -20
  357. package/src/Layout/PageLayout/PageLayout.tsx +0 -79
  358. package/src/Layout/PageLayoutPagination/PageLayoutPagination.module.css +0 -5
  359. package/src/Layout/PageLayoutPagination/PageLayoutPagination.tsx +0 -40
  360. package/src/Layout/PageLayoutTabs/PageLayoutTabs.module.css +0 -3
  361. package/src/Layout/PageLayoutTabs/PageLayoutTabs.tsx +0 -62
  362. package/src/Layout/Popover/Popover.module.css +0 -9
  363. package/src/Layout/Popover/Popover.tsx +0 -145
  364. package/src/Layout/SectionWrapper/SectionWrapper.module.css +0 -31
  365. package/src/Layout/SectionWrapper/SectionWrapper.tsx +0 -62
  366. package/src/Layout/Sidebar/Sidebar.module.css +0 -17
  367. package/src/Layout/Sidebar/Sidebar.tsx +0 -39
  368. package/src/Layout/Sidebar/SidebarBody/SidebarBody.module.css +0 -31
  369. package/src/Layout/Sidebar/SidebarBody/SidebarBody.tsx +0 -18
  370. package/src/Layout/Sidebar/SidebarDrawer/SidebarDrawer.module.css +0 -20
  371. package/src/Layout/Sidebar/SidebarDrawer/SidebarDrawer.tsx +0 -19
  372. package/src/Layout/Sidebar/SidebarFooter/SidebarFooter.module.css +0 -35
  373. package/src/Layout/Sidebar/SidebarFooter/SidebarFooter.tsx +0 -19
  374. package/src/Layout/Sidebar/SidebarHeader/SidebarHeader.tsx +0 -14
  375. package/src/Layout/Sidebar/SidebarViewport/SidebarViewport.module.css +0 -12
  376. package/src/Layout/Sidebar/SidebarViewport/SidebarViewport.tsx +0 -11
  377. package/src/Layout/Table/Table.module.css +0 -46
  378. package/src/Layout/Table/Table.tsx +0 -222
  379. package/src/Layout/Table/TableFooter.tsx +0 -4
  380. package/src/Layout/Table/TableHeader.tsx +0 -4
  381. package/src/Layout/Table/tableUtils.ts +0 -142
  382. package/src/Layout/Table/types.ts +0 -48
  383. package/src/Misc/Cursor/Cursor.module.css +0 -31
  384. package/src/Misc/Cursor/Cursor.tsx +0 -77
  385. package/src/Misc/Logos.tsx +0 -230
  386. package/src/Misc/PoweredByBanner/PoweredByBanner.module.css +0 -20
  387. package/src/Misc/PoweredByBanner/PoweredByBanner.tsx +0 -17
  388. package/src/Misc/Ripple/Ripple.module.css +0 -25
  389. package/src/Misc/Ripple/Ripple.tsx +0 -126
  390. package/src/Misc/Spinner/Spinner.module.css +0 -38
  391. package/src/Misc/Spinner/Spinner.tsx +0 -36
  392. package/src/Misc/TransitionAnimation/TransitionAnimation.module.css +0 -131
  393. package/src/Misc/TransitionAnimation/TransitionAnimation.tsx +0 -166
  394. package/src/Navigation/Breadcrumbs/Breadcrumbs.module.css +0 -22
  395. package/src/Navigation/Breadcrumbs/Breadcrumbs.tsx +0 -127
  396. package/src/Navigation/Breadcrumbs/BreadcrumbsItem.tsx +0 -31
  397. package/src/Navigation/Breadcrumbs/useBreadcrumbs.tsx +0 -74
  398. package/src/Navigation/Pagination/Pagination.module.css +0 -41
  399. package/src/Navigation/Pagination/Pagination.tsx +0 -187
  400. package/src/Navigation/Pagination/PaginationItem.tsx +0 -28
  401. package/src/Navigation/Pagination/usePagination.tsx +0 -65
  402. package/src/Navigation/Tabs/Tab/Tab.module.css +0 -43
  403. package/src/Navigation/Tabs/Tab/Tab.tsx +0 -155
  404. package/src/Navigation/Tabs/Tabs.tsx +0 -37
  405. package/src/Navigation/Tabs/TabsBar/TabsBar.module.css +0 -47
  406. package/src/Navigation/Tabs/TabsBar/TabsBar.tsx +0 -92
  407. package/src/Typography/ClampedText/ClampedText.module.css +0 -5
  408. package/src/Typography/ClampedText/ClampedText.tsx +0 -77
  409. package/src/Typography/CopyableText/CopyableText.module.css +0 -21
  410. package/src/Typography/CopyableText/CopyableText.tsx +0 -120
  411. package/src/Typography/PageTitle/PageTitle.module.css +0 -47
  412. package/src/Typography/PageTitle/PageTitle.tsx +0 -35
  413. package/src/declaration.d.ts +0 -4
  414. package/tsconfig.json +0 -32
  415. /package/{src/Cards/CollectionItemCard/_index.ts → dist/Cards/CollectionItemCard/_index.d.ts} +0 -0
  416. /package/{src/Cards/_index.ts → dist/Cards/_index.d.ts} +0 -0
  417. /package/{src/Display/Accordion/_index.ts → dist/Display/Accordion/_index.d.ts} +0 -0
  418. /package/{src/Display/Kbd/_index.ts → dist/Display/Kbd/_index.d.ts} +0 -0
  419. /package/{src/Display/Toast/_index.ts → dist/Display/Toast/_index.d.ts} +0 -0
  420. /package/{src/Display/_index.ts → dist/Display/_index.d.ts} +0 -0
  421. /package/{src/Forms/_index.ts → dist/Forms/_index.d.ts} +0 -0
  422. /package/{src/Inputs/Checkbox/_index.ts → dist/Inputs/Checkbox/_index.d.ts} +0 -0
  423. /package/{src/Inputs/_index.ts → dist/Inputs/_index.d.ts} +0 -0
  424. /package/{src/Layout/Sidebar/_index.ts → dist/Layout/Sidebar/_index.d.ts} +0 -0
  425. /package/{src/Layout/Table/_index.ts → dist/Layout/Table/_index.d.ts} +0 -0
  426. /package/{src/Layout/_index.ts → dist/Layout/_index.d.ts} +0 -0
  427. /package/{src/Misc/_index.ts → dist/Misc/_index.d.ts} +0 -0
  428. /package/{src/Navigation/Breadcrumbs/_index.ts → dist/Navigation/Breadcrumbs/_index.d.ts} +0 -0
  429. /package/{src/Navigation/Pagination/_index.ts → dist/Navigation/Pagination/_index.d.ts} +0 -0
  430. /package/{src/Navigation/Tabs/_index.ts → dist/Navigation/Tabs/_index.d.ts} +0 -0
  431. /package/{src/Navigation/_index.ts → dist/Navigation/_index.d.ts} +0 -0
  432. /package/{src/Typography/_index.ts → dist/Typography/_index.d.ts} +0 -0
  433. /package/{src/index.ts → dist/index.d.ts} +0 -0
@@ -1,178 +0,0 @@
1
- /**
2
- * Button is love button is life
3
- */
4
- "use client";
5
-
6
- import type {
7
- PolymorphicComponentProps,
8
- PolymorphicComponentType,
9
- } from "@studiocubics/types";
10
- import {
11
- type ComponentProps,
12
- type CSSProperties,
13
- type ElementType,
14
- type ReactNode,
15
- } from "react";
16
- import {
17
- eventWithRipple,
18
- useRipple,
19
- type UseRippleProps,
20
- } from "../../Misc/Ripple/Ripple";
21
- import { cn } from "@studiocubics/utils";
22
- import styles from "./Button.module.css";
23
-
24
- /**
25
- * Props specific to the Button component.
26
- *
27
- * These extend the intrinsic element props of whatever element is passed via `as`.
28
- * @group button
29
- * @category inputs
30
- */
31
- export interface ButtonBaseProps {
32
- /** Renders an icon at the beginning of the button. */
33
- startIcon?: ReactNode;
34
-
35
- /** Renders an icon at the end of the button. */
36
- endIcon?: ReactNode;
37
-
38
- /** Marks the button as selected. */
39
- selected?: boolean;
40
-
41
- /** Visual style variant. */
42
- variant?: "contained" | "text" | "outlined";
43
-
44
- /** Expands width to 100%. */
45
- fullWidth?: boolean;
46
-
47
- /** Force a 1:1 aspect ratio. */
48
- square?: boolean;
49
-
50
- /** Button size. */
51
- size?: "sm" | "md" | "lg";
52
-
53
- /** Overrides the CSS `position` property of the root element. */
54
- position?: CSSProperties["position"];
55
-
56
- color?: "primary" | "secondary" | "error";
57
- /**
58
- * Slot props for customizing internal elements.
59
- */
60
- slotProps?: {
61
- /** Props for the ripple effect. */
62
- ripple?: UseRippleProps;
63
-
64
- /** Wrapper span for the start icon. */
65
- startIcon?: ComponentProps<"span">;
66
-
67
- /** Wrapper span for the end icon. */
68
- endIcon?: ComponentProps<"span">;
69
- };
70
- }
71
- const defaultElement = "button";
72
- type DefaultElement = typeof defaultElement;
73
- /**
74
- * Polymorphic props for the Button component.
75
- *
76
- * `C` defines the element type rendered by the component (e.g. `"button"`, `"a"`, `"div"`).
77
- * All intrinsic props for `C` are supported unless overridden by `ButtonBaseProps`.
78
- *
79
- * @group button
80
- * @category inputs
81
- */
82
- export type ButtonProps<C extends ElementType = DefaultElement> =
83
- PolymorphicComponentProps<C, ButtonBaseProps>;
84
-
85
- /**
86
- * Base implementation for the Button component.
87
- *
88
- * This is a polymorphic component that defaults to rendering a `<button>`.
89
- * Use the `as` prop to change the underlying element.
90
- *
91
- * @typeParam C - The intrinsic or custom element type to render.
92
- *
93
- * @group button
94
- * @category inputs
95
- */
96
- export function ButtonBase<C extends ElementType = DefaultElement>(
97
- props: ButtonProps<C>
98
- ) {
99
- const {
100
- as,
101
- className,
102
- children,
103
- variant = "text",
104
- size = "md",
105
- startIcon,
106
- color,
107
- endIcon,
108
- square,
109
- fullWidth = false,
110
- onTouchStart,
111
- onClick,
112
- position,
113
- slotProps: _slotProps,
114
- ...restProps
115
- } = props as ButtonProps<DefaultElement>;
116
- const slotProps: NonNullable<ButtonBaseProps["slotProps"]> = _slotProps ?? {};
117
- const Component = (as || defaultElement) as ElementType;
118
- const { rippleElements, createRipple } = useRipple(slotProps.ripple);
119
-
120
- const componentProps = {
121
- className: cn(
122
- className,
123
- styles.root,
124
- square ? styles.square : "",
125
- fullWidth ? styles.fullWidth : "",
126
- position ? styles[`position_${position}`] : "",
127
- styles[`size_${size}`],
128
- styles[variant]
129
- ),
130
- onTouchStart: eventWithRipple(createRipple, onTouchStart),
131
- onClick: eventWithRipple(createRipple, onClick),
132
- "data-color": color,
133
- ...restProps,
134
- };
135
-
136
- return (
137
- <Component {...componentProps}>
138
- {rippleElements}
139
- {startIcon && (
140
- <span
141
- {...slotProps.startIcon}
142
- className={cn(styles.iconContainer, slotProps.startIcon?.className)}
143
- >
144
- {startIcon}
145
- </span>
146
- )}
147
- {children}
148
- {endIcon && (
149
- <span
150
- {...slotProps.endIcon}
151
- className={cn(styles.iconContainer, slotProps.endIcon?.className)}
152
- >
153
- {endIcon}
154
- </span>
155
- )}
156
- </Component>
157
- );
158
- }
159
- ButtonBase.displayName = "Button";
160
-
161
- /**
162
- * A polymorphic button component.
163
- *
164
- * By default it renders a `<button>`, but any element can be used via the `as` prop:
165
- *
166
- * ```tsx
167
- * <Button as="a" href="/docs">Read docs</Button>
168
- * ```
169
- *
170
- * Supports variants, sizes, icons, and ripple effects.
171
- *
172
- * @group button
173
- * @category inputs
174
- */
175
- export const Button = ButtonBase as PolymorphicComponentType<
176
- ButtonBaseProps,
177
- DefaultElement
178
- >;
@@ -1,77 +0,0 @@
1
- .root {
2
- --input-border: var(--color-outline);
3
- --input-color: var(--color-on-surface);
4
- --input-fs: var(--fs-body2);
5
- --input-background: var(--color-surface);
6
- --input-focus-background: var(--color-background);
7
- --input-checked-color: var(--color-surface);
8
- --input-checked-background: var(--color-on-surface);
9
- --input-indeterminate-color: var(--color-surface);
10
- --input-indeterminate-background: var(--color-on-surface);
11
- display: flex;
12
- align-items: center;
13
- gap: var(--spacing-gap-2);
14
- }
15
-
16
- .inputWrapper {
17
- position: relative;
18
- height: fit-content;
19
- display: flex;
20
- border-radius: var(--shape-br-xs);
21
- overflow: hidden;
22
-
23
- & > input[type="checkbox"] {
24
- font: inherit;
25
- color: var(--input-color);
26
- background: var(--input-background);
27
- width: var(--spacing-gap-4);
28
- height: var(--spacing-gap-4);
29
- border: 2.3px solid var(--input-border);
30
- border-radius: inherit;
31
- cursor: pointer;
32
- transition: all var(--transition-time) var(--transition-tf);
33
- }
34
-
35
- &:has(input[type="checkbox"]:checked) {
36
- --input-color: var(--input-checked-color);
37
- --input-background: var(--input-checked-background);
38
- }
39
-
40
- &:has(input[type="checkbox"]:indeterminate) {
41
- --input-color: var(--input-indeterminate-color);
42
- --input-background: var(--input-indeterminate-background);
43
- }
44
- }
45
- .inputWrapper > span {
46
- position: absolute;
47
- inset: 0;
48
- color: var(--input-color);
49
- pointer-events: none;
50
- height: 100%;
51
- & > svg {
52
- position: absolute;
53
- }
54
- }
55
- .show {
56
- display: block;
57
- /* opacity: 1; */
58
- }
59
- .hide {
60
- display: none;
61
- }
62
- .show path {
63
- stroke-dasharray: 45; /* path length, adjust per path */
64
- stroke-dashoffset: 45; /* start hidden */
65
- animation: draw-check var(--transition-time) var(--transition-tf) forwards;
66
- }
67
- .hide path {
68
- animation: draw-check var(--transition-time) var(--transition-tf) reverse;
69
- }
70
- @keyframes draw-check {
71
- to {
72
- stroke-dashoffset: 0; /* reveal path */
73
- }
74
- }
75
- .label {
76
- cursor: pointer;
77
- }
@@ -1,191 +0,0 @@
1
- "use client";
2
-
3
- import {
4
- type ComponentProps,
5
- type ReactElement,
6
- useContext,
7
- useEffect,
8
- useRef,
9
- useState,
10
- } from "react";
11
- import { CheckboxGroupContext } from "./CheckboxGroup/CheckboxGroup";
12
-
13
- import { cn } from "@studiocubics/utils";
14
- import styles from "./Checkbox.module.css";
15
- import {
16
- eventWithRipple,
17
- useRipple,
18
- type UseRippleProps,
19
- } from "../../Misc/Ripple/Ripple";
20
-
21
- interface CheckboxProps
22
- extends Omit<ComponentProps<"input">, "onChange" | "type"> {
23
- label?: string;
24
- checked?: boolean;
25
- indeterminate?: boolean;
26
- onChange?: (
27
- event: React.ChangeEvent<HTMLInputElement>,
28
- checked: boolean,
29
- ) => void;
30
- checkedIcon?: ReactElement<
31
- Required<Pick<CheckboxProps, "checked">> & ComponentProps<"svg">
32
- >;
33
- indeterminateIcon?: ReactElement<
34
- Required<Pick<CheckboxProps, "indeterminate">> & ComponentProps<"svg">
35
- >;
36
- slotProps?: {
37
- ripple?: UseRippleProps;
38
- startIcon?: ComponentProps<"span">;
39
- endIcon?: ComponentProps<"span">;
40
- root?: ComponentProps<"div">;
41
- inputWrapper?: ComponentProps<"div">;
42
- label?: ComponentProps<"label">;
43
- error?: ComponentProps<"p">;
44
- };
45
- /** INTERNAL: prevent group registration */
46
- skipGroup?: boolean;
47
- // TODO add size
48
- // TODO add color
49
- }
50
-
51
- export function Checkbox(props: CheckboxProps) {
52
- const {
53
- label,
54
- checked,
55
- indeterminate = false,
56
- skipGroup,
57
- checkedIcon,
58
- indeterminateIcon,
59
- slotProps = {},
60
- "aria-label": ariaLabel,
61
- onChange,
62
- onTouchStart,
63
- onClick,
64
- ...inputProps
65
- } = props;
66
- const group = useContext(CheckboxGroupContext);
67
- const [index, setIndex] = useState<number | null>(null);
68
- const [selfChecked, setSelfChecked] = useState(false);
69
-
70
- const inputRef = useRef<HTMLInputElement>(null);
71
- const isRegistered = useRef(false);
72
-
73
- const { rippleElements, createRipple } = useRipple();
74
-
75
- const isChecked =
76
- group && !skipGroup && index !== null
77
- ? group.values[index]
78
- : (checked ?? selfChecked);
79
-
80
- const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
81
- const next = e.target.checked;
82
- if (group && !skipGroup && index !== null) {
83
- group.update(index, next);
84
- } else {
85
- setSelfChecked(next);
86
- }
87
- onChange?.(e, next);
88
- };
89
- // Register with group if present
90
- useEffect(() => {
91
- if (!group || skipGroup || isRegistered.current) return;
92
- isRegistered.current = true;
93
- setIndex(group.register());
94
- }, [group, skipGroup, index]);
95
-
96
- // Set indeterminate state
97
- useEffect(() => {
98
- if (inputRef.current) {
99
- inputRef.current.indeterminate = indeterminate;
100
- }
101
- }, [indeterminate]);
102
-
103
- return (
104
- <div
105
- {...slotProps.root}
106
- className={cn(styles.root, slotProps.root?.className)}
107
- >
108
- <div
109
- {...slotProps.inputWrapper}
110
- className={cn(styles.inputWrapper, slotProps.inputWrapper?.className)}
111
- >
112
- {rippleElements}
113
- <input
114
- ref={inputRef}
115
- type="checkbox"
116
- checked={isChecked}
117
- aria-checked={isChecked ?? false}
118
- aria-label={ariaLabel || label}
119
- onChange={handleChange}
120
- id={label}
121
- onTouchStart={eventWithRipple(createRipple, onTouchStart)}
122
- onClick={eventWithRipple(createRipple, onClick)}
123
- {...inputProps}
124
- />
125
- <span>
126
- {checkedIcon ?? <CheckboxCheckedIcon checked={isChecked} />}
127
- {indeterminateIcon ?? (
128
- <CheckboxIndeterminateIcon indeterminate={indeterminate} />
129
- )}
130
- </span>
131
- </div>
132
- {label && (
133
- <label
134
- {...slotProps.label}
135
- htmlFor={label}
136
- className={cn(slotProps.label?.className, styles.label)}
137
- >
138
- {label}
139
- </label>
140
- )}
141
- </div>
142
- );
143
- }
144
- function CheckboxCheckedIcon(
145
- props: Required<Pick<CheckboxProps, "checked">> & ComponentProps<"svg">,
146
- ) {
147
- const { checked, className, ...rest } = props;
148
- return (
149
- <svg
150
- {...rest}
151
- xmlns="http://www.w3.org/2000/svg"
152
- viewBox="0 0 24 24"
153
- fill="none"
154
- stroke="currentColor"
155
- strokeWidth="2.3"
156
- strokeLinecap="round"
157
- strokeLinejoin="round"
158
- className={cn(
159
- checked ? styles.show : styles.hide,
160
- styles.checked,
161
- className,
162
- )}
163
- >
164
- <path d="M4 12 9 17l11 -11" />
165
- </svg>
166
- );
167
- }
168
-
169
- function CheckboxIndeterminateIcon(
170
- props: Required<Pick<CheckboxProps, "indeterminate">> & ComponentProps<"svg">,
171
- ) {
172
- const { indeterminate, className, ...rest } = props;
173
- return (
174
- <svg
175
- {...rest}
176
- viewBox="0 0 24 24"
177
- xmlns="http://www.w3.org/2000/svg"
178
- className={cn(
179
- indeterminate ? styles.show : styles.hide,
180
- styles.indeterminate,
181
- className,
182
- )}
183
- stroke="currentColor"
184
- strokeWidth="2.3"
185
- strokeLinecap="round"
186
- strokeLinejoin="round"
187
- >
188
- <path d="M5 12h14" />
189
- </svg>
190
- );
191
- }
@@ -1,10 +0,0 @@
1
- .root {
2
- display: flex;
3
- flex-direction: column;
4
- gap: var(--spacing-gap-2);
5
- padding-top: var(--spacing-gap-3);
6
- }
7
- .legend {
8
- font-weight: bold;
9
- font-family: var(--font-h);
10
- }
@@ -1,83 +0,0 @@
1
- "use client";
2
-
3
- import {
4
- createContext,
5
- type ReactNode,
6
- useCallback,
7
- useMemo,
8
- useRef,
9
- useState,
10
- } from "react";
11
- import styles from "./CheckboxGroup.module.css";
12
-
13
- interface CheckboxGroupContextProps {
14
- values: boolean[];
15
- register: () => number;
16
- update: (index: number, checked: boolean) => void;
17
- setAll: (checked: boolean) => void;
18
- }
19
-
20
- interface CheckboxGroupProps {
21
- children: ReactNode;
22
- onChange?: (checked: boolean[]) => void;
23
- label?: string;
24
- }
25
-
26
- export const CheckboxGroupContext =
27
- createContext<CheckboxGroupContextProps | null>(null);
28
-
29
- export function CheckboxGroup({
30
- children,
31
- onChange,
32
- label,
33
- }: CheckboxGroupProps) {
34
- const [values, setValues] = useState<boolean[]>([]);
35
- const indexRef = useRef(-1);
36
-
37
- const register = useCallback(() => {
38
- const index = indexRef.current++;
39
- setValues((prev) => [...prev, false]);
40
- return index;
41
- }, []);
42
-
43
- const update = useCallback(
44
- (index: number, checked: boolean) => {
45
- setValues((prev) => {
46
- const next = [...prev];
47
- next[index] = checked;
48
- onChange?.(next);
49
- return next;
50
- });
51
- },
52
- [onChange]
53
- );
54
-
55
- const setAll = useCallback(
56
- (checked: boolean) => {
57
- setValues((prev) => {
58
- const next = prev.map(() => checked);
59
- onChange?.(next);
60
- return next;
61
- });
62
- },
63
- [onChange]
64
- );
65
-
66
- const context = useMemo(
67
- () => ({ values, register, update, setAll }),
68
- [values, register, update, setAll]
69
- );
70
-
71
- return (
72
- <fieldset className={styles.root}>
73
- {label && (
74
- <legend className={styles.legend} id={label}>
75
- {label}
76
- </legend>
77
- )}
78
- <CheckboxGroupContext.Provider value={context}>
79
- {children}
80
- </CheckboxGroupContext.Provider>
81
- </fieldset>
82
- );
83
- }
@@ -1,34 +0,0 @@
1
- "use client";
2
-
3
- import { useContext } from "react";
4
- import { Checkbox } from "./Checkbox";
5
- import { CheckboxGroupContext } from "./CheckboxGroup/CheckboxGroup";
6
-
7
- interface CheckboxSelectAllProps {
8
- label: string;
9
- }
10
-
11
- export function CheckboxSelectAll({ label }: CheckboxSelectAllProps) {
12
- const group = useContext(CheckboxGroupContext);
13
-
14
- if (!group) {
15
- throw new Error(
16
- "<CheckboxSelectAll/> must be used inside <CheckboxGroup/>",
17
- );
18
- }
19
-
20
- const { values, setAll } = group;
21
-
22
- const allChecked = values.length > 0 && values.every(Boolean);
23
- const someChecked = values.some(Boolean);
24
-
25
- return (
26
- <Checkbox
27
- label={label}
28
- checked={allChecked}
29
- indeterminate={!allChecked && someChecked}
30
- onChange={(_, checked) => setAll(checked)}
31
- skipGroup
32
- />
33
- );
34
- }
@@ -1,111 +0,0 @@
1
- .root {
2
- --input-border: var(--color-outline);
3
- --input-color: var(--color-on-surface);
4
- --input-fs: var(--fs-body2);
5
- --input-background: var(--color-background-alpha);
6
- --input-focus-background: var(--color-background);
7
-
8
- display: flex;
9
- flex-direction: column;
10
- gap: var(--spacing-gap);
11
- font-size: var(--input-fs);
12
- &.fullWidth {
13
- width: 100%;
14
- }
15
- &:has(.inputWrapper > .input:focus) {
16
- & > .inputWrapper {
17
- outline: none;
18
- background: var(--input-focus-background);
19
- }
20
- .label {
21
- color: var(--input-color);
22
- }
23
- }
24
- &:has(.inputWrapper > .input:disabled) {
25
- opacity: 0.5;
26
- }
27
- }
28
- .inputWrapper {
29
- position: relative;
30
- display: flex;
31
- border-radius: var(--shape-br-sm);
32
- outline: 1px solid var(--input-border);
33
- background: var(--input-background);
34
- }
35
- .label {
36
- color: var(--color-on-background-faint);
37
- margin-left: var(--spacing-gap);
38
- width: max-content;
39
- cursor: pointer;
40
- }
41
- .input {
42
- flex: 1 1 100%;
43
- font-family: var(--font-p);
44
- font-size: inherit;
45
- border: none;
46
- background: none;
47
- color: var(--input-color);
48
- &:focus {
49
- outline: none;
50
- }
51
- }
52
- .iconContainer {
53
- display: flex;
54
- justify-content: center;
55
- font-size: inherit;
56
- align-items: center;
57
- color: var(--color-on-background-faint);
58
- /* Start Icon */
59
- &:nth-of-type(1) {
60
- margin-left: var(--spacing-gap-2);
61
- &.disableGutters {
62
- margin-left: 0;
63
- }
64
- }
65
- /* End Icon */
66
- &:nth-of-type(2) {
67
- margin-right: var(--spacing-gap-2);
68
- &.disableGutters {
69
- margin-right: 0;
70
- }
71
- }
72
- }
73
-
74
- .errored {
75
- --input-border: var(--color-error);
76
- --input-color: var(--color-error);
77
- & > .inputWrapper {
78
- outline: 1px solid var(--input-border);
79
- & > .iconContainer {
80
- color: var(--input-color);
81
- }
82
- }
83
- & > .label {
84
- color: var(--input-color);
85
- }
86
- }
87
-
88
- .size_sm {
89
- .label {
90
- font-size: 0.8em;
91
- }
92
- .input {
93
- padding: var(--spacing-gap) calc(1.618 * var(--spacing-gap));
94
- }
95
- }
96
- .size_md {
97
- .label {
98
- font-size: 0.9em;
99
- }
100
- .input {
101
- padding: var(--spacing-gap-2) calc(1.618 * var(--spacing-gap-2));
102
- }
103
- }
104
- .size_lg {
105
- .label {
106
- font-size: 1em;
107
- }
108
- .input {
109
- padding: var(--spacing-gap-3) calc(1.618 * var(--spacing-gap-3));
110
- }
111
- }