@nypl/design-system-react-components 1.1.0 → 1.1.2
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 +40 -0
- package/dist/components/Accordion/Accordion.d.ts +3 -0
- package/dist/components/Button/Button.d.ts +4 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +2 -0
- package/dist/components/Slider/Slider.d.ts +2 -0
- package/dist/design-system-react-components.cjs.development.js +258 -111
- 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 +258 -111
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/theme/components/button.d.ts +26 -92
- package/dist/theme/components/customTable.d.ts +8 -0
- package/dist/theme/components/header/headerSearchButton.d.ts +1 -1
- package/dist/theme/components/header/headerSearchForm.d.ts +5 -0
- package/dist/theme/components/tooltip.d.ts +1 -0
- package/dist/theme/foundations/spacing.d.ts +14 -0
- package/package.json +1 -1
|
@@ -1729,7 +1729,7 @@ var Icon = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(function (pr
|
|
|
1729
1729
|
}
|
|
1730
1730
|
});
|
|
1731
1731
|
|
|
1732
|
-
var _excluded$R = ["accordionData", "id", "isDefaultOpen", "panelMaxHeight"];
|
|
1732
|
+
var _excluded$R = ["accordionData", "id", "isDefaultOpen", "isAlwaysRendered", "panelMaxHeight"];
|
|
1733
1733
|
/**
|
|
1734
1734
|
* Get the minus or plus icon depending on whether the accordion
|
|
1735
1735
|
* is open or closed.
|
|
@@ -1754,13 +1754,17 @@ var getIcon = function getIcon(isExpanded, index, id) {
|
|
|
1754
1754
|
*/
|
|
1755
1755
|
|
|
1756
1756
|
|
|
1757
|
-
var getElementsFromData = function getElementsFromData(data, id, panelMaxHeight) {
|
|
1757
|
+
var getElementsFromData = function getElementsFromData(data, id, isAlwaysRendered, panelMaxHeight) {
|
|
1758
1758
|
var _data, _data2;
|
|
1759
1759
|
|
|
1760
1760
|
if (data === void 0) {
|
|
1761
1761
|
data = [];
|
|
1762
1762
|
}
|
|
1763
1763
|
|
|
1764
|
+
if (isAlwaysRendered === void 0) {
|
|
1765
|
+
isAlwaysRendered = false;
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1764
1768
|
var colorMap = {
|
|
1765
1769
|
"default": "ui.white",
|
|
1766
1770
|
warning: "ui.status.primary",
|
|
@@ -1809,7 +1813,7 @@ var getElementsFromData = function getElementsFromData(data, id, panelMaxHeight)
|
|
|
1809
1813
|
flex: "1",
|
|
1810
1814
|
fontSize: multipleFontSize,
|
|
1811
1815
|
textAlign: "left"
|
|
1812
|
-
}, content.label), getIcon(isExpanded, index, id)), isExpanded && panel);
|
|
1816
|
+
}, content.label), getIcon(isExpanded, index, id)), (isAlwaysRendered || isExpanded) && panel);
|
|
1813
1817
|
});
|
|
1814
1818
|
});
|
|
1815
1819
|
};
|
|
@@ -1824,6 +1828,8 @@ var Accordion = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(functio
|
|
|
1824
1828
|
id = props.id,
|
|
1825
1829
|
_props$isDefaultOpen = props.isDefaultOpen,
|
|
1826
1830
|
isDefaultOpen = _props$isDefaultOpen === void 0 ? false : _props$isDefaultOpen,
|
|
1831
|
+
_props$isAlwaysRender = props.isAlwaysRendered,
|
|
1832
|
+
isAlwaysRendered = _props$isAlwaysRender === void 0 ? false : _props$isAlwaysRender,
|
|
1827
1833
|
panelMaxHeight = props.panelMaxHeight,
|
|
1828
1834
|
rest = _objectWithoutPropertiesLoose(props, _excluded$R); // Pass `0` to open the first accordion in the 0-index based array.
|
|
1829
1835
|
|
|
@@ -1834,7 +1840,7 @@ var Accordion = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(functio
|
|
|
1834
1840
|
defaultIndex: openFirstAccordion,
|
|
1835
1841
|
id: id,
|
|
1836
1842
|
ref: ref
|
|
1837
|
-
}, rest), getElementsFromData(accordionData, id, panelMaxHeight));
|
|
1843
|
+
}, rest), getElementsFromData(accordionData, id, isAlwaysRendered, panelMaxHeight));
|
|
1838
1844
|
}));
|
|
1839
1845
|
|
|
1840
1846
|
var _excluded$S = ["breadcrumbsData", "breadcrumbsType", "className", "id"];
|
|
@@ -1889,7 +1895,7 @@ var Breadcrumbs = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(funct
|
|
|
1889
1895
|
}, rest), breadcrumbItems);
|
|
1890
1896
|
}));
|
|
1891
1897
|
|
|
1892
|
-
var _excluded$T = ["buttonType", "children", "className", "id", "isDisabled", "mouseDown", "onClick", "type"];
|
|
1898
|
+
var _excluded$T = ["buttonType", "children", "className", "id", "isDisabled", "mouseDown", "onClick", "size", "type"];
|
|
1893
1899
|
/**
|
|
1894
1900
|
* Renders a simple `button` element with custom variant styles.
|
|
1895
1901
|
*/
|
|
@@ -1906,6 +1912,8 @@ var Button = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(function (
|
|
|
1906
1912
|
_props$mouseDown = props.mouseDown,
|
|
1907
1913
|
mouseDown = _props$mouseDown === void 0 ? false : _props$mouseDown,
|
|
1908
1914
|
onClick = props.onClick,
|
|
1915
|
+
_props$size = props.size,
|
|
1916
|
+
size = _props$size === void 0 ? "medium" : _props$size,
|
|
1909
1917
|
_props$type = props.type,
|
|
1910
1918
|
type = _props$type === void 0 ? "button" : _props$type,
|
|
1911
1919
|
rest = _objectWithoutPropertiesLoose(props, _excluded$T);
|
|
@@ -1924,6 +1932,10 @@ var Button = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(function (
|
|
|
1924
1932
|
console.warn("NYPL Reservoir Button: This component's required `id` prop was not passed.");
|
|
1925
1933
|
}
|
|
1926
1934
|
|
|
1935
|
+
if (buttonType === "link") {
|
|
1936
|
+
console.warn("NYPL Reservoir Button: The 'link' value for the 'buttonType' prop has been deprecated.");
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1927
1939
|
React__default.Children.map(children, function (child) {
|
|
1928
1940
|
childCount++;
|
|
1929
1941
|
|
|
@@ -1941,11 +1953,11 @@ var Button = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(function (
|
|
|
1941
1953
|
}
|
|
1942
1954
|
|
|
1943
1955
|
styles = react.useStyleConfig("Button", {
|
|
1944
|
-
variant: variant
|
|
1956
|
+
variant: variant,
|
|
1957
|
+
buttonSize: size
|
|
1945
1958
|
});
|
|
1946
1959
|
return React__default.createElement(react.Button, Object.assign({
|
|
1947
1960
|
className: className,
|
|
1948
|
-
"data-testid": "button",
|
|
1949
1961
|
id: id,
|
|
1950
1962
|
isDisabled: isDisabled,
|
|
1951
1963
|
ref: ref,
|
|
@@ -1953,7 +1965,13 @@ var Button = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(function (
|
|
|
1953
1965
|
}, btnCallback, {
|
|
1954
1966
|
__css: styles
|
|
1955
1967
|
}, rest), children);
|
|
1956
|
-
})
|
|
1968
|
+
}), // Chakra uses different values for its own `size` prop. We
|
|
1969
|
+
// want to override the values and use our own.
|
|
1970
|
+
{
|
|
1971
|
+
shouldForwardProp: function shouldForwardProp() {
|
|
1972
|
+
return true;
|
|
1973
|
+
}
|
|
1974
|
+
});
|
|
1957
1975
|
|
|
1958
1976
|
/**
|
|
1959
1977
|
* This hook is used to determine if the current screen size is larger than
|
|
@@ -3029,6 +3047,20 @@ var reservoirSpacingTokens = {
|
|
|
3029
3047
|
xxl: reservoirSpacingValues["xxl"],
|
|
3030
3048
|
xxxl: reservoirSpacingValues["xxxl"],
|
|
3031
3049
|
// Reservoir semantic tokens
|
|
3050
|
+
button: {
|
|
3051
|
+
small: {
|
|
3052
|
+
px: reservoirSpacingValues["xs"],
|
|
3053
|
+
py: reservoirSpacingValues["xxs"]
|
|
3054
|
+
},
|
|
3055
|
+
medium: {
|
|
3056
|
+
px: reservoirSpacingValues["s"],
|
|
3057
|
+
py: reservoirSpacingValues["xs"]
|
|
3058
|
+
},
|
|
3059
|
+
large: {
|
|
3060
|
+
px: reservoirSpacingValues["l"],
|
|
3061
|
+
py: reservoirSpacingValues["s"]
|
|
3062
|
+
}
|
|
3063
|
+
},
|
|
3032
3064
|
input: {
|
|
3033
3065
|
group: {
|
|
3034
3066
|
button: {
|
|
@@ -3069,7 +3101,7 @@ var reservoirSpacingTokens = {
|
|
|
3069
3101
|
};
|
|
3070
3102
|
var spacing = /*#__PURE__*/_extends({}, chakraSpacingTokens, reservoirSpacingTokens);
|
|
3071
3103
|
|
|
3072
|
-
var _excluded$12 = ["children", "defaultValue", "helperText", "id", "invalidText", "isDisabled", "isFullWidth", "isInvalid", "isRequired", "labelText", "layout", "name", "onChange", "showHelperInvalidText", "showLabel", "showRequiredLabel"];
|
|
3104
|
+
var _excluded$12 = ["children", "defaultValue", "helperText", "id", "invalidText", "isDisabled", "isFullWidth", "isInvalid", "isRequired", "labelText", "layout", "name", "onChange", "showHelperInvalidText", "showLabel", "showRequiredLabel", "value"];
|
|
3073
3105
|
/**
|
|
3074
3106
|
* Wrapper component to wrap `Checkbox` components. Can be displayed in a
|
|
3075
3107
|
* column or in a row. The `CheckboxGroup` component renders all the necessary
|
|
@@ -3104,6 +3136,7 @@ var CheckboxGroup = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(fun
|
|
|
3104
3136
|
showLabel = _props$showLabel === void 0 ? true : _props$showLabel,
|
|
3105
3137
|
_props$showRequiredLa = props.showRequiredLabel,
|
|
3106
3138
|
showRequiredLabel = _props$showRequiredLa === void 0 ? true : _props$showRequiredLa,
|
|
3139
|
+
value = props.value,
|
|
3107
3140
|
rest = _objectWithoutPropertiesLoose(props, _excluded$12);
|
|
3108
3141
|
|
|
3109
3142
|
var footnote = isInvalid ? invalidText : helperText;
|
|
@@ -3114,6 +3147,10 @@ var CheckboxGroup = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(fun
|
|
|
3114
3147
|
onChange: onChange
|
|
3115
3148
|
} : {};
|
|
3116
3149
|
|
|
3150
|
+
if (value) {
|
|
3151
|
+
checkboxProps["value"] = value;
|
|
3152
|
+
}
|
|
3153
|
+
|
|
3117
3154
|
if (!id) {
|
|
3118
3155
|
console.warn("NYPL Reservoir CheckboxGroup: This component's required `id` prop was not passed.");
|
|
3119
3156
|
} // Go through the Checkbox children and update them as needed.
|
|
@@ -3817,6 +3854,7 @@ var TextInput = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(functio
|
|
|
3817
3854
|
|
|
3818
3855
|
|
|
3819
3856
|
options = isHidden ? {
|
|
3857
|
+
defaultValue: defaultValue,
|
|
3820
3858
|
id: id,
|
|
3821
3859
|
"aria-hidden": isHidden,
|
|
3822
3860
|
name: name,
|
|
@@ -4723,7 +4761,9 @@ var typography = {
|
|
|
4723
4761
|
"default": fontSizeValues["-1"]
|
|
4724
4762
|
},
|
|
4725
4763
|
button: {
|
|
4726
|
-
|
|
4764
|
+
small: fontSizeValues["-2"],
|
|
4765
|
+
"default": fontSizeValues["-1"],
|
|
4766
|
+
large: fontSizeValues["0"]
|
|
4727
4767
|
},
|
|
4728
4768
|
heading: {
|
|
4729
4769
|
primary: fontSizeValues["4"],
|
|
@@ -4924,19 +4964,11 @@ var baseStyle = {
|
|
|
4924
4964
|
display: "flex",
|
|
4925
4965
|
cursor: "pointer",
|
|
4926
4966
|
color: "ui.white",
|
|
4927
|
-
|
|
4967
|
+
fontWeight: "button.default",
|
|
4928
4968
|
justifyContent: "center",
|
|
4929
4969
|
lineHeight: "1.5",
|
|
4930
|
-
maxHeight: "2.5rem",
|
|
4931
|
-
minHeight: {
|
|
4932
|
-
base: defaultElementSizes.mobileFieldHeight,
|
|
4933
|
-
md: "auto"
|
|
4934
|
-
},
|
|
4935
|
-
py: "inset.narrow",
|
|
4936
|
-
px: "inset.default",
|
|
4937
4970
|
textDecoration: "none",
|
|
4938
4971
|
wordWrap: "normal",
|
|
4939
|
-
fontWeight: "button.default",
|
|
4940
4972
|
svg: {
|
|
4941
4973
|
fill: "currentColor"
|
|
4942
4974
|
},
|
|
@@ -4949,92 +4981,184 @@ var baseStyle = {
|
|
|
4949
4981
|
_disabled: {
|
|
4950
4982
|
bg: "ui.gray.light-cool",
|
|
4951
4983
|
color: "ui.gray.dark",
|
|
4952
|
-
|
|
4953
|
-
|
|
4984
|
+
opacity: "1",
|
|
4985
|
+
pointerEvents: "none"
|
|
4986
|
+
}
|
|
4987
|
+
};
|
|
4988
|
+
|
|
4989
|
+
var generalSizeValues = function generalSizeValues(size, isPill) {
|
|
4990
|
+
if (size === void 0) {
|
|
4991
|
+
size = "medium";
|
|
4954
4992
|
}
|
|
4993
|
+
|
|
4994
|
+
if (isPill === void 0) {
|
|
4995
|
+
isPill = false;
|
|
4996
|
+
}
|
|
4997
|
+
|
|
4998
|
+
var sizes = {
|
|
4999
|
+
small: {
|
|
5000
|
+
fontSize: "button.small",
|
|
5001
|
+
height: "fit-content",
|
|
5002
|
+
minHeight: "auto",
|
|
5003
|
+
px: isPill ? "s" : "button.small.px",
|
|
5004
|
+
py: isPill ? "xxxs" : "button.small.py"
|
|
5005
|
+
},
|
|
5006
|
+
medium: {
|
|
5007
|
+
fontSize: "button.default",
|
|
5008
|
+
height: isPill ? "fit-content" : undefined,
|
|
5009
|
+
minHeight: isPill ? "auto" : {
|
|
5010
|
+
base: defaultElementSizes.mobileFieldHeight,
|
|
5011
|
+
md: "auto"
|
|
5012
|
+
},
|
|
5013
|
+
px: isPill ? "m" : "button.medium.px",
|
|
5014
|
+
py: isPill ? "xxxs" : "button.medium.py"
|
|
5015
|
+
},
|
|
5016
|
+
large: {
|
|
5017
|
+
fontSize: "button.large",
|
|
5018
|
+
height: "fit-content",
|
|
5019
|
+
minHeight: "auto",
|
|
5020
|
+
px: isPill ? "l" : "button.large.px",
|
|
5021
|
+
py: isPill ? "xxs" : "button.large.py"
|
|
5022
|
+
}
|
|
5023
|
+
};
|
|
5024
|
+
return sizes[size];
|
|
4955
5025
|
}; // Styles for different visual variants:
|
|
4956
|
-
// primary, secondary, link, pill, iconOnly, callout,
|
|
5026
|
+
// primary, secondary, link, text, pill, iconOnly, callout, noBrand
|
|
4957
5027
|
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
5028
|
+
|
|
5029
|
+
var primary = function primary(_ref) {
|
|
5030
|
+
var _ref$buttonSize = _ref.buttonSize,
|
|
5031
|
+
buttonSize = _ref$buttonSize === void 0 ? "medium" : _ref$buttonSize;
|
|
5032
|
+
return _extends({
|
|
5033
|
+
bg: "ui.link.primary"
|
|
5034
|
+
}, generalSizeValues(buttonSize));
|
|
4963
5035
|
};
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
},
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
5036
|
+
|
|
5037
|
+
var secondary = function secondary(_ref2) {
|
|
5038
|
+
var _ref2$buttonSize = _ref2.buttonSize,
|
|
5039
|
+
buttonSize = _ref2$buttonSize === void 0 ? "medium" : _ref2$buttonSize;
|
|
5040
|
+
return _extends({
|
|
5041
|
+
bg: "ui.white",
|
|
5042
|
+
border: "1px solid",
|
|
5043
|
+
borderColor: "ui.link.primary",
|
|
5044
|
+
color: "ui.link.primary"
|
|
5045
|
+
}, generalSizeValues(buttonSize), {
|
|
5046
|
+
_hover: {
|
|
5047
|
+
bg: "ui.bg.default",
|
|
5048
|
+
borderColor: "ui.link.secondary",
|
|
5049
|
+
color: "ui.link.secondary"
|
|
5050
|
+
},
|
|
5051
|
+
_disabled: {
|
|
5052
|
+
bg: "transparent",
|
|
5053
|
+
borderColor: "ui.disabled.primary",
|
|
5054
|
+
color: "ui.disabled.primary"
|
|
5055
|
+
}
|
|
5056
|
+
});
|
|
5057
|
+
}; // The "link" type is deprecated but we still want to style
|
|
5058
|
+
// it correctly for backwards compatibility.
|
|
5059
|
+
|
|
5060
|
+
|
|
5061
|
+
var link = function link(_ref3) {
|
|
5062
|
+
var _ref3$buttonSize = _ref3.buttonSize,
|
|
5063
|
+
buttonSize = _ref3$buttonSize === void 0 ? "medium" : _ref3$buttonSize;
|
|
5064
|
+
return _extends({
|
|
5065
|
+
bg: "transparent",
|
|
5066
|
+
color: "ui.link.primary",
|
|
5067
|
+
textDecoration: "underline"
|
|
5068
|
+
}, generalSizeValues(buttonSize), {
|
|
5069
|
+
_disabled: {
|
|
5070
|
+
bg: "transparent"
|
|
5071
|
+
},
|
|
5072
|
+
_hover: {
|
|
5073
|
+
bg: "transparent",
|
|
5074
|
+
color: "ui.link.secondary"
|
|
5075
|
+
}
|
|
5076
|
+
});
|
|
4977
5077
|
};
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
_disabled: {
|
|
4984
|
-
bg: "transparent"
|
|
4985
|
-
},
|
|
4986
|
-
_hover: {
|
|
5078
|
+
|
|
5079
|
+
var text = function text(_ref4) {
|
|
5080
|
+
var _ref4$buttonSize = _ref4.buttonSize,
|
|
5081
|
+
buttonSize = _ref4$buttonSize === void 0 ? "medium" : _ref4$buttonSize;
|
|
5082
|
+
return _extends({
|
|
4987
5083
|
bg: "transparent",
|
|
4988
|
-
color: "ui.link.
|
|
4989
|
-
}
|
|
5084
|
+
color: "ui.link.primary"
|
|
5085
|
+
}, generalSizeValues(buttonSize), {
|
|
5086
|
+
_disabled: {
|
|
5087
|
+
bg: "transparent"
|
|
5088
|
+
},
|
|
5089
|
+
_hover: {
|
|
5090
|
+
bg: "transparent",
|
|
5091
|
+
color: "ui.link.secondary"
|
|
5092
|
+
}
|
|
5093
|
+
});
|
|
4990
5094
|
};
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5095
|
+
|
|
5096
|
+
var pill = function pill(_ref5) {
|
|
5097
|
+
var _ref5$buttonSize = _ref5.buttonSize,
|
|
5098
|
+
buttonSize = _ref5$buttonSize === void 0 ? "medium" : _ref5$buttonSize;
|
|
5099
|
+
return _extends({
|
|
5100
|
+
bg: "ui.white",
|
|
5101
|
+
border: "1px solid",
|
|
5102
|
+
borderColor: "ui.gray.light-cool",
|
|
5103
|
+
borderRadius: "pill",
|
|
5104
|
+
color: "inherit"
|
|
5105
|
+
}, generalSizeValues(buttonSize, true), {
|
|
5106
|
+
_hover: {
|
|
5107
|
+
bg: "ui.gray.xx-light-cool",
|
|
5108
|
+
borderColor: "ui.gray.medium"
|
|
5109
|
+
},
|
|
5110
|
+
_disabled: {
|
|
5111
|
+
bg: "ui.gray.x-light-cool"
|
|
5112
|
+
}
|
|
5113
|
+
});
|
|
5007
5114
|
};
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
borderColor: "ui.
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5115
|
+
|
|
5116
|
+
var iconOnly = function iconOnly(_ref6) {
|
|
5117
|
+
var _ref6$buttonSize = _ref6.buttonSize,
|
|
5118
|
+
buttonSize = _ref6$buttonSize === void 0 ? "medium" : _ref6$buttonSize;
|
|
5119
|
+
return _extends({
|
|
5120
|
+
bg: "ui.white",
|
|
5121
|
+
border: "1px solid",
|
|
5122
|
+
borderColor: "ui.link.primary",
|
|
5123
|
+
color: "ui.link.primary"
|
|
5124
|
+
}, generalSizeValues(buttonSize), {
|
|
5125
|
+
paddingInlineStart: "inset.narrow",
|
|
5126
|
+
paddingInlineEnd: "inset.narrow",
|
|
5127
|
+
_hover: {
|
|
5128
|
+
bg: "ui.bg.default",
|
|
5129
|
+
borderColor: "ui.link.primary",
|
|
5130
|
+
color: "ui.link.primary"
|
|
5131
|
+
}
|
|
5132
|
+
});
|
|
5019
5133
|
};
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5134
|
+
|
|
5135
|
+
var callout = function callout(_ref7) {
|
|
5136
|
+
var _ref7$buttonSize = _ref7.buttonSize,
|
|
5137
|
+
buttonSize = _ref7$buttonSize === void 0 ? "medium" : _ref7$buttonSize;
|
|
5138
|
+
return _extends({
|
|
5139
|
+
bg: "brand.primary"
|
|
5140
|
+
}, generalSizeValues(buttonSize), {
|
|
5141
|
+
_hover: {
|
|
5142
|
+
bg: "brand.secondary"
|
|
5143
|
+
},
|
|
5144
|
+
_active: {
|
|
5145
|
+
bg: "brand.secondary"
|
|
5146
|
+
}
|
|
5147
|
+
});
|
|
5029
5148
|
};
|
|
5030
5149
|
|
|
5031
|
-
var noBrand =
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
bg: "ui.
|
|
5036
|
-
|
|
5037
|
-
})
|
|
5150
|
+
var noBrand = function noBrand(_ref8) {
|
|
5151
|
+
var _ref8$buttonSize = _ref8.buttonSize,
|
|
5152
|
+
buttonSize = _ref8$buttonSize === void 0 ? "medium" : _ref8$buttonSize;
|
|
5153
|
+
return _extends({
|
|
5154
|
+
bg: "ui.black",
|
|
5155
|
+
color: "ui.white"
|
|
5156
|
+
}, generalSizeValues(buttonSize), {
|
|
5157
|
+
_hover: {
|
|
5158
|
+
bg: "ui.gray.x-dark"
|
|
5159
|
+
}
|
|
5160
|
+
});
|
|
5161
|
+
};
|
|
5038
5162
|
|
|
5039
5163
|
var Button$1 = {
|
|
5040
5164
|
baseStyle: baseStyle,
|
|
@@ -5042,6 +5166,8 @@ var Button$1 = {
|
|
|
5042
5166
|
variants: {
|
|
5043
5167
|
primary: primary,
|
|
5044
5168
|
secondary: secondary,
|
|
5169
|
+
text: text,
|
|
5170
|
+
// Deprecated type. Use "text" instead.
|
|
5045
5171
|
link: link,
|
|
5046
5172
|
pill: pill,
|
|
5047
5173
|
iconOnly: iconOnly,
|
|
@@ -5692,7 +5818,7 @@ var Footer = {
|
|
|
5692
5818
|
lg: "30px"
|
|
5693
5819
|
},
|
|
5694
5820
|
marginRight: {
|
|
5695
|
-
xl: "
|
|
5821
|
+
xl: "100px"
|
|
5696
5822
|
},
|
|
5697
5823
|
order: {
|
|
5698
5824
|
base: "2",
|
|
@@ -6204,7 +6330,7 @@ var HeaderLoginButton = {
|
|
|
6204
6330
|
md: "auto"
|
|
6205
6331
|
},
|
|
6206
6332
|
padding: {
|
|
6207
|
-
md: "
|
|
6333
|
+
md: "10px 12px"
|
|
6208
6334
|
},
|
|
6209
6335
|
svg: {
|
|
6210
6336
|
fill: isOpen ? "ui.white" : null,
|
|
@@ -6460,11 +6586,15 @@ var HeaderSearchForm = {
|
|
|
6460
6586
|
desktopSearchBtn: {
|
|
6461
6587
|
alignSelf: "end",
|
|
6462
6588
|
backgroundColor: "transparent",
|
|
6589
|
+
borderColor: "ui.white",
|
|
6463
6590
|
borderRadius: "100px",
|
|
6464
6591
|
borderWidth: "2px",
|
|
6465
6592
|
height: "75px",
|
|
6466
6593
|
maxHeight: "75px",
|
|
6467
6594
|
width: "75px",
|
|
6595
|
+
svg: {
|
|
6596
|
+
marginTop: "xs"
|
|
6597
|
+
},
|
|
6468
6598
|
_focus: /*#__PURE__*/_extends({}, headerFocus, {
|
|
6469
6599
|
borderRadius: "100px"
|
|
6470
6600
|
}),
|
|
@@ -6500,7 +6630,8 @@ var HeaderSearchForm = {
|
|
|
6500
6630
|
display: "flex",
|
|
6501
6631
|
fontSize: "16px",
|
|
6502
6632
|
flex: "1",
|
|
6503
|
-
|
|
6633
|
+
justifyContent: "center",
|
|
6634
|
+
padding: "25px 0",
|
|
6504
6635
|
svg: {
|
|
6505
6636
|
fill: headerLightBlue,
|
|
6506
6637
|
marginLeft: "15px"
|
|
@@ -6535,7 +6666,7 @@ var HeaderSearchButton = {
|
|
|
6535
6666
|
borderBottom: {
|
|
6536
6667
|
md: "3px solid #1B7FA7"
|
|
6537
6668
|
},
|
|
6538
|
-
display: "flex",
|
|
6669
|
+
display: "inline-flex",
|
|
6539
6670
|
lineHeight: "1.3"
|
|
6540
6671
|
},
|
|
6541
6672
|
svg: {
|
|
@@ -6543,7 +6674,7 @@ var HeaderSearchButton = {
|
|
|
6543
6674
|
base: "0",
|
|
6544
6675
|
md: "xxs"
|
|
6545
6676
|
},
|
|
6546
|
-
|
|
6677
|
+
fill: {
|
|
6547
6678
|
base: isOpen ? "ui.white" : "ui.black",
|
|
6548
6679
|
md: isOpen ? "ui.white" : "ui.link.primary"
|
|
6549
6680
|
}
|
|
@@ -7376,7 +7507,7 @@ var Notification = {
|
|
|
7376
7507
|
},
|
|
7377
7508
|
icon: {
|
|
7378
7509
|
flexShrink: "0",
|
|
7379
|
-
marginEnd: "
|
|
7510
|
+
marginEnd: "xs"
|
|
7380
7511
|
}
|
|
7381
7512
|
};
|
|
7382
7513
|
}
|
|
@@ -7393,7 +7524,7 @@ var NotificationContent = {
|
|
|
7393
7524
|
content: {
|
|
7394
7525
|
color: notificationType === "warning" ? "brand.primary" : "currentColor",
|
|
7395
7526
|
marginTop: icon ? "xxxs" : "0",
|
|
7396
|
-
paddingStart: alignText ? "calc(var(--nypl-space-
|
|
7527
|
+
paddingStart: alignText ? "calc(var(--nypl-space-s) + var(--nypl-space-s))" : null,
|
|
7397
7528
|
width: "100%",
|
|
7398
7529
|
// Links should always be black and underlined.
|
|
7399
7530
|
a: {
|
|
@@ -8104,11 +8235,15 @@ var baseStyle$3 = function baseStyle(_ref) {
|
|
|
8104
8235
|
// have text color black.
|
|
8105
8236
|
tbody: {
|
|
8106
8237
|
th: {
|
|
8107
|
-
color: "
|
|
8238
|
+
color: "ui.black",
|
|
8108
8239
|
backgroundColor: useRowHeaders ? {
|
|
8109
8240
|
base: "ui.gray.x-light-cool",
|
|
8110
8241
|
md: "unset"
|
|
8111
|
-
} : undefined
|
|
8242
|
+
} : undefined,
|
|
8243
|
+
verticalAlign: "top"
|
|
8244
|
+
},
|
|
8245
|
+
td: {
|
|
8246
|
+
verticalAlign: "top"
|
|
8112
8247
|
}
|
|
8113
8248
|
},
|
|
8114
8249
|
thead: {
|
|
@@ -8672,7 +8807,7 @@ var Toggle$1 = {
|
|
|
8672
8807
|
var _baseStyle;
|
|
8673
8808
|
var $bg = /*#__PURE__*/themeTools.cssVar("tooltip-bg");
|
|
8674
8809
|
var Tooltip = {
|
|
8675
|
-
baseStyle: (_baseStyle = {}, _baseStyle[$bg.variable] = "colors.ui.gray.xx-dark", _baseStyle.borderRadius = "4px", _baseStyle.color = "ui.white", _baseStyle.fontSize = "text.tag", _baseStyle.marginBottom = "xxs", _baseStyle.maxWidth = "240px", _baseStyle.px = "s", _baseStyle.py = "xs", _baseStyle)
|
|
8810
|
+
baseStyle: (_baseStyle = {}, _baseStyle[$bg.variable] = "colors.ui.gray.xx-dark", _baseStyle.borderRadius = "4px", _baseStyle.boxShadow = "none", _baseStyle.color = "ui.white", _baseStyle.fontSize = "text.tag", _baseStyle.marginBottom = "xxs", _baseStyle.maxWidth = "240px", _baseStyle.px = "s", _baseStyle.py = "xs", _baseStyle)
|
|
8676
8811
|
};
|
|
8677
8812
|
|
|
8678
8813
|
var fourByThree = {
|
|
@@ -12487,7 +12622,7 @@ var HeaderSearchButton$1 = /*#__PURE__*/react.chakra(function (_ref) {
|
|
|
12487
12622
|
"aria-haspopup": "true",
|
|
12488
12623
|
"aria-label": labelText,
|
|
12489
12624
|
"aria-expanded": isOpen ? true : null,
|
|
12490
|
-
buttonType: "
|
|
12625
|
+
buttonType: "text",
|
|
12491
12626
|
id: "searchButton",
|
|
12492
12627
|
onClick: function onClick() {
|
|
12493
12628
|
gaUtils.trackEvent(gaAction, gaLabel);
|
|
@@ -12697,7 +12832,7 @@ var HeaderLoginButton$1 = /*#__PURE__*/react.chakra(function (_ref) {
|
|
|
12697
12832
|
isDisabled: !isOpen
|
|
12698
12833
|
}, React__default.createElement(Button, {
|
|
12699
12834
|
"aria-label": desktopButtonLabel,
|
|
12700
|
-
buttonType: "
|
|
12835
|
+
buttonType: "text",
|
|
12701
12836
|
id: "loginButton",
|
|
12702
12837
|
onClick: function onClick() {
|
|
12703
12838
|
gaUtils.trackEvent(gaAction, gaLabel);
|
|
@@ -12824,7 +12959,7 @@ var HeaderMobileNavButton$1 = /*#__PURE__*/react.chakra(function () {
|
|
|
12824
12959
|
"aria-haspopup": "true",
|
|
12825
12960
|
"aria-label": isOpen ? "Close Navigation" : "Open Navigation",
|
|
12826
12961
|
"aria-expanded": isOpen ? true : null,
|
|
12827
|
-
buttonType: "
|
|
12962
|
+
buttonType: "text",
|
|
12828
12963
|
id: "mobileNav-btn",
|
|
12829
12964
|
onClick: function onClick() {
|
|
12830
12965
|
gaUtils.trackEvent("Click", "Mobile mobileMenu");
|
|
@@ -12991,7 +13126,7 @@ var Notification$1 = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(fu
|
|
|
12991
13126
|
|
|
12992
13127
|
var dismissibleButton = dismissible && React__default.createElement(Button, {
|
|
12993
13128
|
"aria-label": "Close the notification",
|
|
12994
|
-
buttonType: "
|
|
13129
|
+
buttonType: "text",
|
|
12995
13130
|
id: id + "-notification-dismissible-button",
|
|
12996
13131
|
onClick: handleClose,
|
|
12997
13132
|
__css: styles.dismissibleButton
|
|
@@ -14111,7 +14246,7 @@ var SearchBar$1 = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(funct
|
|
|
14111
14246
|
isDisabled: isDisabled,
|
|
14112
14247
|
onClick: buttonOnClick,
|
|
14113
14248
|
type: "submit",
|
|
14114
|
-
|
|
14249
|
+
sx: searchBarButtonStyles
|
|
14115
14250
|
}, React__default.createElement(Icon, {
|
|
14116
14251
|
align: "left",
|
|
14117
14252
|
id: "searchbar-icon-" + id,
|
|
@@ -14232,7 +14367,7 @@ var SkeletonLoader$1 = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(
|
|
|
14232
14367
|
})))));
|
|
14233
14368
|
}));
|
|
14234
14369
|
|
|
14235
|
-
var _excluded$26 = ["className", "defaultValue", "helperText", "id", "invalidText", "isDisabled", "isInvalid", "isRangeSlider", "isRequired", "labelText", "max", "min", "name", "onChange", "showBoxes", "showHelperInvalidText", "showLabel", "showRequiredLabel", "showValues", "step"];
|
|
14370
|
+
var _excluded$26 = ["className", "defaultValue", "helperText", "id", "invalidText", "isDisabled", "isInvalid", "isRangeSlider", "isRequired", "labelText", "max", "min", "name", "onChange", "showBoxes", "showHelperInvalidText", "showLabel", "showRequiredLabel", "showValues", "step", "value"];
|
|
14236
14371
|
/**
|
|
14237
14372
|
* The `Slider` component renders a singular value slider or a range slider
|
|
14238
14373
|
* with a min and max value. The value(s) can be updated through the slider
|
|
@@ -14273,6 +14408,7 @@ var Slider = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(function (
|
|
|
14273
14408
|
showValues = _props$showValues === void 0 ? true : _props$showValues,
|
|
14274
14409
|
_props$step = props.step,
|
|
14275
14410
|
step = _props$step === void 0 ? 1 : _props$step,
|
|
14411
|
+
value = props.value,
|
|
14276
14412
|
rest = _objectWithoutPropertiesLoose(props, _excluded$26);
|
|
14277
14413
|
|
|
14278
14414
|
if (!id) {
|
|
@@ -14287,8 +14423,19 @@ var Slider = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(function (
|
|
|
14287
14423
|
|
|
14288
14424
|
var _React$useState = React__default.useState(finalDevaultValue),
|
|
14289
14425
|
currentValue = _React$useState[0],
|
|
14290
|
-
setCurrentValue = _React$useState[1];
|
|
14426
|
+
setCurrentValue = _React$useState[1]; // If the value(s) needs to be updated programmatically,
|
|
14427
|
+
// listen to the `value` prop.
|
|
14291
14428
|
|
|
14429
|
+
|
|
14430
|
+
React.useEffect(function () {
|
|
14431
|
+
if (value) {
|
|
14432
|
+
if (typeof value === "number" && value !== currentValue) {
|
|
14433
|
+
setCurrentValue(value);
|
|
14434
|
+
} else if (value[0] !== currentValue[0] || value[1] !== currentValue[1]) {
|
|
14435
|
+
setCurrentValue(value);
|
|
14436
|
+
}
|
|
14437
|
+
}
|
|
14438
|
+
}, [value, currentValue]);
|
|
14292
14439
|
var finalIsInvalid = isInvalid; // In the Range Slider, if the first value is bigger than the second value,
|
|
14293
14440
|
// then set the invalid state.
|
|
14294
14441
|
|