@simplybusiness/mobius 4.3.0 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/components/Drawer/Drawer.js +37 -20
- package/dist/cjs/components/Drawer/Drawer.js.map +1 -1
- package/dist/cjs/components/Modal/Modal.js +31 -21
- package/dist/cjs/components/Modal/Modal.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/components/Drawer/Drawer.js +37 -20
- package/dist/esm/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/components/Modal/Modal.js +31 -21
- package/dist/esm/components/Modal/Modal.js.map +1 -1
- package/dist/types/components/Accordion/Accordion.d.ts +34 -0
- package/dist/types/components/Accordion/Accordion.stories.d.ts +10 -0
- package/dist/types/components/Accordion/Accordion.test.d.ts +1 -0
- package/dist/types/components/Accordion/index.d.ts +1 -0
- package/dist/types/components/Alert/Alert.d.ts +16 -0
- package/dist/types/components/Alert/Alert.stories.d.ts +7 -0
- package/dist/types/components/Alert/Alert.test.d.ts +1 -0
- package/dist/types/components/Alert/index.d.ts +1 -0
- package/dist/types/components/Box/Box.d.ts +15 -0
- package/dist/types/components/Box/Box.stories.d.ts +7 -0
- package/dist/types/components/Box/Box.test.d.ts +1 -0
- package/dist/types/components/Box/index.d.ts +1 -0
- package/dist/types/components/Breadcrumbs/BreadcrumbItem.d.ts +15 -0
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +12 -0
- package/dist/types/components/Breadcrumbs/Breadcrumbs.stories.d.ts +7 -0
- package/dist/types/components/Breadcrumbs/Breadcrumbs.test.d.ts +1 -0
- package/dist/types/components/Breadcrumbs/index.d.ts +2 -0
- package/dist/types/components/Button/Button.d.ts +31 -0
- package/dist/types/components/Button/Button.stories.d.ts +19 -0
- package/dist/types/components/Button/Button.test.d.ts +1 -0
- package/dist/types/components/Button/Loading.d.ts +2 -0
- package/dist/types/components/Button/index.d.ts +1 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/types/components/Checkbox/Checkbox.stories.d.ts +10 -0
- package/dist/types/components/Checkbox/Checkbox.test.d.ts +1 -0
- package/dist/types/components/Checkbox/CheckboxGroup.d.ts +3 -0
- package/dist/types/components/Checkbox/CheckboxGroup.stories.d.ts +9 -0
- package/dist/types/components/Checkbox/CheckboxGroup.test.d.ts +1 -0
- package/dist/types/components/Checkbox/index.d.ts +3 -0
- package/dist/types/components/Checkbox/types.d.ts +56 -0
- package/dist/types/components/Container/Container.d.ts +15 -0
- package/dist/types/components/Container/Container.stories.d.ts +6 -0
- package/dist/types/components/Container/Container.test.d.ts +1 -0
- package/dist/types/components/Container/index.d.ts +1 -0
- package/dist/types/components/Divider/Divider.d.ts +11 -0
- package/dist/types/components/Divider/Divider.stories.d.ts +6 -0
- package/dist/types/components/Divider/Divider.test.d.ts +1 -0
- package/dist/types/components/Divider/index.d.ts +1 -0
- package/dist/types/components/Drawer/Content.d.ts +10 -0
- package/dist/types/components/Drawer/Drawer.d.ts +6 -0
- package/dist/types/components/Drawer/Drawer.stories.d.ts +8 -0
- package/dist/types/components/Drawer/Drawer.test.d.ts +1 -0
- package/dist/types/components/Drawer/Header.d.ts +10 -0
- package/dist/types/components/Drawer/index.d.ts +9 -0
- package/dist/types/components/Drawer/types.d.ts +17 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +15 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.stories.d.ts +7 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.test.d.ts +1 -0
- package/dist/types/components/DropdownMenu/Item.d.ts +15 -0
- package/dist/types/components/DropdownMenu/index.d.ts +10 -0
- package/dist/types/components/ErrorMessage/ErrorMessage.d.ts +9 -0
- package/dist/types/components/ErrorMessage/ErrorMessage.stories.d.ts +7 -0
- package/dist/types/components/ErrorMessage/ErrorMessage.test.d.ts +1 -0
- package/dist/types/components/ErrorMessage/index.d.ts +1 -0
- package/dist/types/components/Fieldset/Fieldset.d.ts +17 -0
- package/dist/types/components/Fieldset/Fieldset.stories.d.ts +7 -0
- package/dist/types/components/Fieldset/Fieldset.test.d.ts +1 -0
- package/dist/types/components/Fieldset/index.d.ts +1 -0
- package/dist/types/components/Flex/Flex.d.ts +4 -0
- package/dist/types/components/Flex/Flex.stories.d.ts +7 -0
- package/dist/types/components/Flex/Flex.test.d.ts +1 -0
- package/dist/types/components/Flex/index.d.ts +2 -0
- package/dist/types/components/Flex/propUtils.d.ts +8 -0
- package/dist/types/components/Flex/propUtils.test.d.ts +1 -0
- package/dist/types/components/Flex/types.d.ts +33 -0
- package/dist/types/components/Grid/Grid.d.ts +28 -0
- package/dist/types/components/Grid/Grid.stories.d.ts +11 -0
- package/dist/types/components/Grid/Grid.test.d.ts +1 -0
- package/dist/types/components/Grid/Item.d.ts +30 -0
- package/dist/types/components/Grid/index.d.ts +9 -0
- package/dist/types/components/Icon/Icon.d.ts +2 -0
- package/dist/types/components/Icon/Icon.stories.d.ts +7 -0
- package/dist/types/components/Icon/Icon.test.d.ts +1 -0
- package/dist/types/components/Icon/IconStyle.d.ts +1 -0
- package/dist/types/components/Icon/index.d.ts +2 -0
- package/dist/types/components/Icon/types.d.ts +13 -0
- package/dist/types/components/Image/Image.d.ts +17 -0
- package/dist/types/components/Image/Image.stories.d.ts +6 -0
- package/dist/types/components/Image/Image.test.d.ts +1 -0
- package/dist/types/components/Image/index.d.ts +1 -0
- package/dist/types/components/Label/Label.d.ts +13 -0
- package/dist/types/components/Label/Label.stories.d.ts +6 -0
- package/dist/types/components/Label/Label.test.d.ts +1 -0
- package/dist/types/components/Label/index.d.ts +1 -0
- package/dist/types/components/Link/Link.d.ts +24 -0
- package/dist/types/components/Link/Link.stories.d.ts +7 -0
- package/dist/types/components/Link/Link.test.d.ts +1 -0
- package/dist/types/components/Link/index.d.ts +1 -0
- package/dist/types/components/LinkButton/LinkButton.d.ts +15 -0
- package/dist/types/components/LinkButton/LinkButton.stories.d.ts +6 -0
- package/dist/types/components/LinkButton/LinkButton.test.d.ts +1 -0
- package/dist/types/components/LinkButton/index.d.ts +1 -0
- package/dist/types/components/List/List.d.ts +17 -0
- package/dist/types/components/List/List.stories.d.ts +10 -0
- package/dist/types/components/List/List.test.d.ts +1 -0
- package/dist/types/components/List/ListItem.d.ts +14 -0
- package/dist/types/components/List/index.d.ts +2 -0
- package/dist/types/components/LoadingIndicator/LoadingIndicator.d.ts +8 -0
- package/dist/types/components/LoadingIndicator/LoadingIndicator.stories.d.ts +9 -0
- package/dist/types/components/LoadingIndicator/LoadingIndicator.test.d.ts +1 -0
- package/dist/types/components/LoadingIndicator/index.d.ts +1 -0
- package/dist/types/components/Logo/Logo.d.ts +14 -0
- package/dist/types/components/Logo/Logo.stories.d.ts +6 -0
- package/dist/types/components/Logo/Logo.test.d.ts +1 -0
- package/dist/types/components/Logo/index.d.ts +1 -0
- package/dist/types/components/Modal/Content.d.ts +10 -0
- package/dist/types/components/Modal/Header.d.ts +10 -0
- package/dist/types/components/Modal/Modal.d.ts +6 -0
- package/dist/types/components/Modal/Modal.stories.d.ts +10 -0
- package/dist/types/components/Modal/Modal.test.d.ts +1 -0
- package/dist/types/components/Modal/index.d.ts +9 -0
- package/dist/types/components/Modal/types.d.ts +31 -0
- package/dist/types/components/NumberField/NumberField.d.ts +35 -0
- package/dist/types/components/NumberField/NumberField.stories.d.ts +10 -0
- package/dist/types/components/NumberField/NumberField.test.d.ts +1 -0
- package/dist/types/components/NumberField/index.d.ts +1 -0
- package/dist/types/components/Option/Option.d.ts +10 -0
- package/dist/types/components/Option/index.d.ts +1 -0
- package/dist/types/components/PasswordField/PasswordField.d.ts +5 -0
- package/dist/types/components/PasswordField/PasswordField.stories.d.ts +6 -0
- package/dist/types/components/PasswordField/PasswordField.test.d.ts +1 -0
- package/dist/types/components/PasswordField/ShowHideButton.d.ts +5 -0
- package/dist/types/components/PasswordField/index.d.ts +1 -0
- package/dist/types/components/Popover/Popover.d.ts +15 -0
- package/dist/types/components/Popover/Popover.stories.d.ts +7 -0
- package/dist/types/components/Popover/Popover.test.d.ts +1 -0
- package/dist/types/components/Popover/index.d.ts +1 -0
- package/dist/types/components/Progress/Progress.d.ts +20 -0
- package/dist/types/components/Progress/Progress.stories.d.ts +9 -0
- package/dist/types/components/Progress/Progress.test.d.ts +1 -0
- package/dist/types/components/Progress/index.d.ts +1 -0
- package/dist/types/components/Radio/Radio.d.ts +53 -0
- package/dist/types/components/Radio/Radio.stories.d.ts +12 -0
- package/dist/types/components/Radio/Radio.test.d.ts +1 -0
- package/dist/types/components/Radio/RadioButton.d.ts +3 -0
- package/dist/types/components/Radio/RadioButton.stories.d.ts +11 -0
- package/dist/types/components/Radio/RadioButton.test.d.ts +1 -0
- package/dist/types/components/Radio/RadioGroup.d.ts +30 -0
- package/dist/types/components/Radio/index.d.ts +3 -0
- package/dist/types/components/SVG/SVG.d.ts +11 -0
- package/dist/types/components/SVG/SVG.stories.d.ts +6 -0
- package/dist/types/components/SVG/SVG.test.d.ts +1 -0
- package/dist/types/components/SVG/index.d.ts +1 -0
- package/dist/types/components/Segment/Segment.d.ts +16 -0
- package/dist/types/components/Segment/Segment.stories.d.ts +19 -0
- package/dist/types/components/Segment/SegmentGroup.d.ts +13 -0
- package/dist/types/components/Segment/index.d.ts +2 -0
- package/dist/types/components/Select/Select.d.ts +20 -0
- package/dist/types/components/Select/Select.stories.d.ts +10 -0
- package/dist/types/components/Select/Select.test.d.ts +1 -0
- package/dist/types/components/Select/index.d.ts +1 -0
- package/dist/types/components/Slider/Slider.d.ts +19 -0
- package/dist/types/components/Slider/Slider.stories.d.ts +10 -0
- package/dist/types/components/Slider/Slider.test.d.ts +1 -0
- package/dist/types/components/Slider/helpers.d.ts +5 -0
- package/dist/types/components/Slider/helpers.test.d.ts +1 -0
- package/dist/types/components/Slider/index.d.ts +1 -0
- package/dist/types/components/Table/Body.d.ts +9 -0
- package/dist/types/components/Table/Cell.d.ts +11 -0
- package/dist/types/components/Table/Foot.d.ts +9 -0
- package/dist/types/components/Table/Head.d.ts +9 -0
- package/dist/types/components/Table/HeaderCell.d.ts +9 -0
- package/dist/types/components/Table/Row.d.ts +9 -0
- package/dist/types/components/Table/Table.d.ts +11 -0
- package/dist/types/components/Table/Table.stories.d.ts +7 -0
- package/dist/types/components/Table/Table.test.d.ts +1 -0
- package/dist/types/components/Table/index.d.ts +20 -0
- package/dist/types/components/Text/Text.d.ts +21 -0
- package/dist/types/components/Text/Text.stories.d.ts +10 -0
- package/dist/types/components/Text/Text.test.d.ts +1 -0
- package/dist/types/components/Text/index.d.ts +1 -0
- package/dist/types/components/TextArea/TextArea.d.ts +13 -0
- package/dist/types/components/TextArea/TextArea.stories.d.ts +11 -0
- package/dist/types/components/TextArea/TextArea.test.d.ts +1 -0
- package/dist/types/components/TextArea/index.d.ts +1 -0
- package/dist/types/components/TextAreaInput/TextAreaInput.d.ts +14 -0
- package/dist/types/components/TextAreaInput/TextAreaInput.test.d.ts +1 -0
- package/dist/types/components/TextAreaInput/index.d.ts +1 -0
- package/dist/types/components/TextField/TextField.d.ts +19 -0
- package/dist/types/components/TextField/TextField.stories.d.ts +20 -0
- package/dist/types/components/TextField/TextField.test.d.ts +1 -0
- package/dist/types/components/TextField/adornmentWithClassName.d.ts +2 -0
- package/dist/types/components/TextField/index.d.ts +1 -0
- package/dist/types/components/Title/Title.d.ts +15 -0
- package/dist/types/components/Title/Title.stories.d.ts +6 -0
- package/dist/types/components/Title/Title.test.d.ts +1 -0
- package/dist/types/components/Title/index.d.ts +1 -0
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +11 -0
- package/dist/types/components/VisuallyHidden/VisuallyHidden.stories.d.ts +6 -0
- package/dist/types/components/VisuallyHidden/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +40 -0
- package/dist/types/hooks/index.d.ts +7 -0
- package/dist/types/hooks/useBodyScrollLock/index.d.ts +1 -0
- package/dist/types/hooks/useBodyScrollLock/useBodyScrollLock.d.ts +3 -0
- package/dist/types/hooks/useBodyScrollLock/useBodyScrollLock.test.d.ts +1 -0
- package/dist/types/hooks/useBreakpoint/index.d.ts +1 -0
- package/dist/types/hooks/useBreakpoint/useBreakpoint.d.ts +14 -0
- package/dist/types/hooks/useBreakpoint/useBreakpoint.stories.d.ts +7 -0
- package/dist/types/hooks/useBreakpoint/useBreakpoint.test.d.ts +1 -0
- package/dist/types/hooks/useButton/index.d.ts +1 -0
- package/dist/types/hooks/useButton/useButton.d.ts +35 -0
- package/dist/types/hooks/useButton/useButton.test.d.ts +1 -0
- package/dist/types/hooks/useLabel/index.d.ts +1 -0
- package/dist/types/hooks/useLabel/useLabel.d.ts +27 -0
- package/dist/types/hooks/useLabel/useLabel.test.d.ts +1 -0
- package/dist/types/hooks/useOnClickOutside/index.d.ts +1 -0
- package/dist/types/hooks/useOnClickOutside/useOnClickOutside.d.ts +2 -0
- package/dist/types/hooks/useTextField/index.d.ts +2 -0
- package/dist/types/hooks/useTextField/types.d.ts +26 -0
- package/dist/types/hooks/useTextField/useTextField.d.ts +2 -0
- package/dist/types/hooks/useTextField/useTextField.test.d.ts +1 -0
- package/dist/types/hooks/useWindowEvent/index.d.ts +1 -0
- package/dist/types/hooks/useWindowEvent/useWindowEvent.d.ts +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/types/components.d.ts +2 -0
- package/dist/types/types/dom.d.ts +3 -0
- package/dist/types/types/events.d.ts +45 -0
- package/dist/types/types/icon.d.ts +9 -0
- package/dist/types/types/index.d.ts +5 -0
- package/dist/types/types/size.d.ts +1 -0
- package/dist/types/utils/StoryContainer.d.ts +1 -0
- package/dist/types/utils/changeCSS.d.ts +1 -0
- package/dist/types/utils/excludeControls.d.ts +1 -0
- package/dist/types/utils/excludeControls.test.d.ts +1 -0
- package/dist/types/utils/index.d.ts +7 -0
- package/dist/types/utils/jestHTMLDialogPolyfill.d.ts +1 -0
- package/dist/types/utils/jestMockMatchMedia.d.ts +1 -0
- package/dist/types/utils/mergeRefs.d.ts +2 -0
- package/dist/types/utils/polyfill-tests.d.ts +1 -0
- package/dist/types/utils/sizeClasses.d.ts +16 -0
- package/dist/types/utils/sizeClasses.test.d.ts +1 -0
- package/dist/types/utils/spaceDelimitedList.d.ts +1 -0
- package/dist/types/utils/spaceDelimitedList.test.d.ts +1 -0
- package/package.json +9 -11
- package/src/components/Drawer/Drawer.tsx +40 -20
- package/src/components/Modal/Modal.mdx +0 -1
- package/src/components/Modal/Modal.stories.tsx +1 -1
- package/src/components/Modal/Modal.test.tsx +0 -13
- package/src/components/Modal/Modal.tsx +31 -19
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Ref, ReactNode, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
4
|
+
export type ListItemElementType = HTMLLIElement;
|
|
5
|
+
export interface ListItemProps extends DOMProps, RefAttributes<ListItemElementType> {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
value?: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
parentIcon?: ReactNode;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export type ListItemRef = Ref<ListItemElementType>;
|
|
13
|
+
declare const ListItem: ForwardedRefComponent<ListItemProps, ListItemElementType>;
|
|
14
|
+
export { ListItem };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Ref, RefAttributes } from "react";
|
|
2
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
3
|
+
import { IconProps } from "../Icon";
|
|
4
|
+
export interface LoadingIndicatorProps extends RefAttributes<SVGSVGElement>, IconProps {
|
|
5
|
+
}
|
|
6
|
+
export type LoadingIndicatorRef = Ref<SVGSVGElement>;
|
|
7
|
+
declare const LoadingIndicator: ForwardedRefComponent<LoadingIndicatorProps, SVGSVGElement>;
|
|
8
|
+
export { LoadingIndicator };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { LoadingIndicator } from "./LoadingIndicator";
|
|
3
|
+
type StoryType = StoryObj<typeof LoadingIndicator>;
|
|
4
|
+
declare const meta: Meta<typeof LoadingIndicator>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const Large: StoryType;
|
|
7
|
+
export declare const WithCustomColour: StoryType;
|
|
8
|
+
export declare const WithCustomIcon: StoryType;
|
|
9
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LoadingIndicator";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Ref, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
4
|
+
export type LogoElementType = SVGSVGElement;
|
|
5
|
+
export interface LogoProps extends DOMProps, RefAttributes<LogoElementType> {
|
|
6
|
+
/** Custom class name for setting specific CSS */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Custom width. When defined along with height, it will scale proportionally */
|
|
9
|
+
width?: string;
|
|
10
|
+
/** Custom height. When defined along with width, it will scale proportionally */
|
|
11
|
+
height?: string;
|
|
12
|
+
}
|
|
13
|
+
export type LogoRef = Ref<LogoElementType>;
|
|
14
|
+
export declare const Logo: ForwardedRefComponent<LogoProps, LogoElementType>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Logo";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PropsWithChildren, Ref, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
export type DivRef = Ref<HTMLDivElement>;
|
|
4
|
+
export type DivElementType = HTMLDivElement;
|
|
5
|
+
export interface ContentProps extends DOMProps, RefAttributes<DivElementType>, PropsWithChildren {
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
closeLabel?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Content: import("react").ForwardRefExoticComponent<Omit<ContentProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export { Content };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PropsWithChildren, Ref, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
export type HeaderElementType = HTMLDivElement;
|
|
4
|
+
export type HeaderRef = Ref<HTMLElement>;
|
|
5
|
+
export interface HeaderProps extends DOMProps, RefAttributes<HeaderElementType>, PropsWithChildren {
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
closeLabel?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Header: import("react").ForwardRefExoticComponent<Omit<HeaderProps, "ref"> & RefAttributes<HTMLElement>>;
|
|
10
|
+
export { Header };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Ref } from "react";
|
|
2
|
+
import { ModalProps } from "./types";
|
|
3
|
+
export type ModalElementType = HTMLDialogElement;
|
|
4
|
+
export type ModalRef = Ref<ModalElementType>;
|
|
5
|
+
declare const Modal: import("react").ForwardRefExoticComponent<ModalProps & import("react").RefAttributes<HTMLDialogElement>>;
|
|
6
|
+
export { Modal };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Modal } from ".";
|
|
3
|
+
type StoryType = StoryObj<typeof Modal>;
|
|
4
|
+
declare const meta: Meta<typeof Modal>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const FullScreen: StoryType;
|
|
7
|
+
export declare const WithAnimation: StoryType;
|
|
8
|
+
export declare const WithLongContent: StoryType;
|
|
9
|
+
export declare const WithNested: StoryType;
|
|
10
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DivElementType as ModalContentDivElementType, ContentProps as ModalContentProps } from "./Content";
|
|
2
|
+
import { HeaderElementType as ModalHeaderElementType, HeaderProps as ModalHeaderProps } from "./Header";
|
|
3
|
+
import { ModalProps } from "./types";
|
|
4
|
+
declare const Modal: import("react").ForwardRefExoticComponent<ModalProps & import("react").RefAttributes<HTMLDialogElement>> & {
|
|
5
|
+
Header: import("react").ForwardRefExoticComponent<Omit<ModalHeaderProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
6
|
+
Content: import("react").ForwardRefExoticComponent<Omit<ModalContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
};
|
|
8
|
+
export { Modal };
|
|
9
|
+
export type { ModalContentDivElementType, ModalContentProps, ModalHeaderElementType, ModalHeaderProps, ModalProps, };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface ModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onOpen?: () => void;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
closeLabel?: string;
|
|
9
|
+
animation?: "slideUp" | "fade";
|
|
10
|
+
isFullScreen?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* **Deprecated:** No longer needed
|
|
13
|
+
*/
|
|
14
|
+
size?: string;
|
|
15
|
+
/**
|
|
16
|
+
* **Deprecated:** No longer needed
|
|
17
|
+
*/
|
|
18
|
+
appElement?: string;
|
|
19
|
+
/**
|
|
20
|
+
* **Deprecated:** No longer needed
|
|
21
|
+
*/
|
|
22
|
+
preventCloseOnEsc?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* **Deprecated:** No longer needed
|
|
25
|
+
*/
|
|
26
|
+
shouldFocusAfterRender?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* **Deprecated:** No longer needed
|
|
29
|
+
*/
|
|
30
|
+
parentSelector?: () => HTMLElement;
|
|
31
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ChangeEvent, Ref, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { UseLabelProps } from "../../hooks";
|
|
4
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
5
|
+
export type NumberFieldElementType = HTMLInputElement;
|
|
6
|
+
export interface NumberFieldProps extends DOMProps, UseLabelProps, RefAttributes<NumberFieldElementType> {
|
|
7
|
+
id?: string;
|
|
8
|
+
/** Custom class name for setting specific CSS */
|
|
9
|
+
className?: string;
|
|
10
|
+
validationState?: "valid" | "invalid" | undefined;
|
|
11
|
+
/** The smallest value allowed for the input. */
|
|
12
|
+
minValue?: number;
|
|
13
|
+
/** The largest value allowed for the input. */
|
|
14
|
+
maxValue?: number;
|
|
15
|
+
/** The amount that the input value changes with each increment or decrement "tick". */
|
|
16
|
+
step?: number;
|
|
17
|
+
/** The default value (uncontrolled). */
|
|
18
|
+
defaultValue?: number;
|
|
19
|
+
/** Handler that is called when the value changes. */
|
|
20
|
+
onChange?: (event: ChangeEvent<NumberFieldElementType>) => void;
|
|
21
|
+
/** Temporary text that occupies the text input when it is empty. */
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
/** Whether user input is required on the input before form submission. */
|
|
24
|
+
isRequired?: boolean;
|
|
25
|
+
/** Whether the input is disabled. */
|
|
26
|
+
isDisabled?: boolean;
|
|
27
|
+
/** Whether the input can be selected but not changed by the user. */
|
|
28
|
+
isReadOnly?: boolean;
|
|
29
|
+
/** An error message for the field. */
|
|
30
|
+
errorMessage?: string;
|
|
31
|
+
/** Identifies the element (or elements) that describes the object. */
|
|
32
|
+
"aria-describedby"?: string | undefined;
|
|
33
|
+
}
|
|
34
|
+
export type NumberFieldRef = Ref<NumberFieldElementType>;
|
|
35
|
+
export declare const NumberField: ForwardedRefComponent<NumberFieldProps, NumberFieldElementType>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { NumberField } from "./NumberField";
|
|
3
|
+
type StoryType = StoryObj<typeof NumberField>;
|
|
4
|
+
declare const meta: Meta<typeof NumberField>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const LimitedRange: StoryType;
|
|
7
|
+
export declare const Valid: StoryType;
|
|
8
|
+
export declare const Invalid: StoryType;
|
|
9
|
+
export declare const Disabled: StoryType;
|
|
10
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./NumberField";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RefAttributes, Ref } from "react";
|
|
2
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
3
|
+
export interface OptionProps extends RefAttributes<HTMLOptionElement> {
|
|
4
|
+
value?: string;
|
|
5
|
+
children?: string;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type OptionRef = Ref<HTMLOptionElement>;
|
|
9
|
+
declare const Option: ForwardedRefComponent<OptionProps, HTMLOptionElement>;
|
|
10
|
+
export { Option };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Option";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type TextFieldProps, type TextFieldRef } from "../TextField";
|
|
2
|
+
export interface PasswordFieldProps extends TextFieldProps {
|
|
3
|
+
}
|
|
4
|
+
export type PasswordFieldRef = TextFieldRef;
|
|
5
|
+
export declare const PasswordField: import("react").ForwardRefExoticComponent<Omit<PasswordFieldProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { PasswordField } from "./PasswordField";
|
|
3
|
+
type StoryType = StoryObj<typeof PasswordField>;
|
|
4
|
+
declare const meta: Meta<typeof PasswordField>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./PasswordField";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactElement, ReactNode, Ref, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types";
|
|
3
|
+
export type PopoverElementType = HTMLDivElement;
|
|
4
|
+
export interface PopoverProps extends DOMProps, RefAttributes<PopoverElementType> {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
trigger: ReactElement;
|
|
7
|
+
/** Callback that fires each time the accordion is opened */
|
|
8
|
+
onOpen?: () => void;
|
|
9
|
+
/** Callback that fires each time the accordion is closed */
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
/** Custom class name for setting specific CSS */
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export type PopoverRef = Ref<PopoverElementType>;
|
|
15
|
+
export declare const Popover: (props: PopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Popover } from "..";
|
|
3
|
+
type StoryType = StoryObj<typeof Popover>;
|
|
4
|
+
declare const meta: Meta<typeof Popover>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const CustomTrigger: StoryType;
|
|
7
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Popover";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AriaProgressBarProps } from "@react-types/progress";
|
|
2
|
+
import { ReactNode, Ref, RefAttributes } from "react";
|
|
3
|
+
import { DOMProps } from "../../types/dom";
|
|
4
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
5
|
+
export type ProgressElementType = HTMLDivElement;
|
|
6
|
+
export interface ProgressProps extends AriaProgressBarProps, DOMProps, RefAttributes<ProgressElementType> {
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/** Custom class name for setting specific CSS */
|
|
9
|
+
id?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
showValueLabel?: boolean;
|
|
12
|
+
variant?: "primary" | "secondary" | "success" | "danger" | "warning" | "info";
|
|
13
|
+
value?: number;
|
|
14
|
+
minValue?: number;
|
|
15
|
+
maxValue?: number;
|
|
16
|
+
valueFormatter?: (value: number, minValue: number, maxValue: number) => string;
|
|
17
|
+
}
|
|
18
|
+
export type ProgressRef = Ref<ProgressElementType>;
|
|
19
|
+
declare const Progress: ForwardedRefComponent<ProgressProps, ProgressElementType>;
|
|
20
|
+
export { Progress };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Progress } from "./Progress";
|
|
3
|
+
type StoryType = StoryObj<typeof Progress>;
|
|
4
|
+
declare const meta: Meta<typeof Progress>;
|
|
5
|
+
export declare const Primary: StoryType;
|
|
6
|
+
export declare const Secondary: StoryType;
|
|
7
|
+
export declare const NoVisibleLabel: StoryType;
|
|
8
|
+
export declare const CustomValueFormat: StoryType;
|
|
9
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Progress";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ReactNode, Ref, RefAttributes } from "react";
|
|
2
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
3
|
+
import { DOMProps } from "../../types/dom";
|
|
4
|
+
import { HTMLElementEvent } from "../../types/events";
|
|
5
|
+
export type RadioElementType = HTMLInputElement;
|
|
6
|
+
export type AriaRadioProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Defines a string value that labels the current element.
|
|
9
|
+
*/
|
|
10
|
+
"aria-label"?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Identifies the element (or elements) that labels the current element.
|
|
13
|
+
*/
|
|
14
|
+
"aria-labelledby"?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Identifies the element (or elements) that describes the object.
|
|
17
|
+
*/
|
|
18
|
+
"aria-describedby"?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Identifies the element (or elements) that provide a detailed, extended description for the object.
|
|
21
|
+
*/
|
|
22
|
+
"aria-details"?: string;
|
|
23
|
+
};
|
|
24
|
+
export interface RadioProps extends DOMProps, AriaRadioProps, RefAttributes<RadioElementType> {
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
label?: ReactNode;
|
|
28
|
+
errorMessage?: string;
|
|
29
|
+
value: string;
|
|
30
|
+
isDisabled?: boolean;
|
|
31
|
+
onChange?: (event: HTMLElementEvent<RadioElementType>) => void;
|
|
32
|
+
defaultChecked?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* **Internal:** Do not use
|
|
35
|
+
*/
|
|
36
|
+
groupDisabled?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* **Internal:** Do not use
|
|
39
|
+
*/
|
|
40
|
+
name?: string;
|
|
41
|
+
/**
|
|
42
|
+
* **Internal:** Do not use
|
|
43
|
+
*/
|
|
44
|
+
selected?: string;
|
|
45
|
+
/**
|
|
46
|
+
* **Internal:** Do not use
|
|
47
|
+
*/
|
|
48
|
+
setSelected?: React.Dispatch<React.SetStateAction<string>>;
|
|
49
|
+
isRequired?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export type RadioRef = Ref<RadioElementType>;
|
|
52
|
+
declare const Radio: ForwardedRefComponent<RadioProps, RadioElementType>;
|
|
53
|
+
export { Radio };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { RadioGroup } from "./RadioGroup";
|
|
3
|
+
type StoryType = StoryObj<typeof RadioGroup>;
|
|
4
|
+
declare const meta: Meta<typeof RadioGroup>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const Disabled: StoryType;
|
|
7
|
+
export declare const DisabledIndividualRadios: StoryType;
|
|
8
|
+
export declare const Valid: StoryType;
|
|
9
|
+
export declare const Invalid: StoryType;
|
|
10
|
+
export declare const ComplexLabel: StoryType;
|
|
11
|
+
export declare const HorizontalLayout: StoryType;
|
|
12
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { RadioGroup } from "./RadioGroup";
|
|
3
|
+
type StoryType = StoryObj<typeof RadioGroup>;
|
|
4
|
+
declare const meta: Meta<typeof RadioGroup>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const LabelProp: StoryType;
|
|
7
|
+
export declare const Selected: StoryType;
|
|
8
|
+
export declare const Disabled: StoryType;
|
|
9
|
+
export declare const VerticalOrientation: StoryType;
|
|
10
|
+
export declare const IconButtons: StoryType;
|
|
11
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode, Ref, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
4
|
+
import { HTMLElementEvent } from "../../types/events";
|
|
5
|
+
export type RadioGroupElementType = HTMLDivElement;
|
|
6
|
+
export interface RadioGroupProps extends DOMProps, RefAttributes<RadioGroupElementType> {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
orientation?: "horizontal" | "vertical";
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
onChange?: (event: HTMLElementEvent<HTMLInputElement>) => void;
|
|
12
|
+
"aria-label"?: string;
|
|
13
|
+
"aria-labelledby"?: string;
|
|
14
|
+
"aria-errormessage"?: string;
|
|
15
|
+
"aria-describedby"?: string;
|
|
16
|
+
validationState?: "valid" | "invalid";
|
|
17
|
+
isRequired?: boolean;
|
|
18
|
+
isDisabled?: boolean;
|
|
19
|
+
isReadOnly?: boolean;
|
|
20
|
+
defaultValue?: string;
|
|
21
|
+
label?: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* The value of the radio button, used when submitting an HTML form.
|
|
24
|
+
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio#Value).
|
|
25
|
+
*/
|
|
26
|
+
value?: string;
|
|
27
|
+
}
|
|
28
|
+
export type RadioGroupRef = Ref<RadioGroupElementType>;
|
|
29
|
+
declare const RadioGroup: ForwardedRefComponent<RadioGroupProps, RadioGroupElementType>;
|
|
30
|
+
export { RadioGroup };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Ref, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
4
|
+
export interface SVGProps extends DOMProps, RefAttributes<SVGSVGElement> {
|
|
5
|
+
children: React.ReactElement<React.SVGProps<SVGSVGElement>>;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
export type SVGRef = Ref<SVGSVGElement>;
|
|
10
|
+
declare const SVG: ForwardedRefComponent<SVGProps, SVGSVGElement>;
|
|
11
|
+
export { SVG };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SVG";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
export interface SegmentProps extends DOMProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
heading?: string;
|
|
6
|
+
/** Background colour for Segment */
|
|
7
|
+
colour?: "subtle" | "primary" | "secondary";
|
|
8
|
+
/** When inverted, text is white. Use on darker backgrounds. */
|
|
9
|
+
inverted?: boolean;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare const Segment: {
|
|
13
|
+
(props: SegmentProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
export { Segment };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Segment } from "./Segment";
|
|
3
|
+
import { SegmentGroup } from "./SegmentGroup";
|
|
4
|
+
type StoryType = StoryObj<typeof Segment>;
|
|
5
|
+
declare const meta: Meta<typeof Segment>;
|
|
6
|
+
export declare const Single: StoryType;
|
|
7
|
+
export declare const VerticalStack: StoryType;
|
|
8
|
+
export declare const HorizontalStack: Meta<typeof SegmentGroup>;
|
|
9
|
+
export declare const Nested: StoryType;
|
|
10
|
+
export declare const Nested2: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const Nested3: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const ColouredBackground: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const HorizontalStack2: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const HorizontalStack3: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const BottomMarginRemoved: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const CompoundLayout: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const MarginAround: () => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const PaymentDetails: () => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default meta;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
export interface SegmentGroupProps extends DOMProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
horizontal?: boolean;
|
|
6
|
+
margin?: "size-xs" | "size-s" | "size-m" | "size-l" | "size-xl" | "size-xxl";
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const SegmentGroup: {
|
|
10
|
+
(props: SegmentGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export { SegmentGroup };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ChangeEvent, ReactElement, Ref, RefAttributes } from "react";
|
|
2
|
+
import { UseLabelProps } from "../../hooks/useLabel";
|
|
3
|
+
import { DOMProps, Validation } from "../../types";
|
|
4
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
5
|
+
import { OptionProps } from "../Option";
|
|
6
|
+
export type SelectElementType = HTMLSelectElement;
|
|
7
|
+
export interface SelectProps extends UseLabelProps, Validation, DOMProps, RefAttributes<SelectElementType> {
|
|
8
|
+
name?: string;
|
|
9
|
+
onChange?: (e: ChangeEvent<HTMLSelectElement>) => void;
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
errorMessage?: string;
|
|
14
|
+
children?: ReactElement<OptionProps>[] | ReactElement<OptionProps>;
|
|
15
|
+
"aria-describedby"?: string;
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type SelectRef = Ref<SelectElementType>;
|
|
19
|
+
declare const Select: ForwardedRefComponent<SelectProps, SelectElementType>;
|
|
20
|
+
export { Select };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Select } from "./Select";
|
|
3
|
+
type StoryType = StoryObj<typeof Select>;
|
|
4
|
+
declare const meta: Meta<typeof Select>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const ControlledValue: StoryType;
|
|
7
|
+
export declare const Disabled: StoryType;
|
|
8
|
+
export declare const Valid: StoryType;
|
|
9
|
+
export declare const Invalid: StoryType;
|
|
10
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Select";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DOMProps } from "../../types/dom";
|
|
2
|
+
import { UseLabelProps } from "../../hooks";
|
|
3
|
+
export interface SliderProps extends DOMProps, UseLabelProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
variant?: "primary" | "secondary";
|
|
6
|
+
className?: string;
|
|
7
|
+
minValue?: number;
|
|
8
|
+
maxValue?: number;
|
|
9
|
+
defaultValue?: number;
|
|
10
|
+
value?: number;
|
|
11
|
+
step?: number;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
onChange?: (value: number | undefined) => void;
|
|
14
|
+
onChangeEnd?: (value: number | undefined) => void;
|
|
15
|
+
minLabel?: string;
|
|
16
|
+
maxLabel?: string;
|
|
17
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
18
|
+
}
|
|
19
|
+
export declare const Slider: (props: SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Slider } from "./Slider";
|
|
3
|
+
type StoryType = StoryObj<typeof Slider>;
|
|
4
|
+
declare const meta: Meta<typeof Slider>;
|
|
5
|
+
export declare const Primary: StoryType;
|
|
6
|
+
export declare const Secondary: StoryType;
|
|
7
|
+
export declare const Formatted: StoryType;
|
|
8
|
+
export declare const NoLabel: StoryType;
|
|
9
|
+
export declare const Disabled: StoryType;
|
|
10
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|