@nypl/design-system-react-components 0.25.12 → 0.25.13
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 +63 -1
- package/dist/components/Accordion/Accordion.d.ts +5 -3
- package/dist/components/Accordion/AccordionTypes.d.ts +5 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +1 -1
- package/dist/components/Card/Card.d.ts +11 -20
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +4 -2
- package/dist/components/Heading/Heading.d.ts +4 -4
- package/dist/components/Heading/HeadingTypes.d.ts +1 -1
- package/dist/components/Hero/Hero.d.ts +7 -4
- package/dist/components/Icons/IconTypes.d.ts +1 -0
- package/dist/components/Image/Image.d.ts +25 -7
- package/dist/components/Image/ImageTypes.d.ts +4 -4
- package/dist/components/Logo/LogoTypes.d.ts +2 -2
- package/dist/components/Notification/Notification.d.ts +4 -4
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +4 -2
- package/dist/components/Select/Select.d.ts +2 -2
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -3
- package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +0 -4
- package/dist/components/StructuredContent/StructuredContent.d.ts +9 -22
- package/dist/components/Tabs/Tabs.d.ts +3 -3
- package/dist/components/Template/Template.d.ts +13 -5
- package/dist/components/Text/Text.d.ts +3 -3
- package/dist/components/Text/TextTypes.d.ts +1 -1
- package/dist/components/TextInput/TextInput.d.ts +2 -2
- package/dist/components/Toggle/Toggle.d.ts +6 -7
- package/dist/components/Toggle/{ToggleSizes.d.ts → ToggleTypes.d.ts} +1 -1
- package/dist/design-system-react-components.cjs.development.js +505 -422
- 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 +514 -435
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/helpers/enums.d.ts +4 -0
- package/dist/index.d.ts +7 -8
- package/dist/theme/components/accordion.d.ts +7 -12
- package/dist/theme/components/breadcrumb.d.ts +3 -0
- package/dist/theme/components/card.d.ts +4 -4
- package/dist/theme/components/checkbox.d.ts +1 -0
- package/dist/theme/components/checkboxGroup.d.ts +3 -1
- package/dist/theme/components/global.d.ts +2 -1
- package/dist/theme/components/hero.d.ts +1 -1
- package/dist/theme/components/image.d.ts +1 -1
- package/dist/theme/components/notification.d.ts +4 -4
- package/dist/theme/components/pagination.d.ts +2 -5
- package/dist/theme/components/radio.d.ts +1 -0
- package/dist/theme/components/radioGroup.d.ts +3 -1
- package/dist/theme/components/select.d.ts +3 -0
- package/dist/theme/components/toggle.d.ts +13 -1
- package/package.json +1 -1
- package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +34 -0
- package/src/components/Accordion/Accordion.stories.mdx +150 -66
- package/src/components/Accordion/Accordion.test.tsx +44 -17
- package/src/components/Accordion/Accordion.tsx +50 -20
- package/src/components/Accordion/AccordionTypes.tsx +5 -0
- package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +244 -2
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +17 -15
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +6 -6
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +6 -6
- package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +1 -1
- package/src/components/Card/Card.stories.mdx +236 -165
- package/src/components/Card/Card.test.tsx +36 -18
- package/src/components/Card/Card.tsx +84 -59
- package/src/components/Card/__snapshots__/Card.test.tsx.snap +25 -65
- package/src/components/Chakra/Center.stories.mdx +2 -2
- package/src/components/Checkbox/Checkbox.stories.mdx +13 -1
- package/src/components/Checkbox/Checkbox.test.tsx +58 -2
- package/src/components/Checkbox/Checkbox.tsx +6 -1
- package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +76 -0
- package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +73 -9
- package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +79 -9
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +10 -7
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +169 -0
- package/src/components/ComponentWrapper/ComponentWrapper.tsx +1 -1
- package/src/components/DatePicker/DatePicker.test.tsx +5 -2
- package/src/components/DatePicker/DatePicker.tsx +5 -2
- package/src/components/Form/Form.stories.mdx +47 -9
- package/src/components/Form/Form.test.tsx +1 -1
- package/src/components/Form/Form.tsx +3 -1
- package/src/components/Grid/SimpleGrid.stories.mdx +53 -35
- package/src/components/Grid/SimpleGrid.test.tsx +15 -9
- package/src/components/Heading/Heading.stories.mdx +21 -23
- package/src/components/Heading/Heading.test.tsx +7 -7
- package/src/components/Heading/Heading.tsx +10 -14
- package/src/components/Heading/HeadingTypes.tsx +1 -1
- package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +1 -1
- package/src/components/Hero/Hero.stories.mdx +27 -27
- package/src/components/Hero/Hero.test.tsx +113 -58
- package/src/components/Hero/Hero.tsx +43 -20
- package/src/components/HorizontalRule/HorizontalRule.test.tsx +6 -4
- package/src/components/HorizontalRule/HorizontalRule.tsx +3 -2
- package/src/components/Icons/Icon.stories.mdx +50 -18
- package/src/components/Icons/Icon.test.tsx +13 -2
- package/src/components/Icons/Icon.tsx +11 -6
- package/src/components/Icons/IconTypes.tsx +1 -0
- package/src/components/Image/Image.stories.mdx +133 -68
- package/src/components/Image/Image.test.tsx +32 -48
- package/src/components/Image/Image.tsx +46 -26
- package/src/components/Image/ImageTypes.ts +4 -4
- package/src/components/Image/__snapshots__/Image.test.tsx.snap +60 -13
- package/src/components/Link/Link.tsx +8 -1
- package/src/components/List/List.stories.mdx +1 -1
- package/src/components/List/List.test.tsx +7 -4
- package/src/components/List/List.tsx +7 -4
- package/src/components/Logo/Logo.stories.mdx +13 -13
- package/src/components/Logo/Logo.test.tsx +12 -2
- package/src/components/Logo/Logo.tsx +10 -5
- package/src/components/Logo/LogoTypes.tsx +1 -1
- package/src/components/Notification/Notification.stories.mdx +5 -5
- package/src/components/Notification/Notification.tsx +10 -10
- package/src/components/Pagination/Pagination.stories.mdx +4 -3
- package/src/components/Pagination/Pagination.test.tsx +30 -2
- package/src/components/Pagination/Pagination.tsx +6 -3
- package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +1 -1
- package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +6 -2
- package/src/components/ProgressIndicator/ProgressIndicator.tsx +3 -1
- package/src/components/Radio/Radio.stories.mdx +13 -1
- package/src/components/Radio/Radio.test.tsx +56 -2
- package/src/components/Radio/Radio.tsx +6 -1
- package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +61 -0
- package/src/components/RadioGroup/RadioGroup.stories.mdx +73 -9
- package/src/components/RadioGroup/RadioGroup.test.tsx +72 -7
- package/src/components/RadioGroup/RadioGroup.tsx +10 -7
- package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +140 -0
- package/src/components/SearchBar/SearchBar.stories.mdx +1 -1
- package/src/components/SearchBar/SearchBar.tsx +3 -3
- package/src/components/Select/Select.stories.mdx +26 -16
- package/src/components/Select/Select.test.tsx +1 -36
- package/src/components/Select/Select.tsx +4 -16
- package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +12 -14
- package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +6 -8
- package/src/components/SkeletonLoader/SkeletonLoader.tsx +5 -7
- package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +0 -5
- package/src/components/Slider/Slider.stories.mdx +41 -8
- package/src/components/Slider/Slider.tsx +4 -4
- package/src/components/StatusBadge/StatusBadge.test.tsx +3 -1
- package/src/components/StatusBadge/StatusBadge.tsx +1 -1
- package/src/components/StructuredContent/StructuredContent.stories.mdx +103 -54
- package/src/components/StructuredContent/StructuredContent.test.tsx +129 -102
- package/src/components/StructuredContent/StructuredContent.tsx +43 -53
- package/src/components/StyleGuide/ColorCard.tsx +3 -3
- package/src/components/StyleGuide/Typography.stories.mdx +17 -12
- package/src/components/Table/Table.test.tsx +1 -1
- package/src/components/Table/Table.tsx +3 -1
- package/src/components/Tabs/Tabs.stories.mdx +8 -8
- package/src/components/Tabs/Tabs.test.tsx +13 -11
- package/src/components/Tabs/Tabs.tsx +18 -15
- package/src/components/Template/Template.stories.mdx +62 -25
- package/src/components/Template/Template.test.tsx +35 -5
- package/src/components/Template/Template.tsx +26 -13
- package/src/components/Template/__snapshots__/Template.test.tsx.snap +4 -2
- package/src/components/Text/Text.stories.mdx +13 -15
- package/src/components/Text/Text.test.tsx +6 -15
- package/src/components/Text/Text.tsx +7 -12
- package/src/components/Text/TextTypes.tsx +1 -1
- package/src/components/TextInput/TextInput.stories.mdx +9 -9
- package/src/components/TextInput/TextInput.test.tsx +28 -27
- package/src/components/TextInput/TextInput.tsx +4 -4
- package/src/components/Toggle/Toggle.stories.mdx +12 -22
- package/src/components/Toggle/Toggle.test.tsx +15 -2
- package/src/components/Toggle/Toggle.tsx +8 -9
- package/src/components/Toggle/{ToggleSizes.tsx → ToggleTypes.tsx} +1 -1
- package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +64 -0
- package/src/components/VideoPlayer/VideoPlayer.test.tsx +18 -6
- package/src/components/VideoPlayer/VideoPlayer.tsx +14 -7
- package/src/docs/{Intro.stories.mdx → Welcome.stories.mdx} +5 -9
- package/src/{components/Card/CardTypes.tsx → helpers/enums.ts} +2 -2
- package/src/hooks/tests/useNYPLTheme.test.tsx +1 -1
- package/src/hooks/useCarouselStyles.stories.mdx +10 -0
- package/src/hooks/useNYPLTheme.ts +1 -1
- package/src/index.ts +7 -14
- package/src/theme/components/accordion.ts +7 -12
- package/src/theme/components/breadcrumb.ts +3 -0
- package/src/theme/components/card.ts +29 -20
- package/src/theme/components/checkboxGroup.ts +3 -1
- package/src/theme/components/global.ts +4 -3
- package/src/theme/components/hero.ts +1 -1
- package/src/theme/components/icon.ts +5 -2
- package/src/theme/components/image.ts +1 -1
- package/src/theme/components/list.ts +1 -1
- package/src/theme/components/notification.ts +5 -5
- package/src/theme/components/pagination.ts +2 -5
- package/src/theme/components/progressIndicator.ts +3 -3
- package/src/theme/components/radioGroup.ts +3 -1
- package/src/theme/components/select.ts +6 -0
- package/src/theme/components/toggle.ts +26 -3
- package/src/utils/componentCategories.ts +27 -19
- package/dist/components/Card/CardTypes.d.ts +0 -4
- package/dist/components/CheckboxGroup/CheckboxGroupLayoutTypes.d.ts +0 -4
- package/dist/components/RadioGroup/RadioGroupLayoutTypes.d.ts +0 -4
- package/src/components/CheckboxGroup/CheckboxGroupLayoutTypes.tsx +0 -4
- package/src/components/RadioGroup/RadioGroupLayoutTypes.tsx +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import "./styles.scss";
|
|
2
2
|
export { Box, ButtonGroup, Center, Circle, Flex, Grid, GridItem, HStack, Spacer, Square, Stack, VStack, } from "@chakra-ui/react";
|
|
3
3
|
export { default as Accordion } from "./components/Accordion/Accordion";
|
|
4
|
+
export { AccordionTypes } from "./components/Accordion/AccordionTypes";
|
|
4
5
|
export { default as Breadcrumbs } from "./components/Breadcrumbs/Breadcrumbs";
|
|
5
|
-
export {
|
|
6
|
+
export { BreadcrumbsTypes } from "./components/Breadcrumbs/BreadcrumbsTypes";
|
|
6
7
|
export { default as Button } from "./components/Button/Button";
|
|
7
8
|
export { ButtonTypes } from "./components/Button/ButtonTypes";
|
|
8
9
|
export { default as Card, CardActions, CardContent, CardHeading, } from "./components/Card/Card";
|
|
9
|
-
export { CardLayouts } from "./components/Card/CardTypes";
|
|
10
10
|
export { default as Checkbox } from "./components/Checkbox/Checkbox";
|
|
11
11
|
export { default as CheckboxGroup } from "./components/CheckboxGroup/CheckboxGroup";
|
|
12
|
-
export { CheckboxGroupLayoutTypes } from "./components/CheckboxGroup/CheckboxGroupLayoutTypes";
|
|
13
12
|
export { default as DatePicker, FullDateType, } from "./components/DatePicker/DatePicker";
|
|
14
13
|
export { DatePickerTypes } from "./components/DatePicker/DatePickerTypes";
|
|
15
14
|
export { default as DSProvider } from "./theme/provider";
|
|
@@ -18,7 +17,7 @@ export { default as Form, FormField, FormRow } from "./components/Form/Form";
|
|
|
18
17
|
export { FormGaps } from "./components/Form/FormTypes";
|
|
19
18
|
export { GridGaps } from "./components/Grid/GridTypes";
|
|
20
19
|
export { default as Heading } from "./components/Heading/Heading";
|
|
21
|
-
export {
|
|
20
|
+
export { HeadingSizes, HeadingLevels } from "./components/Heading/HeadingTypes";
|
|
22
21
|
export { default as HelperErrorText } from "./components/HelperErrorText/HelperErrorText";
|
|
23
22
|
export { default as Hero } from "./components/Hero/Hero";
|
|
24
23
|
export { HeroTypes } from "./components/Hero/HeroTypes";
|
|
@@ -28,6 +27,7 @@ export { IconAlign, IconColors, IconNames, IconRotationTypes, IconSizes, IconTyp
|
|
|
28
27
|
export { default as Image } from "./components/Image/Image";
|
|
29
28
|
export { ImageRatios, ImageSizes, ImageTypes, } from "./components/Image/ImageTypes";
|
|
30
29
|
export { default as Label } from "./components/Label/Label";
|
|
30
|
+
export { LayoutTypes } from "./helpers/enums";
|
|
31
31
|
export { default as Link } from "./components/Link/Link";
|
|
32
32
|
export { LinkTypes } from "./components/Link/LinkTypes";
|
|
33
33
|
export { default as List } from "./components/List/List";
|
|
@@ -42,12 +42,11 @@ export { default as ProgressIndicator } from "./components/ProgressIndicator/Pro
|
|
|
42
42
|
export { ProgressIndicatorSizes, ProgressIndicatorTypes, } from "./components/ProgressIndicator/ProgressIndicatorTypes";
|
|
43
43
|
export { default as Radio } from "./components/Radio/Radio";
|
|
44
44
|
export { default as RadioGroup } from "./components/RadioGroup/RadioGroup";
|
|
45
|
-
export { RadioGroupLayoutTypes } from "./components/RadioGroup/RadioGroupLayoutTypes";
|
|
46
45
|
export { default as SearchBar } from "./components/SearchBar/SearchBar";
|
|
47
46
|
export { default as Select } from "./components/Select/Select";
|
|
48
47
|
export { default as SimpleGrid } from "./components/Grid/SimpleGrid";
|
|
49
48
|
export { default as SkeletonLoader } from "./components/SkeletonLoader/SkeletonLoader";
|
|
50
|
-
export { SkeletonLoaderImageRatios
|
|
49
|
+
export { SkeletonLoaderImageRatios } from "./components/SkeletonLoader/SkeletonLoaderTypes";
|
|
51
50
|
export { default as Slider } from "./components/Slider/Slider";
|
|
52
51
|
export { default as StatusBadge } from "./components/StatusBadge/StatusBadge";
|
|
53
52
|
export { StatusBadgeTypes } from "./components/StatusBadge/StatusBadgeTypes";
|
|
@@ -56,11 +55,11 @@ export { StructuredContentImagePosition } from "./components/StructuredContent/S
|
|
|
56
55
|
export { Tabs, TabList, Tab, TabPanels, TabPanel, } from "./components/Tabs/Tabs";
|
|
57
56
|
export { TemplateAppContainer, Template, TemplateAboveHeader, TemplateHeader, TemplateBreakout, TemplateContent, TemplateContentTop, TemplateContentPrimary, TemplateContentSidebar, TemplateFooter, } from "./components/Template/Template";
|
|
58
57
|
export { default as Text } from "./components/Text/Text";
|
|
59
|
-
export {
|
|
58
|
+
export { TextSizes } from "./components/Text/TextTypes";
|
|
60
59
|
export { default as TextInput, TextInputRefType, } from "./components/TextInput/TextInput";
|
|
61
60
|
export { TextInputTypes } from "./components/TextInput/TextInputTypes";
|
|
62
61
|
export { default as Toggle } from "./components/Toggle/Toggle";
|
|
63
|
-
export { ToggleSizes } from "./components/Toggle/
|
|
62
|
+
export { ToggleSizes } from "./components/Toggle/ToggleTypes";
|
|
64
63
|
export { default as useNYPLTheme } from "./hooks/useNYPLTheme";
|
|
65
64
|
export { default as VideoPlayer } from "./components/VideoPlayer/VideoPlayer";
|
|
66
65
|
export { VideoPlayerAspectRatios, VideoPlayerTypes, } from "./components/VideoPlayer/VideoPlayerTypes";
|
|
@@ -2,23 +2,18 @@ declare const Accordion: {
|
|
|
2
2
|
parts: string[];
|
|
3
3
|
baseStyle: {
|
|
4
4
|
container: {
|
|
5
|
-
|
|
6
|
-
borderRightWidth: string;
|
|
7
|
-
borderColor: string;
|
|
5
|
+
border: string;
|
|
8
6
|
width: string;
|
|
9
7
|
};
|
|
10
8
|
button: {
|
|
11
|
-
|
|
12
|
-
fontWeight:
|
|
13
|
-
_hover: {
|
|
14
|
-
bg: string;
|
|
15
|
-
};
|
|
9
|
+
borderWidth: string;
|
|
10
|
+
fontWeight: string;
|
|
16
11
|
};
|
|
17
12
|
panel: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
padding: string;
|
|
14
|
+
borderLeftWidth: string;
|
|
15
|
+
borderRightWidth: string;
|
|
16
|
+
borderBottomWidth: string;
|
|
22
17
|
};
|
|
23
18
|
};
|
|
24
19
|
};
|
|
@@ -169,10 +169,10 @@ declare const _default: {
|
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
171
|
CardImage: {
|
|
172
|
-
baseStyle: ({
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
baseStyle: ({ imageIsAtEnd, isCentered, size, layout }: {
|
|
173
|
+
imageIsAtEnd: any;
|
|
174
|
+
isCentered: any;
|
|
175
|
+
size: any;
|
|
176
176
|
layout: any;
|
|
177
177
|
}) => any;
|
|
178
178
|
};
|
|
@@ -16,6 +16,7 @@ declare const checkboxRadioLabelStyles: {
|
|
|
16
16
|
fontWeight: string;
|
|
17
17
|
marginBottom: string;
|
|
18
18
|
marginLeft: string;
|
|
19
|
+
width: string;
|
|
19
20
|
_disabled: {
|
|
20
21
|
color: string;
|
|
21
22
|
opacity: number;
|
|
@@ -37,7 +38,7 @@ declare const checkboxRadioHelperStyle: {
|
|
|
37
38
|
marginTop: string;
|
|
38
39
|
marginBottom: string;
|
|
39
40
|
};
|
|
40
|
-
declare const checkboxRadioGroupStyles: {
|
|
41
|
+
declare const checkboxRadioGroupStyles: (isFullWidth?: boolean) => {
|
|
41
42
|
helper: {
|
|
42
43
|
marginTop: string;
|
|
43
44
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
Notification: {
|
|
3
3
|
parts: string[];
|
|
4
|
-
baseStyle: ({
|
|
5
|
-
centered: any;
|
|
4
|
+
baseStyle: ({ dismissible, isCentered, noMargin, notificationType }: {
|
|
6
5
|
dismissible: any;
|
|
6
|
+
isCentered: any;
|
|
7
7
|
noMargin: any;
|
|
8
8
|
notificationType: any;
|
|
9
9
|
}) => {
|
|
@@ -72,9 +72,9 @@ declare const _default: {
|
|
|
72
72
|
};
|
|
73
73
|
NotificationHeading: {
|
|
74
74
|
parts: string[];
|
|
75
|
-
baseStyle: ({
|
|
76
|
-
centered: any;
|
|
75
|
+
baseStyle: ({ icon, isCentered, notificationType }: {
|
|
77
76
|
icon: any;
|
|
77
|
+
isCentered: any;
|
|
78
78
|
notificationType: any;
|
|
79
79
|
}) => {
|
|
80
80
|
display: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
declare const Pagination: {
|
|
2
2
|
parts: string[];
|
|
3
3
|
baseStyle: {
|
|
4
|
-
marginBottom: string;
|
|
5
4
|
alignItems: string;
|
|
6
5
|
display: string;
|
|
7
6
|
width: string;
|
|
@@ -9,10 +8,8 @@ declare const Pagination: {
|
|
|
9
8
|
lineHeight: string;
|
|
10
9
|
textDecoration: string;
|
|
11
10
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
marginTop: string;
|
|
15
|
-
};
|
|
11
|
+
ul: {
|
|
12
|
+
marginBottom: string;
|
|
16
13
|
};
|
|
17
14
|
};
|
|
18
15
|
};
|
|
@@ -19,7 +19,7 @@ declare const _default: {
|
|
|
19
19
|
};
|
|
20
20
|
Switch: {
|
|
21
21
|
baseStyle: ({ size }: {
|
|
22
|
-
size:
|
|
22
|
+
size: string;
|
|
23
23
|
}) => {
|
|
24
24
|
alignItems: string;
|
|
25
25
|
opacity: number;
|
|
@@ -67,6 +67,18 @@ declare const _default: {
|
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
+
sizes: {
|
|
71
|
+
sm: {
|
|
72
|
+
container: {
|
|
73
|
+
[x: string]: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
lg: {
|
|
77
|
+
container: {
|
|
78
|
+
[x: string]: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
70
82
|
defaultProps: {
|
|
71
83
|
colorScheme: string;
|
|
72
84
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Meta } from "@storybook/addon-docs";
|
|
2
|
+
|
|
3
|
+
import { getCategory } from "../../utils/componentCategories";
|
|
4
|
+
|
|
5
|
+
<Meta title={getCategory("Skip Navigation")} />
|
|
6
|
+
|
|
7
|
+
# Skip Navigation
|
|
8
|
+
|
|
9
|
+
| Table of Contents |
|
|
10
|
+
| ---------------------------------------------- |
|
|
11
|
+
| 1. [General Information](#general-information) |
|
|
12
|
+
| 2. [Resources](#resources) |
|
|
13
|
+
|
|
14
|
+
## General Information
|
|
15
|
+
|
|
16
|
+
An application's "skip navigation link" is used to skip to the primary or main
|
|
17
|
+
content of a page. This link is located at the top of the page and is usually
|
|
18
|
+
visually hidden until a user focuses on the link. For most applications at
|
|
19
|
+
NYPL, the [NYPL Header](https://github.com/NYPL/dgx-header-component) is used
|
|
20
|
+
and this component already renders a skip navigation link.
|
|
21
|
+
|
|
22
|
+
The link must target an existing anchor on the page and is typically the `id`
|
|
23
|
+
`"#mainContent"` set on the `main` HTML element on the page. While the DS does not
|
|
24
|
+
currently, as of `v0.25.13`, provide a skip navigation link, it does provide the
|
|
25
|
+
anchor element for the link through the `TemplateAppContainer` component.
|
|
26
|
+
|
|
27
|
+
The `TemplateAppContainer` component renders as a `main` HTML element with a
|
|
28
|
+
default `id` of `"mainContent"`. This should be used as the anchor element that
|
|
29
|
+
the skip navigation link points to.
|
|
30
|
+
|
|
31
|
+
## Resources
|
|
32
|
+
|
|
33
|
+
- [WebAim Skip Navigation Link](https://webaim.org/techniques/skipnav/)
|
|
34
|
+
- [A11ymatters Skip Navigation Link](https://www.a11ymatters.com/pattern/skip-link/)
|