@nypl/design-system-react-components 0.25.11 → 0.25.12
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 +31 -0
- package/README.md +4 -16
- package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +1 -0
- package/dist/components/Icons/IconTypes.d.ts +9 -7
- package/dist/components/Logo/LogoSvgs.d.ts +6 -0
- package/dist/components/Logo/LogoTypes.d.ts +6 -0
- package/dist/components/Pagination/Pagination.d.ts +6 -2
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/Template/Template.d.ts +1 -1
- package/dist/design-system-react-components.cjs.development.js +947 -438
- 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 +948 -439
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/components/breadcrumb.d.ts +3 -0
- package/dist/theme/components/checkbox.d.ts +0 -2
- package/dist/theme/components/fieldset.d.ts +2 -0
- package/dist/theme/components/global.d.ts +15 -14
- package/dist/theme/components/globalMixins.d.ts +8 -8
- package/dist/theme/components/list.d.ts +6 -0
- package/dist/theme/components/notification.d.ts +3 -0
- package/dist/theme/components/radio.d.ts +3 -2
- package/dist/theme/components/select.d.ts +2 -9
- package/dist/theme/components/slider.d.ts +8 -4
- package/dist/theme/components/textInput.d.ts +8 -12
- package/dist/theme/components/toggle.d.ts +6 -2
- package/dist/theme/foundations/global.d.ts +31 -3
- package/dist/utils/utils.d.ts +10 -0
- package/package.json +1 -1
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +18 -1
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +10 -0
- package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +1 -0
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +99 -0
- package/src/components/Checkbox/Checkbox.stories.mdx +1 -1
- package/src/components/Checkbox/Checkbox.tsx +1 -0
- package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +6 -6
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +18 -18
- package/src/components/Fieldset/Fieldset.stories.mdx +1 -1
- package/src/components/Icons/Icon.stories.mdx +1 -1
- package/src/components/Icons/IconTypes.tsx +8 -6
- package/src/components/List/List.stories.mdx +1 -1
- package/src/components/Logo/Logo.stories.mdx +1 -1
- package/src/components/Logo/LogoSvgs.tsx +12 -0
- package/src/components/Logo/LogoTypes.tsx +6 -0
- package/src/components/Notification/Notification.stories.mdx +6 -1
- package/src/components/Notification/Notification.test.tsx +20 -9
- package/src/components/Notification/Notification.tsx +6 -4
- package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +103 -8
- package/src/components/Pagination/Pagination.stories.mdx +54 -12
- package/src/components/Pagination/Pagination.test.tsx +63 -5
- package/src/components/Pagination/Pagination.tsx +45 -23
- package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +3 -3
- package/src/components/Radio/Radio.stories.mdx +1 -1
- package/src/components/Radio/Radio.tsx +1 -0
- package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +5 -5
- package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +18 -18
- package/src/components/SearchBar/SearchBar.Test.tsx +20 -2
- package/src/components/SearchBar/SearchBar.stories.mdx +4 -4
- package/src/components/SearchBar/SearchBar.tsx +3 -2
- package/src/components/Select/Select.stories.mdx +1 -1
- package/src/components/Slider/Slider.stories.mdx +1 -1
- package/src/components/Slider/Slider.tsx +4 -1
- package/src/components/StyleGuide/Bidirectionality.stories.mdx +4 -4
- package/src/components/StyleGuide/Colors.stories.mdx +33 -18
- package/src/components/Template/Template.stories.mdx +1 -1
- package/src/components/Template/Template.tsx +2 -6
- package/src/components/Template/__snapshots__/Template.test.tsx.snap +2 -2
- package/src/components/Toggle/Toggle.stories.mdx +1 -1
- package/src/components/Toggle/Toggle.tsx +2 -1
- package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +4 -4
- package/src/docs/Chakra.stories.mdx +1 -1
- package/src/styles/base/_place-holder.scss +2 -0
- package/src/styles.scss +0 -2
- package/src/theme/components/breadcrumb.ts +4 -0
- package/src/theme/components/checkbox.ts +3 -7
- package/src/theme/components/fieldset.ts +2 -0
- package/src/theme/components/global.ts +18 -15
- package/src/theme/components/globalMixins.ts +8 -8
- package/src/theme/components/list.ts +4 -0
- package/src/theme/components/notification.ts +3 -0
- package/src/theme/components/radio.ts +3 -6
- package/src/theme/components/select.ts +3 -3
- package/src/theme/components/slider.ts +12 -9
- package/src/theme/components/textInput.ts +2 -2
- package/src/theme/components/toggle.ts +41 -37
- package/src/theme/foundations/colors.ts +19 -12
- package/src/theme/foundations/global.ts +17 -5
- package/src/theme/foundations/typography.ts +1 -1
- package/src/utils/componentCategories.ts +1 -1
- package/src/utils/utils.ts +28 -0
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -13
- package/src/components/Pagination/Pagination.stories.tsx +0 -54
- package/src/styles/base/_03-base.scss +0 -25
- package/src/styles/base/_04-focus.scss +0 -22
package/dist/styles.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */@import "~react-datepicker/dist/react-datepicker.css";html{-webkit-text-size-adjust:100%;line-height:1.15}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}
|
|
2
2
|
|
|
3
|
-
/*! system-font.css v2.0.2 | CC0-1.0 License | github.com/jonathantneal/system-font-css */@font-face{font-family:system-ui;font-style:normal;font-weight:300;src:local(".SFNSText-Light"),local(".HelveticaNeueDeskInterface-Light"),local(".LucidaGrandeUI"),local("Segoe UI Light"),local("Ubuntu Light"),local("Roboto-Light"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:italic;font-weight:300;src:local(".SFNSText-LightItalic"),local(".HelveticaNeueDeskInterface-Italic"),local(".LucidaGrandeUI"),local("Segoe UI Light Italic"),local("Ubuntu Light Italic"),local("Roboto-LightItalic"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:normal;font-weight:400;src:local(".SFNSText-Regular"),local(".HelveticaNeueDeskInterface-Regular"),local(".LucidaGrandeUI"),local("Segoe UI"),local("Ubuntu"),local("Roboto-Regular"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:italic;font-weight:400;src:local(".SFNSText-Italic"),local(".HelveticaNeueDeskInterface-Italic"),local(".LucidaGrandeUI"),local("Segoe UI Italic"),local("Ubuntu Italic"),local("Roboto-Italic"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:normal;font-weight:500;src:local(".SFNSText-Medium"),local(".HelveticaNeueDeskInterface-MediumP4"),local(".LucidaGrandeUI"),local("Segoe UI Semibold"),local("Ubuntu Medium"),local("Roboto-Medium"),local("DroidSans-Bold"),local("Tahoma Bold")}@font-face{font-family:system-ui;font-style:italic;font-weight:500;src:local(".SFNSText-MediumItalic"),local(".HelveticaNeueDeskInterface-MediumItalicP4"),local(".LucidaGrandeUI"),local("Segoe UI Semibold Italic"),local("Ubuntu Medium Italic"),local("Roboto-MediumItalic"),local("DroidSans-Bold"),local("Tahoma Bold")}@font-face{font-family:system-ui;font-style:normal;font-weight:700;src:local(".SFNSText-Bold"),local(".HelveticaNeueDeskInterface-Bold"),local(".LucidaGrandeUI"),local("Segoe UI Bold"),local("Ubuntu Bold"),local("Roboto-Bold"),local("DroidSans-Bold"),local("Tahoma Bold")}@font-face{font-family:system-ui;font-style:italic;font-weight:700;src:local(".SFNSText-BoldItalic"),local(".HelveticaNeueDeskInterface-BoldItalic"),local(".LucidaGrandeUI"),local("Segoe UI Bold Italic"),local("Ubuntu Bold Italic"),local("Roboto-BoldItalic"),local("DroidSans-Bold"),local("Tahoma Bold")}:root{--nypl-breakpoint-small:320px;--nypl-breakpoint-medium:600px;--nypl-breakpoint-large:960px;--nypl-breakpoint-xl:1280px}.container{padding:var(--nypl-space-s)}.
|
|
3
|
+
/*! system-font.css v2.0.2 | CC0-1.0 License | github.com/jonathantneal/system-font-css */@font-face{font-family:system-ui;font-style:normal;font-weight:300;src:local(".SFNSText-Light"),local(".HelveticaNeueDeskInterface-Light"),local(".LucidaGrandeUI"),local("Segoe UI Light"),local("Ubuntu Light"),local("Roboto-Light"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:italic;font-weight:300;src:local(".SFNSText-LightItalic"),local(".HelveticaNeueDeskInterface-Italic"),local(".LucidaGrandeUI"),local("Segoe UI Light Italic"),local("Ubuntu Light Italic"),local("Roboto-LightItalic"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:normal;font-weight:400;src:local(".SFNSText-Regular"),local(".HelveticaNeueDeskInterface-Regular"),local(".LucidaGrandeUI"),local("Segoe UI"),local("Ubuntu"),local("Roboto-Regular"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:italic;font-weight:400;src:local(".SFNSText-Italic"),local(".HelveticaNeueDeskInterface-Italic"),local(".LucidaGrandeUI"),local("Segoe UI Italic"),local("Ubuntu Italic"),local("Roboto-Italic"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:normal;font-weight:500;src:local(".SFNSText-Medium"),local(".HelveticaNeueDeskInterface-MediumP4"),local(".LucidaGrandeUI"),local("Segoe UI Semibold"),local("Ubuntu Medium"),local("Roboto-Medium"),local("DroidSans-Bold"),local("Tahoma Bold")}@font-face{font-family:system-ui;font-style:italic;font-weight:500;src:local(".SFNSText-MediumItalic"),local(".HelveticaNeueDeskInterface-MediumItalicP4"),local(".LucidaGrandeUI"),local("Segoe UI Semibold Italic"),local("Ubuntu Medium Italic"),local("Roboto-MediumItalic"),local("DroidSans-Bold"),local("Tahoma Bold")}@font-face{font-family:system-ui;font-style:normal;font-weight:700;src:local(".SFNSText-Bold"),local(".HelveticaNeueDeskInterface-Bold"),local(".LucidaGrandeUI"),local("Segoe UI Bold"),local("Ubuntu Bold"),local("Roboto-Bold"),local("DroidSans-Bold"),local("Tahoma Bold")}@font-face{font-family:system-ui;font-style:italic;font-weight:700;src:local(".SFNSText-BoldItalic"),local(".HelveticaNeueDeskInterface-BoldItalic"),local(".LucidaGrandeUI"),local("Segoe UI Bold Italic"),local("Ubuntu Bold Italic"),local("Roboto-BoldItalic"),local("DroidSans-Bold"),local("Tahoma Bold")}:root{--nypl-breakpoint-small:320px;--nypl-breakpoint-medium:600px;--nypl-breakpoint-large:960px;--nypl-breakpoint-xl:1280px}.container{padding:var(--nypl-space-s)}.placeholder{--color-place-holder:var(--nypl-colors-ui-gray-dark);align-items:center;border:4px dashed var(--color-place-holder);color:var(--color-place-holder);display:flex;font-size:3rem;justify-content:center;line-height:1.4;margin-bottom:var(--nypl-space-l);padding:4rem 1rem;width:100%}@media (min-width:960px){.placeholder{margin-bottom:var(--nypl-space-xl)}}.placeholder--full{margin-bottom:var(--nypl-space-xxl)}@media (min-width:960px){.placeholder--full{margin-bottom:var(--nypl-space-xxxl)}}.placeholder--short{padding:1rem}.react-autosuggest__container{display:inline;position:relative;width:100%}.react-autosuggest__input--focused{outline:none}.react-autosuggest__input--open{border-bottom-left-radius:0;border-bottom-right-radius:0;width:100%}.react-autosuggest__suggestions-container{display:none;width:100%}.react-autosuggest__suggestions-container--open{background-color:var(--nypl-colors-ui-white);display:block;font-weight:300;margin-top:1px;outline:1px solid var(--nypl-colors-ui-gray-light-cool);position:relative;width:100%;z-index:2}.react-autosuggest__suggestions-list{list-style-type:none;margin:0;padding:0}.react-autosuggest__suggestion{cursor:pointer;padding:var(--nypl-space-xs)}.react-autosuggest__suggestion--highlighted{background-color:var(--nypl-colors-ui-gray-light-cool)}.auto-suggest-bottom{padding:var(--nypl-space-xs)}.date-picker-calendar .react-datepicker__year-wrapper{max-width:220px}.date-picker-calendar .react-datepicker__day--in-range.react-datepicker__day--in-range,.date-picker-calendar .react-datepicker__month--in-range.react-datepicker__day--in-range,.date-picker-calendar .react-datepicker__year--in-range.react-datepicker__day--in-range{opacity:.5}.date-picker-calendar .react-datepicker__day--in-range,.date-picker-calendar .react-datepicker__day--in-selecting-range,.date-picker-calendar .react-datepicker__day--keyboard-selected,.date-picker-calendar .react-datepicker__day-text--keyboard-selected,.date-picker-calendar .react-datepicker__month--in-range,.date-picker-calendar .react-datepicker__month--in-selecting-range,.date-picker-calendar .react-datepicker__month--keyboard-selected,.date-picker-calendar .react-datepicker__month-text--keyboard-selected,.date-picker-calendar .react-datepicker__year--in-range,.date-picker-calendar .react-datepicker__year--in-selecting-range,.date-picker-calendar .react-datepicker__year--keyboard-selected,.date-picker-calendar .react-datepicker__year-text--keyboard-selected{background-color:var(--nypl-colors-ui-black);border-radius:0;color:var(--nypl-colors-ui-white);opacity:.3}.date-picker-calendar .react-datepicker__day--selected,.date-picker-calendar .react-datepicker__day-text--selected,.date-picker-calendar .react-datepicker__month--selected,.date-picker-calendar .react-datepicker__month-text--selected,.date-picker-calendar .react-datepicker__year--selected,.date-picker-calendar .react-datepicker__year-text--selected{background-color:var(--nypl-colors-ui-black);border-radius:0;color:var(--nypl-colors-ui-white);opacity:1}.date-picker-calendar .react-datepicker__triangle{transform:translate(32px)!important}.no-scroll{overflow:hidden;position:fixed;top:-100vh}.modal{background-color:var(--nypl-colors-ui-gray-x-light-warm);height:100vh;left:0;overflow-y:auto;padding:var(--nypl-space-s);position:fixed;top:0;width:100vw;z-index:999}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/** Export "mixin" styles. */
|
|
2
2
|
export { wrapperStyles } from "./globalMixins";
|
|
3
3
|
/** Reusable component styles. */
|
|
4
|
-
declare const activeFocus: {
|
|
5
|
-
border: string;
|
|
6
|
-
borderColor: string;
|
|
7
|
-
zIndex: string;
|
|
4
|
+
declare const activeFocus: (darkMode?: boolean) => {
|
|
8
5
|
outline: string;
|
|
6
|
+
outlineOffset: string;
|
|
9
7
|
outlineColor: string;
|
|
8
|
+
zIndex: string;
|
|
10
9
|
};
|
|
11
10
|
declare const helperTextMargin: {
|
|
12
11
|
marginTop: string;
|
|
@@ -14,11 +13,9 @@ declare const helperTextMargin: {
|
|
|
14
13
|
};
|
|
15
14
|
declare const checkboxRadioLabelStyles: {
|
|
16
15
|
userSelect: string;
|
|
17
|
-
fontSize: string;
|
|
18
16
|
fontWeight: string;
|
|
19
17
|
marginBottom: string;
|
|
20
18
|
marginLeft: string;
|
|
21
|
-
verticalAlign: string;
|
|
22
19
|
_disabled: {
|
|
23
20
|
color: string;
|
|
24
21
|
opacity: number;
|
|
@@ -40,6 +37,14 @@ declare const checkboxRadioHelperStyle: {
|
|
|
40
37
|
marginTop: string;
|
|
41
38
|
marginBottom: string;
|
|
42
39
|
};
|
|
40
|
+
declare const checkboxRadioGroupStyles: {
|
|
41
|
+
helper: {
|
|
42
|
+
marginTop: string;
|
|
43
|
+
};
|
|
44
|
+
stack: {
|
|
45
|
+
width: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
43
48
|
declare const labelLegendText: {
|
|
44
49
|
alignItems: string;
|
|
45
50
|
width: string;
|
|
@@ -54,12 +59,8 @@ declare const labelLegendText: {
|
|
|
54
59
|
fontWeight: string;
|
|
55
60
|
};
|
|
56
61
|
};
|
|
57
|
-
declare const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
};
|
|
61
|
-
stack: {
|
|
62
|
-
width: string;
|
|
63
|
-
};
|
|
62
|
+
declare const textMargin: {
|
|
63
|
+
margin: string;
|
|
64
|
+
marginBottom: string;
|
|
64
65
|
};
|
|
65
|
-
export { activeFocus, checkboxRadioControlSize, checkboxRadioGroupStyles, checkboxRadioHelperStyle, checkboxRadioLabelStyles, helperTextMargin, labelLegendText, };
|
|
66
|
+
export { activeFocus, checkboxRadioControlSize, checkboxRadioGroupStyles, checkboxRadioHelperStyle, checkboxRadioLabelStyles, helperTextMargin, labelLegendText, textMargin, };
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
* These objects are also SCSS mixins but are now JS objects in the
|
|
3
3
|
* context of css-in-js and the custom NYPL-theme.
|
|
4
4
|
*/
|
|
5
|
+
declare const screenreaderOnly: {
|
|
6
|
+
clip: string;
|
|
7
|
+
height: string;
|
|
8
|
+
overflow: string;
|
|
9
|
+
position: string;
|
|
10
|
+
width: string;
|
|
11
|
+
wordWrap: string;
|
|
12
|
+
};
|
|
5
13
|
declare const wrapperStyles: {
|
|
6
14
|
marginY: string;
|
|
7
15
|
marginX: string;
|
|
@@ -12,12 +20,4 @@ declare const wrapperStyles: {
|
|
|
12
20
|
paddingLeft: string;
|
|
13
21
|
width: string;
|
|
14
22
|
};
|
|
15
|
-
declare const screenreaderOnly: {
|
|
16
|
-
clip: string;
|
|
17
|
-
height: string;
|
|
18
|
-
overflow: string;
|
|
19
|
-
position: string;
|
|
20
|
-
width: string;
|
|
21
|
-
wordWrap: string;
|
|
22
|
-
};
|
|
23
23
|
export { screenreaderOnly, wrapperStyles };
|
|
@@ -57,11 +57,9 @@ declare const Radio: {
|
|
|
57
57
|
};
|
|
58
58
|
label: {
|
|
59
59
|
userSelect: string;
|
|
60
|
-
fontSize: string;
|
|
61
60
|
fontWeight: string;
|
|
62
61
|
marginBottom: string;
|
|
63
62
|
marginLeft: string;
|
|
64
|
-
verticalAlign: string;
|
|
65
63
|
_disabled: {
|
|
66
64
|
color: string;
|
|
67
65
|
opacity: number;
|
|
@@ -86,6 +84,9 @@ declare const Radio: {
|
|
|
86
84
|
h: string;
|
|
87
85
|
w: string;
|
|
88
86
|
};
|
|
87
|
+
label: {
|
|
88
|
+
fontSize: string;
|
|
89
|
+
};
|
|
89
90
|
};
|
|
90
91
|
};
|
|
91
92
|
defaultProps: {
|
|
@@ -10,6 +10,7 @@ declare const Select: {
|
|
|
10
10
|
backgroundColor: string;
|
|
11
11
|
borderRadius: string;
|
|
12
12
|
borderColor: string;
|
|
13
|
+
fontSize: string;
|
|
13
14
|
paddingTop: string;
|
|
14
15
|
paddingRight: string;
|
|
15
16
|
paddingBottom: string;
|
|
@@ -18,18 +19,10 @@ declare const Select: {
|
|
|
18
19
|
borderColor: string;
|
|
19
20
|
};
|
|
20
21
|
_active: {
|
|
21
|
-
border: string;
|
|
22
|
-
borderColor: string;
|
|
23
|
-
zIndex: string;
|
|
24
22
|
outline: string;
|
|
23
|
+
outlineOffset: string;
|
|
25
24
|
outlineColor: string;
|
|
26
|
-
};
|
|
27
|
-
_focus: {
|
|
28
|
-
border: string;
|
|
29
|
-
borderColor: string;
|
|
30
25
|
zIndex: string;
|
|
31
|
-
outline: string;
|
|
32
|
-
outlineColor: string;
|
|
33
26
|
};
|
|
34
27
|
_disabled: {
|
|
35
28
|
color: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const CustomSlider: {
|
|
2
2
|
parts: string[];
|
|
3
|
-
baseStyle: ({ isDisabled, isInvalid,
|
|
3
|
+
baseStyle: ({ isDisabled, isInvalid, showBoxes, showValues }: {
|
|
4
4
|
isDisabled: any;
|
|
5
5
|
isInvalid: any;
|
|
6
|
-
isRangeSlider: any;
|
|
7
6
|
showBoxes: any;
|
|
7
|
+
showValues: any;
|
|
8
8
|
}) => {
|
|
9
9
|
container: {
|
|
10
10
|
display: string;
|
|
@@ -14,21 +14,25 @@ declare const CustomSlider: {
|
|
|
14
14
|
marginTop: string;
|
|
15
15
|
};
|
|
16
16
|
leftValue: {
|
|
17
|
-
marginLeft: string;
|
|
18
17
|
marginTop: string;
|
|
19
18
|
marginBottom: string;
|
|
20
19
|
marginRight: string;
|
|
20
|
+
marginLeft: string;
|
|
21
21
|
};
|
|
22
22
|
rightValue: {
|
|
23
|
+
marginLeft: string;
|
|
23
24
|
marginRight: string;
|
|
24
25
|
marginTop: string;
|
|
25
26
|
marginBottom: string;
|
|
26
|
-
marginLeft: string;
|
|
27
27
|
};
|
|
28
28
|
textInput: {
|
|
29
29
|
minWidth: string;
|
|
30
30
|
color: string;
|
|
31
31
|
};
|
|
32
|
+
sliderContainer: {
|
|
33
|
+
marginLeft: string;
|
|
34
|
+
marginRight: string;
|
|
35
|
+
};
|
|
32
36
|
filledTrack: {
|
|
33
37
|
bgColor: string;
|
|
34
38
|
};
|
|
@@ -22,18 +22,16 @@ declare const TextInput: {
|
|
|
22
22
|
opacity: string;
|
|
23
23
|
};
|
|
24
24
|
_active: {
|
|
25
|
-
border: string;
|
|
26
|
-
borderColor: string;
|
|
27
|
-
zIndex: string;
|
|
28
25
|
outline: string;
|
|
26
|
+
outlineOffset: string;
|
|
29
27
|
outlineColor: string;
|
|
28
|
+
zIndex: string;
|
|
30
29
|
};
|
|
31
30
|
_focus: {
|
|
32
|
-
border: string;
|
|
33
|
-
borderColor: string;
|
|
34
|
-
zIndex: string;
|
|
35
31
|
outline: string;
|
|
32
|
+
outlineOffset: string;
|
|
36
33
|
outlineColor: string;
|
|
34
|
+
zIndex: string;
|
|
37
35
|
};
|
|
38
36
|
_placeholder: {
|
|
39
37
|
color: string;
|
|
@@ -65,18 +63,16 @@ declare const TextInput: {
|
|
|
65
63
|
opacity: string;
|
|
66
64
|
};
|
|
67
65
|
_active: {
|
|
68
|
-
border: string;
|
|
69
|
-
borderColor: string;
|
|
70
|
-
zIndex: string;
|
|
71
66
|
outline: string;
|
|
67
|
+
outlineOffset: string;
|
|
72
68
|
outlineColor: string;
|
|
69
|
+
zIndex: string;
|
|
73
70
|
};
|
|
74
71
|
_focus: {
|
|
75
|
-
border: string;
|
|
76
|
-
borderColor: string;
|
|
77
|
-
zIndex: string;
|
|
78
72
|
outline: string;
|
|
73
|
+
outlineOffset: string;
|
|
79
74
|
outlineColor: string;
|
|
75
|
+
zIndex: string;
|
|
80
76
|
};
|
|
81
77
|
_placeholder: {
|
|
82
78
|
color: string;
|
|
@@ -3,8 +3,8 @@ declare const _default: {
|
|
|
3
3
|
parts: string[];
|
|
4
4
|
baseStyle: {
|
|
5
5
|
label: {
|
|
6
|
-
display: string;
|
|
7
6
|
alignItems: string;
|
|
7
|
+
display: string;
|
|
8
8
|
width: string;
|
|
9
9
|
};
|
|
10
10
|
helper: {
|
|
@@ -18,7 +18,10 @@ declare const _default: {
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
Switch: {
|
|
21
|
-
baseStyle: {
|
|
21
|
+
baseStyle: ({ size }: {
|
|
22
|
+
size: any;
|
|
23
|
+
}) => {
|
|
24
|
+
alignItems: string;
|
|
22
25
|
opacity: number;
|
|
23
26
|
track: {
|
|
24
27
|
border: string;
|
|
@@ -53,6 +56,7 @@ declare const _default: {
|
|
|
53
56
|
label: {
|
|
54
57
|
fontSize: string;
|
|
55
58
|
marginLeft: string;
|
|
59
|
+
marginTop: string;
|
|
56
60
|
_disabled: {
|
|
57
61
|
fontStyle: string;
|
|
58
62
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* These rules affect all the global elements on the `body` element of the
|
|
3
|
-
* page when the `DSProvider` component is used.
|
|
4
|
-
* `nypl-ds` CSS class name is not used in a consuming application, these
|
|
5
|
-
* rules will still take effect.
|
|
3
|
+
* page when the `DSProvider` component is used.
|
|
6
4
|
*/
|
|
7
5
|
declare const global: {
|
|
8
6
|
body: {
|
|
@@ -21,8 +19,38 @@ declare const global: {
|
|
|
21
19
|
svg: {
|
|
22
20
|
display: string;
|
|
23
21
|
};
|
|
22
|
+
"button, select, input, textarea": {
|
|
23
|
+
"&:not([disabled])": {
|
|
24
|
+
_focus: {
|
|
25
|
+
outline: string;
|
|
26
|
+
outlineOffset: string;
|
|
27
|
+
outlineColor: string;
|
|
28
|
+
zIndex: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
"iframe, [href], [tabindex], [contentEditable='true']": {
|
|
33
|
+
_focus: {
|
|
34
|
+
outline: string;
|
|
35
|
+
outlineOffset: string;
|
|
36
|
+
outlineColor: string;
|
|
37
|
+
zIndex: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
24
40
|
p: {
|
|
25
41
|
margin: string;
|
|
42
|
+
marginBottom: string;
|
|
43
|
+
};
|
|
44
|
+
ul: {
|
|
45
|
+
margin: string;
|
|
46
|
+
marginBottom: string;
|
|
47
|
+
};
|
|
48
|
+
ol: {
|
|
49
|
+
margin: string;
|
|
50
|
+
marginBottom: string;
|
|
51
|
+
};
|
|
52
|
+
"*, *::before, &::after": {
|
|
53
|
+
boxSizing: string;
|
|
26
54
|
};
|
|
27
55
|
};
|
|
28
56
|
export default global;
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -20,3 +20,13 @@ export declare const getStorybookEnumValues: (enumObject: any, name: any) => {
|
|
|
20
20
|
options: string[];
|
|
21
21
|
getValue: (key: any) => any;
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Given a pagination's pageCount, this will return (1) a page number,
|
|
25
|
+
* derived from the current URL, and (2) a function that, when passed to
|
|
26
|
+
* Pagination component, makes the URL change and refreshes the page.
|
|
27
|
+
* @NOTE this is only used for Storybook documentation.
|
|
28
|
+
*/
|
|
29
|
+
export declare const getStorybookHrefProps: (pageCount: any) => {
|
|
30
|
+
computedCurrentPage: number;
|
|
31
|
+
getPageHref: (selectedPage: any) => string;
|
|
32
|
+
};
|
package/package.json
CHANGED
|
@@ -49,7 +49,7 @@ export const enumValues = getStorybookEnumValues(
|
|
|
49
49
|
| Component Version | DS Version |
|
|
50
50
|
| ----------------- | ---------- |
|
|
51
51
|
| Added | `0.0.3` |
|
|
52
|
-
| Latest | `0.25.
|
|
52
|
+
| Latest | `0.25.12` |
|
|
53
53
|
|
|
54
54
|
<Description of={Breadcrumbs} />
|
|
55
55
|
|
|
@@ -160,6 +160,23 @@ The `Breadcrumbs` component background color can be set using the `colorVariant`
|
|
|
160
160
|
</DSProvider>
|
|
161
161
|
</Canvas>
|
|
162
162
|
|
|
163
|
+
<Canvas>
|
|
164
|
+
<DSProvider>
|
|
165
|
+
<Heading level={HeadingLevels.Three}>Education</Heading>
|
|
166
|
+
<Breadcrumbs
|
|
167
|
+
breadcrumbsData={[
|
|
168
|
+
{ url: "#", text: "Parent" },
|
|
169
|
+
{ url: "#", text: "Child" },
|
|
170
|
+
{
|
|
171
|
+
url: "#",
|
|
172
|
+
text: "Grandchild",
|
|
173
|
+
},
|
|
174
|
+
]}
|
|
175
|
+
colorVariant={ColorVariants.Education}
|
|
176
|
+
/>
|
|
177
|
+
</DSProvider>
|
|
178
|
+
</Canvas>
|
|
179
|
+
|
|
163
180
|
<Canvas>
|
|
164
181
|
<DSProvider>
|
|
165
182
|
<Heading level={HeadingLevels.Three}>Locations</Heading>
|
|
@@ -74,6 +74,15 @@ describe("Breadcrumbs Snapshot", () => {
|
|
|
74
74
|
/>
|
|
75
75
|
)
|
|
76
76
|
.toJSON();
|
|
77
|
+
const breadcrumbsEducationVariant = renderer
|
|
78
|
+
.create(
|
|
79
|
+
<Breadcrumbs
|
|
80
|
+
breadcrumbsData={breadcrumbsData}
|
|
81
|
+
colorVariant={ColorVariants.Education}
|
|
82
|
+
id="breadcrumbs-test"
|
|
83
|
+
/>
|
|
84
|
+
)
|
|
85
|
+
.toJSON();
|
|
77
86
|
const breadcrumbsAdditionalStyles = renderer
|
|
78
87
|
.create(
|
|
79
88
|
<Breadcrumbs
|
|
@@ -90,6 +99,7 @@ describe("Breadcrumbs Snapshot", () => {
|
|
|
90
99
|
expect(breadcrumbsVariantColor).toMatchSnapshot();
|
|
91
100
|
expect(breadcrumbsBlogsVariant).toMatchSnapshot();
|
|
92
101
|
expect(breadcrumbsLocationsVariant).toMatchSnapshot();
|
|
102
|
+
expect(breadcrumbsEducationVariant).toMatchSnapshot();
|
|
93
103
|
expect(breadcrumbsAdditionalStyles).toMatchSnapshot();
|
|
94
104
|
});
|
|
95
105
|
});
|
|
@@ -397,6 +397,105 @@ exports[`Breadcrumbs Snapshot Renders the UI snapshot correctly 4`] = `
|
|
|
397
397
|
`;
|
|
398
398
|
|
|
399
399
|
exports[`Breadcrumbs Snapshot Renders the UI snapshot correctly 5`] = `
|
|
400
|
+
<nav
|
|
401
|
+
aria-label="Breadcrumb"
|
|
402
|
+
className="chakra-breadcrumb css-0"
|
|
403
|
+
id="breadcrumbs-test"
|
|
404
|
+
>
|
|
405
|
+
<ol
|
|
406
|
+
className="chakra-breadcrumb__list css-0"
|
|
407
|
+
>
|
|
408
|
+
<li
|
|
409
|
+
className="chakra-breadcrumb__list-item css-18biwo"
|
|
410
|
+
>
|
|
411
|
+
<a
|
|
412
|
+
className="chakra-breadcrumb__link css-0"
|
|
413
|
+
href="#string1"
|
|
414
|
+
>
|
|
415
|
+
<span
|
|
416
|
+
className="breadcrumb-label"
|
|
417
|
+
>
|
|
418
|
+
string1
|
|
419
|
+
</span>
|
|
420
|
+
</a>
|
|
421
|
+
<span
|
|
422
|
+
className="css-t4q1nq"
|
|
423
|
+
role="presentation"
|
|
424
|
+
>
|
|
425
|
+
/
|
|
426
|
+
</span>
|
|
427
|
+
</li>
|
|
428
|
+
<li
|
|
429
|
+
className="chakra-breadcrumb__list-item css-18biwo"
|
|
430
|
+
>
|
|
431
|
+
<a
|
|
432
|
+
className="chakra-breadcrumb__link css-0"
|
|
433
|
+
href="#string2"
|
|
434
|
+
>
|
|
435
|
+
<svg
|
|
436
|
+
aria-hidden={true}
|
|
437
|
+
className="chakra-icon breadcrumbs-icon css-onkibi"
|
|
438
|
+
focusable={false}
|
|
439
|
+
id="breadcrumbs-test__backarrow"
|
|
440
|
+
role="img"
|
|
441
|
+
title="arrow icon"
|
|
442
|
+
viewBox="0 0 24 24"
|
|
443
|
+
>
|
|
444
|
+
<g
|
|
445
|
+
stroke="currentColor"
|
|
446
|
+
strokeWidth="1.5"
|
|
447
|
+
>
|
|
448
|
+
<path
|
|
449
|
+
d="M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"
|
|
450
|
+
fill="none"
|
|
451
|
+
strokeLinecap="round"
|
|
452
|
+
/>
|
|
453
|
+
<path
|
|
454
|
+
d="M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"
|
|
455
|
+
fill="currentColor"
|
|
456
|
+
strokeLinecap="round"
|
|
457
|
+
/>
|
|
458
|
+
<circle
|
|
459
|
+
cx="12"
|
|
460
|
+
cy="12"
|
|
461
|
+
fill="none"
|
|
462
|
+
r="11.25"
|
|
463
|
+
strokeMiterlimit="10"
|
|
464
|
+
/>
|
|
465
|
+
</g>
|
|
466
|
+
</svg>
|
|
467
|
+
<span
|
|
468
|
+
className="breadcrumb-label"
|
|
469
|
+
>
|
|
470
|
+
string2
|
|
471
|
+
</span>
|
|
472
|
+
</a>
|
|
473
|
+
<span
|
|
474
|
+
className="css-t4q1nq"
|
|
475
|
+
role="presentation"
|
|
476
|
+
>
|
|
477
|
+
/
|
|
478
|
+
</span>
|
|
479
|
+
</li>
|
|
480
|
+
<li
|
|
481
|
+
className="chakra-breadcrumb__list-item css-18biwo"
|
|
482
|
+
>
|
|
483
|
+
<span
|
|
484
|
+
aria-current="page"
|
|
485
|
+
className="chakra-breadcrumb__link css-0"
|
|
486
|
+
>
|
|
487
|
+
<span
|
|
488
|
+
className="breadcrumb-label"
|
|
489
|
+
>
|
|
490
|
+
string3
|
|
491
|
+
</span>
|
|
492
|
+
</span>
|
|
493
|
+
</li>
|
|
494
|
+
</ol>
|
|
495
|
+
</nav>
|
|
496
|
+
`;
|
|
497
|
+
|
|
498
|
+
exports[`Breadcrumbs Snapshot Renders the UI snapshot correctly 6`] = `
|
|
400
499
|
<nav
|
|
401
500
|
aria-label="Breadcrumb"
|
|
402
501
|
className="chakra-breadcrumb css-1f2fw9u"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Checkbox Renders the UI snapshot correctly 1`] = `
|
|
4
4
|
<label
|
|
5
|
-
className="chakra-checkbox css-
|
|
5
|
+
className="chakra-checkbox css-g8du1g"
|
|
6
6
|
onClick={[Function]}
|
|
7
7
|
>
|
|
8
8
|
<input
|
|
@@ -65,7 +65,7 @@ exports[`Checkbox Renders the UI snapshot correctly 1`] = `
|
|
|
65
65
|
|
|
66
66
|
exports[`Checkbox Renders the UI snapshot correctly 2`] = `
|
|
67
67
|
<label
|
|
68
|
-
className="chakra-checkbox css-
|
|
68
|
+
className="chakra-checkbox css-g8du1g"
|
|
69
69
|
data-checked=""
|
|
70
70
|
onClick={[Function]}
|
|
71
71
|
>
|
|
@@ -131,7 +131,7 @@ exports[`Checkbox Renders the UI snapshot correctly 2`] = `
|
|
|
131
131
|
|
|
132
132
|
exports[`Checkbox Renders the UI snapshot correctly 3`] = `
|
|
133
133
|
<label
|
|
134
|
-
className="chakra-checkbox css-
|
|
134
|
+
className="chakra-checkbox css-g8du1g"
|
|
135
135
|
data-checked=""
|
|
136
136
|
onClick={[Function]}
|
|
137
137
|
>
|
|
@@ -219,7 +219,7 @@ exports[`Checkbox Renders the UI snapshot correctly 3`] = `
|
|
|
219
219
|
|
|
220
220
|
exports[`Checkbox Renders the UI snapshot correctly 4`] = `
|
|
221
221
|
<label
|
|
222
|
-
className="chakra-checkbox css-
|
|
222
|
+
className="chakra-checkbox css-g8du1g"
|
|
223
223
|
onClick={[Function]}
|
|
224
224
|
>
|
|
225
225
|
<input
|
|
@@ -282,7 +282,7 @@ exports[`Checkbox Renders the UI snapshot correctly 4`] = `
|
|
|
282
282
|
|
|
283
283
|
exports[`Checkbox Renders the UI snapshot correctly 5`] = `
|
|
284
284
|
<label
|
|
285
|
-
className="chakra-checkbox css-
|
|
285
|
+
className="chakra-checkbox css-g8du1g"
|
|
286
286
|
data-invalid=""
|
|
287
287
|
onClick={[Function]}
|
|
288
288
|
>
|
|
@@ -348,7 +348,7 @@ exports[`Checkbox Renders the UI snapshot correctly 5`] = `
|
|
|
348
348
|
|
|
349
349
|
exports[`Checkbox Renders the UI snapshot correctly 6`] = `
|
|
350
350
|
<label
|
|
351
|
-
className="chakra-checkbox css-
|
|
351
|
+
className="chakra-checkbox css-g8du1g"
|
|
352
352
|
data-disabled=""
|
|
353
353
|
onClick={[Function]}
|
|
354
354
|
>
|