@nypl/design-system-react-components 1.1.1 → 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 +26 -0
- package/dist/components/Accordion/Accordion.d.ts +3 -0
- package/dist/components/Button/Button.d.ts +3 -0
- 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 +244 -116
- 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 +244 -116
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/theme/components/button.d.ts +24 -102
- package/dist/theme/components/customTable.d.ts +8 -0
- package/dist/theme/components/header/headerSearchButton.d.ts +1 -2
- 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);
|
|
@@ -1945,11 +1953,11 @@ var Button = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(function (
|
|
|
1945
1953
|
}
|
|
1946
1954
|
|
|
1947
1955
|
styles = react.useStyleConfig("Button", {
|
|
1948
|
-
variant: variant
|
|
1956
|
+
variant: variant,
|
|
1957
|
+
buttonSize: size
|
|
1949
1958
|
});
|
|
1950
1959
|
return React__default.createElement(react.Button, Object.assign({
|
|
1951
1960
|
className: className,
|
|
1952
|
-
"data-testid": "button",
|
|
1953
1961
|
id: id,
|
|
1954
1962
|
isDisabled: isDisabled,
|
|
1955
1963
|
ref: ref,
|
|
@@ -1957,7 +1965,13 @@ var Button = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(function (
|
|
|
1957
1965
|
}, btnCallback, {
|
|
1958
1966
|
__css: styles
|
|
1959
1967
|
}, rest), children);
|
|
1960
|
-
})
|
|
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
|
+
});
|
|
1961
1975
|
|
|
1962
1976
|
/**
|
|
1963
1977
|
* This hook is used to determine if the current screen size is larger than
|
|
@@ -3033,6 +3047,20 @@ var reservoirSpacingTokens = {
|
|
|
3033
3047
|
xxl: reservoirSpacingValues["xxl"],
|
|
3034
3048
|
xxxl: reservoirSpacingValues["xxxl"],
|
|
3035
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
|
+
},
|
|
3036
3064
|
input: {
|
|
3037
3065
|
group: {
|
|
3038
3066
|
button: {
|
|
@@ -3073,7 +3101,7 @@ var reservoirSpacingTokens = {
|
|
|
3073
3101
|
};
|
|
3074
3102
|
var spacing = /*#__PURE__*/_extends({}, chakraSpacingTokens, reservoirSpacingTokens);
|
|
3075
3103
|
|
|
3076
|
-
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"];
|
|
3077
3105
|
/**
|
|
3078
3106
|
* Wrapper component to wrap `Checkbox` components. Can be displayed in a
|
|
3079
3107
|
* column or in a row. The `CheckboxGroup` component renders all the necessary
|
|
@@ -3108,6 +3136,7 @@ var CheckboxGroup = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(fun
|
|
|
3108
3136
|
showLabel = _props$showLabel === void 0 ? true : _props$showLabel,
|
|
3109
3137
|
_props$showRequiredLa = props.showRequiredLabel,
|
|
3110
3138
|
showRequiredLabel = _props$showRequiredLa === void 0 ? true : _props$showRequiredLa,
|
|
3139
|
+
value = props.value,
|
|
3111
3140
|
rest = _objectWithoutPropertiesLoose(props, _excluded$12);
|
|
3112
3141
|
|
|
3113
3142
|
var footnote = isInvalid ? invalidText : helperText;
|
|
@@ -3118,6 +3147,10 @@ var CheckboxGroup = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(fun
|
|
|
3118
3147
|
onChange: onChange
|
|
3119
3148
|
} : {};
|
|
3120
3149
|
|
|
3150
|
+
if (value) {
|
|
3151
|
+
checkboxProps["value"] = value;
|
|
3152
|
+
}
|
|
3153
|
+
|
|
3121
3154
|
if (!id) {
|
|
3122
3155
|
console.warn("NYPL Reservoir CheckboxGroup: This component's required `id` prop was not passed.");
|
|
3123
3156
|
} // Go through the Checkbox children and update them as needed.
|
|
@@ -4728,7 +4761,9 @@ var typography = {
|
|
|
4728
4761
|
"default": fontSizeValues["-1"]
|
|
4729
4762
|
},
|
|
4730
4763
|
button: {
|
|
4731
|
-
|
|
4764
|
+
small: fontSizeValues["-2"],
|
|
4765
|
+
"default": fontSizeValues["-1"],
|
|
4766
|
+
large: fontSizeValues["0"]
|
|
4732
4767
|
},
|
|
4733
4768
|
heading: {
|
|
4734
4769
|
primary: fontSizeValues["4"],
|
|
@@ -4930,16 +4965,8 @@ var baseStyle = {
|
|
|
4930
4965
|
cursor: "pointer",
|
|
4931
4966
|
color: "ui.white",
|
|
4932
4967
|
fontWeight: "button.default",
|
|
4933
|
-
height: "10",
|
|
4934
4968
|
justifyContent: "center",
|
|
4935
4969
|
lineHeight: "1.5",
|
|
4936
|
-
maxHeight: "2.5rem",
|
|
4937
|
-
minHeight: {
|
|
4938
|
-
base: defaultElementSizes.mobileFieldHeight,
|
|
4939
|
-
md: "auto"
|
|
4940
|
-
},
|
|
4941
|
-
py: "inset.narrow",
|
|
4942
|
-
px: "inset.default",
|
|
4943
4970
|
textDecoration: "none",
|
|
4944
4971
|
wordWrap: "normal",
|
|
4945
4972
|
svg: {
|
|
@@ -4957,101 +4984,181 @@ var baseStyle = {
|
|
|
4957
4984
|
opacity: "1",
|
|
4958
4985
|
pointerEvents: "none"
|
|
4959
4986
|
}
|
|
4960
|
-
}; // Styles for different visual variants:
|
|
4961
|
-
// primary, secondary, link, pill, iconOnly, callout, searchbar, noBrand
|
|
4962
|
-
|
|
4963
|
-
var primary = {
|
|
4964
|
-
bg: "ui.link.primary",
|
|
4965
|
-
height: "none",
|
|
4966
|
-
fontSize: "button.default",
|
|
4967
|
-
minWidth: "none"
|
|
4968
4987
|
};
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
borderColor: "ui.gray.medium"
|
|
4978
|
-
},
|
|
4979
|
-
_disabled: {
|
|
4980
|
-
bg: "ui.gray.x-light-cool"
|
|
4988
|
+
|
|
4989
|
+
var generalSizeValues = function generalSizeValues(size, isPill) {
|
|
4990
|
+
if (size === void 0) {
|
|
4991
|
+
size = "medium";
|
|
4992
|
+
}
|
|
4993
|
+
|
|
4994
|
+
if (isPill === void 0) {
|
|
4995
|
+
isPill = false;
|
|
4981
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];
|
|
5025
|
+
}; // Styles for different visual variants:
|
|
5026
|
+
// primary, secondary, link, text, pill, iconOnly, callout, noBrand
|
|
5027
|
+
|
|
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));
|
|
4982
5035
|
};
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
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({
|
|
4992
5065
|
bg: "transparent",
|
|
4993
|
-
color: "ui.link.
|
|
4994
|
-
|
|
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
|
+
});
|
|
4995
5077
|
};
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
bg: "transparent"
|
|
5002
|
-
},
|
|
5003
|
-
_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({
|
|
5004
5083
|
bg: "transparent",
|
|
5005
|
-
color: "ui.link.
|
|
5006
|
-
}
|
|
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
|
+
});
|
|
5007
5094
|
};
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
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
|
+
});
|
|
5024
5114
|
};
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
borderColor: "ui.
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
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
|
+
});
|
|
5036
5133
|
};
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
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
|
+
});
|
|
5046
5148
|
};
|
|
5047
5149
|
|
|
5048
|
-
var noBrand =
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
bg: "ui.
|
|
5053
|
-
|
|
5054
|
-
})
|
|
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
|
+
};
|
|
5055
5162
|
|
|
5056
5163
|
var Button$1 = {
|
|
5057
5164
|
baseStyle: baseStyle,
|
|
@@ -5060,6 +5167,7 @@ var Button$1 = {
|
|
|
5060
5167
|
primary: primary,
|
|
5061
5168
|
secondary: secondary,
|
|
5062
5169
|
text: text,
|
|
5170
|
+
// Deprecated type. Use "text" instead.
|
|
5063
5171
|
link: link,
|
|
5064
5172
|
pill: pill,
|
|
5065
5173
|
iconOnly: iconOnly,
|
|
@@ -5710,7 +5818,7 @@ var Footer = {
|
|
|
5710
5818
|
lg: "30px"
|
|
5711
5819
|
},
|
|
5712
5820
|
marginRight: {
|
|
5713
|
-
xl: "
|
|
5821
|
+
xl: "100px"
|
|
5714
5822
|
},
|
|
5715
5823
|
order: {
|
|
5716
5824
|
base: "2",
|
|
@@ -6222,7 +6330,7 @@ var HeaderLoginButton = {
|
|
|
6222
6330
|
md: "auto"
|
|
6223
6331
|
},
|
|
6224
6332
|
padding: {
|
|
6225
|
-
md: "
|
|
6333
|
+
md: "10px 12px"
|
|
6226
6334
|
},
|
|
6227
6335
|
svg: {
|
|
6228
6336
|
fill: isOpen ? "ui.white" : null,
|
|
@@ -6478,11 +6586,15 @@ var HeaderSearchForm = {
|
|
|
6478
6586
|
desktopSearchBtn: {
|
|
6479
6587
|
alignSelf: "end",
|
|
6480
6588
|
backgroundColor: "transparent",
|
|
6589
|
+
borderColor: "ui.white",
|
|
6481
6590
|
borderRadius: "100px",
|
|
6482
6591
|
borderWidth: "2px",
|
|
6483
6592
|
height: "75px",
|
|
6484
6593
|
maxHeight: "75px",
|
|
6485
6594
|
width: "75px",
|
|
6595
|
+
svg: {
|
|
6596
|
+
marginTop: "xs"
|
|
6597
|
+
},
|
|
6486
6598
|
_focus: /*#__PURE__*/_extends({}, headerFocus, {
|
|
6487
6599
|
borderRadius: "100px"
|
|
6488
6600
|
}),
|
|
@@ -6518,7 +6630,8 @@ var HeaderSearchForm = {
|
|
|
6518
6630
|
display: "flex",
|
|
6519
6631
|
fontSize: "16px",
|
|
6520
6632
|
flex: "1",
|
|
6521
|
-
|
|
6633
|
+
justifyContent: "center",
|
|
6634
|
+
padding: "25px 0",
|
|
6522
6635
|
svg: {
|
|
6523
6636
|
fill: headerLightBlue,
|
|
6524
6637
|
marginLeft: "15px"
|
|
@@ -6547,14 +6660,13 @@ var HeaderSearchButton = {
|
|
|
6547
6660
|
minWidth: {
|
|
6548
6661
|
md: "80px"
|
|
6549
6662
|
},
|
|
6550
|
-
px: "0",
|
|
6551
6663
|
textDecoration: "none",
|
|
6552
6664
|
span: {
|
|
6553
6665
|
alignItems: "center",
|
|
6554
6666
|
borderBottom: {
|
|
6555
6667
|
md: "3px solid #1B7FA7"
|
|
6556
6668
|
},
|
|
6557
|
-
display: "flex",
|
|
6669
|
+
display: "inline-flex",
|
|
6558
6670
|
lineHeight: "1.3"
|
|
6559
6671
|
},
|
|
6560
6672
|
svg: {
|
|
@@ -6562,7 +6674,7 @@ var HeaderSearchButton = {
|
|
|
6562
6674
|
base: "0",
|
|
6563
6675
|
md: "xxs"
|
|
6564
6676
|
},
|
|
6565
|
-
|
|
6677
|
+
fill: {
|
|
6566
6678
|
base: isOpen ? "ui.white" : "ui.black",
|
|
6567
6679
|
md: isOpen ? "ui.white" : "ui.link.primary"
|
|
6568
6680
|
}
|
|
@@ -7395,7 +7507,7 @@ var Notification = {
|
|
|
7395
7507
|
},
|
|
7396
7508
|
icon: {
|
|
7397
7509
|
flexShrink: "0",
|
|
7398
|
-
marginEnd: "
|
|
7510
|
+
marginEnd: "xs"
|
|
7399
7511
|
}
|
|
7400
7512
|
};
|
|
7401
7513
|
}
|
|
@@ -7412,7 +7524,7 @@ var NotificationContent = {
|
|
|
7412
7524
|
content: {
|
|
7413
7525
|
color: notificationType === "warning" ? "brand.primary" : "currentColor",
|
|
7414
7526
|
marginTop: icon ? "xxxs" : "0",
|
|
7415
|
-
paddingStart: alignText ? "calc(var(--nypl-space-
|
|
7527
|
+
paddingStart: alignText ? "calc(var(--nypl-space-s) + var(--nypl-space-s))" : null,
|
|
7416
7528
|
width: "100%",
|
|
7417
7529
|
// Links should always be black and underlined.
|
|
7418
7530
|
a: {
|
|
@@ -8123,11 +8235,15 @@ var baseStyle$3 = function baseStyle(_ref) {
|
|
|
8123
8235
|
// have text color black.
|
|
8124
8236
|
tbody: {
|
|
8125
8237
|
th: {
|
|
8126
|
-
color: "
|
|
8238
|
+
color: "ui.black",
|
|
8127
8239
|
backgroundColor: useRowHeaders ? {
|
|
8128
8240
|
base: "ui.gray.x-light-cool",
|
|
8129
8241
|
md: "unset"
|
|
8130
|
-
} : undefined
|
|
8242
|
+
} : undefined,
|
|
8243
|
+
verticalAlign: "top"
|
|
8244
|
+
},
|
|
8245
|
+
td: {
|
|
8246
|
+
verticalAlign: "top"
|
|
8131
8247
|
}
|
|
8132
8248
|
},
|
|
8133
8249
|
thead: {
|
|
@@ -8691,7 +8807,7 @@ var Toggle$1 = {
|
|
|
8691
8807
|
var _baseStyle;
|
|
8692
8808
|
var $bg = /*#__PURE__*/themeTools.cssVar("tooltip-bg");
|
|
8693
8809
|
var Tooltip = {
|
|
8694
|
-
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)
|
|
8695
8811
|
};
|
|
8696
8812
|
|
|
8697
8813
|
var fourByThree = {
|
|
@@ -14130,7 +14246,7 @@ var SearchBar$1 = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(funct
|
|
|
14130
14246
|
isDisabled: isDisabled,
|
|
14131
14247
|
onClick: buttonOnClick,
|
|
14132
14248
|
type: "submit",
|
|
14133
|
-
|
|
14249
|
+
sx: searchBarButtonStyles
|
|
14134
14250
|
}, React__default.createElement(Icon, {
|
|
14135
14251
|
align: "left",
|
|
14136
14252
|
id: "searchbar-icon-" + id,
|
|
@@ -14251,7 +14367,7 @@ var SkeletonLoader$1 = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(
|
|
|
14251
14367
|
})))));
|
|
14252
14368
|
}));
|
|
14253
14369
|
|
|
14254
|
-
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"];
|
|
14255
14371
|
/**
|
|
14256
14372
|
* The `Slider` component renders a singular value slider or a range slider
|
|
14257
14373
|
* with a min and max value. The value(s) can be updated through the slider
|
|
@@ -14292,6 +14408,7 @@ var Slider = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(function (
|
|
|
14292
14408
|
showValues = _props$showValues === void 0 ? true : _props$showValues,
|
|
14293
14409
|
_props$step = props.step,
|
|
14294
14410
|
step = _props$step === void 0 ? 1 : _props$step,
|
|
14411
|
+
value = props.value,
|
|
14295
14412
|
rest = _objectWithoutPropertiesLoose(props, _excluded$26);
|
|
14296
14413
|
|
|
14297
14414
|
if (!id) {
|
|
@@ -14306,8 +14423,19 @@ var Slider = /*#__PURE__*/react.chakra( /*#__PURE__*/React.forwardRef(function (
|
|
|
14306
14423
|
|
|
14307
14424
|
var _React$useState = React__default.useState(finalDevaultValue),
|
|
14308
14425
|
currentValue = _React$useState[0],
|
|
14309
|
-
setCurrentValue = _React$useState[1];
|
|
14426
|
+
setCurrentValue = _React$useState[1]; // If the value(s) needs to be updated programmatically,
|
|
14427
|
+
// listen to the `value` prop.
|
|
14310
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]);
|
|
14311
14439
|
var finalIsInvalid = isInvalid; // In the Range Slider, if the first value is bigger than the second value,
|
|
14312
14440
|
// then set the invalid state.
|
|
14313
14441
|
|