@zendeskgarden/react-dropdowns 9.0.0-next.11 → 9.0.0-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/elements/combobox/Combobox.js +0 -1
- package/dist/esm/elements/combobox/Field.js +0 -1
- package/dist/esm/elements/combobox/Hint.js +0 -1
- package/dist/esm/elements/combobox/Label.js +0 -1
- package/dist/esm/elements/combobox/Listbox.js +0 -1
- package/dist/esm/elements/combobox/Message.js +0 -1
- package/dist/esm/elements/combobox/OptGroup.js +0 -1
- package/dist/esm/elements/combobox/Option.js +7 -4
- package/dist/esm/elements/combobox/OptionMeta.js +0 -1
- package/dist/esm/elements/combobox/Tag.js +0 -1
- package/dist/esm/elements/menu/Item.js +9 -8
- package/dist/esm/elements/menu/ItemGroup.js +0 -1
- package/dist/esm/elements/menu/ItemMeta.js +0 -1
- package/dist/esm/elements/menu/Menu.js +2 -33
- package/dist/esm/elements/menu/MenuList.js +0 -1
- package/dist/esm/elements/menu/Separator.js +0 -1
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/check-lg-stroke.svg.js +1 -1
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +1 -1
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-left-stroke.svg.js +1 -1
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-right-stroke.svg.js +1 -1
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/plus-stroke.svg.js +1 -1
- package/dist/esm/views/combobox/StyledCombobox.js +1 -1
- package/dist/esm/views/combobox/StyledContainer.js +1 -1
- package/dist/esm/views/combobox/StyledField.js +1 -1
- package/dist/esm/views/combobox/StyledFloatingListbox.js +1 -1
- package/dist/esm/views/combobox/StyledHint.js +1 -1
- package/dist/esm/views/combobox/StyledInput.js +10 -4
- package/dist/esm/views/combobox/StyledInputGroup.js +1 -1
- package/dist/esm/views/combobox/StyledInputIcon.js +26 -7
- package/dist/esm/views/combobox/StyledLabel.js +1 -1
- package/dist/esm/views/combobox/StyledListbox.js +1 -1
- package/dist/esm/views/combobox/StyledListboxSeparator.js +10 -4
- package/dist/esm/views/combobox/StyledMessage.js +1 -1
- package/dist/esm/views/combobox/StyledOptGroup.js +1 -1
- package/dist/esm/views/combobox/StyledOption.js +34 -13
- package/dist/esm/views/combobox/StyledOptionContent.js +1 -1
- package/dist/esm/views/combobox/StyledOptionIcon.js +25 -3
- package/dist/esm/views/combobox/StyledOptionMeta.js +12 -4
- package/dist/esm/views/combobox/StyledOptionTypeIcon.js +18 -8
- package/dist/esm/views/combobox/StyledTag.js +6 -3
- package/dist/esm/views/combobox/StyledTagsButton.js +10 -4
- package/dist/esm/views/combobox/StyledTrigger.js +64 -33
- package/dist/esm/views/combobox/StyledValue.js +11 -4
- package/dist/esm/views/menu/StyledFloatingMenu.js +1 -1
- package/dist/esm/views/menu/StyledItem.js +1 -1
- package/dist/esm/views/menu/StyledItemContent.js +1 -1
- package/dist/esm/views/menu/StyledItemGroup.js +1 -1
- package/dist/esm/views/menu/StyledItemIcon.js +1 -1
- package/dist/esm/views/menu/StyledItemMeta.js +1 -1
- package/dist/esm/views/menu/StyledItemTypeIcon.js +1 -1
- package/dist/esm/views/menu/StyledMenu.js +2 -2
- package/dist/esm/views/menu/StyledSeparator.js +1 -1
- package/dist/index.cjs.js +346 -213
- package/dist/typings/views/combobox/StyledOptionIcon.d.ts +7 -2
- package/dist/typings/views/index.d.ts +0 -1
- package/dist/typings/views/menu/StyledItemIcon.d.ts +1 -1
- package/package.json +8 -9
- package/LICENSE.md +0 -176
- package/dist/esm/views/menu/StyledButton.js +0 -23
- 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 (
|
|
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,87 @@ const useFieldContext = () => {
|
|
|
80
80
|
return context;
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
const COMPONENT_ID$
|
|
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$
|
|
86
|
-
'data-garden-version': '9.0.0-next.
|
|
85
|
+
'data-garden-id': COMPONENT_ID$u,
|
|
86
|
+
'data-garden-version': '9.0.0-next.13'
|
|
87
87
|
}).withConfig({
|
|
88
88
|
displayName: "StyledLabel",
|
|
89
89
|
componentId: "sc-az6now-0"
|
|
90
|
-
})(["vertical-align:revert;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
90
|
+
})(["vertical-align:revert;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$u, props));
|
|
91
91
|
StyledLabel.defaultProps = {
|
|
92
92
|
theme: reactTheming.DEFAULT_THEME
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
const COMPONENT_ID$
|
|
95
|
+
const COMPONENT_ID$t = 'dropdowns.combobox.hint';
|
|
96
96
|
const StyledHint = styled__default.default(reactForms.Field.Hint).attrs({
|
|
97
|
-
'data-garden-id': COMPONENT_ID$
|
|
98
|
-
'data-garden-version': '9.0.0-next.
|
|
97
|
+
'data-garden-id': COMPONENT_ID$t,
|
|
98
|
+
'data-garden-version': '9.0.0-next.13'
|
|
99
99
|
}).withConfig({
|
|
100
100
|
displayName: "StyledHint",
|
|
101
101
|
componentId: "sc-106qvqx-0"
|
|
102
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
102
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$t, props));
|
|
103
103
|
StyledHint.defaultProps = {
|
|
104
104
|
theme: reactTheming.DEFAULT_THEME
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
const COMPONENT_ID$
|
|
107
|
+
const COMPONENT_ID$s = 'dropdowns.combobox.message';
|
|
108
108
|
const StyledMessage = styled__default.default(reactForms.Field.Message).attrs({
|
|
109
|
-
'data-garden-id': COMPONENT_ID$
|
|
110
|
-
'data-garden-version': '9.0.0-next.
|
|
109
|
+
'data-garden-id': COMPONENT_ID$s,
|
|
110
|
+
'data-garden-version': '9.0.0-next.13'
|
|
111
111
|
}).withConfig({
|
|
112
112
|
displayName: "StyledMessage",
|
|
113
113
|
componentId: "sc-jux8m5-0"
|
|
114
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
114
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$s, props));
|
|
115
115
|
StyledMessage.defaultProps = {
|
|
116
116
|
theme: reactTheming.DEFAULT_THEME
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
-
const COMPONENT_ID$
|
|
119
|
+
const COMPONENT_ID$r = 'dropdowns.combobox';
|
|
120
120
|
const sizeStyles$a = props => {
|
|
121
121
|
const minWidth = `${props.isCompact ? 100 : 144}px`;
|
|
122
122
|
const marginTop = `${props.theme.space.base * (props.isCompact ? 1 : 2)}px`;
|
|
123
123
|
return styled.css(["min-width:", ";", ":not([hidden]) + &&,", " + &&,", " + &&,&& + ", ",&& + ", "{margin-top:", ";}"], minWidth, StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, marginTop);
|
|
124
124
|
};
|
|
125
125
|
const StyledCombobox = styled__default.default.div.attrs({
|
|
126
|
-
'data-garden-id': COMPONENT_ID$
|
|
127
|
-
'data-garden-version': '9.0.0-next.
|
|
126
|
+
'data-garden-id': COMPONENT_ID$r,
|
|
127
|
+
'data-garden-version': '9.0.0-next.13'
|
|
128
128
|
}).withConfig({
|
|
129
129
|
displayName: "StyledCombobox",
|
|
130
130
|
componentId: "sc-13eybg8-0"
|
|
131
|
-
})(["", ";", ";"], sizeStyles$a, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
131
|
+
})(["", ";", ";"], sizeStyles$a, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$r, props));
|
|
132
132
|
StyledCombobox.defaultProps = {
|
|
133
133
|
theme: reactTheming.DEFAULT_THEME
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
const COMPONENT_ID$
|
|
136
|
+
const COMPONENT_ID$q = 'dropdowns.combobox.container';
|
|
137
137
|
const StyledContainer = styled__default.default.div.attrs({
|
|
138
|
-
'data-garden-id': COMPONENT_ID$
|
|
139
|
-
'data-garden-version': '9.0.0-next.
|
|
138
|
+
'data-garden-id': COMPONENT_ID$q,
|
|
139
|
+
'data-garden-version': '9.0.0-next.13'
|
|
140
140
|
}).withConfig({
|
|
141
141
|
displayName: "StyledContainer",
|
|
142
142
|
componentId: "sc-14i9jid-0"
|
|
143
|
-
})(["display:flex;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
143
|
+
})(["display:flex;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$q, props));
|
|
144
144
|
StyledContainer.defaultProps = {
|
|
145
145
|
theme: reactTheming.DEFAULT_THEME
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
-
const COMPONENT_ID$
|
|
148
|
+
const COMPONENT_ID$p = 'dropdowns.combobox.field';
|
|
149
149
|
const StyledField = styled__default.default.div.attrs({
|
|
150
|
-
'data-garden-id': COMPONENT_ID$
|
|
151
|
-
'data-garden-version': '9.0.0-next.
|
|
150
|
+
'data-garden-id': COMPONENT_ID$p,
|
|
151
|
+
'data-garden-version': '9.0.0-next.13'
|
|
152
152
|
}).withConfig({
|
|
153
153
|
displayName: "StyledField",
|
|
154
154
|
componentId: "sc-zc57xl-0"
|
|
155
|
-
})(["direction:", ";", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
155
|
+
})(["direction:", ";", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$p, props));
|
|
156
156
|
StyledField.defaultProps = {
|
|
157
157
|
theme: reactTheming.DEFAULT_THEME
|
|
158
158
|
};
|
|
159
159
|
|
|
160
|
-
const COMPONENT_ID$
|
|
160
|
+
const COMPONENT_ID$o = 'dropdowns.combobox.floating';
|
|
161
161
|
const StyledFloatingListbox = styled__default.default.div.attrs({
|
|
162
|
-
'data-garden-id': COMPONENT_ID$
|
|
163
|
-
'data-garden-version': '9.0.0-next.
|
|
162
|
+
'data-garden-id': COMPONENT_ID$o,
|
|
163
|
+
'data-garden-version': '9.0.0-next.13'
|
|
164
164
|
}).withConfig({
|
|
165
165
|
displayName: "StyledFloatingListbox",
|
|
166
166
|
componentId: "sc-1cp6spf-0"
|
|
@@ -169,14 +169,20 @@ const StyledFloatingListbox = styled__default.default.div.attrs({
|
|
|
169
169
|
hidden: props.isHidden,
|
|
170
170
|
animationModifier: '[data-garden-animate="true"]',
|
|
171
171
|
zIndex: props.zIndex
|
|
172
|
-
}), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
172
|
+
}), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$o, props));
|
|
173
173
|
StyledFloatingListbox.defaultProps = {
|
|
174
174
|
theme: reactTheming.DEFAULT_THEME
|
|
175
175
|
};
|
|
176
176
|
|
|
177
|
-
const COMPONENT_ID$
|
|
178
|
-
const colorStyles$
|
|
179
|
-
|
|
177
|
+
const COMPONENT_ID$n = 'dropdowns.combobox.input';
|
|
178
|
+
const colorStyles$9 = _ref => {
|
|
179
|
+
let {
|
|
180
|
+
theme
|
|
181
|
+
} = _ref;
|
|
182
|
+
const placeholderColor = reactTheming.getColor({
|
|
183
|
+
theme,
|
|
184
|
+
variable: 'foreground.disabled'
|
|
185
|
+
});
|
|
180
186
|
return styled.css(["background-color:inherit;color:inherit;&::placeholder{opacity:1;color:", ";}"], placeholderColor);
|
|
181
187
|
};
|
|
182
188
|
const getHeight = props => {
|
|
@@ -194,81 +200,112 @@ const sizeStyles$9 = props => {
|
|
|
194
200
|
return styled.css(["min-width:", ";height:", "px;line-height:", ";font-size:", ";&&{margin-top:", ";margin-bottom:", ";}"], minWidth, height, lineHeight, fontSize, margin, margin);
|
|
195
201
|
};
|
|
196
202
|
const StyledInput = styled__default.default.input.attrs({
|
|
197
|
-
'data-garden-id': COMPONENT_ID$
|
|
198
|
-
'data-garden-version': '9.0.0-next.
|
|
203
|
+
'data-garden-id': COMPONENT_ID$n,
|
|
204
|
+
'data-garden-version': '9.0.0-next.13'
|
|
199
205
|
}).withConfig({
|
|
200
206
|
displayName: "StyledInput",
|
|
201
207
|
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$
|
|
208
|
+
})(["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));
|
|
203
209
|
StyledInput.defaultProps = {
|
|
204
210
|
theme: reactTheming.DEFAULT_THEME
|
|
205
211
|
};
|
|
206
212
|
|
|
207
|
-
const COMPONENT_ID$
|
|
213
|
+
const COMPONENT_ID$m = 'dropdowns.combobox.input_group';
|
|
208
214
|
const sizeStyles$8 = props => {
|
|
209
215
|
const margin = props.theme.shadowWidths.sm;
|
|
210
216
|
return styled.css(["margin:-", ";min-width:0;& > *{margin:", ";}"], margin, margin);
|
|
211
217
|
};
|
|
212
218
|
const StyledInputGroup = styled__default.default.div.attrs({
|
|
213
|
-
'data-garden-id': COMPONENT_ID$
|
|
214
|
-
'data-garden-version': '9.0.0-next.
|
|
219
|
+
'data-garden-id': COMPONENT_ID$m,
|
|
220
|
+
'data-garden-version': '9.0.0-next.13'
|
|
215
221
|
}).withConfig({
|
|
216
222
|
displayName: "StyledInputGroup",
|
|
217
223
|
componentId: "sc-yx3q7u-0"
|
|
218
|
-
})(["display:flex;flex-grow:1;flex-wrap:wrap;", ";", ";"], sizeStyles$8, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
224
|
+
})(["display:flex;flex-grow:1;flex-wrap:wrap;", ";", ";"], sizeStyles$8, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$m, props));
|
|
219
225
|
StyledInputGroup.defaultProps = {
|
|
220
226
|
theme: reactTheming.DEFAULT_THEME
|
|
221
227
|
};
|
|
222
228
|
|
|
223
|
-
const COMPONENT_ID$
|
|
224
|
-
const colorStyles$
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
229
|
+
const COMPONENT_ID$l = 'dropdowns.combobox.trigger';
|
|
230
|
+
const colorStyles$8 = _ref => {
|
|
231
|
+
let {
|
|
232
|
+
theme,
|
|
233
|
+
validation,
|
|
234
|
+
isBare,
|
|
235
|
+
isLabelHovered,
|
|
236
|
+
focusInset
|
|
237
|
+
} = _ref;
|
|
238
|
+
const foregroundColor = reactTheming.getColor({
|
|
239
|
+
theme,
|
|
240
|
+
variable: 'foreground.default'
|
|
241
|
+
});
|
|
242
|
+
const backgroundColor = isBare ? 'transparent' : reactTheming.getColor({
|
|
243
|
+
theme,
|
|
244
|
+
variable: 'background.default'
|
|
245
|
+
});
|
|
235
246
|
let borderColor;
|
|
247
|
+
let borderVariable;
|
|
236
248
|
let hoverBorderColor;
|
|
237
249
|
let focusBorderColor;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
} else {
|
|
246
|
-
focusBorderColor = borderColor;
|
|
250
|
+
if (validation) {
|
|
251
|
+
if (validation === 'success') {
|
|
252
|
+
borderVariable = 'border.successEmphasis';
|
|
253
|
+
} else if (validation === 'warning') {
|
|
254
|
+
borderVariable = 'border.warningEmphasis';
|
|
255
|
+
} else if (validation === 'error') {
|
|
256
|
+
borderVariable = 'border.dangerEmphasis';
|
|
247
257
|
}
|
|
258
|
+
borderColor = reactTheming.getColor({
|
|
259
|
+
theme,
|
|
260
|
+
variable: borderVariable
|
|
261
|
+
});
|
|
262
|
+
hoverBorderColor = borderColor;
|
|
263
|
+
focusBorderColor = borderColor;
|
|
248
264
|
} else {
|
|
249
|
-
borderColor = reactTheming.
|
|
250
|
-
|
|
265
|
+
borderColor = reactTheming.getColor({
|
|
266
|
+
theme,
|
|
267
|
+
variable: 'border.default',
|
|
268
|
+
dark: {
|
|
269
|
+
offset: -100
|
|
270
|
+
},
|
|
271
|
+
light: {
|
|
272
|
+
offset: 100
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
borderVariable = 'border.primaryEmphasis';
|
|
276
|
+
hoverBorderColor = reactTheming.getColor({
|
|
277
|
+
theme,
|
|
278
|
+
variable: borderVariable
|
|
279
|
+
});
|
|
251
280
|
focusBorderColor = hoverBorderColor;
|
|
252
281
|
}
|
|
253
|
-
const disabledBackgroundColor =
|
|
254
|
-
|
|
255
|
-
|
|
282
|
+
const disabledBackgroundColor = isBare ? undefined : reactTheming.getColor({
|
|
283
|
+
theme,
|
|
284
|
+
variable: 'background.disabled'
|
|
285
|
+
});
|
|
286
|
+
const disabledBorderColor = reactTheming.getColor({
|
|
287
|
+
theme,
|
|
288
|
+
variable: 'border.disabled'
|
|
289
|
+
});
|
|
290
|
+
const disabledForegroundColor = reactTheming.getColor({
|
|
291
|
+
theme,
|
|
292
|
+
variable: 'foreground.disabled'
|
|
293
|
+
});
|
|
256
294
|
const focusSelector = `
|
|
257
295
|
&:focus-within:not([aria-disabled='true']),
|
|
258
296
|
&:focus-visible
|
|
259
297
|
`;
|
|
260
|
-
return styled.css(["border-color:", ";background-color:", ";color:", ";&:hover{border-color:", ";}", " &[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"],
|
|
261
|
-
theme
|
|
262
|
-
inset:
|
|
298
|
+
return styled.css(["border-color:", ";background-color:", ";color:", ";&:hover{border-color:", ";}", " &[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], isLabelHovered ? hoverBorderColor : borderColor, backgroundColor, foregroundColor, hoverBorderColor, reactTheming.focusStyles({
|
|
299
|
+
theme,
|
|
300
|
+
inset: focusInset,
|
|
263
301
|
color: {
|
|
264
|
-
|
|
265
|
-
shade: focusShade
|
|
302
|
+
variable: borderVariable
|
|
266
303
|
},
|
|
267
304
|
selector: focusSelector,
|
|
268
305
|
styles: {
|
|
269
306
|
borderColor: focusBorderColor
|
|
270
307
|
},
|
|
271
|
-
condition: !
|
|
308
|
+
condition: !isBare
|
|
272
309
|
}), disabledBorderColor, disabledBackgroundColor, disabledForegroundColor);
|
|
273
310
|
};
|
|
274
311
|
const sizeStyles$7 = props => {
|
|
@@ -292,22 +329,41 @@ const sizeStyles$7 = props => {
|
|
|
292
329
|
return styled.css(["padding:", " ", ";min-height:", ";max-height:", ";font-size:", ";"], verticalPadding, horizontalPadding, minHeight, maxHeight, props.theme.fontSizes.md);
|
|
293
330
|
};
|
|
294
331
|
const StyledTrigger = styled__default.default.div.attrs({
|
|
295
|
-
'data-garden-id': COMPONENT_ID$
|
|
296
|
-
'data-garden-version': '9.0.0-next.
|
|
332
|
+
'data-garden-id': COMPONENT_ID$l,
|
|
333
|
+
'data-garden-version': '9.0.0-next.13'
|
|
297
334
|
}).withConfig({
|
|
298
335
|
displayName: "StyledTrigger",
|
|
299
336
|
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$
|
|
337
|
+
})(["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$8, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$l, props));
|
|
301
338
|
StyledTrigger.defaultProps = {
|
|
302
339
|
theme: reactTheming.DEFAULT_THEME
|
|
303
340
|
};
|
|
304
341
|
|
|
305
|
-
const COMPONENT_ID$
|
|
306
|
-
const colorStyles$
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
342
|
+
const COMPONENT_ID$k = 'dropdowns.combobox.input_icon';
|
|
343
|
+
const colorStyles$7 = _ref => {
|
|
344
|
+
let {
|
|
345
|
+
theme,
|
|
346
|
+
$isLabelHovered
|
|
347
|
+
} = _ref;
|
|
348
|
+
const options = {
|
|
349
|
+
theme,
|
|
350
|
+
variable: 'foreground.subtle'
|
|
351
|
+
};
|
|
352
|
+
const color = reactTheming.getColor(options);
|
|
353
|
+
const focusColor = reactTheming.getColor({
|
|
354
|
+
...options,
|
|
355
|
+
dark: {
|
|
356
|
+
offset: -100
|
|
357
|
+
},
|
|
358
|
+
light: {
|
|
359
|
+
offset: 100
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
const disabledColor = reactTheming.getColor({
|
|
363
|
+
theme,
|
|
364
|
+
variable: 'foreground.disabled'
|
|
365
|
+
});
|
|
366
|
+
return styled.css(["color:", ";", ":hover &&,", ":focus-within &&,", ":focus &&{color:", ";}", "[aria-disabled='true'] &&{color:", ";}"], $isLabelHovered ? focusColor : color, StyledTrigger, StyledTrigger, StyledTrigger, focusColor, StyledTrigger, disabledColor);
|
|
311
367
|
};
|
|
312
368
|
const sizeStyles$6 = props => {
|
|
313
369
|
const size = props.theme.iconSizes.md;
|
|
@@ -322,32 +378,53 @@ const sizeStyles$6 = props => {
|
|
|
322
378
|
return styled.css(["top:", ";margin-", ":", ";width:", ";height:", ";"], position, side, margin, size, size);
|
|
323
379
|
};
|
|
324
380
|
const StyledInputIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
325
|
-
'data-garden-id': COMPONENT_ID$
|
|
326
|
-
'data-garden-version': '9.0.0-next.
|
|
381
|
+
'data-garden-id': COMPONENT_ID$k,
|
|
382
|
+
'data-garden-version': '9.0.0-next.13'
|
|
327
383
|
}).withConfig({
|
|
328
384
|
displayName: "StyledInputIcon",
|
|
329
385
|
componentId: "sc-gqbs1s-0"
|
|
330
|
-
})(["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$
|
|
386
|
+
})(["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));
|
|
331
387
|
StyledInputIcon.defaultProps = {
|
|
332
388
|
theme: reactTheming.DEFAULT_THEME
|
|
333
389
|
};
|
|
334
390
|
|
|
335
|
-
const COMPONENT_ID$
|
|
336
|
-
const colorStyles$
|
|
391
|
+
const COMPONENT_ID$j = 'dropdowns.combobox.option';
|
|
392
|
+
const colorStyles$6 = _ref => {
|
|
393
|
+
let {
|
|
394
|
+
theme,
|
|
395
|
+
isActive,
|
|
396
|
+
$type
|
|
397
|
+
} = _ref;
|
|
337
398
|
let backgroundColor;
|
|
338
399
|
let boxShadow;
|
|
339
|
-
if (
|
|
340
|
-
const
|
|
341
|
-
backgroundColor = reactTheming.
|
|
342
|
-
|
|
400
|
+
if (isActive && $type !== 'group' && $type !== 'header') {
|
|
401
|
+
const variable = 'background.primaryEmphasis';
|
|
402
|
+
backgroundColor = reactTheming.getColor({
|
|
403
|
+
theme,
|
|
404
|
+
variable,
|
|
405
|
+
transparency: theme.opacity[100]
|
|
406
|
+
});
|
|
407
|
+
boxShadow = `inset ${theme.rtl ? `-${theme.shadowWidths.md}` : theme.shadowWidths.md} 0 ${reactTheming.getColor({
|
|
408
|
+
theme,
|
|
409
|
+
variable
|
|
410
|
+
})}`;
|
|
343
411
|
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
412
|
+
let foregroundVariable;
|
|
413
|
+
if ($type === 'add') {
|
|
414
|
+
foregroundVariable = 'foreground.primary';
|
|
415
|
+
} else if ($type === 'danger') {
|
|
416
|
+
foregroundVariable = 'foreground.danger';
|
|
417
|
+
} else {
|
|
418
|
+
foregroundVariable = 'foreground.default';
|
|
350
419
|
}
|
|
420
|
+
const foregroundColor = reactTheming.getColor({
|
|
421
|
+
theme,
|
|
422
|
+
variable: foregroundVariable
|
|
423
|
+
});
|
|
424
|
+
const disabledForegroundColor = reactTheming.getColor({
|
|
425
|
+
theme,
|
|
426
|
+
variable: 'foreground.disabled'
|
|
427
|
+
});
|
|
351
428
|
return styled.css(["box-shadow:", ";background-color:", ";color:", ";&[aria-disabled='true']{background-color:transparent;color:", ";}"], boxShadow, backgroundColor, foregroundColor, disabledForegroundColor);
|
|
352
429
|
};
|
|
353
430
|
const getMinHeight = props => props.theme.space.base * (props.isCompact ? 7 : 9);
|
|
@@ -359,43 +436,49 @@ const sizeStyles$5 = props => {
|
|
|
359
436
|
return styled.css(["box-sizing:border-box;padding:", " ", ";min-height:", "px;line-height:", ";"], paddingVertical, paddingHorizontal, minHeight, lineHeight);
|
|
360
437
|
};
|
|
361
438
|
const StyledOption = styled__default.default.li.attrs({
|
|
362
|
-
'data-garden-id': COMPONENT_ID$
|
|
363
|
-
'data-garden-version': '9.0.0-next.
|
|
439
|
+
'data-garden-id': COMPONENT_ID$j,
|
|
440
|
+
'data-garden-version': '9.0.0-next.13'
|
|
364
441
|
}).withConfig({
|
|
365
442
|
displayName: "StyledOption",
|
|
366
443
|
componentId: "sc-jl4wn6-0"
|
|
367
|
-
})(["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$
|
|
444
|
+
})(["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));
|
|
368
445
|
StyledOption.defaultProps = {
|
|
369
446
|
theme: reactTheming.DEFAULT_THEME
|
|
370
447
|
};
|
|
371
448
|
|
|
372
|
-
const COMPONENT_ID$
|
|
449
|
+
const COMPONENT_ID$i = 'dropdowns.combobox.option.content';
|
|
373
450
|
const StyledOptionContent = styled__default.default.div.attrs({
|
|
374
|
-
'data-garden-id': COMPONENT_ID$
|
|
375
|
-
'data-garden-version': '9.0.0-next.
|
|
451
|
+
'data-garden-id': COMPONENT_ID$i,
|
|
452
|
+
'data-garden-version': '9.0.0-next.13'
|
|
376
453
|
}).withConfig({
|
|
377
454
|
displayName: "StyledOptionContent",
|
|
378
455
|
componentId: "sc-121ujpu-0"
|
|
379
|
-
})(["display:flex;flex-direction:column;flex-grow:1;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
456
|
+
})(["display:flex;flex-direction:column;flex-grow:1;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$i, props));
|
|
380
457
|
StyledOptionContent.defaultProps = {
|
|
381
458
|
theme: reactTheming.DEFAULT_THEME
|
|
382
459
|
};
|
|
383
460
|
|
|
384
|
-
const COMPONENT_ID$
|
|
461
|
+
const COMPONENT_ID$h = 'dropdowns.combobox.optgroup';
|
|
385
462
|
const StyledOptGroup = styled__default.default.ul.attrs({
|
|
386
|
-
'data-garden-id': COMPONENT_ID$
|
|
387
|
-
'data-garden-version': '9.0.0-next.
|
|
463
|
+
'data-garden-id': COMPONENT_ID$h,
|
|
464
|
+
'data-garden-version': '9.0.0-next.13'
|
|
388
465
|
}).withConfig({
|
|
389
466
|
displayName: "StyledOptGroup",
|
|
390
467
|
componentId: "sc-1kavqsx-0"
|
|
391
|
-
})(["margin:0;padding:0;list-style-type:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
468
|
+
})(["margin:0;padding:0;list-style-type:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
|
|
392
469
|
StyledOptGroup.defaultProps = {
|
|
393
470
|
theme: reactTheming.DEFAULT_THEME
|
|
394
471
|
};
|
|
395
472
|
|
|
396
|
-
const COMPONENT_ID$
|
|
397
|
-
const colorStyles$
|
|
398
|
-
|
|
473
|
+
const COMPONENT_ID$g = 'dropdowns.combobox.separator';
|
|
474
|
+
const colorStyles$5 = _ref => {
|
|
475
|
+
let {
|
|
476
|
+
theme
|
|
477
|
+
} = _ref;
|
|
478
|
+
const backgroundColor = reactTheming.getColor({
|
|
479
|
+
theme,
|
|
480
|
+
variable: 'border.subtle'
|
|
481
|
+
});
|
|
399
482
|
return styled.css(["background-color:", ";"], backgroundColor);
|
|
400
483
|
};
|
|
401
484
|
const sizeStyles$4 = props => {
|
|
@@ -404,25 +487,25 @@ const sizeStyles$4 = props => {
|
|
|
404
487
|
return styled.css(["margin:", " 0;height:", ";"], margin, height);
|
|
405
488
|
};
|
|
406
489
|
const StyledListboxSeparator = styled__default.default.li.attrs({
|
|
407
|
-
'data-garden-id': COMPONENT_ID$
|
|
408
|
-
'data-garden-version': '9.0.0-next.
|
|
490
|
+
'data-garden-id': COMPONENT_ID$g,
|
|
491
|
+
'data-garden-version': '9.0.0-next.13'
|
|
409
492
|
}).withConfig({
|
|
410
493
|
displayName: "StyledListboxSeparator",
|
|
411
494
|
componentId: "sc-1p6toh2-0"
|
|
412
|
-
})(["cursor:default;", ";", ";", ";"], sizeStyles$4, colorStyles$
|
|
495
|
+
})(["cursor:default;", ";", ";", ";"], sizeStyles$4, colorStyles$5, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
|
|
413
496
|
StyledListboxSeparator.defaultProps = {
|
|
414
497
|
theme: reactTheming.DEFAULT_THEME
|
|
415
498
|
};
|
|
416
499
|
|
|
417
|
-
const COMPONENT_ID$
|
|
500
|
+
const COMPONENT_ID$f = 'dropdowns.combobox.listbox';
|
|
418
501
|
const sizeStyles$3 = props => {
|
|
419
502
|
const padding = props.theme.space.base;
|
|
420
503
|
const minHeight = props.minHeight === undefined ? `${getMinHeight(props) + padding * 2}px` : props.minHeight;
|
|
421
504
|
return styled.css(["min-height:", ";max-height:", ";&&&{padding-top:", "px;padding-bottom:", "px;}"], minHeight, props.maxHeight, padding, padding);
|
|
422
505
|
};
|
|
423
506
|
const StyledListbox = styled__default.default.ul.attrs({
|
|
424
|
-
'data-garden-id': COMPONENT_ID$
|
|
425
|
-
'data-garden-version': '9.0.0-next.
|
|
507
|
+
'data-garden-id': COMPONENT_ID$f,
|
|
508
|
+
'data-garden-version': '9.0.0-next.13'
|
|
426
509
|
}).withConfig({
|
|
427
510
|
displayName: "StyledListbox",
|
|
428
511
|
componentId: "sc-1k13ba7-0"
|
|
@@ -431,7 +514,29 @@ StyledListbox.defaultProps = {
|
|
|
431
514
|
theme: reactTheming.DEFAULT_THEME
|
|
432
515
|
};
|
|
433
516
|
|
|
434
|
-
const COMPONENT_ID$
|
|
517
|
+
const COMPONENT_ID$e = 'dropdowns.combobox.option.icon';
|
|
518
|
+
const colorStyles$4 = _ref => {
|
|
519
|
+
let {
|
|
520
|
+
theme,
|
|
521
|
+
$isDisabled,
|
|
522
|
+
$type
|
|
523
|
+
} = _ref;
|
|
524
|
+
let variable;
|
|
525
|
+
if ($isDisabled) {
|
|
526
|
+
variable = 'foreground.disabled';
|
|
527
|
+
} else if ($type === 'danger') {
|
|
528
|
+
variable = 'foreground.danger';
|
|
529
|
+
} else if ($type === 'add') {
|
|
530
|
+
variable = 'foreground.primary';
|
|
531
|
+
} else {
|
|
532
|
+
variable = 'foreground.subtle';
|
|
533
|
+
}
|
|
534
|
+
const color = reactTheming.getColor({
|
|
535
|
+
theme,
|
|
536
|
+
variable
|
|
537
|
+
});
|
|
538
|
+
return styled.css(["color:", ";"], color);
|
|
539
|
+
};
|
|
435
540
|
const sizeStyles$2 = props => {
|
|
436
541
|
const size = props.theme.iconSizes.md;
|
|
437
542
|
const marginTop = polished.math(`(${props.theme.lineHeights.md} - ${size}) / 2`);
|
|
@@ -439,19 +544,27 @@ const sizeStyles$2 = props => {
|
|
|
439
544
|
return styled.css(["margin-top:", ";margin-", ":", ";width:", ";height:", ";"], marginTop, props.theme.rtl ? 'left' : 'right', marginHorizontal, size, size);
|
|
440
545
|
};
|
|
441
546
|
const StyledOptionIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
442
|
-
'data-garden-id': COMPONENT_ID$
|
|
443
|
-
'data-garden-version': '9.0.0-next.
|
|
547
|
+
'data-garden-id': COMPONENT_ID$e,
|
|
548
|
+
'data-garden-version': '9.0.0-next.13'
|
|
444
549
|
}).withConfig({
|
|
445
550
|
displayName: "StyledOptionIcon",
|
|
446
551
|
componentId: "sc-qsab3y-0"
|
|
447
|
-
})(["flex-shrink:0;", ";", ";"], sizeStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
552
|
+
})(["flex-shrink:0;", ";", ";", ";"], sizeStyles$2, colorStyles$4, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$e, props));
|
|
448
553
|
StyledOptionIcon.defaultProps = {
|
|
449
554
|
theme: reactTheming.DEFAULT_THEME
|
|
450
555
|
};
|
|
451
556
|
|
|
452
|
-
const COMPONENT_ID$
|
|
453
|
-
const colorStyles$3 =
|
|
454
|
-
|
|
557
|
+
const COMPONENT_ID$d = 'dropdowns.combobox.option.meta';
|
|
558
|
+
const colorStyles$3 = _ref => {
|
|
559
|
+
let {
|
|
560
|
+
theme,
|
|
561
|
+
isDisabled
|
|
562
|
+
} = _ref;
|
|
563
|
+
const variable = isDisabled ? 'foreground.disabled' : 'foreground.subtle';
|
|
564
|
+
const color = reactTheming.getColor({
|
|
565
|
+
theme,
|
|
566
|
+
variable
|
|
567
|
+
});
|
|
455
568
|
return styled.css(["color:", ";"], color);
|
|
456
569
|
};
|
|
457
570
|
const sizeStyles$1 = props => {
|
|
@@ -460,26 +573,36 @@ const sizeStyles$1 = props => {
|
|
|
460
573
|
return styled.css(["line-height:", ";font-size:", ";"], lineHeight, fontSize);
|
|
461
574
|
};
|
|
462
575
|
const StyledOptionMeta = styled__default.default.div.attrs({
|
|
463
|
-
'data-garden-id': COMPONENT_ID$
|
|
464
|
-
'data-garden-version': '9.0.0-next.
|
|
576
|
+
'data-garden-id': COMPONENT_ID$d,
|
|
577
|
+
'data-garden-version': '9.0.0-next.13'
|
|
465
578
|
}).withConfig({
|
|
466
579
|
displayName: "StyledOptionMeta",
|
|
467
580
|
componentId: "sc-j6pu10-0"
|
|
468
|
-
})(["transition:color 0.25s ease-in-out;font-weight:", ";", ";", ";", ";"], props => props.theme.fontWeights.regular, sizeStyles$1, colorStyles$3, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
581
|
+
})(["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));
|
|
469
582
|
StyledOptionMeta.defaultProps = {
|
|
470
583
|
theme: reactTheming.DEFAULT_THEME
|
|
471
584
|
};
|
|
472
585
|
|
|
473
|
-
const COMPONENT_ID$
|
|
474
|
-
const colorStyles$2 =
|
|
475
|
-
|
|
586
|
+
const COMPONENT_ID$c = 'dropdowns.combobox.option.type_icon';
|
|
587
|
+
const colorStyles$2 = _ref => {
|
|
588
|
+
let {
|
|
589
|
+
theme,
|
|
590
|
+
$type
|
|
591
|
+
} = _ref;
|
|
592
|
+
const opacity = $type && $type !== 'danger' ? 1 : 0;
|
|
476
593
|
let color;
|
|
477
|
-
if (
|
|
594
|
+
if ($type === 'add') {
|
|
478
595
|
color = 'inherit';
|
|
479
|
-
} else if (
|
|
480
|
-
color = reactTheming.
|
|
596
|
+
} else if ($type === 'header' || $type === 'next' || $type === 'previous') {
|
|
597
|
+
color = reactTheming.getColor({
|
|
598
|
+
theme,
|
|
599
|
+
variable: 'foreground.subtle'
|
|
600
|
+
});
|
|
481
601
|
} else {
|
|
482
|
-
color = reactTheming.
|
|
602
|
+
color = reactTheming.getColor({
|
|
603
|
+
theme,
|
|
604
|
+
variable: 'foreground.primary'
|
|
605
|
+
});
|
|
483
606
|
}
|
|
484
607
|
return styled.css(["opacity:", ";color:", ";", "[aria-selected='true'] > &{opacity:1;}", "[aria-disabled='true'] > &{color:inherit;}"], opacity, color, StyledOption, StyledOption);
|
|
485
608
|
};
|
|
@@ -496,36 +619,46 @@ const sizeStyles = props => {
|
|
|
496
619
|
return styled.css(["top:", ";", ":", ";width:", ";height:", ";"], top, side, position, size, size);
|
|
497
620
|
};
|
|
498
621
|
const StyledOptionTypeIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
499
|
-
'data-garden-id': COMPONENT_ID$
|
|
500
|
-
'data-garden-version': '9.0.0-next.
|
|
622
|
+
'data-garden-id': COMPONENT_ID$c,
|
|
623
|
+
'data-garden-version': '9.0.0-next.13'
|
|
501
624
|
}).withConfig({
|
|
502
625
|
displayName: "StyledOptionTypeIcon",
|
|
503
626
|
componentId: "sc-xpink2-0"
|
|
504
|
-
})(["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$
|
|
627
|
+
})(["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));
|
|
505
628
|
StyledOptionTypeIcon.defaultProps = {
|
|
506
629
|
theme: reactTheming.DEFAULT_THEME
|
|
507
630
|
};
|
|
508
631
|
|
|
509
|
-
const COMPONENT_ID$
|
|
632
|
+
const COMPONENT_ID$b = 'dropdowns.combobox.tag';
|
|
510
633
|
const StyledTag = styled__default.default(reactTags.Tag).attrs({
|
|
511
|
-
'data-garden-id': COMPONENT_ID$
|
|
512
|
-
'data-garden-version': '9.0.0-next.
|
|
634
|
+
'data-garden-id': COMPONENT_ID$b,
|
|
635
|
+
'data-garden-version': '9.0.0-next.13'
|
|
513
636
|
}).withConfig({
|
|
514
637
|
displayName: "StyledTag",
|
|
515
638
|
componentId: "sc-1alam0r-0"
|
|
516
|
-
})(["&[aria-disabled='true']{color:", ";}&[hidden]{display:revert;", "}", ";"], props => props.hue ? undefined : reactTheming.
|
|
639
|
+
})(["&[aria-disabled='true']{color:", ";}&[hidden]{display:revert;", "}", ";"], props => props.hue ? undefined : reactTheming.getColor({
|
|
640
|
+
theme: props.theme,
|
|
641
|
+
variable: 'foreground.disabled'
|
|
642
|
+
}), polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
|
|
517
643
|
StyledTag.defaultProps = {
|
|
518
644
|
theme: reactTheming.DEFAULT_THEME
|
|
519
645
|
};
|
|
520
646
|
|
|
521
|
-
const COMPONENT_ID$
|
|
522
|
-
const colorStyles$1 =
|
|
523
|
-
|
|
647
|
+
const COMPONENT_ID$a = 'dropdowns.combobox.value';
|
|
648
|
+
const colorStyles$1 = _ref => {
|
|
649
|
+
let {
|
|
650
|
+
theme,
|
|
651
|
+
isPlaceholder
|
|
652
|
+
} = _ref;
|
|
653
|
+
const foregroundColor = isPlaceholder && reactTheming.getColor({
|
|
654
|
+
theme,
|
|
655
|
+
variable: 'foreground.disabled'
|
|
656
|
+
});
|
|
524
657
|
return styled.css(["color:", ";"], foregroundColor);
|
|
525
658
|
};
|
|
526
659
|
const StyledValue = styled__default.default.div.attrs({
|
|
527
|
-
'data-garden-id': COMPONENT_ID$
|
|
528
|
-
'data-garden-version': '9.0.0-next.
|
|
660
|
+
'data-garden-id': COMPONENT_ID$a,
|
|
661
|
+
'data-garden-version': '9.0.0-next.13'
|
|
529
662
|
}).withConfig({
|
|
530
663
|
displayName: "StyledValue",
|
|
531
664
|
componentId: "sc-t719sx-0"
|
|
@@ -534,144 +667,138 @@ const StyledValue = styled__default.default.div.attrs({
|
|
|
534
667
|
return 'default';
|
|
535
668
|
}
|
|
536
669
|
return props.isEditable && !props.isAutocomplete ? 'text' : 'pointer';
|
|
537
|
-
}, sizeStyles$9, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
670
|
+
}, sizeStyles$9, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
|
|
538
671
|
StyledValue.defaultProps = {
|
|
539
672
|
theme: reactTheming.DEFAULT_THEME
|
|
540
673
|
};
|
|
541
674
|
|
|
542
|
-
const COMPONENT_ID$
|
|
543
|
-
const colorStyles =
|
|
544
|
-
|
|
675
|
+
const COMPONENT_ID$9 = 'dropdowns.combobox.tags_button';
|
|
676
|
+
const colorStyles = _ref => {
|
|
677
|
+
let {
|
|
678
|
+
theme
|
|
679
|
+
} = _ref;
|
|
680
|
+
const color = reactTheming.getColor({
|
|
681
|
+
theme,
|
|
682
|
+
variable: 'foreground.primary'
|
|
683
|
+
});
|
|
545
684
|
return styled.css(["color:", ";&:disabled{color:inherit;}"], color);
|
|
546
685
|
};
|
|
547
686
|
const StyledTagsButton = styled__default.default(StyledValue).attrs({
|
|
548
687
|
as: 'button',
|
|
549
|
-
'data-garden-id': COMPONENT_ID$
|
|
550
|
-
'data-garden-version': '9.0.0-next.
|
|
688
|
+
'data-garden-id': COMPONENT_ID$9,
|
|
689
|
+
'data-garden-version': '9.0.0-next.13'
|
|
551
690
|
}).withConfig({
|
|
552
691
|
displayName: "StyledTagsButton",
|
|
553
692
|
componentId: "sc-6q5w33-0"
|
|
554
|
-
})(["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$
|
|
693
|
+
})(["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));
|
|
555
694
|
StyledTagsButton.defaultProps = {
|
|
556
695
|
theme: reactTheming.DEFAULT_THEME
|
|
557
696
|
};
|
|
558
697
|
|
|
559
|
-
const COMPONENT_ID$
|
|
698
|
+
const COMPONENT_ID$8 = 'dropdowns.menu';
|
|
560
699
|
const StyledMenu = styled__default.default(StyledListbox).attrs({
|
|
561
|
-
'data-garden-id': COMPONENT_ID$
|
|
562
|
-
'data-garden-version': '9.0.0-next.
|
|
700
|
+
'data-garden-id': COMPONENT_ID$8,
|
|
701
|
+
'data-garden-version': '9.0.0-next.13'
|
|
563
702
|
}).withConfig({
|
|
564
703
|
displayName: "StyledMenu",
|
|
565
704
|
componentId: "sc-f77ntu-0"
|
|
566
705
|
})(["position:static !important;", ";", ";"], props => props.arrowPosition && reactTheming.arrowStyles(props.arrowPosition, {
|
|
567
706
|
size: `${props.theme.space.base * 2}px`,
|
|
568
|
-
inset: '
|
|
707
|
+
inset: '1.5px',
|
|
569
708
|
animationModifier: '[data-garden-animate-arrow="true"]'
|
|
570
|
-
}), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
709
|
+
}), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
|
|
571
710
|
StyledMenu.defaultProps = {
|
|
572
711
|
theme: reactTheming.DEFAULT_THEME
|
|
573
712
|
};
|
|
574
713
|
|
|
575
|
-
const COMPONENT_ID$
|
|
714
|
+
const COMPONENT_ID$7 = 'dropdowns.menu.floating';
|
|
576
715
|
const StyledFloatingMenu = styled__default.default(StyledFloatingListbox).attrs({
|
|
577
|
-
'data-garden-id': COMPONENT_ID$
|
|
578
|
-
'data-garden-version': '9.0.0-next.
|
|
716
|
+
'data-garden-id': COMPONENT_ID$7,
|
|
717
|
+
'data-garden-version': '9.0.0-next.13'
|
|
579
718
|
}).withConfig({
|
|
580
719
|
displayName: "StyledFloatingMenu",
|
|
581
720
|
componentId: "sc-1rc7ahb-0"
|
|
582
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
721
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
|
|
583
722
|
StyledFloatingMenu.defaultProps = {
|
|
584
723
|
theme: reactTheming.DEFAULT_THEME
|
|
585
724
|
};
|
|
586
725
|
|
|
587
|
-
const COMPONENT_ID$
|
|
726
|
+
const COMPONENT_ID$6 = 'dropdowns.menu.item';
|
|
588
727
|
const StyledItem = styled__default.default(StyledOption).attrs({
|
|
589
|
-
'data-garden-id': COMPONENT_ID$
|
|
590
|
-
'data-garden-version': '9.0.0-next.
|
|
728
|
+
'data-garden-id': COMPONENT_ID$6,
|
|
729
|
+
'data-garden-version': '9.0.0-next.13'
|
|
591
730
|
}).withConfig({
|
|
592
731
|
displayName: "StyledItem",
|
|
593
732
|
componentId: "sc-1jp99dq-0"
|
|
594
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
733
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
|
|
595
734
|
StyledItem.defaultProps = {
|
|
596
735
|
theme: reactTheming.DEFAULT_THEME
|
|
597
736
|
};
|
|
598
737
|
|
|
599
|
-
const COMPONENT_ID$
|
|
738
|
+
const COMPONENT_ID$5 = 'dropdowns.menu.item.content';
|
|
600
739
|
const StyledItemContent = styled__default.default(StyledOptionContent).attrs({
|
|
601
|
-
'data-garden-id': COMPONENT_ID$
|
|
602
|
-
'data-garden-version': '9.0.0-next.
|
|
740
|
+
'data-garden-id': COMPONENT_ID$5,
|
|
741
|
+
'data-garden-version': '9.0.0-next.13'
|
|
603
742
|
}).withConfig({
|
|
604
743
|
displayName: "StyledItemContent",
|
|
605
744
|
componentId: "sc-1opglsb-0"
|
|
606
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
745
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
|
|
607
746
|
StyledItemContent.defaultProps = {
|
|
608
747
|
theme: reactTheming.DEFAULT_THEME
|
|
609
748
|
};
|
|
610
749
|
|
|
611
|
-
const COMPONENT_ID$
|
|
750
|
+
const COMPONENT_ID$4 = 'dropdowns.menu.item_group';
|
|
612
751
|
const StyledItemGroup = styled__default.default(StyledOptGroup).attrs({
|
|
613
|
-
'data-garden-id': COMPONENT_ID$
|
|
614
|
-
'data-garden-version': '9.0.0-next.
|
|
752
|
+
'data-garden-id': COMPONENT_ID$4,
|
|
753
|
+
'data-garden-version': '9.0.0-next.13'
|
|
615
754
|
}).withConfig({
|
|
616
755
|
displayName: "StyledItemGroup",
|
|
617
756
|
componentId: "sc-1umk3cg-0"
|
|
618
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
757
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
|
|
619
758
|
StyledItemGroup.defaultProps = {
|
|
620
759
|
theme: reactTheming.DEFAULT_THEME
|
|
621
760
|
};
|
|
622
761
|
|
|
623
|
-
const COMPONENT_ID$
|
|
762
|
+
const COMPONENT_ID$3 = 'dropdowns.menu.item.icon';
|
|
624
763
|
const StyledItemIcon = styled__default.default(StyledOptionIcon).attrs({
|
|
625
|
-
'data-garden-id': COMPONENT_ID$
|
|
626
|
-
'data-garden-version': '9.0.0-next.
|
|
764
|
+
'data-garden-id': COMPONENT_ID$3,
|
|
765
|
+
'data-garden-version': '9.0.0-next.13'
|
|
627
766
|
}).withConfig({
|
|
628
767
|
displayName: "StyledItemIcon",
|
|
629
768
|
componentId: "sc-w9orqb-0"
|
|
630
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
769
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
631
770
|
StyledItemIcon.defaultProps = {
|
|
632
771
|
theme: reactTheming.DEFAULT_THEME
|
|
633
772
|
};
|
|
634
773
|
|
|
635
|
-
const COMPONENT_ID$
|
|
774
|
+
const COMPONENT_ID$2 = 'dropdowns.menu.item.meta';
|
|
636
775
|
const StyledItemMeta = styled__default.default(StyledOptionMeta).attrs({
|
|
637
|
-
'data-garden-id': COMPONENT_ID$
|
|
638
|
-
'data-garden-version': '9.0.0-next.
|
|
776
|
+
'data-garden-id': COMPONENT_ID$2,
|
|
777
|
+
'data-garden-version': '9.0.0-next.13'
|
|
639
778
|
}).withConfig({
|
|
640
779
|
displayName: "StyledItemMeta",
|
|
641
780
|
componentId: "sc-1unw3x1-0"
|
|
642
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
781
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
|
|
643
782
|
StyledItemMeta.defaultProps = {
|
|
644
783
|
theme: reactTheming.DEFAULT_THEME
|
|
645
784
|
};
|
|
646
785
|
|
|
647
|
-
const COMPONENT_ID$
|
|
786
|
+
const COMPONENT_ID$1 = 'dropdowns.menu.item.type_icon';
|
|
648
787
|
const StyledItemTypeIcon = styled__default.default(StyledOptionTypeIcon).attrs({
|
|
649
|
-
'data-garden-id': COMPONENT_ID$
|
|
650
|
-
'data-garden-version': '9.0.0-next.
|
|
788
|
+
'data-garden-id': COMPONENT_ID$1,
|
|
789
|
+
'data-garden-version': '9.0.0-next.13'
|
|
651
790
|
}).withConfig({
|
|
652
791
|
displayName: "StyledItemTypeIcon",
|
|
653
792
|
componentId: "sc-1pll3nu-0"
|
|
654
|
-
})(["", "[aria-checked='true'] > &{opacity:1;}", ";"], StyledItem, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
793
|
+
})(["", "[aria-checked='true'] > &{opacity:1;}", ";"], StyledItem, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
|
|
655
794
|
StyledItemTypeIcon.defaultProps = {
|
|
656
795
|
theme: reactTheming.DEFAULT_THEME
|
|
657
796
|
};
|
|
658
797
|
|
|
659
|
-
const COMPONENT_ID$1 = 'dropdowns.menu.button';
|
|
660
|
-
const StyledButton = styled__default.default(reactButtons.Button).attrs({
|
|
661
|
-
'data-garden-id': COMPONENT_ID$1,
|
|
662
|
-
'data-garden-version': '9.0.0-next.11'
|
|
663
|
-
}).withConfig({
|
|
664
|
-
displayName: "StyledButton",
|
|
665
|
-
componentId: "sc-5hs2jg-0"
|
|
666
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
|
|
667
|
-
StyledButton.defaultProps = {
|
|
668
|
-
theme: reactTheming.DEFAULT_THEME
|
|
669
|
-
};
|
|
670
|
-
|
|
671
798
|
const COMPONENT_ID = 'dropdowns.menu.separator';
|
|
672
799
|
const StyledSeparator = styled__default.default(StyledListboxSeparator).attrs({
|
|
673
800
|
'data-garden-id': COMPONENT_ID,
|
|
674
|
-
'data-garden-version': '9.0.0-next.
|
|
801
|
+
'data-garden-version': '9.0.0-next.13'
|
|
675
802
|
}).withConfig({
|
|
676
803
|
displayName: "StyledSeparator",
|
|
677
804
|
componentId: "sc-8kqwen-0"
|
|
@@ -1262,7 +1389,7 @@ Field.Label = Label;
|
|
|
1262
1389
|
Field.Message = Message;
|
|
1263
1390
|
|
|
1264
1391
|
var _path$3;
|
|
1265
|
-
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (
|
|
1392
|
+
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); }
|
|
1266
1393
|
var SvgPlusStroke = function SvgPlusStroke(props) {
|
|
1267
1394
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
1268
1395
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1279,7 +1406,7 @@ var SvgPlusStroke = function SvgPlusStroke(props) {
|
|
|
1279
1406
|
};
|
|
1280
1407
|
|
|
1281
1408
|
var _path$2;
|
|
1282
|
-
function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (
|
|
1409
|
+
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); }
|
|
1283
1410
|
var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
|
|
1284
1411
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
1285
1412
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1295,7 +1422,7 @@ var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
|
|
|
1295
1422
|
};
|
|
1296
1423
|
|
|
1297
1424
|
var _path$1;
|
|
1298
|
-
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (
|
|
1425
|
+
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); }
|
|
1299
1426
|
var SvgChevronLeftStroke = function SvgChevronLeftStroke(props) {
|
|
1300
1427
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
1301
1428
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1311,7 +1438,7 @@ var SvgChevronLeftStroke = function SvgChevronLeftStroke(props) {
|
|
|
1311
1438
|
};
|
|
1312
1439
|
|
|
1313
1440
|
var _path;
|
|
1314
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1441
|
+
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); }
|
|
1315
1442
|
var SvgCheckLgStroke = function SvgCheckLgStroke(props) {
|
|
1316
1443
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
1317
1444
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1367,8 +1494,9 @@ const OptionComponent = React.forwardRef((_ref, ref) => {
|
|
|
1367
1494
|
...props
|
|
1368
1495
|
} = _ref;
|
|
1369
1496
|
const contextValue = React.useMemo(() => ({
|
|
1370
|
-
isDisabled
|
|
1371
|
-
|
|
1497
|
+
isDisabled,
|
|
1498
|
+
type
|
|
1499
|
+
}), [isDisabled, type]);
|
|
1372
1500
|
const {
|
|
1373
1501
|
activeValue,
|
|
1374
1502
|
getOptionProps,
|
|
@@ -1419,7 +1547,10 @@ const OptionComponent = React.forwardRef((_ref, ref) => {
|
|
|
1419
1547
|
}, props, optionProps), React__namespace.default.createElement(StyledOptionTypeIcon, {
|
|
1420
1548
|
$isCompact: isCompact,
|
|
1421
1549
|
$type: type
|
|
1422
|
-
}, renderActionIcon(type)), icon && React__namespace.default.createElement(StyledOptionIcon,
|
|
1550
|
+
}, renderActionIcon(type)), icon && React__namespace.default.createElement(StyledOptionIcon, {
|
|
1551
|
+
$isDisabled: isDisabled,
|
|
1552
|
+
$type: type
|
|
1553
|
+
}, icon), React__namespace.default.createElement(StyledOptionContent, null, children || label || value)));
|
|
1423
1554
|
});
|
|
1424
1555
|
OptionComponent.displayName = 'Option';
|
|
1425
1556
|
OptionComponent.propTypes = {
|
|
@@ -1721,7 +1852,7 @@ const Menu = React.forwardRef((_ref, ref) => {
|
|
|
1721
1852
|
}),
|
|
1722
1853
|
ref: reactMergeRefs.mergeRefs([triggerRef, ref])
|
|
1723
1854
|
};
|
|
1724
|
-
const trigger = typeof button === 'function' ? button(triggerProps) : React__namespace.default.createElement(
|
|
1855
|
+
const trigger = typeof button === 'function' ? button(triggerProps) : React__namespace.default.createElement(reactButtons.Button, triggerProps, button, React__namespace.default.createElement(reactButtons.Button.EndIcon, {
|
|
1725
1856
|
isRotated: isExpanded
|
|
1726
1857
|
}, React__namespace.default.createElement(SvgChevronDownStroke, null)));
|
|
1727
1858
|
const contextValue = React.useMemo(() => ({
|
|
@@ -1865,7 +1996,8 @@ const ItemComponent = React.forwardRef((_ref, ref) => {
|
|
|
1865
1996
|
} = useItemGroupContext();
|
|
1866
1997
|
const {
|
|
1867
1998
|
focusedValue,
|
|
1868
|
-
getItemProps
|
|
1999
|
+
getItemProps,
|
|
2000
|
+
isCompact
|
|
1869
2001
|
} = useMenuContext();
|
|
1870
2002
|
const item = {
|
|
1871
2003
|
...toItem({
|
|
@@ -1888,9 +2020,6 @@ const ItemComponent = React.forwardRef((_ref, ref) => {
|
|
|
1888
2020
|
onMouseEnter
|
|
1889
2021
|
});
|
|
1890
2022
|
const isActive = value === focusedValue;
|
|
1891
|
-
const {
|
|
1892
|
-
isCompact
|
|
1893
|
-
} = useMenuContext();
|
|
1894
2023
|
const renderActionIcon = iconType => {
|
|
1895
2024
|
switch (iconType) {
|
|
1896
2025
|
case 'add':
|
|
@@ -1904,8 +2033,9 @@ const ItemComponent = React.forwardRef((_ref, ref) => {
|
|
|
1904
2033
|
}
|
|
1905
2034
|
};
|
|
1906
2035
|
const contextValue = React.useMemo(() => ({
|
|
1907
|
-
isDisabled
|
|
1908
|
-
|
|
2036
|
+
isDisabled,
|
|
2037
|
+
type
|
|
2038
|
+
}), [isDisabled, type]);
|
|
1909
2039
|
return React__namespace.default.createElement(ItemContext.Provider, {
|
|
1910
2040
|
value: contextValue
|
|
1911
2041
|
}, React__namespace.default.createElement(StyledItem, Object.assign({
|
|
@@ -1917,7 +2047,10 @@ const ItemComponent = React.forwardRef((_ref, ref) => {
|
|
|
1917
2047
|
}), React__namespace.default.createElement(StyledItemTypeIcon, {
|
|
1918
2048
|
$isCompact: isCompact,
|
|
1919
2049
|
$type: type
|
|
1920
|
-
}, renderActionIcon(type)), icon && React__namespace.default.createElement(StyledItemIcon,
|
|
2050
|
+
}, renderActionIcon(type)), icon && React__namespace.default.createElement(StyledItemIcon, {
|
|
2051
|
+
$isDisabled: isDisabled,
|
|
2052
|
+
$type: type
|
|
2053
|
+
}, icon), React__namespace.default.createElement(StyledItemContent, null, children || label)));
|
|
1921
2054
|
});
|
|
1922
2055
|
ItemComponent.displayName = 'Item';
|
|
1923
2056
|
ItemComponent.propTypes = {
|