@hyphen/hyphen-components 7.3.1 → 7.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/dist/css/utilities.css +1 -1
- package/dist/css/variables.css +18 -28
- package/dist/hyphen-components.cjs.development.js +5718 -5018
- package/dist/hyphen-components.cjs.development.js.map +1 -1
- package/dist/hyphen-components.cjs.production.min.js +18 -2
- package/dist/hyphen-components.cjs.production.min.js.map +1 -1
- package/dist/hyphen-components.esm.js +5619 -4843
- package/dist/hyphen-components.esm.js.map +1 -1
- package/dist/index.d.ts +2693 -57
- package/dist/index.js +0 -1
- package/package.json +18 -19
- package/src/components/Badge/Badge.module.scss +6 -0
- package/src/components/Badge/Badge.stories.tsx +1 -0
- package/src/components/Badge/Badge.test.tsx +3 -2
- package/src/components/Badge/Badge.tsx +5 -3
- package/src/components/Box/Box.tsx +5 -2
- package/src/components/Button/Button.module.scss +1 -1
- package/src/components/Button/Button.test.tsx +2 -2
- package/src/components/Calendar/Calendar.test.tsx +262 -0
- package/src/components/Card/Card.tsx +2 -0
- package/src/components/CheckboxInput/components/Checkbox.module.scss +1 -1
- package/src/components/CheckboxInput/components/Checkbox.tsx +2 -0
- package/src/components/Details/Details.module.scss +2 -2
- package/src/components/Details/Details.tsx +2 -0
- package/src/components/Drawer/Drawer.stories.tsx +1 -1
- package/src/components/Drawer/Drawer.test.tsx +494 -56
- package/src/components/Drawer/Drawer.tsx +7 -1
- package/src/components/DropdownMenu/DropdownMenu.test.tsx +532 -12
- package/src/components/FormControl/FormControl.tsx +2 -0
- package/src/components/Formik/Formik.stories.tsx +30 -7
- package/src/components/Formik/FormikSelectInput/FormikSelectInput.tsx +6 -5
- package/src/components/Formik/FormikToggleGroup/FormikToggleGroup.tsx +1 -1
- package/src/components/HelpText/HelpText.tsx +2 -0
- package/src/components/Icon/Icon.stories.tsx +1 -1
- package/src/components/Icon/Icon.tsx +2 -0
- package/src/components/Modal/Modal.test.tsx +630 -81
- package/src/components/Modal/Modal.tsx +2 -0
- package/src/components/Modal/components/ModalFooter/ModalFooter.test.tsx +2 -2
- package/src/components/Popover/Popover.tsx +2 -0
- package/src/components/RadioGroup/RadioInput/RadioInput.tsx +2 -0
- package/src/components/SelectInput/SelectInput.stories.tsx +22 -22
- package/src/components/SelectInput/SelectInput.tsx +13 -9
- package/src/components/SelectInputInset/SelectInputInset.tsx +2 -0
- package/src/components/Sidebar/Sidebar.module.scss +4 -0
- package/src/components/Sidebar/Sidebar.stories.tsx +8 -4
- package/src/components/Sidebar/Sidebar.test.tsx +7 -4
- package/src/components/Sidebar/Sidebar.tsx +21 -12
- package/src/components/Table/Table.stories.tsx +102 -52
- package/src/components/TextInput/TextInput.tsx +2 -0
- package/src/components/TextInputInset/TextInputInset.tsx +2 -0
- package/src/components/TextareaInputInset/TextareaInputInset.tsx +2 -0
- package/src/components/TimePickerNative/TimePickerNative.stories.tsx +0 -1
- package/src/components/Toast/Toast.store.ts +1 -1
- package/src/components/Toast/Toast.stories.tsx +3 -2
- package/src/components/Toast/Toast.test.tsx +8 -6
- package/src/components/Toggle/Toggle.tsx +2 -0
- package/src/components/ToggleGroup/ToggleGroup.tsx +2 -0
- package/src/docs/Colors.mdx +0 -13
- package/src/lib/getColumnKeys.ts +3 -3
- package/src/lib/mergeRefs.ts +1 -1
- package/src/lib/tokens.ts +4 -4
- package/dist/components/Alert/Alert.constants.d.ts +0 -8
- package/dist/components/Alert/Alert.d.ts +0 -42
- package/dist/components/Alert/Alert.stories.d.ts +0 -12
- package/dist/components/Alert/Alert.types.d.ts +0 -7
- package/dist/components/AspectRatio/AspectRatio.d.ts +0 -3
- package/dist/components/AspectRatio/AspectRatio.stories.d.ts +0 -6
- package/dist/components/Badge/Badge.d.ts +0 -24
- package/dist/components/Badge/Badge.stories.d.ts +0 -8
- package/dist/components/Box/Box.d.ts +0 -247
- package/dist/components/Box/Box.stories.d.ts +0 -46
- package/dist/components/Button/Button.constants.d.ts +0 -3
- package/dist/components/Button/Button.d.ts +0 -53
- package/dist/components/Button/Button.stories.d.ts +0 -16
- package/dist/components/Calendar/Calendar.d.ts +0 -7
- package/dist/components/Calendar/Calendar.stories.d.ts +0 -12
- package/dist/components/Card/Card.d.ts +0 -17
- package/dist/components/Card/Card.stories.d.ts +0 -8
- package/dist/components/Card/components/CardFooter/CardFooter.d.ts +0 -13
- package/dist/components/Card/components/CardHeader/CardHeader.d.ts +0 -13
- package/dist/components/Card/components/CardSection/CardSection.d.ts +0 -46
- package/dist/components/Card/components/index.d.ts +0 -3
- package/dist/components/CheckboxInput/CheckboxInput.d.ts +0 -72
- package/dist/components/CheckboxInput/CheckboxInput.stories.d.ts +0 -18
- package/dist/components/CheckboxInput/components/Checkbox.d.ts +0 -71
- package/dist/components/CheckboxInput/components/CheckboxIcon.d.ts +0 -27
- package/dist/components/Collapsible/Collapsible.d.ts +0 -5
- package/dist/components/Collapsible/Collapsible.stories.d.ts +0 -9
- package/dist/components/Details/Details.d.ts +0 -15
- package/dist/components/Details/Details.stories.d.ts +0 -6
- package/dist/components/Details/DetailsSummary.d.ts +0 -7
- package/dist/components/Drawer/Drawer.d.ts +0 -105
- package/dist/components/Drawer/Drawer.stories.d.ts +0 -62
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +0 -25
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +0 -9
- package/dist/components/FormControl/FormControl.d.ts +0 -38
- package/dist/components/FormLabel/FormLabel.d.ts +0 -41
- package/dist/components/FormLabel/FormLabel.stories.d.ts +0 -6
- package/dist/components/Formik/Formik.stories.d.ts +0 -18
- package/dist/components/Formik/FormikCheckboxInput/FormikCheckboxInput.d.ts +0 -12
- package/dist/components/Formik/FormikRadioGroup/FormikRadioGroup.d.ts +0 -12
- package/dist/components/Formik/FormikSelectInput/FormikSelectInput.d.ts +0 -13
- package/dist/components/Formik/FormikSelectInputInset/FormikSelectInputInset.d.ts +0 -12
- package/dist/components/Formik/FormikSelectInputNative/FormikSelectInputNative.d.ts +0 -12
- package/dist/components/Formik/FormikSwitch/FormikSwitch.d.ts +0 -12
- package/dist/components/Formik/FormikTextInput/FormikTextInput.d.ts +0 -12
- package/dist/components/Formik/FormikTextInputInset/FormikTextInputInset.d.ts +0 -12
- package/dist/components/Formik/FormikTextareaInput/FormikTextareaInput.d.ts +0 -12
- package/dist/components/Formik/FormikTextareaInputInset/FormikTextareaInputInset.d.ts +0 -12
- package/dist/components/Formik/FormikTimePicker/FormikTimePicker.d.ts +0 -12
- package/dist/components/Formik/FormikTimePickerNative/FormikTimePickerNative.d.ts +0 -12
- package/dist/components/Formik/FormikToggleGroup/FormikToggleGroup.d.ts +0 -20
- package/dist/components/Formik/FormikToggleGroupMulti/FormikToggleGroupMulti.d.ts +0 -18
- package/dist/components/Heading/Heading.constants.d.ts +0 -10
- package/dist/components/Heading/Heading.d.ts +0 -35
- package/dist/components/Heading/Heading.stories.d.ts +0 -9
- package/dist/components/HelpText/HelpText.d.ts +0 -12
- package/dist/components/Icon/Icon.d.ts +0 -22
- package/dist/components/Icon/Icon.stories.d.ts +0 -10
- package/dist/components/InputValidationMessage/InputValidationMessage.d.ts +0 -9
- package/dist/components/Modal/Modal.d.ts +0 -83
- package/dist/components/Modal/Modal.stories.d.ts +0 -13
- package/dist/components/Modal/components/ModalBody/ModalBody.d.ts +0 -4
- package/dist/components/Modal/components/ModalFooter/ModalFooter.d.ts +0 -4
- package/dist/components/Modal/components/ModalHeader/ModalHeader.d.ts +0 -21
- package/dist/components/Modal/components/index.d.ts +0 -4
- package/dist/components/Pagination/Pagination.d.ts +0 -51
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -8
- package/dist/components/Pagination/Pagination.utilities.d.ts +0 -10
- package/dist/components/Popover/Popover.d.ts +0 -8
- package/dist/components/Popover/Popover.stories.d.ts +0 -7
- package/dist/components/RadioGroup/RadioGroup.d.ts +0 -75
- package/dist/components/RadioGroup/RadioGroup.stories.d.ts +0 -16
- package/dist/components/RadioGroup/RadioInput/RadioInput.d.ts +0 -57
- package/dist/components/RadioGroup/RadioInput/RadioInputIcon.d.ts +0 -27
- package/dist/components/RangeInput/RangeInput.d.ts +0 -29
- package/dist/components/RangeInput/RangeInput.stories.d.ts +0 -7
- package/dist/components/ResponsiveProvider/ResponsiveProvider.d.ts +0 -17
- package/dist/components/ResponsiveProvider/ResponsiveProvider.stories.d.ts +0 -7
- package/dist/components/SelectInput/SelectInput.d.ts +0 -148
- package/dist/components/SelectInput/SelectInput.stories.d.ts +0 -24
- package/dist/components/SelectInputInset/SelectInputInset.d.ts +0 -92
- package/dist/components/SelectInputInset/SelectInputInset.stories.d.ts +0 -12
- package/dist/components/SelectInputNative/SelectInputNative.d.ts +0 -45
- package/dist/components/SelectInputNative/SelectInputNative.stories.d.ts +0 -19
- package/dist/components/Sidebar/Sidebar.d.ts +0 -57
- package/dist/components/Sidebar/Sidebar.stories.d.ts +0 -9
- package/dist/components/Spinner/Spinner.d.ts +0 -12
- package/dist/components/Spinner/Spinner.stories.d.ts +0 -8
- package/dist/components/Switch/Switch.d.ts +0 -64
- package/dist/components/Switch/Switch.stories.d.ts +0 -12
- package/dist/components/Table/Table.d.ts +0 -86
- package/dist/components/Table/Table.stories.d.ts +0 -31
- package/dist/components/Table/TableBody/TableBody.d.ts +0 -52
- package/dist/components/Table/TableBody/TableBodyCell/TableBodyCell.d.ts +0 -45
- package/dist/components/Table/TableHead/TableHead.d.ts +0 -46
- package/dist/components/Table/TableHead/TableHeaderCell/TableHeaderCell.d.ts +0 -65
- package/dist/components/Table/common/TableRow/TableRow.d.ts +0 -67
- package/dist/components/TextInput/TextInput.d.ts +0 -106
- package/dist/components/TextInput/TextInput.stories.d.ts +0 -19
- package/dist/components/TextInputInset/TextInputInset.d.ts +0 -102
- package/dist/components/TextInputInset/TextInputInset.stories.d.ts +0 -13
- package/dist/components/TextareaInput/TextareaInput.d.ts +0 -97
- package/dist/components/TextareaInput/TextareaInput.stories.d.ts +0 -23
- package/dist/components/TextareaInputInset/TextareaInputInset.d.ts +0 -105
- package/dist/components/TextareaInputInset/TextareaInputInset.stories.d.ts +0 -12
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +0 -15
- package/dist/components/ThemeProvider/ThemeProvider.stories.d.ts +0 -6
- package/dist/components/TimePicker/TimePicker.d.ts +0 -35
- package/dist/components/TimePicker/TimePicker.stories.d.ts +0 -12
- package/dist/components/TimePickerNative/TimePickerNative.d.ts +0 -39
- package/dist/components/TimePickerNative/TimePickerNative.stories.d.ts +0 -11
- package/dist/components/Toast/Toast.store.d.ts +0 -36
- package/dist/components/Toast/Toast.stories.d.ts +0 -14
- package/dist/components/Toast/Toast.types.d.ts +0 -75
- package/dist/components/Toast/ToastContainer.d.ts +0 -43
- package/dist/components/Toast/ToastNotification.d.ts +0 -28
- package/dist/components/Toast/index.d.ts +0 -4
- package/dist/components/Toast/toast.d.ts +0 -20
- package/dist/components/Toast/useToasts.d.ts +0 -14
- package/dist/components/Toggle/Toggle.d.ts +0 -7
- package/dist/components/Toggle/Toggle.stories.d.ts +0 -11
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +0 -19
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -12
- package/dist/components/Tooltip/Tooltip.d.ts +0 -8
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -8
- package/dist/constants/keyCodes.d.ts +0 -2
- package/dist/css/index.css +0 -36
- package/dist/hooks/index.d.ts +0 -6
- package/dist/hooks/useBreakpoint/useBreakpoint.d.ts +0 -9
- package/dist/hooks/useBreakpoint/useBreakpoint.stories.d.ts +0 -6
- package/dist/hooks/useIsMobile/useIsMobile.d.ts +0 -1
- package/dist/hooks/useIsMobile/useIsMobile.stories.d.ts +0 -6
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +0 -2
- package/dist/hooks/useOpenClose/useOpenClose.d.ts +0 -39
- package/dist/hooks/useOpenClose/useOpenClose.stories.d.ts +0 -6
- package/dist/hooks/useTheme/useTheme.d.ts +0 -5
- package/dist/hooks/useTheme/useTheme.stories.d.ts +0 -6
- package/dist/hooks/useWindowSize/useWindowSize.d.ts +0 -7
- package/dist/hooks/useWindowSize/useWindowSize.stories.d.ts +0 -6
- package/dist/lib/cssShorthandToClasses.d.ts +0 -4
- package/dist/lib/doesStringIncludeCssUnit.d.ts +0 -1
- package/dist/lib/generateResponsiveClasses.d.ts +0 -2
- package/dist/lib/getAutoCompleteValue.d.ts +0 -1
- package/dist/lib/getColumnKeys.d.ts +0 -3
- package/dist/lib/getDimensionCss.d.ts +0 -12
- package/dist/lib/getElementType.d.ts +0 -14
- package/dist/lib/getFlexCss.d.ts +0 -9
- package/dist/lib/index.d.ts +0 -15
- package/dist/lib/isFunction.d.ts +0 -3
- package/dist/lib/mergeRefs.d.ts +0 -2
- package/dist/lib/prefersReducedMotion.d.ts +0 -1
- package/dist/lib/react-children-utilities/filter.d.ts +0 -3
- package/dist/lib/react-children-utilities/index.d.ts +0 -1
- package/dist/lib/reactRouterClickHandler.d.ts +0 -12
- package/dist/lib/resolveValue.d.ts +0 -3
- package/dist/lib/tokens.d.ts +0 -22
- package/dist/modes.d.ts +0 -8
- package/dist/types/index.d.ts +0 -103
- package/dist/types/lib.types.d.ts +0 -3
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Heading } from './Heading';
|
|
2
|
-
import type { Meta } from '@storybook/react-vite';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
declare const meta: Meta<typeof Heading>;
|
|
5
|
-
export default meta;
|
|
6
|
-
export declare const Levels: () => React.JSX.Element;
|
|
7
|
-
export declare const Sizes: () => React.JSX.Element;
|
|
8
|
-
export declare const ResponsiveSizes: () => React.JSX.Element;
|
|
9
|
-
export declare const Colors: () => React.JSX.Element;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface HelpTextProps {
|
|
3
|
-
/**
|
|
4
|
-
* Contents of the help text.
|
|
5
|
-
*/
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Additional class names to add.
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const HelpText: React.ForwardRefExoticComponent<HelpTextProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { FontColor, FontSize, IconName, ResponsiveProp } from '../../types';
|
|
2
|
-
import { FC } from 'react';
|
|
3
|
-
export interface IconProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
/**
|
|
6
|
-
* A color token identifier to use for the text color.
|
|
7
|
-
*/
|
|
8
|
-
color?: FontColor | ResponsiveProp<FontColor>;
|
|
9
|
-
/**
|
|
10
|
-
* A [font size token](/?path=/docs/design-tokens-design-tokens--page#font-size) identifier
|
|
11
|
-
*/
|
|
12
|
-
size?: FontSize | ResponsiveProp<FontSize>;
|
|
13
|
-
/**
|
|
14
|
-
* Name of the icon
|
|
15
|
-
*/
|
|
16
|
-
name: IconName;
|
|
17
|
-
/**
|
|
18
|
-
* Additional props to be spread to rendered element
|
|
19
|
-
*/
|
|
20
|
-
[x: string]: any;
|
|
21
|
-
}
|
|
22
|
-
export declare const Icon: FC<IconProps>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Icon } from './Icon';
|
|
2
|
-
import type { Meta } from '@storybook/react-vite';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
declare const meta: Meta<typeof Icon>;
|
|
5
|
-
export default meta;
|
|
6
|
-
export declare const Default: () => React.JSX.Element;
|
|
7
|
-
export declare const Sizes: () => React.JSX.Element;
|
|
8
|
-
export declare const Colors: () => React.JSX.Element;
|
|
9
|
-
export declare const UnknownIcon: () => React.JSX.Element;
|
|
10
|
-
export declare const AvailableIcons: () => React.JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Used by form inputs such as TextInput, to display a validation message for an invalid input.
|
|
4
|
-
*/
|
|
5
|
-
export interface InputValidationMessageProps {
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
size?: 'xs' | 'sm' | 'md';
|
|
8
|
-
}
|
|
9
|
-
export declare const InputValidationMessage: FC<InputValidationMessageProps>;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BackgroundColor, CssOverflowValue } from '../../types';
|
|
3
|
-
import { BoxProps } from '../Box/Box';
|
|
4
|
-
import { ModalFooter, ModalHeader, ModalBody } from './components';
|
|
5
|
-
export interface ModalProps {
|
|
6
|
-
/**
|
|
7
|
-
* Handle zoom/pinch gestures on iOS devices when scroll locking is enabled.
|
|
8
|
-
*/
|
|
9
|
-
allowPinchZoom?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Each modal needs to be properly labeled to provide context for users with
|
|
12
|
-
* assistive technology such as screen readers. If a modal is announced to
|
|
13
|
-
* the user without a label, it can be confusing and difficult to navigate.
|
|
14
|
-
*/
|
|
15
|
-
ariaLabel?: string;
|
|
16
|
-
/**
|
|
17
|
-
* The id of the element that should be used as the Modal's label by assistive
|
|
18
|
-
* technologies like screen readers. Usually the id is set on the `Modal.Header`
|
|
19
|
-
*/
|
|
20
|
-
ariaLabelledBy?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Contents of the dialog.
|
|
23
|
-
*/
|
|
24
|
-
children?: ReactNode;
|
|
25
|
-
/**
|
|
26
|
-
* Additional ClassNames to add to dialog.
|
|
27
|
-
*/
|
|
28
|
-
className?: string;
|
|
29
|
-
/**
|
|
30
|
-
* The ref of the container where the dialog will be inserted into the DOM.
|
|
31
|
-
* By default, Modals are inserted in the document.body, but if need be they can
|
|
32
|
-
* be scoped as necessary.
|
|
33
|
-
*/
|
|
34
|
-
containerRef?: React.RefObject<Node>;
|
|
35
|
-
/**
|
|
36
|
-
* At mobile viewport widths, the modal will take up the fullscreen
|
|
37
|
-
*/
|
|
38
|
-
fullScreenMobile?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Background color for the modal content using design tokens
|
|
41
|
-
*/
|
|
42
|
-
background?: BackgroundColor;
|
|
43
|
-
/**
|
|
44
|
-
* By default the first focusable element will receive focus when the dialog
|
|
45
|
-
* opens but you can provide a ref to focus instead.
|
|
46
|
-
*
|
|
47
|
-
* @see Docs https://reach.tech/dialog#dialog-initialfocusref
|
|
48
|
-
*/
|
|
49
|
-
initialFocusRef?: RefObject<HTMLDivElement>;
|
|
50
|
-
/**
|
|
51
|
-
* Whether the modal is visible or not
|
|
52
|
-
*/
|
|
53
|
-
isOpen: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Max width for modal content. Uses the same maxWidth prop as the `Box` component,
|
|
56
|
-
* and as such can be responsive as well.
|
|
57
|
-
*/
|
|
58
|
-
maxWidth?: BoxProps['maxWidth'];
|
|
59
|
-
/**
|
|
60
|
-
* Function that is called whenever the user hits "Escape" key or clicks outside the modal.
|
|
61
|
-
*/
|
|
62
|
-
onDismiss: (event?: React.SyntheticEvent) => void;
|
|
63
|
-
/**
|
|
64
|
-
* The css overflow behavior of the Modal
|
|
65
|
-
*/
|
|
66
|
-
overflow?: CssOverflowValue;
|
|
67
|
-
/**
|
|
68
|
-
* Inline styles for the modal container
|
|
69
|
-
*/
|
|
70
|
-
style?: React.CSSProperties;
|
|
71
|
-
/**
|
|
72
|
-
* Allows spread props
|
|
73
|
-
*/
|
|
74
|
-
[x: string]: any;
|
|
75
|
-
}
|
|
76
|
-
export declare const ModalBaseComponent: React.FC<ModalProps>;
|
|
77
|
-
export interface ModalStatic {
|
|
78
|
-
Body: typeof ModalBody;
|
|
79
|
-
Header: typeof ModalHeader;
|
|
80
|
-
Footer: typeof ModalFooter;
|
|
81
|
-
}
|
|
82
|
-
export type ModalWithStaticComponents = typeof ModalBaseComponent & ModalStatic;
|
|
83
|
-
export declare const Modal: ModalWithStaticComponents;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Modal } from './Modal';
|
|
3
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
4
|
-
declare const meta: Meta<typeof Modal>;
|
|
5
|
-
export default meta;
|
|
6
|
-
type Story = StoryObj<typeof Modal>;
|
|
7
|
-
export declare const BasicUsage: () => React.JSX.Element;
|
|
8
|
-
export declare const OpenModal: Story;
|
|
9
|
-
export declare const BodyAndFooter: () => React.JSX.Element;
|
|
10
|
-
export declare const CloseButton: () => React.JSX.Element;
|
|
11
|
-
export declare const WithoutHeader: () => React.JSX.Element;
|
|
12
|
-
export declare const FullscreenMobile: () => React.JSX.Element;
|
|
13
|
-
export declare const MaxWidth: () => React.JSX.Element;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { BoxProps } from '../../../Box/Box';
|
|
3
|
-
export type ModalHeaderProps = Omit<BoxProps, 'as' | 'radius' | 'justifyContent'> & {
|
|
4
|
-
/**
|
|
5
|
-
* id of the element containing the title, used by the Modal `aria-labelledby` prop
|
|
6
|
-
*/
|
|
7
|
-
id: string;
|
|
8
|
-
/**
|
|
9
|
-
* Modal's header title
|
|
10
|
-
*/
|
|
11
|
-
title?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Additional content to render in the modal header, displayed alongside the title.
|
|
14
|
-
*/
|
|
15
|
-
children?: React.ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* If defined, will render a 'x' close button on the right side of the ModalHeader
|
|
18
|
-
*/
|
|
19
|
-
onDismiss?: (event?: React.SyntheticEvent) => void;
|
|
20
|
-
};
|
|
21
|
-
export declare const ModalHeader: FC<ModalHeaderProps>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
export interface PaginationProps {
|
|
3
|
-
/**
|
|
4
|
-
* The current page number being displayed.
|
|
5
|
-
*/
|
|
6
|
-
activePage: number;
|
|
7
|
-
/**
|
|
8
|
-
* The number of list items contained in a page.
|
|
9
|
-
*/
|
|
10
|
-
itemsPerPage: number;
|
|
11
|
-
/**
|
|
12
|
-
* Callback fired when the user clicks a page or prev/next button.
|
|
13
|
-
*/
|
|
14
|
-
onChange: (pageNumber: number) => void;
|
|
15
|
-
/**
|
|
16
|
-
* The total number of items in the list
|
|
17
|
-
*/
|
|
18
|
-
totalItemsCount: number;
|
|
19
|
-
/**
|
|
20
|
-
* Boolean to determine if individual page buttons (or dropdown are visible). Takes a `ResponsiveProp`
|
|
21
|
-
* if you want to render it differently at different breakpoints
|
|
22
|
-
*/
|
|
23
|
-
arePagesVisible?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Custom class to pass down to the pagination container.
|
|
26
|
-
*/
|
|
27
|
-
className?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Pass true to render a version of Pagination with smaller buttons.
|
|
30
|
-
*/
|
|
31
|
-
isCompact?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Boolean to determine if the list totals (and current range) are visible.
|
|
34
|
-
* NOTE: these are hidden on mobile regardless of this prop value.
|
|
35
|
-
*/
|
|
36
|
-
isTotalVisible?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* The text (or react node) to pass to the NEXT page button.
|
|
39
|
-
*/
|
|
40
|
-
nextPageText?: string | ReactNode;
|
|
41
|
-
/**
|
|
42
|
-
* Number of pages shown in paginator, not including navigation blocks (prev, next), as well as first, last pages.
|
|
43
|
-
* In other words the number of pages displayed 'in the middle', that the user can navigate to.
|
|
44
|
-
*/
|
|
45
|
-
numberOfPagesDisplayed?: number;
|
|
46
|
-
/**
|
|
47
|
-
* The text (or react node) to pass to the PREVIOUS page button.
|
|
48
|
-
*/
|
|
49
|
-
prevPageText?: string | ReactNode;
|
|
50
|
-
}
|
|
51
|
-
export declare const Pagination: FC<PaginationProps>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Pagination } from './Pagination';
|
|
2
|
-
import type { Meta } from '@storybook/react-vite';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
declare const meta: Meta<typeof Pagination>;
|
|
5
|
-
export default meta;
|
|
6
|
-
export declare const Default: () => React.JSX.Element;
|
|
7
|
-
export declare const Compact: () => React.JSX.Element;
|
|
8
|
-
export declare const PageNumbers: () => React.JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface Page {
|
|
2
|
-
isPage: boolean;
|
|
3
|
-
pageNumber: number;
|
|
4
|
-
}
|
|
5
|
-
export declare const generatePages: (pageTotal: number, activePage: number, numberOfPagesDisplayed: number) => Page[];
|
|
6
|
-
export declare const generatePageTotal: (totalItemsCount: number, itemsPerPage: number) => number;
|
|
7
|
-
export declare const generateActiveListRange: (activePage: number, totalItemsCount: number, itemsPerPage: number) => {
|
|
8
|
-
first: number;
|
|
9
|
-
last: number;
|
|
10
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
-
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
-
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
declare const PopoverPortal: React.FC<PopoverPrimitive.PopoverPortalProps>;
|
|
7
|
-
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export { Popover, PopoverTrigger, PopoverAnchor, PopoverPortal, PopoverContent, };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Popover } from './Popover';
|
|
2
|
-
import type { Meta } from '@storybook/react-vite';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
declare const meta: Meta<typeof Popover>;
|
|
5
|
-
export default meta;
|
|
6
|
-
export declare const Basic: () => React.JSX.Element;
|
|
7
|
-
export declare const SidesAndAlign: () => React.JSX.Element;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import React, { FC, ChangeEvent, FocusEvent, ReactNode } from 'react';
|
|
2
|
-
import { RadioInputProps } from './RadioInput/RadioInput';
|
|
3
|
-
export interface RadioGroupProps {
|
|
4
|
-
/**
|
|
5
|
-
* Radio group name.
|
|
6
|
-
*/
|
|
7
|
-
name: string;
|
|
8
|
-
/**
|
|
9
|
-
* Callback function to call on change event.
|
|
10
|
-
*/
|
|
11
|
-
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
-
/**
|
|
13
|
-
* Options for radio group.
|
|
14
|
-
*/
|
|
15
|
-
options: {
|
|
16
|
-
id: string;
|
|
17
|
-
value: string;
|
|
18
|
-
label: ReactNode;
|
|
19
|
-
disabled?: boolean | null;
|
|
20
|
-
}[];
|
|
21
|
-
/**
|
|
22
|
-
* Additional classes to add.
|
|
23
|
-
*/
|
|
24
|
-
className?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Description to be displayed below the title, and above the RadioGroup.
|
|
27
|
-
*/
|
|
28
|
-
description?: ReactNode;
|
|
29
|
-
/**
|
|
30
|
-
* Whether the radios should be aligned in a row or in a column
|
|
31
|
-
*/
|
|
32
|
-
direction?: 'row' | 'column';
|
|
33
|
-
/**
|
|
34
|
-
* Mark the radio group as invalid and display a validation message.
|
|
35
|
-
* Pass a string or node to render a validation message below the input.
|
|
36
|
-
*/
|
|
37
|
-
error?: ReactNode;
|
|
38
|
-
/**
|
|
39
|
-
* If the radio group should be disabled and not focusable.
|
|
40
|
-
*/
|
|
41
|
-
isDisabled?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* If the radio group is required or not
|
|
44
|
-
*/
|
|
45
|
-
isRequired?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Callback function to call on blur event.
|
|
48
|
-
*/
|
|
49
|
-
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
50
|
-
/**
|
|
51
|
-
* Callback function to call on focus event.
|
|
52
|
-
*/
|
|
53
|
-
onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
54
|
-
/**
|
|
55
|
-
* Visual indicator that the field is required, that gets appended to the label
|
|
56
|
-
*/
|
|
57
|
-
requiredIndicator?: React.ReactNode;
|
|
58
|
-
/**
|
|
59
|
-
* Size of the radio icons in the group.
|
|
60
|
-
*/
|
|
61
|
-
size?: RadioInputProps['size'];
|
|
62
|
-
/**
|
|
63
|
-
* Title to be displayed above the RadioGroup.
|
|
64
|
-
*/
|
|
65
|
-
title?: ReactNode;
|
|
66
|
-
/**
|
|
67
|
-
* The value of selected radio input.
|
|
68
|
-
*/
|
|
69
|
-
value?: string;
|
|
70
|
-
/**
|
|
71
|
-
* Additional props to be spread to rendered element
|
|
72
|
-
*/
|
|
73
|
-
[x: string]: any;
|
|
74
|
-
}
|
|
75
|
-
export declare const RadioGroup: FC<RadioGroupProps>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RadioGroup } from './RadioGroup';
|
|
3
|
-
import type { Meta } from '@storybook/react-vite';
|
|
4
|
-
declare const meta: Meta<typeof RadioGroup>;
|
|
5
|
-
export default meta;
|
|
6
|
-
export declare const Default: () => React.JSX.Element;
|
|
7
|
-
export declare const Title: () => React.JSX.Element;
|
|
8
|
-
export declare const TitleAndDescription: () => React.JSX.Element;
|
|
9
|
-
export declare const Required: () => React.JSX.Element;
|
|
10
|
-
export declare const CustomRequiredIndicator: () => React.JSX.Element;
|
|
11
|
-
export declare const PreSelectedOption: () => React.JSX.Element;
|
|
12
|
-
export declare const DisabledOption: () => React.JSX.Element;
|
|
13
|
-
export declare const DisabledGroup: () => React.JSX.Element;
|
|
14
|
-
export declare const Error: () => React.JSX.Element;
|
|
15
|
-
export declare const Sizes: () => React.JSX.Element;
|
|
16
|
-
export declare const HorizontallyAligned: () => React.JSX.Element;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React, { ChangeEvent, FocusEvent, ReactNode } from 'react';
|
|
2
|
-
import { ResponsiveProp } from '../../../types';
|
|
3
|
-
type BaseSize = 'sm' | 'md' | 'lg';
|
|
4
|
-
export type RadioSize = BaseSize | ResponsiveProp<BaseSize>;
|
|
5
|
-
export interface RadioInputProps {
|
|
6
|
-
/**
|
|
7
|
-
* Radio input name.
|
|
8
|
-
*/
|
|
9
|
-
name: string;
|
|
10
|
-
/**
|
|
11
|
-
* Callback function to call on change event.
|
|
12
|
-
*/
|
|
13
|
-
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
-
/**
|
|
15
|
-
* Options for radio group.
|
|
16
|
-
*/
|
|
17
|
-
option: {
|
|
18
|
-
id: string;
|
|
19
|
-
value: string;
|
|
20
|
-
label: ReactNode;
|
|
21
|
-
disabled?: boolean | null;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Additional classes to add.
|
|
25
|
-
*/
|
|
26
|
-
className?: string;
|
|
27
|
-
/**
|
|
28
|
-
* If the radio group should be disabled and not focusable.
|
|
29
|
-
*/
|
|
30
|
-
isDisabled?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* If the radio input should be hidden to make way for a custom radio.
|
|
33
|
-
*/
|
|
34
|
-
isHidden?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* The required and aria-required attributes
|
|
37
|
-
*/
|
|
38
|
-
isRequired?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* If the radio group should be disabled and not focusable.
|
|
41
|
-
*/
|
|
42
|
-
isSelected?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Callback function to call on blur event.
|
|
45
|
-
*/
|
|
46
|
-
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
47
|
-
/**
|
|
48
|
-
* Callback function to call on focus event.
|
|
49
|
-
*/
|
|
50
|
-
onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
51
|
-
/**
|
|
52
|
-
* The size of the radio icon.
|
|
53
|
-
*/
|
|
54
|
-
size: RadioSize;
|
|
55
|
-
}
|
|
56
|
-
export declare const RadioInput: React.ForwardRefExoticComponent<RadioInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BoxProps } from '../../Box/Box';
|
|
3
|
-
import { RadioInputProps } from './RadioInput';
|
|
4
|
-
import { RadioGroupProps } from '../RadioGroup';
|
|
5
|
-
export interface RadioIconProps extends BoxProps {
|
|
6
|
-
/**
|
|
7
|
-
* Custom className to be applied to root node of component.
|
|
8
|
-
*/
|
|
9
|
-
className?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Whether the input is in an error state. The icon will visually change accordingly.
|
|
12
|
-
*/
|
|
13
|
-
error?: RadioGroupProps['error'];
|
|
14
|
-
/**
|
|
15
|
-
* Whether the radio is selected.
|
|
16
|
-
*/
|
|
17
|
-
isSelected?: RadioInputProps['isSelected'];
|
|
18
|
-
/**
|
|
19
|
-
* If the input should be disabled and not focusable.
|
|
20
|
-
*/
|
|
21
|
-
isDisabled?: RadioInputProps['isDisabled'];
|
|
22
|
-
/**
|
|
23
|
-
* Additional props to be spread to rendered element
|
|
24
|
-
*/
|
|
25
|
-
[x: string]: any;
|
|
26
|
-
}
|
|
27
|
-
export declare const RadioInputIcon: React.FC<RadioIconProps>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FC } from 'react';
|
|
3
|
-
export interface InputRangeProps {
|
|
4
|
-
/**
|
|
5
|
-
* The input's id attribute.
|
|
6
|
-
*/
|
|
7
|
-
id: string;
|
|
8
|
-
/**
|
|
9
|
-
* The value of the range.
|
|
10
|
-
*/
|
|
11
|
-
value: number;
|
|
12
|
-
/**
|
|
13
|
-
* The maximum value of the range.
|
|
14
|
-
*/
|
|
15
|
-
max: number;
|
|
16
|
-
/**
|
|
17
|
-
* Callback function to call on change event.
|
|
18
|
-
*/
|
|
19
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
-
/**
|
|
21
|
-
* Custom class to be added to standard input classes.
|
|
22
|
-
*/
|
|
23
|
-
className?: string;
|
|
24
|
-
/**
|
|
25
|
-
* If the input should be disabled and not focusable.
|
|
26
|
-
*/
|
|
27
|
-
isDisabled?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export declare const RangeInput: FC<InputRangeProps>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Meta } from '@storybook/react-vite';
|
|
3
|
-
import { RangeInput } from './RangeInput';
|
|
4
|
-
declare const meta: Meta<typeof RangeInput>;
|
|
5
|
-
export default meta;
|
|
6
|
-
export declare const Default: () => React.JSX.Element;
|
|
7
|
-
export declare const Disabled: () => React.JSX.Element;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface ResponsiveContextShape {
|
|
3
|
-
isCreated: boolean;
|
|
4
|
-
innerWidth?: number;
|
|
5
|
-
innerHeight?: number;
|
|
6
|
-
outerWidth?: number;
|
|
7
|
-
outerHeight?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare const ResponsiveContext: React.Context<ResponsiveContextShape>;
|
|
10
|
-
export interface ResponsiveProviderProps {
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Time (in milliseconds) to delay execution of resize handler. Default is 50.
|
|
14
|
-
*/
|
|
15
|
-
throttle?: number;
|
|
16
|
-
}
|
|
17
|
-
export declare const ResponsiveProvider: React.FC<ResponsiveProviderProps>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ResponsiveProvider } from './ResponsiveProvider';
|
|
3
|
-
import type { Meta } from '@storybook/react-vite';
|
|
4
|
-
declare const meta: Meta<typeof ResponsiveProvider>;
|
|
5
|
-
export default meta;
|
|
6
|
-
export declare const BasicUsage: () => React.JSX.Element;
|
|
7
|
-
export declare const Breakpoints: () => React.JSX.Element;
|