@nypl/design-system-react-components 1.5.1 → 1.6.0-vite-rc
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 +39 -39
- package/dist/design-system-react-components.cjs +279 -0
- package/dist/design-system-react-components.js +42759 -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 +18 -18
- package/dist/{components → src/components}/Button/Button.d.ts +30 -30
- package/dist/{components → src/components}/ButtonGroup/ButtonGroup.d.ts +24 -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 +81 -81
- package/dist/{components → src/components}/FeedbackBox/FeedbackBox.d.ts +63 -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 +19 -19
- package/dist/{components → src/components}/Header/Header.d.ts +22 -22
- package/dist/{components → src/components}/Header/components/HeaderLogin.d.ts +12 -12
- package/dist/{components → src/components}/Header/components/HeaderLoginButton.d.ts +11 -11
- package/dist/{components → src/components}/Header/components/HeaderLowerNav.d.ts +7 -7
- package/dist/{components → src/components}/Header/components/HeaderMobileIconNav.d.ts +7 -7
- package/dist/{components → src/components}/Header/components/HeaderMobileNav.d.ts +7 -7
- package/dist/{components → src/components}/Header/components/HeaderMobileNavButton.d.ts +7 -7
- package/dist/{components → src/components}/Header/components/HeaderSearchButton.d.ts +10 -10
- package/dist/{components → src/components}/Header/components/HeaderSearchForm.d.ts +11 -11
- package/dist/{components → src/components}/Header/components/HeaderSitewideAlerts.d.ts +8 -8
- package/dist/{components → src/components}/Header/components/HeaderUpperNav.d.ts +8 -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 +35 -35
- package/dist/{components → src/components}/HelperErrorText/HelperErrorText.d.ts +34 -34
- package/dist/{components → src/components}/Hero/Hero.d.ts +42 -42
- package/dist/{components → src/components}/HorizontalRule/HorizontalRule.d.ts +11 -11
- package/dist/{components → src/components}/Icons/Icon.d.ts +41 -41
- package/dist/{components → src/components}/Icons/IconColors.d.ts +3 -3
- package/dist/{components → src/components}/Icons/IconNames.d.ts +3 -3
- package/dist/{components → src/components}/Icons/IconSvgs.d.ts +56 -56
- package/dist/{components → src/components}/Image/Image.d.ts +65 -65
- package/dist/{components → src/components}/Label/Label.d.ts +25 -25
- package/dist/{components → src/components}/Link/Link.d.ts +21 -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/{components → src/components}/Logo/LogoSvgs.d.ts +54 -52
- package/dist/{components → src/components}/Modal/Modal.d.ts +35 -35
- package/dist/{components → src/components}/MultiSelect/MultiSelect.d.ts +60 -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 +26 -26
- package/dist/{components → src/components}/Notification/Notification.d.ts +51 -51
- package/dist/{components → src/components}/Pagination/Pagination.d.ts +27 -27
- package/dist/{components → src/components}/ProgressIndicator/ProgressIndicator.d.ts +30 -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 +57 -57
- package/dist/{components → src/components}/SkeletonLoader/SkeletonLoader.d.ts +41 -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 +18 -18
- package/dist/{components → src/components}/StructuredContent/StructuredContent.d.ts +30 -30
- package/dist/{components → src/components}/StyleGuide/ColorCard.d.ts +46 -46
- 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 +33 -32
- package/dist/{components → src/components}/TagSet/TagSetExplore.d.ts +27 -27
- package/dist/{components → src/components}/TagSet/TagSetFilter.d.ts +26 -26
- package/dist/{components → src/components}/Template/Template.d.ts +140 -140
- package/dist/{components → src/components}/Text/Text.d.ts +24 -24
- package/dist/{components → src/components}/TextInput/TextInput.d.ts +88 -88
- package/dist/{components → src/components}/Toggle/Toggle.d.ts +42 -42
- package/dist/{components → src/components}/Tooltip/Tooltip.d.ts +17 -17
- package/dist/{components → src/components}/VideoPlayer/VideoPlayer.d.ts +40 -40
- package/dist/src/helpers/types.d.ts +1 -0
- package/dist/{hooks → src/hooks}/useCarouselStyles.d.ts +17 -17
- package/dist/{hooks → src/hooks}/useCloseDropDown.d.ts +7 -6
- 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 +90 -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 +151 -138
- 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 -85
- 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 -241
- 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 -125
- 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 -349
- 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/{utils → src/utils}/interfaces.d.ts +5 -5
- package/dist/{utils → src/utils}/utils.d.ts +39 -39
- package/dist/style.css +1 -0
- package/package.json +52 -61
- package/CHANGELOG.md +0 -1861
- 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/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/design-system-react-components.cjs.development.js +0 -17917
- 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 -17716
- 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 -65
- package/dist/index.js +0 -8
- package/dist/resources.scss +0 -382
- package/dist/styles.css +0 -4
- package/dist/theme/types.d.ts +0 -1
- package/dist/utils/componentCategories.d.ts +0 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface BaseModalProps {
|
|
3
|
-
bodyContent?: string | JSX.Element;
|
|
4
|
-
closeButtonLabel?: string;
|
|
5
|
-
headingText?: string | JSX.Element;
|
|
6
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
7
|
-
id?: string;
|
|
8
|
-
isOpen?: boolean;
|
|
9
|
-
onClose?: () => void;
|
|
10
|
-
}
|
|
11
|
-
export interface ModalProps {
|
|
12
|
-
buttonText?: string;
|
|
13
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
14
|
-
id?: string;
|
|
15
|
-
modalProps: BaseModalProps;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The `ModalTrigger` component renders a button that you click to open the
|
|
19
|
-
* internal `Modal` component. Note that props to update the internal `Modal`
|
|
20
|
-
* component are passed through to the `modalProps` prop.
|
|
21
|
-
*/
|
|
22
|
-
export declare const ModalTrigger: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ModalProps & {
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
} & React.RefAttributes<HTMLButtonElement>>, {}>;
|
|
25
|
-
/**
|
|
26
|
-
* This hook function can be used to render the `Modal` component with a custom
|
|
27
|
-
* open button(s) and optional custom close button(s). You must render your own
|
|
28
|
-
* button and pass the appropriate `onOpen` and ` handler for the modal to open.
|
|
29
|
-
*/
|
|
30
|
-
export declare function useModal(): {
|
|
31
|
-
onClose: () => void;
|
|
32
|
-
onOpen: () => void;
|
|
33
|
-
Modal: import("@chakra-ui/react").ChakraComponent<({ bodyContent, closeButtonLabel, headingText, id, ...rest }: React.PropsWithChildren<BaseModalProps>) => JSX.Element, {}>;
|
|
34
|
-
};
|
|
35
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface BaseModalProps {
|
|
3
|
+
bodyContent?: string | JSX.Element;
|
|
4
|
+
closeButtonLabel?: string;
|
|
5
|
+
headingText?: string | JSX.Element;
|
|
6
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
7
|
+
id?: string;
|
|
8
|
+
isOpen?: boolean;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface ModalProps {
|
|
12
|
+
buttonText?: string;
|
|
13
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
14
|
+
id?: string;
|
|
15
|
+
modalProps: BaseModalProps;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The `ModalTrigger` component renders a button that you click to open the
|
|
19
|
+
* internal `Modal` component. Note that props to update the internal `Modal`
|
|
20
|
+
* component are passed through to the `modalProps` prop.
|
|
21
|
+
*/
|
|
22
|
+
export declare const ModalTrigger: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ModalProps & {
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
} & React.RefAttributes<HTMLButtonElement>>, {}>;
|
|
25
|
+
/**
|
|
26
|
+
* This hook function can be used to render the `Modal` component with a custom
|
|
27
|
+
* open button(s) and optional custom close button(s). You must render your own
|
|
28
|
+
* button and pass the appropriate `onOpen` and ` handler for the modal to open.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useModal(): {
|
|
31
|
+
onClose: () => void;
|
|
32
|
+
onOpen: () => void;
|
|
33
|
+
Modal: import("@chakra-ui/react").ChakraComponent<({ bodyContent, closeButtonLabel, headingText, id, ...rest }: React.PropsWithChildren<BaseModalProps>) => JSX.Element, {}>;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -1,78 +1,60 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface MultiSelectItem {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
children?: MultiSelectItem[];
|
|
6
|
-
}
|
|
7
|
-
export
|
|
8
|
-
export interface SelectedItems {
|
|
9
|
-
[name: string]: {
|
|
10
|
-
items: string[];
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
interface MultiSelectCommonProps {
|
|
14
|
-
/** The id of the MultiSelect. */
|
|
15
|
-
id: string;
|
|
16
|
-
/** Set the default open or closed state of the Multiselect. */
|
|
17
|
-
isDefaultOpen?: boolean;
|
|
18
|
-
/** Boolean value used to control how the MultiSelect component will render within the page and interact with other DOM elements.
|
|
19
|
-
* The default value is false. */
|
|
20
|
-
isBlockElement?: boolean;
|
|
21
|
-
/** The items to be rendered in the Multiselect as checkbox options. */
|
|
22
|
-
items: MultiSelectItem[];
|
|
23
|
-
/** The label text rendered within the MultiSelect. */
|
|
24
|
-
labelText: string;
|
|
25
|
-
/** The action to perform for clear/reset button of MultiSelect. */
|
|
26
|
-
onClear?: () => void;
|
|
27
|
-
/** The type of MultiSelect that will be rendered. */
|
|
28
|
-
type: "listbox" | "dialog";
|
|
29
|
-
/** The selected items state (items that were checked by user). */
|
|
30
|
-
selectedItems: SelectedItems;
|
|
31
|
-
/** Value used to set the width for the MultiSelect component. */
|
|
32
|
-
width?: MultiSelectWidths;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
type: "listbox";
|
|
38
|
-
onApply?: never;
|
|
39
|
-
/** The action to perform for downshift's onSelectedItemChange function. */
|
|
40
|
-
onChange: ListboxOnChange;
|
|
41
|
-
onMixedStateChange?: never;
|
|
42
|
-
} | {
|
|
43
|
-
type: "dialog";
|
|
44
|
-
/** The action to perform for save/apply button of multiselect. */
|
|
45
|
-
onApply: () => void;
|
|
46
|
-
/** The action to perform on the checkbox's onChange function. */
|
|
47
|
-
onChange: DialogOnChange;
|
|
48
|
-
/** The action to perform for a mixed state checkbox (parent checkbox). */
|
|
49
|
-
onMixedStateChange?: DialogOnChange;
|
|
50
|
-
};
|
|
51
|
-
export
|
|
52
|
-
/**
|
|
53
|
-
* The `MultiSelect` component is a form input element that presents a list
|
|
54
|
-
* of `Checkbox` components from which a user can make one or multiple
|
|
55
|
-
* selections. Two variants of the MultiSelect component are offered, each with
|
|
56
|
-
* slightly different functionality and requirements. Because of these
|
|
57
|
-
* differences, the two variants are broken out in separate stories below.
|
|
58
|
-
*/
|
|
59
|
-
export declare const MultiSelect: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<
|
|
60
|
-
|
|
61
|
-
onApply?: never;
|
|
62
|
-
/** The action to perform for downshift's onSelectedItemChange function. */
|
|
63
|
-
onChange: ListboxOnChange;
|
|
64
|
-
onMixedStateChange?: never;
|
|
65
|
-
} & {
|
|
66
|
-
children?: React.ReactNode;
|
|
67
|
-
} & React.RefAttributes<HTMLDivElement>) | (MultiSelectCommonProps & {
|
|
68
|
-
type: "dialog";
|
|
69
|
-
/** The action to perform for save/apply button of multiselect. */
|
|
70
|
-
onApply: () => void;
|
|
71
|
-
/** The action to perform on the checkbox's onChange function. */
|
|
72
|
-
onChange: DialogOnChange;
|
|
73
|
-
/** The action to perform for a mixed state checkbox (parent checkbox). */
|
|
74
|
-
onMixedStateChange?: DialogOnChange;
|
|
75
|
-
} & {
|
|
76
|
-
children?: React.ReactNode;
|
|
77
|
-
} & React.RefAttributes<HTMLDivElement>)>, {}>;
|
|
78
|
-
export default MultiSelect;
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface MultiSelectItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
children?: MultiSelectItem[];
|
|
6
|
+
}
|
|
7
|
+
export type MultiSelectWidths = "default" | "fitContent" | "full";
|
|
8
|
+
export interface SelectedItems {
|
|
9
|
+
[name: string]: {
|
|
10
|
+
items: string[];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface MultiSelectCommonProps {
|
|
14
|
+
/** The id of the MultiSelect. */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Set the default open or closed state of the Multiselect. */
|
|
17
|
+
isDefaultOpen?: boolean;
|
|
18
|
+
/** Boolean value used to control how the MultiSelect component will render within the page and interact with other DOM elements.
|
|
19
|
+
* The default value is false. */
|
|
20
|
+
isBlockElement?: boolean;
|
|
21
|
+
/** The items to be rendered in the Multiselect as checkbox options. */
|
|
22
|
+
items: MultiSelectItem[];
|
|
23
|
+
/** The label text rendered within the MultiSelect. */
|
|
24
|
+
labelText: string;
|
|
25
|
+
/** The action to perform for clear/reset button of MultiSelect. */
|
|
26
|
+
onClear?: () => void;
|
|
27
|
+
/** The type of MultiSelect that will be rendered. */
|
|
28
|
+
type: "listbox" | "dialog";
|
|
29
|
+
/** The selected items state (items that were checked by user). */
|
|
30
|
+
selectedItems: SelectedItems;
|
|
31
|
+
/** Value used to set the width for the MultiSelect component. */
|
|
32
|
+
width?: MultiSelectWidths;
|
|
33
|
+
}
|
|
34
|
+
type ListboxOnChange = (selectedItem: MultiSelectItem, id: string) => void;
|
|
35
|
+
type DialogOnChange = (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
36
|
+
type MultiSelectVariantsProps = {
|
|
37
|
+
type: "listbox";
|
|
38
|
+
onApply?: never;
|
|
39
|
+
/** The action to perform for downshift's onSelectedItemChange function. */
|
|
40
|
+
onChange: ListboxOnChange;
|
|
41
|
+
onMixedStateChange?: never;
|
|
42
|
+
} | {
|
|
43
|
+
type: "dialog";
|
|
44
|
+
/** The action to perform for save/apply button of multiselect. */
|
|
45
|
+
onApply: () => void;
|
|
46
|
+
/** The action to perform on the checkbox's onChange function. */
|
|
47
|
+
onChange: DialogOnChange;
|
|
48
|
+
/** The action to perform for a mixed state checkbox (parent checkbox). */
|
|
49
|
+
onMixedStateChange?: DialogOnChange;
|
|
50
|
+
};
|
|
51
|
+
export type MultiSelectProps = MultiSelectCommonProps & MultiSelectVariantsProps;
|
|
52
|
+
/**
|
|
53
|
+
* The `MultiSelect` component is a form input element that presents a list
|
|
54
|
+
* of `Checkbox` components from which a user can make one or multiple
|
|
55
|
+
* selections. Two variants of the MultiSelect component are offered, each with
|
|
56
|
+
* slightly different functionality and requirements. Because of these
|
|
57
|
+
* differences, the two variants are broken out in separate stories below.
|
|
58
|
+
*/
|
|
59
|
+
export declare const MultiSelect: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<MultiSelectProps> & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
60
|
+
export default MultiSelect;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { MultiSelectProps } from "./MultiSelect";
|
|
3
|
-
export declare const MultiSelectDialog: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<
|
|
4
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
-
} & {
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
8
|
-
export default MultiSelectDialog;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MultiSelectProps } from "./MultiSelect";
|
|
3
|
+
export declare const MultiSelectDialog: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<Omit<MultiSelectProps, "onChange"> & {
|
|
4
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
} & {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
8
|
+
export default MultiSelectDialog;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { MultiSelectItem, MultiSelectProps } from "./MultiSelect";
|
|
3
|
-
/** MultiSelectListbox renders a non-hierarchical list of checkbox options for the `type="listbox". It leverager downshift-js for accessiblity. */
|
|
4
|
-
export declare const MultiSelectListbox: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<
|
|
5
|
-
onChange: (selectedItem: MultiSelectItem, id: string) => void;
|
|
6
|
-
} & {
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
} & React.RefAttributes<HTMLElement>>, {}>;
|
|
9
|
-
export default MultiSelectListbox;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MultiSelectItem, MultiSelectProps } from "./MultiSelect";
|
|
3
|
+
/** MultiSelectListbox renders a non-hierarchical list of checkbox options for the `type="listbox". It leverager downshift-js for accessiblity. */
|
|
4
|
+
export declare const MultiSelectListbox: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<Omit<MultiSelectProps, "onChange"> & {
|
|
5
|
+
onChange: (selectedItem: MultiSelectItem, id: string) => void;
|
|
6
|
+
} & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & React.RefAttributes<HTMLElement>>, {}>;
|
|
9
|
+
export default MultiSelectListbox;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { SelectedItems } from "./MultiSelect";
|
|
3
|
-
export interface MultiSelectMenuButtonProps {
|
|
4
|
-
id: string;
|
|
5
|
-
/** The id of the MultiSelect using this button. */
|
|
6
|
-
multiSelectId: string;
|
|
7
|
-
/** The label text rendered within the MultiSelect using this button. */
|
|
8
|
-
multiSelectLabelText: string;
|
|
9
|
-
/** The open status of the MultiSelect menu. */
|
|
10
|
-
isOpen: boolean;
|
|
11
|
-
/** The selected items state (items that were checked by user). */
|
|
12
|
-
selectedItems: SelectedItems;
|
|
13
|
-
/** The callback function for the menu toggle. */
|
|
14
|
-
onMenuToggle?: () => void;
|
|
15
|
-
/** The action to perform for clear/reset button of MultiSelect. */
|
|
16
|
-
onClear?: () => void;
|
|
17
|
-
onKeyDown?: () => void;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The toggle button component used to open and close the `MultiSelect` menu.
|
|
21
|
-
* A second button is rendered above the main button that displays the current
|
|
22
|
-
* number of selected items. Clicking on the second button will clear all
|
|
23
|
-
* the selected items and the main button's close event will not be fired
|
|
24
|
-
* (as expected).
|
|
25
|
-
*/
|
|
26
|
-
declare const MultiSelectMenuButton: React.ForwardRefExoticComponent<MultiSelectMenuButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
27
|
-
export default MultiSelectMenuButton;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SelectedItems } from "./MultiSelect";
|
|
3
|
+
export interface MultiSelectMenuButtonProps {
|
|
4
|
+
id: string;
|
|
5
|
+
/** The id of the MultiSelect using this button. */
|
|
6
|
+
multiSelectId: string;
|
|
7
|
+
/** The label text rendered within the MultiSelect using this button. */
|
|
8
|
+
multiSelectLabelText: string;
|
|
9
|
+
/** The open status of the MultiSelect menu. */
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
/** The selected items state (items that were checked by user). */
|
|
12
|
+
selectedItems: SelectedItems;
|
|
13
|
+
/** The callback function for the menu toggle. */
|
|
14
|
+
onMenuToggle?: () => void;
|
|
15
|
+
/** The action to perform for clear/reset button of MultiSelect. */
|
|
16
|
+
onClear?: () => void;
|
|
17
|
+
onKeyDown?: () => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The toggle button component used to open and close the `MultiSelect` menu.
|
|
21
|
+
* A second button is rendered above the main button that displays the current
|
|
22
|
+
* number of selected items. Clicking on the second button will clear all
|
|
23
|
+
* the selected items and the main button's close event will not be fired
|
|
24
|
+
* (as expected).
|
|
25
|
+
*/
|
|
26
|
+
declare const MultiSelectMenuButton: React.ForwardRefExoticComponent<MultiSelectMenuButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
export default MultiSelectMenuButton;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { LayoutTypes } from "../../helpers/types";
|
|
3
|
-
import { MultiSelectWidths } from "../MultiSelect/MultiSelect";
|
|
4
|
-
export interface MultiSelectGroupProps {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
/** Additional className to use. */
|
|
7
|
-
className?: string;
|
|
8
|
-
id: string;
|
|
9
|
-
labelText: string;
|
|
10
|
-
/** Renders the layout of `MultiSelect` components in a row or column. */
|
|
11
|
-
layout?: LayoutTypes;
|
|
12
|
-
/** Width will be passed on each `MultiSelect` component. */
|
|
13
|
-
multiSelectWidth?: MultiSelectWidths;
|
|
14
|
-
/** Is set to `true` by default and determines if the `labelText` is visible on the site. */
|
|
15
|
-
showLabel?: boolean;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* `MultiSelectGroup` is a wrapper component specific for `MultiSelect` components. The wrapped `MutliSelect` components can be displayed in a
|
|
19
|
-
* column or in a row. The `MultiSelectGroup` component renders all the necessary
|
|
20
|
-
* wrapping and associated text elements, but the child elements
|
|
21
|
-
* _need_ to be `MultiSelect` components from the NYPL Design System.
|
|
22
|
-
*/
|
|
23
|
-
export declare const MultiSelectGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<MultiSelectGroupProps & {
|
|
24
|
-
children?: React.ReactNode;
|
|
25
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
26
|
-
export default MultiSelectGroup;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { LayoutTypes } from "../../helpers/types";
|
|
3
|
+
import { MultiSelectWidths } from "../MultiSelect/MultiSelect";
|
|
4
|
+
export interface MultiSelectGroupProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** Additional className to use. */
|
|
7
|
+
className?: string;
|
|
8
|
+
id: string;
|
|
9
|
+
labelText: string;
|
|
10
|
+
/** Renders the layout of `MultiSelect` components in a row or column. */
|
|
11
|
+
layout?: LayoutTypes;
|
|
12
|
+
/** Width will be passed on each `MultiSelect` component. */
|
|
13
|
+
multiSelectWidth?: MultiSelectWidths;
|
|
14
|
+
/** Is set to `true` by default and determines if the `labelText` is visible on the site. */
|
|
15
|
+
showLabel?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* `MultiSelectGroup` is a wrapper component specific for `MultiSelect` components. The wrapped `MutliSelect` components can be displayed in a
|
|
19
|
+
* column or in a row. The `MultiSelectGroup` component renders all the necessary
|
|
20
|
+
* wrapping and associated text elements, but the child elements
|
|
21
|
+
* _need_ to be `MultiSelect` components from the NYPL Design System.
|
|
22
|
+
*/
|
|
23
|
+
export declare const MultiSelectGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<MultiSelectGroupProps & {
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
26
|
+
export default MultiSelectGroup;
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export
|
|
3
|
-
interface BaseProps {
|
|
4
|
-
/** Optional prop to control text alignment in `NotificationContent` */
|
|
5
|
-
alignText?: boolean;
|
|
6
|
-
/** Optional custom `Icon` that will override the default `Icon`. */
|
|
7
|
-
icon?: JSX.Element;
|
|
8
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
9
|
-
id?: string;
|
|
10
|
-
/** Optional prop to control horizontal alignment of the `Notification` content */
|
|
11
|
-
isCentered?: boolean;
|
|
12
|
-
/** Content to be rendered in a `NotificationHeading` component. */
|
|
13
|
-
notificationHeading?: string;
|
|
14
|
-
/** Optional prop to control the coloring of the `Notification` text and the
|
|
15
|
-
* visibility of an applicable icon. */
|
|
16
|
-
notificationType?: NotificationTypes;
|
|
17
|
-
/** Prop to display the `Notification` icon. Defaults to `true`. */
|
|
18
|
-
showIcon?: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export interface NotificationProps extends BasePropsWithoutAlignText {
|
|
24
|
-
/** Label used to describe the `Notification`'s aside HTML element. */
|
|
25
|
-
ariaLabel?: string;
|
|
26
|
-
/** Additional `className` to add. */
|
|
27
|
-
className?: string;
|
|
28
|
-
/** Optional prop to control whether a `Notification` can be dismissed
|
|
29
|
-
* (closed) by a user. */
|
|
30
|
-
dismissible?: boolean;
|
|
31
|
-
/** Optional custom `Icon` that will override the default `Icon`. */
|
|
32
|
-
icon?: JSX.Element;
|
|
33
|
-
/** Optional prop to control the margin around the `Notification` component. */
|
|
34
|
-
noMargin?: boolean;
|
|
35
|
-
/** Content to be rendered in a `NotificationContent` component. */
|
|
36
|
-
notificationContent: string | JSX.Element;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* NotificationHeading child-component.
|
|
40
|
-
*/
|
|
41
|
-
export declare const NotificationHeading: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<NotificationHeadingProps>) => JSX.Element, {}>;
|
|
42
|
-
/**
|
|
43
|
-
* NotificationContent child-component.
|
|
44
|
-
*/
|
|
45
|
-
export declare const NotificationContent: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<NotificationContentProps>) => JSX.Element, {}>;
|
|
46
|
-
/**
|
|
47
|
-
* Component used to present users with three different levels of notifications:
|
|
48
|
-
* standard, announcement, and warning.
|
|
49
|
-
*/
|
|
50
|
-
export declare const Notification: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<NotificationProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
51
|
-
export default Notification;
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type NotificationTypes = "standard" | "announcement" | "warning";
|
|
3
|
+
interface BaseProps {
|
|
4
|
+
/** Optional prop to control text alignment in `NotificationContent` */
|
|
5
|
+
alignText?: boolean;
|
|
6
|
+
/** Optional custom `Icon` that will override the default `Icon`. */
|
|
7
|
+
icon?: JSX.Element;
|
|
8
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
9
|
+
id?: string;
|
|
10
|
+
/** Optional prop to control horizontal alignment of the `Notification` content */
|
|
11
|
+
isCentered?: boolean;
|
|
12
|
+
/** Content to be rendered in a `NotificationHeading` component. */
|
|
13
|
+
notificationHeading?: string;
|
|
14
|
+
/** Optional prop to control the coloring of the `Notification` text and the
|
|
15
|
+
* visibility of an applicable icon. */
|
|
16
|
+
notificationType?: NotificationTypes;
|
|
17
|
+
/** Prop to display the `Notification` icon. Defaults to `true`. */
|
|
18
|
+
showIcon?: boolean;
|
|
19
|
+
}
|
|
20
|
+
type NotificationHeadingProps = Omit<BasePropsWithoutAlignText, "notificationHeading" | "showIcon">;
|
|
21
|
+
type NotificationContentProps = Omit<BaseProps, "icon">;
|
|
22
|
+
type BasePropsWithoutAlignText = Omit<BaseProps, "alignText">;
|
|
23
|
+
export interface NotificationProps extends BasePropsWithoutAlignText {
|
|
24
|
+
/** Label used to describe the `Notification`'s aside HTML element. */
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
/** Additional `className` to add. */
|
|
27
|
+
className?: string;
|
|
28
|
+
/** Optional prop to control whether a `Notification` can be dismissed
|
|
29
|
+
* (closed) by a user. */
|
|
30
|
+
dismissible?: boolean;
|
|
31
|
+
/** Optional custom `Icon` that will override the default `Icon`. */
|
|
32
|
+
icon?: JSX.Element;
|
|
33
|
+
/** Optional prop to control the margin around the `Notification` component. */
|
|
34
|
+
noMargin?: boolean;
|
|
35
|
+
/** Content to be rendered in a `NotificationContent` component. */
|
|
36
|
+
notificationContent: string | JSX.Element;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* NotificationHeading child-component.
|
|
40
|
+
*/
|
|
41
|
+
export declare const NotificationHeading: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<NotificationHeadingProps>) => JSX.Element, {}>;
|
|
42
|
+
/**
|
|
43
|
+
* NotificationContent child-component.
|
|
44
|
+
*/
|
|
45
|
+
export declare const NotificationContent: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<NotificationContentProps>) => JSX.Element, {}>;
|
|
46
|
+
/**
|
|
47
|
+
* Component used to present users with three different levels of notifications:
|
|
48
|
+
* standard, announcement, and warning.
|
|
49
|
+
*/
|
|
50
|
+
export declare const Notification: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<NotificationProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
51
|
+
export default Notification;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface PaginationProps {
|
|
3
|
-
/** Additional className. */
|
|
4
|
-
className?: string;
|
|
5
|
-
/** The currentPage can be used to programatically force the selected page to change
|
|
6
|
-
* without the user explicitly requesting it – for example, if the user should be
|
|
7
|
-
* brought back to the first page of a set of results after a new search. */
|
|
8
|
-
currentPage?: number;
|
|
9
|
-
/** The callback function that takes a page number and returns a string
|
|
10
|
-
* to use for a link's `href` attribute. This is used when the current
|
|
11
|
-
* page should refresh when navigating. */
|
|
12
|
-
getPageHref?: undefined | ((pageNumber: number) => string);
|
|
13
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
14
|
-
id?: string;
|
|
15
|
-
/** The initially selected page (default value is 1). */
|
|
16
|
-
initialPage?: number;
|
|
17
|
-
/** The callback function called when an item is selected and the current
|
|
18
|
-
* page should not refresh. */
|
|
19
|
-
onPageChange?: (selected: number) => void;
|
|
20
|
-
/** The total number of pages. */
|
|
21
|
-
pageCount: number;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* A component that provides a navigational list of page items.
|
|
25
|
-
*/
|
|
26
|
-
export declare const Pagination: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
27
|
-
export default Pagination;
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface PaginationProps {
|
|
3
|
+
/** Additional className. */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** The currentPage can be used to programatically force the selected page to change
|
|
6
|
+
* without the user explicitly requesting it – for example, if the user should be
|
|
7
|
+
* brought back to the first page of a set of results after a new search. */
|
|
8
|
+
currentPage?: number;
|
|
9
|
+
/** The callback function that takes a page number and returns a string
|
|
10
|
+
* to use for a link's `href` attribute. This is used when the current
|
|
11
|
+
* page should refresh when navigating. */
|
|
12
|
+
getPageHref?: undefined | ((pageNumber: number) => string);
|
|
13
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
14
|
+
id?: string;
|
|
15
|
+
/** The initially selected page (default value is 1). */
|
|
16
|
+
initialPage?: number;
|
|
17
|
+
/** The callback function called when an item is selected and the current
|
|
18
|
+
* page should not refresh. */
|
|
19
|
+
onPageChange?: (selected: number) => void;
|
|
20
|
+
/** The total number of pages. */
|
|
21
|
+
pageCount: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A component that provides a navigational list of page items.
|
|
25
|
+
*/
|
|
26
|
+
export declare const Pagination: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
27
|
+
export default Pagination;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export interface ProgressIndicatorProps {
|
|
5
|
-
/** The darkMode prop is deprecated and should no longer be used. */
|
|
6
|
-
darkMode?: boolean;
|
|
7
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
8
|
-
id: string;
|
|
9
|
-
/** Whether the `ProgressIndicator` should be linear or circular. */
|
|
10
|
-
indicatorType?: ProgressIndicatorTypes;
|
|
11
|
-
/** Whether the progress animation should display because the `value` prop is
|
|
12
|
-
* not known. When this is set to `true`, the `value` prop will be ignored. */
|
|
13
|
-
isIndeterminate?: boolean;
|
|
14
|
-
/** The text to display in an HTML `label` element. */
|
|
15
|
-
labelText: string;
|
|
16
|
-
/** Visually show or hide the label text. When set to `false`, then the label
|
|
17
|
-
* text will be added to the parent component as its `aria-label` attribute. */
|
|
18
|
-
showLabel?: boolean;
|
|
19
|
-
/** The size of the linear or circular progress. */
|
|
20
|
-
size?: ProgressIndicatorSizes;
|
|
21
|
-
/** A number between 0 to 100 that defines the progress' value. */
|
|
22
|
-
value?: number;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* A component that displays a progress status for any task that takes a long
|
|
26
|
-
* time to complete or consists of multiple steps. Examples include downloading,
|
|
27
|
-
* uploading, or processing.
|
|
28
|
-
*/
|
|
29
|
-
export declare const ProgressIndicator: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ProgressIndicatorProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
30
|
-
export default ProgressIndicator;
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ProgressIndicatorSizes = "default" | "small";
|
|
3
|
+
export type ProgressIndicatorTypes = "circular" | "linear";
|
|
4
|
+
export interface ProgressIndicatorProps {
|
|
5
|
+
/** The darkMode prop is deprecated and should no longer be used. */
|
|
6
|
+
darkMode?: boolean;
|
|
7
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
8
|
+
id: string;
|
|
9
|
+
/** Whether the `ProgressIndicator` should be linear or circular. */
|
|
10
|
+
indicatorType?: ProgressIndicatorTypes;
|
|
11
|
+
/** Whether the progress animation should display because the `value` prop is
|
|
12
|
+
* not known. When this is set to `true`, the `value` prop will be ignored. */
|
|
13
|
+
isIndeterminate?: boolean;
|
|
14
|
+
/** The text to display in an HTML `label` element. */
|
|
15
|
+
labelText: string;
|
|
16
|
+
/** Visually show or hide the label text. When set to `false`, then the label
|
|
17
|
+
* text will be added to the parent component as its `aria-label` attribute. */
|
|
18
|
+
showLabel?: boolean;
|
|
19
|
+
/** The size of the linear or circular progress. */
|
|
20
|
+
size?: ProgressIndicatorSizes;
|
|
21
|
+
/** A number between 0 to 100 that defines the progress' value. */
|
|
22
|
+
value?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A component that displays a progress status for any task that takes a long
|
|
26
|
+
* time to complete or consists of multiple steps. Examples include downloading,
|
|
27
|
+
* uploading, or processing.
|
|
28
|
+
*/
|
|
29
|
+
export declare const ProgressIndicator: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ProgressIndicatorProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
30
|
+
export default ProgressIndicator;
|