@lucasromero/matrix-ui 0.7.2 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/LICENSE +21 -0
  3. package/README.md +93 -61
  4. package/dist/components/Accordion/Accordion.d.ts +5 -0
  5. package/dist/components/Accordion/Accordion.js +40 -0
  6. package/dist/components/Accordion/index.d.ts +1 -0
  7. package/dist/components/Accordion/index.module.js +10 -0
  8. package/dist/components/Alert/Alert.d.ts +11 -0
  9. package/dist/components/Alert/Alert.js +66 -0
  10. package/dist/components/Alert/index.d.ts +1 -0
  11. package/dist/components/Alert/index.module.js +15 -0
  12. package/dist/components/Avatar/Avatar.d.ts +6 -0
  13. package/dist/components/Avatar/Avatar.js +36 -0
  14. package/dist/components/Avatar/helpers/getInitials.d.ts +1 -0
  15. package/dist/components/Avatar/helpers/getInitials.js +6 -0
  16. package/dist/components/Avatar/index.d.ts +1 -0
  17. package/dist/components/Avatar/index.module.js +9 -0
  18. package/dist/components/AvatarGroup/AvatarGroup.d.ts +7 -0
  19. package/dist/components/AvatarGroup/AvatarGroup.js +35 -0
  20. package/dist/components/AvatarGroup/index.d.ts +1 -0
  21. package/dist/components/AvatarGroup/index.module.js +9 -0
  22. package/dist/components/Badge/Badge.d.ts +5 -3
  23. package/dist/components/Badge/Badge.js +21 -0
  24. package/dist/components/Badge/index.d.ts +1 -0
  25. package/dist/components/Badge/index.module.js +10 -0
  26. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -0
  27. package/dist/components/Breadcrumbs/Breadcrumbs.js +41 -0
  28. package/dist/components/Breadcrumbs/index.d.ts +1 -0
  29. package/dist/components/Breadcrumbs/index.module.js +11 -0
  30. package/dist/components/Button/Button.d.ts +6 -3
  31. package/dist/components/Button/Button.js +27 -0
  32. package/dist/components/Button/ButtonLink.d.ts +6 -0
  33. package/dist/components/Button/ButtonLink.js +16 -0
  34. package/dist/components/Button/buttonClassName.d.ts +2 -0
  35. package/dist/components/Button/buttonClassName.js +11 -0
  36. package/dist/components/Button/index.d.ts +2 -1
  37. package/dist/components/Button/index.module.js +13 -0
  38. package/dist/components/Card/Card.d.ts +3 -3
  39. package/dist/components/Card/Card.js +10 -0
  40. package/dist/components/Card/index.d.ts +1 -0
  41. package/dist/components/Card/index.module.js +3 -0
  42. package/dist/components/Checkbox/Checkbox.d.ts +3 -0
  43. package/dist/components/Checkbox/Checkbox.js +21 -0
  44. package/dist/components/Checkbox/index.d.ts +1 -0
  45. package/dist/components/Checkbox/index.module.js +7 -0
  46. package/dist/components/Chip/Chip.d.ts +7 -0
  47. package/dist/components/Chip/Chip.js +34 -0
  48. package/dist/components/Chip/index.d.ts +1 -0
  49. package/dist/components/Chip/index.module.js +10 -0
  50. package/dist/components/CodeBlock/CodeBlock.d.ts +8 -0
  51. package/dist/components/CodeBlock/CodeBlock.js +47 -0
  52. package/dist/components/CodeBlock/index.d.ts +1 -0
  53. package/dist/components/CodeBlock/index.module.js +9 -0
  54. package/dist/components/Combobox/Combobox.d.ts +11 -0
  55. package/dist/components/Combobox/Combobox.js +123 -0
  56. package/dist/components/Combobox/index.d.ts +1 -0
  57. package/dist/components/Combobox/index.module.js +12 -0
  58. package/dist/components/Container/Container.d.ts +5 -0
  59. package/dist/components/Container/Container.js +15 -0
  60. package/dist/components/Container/index.d.ts +1 -0
  61. package/dist/components/Container/index.module.js +21 -0
  62. package/dist/components/DateInput/DateInput.d.ts +4 -0
  63. package/dist/components/DateInput/DateInput.js +54 -0
  64. package/dist/components/DateInput/index.d.ts +1 -0
  65. package/dist/components/DateInput/index.module.js +7 -0
  66. package/dist/components/DescriptionList/DescriptionList.d.ts +5 -0
  67. package/dist/components/DescriptionList/DescriptionList.js +26 -0
  68. package/dist/components/DescriptionList/index.d.ts +1 -0
  69. package/dist/components/DescriptionList/index.module.js +10 -0
  70. package/dist/components/Dialog/Dialog.d.ts +14 -0
  71. package/dist/components/Dialog/Dialog.js +73 -0
  72. package/dist/components/Dialog/index.d.ts +1 -0
  73. package/dist/components/Dialog/index.module.js +16 -0
  74. package/dist/components/Divider/Divider.d.ts +5 -0
  75. package/dist/components/Divider/Divider.js +18 -0
  76. package/dist/components/Divider/index.d.ts +1 -0
  77. package/dist/components/Divider/index.module.js +19 -0
  78. package/dist/components/Drawer/Drawer.d.ts +3 -0
  79. package/dist/components/Drawer/Drawer.js +73 -0
  80. package/dist/components/Drawer/index.d.ts +1 -0
  81. package/dist/components/Drawer/index.module.js +17 -0
  82. package/dist/components/DropdownMenu/DropdownMenu.d.ts +11 -0
  83. package/dist/components/DropdownMenu/DropdownMenu.js +95 -0
  84. package/dist/components/DropdownMenu/index.d.ts +1 -0
  85. package/dist/components/DropdownMenu/index.module.js +11 -0
  86. package/dist/components/EmptyState/EmptyState.d.ts +8 -0
  87. package/dist/components/EmptyState/EmptyState.js +39 -0
  88. package/dist/components/EmptyState/index.d.ts +1 -0
  89. package/dist/components/EmptyState/index.module.js +10 -0
  90. package/dist/components/FileUpload/FileUpload.d.ts +7 -0
  91. package/dist/components/FileUpload/FileUpload.js +116 -0
  92. package/dist/components/FileUpload/helpers/formatFileSize.d.ts +1 -0
  93. package/dist/components/FileUpload/helpers/formatFileSize.js +12 -0
  94. package/dist/components/FileUpload/helpers/matchesAccept.d.ts +1 -0
  95. package/dist/components/FileUpload/helpers/matchesAccept.js +7 -0
  96. package/dist/components/FileUpload/index.d.ts +1 -0
  97. package/dist/components/FileUpload/index.module.js +16 -0
  98. package/dist/components/FormField/FormField.d.ts +11 -0
  99. package/dist/components/FormField/FormField.js +38 -0
  100. package/dist/components/FormField/index.d.ts +1 -0
  101. package/dist/components/FormField/index.module.js +8 -0
  102. package/dist/components/Heading/Heading.d.ts +4 -0
  103. package/dist/components/Heading/Heading.js +14 -0
  104. package/dist/components/Heading/index.d.ts +1 -0
  105. package/dist/components/Heading/index.module.js +9 -0
  106. package/dist/components/Inline/Inline.d.ts +7 -0
  107. package/dist/components/Inline/Inline.js +17 -0
  108. package/dist/components/Inline/index.d.ts +1 -0
  109. package/dist/components/Inline/index.module.js +27 -0
  110. package/dist/components/Input/Input.d.ts +2 -0
  111. package/dist/components/Input/Input.js +11 -0
  112. package/dist/components/Input/index.d.ts +1 -0
  113. package/dist/components/Input/index.module.js +3 -0
  114. package/dist/components/Link/Link.d.ts +3 -3
  115. package/dist/components/Link/Link.js +11 -0
  116. package/dist/components/Link/index.d.ts +1 -0
  117. package/dist/components/Link/index.module.js +3 -0
  118. package/dist/components/Navigation/Navigation.d.ts +14 -0
  119. package/dist/components/Navigation/Navigation.js +75 -0
  120. package/dist/components/Navigation/NavigationMenu.d.ts +6 -0
  121. package/dist/components/Navigation/NavigationMenu.js +48 -0
  122. package/dist/components/Navigation/index.d.ts +2 -0
  123. package/dist/components/Navigation/index.module.js +20 -0
  124. package/dist/components/NumberInput/NumberInput.d.ts +10 -0
  125. package/dist/components/NumberInput/NumberInput.js +80 -0
  126. package/dist/components/NumberInput/index.d.ts +1 -0
  127. package/dist/components/NumberInput/index.module.js +7 -0
  128. package/dist/components/OtpInput/OtpInput.d.ts +8 -0
  129. package/dist/components/OtpInput/OtpInput.js +47 -0
  130. package/dist/components/OtpInput/index.d.ts +1 -0
  131. package/dist/components/OtpInput/index.module.js +9 -0
  132. package/dist/components/PageHeader/PageHeader.d.ts +8 -0
  133. package/dist/components/PageHeader/PageHeader.js +39 -0
  134. package/dist/components/PageHeader/index.d.ts +1 -0
  135. package/dist/components/PageHeader/index.module.js +8 -0
  136. package/dist/components/Pagination/Pagination.d.ts +14 -0
  137. package/dist/components/Pagination/Pagination.js +81 -0
  138. package/dist/components/Pagination/helpers/getPaginationItems.d.ts +1 -0
  139. package/dist/components/Pagination/helpers/getPaginationItems.js +22 -0
  140. package/dist/components/Pagination/index.d.ts +1 -0
  141. package/dist/components/Pagination/index.module.js +11 -0
  142. package/dist/components/PasswordInput/PasswordInput.d.ts +3 -0
  143. package/dist/components/PasswordInput/PasswordInput.js +42 -0
  144. package/dist/components/PasswordInput/index.d.ts +1 -0
  145. package/dist/components/PasswordInput/index.module.js +7 -0
  146. package/dist/components/Phone/Phone.d.ts +7 -0
  147. package/dist/components/Phone/Phone.js +19 -0
  148. package/dist/components/Phone/helpers/formatPhoneNumber.d.ts +15 -0
  149. package/dist/components/Phone/helpers/formatPhoneNumber.js +15 -0
  150. package/dist/components/Phone/index.d.ts +2 -0
  151. package/dist/components/Popover/Popover.d.ts +11 -0
  152. package/dist/components/Popover/Popover.js +51 -0
  153. package/dist/components/Popover/index.d.ts +1 -0
  154. package/dist/components/Popover/index.module.js +7 -0
  155. package/dist/components/Progress/Progress.d.ts +10 -0
  156. package/dist/components/Progress/Progress.js +74 -0
  157. package/dist/components/Progress/index.d.ts +1 -0
  158. package/dist/components/Progress/index.module.js +21 -0
  159. package/dist/components/Radio/Radio.d.ts +3 -0
  160. package/dist/components/Radio/Radio.js +21 -0
  161. package/dist/components/Radio/index.d.ts +1 -0
  162. package/dist/components/Radio/index.module.js +7 -0
  163. package/dist/components/RelatedLinks/RelatedLinks.d.ts +6 -0
  164. package/dist/components/RelatedLinks/RelatedLinks.js +39 -0
  165. package/dist/components/RelatedLinks/index.d.ts +1 -0
  166. package/dist/components/RelatedLinks/index.module.js +11 -0
  167. package/dist/components/SearchInput/SearchInput.d.ts +3 -0
  168. package/dist/components/SearchInput/SearchInput.js +28 -0
  169. package/dist/components/SearchInput/index.d.ts +1 -0
  170. package/dist/components/SearchInput/index.module.js +8 -0
  171. package/dist/components/Select/Select.d.ts +2 -0
  172. package/dist/components/Select/Select.js +31 -0
  173. package/dist/components/Select/index.d.ts +1 -0
  174. package/dist/components/Select/index.module.js +8 -0
  175. package/dist/components/SideNav/SideNav.d.ts +6 -0
  176. package/dist/components/SideNav/SideNav.js +38 -0
  177. package/dist/components/SideNav/index.d.ts +1 -0
  178. package/dist/components/SideNav/index.module.js +10 -0
  179. package/dist/components/Skeleton/Skeleton.d.ts +6 -0
  180. package/dist/components/Skeleton/Skeleton.js +39 -0
  181. package/dist/components/Skeleton/index.d.ts +1 -0
  182. package/dist/components/Skeleton/index.module.js +11 -0
  183. package/dist/components/Slider/Slider.d.ts +10 -0
  184. package/dist/components/Slider/Slider.js +37 -0
  185. package/dist/components/Slider/index.d.ts +1 -0
  186. package/dist/components/Slider/index.module.js +7 -0
  187. package/dist/components/Spinner/Spinner.d.ts +4 -0
  188. package/dist/components/Spinner/Spinner.js +24 -0
  189. package/dist/components/Spinner/index.d.ts +1 -0
  190. package/dist/components/Spinner/index.module.js +10 -0
  191. package/dist/components/Stack/Stack.d.ts +5 -0
  192. package/dist/components/Stack/Stack.js +15 -0
  193. package/dist/components/Stack/index.d.ts +1 -0
  194. package/dist/components/Stack/index.module.js +21 -0
  195. package/dist/components/Stepper/Stepper.d.ts +6 -0
  196. package/dist/components/Stepper/Stepper.js +50 -0
  197. package/dist/components/Stepper/index.d.ts +1 -0
  198. package/dist/components/Stepper/index.module.js +15 -0
  199. package/dist/components/Switch/Switch.d.ts +3 -0
  200. package/dist/components/Switch/Switch.js +22 -0
  201. package/dist/components/Switch/index.d.ts +1 -0
  202. package/dist/components/Switch/index.module.js +7 -0
  203. package/dist/components/Table/Table.d.ts +3 -0
  204. package/dist/components/Table/Table.js +34 -0
  205. package/dist/components/Table/index.d.ts +1 -0
  206. package/dist/components/Table/index.module.js +9 -0
  207. package/dist/components/Tabs/Tabs.d.ts +8 -0
  208. package/dist/components/Tabs/Tabs.js +63 -0
  209. package/dist/components/Tabs/index.d.ts +1 -0
  210. package/dist/components/Tabs/index.module.js +9 -0
  211. package/dist/components/Text/Text.d.ts +3 -3
  212. package/dist/components/Text/Text.js +15 -0
  213. package/dist/components/Text/index.d.ts +1 -0
  214. package/dist/components/Text/index.module.js +10 -0
  215. package/dist/components/TextTag/TextTag.d.ts +5 -0
  216. package/dist/components/TextTag/TextTag.js +19 -0
  217. package/dist/components/TextTag/index.d.ts +1 -0
  218. package/dist/components/TextTag/index.module.js +7 -0
  219. package/dist/components/Textarea/Textarea.d.ts +2 -0
  220. package/dist/components/Textarea/Textarea.js +11 -0
  221. package/dist/components/Textarea/index.d.ts +1 -0
  222. package/dist/components/Textarea/index.module.js +3 -0
  223. package/dist/components/TimeInput/TimeInput.d.ts +4 -0
  224. package/dist/components/TimeInput/TimeInput.js +54 -0
  225. package/dist/components/TimeInput/index.d.ts +1 -0
  226. package/dist/components/TimeInput/index.module.js +7 -0
  227. package/dist/components/Toast/Toast.d.ts +4 -0
  228. package/dist/components/Toast/Toast.js +26 -0
  229. package/dist/components/Toast/index.d.ts +1 -0
  230. package/dist/components/Toast/index.module.js +8 -0
  231. package/dist/components/Toggle/Toggle.d.ts +4 -0
  232. package/dist/components/Toggle/Toggle.js +20 -0
  233. package/dist/components/Toggle/index.d.ts +1 -0
  234. package/dist/components/Toggle/index.module.js +7 -0
  235. package/dist/components/Tooltip/Tooltip.d.ts +8 -0
  236. package/dist/components/Tooltip/Tooltip.js +48 -0
  237. package/dist/components/Tooltip/index.d.ts +1 -0
  238. package/dist/components/Tooltip/index.module.js +7 -0
  239. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +3 -0
  240. package/dist/components/VisuallyHidden/VisuallyHidden.js +15 -0
  241. package/dist/components/VisuallyHidden/index.d.ts +1 -0
  242. package/dist/components/VisuallyHidden/index.module.js +6 -0
  243. package/dist/hooks/useAnchoredPosition.d.ts +6 -0
  244. package/dist/hooks/useAnchoredPosition.js +40 -0
  245. package/dist/hooks/useDisclosure.d.ts +2 -0
  246. package/dist/hooks/useDisclosure.js +23 -0
  247. package/dist/hooks/useDismiss.d.ts +3 -0
  248. package/dist/hooks/useDismiss.js +22 -0
  249. package/dist/hooks/useMediaQuery.d.ts +2 -0
  250. package/dist/hooks/useMediaQuery.js +12 -0
  251. package/dist/hooks/useModalDialog.d.ts +9 -0
  252. package/dist/hooks/useModalDialog.js +54 -0
  253. package/dist/hooks/useOpenState.d.ts +1 -0
  254. package/dist/hooks/useOpenState.js +14 -0
  255. package/dist/index.d.ts +117 -3
  256. package/dist/index.js +63 -0
  257. package/dist/styles.css +2 -0
  258. package/dist/types/accordionType.d.ts +19 -0
  259. package/dist/types/alertType.d.ts +30 -0
  260. package/dist/types/avatarGroupType.d.ts +20 -0
  261. package/dist/types/avatarType.d.ts +15 -0
  262. package/dist/types/badgeType.d.ts +11 -8
  263. package/dist/types/breadcrumbsType.d.ts +23 -0
  264. package/dist/types/buttonLinkType.d.ts +19 -0
  265. package/dist/types/buttonType.d.ts +27 -9
  266. package/dist/types/cardType.d.ts +9 -43
  267. package/dist/types/checkboxType.d.ts +9 -0
  268. package/dist/types/chipType.d.ts +18 -0
  269. package/dist/types/codeBlockType.d.ts +19 -0
  270. package/dist/types/comboboxType.d.ts +27 -0
  271. package/dist/types/containerType.d.ts +11 -0
  272. package/dist/types/dateInputType.d.ts +7 -0
  273. package/dist/types/descriptionListType.d.ts +20 -0
  274. package/dist/types/dialogType.d.ts +38 -0
  275. package/dist/types/dividerType.d.ts +14 -0
  276. package/dist/types/drawerType.d.ts +7 -0
  277. package/dist/types/dropdownMenuType.d.ts +36 -0
  278. package/dist/types/emptyStateType.d.ts +16 -0
  279. package/dist/types/fileUploadType.d.ts +13 -0
  280. package/dist/types/formFieldType.d.ts +26 -0
  281. package/dist/types/headingType.d.ts +12 -0
  282. package/dist/types/index.d.ts +61 -11
  283. package/dist/types/inlineType.d.ts +17 -0
  284. package/dist/types/inputType.d.ts +8 -0
  285. package/dist/types/linkType.d.ts +8 -9
  286. package/dist/types/navigationMenuType.d.ts +14 -0
  287. package/dist/types/navigationType.d.ts +42 -0
  288. package/dist/types/numberInputType.d.ts +19 -0
  289. package/dist/types/otpInputType.d.ts +16 -0
  290. package/dist/types/pageHeaderType.d.ts +19 -0
  291. package/dist/types/paginationType.d.ts +37 -0
  292. package/dist/types/passwordInputType.d.ts +5 -0
  293. package/dist/types/phoneType.d.ts +19 -0
  294. package/dist/types/popoverType.d.ts +31 -0
  295. package/dist/types/progressType.d.ts +21 -0
  296. package/dist/types/radioType.d.ts +9 -0
  297. package/dist/types/relatedLinksType.d.ts +25 -0
  298. package/dist/types/searchInputType.d.ts +6 -0
  299. package/dist/types/selectType.d.ts +8 -0
  300. package/dist/types/sideNavType.d.ts +35 -0
  301. package/dist/types/skeletonType.d.ts +12 -0
  302. package/dist/types/sliderType.d.ts +19 -0
  303. package/dist/types/spaceType.d.ts +2 -0
  304. package/dist/types/spinnerType.d.ts +12 -0
  305. package/dist/types/stackType.d.ts +15 -0
  306. package/dist/types/stepperType.d.ts +27 -0
  307. package/dist/types/switchType.d.ts +9 -0
  308. package/dist/types/tableType.d.ts +26 -0
  309. package/dist/types/tabsType.d.ts +30 -0
  310. package/dist/types/textTagType.d.ts +9 -0
  311. package/dist/types/textType.d.ts +5 -15
  312. package/dist/types/textareaType.d.ts +8 -0
  313. package/dist/types/timeInputType.d.ts +7 -0
  314. package/dist/types/toastType.d.ts +7 -0
  315. package/dist/types/toggleType.d.ts +7 -0
  316. package/dist/types/tooltipType.d.ts +22 -0
  317. package/dist/types/useDisclosureType.d.ts +30 -0
  318. package/dist/types/useMediaQueryType.d.ts +4 -0
  319. package/dist/types/visuallyHiddenType.d.ts +5 -0
  320. package/package.json +54 -75
  321. package/dist/components/CardRow/CardRow.d.ts +0 -3
  322. package/dist/components/IconDropdown/IconDropdown.d.ts +0 -3
  323. package/dist/components/Image/Image.d.ts +0 -3
  324. package/dist/components/Navbar/Navbar.d.ts +0 -3
  325. package/dist/components/Rating/Rating.d.ts +0 -3
  326. package/dist/components/SelectDropdown/SelectDropdown.d.ts +0 -3
  327. package/dist/components/index.d.ts +0 -11
  328. package/dist/favicon.svg +0 -1
  329. package/dist/fonts/Inter-400.woff2 +0 -11
  330. package/dist/fonts/Inter-500.woff2 +0 -11
  331. package/dist/fonts/Inter-600.woff2 +0 -11
  332. package/dist/fonts/Inter-700.woff2 +0 -11
  333. package/dist/hooks/index.d.ts +0 -1
  334. package/dist/hooks/useBreakpoint.d.ts +0 -7
  335. package/dist/icons.svg +0 -24
  336. package/dist/matrix-ui.es.js +0 -680
  337. package/dist/matrix-ui.umd.js +0 -2
  338. package/dist/types/cardRowType.d.ts +0 -34
  339. package/dist/types/iconDropdownType.d.ts +0 -16
  340. package/dist/types/imageType.d.ts +0 -11
  341. package/dist/types/navbarType.d.ts +0 -27
  342. package/dist/types/ratingType.d.ts +0 -3
  343. package/dist/types/selectDropdownType.d.ts +0 -15
package/CHANGELOG.md ADDED
@@ -0,0 +1,39 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@lucasromero/matrix-ui` are recorded here. Matrix UI follows [Semantic Versioning](https://semver.org). While the version is below 1.0.0, a minor release may include breaking changes, and they are listed here.
4
+
5
+ ## 0.9.0
6
+
7
+ ### Added
8
+
9
+ - `formatPhoneNumber(value, defaultCountry)`, the formatter Phone uses, for showing saved numbers the same way.
10
+ - `--matrix-input-hover-background` changes Input's background on hover.
11
+ - `--matrix-button-secondary-hover-border-color` changes a secondary Button's border on hover.
12
+ - `--matrix-toast-content-min-height` changes the minimum height of Toast's content, which is 2rem by default.
13
+
14
+ Without these variables set, components look and behave as before.
15
+
16
+ ### Fixed
17
+
18
+ - FormField no longer adds its error id to `aria-describedby` when the control already references it, so the error is not described twice.
19
+
20
+ ## 0.8.0
21
+
22
+ The first documented release. Documentation is at [matrixuicomponents.com](https://matrixuicomponents.com).
23
+
24
+ Versions 0.1.0 to 0.7.2 were early pre-release builds and are deprecated. Their APIs may differ from this release, so check each component's documentation when upgrading from them.
25
+
26
+ ### Components
27
+
28
+ Accordion, Alert, Avatar, AvatarGroup, Badge, Breadcrumbs, Button, ButtonLink, Card, Checkbox, Chip, CodeBlock, Combobox, Container, DateInput, DescriptionList, Dialog, Divider, Drawer, DropdownMenu, EmptyState, FileUpload, FormField, Heading, Inline, Input, Link, Navigation, NavigationMenu, NumberInput, OtpInput, PageHeader, Pagination, PasswordInput, Phone, Popover, Progress, Radio, RelatedLinks, SearchInput, Select, SideNav, Skeleton, Slider, Spinner, Stack, Stepper, Switch, Table, Tabs, Text, Textarea, TextTag, TimeInput, Toast, Toggle, Tooltip, and VisuallyHidden.
29
+
30
+ ### Hooks
31
+
32
+ `useDisclosure` and `useMediaQuery`.
33
+
34
+ ### Foundations
35
+
36
+ - Supports React 18 and React 19.
37
+ - One stylesheet, `@lucasromero/matrix-ui/styles.css`, with light and dark design tokens as `--matrix-` custom properties. No Sass, theme provider, or CSS reset is needed.
38
+ - ESM only, with TypeScript declarations included.
39
+ - Client components keep their `"use client"` directives, so the library works in React Server Component frameworks such as the Next.js App Router.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lucas Romero
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,75 +1,107 @@
1
- # React + TypeScript + Vite
1
+ # Matrix UI
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3
+ Reusable, accessible React components written in TypeScript. Matrix UI renders native HTML elements, styles them with CSS custom properties, and works with React 18 and React 19.
4
4
 
5
- Currently, two official plugins are available:
5
+ ## Requirements
6
6
 
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
7
+ - React 18 or React 19, with React DOM.
8
+ - A bundler or framework that can import CSS from a package, such as Vite, Next.js, or webpack.
9
+ - TypeScript is optional. Type definitions are included.
10
+ - No Sass, theme provider, or CSS reset is needed.
9
11
 
10
- ## React Compiler
12
+ ## Install
11
13
 
12
- The React Compiler is enabled on this template. See [this documentation](https://react.dev/learn/react-compiler) for more information.
14
+ ```sh
15
+ npm install @lucasromero/matrix-ui
16
+ ```
17
+
18
+ React and React DOM are peer dependencies, so your project provides them. The icon library Matrix UI uses, `lucide-react`, is installed automatically.
19
+
20
+ ## Import the stylesheet
21
+
22
+ Import the stylesheet once, in your app's entry file. It contains the default design tokens and the styles for every component.
23
+
24
+ ```tsx
25
+ // main.tsx, or your app's entry file
26
+ import '@lucasromero/matrix-ui/styles.css'
27
+ import './styles.css'
28
+ ```
29
+
30
+ Import it before your own styles, so that your styles win when they target the same elements. It adds no global reset and does not change your page's fonts or layout.
13
31
 
14
- Note: This will impact Vite dev & build performances.
32
+ ## Your first component
15
33
 
16
- ## Expanding the ESLint configuration
34
+ ```tsx
35
+ import { Button } from '@lucasromero/matrix-ui'
36
+ import { useState } from 'react'
17
37
 
18
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
38
+ export function SaveButton() {
39
+ const [saved, setSaved] = useState(false)
19
40
 
20
- ```js
21
- export default defineConfig([
22
- globalIgnores(['dist']),
23
- {
24
- files: ['**/*.{ts,tsx}'],
25
- extends: [
26
- // Other configs...
41
+ return <Button onClick={() => setSaved(true)}>{saved ? 'Saved' : 'Save changes'}</Button>
42
+ }
43
+ ```
44
+
45
+ Each component renders a native element and accepts its attributes, such as `type`, `disabled`, and `aria-*`. Refs are forwarded, and prop types are exported too, such as `ButtonProps`.
27
46
 
28
- // Remove tseslint.configs.recommended and replace with this
29
- tseslint.configs.recommendedTypeChecked,
30
- // Alternatively, use this for stricter rules
31
- tseslint.configs.strictTypeChecked,
32
- // Optionally, add this for stylistic rules
33
- tseslint.configs.stylisticTypeChecked,
47
+ ## Next.js
34
48
 
35
- // Other configs...
36
- ],
37
- languageOptions: {
38
- parserOptions: {
39
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
40
- tsconfigRootDir: import.meta.dirname,
41
- },
42
- // other options...
43
- },
44
- },
45
- ]);
49
+ Import the stylesheet in your root layout:
50
+
51
+ ```tsx
52
+ // app/layout.tsx
53
+ import '@lucasromero/matrix-ui/styles.css'
54
+ import './globals.css'
46
55
  ```
47
56
 
48
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
49
-
50
- ```js
51
- // eslint.config.js
52
- import reactX from 'eslint-plugin-react-x';
53
- import reactDom from 'eslint-plugin-react-dom';
54
-
55
- export default defineConfig([
56
- globalIgnores(['dist']),
57
- {
58
- files: ['**/*.{ts,tsx}'],
59
- extends: [
60
- // Other configs...
61
- // Enable lint rules for React
62
- reactX.configs['recommended-typescript'],
63
- // Enable lint rules for React DOM
64
- reactDom.configs.recommended,
65
- ],
66
- languageOptions: {
67
- parserOptions: {
68
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
69
- tsconfigRootDir: import.meta.dirname,
70
- },
71
- // other options...
72
- },
73
- },
74
- ]);
57
+ Server Components can render Matrix UI components directly. Components that need the browser are already marked as Client Components inside the library. Event handlers such as `onClick` still need a Client Component of your own, marked with `'use client'`.
58
+
59
+ ## Customize
60
+
61
+ Design tokens are CSS custom properties that start with `--matrix-`. Change a token on `:root` to change it everywhere, or on a container to change only the components inside it.
62
+
63
+ ```css
64
+ /* styles.css, imported after the Matrix UI stylesheet */
65
+ :root {
66
+ --matrix-radius-md: 1.5rem;
67
+ --matrix-radius-lg: 1.25rem;
68
+ }
75
69
  ```
70
+
71
+ Light is the default theme. Add `data-matrix-theme="dark"` to `html` for a dark page, or to any element for a dark region. Components also accept `className`, and many have their own tokens, such as `--matrix-button-radius`.
72
+
73
+ ## Components
74
+
75
+ | Category | Components |
76
+ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
77
+ | Actions | Button, ButtonLink, Chip, Toggle |
78
+ | Forms | Checkbox, Combobox, DateInput, FileUpload, FormField, Input, NumberInput, OtpInput, PasswordInput, Phone, Radio, SearchInput, Select, Slider, Switch, Textarea, TimeInput |
79
+ | Layout | Accordion, Card, Container, Divider, Inline, PageHeader, Stack |
80
+ | Typography | Heading, Text, TextTag |
81
+ | Navigation | Breadcrumbs, Link, Navigation, NavigationMenu, Pagination, RelatedLinks, SideNav, Stepper, Tabs |
82
+ | Overlays | Dialog, Drawer, DropdownMenu, Popover, Tooltip |
83
+ | Feedback | Alert, EmptyState, Progress, Skeleton, Spinner, Toast |
84
+ | Data display | Avatar, AvatarGroup, Badge, CodeBlock, DescriptionList, Table |
85
+ | Utilities | VisuallyHidden |
86
+
87
+ The hooks `useDisclosure` and `useMediaQuery` are exported too.
88
+
89
+ Components do not depend on a router. Components that render links, such as Breadcrumbs and Pagination, let you render each link with your router's own link component.
90
+
91
+ ## Accessibility
92
+
93
+ Components are built to support WCAG 2.2 AA. Each component was checked, where the check applies, with automated axe tests, keyboard use, measured color contrast, a 320px wide screen, 200% zoom, reduced motion, and forced colors emulated in Chrome. Manual screen reader testing has not been done yet.
94
+
95
+ These checks do not prove WCAG compliance. Accessibility also depends on how a component is used, such as giving it an accessible name, so test your own pages too.
96
+
97
+ ## Browser support
98
+
99
+ The latest two versions of Chrome, Edge, Firefox, and Safari, including Safari on iOS.
100
+
101
+ ## Versioning
102
+
103
+ Matrix UI follows [Semantic Versioning](https://semver.org). While the version is below 1.0.0, a minor release may include breaking changes, which are listed in the release notes.
104
+
105
+ ## License
106
+
107
+ [MIT](./LICENSE)
@@ -0,0 +1,5 @@
1
+ export declare const Accordion: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement>, "children"> & {
2
+ items: import("../../index.js").AccordionItem[];
3
+ exclusive?: boolean;
4
+ onOpenChange?: (value: string, open: boolean) => void;
5
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ import e from "./index.module.js";
3
+ import { ChevronDown as t } from "lucide-react";
4
+ import { forwardRef as n, useId as r, useRef as i } from "react";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ // src/components/Accordion/Accordion.tsx
7
+ var s = n(({ items: n, exclusive: s = !1, onOpenChange: c, className: l, ...u }, d) => {
8
+ let f = r(), p = i(/* @__PURE__ */ new Map()), m = (e, t) => (n) => {
9
+ let r = n.currentTarget.open, i = p.current.get(e) ?? t;
10
+ p.current.set(e, r), i !== r && c?.(e, r);
11
+ };
12
+ return /* @__PURE__ */ a("div", {
13
+ ...u,
14
+ ref: d,
15
+ className: [e.accordion, l].filter(Boolean).join(" "),
16
+ children: n.map((n) => /* @__PURE__ */ o("details", {
17
+ name: s ? f : void 0,
18
+ open: n.defaultOpen,
19
+ className: e.item,
20
+ onToggle: m(n.value, n.defaultOpen ?? !1),
21
+ children: [/* @__PURE__ */ o("summary", {
22
+ className: e.summary,
23
+ children: [/* @__PURE__ */ a("span", {
24
+ className: e.title,
25
+ children: n.title
26
+ }), /* @__PURE__ */ a(t, {
27
+ size: 16,
28
+ strokeWidth: 2,
29
+ className: e.chevron,
30
+ "aria-hidden": "true"
31
+ })]
32
+ }), /* @__PURE__ */ a("div", {
33
+ className: e.content,
34
+ children: n.content
35
+ })]
36
+ }, n.value))
37
+ });
38
+ });
39
+ s.displayName = "Accordion";
40
+ export { s as Accordion };
@@ -0,0 +1 @@
1
+ export { Accordion } from "./Accordion.js";
@@ -0,0 +1,10 @@
1
+ // src/components/Accordion/index.module.scss
2
+ var e = "matrix-accordion-accordion", t = "matrix-accordion-item", n = "matrix-accordion-summary", r = "matrix-accordion-title", i = "matrix-accordion-chevron", a = "matrix-accordion-content", o = {
3
+ accordion: e,
4
+ item: t,
5
+ summary: n,
6
+ title: r,
7
+ chevron: i,
8
+ content: a
9
+ };
10
+ export { e as accordion, i as chevron, a as content, o as default, t as item, n as summary, r as title };
@@ -0,0 +1,11 @@
1
+ import type { AlertVariant } from "../../types/alertType.js";
2
+ export declare const Alert: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement>, "title"> & {
3
+ variant?: AlertVariant;
4
+ title?: import("react").ReactNode;
5
+ children?: import("react").ReactNode;
6
+ icon?: import("react").ReactNode;
7
+ action?: import("react").ReactNode;
8
+ onDismiss?: () => void;
9
+ dismissLabel?: string;
10
+ role?: "alert" | "status" | "note";
11
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,66 @@
1
+ import { Button as e } from "../Button/Button.js";
2
+ import t from "./index.module.js";
3
+ import { CircleAlert as n, CircleCheck as r, Info as i, TriangleAlert as a, X as o } from "lucide-react";
4
+ import { forwardRef as s } from "react";
5
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
+ // src/components/Alert/Alert.tsx
7
+ var u = {
8
+ info: i,
9
+ success: r,
10
+ warning: a,
11
+ error: n
12
+ }, d = s(({ variant: n = "info", title: r, children: i, icon: a, action: s, onDismiss: d, dismissLabel: f = "Dismiss", role: p = n === "error" || n === "warning" ? "alert" : "status", className: m, ...h }, g) => {
13
+ let _ = u[n], v = a === void 0 ? /* @__PURE__ */ c(_, {
14
+ size: 18,
15
+ strokeWidth: 1.75
16
+ }) : a;
17
+ return /* @__PURE__ */ l("div", {
18
+ ...h,
19
+ ref: g,
20
+ role: p,
21
+ className: [
22
+ t.alert,
23
+ t[n],
24
+ m
25
+ ].filter(Boolean).join(" "),
26
+ children: [
27
+ v != null && /* @__PURE__ */ c("span", {
28
+ className: t.icon,
29
+ "aria-hidden": "true",
30
+ children: v
31
+ }),
32
+ /* @__PURE__ */ l("div", {
33
+ className: t.content,
34
+ children: [
35
+ r != null && /* @__PURE__ */ c("p", {
36
+ className: t.title,
37
+ children: r
38
+ }),
39
+ i != null && /* @__PURE__ */ c("div", {
40
+ className: t.message,
41
+ children: i
42
+ }),
43
+ s != null && /* @__PURE__ */ c("div", {
44
+ className: t.action,
45
+ children: s
46
+ })
47
+ ]
48
+ }),
49
+ d && /* @__PURE__ */ c(e, {
50
+ variant: "ghost",
51
+ size: "small",
52
+ iconOnly: !0,
53
+ "aria-label": f,
54
+ className: t.dismiss,
55
+ onClick: d,
56
+ children: /* @__PURE__ */ c(o, {
57
+ size: 16,
58
+ strokeWidth: 1.75,
59
+ "aria-hidden": "true"
60
+ })
61
+ })
62
+ ]
63
+ });
64
+ });
65
+ d.displayName = "Alert";
66
+ export { d as Alert };
@@ -0,0 +1 @@
1
+ export { Alert } from "./Alert.js";
@@ -0,0 +1,15 @@
1
+ // src/components/Alert/index.module.scss
2
+ var e = "matrix-alert-alert", t = "matrix-alert-info", n = "matrix-alert-success", r = "matrix-alert-warning", i = "matrix-alert-error", a = "matrix-alert-icon", o = "matrix-alert-content", s = "matrix-alert-title", c = "matrix-alert-message", l = "matrix-alert-action", u = "matrix-alert-dismiss", d = {
3
+ alert: e,
4
+ info: t,
5
+ success: n,
6
+ warning: r,
7
+ error: i,
8
+ icon: a,
9
+ content: o,
10
+ title: s,
11
+ message: c,
12
+ action: l,
13
+ dismiss: u
14
+ };
15
+ export { l as action, e as alert, o as content, d as default, u as dismiss, i as error, a as icon, t as info, c as message, n as success, s as title, r as warning };
@@ -0,0 +1,6 @@
1
+ export declare const Avatar: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLSpanElement>, "children" | "role"> & {
2
+ name: string;
3
+ src?: string;
4
+ size?: import("../../index.js").AvatarSize;
5
+ decorative?: boolean;
6
+ } & import("react").RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ import { getInitials as e } from "./helpers/getInitials.js";
3
+ import t from "./index.module.js";
4
+ import { forwardRef as n, useState as r } from "react";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ // src/components/Avatar/Avatar.tsx
7
+ var a = n(({ name: n, src: a, size: o = "medium", decorative: s = !1, className: c, ...l }, u) => {
8
+ let [d, f] = r(void 0), p = !!a && d !== a;
9
+ return /* @__PURE__ */ i("span", {
10
+ ...l,
11
+ ref: u,
12
+ role: s ? void 0 : "img",
13
+ "aria-label": s ? void 0 : n,
14
+ "aria-hidden": s ? !0 : l["aria-hidden"],
15
+ className: [
16
+ t.avatar,
17
+ t[o],
18
+ c
19
+ ].filter(Boolean).join(" "),
20
+ children: p ? /* @__PURE__ */ i("img", {
21
+ ref: (e) => {
22
+ e?.complete && e.naturalWidth === 0 && f(a);
23
+ },
24
+ src: a,
25
+ alt: "",
26
+ className: t.image,
27
+ onError: () => f(a)
28
+ }) : /* @__PURE__ */ i("span", {
29
+ className: t.initials,
30
+ "aria-hidden": "true",
31
+ children: e(n)
32
+ })
33
+ });
34
+ });
35
+ a.displayName = "Avatar";
36
+ export { a as Avatar };
@@ -0,0 +1 @@
1
+ export declare const getInitials: (name: string) => string;
@@ -0,0 +1,6 @@
1
+ // src/components/Avatar/helpers/getInitials.ts
2
+ var e = (e) => {
3
+ let t = e.trim().split(/\s+/).filter(Boolean);
4
+ return t.length === 0 ? "" : ((Array.from(t[0])[0] ?? "") + (t.length > 1 ? Array.from(t[t.length - 1])[0] ?? "" : "")).toLocaleUpperCase();
5
+ };
6
+ export { e as getInitials };
@@ -0,0 +1 @@
1
+ export { Avatar } from "./Avatar.js";
@@ -0,0 +1,9 @@
1
+ // src/components/Avatar/index.module.scss
2
+ var e = "matrix-avatar-avatar", t = "matrix-avatar-small", n = "matrix-avatar-large", r = "matrix-avatar-image", i = "matrix-avatar-initials", a = {
3
+ avatar: e,
4
+ small: t,
5
+ large: n,
6
+ image: r,
7
+ initials: i
8
+ };
9
+ export { e as avatar, a as default, r as image, i as initials, n as large, t as small };
@@ -0,0 +1,7 @@
1
+ export declare const AvatarGroup: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "role"> & {
2
+ avatars: import("../../index.js").AvatarGroupItem[];
3
+ label: string;
4
+ max?: number;
5
+ size?: import("../../index.js").AvatarSize;
6
+ getOverflowLabel?: (count: number) => string;
7
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,35 @@
1
+ import { Avatar as e } from "../Avatar/Avatar.js";
2
+ import t from "./index.module.js";
3
+ import { forwardRef as n } from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ // src/components/AvatarGroup/AvatarGroup.tsx
6
+ var a = n(({ avatars: n, label: a, max: o, size: s = "medium", getOverflowLabel: c = (e) => `${e} more`, className: l, ...u }, d) => {
7
+ let f = o !== void 0 && o >= 1 && o < n.length ? Math.floor(o) : n.length, p = n.slice(0, f), m = n.length - p.length;
8
+ return /* @__PURE__ */ i("div", {
9
+ ...u,
10
+ ref: d,
11
+ role: "group",
12
+ "aria-label": a,
13
+ className: [
14
+ t.avatarGroup,
15
+ t[s],
16
+ l
17
+ ].filter(Boolean).join(" "),
18
+ children: [p.map((n, i) => /* @__PURE__ */ r(e, {
19
+ name: n.name,
20
+ src: n.src,
21
+ size: s,
22
+ className: t.item
23
+ }, `${i}-${n.name}`)), m > 0 && /* @__PURE__ */ r("span", {
24
+ role: "img",
25
+ "aria-label": c(m),
26
+ className: t.overflow,
27
+ children: /* @__PURE__ */ i("span", {
28
+ "aria-hidden": "true",
29
+ children: ["+", m]
30
+ })
31
+ })]
32
+ });
33
+ });
34
+ a.displayName = "AvatarGroup";
35
+ export { a as AvatarGroup };
@@ -0,0 +1 @@
1
+ export { AvatarGroup } from "./AvatarGroup.js";
@@ -0,0 +1,9 @@
1
+ // src/components/AvatarGroup/index.module.scss
2
+ var e = "matrix-avatargroup-avatarGroup", t = "matrix-avatargroup-small", n = "matrix-avatargroup-large", r = "matrix-avatargroup-item", i = "matrix-avatargroup-overflow", a = {
3
+ avatarGroup: e,
4
+ small: t,
5
+ large: n,
6
+ item: r,
7
+ overflow: i
8
+ };
9
+ export { e as avatarGroup, a as default, r as item, n as large, i as overflow, t as small };
@@ -1,3 +1,5 @@
1
- import { default as React } from 'react';
2
- import { BadgeProps } from '../../types/badgeType';
3
- export declare const Badge: React.FC<BadgeProps>;
1
+ export declare const Badge: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLSpanElement> & {
2
+ variant?: import("../../index.js").BadgeVariant;
3
+ size?: import("../../index.js").BadgeSize;
4
+ icon?: import("react").ReactNode;
5
+ } & import("react").RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,21 @@
1
+ import e from "./index.module.js";
2
+ import { forwardRef as t } from "react";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ // src/components/Badge/Badge.tsx
5
+ var i = t(({ variant: t = "soft", size: i = "medium", icon: a, className: o, children: s, ...c }, l) => /* @__PURE__ */ r("span", {
6
+ ...c,
7
+ ref: l,
8
+ className: [
9
+ e.badge,
10
+ e[t],
11
+ e[i],
12
+ o
13
+ ].filter(Boolean).join(" "),
14
+ children: [a != null && /* @__PURE__ */ n("span", {
15
+ className: e.icon,
16
+ "aria-hidden": "true",
17
+ children: a
18
+ }), s]
19
+ }));
20
+ i.displayName = "Badge";
21
+ export { i as Badge };
@@ -0,0 +1 @@
1
+ export { Badge } from "./Badge.js";
@@ -0,0 +1,10 @@
1
+ // src/components/Badge/index.module.scss
2
+ var e = "matrix-badge-badge", t = "matrix-badge-soft", n = "matrix-badge-outline", r = "matrix-badge-small", i = "matrix-badge-medium", a = "matrix-badge-icon", o = {
3
+ badge: e,
4
+ soft: t,
5
+ outline: n,
6
+ small: r,
7
+ medium: i,
8
+ icon: a
9
+ };
10
+ export { e as badge, o as default, a as icon, i as medium, n as outline, r as small, t as soft };
@@ -0,0 +1,6 @@
1
+ import type { BreadcrumbLinkProps } from "../../types/breadcrumbsType.js";
2
+ export declare const Breadcrumbs: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLElement>, "children"> & {
3
+ items: import("../../index.js").BreadcrumbItem[];
4
+ label?: string;
5
+ renderLink?: (props: BreadcrumbLinkProps) => import("react").ReactNode;
6
+ } & import("react").RefAttributes<HTMLElement>>;
@@ -0,0 +1,41 @@
1
+ import e from "./index.module.js";
2
+ import { ChevronRight as t } from "lucide-react";
3
+ import { forwardRef as n } from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ // src/components/Breadcrumbs/Breadcrumbs.tsx
6
+ var a = (e) => /* @__PURE__ */ r("a", { ...e }), o = n(({ items: n, label: o = "Breadcrumb", renderLink: s = a, className: c, ...l }, u) => /* @__PURE__ */ r("nav", {
7
+ "aria-label": o,
8
+ ...l,
9
+ ref: u,
10
+ className: [e.breadcrumbs, c].filter(Boolean).join(" "),
11
+ children: /* @__PURE__ */ r("ol", {
12
+ className: e.list,
13
+ children: n.map((a, o) => {
14
+ let c = o === n.length - 1;
15
+ return /* @__PURE__ */ i("li", {
16
+ className: e.item,
17
+ children: [c ? /* @__PURE__ */ r("span", {
18
+ className: e.current,
19
+ "aria-current": "page",
20
+ children: a.label
21
+ }) : a.href ? s({
22
+ href: a.href,
23
+ className: e.link,
24
+ children: a.label
25
+ }) : /* @__PURE__ */ r("span", {
26
+ className: e.text,
27
+ children: a.label
28
+ }), !c && /* @__PURE__ */ r("span", {
29
+ className: e.separator,
30
+ "aria-hidden": "true",
31
+ children: /* @__PURE__ */ r(t, {
32
+ size: 14,
33
+ strokeWidth: 2
34
+ })
35
+ })]
36
+ }, o);
37
+ })
38
+ })
39
+ }));
40
+ o.displayName = "Breadcrumbs";
41
+ export { o as Breadcrumbs };
@@ -0,0 +1 @@
1
+ export { Breadcrumbs } from "./Breadcrumbs.js";
@@ -0,0 +1,11 @@
1
+ // src/components/Breadcrumbs/index.module.scss
2
+ var e = "matrix-breadcrumbs-breadcrumbs", t = "matrix-breadcrumbs-list", n = "matrix-breadcrumbs-item", r = "matrix-breadcrumbs-link", i = "matrix-breadcrumbs-text", a = "matrix-breadcrumbs-current", o = "matrix-breadcrumbs-separator", s = {
3
+ breadcrumbs: e,
4
+ list: t,
5
+ item: n,
6
+ link: r,
7
+ text: i,
8
+ current: a,
9
+ separator: o
10
+ };
11
+ export { e as breadcrumbs, a as current, s as default, n as item, r as link, t as list, o as separator, i as text };
@@ -1,3 +1,6 @@
1
- import { default as React } from 'react';
2
- import { ButtonProps } from '../../types/buttonType';
3
- export declare const Button: React.FC<ButtonProps>;
1
+ export declare const Button: import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
2
+ variant?: import("../../index.js").ButtonVariant;
3
+ size?: import("../../index.js").ButtonSize;
4
+ iconOnly?: boolean;
5
+ loading?: boolean;
6
+ } & import("react").RefAttributes<HTMLButtonElement>>;