@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
|
@@ -1723,7 +1723,7 @@ var Icon = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1723
1723
|
}
|
|
1724
1724
|
});
|
|
1725
1725
|
|
|
1726
|
-
var _excluded$R = ["accordionData", "id", "isDefaultOpen", "panelMaxHeight"];
|
|
1726
|
+
var _excluded$R = ["accordionData", "id", "isDefaultOpen", "isAlwaysRendered", "panelMaxHeight"];
|
|
1727
1727
|
/**
|
|
1728
1728
|
* Get the minus or plus icon depending on whether the accordion
|
|
1729
1729
|
* is open or closed.
|
|
@@ -1748,13 +1748,17 @@ var getIcon = function getIcon(isExpanded, index, id) {
|
|
|
1748
1748
|
*/
|
|
1749
1749
|
|
|
1750
1750
|
|
|
1751
|
-
var getElementsFromData = function getElementsFromData(data, id, panelMaxHeight) {
|
|
1751
|
+
var getElementsFromData = function getElementsFromData(data, id, isAlwaysRendered, panelMaxHeight) {
|
|
1752
1752
|
var _data, _data2;
|
|
1753
1753
|
|
|
1754
1754
|
if (data === void 0) {
|
|
1755
1755
|
data = [];
|
|
1756
1756
|
}
|
|
1757
1757
|
|
|
1758
|
+
if (isAlwaysRendered === void 0) {
|
|
1759
|
+
isAlwaysRendered = false;
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1758
1762
|
var colorMap = {
|
|
1759
1763
|
"default": "ui.white",
|
|
1760
1764
|
warning: "ui.status.primary",
|
|
@@ -1803,7 +1807,7 @@ var getElementsFromData = function getElementsFromData(data, id, panelMaxHeight)
|
|
|
1803
1807
|
flex: "1",
|
|
1804
1808
|
fontSize: multipleFontSize,
|
|
1805
1809
|
textAlign: "left"
|
|
1806
|
-
}, content.label), getIcon(isExpanded, index, id)), isExpanded && panel);
|
|
1810
|
+
}, content.label), getIcon(isExpanded, index, id)), (isAlwaysRendered || isExpanded) && panel);
|
|
1807
1811
|
});
|
|
1808
1812
|
});
|
|
1809
1813
|
};
|
|
@@ -1818,6 +1822,8 @@ var Accordion = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, re
|
|
|
1818
1822
|
id = props.id,
|
|
1819
1823
|
_props$isDefaultOpen = props.isDefaultOpen,
|
|
1820
1824
|
isDefaultOpen = _props$isDefaultOpen === void 0 ? false : _props$isDefaultOpen,
|
|
1825
|
+
_props$isAlwaysRender = props.isAlwaysRendered,
|
|
1826
|
+
isAlwaysRendered = _props$isAlwaysRender === void 0 ? false : _props$isAlwaysRender,
|
|
1821
1827
|
panelMaxHeight = props.panelMaxHeight,
|
|
1822
1828
|
rest = _objectWithoutPropertiesLoose(props, _excluded$R); // Pass `0` to open the first accordion in the 0-index based array.
|
|
1823
1829
|
|
|
@@ -1828,7 +1834,7 @@ var Accordion = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, re
|
|
|
1828
1834
|
defaultIndex: openFirstAccordion,
|
|
1829
1835
|
id: id,
|
|
1830
1836
|
ref: ref
|
|
1831
|
-
}, rest), getElementsFromData(accordionData, id, panelMaxHeight));
|
|
1837
|
+
}, rest), getElementsFromData(accordionData, id, isAlwaysRendered, panelMaxHeight));
|
|
1832
1838
|
}));
|
|
1833
1839
|
|
|
1834
1840
|
var _excluded$S = ["breadcrumbsData", "breadcrumbsType", "className", "id"];
|
|
@@ -1883,7 +1889,7 @@ var Breadcrumbs = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props,
|
|
|
1883
1889
|
}, rest), breadcrumbItems);
|
|
1884
1890
|
}));
|
|
1885
1891
|
|
|
1886
|
-
var _excluded$T = ["buttonType", "children", "className", "id", "isDisabled", "mouseDown", "onClick", "type"];
|
|
1892
|
+
var _excluded$T = ["buttonType", "children", "className", "id", "isDisabled", "mouseDown", "onClick", "size", "type"];
|
|
1887
1893
|
/**
|
|
1888
1894
|
* Renders a simple `button` element with custom variant styles.
|
|
1889
1895
|
*/
|
|
@@ -1900,6 +1906,8 @@ var Button = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref)
|
|
|
1900
1906
|
_props$mouseDown = props.mouseDown,
|
|
1901
1907
|
mouseDown = _props$mouseDown === void 0 ? false : _props$mouseDown,
|
|
1902
1908
|
onClick = props.onClick,
|
|
1909
|
+
_props$size = props.size,
|
|
1910
|
+
size = _props$size === void 0 ? "medium" : _props$size,
|
|
1903
1911
|
_props$type = props.type,
|
|
1904
1912
|
type = _props$type === void 0 ? "button" : _props$type,
|
|
1905
1913
|
rest = _objectWithoutPropertiesLoose(props, _excluded$T);
|
|
@@ -1918,6 +1926,10 @@ var Button = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref)
|
|
|
1918
1926
|
console.warn("NYPL Reservoir Button: This component's required `id` prop was not passed.");
|
|
1919
1927
|
}
|
|
1920
1928
|
|
|
1929
|
+
if (buttonType === "link") {
|
|
1930
|
+
console.warn("NYPL Reservoir Button: The 'link' value for the 'buttonType' prop has been deprecated.");
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1921
1933
|
React__default.Children.map(children, function (child) {
|
|
1922
1934
|
childCount++;
|
|
1923
1935
|
|
|
@@ -1935,11 +1947,11 @@ var Button = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref)
|
|
|
1935
1947
|
}
|
|
1936
1948
|
|
|
1937
1949
|
styles = useStyleConfig("Button", {
|
|
1938
|
-
variant: variant
|
|
1950
|
+
variant: variant,
|
|
1951
|
+
buttonSize: size
|
|
1939
1952
|
});
|
|
1940
1953
|
return React__default.createElement(Button$2, Object.assign({
|
|
1941
1954
|
className: className,
|
|
1942
|
-
"data-testid": "button",
|
|
1943
1955
|
id: id,
|
|
1944
1956
|
isDisabled: isDisabled,
|
|
1945
1957
|
ref: ref,
|
|
@@ -1947,7 +1959,13 @@ var Button = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref)
|
|
|
1947
1959
|
}, btnCallback, {
|
|
1948
1960
|
__css: styles
|
|
1949
1961
|
}, rest), children);
|
|
1950
|
-
})
|
|
1962
|
+
}), // Chakra uses different values for its own `size` prop. We
|
|
1963
|
+
// want to override the values and use our own.
|
|
1964
|
+
{
|
|
1965
|
+
shouldForwardProp: function shouldForwardProp() {
|
|
1966
|
+
return true;
|
|
1967
|
+
}
|
|
1968
|
+
});
|
|
1951
1969
|
|
|
1952
1970
|
/**
|
|
1953
1971
|
* This hook is used to determine if the current screen size is larger than
|
|
@@ -3023,6 +3041,20 @@ var reservoirSpacingTokens = {
|
|
|
3023
3041
|
xxl: reservoirSpacingValues["xxl"],
|
|
3024
3042
|
xxxl: reservoirSpacingValues["xxxl"],
|
|
3025
3043
|
// Reservoir semantic tokens
|
|
3044
|
+
button: {
|
|
3045
|
+
small: {
|
|
3046
|
+
px: reservoirSpacingValues["xs"],
|
|
3047
|
+
py: reservoirSpacingValues["xxs"]
|
|
3048
|
+
},
|
|
3049
|
+
medium: {
|
|
3050
|
+
px: reservoirSpacingValues["s"],
|
|
3051
|
+
py: reservoirSpacingValues["xs"]
|
|
3052
|
+
},
|
|
3053
|
+
large: {
|
|
3054
|
+
px: reservoirSpacingValues["l"],
|
|
3055
|
+
py: reservoirSpacingValues["s"]
|
|
3056
|
+
}
|
|
3057
|
+
},
|
|
3026
3058
|
input: {
|
|
3027
3059
|
group: {
|
|
3028
3060
|
button: {
|
|
@@ -3063,7 +3095,7 @@ var reservoirSpacingTokens = {
|
|
|
3063
3095
|
};
|
|
3064
3096
|
var spacing = /*#__PURE__*/_extends({}, chakraSpacingTokens, reservoirSpacingTokens);
|
|
3065
3097
|
|
|
3066
|
-
var _excluded$12 = ["children", "defaultValue", "helperText", "id", "invalidText", "isDisabled", "isFullWidth", "isInvalid", "isRequired", "labelText", "layout", "name", "onChange", "showHelperInvalidText", "showLabel", "showRequiredLabel"];
|
|
3098
|
+
var _excluded$12 = ["children", "defaultValue", "helperText", "id", "invalidText", "isDisabled", "isFullWidth", "isInvalid", "isRequired", "labelText", "layout", "name", "onChange", "showHelperInvalidText", "showLabel", "showRequiredLabel", "value"];
|
|
3067
3099
|
/**
|
|
3068
3100
|
* Wrapper component to wrap `Checkbox` components. Can be displayed in a
|
|
3069
3101
|
* column or in a row. The `CheckboxGroup` component renders all the necessary
|
|
@@ -3098,6 +3130,7 @@ var CheckboxGroup = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props
|
|
|
3098
3130
|
showLabel = _props$showLabel === void 0 ? true : _props$showLabel,
|
|
3099
3131
|
_props$showRequiredLa = props.showRequiredLabel,
|
|
3100
3132
|
showRequiredLabel = _props$showRequiredLa === void 0 ? true : _props$showRequiredLa,
|
|
3133
|
+
value = props.value,
|
|
3101
3134
|
rest = _objectWithoutPropertiesLoose(props, _excluded$12);
|
|
3102
3135
|
|
|
3103
3136
|
var footnote = isInvalid ? invalidText : helperText;
|
|
@@ -3108,6 +3141,10 @@ var CheckboxGroup = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props
|
|
|
3108
3141
|
onChange: onChange
|
|
3109
3142
|
} : {};
|
|
3110
3143
|
|
|
3144
|
+
if (value) {
|
|
3145
|
+
checkboxProps["value"] = value;
|
|
3146
|
+
}
|
|
3147
|
+
|
|
3111
3148
|
if (!id) {
|
|
3112
3149
|
console.warn("NYPL Reservoir CheckboxGroup: This component's required `id` prop was not passed.");
|
|
3113
3150
|
} // Go through the Checkbox children and update them as needed.
|
|
@@ -3811,6 +3848,7 @@ var TextInput = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, re
|
|
|
3811
3848
|
|
|
3812
3849
|
|
|
3813
3850
|
options = isHidden ? {
|
|
3851
|
+
defaultValue: defaultValue,
|
|
3814
3852
|
id: id,
|
|
3815
3853
|
"aria-hidden": isHidden,
|
|
3816
3854
|
name: name,
|
|
@@ -4717,7 +4755,9 @@ var typography = {
|
|
|
4717
4755
|
"default": fontSizeValues["-1"]
|
|
4718
4756
|
},
|
|
4719
4757
|
button: {
|
|
4720
|
-
|
|
4758
|
+
small: fontSizeValues["-2"],
|
|
4759
|
+
"default": fontSizeValues["-1"],
|
|
4760
|
+
large: fontSizeValues["0"]
|
|
4721
4761
|
},
|
|
4722
4762
|
heading: {
|
|
4723
4763
|
primary: fontSizeValues["4"],
|
|
@@ -4918,19 +4958,11 @@ var baseStyle = {
|
|
|
4918
4958
|
display: "flex",
|
|
4919
4959
|
cursor: "pointer",
|
|
4920
4960
|
color: "ui.white",
|
|
4921
|
-
|
|
4961
|
+
fontWeight: "button.default",
|
|
4922
4962
|
justifyContent: "center",
|
|
4923
4963
|
lineHeight: "1.5",
|
|
4924
|
-
maxHeight: "2.5rem",
|
|
4925
|
-
minHeight: {
|
|
4926
|
-
base: defaultElementSizes.mobileFieldHeight,
|
|
4927
|
-
md: "auto"
|
|
4928
|
-
},
|
|
4929
|
-
py: "inset.narrow",
|
|
4930
|
-
px: "inset.default",
|
|
4931
4964
|
textDecoration: "none",
|
|
4932
4965
|
wordWrap: "normal",
|
|
4933
|
-
fontWeight: "button.default",
|
|
4934
4966
|
svg: {
|
|
4935
4967
|
fill: "currentColor"
|
|
4936
4968
|
},
|
|
@@ -4943,92 +4975,184 @@ var baseStyle = {
|
|
|
4943
4975
|
_disabled: {
|
|
4944
4976
|
bg: "ui.gray.light-cool",
|
|
4945
4977
|
color: "ui.gray.dark",
|
|
4946
|
-
|
|
4947
|
-
|
|
4978
|
+
opacity: "1",
|
|
4979
|
+
pointerEvents: "none"
|
|
4980
|
+
}
|
|
4981
|
+
};
|
|
4982
|
+
|
|
4983
|
+
var generalSizeValues = function generalSizeValues(size, isPill) {
|
|
4984
|
+
if (size === void 0) {
|
|
4985
|
+
size = "medium";
|
|
4948
4986
|
}
|
|
4987
|
+
|
|
4988
|
+
if (isPill === void 0) {
|
|
4989
|
+
isPill = false;
|
|
4990
|
+
}
|
|
4991
|
+
|
|
4992
|
+
var sizes = {
|
|
4993
|
+
small: {
|
|
4994
|
+
fontSize: "button.small",
|
|
4995
|
+
height: "fit-content",
|
|
4996
|
+
minHeight: "auto",
|
|
4997
|
+
px: isPill ? "s" : "button.small.px",
|
|
4998
|
+
py: isPill ? "xxxs" : "button.small.py"
|
|
4999
|
+
},
|
|
5000
|
+
medium: {
|
|
5001
|
+
fontSize: "button.default",
|
|
5002
|
+
height: isPill ? "fit-content" : undefined,
|
|
5003
|
+
minHeight: isPill ? "auto" : {
|
|
5004
|
+
base: defaultElementSizes.mobileFieldHeight,
|
|
5005
|
+
md: "auto"
|
|
5006
|
+
},
|
|
5007
|
+
px: isPill ? "m" : "button.medium.px",
|
|
5008
|
+
py: isPill ? "xxxs" : "button.medium.py"
|
|
5009
|
+
},
|
|
5010
|
+
large: {
|
|
5011
|
+
fontSize: "button.large",
|
|
5012
|
+
height: "fit-content",
|
|
5013
|
+
minHeight: "auto",
|
|
5014
|
+
px: isPill ? "l" : "button.large.px",
|
|
5015
|
+
py: isPill ? "xxs" : "button.large.py"
|
|
5016
|
+
}
|
|
5017
|
+
};
|
|
5018
|
+
return sizes[size];
|
|
4949
5019
|
}; // Styles for different visual variants:
|
|
4950
|
-
// primary, secondary, link, pill, iconOnly, callout,
|
|
5020
|
+
// primary, secondary, link, text, pill, iconOnly, callout, noBrand
|
|
4951
5021
|
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
5022
|
+
|
|
5023
|
+
var primary = function primary(_ref) {
|
|
5024
|
+
var _ref$buttonSize = _ref.buttonSize,
|
|
5025
|
+
buttonSize = _ref$buttonSize === void 0 ? "medium" : _ref$buttonSize;
|
|
5026
|
+
return _extends({
|
|
5027
|
+
bg: "ui.link.primary"
|
|
5028
|
+
}, generalSizeValues(buttonSize));
|
|
4957
5029
|
};
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
},
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
5030
|
+
|
|
5031
|
+
var secondary = function secondary(_ref2) {
|
|
5032
|
+
var _ref2$buttonSize = _ref2.buttonSize,
|
|
5033
|
+
buttonSize = _ref2$buttonSize === void 0 ? "medium" : _ref2$buttonSize;
|
|
5034
|
+
return _extends({
|
|
5035
|
+
bg: "ui.white",
|
|
5036
|
+
border: "1px solid",
|
|
5037
|
+
borderColor: "ui.link.primary",
|
|
5038
|
+
color: "ui.link.primary"
|
|
5039
|
+
}, generalSizeValues(buttonSize), {
|
|
5040
|
+
_hover: {
|
|
5041
|
+
bg: "ui.bg.default",
|
|
5042
|
+
borderColor: "ui.link.secondary",
|
|
5043
|
+
color: "ui.link.secondary"
|
|
5044
|
+
},
|
|
5045
|
+
_disabled: {
|
|
5046
|
+
bg: "transparent",
|
|
5047
|
+
borderColor: "ui.disabled.primary",
|
|
5048
|
+
color: "ui.disabled.primary"
|
|
5049
|
+
}
|
|
5050
|
+
});
|
|
5051
|
+
}; // The "link" type is deprecated but we still want to style
|
|
5052
|
+
// it correctly for backwards compatibility.
|
|
5053
|
+
|
|
5054
|
+
|
|
5055
|
+
var link = function link(_ref3) {
|
|
5056
|
+
var _ref3$buttonSize = _ref3.buttonSize,
|
|
5057
|
+
buttonSize = _ref3$buttonSize === void 0 ? "medium" : _ref3$buttonSize;
|
|
5058
|
+
return _extends({
|
|
5059
|
+
bg: "transparent",
|
|
5060
|
+
color: "ui.link.primary",
|
|
5061
|
+
textDecoration: "underline"
|
|
5062
|
+
}, generalSizeValues(buttonSize), {
|
|
5063
|
+
_disabled: {
|
|
5064
|
+
bg: "transparent"
|
|
5065
|
+
},
|
|
5066
|
+
_hover: {
|
|
5067
|
+
bg: "transparent",
|
|
5068
|
+
color: "ui.link.secondary"
|
|
5069
|
+
}
|
|
5070
|
+
});
|
|
4971
5071
|
};
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
_disabled: {
|
|
4978
|
-
bg: "transparent"
|
|
4979
|
-
},
|
|
4980
|
-
_hover: {
|
|
5072
|
+
|
|
5073
|
+
var text = function text(_ref4) {
|
|
5074
|
+
var _ref4$buttonSize = _ref4.buttonSize,
|
|
5075
|
+
buttonSize = _ref4$buttonSize === void 0 ? "medium" : _ref4$buttonSize;
|
|
5076
|
+
return _extends({
|
|
4981
5077
|
bg: "transparent",
|
|
4982
|
-
color: "ui.link.
|
|
4983
|
-
}
|
|
5078
|
+
color: "ui.link.primary"
|
|
5079
|
+
}, generalSizeValues(buttonSize), {
|
|
5080
|
+
_disabled: {
|
|
5081
|
+
bg: "transparent"
|
|
5082
|
+
},
|
|
5083
|
+
_hover: {
|
|
5084
|
+
bg: "transparent",
|
|
5085
|
+
color: "ui.link.secondary"
|
|
5086
|
+
}
|
|
5087
|
+
});
|
|
4984
5088
|
};
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5089
|
+
|
|
5090
|
+
var pill = function pill(_ref5) {
|
|
5091
|
+
var _ref5$buttonSize = _ref5.buttonSize,
|
|
5092
|
+
buttonSize = _ref5$buttonSize === void 0 ? "medium" : _ref5$buttonSize;
|
|
5093
|
+
return _extends({
|
|
5094
|
+
bg: "ui.white",
|
|
5095
|
+
border: "1px solid",
|
|
5096
|
+
borderColor: "ui.gray.light-cool",
|
|
5097
|
+
borderRadius: "pill",
|
|
5098
|
+
color: "inherit"
|
|
5099
|
+
}, generalSizeValues(buttonSize, true), {
|
|
5100
|
+
_hover: {
|
|
5101
|
+
bg: "ui.gray.xx-light-cool",
|
|
5102
|
+
borderColor: "ui.gray.medium"
|
|
5103
|
+
},
|
|
5104
|
+
_disabled: {
|
|
5105
|
+
bg: "ui.gray.x-light-cool"
|
|
5106
|
+
}
|
|
5107
|
+
});
|
|
5001
5108
|
};
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
borderColor: "ui.
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5109
|
+
|
|
5110
|
+
var iconOnly = function iconOnly(_ref6) {
|
|
5111
|
+
var _ref6$buttonSize = _ref6.buttonSize,
|
|
5112
|
+
buttonSize = _ref6$buttonSize === void 0 ? "medium" : _ref6$buttonSize;
|
|
5113
|
+
return _extends({
|
|
5114
|
+
bg: "ui.white",
|
|
5115
|
+
border: "1px solid",
|
|
5116
|
+
borderColor: "ui.link.primary",
|
|
5117
|
+
color: "ui.link.primary"
|
|
5118
|
+
}, generalSizeValues(buttonSize), {
|
|
5119
|
+
paddingInlineStart: "inset.narrow",
|
|
5120
|
+
paddingInlineEnd: "inset.narrow",
|
|
5121
|
+
_hover: {
|
|
5122
|
+
bg: "ui.bg.default",
|
|
5123
|
+
borderColor: "ui.link.primary",
|
|
5124
|
+
color: "ui.link.primary"
|
|
5125
|
+
}
|
|
5126
|
+
});
|
|
5013
5127
|
};
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5128
|
+
|
|
5129
|
+
var callout = function callout(_ref7) {
|
|
5130
|
+
var _ref7$buttonSize = _ref7.buttonSize,
|
|
5131
|
+
buttonSize = _ref7$buttonSize === void 0 ? "medium" : _ref7$buttonSize;
|
|
5132
|
+
return _extends({
|
|
5133
|
+
bg: "brand.primary"
|
|
5134
|
+
}, generalSizeValues(buttonSize), {
|
|
5135
|
+
_hover: {
|
|
5136
|
+
bg: "brand.secondary"
|
|
5137
|
+
},
|
|
5138
|
+
_active: {
|
|
5139
|
+
bg: "brand.secondary"
|
|
5140
|
+
}
|
|
5141
|
+
});
|
|
5023
5142
|
};
|
|
5024
5143
|
|
|
5025
|
-
var noBrand =
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
bg: "ui.
|
|
5030
|
-
|
|
5031
|
-
})
|
|
5144
|
+
var noBrand = function noBrand(_ref8) {
|
|
5145
|
+
var _ref8$buttonSize = _ref8.buttonSize,
|
|
5146
|
+
buttonSize = _ref8$buttonSize === void 0 ? "medium" : _ref8$buttonSize;
|
|
5147
|
+
return _extends({
|
|
5148
|
+
bg: "ui.black",
|
|
5149
|
+
color: "ui.white"
|
|
5150
|
+
}, generalSizeValues(buttonSize), {
|
|
5151
|
+
_hover: {
|
|
5152
|
+
bg: "ui.gray.x-dark"
|
|
5153
|
+
}
|
|
5154
|
+
});
|
|
5155
|
+
};
|
|
5032
5156
|
|
|
5033
5157
|
var Button$1 = {
|
|
5034
5158
|
baseStyle: baseStyle,
|
|
@@ -5036,6 +5160,8 @@ var Button$1 = {
|
|
|
5036
5160
|
variants: {
|
|
5037
5161
|
primary: primary,
|
|
5038
5162
|
secondary: secondary,
|
|
5163
|
+
text: text,
|
|
5164
|
+
// Deprecated type. Use "text" instead.
|
|
5039
5165
|
link: link,
|
|
5040
5166
|
pill: pill,
|
|
5041
5167
|
iconOnly: iconOnly,
|
|
@@ -5686,7 +5812,7 @@ var Footer = {
|
|
|
5686
5812
|
lg: "30px"
|
|
5687
5813
|
},
|
|
5688
5814
|
marginRight: {
|
|
5689
|
-
xl: "
|
|
5815
|
+
xl: "100px"
|
|
5690
5816
|
},
|
|
5691
5817
|
order: {
|
|
5692
5818
|
base: "2",
|
|
@@ -6198,7 +6324,7 @@ var HeaderLoginButton = {
|
|
|
6198
6324
|
md: "auto"
|
|
6199
6325
|
},
|
|
6200
6326
|
padding: {
|
|
6201
|
-
md: "
|
|
6327
|
+
md: "10px 12px"
|
|
6202
6328
|
},
|
|
6203
6329
|
svg: {
|
|
6204
6330
|
fill: isOpen ? "ui.white" : null,
|
|
@@ -6454,11 +6580,15 @@ var HeaderSearchForm = {
|
|
|
6454
6580
|
desktopSearchBtn: {
|
|
6455
6581
|
alignSelf: "end",
|
|
6456
6582
|
backgroundColor: "transparent",
|
|
6583
|
+
borderColor: "ui.white",
|
|
6457
6584
|
borderRadius: "100px",
|
|
6458
6585
|
borderWidth: "2px",
|
|
6459
6586
|
height: "75px",
|
|
6460
6587
|
maxHeight: "75px",
|
|
6461
6588
|
width: "75px",
|
|
6589
|
+
svg: {
|
|
6590
|
+
marginTop: "xs"
|
|
6591
|
+
},
|
|
6462
6592
|
_focus: /*#__PURE__*/_extends({}, headerFocus, {
|
|
6463
6593
|
borderRadius: "100px"
|
|
6464
6594
|
}),
|
|
@@ -6494,7 +6624,8 @@ var HeaderSearchForm = {
|
|
|
6494
6624
|
display: "flex",
|
|
6495
6625
|
fontSize: "16px",
|
|
6496
6626
|
flex: "1",
|
|
6497
|
-
|
|
6627
|
+
justifyContent: "center",
|
|
6628
|
+
padding: "25px 0",
|
|
6498
6629
|
svg: {
|
|
6499
6630
|
fill: headerLightBlue,
|
|
6500
6631
|
marginLeft: "15px"
|
|
@@ -6529,7 +6660,7 @@ var HeaderSearchButton = {
|
|
|
6529
6660
|
borderBottom: {
|
|
6530
6661
|
md: "3px solid #1B7FA7"
|
|
6531
6662
|
},
|
|
6532
|
-
display: "flex",
|
|
6663
|
+
display: "inline-flex",
|
|
6533
6664
|
lineHeight: "1.3"
|
|
6534
6665
|
},
|
|
6535
6666
|
svg: {
|
|
@@ -6537,7 +6668,7 @@ var HeaderSearchButton = {
|
|
|
6537
6668
|
base: "0",
|
|
6538
6669
|
md: "xxs"
|
|
6539
6670
|
},
|
|
6540
|
-
|
|
6671
|
+
fill: {
|
|
6541
6672
|
base: isOpen ? "ui.white" : "ui.black",
|
|
6542
6673
|
md: isOpen ? "ui.white" : "ui.link.primary"
|
|
6543
6674
|
}
|
|
@@ -7370,7 +7501,7 @@ var Notification = {
|
|
|
7370
7501
|
},
|
|
7371
7502
|
icon: {
|
|
7372
7503
|
flexShrink: "0",
|
|
7373
|
-
marginEnd: "
|
|
7504
|
+
marginEnd: "xs"
|
|
7374
7505
|
}
|
|
7375
7506
|
};
|
|
7376
7507
|
}
|
|
@@ -7387,7 +7518,7 @@ var NotificationContent = {
|
|
|
7387
7518
|
content: {
|
|
7388
7519
|
color: notificationType === "warning" ? "brand.primary" : "currentColor",
|
|
7389
7520
|
marginTop: icon ? "xxxs" : "0",
|
|
7390
|
-
paddingStart: alignText ? "calc(var(--nypl-space-
|
|
7521
|
+
paddingStart: alignText ? "calc(var(--nypl-space-s) + var(--nypl-space-s))" : null,
|
|
7391
7522
|
width: "100%",
|
|
7392
7523
|
// Links should always be black and underlined.
|
|
7393
7524
|
a: {
|
|
@@ -8098,11 +8229,15 @@ var baseStyle$3 = function baseStyle(_ref) {
|
|
|
8098
8229
|
// have text color black.
|
|
8099
8230
|
tbody: {
|
|
8100
8231
|
th: {
|
|
8101
|
-
color: "
|
|
8232
|
+
color: "ui.black",
|
|
8102
8233
|
backgroundColor: useRowHeaders ? {
|
|
8103
8234
|
base: "ui.gray.x-light-cool",
|
|
8104
8235
|
md: "unset"
|
|
8105
|
-
} : undefined
|
|
8236
|
+
} : undefined,
|
|
8237
|
+
verticalAlign: "top"
|
|
8238
|
+
},
|
|
8239
|
+
td: {
|
|
8240
|
+
verticalAlign: "top"
|
|
8106
8241
|
}
|
|
8107
8242
|
},
|
|
8108
8243
|
thead: {
|
|
@@ -8666,7 +8801,7 @@ var Toggle$1 = {
|
|
|
8666
8801
|
var _baseStyle;
|
|
8667
8802
|
var $bg = /*#__PURE__*/cssVar("tooltip-bg");
|
|
8668
8803
|
var Tooltip = {
|
|
8669
|
-
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)
|
|
8804
|
+
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)
|
|
8670
8805
|
};
|
|
8671
8806
|
|
|
8672
8807
|
var fourByThree = {
|
|
@@ -12481,7 +12616,7 @@ var HeaderSearchButton$1 = /*#__PURE__*/chakra(function (_ref) {
|
|
|
12481
12616
|
"aria-haspopup": "true",
|
|
12482
12617
|
"aria-label": labelText,
|
|
12483
12618
|
"aria-expanded": isOpen ? true : null,
|
|
12484
|
-
buttonType: "
|
|
12619
|
+
buttonType: "text",
|
|
12485
12620
|
id: "searchButton",
|
|
12486
12621
|
onClick: function onClick() {
|
|
12487
12622
|
gaUtils.trackEvent(gaAction, gaLabel);
|
|
@@ -12691,7 +12826,7 @@ var HeaderLoginButton$1 = /*#__PURE__*/chakra(function (_ref) {
|
|
|
12691
12826
|
isDisabled: !isOpen
|
|
12692
12827
|
}, React__default.createElement(Button, {
|
|
12693
12828
|
"aria-label": desktopButtonLabel,
|
|
12694
|
-
buttonType: "
|
|
12829
|
+
buttonType: "text",
|
|
12695
12830
|
id: "loginButton",
|
|
12696
12831
|
onClick: function onClick() {
|
|
12697
12832
|
gaUtils.trackEvent(gaAction, gaLabel);
|
|
@@ -12818,7 +12953,7 @@ var HeaderMobileNavButton$1 = /*#__PURE__*/chakra(function () {
|
|
|
12818
12953
|
"aria-haspopup": "true",
|
|
12819
12954
|
"aria-label": isOpen ? "Close Navigation" : "Open Navigation",
|
|
12820
12955
|
"aria-expanded": isOpen ? true : null,
|
|
12821
|
-
buttonType: "
|
|
12956
|
+
buttonType: "text",
|
|
12822
12957
|
id: "mobileNav-btn",
|
|
12823
12958
|
onClick: function onClick() {
|
|
12824
12959
|
gaUtils.trackEvent("Click", "Mobile mobileMenu");
|
|
@@ -12985,7 +13120,7 @@ var Notification$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (prop
|
|
|
12985
13120
|
|
|
12986
13121
|
var dismissibleButton = dismissible && React__default.createElement(Button, {
|
|
12987
13122
|
"aria-label": "Close the notification",
|
|
12988
|
-
buttonType: "
|
|
13123
|
+
buttonType: "text",
|
|
12989
13124
|
id: id + "-notification-dismissible-button",
|
|
12990
13125
|
onClick: handleClose,
|
|
12991
13126
|
__css: styles.dismissibleButton
|
|
@@ -14105,7 +14240,7 @@ var SearchBar$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props,
|
|
|
14105
14240
|
isDisabled: isDisabled,
|
|
14106
14241
|
onClick: buttonOnClick,
|
|
14107
14242
|
type: "submit",
|
|
14108
|
-
|
|
14243
|
+
sx: searchBarButtonStyles
|
|
14109
14244
|
}, React__default.createElement(Icon, {
|
|
14110
14245
|
align: "left",
|
|
14111
14246
|
id: "searchbar-icon-" + id,
|
|
@@ -14226,7 +14361,7 @@ var SkeletonLoader$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (pr
|
|
|
14226
14361
|
})))));
|
|
14227
14362
|
}));
|
|
14228
14363
|
|
|
14229
|
-
var _excluded$26 = ["className", "defaultValue", "helperText", "id", "invalidText", "isDisabled", "isInvalid", "isRangeSlider", "isRequired", "labelText", "max", "min", "name", "onChange", "showBoxes", "showHelperInvalidText", "showLabel", "showRequiredLabel", "showValues", "step"];
|
|
14364
|
+
var _excluded$26 = ["className", "defaultValue", "helperText", "id", "invalidText", "isDisabled", "isInvalid", "isRangeSlider", "isRequired", "labelText", "max", "min", "name", "onChange", "showBoxes", "showHelperInvalidText", "showLabel", "showRequiredLabel", "showValues", "step", "value"];
|
|
14230
14365
|
/**
|
|
14231
14366
|
* The `Slider` component renders a singular value slider or a range slider
|
|
14232
14367
|
* with a min and max value. The value(s) can be updated through the slider
|
|
@@ -14267,6 +14402,7 @@ var Slider = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref)
|
|
|
14267
14402
|
showValues = _props$showValues === void 0 ? true : _props$showValues,
|
|
14268
14403
|
_props$step = props.step,
|
|
14269
14404
|
step = _props$step === void 0 ? 1 : _props$step,
|
|
14405
|
+
value = props.value,
|
|
14270
14406
|
rest = _objectWithoutPropertiesLoose(props, _excluded$26);
|
|
14271
14407
|
|
|
14272
14408
|
if (!id) {
|
|
@@ -14281,8 +14417,19 @@ var Slider = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref)
|
|
|
14281
14417
|
|
|
14282
14418
|
var _React$useState = React__default.useState(finalDevaultValue),
|
|
14283
14419
|
currentValue = _React$useState[0],
|
|
14284
|
-
setCurrentValue = _React$useState[1];
|
|
14420
|
+
setCurrentValue = _React$useState[1]; // If the value(s) needs to be updated programmatically,
|
|
14421
|
+
// listen to the `value` prop.
|
|
14285
14422
|
|
|
14423
|
+
|
|
14424
|
+
useEffect(function () {
|
|
14425
|
+
if (value) {
|
|
14426
|
+
if (typeof value === "number" && value !== currentValue) {
|
|
14427
|
+
setCurrentValue(value);
|
|
14428
|
+
} else if (value[0] !== currentValue[0] || value[1] !== currentValue[1]) {
|
|
14429
|
+
setCurrentValue(value);
|
|
14430
|
+
}
|
|
14431
|
+
}
|
|
14432
|
+
}, [value, currentValue]);
|
|
14286
14433
|
var finalIsInvalid = isInvalid; // In the Range Slider, if the first value is bigger than the second value,
|
|
14287
14434
|
// then set the invalid state.
|
|
14288
14435
|
|