@hyphen/hyphen-components 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +70 -0
- package/package.json +138 -0
- package/src/components/Alert/Alert.constants.ts +19 -0
- package/src/components/Alert/Alert.mdx +29 -0
- package/src/components/Alert/Alert.module.scss +74 -0
- package/src/components/Alert/Alert.stories.tsx +102 -0
- package/src/components/Alert/Alert.test.tsx +187 -0
- package/src/components/Alert/Alert.tsx +157 -0
- package/src/components/Alert/Alert.types.ts +14 -0
- package/src/components/Badge/Badge.mdx +28 -0
- package/src/components/Badge/Badge.module.scss +155 -0
- package/src/components/Badge/Badge.stories.tsx +52 -0
- package/src/components/Badge/Badge.test.tsx +74 -0
- package/src/components/Badge/Badge.tsx +70 -0
- package/src/components/Box/Box.mdx +259 -0
- package/src/components/Box/Box.module.scss +16 -0
- package/src/components/Box/Box.stories.tsx +1679 -0
- package/src/components/Box/Box.test.tsx +478 -0
- package/src/components/Box/Box.tsx +636 -0
- package/src/components/Button/Button.constants.ts +10 -0
- package/src/components/Button/Button.mdx +71 -0
- package/src/components/Button/Button.module.scss +312 -0
- package/src/components/Button/Button.stories.tsx +117 -0
- package/src/components/Button/Button.test.tsx +460 -0
- package/src/components/Button/Button.tsx +241 -0
- package/src/components/Card/Card.mdx +46 -0
- package/src/components/Card/Card.module.scss +6 -0
- package/src/components/Card/Card.stories.tsx +101 -0
- package/src/components/Card/Card.test.tsx +11 -0
- package/src/components/Card/Card.tsx +61 -0
- package/src/components/Card/components/CardFooter/CardFooter.test.tsx +11 -0
- package/src/components/Card/components/CardFooter/CardFooter.tsx +35 -0
- package/src/components/Card/components/CardHeader/CardHeader.test.tsx +23 -0
- package/src/components/Card/components/CardHeader/CardHeader.tsx +54 -0
- package/src/components/Card/components/CardSection/CardSection.test.tsx +28 -0
- package/src/components/Card/components/CardSection/CardSection.tsx +102 -0
- package/src/components/Card/components/index.ts +3 -0
- package/src/components/CheckboxInput/CheckboxInput.mdx +98 -0
- package/src/components/CheckboxInput/CheckboxInput.stories.tsx +254 -0
- package/src/components/CheckboxInput/CheckboxInput.test.tsx +436 -0
- package/src/components/CheckboxInput/CheckboxInput.tsx +171 -0
- package/src/components/CheckboxInput/components/Checkbox.module.scss +174 -0
- package/src/components/CheckboxInput/components/Checkbox.test.tsx +201 -0
- package/src/components/CheckboxInput/components/Checkbox.tsx +176 -0
- package/src/components/CheckboxInput/components/CheckboxIcon.tsx +71 -0
- package/src/components/DateInput/DateInput.mdx +61 -0
- package/src/components/DateInput/DateInput.stories.tsx +168 -0
- package/src/components/DateInput/DateInput.test.tsx +258 -0
- package/src/components/DateInput/DateInput.tsx +189 -0
- package/src/components/DatePicker/DatePicker.mdx +52 -0
- package/src/components/DatePicker/DatePicker.module.scss +603 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +199 -0
- package/src/components/DatePicker/DatePicker.test.tsx +26 -0
- package/src/components/DatePicker/DatePicker.tsx +138 -0
- package/src/components/Details/Details.mdx +30 -0
- package/src/components/Details/Details.module.scss +32 -0
- package/src/components/Details/Details.stories.tsx +38 -0
- package/src/components/Details/Details.test.tsx +189 -0
- package/src/components/Details/Details.tsx +51 -0
- package/src/components/Details/DetailsSummary.tsx +65 -0
- package/src/components/Drawer/Drawer.mdx +117 -0
- package/src/components/Drawer/Drawer.module.scss +96 -0
- package/src/components/Drawer/Drawer.stories.tsx +380 -0
- package/src/components/Drawer/Drawer.test.tsx +90 -0
- package/src/components/Drawer/Drawer.tsx +249 -0
- package/src/components/FormControl/FormControl.tsx +78 -0
- package/src/components/FormLabel/FormLabel.mdx +24 -0
- package/src/components/FormLabel/FormLabel.module.scss +19 -0
- package/src/components/FormLabel/FormLabel.stories.tsx +20 -0
- package/src/components/FormLabel/FormLabel.test.tsx +35 -0
- package/src/components/FormLabel/FormLabel.tsx +96 -0
- package/src/components/Formik/Formik.mdx +10 -0
- package/src/components/Formik/Formik.stories.tsx +307 -0
- package/src/components/Formik/FormikCheckboxInput/FormikCheckboxInput.test.tsx +172 -0
- package/src/components/Formik/FormikCheckboxInput/FormikCheckboxInput.tsx +41 -0
- package/src/components/Formik/FormikRadioGroup/FormikRadioGroup.test.tsx +205 -0
- package/src/components/Formik/FormikRadioGroup/FormikRadioGroup.tsx +37 -0
- package/src/components/Formik/FormikSelectInput/FormikSelectInput.test.tsx +210 -0
- package/src/components/Formik/FormikSelectInput/FormikSelectInput.tsx +41 -0
- package/src/components/Formik/FormikSelectInputInset/FormikSelectInputInset.test.tsx +153 -0
- package/src/components/Formik/FormikSelectInputInset/FormikSelectInputInset.tsx +44 -0
- package/src/components/Formik/FormikSelectInputNative/FormikSelectInputNative.test.tsx +161 -0
- package/src/components/Formik/FormikSelectInputNative/FormikSelectInputNative.tsx +46 -0
- package/src/components/Formik/FormikTextInput/FormikTextInput.test.tsx +176 -0
- package/src/components/Formik/FormikTextInput/FormikTextInput.tsx +38 -0
- package/src/components/Formik/FormikTextInputInset/FormikTextInputInset.test.tsx +170 -0
- package/src/components/Formik/FormikTextInputInset/FormikTextInputInset.tsx +42 -0
- package/src/components/Formik/FormikTextareaInput/FormikTextareaInput.test.tsx +186 -0
- package/src/components/Formik/FormikTextareaInput/FormikTextareaInput.tsx +42 -0
- package/src/components/Formik/FormikTextareaInputInset/FormikTextareaInputInset.test.tsx +179 -0
- package/src/components/Formik/FormikTextareaInputInset/FormikTextareaInputInset.tsx +42 -0
- package/src/components/Formik/FormikTimePicker/FormikTimePicker.test.tsx +224 -0
- package/src/components/Formik/FormikTimePicker/FormikTimePicker.tsx +37 -0
- package/src/components/Formik/FormikTimePickerNative/FormikTimePickerNative.test.tsx +175 -0
- package/src/components/Formik/FormikTimePickerNative/FormikTimePickerNative.tsx +38 -0
- package/src/components/Formik/FormikToggle/FormikToggle.test.tsx +172 -0
- package/src/components/Formik/FormikToggle/FormikToggle.tsx +38 -0
- package/src/components/Heading/Heading.constants.ts +19 -0
- package/src/components/Heading/Heading.mdx +35 -0
- package/src/components/Heading/Heading.module.scss +5 -0
- package/src/components/Heading/Heading.stories.tsx +90 -0
- package/src/components/Heading/Heading.test.tsx +67 -0
- package/src/components/Heading/Heading.tsx +67 -0
- package/src/components/HelpText/HelpText.module.scss +14 -0
- package/src/components/HelpText/HelpText.tsx +33 -0
- package/src/components/Icon/Icon.mdx +40 -0
- package/src/components/Icon/Icon.stories.tsx +72 -0
- package/src/components/Icon/Icon.test.tsx +30 -0
- package/src/components/Icon/Icon.tsx +61 -0
- package/src/components/InputValidationMessage/InputValidationMessage.module.scss +3 -0
- package/src/components/InputValidationMessage/InputValidationMessage.tsx +27 -0
- package/src/components/Modal/Modal.mdx +60 -0
- package/src/components/Modal/Modal.module.scss +135 -0
- package/src/components/Modal/Modal.stories.tsx +194 -0
- package/src/components/Modal/Modal.test.tsx +81 -0
- package/src/components/Modal/Modal.tsx +174 -0
- package/src/components/Modal/components/ModalBody/ModalBody.test.tsx +20 -0
- package/src/components/Modal/components/ModalBody/ModalBody.tsx +24 -0
- package/src/components/Modal/components/ModalFooter/ModalFooter.test.tsx +32 -0
- package/src/components/Modal/components/ModalFooter/ModalFooter.tsx +37 -0
- package/src/components/Modal/components/ModalHeader/ModalHeader.test.tsx +29 -0
- package/src/components/Modal/components/ModalHeader/ModalHeader.tsx +58 -0
- package/src/components/Modal/components/index.ts +5 -0
- package/src/components/Pagination/Pagination.mdx +26 -0
- package/src/components/Pagination/Pagination.stories.tsx +55 -0
- package/src/components/Pagination/Pagination.test.tsx +225 -0
- package/src/components/Pagination/Pagination.tsx +162 -0
- package/src/components/Pagination/Pagination.utilities.test.ts +133 -0
- package/src/components/Pagination/Pagination.utilities.ts +101 -0
- package/src/components/Popover/Popover.mdx +104 -0
- package/src/components/Popover/Popover.module.scss +74 -0
- package/src/components/Popover/Popover.stories.tsx +471 -0
- package/src/components/Popover/Popover.test.tsx +128 -0
- package/src/components/Popover/Popover.tsx +277 -0
- package/src/components/RadioGroup/RadioGroup.mdx +81 -0
- package/src/components/RadioGroup/RadioGroup.module.scss +23 -0
- package/src/components/RadioGroup/RadioGroup.stories.tsx +375 -0
- package/src/components/RadioGroup/RadioGroup.test.tsx +282 -0
- package/src/components/RadioGroup/RadioGroup.tsx +145 -0
- package/src/components/RadioGroup/RadioInput/RadioInput.module.scss +114 -0
- package/src/components/RadioGroup/RadioInput/RadioInput.test.tsx +156 -0
- package/src/components/RadioGroup/RadioInput/RadioInput.tsx +148 -0
- package/src/components/RadioGroup/RadioInput/RadioInputIcon.tsx +59 -0
- package/src/components/ResponsiveProvider/ResponsiveProvider.mdx +36 -0
- package/src/components/ResponsiveProvider/ResponsiveProvider.stories.tsx +54 -0
- package/src/components/ResponsiveProvider/ResponsiveProvider.test.tsx +70 -0
- package/src/components/ResponsiveProvider/ResponsiveProvider.tsx +73 -0
- package/src/components/SelectInput/SelectInput.mdx +115 -0
- package/src/components/SelectInput/SelectInput.module.scss +357 -0
- package/src/components/SelectInput/SelectInput.stories.tsx +373 -0
- package/src/components/SelectInput/SelectInput.test.tsx +403 -0
- package/src/components/SelectInput/SelectInput.tsx +245 -0
- package/src/components/SelectInputInset/SelectInputInset.mdx +56 -0
- package/src/components/SelectInputInset/SelectInputInset.module.scss +397 -0
- package/src/components/SelectInputInset/SelectInputInset.stories.tsx +189 -0
- package/src/components/SelectInputInset/SelectInputInset.test.tsx +305 -0
- package/src/components/SelectInputInset/SelectInputInset.tsx +235 -0
- package/src/components/SelectInputNative/SelectInputNative.mdx +87 -0
- package/src/components/SelectInputNative/SelectInputNative.module.scss +356 -0
- package/src/components/SelectInputNative/SelectInputNative.stories.tsx +282 -0
- package/src/components/SelectInputNative/SelectInputNative.test.tsx +341 -0
- package/src/components/SelectInputNative/SelectInputNative.tsx +121 -0
- package/src/components/Spinner/Spinner.mdx +29 -0
- package/src/components/Spinner/Spinner.module.scss +16 -0
- package/src/components/Spinner/Spinner.stories.tsx +48 -0
- package/src/components/Spinner/Spinner.test.tsx +47 -0
- package/src/components/Spinner/Spinner.tsx +116 -0
- package/src/components/Table/Table.mdx +216 -0
- package/src/components/Table/Table.module.scss +61 -0
- package/src/components/Table/Table.stories.tsx +884 -0
- package/src/components/Table/Table.test.tsx +437 -0
- package/src/components/Table/Table.tsx +171 -0
- package/src/components/Table/TableBody/TableBody.module.scss +19 -0
- package/src/components/Table/TableBody/TableBody.test.tsx +38 -0
- package/src/components/Table/TableBody/TableBody.tsx +96 -0
- package/src/components/Table/TableBody/TableBodyCell/TableBodyCell.module.scss +47 -0
- package/src/components/Table/TableBody/TableBodyCell/TableBodyCell.test.tsx +81 -0
- package/src/components/Table/TableBody/TableBodyCell/TableBodyCell.tsx +94 -0
- package/src/components/Table/TableHead/TableHead.test.tsx +20 -0
- package/src/components/Table/TableHead/TableHead.tsx +78 -0
- package/src/components/Table/TableHead/TableHeaderCell/TableHeaderCell.module.scss +72 -0
- package/src/components/Table/TableHead/TableHeaderCell/TableHeaderCell.test.tsx +187 -0
- package/src/components/Table/TableHead/TableHeaderCell/TableHeaderCell.tsx +192 -0
- package/src/components/Table/common/TableRow/TableRow.module.scss +5 -0
- package/src/components/Table/common/TableRow/TableRow.test.tsx +52 -0
- package/src/components/Table/common/TableRow/TableRow.tsx +155 -0
- package/src/components/TextInput/TextInput.mdx +96 -0
- package/src/components/TextInput/TextInput.module.scss +405 -0
- package/src/components/TextInput/TextInput.stories.tsx +268 -0
- package/src/components/TextInput/TextInput.test.tsx +231 -0
- package/src/components/TextInput/TextInput.tsx +263 -0
- package/src/components/TextInputInset/TextInputInset.mdx +62 -0
- package/src/components/TextInputInset/TextInputInset.module.scss +418 -0
- package/src/components/TextInputInset/TextInputInset.stories.tsx +213 -0
- package/src/components/TextInputInset/TextInputInset.test.tsx +222 -0
- package/src/components/TextInputInset/TextInputInset.tsx +261 -0
- package/src/components/TextareaInput/TextareaInput.mdx +117 -0
- package/src/components/TextareaInput/TextareaInput.module.scss +275 -0
- package/src/components/TextareaInput/TextareaInput.stories.tsx +293 -0
- package/src/components/TextareaInput/TextareaInput.test.tsx +195 -0
- package/src/components/TextareaInput/TextareaInput.tsx +182 -0
- package/src/components/TextareaInputInset/TextareaInputInset.mdx +55 -0
- package/src/components/TextareaInputInset/TextareaInputInset.module.scss +337 -0
- package/src/components/TextareaInputInset/TextareaInputInset.stories.tsx +160 -0
- package/src/components/TextareaInputInset/TextareaInputInset.test.tsx +199 -0
- package/src/components/TextareaInputInset/TextareaInputInset.tsx +213 -0
- package/src/components/ThemeProvider/ThemeProvider.mdx +11 -0
- package/src/components/ThemeProvider/ThemeProvider.stories.tsx +56 -0
- package/src/components/ThemeProvider/ThemeProvider.tsx +75 -0
- package/src/components/TimePicker/TimePicker.mdx +75 -0
- package/src/components/TimePicker/TimePicker.stories.tsx +149 -0
- package/src/components/TimePicker/TimePicker.test.tsx +97 -0
- package/src/components/TimePicker/TimePicker.tsx +83 -0
- package/src/components/TimePickerNative/TimePickerNative.mdx +67 -0
- package/src/components/TimePickerNative/TimePickerNative.stories.tsx +151 -0
- package/src/components/TimePickerNative/TimePickerNative.test.tsx +117 -0
- package/src/components/TimePickerNative/TimePickerNative.tsx +93 -0
- package/src/components/Toast/Toast.mdx +134 -0
- package/src/components/Toast/Toast.store.ts +280 -0
- package/src/components/Toast/Toast.stories.tsx +283 -0
- package/src/components/Toast/Toast.test.tsx +784 -0
- package/src/components/Toast/Toast.types.ts +98 -0
- package/src/components/Toast/ToastContainer.tsx +170 -0
- package/src/components/Toast/ToastNotification.module.scss +63 -0
- package/src/components/Toast/ToastNotification.tsx +176 -0
- package/src/components/Toast/index.ts +4 -0
- package/src/components/Toast/toast.ts +102 -0
- package/src/components/Toast/useToasts.ts +102 -0
- package/src/components/Toggle/Toggle.mdx +51 -0
- package/src/components/Toggle/Toggle.module.scss +294 -0
- package/src/components/Toggle/Toggle.stories.tsx +128 -0
- package/src/components/Toggle/Toggle.test.tsx +308 -0
- package/src/components/Toggle/Toggle.tsx +184 -0
- package/src/constants/keyCodes.ts +2 -0
- package/src/docs/Brands.mdx +153 -0
- package/src/docs/Colors.mdx +158 -0
- package/src/docs/DesignTokens.mdx +415 -0
- package/src/docs/GetStarted.mdx +47 -0
- package/src/docs/intro.mdx +12 -0
- package/src/fonts/AvenirBold.otf +0 -0
- package/src/fonts/AvenirBold.woff +0 -0
- package/src/fonts/AvenirBold.woff2 +0 -0
- package/src/fonts/AvenirLight.otf +0 -0
- package/src/fonts/AvenirLight.woff +0 -0
- package/src/fonts/AvenirLight.woff2 +0 -0
- package/src/fonts/AvenirRegular.otf +0 -0
- package/src/fonts/AvenirRegular.woff +0 -0
- package/src/fonts/AvenirRegular.woff2 +0 -0
- package/src/fonts/Geist-Bold.otf +0 -0
- package/src/fonts/Geist-Bold.woff +0 -0
- package/src/fonts/Geist-Bold.woff2 +0 -0
- package/src/fonts/Geist-Medium.otf +0 -0
- package/src/fonts/Geist-Medium.woff +0 -0
- package/src/fonts/Geist-Medium.woff2 +0 -0
- package/src/fonts/Geist-Regular.otf +0 -0
- package/src/fonts/Geist-Regular.woff +0 -0
- package/src/fonts/Geist-Regular.woff2 +0 -0
- package/src/fonts/Geist-SemiBold.otf +0 -0
- package/src/fonts/Geist-SemiBold.woff +0 -0
- package/src/fonts/Geist-SemiBold.woff2 +0 -0
- package/src/fonts/GeistMono-Regular.otf +0 -0
- package/src/fonts/GeistMono-Regular.woff +0 -0
- package/src/fonts/GeistMono-Regular.woff2 +0 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useBreakpoint/useBreakpoint.mdx +26 -0
- package/src/hooks/useBreakpoint/useBreakpoint.stories.tsx +30 -0
- package/src/hooks/useBreakpoint/useBreakpoint.test.tsx +19 -0
- package/src/hooks/useBreakpoint/useBreakpoint.ts +50 -0
- package/src/hooks/useIsomorphicLayoutEffect/useIsomorphicLayouEffect.ts +5 -0
- package/src/hooks/useOpenClose/useOpenClose.mdx +15 -0
- package/src/hooks/useOpenClose/useOpenClose.stories.tsx +41 -0
- package/src/hooks/useOpenClose/useOpenClose.test.tsx +119 -0
- package/src/hooks/useOpenClose/useOpenClose.tsx +95 -0
- package/src/hooks/useWindowSize/useWindowSize.mdx +25 -0
- package/src/hooks/useWindowSize/useWindowSize.stories.tsx +35 -0
- package/src/hooks/useWindowSize/useWindowSize.ts +24 -0
- package/src/index.ts +48 -0
- package/src/lib/cssShorthandToClasses.test.ts +149 -0
- package/src/lib/cssShorthandToClasses.ts +133 -0
- package/src/lib/doesStringIncludeCssUnit.ts +6 -0
- package/src/lib/generateResponsiveClasses.test.ts +24 -0
- package/src/lib/generateResponsiveClasses.ts +30 -0
- package/src/lib/getAutoCompleteValue.test.ts +27 -0
- package/src/lib/getAutoCompleteValue.ts +12 -0
- package/src/lib/getColumnKeys.ts +27 -0
- package/src/lib/getDimensionCss.test.ts +148 -0
- package/src/lib/getDimensionCss.ts +73 -0
- package/src/lib/getElementType.test.tsx +42 -0
- package/src/lib/getElementType.ts +42 -0
- package/src/lib/getFlexCss.test.ts +122 -0
- package/src/lib/getFlexCss.ts +67 -0
- package/src/lib/index.ts +15 -0
- package/src/lib/isFunction.ts +6 -0
- package/src/lib/mergeRefs.ts +15 -0
- package/src/lib/prefersReducedMotion.ts +12 -0
- package/src/lib/react-children-utilities/filter.ts +12 -0
- package/src/lib/react-children-utilities/index.ts +1 -0
- package/src/lib/reactRouterClickHandler.ts +37 -0
- package/src/lib/resolveValue.ts +7 -0
- package/src/lib/tokens.ts +139 -0
- package/src/modes.ts +8 -0
- package/src/styles/animation.scss +152 -0
- package/src/styles/cursor.scss +43 -0
- package/src/styles/display.scss +119 -0
- package/src/styles/flex.scss +453 -0
- package/src/styles/fonts.scss +44 -0
- package/src/styles/globals/utilities.scss +4 -0
- package/src/styles/mixins.scss +14 -0
- package/src/styles/overflow.scss +41 -0
- package/src/styles/position.scss +45 -0
- package/src/styles/reset.scss +108 -0
- package/src/styles/text-align.scss +21 -0
- package/src/styles/utilities.scss +9 -0
- package/src/styles/variables/forms.scss +71 -0
- package/src/styles/variables/index.scss +3 -0
- package/src/styles/white-space.scss +21 -0
- package/src/types/index.ts +201 -0
- package/src/types/lib.types.ts +3 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Meta, Canvas } from '@storybook/addon-docs';
|
|
2
|
+
import * as Stories from './useBreakpoint.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={Stories} />
|
|
5
|
+
|
|
6
|
+
# useBreakpoint
|
|
7
|
+
|
|
8
|
+
The `useBreakpoint` returns useful states based on the window innerWidth and hyphen-component [breakpoints]().
|
|
9
|
+
|
|
10
|
+
The hook will return a `BreakpointState` object with the following shape:
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
{
|
|
14
|
+
isPhone: boolean,
|
|
15
|
+
isTablet: boolean,
|
|
16
|
+
isDesktop: boolean,
|
|
17
|
+
isHd: boolean,
|
|
18
|
+
activeBreakpoint: { name: BreakpointName, minWidth: number },
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**NOTE:** This hook relies on `ResponsiveContext`, so your app must be wrapped in the [`ResponsiveProvider`]() to provide window size context to all children components.
|
|
23
|
+
|
|
24
|
+
## Basic Usage
|
|
25
|
+
|
|
26
|
+
<Canvas isExpanded of={Stories.BasicUsage} />
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Meta } from '@storybook/react';
|
|
3
|
+
import { ResponsiveProvider } from '../../components/ResponsiveProvider/ResponsiveProvider';
|
|
4
|
+
import { useBreakpoint } from './useBreakpoint';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof useBreakpoint> = {
|
|
7
|
+
title: 'Hooks/useBreakpoint',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
export const BasicUsage = () =>
|
|
13
|
+
(() => {
|
|
14
|
+
const App = () => {
|
|
15
|
+
const { isPhone, isTablet, isDesktop, isHd } = useBreakpoint();
|
|
16
|
+
return (
|
|
17
|
+
<div>
|
|
18
|
+
<p>phone: {isPhone ? '✅' : '❌'}</p>
|
|
19
|
+
<p>tablet: {isTablet ? '✅' : '❌'}</p>
|
|
20
|
+
<p>desktop: {isDesktop ? '✅' : '❌'}</p>
|
|
21
|
+
<p>hd: {isHd ? '✅' : '❌'}</p>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
return (
|
|
26
|
+
<ResponsiveProvider>
|
|
27
|
+
<App />
|
|
28
|
+
</ResponsiveProvider>
|
|
29
|
+
);
|
|
30
|
+
})();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { useBreakpoint } from './useBreakpoint';
|
|
4
|
+
|
|
5
|
+
const UseBreakpointExample = () => {
|
|
6
|
+
const { activeBreakpoint } = useBreakpoint();
|
|
7
|
+
|
|
8
|
+
return <button type="button">{activeBreakpoint.name}</button>;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
describe('initial state', () => {
|
|
12
|
+
test('the component renders with the default breakpoint (jest jsdom)', () => {
|
|
13
|
+
const { getByRole } = render(<UseBreakpointExample />);
|
|
14
|
+
|
|
15
|
+
const myButton = getByRole('button');
|
|
16
|
+
|
|
17
|
+
expect(myButton).toHaveTextContent('base');
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { BREAKPOINTS } from '../../lib/tokens';
|
|
3
|
+
import { Breakpoint } from '../../types';
|
|
4
|
+
import { useWindowSize } from '../useWindowSize/useWindowSize';
|
|
5
|
+
import { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect/useIsomorphicLayouEffect';
|
|
6
|
+
|
|
7
|
+
const defaultBreakpoint: Breakpoint = { name: 'base', minWidth: 0 };
|
|
8
|
+
|
|
9
|
+
export interface BreakpointState {
|
|
10
|
+
isPhone: boolean;
|
|
11
|
+
isTablet: boolean;
|
|
12
|
+
isDesktop: boolean;
|
|
13
|
+
isHd: boolean;
|
|
14
|
+
activeBreakpoint: Breakpoint;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const useBreakpoint = (): BreakpointState => {
|
|
18
|
+
const windowSize = useWindowSize();
|
|
19
|
+
|
|
20
|
+
const [breakpoint, setBreakpoint] = useState<Breakpoint>({
|
|
21
|
+
...defaultBreakpoint,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
useIsomorphicLayoutEffect(() => {
|
|
25
|
+
const sortedBreakpoints = [...BREAKPOINTS].sort(
|
|
26
|
+
(a, b) => b.minWidth - a.minWidth
|
|
27
|
+
);
|
|
28
|
+
const activeBreakpoint =
|
|
29
|
+
windowSize &&
|
|
30
|
+
sortedBreakpoints.find(
|
|
31
|
+
(b) => b.minWidth <= (windowSize.innerWidth as number)
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
setBreakpoint(activeBreakpoint || { ...defaultBreakpoint });
|
|
35
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
|
+
}, [
|
|
37
|
+
windowSize.innerWidth,
|
|
38
|
+
windowSize.innerHeight,
|
|
39
|
+
windowSize.outerWidth,
|
|
40
|
+
windowSize.outerHeight,
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
isPhone: breakpoint.name === 'base',
|
|
45
|
+
isTablet: breakpoint.name === 'tablet',
|
|
46
|
+
isDesktop: breakpoint.name === 'desktop',
|
|
47
|
+
isHd: breakpoint.name === 'hd',
|
|
48
|
+
activeBreakpoint: breakpoint,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import { useOpenClose } from './useOpenClose';
|
|
3
|
+
import * as Stories from './useOpenClose.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={Stories} />
|
|
6
|
+
|
|
7
|
+
# useOpenClose
|
|
8
|
+
|
|
9
|
+
The `useOpenClose` hook helps handle common open, close, or toggle scenarios. It can be used to control components such as `Modal`, `MediaModal`, `Drawer`, `Details` and even `Popover`.
|
|
10
|
+
|
|
11
|
+
<Canvas withSource="open" of={Stories.BasicUsage} />
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
<ArgTypes of={Stories.BasicUsage} />
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Meta } from '@storybook/react';
|
|
3
|
+
import { UseOpenCloseProps, useOpenClose } from './useOpenClose';
|
|
4
|
+
import { Button } from '../../components/Button/Button';
|
|
5
|
+
import { Box } from '../../components/Box/Box';
|
|
6
|
+
import { Popover } from '../../components/Popover/Popover';
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof useOpenClose> = {
|
|
9
|
+
title: 'Hooks/useOpenClose',
|
|
10
|
+
parameters: {
|
|
11
|
+
controls: { hideNoControlsWarning: true },
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
|
|
17
|
+
export const BasicUsage: React.FC<UseOpenCloseProps> = () => {
|
|
18
|
+
const { isOpen, handleOpen, handleClose } = useOpenClose();
|
|
19
|
+
const popoverContent = (
|
|
20
|
+
<>
|
|
21
|
+
<Box padding="lg" gap="md">
|
|
22
|
+
<Box as="p">Hello!</Box>
|
|
23
|
+
</Box>
|
|
24
|
+
</>
|
|
25
|
+
);
|
|
26
|
+
return (
|
|
27
|
+
<Popover
|
|
28
|
+
placement="right-end"
|
|
29
|
+
content={popoverContent}
|
|
30
|
+
isOpen={isOpen}
|
|
31
|
+
onClickOutside={handleClose}
|
|
32
|
+
contentContainerProps={{
|
|
33
|
+
padding: 'sm',
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
<Button variant="primary" type="button" onClick={handleOpen}>
|
|
37
|
+
Open Popover
|
|
38
|
+
</Button>
|
|
39
|
+
</Popover>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { fireEvent, screen, render } from '@testing-library/react';
|
|
3
|
+
import { useOpenClose, UseOpenCloseProps } from './useOpenClose';
|
|
4
|
+
import { Details } from '../../components/Details/Details';
|
|
5
|
+
|
|
6
|
+
const mockedOnOpen = jest.fn(() => null);
|
|
7
|
+
const mockedOnClose = jest.fn(() => null);
|
|
8
|
+
|
|
9
|
+
const UseOpenCloseExample = (props: UseOpenCloseProps) => {
|
|
10
|
+
const { isOpen, handleToggle } = useOpenClose({ ...props });
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<Details isOpen={isOpen}>
|
|
14
|
+
<Details.Summary
|
|
15
|
+
isDetailsOpen={isOpen}
|
|
16
|
+
onToggle={handleToggle}
|
|
17
|
+
display="inline"
|
|
18
|
+
>
|
|
19
|
+
Details Summary
|
|
20
|
+
</Details.Summary>
|
|
21
|
+
<div data-testid="details-content">
|
|
22
|
+
We are on a mission to stop climate change before we reach an
|
|
23
|
+
irreversible tipping point.
|
|
24
|
+
</div>
|
|
25
|
+
</Details>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
describe('useOpenClose', () => {
|
|
30
|
+
afterEach(() => {
|
|
31
|
+
jest.resetAllMocks();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
describe('initial state', () => {
|
|
35
|
+
test('component does not render the disclosure by default', () => {
|
|
36
|
+
const { getByText, getByTestId } = render(<UseOpenCloseExample />);
|
|
37
|
+
|
|
38
|
+
const myButton = getByText('Details Summary');
|
|
39
|
+
|
|
40
|
+
expect(myButton).toBeInTheDocument();
|
|
41
|
+
expect(getByTestId('details-content')).not.toBeVisible();
|
|
42
|
+
});
|
|
43
|
+
test('component shows and hides the disclosure when toggle is pressed', () => {
|
|
44
|
+
render(<UseOpenCloseExample />);
|
|
45
|
+
|
|
46
|
+
fireEvent.click(screen.getByText('Details Summary'));
|
|
47
|
+
expect(screen.getByTestId('details-content')).toBeVisible();
|
|
48
|
+
|
|
49
|
+
fireEvent.click(screen.getByText('Details Summary'));
|
|
50
|
+
expect(screen.getByTestId('details-content')).not.toBeVisible();
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
describe('callbacks', () => {
|
|
55
|
+
test('onOpen callback is called when toggle is run', () => {
|
|
56
|
+
render(<UseOpenCloseExample onOpen={mockedOnOpen} />);
|
|
57
|
+
|
|
58
|
+
fireEvent.click(screen.getByText('Details Summary'));
|
|
59
|
+
expect(screen.getByTestId('details-content')).toBeVisible();
|
|
60
|
+
|
|
61
|
+
expect(mockedOnOpen).toHaveBeenCalledTimes(1);
|
|
62
|
+
});
|
|
63
|
+
test('onClose callback is called when toggle is run', () => {
|
|
64
|
+
render(<UseOpenCloseExample onClose={mockedOnClose} defaultIsOpen />);
|
|
65
|
+
|
|
66
|
+
expect(screen.getByTestId('details-content')).toBeVisible();
|
|
67
|
+
fireEvent.click(screen.getByText('Details Summary'));
|
|
68
|
+
expect(screen.getByTestId('details-content')).not.toBeVisible();
|
|
69
|
+
expect(mockedOnClose).toHaveBeenCalledTimes(1);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
describe('controlled', () => {
|
|
74
|
+
test('does not close when toggle is called when isOpen', () => {
|
|
75
|
+
render(<UseOpenCloseExample isOpen />);
|
|
76
|
+
|
|
77
|
+
fireEvent.click(screen.getByText('Details Summary'));
|
|
78
|
+
expect(screen.getByTestId('details-content')).toBeVisible();
|
|
79
|
+
});
|
|
80
|
+
test('calls onClose, but does not call onOpen when isOpen', () => {
|
|
81
|
+
render(
|
|
82
|
+
<UseOpenCloseExample
|
|
83
|
+
isOpen
|
|
84
|
+
onOpen={mockedOnOpen}
|
|
85
|
+
onClose={mockedOnClose}
|
|
86
|
+
/>
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
fireEvent.click(screen.getByText('Details Summary'));
|
|
90
|
+
expect(mockedOnClose).toHaveBeenCalledTimes(1);
|
|
91
|
+
expect(mockedOnOpen).toHaveBeenCalledTimes(0);
|
|
92
|
+
fireEvent.click(screen.getByText('Details Summary'));
|
|
93
|
+
expect(mockedOnClose).toHaveBeenCalledTimes(2);
|
|
94
|
+
expect(mockedOnOpen).toHaveBeenCalledTimes(0);
|
|
95
|
+
});
|
|
96
|
+
test('does not open when toggle is called and isOpen is false', () => {
|
|
97
|
+
render(<UseOpenCloseExample isOpen={false} />);
|
|
98
|
+
|
|
99
|
+
fireEvent.click(screen.getByText('Details Summary'));
|
|
100
|
+
expect(screen.getByTestId('details-content')).not.toBeVisible();
|
|
101
|
+
});
|
|
102
|
+
test('calls onOpen, but does not call onClose when isOpen is false', () => {
|
|
103
|
+
render(
|
|
104
|
+
<UseOpenCloseExample
|
|
105
|
+
isOpen={false}
|
|
106
|
+
onOpen={mockedOnOpen}
|
|
107
|
+
onClose={mockedOnClose}
|
|
108
|
+
/>
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
fireEvent.click(screen.getByText('Details Summary'));
|
|
112
|
+
expect(mockedOnOpen).toHaveBeenCalledTimes(1);
|
|
113
|
+
expect(mockedOnClose).toHaveBeenCalledTimes(0);
|
|
114
|
+
fireEvent.click(screen.getByText('Details Summary'));
|
|
115
|
+
expect(mockedOnOpen).toHaveBeenCalledTimes(2);
|
|
116
|
+
expect(mockedOnClose).toHaveBeenCalledTimes(0);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface UseOpenCloseProps {
|
|
4
|
+
/**
|
|
5
|
+
* Initial visibility of the component
|
|
6
|
+
*/
|
|
7
|
+
defaultIsOpen?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* If defined, visibility of the component is assumed to be controlled
|
|
10
|
+
*/
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Callback function when component is closed
|
|
14
|
+
* @returns void
|
|
15
|
+
*/
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Callback function when component is opened
|
|
19
|
+
* @returns void
|
|
20
|
+
*/
|
|
21
|
+
onOpen?: () => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface UseOpenCloseState {
|
|
25
|
+
/**
|
|
26
|
+
* If true, sets the controlled component to its visible state
|
|
27
|
+
*/
|
|
28
|
+
isOpen: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Callback function to set a falsy value for the `isOpen` parameter.
|
|
31
|
+
*/
|
|
32
|
+
handleClose: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Callback function to set a truthy value for the `isOpen` parameter.
|
|
35
|
+
*/
|
|
36
|
+
handleOpen: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* Callback function to toggle the value of the `isOpen` parameter.
|
|
39
|
+
*/
|
|
40
|
+
handleToggle: () => void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const useOpenClose = (
|
|
44
|
+
props: UseOpenCloseProps = {}
|
|
45
|
+
): UseOpenCloseState => {
|
|
46
|
+
const {
|
|
47
|
+
defaultIsOpen,
|
|
48
|
+
isOpen: isOpenProp,
|
|
49
|
+
onClose: onCloseProp,
|
|
50
|
+
onOpen: onOpenProp,
|
|
51
|
+
} = props;
|
|
52
|
+
|
|
53
|
+
const openCallback = useCallback(() => {
|
|
54
|
+
onOpenProp?.();
|
|
55
|
+
}, [onOpenProp]);
|
|
56
|
+
|
|
57
|
+
const closeCallback = useCallback(() => {
|
|
58
|
+
onCloseProp?.();
|
|
59
|
+
}, [onCloseProp]);
|
|
60
|
+
|
|
61
|
+
const [isOpenState, setIsOpen] = useState(defaultIsOpen || false);
|
|
62
|
+
|
|
63
|
+
const isOpen = isOpenProp !== undefined ? isOpenProp : isOpenState;
|
|
64
|
+
|
|
65
|
+
const isControlled = isOpenProp !== undefined;
|
|
66
|
+
|
|
67
|
+
const handleClose = useCallback(() => {
|
|
68
|
+
if (!isControlled) {
|
|
69
|
+
setIsOpen(false);
|
|
70
|
+
}
|
|
71
|
+
closeCallback?.();
|
|
72
|
+
}, [isControlled, closeCallback]);
|
|
73
|
+
|
|
74
|
+
const handleOpen = useCallback(() => {
|
|
75
|
+
if (!isControlled) {
|
|
76
|
+
setIsOpen(true);
|
|
77
|
+
}
|
|
78
|
+
openCallback?.();
|
|
79
|
+
}, [isControlled, openCallback]);
|
|
80
|
+
|
|
81
|
+
const handleToggle = useCallback(() => {
|
|
82
|
+
if (isOpen) {
|
|
83
|
+
handleClose();
|
|
84
|
+
} else {
|
|
85
|
+
handleOpen();
|
|
86
|
+
}
|
|
87
|
+
}, [isOpen, handleOpen, handleClose]);
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
isOpen,
|
|
91
|
+
handleClose,
|
|
92
|
+
handleOpen,
|
|
93
|
+
handleToggle,
|
|
94
|
+
};
|
|
95
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Meta, Canvas } from '@storybook/addon-docs';
|
|
2
|
+
import * as Stories from './useWindowSize.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={Stories} />
|
|
5
|
+
|
|
6
|
+
# useWindowSize
|
|
7
|
+
|
|
8
|
+
The `useWindowSize` returns useful states based on the window innerWidth and hyphen-component [breakpoints]().
|
|
9
|
+
|
|
10
|
+
The hook will return a `BreakpointState` object with the following shape:
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
{
|
|
14
|
+
innerWidth: number,
|
|
15
|
+
innerHeight: number,
|
|
16
|
+
outerWidth: number,
|
|
17
|
+
outerHeight: number,
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**NOTE:** This hook relies on `ResponsiveContext`, so your app must be wrapped in the [`ResponsiveProvider`]() to provide window size context to all children components.
|
|
22
|
+
|
|
23
|
+
## Basic Usage
|
|
24
|
+
|
|
25
|
+
<Canvas isExpanded of={Stories.BasicUsage} />
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Meta } from '@storybook/react';
|
|
3
|
+
import { useWindowSize } from './useWindowSize';
|
|
4
|
+
import { Box } from '../../components/Box/Box';
|
|
5
|
+
import { ResponsiveProvider } from '../../components/ResponsiveProvider/ResponsiveProvider';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof useWindowSize> = {
|
|
8
|
+
title: 'Hooks/useWindowSize',
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: { hideNoControlsWarning: true },
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
export const BasicUsage = () =>
|
|
17
|
+
(() => {
|
|
18
|
+
const App = () => {
|
|
19
|
+
const { innerWidth, innerHeight, outerWidth, outerHeight } =
|
|
20
|
+
useWindowSize();
|
|
21
|
+
return (
|
|
22
|
+
<Box gap="md">
|
|
23
|
+
<p>Inner Width: {innerWidth}</p>
|
|
24
|
+
<p>Inner Height: {innerHeight}</p>
|
|
25
|
+
<p>Outer Width: {outerWidth}</p>
|
|
26
|
+
<p>Outer Height: {outerHeight}</p>
|
|
27
|
+
</Box>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
return (
|
|
31
|
+
<ResponsiveProvider>
|
|
32
|
+
<App />
|
|
33
|
+
</ResponsiveProvider>
|
|
34
|
+
);
|
|
35
|
+
})();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ResponsiveContext } from '../../components/ResponsiveProvider/ResponsiveProvider';
|
|
3
|
+
|
|
4
|
+
export interface HookWindowSize {
|
|
5
|
+
innerWidth?: number;
|
|
6
|
+
innerHeight?: number;
|
|
7
|
+
outerWidth?: number;
|
|
8
|
+
outerHeight?: number;
|
|
9
|
+
}
|
|
10
|
+
export const useWindowSize = (): HookWindowSize => {
|
|
11
|
+
const { innerWidth, innerHeight, outerHeight, outerWidth, isCreated } =
|
|
12
|
+
React.useContext(ResponsiveContext);
|
|
13
|
+
|
|
14
|
+
if (isCreated) {
|
|
15
|
+
return {
|
|
16
|
+
innerHeight,
|
|
17
|
+
innerWidth,
|
|
18
|
+
outerHeight,
|
|
19
|
+
outerWidth,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return {};
|
|
24
|
+
};
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export * from './components/Alert/Alert';
|
|
2
|
+
export * from './components/Badge/Badge';
|
|
3
|
+
export * from './components/Box/Box';
|
|
4
|
+
export * from './components/Button/Button';
|
|
5
|
+
export * from './components/Card/Card';
|
|
6
|
+
export * from './components/CheckboxInput/components/Checkbox';
|
|
7
|
+
export * from './components/CheckboxInput/CheckboxInput';
|
|
8
|
+
export * from './components/DateInput/DateInput';
|
|
9
|
+
export * from './components/DatePicker/DatePicker';
|
|
10
|
+
export * from './components/Details/Details';
|
|
11
|
+
export * from './components/Details/DetailsSummary';
|
|
12
|
+
export * from './components/Drawer/Drawer';
|
|
13
|
+
export * from './components/FormControl/FormControl';
|
|
14
|
+
export * from './components/Formik/FormikCheckboxInput/FormikCheckboxInput';
|
|
15
|
+
export * from './components/Formik/FormikRadioGroup/FormikRadioGroup';
|
|
16
|
+
export * from './components/Formik/FormikSelectInput/FormikSelectInput';
|
|
17
|
+
export * from './components/Formik/FormikSelectInputInset/FormikSelectInputInset';
|
|
18
|
+
export * from './components/Formik/FormikTextareaInputInset/FormikTextareaInputInset';
|
|
19
|
+
export * from './components/Formik/FormikTextInputInset/FormikTextInputInset';
|
|
20
|
+
export * from './components/Formik/FormikSelectInputNative/FormikSelectInputNative';
|
|
21
|
+
export * from './components/Formik/FormikTextInput/FormikTextInput';
|
|
22
|
+
export * from './components/Formik/FormikTextareaInput/FormikTextareaInput';
|
|
23
|
+
export * from './components/Formik/FormikTimePicker/FormikTimePicker';
|
|
24
|
+
export * from './components/Formik/FormikTimePickerNative/FormikTimePickerNative';
|
|
25
|
+
export * from './components/Formik/FormikToggle/FormikToggle';
|
|
26
|
+
export * from './components/FormLabel/FormLabel';
|
|
27
|
+
export * from './components/Heading/Heading';
|
|
28
|
+
export * from './components/Icon/Icon';
|
|
29
|
+
export * from './components/Modal/Modal';
|
|
30
|
+
export * from './components/Pagination/Pagination';
|
|
31
|
+
export * from './components/Popover/Popover';
|
|
32
|
+
export * from './components/RadioGroup/RadioGroup';
|
|
33
|
+
export * from './components/ResponsiveProvider/ResponsiveProvider';
|
|
34
|
+
export * from './components/SelectInput/SelectInput';
|
|
35
|
+
export * from './components/SelectInputInset/SelectInputInset';
|
|
36
|
+
export * from './components/SelectInputNative/SelectInputNative';
|
|
37
|
+
export * from './components/Spinner/Spinner';
|
|
38
|
+
export * from './components/Table/Table';
|
|
39
|
+
export * from './components/TextareaInput/TextareaInput';
|
|
40
|
+
export * from './components/TextareaInputInset/TextareaInputInset';
|
|
41
|
+
export * from './components/TextInput/TextInput';
|
|
42
|
+
export * from './components/TextInputInset/TextInputInset';
|
|
43
|
+
export * from './components/ThemeProvider/ThemeProvider';
|
|
44
|
+
export * from './components/TimePicker/TimePicker';
|
|
45
|
+
export * from './components/TimePickerNative/TimePickerNative';
|
|
46
|
+
export * from './components/Toast';
|
|
47
|
+
export * from './components/Toggle/Toggle';
|
|
48
|
+
export * from './hooks';
|