@lucasromero/matrix-ui 0.7.2 → 0.8.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.
- package/CHANGELOG.md +24 -0
- package/LICENSE +21 -0
- package/README.md +93 -61
- package/dist/components/Accordion/Accordion.d.ts +5 -0
- package/dist/components/Accordion/Accordion.js +40 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.module.js +10 -0
- package/dist/components/Alert/Alert.d.ts +11 -0
- package/dist/components/Alert/Alert.js +66 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/Alert/index.module.js +15 -0
- package/dist/components/Avatar/Avatar.d.ts +6 -0
- package/dist/components/Avatar/Avatar.js +36 -0
- package/dist/components/Avatar/helpers/getInitials.d.ts +1 -0
- package/dist/components/Avatar/helpers/getInitials.js +6 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar/index.module.js +9 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +7 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +35 -0
- package/dist/components/AvatarGroup/index.d.ts +1 -0
- package/dist/components/AvatarGroup/index.module.js +9 -0
- package/dist/components/Badge/Badge.d.ts +5 -3
- package/dist/components/Badge/Badge.js +21 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Badge/index.module.js +10 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +41 -0
- package/dist/components/Breadcrumbs/index.d.ts +1 -0
- package/dist/components/Breadcrumbs/index.module.js +11 -0
- package/dist/components/Button/Button.d.ts +6 -3
- package/dist/components/Button/Button.js +27 -0
- package/dist/components/Button/ButtonLink.d.ts +6 -0
- package/dist/components/Button/ButtonLink.js +16 -0
- package/dist/components/Button/buttonClassName.d.ts +2 -0
- package/dist/components/Button/buttonClassName.js +11 -0
- package/dist/components/Button/index.d.ts +2 -1
- package/dist/components/Button/index.module.js +13 -0
- package/dist/components/Card/Card.d.ts +3 -3
- package/dist/components/Card/Card.js +10 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/index.module.js +3 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.js +21 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Checkbox/index.module.js +7 -0
- package/dist/components/Chip/Chip.d.ts +7 -0
- package/dist/components/Chip/Chip.js +34 -0
- package/dist/components/Chip/index.d.ts +1 -0
- package/dist/components/Chip/index.module.js +10 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +8 -0
- package/dist/components/CodeBlock/CodeBlock.js +47 -0
- package/dist/components/CodeBlock/index.d.ts +1 -0
- package/dist/components/CodeBlock/index.module.js +9 -0
- package/dist/components/Combobox/Combobox.d.ts +11 -0
- package/dist/components/Combobox/Combobox.js +123 -0
- package/dist/components/Combobox/index.d.ts +1 -0
- package/dist/components/Combobox/index.module.js +12 -0
- package/dist/components/Container/Container.d.ts +5 -0
- package/dist/components/Container/Container.js +15 -0
- package/dist/components/Container/index.d.ts +1 -0
- package/dist/components/Container/index.module.js +21 -0
- package/dist/components/DateInput/DateInput.d.ts +4 -0
- package/dist/components/DateInput/DateInput.js +54 -0
- package/dist/components/DateInput/index.d.ts +1 -0
- package/dist/components/DateInput/index.module.js +7 -0
- package/dist/components/DescriptionList/DescriptionList.d.ts +5 -0
- package/dist/components/DescriptionList/DescriptionList.js +26 -0
- package/dist/components/DescriptionList/index.d.ts +1 -0
- package/dist/components/DescriptionList/index.module.js +10 -0
- package/dist/components/Dialog/Dialog.d.ts +14 -0
- package/dist/components/Dialog/Dialog.js +73 -0
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/Dialog/index.module.js +16 -0
- package/dist/components/Divider/Divider.d.ts +5 -0
- package/dist/components/Divider/Divider.js +18 -0
- package/dist/components/Divider/index.d.ts +1 -0
- package/dist/components/Divider/index.module.js +19 -0
- package/dist/components/Drawer/Drawer.d.ts +3 -0
- package/dist/components/Drawer/Drawer.js +73 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/Drawer/index.module.js +17 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +11 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +95 -0
- package/dist/components/DropdownMenu/index.d.ts +1 -0
- package/dist/components/DropdownMenu/index.module.js +11 -0
- package/dist/components/EmptyState/EmptyState.d.ts +8 -0
- package/dist/components/EmptyState/EmptyState.js +39 -0
- package/dist/components/EmptyState/index.d.ts +1 -0
- package/dist/components/EmptyState/index.module.js +10 -0
- package/dist/components/FileUpload/FileUpload.d.ts +7 -0
- package/dist/components/FileUpload/FileUpload.js +116 -0
- package/dist/components/FileUpload/helpers/formatFileSize.d.ts +1 -0
- package/dist/components/FileUpload/helpers/formatFileSize.js +12 -0
- package/dist/components/FileUpload/helpers/matchesAccept.d.ts +1 -0
- package/dist/components/FileUpload/helpers/matchesAccept.js +7 -0
- package/dist/components/FileUpload/index.d.ts +1 -0
- package/dist/components/FileUpload/index.module.js +16 -0
- package/dist/components/FormField/FormField.d.ts +11 -0
- package/dist/components/FormField/FormField.js +35 -0
- package/dist/components/FormField/index.d.ts +1 -0
- package/dist/components/FormField/index.module.js +8 -0
- package/dist/components/Heading/Heading.d.ts +4 -0
- package/dist/components/Heading/Heading.js +14 -0
- package/dist/components/Heading/index.d.ts +1 -0
- package/dist/components/Heading/index.module.js +9 -0
- package/dist/components/Inline/Inline.d.ts +7 -0
- package/dist/components/Inline/Inline.js +17 -0
- package/dist/components/Inline/index.d.ts +1 -0
- package/dist/components/Inline/index.module.js +27 -0
- package/dist/components/Input/Input.d.ts +2 -0
- package/dist/components/Input/Input.js +11 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/index.module.js +3 -0
- package/dist/components/Link/Link.d.ts +3 -3
- package/dist/components/Link/Link.js +11 -0
- package/dist/components/Link/index.d.ts +1 -0
- package/dist/components/Link/index.module.js +3 -0
- package/dist/components/Navigation/Navigation.d.ts +14 -0
- package/dist/components/Navigation/Navigation.js +75 -0
- package/dist/components/Navigation/NavigationMenu.d.ts +6 -0
- package/dist/components/Navigation/NavigationMenu.js +48 -0
- package/dist/components/Navigation/index.d.ts +2 -0
- package/dist/components/Navigation/index.module.js +20 -0
- package/dist/components/NumberInput/NumberInput.d.ts +10 -0
- package/dist/components/NumberInput/NumberInput.js +80 -0
- package/dist/components/NumberInput/index.d.ts +1 -0
- package/dist/components/NumberInput/index.module.js +7 -0
- package/dist/components/OtpInput/OtpInput.d.ts +8 -0
- package/dist/components/OtpInput/OtpInput.js +47 -0
- package/dist/components/OtpInput/index.d.ts +1 -0
- package/dist/components/OtpInput/index.module.js +9 -0
- package/dist/components/PageHeader/PageHeader.d.ts +8 -0
- package/dist/components/PageHeader/PageHeader.js +39 -0
- package/dist/components/PageHeader/index.d.ts +1 -0
- package/dist/components/PageHeader/index.module.js +8 -0
- package/dist/components/Pagination/Pagination.d.ts +14 -0
- package/dist/components/Pagination/Pagination.js +81 -0
- package/dist/components/Pagination/helpers/getPaginationItems.d.ts +1 -0
- package/dist/components/Pagination/helpers/getPaginationItems.js +22 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/Pagination/index.module.js +11 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +3 -0
- package/dist/components/PasswordInput/PasswordInput.js +42 -0
- package/dist/components/PasswordInput/index.d.ts +1 -0
- package/dist/components/PasswordInput/index.module.js +7 -0
- package/dist/components/Phone/Phone.d.ts +7 -0
- package/dist/components/Phone/Phone.js +19 -0
- package/dist/components/Phone/helpers/formatPhoneNumber.d.ts +14 -0
- package/dist/components/Phone/helpers/formatPhoneNumber.js +15 -0
- package/dist/components/Phone/index.d.ts +1 -0
- package/dist/components/Popover/Popover.d.ts +11 -0
- package/dist/components/Popover/Popover.js +51 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Popover/index.module.js +7 -0
- package/dist/components/Progress/Progress.d.ts +10 -0
- package/dist/components/Progress/Progress.js +74 -0
- package/dist/components/Progress/index.d.ts +1 -0
- package/dist/components/Progress/index.module.js +21 -0
- package/dist/components/Radio/Radio.d.ts +3 -0
- package/dist/components/Radio/Radio.js +21 -0
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/Radio/index.module.js +7 -0
- package/dist/components/RelatedLinks/RelatedLinks.d.ts +6 -0
- package/dist/components/RelatedLinks/RelatedLinks.js +39 -0
- package/dist/components/RelatedLinks/index.d.ts +1 -0
- package/dist/components/RelatedLinks/index.module.js +11 -0
- package/dist/components/SearchInput/SearchInput.d.ts +3 -0
- package/dist/components/SearchInput/SearchInput.js +28 -0
- package/dist/components/SearchInput/index.d.ts +1 -0
- package/dist/components/SearchInput/index.module.js +8 -0
- package/dist/components/Select/Select.d.ts +2 -0
- package/dist/components/Select/Select.js +31 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Select/index.module.js +8 -0
- package/dist/components/SideNav/SideNav.d.ts +6 -0
- package/dist/components/SideNav/SideNav.js +38 -0
- package/dist/components/SideNav/index.d.ts +1 -0
- package/dist/components/SideNav/index.module.js +10 -0
- package/dist/components/Skeleton/Skeleton.d.ts +6 -0
- package/dist/components/Skeleton/Skeleton.js +39 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Skeleton/index.module.js +11 -0
- package/dist/components/Slider/Slider.d.ts +10 -0
- package/dist/components/Slider/Slider.js +37 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Slider/index.module.js +7 -0
- package/dist/components/Spinner/Spinner.d.ts +4 -0
- package/dist/components/Spinner/Spinner.js +24 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Spinner/index.module.js +10 -0
- package/dist/components/Stack/Stack.d.ts +5 -0
- package/dist/components/Stack/Stack.js +15 -0
- package/dist/components/Stack/index.d.ts +1 -0
- package/dist/components/Stack/index.module.js +21 -0
- package/dist/components/Stepper/Stepper.d.ts +6 -0
- package/dist/components/Stepper/Stepper.js +50 -0
- package/dist/components/Stepper/index.d.ts +1 -0
- package/dist/components/Stepper/index.module.js +15 -0
- package/dist/components/Switch/Switch.d.ts +3 -0
- package/dist/components/Switch/Switch.js +22 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Switch/index.module.js +7 -0
- package/dist/components/Table/Table.d.ts +3 -0
- package/dist/components/Table/Table.js +34 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.module.js +9 -0
- package/dist/components/Tabs/Tabs.d.ts +8 -0
- package/dist/components/Tabs/Tabs.js +63 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/index.module.js +9 -0
- package/dist/components/Text/Text.d.ts +3 -3
- package/dist/components/Text/Text.js +15 -0
- package/dist/components/Text/index.d.ts +1 -0
- package/dist/components/Text/index.module.js +10 -0
- package/dist/components/TextTag/TextTag.d.ts +5 -0
- package/dist/components/TextTag/TextTag.js +19 -0
- package/dist/components/TextTag/index.d.ts +1 -0
- package/dist/components/TextTag/index.module.js +7 -0
- package/dist/components/Textarea/Textarea.d.ts +2 -0
- package/dist/components/Textarea/Textarea.js +11 -0
- package/dist/components/Textarea/index.d.ts +1 -0
- package/dist/components/Textarea/index.module.js +3 -0
- package/dist/components/TimeInput/TimeInput.d.ts +4 -0
- package/dist/components/TimeInput/TimeInput.js +54 -0
- package/dist/components/TimeInput/index.d.ts +1 -0
- package/dist/components/TimeInput/index.module.js +7 -0
- package/dist/components/Toast/Toast.d.ts +4 -0
- package/dist/components/Toast/Toast.js +26 -0
- package/dist/components/Toast/index.d.ts +1 -0
- package/dist/components/Toast/index.module.js +8 -0
- package/dist/components/Toggle/Toggle.d.ts +4 -0
- package/dist/components/Toggle/Toggle.js +20 -0
- package/dist/components/Toggle/index.d.ts +1 -0
- package/dist/components/Toggle/index.module.js +7 -0
- package/dist/components/Tooltip/Tooltip.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.js +48 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Tooltip/index.module.js +7 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +3 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +15 -0
- package/dist/components/VisuallyHidden/index.d.ts +1 -0
- package/dist/components/VisuallyHidden/index.module.js +6 -0
- package/dist/hooks/useAnchoredPosition.d.ts +6 -0
- package/dist/hooks/useAnchoredPosition.js +40 -0
- package/dist/hooks/useDisclosure.d.ts +2 -0
- package/dist/hooks/useDisclosure.js +23 -0
- package/dist/hooks/useDismiss.d.ts +3 -0
- package/dist/hooks/useDismiss.js +22 -0
- package/dist/hooks/useMediaQuery.d.ts +2 -0
- package/dist/hooks/useMediaQuery.js +12 -0
- package/dist/hooks/useModalDialog.d.ts +9 -0
- package/dist/hooks/useModalDialog.js +54 -0
- package/dist/hooks/useOpenState.d.ts +1 -0
- package/dist/hooks/useOpenState.js +14 -0
- package/dist/index.d.ts +117 -3
- package/dist/index.js +62 -0
- package/dist/styles.css +2 -0
- package/dist/types/accordionType.d.ts +19 -0
- package/dist/types/alertType.d.ts +30 -0
- package/dist/types/avatarGroupType.d.ts +20 -0
- package/dist/types/avatarType.d.ts +15 -0
- package/dist/types/badgeType.d.ts +11 -8
- package/dist/types/breadcrumbsType.d.ts +23 -0
- package/dist/types/buttonLinkType.d.ts +19 -0
- package/dist/types/buttonType.d.ts +27 -9
- package/dist/types/cardType.d.ts +9 -43
- package/dist/types/checkboxType.d.ts +9 -0
- package/dist/types/chipType.d.ts +18 -0
- package/dist/types/codeBlockType.d.ts +19 -0
- package/dist/types/comboboxType.d.ts +27 -0
- package/dist/types/containerType.d.ts +11 -0
- package/dist/types/dateInputType.d.ts +7 -0
- package/dist/types/descriptionListType.d.ts +20 -0
- package/dist/types/dialogType.d.ts +38 -0
- package/dist/types/dividerType.d.ts +14 -0
- package/dist/types/drawerType.d.ts +7 -0
- package/dist/types/dropdownMenuType.d.ts +36 -0
- package/dist/types/emptyStateType.d.ts +16 -0
- package/dist/types/fileUploadType.d.ts +13 -0
- package/dist/types/formFieldType.d.ts +26 -0
- package/dist/types/headingType.d.ts +12 -0
- package/dist/types/index.d.ts +61 -11
- package/dist/types/inlineType.d.ts +17 -0
- package/dist/types/inputType.d.ts +8 -0
- package/dist/types/linkType.d.ts +8 -9
- package/dist/types/navigationMenuType.d.ts +14 -0
- package/dist/types/navigationType.d.ts +42 -0
- package/dist/types/numberInputType.d.ts +19 -0
- package/dist/types/otpInputType.d.ts +16 -0
- package/dist/types/pageHeaderType.d.ts +19 -0
- package/dist/types/paginationType.d.ts +37 -0
- package/dist/types/passwordInputType.d.ts +5 -0
- package/dist/types/phoneType.d.ts +19 -0
- package/dist/types/popoverType.d.ts +31 -0
- package/dist/types/progressType.d.ts +21 -0
- package/dist/types/radioType.d.ts +9 -0
- package/dist/types/relatedLinksType.d.ts +25 -0
- package/dist/types/searchInputType.d.ts +6 -0
- package/dist/types/selectType.d.ts +8 -0
- package/dist/types/sideNavType.d.ts +35 -0
- package/dist/types/skeletonType.d.ts +12 -0
- package/dist/types/sliderType.d.ts +19 -0
- package/dist/types/spaceType.d.ts +2 -0
- package/dist/types/spinnerType.d.ts +12 -0
- package/dist/types/stackType.d.ts +15 -0
- package/dist/types/stepperType.d.ts +27 -0
- package/dist/types/switchType.d.ts +9 -0
- package/dist/types/tableType.d.ts +26 -0
- package/dist/types/tabsType.d.ts +30 -0
- package/dist/types/textTagType.d.ts +9 -0
- package/dist/types/textType.d.ts +5 -15
- package/dist/types/textareaType.d.ts +8 -0
- package/dist/types/timeInputType.d.ts +7 -0
- package/dist/types/toastType.d.ts +7 -0
- package/dist/types/toggleType.d.ts +7 -0
- package/dist/types/tooltipType.d.ts +22 -0
- package/dist/types/useDisclosureType.d.ts +30 -0
- package/dist/types/useMediaQueryType.d.ts +4 -0
- package/dist/types/visuallyHiddenType.d.ts +5 -0
- package/package.json +54 -75
- package/dist/components/CardRow/CardRow.d.ts +0 -3
- package/dist/components/IconDropdown/IconDropdown.d.ts +0 -3
- package/dist/components/Image/Image.d.ts +0 -3
- package/dist/components/Navbar/Navbar.d.ts +0 -3
- package/dist/components/Rating/Rating.d.ts +0 -3
- package/dist/components/SelectDropdown/SelectDropdown.d.ts +0 -3
- package/dist/components/index.d.ts +0 -11
- package/dist/favicon.svg +0 -1
- package/dist/fonts/Inter-400.woff2 +0 -11
- package/dist/fonts/Inter-500.woff2 +0 -11
- package/dist/fonts/Inter-600.woff2 +0 -11
- package/dist/fonts/Inter-700.woff2 +0 -11
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useBreakpoint.d.ts +0 -7
- package/dist/icons.svg +0 -24
- package/dist/matrix-ui.es.js +0 -680
- package/dist/matrix-ui.umd.js +0 -2
- package/dist/types/cardRowType.d.ts +0 -34
- package/dist/types/iconDropdownType.d.ts +0 -16
- package/dist/types/imageType.d.ts +0 -11
- package/dist/types/navbarType.d.ts +0 -27
- package/dist/types/ratingType.d.ts +0 -3
- package/dist/types/selectDropdownType.d.ts +0 -15
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import e from "./index.module.js";
|
|
2
|
+
import { forwardRef as t, useId as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
// src/components/SideNav/SideNav.tsx
|
|
5
|
+
var a = (e) => /* @__PURE__ */ r("a", { ...e }), o = t(({ sections: t, label: o = "Section navigation", renderLink: s = a, className: c, ...l }, u) => {
|
|
6
|
+
let d = n();
|
|
7
|
+
return /* @__PURE__ */ r("nav", {
|
|
8
|
+
"aria-label": o,
|
|
9
|
+
...l,
|
|
10
|
+
ref: u,
|
|
11
|
+
className: [e.sideNav, c].filter(Boolean).join(" "),
|
|
12
|
+
children: t.filter((e) => e.items.length > 0).map((t, n) => {
|
|
13
|
+
let a = `${d}-${n}`;
|
|
14
|
+
return /* @__PURE__ */ i("div", {
|
|
15
|
+
className: e.section,
|
|
16
|
+
children: [/* @__PURE__ */ r("p", {
|
|
17
|
+
id: a,
|
|
18
|
+
className: e.title,
|
|
19
|
+
children: t.title
|
|
20
|
+
}), /* @__PURE__ */ r("ul", {
|
|
21
|
+
className: e.list,
|
|
22
|
+
"aria-labelledby": a,
|
|
23
|
+
children: t.items.map((t, n) => /* @__PURE__ */ r("li", { children: t.href ? s({
|
|
24
|
+
href: t.href,
|
|
25
|
+
className: e.link,
|
|
26
|
+
children: t.label,
|
|
27
|
+
...t.current ? { "aria-current": "page" } : {}
|
|
28
|
+
}) : /* @__PURE__ */ r("span", {
|
|
29
|
+
className: e.placeholder,
|
|
30
|
+
children: t.label
|
|
31
|
+
}) }, t.href ?? n))
|
|
32
|
+
})]
|
|
33
|
+
}, t.title);
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
o.displayName = "SideNav";
|
|
38
|
+
export { o as SideNav };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SideNav } from "./SideNav.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/components/SideNav/index.module.scss
|
|
2
|
+
var e = "matrix-sidenav-sideNav", t = "matrix-sidenav-section", n = "matrix-sidenav-title", r = "matrix-sidenav-list", i = "matrix-sidenav-link", a = "matrix-sidenav-placeholder", o = {
|
|
3
|
+
sideNav: e,
|
|
4
|
+
section: t,
|
|
5
|
+
title: n,
|
|
6
|
+
list: r,
|
|
7
|
+
link: i,
|
|
8
|
+
placeholder: a
|
|
9
|
+
};
|
|
10
|
+
export { o as default, i as link, r as list, a as placeholder, t as section, e as sideNav, n as title };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Skeleton: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
2
|
+
variant?: import("../../index.js").SkeletonVariant;
|
|
3
|
+
width?: string | number;
|
|
4
|
+
height?: string | number;
|
|
5
|
+
lines?: number;
|
|
6
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import e from "./index.module.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
5
|
+
var r = (e) => typeof e == "number" ? `${e}px` : e, i = t(({ variant: t = "text", width: i, height: a, lines: o = 1, className: s, style: c, ...l }, u) => {
|
|
6
|
+
let d = {
|
|
7
|
+
width: r(i ?? (t === "circle" ? a : void 0)),
|
|
8
|
+
height: r(a ?? (t === "circle" ? i : void 0))
|
|
9
|
+
}, f = (n) => [
|
|
10
|
+
e.skeleton,
|
|
11
|
+
e[t],
|
|
12
|
+
n
|
|
13
|
+
].filter(Boolean).join(" ");
|
|
14
|
+
return t === "text" && o > 1 ? /* @__PURE__ */ n("span", {
|
|
15
|
+
...l,
|
|
16
|
+
ref: u,
|
|
17
|
+
"aria-hidden": "true",
|
|
18
|
+
className: [e.lines, s].filter(Boolean).join(" "),
|
|
19
|
+
style: {
|
|
20
|
+
width: d.width,
|
|
21
|
+
...c
|
|
22
|
+
},
|
|
23
|
+
children: Array.from({ length: o }, (t, r) => /* @__PURE__ */ n("span", {
|
|
24
|
+
className: f(r === o - 1 ? e.lastLine : void 0),
|
|
25
|
+
style: { height: d.height }
|
|
26
|
+
}, r))
|
|
27
|
+
}) : /* @__PURE__ */ n("span", {
|
|
28
|
+
...l,
|
|
29
|
+
ref: u,
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
className: f(s),
|
|
32
|
+
style: {
|
|
33
|
+
...d,
|
|
34
|
+
...c
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
i.displayName = "Skeleton";
|
|
39
|
+
export { i as Skeleton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Skeleton } from "./Skeleton.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/components/Skeleton/index.module.scss
|
|
2
|
+
var e = "matrix-skeleton-skeleton", t = "matrix-skeleton-pulse", n = "matrix-skeleton-text", r = "matrix-skeleton-rectangle", i = "matrix-skeleton-circle", a = "matrix-skeleton-lines", o = "matrix-skeleton-lastLine", s = {
|
|
3
|
+
skeleton: e,
|
|
4
|
+
pulse: t,
|
|
5
|
+
text: n,
|
|
6
|
+
rectangle: r,
|
|
7
|
+
circle: i,
|
|
8
|
+
lines: a,
|
|
9
|
+
lastLine: o
|
|
10
|
+
};
|
|
11
|
+
export { i as circle, s as default, o as lastLine, a as lines, t as pulse, r as rectangle, e as skeleton, n as text };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const Slider: import("react").ForwardRefExoticComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "children" | "defaultValue" | "type" | "value"> & {
|
|
2
|
+
value?: number;
|
|
3
|
+
defaultValue?: number;
|
|
4
|
+
onValueChange?: (value: number) => void;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
showValue?: boolean;
|
|
9
|
+
getValueText?: (value: number) => string;
|
|
10
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import e from "./index.module.js";
|
|
3
|
+
import { forwardRef as t, useState as n } from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Slider/Slider.tsx
|
|
6
|
+
var a = t(({ value: t, defaultValue: a, onValueChange: o, min: s = 0, max: c = 100, step: l = 1, showValue: u = !1, getValueText: d, className: f, style: p, onChange: m, ...h }, g) => {
|
|
7
|
+
let [_, v] = n(a ?? (s + c) / 2), y = t !== void 0, b = Math.min(c, Math.max(s, y ? t : _)), x = c > s ? (b - s) / (c - s) * 100 : 0, S = d?.(b), C = (e) => {
|
|
8
|
+
m?.(e);
|
|
9
|
+
let t = Number(e.target.value);
|
|
10
|
+
y || v(t), o?.(t);
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ i("div", {
|
|
13
|
+
className: e.slider,
|
|
14
|
+
children: [/* @__PURE__ */ r("input", {
|
|
15
|
+
...h,
|
|
16
|
+
ref: g,
|
|
17
|
+
type: "range",
|
|
18
|
+
min: s,
|
|
19
|
+
max: c,
|
|
20
|
+
step: l,
|
|
21
|
+
value: b,
|
|
22
|
+
"aria-valuetext": S ?? h["aria-valuetext"],
|
|
23
|
+
className: [e.input, f].filter(Boolean).join(" "),
|
|
24
|
+
style: {
|
|
25
|
+
"--matrix-slider-fill": `${x}%`,
|
|
26
|
+
...p
|
|
27
|
+
},
|
|
28
|
+
onChange: C
|
|
29
|
+
}), u && /* @__PURE__ */ r("span", {
|
|
30
|
+
className: e.value,
|
|
31
|
+
"aria-hidden": "true",
|
|
32
|
+
children: S ?? b
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
a.displayName = "Slider";
|
|
37
|
+
export { a as Slider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Slider } from "./Slider.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const Spinner: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLSpanElement>, "children" | "role"> & {
|
|
2
|
+
size?: import("../../index.js").SpinnerSize;
|
|
3
|
+
label?: string | null;
|
|
4
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
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/Spinner/Spinner.tsx
|
|
5
|
+
var i = t(({ size: t = "medium", label: i = "Loading", className: a, ...o }, s) => {
|
|
6
|
+
let c = i === null;
|
|
7
|
+
return /* @__PURE__ */ r("span", {
|
|
8
|
+
...o,
|
|
9
|
+
ref: s,
|
|
10
|
+
role: c ? void 0 : "status",
|
|
11
|
+
"aria-hidden": c ? !0 : o["aria-hidden"],
|
|
12
|
+
className: [
|
|
13
|
+
e.spinner,
|
|
14
|
+
e[t],
|
|
15
|
+
a
|
|
16
|
+
].filter(Boolean).join(" "),
|
|
17
|
+
children: [/* @__PURE__ */ n("span", { className: e.ring }), !c && /* @__PURE__ */ n("span", {
|
|
18
|
+
className: e.label,
|
|
19
|
+
children: i
|
|
20
|
+
})]
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
i.displayName = "Spinner";
|
|
24
|
+
export { i as Spinner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Spinner } from "./Spinner.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/components/Spinner/index.module.scss
|
|
2
|
+
var e = "matrix-spinner-spinner", t = "matrix-spinner-small", n = "matrix-spinner-large", r = "matrix-spinner-ring", i = "matrix-spinner-spin", a = "matrix-spinner-label", o = {
|
|
3
|
+
spinner: e,
|
|
4
|
+
small: t,
|
|
5
|
+
large: n,
|
|
6
|
+
ring: r,
|
|
7
|
+
spin: i,
|
|
8
|
+
label: a
|
|
9
|
+
};
|
|
10
|
+
export { o as default, a as label, n as large, r as ring, t as small, i as spin, e as spinner };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const Stack: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLElement> & {
|
|
2
|
+
gap?: import("../../index.js").SpaceToken;
|
|
3
|
+
align?: import("../../index.js").StackAlign;
|
|
4
|
+
as?: import("../../index.js").LayoutElement;
|
|
5
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import e from "./index.module.js";
|
|
2
|
+
import { createElement as t, forwardRef as n } from "react";
|
|
3
|
+
// src/components/Stack/Stack.tsx
|
|
4
|
+
var r = n(({ as: n = "div", gap: r = 4, align: i = "stretch", className: a, ...o }, s) => t(n, {
|
|
5
|
+
...o,
|
|
6
|
+
ref: s,
|
|
7
|
+
className: [
|
|
8
|
+
e.stack,
|
|
9
|
+
e[`gap${r}`],
|
|
10
|
+
e[i],
|
|
11
|
+
a
|
|
12
|
+
].filter(Boolean).join(" ")
|
|
13
|
+
}));
|
|
14
|
+
r.displayName = "Stack";
|
|
15
|
+
export { r as Stack };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stack } from "./Stack.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/components/Stack/index.module.scss
|
|
2
|
+
var e = "matrix-stack-stack", t = "matrix-stack-gap0", n = "matrix-stack-gap1", r = "matrix-stack-gap2", i = "matrix-stack-gap3", a = "matrix-stack-gap4", o = "matrix-stack-gap5", s = "matrix-stack-gap6", c = "matrix-stack-gap8", l = "matrix-stack-gap10", u = "matrix-stack-gap12", d = "matrix-stack-gap16", f = "matrix-stack-gap20", p = "matrix-stack-start", m = "matrix-stack-center", h = "matrix-stack-end", g = "matrix-stack-stretch", _ = {
|
|
3
|
+
stack: e,
|
|
4
|
+
gap0: t,
|
|
5
|
+
gap1: n,
|
|
6
|
+
gap2: r,
|
|
7
|
+
gap3: i,
|
|
8
|
+
gap4: a,
|
|
9
|
+
gap5: o,
|
|
10
|
+
gap6: s,
|
|
11
|
+
gap8: c,
|
|
12
|
+
gap10: l,
|
|
13
|
+
gap12: u,
|
|
14
|
+
gap16: d,
|
|
15
|
+
gap20: f,
|
|
16
|
+
start: p,
|
|
17
|
+
center: m,
|
|
18
|
+
end: h,
|
|
19
|
+
stretch: g
|
|
20
|
+
};
|
|
21
|
+
export { m as center, _ as default, h as end, t as gap0, n as gap1, l as gap10, u as gap12, d as gap16, r as gap2, f as gap20, i as gap3, a as gap4, o as gap5, s as gap6, c as gap8, e as stack, p as start, g as stretch };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Stepper: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLOListElement>, "children"> & {
|
|
2
|
+
steps: import("../../index.js").StepperStep[];
|
|
3
|
+
current: number;
|
|
4
|
+
orientation?: import("../../index.js").StepperOrientation;
|
|
5
|
+
statusLabels?: Partial<import("../../index.js").StepperStatusLabels>;
|
|
6
|
+
} & import("react").RefAttributes<HTMLOListElement>>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import e from "./index.module.js";
|
|
2
|
+
import { Check 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/Stepper/Stepper.tsx
|
|
6
|
+
var a = n(({ steps: n, current: a, orientation: o = "horizontal", statusLabels: s, className: c, ...l }, u) => {
|
|
7
|
+
let d = {
|
|
8
|
+
complete: "Completed",
|
|
9
|
+
upcoming: "Not started",
|
|
10
|
+
...s
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ r("ol", {
|
|
13
|
+
...l,
|
|
14
|
+
ref: u,
|
|
15
|
+
className: [
|
|
16
|
+
e.stepper,
|
|
17
|
+
e[o],
|
|
18
|
+
c
|
|
19
|
+
].filter(Boolean).join(" "),
|
|
20
|
+
children: n.map((n, o) => {
|
|
21
|
+
let s = o < a ? "complete" : o === a ? "current" : "upcoming";
|
|
22
|
+
return /* @__PURE__ */ i("li", {
|
|
23
|
+
className: [e.step, e[s]].join(" "),
|
|
24
|
+
"aria-current": s === "current" ? "step" : void 0,
|
|
25
|
+
children: [/* @__PURE__ */ r("span", {
|
|
26
|
+
className: e.indicator,
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
children: s === "complete" ? /* @__PURE__ */ r(t, {
|
|
29
|
+
size: 14,
|
|
30
|
+
strokeWidth: 2.5
|
|
31
|
+
}) : o + 1
|
|
32
|
+
}), /* @__PURE__ */ i("span", {
|
|
33
|
+
className: e.text,
|
|
34
|
+
children: [/* @__PURE__ */ i("span", {
|
|
35
|
+
className: e.label,
|
|
36
|
+
children: [n.label, s !== "current" && /* @__PURE__ */ i("span", {
|
|
37
|
+
className: e.status,
|
|
38
|
+
children: [", ", d[s]]
|
|
39
|
+
})]
|
|
40
|
+
}), n.description != null && /* @__PURE__ */ r("span", {
|
|
41
|
+
className: e.description,
|
|
42
|
+
children: n.description
|
|
43
|
+
})]
|
|
44
|
+
})]
|
|
45
|
+
}, o);
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
a.displayName = "Stepper";
|
|
50
|
+
export { a as Stepper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stepper } from "./Stepper.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/components/Stepper/index.module.scss
|
|
2
|
+
var e = "matrix-stepper-stepper", t = "matrix-stepper-step", n = "matrix-stepper-horizontal", r = "matrix-stepper-complete", i = "matrix-stepper-vertical", a = "matrix-stepper-indicator", o = "matrix-stepper-current", s = "matrix-stepper-text", c = "matrix-stepper-label", l = "matrix-stepper-description", u = "matrix-stepper-status", d = {
|
|
3
|
+
stepper: e,
|
|
4
|
+
step: t,
|
|
5
|
+
horizontal: n,
|
|
6
|
+
complete: r,
|
|
7
|
+
vertical: i,
|
|
8
|
+
indicator: a,
|
|
9
|
+
current: o,
|
|
10
|
+
text: s,
|
|
11
|
+
label: c,
|
|
12
|
+
description: l,
|
|
13
|
+
status: u
|
|
14
|
+
};
|
|
15
|
+
export { r as complete, o as current, d as default, l as description, n as horizontal, a as indicator, c as label, u as status, t as step, e as stepper, s as text, i as vertical };
|
|
@@ -0,0 +1,22 @@
|
|
|
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/Switch/Switch.tsx
|
|
5
|
+
var i = t(({ label: t, className: i, ...a }, o) => {
|
|
6
|
+
let s = /* @__PURE__ */ n("input", {
|
|
7
|
+
...a,
|
|
8
|
+
ref: o,
|
|
9
|
+
type: "checkbox",
|
|
10
|
+
role: "switch",
|
|
11
|
+
className: [e.input, i].filter(Boolean).join(" ")
|
|
12
|
+
});
|
|
13
|
+
return t == null ? s : /* @__PURE__ */ r("label", {
|
|
14
|
+
className: e.switch,
|
|
15
|
+
children: [s, /* @__PURE__ */ n("span", {
|
|
16
|
+
className: e.label,
|
|
17
|
+
children: t
|
|
18
|
+
})]
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
i.displayName = "Switch";
|
|
22
|
+
export { i as Switch };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Switch } from "./Switch.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
var i = t(({ caption: t, columns: i, rows: a, getRowKey: o, emptyMessage: s = "No rows to show", className: c, ...l }, u) => /* @__PURE__ */ r("table", {
|
|
5
|
+
...l,
|
|
6
|
+
ref: u,
|
|
7
|
+
className: [e.table, c].filter(Boolean).join(" "),
|
|
8
|
+
children: [
|
|
9
|
+
t && /* @__PURE__ */ n("caption", {
|
|
10
|
+
className: e.caption,
|
|
11
|
+
children: t
|
|
12
|
+
}),
|
|
13
|
+
/* @__PURE__ */ n("thead", { children: /* @__PURE__ */ n("tr", { children: i.map((t) => /* @__PURE__ */ n("th", {
|
|
14
|
+
scope: "col",
|
|
15
|
+
className: e.header,
|
|
16
|
+
children: t.header
|
|
17
|
+
}, t.key)) }) }),
|
|
18
|
+
/* @__PURE__ */ n("tbody", { children: a.length === 0 ? /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n("td", {
|
|
19
|
+
colSpan: i.length,
|
|
20
|
+
className: e.cell,
|
|
21
|
+
children: s
|
|
22
|
+
}) }) : a.map((t, r) => /* @__PURE__ */ n("tr", { children: i.map((r) => r.rowHeader ? /* @__PURE__ */ n("th", {
|
|
23
|
+
scope: "row",
|
|
24
|
+
className: e.rowHeader,
|
|
25
|
+
children: r.cell(t)
|
|
26
|
+
}, r.key) : /* @__PURE__ */ n("td", {
|
|
27
|
+
className: e.cell,
|
|
28
|
+
children: r.cell(t)
|
|
29
|
+
}, r.key)) }, o(t, r))) })
|
|
30
|
+
]
|
|
31
|
+
}));
|
|
32
|
+
i.displayName = "Table";
|
|
33
|
+
var a = i;
|
|
34
|
+
export { a as Table };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Table } from "./Table.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/components/Table/index.module.scss
|
|
2
|
+
var e = "matrix-table-table", t = "matrix-table-caption", n = "matrix-table-header", r = "matrix-table-rowHeader", i = "matrix-table-cell", a = {
|
|
3
|
+
table: e,
|
|
4
|
+
caption: t,
|
|
5
|
+
header: n,
|
|
6
|
+
rowHeader: r,
|
|
7
|
+
cell: i
|
|
8
|
+
};
|
|
9
|
+
export { t as caption, i as cell, a as default, n as header, r as rowHeader, e as table };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const Tabs: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "defaultValue"> & {
|
|
2
|
+
items: import("../../index.js").TabsItem[];
|
|
3
|
+
label: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
onValueChange?: (value: string) => void;
|
|
7
|
+
activation?: import("../../index.js").TabsActivation;
|
|
8
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import e from "./index.module.js";
|
|
3
|
+
import { forwardRef as t, useId as n, useRef as r, useState as i } from "react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Tabs/Tabs.tsx
|
|
6
|
+
var s = t(({ items: t, label: s, value: c, defaultValue: l, onValueChange: u, activation: d = "automatic", className: f, ...p }, m) => {
|
|
7
|
+
let h = n(), g = t.find((e) => !e.disabled)?.value, [_, v] = i(l ?? g), y = c !== void 0, b = y ? c : _, [x, S] = i(void 0), C = r(/* @__PURE__ */ new Map()), w = t.some((e) => e.value === b && !e.disabled), T = x && t.some((e) => e.value === x && !e.disabled) ? x : w ? b : g, E = (e) => {
|
|
8
|
+
e !== b && (y || v(e), u?.(e));
|
|
9
|
+
}, D = (e) => `${h}-tab-${e}`, O = (e) => `${h}-panel-${e}`, k = (e) => {
|
|
10
|
+
let n = t.filter((e) => !e.disabled), r = n.findIndex((e) => e.value === T);
|
|
11
|
+
if (n.length === 0 || r === -1) return;
|
|
12
|
+
let i = getComputedStyle(e.currentTarget).direction === "rtl", a = i ? "ArrowLeft" : "ArrowRight", o = i ? "ArrowRight" : "ArrowLeft", s = n.length - 1, c = e.key === a ? r === s ? 0 : r + 1 : e.key === o ? r === 0 ? s : r - 1 : e.key === "Home" ? 0 : e.key === "End" ? s : -1;
|
|
13
|
+
if (c === -1) return;
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
let l = n[c].value;
|
|
16
|
+
S(l), C.current.get(l)?.focus(), d === "automatic" && E(l);
|
|
17
|
+
};
|
|
18
|
+
return /* @__PURE__ */ o("div", {
|
|
19
|
+
...p,
|
|
20
|
+
ref: m,
|
|
21
|
+
className: [e.tabs, f].filter(Boolean).join(" "),
|
|
22
|
+
children: [/* @__PURE__ */ a("div", {
|
|
23
|
+
role: "tablist",
|
|
24
|
+
"aria-label": s,
|
|
25
|
+
className: e.list,
|
|
26
|
+
onKeyDown: k,
|
|
27
|
+
onBlur: (e) => {
|
|
28
|
+
let t = e.relatedTarget;
|
|
29
|
+
t instanceof Node && e.currentTarget.contains(t) || S(void 0);
|
|
30
|
+
},
|
|
31
|
+
children: t.map((t, n) => {
|
|
32
|
+
let r = t.value === b;
|
|
33
|
+
return /* @__PURE__ */ a("button", {
|
|
34
|
+
ref: (e) => {
|
|
35
|
+
e ? C.current.set(t.value, e) : C.current.delete(t.value);
|
|
36
|
+
},
|
|
37
|
+
type: "button",
|
|
38
|
+
role: "tab",
|
|
39
|
+
id: D(n),
|
|
40
|
+
"aria-selected": r,
|
|
41
|
+
"aria-controls": O(n),
|
|
42
|
+
tabIndex: t.value === T ? 0 : -1,
|
|
43
|
+
disabled: t.disabled,
|
|
44
|
+
className: [e.tab, r && e.selected].filter(Boolean).join(" "),
|
|
45
|
+
onClick: () => {
|
|
46
|
+
S(t.value), E(t.value);
|
|
47
|
+
},
|
|
48
|
+
children: t.label
|
|
49
|
+
}, t.value);
|
|
50
|
+
})
|
|
51
|
+
}), t.map((t, n) => /* @__PURE__ */ a("div", {
|
|
52
|
+
role: "tabpanel",
|
|
53
|
+
id: O(n),
|
|
54
|
+
"aria-labelledby": D(n),
|
|
55
|
+
tabIndex: 0,
|
|
56
|
+
hidden: t.value !== b,
|
|
57
|
+
className: e.panel,
|
|
58
|
+
children: t.content
|
|
59
|
+
}, t.value))]
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
s.displayName = "Tabs";
|
|
63
|
+
export { s as Tabs };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tabs } from "./Tabs.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/components/Tabs/index.module.scss
|
|
2
|
+
var e = "matrix-tabs-tabs", t = "matrix-tabs-list", n = "matrix-tabs-tab", r = "matrix-tabs-selected", i = "matrix-tabs-panel", a = {
|
|
3
|
+
tabs: e,
|
|
4
|
+
list: t,
|
|
5
|
+
tab: n,
|
|
6
|
+
selected: r,
|
|
7
|
+
panel: i
|
|
8
|
+
};
|
|
9
|
+
export { a as default, t as list, i as panel, r as selected, n as tab, e as tabs };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
export declare const Text: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLParagraphElement> & {
|
|
2
|
+
variant?: import("../../index.js").TextVariant;
|
|
3
|
+
} & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import e from "./index.module.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
// src/components/Text/Text.tsx
|
|
5
|
+
var r = t(({ variant: t = "body", className: r, ...i }, a) => /* @__PURE__ */ n("p", {
|
|
6
|
+
...i,
|
|
7
|
+
ref: a,
|
|
8
|
+
className: [
|
|
9
|
+
e.text,
|
|
10
|
+
e[t],
|
|
11
|
+
r
|
|
12
|
+
].filter(Boolean).join(" ")
|
|
13
|
+
}));
|
|
14
|
+
r.displayName = "Text";
|
|
15
|
+
export { r as Text };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Text } from "./Text.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/components/Text/index.module.scss
|
|
2
|
+
var e = "matrix-text-text", t = "matrix-text-body", n = "matrix-text-lead", r = "matrix-text-muted", i = "matrix-text-subtle", a = "matrix-text-label", o = {
|
|
3
|
+
text: e,
|
|
4
|
+
body: t,
|
|
5
|
+
lead: n,
|
|
6
|
+
muted: r,
|
|
7
|
+
subtle: i,
|
|
8
|
+
label: a
|
|
9
|
+
};
|
|
10
|
+
export { t as body, o as default, a as label, n as lead, r as muted, i as subtle, e as text };
|
|
@@ -0,0 +1,19 @@
|
|
|
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/TextTag/TextTag.tsx
|
|
5
|
+
var i = t(({ tag: t, text: i, tagHidden: a = !1, className: o, ...s }, c) => /* @__PURE__ */ r("span", {
|
|
6
|
+
...s,
|
|
7
|
+
ref: c,
|
|
8
|
+
className: [e.textTag, o].filter(Boolean).join(" "),
|
|
9
|
+
children: [/* @__PURE__ */ n("span", {
|
|
10
|
+
className: e.tag,
|
|
11
|
+
"aria-hidden": a || void 0,
|
|
12
|
+
children: t
|
|
13
|
+
}), /* @__PURE__ */ n("span", {
|
|
14
|
+
className: e.text,
|
|
15
|
+
children: i
|
|
16
|
+
})]
|
|
17
|
+
}));
|
|
18
|
+
i.displayName = "TextTag";
|
|
19
|
+
export { i as TextTag };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextTag } from "./TextTag.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import e from "./index.module.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
// src/components/Textarea/Textarea.tsx
|
|
5
|
+
var r = t(({ className: t, ...r }, i) => /* @__PURE__ */ n("textarea", {
|
|
6
|
+
...r,
|
|
7
|
+
ref: i,
|
|
8
|
+
className: [e.textarea, t].filter(Boolean).join(" ")
|
|
9
|
+
}));
|
|
10
|
+
r.displayName = "Textarea";
|
|
11
|
+
export { r as Textarea };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Textarea } from "./Textarea.js";
|