@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.
@@ -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);
@@ -1939,11 +1947,11 @@ var Button = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref)
1939
1947
  }
1940
1948
 
1941
1949
  styles = useStyleConfig("Button", {
1942
- variant: variant
1950
+ variant: variant,
1951
+ buttonSize: size
1943
1952
  });
1944
1953
  return React__default.createElement(Button$2, Object.assign({
1945
1954
  className: className,
1946
- "data-testid": "button",
1947
1955
  id: id,
1948
1956
  isDisabled: isDisabled,
1949
1957
  ref: ref,
@@ -1951,7 +1959,13 @@ var Button = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref)
1951
1959
  }, btnCallback, {
1952
1960
  __css: styles
1953
1961
  }, rest), children);
1954
- }));
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
+ });
1955
1969
 
1956
1970
  /**
1957
1971
  * This hook is used to determine if the current screen size is larger than
@@ -3027,6 +3041,20 @@ var reservoirSpacingTokens = {
3027
3041
  xxl: reservoirSpacingValues["xxl"],
3028
3042
  xxxl: reservoirSpacingValues["xxxl"],
3029
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
+ },
3030
3058
  input: {
3031
3059
  group: {
3032
3060
  button: {
@@ -3067,7 +3095,7 @@ var reservoirSpacingTokens = {
3067
3095
  };
3068
3096
  var spacing = /*#__PURE__*/_extends({}, chakraSpacingTokens, reservoirSpacingTokens);
3069
3097
 
3070
- 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"];
3071
3099
  /**
3072
3100
  * Wrapper component to wrap `Checkbox` components. Can be displayed in a
3073
3101
  * column or in a row. The `CheckboxGroup` component renders all the necessary
@@ -3102,6 +3130,7 @@ var CheckboxGroup = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props
3102
3130
  showLabel = _props$showLabel === void 0 ? true : _props$showLabel,
3103
3131
  _props$showRequiredLa = props.showRequiredLabel,
3104
3132
  showRequiredLabel = _props$showRequiredLa === void 0 ? true : _props$showRequiredLa,
3133
+ value = props.value,
3105
3134
  rest = _objectWithoutPropertiesLoose(props, _excluded$12);
3106
3135
 
3107
3136
  var footnote = isInvalid ? invalidText : helperText;
@@ -3112,6 +3141,10 @@ var CheckboxGroup = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props
3112
3141
  onChange: onChange
3113
3142
  } : {};
3114
3143
 
3144
+ if (value) {
3145
+ checkboxProps["value"] = value;
3146
+ }
3147
+
3115
3148
  if (!id) {
3116
3149
  console.warn("NYPL Reservoir CheckboxGroup: This component's required `id` prop was not passed.");
3117
3150
  } // Go through the Checkbox children and update them as needed.
@@ -4722,7 +4755,9 @@ var typography = {
4722
4755
  "default": fontSizeValues["-1"]
4723
4756
  },
4724
4757
  button: {
4725
- "default": fontSizeValues["-1"]
4758
+ small: fontSizeValues["-2"],
4759
+ "default": fontSizeValues["-1"],
4760
+ large: fontSizeValues["0"]
4726
4761
  },
4727
4762
  heading: {
4728
4763
  primary: fontSizeValues["4"],
@@ -4924,16 +4959,8 @@ var baseStyle = {
4924
4959
  cursor: "pointer",
4925
4960
  color: "ui.white",
4926
4961
  fontWeight: "button.default",
4927
- height: "10",
4928
4962
  justifyContent: "center",
4929
4963
  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
4964
  textDecoration: "none",
4938
4965
  wordWrap: "normal",
4939
4966
  svg: {
@@ -4951,101 +4978,181 @@ var baseStyle = {
4951
4978
  opacity: "1",
4952
4979
  pointerEvents: "none"
4953
4980
  }
4954
- }; // Styles for different visual variants:
4955
- // primary, secondary, link, pill, iconOnly, callout, searchbar, noBrand
4956
-
4957
- var primary = {
4958
- bg: "ui.link.primary",
4959
- height: "none",
4960
- fontSize: "button.default",
4961
- minWidth: "none"
4962
4981
  };
4963
- var secondary = {
4964
- bg: "ui.white",
4965
- border: "1px solid",
4966
- borderColor: "ui.gray.light-cool",
4967
- color: "inherit",
4968
- fontSize: "button.default",
4969
- _hover: {
4970
- bg: "ui.gray.xx-light-cool",
4971
- borderColor: "ui.gray.medium"
4972
- },
4973
- _disabled: {
4974
- bg: "ui.gray.x-light-cool"
4982
+
4983
+ var generalSizeValues = function generalSizeValues(size, isPill) {
4984
+ if (size === void 0) {
4985
+ size = "medium";
4986
+ }
4987
+
4988
+ if (isPill === void 0) {
4989
+ isPill = false;
4975
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];
5019
+ }; // Styles for different visual variants:
5020
+ // primary, secondary, link, text, pill, iconOnly, callout, noBrand
5021
+
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));
4976
5029
  };
4977
- var link = {
4978
- bg: "transparent",
4979
- color: "ui.link.primary",
4980
- lineHeight: "2.5",
4981
- textDecoration: "underline",
4982
- _disabled: {
4983
- bg: "transparent"
4984
- },
4985
- _hover: {
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({
4986
5059
  bg: "transparent",
4987
- color: "ui.link.secondary"
4988
- }
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
+ });
4989
5071
  };
4990
- var text = {
4991
- bg: "transparent",
4992
- color: "ui.link.primary",
4993
- fontSize: "button.default",
4994
- _disabled: {
4995
- bg: "transparent"
4996
- },
4997
- _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({
4998
5077
  bg: "transparent",
4999
- color: "ui.link.secondary"
5000
- }
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
+ });
5001
5088
  };
5002
- var pill = {
5003
- bg: "ui.white",
5004
- border: "1px solid",
5005
- borderColor: "ui.gray.light-cool",
5006
- borderRadius: "pill",
5007
- color: "inherit",
5008
- fontSize: "button.default",
5009
- py: "inset.narrow",
5010
- px: "inset.wide",
5011
- _hover: {
5012
- bg: "ui.gray.xx-light-cool",
5013
- borderColor: "ui.gray.medium"
5014
- },
5015
- _disabled: {
5016
- bg: "ui.gray.x-light-cool"
5017
- }
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
+ });
5018
5108
  };
5019
- var iconOnly = {
5020
- bg: "ui.white",
5021
- border: "1px solid",
5022
- borderColor: "ui.gray.light-cool",
5023
- color: "inherit",
5024
- _hover: {
5025
- bg: "ui.gray.xx-light-cool",
5026
- borderColor: "ui.gray.medium"
5027
- },
5028
- paddingInlineStart: "inset.narrow",
5029
- paddingInlineEnd: "inset.narrow"
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
+ });
5030
5127
  };
5031
- var callout = {
5032
- bg: "brand.primary",
5033
- fontSize: "button.default",
5034
- _hover: {
5035
- bg: "brand.secondary"
5036
- },
5037
- _active: {
5038
- bg: "brand.secondary"
5039
- }
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
+ });
5040
5142
  };
5041
5143
 
5042
- var noBrand = /*#__PURE__*/_extends({}, primary, {
5043
- bg: "ui.black",
5044
- color: "ui.white",
5045
- _hover: {
5046
- bg: "ui.gray.x-dark"
5047
- }
5048
- });
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
+ };
5049
5156
 
5050
5157
  var Button$1 = {
5051
5158
  baseStyle: baseStyle,
@@ -5054,6 +5161,7 @@ var Button$1 = {
5054
5161
  primary: primary,
5055
5162
  secondary: secondary,
5056
5163
  text: text,
5164
+ // Deprecated type. Use "text" instead.
5057
5165
  link: link,
5058
5166
  pill: pill,
5059
5167
  iconOnly: iconOnly,
@@ -5704,7 +5812,7 @@ var Footer = {
5704
5812
  lg: "30px"
5705
5813
  },
5706
5814
  marginRight: {
5707
- xl: "70px"
5815
+ xl: "100px"
5708
5816
  },
5709
5817
  order: {
5710
5818
  base: "2",
@@ -6216,7 +6324,7 @@ var HeaderLoginButton = {
6216
6324
  md: "auto"
6217
6325
  },
6218
6326
  padding: {
6219
- md: "4px 10px"
6327
+ md: "10px 12px"
6220
6328
  },
6221
6329
  svg: {
6222
6330
  fill: isOpen ? "ui.white" : null,
@@ -6472,11 +6580,15 @@ var HeaderSearchForm = {
6472
6580
  desktopSearchBtn: {
6473
6581
  alignSelf: "end",
6474
6582
  backgroundColor: "transparent",
6583
+ borderColor: "ui.white",
6475
6584
  borderRadius: "100px",
6476
6585
  borderWidth: "2px",
6477
6586
  height: "75px",
6478
6587
  maxHeight: "75px",
6479
6588
  width: "75px",
6589
+ svg: {
6590
+ marginTop: "xs"
6591
+ },
6480
6592
  _focus: /*#__PURE__*/_extends({}, headerFocus, {
6481
6593
  borderRadius: "100px"
6482
6594
  }),
@@ -6512,7 +6624,8 @@ var HeaderSearchForm = {
6512
6624
  display: "flex",
6513
6625
  fontSize: "16px",
6514
6626
  flex: "1",
6515
- padding: "35px 0",
6627
+ justifyContent: "center",
6628
+ padding: "25px 0",
6516
6629
  svg: {
6517
6630
  fill: headerLightBlue,
6518
6631
  marginLeft: "15px"
@@ -6541,14 +6654,13 @@ var HeaderSearchButton = {
6541
6654
  minWidth: {
6542
6655
  md: "80px"
6543
6656
  },
6544
- px: "0",
6545
6657
  textDecoration: "none",
6546
6658
  span: {
6547
6659
  alignItems: "center",
6548
6660
  borderBottom: {
6549
6661
  md: "3px solid #1B7FA7"
6550
6662
  },
6551
- display: "flex",
6663
+ display: "inline-flex",
6552
6664
  lineHeight: "1.3"
6553
6665
  },
6554
6666
  svg: {
@@ -6556,7 +6668,7 @@ var HeaderSearchButton = {
6556
6668
  base: "0",
6557
6669
  md: "xxs"
6558
6670
  },
6559
- color: {
6671
+ fill: {
6560
6672
  base: isOpen ? "ui.white" : "ui.black",
6561
6673
  md: isOpen ? "ui.white" : "ui.link.primary"
6562
6674
  }
@@ -7389,7 +7501,7 @@ var Notification = {
7389
7501
  },
7390
7502
  icon: {
7391
7503
  flexShrink: "0",
7392
- marginEnd: "s"
7504
+ marginEnd: "xs"
7393
7505
  }
7394
7506
  };
7395
7507
  }
@@ -7406,7 +7518,7 @@ var NotificationContent = {
7406
7518
  content: {
7407
7519
  color: notificationType === "warning" ? "brand.primary" : "currentColor",
7408
7520
  marginTop: icon ? "xxxs" : "0",
7409
- paddingStart: alignText ? "calc(var(--nypl-space-m) + var(--nypl-space-s))" : null,
7521
+ paddingStart: alignText ? "calc(var(--nypl-space-s) + var(--nypl-space-s))" : null,
7410
7522
  width: "100%",
7411
7523
  // Links should always be black and underlined.
7412
7524
  a: {
@@ -8117,11 +8229,15 @@ var baseStyle$3 = function baseStyle(_ref) {
8117
8229
  // have text color black.
8118
8230
  tbody: {
8119
8231
  th: {
8120
- color: "var(--nypl-colors-ui-black)",
8232
+ color: "ui.black",
8121
8233
  backgroundColor: useRowHeaders ? {
8122
8234
  base: "ui.gray.x-light-cool",
8123
8235
  md: "unset"
8124
- } : undefined
8236
+ } : undefined,
8237
+ verticalAlign: "top"
8238
+ },
8239
+ td: {
8240
+ verticalAlign: "top"
8125
8241
  }
8126
8242
  },
8127
8243
  thead: {
@@ -8685,7 +8801,7 @@ var Toggle$1 = {
8685
8801
  var _baseStyle;
8686
8802
  var $bg = /*#__PURE__*/cssVar("tooltip-bg");
8687
8803
  var Tooltip = {
8688
- 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)
8689
8805
  };
8690
8806
 
8691
8807
  var fourByThree = {
@@ -14124,7 +14240,7 @@ var SearchBar$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props,
14124
14240
  isDisabled: isDisabled,
14125
14241
  onClick: buttonOnClick,
14126
14242
  type: "submit",
14127
- __css: searchBarButtonStyles
14243
+ sx: searchBarButtonStyles
14128
14244
  }, React__default.createElement(Icon, {
14129
14245
  align: "left",
14130
14246
  id: "searchbar-icon-" + id,
@@ -14245,7 +14361,7 @@ var SkeletonLoader$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (pr
14245
14361
  })))));
14246
14362
  }));
14247
14363
 
14248
- 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"];
14249
14365
  /**
14250
14366
  * The `Slider` component renders a singular value slider or a range slider
14251
14367
  * with a min and max value. The value(s) can be updated through the slider
@@ -14286,6 +14402,7 @@ var Slider = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref)
14286
14402
  showValues = _props$showValues === void 0 ? true : _props$showValues,
14287
14403
  _props$step = props.step,
14288
14404
  step = _props$step === void 0 ? 1 : _props$step,
14405
+ value = props.value,
14289
14406
  rest = _objectWithoutPropertiesLoose(props, _excluded$26);
14290
14407
 
14291
14408
  if (!id) {
@@ -14300,8 +14417,19 @@ var Slider = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref)
14300
14417
 
14301
14418
  var _React$useState = React__default.useState(finalDevaultValue),
14302
14419
  currentValue = _React$useState[0],
14303
- setCurrentValue = _React$useState[1];
14420
+ setCurrentValue = _React$useState[1]; // If the value(s) needs to be updated programmatically,
14421
+ // listen to the `value` prop.
14304
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]);
14305
14433
  var finalIsInvalid = isInvalid; // In the Range Slider, if the first value is bigger than the second value,
14306
14434
  // then set the invalid state.
14307
14435