@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,9 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "children"> & {
|
|
3
|
+
/**
|
|
4
|
+
* Visible text beside the radio. It names the radio, and clicking it selects
|
|
5
|
+
* the radio. Without it, name the radio with `aria-label`, `aria-labelledby`,
|
|
6
|
+
* or an associated `<label>`.
|
|
7
|
+
*/
|
|
8
|
+
label?: ReactNode;
|
|
9
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type RelatedLinkItem = {
|
|
3
|
+
/** Link destination, passed to `renderLink`. Also used as the item's key, so it must be unique. */
|
|
4
|
+
href: string;
|
|
5
|
+
/** Title of the linked page. */
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
/** Short description of the linked page. */
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export type RelatedLinkProps = {
|
|
11
|
+
href: string;
|
|
12
|
+
className: string;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
export type RelatedLinksProps = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
16
|
+
/** Pages to link to. Leave out the current page in the consuming application. */
|
|
17
|
+
items: RelatedLinkItem[];
|
|
18
|
+
/** Visible label that names the navigation landmark. Defaults to "Related links". It must be unique on the page. */
|
|
19
|
+
label?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Renders each link, for example with a router's link component. Spread
|
|
22
|
+
* the received props onto the link. Defaults to a native anchor.
|
|
23
|
+
*/
|
|
24
|
+
renderLink?: (props: RelatedLinkProps) => ReactNode;
|
|
25
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { InputProps } from "./inputType.js";
|
|
3
|
+
export type SearchInputProps = Omit<InputProps, "type"> & {
|
|
4
|
+
/** Icon shown at the start of the input, hidden from assistive technology. Defaults to a magnifying glass; pass `null` to hide it. */
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SelectHTMLAttributes } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Accepts every native select attribute, with `<option>` and `<optgroup>`
|
|
4
|
+
* elements as children. Give the select an accessible name with an associated
|
|
5
|
+
* `<label>`, such as through `FormField`, or with `aria-label`. Mark validation
|
|
6
|
+
* errors with `aria-invalid` and connect them with `aria-describedby`.
|
|
7
|
+
*/
|
|
8
|
+
export type SelectProps = SelectHTMLAttributes<HTMLSelectElement>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type SideNavItem = {
|
|
3
|
+
/**
|
|
4
|
+
* Link destination, passed to `renderLink`. Without it, the item is shown as
|
|
5
|
+
* plain text that cannot be selected, such as a page that is not available yet.
|
|
6
|
+
*/
|
|
7
|
+
href?: string;
|
|
8
|
+
/** Visible content. */
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
/** Marks the link as the current page with `aria-current="page"`. Ignored without `href`. */
|
|
11
|
+
current?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type SideNavSection = {
|
|
14
|
+
/** Visible title of the group. It names the group's list. */
|
|
15
|
+
title: string;
|
|
16
|
+
/** Links in the group. */
|
|
17
|
+
items: SideNavItem[];
|
|
18
|
+
};
|
|
19
|
+
export type SideNavLinkProps = {
|
|
20
|
+
href: string;
|
|
21
|
+
className: string;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
"aria-current"?: "page";
|
|
24
|
+
};
|
|
25
|
+
export type SideNavProps = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
26
|
+
/** Groups of links, in display order. Groups without items are not shown. */
|
|
27
|
+
sections: SideNavSection[];
|
|
28
|
+
/** Accessible name of the navigation landmark. Defaults to "Section navigation". It must be unique on the page. */
|
|
29
|
+
label?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Renders each link, which lets the consuming application use its router.
|
|
32
|
+
* Spread the received props onto the link. Defaults to a native anchor.
|
|
33
|
+
*/
|
|
34
|
+
renderLink?: (props: SideNavLinkProps) => ReactNode;
|
|
35
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export type SkeletonVariant = "text" | "rectangle" | "circle";
|
|
3
|
+
export type SkeletonProps = Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
4
|
+
/** Shape of the placeholder. Defaults to `"text"`, one line of text tall. */
|
|
5
|
+
variant?: SkeletonVariant;
|
|
6
|
+
/** Width, as a CSS length or a number of pixels. Defaults to the full width, or the height for a circle. */
|
|
7
|
+
width?: string | number;
|
|
8
|
+
/** Height, as a CSS length or a number of pixels. Defaults to one line of text, or `4rem` for a rectangle. */
|
|
9
|
+
height?: string | number;
|
|
10
|
+
/** Number of text lines, for the `"text"` variant. The last line is shorter. Defaults to `1`. */
|
|
11
|
+
lines?: number;
|
|
12
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from "react";
|
|
2
|
+
export type SliderProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "children"> & {
|
|
3
|
+
/** The value, when the consuming application controls it. Use it with `onValueChange`. */
|
|
4
|
+
value?: number;
|
|
5
|
+
/** The value at first, when the slider keeps its own state. Defaults to the middle of the range. */
|
|
6
|
+
defaultValue?: number;
|
|
7
|
+
/** Called with the new value as the slider moves. */
|
|
8
|
+
onValueChange?: (value: number) => void;
|
|
9
|
+
/** Smallest value. Defaults to `0`. */
|
|
10
|
+
min?: number;
|
|
11
|
+
/** Largest value. Defaults to `100`. */
|
|
12
|
+
max?: number;
|
|
13
|
+
/** Amount the value changes by with each step. Defaults to `1`. */
|
|
14
|
+
step?: number;
|
|
15
|
+
/** Shows the value as text beside the slider. Defaults to `false`. */
|
|
16
|
+
showValue?: boolean;
|
|
17
|
+
/** Returns the text shown and announced for a value, such as "40%". Defaults to the number. */
|
|
18
|
+
getValueText?: (value: number) => string;
|
|
19
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export type SpinnerSize = "small" | "medium" | "large";
|
|
3
|
+
export type SpinnerProps = Omit<HTMLAttributes<HTMLSpanElement>, "children" | "role"> & {
|
|
4
|
+
/** Spinner size. Defaults to `"medium"`. */
|
|
5
|
+
size?: SpinnerSize;
|
|
6
|
+
/**
|
|
7
|
+
* Text announced as a polite status, and hidden visually. Defaults to
|
|
8
|
+
* "Loading". Pass `null` when something else already says that content is
|
|
9
|
+
* loading; the spinner is then hidden from assistive technology.
|
|
10
|
+
*/
|
|
11
|
+
label?: string | null;
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
import type { SpaceToken } from "./spaceType.js";
|
|
3
|
+
export type StackAlign = "start" | "center" | "end" | "stretch";
|
|
4
|
+
export type LayoutElement = "div" | "section" | "article" | "ul" | "ol";
|
|
5
|
+
export type StackProps = HTMLAttributes<HTMLElement> & {
|
|
6
|
+
/** Space between children, as a step of the spacing scale. Defaults to `4`. */
|
|
7
|
+
gap?: SpaceToken;
|
|
8
|
+
/** How children line up across the stack. Defaults to `"stretch"`, which makes them full width. */
|
|
9
|
+
align?: StackAlign;
|
|
10
|
+
/**
|
|
11
|
+
* Element to render. Defaults to `"div"`. Use `"ul"` or `"ol"` with `<li>`
|
|
12
|
+
* children for a list, or `"section"` with an accessible name.
|
|
13
|
+
*/
|
|
14
|
+
as?: LayoutElement;
|
|
15
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type StepperStep = {
|
|
3
|
+
/** Visible name of the step. */
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
/** Short text below the label, such as what the step covers. */
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type StepperOrientation = "horizontal" | "vertical";
|
|
9
|
+
export type StepperStatusLabels = {
|
|
10
|
+
/** Read after a finished step. Defaults to "Completed". */
|
|
11
|
+
complete: string;
|
|
12
|
+
/** Read after a step that has not started. Defaults to "Not started". */
|
|
13
|
+
upcoming: string;
|
|
14
|
+
};
|
|
15
|
+
export type StepperProps = Omit<HTMLAttributes<HTMLOListElement>, "children"> & {
|
|
16
|
+
/** Steps of the flow, in order. */
|
|
17
|
+
steps: StepperStep[];
|
|
18
|
+
/**
|
|
19
|
+
* Index of the current step, starting at 0. Steps before it are complete.
|
|
20
|
+
* Use `steps.length` once every step is complete.
|
|
21
|
+
*/
|
|
22
|
+
current: number;
|
|
23
|
+
/** Lays the steps out in a row or a column. Defaults to `"horizontal"`, which becomes a column on narrow screens. */
|
|
24
|
+
orientation?: StepperOrientation;
|
|
25
|
+
/** Status text read by screen readers after the name of finished and upcoming steps. The current step is announced through `aria-current`. */
|
|
26
|
+
statusLabels?: Partial<StepperStatusLabels>;
|
|
27
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type SwitchProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "role" | "children"> & {
|
|
3
|
+
/**
|
|
4
|
+
* Visible text beside the switch. It names the switch, and clicking it flips
|
|
5
|
+
* the switch. Without it, name the switch with `aria-label`,
|
|
6
|
+
* `aria-labelledby`, or an associated `<label>`.
|
|
7
|
+
*/
|
|
8
|
+
label?: ReactNode;
|
|
9
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Key, ReactNode, TableHTMLAttributes } from "react";
|
|
2
|
+
export type TableColumn<Row> = {
|
|
3
|
+
/** Unique key of the column. */
|
|
4
|
+
key: string;
|
|
5
|
+
/** Content of the column's header cell. */
|
|
6
|
+
header: ReactNode;
|
|
7
|
+
/** Returns the content of this column's cell for a row. */
|
|
8
|
+
cell: (row: Row) => ReactNode;
|
|
9
|
+
/** Renders this column's cells as row headers. Defaults to `false`. */
|
|
10
|
+
rowHeader?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type TableProps<Row> = Omit<TableHTMLAttributes<HTMLTableElement>, "children"> & {
|
|
13
|
+
/**
|
|
14
|
+
* Visible caption that names the table. Without it, name the table with
|
|
15
|
+
* `aria-label` or `aria-labelledby`.
|
|
16
|
+
*/
|
|
17
|
+
caption?: ReactNode;
|
|
18
|
+
/** Columns, in display order. */
|
|
19
|
+
columns: readonly TableColumn<Row>[];
|
|
20
|
+
/** Rows of data. Each row is passed to every column's `cell`. */
|
|
21
|
+
rows: readonly Row[];
|
|
22
|
+
/** Returns a unique, stable key for a row. */
|
|
23
|
+
getRowKey: (row: Row, index: number) => Key;
|
|
24
|
+
/** Shown in a single cell when there are no rows. Defaults to "No rows to show". */
|
|
25
|
+
emptyMessage?: ReactNode;
|
|
26
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type TabsItem = {
|
|
3
|
+
/** Unique value of the tab, used by `value`, `defaultValue`, and `onValueChange`. */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Visible tab text. It names the tab and its panel. */
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
/** Content of the panel shown while the tab is selected. */
|
|
8
|
+
content: ReactNode;
|
|
9
|
+
/** Prevents selecting the tab. The arrow keys skip it. Defaults to `false`. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type TabsActivation = "automatic" | "manual";
|
|
13
|
+
export type TabsProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue"> & {
|
|
14
|
+
/** Tabs and their panels, in display order. */
|
|
15
|
+
items: TabsItem[];
|
|
16
|
+
/** Accessible name of the list of tabs, such as "Account settings". */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Selected tab, when the consuming application controls it. Use it with `onValueChange`. */
|
|
19
|
+
value?: string;
|
|
20
|
+
/** Tab selected at first, when the tabs keep their own state. Defaults to the first enabled tab. */
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
/** Called with the value of the newly selected tab. */
|
|
23
|
+
onValueChange?: (value: string) => void;
|
|
24
|
+
/**
|
|
25
|
+
* `"automatic"` selects a tab as soon as the arrow keys move to it.
|
|
26
|
+
* `"manual"` waits for Enter or Space, for panels that are slow to show.
|
|
27
|
+
* Defaults to `"automatic"`.
|
|
28
|
+
*/
|
|
29
|
+
activation?: TabsActivation;
|
|
30
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export type TextTagProps = HTMLAttributes<HTMLSpanElement> & {
|
|
3
|
+
/** Short text shown in the round tag. */
|
|
4
|
+
tag: string;
|
|
5
|
+
/** Text shown after the tag. */
|
|
6
|
+
text: string;
|
|
7
|
+
/** Hides the tag from assistive technology when it only repeats the text. Defaults to `false`. */
|
|
8
|
+
tagHidden?: boolean;
|
|
9
|
+
};
|
package/dist/types/textType.d.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
readonly headingSm: "h4";
|
|
7
|
-
readonly bodyLg: "p";
|
|
8
|
-
readonly bodyMd: "p";
|
|
9
|
-
readonly bodySm: "p";
|
|
10
|
-
readonly caption: "span";
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export type TextVariant = "body" | "lead" | "muted" | "subtle" | "label";
|
|
3
|
+
export type TextProps = HTMLAttributes<HTMLParagraphElement> & {
|
|
4
|
+
/** Text style. Defaults to `"body"`. */
|
|
5
|
+
variant?: TextVariant;
|
|
11
6
|
};
|
|
12
|
-
export interface TextProps {
|
|
13
|
-
copy: string;
|
|
14
|
-
variant: TextVariant;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TextareaHTMLAttributes } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Accepts every native textarea attribute. Give the textarea an accessible name
|
|
4
|
+
* with an associated `<label>`, such as through `FormField`, or with
|
|
5
|
+
* `aria-label`. Mark validation errors with `aria-invalid` and connect them
|
|
6
|
+
* with `aria-describedby`.
|
|
7
|
+
*/
|
|
8
|
+
export type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InputProps } from "./inputType.js";
|
|
2
|
+
export type TimeInputProps = Omit<InputProps, "type"> & {
|
|
3
|
+
/** Class name for the clock button. */
|
|
4
|
+
clockButtonClassName?: string;
|
|
5
|
+
/** Accessible name of the clock button. Defaults to "Choose time". */
|
|
6
|
+
clockButtonLabel?: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type ToastProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "role"> & {
|
|
3
|
+
/** Message to show and announce. */
|
|
4
|
+
message: ReactNode;
|
|
5
|
+
/** Icon shown before the message, hidden from assistive technology. Defaults to a check mark; pass `null` to hide it. */
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type ToggleProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
|
|
3
|
+
/** Visible text. It is also the button's accessible name unless `aria-label` is set. */
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
/** Optional icon shown before the label. It is hidden from assistive technology. */
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { PopoverAlign, PopoverSide, PopoverTriggerProps } from "./popoverType.js";
|
|
3
|
+
export type TooltipProps = Omit<HTMLAttributes<HTMLSpanElement>, "children" | "content" | "role"> & {
|
|
4
|
+
/**
|
|
5
|
+
* The element the tooltip describes, such as a `Button`. It must be
|
|
6
|
+
* focusable, and it receives `aria-describedby`, which it must pass to its
|
|
7
|
+
* element.
|
|
8
|
+
*/
|
|
9
|
+
children: ReactElement<PopoverTriggerProps>;
|
|
10
|
+
/**
|
|
11
|
+
* Short text shown on hover and focus. It is read as the trigger's
|
|
12
|
+
* description, so do not put links or buttons in it, and do not rely on it
|
|
13
|
+
* for information people need.
|
|
14
|
+
*/
|
|
15
|
+
content: ReactNode;
|
|
16
|
+
/** Side of the trigger the tooltip prefers. Defaults to `"top"`. */
|
|
17
|
+
side?: PopoverSide;
|
|
18
|
+
/** How the tooltip lines up with the trigger. Defaults to `"center"`. */
|
|
19
|
+
align?: PopoverAlign;
|
|
20
|
+
/** Milliseconds the pointer rests on the trigger before the tooltip shows. Focus shows it at once. Defaults to `300`. */
|
|
21
|
+
delay?: number;
|
|
22
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AriaAttributes, MouseEventHandler } from "react";
|
|
2
|
+
export type UseDisclosureOptions = {
|
|
3
|
+
/** Whether the content is open, when the consuming application controls it. Use it with `onOpenChange`. */
|
|
4
|
+
open?: boolean;
|
|
5
|
+
/** Whether the content starts open, when the hook keeps its own state. Defaults to `false`. */
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
/** Called when the content opens or closes. */
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
};
|
|
10
|
+
export type UseDisclosureButtonProps = Pick<AriaAttributes, "aria-expanded" | "aria-controls"> & {
|
|
11
|
+
onClick: MouseEventHandler<HTMLElement>;
|
|
12
|
+
};
|
|
13
|
+
export type UseDisclosurePanelProps = {
|
|
14
|
+
id: string;
|
|
15
|
+
hidden: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type UseDisclosureResult = {
|
|
18
|
+
/** Whether the content is open. */
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
/** Opens the content. */
|
|
21
|
+
open: () => void;
|
|
22
|
+
/** Closes the content. */
|
|
23
|
+
close: () => void;
|
|
24
|
+
/** Opens the content if it is closed, and closes it if it is open. */
|
|
25
|
+
toggle: () => void;
|
|
26
|
+
/** Spread onto the button that shows and hides the content. Sets `aria-expanded`, `aria-controls`, and `onClick`. */
|
|
27
|
+
buttonProps: UseDisclosureButtonProps;
|
|
28
|
+
/** Spread onto the content. Sets its `id` and hides it while closed. */
|
|
29
|
+
panelProps: UseDisclosurePanelProps;
|
|
30
|
+
};
|
package/package.json
CHANGED
|
@@ -1,91 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lucasromero/matrix-ui",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "Reusable, accessible React and TypeScript components.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"react-components",
|
|
8
|
+
"components",
|
|
9
|
+
"ui",
|
|
10
|
+
"design-system",
|
|
11
|
+
"accessibility",
|
|
12
|
+
"a11y",
|
|
13
|
+
"typescript",
|
|
14
|
+
"css-modules"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://matrixuicomponents.com",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "Lucas Romero",
|
|
5
19
|
"type": "module",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"style": "./dist/matrix-ui.css",
|
|
20
|
+
"sideEffects": [
|
|
21
|
+
"**/*.css"
|
|
22
|
+
],
|
|
10
23
|
"files": [
|
|
11
|
-
"dist"
|
|
24
|
+
"dist",
|
|
25
|
+
"CHANGELOG.md"
|
|
12
26
|
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"dev": "vite",
|
|
15
|
-
"build": "tsc -p tsconfig.types.json && vite build",
|
|
16
|
-
"lint": "eslint .",
|
|
17
|
-
"preview": "vite preview",
|
|
18
|
-
"storybook": "storybook dev -p 6006",
|
|
19
|
-
"build-storybook": "storybook build",
|
|
20
|
-
"test": "jest --coverage -u",
|
|
21
|
-
"test:watch": "jest --watch",
|
|
22
|
-
"prepare": "husky"
|
|
23
|
-
},
|
|
24
27
|
"exports": {
|
|
25
28
|
".": {
|
|
26
29
|
"types": "./dist/index.d.ts",
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
"import": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./styles.css": "./dist/styles.css"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "vite build && tsc --project tsconfig.build.json",
|
|
36
|
+
"dev": "vite build --watch --mode development",
|
|
37
|
+
"prepublishOnly": "npm run build",
|
|
38
|
+
"test": "vitest run",
|
|
39
|
+
"typecheck": "tsc --build"
|
|
31
40
|
},
|
|
32
41
|
"dependencies": {
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"clsx": "^2.1.1",
|
|
36
|
-
"lucide-react": "^1.14.0",
|
|
37
|
-
"npm": "^11.18.0",
|
|
38
|
-
"pack": "^2.2.0",
|
|
39
|
-
"run": "^1.5.0"
|
|
42
|
+
"libphonenumber-js": "^1.13.15",
|
|
43
|
+
"lucide-react": "^1.69.0"
|
|
40
44
|
},
|
|
41
45
|
"peerDependencies": {
|
|
42
|
-
"react": "^19.0.0",
|
|
43
|
-
"react-dom": "^19.0.0"
|
|
46
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
47
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
44
48
|
},
|
|
45
49
|
"devDependencies": {
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
"eslint": "^9.39.4",
|
|
66
|
-
"eslint-config-prettier": "^10.1.8",
|
|
67
|
-
"eslint-plugin-prettier": "^5.5.5",
|
|
68
|
-
"eslint-plugin-react": "^7.37.5",
|
|
69
|
-
"eslint-plugin-react-hooks": "^7.1.1",
|
|
70
|
-
"eslint-plugin-react-refresh": "^0.5.2",
|
|
71
|
-
"eslint-plugin-storybook": "^10.3.6",
|
|
72
|
-
"globals": "^17.6.0",
|
|
73
|
-
"husky": "^9.1.7",
|
|
74
|
-
"jest": "^29.7.0",
|
|
75
|
-
"jest-environment-jsdom": "^29.0.0",
|
|
76
|
-
"jest-spec-reporter": "^1.0.19",
|
|
77
|
-
"jsdom": "^27.0.1",
|
|
78
|
-
"postcss": "^8.5.14",
|
|
79
|
-
"prettier": "^3.8.3",
|
|
80
|
-
"react": "^19.0.0",
|
|
81
|
-
"react-dom": "^19.0.0",
|
|
82
|
-
"sass": "^1.72.0",
|
|
83
|
-
"storybook": "^10.3.6",
|
|
84
|
-
"ts-jest": "^29.4.9",
|
|
85
|
-
"typescript": "~6.0.2",
|
|
86
|
-
"typescript-eslint": "^8.59.2",
|
|
87
|
-
"vite": "^8.0.10",
|
|
88
|
-
"vite-plugin-css-injected-by-js": "^5.0.2",
|
|
89
|
-
"vite-plugin-dts": "^5.0.1"
|
|
50
|
+
"@testing-library/dom": "^10.4.0",
|
|
51
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
52
|
+
"@testing-library/react": "^16.3.3",
|
|
53
|
+
"@testing-library/user-event": "^14.6.8",
|
|
54
|
+
"@types/node": "^24.19.2",
|
|
55
|
+
"@types/react": "^19.3.0",
|
|
56
|
+
"@types/react-dom": "^19.3.0",
|
|
57
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
58
|
+
"axe-core": "^4.14.0",
|
|
59
|
+
"jsdom": "^31.0.0",
|
|
60
|
+
"react": "^19.3.1",
|
|
61
|
+
"react-dom": "^19.3.1",
|
|
62
|
+
"sass": "^1.108.0",
|
|
63
|
+
"typescript": "~5.9.3",
|
|
64
|
+
"vite": "^8.3.5",
|
|
65
|
+
"vitest": "^5.1.0"
|
|
66
|
+
},
|
|
67
|
+
"publishConfig": {
|
|
68
|
+
"access": "public"
|
|
90
69
|
}
|
|
91
70
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './Button/Button';
|
|
2
|
-
export * from './Card/Card';
|
|
3
|
-
export * from './Text/Text';
|
|
4
|
-
export * from './Image/Image';
|
|
5
|
-
export * from './Rating/Rating';
|
|
6
|
-
export * from './Navbar/Navbar';
|
|
7
|
-
export * from './Link/Link';
|
|
8
|
-
export * from './IconDropdown/IconDropdown';
|
|
9
|
-
export * from './CardRow/CardRow';
|
|
10
|
-
export * from './SelectDropdown/SelectDropdown';
|
|
11
|
-
export * from './Badge/Badge';
|
package/dist/favicon.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="46" fill="none" viewBox="0 0 48 46"><path fill="#863bff" d="M25.946 44.938c-.664.845-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.287c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.497 0-3.578-1.842-3.578H1.237c-.92 0-1.456-1.04-.92-1.788L10.013.474c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.579 1.842 3.579h11.377c.943 0 1.473 1.088.89 1.83L25.947 44.94z" style="fill:#863bff;fill:color(display-p3 .5252 .23 1);fill-opacity:1"/><mask id="a" width="48" height="46" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M25.842 44.938c-.664.844-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.183c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.498 0-3.579-1.842-3.579H1.133c-.92 0-1.456-1.04-.92-1.787L9.91.473c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.578 1.842 3.578h11.377c.943 0 1.473 1.088.89 1.832L25.843 44.94z" style="fill:#000;fill-opacity:1"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#ede6ff" rx="5.508" ry="14.704" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -4.47 31.516)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#ede6ff" rx="10.399" ry="29.851" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -39.328 7.883)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#7e14ff" rx="5.508" ry="30.487" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -25.913 -14.639)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -32.644 -3.334)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -34.34 30.47)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#ede6ff" rx="14.072" ry="22.078" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="rotate(93.35 24.506 48.493)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx=".387" cy="8.972" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(39.51 .387 8.972)"/></g><g filter="url(#k)"><ellipse cx="47.523" cy="-6.092" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 47.523 -6.092)"/></g><g filter="url(#l)"><ellipse cx="41.412" cy="6.333" fill="#47bfff" rx="5.971" ry="9.665" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 41.412 6.333)"/></g><g filter="url(#m)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#n)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#o)"><ellipse cx="35.651" cy="29.907" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 35.651 29.907)"/></g><g filter="url(#p)"><ellipse cx="38.418" cy="32.4" fill="#47bfff" rx="5.971" ry="15.297" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 38.418 32.4)"/></g></g><defs><filter id="b" width="60.045" height="41.654" x="-19.77" y="16.149" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-54.613" y="-7.533" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-49.64" y="2.03" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-45.045" y="20.029" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-43.513" y="21.178" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="15.756" y="-17.901" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-27.636" y="-22.853" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="20.116" y="-38.415" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="24.641" y="-11.323" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="8.244" y="-2.416" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="18.713" y="10.588" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter></defs></svg>
|