@simplybusiness/mobius 4.3.1 → 4.3.3
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 +15 -0
- package/dist/cjs/components/Drawer/Drawer.js +8 -1
- package/dist/cjs/components/Drawer/Drawer.js.map +1 -1
- package/dist/cjs/components/Icon/Icon.js +0 -2
- package/dist/cjs/components/Icon/Icon.js.map +1 -1
- package/dist/cjs/components/Modal/Modal.js +8 -1
- package/dist/cjs/components/Modal/Modal.js.map +1 -1
- package/dist/esm/components/Drawer/Drawer.js +8 -1
- package/dist/esm/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/components/Icon/Icon.js +0 -2
- package/dist/esm/components/Icon/Icon.js.map +1 -1
- package/dist/esm/components/Modal/Modal.js +8 -1
- 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 +8 -1
- package/src/components/Icon/Icon.tsx +0 -3
- package/src/components/Modal/Modal.tsx +9 -1
- package/src/components/Icon/IconStyle.tsx +0 -404
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ChangeEvent, ReactNode, Ref, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
export type CheckboxElementType = HTMLInputElement;
|
|
4
|
+
export type CheckboxRef = Ref<CheckboxElementType>;
|
|
5
|
+
export interface CheckboxProps extends DOMProps, RefAttributes<CheckboxElementType> {
|
|
6
|
+
className?: string;
|
|
7
|
+
label?: ReactNode;
|
|
8
|
+
errorMessage?: string;
|
|
9
|
+
/** The current value (controlled). */
|
|
10
|
+
value?: string;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
onChange?: (event: ChangeEvent<CheckboxElementType>) => void;
|
|
13
|
+
defaultSelected?: boolean;
|
|
14
|
+
validationState?: "valid" | "invalid";
|
|
15
|
+
isReadOnly?: boolean;
|
|
16
|
+
isRequired?: boolean;
|
|
17
|
+
"aria-errormessage"?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Identifies the element (or elements) that describes the object.
|
|
20
|
+
*/
|
|
21
|
+
"aria-describedby"?: string;
|
|
22
|
+
/**
|
|
23
|
+
* **Internal:** Do not use
|
|
24
|
+
*/
|
|
25
|
+
groupDisabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* **Internal:** Do not use
|
|
28
|
+
*/
|
|
29
|
+
selected?: string;
|
|
30
|
+
/**
|
|
31
|
+
* **Internal:** Do not use
|
|
32
|
+
*/
|
|
33
|
+
setSelected?: React.Dispatch<React.SetStateAction<string>>;
|
|
34
|
+
}
|
|
35
|
+
export type CheckboxGroupElementType = HTMLDivElement;
|
|
36
|
+
export interface CheckboxGroupProps extends DOMProps, RefAttributes<CheckboxGroupElementType> {
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
className?: string;
|
|
39
|
+
orientation?: "horizontal" | "vertical";
|
|
40
|
+
errorMessage?: string;
|
|
41
|
+
onChange?: (values: string[]) => void;
|
|
42
|
+
"aria-labelledby"?: string;
|
|
43
|
+
"aria-describedby"?: string;
|
|
44
|
+
validationState?: "valid" | "invalid";
|
|
45
|
+
isRequired?: boolean;
|
|
46
|
+
isDisabled?: boolean;
|
|
47
|
+
isReadOnly?: boolean;
|
|
48
|
+
defaultValue?: string[];
|
|
49
|
+
label?: ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* The value of the radio button, used when submitting an HTML form.
|
|
52
|
+
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio#Value).
|
|
53
|
+
*/
|
|
54
|
+
value?: string;
|
|
55
|
+
}
|
|
56
|
+
export type CheckboxGroupRef = Ref<CheckboxGroupElementType>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Ref, RefAttributes, ReactNode } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
4
|
+
export type ContainerElementType = HTMLDivElement;
|
|
5
|
+
export type ContainerRef = Ref<ContainerElementType>;
|
|
6
|
+
export interface ContainerProps extends DOMProps, RefAttributes<ContainerElementType> {
|
|
7
|
+
id?: string;
|
|
8
|
+
/** Custom class name for setting specific CSS */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** HTML element for the Box */
|
|
11
|
+
elementType?: "div" | "span";
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const Container: ForwardedRefComponent<ContainerProps, ContainerElementType>;
|
|
15
|
+
export { Container };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Container";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AriaAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
export interface DividerProps extends DOMProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
"aria-orientation"?: AriaAttributes["aria-orientation"];
|
|
6
|
+
}
|
|
7
|
+
declare const Divider: {
|
|
8
|
+
({ "aria-orientation": ariaOrientation, className, ...rest }: DividerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export { Divider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Divider";
|
|
@@ -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,6 @@
|
|
|
1
|
+
import { Ref } from "react";
|
|
2
|
+
import { DrawerProps } from "./types";
|
|
3
|
+
export type DialogElementType = HTMLDialogElement;
|
|
4
|
+
export type DialogRef = Ref<DialogElementType>;
|
|
5
|
+
declare const Drawer: import("react").ForwardRefExoticComponent<DrawerProps & import("react").RefAttributes<HTMLDialogElement>>;
|
|
6
|
+
export { Drawer };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Drawer } from ".";
|
|
3
|
+
type StoryType = StoryObj<typeof Drawer>;
|
|
4
|
+
declare const meta: Meta<typeof Drawer>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const WithLogoHeader: StoryType;
|
|
7
|
+
export declare const WithLongContent: StoryType;
|
|
8
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,9 @@
|
|
|
1
|
+
import { DivElementType as DrawerContentDivElementType, ContentProps as DrawerContentProps } from "./Content";
|
|
2
|
+
import { DrawerProps } from "./types";
|
|
3
|
+
import { HeaderElementType as DrawerHeaderElementType, HeaderProps as DrawerHeaderProps } from "./Header";
|
|
4
|
+
declare const Drawer: import("react").ForwardRefExoticComponent<DrawerProps & import("react").RefAttributes<HTMLDialogElement>> & {
|
|
5
|
+
Header: import("react").ForwardRefExoticComponent<Omit<DrawerHeaderProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
6
|
+
Content: import("react").ForwardRefExoticComponent<Omit<DrawerContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
};
|
|
8
|
+
export { Drawer };
|
|
9
|
+
export type { DrawerContentDivElementType, DrawerContentProps, DrawerHeaderElementType, DrawerHeaderProps, DrawerProps, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface DrawerProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Direction that drawer will open from
|
|
6
|
+
*/
|
|
7
|
+
direction: "top" | "bottom" | "left" | "right";
|
|
8
|
+
className?: string;
|
|
9
|
+
closeLabel?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Announce text for screen readers when drawer opens
|
|
12
|
+
*/
|
|
13
|
+
announce?: string;
|
|
14
|
+
onOpen?: () => void;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Ref, RefAttributes, ReactNode, ReactElement } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
4
|
+
export type DropdownMenuElementType = HTMLElement;
|
|
5
|
+
export interface DropdownMenuProps extends DOMProps, RefAttributes<DropdownMenuElementType> {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/** Custom class name for setting specific CSS */
|
|
8
|
+
className?: string;
|
|
9
|
+
elementType?: string | React.ElementType;
|
|
10
|
+
label?: string;
|
|
11
|
+
trigger?: ReactElement;
|
|
12
|
+
}
|
|
13
|
+
export type DropdownMenuRef = Ref<DropdownMenuElementType>;
|
|
14
|
+
declare const DropdownMenu: ForwardedRefComponent<DropdownMenuProps, DropdownMenuElementType>;
|
|
15
|
+
export { DropdownMenu };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { DropdownMenu } from ".";
|
|
3
|
+
type StoryType = StoryObj<typeof DropdownMenu>;
|
|
4
|
+
declare const meta: Meta<typeof DropdownMenu>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const WithCustomTrigger: StoryType;
|
|
7
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Ref, RefAttributes, ReactNode } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
4
|
+
export type ItemElementType = HTMLLIElement;
|
|
5
|
+
export interface ItemProps extends DOMProps, RefAttributes<ItemElementType> {
|
|
6
|
+
elementType?: string | React.ElementType;
|
|
7
|
+
/** Custom class name for setting specific CSS */
|
|
8
|
+
className?: string;
|
|
9
|
+
active?: boolean;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export type ItemRef = Ref<ItemElementType>;
|
|
14
|
+
declare const Item: ForwardedRefComponent<ItemProps, ItemElementType>;
|
|
15
|
+
export { Item };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
2
|
+
import { DropdownMenuProps, DropdownMenuRef } from "./DropdownMenu";
|
|
3
|
+
import type { DropdownMenuElementType } from "./DropdownMenu";
|
|
4
|
+
import type { ItemProps as DropdownMenuItemProps, ItemRef as DropdownMenuItemRef, ItemElementType as DropdownMenuItemElementType } from "./Item";
|
|
5
|
+
export interface DropdownMenuCompound extends ForwardedRefComponent<DropdownMenuProps, HTMLElement> {
|
|
6
|
+
Item: ForwardedRefComponent<DropdownMenuItemProps, HTMLLIElement>;
|
|
7
|
+
}
|
|
8
|
+
declare const DropdownMenu: DropdownMenuCompound;
|
|
9
|
+
export type { DropdownMenuElementType, DropdownMenuProps, DropdownMenuRef, DropdownMenuItemProps, DropdownMenuItemRef, DropdownMenuItemElementType, };
|
|
10
|
+
export { DropdownMenu };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ErrorMessageProps {
|
|
2
|
+
errorMessage?: string;
|
|
3
|
+
id?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const ErrorMessage: {
|
|
7
|
+
({ id, errorMessage, className, }: ErrorMessageProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { ErrorMessage } from ".";
|
|
3
|
+
type StoryType = StoryObj<typeof ErrorMessage>;
|
|
4
|
+
declare const meta: Meta<typeof ErrorMessage>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const LongMessage: StoryType;
|
|
7
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ErrorMessage";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactElement, ReactNode, Ref, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
4
|
+
export type LegendProps = {
|
|
5
|
+
id?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export type FieldsetElementType = HTMLDivElement;
|
|
9
|
+
export interface FieldsetProps extends DOMProps, RefAttributes<FieldsetElementType> {
|
|
10
|
+
legend?: string;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
legendComponent?: ReactElement<any>;
|
|
14
|
+
}
|
|
15
|
+
export type FieldsetRef = Ref<FieldsetElementType>;
|
|
16
|
+
declare const Fieldset: ForwardedRefComponent<FieldsetProps, FieldsetElementType>;
|
|
17
|
+
export { Fieldset };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Fieldset } from "./Fieldset";
|
|
3
|
+
type StoryType = StoryObj<typeof Fieldset>;
|
|
4
|
+
declare const meta: Meta<typeof Fieldset>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const WithLegend: StoryType;
|
|
7
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Fieldset";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Flex } from "./Flex";
|
|
3
|
+
type StoryType = StoryObj<typeof Flex>;
|
|
4
|
+
declare const meta: Meta<typeof Flex>;
|
|
5
|
+
export declare const RowLayout: StoryType;
|
|
6
|
+
export declare const ColumnLayout: StoryType;
|
|
7
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FlexNonStyleProps, FlexProps, FlexStyleProps } from "./types";
|
|
2
|
+
export declare const withoutUndefinedValues: (obj: Record<string, unknown>) => {
|
|
3
|
+
[k: string]: unknown;
|
|
4
|
+
};
|
|
5
|
+
export declare const buildFlexStyles: (props: FlexStyleProps) => {
|
|
6
|
+
[k: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
export declare const splitProps: (props: FlexProps) => [FlexStyleProps, FlexNonStyleProps];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Ref, ReactNode, RefAttributes, AriaRole } from "react";
|
|
2
|
+
import type { Property } from "csstype";
|
|
3
|
+
import { DOMProps } from "../../types/dom";
|
|
4
|
+
export type FlexElementType = HTMLDivElement;
|
|
5
|
+
export interface FlexStyleProps {
|
|
6
|
+
elementType?: string | React.ElementType;
|
|
7
|
+
flexDirection?: Property.FlexDirection;
|
|
8
|
+
flexWrap?: Property.FlexWrap;
|
|
9
|
+
flexGrow?: Property.FlexGrow;
|
|
10
|
+
flex?: Property.Flex;
|
|
11
|
+
/** Aligns grid items along the block (column) axis */
|
|
12
|
+
alignItems?: Property.AlignItems;
|
|
13
|
+
/** Aligns the grid along the inline (row) axis */
|
|
14
|
+
alignContent?: Property.AlignContent;
|
|
15
|
+
/** Aligns the grid along the inline (row) axis */
|
|
16
|
+
justifyContent?: Property.JustifyContent;
|
|
17
|
+
/** How big a gap between the columns and rows */
|
|
18
|
+
gap?: Property.Gap;
|
|
19
|
+
/** How big a gap between the rows */
|
|
20
|
+
rowGap?: Property.RowGap;
|
|
21
|
+
/** How big a gap between the columns */
|
|
22
|
+
columnGap?: Property.ColumnGap;
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
role?: AriaRole;
|
|
25
|
+
}
|
|
26
|
+
export interface FlexNonStyleProps extends DOMProps, RefAttributes<FlexElementType> {
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
/** Custom class name for setting specific CSS */
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface FlexProps extends FlexStyleProps, FlexNonStyleProps {
|
|
32
|
+
}
|
|
33
|
+
export type FlexRef = Ref<FlexElementType>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Ref, ReactNode, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
4
|
+
export type GridElementType = HTMLDivElement;
|
|
5
|
+
export interface GridProps extends RefAttributes<GridElementType>, DOMProps {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/** The number of columns */
|
|
8
|
+
columns?: number;
|
|
9
|
+
/** How big a gap between the columns and rows */
|
|
10
|
+
gap?: string;
|
|
11
|
+
/** How big a gap between the columns */
|
|
12
|
+
columnGap?: string;
|
|
13
|
+
/** How big a gap between the rows */
|
|
14
|
+
rowGap?: string;
|
|
15
|
+
/** Aligns the grid along the block (column) axis */
|
|
16
|
+
alignContent?: "center" | "space-around" | "space-between" | "space-evenly" | "stretch";
|
|
17
|
+
/** Aligns the grid along the inline (row) axis */
|
|
18
|
+
justifyContent?: "center" | "start" | "end" | "space-around" | "space-between" | "space-evenly";
|
|
19
|
+
/** Aligns grid items along the block (column) axis */
|
|
20
|
+
alignItems?: "center" | "start" | "end" | "stretch" | "baseline";
|
|
21
|
+
/** Aligns grid items along the inline (row) axis */
|
|
22
|
+
justifyItems?: "start" | "end" | "center" | "stretch";
|
|
23
|
+
/** Custom class name for setting specific CSS */
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export type GridRef = Ref<GridElementType>;
|
|
27
|
+
declare const Grid: ForwardedRefComponent<GridProps, GridElementType>;
|
|
28
|
+
export { Grid };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Grid } from ".";
|
|
3
|
+
import { GridItem } from "./Item";
|
|
4
|
+
type StoryType = StoryObj<typeof Grid>;
|
|
5
|
+
declare const meta: Meta<typeof Grid>;
|
|
6
|
+
export declare const AlignmentProperties: StoryType;
|
|
7
|
+
export declare const Normal: StoryType;
|
|
8
|
+
export declare const EightColumns: StoryType;
|
|
9
|
+
export declare const Responsive: Meta<typeof GridItem>;
|
|
10
|
+
export declare const ItemPositioning: Meta<typeof GridItem>;
|
|
11
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Ref, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
4
|
+
import { SizeType } from "../../types";
|
|
5
|
+
export type GridItemElementType = HTMLDivElement;
|
|
6
|
+
export interface GridItemProps extends RefAttributes<GridItemElementType>, DOMProps {
|
|
7
|
+
/** How many columns the item spans */
|
|
8
|
+
span?: number | number[];
|
|
9
|
+
/** React children */
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/** How many columns the item spans on the smallest breakpoint */
|
|
12
|
+
xs?: number;
|
|
13
|
+
sm?: number;
|
|
14
|
+
md?: number;
|
|
15
|
+
lg?: number;
|
|
16
|
+
xl?: number;
|
|
17
|
+
/** How many columns the item spans on the largest breakpoint */
|
|
18
|
+
xxl?: number;
|
|
19
|
+
/** Aligns the grid item along the block (column) axis */
|
|
20
|
+
alignSelf?: "center" | "start" | "end" | "stretch";
|
|
21
|
+
/** Aligns the grid item along the inline (row) axis */
|
|
22
|
+
justifySelf?: "center" | "start" | "end" | "stretch";
|
|
23
|
+
/** Custom class name for setting specific CSS */
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const getBreakpointMap: (config: Partial<Record<SizeType, number>>) => {};
|
|
27
|
+
export type GridItemRef = Ref<GridItemElementType>;
|
|
28
|
+
export declare const DEFAULT_SPAN = 12;
|
|
29
|
+
declare const GridItem: ForwardedRefComponent<GridItemProps, GridItemElementType>;
|
|
30
|
+
export { GridItem };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
2
|
+
import { GridElementType, GridProps } from "./Grid";
|
|
3
|
+
import { GridItemProps, GridItemElementType } from "./Item";
|
|
4
|
+
export interface GridCompound extends ForwardedRefComponent<GridProps, GridItemElementType> {
|
|
5
|
+
Item: ForwardedRefComponent<GridItemProps, GridElementType>;
|
|
6
|
+
}
|
|
7
|
+
declare const Grid: GridCompound;
|
|
8
|
+
export { Grid };
|
|
9
|
+
export type { GridProps, GridItemProps, GridElementType, GridItemElementType };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Icon } from "./Icon";
|
|
3
|
+
type StoryType = StoryObj<typeof Icon>;
|
|
4
|
+
declare const meta: Meta<typeof Icon>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const Spinning: StoryType;
|
|
7
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function applyStyles(): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ref } from "react";
|
|
2
|
+
import { IconDefinition } from "../../types/icon";
|
|
3
|
+
export type IconSizeProp = "xs" | "sm" | "md" | "lg";
|
|
4
|
+
export interface IconProps {
|
|
5
|
+
icon?: IconDefinition;
|
|
6
|
+
className?: string;
|
|
7
|
+
size?: IconSizeProp;
|
|
8
|
+
color?: string;
|
|
9
|
+
fixedWidth?: boolean;
|
|
10
|
+
spin?: boolean;
|
|
11
|
+
spinReverse?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type IconRef = Ref<SVGSVGElement>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RefAttributes, Ref } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
4
|
+
export type IntrinsicImage = Omit<JSX.IntrinsicElements["img"], "css" | "width" | "height" | "color"> & RefAttributes<HTMLImageElement>;
|
|
5
|
+
export interface ImageProps extends DOMProps, IntrinsicImage {
|
|
6
|
+
/** HTML element for the Box */
|
|
7
|
+
elementType?: React.ElementType;
|
|
8
|
+
/** Alternative text for accessibility */
|
|
9
|
+
alt: string;
|
|
10
|
+
/** Path to image asset */
|
|
11
|
+
src: string;
|
|
12
|
+
/** Custom class name for setting specific CSS */
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export type ImageRef = Ref<HTMLImageElement>;
|
|
16
|
+
declare const Image: ForwardedRefComponent<ImageProps, HTMLImageElement>;
|
|
17
|
+
export { Image };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Image";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode, Ref, RefAttributes } from "react";
|
|
2
|
+
import { DOMProps } from "../../types/dom";
|
|
3
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
4
|
+
export type LabelElementType = HTMLLabelElement;
|
|
5
|
+
export type IntrinsicLabel = Omit<JSX.IntrinsicElements["label"], "css" | "color" | "ref">;
|
|
6
|
+
export interface LabelProps extends IntrinsicLabel, DOMProps, RefAttributes<LabelElementType> {
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
elementType?: "label" | "span";
|
|
10
|
+
}
|
|
11
|
+
export type LabelRef = Ref<LabelElementType>;
|
|
12
|
+
declare const Label: ForwardedRefComponent<LabelProps, LabelElementType>;
|
|
13
|
+
export { Label };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Label";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { Ref, HTMLAttributeAnchorTarget } from "react";
|
|
2
|
+
import { ForwardedRefComponent } from "../../types/components";
|
|
3
|
+
export type LinkElementType = HTMLAnchorElement;
|
|
4
|
+
export interface LinkProps {
|
|
5
|
+
id?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/** Path to link resource or page */
|
|
8
|
+
href?: string;
|
|
9
|
+
/** Custom class name for setting specific CSS */
|
|
10
|
+
className?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
referrerPolicy?: ReferrerPolicy;
|
|
14
|
+
download?: boolean | string;
|
|
15
|
+
rel?: string;
|
|
16
|
+
target?: HTMLAttributeAnchorTarget;
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
to?: unknown;
|
|
20
|
+
elementType?: React.ElementType;
|
|
21
|
+
}
|
|
22
|
+
export type LinkRef = Ref<LinkElementType>;
|
|
23
|
+
declare const Link: ForwardedRefComponent<LinkProps, LinkElementType>;
|
|
24
|
+
export { Link };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Link } from "./Link";
|
|
3
|
+
type StoryType = StoryObj<typeof Link>;
|
|
4
|
+
declare const meta: Meta<typeof Link>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const Disabled: StoryType;
|
|
7
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Link";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HTMLAttributeAnchorTarget, MouseEvent } from "react";
|
|
2
|
+
import { ButtonProps } from "../Button";
|
|
3
|
+
export interface LinkButtonProps extends Omit<ButtonProps, "elementType"> {
|
|
4
|
+
href: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
referrerPolicy?: ReferrerPolicy;
|
|
8
|
+
download?: boolean | string;
|
|
9
|
+
rel?: string;
|
|
10
|
+
target?: HTMLAttributeAnchorTarget;
|
|
11
|
+
onClick?: (event: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
|
|
12
|
+
to?: unknown;
|
|
13
|
+
elementType?: React.ElementType;
|
|
14
|
+
}
|
|
15
|
+
export declare function LinkButton({ href, children, className, elementType, ...rest }: LinkButtonProps): import("react/jsx-runtime").JSX.Element;
|