@nypl/design-system-react-components 0.23.4 → 0.25.1
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/CHANGELOG.md +98 -1
- package/README.md +46 -11
- package/dist/components/Accordion/Accordion.d.ts +14 -14
- package/dist/components/Autosuggest/Autosuggest.stories.d.ts +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +11 -14
- package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +6 -0
- package/dist/components/Button/Button.d.ts +6 -13
- package/dist/components/Button/ButtonTypes.d.ts +5 -3
- package/dist/components/Card/Card.d.ts +59 -10
- package/dist/components/Card/CardTypes.d.ts +19 -0
- package/dist/components/CardEdition/CardEdition.d.ts +21 -0
- package/dist/components/{StyleGuide/Colors.stories.d.ts → CardEdition/CardEdition.stories.d.ts} +5 -2
- package/dist/components/Checkbox/Checkbox.d.ts +21 -16
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +43 -0
- package/dist/components/CheckboxGroup/CheckboxGroupLayoutTypes.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.d.ts +79 -0
- package/dist/components/DatePicker/DatePickerTypes.d.ts +5 -0
- package/dist/components/Form/Form.d.ts +16 -8
- package/dist/components/Form/FormTypes.d.ts +2 -0
- package/dist/components/Grid/GridTypes.d.ts +9 -0
- package/dist/components/Grid/SimpleGrid.d.ts +14 -0
- package/dist/components/Heading/Heading.d.ts +9 -11
- package/dist/components/Heading/{HeadingDisplaySizes.d.ts → HeadingTypes.d.ts} +8 -0
- package/dist/components/HelperErrorText/HelperErrorText.stories.d.ts +2 -1
- package/dist/components/Hero/Hero.d.ts +19 -14
- package/dist/components/Hero/HeroTypes.d.ts +10 -5
- package/dist/components/Icons/Icon.d.ts +13 -16
- package/dist/components/Icons/IconSvgs.d.ts +4 -0
- package/dist/components/Icons/IconTypes.d.ts +78 -60
- package/dist/components/Image/Image.stories.d.ts +2 -1
- package/dist/components/Label/Label.d.ts +10 -26
- package/dist/components/Link/Link.d.ts +8 -12
- package/dist/components/List/List.stories.d.ts +1 -0
- package/dist/components/Radio/Radio.d.ts +30 -24
- package/dist/components/RadioGroup/RadioGroup.d.ts +40 -0
- package/dist/components/RadioGroup/RadioGroupLayoutTypes.d.ts +4 -0
- package/dist/components/SearchBar/SearchBar.d.ts +45 -27
- package/dist/components/Select/Select.d.ts +34 -35
- package/dist/components/Select/SelectTypes.d.ts +4 -0
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +1 -1
- package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +2 -2
- package/dist/components/StatusBadge/StatusBadge.d.ts +8 -6
- package/dist/components/StatusBadge/StatusBadgeTypes.d.ts +5 -0
- package/dist/components/Tabs/Tabs.d.ts +25 -0
- package/dist/components/Template/Template.d.ts +91 -0
- package/dist/components/Text/Text.d.ts +16 -0
- package/dist/components/Text/TextTypes.d.ts +6 -0
- package/dist/components/TextInput/TextInput.d.ts +37 -30
- package/dist/components/TextInput/TextInputTypes.d.ts +5 -0
- package/dist/design-system-react-components.cjs.development.js +4102 -917
- package/dist/design-system-react-components.cjs.development.js.map +1 -1
- package/dist/design-system-react-components.cjs.production.min.js +1 -1
- package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
- package/dist/design-system-react-components.esm.js +4023 -920
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/index.d.ts +23 -5
- package/dist/resources.scss +133 -24
- package/dist/styles.css +1 -1
- package/dist/theme/components/accordion.d.ts +25 -0
- package/dist/theme/components/breadcrumb.d.ts +90 -0
- package/dist/theme/components/button.d.ts +109 -0
- package/dist/theme/components/checkbox.d.ts +91 -0
- package/dist/theme/components/customCheckboxGroup.d.ts +18 -0
- package/dist/theme/components/customRadioGroup.d.ts +18 -0
- package/dist/theme/components/global.d.ts +55 -0
- package/dist/theme/components/globalMixins.d.ts +15 -0
- package/dist/theme/components/heading.d.ts +110 -0
- package/dist/theme/components/hero.d.ts +492 -0
- package/dist/theme/components/icon.d.ts +13 -0
- package/dist/theme/components/label.d.ts +16 -0
- package/dist/theme/components/link.d.ts +45 -0
- package/dist/theme/components/radio.d.ts +95 -0
- package/dist/theme/components/searchBar.d.ts +20 -0
- package/dist/theme/components/select.d.ts +58 -0
- package/dist/theme/components/statusBadge.d.ts +25 -0
- package/dist/theme/components/tabs.d.ts +85 -0
- package/dist/theme/components/template.d.ts +105 -0
- package/dist/theme/components/text.d.ts +20 -0
- package/dist/theme/components/textInput.d.ts +105 -0
- package/dist/theme/foundations/breakpoints.d.ts +23 -0
- package/dist/theme/foundations/colors.d.ts +3 -0
- package/dist/theme/foundations/global.d.ts +23 -0
- package/dist/theme/foundations/shadows.d.ts +4 -0
- package/dist/theme/foundations/spacing.d.ts +77 -0
- package/dist/theme/foundations/typography.d.ts +8 -0
- package/dist/theme/index.d.ts +20 -0
- package/dist/theme/provider.d.ts +5 -0
- package/dist/theme/types.d.ts +1 -0
- package/dist/utils/utils.d.ts +6 -0
- package/package.json +9 -2
- package/src/components/Accordion/Accordion.stories.mdx +233 -33
- package/src/components/Accordion/Accordion.test.tsx +135 -19
- package/src/components/Accordion/Accordion.tsx +81 -56
- package/src/components/Autosuggest/Autosuggest.stories.mdx +4 -3
- package/src/components/Autosuggest/Autosuggest.stories.tsx +1 -1
- package/src/components/Autosuggest/_Autosuggest.scss +2 -2
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +57 -56
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +31 -25
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +71 -73
- package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +6 -0
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +100 -0
- package/src/components/Button/Button.stories.mdx +125 -138
- package/src/components/Button/Button.test.tsx +65 -11
- package/src/components/Button/Button.tsx +72 -68
- package/src/components/Button/ButtonTypes.tsx +4 -2
- package/src/components/Button/_Button.scss +7 -92
- package/src/components/Button/__snapshots__/Button.test.tsx.snap +58 -3
- package/src/components/Card/Card.stories.mdx +694 -0
- package/src/components/Card/Card.test.tsx +97 -102
- package/src/components/Card/Card.tsx +182 -31
- package/src/components/Card/CardTypes.tsx +21 -0
- package/src/components/Card/_Card.scss +234 -49
- package/src/components/{Card/Card.stories.tsx → CardEdition/CardEdition.stories.tsx} +32 -22
- package/src/components/CardEdition/CardEdition.test.tsx +395 -0
- package/src/components/CardEdition/CardEdition.tsx +60 -0
- package/src/components/CardEdition/_CardEdition.scss +138 -0
- package/src/components/Chakra/Box.stories.mdx +57 -0
- package/src/components/Chakra/Center.stories.mdx +99 -0
- package/src/components/Chakra/Grid.stories.mdx +79 -0
- package/src/components/Chakra/Stack.stories.mdx +93 -0
- package/src/components/Checkbox/Checkbox.stories.mdx +57 -35
- package/src/components/Checkbox/Checkbox.test.tsx +117 -147
- package/src/components/Checkbox/Checkbox.tsx +76 -50
- package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +325 -0
- package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +249 -0
- package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +345 -0
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +148 -0
- package/src/components/CheckboxGroup/CheckboxGroupLayoutTypes.tsx +4 -0
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +1360 -0
- package/src/components/DatePicker/DatePicker.stories.mdx +284 -0
- package/src/components/DatePicker/DatePicker.test.tsx +657 -0
- package/src/components/DatePicker/DatePicker.tsx +396 -0
- package/src/components/DatePicker/DatePickerTypes.tsx +5 -0
- package/src/components/DatePicker/_DatePicker.scss +76 -0
- package/src/components/Form/Form.stories.mdx +130 -27
- package/src/components/Form/Form.test.tsx +78 -36
- package/src/components/Form/Form.tsx +53 -19
- package/src/components/Form/FormTypes.tsx +3 -0
- package/src/components/Form/__snapshots__/Form.test.tsx.snap +38 -0
- package/src/components/Grid/GridTypes.tsx +9 -0
- package/src/components/Grid/SimpleGrid.stories.mdx +275 -0
- package/src/components/Grid/SimpleGrid.test.tsx +66 -0
- package/src/components/Grid/SimpleGrid.tsx +37 -0
- package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +8 -0
- package/src/components/Heading/Heading.stories.mdx +63 -33
- package/src/components/Heading/Heading.test.tsx +24 -16
- package/src/components/Heading/Heading.tsx +54 -38
- package/src/components/Heading/{HeadingDisplaySizes.tsx → HeadingTypes.tsx} +9 -0
- package/src/components/HelperErrorText/HelperErrorText.stories.tsx +2 -1
- package/src/components/HelperErrorText/_HelperErrorText.scss +1 -1
- package/src/components/Hero/Hero.stories.mdx +195 -85
- package/src/components/Hero/Hero.test.tsx +544 -113
- package/src/components/Hero/Hero.tsx +80 -93
- package/src/components/Hero/HeroTypes.tsx +17 -5
- package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +307 -0
- package/src/components/HorizontalRule/HorizontalRule.stories.mdx +6 -1
- package/src/components/HorizontalRule/_HorizontalRule.scss +1 -1
- package/src/components/Icons/Icon.stories.mdx +89 -74
- package/src/components/Icons/Icon.test.tsx +30 -22
- package/src/components/Icons/Icon.tsx +63 -61
- package/src/components/Icons/IconSvgs.tsx +8 -0
- package/src/components/Icons/IconTypes.tsx +80 -60
- package/src/components/Image/Image.stories.tsx +2 -1
- package/src/components/Input/_Input.scss +2 -2
- package/src/components/Label/Label.stories.mdx +77 -0
- package/src/components/Label/Label.test.tsx +43 -12
- package/src/components/Label/Label.tsx +28 -45
- package/src/components/Label/__snapshots__/Label.test.tsx.snap +41 -0
- package/src/components/Link/Link.stories.mdx +47 -41
- package/src/components/Link/Link.test.tsx +33 -44
- package/src/components/Link/Link.tsx +114 -100
- package/src/components/List/List.stories.mdx +7 -3
- package/src/components/List/List.stories.tsx +14 -9
- package/src/components/List/List.test.tsx +12 -8
- package/src/components/List/List.tsx +9 -7
- package/src/components/List/_List.scss +3 -3
- package/src/components/Modal/Modal.stories.mdx +7 -3
- package/src/components/Modal/_Modal.scss +1 -1
- package/src/components/Notification/Notification.stories.mdx +99 -65
- package/src/components/Notification/Notification.test.tsx +3 -16
- package/src/components/Notification/Notification.tsx +12 -12
- package/src/components/Notification/_Notification.scss +5 -4
- package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +1 -1
- package/src/components/Pagination/Pagination.stories.mdx +7 -1
- package/src/components/Pagination/Pagination.test.tsx +16 -10
- package/src/components/Radio/Radio.stories.mdx +57 -46
- package/src/components/Radio/Radio.test.tsx +92 -138
- package/src/components/Radio/Radio.tsx +70 -69
- package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +250 -0
- package/src/components/RadioGroup/RadioGroup.stories.mdx +247 -0
- package/src/components/RadioGroup/RadioGroup.test.tsx +327 -0
- package/src/components/RadioGroup/RadioGroup.tsx +154 -0
- package/src/components/RadioGroup/RadioGroupLayoutTypes.tsx +4 -0
- package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1101 -0
- package/src/components/SearchBar/SearchBar.Test.tsx +151 -16
- package/src/components/SearchBar/SearchBar.stories.mdx +196 -224
- package/src/components/SearchBar/SearchBar.tsx +151 -46
- package/src/components/Select/Select.stories.mdx +193 -168
- package/src/components/Select/Select.test.tsx +129 -324
- package/src/components/Select/Select.tsx +120 -160
- package/src/components/Select/SelectTypes.tsx +4 -0
- package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +18 -29
- package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +7 -7
- package/src/components/SkeletonLoader/SkeletonLoader.tsx +4 -2
- package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +2 -2
- package/src/components/SkeletonLoader/_SkeletonLoader.scss +3 -3
- package/src/components/StatusBadge/StatusBadge.stories.mdx +91 -0
- package/src/components/StatusBadge/StatusBadge.test.tsx +35 -7
- package/src/components/StatusBadge/StatusBadge.tsx +24 -25
- package/src/components/StatusBadge/StatusBadgeTypes.tsx +5 -0
- package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +28 -0
- package/src/components/StyleGuide/Bidirectionality.stories.mdx +112 -90
- package/src/components/StyleGuide/Buttons.stories.mdx +98 -100
- package/src/components/StyleGuide/Colors.stories.mdx +336 -0
- package/src/components/StyleGuide/Forms.stories.mdx +85 -0
- package/src/components/StyleGuide/Iconography.stories.mdx +86 -93
- package/src/components/StyleGuide/Spacing.stories.mdx +0 -1
- package/src/components/StyleGuide/Typography.stories.mdx +164 -166
- package/src/components/StyleGuide/UIDocCard.tsx +4 -4
- package/src/components/Tabs/Tabs.stories.mdx +221 -0
- package/src/components/Tabs/Tabs.test.tsx +264 -0
- package/src/components/Tabs/Tabs.tsx +220 -0
- package/src/components/Template/Template.stories.mdx +574 -0
- package/src/components/Template/Template.test.tsx +124 -0
- package/src/components/Template/Template.tsx +226 -0
- package/src/components/Text/Text.stories.mdx +70 -0
- package/src/components/Text/Text.test.tsx +63 -0
- package/src/components/Text/Text.tsx +55 -0
- package/src/components/Text/TextTypes.tsx +6 -0
- package/src/components/Text/__snapshots__/Text.test.tsx.snap +33 -0
- package/src/components/TextInput/TextInput.stories.mdx +90 -90
- package/src/components/TextInput/TextInput.test.tsx +103 -83
- package/src/components/TextInput/TextInput.tsx +108 -91
- package/src/components/TextInput/TextInputTypes.tsx +6 -0
- package/src/components/VideoPlayer/VideoPlayer.stories.mdx +2 -1
- package/src/components/VideoPlayer/VideoPlayer.tsx +4 -2
- package/src/components/VideoPlayer/_VideoPlayer.scss +1 -1
- package/src/docs/Chakra.stories.mdx +341 -0
- package/src/docs/Intro.stories.mdx +31 -24
- package/src/index.ts +70 -5
- package/src/styles/01-colors/_colors-brand.scss +6 -4
- package/src/styles/01-colors/_colors-utility.scss +14 -15
- package/src/styles/03-space/_space-inline.scss +47 -7
- package/src/styles/03-space/_space-inset.scss +33 -5
- package/src/styles/03-space/_space-stack.scss +48 -8
- package/src/styles/base/_02-breakpoints.scss +5 -4
- package/src/styles/base/_04-base.scss +2 -1
- package/src/styles/base/_place-holder.scss +1 -1
- package/src/styles/base/_typography.scss +1 -29
- package/src/styles.scss +22 -25
- package/src/theme/components/accordion.ts +30 -0
- package/src/theme/components/breadcrumb.ts +77 -0
- package/src/theme/components/button.ts +125 -0
- package/src/theme/components/checkbox.ts +107 -0
- package/src/theme/components/customCheckboxGroup.ts +12 -0
- package/src/theme/components/customRadioGroup.ts +12 -0
- package/src/theme/components/global.ts +71 -0
- package/src/theme/components/globalMixins.ts +16 -0
- package/src/theme/components/heading.ts +72 -0
- package/src/theme/components/hero.ts +239 -0
- package/src/theme/components/icon.ts +79 -0
- package/src/theme/components/label.ts +17 -0
- package/src/theme/components/link.ts +47 -0
- package/src/theme/components/radio.ts +106 -0
- package/src/theme/components/searchBar.ts +21 -0
- package/src/theme/components/select.ts +50 -0
- package/src/theme/components/statusBadge.ts +27 -0
- package/src/theme/components/tabs.ts +79 -0
- package/src/theme/components/template.ts +114 -0
- package/src/theme/components/text.ts +31 -0
- package/src/theme/components/textInput.ts +61 -0
- package/src/theme/foundations/breakpoints.ts +24 -0
- package/src/theme/foundations/colors.ts +208 -0
- package/src/theme/foundations/global.ts +26 -0
- package/src/theme/foundations/shadows.ts +5 -0
- package/src/theme/foundations/spacing.ts +85 -0
- package/src/theme/foundations/typography.ts +35 -0
- package/src/theme/index.ts +88 -0
- package/src/theme/provider.tsx +9 -0
- package/src/theme/types.ts +1 -0
- package/src/utils/componentCategories.ts +56 -21
- package/src/utils/utils.ts +13 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -5
- package/dist/components/Card/Card.stories.d.ts +0 -27
- package/dist/components/Label/Label.stories.d.ts +0 -12
- package/dist/components/StatusBadge/StatusBadge.stories.d.ts +0 -8
- package/dist/components/Template/Template.stories.d.ts +0 -29
- package/src/components/Accordion/Accordion.stories.tsx +0 -65
- package/src/components/Accordion/_Accordion.scss +0 -81
- package/src/components/Breadcrumbs/_Breadcrumbs.scss +0 -97
- package/src/components/Checkbox/_Checkbox.scss +0 -97
- package/src/components/Form/_Form.scss +0 -28
- package/src/components/Heading/_Heading.scss +0 -163
- package/src/components/Hero/_Hero.scss +0 -256
- package/src/components/Icons/_Icons.scss +0 -116
- package/src/components/Label/Label.stories.tsx +0 -30
- package/src/components/Label/_Label.scss +0 -22
- package/src/components/Link/_Link.scss +0 -73
- package/src/components/Radio/_Radio.scss +0 -84
- package/src/components/SearchBar/_SearchBar.scss +0 -16
- package/src/components/Select/_Select.scss +0 -82
- package/src/components/StatusBadge/StatusBadge.stories.tsx +0 -33
- package/src/components/StatusBadge/_StatusBadge.scss +0 -23
- package/src/components/StyleGuide/Colors.stories.tsx +0 -288
- package/src/components/Template/Template.stories.tsx +0 -85
- package/src/components/Template/_Template.scss +0 -63
- package/src/components/TextInput/_TextInput.scss +0 -59
|
@@ -1,185 +1,145 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Select as ChakraSelect,
|
|
5
|
+
useMultiStyleConfig,
|
|
6
|
+
} from "@chakra-ui/react";
|
|
7
|
+
|
|
3
8
|
import Label from "../Label/Label";
|
|
4
9
|
import HelperErrorText from "../HelperErrorText/HelperErrorText";
|
|
5
10
|
import generateUUID from "../../helpers/generateUUID";
|
|
11
|
+
import { IconNames, IconSizes } from "../Icons/IconTypes";
|
|
12
|
+
import Icon from "../Icons/Icon";
|
|
13
|
+
import { SelectTypes } from "./SelectTypes";
|
|
6
14
|
|
|
7
15
|
export interface SelectProps {
|
|
8
|
-
/**
|
|
9
|
-
ariaLabel?: string;
|
|
10
|
-
/** Additional attributes passed to the <select> tag */
|
|
11
|
-
attributes?: { [key: string]: any };
|
|
12
|
-
/** BlockName for use with BEM. See how to work with modifiers and BEM here: http://getbem.com/introduction/ */
|
|
13
|
-
blockName?: string;
|
|
14
|
-
/** ClassName you can add in addition to 'select' */
|
|
16
|
+
/** A class name for the `div` parent element. */
|
|
15
17
|
className?: string;
|
|
16
|
-
|
|
17
|
-
/** When true, disables the select */
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
/** Helper for modifiers array; adds 'errored' styling */
|
|
20
|
-
errored?: boolean;
|
|
21
|
-
/** Populates the HelperErrorText for error state */
|
|
22
|
-
errorText?: string;
|
|
23
|
-
/** DEPRECATED - ID of associated HelperText */
|
|
24
|
-
helperTextId?: string;
|
|
25
|
-
/** Populates the HelperErrorText for standard state */
|
|
18
|
+
/** Optional string to populate the `HelperErrorText` for the standard state. */
|
|
26
19
|
helperText?: string;
|
|
27
20
|
/** ID that other components can cross reference for accessibility purposes */
|
|
28
21
|
id?: string;
|
|
29
|
-
/**
|
|
22
|
+
/** Optional string to populate the `HelperErrorText` for the error state
|
|
23
|
+
* when `isInvalid` is true. */
|
|
24
|
+
invalidText?: string;
|
|
25
|
+
/** Adds the `disabled` and `aria-disabled` attributes to the select when true */
|
|
26
|
+
isDisabled?: boolean;
|
|
27
|
+
/** Adds the `aria-invalid` attribute to the select when true. This also makes
|
|
28
|
+
* the color theme "NYPL error" red for the select and text. */
|
|
29
|
+
isInvalid?: boolean;
|
|
30
|
+
/** Adds the `required` and `aria-required` attributes to the input when true. */
|
|
30
31
|
isRequired?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
/** Provides text for a `Label` component if `showLabel` is set to `true`;
|
|
33
|
+
* populates an `aria-label` attribute on the select input if `showLabel` is
|
|
34
|
+
* set to `false`. */
|
|
34
35
|
labelText: string;
|
|
35
|
-
/**
|
|
36
|
-
modifiers?: string[];
|
|
37
|
-
/** The name of the select element to use in form submission */
|
|
36
|
+
/** Used to reference the select element in forms. */
|
|
38
37
|
name: string;
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
/** Passes selects' current value to the React state handler */
|
|
38
|
+
/** The callback function to get the selected value.
|
|
39
|
+
* Should be passed along with `value` for controlled components. */
|
|
42
40
|
onChange?: (event: React.FormEvent) => void;
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
/** The value of the selected option */
|
|
46
|
-
selectedOption?: string;
|
|
47
|
-
/** Offers the ability to show the label onscreen or hide it. Refer to the `labelText` property for more information. */
|
|
41
|
+
/** Offers the ability to show the select's label onscreen or hide it. Refer
|
|
42
|
+
* to the `labelText` property for more information. */
|
|
48
43
|
showLabel?: boolean;
|
|
44
|
+
/** Whether or not to display the "Required"/"Optional" text in the label text. */
|
|
45
|
+
showOptReqLabel?: boolean;
|
|
46
|
+
/** The variant to display. */
|
|
47
|
+
type?: SelectTypes;
|
|
48
|
+
/** The value of the selected option.
|
|
49
|
+
* Should be passed along with `onChange` for controlled components. */
|
|
50
|
+
value?: string;
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const footnote = errored ? errorOutput : helperText;
|
|
94
|
-
|
|
95
|
-
// Support for deprecated prop
|
|
96
|
-
if (ariaLabel) attributes["aria-label"] = ariaLabel;
|
|
97
|
-
|
|
98
|
-
// Support for deprecated props
|
|
99
|
-
if (labelId && !helperTextId) {
|
|
100
|
-
ariaLabelledBy = labelId;
|
|
101
|
-
} else if (helperTextId && !labelId) {
|
|
102
|
-
ariaLabelledBy = helperTextId;
|
|
103
|
-
} else if (labelId && helperTextId) {
|
|
104
|
-
ariaLabelledBy = labelId + " " + helperTextId;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (React.Children.count(children) > 10) {
|
|
108
|
-
console.warn(
|
|
109
|
-
"NYPL DS recommends that <select> fields have no more than 10 options; an auto-complete text input is a good alternative for 11 or more options."
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (React.Children.count(children) < 4) {
|
|
114
|
-
console.warn(
|
|
115
|
-
"NYPL DS recommends that <select> fields have at least 4 options; a radio button group is a good alternative for 3 or fewer options."
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (ariaLabel) {
|
|
120
|
-
console.warn(
|
|
121
|
-
"The ariaLabel prop has been deprecated in the Select component and will be removed in a future release. Check the documentation for updated props."
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (helperTextId) {
|
|
126
|
-
console.warn(
|
|
127
|
-
"The helperTextId prop has been deprecated in the Select component and will be removed in a future release. Check the documentation for updated props."
|
|
128
|
-
);
|
|
129
|
-
}
|
|
53
|
+
/**
|
|
54
|
+
* Component that renders Chakra's `Select` component along with an accessible
|
|
55
|
+
* `Label` and optional `HelperErrorText` component.
|
|
56
|
+
*/
|
|
57
|
+
const Select = React.forwardRef<
|
|
58
|
+
HTMLSelectElement,
|
|
59
|
+
React.PropsWithChildren<SelectProps>
|
|
60
|
+
>((props: React.PropsWithChildren<SelectProps>, ref?) => {
|
|
61
|
+
const {
|
|
62
|
+
children,
|
|
63
|
+
className,
|
|
64
|
+
helperText,
|
|
65
|
+
id = generateUUID(),
|
|
66
|
+
invalidText,
|
|
67
|
+
isDisabled = false,
|
|
68
|
+
isInvalid = false,
|
|
69
|
+
isRequired = false,
|
|
70
|
+
labelText,
|
|
71
|
+
name,
|
|
72
|
+
onChange,
|
|
73
|
+
showLabel = true,
|
|
74
|
+
showOptReqLabel = true,
|
|
75
|
+
type = SelectTypes.Default,
|
|
76
|
+
value,
|
|
77
|
+
} = props;
|
|
78
|
+
const ariaAttributes = {};
|
|
79
|
+
const optReqFlag = isRequired ? "Required" : "Optional";
|
|
80
|
+
const styles = useMultiStyleConfig("CustomSelect", { variant: type });
|
|
81
|
+
const finalInvalidText = invalidText
|
|
82
|
+
? invalidText
|
|
83
|
+
: "There is an error related to this field.";
|
|
84
|
+
const footnote = isInvalid ? finalInvalidText : helperText;
|
|
85
|
+
// To control the `Select` component, both `onChange` and `value`
|
|
86
|
+
// must be passed.
|
|
87
|
+
const controlledProps = onChange && value ? { onChange, value } : {};
|
|
88
|
+
|
|
89
|
+
if (!showLabel) {
|
|
90
|
+
ariaAttributes["aria-label"] =
|
|
91
|
+
labelText && footnote ? `${labelText} - ${footnote}` : labelText;
|
|
92
|
+
} else if (helperText) {
|
|
93
|
+
ariaAttributes["aria-describedby"] = `${id}-helperText`;
|
|
94
|
+
}
|
|
130
95
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
96
|
+
if (React.Children.count(children) > 10) {
|
|
97
|
+
console.warn(
|
|
98
|
+
"NYPL DS recommends that <select> fields have no more than 10 options; an auto-complete text input is a good alternative for 11 or more options."
|
|
99
|
+
);
|
|
100
|
+
}
|
|
136
101
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
102
|
+
if (React.Children.count(children) < 4) {
|
|
103
|
+
console.warn(
|
|
104
|
+
"NYPL DS recommends that <select> fields have at least 4 options; a radio button group is a good alternative for 3 or fewer options."
|
|
105
|
+
);
|
|
106
|
+
}
|
|
142
107
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
<select
|
|
151
|
-
name={name}
|
|
152
|
-
id={id}
|
|
153
|
-
className={bem("selectfield", modifiers, blockName, [className])}
|
|
154
|
-
aria-required={req}
|
|
155
|
-
required={req}
|
|
156
|
-
disabled={disabled}
|
|
157
|
-
aria-label={ariaLabel}
|
|
158
|
-
aria-labelledby={ariaLabelledBy}
|
|
159
|
-
value={selectedOption}
|
|
160
|
-
ref={ref}
|
|
161
|
-
onBlur={onBlur}
|
|
162
|
-
onChange={onChange}
|
|
163
|
-
{...attributes}
|
|
108
|
+
return (
|
|
109
|
+
<Box className={className} __css={styles}>
|
|
110
|
+
{showLabel && (
|
|
111
|
+
<Label
|
|
112
|
+
id={`${id}-label`}
|
|
113
|
+
htmlFor={id}
|
|
114
|
+
optReqFlag={showOptReqLabel && optReqFlag}
|
|
164
115
|
>
|
|
165
|
-
{
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
{
|
|
174
|
-
|
|
116
|
+
{labelText}
|
|
117
|
+
</Label>
|
|
118
|
+
)}
|
|
119
|
+
<ChakraSelect
|
|
120
|
+
id={id}
|
|
121
|
+
variant="outline"
|
|
122
|
+
isRequired={isRequired}
|
|
123
|
+
isDisabled={isDisabled}
|
|
124
|
+
isInvalid={isInvalid}
|
|
125
|
+
name={name}
|
|
126
|
+
ref={ref}
|
|
127
|
+
{...controlledProps}
|
|
128
|
+
{...ariaAttributes}
|
|
129
|
+
icon={<Icon name={IconNames.Arrow} size={IconSizes.Medium} />}
|
|
130
|
+
__css={styles.select}
|
|
131
|
+
>
|
|
132
|
+
{children}
|
|
133
|
+
</ChakraSelect>
|
|
134
|
+
{footnote && (
|
|
135
|
+
<Box __css={styles.helper} aria-disabled={isDisabled}>
|
|
136
|
+
<HelperErrorText isError={isInvalid} id={id + `-helperText`}>
|
|
175
137
|
{footnote}
|
|
176
138
|
</HelperErrorText>
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
);
|
|
182
|
-
|
|
183
|
-
Select.displayName = "Select";
|
|
139
|
+
</Box>
|
|
140
|
+
)}
|
|
141
|
+
</Box>
|
|
142
|
+
);
|
|
143
|
+
});
|
|
184
144
|
|
|
185
145
|
export default Select;
|
|
@@ -14,9 +14,10 @@ import {
|
|
|
14
14
|
SkeletonLoaderImageRatios,
|
|
15
15
|
} from "./SkeletonLoaderTypes";
|
|
16
16
|
import { action } from "@storybook/addon-actions";
|
|
17
|
+
import { getCategory } from "../../utils/componentCategories";
|
|
17
18
|
|
|
18
19
|
<Meta
|
|
19
|
-
title="
|
|
20
|
+
title={getCategory("SkeletonLoader")}
|
|
20
21
|
component={SkeletonLoader}
|
|
21
22
|
decorators={[withDesign]}
|
|
22
23
|
parameters={{
|
|
@@ -32,7 +33,7 @@ import { action } from "@storybook/addon-actions";
|
|
|
32
33
|
className: { table: { disable: true } },
|
|
33
34
|
modifiers: { table: { disable: true } },
|
|
34
35
|
layout: {
|
|
35
|
-
table: { defaultValue: { summary: "
|
|
36
|
+
table: { defaultValue: { summary: "column" } },
|
|
36
37
|
},
|
|
37
38
|
showImage: {
|
|
38
39
|
table: { defaultValue: { summary: "true" } },
|
|
@@ -58,7 +59,7 @@ import { action } from "@storybook/addon-actions";
|
|
|
58
59
|
}}
|
|
59
60
|
/>
|
|
60
61
|
|
|
61
|
-
#
|
|
62
|
+
# SkeletonLoader
|
|
62
63
|
|
|
63
64
|
| Component Version | DS Version |
|
|
64
65
|
| ----------------- | ---------- |
|
|
@@ -67,13 +68,16 @@ import { action } from "@storybook/addon-actions";
|
|
|
67
68
|
|
|
68
69
|
<Description of={SkeletonLoader} />
|
|
69
70
|
|
|
70
|
-
The `SkeletonLoader` component renders a placeholder to be used while dynamic
|
|
71
|
+
The `SkeletonLoader` component renders a placeholder to be used while dynamic
|
|
72
|
+
content is loading. The `layout`, `width` and placeholder elements within the
|
|
73
|
+
`SkeletonLoader` can be customized.
|
|
71
74
|
|
|
72
|
-
Please note that the initial rendering below has the `width` prop set to `300px`.
|
|
75
|
+
Please note that the initial rendering below has the `width` prop set to `300px`.
|
|
76
|
+
The default value is `100%`.
|
|
73
77
|
|
|
74
78
|
<Preview withToolbar>
|
|
75
79
|
<Story
|
|
76
|
-
name="
|
|
80
|
+
name="SkeletonLoader"
|
|
77
81
|
args={{
|
|
78
82
|
width: "300px",
|
|
79
83
|
}}
|
|
@@ -82,7 +86,7 @@ Please note that the initial rendering below has the `width` prop set to `300px`
|
|
|
82
86
|
</Story>
|
|
83
87
|
</Preview>
|
|
84
88
|
|
|
85
|
-
<ArgsTable story="
|
|
89
|
+
<ArgsTable story="SkeletonLoader" />
|
|
86
90
|
|
|
87
91
|
# Card Placeholders in a Grid
|
|
88
92
|
|
|
@@ -92,7 +96,7 @@ Please note that the initial rendering below has the `width` prop set to `300px`
|
|
|
92
96
|
style={{
|
|
93
97
|
display: "grid",
|
|
94
98
|
gap: "2rem",
|
|
95
|
-
|
|
99
|
+
gridTemplateColumns: "repeat(3, 1fr)",
|
|
96
100
|
}}
|
|
97
101
|
>
|
|
98
102
|
<SkeletonLoader
|
|
@@ -131,29 +135,14 @@ Please note that the initial rendering below has the `width` prop set to `300px`
|
|
|
131
135
|
style={{
|
|
132
136
|
display: "grid",
|
|
133
137
|
gap: "2rem",
|
|
134
|
-
|
|
138
|
+
gridTemplateColumns: "repeat(1, 1fr)",
|
|
135
139
|
}}
|
|
136
140
|
>
|
|
137
|
-
<SkeletonLoader
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
/>
|
|
141
|
-
<SkeletonLoader
|
|
142
|
-
layout={SkeletonLoaderLayouts.Horizontal}
|
|
143
|
-
showImage={false}
|
|
144
|
-
/>
|
|
145
|
-
<SkeletonLoader
|
|
146
|
-
layout={SkeletonLoaderLayouts.Horizontal}
|
|
147
|
-
showImage={false}
|
|
148
|
-
/>
|
|
149
|
-
<SkeletonLoader
|
|
150
|
-
layout={SkeletonLoaderLayouts.Horizontal}
|
|
151
|
-
showImage={false}
|
|
152
|
-
/>
|
|
153
|
-
<SkeletonLoader
|
|
154
|
-
layout={SkeletonLoaderLayouts.Horizontal}
|
|
155
|
-
showImage={false}
|
|
156
|
-
/>
|
|
141
|
+
<SkeletonLoader layout={SkeletonLoaderLayouts.Row} showImage={false} />
|
|
142
|
+
<SkeletonLoader layout={SkeletonLoaderLayouts.Row} showImage={false} />
|
|
143
|
+
<SkeletonLoader layout={SkeletonLoaderLayouts.Row} showImage={false} />
|
|
144
|
+
<SkeletonLoader layout={SkeletonLoaderLayouts.Row} showImage={false} />
|
|
145
|
+
<SkeletonLoader layout={SkeletonLoaderLayouts.Row} showImage={false} />
|
|
157
146
|
</div>
|
|
158
147
|
</Story>
|
|
159
148
|
</Preview>
|
|
@@ -26,7 +26,7 @@ describe("SkeletonLoader", () => {
|
|
|
26
26
|
expect(container.querySelector(".skeleton-loader")).toBeInTheDocument();
|
|
27
27
|
expect(container.querySelector(".skeleton-loader")).toHaveAttribute(
|
|
28
28
|
"class",
|
|
29
|
-
"skeleton-loader skeleton-loader--
|
|
29
|
+
"skeleton-loader skeleton-loader--column "
|
|
30
30
|
);
|
|
31
31
|
expect(container.querySelector(".skeleton-loader")).not.toHaveAttribute(
|
|
32
32
|
"class",
|
|
@@ -34,27 +34,27 @@ describe("SkeletonLoader", () => {
|
|
|
34
34
|
);
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
it("renders
|
|
37
|
+
it("renders column layout", () => {
|
|
38
38
|
const utils = render(
|
|
39
|
-
<SkeletonLoader layout={SkeletonLoaderLayouts.
|
|
39
|
+
<SkeletonLoader layout={SkeletonLoaderLayouts.Column} />
|
|
40
40
|
);
|
|
41
41
|
container = utils.container;
|
|
42
42
|
|
|
43
43
|
expect(container.querySelector(".skeleton-loader")).toBeInTheDocument();
|
|
44
44
|
expect(
|
|
45
|
-
container.querySelector(".skeleton-loader--
|
|
45
|
+
container.querySelector(".skeleton-loader--column")
|
|
46
46
|
).toBeInTheDocument();
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
it("renders
|
|
49
|
+
it("renders row layout", () => {
|
|
50
50
|
const utils = render(
|
|
51
|
-
<SkeletonLoader layout={SkeletonLoaderLayouts.
|
|
51
|
+
<SkeletonLoader layout={SkeletonLoaderLayouts.Row} />
|
|
52
52
|
);
|
|
53
53
|
container = utils.container;
|
|
54
54
|
|
|
55
55
|
expect(container.querySelector(".skeleton-loader")).toBeInTheDocument();
|
|
56
56
|
expect(
|
|
57
|
-
container.querySelector(".skeleton-loader--
|
|
57
|
+
container.querySelector(".skeleton-loader--row")
|
|
58
58
|
).toBeInTheDocument();
|
|
59
59
|
});
|
|
60
60
|
});
|
|
@@ -16,7 +16,7 @@ export interface SkeletonLoaderProps {
|
|
|
16
16
|
headingSize?: number;
|
|
17
17
|
/** Optional value to control the aspect ratio of the image placeholder; default value is `square` */
|
|
18
18
|
imageAspectRatio?: SkeletonLoaderImageRatios;
|
|
19
|
-
/** Optional value to control the position of the image placeholder; default value is `
|
|
19
|
+
/** Optional value to control the position of the image placeholder; default value is `column` */
|
|
20
20
|
layout?: SkeletonLoaderLayouts;
|
|
21
21
|
/** Modifiers array for use with BEM. See how to work with modifiers and BEM here: http://getbem.com/introduction/ */
|
|
22
22
|
modifiers?: string[];
|
|
@@ -41,7 +41,7 @@ export default function SkeletonLoader(
|
|
|
41
41
|
contentSize = 3,
|
|
42
42
|
headingSize = 1,
|
|
43
43
|
imageAspectRatio = SkeletonLoaderImageRatios.Square,
|
|
44
|
-
layout = SkeletonLoaderLayouts.
|
|
44
|
+
layout = SkeletonLoaderLayouts.Column,
|
|
45
45
|
showButton = false,
|
|
46
46
|
showContent = true,
|
|
47
47
|
showImage = true,
|
|
@@ -61,6 +61,7 @@ export default function SkeletonLoader(
|
|
|
61
61
|
for (let i = 0; i < headingSize; i++) {
|
|
62
62
|
headingItems.push(
|
|
63
63
|
<div
|
|
64
|
+
key={`heading-${i}`}
|
|
64
65
|
className={bem("skeleton-loader-heading", imageModifiers, "", [
|
|
65
66
|
"skeleton-element",
|
|
66
67
|
])}
|
|
@@ -72,6 +73,7 @@ export default function SkeletonLoader(
|
|
|
72
73
|
for (let i = 0; i < contentSize; i++) {
|
|
73
74
|
contentItems.push(
|
|
74
75
|
<div
|
|
76
|
+
key={`content-${i}`}
|
|
75
77
|
className={bem("skeleton-loader-content", imageModifiers, "", [
|
|
76
78
|
"skeleton-element",
|
|
77
79
|
])}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@mixin skeleton-highlight {
|
|
2
2
|
animation: Pulsate 1000ms cubic-bezier(0.25, -0.5, 1, 0) infinite;
|
|
3
|
-
background: var(--ui-gray-warm
|
|
3
|
+
background: var(--ui-gray-light-warm);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.skeleton-loader {
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
&--border {
|
|
82
|
-
border: 1px solid var(--ui-gray-light);
|
|
82
|
+
border: 1px solid var(--ui-gray-light-cool);
|
|
83
83
|
padding: var(--space-s);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
&--
|
|
86
|
+
&--row {
|
|
87
87
|
@include breakpoint($breakpoint-medium) {
|
|
88
88
|
display: flex;
|
|
89
89
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Meta,
|
|
3
|
+
Story,
|
|
4
|
+
Canvas,
|
|
5
|
+
ArgsTable,
|
|
6
|
+
Description,
|
|
7
|
+
} from "@storybook/addon-docs/blocks";
|
|
8
|
+
import { withDesign } from "storybook-addon-designs";
|
|
9
|
+
import { VStack } from "@chakra-ui/react";
|
|
10
|
+
|
|
11
|
+
import StatusBadge from "./StatusBadge";
|
|
12
|
+
import { StatusBadgeTypes } from "./StatusBadgeTypes";
|
|
13
|
+
import getCSSVariable from "../../helpers/getCSSVariable";
|
|
14
|
+
import { getCategory } from "../../utils/componentCategories";
|
|
15
|
+
import DSProvider from "../../theme/provider";
|
|
16
|
+
|
|
17
|
+
<Meta
|
|
18
|
+
title={getCategory("StatusBadge")}
|
|
19
|
+
component={StatusBadge}
|
|
20
|
+
decorators={[withDesign]}
|
|
21
|
+
parameters={{
|
|
22
|
+
design: {
|
|
23
|
+
type: "figma",
|
|
24
|
+
url:
|
|
25
|
+
"https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Main?node-id=11256%3A0",
|
|
26
|
+
},
|
|
27
|
+
jest: ["StatusBadge.test.tsx"],
|
|
28
|
+
}}
|
|
29
|
+
argTypes={{
|
|
30
|
+
className: { table: { disable: true } },
|
|
31
|
+
id: { table: { disable: true } },
|
|
32
|
+
level: {
|
|
33
|
+
control: {
|
|
34
|
+
type: "select",
|
|
35
|
+
},
|
|
36
|
+
options: Object.values(StatusBadgeTypes).map((value) => value),
|
|
37
|
+
},
|
|
38
|
+
}}
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
# StatusBadge
|
|
42
|
+
|
|
43
|
+
| Component Version | DS Version |
|
|
44
|
+
| ----------------- | ---------- |
|
|
45
|
+
| Added | `0.18.7` |
|
|
46
|
+
| Latest | `0.25.1` |
|
|
47
|
+
|
|
48
|
+
<Description of={StatusBadge} />
|
|
49
|
+
|
|
50
|
+
<Canvas withToolbar>
|
|
51
|
+
<Story
|
|
52
|
+
name="Basic with props"
|
|
53
|
+
args={{ level: StatusBadgeTypes.Low, text: "Registration Required" }}
|
|
54
|
+
>
|
|
55
|
+
{(args) => <StatusBadge {...args}>{args.text}</StatusBadge>}
|
|
56
|
+
</Story>
|
|
57
|
+
</Canvas>
|
|
58
|
+
|
|
59
|
+
<ArgsTable story="Basic with props" />
|
|
60
|
+
|
|
61
|
+
## Patterns
|
|
62
|
+
|
|
63
|
+
### Higher Barrier
|
|
64
|
+
|
|
65
|
+
Used in instances where the associated message is the highest barrier. Use
|
|
66
|
+
`"high"` and `"medium"` for these levels.
|
|
67
|
+
|
|
68
|
+
<Canvas>
|
|
69
|
+
<DSProvider>
|
|
70
|
+
<VStack spacing="s" align="stretch">
|
|
71
|
+
<StatusBadge level={StatusBadgeTypes.High}>
|
|
72
|
+
On-Site Access Only
|
|
73
|
+
</StatusBadge>
|
|
74
|
+
<StatusBadge level={StatusBadgeTypes.Medium}>Cancelled</StatusBadge>
|
|
75
|
+
</VStack>
|
|
76
|
+
</DSProvider>
|
|
77
|
+
</Canvas>
|
|
78
|
+
|
|
79
|
+
### Lower Barrier
|
|
80
|
+
|
|
81
|
+
Used in instances where the associated message is the lower barrier. Use
|
|
82
|
+
`"low"` for this level which is the default.
|
|
83
|
+
|
|
84
|
+
<Canvas>
|
|
85
|
+
<DSProvider>
|
|
86
|
+
<VStack spacing="s" align="stretch">
|
|
87
|
+
<StatusBadge>Library Card Required</StatusBadge>
|
|
88
|
+
<StatusBadge>Registration Required</StatusBadge>
|
|
89
|
+
</VStack>
|
|
90
|
+
</DSProvider>
|
|
91
|
+
</Canvas>
|