@nypl/design-system-react-components 1.5.4 → 1.6.0-vite-rc-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -40
- package/dist/design-system-react-components.cjs +304 -0
- package/dist/design-system-react-components.js +42142 -0
- package/dist/{components → src/components}/Accordion/Accordion.d.ts +29 -29
- package/dist/{components → src/components}/AlphabetFilter/AlphabetFilter.d.ts +23 -23
- package/dist/{components → src/components}/AudioPlayer/AudioPlayer.d.ts +43 -43
- package/dist/{components → src/components}/Breadcrumbs/Breadcrumbs.d.ts +24 -18
- package/dist/{components → src/components}/Button/Button.d.ts +33 -30
- package/dist/{components → src/components}/ButtonGroup/ButtonGroup.d.ts +25 -24
- package/dist/{components → src/components}/Card/Card.d.ts +55 -55
- package/dist/{components → src/components}/Checkbox/Checkbox.d.ts +47 -47
- package/dist/{components → src/components}/CheckboxGroup/CheckboxGroup.d.ts +51 -51
- package/dist/{components → src/components}/ComponentWrapper/ComponentWrapper.d.ts +31 -31
- package/dist/{components → src/components}/DatePicker/DatePicker.d.ts +82 -81
- package/dist/{components → src/components}/FeedbackBox/FeedbackBox.d.ts +64 -63
- package/dist/{components → src/components}/FeedbackBox/useFeedbackBoxReducer.d.ts +19 -19
- package/dist/{components → src/components}/Fieldset/Fieldset.d.ts +24 -24
- package/dist/{components → src/components}/FilterBar/FilterBar.d.ts +61 -111
- package/dist/{components → src/components}/Footer/Footer.d.ts +14 -14
- package/dist/{components → src/components}/Footer/footerLinks.d.ts +12 -12
- package/dist/{components → src/components}/Form/Form.d.ts +31 -31
- package/dist/{components → src/components}/Grid/SimpleGrid.d.ts +20 -19
- package/dist/{components → src/components}/Header/Header.d.ts +21 -22
- package/dist/{components → src/components}/Header/components/HeaderLogin.d.ts +12 -12
- package/dist/{components → src/components}/Header/components/HeaderLoginButton.d.ts +10 -11
- package/dist/{components → src/components}/Header/components/HeaderLowerNav.d.ts +6 -7
- package/dist/{components → src/components}/Header/components/HeaderMobileIconNav.d.ts +6 -7
- package/dist/{components → src/components}/Header/components/HeaderMobileNav.d.ts +6 -7
- package/dist/{components → src/components}/Header/components/HeaderMobileNavButton.d.ts +6 -7
- package/dist/{components → src/components}/Header/components/HeaderSearchButton.d.ts +9 -10
- package/dist/{components → src/components}/Header/components/HeaderSearchForm.d.ts +10 -11
- package/dist/{components → src/components}/Header/components/HeaderSitewideAlerts.d.ts +7 -8
- package/dist/{components → src/components}/Header/components/HeaderUpperNav.d.ts +7 -8
- package/dist/{components → src/components}/Header/context/headerContext.d.ts +13 -13
- package/dist/{components → src/components}/Header/utils/googleAnalyticsUtils.d.ts +16 -16
- package/dist/{components → src/components}/Header/utils/headerUtils.d.ts +94 -94
- package/dist/{components → src/components}/Heading/Heading.d.ts +37 -35
- package/dist/{components → src/components}/HelperErrorText/HelperErrorText.d.ts +34 -34
- package/dist/{components → src/components}/Hero/Hero.d.ts +43 -42
- package/dist/{components → src/components}/HorizontalRule/HorizontalRule.d.ts +11 -11
- package/dist/{components → src/components}/Icons/Icon.d.ts +40 -41
- package/dist/src/components/Icons/IconSvgs.d.ts +163 -0
- package/dist/src/components/Icons/iconVariables.d.ts +6 -0
- package/dist/{components → src/components}/Image/Image.d.ts +68 -65
- package/dist/{components → src/components}/Label/Label.d.ts +25 -25
- package/dist/{components → src/components}/Link/Link.d.ts +22 -21
- package/dist/{components → src/components}/List/List.d.ts +42 -42
- package/dist/{components → src/components}/Logo/Logo.d.ts +28 -28
- package/dist/src/components/Logo/LogoSvgs.d.ts +157 -0
- package/dist/{components → src/components}/Modal/Modal.d.ts +35 -35
- package/dist/{components → src/components}/MultiSelect/MultiSelect.d.ts +61 -78
- package/dist/{components → src/components}/MultiSelect/MultiSelectDialog.d.ts +8 -8
- package/dist/{components → src/components}/MultiSelect/MultiSelectListbox.d.ts +9 -9
- package/dist/{components → src/components}/MultiSelect/MultiSelectMenuButton.d.ts +27 -27
- package/dist/{components → src/components}/MultiSelectGroup/MultiSelectGroup.d.ts +28 -26
- package/dist/{components → src/components}/Notification/Notification.d.ts +52 -51
- package/dist/{components → src/components}/Pagination/Pagination.d.ts +27 -27
- package/dist/{components → src/components}/ProgressIndicator/ProgressIndicator.d.ts +32 -30
- package/dist/{components → src/components}/Radio/Radio.d.ts +43 -43
- package/dist/{components → src/components}/RadioGroup/RadioGroup.d.ts +51 -51
- package/dist/{components → src/components}/SearchBar/SearchBar.d.ts +58 -58
- package/dist/{components → src/components}/Select/Select.d.ts +59 -57
- package/dist/{components → src/components}/SkeletonLoader/SkeletonLoader.d.ts +42 -41
- package/dist/{components → src/components}/SkipNavigation/SkipNavigation.d.ts +19 -19
- package/dist/{components → src/components}/Slider/Slider.d.ts +65 -65
- package/dist/{components → src/components}/StatusBadge/StatusBadge.d.ts +19 -18
- package/dist/{components → src/components}/StructuredContent/StructuredContent.d.ts +30 -30
- package/dist/src/components/StyleGuide/ColorCard.d.ts +342 -0
- package/dist/{components → src/components}/StyledList/StyledList.d.ts +25 -25
- package/dist/{components → src/components}/Table/Table.d.ts +32 -32
- package/dist/{components → src/components}/Tabs/Tabs.d.ts +28 -28
- package/dist/{components → src/components}/TagSet/TagSet.d.ts +24 -32
- package/dist/{components → src/components}/TagSet/TagSetExplore.d.ts +28 -27
- package/dist/{components → src/components}/TagSet/TagSetFilter.d.ts +25 -26
- package/dist/src/components/TagSet/TooltipWrapper.d.ts +9 -0
- package/dist/{components → src/components}/Template/Template.d.ts +140 -140
- package/dist/{components → src/components}/Text/Text.d.ts +25 -24
- package/dist/{components → src/components}/TextInput/TextInput.d.ts +89 -88
- package/dist/{components → src/components}/Toggle/Toggle.d.ts +43 -42
- package/dist/{components → src/components}/Tooltip/Tooltip.d.ts +17 -17
- package/dist/{components → src/components}/VideoPlayer/VideoPlayer.d.ts +42 -40
- package/dist/src/helpers/types.d.ts +2 -0
- package/dist/{hooks → src/hooks}/useCarouselStyles.d.ts +17 -17
- package/dist/{hooks → src/hooks}/useCloseDropDown.d.ts +7 -7
- package/dist/{hooks → src/hooks}/useFilterBar.d.ts +21 -21
- package/dist/{hooks → src/hooks}/useMultiSelect.d.ts +15 -15
- package/dist/{hooks → src/hooks}/useNYPLBreakpoints.d.ts +13 -13
- package/dist/{hooks → src/hooks}/useNYPLTheme.d.ts +67 -67
- package/dist/{hooks → src/hooks}/useStateWithDependencies.d.ts +5 -5
- package/dist/{hooks → src/hooks}/useWindowSize.d.ts +10 -10
- package/dist/src/index.d.ts +91 -0
- package/dist/{theme → src/theme}/components/accordion.d.ts +34 -34
- package/dist/{theme → src/theme}/components/alphabetFilter.d.ts +33 -33
- package/dist/{theme → src/theme}/components/audioPlayer.d.ts +16 -16
- package/dist/{theme → src/theme}/components/breadcrumb.d.ts +138 -151
- package/dist/{theme → src/theme}/components/button.d.ts +113 -113
- package/dist/{theme → src/theme}/components/buttonGroup.d.ts +11 -11
- package/dist/{theme → src/theme}/components/card.d.ts +421 -421
- package/dist/{theme → src/theme}/components/checkbox.d.ts +178 -178
- package/dist/{theme → src/theme}/components/checkboxGroup.d.ts +14 -14
- package/dist/{theme → src/theme}/components/componentWrapper.d.ts +12 -12
- package/dist/{theme → src/theme}/components/customTable.d.ts +733 -733
- package/dist/{theme → src/theme}/components/datePicker.d.ts +17 -17
- package/dist/{theme → src/theme}/components/feedbackBox.d.ts +92 -92
- package/dist/{theme → src/theme}/components/fieldset.d.ts +23 -23
- package/dist/{theme → src/theme}/components/filterBar.d.ts +46 -46
- package/dist/{theme → src/theme}/components/footer.d.ts +244 -244
- package/dist/{theme → src/theme}/components/global.d.ts +140 -140
- package/dist/{theme → src/theme}/components/globalMixins.d.ts +40 -40
- package/dist/{theme → src/theme}/components/header/header.d.ts +72 -72
- package/dist/{theme → src/theme}/components/header/headerLogin.d.ts +327 -327
- package/dist/{theme → src/theme}/components/header/headerLoginButton.d.ts +69 -69
- package/dist/{theme → src/theme}/components/header/headerLowerNav.d.ts +70 -70
- package/dist/{theme → src/theme}/components/header/headerMobileIconNav.d.ts +28 -28
- package/dist/{theme → src/theme}/components/header/headerMobileNav.d.ts +86 -86
- package/dist/{theme → src/theme}/components/header/headerMobileNavButton.d.ts +34 -34
- package/dist/{theme → src/theme}/components/header/headerSearchButton.d.ts +83 -83
- package/dist/{theme → src/theme}/components/header/headerSearchForm.d.ts +183 -183
- package/dist/{theme → src/theme}/components/header/headerSitewideAlerts.d.ts +42 -42
- package/dist/{theme → src/theme}/components/header/headerUpperNav.d.ts +72 -72
- package/dist/{theme → src/theme}/components/heading.d.ts +173 -173
- package/dist/{theme → src/theme}/components/helperErrorText.d.ts +15 -15
- package/dist/{theme → src/theme}/components/hero.d.ts +628 -628
- package/dist/{theme → src/theme}/components/horizontalRule.d.ts +18 -18
- package/dist/{theme → src/theme}/components/icon.d.ts +62251 -62251
- package/dist/{theme → src/theme}/components/image.d.ts +662 -662
- package/dist/{theme → src/theme}/components/label.d.ts +21 -21
- package/dist/{theme → src/theme}/components/link.d.ts +106 -106
- package/dist/{theme → src/theme}/components/list.d.ts +228 -228
- package/dist/{theme → src/theme}/components/logo.d.ts +477 -477
- package/dist/{theme → src/theme}/components/modal.d.ts +21 -21
- package/dist/{theme → src/theme}/components/multiSelect.d.ts +29 -29
- package/dist/{theme → src/theme}/components/multiSelectMenuButton.d.ts +95 -95
- package/dist/{theme → src/theme}/components/notification.d.ts +136 -136
- package/dist/{theme → src/theme}/components/pagination.d.ts +16 -16
- package/dist/{theme → src/theme}/components/progressIndicator.d.ts +68 -68
- package/dist/{theme → src/theme}/components/radio.d.ts +202 -202
- package/dist/{theme → src/theme}/components/radioGroup.d.ts +14 -14
- package/dist/{theme → src/theme}/components/searchBar.d.ts +34 -34
- package/dist/{theme → src/theme}/components/select.d.ts +125 -126
- package/dist/{theme → src/theme}/components/skeletonLoader.d.ts +105 -105
- package/dist/{theme → src/theme}/components/skipNavigation.d.ts +28 -28
- package/dist/{theme → src/theme}/components/slider.d.ts +78 -78
- package/dist/{theme → src/theme}/components/statusBadge.d.ts +37 -37
- package/dist/{theme → src/theme}/components/structuredContent.d.ts +385 -385
- package/dist/{theme → src/theme}/components/styledList.d.ts +51 -51
- package/dist/{theme → src/theme}/components/tabs.d.ts +172 -172
- package/dist/{theme → src/theme}/components/tagSet.d.ts +154 -154
- package/dist/{theme → src/theme}/components/template.d.ts +86 -86
- package/dist/{theme → src/theme}/components/text.d.ts +30 -30
- package/dist/{theme → src/theme}/components/textInput.d.ts +349 -355
- package/dist/{theme → src/theme}/components/toggle.d.ts +129 -129
- package/dist/{theme → src/theme}/components/tooltip.d.ts +19 -19
- package/dist/{theme → src/theme}/components/videoPlayer.d.ts +47 -47
- package/dist/{theme → src/theme}/foundations/breakpoints.d.ts +23 -23
- package/dist/{theme → src/theme}/foundations/colors.d.ts +3 -3
- package/dist/{theme → src/theme}/foundations/global.d.ts +68 -68
- package/dist/{theme → src/theme}/foundations/radii.d.ts +11 -11
- package/dist/{theme → src/theme}/foundations/shadows.d.ts +4 -4
- package/dist/{theme → src/theme}/foundations/spacing.d.ts +96 -96
- package/dist/{theme → src/theme}/foundations/typography.d.ts +8 -8
- package/dist/{theme → src/theme}/index.d.ts +20 -20
- package/dist/{theme → src/theme}/provider.d.ts +4 -4
- package/dist/src/theme/types.d.ts +1 -0
- package/dist/src/utils/colorUtils.d.ts +5 -0
- package/dist/{utils → src/utils}/interfaces.d.ts +5 -5
- package/dist/{utils → src/utils}/utils.d.ts +39 -39
- package/dist/styles.css +1 -4
- package/package.json +62 -69
- package/dist/__tests__/fileMock.d.ts +0 -4
- package/dist/__tests__/mediaMatchMock.d.ts +0 -79
- package/dist/__tests__/setup.d.ts +0 -2
- package/dist/__tests__/utils/utils.test.d.ts +0 -1
- package/dist/components/Autosuggest/Autosuggest.stories.d.ts +0 -4
- package/dist/components/FilterBar/FilterBar.stories.d.ts +0 -7
- package/dist/components/Header/utils/authApiMockResponse.d.ts +0 -49
- package/dist/components/Header/utils/encoreCatalogLogOutTimer.d.ts +0 -4
- package/dist/components/Header/utils/encoreCatalogLogOutTimer.test.d.ts +0 -1
- package/dist/components/Header/utils/googleAnalyticsUtils.test.d.ts +0 -1
- package/dist/components/Header/utils/headerUtils.test.d.ts +0 -1
- package/dist/components/Header/utils/sitewideAlertsMocks.d.ts +0 -98
- package/dist/components/Icons/IconColors.d.ts +0 -3
- package/dist/components/Icons/IconNames.d.ts +0 -3
- package/dist/components/Icons/IconSvgs.d.ts +0 -58
- package/dist/components/Logo/LogoSvgs.d.ts +0 -54
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +0 -4
- package/dist/components/MultiSelectGroup/MultiSelectGroup.stories.d.ts +0 -4
- package/dist/components/Placeholder/Placeholder.d.ts +0 -10
- package/dist/components/StyleGuide/ColorCard.d.ts +0 -46
- package/dist/design-system-react-components.cjs.development.js +0 -18076
- package/dist/design-system-react-components.cjs.development.js.map +0 -1
- package/dist/design-system-react-components.cjs.production.min.js +0 -2
- package/dist/design-system-react-components.cjs.production.min.js.map +0 -1
- package/dist/design-system-react-components.esm.js +0 -17874
- package/dist/design-system-react-components.esm.js.map +0 -1
- package/dist/helpers/types.d.ts +0 -1
- package/dist/hooks/__tests__/useCarouselStyles.test.d.ts +0 -1
- package/dist/hooks/__tests__/useFilterBar.test.d.ts +0 -1
- package/dist/hooks/__tests__/useMultiSelect.test.d.ts +0 -1
- package/dist/hooks/__tests__/useNYPLBreakpoints.test.d.ts +0 -1
- package/dist/index.d.ts +0 -66
- package/dist/index.js +0 -8
- package/dist/resources.scss +0 -382
- package/dist/theme/types.d.ts +0 -1
- package/dist/utils/componentCategories.d.ts +0 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
-
import { LayoutTypes } from "../../helpers/types";
|
|
4
|
-
export interface CheckboxGroupProps {
|
|
5
|
-
/** Any child node passed to the component. */
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
/** Populates the initial value of the input */
|
|
8
|
-
defaultValue?: string[];
|
|
9
|
-
/** Optional string to populate the HelperErrorText for standard state */
|
|
10
|
-
helperText?: HelperErrorTextType;
|
|
11
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
12
|
-
id: string;
|
|
13
|
-
/** Optional string to populate the HelperErrorText for error state */
|
|
14
|
-
invalidText?: HelperErrorTextType;
|
|
15
|
-
/** Adds the 'disabled' prop to the input when true. */
|
|
16
|
-
isDisabled?: boolean;
|
|
17
|
-
/** Set's the `Checkbox`s' wrapper to be full width. */
|
|
18
|
-
isFullWidth?: boolean;
|
|
19
|
-
/** A`dds the 'aria-invalid' attribute to the input and
|
|
20
|
-
* sets the error state when true. */
|
|
21
|
-
isInvalid?: boolean;
|
|
22
|
-
/** Adds the 'required' attribute to the input when true. */
|
|
23
|
-
isRequired?: boolean;
|
|
24
|
-
/** The checkbox group label displayed in a `legend` element if `showlabel` is
|
|
25
|
-
* true, or an "aria-label" if `showLabel` is false. */
|
|
26
|
-
labelText: string;
|
|
27
|
-
/** Renders the checkbox buttons in a row or column (default). */
|
|
28
|
-
layout?: LayoutTypes;
|
|
29
|
-
/** The `name` prop indicates the form group for all the `Checkbox` children. */
|
|
30
|
-
name: string;
|
|
31
|
-
/** The action to perform on the `<input>`'s onChange function */
|
|
32
|
-
onChange?: (value: string[]) => void;
|
|
33
|
-
/** Offers the ability to hide the helper/invalid text. */
|
|
34
|
-
showHelperInvalidText?: boolean;
|
|
35
|
-
/** Offers the ability to show the group's legend onscreen or hide it. Refer
|
|
36
|
-
* to the `labelText` property for more information. */
|
|
37
|
-
showLabel?: boolean;
|
|
38
|
-
/** Whether or not to display the "(Required)" text in the label text.
|
|
39
|
-
* True by default. */
|
|
40
|
-
showRequiredLabel?: boolean;
|
|
41
|
-
/** The values to programmatically update the selected `Checkbox`es. */
|
|
42
|
-
value?: string[];
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Wrapper component to wrap `Checkbox` components. Can be displayed in a
|
|
46
|
-
* column or in a row. The `CheckboxGroup` component renders all the necessary
|
|
47
|
-
* wrapping and associated text elements, but the checkbox input elements
|
|
48
|
-
* _need_ to be child `Checkbox` components from the NYPL Design System.
|
|
49
|
-
*/
|
|
50
|
-
export declare const CheckboxGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
51
|
-
export default CheckboxGroup;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
+
import { LayoutTypes } from "../../helpers/types";
|
|
4
|
+
export interface CheckboxGroupProps {
|
|
5
|
+
/** Any child node passed to the component. */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/** Populates the initial value of the input */
|
|
8
|
+
defaultValue?: string[];
|
|
9
|
+
/** Optional string to populate the HelperErrorText for standard state */
|
|
10
|
+
helperText?: HelperErrorTextType;
|
|
11
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Optional string to populate the HelperErrorText for error state */
|
|
14
|
+
invalidText?: HelperErrorTextType;
|
|
15
|
+
/** Adds the 'disabled' prop to the input when true. */
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
/** Set's the `Checkbox`s' wrapper to be full width. */
|
|
18
|
+
isFullWidth?: boolean;
|
|
19
|
+
/** A`dds the 'aria-invalid' attribute to the input and
|
|
20
|
+
* sets the error state when true. */
|
|
21
|
+
isInvalid?: boolean;
|
|
22
|
+
/** Adds the 'required' attribute to the input when true. */
|
|
23
|
+
isRequired?: boolean;
|
|
24
|
+
/** The checkbox group label displayed in a `legend` element if `showlabel` is
|
|
25
|
+
* true, or an "aria-label" if `showLabel` is false. */
|
|
26
|
+
labelText: string;
|
|
27
|
+
/** Renders the checkbox buttons in a row or column (default). */
|
|
28
|
+
layout?: LayoutTypes;
|
|
29
|
+
/** The `name` prop indicates the form group for all the `Checkbox` children. */
|
|
30
|
+
name: string;
|
|
31
|
+
/** The action to perform on the `<input>`'s onChange function */
|
|
32
|
+
onChange?: (value: string[]) => void;
|
|
33
|
+
/** Offers the ability to hide the helper/invalid text. */
|
|
34
|
+
showHelperInvalidText?: boolean;
|
|
35
|
+
/** Offers the ability to show the group's legend onscreen or hide it. Refer
|
|
36
|
+
* to the `labelText` property for more information. */
|
|
37
|
+
showLabel?: boolean;
|
|
38
|
+
/** Whether or not to display the "(Required)" text in the label text.
|
|
39
|
+
* True by default. */
|
|
40
|
+
showRequiredLabel?: boolean;
|
|
41
|
+
/** The values to programmatically update the selected `Checkbox`es. */
|
|
42
|
+
value?: string[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Wrapper component to wrap `Checkbox` components. Can be displayed in a
|
|
46
|
+
* column or in a row. The `CheckboxGroup` component renders all the necessary
|
|
47
|
+
* wrapping and associated text elements, but the checkbox input elements
|
|
48
|
+
* _need_ to be child `Checkbox` components from the NYPL Design System.
|
|
49
|
+
*/
|
|
50
|
+
export declare const CheckboxGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
51
|
+
export default CheckboxGroup;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
-
export interface ComponentWrapperProps {
|
|
4
|
-
/** The UI elements that will be wrapped by this component */
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
/** A class name for the `div` parent element. */
|
|
7
|
-
className?: string;
|
|
8
|
-
/** Optional string to set the text for the component's description */
|
|
9
|
-
descriptionText?: string | JSX.Element;
|
|
10
|
-
/** Optional string to set the text for a `Heading` component */
|
|
11
|
-
headingText?: string;
|
|
12
|
-
/** Optional string to set the text for a `HelperErrorText` component */
|
|
13
|
-
helperText?: HelperErrorTextType;
|
|
14
|
-
/** Styles that target the helper text. */
|
|
15
|
-
helperTextStyles?: {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
};
|
|
18
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
19
|
-
id?: string;
|
|
20
|
-
/** Optional string to populate the `HelperErrorText` for the error state
|
|
21
|
-
* when `isInvalid` is true. */
|
|
22
|
-
invalidText?: HelperErrorTextType;
|
|
23
|
-
/** Sets invalid text in the error state. */
|
|
24
|
-
isInvalid?: boolean;
|
|
25
|
-
/** Offers the ability to hide the helper/invalid text. */
|
|
26
|
-
showHelperInvalidText?: boolean;
|
|
27
|
-
}
|
|
28
|
-
export declare const ComponentWrapper: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ComponentWrapperProps & {
|
|
29
|
-
children?: React.ReactNode;
|
|
30
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
31
|
-
export default ComponentWrapper;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
+
export interface ComponentWrapperProps {
|
|
4
|
+
/** The UI elements that will be wrapped by this component */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** A class name for the `div` parent element. */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Optional string to set the text for the component's description */
|
|
9
|
+
descriptionText?: string | JSX.Element;
|
|
10
|
+
/** Optional string to set the text for a `Heading` component */
|
|
11
|
+
headingText?: string;
|
|
12
|
+
/** Optional string to set the text for a `HelperErrorText` component */
|
|
13
|
+
helperText?: HelperErrorTextType;
|
|
14
|
+
/** Styles that target the helper text. */
|
|
15
|
+
helperTextStyles?: {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
19
|
+
id?: string;
|
|
20
|
+
/** Optional string to populate the `HelperErrorText` for the error state
|
|
21
|
+
* when `isInvalid` is true. */
|
|
22
|
+
invalidText?: HelperErrorTextType;
|
|
23
|
+
/** Sets invalid text in the error state. */
|
|
24
|
+
isInvalid?: boolean;
|
|
25
|
+
/** Offers the ability to hide the helper/invalid text. */
|
|
26
|
+
showHelperInvalidText?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const ComponentWrapper: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ComponentWrapperProps & {
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
31
|
+
export default ComponentWrapper;
|
|
@@ -1,81 +1,82 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
-
import { TextInputRefType } from "../TextInput/TextInput";
|
|
4
|
-
export declare
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
className
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
isInvalid
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
export
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
+
import { TextInputRefType } from "../TextInput/TextInput";
|
|
4
|
+
export declare const datePickerTypesArray: readonly ["full", "month", "year"];
|
|
5
|
+
export type DatePickerTypes = typeof datePickerTypesArray[number];
|
|
6
|
+
export interface FullDateType {
|
|
7
|
+
/** Date object that gets returned for the onChange
|
|
8
|
+
* function only for date ranges. */
|
|
9
|
+
endDate?: Date;
|
|
10
|
+
/** Date object that gets returned for the onChange function. */
|
|
11
|
+
startDate: Date;
|
|
12
|
+
}
|
|
13
|
+
interface DateRangeRowProps {
|
|
14
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Whether to render a single date input or two for a range of two dates. */
|
|
17
|
+
isDateRange?: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface DatePickerWrapperProps extends DateRangeRowProps {
|
|
20
|
+
/** Additional className. */
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Adds the 'required' property to the input element(s). */
|
|
23
|
+
isRequired?: boolean;
|
|
24
|
+
/** Passed to the `TextInput` component to render a label associated with an input field. */
|
|
25
|
+
labelText: string;
|
|
26
|
+
/** Offers the ability to show the label onscreen or hide it. */
|
|
27
|
+
showLabel?: boolean;
|
|
28
|
+
/** Whether or not to display the "(Required)" text in the label text.
|
|
29
|
+
* True by default. */
|
|
30
|
+
showRequiredLabel?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface DatePickerProps extends DatePickerWrapperProps {
|
|
33
|
+
/** The date format to display. Defaults to "yyyy-MM-dd".
|
|
34
|
+
* Must be in ISO-8601 format. */
|
|
35
|
+
dateFormat?: string;
|
|
36
|
+
/** DatePicker date types that can be rendered. */
|
|
37
|
+
dateType?: DatePickerTypes;
|
|
38
|
+
/** Populates the `HelperErrorText` component in this component. */
|
|
39
|
+
helperText?: HelperErrorTextType;
|
|
40
|
+
/** Populates the `HelperErrorText` component in the "From" `TextInput` component. */
|
|
41
|
+
helperTextFrom?: string;
|
|
42
|
+
/** Populates the `HelperErrorText` component in the "To" `TextInput` component. */
|
|
43
|
+
helperTextTo?: string;
|
|
44
|
+
/** The initial date value. This must be in the mm/dd/yyyy format. */
|
|
45
|
+
initialDate?: string;
|
|
46
|
+
/** The initialTo date value used for date ranges.
|
|
47
|
+
* This must be in the mm/dd/yyyy format. */
|
|
48
|
+
initialDateTo?: string;
|
|
49
|
+
/** Populates the `HelperErrorText` error state for both "From"
|
|
50
|
+
* and "To" input components. */
|
|
51
|
+
invalidText?: HelperErrorTextType;
|
|
52
|
+
/** Adds the 'disabled' property to the input element(s). */
|
|
53
|
+
isDisabled?: boolean;
|
|
54
|
+
/** Adds 'isInvalid' styling. */
|
|
55
|
+
isInvalid?: boolean;
|
|
56
|
+
/** Adds the 'required' property to the input element(s). */
|
|
57
|
+
isRequired?: boolean;
|
|
58
|
+
/** The maximum date value that applies to both input fields.
|
|
59
|
+
* This must be in the mm/dd/yyyy format. */
|
|
60
|
+
maxDate?: string;
|
|
61
|
+
/** The minimum date value that applies to both input fields.
|
|
62
|
+
* This must be in the mm/dd/yyyy format. */
|
|
63
|
+
minDate?: string;
|
|
64
|
+
/** Value name for the single input field or the "From" input field in a date range. */
|
|
65
|
+
nameFrom?: string;
|
|
66
|
+
/** Value name for the "To" input field */
|
|
67
|
+
nameTo?: string;
|
|
68
|
+
/** The action to perform on the `input`'s onChange function for both fields.
|
|
69
|
+
* This will return the data in an object with `startDate` and `endDate` keys.
|
|
70
|
+
*/
|
|
71
|
+
onChange?: (data: FullDateType) => void;
|
|
72
|
+
/** An additional explicit React ref passed for a date range's "To"
|
|
73
|
+
* input field. Note that the "From" input takes the initial "ref" value. */
|
|
74
|
+
refTo?: React.Ref<TextInputRefType>;
|
|
75
|
+
/** Offers the ability to hide the helper/invalid text. */
|
|
76
|
+
showHelperInvalidText?: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Returns a single date input field or two date input fields for a date range.
|
|
80
|
+
*/
|
|
81
|
+
export declare const DatePicker: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<TextInputRefType>>, {}>;
|
|
82
|
+
export default DatePicker;
|
|
@@ -1,63 +1,64 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
*
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
export declare
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const feedbackBoxViewTypeArray: readonly ["form", "confirmation", "error"];
|
|
3
|
+
export type FeedbackBoxViewType = typeof feedbackBoxViewTypeArray[number];
|
|
4
|
+
interface FeedbackBoxProps {
|
|
5
|
+
/** Additional class name to add. */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Used to add additional information to the default confirmation message in
|
|
8
|
+
* the confirmation view. */
|
|
9
|
+
confirmationText?: string | JSX.Element;
|
|
10
|
+
/** Used to add description text above the form input fields in
|
|
11
|
+
* the initial/form view. */
|
|
12
|
+
descriptionText?: string | JSX.Element;
|
|
13
|
+
/** A data object containing key/value pairs that will be added to the form
|
|
14
|
+
* field submitted data. */
|
|
15
|
+
hiddenFields?: any;
|
|
16
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
17
|
+
id?: string;
|
|
18
|
+
/** Toggles the invalid state for the comment field. */
|
|
19
|
+
isInvalidComment?: boolean;
|
|
20
|
+
/** Toggles the invalid state for the email field. */
|
|
21
|
+
isInvalidEmail?: boolean;
|
|
22
|
+
/** Only used for internal purposes. */
|
|
23
|
+
isOpen?: boolean;
|
|
24
|
+
/** Used to add a notification above the description in the
|
|
25
|
+
* initial/form view.*/
|
|
26
|
+
notificationText?: string | JSX.Element;
|
|
27
|
+
/** Only used for internal purposes. */
|
|
28
|
+
onClose?: any;
|
|
29
|
+
/** Only used for internal purposes. */
|
|
30
|
+
onOpen?: any;
|
|
31
|
+
/** Callback function that will be invoked when the form is submitted.
|
|
32
|
+
* The returned data object contains key/value pairs including the
|
|
33
|
+
* values from the `hiddenFields` prop.
|
|
34
|
+
*/
|
|
35
|
+
onSubmit: (values: {
|
|
36
|
+
[key: string]: string;
|
|
37
|
+
}) => any;
|
|
38
|
+
/** Toggles the category radio group field. */
|
|
39
|
+
showCategoryField?: boolean;
|
|
40
|
+
/** Toggles the email input field. When set to `true`, an additional
|
|
41
|
+
* confirmation message will be rendered. */
|
|
42
|
+
showEmailField?: boolean;
|
|
43
|
+
/** Used to populate the label on the open button and the `Drawer`'s
|
|
44
|
+
* header title. */
|
|
45
|
+
title: string;
|
|
46
|
+
/** Used to specify what screen should be displayed. */
|
|
47
|
+
view?: FeedbackBoxViewType;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The `FeedbackBox` component renders a fixed-positioned button on the bottom
|
|
51
|
+
* right corner of a page that opens a Chakra `Drawer` popup component. Inside
|
|
52
|
+
* of the popup, a form is rendered with fields that allows users to provide
|
|
53
|
+
* feedback. The `FeedbackBox` component does *not* call any API with the
|
|
54
|
+
* submitted data; that feature is the responsibility of the consuming
|
|
55
|
+
* application.
|
|
56
|
+
*/
|
|
57
|
+
export declare const FeedbackBox: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<FeedbackBoxProps & React.RefAttributes<any>>, {}>;
|
|
58
|
+
export declare function useFeedbackBox(): {
|
|
59
|
+
isOpen: boolean;
|
|
60
|
+
onClose: () => void;
|
|
61
|
+
onOpen: () => void;
|
|
62
|
+
FeedbackBox: import("@chakra-ui/react").ChakraComponent<(props: any) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
|
|
63
|
+
};
|
|
64
|
+
export default FeedbackBox;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
interface FeedbackBoxState {
|
|
2
|
-
category?: string;
|
|
3
|
-
comment: string;
|
|
4
|
-
email?: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* DS internal helper reducer hook to manage internal state for the FeedbackBox
|
|
8
|
-
* component. Note: this custom hook is not tested directly as it's an
|
|
9
|
-
* implementation detail of the FeedbackBox component, following the guidance
|
|
10
|
-
* of RTL: https://testing-library.com/docs/example-react-hooks-useReducer
|
|
11
|
-
*/
|
|
12
|
-
declare function useFeedbackBoxReducer(): {
|
|
13
|
-
state: FeedbackBoxState;
|
|
14
|
-
setCategory: (category: string) => void;
|
|
15
|
-
setComment: (comment: string) => void;
|
|
16
|
-
setEmail: (email: string) => void;
|
|
17
|
-
clearValues: () => void;
|
|
18
|
-
};
|
|
19
|
-
export default useFeedbackBoxReducer;
|
|
1
|
+
interface FeedbackBoxState {
|
|
2
|
+
category?: string;
|
|
3
|
+
comment: string;
|
|
4
|
+
email?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* DS internal helper reducer hook to manage internal state for the FeedbackBox
|
|
8
|
+
* component. Note: this custom hook is not tested directly as it's an
|
|
9
|
+
* implementation detail of the FeedbackBox component, following the guidance
|
|
10
|
+
* of RTL: https://testing-library.com/docs/example-react-hooks-useReducer
|
|
11
|
+
*/
|
|
12
|
+
declare function useFeedbackBoxReducer(): {
|
|
13
|
+
state: FeedbackBoxState;
|
|
14
|
+
setCategory: (category: string) => void;
|
|
15
|
+
setComment: (comment: string) => void;
|
|
16
|
+
setEmail: (email: string) => void;
|
|
17
|
+
clearValues: () => void;
|
|
18
|
+
};
|
|
19
|
+
export default useFeedbackBoxReducer;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface FieldsetProps {
|
|
3
|
-
/** Additional class name to add. */
|
|
4
|
-
className?: string;
|
|
5
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
6
|
-
id: string;
|
|
7
|
-
/** Flag to show or hide the text in the `legend` element. False by default. */
|
|
8
|
-
isLegendHidden?: boolean;
|
|
9
|
-
/** Flag to render "Required" in the `legend`. True by default. */
|
|
10
|
-
isRequired?: boolean;
|
|
11
|
-
/** Text to display in the `legend` element. */
|
|
12
|
-
legendText?: string;
|
|
13
|
-
/** Whether or not to display the "(Required)" text in the `legend` text.
|
|
14
|
-
* True by default. */
|
|
15
|
-
showRequiredLabel?: boolean;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* A wrapper component that renders a `fieldset` element along with a `legend`
|
|
19
|
-
* element as its first child. Commonly used to wrap form components.
|
|
20
|
-
*/
|
|
21
|
-
export declare const Fieldset: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<FieldsetProps & {
|
|
22
|
-
children?: React.ReactNode;
|
|
23
|
-
} & React.RefAttributes<HTMLDivElement & HTMLFieldSetElement>>, {}>;
|
|
24
|
-
export default Fieldset;
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface FieldsetProps {
|
|
3
|
+
/** Additional class name to add. */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Flag to show or hide the text in the `legend` element. False by default. */
|
|
8
|
+
isLegendHidden?: boolean;
|
|
9
|
+
/** Flag to render "Required" in the `legend`. True by default. */
|
|
10
|
+
isRequired?: boolean;
|
|
11
|
+
/** Text to display in the `legend` element. */
|
|
12
|
+
legendText?: string;
|
|
13
|
+
/** Whether or not to display the "(Required)" text in the `legend` text.
|
|
14
|
+
* True by default. */
|
|
15
|
+
showRequiredLabel?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A wrapper component that renders a `fieldset` element along with a `legend`
|
|
19
|
+
* element as its first child. Commonly used to wrap form components.
|
|
20
|
+
*/
|
|
21
|
+
export declare const Fieldset: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<FieldsetProps & {
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
} & React.RefAttributes<HTMLDivElement & HTMLFieldSetElement>>, {}>;
|
|
24
|
+
export default Fieldset;
|