@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,247 +0,0 @@
|
|
|
1
|
-
import * as CSS from 'csstype';
|
|
2
|
-
import { BaseSpacing, BorderRadiusSize, BorderSize, BoxShadowSize, CssAlignContentValue, CssAlignItemsValue, CssDisplayValue, CssFlexDirectionValue, CssFlexValue, CssJustifyContentValue, CssOverflowValue, CssTextAlignValue, DimensionSize, FontColor, FontFamily, FontSize, FontWeight, ResponsiveProp, SpacingSize, ZIndexSize, BackgroundColor, BorderColor, CssWhiteSpaceValue, CssWordBreakValue, TextWrap, TextTransform } from '../../types';
|
|
3
|
-
import { CSSProperties, FC, ReactNode } from 'react';
|
|
4
|
-
import { KnownKeys } from '../../types/lib.types';
|
|
5
|
-
export type HoverableBoxProperties = 'color' | 'borderColor' | 'shadow' | 'background';
|
|
6
|
-
export interface BoxProps {
|
|
7
|
-
/**
|
|
8
|
-
* The element type to be rendered.
|
|
9
|
-
*/
|
|
10
|
-
as?: string;
|
|
11
|
-
/**
|
|
12
|
-
* How to align the contents along the cross axis.
|
|
13
|
-
*/
|
|
14
|
-
alignItems?: CssAlignItemsValue | ResponsiveProp<CssAlignItemsValue>;
|
|
15
|
-
/**
|
|
16
|
-
* How to align the contents when there is extra space in the cross axis.
|
|
17
|
-
* This property has no effect when there is only one line of flex items.
|
|
18
|
-
*/
|
|
19
|
-
alignContent?: CssAlignContentValue | ResponsiveProp<CssAlignContentValue>;
|
|
20
|
-
/**
|
|
21
|
-
* How to align along the cross axis when contained in a Box.
|
|
22
|
-
* This allows the default alignment (or the one specified by `align`) to be overridden for the individual Box.
|
|
23
|
-
*/
|
|
24
|
-
alignSelf?: CssAlignItemsValue | ResponsiveProp<CssAlignItemsValue>;
|
|
25
|
-
/**
|
|
26
|
-
* Any valid background color token, or a `url()` for an image
|
|
27
|
-
*/
|
|
28
|
-
background?: BackgroundColor;
|
|
29
|
-
/**
|
|
30
|
-
* Any valid border color token
|
|
31
|
-
*/
|
|
32
|
-
borderColor?: BorderColor;
|
|
33
|
-
/**
|
|
34
|
-
* Width of the Box's border
|
|
35
|
-
* Can be a single [border width token](/?path=/docs/foundation-design-tokens--docs#border-width).
|
|
36
|
-
* Can also be a string of [border width tokens](/?path=/docs/foundation-design-tokens--docs#border-width)
|
|
37
|
-
* that models itself after the css shorthand property,
|
|
38
|
-
* where you can set the border width on all four sides of an element.
|
|
39
|
-
* e.g: "0 sm xs 0" --> top: 0, right: sm, bottom: xs, left: 0;
|
|
40
|
-
*/
|
|
41
|
-
borderWidth?: BorderSize | string | ResponsiveProp<BorderSize | string>;
|
|
42
|
-
/**
|
|
43
|
-
* Additional class names to add
|
|
44
|
-
*/
|
|
45
|
-
className?: string;
|
|
46
|
-
/**
|
|
47
|
-
* The amount of spacing (implemented as margin) between child elements.
|
|
48
|
-
* Can be a single [spacing value](/?path=/docs/foundation-design-tokens--docs#spacing).
|
|
49
|
-
* NOTE: this prop is incompatible with reverse flex direction values (row-reverse, column-reverse).
|
|
50
|
-
* For grid and flex layouts, use 'gap' instead.
|
|
51
|
-
*/
|
|
52
|
-
childGap?: SpacingSize | ResponsiveProp<SpacingSize>;
|
|
53
|
-
/**
|
|
54
|
-
* The box's contents
|
|
55
|
-
*/
|
|
56
|
-
children?: ReactNode;
|
|
57
|
-
/**
|
|
58
|
-
* A color token identifier to use for the text color.
|
|
59
|
-
*/
|
|
60
|
-
color?: FontColor;
|
|
61
|
-
/**
|
|
62
|
-
* Sets the gaps (gutters) between columns.
|
|
63
|
-
*/
|
|
64
|
-
columnGap?: BaseSpacing | ResponsiveProp<BaseSpacing>;
|
|
65
|
-
/**
|
|
66
|
-
* Cursor style. Use any standard CSS value.
|
|
67
|
-
*/
|
|
68
|
-
cursor?: CSS.Property.Cursor;
|
|
69
|
-
/**
|
|
70
|
-
* Sets how flex items are placed inside the Box, defining the main axis and the direction
|
|
71
|
-
* NOTE: reverse directions are incompatible with the `childGap` prop.
|
|
72
|
-
*/
|
|
73
|
-
direction?: CssFlexDirectionValue | ResponsiveProp<CssFlexDirectionValue>;
|
|
74
|
-
/**
|
|
75
|
-
* Display property. Only select values supported.
|
|
76
|
-
*/
|
|
77
|
-
display?: CssDisplayValue | ResponsiveProp<CssDisplayValue>;
|
|
78
|
-
/**
|
|
79
|
-
* Can be used as shorthand for the flexbox css properties `flex-grow`, `flex-shrink`, `flex-basis`
|
|
80
|
-
*/
|
|
81
|
-
flex?: CssFlexValue | ResponsiveProp<CssFlexValue>;
|
|
82
|
-
/**
|
|
83
|
-
* Pass style modifiers for focus states. The following properties can be modified on focus.
|
|
84
|
-
* `* background`
|
|
85
|
-
* `* borderColor`
|
|
86
|
-
* `* borderWidth`
|
|
87
|
-
* `* color`
|
|
88
|
-
* `* shadow`
|
|
89
|
-
*/
|
|
90
|
-
focus?: {
|
|
91
|
-
background?: BoxProps['background'];
|
|
92
|
-
borderColor?: BoxProps['borderColor'];
|
|
93
|
-
borderWidth?: BoxProps['borderWidth'];
|
|
94
|
-
color?: BoxProps['color'];
|
|
95
|
-
shadow?: BoxProps['shadow'];
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* The [font family token](/?path=/docs/foundation-design-tokens--docs#font-family) identifier for the Box's text
|
|
99
|
-
*/
|
|
100
|
-
fontFamily?: FontFamily | ResponsiveProp<FontFamily>;
|
|
101
|
-
/**
|
|
102
|
-
* The [font size token](/?path=/docs/foundation-design-tokens--docs#font-size) identifier for the Box's text
|
|
103
|
-
*/
|
|
104
|
-
fontSize?: FontSize | ResponsiveProp<FontSize>;
|
|
105
|
-
/**
|
|
106
|
-
* The [font weight token](/?path=/docs/design-tokens-design-tokens--page#font-weight) identifier for the Box's text
|
|
107
|
-
*/
|
|
108
|
-
fontWeight?: FontWeight | ResponsiveProp<FontWeight>;
|
|
109
|
-
/**
|
|
110
|
-
* The height of the element. Can be given a standard css value (px, rem, em, %),
|
|
111
|
-
* or a [height token](/?path=/docs/foundation-design-tokens--docs#height)
|
|
112
|
-
*/
|
|
113
|
-
height?: DimensionSize | ResponsiveProp<DimensionSize> | string;
|
|
114
|
-
/**
|
|
115
|
-
* Pass style modifiers for hover states. The following properties can be modified on hover:
|
|
116
|
-
* `* background`
|
|
117
|
-
* `* borderColor`
|
|
118
|
-
* `* borderWidth`
|
|
119
|
-
* `* color`
|
|
120
|
-
* `* fontSize`
|
|
121
|
-
* `* shadow`
|
|
122
|
-
*/
|
|
123
|
-
hover?: {
|
|
124
|
-
background?: BoxProps['background'];
|
|
125
|
-
borderColor?: BoxProps['borderColor'];
|
|
126
|
-
borderWidth?: BoxProps['borderWidth'];
|
|
127
|
-
color?: BoxProps['color'];
|
|
128
|
-
fontSize?: BoxProps['fontSize'];
|
|
129
|
-
shadow?: BoxProps['shadow'];
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* Sets the gaps (gutters) between rows and columns.
|
|
133
|
-
*/
|
|
134
|
-
gap?: BaseSpacing | ResponsiveProp<BaseSpacing>;
|
|
135
|
-
/**
|
|
136
|
-
* How space between and around content items is distributed along the main-axis a flex Box
|
|
137
|
-
*/
|
|
138
|
-
justifyContent?: CssJustifyContentValue | ResponsiveProp<CssJustifyContentValue>;
|
|
139
|
-
/**
|
|
140
|
-
* Amount of space around the element.
|
|
141
|
-
* Can be a single [spacing value](/?path=/docs/foundation-design-tokens--docs#spacing).
|
|
142
|
-
* Can also be a string of [spacing value](/?path=/docs/foundation-design-tokens--docs#spacing)
|
|
143
|
-
* that models itself after the css shorthand property,
|
|
144
|
-
* where you can set the margin area on all four sides of an element. It is shorthand for top, right, bottom, left.
|
|
145
|
-
*/
|
|
146
|
-
margin?: BaseSpacing | ResponsiveProp<BaseSpacing>;
|
|
147
|
-
/**
|
|
148
|
-
* The maximum height of the element. Can be given a standard css value (px, rem, em, %),
|
|
149
|
-
* or a [height token](/?path=/docs/foundation-design-tokens--docs#height)
|
|
150
|
-
*/
|
|
151
|
-
maxHeight?: DimensionSize | ResponsiveProp<DimensionSize> | string;
|
|
152
|
-
/**
|
|
153
|
-
* The minimum height of the element. Can be given a standard css value (px, rem, em, %),
|
|
154
|
-
* or a [height token](/?path=/docs/foundation-design-tokens--docs#height)
|
|
155
|
-
*/
|
|
156
|
-
minHeight?: DimensionSize | ResponsiveProp<DimensionSize> | string;
|
|
157
|
-
/**
|
|
158
|
-
* The maximum width of the element. Can be given a standard css value (px, rem, em, %),
|
|
159
|
-
* or a [width token](/?path=/docs/foundation-design-tokens--docs#width)
|
|
160
|
-
*/
|
|
161
|
-
maxWidth?: DimensionSize | ResponsiveProp<DimensionSize> | string;
|
|
162
|
-
/**
|
|
163
|
-
* The minimum width of the element. Can be given a standard css value (px, rem, em, %),
|
|
164
|
-
* or a [width token](/?path=/docs/foundation-design-tokens--docs#width)
|
|
165
|
-
*/
|
|
166
|
-
minWidth?: DimensionSize | ResponsiveProp<DimensionSize> | string;
|
|
167
|
-
/**
|
|
168
|
-
* The css overflow behavior of the Box
|
|
169
|
-
*/
|
|
170
|
-
overflow?: CssOverflowValue | ResponsiveProp<CssOverflowValue>;
|
|
171
|
-
/**
|
|
172
|
-
* Amount of space within the element around the Box contents.
|
|
173
|
-
* Can be a single [spacing value](/?path=/docs/foundation-design-tokens--docs#spacing).
|
|
174
|
-
* Can also be a string of [spacing value](/?path=/docs/foundation-design-tokens--docs#spacing)
|
|
175
|
-
* that models itself after the css shorthand property,
|
|
176
|
-
* where you can set the margin area on all four sides of an element. It is shorthand for top, right, bottom, left.
|
|
177
|
-
*/
|
|
178
|
-
padding?: BaseSpacing | ResponsiveProp<BaseSpacing>;
|
|
179
|
-
/**
|
|
180
|
-
* CSS position property.
|
|
181
|
-
*/
|
|
182
|
-
position?: CSS.Property.Position | ResponsiveProp<CSS.Property.Position>;
|
|
183
|
-
/**
|
|
184
|
-
* Set the radius of all corners
|
|
185
|
-
*/
|
|
186
|
-
radius?: BorderRadiusSize | ResponsiveProp<BorderRadiusSize>;
|
|
187
|
-
/**
|
|
188
|
-
* Sets the gaps (gutters) between rows.
|
|
189
|
-
*/
|
|
190
|
-
rowGap?: BaseSpacing | ResponsiveProp<BaseSpacing>;
|
|
191
|
-
/**
|
|
192
|
-
* The size of the drop shadow applied to the Box
|
|
193
|
-
*/
|
|
194
|
-
shadow?: BoxShadowSize | ResponsiveProp<BoxShadowSize>;
|
|
195
|
-
/**
|
|
196
|
-
* CSS Style object
|
|
197
|
-
*/
|
|
198
|
-
style?: CSSProperties;
|
|
199
|
-
/**
|
|
200
|
-
* the alignment of the text
|
|
201
|
-
*/
|
|
202
|
-
textAlign?: CssTextAlignValue | ResponsiveProp<CssTextAlignValue>;
|
|
203
|
-
/**
|
|
204
|
-
* Control the text transformation of the Box
|
|
205
|
-
*/
|
|
206
|
-
textTransform?: TextTransform | ResponsiveProp<TextTransform>;
|
|
207
|
-
/**
|
|
208
|
-
* Control the text wrapping behavior of the Box
|
|
209
|
-
*/
|
|
210
|
-
textWrap?: TextWrap | ResponsiveProp<TextWrap>;
|
|
211
|
-
/**
|
|
212
|
-
* Control the whitespace behavior of the Box
|
|
213
|
-
*/
|
|
214
|
-
whiteSpace?: CssWhiteSpaceValue | ResponsiveProp<CssWhiteSpaceValue>;
|
|
215
|
-
/**
|
|
216
|
-
* Control the word break behavior of the Box
|
|
217
|
-
*/
|
|
218
|
-
wordBreak?: CssWordBreakValue | ResponsiveProp<CssWordBreakValue>;
|
|
219
|
-
/**
|
|
220
|
-
* By default, a Box's items will all try to fit onto one line.
|
|
221
|
-
* Change that and allow the items to wrap as needed wrap
|
|
222
|
-
*/
|
|
223
|
-
wrap?: boolean | ResponsiveProp<boolean>;
|
|
224
|
-
/**
|
|
225
|
-
* The width of the element. Can be given a standard css value (px, rem, em, %),
|
|
226
|
-
* or a [width token](/?path=/docs/foundation-design-tokens--docs#width)
|
|
227
|
-
*/
|
|
228
|
-
width?: DimensionSize | ResponsiveProp<DimensionSize> | string;
|
|
229
|
-
/**
|
|
230
|
-
* Control the word break behavior of the Box
|
|
231
|
-
*/
|
|
232
|
-
/**
|
|
233
|
-
* ZIndex value for the element. Can be one of the predetermined token values.
|
|
234
|
-
* Can be responsive.
|
|
235
|
-
*/
|
|
236
|
-
zIndex?: ZIndexSize | ResponsiveProp<ZIndexSize>;
|
|
237
|
-
/**
|
|
238
|
-
* Additional props to be spread to rendered element
|
|
239
|
-
*/
|
|
240
|
-
[x: string]: any;
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* A `<Box>` is a layout component to build UIs with consistent padding and spacing between
|
|
244
|
-
* elements.
|
|
245
|
-
*/
|
|
246
|
-
export declare const Box: FC<BoxProps>;
|
|
247
|
-
export declare const boxPropsKeys: (keyof Pick<BoxProps, KnownKeys<BoxProps>>)[];
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Meta } from '@storybook/react-vite';
|
|
3
|
-
import { Box } from './Box';
|
|
4
|
-
declare const meta: Meta<typeof Box>;
|
|
5
|
-
export default meta;
|
|
6
|
-
export declare const Overview: () => React.JSX.Element;
|
|
7
|
-
export declare const Background: () => React.JSX.Element;
|
|
8
|
-
export declare const Border: () => React.JSX.Element;
|
|
9
|
-
export declare const Gap: () => React.JSX.Element;
|
|
10
|
-
export declare const ChildGap: () => React.JSX.Element;
|
|
11
|
-
export declare const FlexAuto: () => React.JSX.Element;
|
|
12
|
-
export declare const FlexDirection: () => React.JSX.Element;
|
|
13
|
-
export declare const FlexShrinkGrow: () => React.JSX.Element;
|
|
14
|
-
export declare const FlexJustify: () => React.JSX.Element;
|
|
15
|
-
export declare const FlexAlign: () => React.JSX.Element;
|
|
16
|
-
export declare const FlexAlignContent: () => React.JSX.Element;
|
|
17
|
-
export declare const FontColor: () => React.JSX.Element;
|
|
18
|
-
export declare const FontSizes: () => React.JSX.Element;
|
|
19
|
-
export declare const FontWeights: () => React.JSX.Element;
|
|
20
|
-
export declare const FontFamily: () => React.JSX.Element;
|
|
21
|
-
export declare const TextAlign: () => React.JSX.Element;
|
|
22
|
-
export declare const Margin: () => React.JSX.Element;
|
|
23
|
-
export declare const Padding: () => React.JSX.Element;
|
|
24
|
-
export declare const Radius: () => React.JSX.Element;
|
|
25
|
-
export declare const Shadow: () => React.JSX.Element;
|
|
26
|
-
export declare const WhiteSpace: () => React.JSX.Element;
|
|
27
|
-
export declare const Width: () => React.JSX.Element;
|
|
28
|
-
export declare const WidthTokens: () => React.JSX.Element;
|
|
29
|
-
export declare const WidthPercentages: () => React.JSX.Element;
|
|
30
|
-
export declare const WidthMax: () => React.JSX.Element;
|
|
31
|
-
export declare const WidthMin: () => React.JSX.Element;
|
|
32
|
-
export declare const WordBreak: () => React.JSX.Element;
|
|
33
|
-
export declare const Height: () => React.JSX.Element;
|
|
34
|
-
export declare const HeightTokens: () => React.JSX.Element;
|
|
35
|
-
export declare const HeightPercentages: () => React.JSX.Element;
|
|
36
|
-
export declare const HeightMax: () => React.JSX.Element;
|
|
37
|
-
export declare const HeightMin: () => React.JSX.Element;
|
|
38
|
-
export declare const Overflow: () => React.JSX.Element;
|
|
39
|
-
export declare const Cursor: () => React.JSX.Element;
|
|
40
|
-
export declare const Position: () => React.JSX.Element;
|
|
41
|
-
export declare const Hover: () => React.JSX.Element;
|
|
42
|
-
export declare const Focus: () => React.JSX.Element;
|
|
43
|
-
export declare const Responsive: () => React.JSX.Element;
|
|
44
|
-
export declare const Omit: () => React.JSX.Element;
|
|
45
|
-
export declare const TextWrap: () => React.JSX.Element;
|
|
46
|
-
export declare const TextTransform: () => React.JSX.Element;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { BoxShadowSize, IconName, ResponsiveProp } from '../../types';
|
|
2
|
-
import React, { ButtonHTMLAttributes } from 'react';
|
|
3
|
-
export type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'danger' | 'link';
|
|
4
|
-
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
5
|
-
export interface BaseButtonProps {
|
|
6
|
-
/**
|
|
7
|
-
* The button element to render as. Useful for when you want to render a Link that looks like a button.
|
|
8
|
-
*/
|
|
9
|
-
asChild?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Additional ClassNames to add to button.
|
|
12
|
-
*/
|
|
13
|
-
className?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Button takes up the full width of its parent container.
|
|
16
|
-
*/
|
|
17
|
-
fullWidth?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Icon displayed before the button label
|
|
20
|
-
*/
|
|
21
|
-
iconPrefix?: IconName;
|
|
22
|
-
/**
|
|
23
|
-
* Icon displayed after the button label
|
|
24
|
-
*/
|
|
25
|
-
iconSuffix?: IconName;
|
|
26
|
-
/**
|
|
27
|
-
* Disables the button
|
|
28
|
-
*/
|
|
29
|
-
isDisabled?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Displays a loading spinner and disables the button
|
|
32
|
-
*/
|
|
33
|
-
isLoading?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Size of the drop shadow applied to the Box
|
|
36
|
-
*/
|
|
37
|
-
shadow?: BoxShadowSize | ResponsiveProp<BoxShadowSize>;
|
|
38
|
-
/**
|
|
39
|
-
* Size of the button.
|
|
40
|
-
*/
|
|
41
|
-
size?: ButtonSize | ResponsiveProp<ButtonSize>;
|
|
42
|
-
/**
|
|
43
|
-
* The type of button
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
type?: 'button' | 'submit' | 'reset';
|
|
47
|
-
/**
|
|
48
|
-
* Visual variant of the button
|
|
49
|
-
*/
|
|
50
|
-
variant?: ButtonVariant;
|
|
51
|
-
}
|
|
52
|
-
export type ButtonProps = BaseButtonProps & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
53
|
-
export declare const Button: React.ForwardRefExoticComponent<BaseButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Button } from './Button';
|
|
2
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
3
|
-
declare const meta: Meta<typeof Button>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Button>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const AsChild: Story;
|
|
8
|
-
export declare const Variants: Story;
|
|
9
|
-
export declare const Sizes: Story;
|
|
10
|
-
export declare const FullWidth: Story;
|
|
11
|
-
export declare const Icons: Story;
|
|
12
|
-
export declare const IconButton: Story;
|
|
13
|
-
export declare const Loading: Story;
|
|
14
|
-
export declare const Disabled: Story;
|
|
15
|
-
export declare const Shadow: Story;
|
|
16
|
-
export declare const InlineLink: Story;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DayPickerProps, Matcher } from 'react-day-picker';
|
|
3
|
-
import 'react-day-picker/style.css';
|
|
4
|
-
export type CalendarProps = DayPickerProps;
|
|
5
|
-
declare function Calendar({ captionLayout, className, ...props }: CalendarProps): React.JSX.Element;
|
|
6
|
-
export { Calendar };
|
|
7
|
-
export type { Matcher };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Calendar } from './Calendar';
|
|
2
|
-
import type { Meta } from '@storybook/react-vite';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
declare const meta: Meta<typeof Calendar>;
|
|
5
|
-
export default meta;
|
|
6
|
-
export declare const BasicUsage: () => React.JSX.Element;
|
|
7
|
-
export declare const RangeSelection: () => React.JSX.Element;
|
|
8
|
-
export declare const MultipleSelection: () => React.JSX.Element;
|
|
9
|
-
export declare const Dropdown: () => React.JSX.Element;
|
|
10
|
-
export declare const FooterContent: () => React.JSX.Element;
|
|
11
|
-
export declare const DateInput: () => React.JSX.Element;
|
|
12
|
-
export declare const DateRangeInput: () => React.JSX.Element;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BoxProps } from '../Box/Box';
|
|
2
|
-
import { CardFooter, CardHeader, CardSection } from './components';
|
|
3
|
-
import React, { ReactNode } from 'react';
|
|
4
|
-
export interface CardProps extends BoxProps {
|
|
5
|
-
/**
|
|
6
|
-
* The Card's contents.
|
|
7
|
-
*/
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
export declare const CardBaseComponent: React.FC<CardProps>;
|
|
11
|
-
export interface CardStatic {
|
|
12
|
-
Header: typeof CardHeader;
|
|
13
|
-
Section: typeof CardSection;
|
|
14
|
-
Footer: typeof CardFooter;
|
|
15
|
-
}
|
|
16
|
-
export type CardWithStaticComponents = typeof CardBaseComponent & CardStatic;
|
|
17
|
-
export declare const Card: CardWithStaticComponents;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Card } from './Card';
|
|
2
|
-
import type { Meta } from '@storybook/react-vite';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
declare const meta: Meta<typeof Card>;
|
|
5
|
-
export default meta;
|
|
6
|
-
export declare const OverviewCard: () => React.JSX.Element;
|
|
7
|
-
export declare const ExampleSignUpForm: () => React.JSX.Element;
|
|
8
|
-
export declare const ExampleFullBleedPhotos: () => React.JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BoxProps } from '../../../Box/Box';
|
|
2
|
-
import { FC, ReactNode } from 'react';
|
|
3
|
-
export interface CardFooterProps extends BoxProps {
|
|
4
|
-
/**
|
|
5
|
-
* Contents of the Footer.
|
|
6
|
-
*/
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* Additional props to be spread to rendered element
|
|
10
|
-
*/
|
|
11
|
-
[x: string]: any;
|
|
12
|
-
}
|
|
13
|
-
export declare const CardFooter: FC<CardFooterProps>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
import { BoxProps } from '../../../Box/Box';
|
|
3
|
-
export interface CardHeaderProps extends BoxProps {
|
|
4
|
-
/**
|
|
5
|
-
* The title of the card
|
|
6
|
-
*/
|
|
7
|
-
title?: ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* Description of the card, or element below the title
|
|
10
|
-
*/
|
|
11
|
-
description?: ReactNode;
|
|
12
|
-
}
|
|
13
|
-
export declare const CardHeader: FC<CardHeaderProps>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { BoxProps } from '../../../Box/Box';
|
|
2
|
-
import { FC, ReactNode } from 'react';
|
|
3
|
-
export interface CardSectionProps extends BoxProps {
|
|
4
|
-
/**
|
|
5
|
-
* Any valid background color token, or a `url()` for an image
|
|
6
|
-
*/
|
|
7
|
-
background?: BoxProps['background'];
|
|
8
|
-
/**
|
|
9
|
-
* If defined as a prop, this value will take higher precedence than the corresponding component design token value
|
|
10
|
-
* Any valid border color token
|
|
11
|
-
* Or a responsive prop with borderColor for each breakpoint.
|
|
12
|
-
*/
|
|
13
|
-
borderColor?: BoxProps['borderColor'];
|
|
14
|
-
/**
|
|
15
|
-
* If defined as a prop, this value will take higher precedence than the corresponding component design token value
|
|
16
|
-
* Width of the section's border
|
|
17
|
-
* Can be a single [border width token](/?path=/docs/foundation-design-tokens--docs#border-width).
|
|
18
|
-
* Can also be a string of [border width tokens](/?path=/docs/foundation-design-tokens--docs#border-width)
|
|
19
|
-
* that models itself after the css shorthand property,
|
|
20
|
-
* where you can set the border width on all four sides of an element.
|
|
21
|
-
* e.g: "0 sm xs 0" --> top: 0, right: sm, bottom: xs, left: 0;
|
|
22
|
-
*/
|
|
23
|
-
borderWidth?: BoxProps['borderWidth'];
|
|
24
|
-
/**
|
|
25
|
-
* Contents of the Section.
|
|
26
|
-
*/
|
|
27
|
-
children?: ReactNode;
|
|
28
|
-
/**
|
|
29
|
-
* Custom class to be applied to section container.
|
|
30
|
-
*/
|
|
31
|
-
className?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Visually subdued the appearance of the section.
|
|
34
|
-
*/
|
|
35
|
-
subdued?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Title for the section.
|
|
38
|
-
*/
|
|
39
|
-
title?: ReactNode;
|
|
40
|
-
/**
|
|
41
|
-
* Additional props to be spread to rendered element
|
|
42
|
-
*/
|
|
43
|
-
[x: string]: any;
|
|
44
|
-
}
|
|
45
|
-
export declare const CardSection: FC<CardSectionProps>;
|
|
46
|
-
export default CardSection;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CheckboxSize, CheckboxProps } from './components/Checkbox';
|
|
3
|
-
export interface CheckboxInputProps {
|
|
4
|
-
/**
|
|
5
|
-
* The id attribute of the input.
|
|
6
|
-
*/
|
|
7
|
-
id: string;
|
|
8
|
-
/**
|
|
9
|
-
* The checkbox input "checked" attribute.
|
|
10
|
-
*/
|
|
11
|
-
isChecked: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Custom content to be displayed to right of checkbox.
|
|
14
|
-
*/
|
|
15
|
-
label: string;
|
|
16
|
-
/**
|
|
17
|
-
* Callback function when input is changed.
|
|
18
|
-
*/
|
|
19
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
-
/**
|
|
21
|
-
* Additional classes to add.
|
|
22
|
-
*/
|
|
23
|
-
className?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Mark the input field as invalid and display a validation message.
|
|
26
|
-
* Pass a string or node to render a validation message below the input.
|
|
27
|
-
*/
|
|
28
|
-
error?: React.ReactNode;
|
|
29
|
-
/**
|
|
30
|
-
* Additional clarifying text to help describe the input
|
|
31
|
-
*/
|
|
32
|
-
helpText?: React.ReactNode;
|
|
33
|
-
/**
|
|
34
|
-
* Determines if the label is not shown for stylistic reasons.
|
|
35
|
-
* Note the label is still a required prop and will be used as the aria-label for accessibility reasons.
|
|
36
|
-
*/
|
|
37
|
-
hideLabel?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* If the input should be disabled and not focusable.
|
|
40
|
-
*/
|
|
41
|
-
isDisabled?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Whether the checkbox is rendered in an indeterminate state.
|
|
44
|
-
* NOTE: this change is only visual and it does not affect the checked or unchecked state of the checkbox.
|
|
45
|
-
*/
|
|
46
|
-
isIndeterminate?: CheckboxProps['isIndeterminate'];
|
|
47
|
-
/**
|
|
48
|
-
* The required and aria-required attributes on the input
|
|
49
|
-
*/
|
|
50
|
-
isRequired?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Callback function when input is blurred.
|
|
53
|
-
*/
|
|
54
|
-
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
55
|
-
/**
|
|
56
|
-
* Callback function when input is focused.
|
|
57
|
-
*/
|
|
58
|
-
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
59
|
-
/**
|
|
60
|
-
* Visual indicator that the field is required, that gets appended to the label
|
|
61
|
-
*/
|
|
62
|
-
requiredIndicator?: React.ReactNode;
|
|
63
|
-
/**
|
|
64
|
-
* The size of the checkbox.
|
|
65
|
-
*/
|
|
66
|
-
size?: CheckboxSize;
|
|
67
|
-
/**
|
|
68
|
-
* Additional props to be spread to rendered element
|
|
69
|
-
*/
|
|
70
|
-
[x: string]: any;
|
|
71
|
-
}
|
|
72
|
-
export declare const CheckboxInput: React.FC<CheckboxInputProps>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Meta } from '@storybook/react-vite';
|
|
3
|
-
import { CheckboxInput } from './CheckboxInput';
|
|
4
|
-
declare const meta: Meta<typeof CheckboxInput>;
|
|
5
|
-
export default meta;
|
|
6
|
-
export declare const Basic: () => React.JSX.Element;
|
|
7
|
-
export declare const Default: () => React.JSX.Element;
|
|
8
|
-
export declare const States: () => React.JSX.Element;
|
|
9
|
-
export declare const IndeterminateCheckboxes: () => React.JSX.Element;
|
|
10
|
-
export declare const Required: () => React.JSX.Element;
|
|
11
|
-
export declare const CustomRequiredIndicator: () => React.JSX.Element;
|
|
12
|
-
export declare const Sizes: () => React.JSX.Element;
|
|
13
|
-
export declare const HelpText: () => React.JSX.Element;
|
|
14
|
-
export declare const CheckedInitialState: () => React.JSX.Element;
|
|
15
|
-
export declare const HiddenLabel: () => React.JSX.Element;
|
|
16
|
-
export declare const DisabledAndUnchecked: () => React.JSX.Element;
|
|
17
|
-
export declare const DisabledAndChecked: () => React.JSX.Element;
|
|
18
|
-
export declare const Error: () => React.JSX.Element;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ResponsiveProp } from '../../../types';
|
|
3
|
-
import { BoxProps } from '../../Box/Box';
|
|
4
|
-
type BaseSize = 'sm' | 'md' | 'lg';
|
|
5
|
-
export type CheckboxSize = BaseSize | ResponsiveProp<BaseSize>;
|
|
6
|
-
export interface CheckboxProps extends Omit<BoxProps, 'radius' | 'background' | 'as' | 'height'> {
|
|
7
|
-
/**
|
|
8
|
-
* The id attribute of the input.
|
|
9
|
-
*/
|
|
10
|
-
id: string;
|
|
11
|
-
/**
|
|
12
|
-
* The checkbox input "checked" attribute.
|
|
13
|
-
*/
|
|
14
|
-
isChecked: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Custom content to be displayed to right of checkbox.
|
|
17
|
-
*/
|
|
18
|
-
label: string;
|
|
19
|
-
/**
|
|
20
|
-
* Callback function when input is changed.
|
|
21
|
-
*/
|
|
22
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
23
|
-
/**
|
|
24
|
-
* Custom class to apply to the checkbox container.
|
|
25
|
-
*/
|
|
26
|
-
className?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Mark the input field as invalid and display a validation message.
|
|
29
|
-
* Pass a string or node to render a validation message below the input.
|
|
30
|
-
*/
|
|
31
|
-
error?: React.ReactNode;
|
|
32
|
-
/**
|
|
33
|
-
* id of the element that labels the Checkbox
|
|
34
|
-
*/
|
|
35
|
-
labelledby?: string;
|
|
36
|
-
/**
|
|
37
|
-
* If the input should be disabled and not focusable.
|
|
38
|
-
*/
|
|
39
|
-
isDisabled?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* If the radio input should be hidden to make way for a custom checkbox.
|
|
42
|
-
*/
|
|
43
|
-
isHidden?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Whether the checkbox is rendered in an indeterminate state.
|
|
46
|
-
* NOTE: this change is only visual and it does not affect the checked or unchecked state of the checkbox.
|
|
47
|
-
*/
|
|
48
|
-
isIndeterminate?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* The required and aria-required attributes on the input
|
|
51
|
-
*/
|
|
52
|
-
isRequired?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Callback function when input is blurred.
|
|
55
|
-
*/
|
|
56
|
-
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
57
|
-
/**
|
|
58
|
-
* Callback function when input is focused.
|
|
59
|
-
*/
|
|
60
|
-
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
61
|
-
/**
|
|
62
|
-
* The size of the checkbox.
|
|
63
|
-
*/
|
|
64
|
-
size?: CheckboxSize;
|
|
65
|
-
/**
|
|
66
|
-
* Value of the checkbox input element
|
|
67
|
-
*/
|
|
68
|
-
value?: string | number;
|
|
69
|
-
}
|
|
70
|
-
export declare const Checkbox: React.FC<CheckboxProps>;
|
|
71
|
-
export {};
|