@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,81 @@
|
|
|
1
|
+
import { Button as e } from "../Button/Button.js";
|
|
2
|
+
import { getButtonClassName as t } from "../Button/buttonClassName.js";
|
|
3
|
+
import { getPaginationItems as n } from "./helpers/getPaginationItems.js";
|
|
4
|
+
import r from "./index.module.js";
|
|
5
|
+
import { ChevronLeft as i, ChevronRight as a } from "lucide-react";
|
|
6
|
+
import { forwardRef as o } from "react";
|
|
7
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
// src/components/Pagination/Pagination.tsx
|
|
9
|
+
var u = (e) => /* @__PURE__ */ c("a", { ...e }), d = o(({ page: o, pageCount: d, onPageChange: f, getHref: p, renderLink: m = u, siblingCount: h = 1, label: g = "Pagination", previousLabel: _ = "Previous", nextLabel: v = "Next", getPageLabel: y = (e) => `Page ${e}`, className: b, ...x }, S) => {
|
|
10
|
+
let C = Math.max(0, Math.floor(d));
|
|
11
|
+
if (C < 2) return null;
|
|
12
|
+
let w = Math.min(Math.max(Math.floor(o), 1), C), T = (n, i, a) => {
|
|
13
|
+
let o = a.isCurrent ? "primary" : "ghost", s = [r.control, a.edge ? r.edge : r.page].filter(Boolean).join(" "), l = a.ariaLabel ?? y(n);
|
|
14
|
+
return p ? a.disabled ? /* @__PURE__ */ c("span", {
|
|
15
|
+
className: t({
|
|
16
|
+
variant: o,
|
|
17
|
+
size: "small",
|
|
18
|
+
iconOnly: !1,
|
|
19
|
+
className: `${s} ${r.disabled}`
|
|
20
|
+
}),
|
|
21
|
+
"aria-disabled": "true",
|
|
22
|
+
children: i
|
|
23
|
+
}) : m({
|
|
24
|
+
href: p(n),
|
|
25
|
+
className: t({
|
|
26
|
+
variant: o,
|
|
27
|
+
size: "small",
|
|
28
|
+
iconOnly: !1,
|
|
29
|
+
className: s
|
|
30
|
+
}),
|
|
31
|
+
children: i,
|
|
32
|
+
"aria-label": l,
|
|
33
|
+
...a.isCurrent ? { "aria-current": "page" } : {}
|
|
34
|
+
}) : /* @__PURE__ */ c(e, {
|
|
35
|
+
variant: o,
|
|
36
|
+
size: "small",
|
|
37
|
+
className: s,
|
|
38
|
+
"aria-label": a.edge ? void 0 : l,
|
|
39
|
+
"aria-current": a.isCurrent ? "page" : void 0,
|
|
40
|
+
disabled: a.disabled,
|
|
41
|
+
onClick: () => f?.(n),
|
|
42
|
+
children: i
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ c("nav", {
|
|
46
|
+
"aria-label": g,
|
|
47
|
+
...x,
|
|
48
|
+
ref: S,
|
|
49
|
+
className: [r.pagination, b].filter(Boolean).join(" "),
|
|
50
|
+
children: /* @__PURE__ */ l("ul", {
|
|
51
|
+
className: r.list,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ c("li", { children: T(w - 1, /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(i, {
|
|
54
|
+
size: 16,
|
|
55
|
+
className: r.chevron,
|
|
56
|
+
"aria-hidden": "true"
|
|
57
|
+
}), /* @__PURE__ */ c("span", { children: _ })] }), {
|
|
58
|
+
ariaLabel: _,
|
|
59
|
+
disabled: w === 1,
|
|
60
|
+
edge: !0
|
|
61
|
+
}) }),
|
|
62
|
+
n(w, C, h).map((e) => typeof e == "number" ? /* @__PURE__ */ c("li", { children: T(e, e, { isCurrent: e === w }) }, e) : /* @__PURE__ */ c("li", {
|
|
63
|
+
className: r.gap,
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
children: "…"
|
|
66
|
+
}, e)),
|
|
67
|
+
/* @__PURE__ */ c("li", { children: T(w + 1, /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("span", { children: v }), /* @__PURE__ */ c(a, {
|
|
68
|
+
size: 16,
|
|
69
|
+
className: r.chevron,
|
|
70
|
+
"aria-hidden": "true"
|
|
71
|
+
})] }), {
|
|
72
|
+
ariaLabel: v,
|
|
73
|
+
disabled: w === C,
|
|
74
|
+
edge: !0
|
|
75
|
+
}) })
|
|
76
|
+
]
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
d.displayName = "Pagination";
|
|
81
|
+
export { d as Pagination };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getPaginationItems: (page: number, pageCount: number, siblingCount: number) => (number | "gap-end" | "gap-start")[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/components/Pagination/helpers/getPaginationItems.ts
|
|
2
|
+
var e = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n), t = (t, n, r) => {
|
|
3
|
+
let i = Math.max(0, Math.floor(r));
|
|
4
|
+
if (n <= i * 2 + 5) return e(1, n);
|
|
5
|
+
let a = Math.max(t - i, 1), o = Math.min(t + i, n), s = 3 + i * 2;
|
|
6
|
+
return a <= 3 ? [
|
|
7
|
+
...e(1, s),
|
|
8
|
+
"gap-end",
|
|
9
|
+
n
|
|
10
|
+
] : o >= n - 2 ? [
|
|
11
|
+
1,
|
|
12
|
+
"gap-start",
|
|
13
|
+
...e(n - s + 1, n)
|
|
14
|
+
] : [
|
|
15
|
+
1,
|
|
16
|
+
"gap-start",
|
|
17
|
+
...e(a, o),
|
|
18
|
+
"gap-end",
|
|
19
|
+
n
|
|
20
|
+
];
|
|
21
|
+
};
|
|
22
|
+
export { t as getPaginationItems };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Pagination } from "./Pagination.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/components/Pagination/index.module.scss
|
|
2
|
+
var e = "matrix-pagination-pagination", t = "matrix-pagination-list", n = "matrix-pagination-page", r = "matrix-pagination-edge", i = "matrix-pagination-disabled", a = "matrix-pagination-gap", o = "matrix-pagination-chevron", s = {
|
|
3
|
+
pagination: e,
|
|
4
|
+
list: t,
|
|
5
|
+
page: n,
|
|
6
|
+
edge: r,
|
|
7
|
+
disabled: i,
|
|
8
|
+
gap: a,
|
|
9
|
+
chevron: o
|
|
10
|
+
};
|
|
11
|
+
export { o as chevron, s as default, i as disabled, r as edge, a as gap, t as list, n as page, e as pagination };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button as e } from "../Button/Button.js";
|
|
3
|
+
import { Input as t } from "../Input/Input.js";
|
|
4
|
+
import n from "./index.module.js";
|
|
5
|
+
import { Eye as r, EyeOff as i } from "lucide-react";
|
|
6
|
+
import { forwardRef as a, useId as o, useState as s } from "react";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
// src/components/PasswordInput/PasswordInput.tsx
|
|
9
|
+
var u = a(({ toggleLabel: a = "Show password", id: u, disabled: d, className: f, ...p }, m) => {
|
|
10
|
+
let h = o(), g = u ?? h, [_, v] = s(!1);
|
|
11
|
+
return /* @__PURE__ */ l("div", {
|
|
12
|
+
className: n.wrapper,
|
|
13
|
+
children: [/* @__PURE__ */ c(t, {
|
|
14
|
+
spellCheck: !1,
|
|
15
|
+
autoCapitalize: "none",
|
|
16
|
+
autoCorrect: "off",
|
|
17
|
+
...p,
|
|
18
|
+
ref: m,
|
|
19
|
+
id: g,
|
|
20
|
+
type: _ ? "text" : "password",
|
|
21
|
+
disabled: d,
|
|
22
|
+
className: [n.input, f].filter(Boolean).join(" ")
|
|
23
|
+
}), /* @__PURE__ */ c(e, {
|
|
24
|
+
variant: "ghost",
|
|
25
|
+
size: "small",
|
|
26
|
+
iconOnly: !0,
|
|
27
|
+
"aria-label": a,
|
|
28
|
+
"aria-pressed": _,
|
|
29
|
+
"aria-controls": g,
|
|
30
|
+
disabled: d,
|
|
31
|
+
className: n.toggle,
|
|
32
|
+
onClick: () => v((e) => !e),
|
|
33
|
+
children: c(_ ? i : r, {
|
|
34
|
+
size: 16,
|
|
35
|
+
strokeWidth: 1.75,
|
|
36
|
+
"aria-hidden": "true"
|
|
37
|
+
})
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
u.displayName = "PasswordInput";
|
|
42
|
+
export { u as PasswordInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PasswordInput } from "./PasswordInput.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// src/components/PasswordInput/index.module.scss
|
|
2
|
+
var e = "matrix-passwordinput-wrapper", t = "matrix-passwordinput-input", n = "matrix-passwordinput-toggle", r = {
|
|
3
|
+
wrapper: e,
|
|
4
|
+
input: t,
|
|
5
|
+
toggle: n
|
|
6
|
+
};
|
|
7
|
+
export { r as default, t as input, n as toggle, e as wrapper };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const Phone: import("react").ForwardRefExoticComponent<Omit<import("../../index.js").InputProps, "defaultValue" | "id" | "inputMode" | "onChange" | "name" | "type" | "value"> & {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
defaultCountry?: import("../../index.js").PhoneCountryCode;
|
|
7
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Input as e } from "../Input/Input.js";
|
|
3
|
+
import { formatPhoneNumber as t } from "./helpers/formatPhoneNumber.js";
|
|
4
|
+
import { forwardRef as n } from "react";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
// src/components/Phone/Phone.tsx
|
|
7
|
+
var i = n(({ value: n, onChange: i, defaultCountry: a = "US", disabled: o = !1, autoComplete: s = "tel", "aria-invalid": c = !1, ...l }, u) => /* @__PURE__ */ r(e, {
|
|
8
|
+
...l,
|
|
9
|
+
ref: u,
|
|
10
|
+
type: "tel",
|
|
11
|
+
inputMode: "tel",
|
|
12
|
+
value: n,
|
|
13
|
+
onChange: (e) => i(t(e.target.value, a)),
|
|
14
|
+
autoComplete: s,
|
|
15
|
+
disabled: o,
|
|
16
|
+
"aria-invalid": c
|
|
17
|
+
}));
|
|
18
|
+
i.displayName = "Phone";
|
|
19
|
+
export { i as Phone };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type CountryCode } from "libphonenumber-js/min";
|
|
2
|
+
/**
|
|
3
|
+
* Formats a phone number as it is typed.
|
|
4
|
+
*
|
|
5
|
+
* - Numbers without a leading "+" are formatted for `defaultCountry`, for
|
|
6
|
+
* example "(555) 123-4567" for the United States.
|
|
7
|
+
* - Numbers with a leading "+" are formatted internationally, for example
|
|
8
|
+
* "+44 20 7946 0958".
|
|
9
|
+
* - When the default country shares the +1 country code, as the United States
|
|
10
|
+
* does, a leading "+1" or "1" is dropped and the number is formatted
|
|
11
|
+
* nationally, because area codes there never start with 1.
|
|
12
|
+
* - Digits beyond the longest valid number are ignored.
|
|
13
|
+
*/
|
|
14
|
+
export declare const formatPhoneNumber: (value: string, defaultCountry?: CountryCode) => string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AsYouType as e, getCountryCallingCode as t, validatePhoneNumberLength as n } from "libphonenumber-js/min";
|
|
2
|
+
// src/components/Phone/helpers/formatPhoneNumber.ts
|
|
3
|
+
var r = (e, t) => {
|
|
4
|
+
let r = e, i = (e) => t ? e : `+${e}`;
|
|
5
|
+
for (; r && n(i(r), t) === "TOO_LONG";) r = r.slice(0, -1);
|
|
6
|
+
return r;
|
|
7
|
+
}, i = (n, i = "US") => {
|
|
8
|
+
let a = n.trimStart().startsWith("+"), o = t(i), s = n.replace(/\D/g, ""), c = o === "1" && s.startsWith("1");
|
|
9
|
+
if (a && !c) {
|
|
10
|
+
let t = r(s);
|
|
11
|
+
return t ? new e().input(`+${t}`) : "+";
|
|
12
|
+
}
|
|
13
|
+
return c && (s = s.slice(1)), o === "1" && s.length <= 3 ? s : new e(i).input(r(s, i));
|
|
14
|
+
};
|
|
15
|
+
export { i as formatPhoneNumber };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Phone } from "./Phone.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PopoverTriggerProps } from "../../types/popoverType.js";
|
|
2
|
+
export declare const Popover: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "role" | "content"> & {
|
|
3
|
+
children: import("react").ReactElement<PopoverTriggerProps>;
|
|
4
|
+
content: import("react").ReactNode;
|
|
5
|
+
label: string;
|
|
6
|
+
open?: boolean;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
side?: import("../../index.js").PopoverSide;
|
|
10
|
+
align?: import("../../index.js").PopoverAlign;
|
|
11
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { topLayerAttributes as e, useAnchoredPosition as t } from "../../hooks/useAnchoredPosition.js";
|
|
3
|
+
import { useDismiss as n } from "../../hooks/useDismiss.js";
|
|
4
|
+
import { useOpenState as r } from "../../hooks/useOpenState.js";
|
|
5
|
+
import i from "./index.module.js";
|
|
6
|
+
import { cloneElement as a, forwardRef as o, isValidElement as s, useCallback as c, useEffect as l, useId as u, useImperativeHandle as d, useRef as f } from "react";
|
|
7
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
8
|
+
// src/components/Popover/Popover.tsx
|
|
9
|
+
var h = "a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", g = o(({ children: o, content: g, label: _, open: v, defaultOpen: y = !1, onOpenChange: b, side: x = "bottom", align: S = "start", className: C, onKeyDown: w, ...T }, E) => {
|
|
10
|
+
let [D, O] = r(v, y, b), k = u(), A = f(null), j = f(null), M = f(null), N = f(!1);
|
|
11
|
+
d(E, () => j.current), t(D, A, j, x, S, 6);
|
|
12
|
+
let P = c((e) => {
|
|
13
|
+
O(!1), e && M.current?.focus();
|
|
14
|
+
}, [O]), F = c((e) => P(e === "escape"), [P]);
|
|
15
|
+
n(D, A, F), l(() => {
|
|
16
|
+
let e = j.current;
|
|
17
|
+
D && e && N.current && (N.current = !1, (e.querySelector(h) ?? e).focus());
|
|
18
|
+
}, [D]);
|
|
19
|
+
let I = s(o) ? a(o, {
|
|
20
|
+
"aria-haspopup": "dialog",
|
|
21
|
+
"aria-expanded": D,
|
|
22
|
+
"aria-controls": D ? k : void 0,
|
|
23
|
+
onClick: (e) => {
|
|
24
|
+
o.props.onClick?.(e), e.defaultPrevented || (M.current = e.currentTarget, N.current = !D, O(!D));
|
|
25
|
+
}
|
|
26
|
+
}) : o, L = (e) => {
|
|
27
|
+
w?.(e), e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), e.stopPropagation(), P(!0));
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ m("div", {
|
|
30
|
+
ref: A,
|
|
31
|
+
className: i.popover,
|
|
32
|
+
onBlur: (e) => {
|
|
33
|
+
let t = e.relatedTarget;
|
|
34
|
+
D && t instanceof Node && !A.current?.contains(t) && O(!1);
|
|
35
|
+
},
|
|
36
|
+
children: [I, D && /* @__PURE__ */ p("div", {
|
|
37
|
+
...T,
|
|
38
|
+
ref: j,
|
|
39
|
+
id: k,
|
|
40
|
+
role: "dialog",
|
|
41
|
+
"aria-label": _,
|
|
42
|
+
tabIndex: -1,
|
|
43
|
+
...e,
|
|
44
|
+
className: [i.panel, C].filter(Boolean).join(" "),
|
|
45
|
+
onKeyDown: L,
|
|
46
|
+
children: g
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
g.displayName = "Popover";
|
|
51
|
+
export { g as Popover };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Popover } from "./Popover.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const Progress: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "role"> & {
|
|
2
|
+
label: string;
|
|
3
|
+
hideLabel?: boolean;
|
|
4
|
+
value?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
showValue?: boolean;
|
|
7
|
+
getValueText?: (value: number, max: number) => string;
|
|
8
|
+
variant?: import("../../index.js").ProgressVariant;
|
|
9
|
+
size?: import("../../index.js").ProgressSize;
|
|
10
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,74 @@
|
|
|
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/Progress/Progress.tsx
|
|
5
|
+
var a = (e, t) => `${Math.round(e / t * 100)}%`, o = t(({ label: t, hideLabel: o = !1, value: s, max: c = 100, showValue: l = !1, getValueText: u = a, variant: d = "bar", size: f = "medium", className: p, ...m }, h) => {
|
|
6
|
+
let g = n(), _ = c > 0 ? c : 100, v = typeof s == "number" && Number.isFinite(s), y = v ? Math.min(Math.max(s, 0), _) : 0, b = y / _ * 100, x = v ? u(y, _) : void 0, S = {
|
|
7
|
+
role: "progressbar",
|
|
8
|
+
"aria-label": o ? t : void 0,
|
|
9
|
+
"aria-labelledby": o ? void 0 : g,
|
|
10
|
+
"aria-valuemin": 0,
|
|
11
|
+
"aria-valuemax": _,
|
|
12
|
+
"aria-valuenow": v ? y : void 0,
|
|
13
|
+
"aria-valuetext": x
|
|
14
|
+
}, C = !o && /* @__PURE__ */ r("span", {
|
|
15
|
+
id: g,
|
|
16
|
+
className: e.label,
|
|
17
|
+
children: t
|
|
18
|
+
}), w = l && x !== void 0 && /* @__PURE__ */ r("span", {
|
|
19
|
+
className: e.value,
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
children: x
|
|
22
|
+
}), T = [
|
|
23
|
+
e.progress,
|
|
24
|
+
e[d],
|
|
25
|
+
e[f],
|
|
26
|
+
!v && e.indeterminate,
|
|
27
|
+
p
|
|
28
|
+
].filter(Boolean).join(" ");
|
|
29
|
+
return d === "circle" ? /* @__PURE__ */ i("div", {
|
|
30
|
+
...m,
|
|
31
|
+
ref: h,
|
|
32
|
+
className: T,
|
|
33
|
+
children: [/* @__PURE__ */ i("div", {
|
|
34
|
+
...S,
|
|
35
|
+
className: e.circleTrack,
|
|
36
|
+
children: [/* @__PURE__ */ i("svg", {
|
|
37
|
+
viewBox: "0 0 36 36",
|
|
38
|
+
className: e.svg,
|
|
39
|
+
"aria-hidden": "true",
|
|
40
|
+
children: [/* @__PURE__ */ r("circle", {
|
|
41
|
+
className: e.circleRail,
|
|
42
|
+
cx: "18",
|
|
43
|
+
cy: "18",
|
|
44
|
+
r: "15.5",
|
|
45
|
+
pathLength: 100
|
|
46
|
+
}), /* @__PURE__ */ r("circle", {
|
|
47
|
+
className: e.circleIndicator,
|
|
48
|
+
cx: "18",
|
|
49
|
+
cy: "18",
|
|
50
|
+
r: "15.5",
|
|
51
|
+
pathLength: 100,
|
|
52
|
+
strokeDasharray: v ? `${b} 100` : void 0
|
|
53
|
+
})]
|
|
54
|
+
}), w]
|
|
55
|
+
}), C]
|
|
56
|
+
}) : /* @__PURE__ */ i("div", {
|
|
57
|
+
...m,
|
|
58
|
+
ref: h,
|
|
59
|
+
className: T,
|
|
60
|
+
children: [(C || w) && /* @__PURE__ */ i("div", {
|
|
61
|
+
className: e.header,
|
|
62
|
+
children: [C, w]
|
|
63
|
+
}), /* @__PURE__ */ r("div", {
|
|
64
|
+
...S,
|
|
65
|
+
className: e.track,
|
|
66
|
+
children: /* @__PURE__ */ r("div", {
|
|
67
|
+
className: e.indicator,
|
|
68
|
+
style: v ? { width: `${b}%` } : void 0
|
|
69
|
+
})
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
o.displayName = "Progress";
|
|
74
|
+
export { o as Progress };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Progress } from "./Progress.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/components/Progress/index.module.scss
|
|
2
|
+
var e = "matrix-progress-progress", t = "matrix-progress-small", n = "matrix-progress-large", r = "matrix-progress-bar", i = "matrix-progress-header", a = "matrix-progress-label", o = "matrix-progress-value", s = "matrix-progress-track", c = "matrix-progress-indicator", l = "matrix-progress-indeterminate", u = "matrix-progress-slide", d = "matrix-progress-circle", f = "matrix-progress-circleTrack", p = "matrix-progress-svg", m = "matrix-progress-circleRail", h = "matrix-progress-circleIndicator", g = "matrix-progress-spin", _ = {
|
|
3
|
+
progress: e,
|
|
4
|
+
small: t,
|
|
5
|
+
large: n,
|
|
6
|
+
bar: r,
|
|
7
|
+
header: i,
|
|
8
|
+
label: a,
|
|
9
|
+
value: o,
|
|
10
|
+
track: s,
|
|
11
|
+
indicator: c,
|
|
12
|
+
indeterminate: l,
|
|
13
|
+
slide: u,
|
|
14
|
+
circle: d,
|
|
15
|
+
circleTrack: f,
|
|
16
|
+
svg: p,
|
|
17
|
+
circleRail: m,
|
|
18
|
+
circleIndicator: h,
|
|
19
|
+
spin: g
|
|
20
|
+
};
|
|
21
|
+
export { r as bar, d as circle, h as circleIndicator, m as circleRail, f as circleTrack, _ as default, i as header, l as indeterminate, c as indicator, a as label, n as large, e as progress, u as slide, t as small, g as spin, p as svg, s as track, o as value };
|
|
@@ -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/Radio/Radio.tsx
|
|
5
|
+
var i = t(({ label: t, className: i, ...a }, o) => {
|
|
6
|
+
let s = /* @__PURE__ */ n("input", {
|
|
7
|
+
...a,
|
|
8
|
+
ref: o,
|
|
9
|
+
type: "radio",
|
|
10
|
+
className: [e.input, i].filter(Boolean).join(" ")
|
|
11
|
+
});
|
|
12
|
+
return t == null ? s : /* @__PURE__ */ r("label", {
|
|
13
|
+
className: e.radio,
|
|
14
|
+
children: [s, /* @__PURE__ */ n("span", {
|
|
15
|
+
className: e.label,
|
|
16
|
+
children: t
|
|
17
|
+
})]
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
i.displayName = "Radio";
|
|
21
|
+
export { i as Radio };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Radio } from "./Radio.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RelatedLinkProps } from "../../types/relatedLinksType.js";
|
|
2
|
+
export declare const RelatedLinks: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLElement>, "children"> & {
|
|
3
|
+
items: import("../../index.js").RelatedLinkItem[];
|
|
4
|
+
label?: import("react").ReactNode;
|
|
5
|
+
renderLink?: (props: RelatedLinkProps) => import("react").ReactNode;
|
|
6
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import e from "./index.module.js";
|
|
2
|
+
import { ArrowRight as t } from "lucide-react";
|
|
3
|
+
import { forwardRef as n, useId as r } from "react";
|
|
4
|
+
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
// src/components/RelatedLinks/RelatedLinks.tsx
|
|
6
|
+
var s = (e) => /* @__PURE__ */ a("a", { ...e }), c = n(({ items: n, label: c = "Related links", renderLink: l = s, className: u, ...d }, f) => {
|
|
7
|
+
let p = r();
|
|
8
|
+
return /* @__PURE__ */ o("nav", {
|
|
9
|
+
"aria-labelledby": p,
|
|
10
|
+
...d,
|
|
11
|
+
ref: f,
|
|
12
|
+
className: [e.relatedLinks, u].filter(Boolean).join(" "),
|
|
13
|
+
children: [/* @__PURE__ */ a("p", {
|
|
14
|
+
id: p,
|
|
15
|
+
className: e.label,
|
|
16
|
+
children: c
|
|
17
|
+
}), /* @__PURE__ */ a("ul", {
|
|
18
|
+
className: e.list,
|
|
19
|
+
children: n.map(({ href: n, title: r, description: s }) => /* @__PURE__ */ a("li", { children: l({
|
|
20
|
+
href: n,
|
|
21
|
+
className: e.link,
|
|
22
|
+
children: /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("span", {
|
|
23
|
+
className: e.title,
|
|
24
|
+
children: [r, /* @__PURE__ */ a(t, {
|
|
25
|
+
className: e.arrow,
|
|
26
|
+
size: 16,
|
|
27
|
+
strokeWidth: 2,
|
|
28
|
+
"aria-hidden": "true"
|
|
29
|
+
})]
|
|
30
|
+
}), s && /* @__PURE__ */ o(i, { children: [" ", /* @__PURE__ */ a("span", {
|
|
31
|
+
className: e.description,
|
|
32
|
+
children: s
|
|
33
|
+
})] })] })
|
|
34
|
+
}) }, n))
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
c.displayName = "RelatedLinks";
|
|
39
|
+
export { c as RelatedLinks };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RelatedLinks } from "./RelatedLinks.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/components/RelatedLinks/index.module.scss
|
|
2
|
+
var e = "matrix-relatedlinks-relatedLinks", t = "matrix-relatedlinks-label", n = "matrix-relatedlinks-list", r = "matrix-relatedlinks-link", i = "matrix-relatedlinks-arrow", a = "matrix-relatedlinks-title", o = "matrix-relatedlinks-description", s = {
|
|
3
|
+
relatedLinks: e,
|
|
4
|
+
label: t,
|
|
5
|
+
list: n,
|
|
6
|
+
link: r,
|
|
7
|
+
arrow: i,
|
|
8
|
+
title: a,
|
|
9
|
+
description: o
|
|
10
|
+
};
|
|
11
|
+
export { i as arrow, s as default, o as description, t as label, r as link, n as list, e as relatedLinks, a as title };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Input as e } from "../Input/Input.js";
|
|
2
|
+
import t from "./index.module.js";
|
|
3
|
+
import { Search as n } from "lucide-react";
|
|
4
|
+
import { forwardRef as r } from "react";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
// src/components/SearchInput/SearchInput.tsx
|
|
7
|
+
var o = r(({ icon: r = /* @__PURE__ */ i(n, {
|
|
8
|
+
size: 18,
|
|
9
|
+
strokeWidth: 1.75
|
|
10
|
+
}), className: o, ...s }, c) => /* @__PURE__ */ a("div", {
|
|
11
|
+
className: t.wrapper,
|
|
12
|
+
children: [r != null && /* @__PURE__ */ i("span", {
|
|
13
|
+
className: t.icon,
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
children: r
|
|
16
|
+
}), /* @__PURE__ */ i(e, {
|
|
17
|
+
...s,
|
|
18
|
+
ref: c,
|
|
19
|
+
type: "search",
|
|
20
|
+
className: [
|
|
21
|
+
t.input,
|
|
22
|
+
r != null && t.withIcon,
|
|
23
|
+
o
|
|
24
|
+
].filter(Boolean).join(" ")
|
|
25
|
+
})]
|
|
26
|
+
}));
|
|
27
|
+
o.displayName = "SearchInput";
|
|
28
|
+
export { o as SearchInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchInput } from "./SearchInput.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// src/components/SearchInput/index.module.scss
|
|
2
|
+
var e = "matrix-searchinput-wrapper", t = "matrix-searchinput-icon", n = "matrix-searchinput-input", r = "matrix-searchinput-withIcon", i = {
|
|
3
|
+
wrapper: e,
|
|
4
|
+
icon: t,
|
|
5
|
+
input: n,
|
|
6
|
+
withIcon: r
|
|
7
|
+
};
|
|
8
|
+
export { i as default, t as icon, n as input, r as withIcon, e as wrapper };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import e from "./index.module.js";
|
|
2
|
+
import { ChevronDown 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/Select/Select.tsx
|
|
6
|
+
var a = n(({ className: n, multiple: a, size: o, ...s }, c) => {
|
|
7
|
+
let l = a === !0 || (o ?? 1) > 1;
|
|
8
|
+
return /* @__PURE__ */ i("div", {
|
|
9
|
+
className: e.wrapper,
|
|
10
|
+
children: [/* @__PURE__ */ r("select", {
|
|
11
|
+
...s,
|
|
12
|
+
ref: c,
|
|
13
|
+
multiple: a,
|
|
14
|
+
size: o,
|
|
15
|
+
className: [
|
|
16
|
+
e.select,
|
|
17
|
+
l && e.list,
|
|
18
|
+
n
|
|
19
|
+
].filter(Boolean).join(" ")
|
|
20
|
+
}), !l && /* @__PURE__ */ r("span", {
|
|
21
|
+
className: e.icon,
|
|
22
|
+
"aria-hidden": "true",
|
|
23
|
+
children: /* @__PURE__ */ r(t, {
|
|
24
|
+
size: 16,
|
|
25
|
+
strokeWidth: 1.75
|
|
26
|
+
})
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
a.displayName = "Select";
|
|
31
|
+
export { a as Select };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Select } from "./Select.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// src/components/Select/index.module.scss
|
|
2
|
+
var e = "matrix-select-wrapper", t = "matrix-select-select", n = "matrix-select-icon", r = "matrix-select-list", i = {
|
|
3
|
+
wrapper: e,
|
|
4
|
+
select: t,
|
|
5
|
+
icon: n,
|
|
6
|
+
list: r
|
|
7
|
+
};
|
|
8
|
+
export { i as default, n as icon, r as list, t as select, e as wrapper };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SideNavLinkProps } from "../../types/sideNavType.js";
|
|
2
|
+
export declare const SideNav: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLElement>, "children"> & {
|
|
3
|
+
sections: import("../../index.js").SideNavSection[];
|
|
4
|
+
label?: string;
|
|
5
|
+
renderLink?: (props: SideNavLinkProps) => import("react").ReactNode;
|
|
6
|
+
} & import("react").RefAttributes<HTMLElement>>;
|