@zendeskgarden/react-dropdowns 9.0.0-next.8 → 9.0.0

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.
Files changed (81) hide show
  1. package/dist/esm/elements/combobox/Combobox.js +9 -10
  2. package/dist/esm/elements/combobox/Field.js +0 -1
  3. package/dist/esm/elements/combobox/Hint.js +1 -2
  4. package/dist/esm/elements/combobox/Label.js +1 -2
  5. package/dist/esm/elements/combobox/Listbox.js +1 -2
  6. package/dist/esm/elements/combobox/Message.js +1 -2
  7. package/dist/esm/elements/combobox/OptGroup.js +4 -5
  8. package/dist/esm/elements/combobox/Option.js +9 -6
  9. package/dist/esm/elements/combobox/OptionMeta.js +0 -1
  10. package/dist/esm/elements/combobox/Tag.js +0 -1
  11. package/dist/esm/elements/menu/Item.js +11 -10
  12. package/dist/esm/elements/menu/ItemGroup.js +5 -5
  13. package/dist/esm/elements/menu/ItemMeta.js +0 -1
  14. package/dist/esm/elements/menu/Menu.js +9 -36
  15. package/dist/esm/elements/menu/MenuList.js +2 -3
  16. package/dist/esm/elements/menu/Separator.js +0 -1
  17. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/check-lg-stroke.svg.js +1 -1
  18. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +1 -1
  19. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-left-stroke.svg.js +1 -1
  20. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-right-stroke.svg.js +1 -1
  21. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/plus-stroke.svg.js +1 -1
  22. package/dist/esm/views/combobox/StyledCombobox.js +2 -5
  23. package/dist/esm/views/combobox/StyledContainer.js +2 -5
  24. package/dist/esm/views/combobox/StyledField.js +2 -5
  25. package/dist/esm/views/combobox/StyledFloatingListbox.js +2 -5
  26. package/dist/esm/views/combobox/StyledHint.js +2 -5
  27. package/dist/esm/views/combobox/StyledInput.js +10 -7
  28. package/dist/esm/views/combobox/StyledInputGroup.js +2 -5
  29. package/dist/esm/views/combobox/StyledInputIcon.js +29 -26
  30. package/dist/esm/views/combobox/StyledLabel.js +2 -5
  31. package/dist/esm/views/combobox/StyledListbox.js +1 -5
  32. package/dist/esm/views/combobox/StyledListboxSeparator.js +10 -7
  33. package/dist/esm/views/combobox/StyledMessage.js +2 -5
  34. package/dist/esm/views/combobox/StyledOptGroup.js +2 -5
  35. package/dist/esm/views/combobox/StyledOption.js +34 -16
  36. package/dist/esm/views/combobox/StyledOptionContent.js +2 -5
  37. package/dist/esm/views/combobox/StyledOptionIcon.js +26 -15
  38. package/dist/esm/views/combobox/StyledOptionMeta.js +12 -7
  39. package/dist/esm/views/combobox/StyledOptionTypeIcon.js +21 -24
  40. package/dist/esm/views/combobox/StyledTag.js +6 -6
  41. package/dist/esm/views/combobox/StyledTagsButton.js +10 -7
  42. package/dist/esm/views/combobox/StyledTrigger.js +65 -37
  43. package/dist/esm/views/combobox/StyledValue.js +11 -7
  44. package/dist/esm/views/menu/StyledFloatingMenu.js +2 -5
  45. package/dist/esm/views/menu/StyledItem.js +2 -5
  46. package/dist/esm/views/menu/StyledItemContent.js +2 -5
  47. package/dist/esm/views/menu/StyledItemGroup.js +2 -5
  48. package/dist/esm/views/menu/StyledItemIcon.js +2 -5
  49. package/dist/esm/views/menu/StyledItemMeta.js +2 -5
  50. package/dist/esm/views/menu/StyledItemTypeIcon.js +2 -5
  51. package/dist/esm/views/menu/StyledMenu.js +4 -7
  52. package/dist/esm/views/menu/StyledSeparator.js +2 -5
  53. package/dist/index.cjs.js +387 -370
  54. package/dist/typings/context/useComboboxContext.d.ts +12 -13
  55. package/dist/typings/context/useFieldContext.d.ts +6 -6
  56. package/dist/typings/context/useItemContext.d.ts +2 -3
  57. package/dist/typings/context/useItemGroupContext.d.ts +2 -3
  58. package/dist/typings/context/useMenuContext.d.ts +10 -11
  59. package/dist/typings/context/useOptionContext.d.ts +2 -3
  60. package/dist/typings/elements/combobox/Field.d.ts +3 -1
  61. package/dist/typings/elements/combobox/Option.d.ts +3 -1
  62. package/dist/typings/elements/combobox/Tag.d.ts +3 -1
  63. package/dist/typings/elements/combobox/TagAvatar.d.ts +0 -1
  64. package/dist/typings/elements/combobox/utils.d.ts +2 -2
  65. package/dist/typings/elements/menu/Item.d.ts +3 -1
  66. package/dist/typings/elements/menu/utils.d.ts +2 -2
  67. package/dist/typings/types/index.d.ts +2 -0
  68. package/dist/typings/views/combobox/StyledHint.d.ts +0 -1
  69. package/dist/typings/views/combobox/StyledInputIcon.d.ts +6 -7
  70. package/dist/typings/views/combobox/StyledLabel.d.ts +0 -1
  71. package/dist/typings/views/combobox/StyledMessage.d.ts +0 -1
  72. package/dist/typings/views/combobox/StyledOptionIcon.d.ts +8 -4
  73. package/dist/typings/views/combobox/StyledOptionTypeIcon.d.ts +3 -4
  74. package/dist/typings/views/combobox/StyledTag.d.ts +2 -6
  75. package/dist/typings/views/index.d.ts +0 -1
  76. package/dist/typings/views/menu/StyledItemIcon.d.ts +2 -3
  77. package/dist/typings/views/menu/StyledItemTypeIcon.d.ts +1 -2
  78. package/package.json +12 -13
  79. package/LICENSE.md +0 -176
  80. package/dist/esm/views/menu/StyledButton.js +0 -23
  81. package/dist/typings/views/menu/StyledButton.d.ts +0 -20
package/dist/index.cjs.js CHANGED
@@ -14,13 +14,13 @@ var reactTheming = require('@zendeskgarden/react-theming');
14
14
  var reactForms = require('@zendeskgarden/react-forms');
15
15
  var polished = require('polished');
16
16
  var reactTags = require('@zendeskgarden/react-tags');
17
- var reactButtons = require('@zendeskgarden/react-buttons');
18
17
  var reactDom$1 = require('react-dom');
19
18
  var reactDom = require('@floating-ui/react-dom');
20
19
  var containerUtilities = require('@zendeskgarden/container-utilities');
21
20
  var reactTooltips = require('@zendeskgarden/react-tooltips');
22
21
  var reactMergeRefs = require('react-merge-refs');
23
22
  var containerMenu = require('@zendeskgarden/container-menu');
23
+ var reactButtons = require('@zendeskgarden/react-buttons');
24
24
 
25
25
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
26
26
 
@@ -47,7 +47,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
47
47
  var styled__default = /*#__PURE__*/_interopDefault(styled);
48
48
 
49
49
  var _path$4;
50
- function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
50
+ function _extends$4() { return _extends$4 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$4.apply(null, arguments); }
51
51
  var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
52
52
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
53
53
  xmlns: "http://www.w3.org/2000/svg",
@@ -80,87 +80,69 @@ const useFieldContext = () => {
80
80
  return context;
81
81
  };
82
82
 
83
- const COMPONENT_ID$v = 'dropdowns.combobox.label';
83
+ const COMPONENT_ID$u = 'dropdowns.combobox.label';
84
84
  const StyledLabel = styled__default.default(reactForms.Field.Label).attrs({
85
- 'data-garden-id': COMPONENT_ID$v,
86
- 'data-garden-version': '9.0.0-next.8'
85
+ 'data-garden-id': COMPONENT_ID$u,
86
+ 'data-garden-version': '9.0.0'
87
87
  }).withConfig({
88
88
  displayName: "StyledLabel",
89
89
  componentId: "sc-az6now-0"
90
- })(["vertical-align:revert;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$v, props));
91
- StyledLabel.defaultProps = {
92
- theme: reactTheming.DEFAULT_THEME
93
- };
90
+ })(["vertical-align:revert;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$u, props));
94
91
 
95
- const COMPONENT_ID$u = 'dropdowns.combobox.hint';
92
+ const COMPONENT_ID$t = 'dropdowns.combobox.hint';
96
93
  const StyledHint = styled__default.default(reactForms.Field.Hint).attrs({
97
- 'data-garden-id': COMPONENT_ID$u,
98
- 'data-garden-version': '9.0.0-next.8'
94
+ 'data-garden-id': COMPONENT_ID$t,
95
+ 'data-garden-version': '9.0.0'
99
96
  }).withConfig({
100
97
  displayName: "StyledHint",
101
98
  componentId: "sc-106qvqx-0"
102
- })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$u, props));
103
- StyledHint.defaultProps = {
104
- theme: reactTheming.DEFAULT_THEME
105
- };
99
+ })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$t, props));
106
100
 
107
- const COMPONENT_ID$t = 'dropdowns.combobox.message';
101
+ const COMPONENT_ID$s = 'dropdowns.combobox.message';
108
102
  const StyledMessage = styled__default.default(reactForms.Field.Message).attrs({
109
- 'data-garden-id': COMPONENT_ID$t,
110
- 'data-garden-version': '9.0.0-next.8'
103
+ 'data-garden-id': COMPONENT_ID$s,
104
+ 'data-garden-version': '9.0.0'
111
105
  }).withConfig({
112
106
  displayName: "StyledMessage",
113
107
  componentId: "sc-jux8m5-0"
114
- })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$t, props));
115
- StyledMessage.defaultProps = {
116
- theme: reactTheming.DEFAULT_THEME
117
- };
108
+ })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$s, props));
118
109
 
119
- const COMPONENT_ID$s = 'dropdowns.combobox';
110
+ const COMPONENT_ID$r = 'dropdowns.combobox';
120
111
  const sizeStyles$a = props => {
121
112
  const minWidth = `${props.isCompact ? 100 : 144}px`;
122
113
  const marginTop = `${props.theme.space.base * (props.isCompact ? 1 : 2)}px`;
123
114
  return styled.css(["min-width:", ";", ":not([hidden]) + &&,", " + &&,", " + &&,&& + ", ",&& + ", "{margin-top:", ";}"], minWidth, StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, marginTop);
124
115
  };
125
116
  const StyledCombobox = styled__default.default.div.attrs({
126
- 'data-garden-id': COMPONENT_ID$s,
127
- 'data-garden-version': '9.0.0-next.8'
117
+ 'data-garden-id': COMPONENT_ID$r,
118
+ 'data-garden-version': '9.0.0'
128
119
  }).withConfig({
129
120
  displayName: "StyledCombobox",
130
121
  componentId: "sc-13eybg8-0"
131
- })(["", ";", ";"], sizeStyles$a, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$s, props));
132
- StyledCombobox.defaultProps = {
133
- theme: reactTheming.DEFAULT_THEME
134
- };
122
+ })(["", ";", ";"], sizeStyles$a, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$r, props));
135
123
 
136
- const COMPONENT_ID$r = 'dropdowns.combobox.container';
124
+ const COMPONENT_ID$q = 'dropdowns.combobox.container';
137
125
  const StyledContainer = styled__default.default.div.attrs({
138
- 'data-garden-id': COMPONENT_ID$r,
139
- 'data-garden-version': '9.0.0-next.8'
126
+ 'data-garden-id': COMPONENT_ID$q,
127
+ 'data-garden-version': '9.0.0'
140
128
  }).withConfig({
141
129
  displayName: "StyledContainer",
142
130
  componentId: "sc-14i9jid-0"
143
- })(["display:flex;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$r, props));
144
- StyledContainer.defaultProps = {
145
- theme: reactTheming.DEFAULT_THEME
146
- };
131
+ })(["display:flex;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$q, props));
147
132
 
148
- const COMPONENT_ID$q = 'dropdowns.combobox.field';
133
+ const COMPONENT_ID$p = 'dropdowns.combobox.field';
149
134
  const StyledField = styled__default.default.div.attrs({
150
- 'data-garden-id': COMPONENT_ID$q,
151
- 'data-garden-version': '9.0.0-next.8'
135
+ 'data-garden-id': COMPONENT_ID$p,
136
+ 'data-garden-version': '9.0.0'
152
137
  }).withConfig({
153
138
  displayName: "StyledField",
154
139
  componentId: "sc-zc57xl-0"
155
- })(["direction:", ";", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$q, props));
156
- StyledField.defaultProps = {
157
- theme: reactTheming.DEFAULT_THEME
158
- };
140
+ })(["direction:", ";", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$p, props));
159
141
 
160
- const COMPONENT_ID$p = 'dropdowns.combobox.floating';
142
+ const COMPONENT_ID$o = 'dropdowns.combobox.floating';
161
143
  const StyledFloatingListbox = styled__default.default.div.attrs({
162
- 'data-garden-id': COMPONENT_ID$p,
163
- 'data-garden-version': '9.0.0-next.8'
144
+ 'data-garden-id': COMPONENT_ID$o,
145
+ 'data-garden-version': '9.0.0'
164
146
  }).withConfig({
165
147
  displayName: "StyledFloatingListbox",
166
148
  componentId: "sc-1cp6spf-0"
@@ -169,14 +151,17 @@ const StyledFloatingListbox = styled__default.default.div.attrs({
169
151
  hidden: props.isHidden,
170
152
  animationModifier: '[data-garden-animate="true"]',
171
153
  zIndex: props.zIndex
172
- }), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$p, props));
173
- StyledFloatingListbox.defaultProps = {
174
- theme: reactTheming.DEFAULT_THEME
175
- };
154
+ }), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$o, props));
176
155
 
177
- const COMPONENT_ID$o = 'dropdowns.combobox.input';
178
- const colorStyles$8 = props => {
179
- const placeholderColor = reactTheming.getColorV8('neutralHue', 400, props.theme);
156
+ const COMPONENT_ID$n = 'dropdowns.combobox.input';
157
+ const colorStyles$9 = _ref => {
158
+ let {
159
+ theme
160
+ } = _ref;
161
+ const placeholderColor = reactTheming.getColor({
162
+ theme,
163
+ variable: 'foreground.disabled'
164
+ });
180
165
  return styled.css(["background-color:inherit;color:inherit;&::placeholder{opacity:1;color:", ";}"], placeholderColor);
181
166
  };
182
167
  const getHeight = props => {
@@ -194,81 +179,106 @@ const sizeStyles$9 = props => {
194
179
  return styled.css(["min-width:", ";height:", "px;line-height:", ";font-size:", ";&&{margin-top:", ";margin-bottom:", ";}"], minWidth, height, lineHeight, fontSize, margin, margin);
195
180
  };
196
181
  const StyledInput = styled__default.default.input.attrs({
197
- 'data-garden-id': COMPONENT_ID$o,
198
- 'data-garden-version': '9.0.0-next.8'
182
+ 'data-garden-id': COMPONENT_ID$n,
183
+ 'data-garden-version': '9.0.0'
199
184
  }).withConfig({
200
185
  displayName: "StyledInput",
201
186
  componentId: "sc-1lkqdg-0"
202
- })(["flex-basis:0;flex-grow:1;border:none;padding:0;font-family:inherit;&:focus{outline:none;}", ";", ";&[hidden]{display:revert;", "}&[aria-hidden='true']{display:none;}", ";"], sizeStyles$9, colorStyles$8, props => props.isEditable && polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$o, props));
203
- StyledInput.defaultProps = {
204
- theme: reactTheming.DEFAULT_THEME
205
- };
187
+ })(["flex-basis:0;flex-grow:1;border:none;padding:0;font-family:inherit;&:focus{outline:none;}", ";", ";&[hidden]{display:revert;", "}&[aria-hidden='true']{display:none;}", ";"], sizeStyles$9, colorStyles$9, props => props.isEditable && polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$n, props));
206
188
 
207
- const COMPONENT_ID$n = 'dropdowns.combobox.input_group';
189
+ const COMPONENT_ID$m = 'dropdowns.combobox.input_group';
208
190
  const sizeStyles$8 = props => {
209
191
  const margin = props.theme.shadowWidths.sm;
210
192
  return styled.css(["margin:-", ";min-width:0;& > *{margin:", ";}"], margin, margin);
211
193
  };
212
194
  const StyledInputGroup = styled__default.default.div.attrs({
213
- 'data-garden-id': COMPONENT_ID$n,
214
- 'data-garden-version': '9.0.0-next.8'
195
+ 'data-garden-id': COMPONENT_ID$m,
196
+ 'data-garden-version': '9.0.0'
215
197
  }).withConfig({
216
198
  displayName: "StyledInputGroup",
217
199
  componentId: "sc-yx3q7u-0"
218
- })(["display:flex;flex-grow:1;flex-wrap:wrap;", ";", ";"], sizeStyles$8, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$n, props));
219
- StyledInputGroup.defaultProps = {
220
- theme: reactTheming.DEFAULT_THEME
221
- };
200
+ })(["display:flex;flex-grow:1;flex-wrap:wrap;", ";", ";"], sizeStyles$8, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$m, props));
222
201
 
223
- const COMPONENT_ID$m = 'dropdowns.combobox.trigger';
224
- const colorStyles$7 = props => {
225
- const SHADE = 600;
226
- let hue = 'neutralHue';
227
- if (props.validation === 'success') {
228
- hue = 'successHue';
229
- } else if (props.validation === 'warning') {
230
- hue = 'warningHue';
231
- } else if (props.validation === 'error') {
232
- hue = 'dangerHue';
233
- }
234
- const backgroundColor = props.isBare ? 'transparent' : reactTheming.getColorV8('background', 600 , props.theme);
202
+ const COMPONENT_ID$l = 'dropdowns.combobox.trigger';
203
+ const colorStyles$8 = _ref => {
204
+ let {
205
+ theme,
206
+ validation,
207
+ isBare,
208
+ isLabelHovered,
209
+ focusInset
210
+ } = _ref;
211
+ const foregroundColor = reactTheming.getColor({
212
+ theme,
213
+ variable: 'foreground.default'
214
+ });
215
+ const backgroundColor = isBare ? 'transparent' : reactTheming.getColor({
216
+ theme,
217
+ variable: 'background.default'
218
+ });
235
219
  let borderColor;
220
+ let borderVariable;
236
221
  let hoverBorderColor;
237
222
  let focusBorderColor;
238
- let focusShade;
239
- if (props.validation) {
240
- borderColor = reactTheming.getColorV8(hue, SHADE, props.theme);
241
- hoverBorderColor = borderColor;
242
- if (props.validation === 'warning') {
243
- focusBorderColor = reactTheming.getColorV8(hue, SHADE + 100, props.theme);
244
- focusShade = SHADE + 100;
245
- } else {
246
- focusBorderColor = borderColor;
223
+ if (validation) {
224
+ if (validation === 'success') {
225
+ borderVariable = 'border.successEmphasis';
226
+ } else if (validation === 'warning') {
227
+ borderVariable = 'border.warningEmphasis';
228
+ } else if (validation === 'error') {
229
+ borderVariable = 'border.dangerEmphasis';
247
230
  }
231
+ borderColor = reactTheming.getColor({
232
+ theme,
233
+ variable: borderVariable
234
+ });
235
+ hoverBorderColor = borderColor;
236
+ focusBorderColor = borderColor;
248
237
  } else {
249
- borderColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
250
- hoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
238
+ borderColor = reactTheming.getColor({
239
+ theme,
240
+ variable: 'border.default',
241
+ dark: {
242
+ offset: -100
243
+ },
244
+ light: {
245
+ offset: 100
246
+ }
247
+ });
248
+ borderVariable = 'border.primaryEmphasis';
249
+ hoverBorderColor = reactTheming.getColor({
250
+ theme,
251
+ variable: borderVariable
252
+ });
251
253
  focusBorderColor = hoverBorderColor;
252
254
  }
253
- const disabledBackgroundColor = props.isBare ? undefined : reactTheming.getColorV8('neutralHue', SHADE - 500, props.theme);
254
- const disabledBorderColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
255
- const disabledForegroundColor = reactTheming.getColorV8('neutralHue', SHADE - 200, props.theme);
255
+ const disabledBackgroundColor = isBare ? undefined : reactTheming.getColor({
256
+ theme,
257
+ variable: 'background.disabled'
258
+ });
259
+ const disabledBorderColor = reactTheming.getColor({
260
+ theme,
261
+ variable: 'border.disabled'
262
+ });
263
+ const disabledForegroundColor = reactTheming.getColor({
264
+ theme,
265
+ variable: 'foreground.disabled'
266
+ });
256
267
  const focusSelector = `
257
268
  &:focus-within:not([aria-disabled='true']),
258
269
  &:focus-visible
259
270
  `;
260
- return styled.css(["border-color:", ";background-color:", ";color:", ";&:hover{border-color:", ";}", " &[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], props.isLabelHovered ? hoverBorderColor : borderColor, backgroundColor, reactTheming.getColorV8('foreground', 600 , props.theme), hoverBorderColor, reactTheming.focusStyles({
261
- theme: props.theme,
262
- inset: props.focusInset,
271
+ return styled.css(["color-scheme:only ", ";border-color:", ";background-color:", ";color:", ";&:hover{border-color:", ";}", " &[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], theme.colors.base, isLabelHovered ? hoverBorderColor : borderColor, backgroundColor, foregroundColor, hoverBorderColor, reactTheming.focusStyles({
272
+ theme,
273
+ inset: focusInset,
263
274
  color: {
264
- hue: focusBorderColor,
265
- shade: focusShade
275
+ variable: borderVariable
266
276
  },
267
277
  selector: focusSelector,
268
278
  styles: {
269
279
  borderColor: focusBorderColor
270
280
  },
271
- condition: !props.isBare
281
+ condition: !isBare
272
282
  }), disabledBorderColor, disabledBackgroundColor, disabledForegroundColor);
273
283
  };
274
284
  const sizeStyles$7 = props => {
@@ -292,74 +302,96 @@ const sizeStyles$7 = props => {
292
302
  return styled.css(["padding:", " ", ";min-height:", ";max-height:", ";font-size:", ";"], verticalPadding, horizontalPadding, minHeight, maxHeight, props.theme.fontSizes.md);
293
303
  };
294
304
  const StyledTrigger = styled__default.default.div.attrs({
295
- 'data-garden-id': COMPONENT_ID$m,
296
- 'data-garden-version': '9.0.0-next.8'
305
+ 'data-garden-id': COMPONENT_ID$l,
306
+ 'data-garden-version': '9.0.0'
297
307
  }).withConfig({
298
308
  displayName: "StyledTrigger",
299
309
  componentId: "sc-116nftk-0"
300
- })(["overflow-y:auto;transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out;border:", ";border-radius:", ";cursor:", ";box-sizing:border-box;", ";&:focus{outline:none;}", ";&[aria-disabled='true']{cursor:default;}", ";"], props => props.isBare ? 'none' : props.theme.borders.sm, props => props.isBare ? '0' : props.theme.borderRadii.md, props => !props.isAutocomplete && props.isEditable ? 'text' : 'pointer', sizeStyles$7, colorStyles$7, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$m, props));
301
- StyledTrigger.defaultProps = {
302
- theme: reactTheming.DEFAULT_THEME
303
- };
310
+ })(["overflow-y:", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out;border:", ";border-radius:", ";cursor:", ";box-sizing:border-box;", ";&:focus{outline:none;}", ";&[aria-disabled='true']{cursor:default;}", ";"], props => props.isBare && !props.isMultiselectable ? 'visible' : 'auto', props => props.isBare ? 'none' : props.theme.borders.sm, props => props.isBare ? '0' : props.theme.borderRadii.md, props => !props.isAutocomplete && props.isEditable ? 'text' : 'pointer', sizeStyles$7, colorStyles$8, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$l, props));
304
311
 
305
- const COMPONENT_ID$l = 'dropdowns.combobox.input_icon';
306
- const colorStyles$6 = props => {
307
- const color = reactTheming.getColorV8('neutralHue', 600, props.theme);
308
- const focusColor = reactTheming.getColorV8('neutralHue', 700, props.theme);
309
- const disabledColor = reactTheming.getColorV8('neutralHue', 400, props.theme);
310
- return styled.css(["color:", ";", ":hover &,", ":focus-within &,", ":focus &{color:", ";}", "[aria-disabled='true'] &{color:", ";}"], props.isLabelHovered ? focusColor : color, StyledTrigger, StyledTrigger, StyledTrigger, focusColor, StyledTrigger, disabledColor);
312
+ const COMPONENT_ID$k = 'dropdowns.combobox.input_icon';
313
+ const colorStyles$7 = _ref => {
314
+ let {
315
+ theme,
316
+ $isLabelHovered
317
+ } = _ref;
318
+ const options = {
319
+ theme,
320
+ variable: 'foreground.subtle'
321
+ };
322
+ const color = reactTheming.getColor(options);
323
+ const focusColor = reactTheming.getColor({
324
+ ...options,
325
+ dark: {
326
+ offset: -100
327
+ },
328
+ light: {
329
+ offset: 100
330
+ }
331
+ });
332
+ const disabledColor = reactTheming.getColor({
333
+ theme,
334
+ variable: 'foreground.disabled'
335
+ });
336
+ return styled.css(["color:", ";", ":hover &&,", ":focus-within &&,", ":focus &&{color:", ";}", "[aria-disabled='true'] &&{color:", ";}"], $isLabelHovered ? focusColor : color, StyledTrigger, StyledTrigger, StyledTrigger, focusColor, StyledTrigger, disabledColor);
311
337
  };
312
338
  const sizeStyles$6 = props => {
313
339
  const size = props.theme.iconSizes.md;
314
340
  const position = polished.math(`(${getHeight(props)} - ${size}) / 2`);
315
341
  const margin = `${props.theme.space.base * 2}px`;
316
342
  let side;
317
- if (props.isEnd) {
343
+ if (props.$isEnd) {
318
344
  side = props.theme.rtl ? 'right' : 'left';
319
345
  } else {
320
346
  side = props.theme.rtl ? 'left' : 'right';
321
347
  }
322
348
  return styled.css(["top:", ";margin-", ":", ";width:", ";height:", ";"], position, side, margin, size, size);
323
349
  };
324
- const StyledInputIcon = styled__default.default(_ref => {
325
- let {
326
- children,
327
- isCompact,
328
- isDisabled,
329
- isEnd,
330
- isLabelHovered,
331
- isRotated,
332
- theme,
333
- ...props
334
- } = _ref;
335
- return React.cloneElement(React.Children.only(children), props);
336
- }).attrs({
337
- 'data-garden-id': COMPONENT_ID$l,
338
- 'data-garden-version': '9.0.0-next.8'
350
+ const StyledInputIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
351
+ 'data-garden-id': COMPONENT_ID$k,
352
+ 'data-garden-version': '9.0.0'
339
353
  }).withConfig({
340
354
  displayName: "StyledInputIcon",
341
355
  componentId: "sc-gqbs1s-0"
342
- })(["position:sticky;flex-shrink:0;transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", ";", ";"], props => props.isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, sizeStyles$6, colorStyles$6, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$l, props));
343
- StyledInputIcon.defaultProps = {
344
- theme: reactTheming.DEFAULT_THEME
345
- };
356
+ })(["position:sticky;flex-shrink:0;transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", ";", ";"], props => props.$isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, sizeStyles$6, colorStyles$7, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$k, props));
346
357
 
347
- const COMPONENT_ID$k = 'dropdowns.combobox.option';
348
- const colorStyles$5 = props => {
358
+ const COMPONENT_ID$j = 'dropdowns.combobox.option';
359
+ const colorStyles$6 = _ref => {
360
+ let {
361
+ theme,
362
+ isActive,
363
+ $type
364
+ } = _ref;
349
365
  let backgroundColor;
350
366
  let boxShadow;
351
- if (props.isActive && props.$type !== 'group' && props.$type !== 'header') {
352
- const hue = props.$type === 'danger' ? 'dangerHue' : 'primaryHue';
353
- backgroundColor = reactTheming.getColorV8(hue, 600, props.theme, 0.08);
354
- boxShadow = `inset ${props.theme.rtl ? `-${props.theme.shadowWidths.md}` : props.theme.shadowWidths.md} 0 ${reactTheming.getColorV8(hue, 600, props.theme)}`;
367
+ if (isActive && $type !== 'group' && $type !== 'header') {
368
+ const variable = 'background.primaryEmphasis';
369
+ backgroundColor = reactTheming.getColor({
370
+ theme,
371
+ variable,
372
+ transparency: theme.opacity[100]
373
+ });
374
+ boxShadow = `inset ${theme.rtl ? `-${theme.shadowWidths.md}` : theme.shadowWidths.md} 0 ${reactTheming.getColor({
375
+ theme,
376
+ variable
377
+ })}`;
355
378
  }
356
- const disabledForegroundColor = reactTheming.getColorV8('neutralHue', 400, props.theme);
357
- let foregroundColor = reactTheming.getColorV8('foreground', 600 , props.theme);
358
- if (props.$type === 'add') {
359
- foregroundColor = reactTheming.getColorV8('primaryHue', 600, props.theme);
360
- } else if (props.$type === 'danger') {
361
- foregroundColor = reactTheming.getColorV8('dangerHue', 600, props.theme);
379
+ let foregroundVariable;
380
+ if ($type === 'add') {
381
+ foregroundVariable = 'foreground.primary';
382
+ } else if ($type === 'danger') {
383
+ foregroundVariable = 'foreground.danger';
384
+ } else {
385
+ foregroundVariable = 'foreground.default';
362
386
  }
387
+ const foregroundColor = reactTheming.getColor({
388
+ theme,
389
+ variable: foregroundVariable
390
+ });
391
+ const disabledForegroundColor = reactTheming.getColor({
392
+ theme,
393
+ variable: 'foreground.disabled'
394
+ });
363
395
  return styled.css(["box-shadow:", ";background-color:", ";color:", ";&[aria-disabled='true']{background-color:transparent;color:", ";}"], boxShadow, backgroundColor, foregroundColor, disabledForegroundColor);
364
396
  };
365
397
  const getMinHeight = props => props.theme.space.base * (props.isCompact ? 7 : 9);
@@ -371,43 +403,40 @@ const sizeStyles$5 = props => {
371
403
  return styled.css(["box-sizing:border-box;padding:", " ", ";min-height:", "px;line-height:", ";"], paddingVertical, paddingHorizontal, minHeight, lineHeight);
372
404
  };
373
405
  const StyledOption = styled__default.default.li.attrs({
374
- 'data-garden-id': COMPONENT_ID$k,
375
- 'data-garden-version': '9.0.0-next.8'
406
+ 'data-garden-id': COMPONENT_ID$j,
407
+ 'data-garden-version': '9.0.0'
376
408
  }).withConfig({
377
409
  displayName: "StyledOption",
378
410
  componentId: "sc-jl4wn6-0"
379
- })(["display:flex;position:relative;transition:color 0.25s ease-in-out;cursor:", ";overflow-wrap:anywhere;font-weight:", ";user-select:none;&:focus{outline:none;}", ";", ";&[aria-disabled='true']{cursor:default;}&[aria-hidden='true']{", ";}", ";"], props => props.$type === 'group' || props.$type === 'header' ? 'default' : 'pointer', props => props.$type === 'header' || props.$type === 'previous' ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular, sizeStyles$5, colorStyles$5, polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$k, props));
380
- StyledOption.defaultProps = {
381
- theme: reactTheming.DEFAULT_THEME
382
- };
411
+ })(["display:flex;position:relative;transition:color 0.25s ease-in-out;cursor:", ";overflow-wrap:anywhere;font-weight:", ";user-select:none;&:focus{outline:none;}", ";", ";&[aria-disabled='true']{cursor:default;}&[aria-hidden='true']{", ";}", ";"], props => props.$type === 'group' || props.$type === 'header' ? 'default' : 'pointer', props => props.$type === 'header' || props.$type === 'previous' ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular, sizeStyles$5, colorStyles$6, polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$j, props));
383
412
 
384
- const COMPONENT_ID$j = 'dropdowns.combobox.option.content';
413
+ const COMPONENT_ID$i = 'dropdowns.combobox.option.content';
385
414
  const StyledOptionContent = styled__default.default.div.attrs({
386
- 'data-garden-id': COMPONENT_ID$j,
387
- 'data-garden-version': '9.0.0-next.8'
415
+ 'data-garden-id': COMPONENT_ID$i,
416
+ 'data-garden-version': '9.0.0'
388
417
  }).withConfig({
389
418
  displayName: "StyledOptionContent",
390
419
  componentId: "sc-121ujpu-0"
391
- })(["display:flex;flex-direction:column;flex-grow:1;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$j, props));
392
- StyledOptionContent.defaultProps = {
393
- theme: reactTheming.DEFAULT_THEME
394
- };
420
+ })(["display:flex;flex-direction:column;flex-grow:1;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$i, props));
395
421
 
396
- const COMPONENT_ID$i = 'dropdowns.combobox.optgroup';
422
+ const COMPONENT_ID$h = 'dropdowns.combobox.optgroup';
397
423
  const StyledOptGroup = styled__default.default.ul.attrs({
398
- 'data-garden-id': COMPONENT_ID$i,
399
- 'data-garden-version': '9.0.0-next.8'
424
+ 'data-garden-id': COMPONENT_ID$h,
425
+ 'data-garden-version': '9.0.0'
400
426
  }).withConfig({
401
427
  displayName: "StyledOptGroup",
402
428
  componentId: "sc-1kavqsx-0"
403
- })(["margin:0;padding:0;list-style-type:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$i, props));
404
- StyledOptGroup.defaultProps = {
405
- theme: reactTheming.DEFAULT_THEME
406
- };
429
+ })(["margin:0;padding:0;list-style-type:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
407
430
 
408
- const COMPONENT_ID$h = 'dropdowns.combobox.separator';
409
- const colorStyles$4 = props => {
410
- const backgroundColor = reactTheming.getColorV8('neutralHue', 200, props.theme);
431
+ const COMPONENT_ID$g = 'dropdowns.combobox.separator';
432
+ const colorStyles$5 = _ref => {
433
+ let {
434
+ theme
435
+ } = _ref;
436
+ const backgroundColor = reactTheming.getColor({
437
+ theme,
438
+ variable: 'border.subtle'
439
+ });
411
440
  return styled.css(["background-color:", ";"], backgroundColor);
412
441
  };
413
442
  const sizeStyles$4 = props => {
@@ -416,61 +445,75 @@ const sizeStyles$4 = props => {
416
445
  return styled.css(["margin:", " 0;height:", ";"], margin, height);
417
446
  };
418
447
  const StyledListboxSeparator = styled__default.default.li.attrs({
419
- 'data-garden-id': COMPONENT_ID$h,
420
- 'data-garden-version': '9.0.0-next.8'
448
+ 'data-garden-id': COMPONENT_ID$g,
449
+ 'data-garden-version': '9.0.0'
421
450
  }).withConfig({
422
451
  displayName: "StyledListboxSeparator",
423
452
  componentId: "sc-1p6toh2-0"
424
- })(["cursor:default;", ";", ";", ";"], sizeStyles$4, colorStyles$4, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
425
- StyledListboxSeparator.defaultProps = {
426
- theme: reactTheming.DEFAULT_THEME
427
- };
453
+ })(["cursor:default;", ";", ";", ";"], sizeStyles$4, colorStyles$5, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
428
454
 
429
- const COMPONENT_ID$g = 'dropdowns.combobox.listbox';
455
+ const COMPONENT_ID$f = 'dropdowns.combobox.listbox';
430
456
  const sizeStyles$3 = props => {
431
457
  const padding = props.theme.space.base;
432
458
  const minHeight = props.minHeight === undefined ? `${getMinHeight(props) + padding * 2}px` : props.minHeight;
433
459
  return styled.css(["min-height:", ";max-height:", ";&&&{padding-top:", "px;padding-bottom:", "px;}"], minHeight, props.maxHeight, padding, padding);
434
460
  };
435
461
  const StyledListbox = styled__default.default.ul.attrs({
436
- 'data-garden-id': COMPONENT_ID$g,
437
- 'data-garden-version': '9.0.0-next.8'
462
+ 'data-garden-id': COMPONENT_ID$f,
463
+ 'data-garden-version': '9.0.0'
438
464
  }).withConfig({
439
465
  displayName: "StyledListbox",
440
466
  componentId: "sc-1k13ba7-0"
441
467
  })(["overflow-y:auto;list-style-type:none;", ";&&&{display:block;}", ":first-child ", " ", ":first-child ", "[role='none']:first-child{display:none;}"], sizeStyles$3, StyledOption, StyledOptionContent, StyledOptGroup, StyledListboxSeparator);
442
- StyledListbox.defaultProps = {
443
- theme: reactTheming.DEFAULT_THEME
444
- };
445
468
 
446
- const COMPONENT_ID$f = 'dropdowns.combobox.option.icon';
469
+ const COMPONENT_ID$e = 'dropdowns.combobox.option.icon';
470
+ const colorStyles$4 = _ref => {
471
+ let {
472
+ theme,
473
+ $isDisabled,
474
+ $type
475
+ } = _ref;
476
+ let variable;
477
+ if ($isDisabled) {
478
+ variable = 'foreground.disabled';
479
+ } else if ($type === 'danger') {
480
+ variable = 'foreground.danger';
481
+ } else if ($type === 'add') {
482
+ variable = 'foreground.primary';
483
+ } else {
484
+ variable = 'foreground.subtle';
485
+ }
486
+ const color = reactTheming.getColor({
487
+ theme,
488
+ variable
489
+ });
490
+ return styled.css(["color:", ";"], color);
491
+ };
447
492
  const sizeStyles$2 = props => {
448
493
  const size = props.theme.iconSizes.md;
449
494
  const marginTop = polished.math(`(${props.theme.lineHeights.md} - ${size}) / 2`);
450
495
  const marginHorizontal = `${props.theme.space.base * 2}px`;
451
496
  return styled.css(["margin-top:", ";margin-", ":", ";width:", ";height:", ";"], marginTop, props.theme.rtl ? 'left' : 'right', marginHorizontal, size, size);
452
497
  };
453
- const StyledOptionIcon = styled__default.default(_ref => {
454
- let {
455
- children,
456
- theme,
457
- ...props
458
- } = _ref;
459
- return React.cloneElement(React.Children.only(children), props);
460
- }).attrs({
461
- 'data-garden-id': COMPONENT_ID$f,
462
- 'data-garden-version': '9.0.0-next.8'
498
+ const StyledOptionIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
499
+ 'data-garden-id': COMPONENT_ID$e,
500
+ 'data-garden-version': '9.0.0'
463
501
  }).withConfig({
464
502
  displayName: "StyledOptionIcon",
465
503
  componentId: "sc-qsab3y-0"
466
- })(["flex-shrink:0;", ";", ";"], sizeStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$f, props));
467
- StyledOptionIcon.defaultProps = {
468
- theme: reactTheming.DEFAULT_THEME
469
- };
504
+ })(["flex-shrink:0;", ";", ";", ";"], sizeStyles$2, colorStyles$4, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$e, props));
470
505
 
471
- const COMPONENT_ID$e = 'dropdowns.combobox.option.meta';
472
- const colorStyles$3 = props => {
473
- const color = reactTheming.getColorV8('neutralHue', props.isDisabled ? 400 : 600, props.theme);
506
+ const COMPONENT_ID$d = 'dropdowns.combobox.option.meta';
507
+ const colorStyles$3 = _ref => {
508
+ let {
509
+ theme,
510
+ isDisabled
511
+ } = _ref;
512
+ const variable = isDisabled ? 'foreground.disabled' : 'foreground.subtle';
513
+ const color = reactTheming.getColor({
514
+ theme,
515
+ variable
516
+ });
474
517
  return styled.css(["color:", ";"], color);
475
518
  };
476
519
  const sizeStyles$1 = props => {
@@ -479,26 +522,33 @@ const sizeStyles$1 = props => {
479
522
  return styled.css(["line-height:", ";font-size:", ";"], lineHeight, fontSize);
480
523
  };
481
524
  const StyledOptionMeta = styled__default.default.div.attrs({
482
- 'data-garden-id': COMPONENT_ID$e,
483
- 'data-garden-version': '9.0.0-next.8'
525
+ 'data-garden-id': COMPONENT_ID$d,
526
+ 'data-garden-version': '9.0.0'
484
527
  }).withConfig({
485
528
  displayName: "StyledOptionMeta",
486
529
  componentId: "sc-j6pu10-0"
487
- })(["transition:color 0.25s ease-in-out;font-weight:", ";", ";", ";", ";"], props => props.theme.fontWeights.regular, sizeStyles$1, colorStyles$3, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$e, props));
488
- StyledOptionMeta.defaultProps = {
489
- theme: reactTheming.DEFAULT_THEME
490
- };
530
+ })(["transition:color 0.25s ease-in-out;font-weight:", ";", ";", ";", ";"], props => props.theme.fontWeights.regular, sizeStyles$1, colorStyles$3, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$d, props));
491
531
 
492
- const COMPONENT_ID$d = 'dropdowns.combobox.option.type_icon';
493
- const colorStyles$2 = props => {
494
- const opacity = props.type && props.type !== 'danger' ? 1 : 0;
532
+ const COMPONENT_ID$c = 'dropdowns.combobox.option.type_icon';
533
+ const colorStyles$2 = _ref => {
534
+ let {
535
+ theme,
536
+ $type
537
+ } = _ref;
538
+ const opacity = $type && $type !== 'danger' ? 1 : 0;
495
539
  let color;
496
- if (props.type === 'add' || props.type === 'danger') {
540
+ if ($type === 'add') {
497
541
  color = 'inherit';
498
- } else if (props.type === 'header' || props.type === 'next' || props.type === 'previous') {
499
- color = reactTheming.getColorV8('neutralHue', 600, props.theme);
542
+ } else if ($type === 'header' || $type === 'next' || $type === 'previous') {
543
+ color = reactTheming.getColor({
544
+ theme,
545
+ variable: 'foreground.subtle'
546
+ });
500
547
  } else {
501
- color = reactTheming.getColorV8('primaryHue', 600, props.theme);
548
+ color = reactTheming.getColor({
549
+ theme,
550
+ variable: 'foreground.primary'
551
+ });
502
552
  }
503
553
  return styled.css(["opacity:", ";color:", ";", "[aria-selected='true'] > &{opacity:1;}", "[aria-disabled='true'] > &{color:inherit;}"], opacity, color, StyledOption, StyledOption);
504
554
  };
@@ -507,53 +557,48 @@ const sizeStyles = props => {
507
557
  const position = `${props.theme.space.base * 3}px`;
508
558
  const top = polished.math(`(${getMinHeight(props)} - ${size}) / 2`);
509
559
  let side;
510
- if (props.type === 'next') {
560
+ if (props.$type === 'next') {
511
561
  side = props.theme.rtl ? 'left' : 'right';
512
562
  } else {
513
563
  side = props.theme.rtl ? 'right' : 'left';
514
564
  }
515
565
  return styled.css(["top:", ";", ":", ";width:", ";height:", ";"], top, side, position, size, size);
516
566
  };
517
- const StyledOptionTypeIcon = styled__default.default(_ref => {
518
- let {
519
- children,
520
- isCompact,
521
- theme,
522
- type,
523
- ...props
524
- } = _ref;
525
- return React.cloneElement(React.Children.only(children), props);
526
- }).attrs({
527
- 'data-garden-id': COMPONENT_ID$d,
528
- 'data-garden-version': '9.0.0-next.8'
567
+ const StyledOptionTypeIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
568
+ 'data-garden-id': COMPONENT_ID$c,
569
+ 'data-garden-version': '9.0.0'
529
570
  }).withConfig({
530
571
  displayName: "StyledOptionTypeIcon",
531
572
  componentId: "sc-xpink2-0"
532
- })(["position:absolute;transform:", ";transition:opacity 0.1s ease-in-out;", ";", ";", ";"], props => props.theme.rtl && (props.type === 'next' || props.type === 'previous') && 'rotate(180deg)', sizeStyles, colorStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$d, props));
533
- StyledOptionTypeIcon.defaultProps = {
534
- theme: reactTheming.DEFAULT_THEME
535
- };
573
+ })(["position:absolute;transform:", ";transition:opacity 0.1s ease-in-out;", ";", ";", ";"], props => props.theme.rtl && (props.$type === 'next' || props.$type === 'previous') && 'rotate(180deg)', sizeStyles, colorStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props));
536
574
 
537
- const COMPONENT_ID$c = 'dropdowns.combobox.tag';
575
+ const COMPONENT_ID$b = 'dropdowns.combobox.tag';
538
576
  const StyledTag = styled__default.default(reactTags.Tag).attrs({
539
- 'data-garden-id': COMPONENT_ID$c,
540
- 'data-garden-version': '9.0.0-next.8'
577
+ 'data-garden-id': COMPONENT_ID$b,
578
+ 'data-garden-version': '9.0.0'
541
579
  }).withConfig({
542
580
  displayName: "StyledTag",
543
581
  componentId: "sc-1alam0r-0"
544
- })(["&[aria-disabled='true']{color:", ";}&[hidden]{display:revert;", "}", ";"], props => props.hue ? undefined : reactTheming.getColorV8('neutralHue', 400, props.theme), polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props));
545
- StyledTag.defaultProps = {
546
- theme: reactTheming.DEFAULT_THEME
547
- };
582
+ })(["&[aria-disabled='true']{color:", ";}&[hidden]{display:revert;", "}", ";"], props => props.hue ? undefined : reactTheming.getColor({
583
+ theme: props.theme,
584
+ variable: 'foreground.disabled'
585
+ }), polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
548
586
 
549
- const COMPONENT_ID$b = 'dropdowns.combobox.value';
550
- const colorStyles$1 = props => {
551
- const foregroundColor = props.isPlaceholder && reactTheming.getColorV8('neutralHue', 400, props.theme);
587
+ const COMPONENT_ID$a = 'dropdowns.combobox.value';
588
+ const colorStyles$1 = _ref => {
589
+ let {
590
+ theme,
591
+ isPlaceholder
592
+ } = _ref;
593
+ const foregroundColor = isPlaceholder && reactTheming.getColor({
594
+ theme,
595
+ variable: 'foreground.disabled'
596
+ });
552
597
  return styled.css(["color:", ";"], foregroundColor);
553
598
  };
554
599
  const StyledValue = styled__default.default.div.attrs({
555
- 'data-garden-id': COMPONENT_ID$b,
556
- 'data-garden-version': '9.0.0-next.8'
600
+ 'data-garden-id': COMPONENT_ID$a,
601
+ 'data-garden-version': '9.0.0'
557
602
  }).withConfig({
558
603
  displayName: "StyledValue",
559
604
  componentId: "sc-t719sx-0"
@@ -562,151 +607,112 @@ const StyledValue = styled__default.default.div.attrs({
562
607
  return 'default';
563
608
  }
564
609
  return props.isEditable && !props.isAutocomplete ? 'text' : 'pointer';
565
- }, sizeStyles$9, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
566
- StyledValue.defaultProps = {
567
- theme: reactTheming.DEFAULT_THEME
568
- };
610
+ }, sizeStyles$9, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
569
611
 
570
- const COMPONENT_ID$a = 'dropdowns.combobox.tags_button';
571
- const colorStyles = props => {
572
- const color = reactTheming.getColorV8('primaryHue', 600, props.theme);
612
+ const COMPONENT_ID$9 = 'dropdowns.combobox.tags_button';
613
+ const colorStyles = _ref => {
614
+ let {
615
+ theme
616
+ } = _ref;
617
+ const color = reactTheming.getColor({
618
+ theme,
619
+ variable: 'foreground.primary'
620
+ });
573
621
  return styled.css(["color:", ";&:disabled{color:inherit;}"], color);
574
622
  };
575
623
  const StyledTagsButton = styled__default.default(StyledValue).attrs({
576
624
  as: 'button',
577
- 'data-garden-id': COMPONENT_ID$a,
578
- 'data-garden-version': '9.0.0-next.8'
625
+ 'data-garden-id': COMPONENT_ID$9,
626
+ 'data-garden-version': '9.0.0'
579
627
  }).withConfig({
580
628
  displayName: "StyledTagsButton",
581
629
  componentId: "sc-6q5w33-0"
582
- })(["display:inline-flex;flex:0 1 auto;align-items:center;border:none;background-color:transparent;cursor:pointer;min-width:auto;font-family:inherit;&:hover{text-decoration:underline;}", ";&:disabled{cursor:default;text-decoration:none;}", ";"], colorStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
583
- StyledTagsButton.defaultProps = {
584
- theme: reactTheming.DEFAULT_THEME
585
- };
630
+ })(["display:inline-flex;flex:0 1 auto;align-items:center;border:none;background-color:transparent;cursor:pointer;min-width:auto;font-family:inherit;&:hover{text-decoration:underline;}", ";&:disabled{cursor:default;text-decoration:none;}", ";"], colorStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
586
631
 
587
- const COMPONENT_ID$9 = 'dropdowns.menu';
632
+ const COMPONENT_ID$8 = 'dropdowns.menu';
588
633
  const StyledMenu = styled__default.default(StyledListbox).attrs({
589
- 'data-garden-id': COMPONENT_ID$9,
590
- 'data-garden-version': '9.0.0-next.8'
634
+ 'data-garden-id': COMPONENT_ID$8,
635
+ 'data-garden-version': '9.0.0'
591
636
  }).withConfig({
592
637
  displayName: "StyledMenu",
593
638
  componentId: "sc-f77ntu-0"
594
639
  })(["position:static !important;", ";", ";"], props => props.arrowPosition && reactTheming.arrowStyles(props.arrowPosition, {
595
- size: `${props.theme.space.base * 2}px`,
596
- inset: '2px',
640
+ size: `${props.theme.space.base * 1.5}px`,
641
+ inset: '1px',
597
642
  animationModifier: '[data-garden-animate-arrow="true"]'
598
- }), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
599
- StyledMenu.defaultProps = {
600
- theme: reactTheming.DEFAULT_THEME
601
- };
643
+ }), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
602
644
 
603
- const COMPONENT_ID$8 = 'dropdowns.menu.floating';
645
+ const COMPONENT_ID$7 = 'dropdowns.menu.floating';
604
646
  const StyledFloatingMenu = styled__default.default(StyledFloatingListbox).attrs({
605
- 'data-garden-id': COMPONENT_ID$8,
606
- 'data-garden-version': '9.0.0-next.8'
647
+ 'data-garden-id': COMPONENT_ID$7,
648
+ 'data-garden-version': '9.0.0'
607
649
  }).withConfig({
608
650
  displayName: "StyledFloatingMenu",
609
651
  componentId: "sc-1rc7ahb-0"
610
- })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
611
- StyledFloatingMenu.defaultProps = {
612
- theme: reactTheming.DEFAULT_THEME
613
- };
652
+ })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
614
653
 
615
- const COMPONENT_ID$7 = 'dropdowns.menu.item';
654
+ const COMPONENT_ID$6 = 'dropdowns.menu.item';
616
655
  const StyledItem = styled__default.default(StyledOption).attrs({
617
- 'data-garden-id': COMPONENT_ID$7,
618
- 'data-garden-version': '9.0.0-next.8'
656
+ 'data-garden-id': COMPONENT_ID$6,
657
+ 'data-garden-version': '9.0.0'
619
658
  }).withConfig({
620
659
  displayName: "StyledItem",
621
660
  componentId: "sc-1jp99dq-0"
622
- })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
623
- StyledItem.defaultProps = {
624
- theme: reactTheming.DEFAULT_THEME
625
- };
661
+ })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
626
662
 
627
- const COMPONENT_ID$6 = 'dropdowns.menu.item.content';
663
+ const COMPONENT_ID$5 = 'dropdowns.menu.item.content';
628
664
  const StyledItemContent = styled__default.default(StyledOptionContent).attrs({
629
- 'data-garden-id': COMPONENT_ID$6,
630
- 'data-garden-version': '9.0.0-next.8'
665
+ 'data-garden-id': COMPONENT_ID$5,
666
+ 'data-garden-version': '9.0.0'
631
667
  }).withConfig({
632
668
  displayName: "StyledItemContent",
633
669
  componentId: "sc-1opglsb-0"
634
- })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
635
- StyledItemContent.defaultProps = {
636
- theme: reactTheming.DEFAULT_THEME
637
- };
670
+ })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
638
671
 
639
- const COMPONENT_ID$5 = 'dropdowns.menu.item_group';
672
+ const COMPONENT_ID$4 = 'dropdowns.menu.item_group';
640
673
  const StyledItemGroup = styled__default.default(StyledOptGroup).attrs({
641
- 'data-garden-id': COMPONENT_ID$5,
642
- 'data-garden-version': '9.0.0-next.8'
674
+ 'data-garden-id': COMPONENT_ID$4,
675
+ 'data-garden-version': '9.0.0'
643
676
  }).withConfig({
644
677
  displayName: "StyledItemGroup",
645
678
  componentId: "sc-1umk3cg-0"
646
- })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
647
- StyledItemGroup.defaultProps = {
648
- theme: reactTheming.DEFAULT_THEME
649
- };
679
+ })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
650
680
 
651
- const COMPONENT_ID$4 = 'dropdowns.menu.item.icon';
681
+ const COMPONENT_ID$3 = 'dropdowns.menu.item.icon';
652
682
  const StyledItemIcon = styled__default.default(StyledOptionIcon).attrs({
653
- 'data-garden-id': COMPONENT_ID$4,
654
- 'data-garden-version': '9.0.0-next.8'
683
+ 'data-garden-id': COMPONENT_ID$3,
684
+ 'data-garden-version': '9.0.0'
655
685
  }).withConfig({
656
686
  displayName: "StyledItemIcon",
657
687
  componentId: "sc-w9orqb-0"
658
- })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
659
- StyledItemIcon.defaultProps = {
660
- theme: reactTheming.DEFAULT_THEME
661
- };
688
+ })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
662
689
 
663
- const COMPONENT_ID$3 = 'dropdowns.menu.item.meta';
690
+ const COMPONENT_ID$2 = 'dropdowns.menu.item.meta';
664
691
  const StyledItemMeta = styled__default.default(StyledOptionMeta).attrs({
665
- 'data-garden-id': COMPONENT_ID$3,
666
- 'data-garden-version': '9.0.0-next.8'
692
+ 'data-garden-id': COMPONENT_ID$2,
693
+ 'data-garden-version': '9.0.0'
667
694
  }).withConfig({
668
695
  displayName: "StyledItemMeta",
669
696
  componentId: "sc-1unw3x1-0"
670
- })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
671
- StyledItemMeta.defaultProps = {
672
- theme: reactTheming.DEFAULT_THEME
673
- };
697
+ })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
674
698
 
675
- const COMPONENT_ID$2 = 'dropdowns.menu.item.type_icon';
699
+ const COMPONENT_ID$1 = 'dropdowns.menu.item.type_icon';
676
700
  const StyledItemTypeIcon = styled__default.default(StyledOptionTypeIcon).attrs({
677
- 'data-garden-id': COMPONENT_ID$2,
678
- 'data-garden-version': '9.0.0-next.8'
701
+ 'data-garden-id': COMPONENT_ID$1,
702
+ 'data-garden-version': '9.0.0'
679
703
  }).withConfig({
680
704
  displayName: "StyledItemTypeIcon",
681
705
  componentId: "sc-1pll3nu-0"
682
- })(["", "[aria-checked='true'] > &{opacity:1;}", ";"], StyledItem, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
683
- StyledItemTypeIcon.defaultProps = {
684
- theme: reactTheming.DEFAULT_THEME
685
- };
686
-
687
- const COMPONENT_ID$1 = 'dropdowns.menu.button';
688
- const StyledButton = styled__default.default(reactButtons.Button).attrs({
689
- 'data-garden-id': COMPONENT_ID$1,
690
- 'data-garden-version': '9.0.0-next.8'
691
- }).withConfig({
692
- displayName: "StyledButton",
693
- componentId: "sc-5hs2jg-0"
694
- })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
695
- StyledButton.defaultProps = {
696
- theme: reactTheming.DEFAULT_THEME
697
- };
706
+ })(["", "[aria-checked='true'] > &{opacity:1;}", ";"], StyledItem, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
698
707
 
699
708
  const COMPONENT_ID = 'dropdowns.menu.separator';
700
709
  const StyledSeparator = styled__default.default(StyledListboxSeparator).attrs({
701
710
  'data-garden-id': COMPONENT_ID,
702
- 'data-garden-version': '9.0.0-next.8'
711
+ 'data-garden-version': '9.0.0'
703
712
  }).withConfig({
704
713
  displayName: "StyledSeparator",
705
714
  componentId: "sc-8kqwen-0"
706
715
  })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
707
- StyledSeparator.defaultProps = {
708
- theme: reactTheming.DEFAULT_THEME
709
- };
710
716
 
711
717
  const Listbox = React.forwardRef((_ref, ref) => {
712
718
  let {
@@ -803,7 +809,7 @@ const Listbox = React.forwardRef((_ref, ref) => {
803
809
  }
804
810
  }, props, {
805
811
  ref: ref
806
- }), isVisible && children));
812
+ }), !!isVisible && children));
807
813
  return appendToNode ? reactDom$1.createPortal(Node, appendToNode) : Node;
808
814
  });
809
815
  Listbox.displayName = 'Listbox';
@@ -1117,10 +1123,10 @@ const Combobox = React.forwardRef((_ref, ref) => {
1117
1123
  tabIndex: -1
1118
1124
  }, props, {
1119
1125
  ref: ref
1120
- }), React__namespace.default.createElement(StyledTrigger, triggerProps, React__namespace.default.createElement(StyledContainer, null, startIcon && React__namespace.default.createElement(StyledInputIcon, {
1121
- isLabelHovered: isLabelHovered,
1122
- isCompact: isCompact
1123
- }, startIcon), React__namespace.default.createElement(StyledInputGroup, null, isMultiselectable && Array.isArray(selection) && React__namespace.default.createElement(TagGroup, {
1126
+ }), React__namespace.default.createElement(StyledTrigger, triggerProps, React__namespace.default.createElement(StyledContainer, null, !!startIcon && React__namespace.default.createElement(StyledInputIcon, {
1127
+ $isLabelHovered: isLabelHovered,
1128
+ $isCompact: isCompact
1129
+ }, startIcon), React__namespace.default.createElement(StyledInputGroup, null, !!isMultiselectable && Array.isArray(selection) && React__namespace.default.createElement(TagGroup, {
1124
1130
  isDisabled: isDisabled,
1125
1131
  isExpanded: isTagGroupExpanded,
1126
1132
  maxTags: maxTags,
@@ -1147,11 +1153,11 @@ const Combobox = React.forwardRef((_ref, ref) => {
1147
1153
  }, renderValue ? renderValue({
1148
1154
  selection,
1149
1155
  inputValue
1150
- }) : inputValue || placeholder), React__namespace.default.createElement(StyledInput, inputProps)), (hasChevron || endIcon) && React__namespace.default.createElement(StyledInputIcon, {
1151
- isCompact: isCompact,
1152
- isEnd: true,
1153
- isLabelHovered: isLabelHovered,
1154
- isRotated: hasChevron && isExpanded
1156
+ }) : inputValue || placeholder), React__namespace.default.createElement(StyledInput, inputProps)), !!(hasChevron || endIcon) && React__namespace.default.createElement(StyledInputIcon, {
1157
+ $isCompact: isCompact,
1158
+ $isEnd: true,
1159
+ $isLabelHovered: isLabelHovered,
1160
+ $isRotated: !!(hasChevron && isExpanded)
1155
1161
  }, hasChevron ? React__namespace.default.createElement(SvgChevronDownStroke, null) : endIcon))), React__namespace.default.createElement(Listbox, Object.assign({
1156
1162
  appendToNode: listboxAppendToNode,
1157
1163
  isCompact: isCompact,
@@ -1214,7 +1220,7 @@ const Hint = React.forwardRef((props, ref) => {
1214
1220
  ref: ref
1215
1221
  }));
1216
1222
  });
1217
- Hint.displayName = 'Hint';
1223
+ Hint.displayName = 'Field.Hint';
1218
1224
 
1219
1225
  const Label = React.forwardRef((_ref, ref) => {
1220
1226
  let {
@@ -1234,7 +1240,7 @@ const Label = React.forwardRef((_ref, ref) => {
1234
1240
  ref: ref
1235
1241
  }));
1236
1242
  });
1237
- Label.displayName = 'Label';
1243
+ Label.displayName = 'Field.Label';
1238
1244
  Label.propTypes = {
1239
1245
  hidden: PropTypes__default.default.bool,
1240
1246
  isRegular: PropTypes__default.default.bool
@@ -1253,7 +1259,7 @@ const Message = React.forwardRef((props, ref) => {
1253
1259
  ref: ref
1254
1260
  }));
1255
1261
  });
1256
- Message.displayName = 'Message';
1262
+ Message.displayName = 'Field.Message';
1257
1263
  Message.propTypes = {
1258
1264
  validation: PropTypes__default.default.oneOf(reactForms.VALIDATION),
1259
1265
  validationLabel: PropTypes__default.default.string
@@ -1290,7 +1296,7 @@ Field.Label = Label;
1290
1296
  Field.Message = Message;
1291
1297
 
1292
1298
  var _path$3;
1293
- function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
1299
+ function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
1294
1300
  var SvgPlusStroke = function SvgPlusStroke(props) {
1295
1301
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
1296
1302
  xmlns: "http://www.w3.org/2000/svg",
@@ -1307,7 +1313,7 @@ var SvgPlusStroke = function SvgPlusStroke(props) {
1307
1313
  };
1308
1314
 
1309
1315
  var _path$2;
1310
- function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
1316
+ function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
1311
1317
  var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
1312
1318
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
1313
1319
  xmlns: "http://www.w3.org/2000/svg",
@@ -1323,7 +1329,7 @@ var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
1323
1329
  };
1324
1330
 
1325
1331
  var _path$1;
1326
- function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
1332
+ function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
1327
1333
  var SvgChevronLeftStroke = function SvgChevronLeftStroke(props) {
1328
1334
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
1329
1335
  xmlns: "http://www.w3.org/2000/svg",
@@ -1339,7 +1345,7 @@ var SvgChevronLeftStroke = function SvgChevronLeftStroke(props) {
1339
1345
  };
1340
1346
 
1341
1347
  var _path;
1342
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1348
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1343
1349
  var SvgCheckLgStroke = function SvgCheckLgStroke(props) {
1344
1350
  return /*#__PURE__*/React__namespace.createElement("svg", _extends({
1345
1351
  xmlns: "http://www.w3.org/2000/svg",
@@ -1395,8 +1401,9 @@ const OptionComponent = React.forwardRef((_ref, ref) => {
1395
1401
  ...props
1396
1402
  } = _ref;
1397
1403
  const contextValue = React.useMemo(() => ({
1398
- isDisabled
1399
- }), [isDisabled]);
1404
+ isDisabled,
1405
+ type
1406
+ }), [isDisabled, type]);
1400
1407
  const {
1401
1408
  activeValue,
1402
1409
  getOptionProps,
@@ -1445,9 +1452,12 @@ const OptionComponent = React.forwardRef((_ref, ref) => {
1445
1452
  isCompact: isCompact,
1446
1453
  $type: type
1447
1454
  }, props, optionProps), React__namespace.default.createElement(StyledOptionTypeIcon, {
1448
- isCompact: isCompact,
1449
- type: type
1450
- }, renderActionIcon(type)), icon && React__namespace.default.createElement(StyledOptionIcon, null, icon), React__namespace.default.createElement(StyledOptionContent, null, children || label || value)));
1455
+ $isCompact: isCompact,
1456
+ $type: type
1457
+ }, renderActionIcon(type)), !!icon && React__namespace.default.createElement(StyledOptionIcon, {
1458
+ $isDisabled: isDisabled,
1459
+ $type: type
1460
+ }, icon), React__namespace.default.createElement(StyledOptionContent, null, children || label || value)));
1451
1461
  });
1452
1462
  OptionComponent.displayName = 'Option';
1453
1463
  OptionComponent.propTypes = {
@@ -1491,13 +1501,13 @@ const OptGroup = React.forwardRef((_ref, ref) => {
1491
1501
  role: "none"
1492
1502
  }, props, {
1493
1503
  ref: ref
1494
- }), React__namespace.default.createElement(StyledOptionContent, null, (content || legend) && React__namespace.default.createElement(StyledOption, {
1504
+ }), React__namespace.default.createElement(StyledOptionContent, null, !!(content || legend) && React__namespace.default.createElement(StyledOption, {
1495
1505
  as: "div",
1496
1506
  isCompact: isCompact,
1497
1507
  $type: "header"
1498
- }, icon && React__namespace.default.createElement(StyledOptionTypeIcon, {
1499
- isCompact: isCompact,
1500
- type: "header"
1508
+ }, !!icon && React__namespace.default.createElement(StyledOptionTypeIcon, {
1509
+ $isCompact: isCompact,
1510
+ $type: "header"
1501
1511
  }, icon), content || legend), React__namespace.default.createElement(StyledOptGroup, Object.assign({
1502
1512
  isCompact: isCompact
1503
1513
  }, optGroupProps), React__namespace.default.createElement(StyledListboxSeparator, {
@@ -1650,7 +1660,7 @@ const MenuList = React.forwardRef((_ref, ref) => {
1650
1660
  children, update]);
1651
1661
  const Node = React__namespace.default.createElement(StyledFloatingMenu, {
1652
1662
  "data-garden-animate": isVisible,
1653
- isHidden: !isExpanded,
1663
+ isHidden: !isExpanded || !isVisible ,
1654
1664
  position: reactTheming.getMenuPosition(placement),
1655
1665
  zIndex: zIndex,
1656
1666
  style: {
@@ -1668,7 +1678,7 @@ const MenuList = React.forwardRef((_ref, ref) => {
1668
1678
  }
1669
1679
  }, props, {
1670
1680
  ref: ref
1671
- }), isVisible && children));
1681
+ }), !!isVisible && children));
1672
1682
  return appendToNode ? reactDom$1.createPortal(Node, appendToNode) : Node;
1673
1683
  });
1674
1684
  MenuList.displayName = 'MenuList';
@@ -1689,7 +1699,7 @@ MenuList.defaultProps = {
1689
1699
  zIndex: 1000
1690
1700
  };
1691
1701
 
1692
- const Menu = React.forwardRef((_ref, ref) => {
1702
+ const Menu = React.forwardRef((_ref2, ref) => {
1693
1703
  let {
1694
1704
  button,
1695
1705
  buttonProps: _buttonProps = {},
@@ -1699,11 +1709,12 @@ const Menu = React.forwardRef((_ref, ref) => {
1699
1709
  defaultFocusedValue,
1700
1710
  defaultExpanded,
1701
1711
  isExpanded: _isExpanded,
1712
+ restoreFocus,
1702
1713
  selectedItems,
1703
1714
  onChange,
1704
1715
  onMouseLeave,
1705
1716
  ...props
1706
- } = _ref;
1717
+ } = _ref2;
1707
1718
  const triggerRef = React.useRef(null);
1708
1719
  const menuRef = React.useRef(null);
1709
1720
  const items = toItems(children);
@@ -1724,6 +1735,7 @@ const Menu = React.forwardRef((_ref, ref) => {
1724
1735
  focusedValue: _focusedValue,
1725
1736
  defaultExpanded,
1726
1737
  isExpanded: _isExpanded,
1738
+ restoreFocus,
1727
1739
  selectedItems,
1728
1740
  items,
1729
1741
  menuRef,
@@ -1734,6 +1746,7 @@ const Menu = React.forwardRef((_ref, ref) => {
1734
1746
  onClick,
1735
1747
  onKeyDown,
1736
1748
  disabled,
1749
+ ref: _ref,
1737
1750
  ...buttonProps
1738
1751
  } = _buttonProps;
1739
1752
  const triggerProps = {
@@ -1747,9 +1760,9 @@ const Menu = React.forwardRef((_ref, ref) => {
1747
1760
  onKeyDown,
1748
1761
  disabled
1749
1762
  }),
1750
- ref: reactMergeRefs.mergeRefs([triggerRef, ref])
1763
+ ref: reactMergeRefs.mergeRefs([triggerRef, _ref])
1751
1764
  };
1752
- const trigger = typeof button === 'function' ? button(triggerProps) : React__namespace.default.createElement(StyledButton, triggerProps, button, React__namespace.default.createElement(StyledButton.EndIcon, {
1765
+ const trigger = typeof button === 'function' ? button(triggerProps) : React__namespace.default.createElement(reactButtons.Button, triggerProps, button, React__namespace.default.createElement(reactButtons.Button.EndIcon, {
1753
1766
  isRotated: isExpanded
1754
1767
  }, React__namespace.default.createElement(SvgChevronDownStroke, null)));
1755
1768
  const contextValue = React.useMemo(() => ({
@@ -1786,6 +1799,7 @@ Menu.propTypes = {
1786
1799
  minHeight: PropTypes__default.default.string,
1787
1800
  onChange: PropTypes__default.default.func,
1788
1801
  placement: PropTypes__default.default.oneOf(PLACEMENT),
1802
+ restoreFocus: PropTypes__default.default.bool,
1789
1803
  selectedItems: PropTypes__default.default.arrayOf(PropTypes__default.default.any),
1790
1804
  zIndex: PropTypes__default.default.number
1791
1805
  };
@@ -1829,14 +1843,15 @@ const ItemGroup = React.forwardRef((_ref, ref) => {
1829
1843
  isCompact: isCompact,
1830
1844
  $type: "group"
1831
1845
  }, props, {
1846
+ role: "none",
1832
1847
  ref: ref
1833
- }), React__namespace.default.createElement(StyledItemContent, null, (content || legend) && React__namespace.default.createElement(StyledItem, {
1848
+ }), React__namespace.default.createElement(StyledItemContent, null, !!(content || legend) && React__namespace.default.createElement(StyledItem, {
1834
1849
  as: "div",
1835
1850
  isCompact: isCompact,
1836
1851
  $type: "header"
1837
- }, icon && React__namespace.default.createElement(StyledItemTypeIcon, {
1838
- isCompact: isCompact,
1839
- type: "header"
1852
+ }, !!icon && React__namespace.default.createElement(StyledItemTypeIcon, {
1853
+ $isCompact: isCompact,
1854
+ $type: "header"
1840
1855
  }, icon), content || legend), React__namespace.default.createElement(StyledItemGroup, Object.assign({
1841
1856
  isCompact: isCompact
1842
1857
  }, groupProps), React__namespace.default.createElement(StyledSeparator, {
@@ -1893,7 +1908,8 @@ const ItemComponent = React.forwardRef((_ref, ref) => {
1893
1908
  } = useItemGroupContext();
1894
1909
  const {
1895
1910
  focusedValue,
1896
- getItemProps
1911
+ getItemProps,
1912
+ isCompact
1897
1913
  } = useMenuContext();
1898
1914
  const item = {
1899
1915
  ...toItem({
@@ -1916,9 +1932,6 @@ const ItemComponent = React.forwardRef((_ref, ref) => {
1916
1932
  onMouseEnter
1917
1933
  });
1918
1934
  const isActive = value === focusedValue;
1919
- const {
1920
- isCompact
1921
- } = useMenuContext();
1922
1935
  const renderActionIcon = iconType => {
1923
1936
  switch (iconType) {
1924
1937
  case 'add':
@@ -1932,8 +1945,9 @@ const ItemComponent = React.forwardRef((_ref, ref) => {
1932
1945
  }
1933
1946
  };
1934
1947
  const contextValue = React.useMemo(() => ({
1935
- isDisabled
1936
- }), [isDisabled]);
1948
+ isDisabled,
1949
+ type
1950
+ }), [isDisabled, type]);
1937
1951
  return React__namespace.default.createElement(ItemContext.Provider, {
1938
1952
  value: contextValue
1939
1953
  }, React__namespace.default.createElement(StyledItem, Object.assign({
@@ -1943,9 +1957,12 @@ const ItemComponent = React.forwardRef((_ref, ref) => {
1943
1957
  }, props, itemProps, {
1944
1958
  ref: reactMergeRefs.mergeRefs([_itemRef, ref])
1945
1959
  }), React__namespace.default.createElement(StyledItemTypeIcon, {
1946
- isCompact: isCompact,
1947
- type: type
1948
- }, renderActionIcon(type)), icon && React__namespace.default.createElement(StyledItemIcon, null, icon), React__namespace.default.createElement(StyledItemContent, null, children || label)));
1960
+ $isCompact: isCompact,
1961
+ $type: type
1962
+ }, renderActionIcon(type)), !!icon && React__namespace.default.createElement(StyledItemIcon, {
1963
+ $isDisabled: isDisabled,
1964
+ $type: type
1965
+ }, icon), React__namespace.default.createElement(StyledItemContent, null, children || label)));
1949
1966
  });
1950
1967
  ItemComponent.displayName = 'Item';
1951
1968
  ItemComponent.propTypes = {