@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,43 +1,43 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
-
export interface RadioProps {
|
|
4
|
-
/** Additional class name. */
|
|
5
|
-
className?: string;
|
|
6
|
-
/** Optional string to populate the HelperErrorText for the standard state. */
|
|
7
|
-
helperText?: HelperErrorTextType;
|
|
8
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
9
|
-
id: string;
|
|
10
|
-
/** Optional string to populate the HelperErrorText for the error state
|
|
11
|
-
* when `isInvalid` is true.
|
|
12
|
-
*/
|
|
13
|
-
invalidText?: HelperErrorTextType;
|
|
14
|
-
/** When using the Radio as a "controlled" form element, you can specify the
|
|
15
|
-
* `Radio`'s checked state using this prop. You must also pass an onChange prop.
|
|
16
|
-
* Learn more about controlled and uncontrolled form fields: https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */
|
|
17
|
-
isChecked?: boolean;
|
|
18
|
-
/** Adds the 'disabled' and `aria-disabled` attributes to the input when true.
|
|
19
|
-
* This also makes the text italic and color scheme gray. */
|
|
20
|
-
isDisabled?: boolean;
|
|
21
|
-
/** Adds the 'aria-invalid' attribute to the input when true. This also makes
|
|
22
|
-
* the color theme "NYPL error" red for the button and text. */
|
|
23
|
-
isInvalid?: boolean;
|
|
24
|
-
/** Adds the 'required' attribute to the input when true. */
|
|
25
|
-
isRequired?: boolean;
|
|
26
|
-
/** The radio button's label. This will serve as the text content for the
|
|
27
|
-
* `<label>` element if `showlabel` is true, or an "aria-label" if `showLabel`
|
|
28
|
-
* is false. */
|
|
29
|
-
labelText: string | JSX.Element;
|
|
30
|
-
/** Used to reference the input element in forms. */
|
|
31
|
-
name?: string;
|
|
32
|
-
/** Should be passed along with `isChecked` for controlled components. */
|
|
33
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
34
|
-
/** Offers the ability to hide the helper/invalid text. */
|
|
35
|
-
showHelperInvalidText?: boolean;
|
|
36
|
-
/** Offers the ability to show the radio's label onscreen or hide it. Refer
|
|
37
|
-
* to the `labelText` property for more information. */
|
|
38
|
-
showLabel?: boolean;
|
|
39
|
-
/** Populates the value of the input. */
|
|
40
|
-
value?: string;
|
|
41
|
-
}
|
|
42
|
-
export declare const Radio: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>, {}>;
|
|
43
|
-
export default Radio;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
+
export interface RadioProps {
|
|
4
|
+
/** Additional class name. */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Optional string to populate the HelperErrorText for the standard state. */
|
|
7
|
+
helperText?: HelperErrorTextType;
|
|
8
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Optional string to populate the HelperErrorText for the error state
|
|
11
|
+
* when `isInvalid` is true.
|
|
12
|
+
*/
|
|
13
|
+
invalidText?: HelperErrorTextType;
|
|
14
|
+
/** When using the Radio as a "controlled" form element, you can specify the
|
|
15
|
+
* `Radio`'s checked state using this prop. You must also pass an onChange prop.
|
|
16
|
+
* Learn more about controlled and uncontrolled form fields: https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */
|
|
17
|
+
isChecked?: boolean;
|
|
18
|
+
/** Adds the 'disabled' and `aria-disabled` attributes to the input when true.
|
|
19
|
+
* This also makes the text italic and color scheme gray. */
|
|
20
|
+
isDisabled?: boolean;
|
|
21
|
+
/** Adds the 'aria-invalid' attribute to the input when true. This also makes
|
|
22
|
+
* the color theme "NYPL error" red for the button and text. */
|
|
23
|
+
isInvalid?: boolean;
|
|
24
|
+
/** Adds the 'required' attribute to the input when true. */
|
|
25
|
+
isRequired?: boolean;
|
|
26
|
+
/** The radio button's label. This will serve as the text content for the
|
|
27
|
+
* `<label>` element if `showlabel` is true, or an "aria-label" if `showLabel`
|
|
28
|
+
* is false. */
|
|
29
|
+
labelText: string | JSX.Element;
|
|
30
|
+
/** Used to reference the input element in forms. */
|
|
31
|
+
name?: string;
|
|
32
|
+
/** Should be passed along with `isChecked` for controlled components. */
|
|
33
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
34
|
+
/** Offers the ability to hide the helper/invalid text. */
|
|
35
|
+
showHelperInvalidText?: boolean;
|
|
36
|
+
/** Offers the ability to show the radio's label onscreen or hide it. Refer
|
|
37
|
+
* to the `labelText` property for more information. */
|
|
38
|
+
showLabel?: boolean;
|
|
39
|
+
/** Populates the value of the input. */
|
|
40
|
+
value?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare const Radio: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>, {}>;
|
|
43
|
+
export default Radio;
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
-
import { LayoutTypes } from "../../helpers/types";
|
|
4
|
-
export interface RadioGroupProps {
|
|
5
|
-
/** Additional class name. */
|
|
6
|
-
className?: string;
|
|
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 `Radio`s' wrapper to be full width. */
|
|
18
|
-
isFullWidth?: boolean;
|
|
19
|
-
/** Adds 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 radio 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 Radio buttons in a row or column (default). */
|
|
28
|
-
layout?: LayoutTypes;
|
|
29
|
-
/** The `name` prop indicates the form group for all the Radio 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
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* RadioGroup is a wrapper for DS `Radio` components that renders as a fieldset
|
|
44
|
-
* HTML element along with optional helper text. The `name` prop is essential
|
|
45
|
-
* for this form group element and is not needed for individual DS `Radio`
|
|
46
|
-
* components when `RadioGroup` is used.
|
|
47
|
-
*/
|
|
48
|
-
export declare const RadioGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<RadioGroupProps & {
|
|
49
|
-
children?: React.ReactNode;
|
|
50
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
51
|
-
export default RadioGroup;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
+
import { LayoutTypes } from "../../helpers/types";
|
|
4
|
+
export interface RadioGroupProps {
|
|
5
|
+
/** Additional class name. */
|
|
6
|
+
className?: string;
|
|
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 `Radio`s' wrapper to be full width. */
|
|
18
|
+
isFullWidth?: boolean;
|
|
19
|
+
/** Adds 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 radio 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 Radio buttons in a row or column (default). */
|
|
28
|
+
layout?: LayoutTypes;
|
|
29
|
+
/** The `name` prop indicates the form group for all the Radio 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
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* RadioGroup is a wrapper for DS `Radio` components that renders as a fieldset
|
|
44
|
+
* HTML element along with optional helper text. The `name` prop is essential
|
|
45
|
+
* for this form group element and is not needed for individual DS `Radio`
|
|
46
|
+
* components when `RadioGroup` is used.
|
|
47
|
+
*/
|
|
48
|
+
export declare const RadioGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<RadioGroupProps & {
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
51
|
+
export default RadioGroup;
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
-
import { SelectProps as InitialSelectProps } from "../Select/Select";
|
|
4
|
-
import { InputProps as InitialInputProps } from "../TextInput/TextInput";
|
|
5
|
-
interface SelectOptionsProps {
|
|
6
|
-
text: string;
|
|
7
|
-
value: string;
|
|
8
|
-
}
|
|
9
|
-
export
|
|
10
|
-
optionsData: SelectOptionsProps[];
|
|
11
|
-
};
|
|
12
|
-
export
|
|
13
|
-
export interface SearchBarProps {
|
|
14
|
-
/** Adds 'action' property to the `form` element. */
|
|
15
|
-
action?: string;
|
|
16
|
-
/** The onClick callback function for the `Button` component. */
|
|
17
|
-
buttonOnClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
18
|
-
/** A class name for the `form` element. */
|
|
19
|
-
className?: string;
|
|
20
|
-
/** Optional string for the SearchBar's description above the component. */
|
|
21
|
-
descriptionText?: string;
|
|
22
|
-
/** Optional string for the SearchBar's heading text above the component. */
|
|
23
|
-
headingText?: string;
|
|
24
|
-
/** The text to display below the form in a `HelperErrorText` component. */
|
|
25
|
-
helperText?: HelperErrorTextType;
|
|
26
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
27
|
-
id: string;
|
|
28
|
-
/** Optional string to populate the `HelperErrorText` for the error state
|
|
29
|
-
* when `isInvalid` is true. */
|
|
30
|
-
invalidText?: HelperErrorTextType;
|
|
31
|
-
/** Sets children form components in the disabled state. */
|
|
32
|
-
isDisabled?: boolean;
|
|
33
|
-
/** Sets children form components in the error state. */
|
|
34
|
-
isInvalid?: boolean;
|
|
35
|
-
/** Sets children form components in the required state. */
|
|
36
|
-
isRequired?: boolean;
|
|
37
|
-
/** Populates the `aria-label` attribute on the form element. */
|
|
38
|
-
labelText: string;
|
|
39
|
-
/** Adds 'method' property to the `form` element. */
|
|
40
|
-
method?: string;
|
|
41
|
-
/** Sets the `Button` variant type to `noBrand` when true;
|
|
42
|
-
* false by default which sets the type to `primary`. */
|
|
43
|
-
noBrandButtonType?: boolean;
|
|
44
|
-
/** Handler function when the form is submitted. */
|
|
45
|
-
onSubmit: (event: React.FormEvent) => void;
|
|
46
|
-
/** Required props to render a `Select` element. */
|
|
47
|
-
selectProps?: SelectProps | undefined;
|
|
48
|
-
/** Custom input element to render instead of a `TextInput` element. */
|
|
49
|
-
textInputElement?: JSX.Element;
|
|
50
|
-
/** Required props to render a `TextInput` element. */
|
|
51
|
-
textInputProps?: TextInputProps | undefined;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Renders a wrapper `form` element to be used with `Select` (optional),
|
|
55
|
-
* `Input`, and `Button` components together.
|
|
56
|
-
*/
|
|
57
|
-
export declare const SearchBar: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SearchBarProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
58
|
-
export default SearchBar;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
+
import { SelectProps as InitialSelectProps } from "../Select/Select";
|
|
4
|
+
import { InputProps as InitialInputProps } from "../TextInput/TextInput";
|
|
5
|
+
interface SelectOptionsProps {
|
|
6
|
+
text: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}
|
|
9
|
+
export type SelectProps = Partial<Pick<InitialSelectProps, "id" | "labelText" | "name" | "onChange" | "value">> & {
|
|
10
|
+
optionsData: SelectOptionsProps[];
|
|
11
|
+
};
|
|
12
|
+
export type TextInputProps = Pick<InitialInputProps, "labelText" | "name"> & Partial<Pick<InitialInputProps, "defaultValue" | "id" | "isClearable" | "isClearableCallback" | "max" | "maxLength" | "min" | "onChange" | "pattern" | "placeholder" | "value">>;
|
|
13
|
+
export interface SearchBarProps {
|
|
14
|
+
/** Adds 'action' property to the `form` element. */
|
|
15
|
+
action?: string;
|
|
16
|
+
/** The onClick callback function for the `Button` component. */
|
|
17
|
+
buttonOnClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
18
|
+
/** A class name for the `form` element. */
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Optional string for the SearchBar's description above the component. */
|
|
21
|
+
descriptionText?: string;
|
|
22
|
+
/** Optional string for the SearchBar's heading text above the component. */
|
|
23
|
+
headingText?: string;
|
|
24
|
+
/** The text to display below the form in a `HelperErrorText` component. */
|
|
25
|
+
helperText?: HelperErrorTextType;
|
|
26
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Optional string to populate the `HelperErrorText` for the error state
|
|
29
|
+
* when `isInvalid` is true. */
|
|
30
|
+
invalidText?: HelperErrorTextType;
|
|
31
|
+
/** Sets children form components in the disabled state. */
|
|
32
|
+
isDisabled?: boolean;
|
|
33
|
+
/** Sets children form components in the error state. */
|
|
34
|
+
isInvalid?: boolean;
|
|
35
|
+
/** Sets children form components in the required state. */
|
|
36
|
+
isRequired?: boolean;
|
|
37
|
+
/** Populates the `aria-label` attribute on the form element. */
|
|
38
|
+
labelText: string;
|
|
39
|
+
/** Adds 'method' property to the `form` element. */
|
|
40
|
+
method?: string;
|
|
41
|
+
/** Sets the `Button` variant type to `noBrand` when true;
|
|
42
|
+
* false by default which sets the type to `primary`. */
|
|
43
|
+
noBrandButtonType?: boolean;
|
|
44
|
+
/** Handler function when the form is submitted. */
|
|
45
|
+
onSubmit: (event: React.FormEvent) => void;
|
|
46
|
+
/** Required props to render a `Select` element. */
|
|
47
|
+
selectProps?: SelectProps | undefined;
|
|
48
|
+
/** Custom input element to render instead of a `TextInput` element. */
|
|
49
|
+
textInputElement?: JSX.Element;
|
|
50
|
+
/** Required props to render a `TextInput` element. */
|
|
51
|
+
textInputProps?: TextInputProps | undefined;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Renders a wrapper `form` element to be used with `Select` (optional),
|
|
55
|
+
* `Input`, and `Button` components together.
|
|
56
|
+
*/
|
|
57
|
+
export declare const SearchBar: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SearchBarProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
58
|
+
export default SearchBar;
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export interface SelectProps {
|
|
6
|
-
/** A class name for the `div` parent element. */
|
|
7
|
-
className?: string;
|
|
8
|
-
/** Optional string to populate the `HelperErrorText` for the standard state. */
|
|
9
|
-
helperText?: HelperErrorTextType;
|
|
10
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
11
|
-
id: string;
|
|
12
|
-
/** Optional string to populate the `HelperErrorText` for the error state
|
|
13
|
-
* when `isInvalid` is true. */
|
|
14
|
-
invalidText?: HelperErrorTextType;
|
|
15
|
-
/** Adds the `disabled` and `aria-disabled` attributes to the select when true */
|
|
16
|
-
isDisabled?: boolean;
|
|
17
|
-
/** Adds the `aria-invalid` attribute to the select when true. This also makes
|
|
18
|
-
* the color theme "NYPL error" red for the select and text. */
|
|
19
|
-
isInvalid?: boolean;
|
|
20
|
-
/** Adds the `required` and `aria-required` attributes to the input when true. */
|
|
21
|
-
isRequired?: boolean;
|
|
22
|
-
/** Optional value to render the label inline, rather than the default (on top)
|
|
23
|
-
* of the select element. */
|
|
24
|
-
labelPosition?: LabelPositions;
|
|
25
|
-
/** Provides text for a `Label` component if `showLabel` is set to `true`;
|
|
26
|
-
* populates an `aria-label` attribute on the select input if `showLabel` is
|
|
27
|
-
* set to `false`. */
|
|
28
|
-
labelText: string;
|
|
29
|
-
/** Used to reference the select element in forms. */
|
|
30
|
-
name: string;
|
|
31
|
-
/** The callback function to get the selected value.
|
|
32
|
-
* Should be passed along with `value` for controlled components. */
|
|
33
|
-
onChange?: (event: React.FormEvent) => void;
|
|
34
|
-
/** Placeholder text in the select element. */
|
|
35
|
-
placeholder?: string;
|
|
36
|
-
/** The variant to display. */
|
|
37
|
-
selectType?: SelectTypes;
|
|
38
|
-
/** Offers the ability to hide the helper/invalid text. */
|
|
39
|
-
showHelperInvalidText?: boolean;
|
|
40
|
-
/** Offers the ability to show the select's label onscreen or hide it. Refer
|
|
41
|
-
* to the `labelText` property for more information. */
|
|
42
|
-
showLabel?: boolean;
|
|
43
|
-
/** Whether or not to display the "(Required)" text in the label text.
|
|
44
|
-
* True by default. */
|
|
45
|
-
showRequiredLabel?: boolean;
|
|
46
|
-
/** The value of the selected option.
|
|
47
|
-
* Should be passed along with `onChange` for controlled components. */
|
|
48
|
-
value?: string;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Component that renders Chakra's `Select` component along with an accessible
|
|
52
|
-
* `Label` and optional `HelperErrorText` component.
|
|
53
|
-
*/
|
|
54
|
-
export declare const Select: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SelectProps & {
|
|
55
|
-
children?: React.ReactNode;
|
|
56
|
-
} & React.RefAttributes<HTMLSelectElement>>, {}>;
|
|
57
|
-
export default Select;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
+
export type SelectTypes = "default" | "searchbar";
|
|
4
|
+
export type LabelPositions = "default" | "inline";
|
|
5
|
+
export interface SelectProps {
|
|
6
|
+
/** A class name for the `div` parent element. */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Optional string to populate the `HelperErrorText` for the standard state. */
|
|
9
|
+
helperText?: HelperErrorTextType;
|
|
10
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
11
|
+
id: string;
|
|
12
|
+
/** Optional string to populate the `HelperErrorText` for the error state
|
|
13
|
+
* when `isInvalid` is true. */
|
|
14
|
+
invalidText?: HelperErrorTextType;
|
|
15
|
+
/** Adds the `disabled` and `aria-disabled` attributes to the select when true */
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
/** Adds the `aria-invalid` attribute to the select when true. This also makes
|
|
18
|
+
* the color theme "NYPL error" red for the select and text. */
|
|
19
|
+
isInvalid?: boolean;
|
|
20
|
+
/** Adds the `required` and `aria-required` attributes to the input when true. */
|
|
21
|
+
isRequired?: boolean;
|
|
22
|
+
/** Optional value to render the label inline, rather than the default (on top)
|
|
23
|
+
* of the select element. */
|
|
24
|
+
labelPosition?: LabelPositions;
|
|
25
|
+
/** Provides text for a `Label` component if `showLabel` is set to `true`;
|
|
26
|
+
* populates an `aria-label` attribute on the select input if `showLabel` is
|
|
27
|
+
* set to `false`. */
|
|
28
|
+
labelText: string;
|
|
29
|
+
/** Used to reference the select element in forms. */
|
|
30
|
+
name: string;
|
|
31
|
+
/** The callback function to get the selected value.
|
|
32
|
+
* Should be passed along with `value` for controlled components. */
|
|
33
|
+
onChange?: (event: React.FormEvent) => void;
|
|
34
|
+
/** Placeholder text in the select element. */
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
/** The variant to display. */
|
|
37
|
+
selectType?: SelectTypes;
|
|
38
|
+
/** Offers the ability to hide the helper/invalid text. */
|
|
39
|
+
showHelperInvalidText?: boolean;
|
|
40
|
+
/** Offers the ability to show the select's label onscreen or hide it. Refer
|
|
41
|
+
* to the `labelText` property for more information. */
|
|
42
|
+
showLabel?: boolean;
|
|
43
|
+
/** Whether or not to display the "(Required)" text in the label text.
|
|
44
|
+
* True by default. */
|
|
45
|
+
showRequiredLabel?: boolean;
|
|
46
|
+
/** The value of the selected option.
|
|
47
|
+
* Should be passed along with `onChange` for controlled components. */
|
|
48
|
+
value?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Component that renders Chakra's `Select` component along with an accessible
|
|
52
|
+
* `Label` and optional `HelperErrorText` component.
|
|
53
|
+
*/
|
|
54
|
+
export declare const Select: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SelectProps & {
|
|
55
|
+
children?: React.ReactNode;
|
|
56
|
+
} & React.RefAttributes<HTMLSelectElement>>, {}>;
|
|
57
|
+
export default Select;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { LayoutTypes } from "../../helpers/types";
|
|
3
|
-
export
|
|
4
|
-
export interface SkeletonLoaderProps {
|
|
5
|
-
/** Additional class name for the Skeleton component. */
|
|
6
|
-
className?: string;
|
|
7
|
-
/** Optional numeric value to control the number of lines for content
|
|
8
|
-
* placeholder; default value is `3`. */
|
|
9
|
-
contentSize?: number;
|
|
10
|
-
/** Optional numeric value to control the number of lines for heading
|
|
11
|
-
* placeholder; default value is `1`. */
|
|
12
|
-
headingSize?: number;
|
|
13
|
-
/** Optional value to control the aspect ratio of the image placeholder;
|
|
14
|
-
* default value is `"square"`. */
|
|
15
|
-
imageAspectRatio?: SkeletonLoaderImageRatios;
|
|
16
|
-
/** Optional boolean value to control visibility of border around skeleton loader. */
|
|
17
|
-
isBordered?: boolean;
|
|
18
|
-
/** Optional value to control the position of the image placeholder;
|
|
19
|
-
* default value is `"column"`. */
|
|
20
|
-
layout?: LayoutTypes;
|
|
21
|
-
/** Optional boolean value to control visibility of button placeholder. */
|
|
22
|
-
showButton?: boolean;
|
|
23
|
-
/** Optional boolean value to control visibility of content placeholder. */
|
|
24
|
-
showContent?: boolean;
|
|
25
|
-
/** Optional boolean value to control visibility of heading placeholder. */
|
|
26
|
-
showHeading?: boolean;
|
|
27
|
-
/** Optional boolean value to control visibility of image placeholder. */
|
|
28
|
-
showImage?: boolean;
|
|
29
|
-
/** Optional width value. This value should be entered with the same
|
|
30
|
-
* formatting as a CSS width attribute (ex. `50%`, `640px`, `20rem`).
|
|
31
|
-
* If omitted, the skeleton loader will have a default width of 100%. */
|
|
32
|
-
width?: string;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* The `SkeletonLoader` component renders a placeholder to be used while
|
|
36
|
-
* dynamic content is loading.
|
|
37
|
-
*/
|
|
38
|
-
export declare const SkeletonLoader: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SkeletonLoaderProps & {
|
|
39
|
-
children?: React.ReactNode;
|
|
40
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
41
|
-
export default SkeletonLoader;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { LayoutTypes } from "../../helpers/types";
|
|
3
|
+
export type SkeletonLoaderImageRatios = "landscape" | "portrait" | "square";
|
|
4
|
+
export interface SkeletonLoaderProps {
|
|
5
|
+
/** Additional class name for the Skeleton component. */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Optional numeric value to control the number of lines for content
|
|
8
|
+
* placeholder; default value is `3`. */
|
|
9
|
+
contentSize?: number;
|
|
10
|
+
/** Optional numeric value to control the number of lines for heading
|
|
11
|
+
* placeholder; default value is `1`. */
|
|
12
|
+
headingSize?: number;
|
|
13
|
+
/** Optional value to control the aspect ratio of the image placeholder;
|
|
14
|
+
* default value is `"square"`. */
|
|
15
|
+
imageAspectRatio?: SkeletonLoaderImageRatios;
|
|
16
|
+
/** Optional boolean value to control visibility of border around skeleton loader. */
|
|
17
|
+
isBordered?: boolean;
|
|
18
|
+
/** Optional value to control the position of the image placeholder;
|
|
19
|
+
* default value is `"column"`. */
|
|
20
|
+
layout?: LayoutTypes;
|
|
21
|
+
/** Optional boolean value to control visibility of button placeholder. */
|
|
22
|
+
showButton?: boolean;
|
|
23
|
+
/** Optional boolean value to control visibility of content placeholder. */
|
|
24
|
+
showContent?: boolean;
|
|
25
|
+
/** Optional boolean value to control visibility of heading placeholder. */
|
|
26
|
+
showHeading?: boolean;
|
|
27
|
+
/** Optional boolean value to control visibility of image placeholder. */
|
|
28
|
+
showImage?: boolean;
|
|
29
|
+
/** Optional width value. This value should be entered with the same
|
|
30
|
+
* formatting as a CSS width attribute (ex. `50%`, `640px`, `20rem`).
|
|
31
|
+
* If omitted, the skeleton loader will have a default width of 100%. */
|
|
32
|
+
width?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The `SkeletonLoader` component renders a placeholder to be used while
|
|
36
|
+
* dynamic content is loading.
|
|
37
|
+
*/
|
|
38
|
+
export declare const SkeletonLoader: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SkeletonLoaderProps & {
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
41
|
+
export default SkeletonLoader;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface SkipNavigationProps {
|
|
3
|
-
/** Additional CSS class name to render in the `nav` element. */
|
|
4
|
-
className?: string;
|
|
5
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
6
|
-
id?: string;
|
|
7
|
-
/** The anchor target for the main skip link. The default is "#mainContent". */
|
|
8
|
-
target?: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* SkipNavigation is a component that is used to provide a navigational list of
|
|
12
|
-
* links. The first link is used to skip to the main content of the page using
|
|
13
|
-
* the `#mainContent` id, and the second link points to accessibility information
|
|
14
|
-
* on NYPL.org. These links are visually hidden but can be read by screenreaders.
|
|
15
|
-
*/
|
|
16
|
-
export declare const SkipNavigation: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SkipNavigationProps & {
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
19
|
-
export default SkipNavigation;
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface SkipNavigationProps {
|
|
3
|
+
/** Additional CSS class name to render in the `nav` element. */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** The anchor target for the main skip link. The default is "#mainContent". */
|
|
8
|
+
target?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* SkipNavigation is a component that is used to provide a navigational list of
|
|
12
|
+
* links. The first link is used to skip to the main content of the page using
|
|
13
|
+
* the `#mainContent` id, and the second link points to accessibility information
|
|
14
|
+
* on NYPL.org. These links are visually hidden but can be read by screenreaders.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SkipNavigation: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SkipNavigationProps & {
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
19
|
+
export default SkipNavigation;
|