@zendeskgarden/react-dropdowns 9.0.0-next.6 → 9.0.0-next.8
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/context/useComboboxContext.js +18 -0
- package/dist/esm/context/useFieldContext.js +18 -0
- package/dist/esm/context/useItemContext.js +18 -0
- package/dist/esm/context/useItemGroupContext.js +14 -0
- package/dist/esm/context/useMenuContext.js +18 -0
- package/dist/esm/context/useOptionContext.js +18 -0
- package/dist/esm/elements/combobox/Combobox.js +330 -0
- package/dist/esm/elements/combobox/Field.js +75 -0
- package/dist/esm/elements/combobox/Hint.js +57 -0
- package/dist/esm/elements/combobox/Label.js +68 -0
- package/dist/esm/elements/combobox/Listbox.js +155 -0
- package/dist/esm/elements/combobox/Message.js +63 -0
- package/dist/esm/elements/combobox/OptGroup.js +93 -0
- package/dist/esm/elements/combobox/Option.js +133 -0
- package/dist/esm/elements/combobox/OptionMeta.js +55 -0
- package/dist/esm/elements/combobox/Tag.js +98 -0
- package/dist/esm/elements/combobox/TagAvatar.js +13 -0
- package/dist/esm/elements/combobox/TagGroup.js +35 -0
- package/dist/esm/elements/combobox/utils.js +36 -0
- package/dist/esm/elements/menu/Item.js +140 -0
- package/dist/esm/elements/menu/ItemGroup.js +96 -0
- package/dist/esm/elements/menu/ItemMeta.js +55 -0
- package/dist/esm/elements/menu/Menu.js +157 -0
- package/dist/esm/elements/menu/MenuList.js +170 -0
- package/dist/esm/elements/menu/Separator.js +58 -0
- package/dist/esm/elements/menu/utils.js +55 -0
- package/dist/esm/index.js +19 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/check-lg-stroke.svg.js +28 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +25 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-left-stroke.svg.js +25 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-right-stroke.svg.js +25 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/plus-stroke.svg.js +26 -0
- package/dist/esm/types/index.js +12 -0
- package/dist/esm/views/combobox/StyledCombobox.js +30 -0
- package/dist/esm/views/combobox/StyledContainer.js +22 -0
- package/dist/esm/views/combobox/StyledField.js +22 -0
- package/dist/esm/views/combobox/StyledFloatingListbox.js +27 -0
- package/dist/esm/views/combobox/StyledHint.js +23 -0
- package/dist/esm/views/combobox/StyledInput.js +41 -0
- package/dist/esm/views/combobox/StyledInputGroup.js +26 -0
- package/dist/esm/views/combobox/StyledInputIcon.js +56 -0
- package/dist/esm/views/combobox/StyledLabel.js +23 -0
- package/dist/esm/views/combobox/StyledListbox.js +31 -0
- package/dist/esm/views/combobox/StyledListboxSeparator.js +31 -0
- package/dist/esm/views/combobox/StyledMessage.js +23 -0
- package/dist/esm/views/combobox/StyledOptGroup.js +22 -0
- package/dist/esm/views/combobox/StyledOption.js +48 -0
- package/dist/esm/views/combobox/StyledOptionContent.js +22 -0
- package/dist/esm/views/combobox/StyledOptionIcon.js +37 -0
- package/dist/esm/views/combobox/StyledOptionMeta.js +31 -0
- package/dist/esm/views/combobox/StyledOptionTypeIcon.js +58 -0
- package/dist/esm/views/combobox/StyledTag.js +24 -0
- package/dist/esm/views/combobox/StyledTagsButton.js +28 -0
- package/dist/esm/views/combobox/StyledTrigger.js +94 -0
- package/dist/esm/views/combobox/StyledValue.js +32 -0
- package/dist/esm/views/menu/StyledButton.js +23 -0
- package/dist/esm/views/menu/StyledFloatingMenu.js +23 -0
- package/dist/esm/views/menu/StyledItem.js +23 -0
- package/dist/esm/views/menu/StyledItemContent.js +23 -0
- package/dist/esm/views/menu/StyledItemGroup.js +23 -0
- package/dist/esm/views/menu/StyledItemIcon.js +23 -0
- package/dist/esm/views/menu/StyledItemMeta.js +23 -0
- package/dist/esm/views/menu/StyledItemTypeIcon.js +24 -0
- package/dist/esm/views/menu/StyledMenu.js +27 -0
- package/dist/esm/views/menu/StyledSeparator.js +23 -0
- package/dist/index.cjs.js +95 -113
- package/dist/typings/elements/combobox/utils.d.ts +0 -8
- package/dist/typings/types/index.d.ts +1 -1
- package/package.json +10 -10
- package/dist/index.esm.js +0 -1973
package/dist/index.cjs.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
8
7
|
'use strict';
|
|
9
8
|
|
|
10
9
|
var React = require('react');
|
|
@@ -47,21 +46,6 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
47
46
|
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
48
47
|
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
49
48
|
|
|
50
|
-
function _extends$5() {
|
|
51
|
-
_extends$5 = Object.assign ? Object.assign.bind() : function (target) {
|
|
52
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
53
|
-
var source = arguments[i];
|
|
54
|
-
for (var key in source) {
|
|
55
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
56
|
-
target[key] = source[key];
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return target;
|
|
61
|
-
};
|
|
62
|
-
return _extends$5.apply(this, arguments);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
49
|
var _path$4;
|
|
66
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); }
|
|
67
51
|
var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
@@ -99,7 +83,7 @@ const useFieldContext = () => {
|
|
|
99
83
|
const COMPONENT_ID$v = 'dropdowns.combobox.label';
|
|
100
84
|
const StyledLabel = styled__default.default(reactForms.Field.Label).attrs({
|
|
101
85
|
'data-garden-id': COMPONENT_ID$v,
|
|
102
|
-
'data-garden-version': '9.0.0-next.
|
|
86
|
+
'data-garden-version': '9.0.0-next.8'
|
|
103
87
|
}).withConfig({
|
|
104
88
|
displayName: "StyledLabel",
|
|
105
89
|
componentId: "sc-az6now-0"
|
|
@@ -111,7 +95,7 @@ StyledLabel.defaultProps = {
|
|
|
111
95
|
const COMPONENT_ID$u = 'dropdowns.combobox.hint';
|
|
112
96
|
const StyledHint = styled__default.default(reactForms.Field.Hint).attrs({
|
|
113
97
|
'data-garden-id': COMPONENT_ID$u,
|
|
114
|
-
'data-garden-version': '9.0.0-next.
|
|
98
|
+
'data-garden-version': '9.0.0-next.8'
|
|
115
99
|
}).withConfig({
|
|
116
100
|
displayName: "StyledHint",
|
|
117
101
|
componentId: "sc-106qvqx-0"
|
|
@@ -123,7 +107,7 @@ StyledHint.defaultProps = {
|
|
|
123
107
|
const COMPONENT_ID$t = 'dropdowns.combobox.message';
|
|
124
108
|
const StyledMessage = styled__default.default(reactForms.Field.Message).attrs({
|
|
125
109
|
'data-garden-id': COMPONENT_ID$t,
|
|
126
|
-
'data-garden-version': '9.0.0-next.
|
|
110
|
+
'data-garden-version': '9.0.0-next.8'
|
|
127
111
|
}).withConfig({
|
|
128
112
|
displayName: "StyledMessage",
|
|
129
113
|
componentId: "sc-jux8m5-0"
|
|
@@ -140,7 +124,7 @@ const sizeStyles$a = props => {
|
|
|
140
124
|
};
|
|
141
125
|
const StyledCombobox = styled__default.default.div.attrs({
|
|
142
126
|
'data-garden-id': COMPONENT_ID$s,
|
|
143
|
-
'data-garden-version': '9.0.0-next.
|
|
127
|
+
'data-garden-version': '9.0.0-next.8'
|
|
144
128
|
}).withConfig({
|
|
145
129
|
displayName: "StyledCombobox",
|
|
146
130
|
componentId: "sc-13eybg8-0"
|
|
@@ -152,7 +136,7 @@ StyledCombobox.defaultProps = {
|
|
|
152
136
|
const COMPONENT_ID$r = 'dropdowns.combobox.container';
|
|
153
137
|
const StyledContainer = styled__default.default.div.attrs({
|
|
154
138
|
'data-garden-id': COMPONENT_ID$r,
|
|
155
|
-
'data-garden-version': '9.0.0-next.
|
|
139
|
+
'data-garden-version': '9.0.0-next.8'
|
|
156
140
|
}).withConfig({
|
|
157
141
|
displayName: "StyledContainer",
|
|
158
142
|
componentId: "sc-14i9jid-0"
|
|
@@ -164,7 +148,7 @@ StyledContainer.defaultProps = {
|
|
|
164
148
|
const COMPONENT_ID$q = 'dropdowns.combobox.field';
|
|
165
149
|
const StyledField = styled__default.default.div.attrs({
|
|
166
150
|
'data-garden-id': COMPONENT_ID$q,
|
|
167
|
-
'data-garden-version': '9.0.0-next.
|
|
151
|
+
'data-garden-version': '9.0.0-next.8'
|
|
168
152
|
}).withConfig({
|
|
169
153
|
displayName: "StyledField",
|
|
170
154
|
componentId: "sc-zc57xl-0"
|
|
@@ -176,7 +160,7 @@ StyledField.defaultProps = {
|
|
|
176
160
|
const COMPONENT_ID$p = 'dropdowns.combobox.floating';
|
|
177
161
|
const StyledFloatingListbox = styled__default.default.div.attrs({
|
|
178
162
|
'data-garden-id': COMPONENT_ID$p,
|
|
179
|
-
'data-garden-version': '9.0.0-next.
|
|
163
|
+
'data-garden-version': '9.0.0-next.8'
|
|
180
164
|
}).withConfig({
|
|
181
165
|
displayName: "StyledFloatingListbox",
|
|
182
166
|
componentId: "sc-1cp6spf-0"
|
|
@@ -211,7 +195,7 @@ const sizeStyles$9 = props => {
|
|
|
211
195
|
};
|
|
212
196
|
const StyledInput = styled__default.default.input.attrs({
|
|
213
197
|
'data-garden-id': COMPONENT_ID$o,
|
|
214
|
-
'data-garden-version': '9.0.0-next.
|
|
198
|
+
'data-garden-version': '9.0.0-next.8'
|
|
215
199
|
}).withConfig({
|
|
216
200
|
displayName: "StyledInput",
|
|
217
201
|
componentId: "sc-1lkqdg-0"
|
|
@@ -227,7 +211,7 @@ const sizeStyles$8 = props => {
|
|
|
227
211
|
};
|
|
228
212
|
const StyledInputGroup = styled__default.default.div.attrs({
|
|
229
213
|
'data-garden-id': COMPONENT_ID$n,
|
|
230
|
-
'data-garden-version': '9.0.0-next.
|
|
214
|
+
'data-garden-version': '9.0.0-next.8'
|
|
231
215
|
}).withConfig({
|
|
232
216
|
displayName: "StyledInputGroup",
|
|
233
217
|
componentId: "sc-yx3q7u-0"
|
|
@@ -276,8 +260,10 @@ const colorStyles$7 = props => {
|
|
|
276
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({
|
|
277
261
|
theme: props.theme,
|
|
278
262
|
inset: props.focusInset,
|
|
279
|
-
|
|
280
|
-
|
|
263
|
+
color: {
|
|
264
|
+
hue: focusBorderColor,
|
|
265
|
+
shade: focusShade
|
|
266
|
+
},
|
|
281
267
|
selector: focusSelector,
|
|
282
268
|
styles: {
|
|
283
269
|
borderColor: focusBorderColor
|
|
@@ -307,7 +293,7 @@ const sizeStyles$7 = props => {
|
|
|
307
293
|
};
|
|
308
294
|
const StyledTrigger = styled__default.default.div.attrs({
|
|
309
295
|
'data-garden-id': COMPONENT_ID$m,
|
|
310
|
-
'data-garden-version': '9.0.0-next.
|
|
296
|
+
'data-garden-version': '9.0.0-next.8'
|
|
311
297
|
}).withConfig({
|
|
312
298
|
displayName: "StyledTrigger",
|
|
313
299
|
componentId: "sc-116nftk-0"
|
|
@@ -321,7 +307,7 @@ const colorStyles$6 = props => {
|
|
|
321
307
|
const color = reactTheming.getColorV8('neutralHue', 600, props.theme);
|
|
322
308
|
const focusColor = reactTheming.getColorV8('neutralHue', 700, props.theme);
|
|
323
309
|
const disabledColor = reactTheming.getColorV8('neutralHue', 400, props.theme);
|
|
324
|
-
return styled.css(["color:", ";", ":hover &,", ":focus-within &,", ":focus
|
|
310
|
+
return styled.css(["color:", ";", ":hover &,", ":focus-within &,", ":focus &{color:", ";}", "[aria-disabled='true'] &{color:", ";}"], props.isLabelHovered ? focusColor : color, StyledTrigger, StyledTrigger, StyledTrigger, focusColor, StyledTrigger, disabledColor);
|
|
325
311
|
};
|
|
326
312
|
const sizeStyles$6 = props => {
|
|
327
313
|
const size = props.theme.iconSizes.md;
|
|
@@ -349,7 +335,7 @@ const StyledInputIcon = styled__default.default(_ref => {
|
|
|
349
335
|
return React.cloneElement(React.Children.only(children), props);
|
|
350
336
|
}).attrs({
|
|
351
337
|
'data-garden-id': COMPONENT_ID$l,
|
|
352
|
-
'data-garden-version': '9.0.0-next.
|
|
338
|
+
'data-garden-version': '9.0.0-next.8'
|
|
353
339
|
}).withConfig({
|
|
354
340
|
displayName: "StyledInputIcon",
|
|
355
341
|
componentId: "sc-gqbs1s-0"
|
|
@@ -386,11 +372,11 @@ const sizeStyles$5 = props => {
|
|
|
386
372
|
};
|
|
387
373
|
const StyledOption = styled__default.default.li.attrs({
|
|
388
374
|
'data-garden-id': COMPONENT_ID$k,
|
|
389
|
-
'data-garden-version': '9.0.0-next.
|
|
375
|
+
'data-garden-version': '9.0.0-next.8'
|
|
390
376
|
}).withConfig({
|
|
391
377
|
displayName: "StyledOption",
|
|
392
378
|
componentId: "sc-jl4wn6-0"
|
|
393
|
-
})(["display:flex;position:relative;transition:color 0.25s ease-in-out;cursor:", ";
|
|
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));
|
|
394
380
|
StyledOption.defaultProps = {
|
|
395
381
|
theme: reactTheming.DEFAULT_THEME
|
|
396
382
|
};
|
|
@@ -398,7 +384,7 @@ StyledOption.defaultProps = {
|
|
|
398
384
|
const COMPONENT_ID$j = 'dropdowns.combobox.option.content';
|
|
399
385
|
const StyledOptionContent = styled__default.default.div.attrs({
|
|
400
386
|
'data-garden-id': COMPONENT_ID$j,
|
|
401
|
-
'data-garden-version': '9.0.0-next.
|
|
387
|
+
'data-garden-version': '9.0.0-next.8'
|
|
402
388
|
}).withConfig({
|
|
403
389
|
displayName: "StyledOptionContent",
|
|
404
390
|
componentId: "sc-121ujpu-0"
|
|
@@ -410,7 +396,7 @@ StyledOptionContent.defaultProps = {
|
|
|
410
396
|
const COMPONENT_ID$i = 'dropdowns.combobox.optgroup';
|
|
411
397
|
const StyledOptGroup = styled__default.default.ul.attrs({
|
|
412
398
|
'data-garden-id': COMPONENT_ID$i,
|
|
413
|
-
'data-garden-version': '9.0.0-next.
|
|
399
|
+
'data-garden-version': '9.0.0-next.8'
|
|
414
400
|
}).withConfig({
|
|
415
401
|
displayName: "StyledOptGroup",
|
|
416
402
|
componentId: "sc-1kavqsx-0"
|
|
@@ -431,7 +417,7 @@ const sizeStyles$4 = props => {
|
|
|
431
417
|
};
|
|
432
418
|
const StyledListboxSeparator = styled__default.default.li.attrs({
|
|
433
419
|
'data-garden-id': COMPONENT_ID$h,
|
|
434
|
-
'data-garden-version': '9.0.0-next.
|
|
420
|
+
'data-garden-version': '9.0.0-next.8'
|
|
435
421
|
}).withConfig({
|
|
436
422
|
displayName: "StyledListboxSeparator",
|
|
437
423
|
componentId: "sc-1p6toh2-0"
|
|
@@ -448,7 +434,7 @@ const sizeStyles$3 = props => {
|
|
|
448
434
|
};
|
|
449
435
|
const StyledListbox = styled__default.default.ul.attrs({
|
|
450
436
|
'data-garden-id': COMPONENT_ID$g,
|
|
451
|
-
'data-garden-version': '9.0.0-next.
|
|
437
|
+
'data-garden-version': '9.0.0-next.8'
|
|
452
438
|
}).withConfig({
|
|
453
439
|
displayName: "StyledListbox",
|
|
454
440
|
componentId: "sc-1k13ba7-0"
|
|
@@ -473,7 +459,7 @@ const StyledOptionIcon = styled__default.default(_ref => {
|
|
|
473
459
|
return React.cloneElement(React.Children.only(children), props);
|
|
474
460
|
}).attrs({
|
|
475
461
|
'data-garden-id': COMPONENT_ID$f,
|
|
476
|
-
'data-garden-version': '9.0.0-next.
|
|
462
|
+
'data-garden-version': '9.0.0-next.8'
|
|
477
463
|
}).withConfig({
|
|
478
464
|
displayName: "StyledOptionIcon",
|
|
479
465
|
componentId: "sc-qsab3y-0"
|
|
@@ -494,7 +480,7 @@ const sizeStyles$1 = props => {
|
|
|
494
480
|
};
|
|
495
481
|
const StyledOptionMeta = styled__default.default.div.attrs({
|
|
496
482
|
'data-garden-id': COMPONENT_ID$e,
|
|
497
|
-
'data-garden-version': '9.0.0-next.
|
|
483
|
+
'data-garden-version': '9.0.0-next.8'
|
|
498
484
|
}).withConfig({
|
|
499
485
|
displayName: "StyledOptionMeta",
|
|
500
486
|
componentId: "sc-j6pu10-0"
|
|
@@ -539,7 +525,7 @@ const StyledOptionTypeIcon = styled__default.default(_ref => {
|
|
|
539
525
|
return React.cloneElement(React.Children.only(children), props);
|
|
540
526
|
}).attrs({
|
|
541
527
|
'data-garden-id': COMPONENT_ID$d,
|
|
542
|
-
'data-garden-version': '9.0.0-next.
|
|
528
|
+
'data-garden-version': '9.0.0-next.8'
|
|
543
529
|
}).withConfig({
|
|
544
530
|
displayName: "StyledOptionTypeIcon",
|
|
545
531
|
componentId: "sc-xpink2-0"
|
|
@@ -551,7 +537,7 @@ StyledOptionTypeIcon.defaultProps = {
|
|
|
551
537
|
const COMPONENT_ID$c = 'dropdowns.combobox.tag';
|
|
552
538
|
const StyledTag = styled__default.default(reactTags.Tag).attrs({
|
|
553
539
|
'data-garden-id': COMPONENT_ID$c,
|
|
554
|
-
'data-garden-version': '9.0.0-next.
|
|
540
|
+
'data-garden-version': '9.0.0-next.8'
|
|
555
541
|
}).withConfig({
|
|
556
542
|
displayName: "StyledTag",
|
|
557
543
|
componentId: "sc-1alam0r-0"
|
|
@@ -567,7 +553,7 @@ const colorStyles$1 = props => {
|
|
|
567
553
|
};
|
|
568
554
|
const StyledValue = styled__default.default.div.attrs({
|
|
569
555
|
'data-garden-id': COMPONENT_ID$b,
|
|
570
|
-
'data-garden-version': '9.0.0-next.
|
|
556
|
+
'data-garden-version': '9.0.0-next.8'
|
|
571
557
|
}).withConfig({
|
|
572
558
|
displayName: "StyledValue",
|
|
573
559
|
componentId: "sc-t719sx-0"
|
|
@@ -589,7 +575,7 @@ const colorStyles = props => {
|
|
|
589
575
|
const StyledTagsButton = styled__default.default(StyledValue).attrs({
|
|
590
576
|
as: 'button',
|
|
591
577
|
'data-garden-id': COMPONENT_ID$a,
|
|
592
|
-
'data-garden-version': '9.0.0-next.
|
|
578
|
+
'data-garden-version': '9.0.0-next.8'
|
|
593
579
|
}).withConfig({
|
|
594
580
|
displayName: "StyledTagsButton",
|
|
595
581
|
componentId: "sc-6q5w33-0"
|
|
@@ -601,7 +587,7 @@ StyledTagsButton.defaultProps = {
|
|
|
601
587
|
const COMPONENT_ID$9 = 'dropdowns.menu';
|
|
602
588
|
const StyledMenu = styled__default.default(StyledListbox).attrs({
|
|
603
589
|
'data-garden-id': COMPONENT_ID$9,
|
|
604
|
-
'data-garden-version': '9.0.0-next.
|
|
590
|
+
'data-garden-version': '9.0.0-next.8'
|
|
605
591
|
}).withConfig({
|
|
606
592
|
displayName: "StyledMenu",
|
|
607
593
|
componentId: "sc-f77ntu-0"
|
|
@@ -617,7 +603,7 @@ StyledMenu.defaultProps = {
|
|
|
617
603
|
const COMPONENT_ID$8 = 'dropdowns.menu.floating';
|
|
618
604
|
const StyledFloatingMenu = styled__default.default(StyledFloatingListbox).attrs({
|
|
619
605
|
'data-garden-id': COMPONENT_ID$8,
|
|
620
|
-
'data-garden-version': '9.0.0-next.
|
|
606
|
+
'data-garden-version': '9.0.0-next.8'
|
|
621
607
|
}).withConfig({
|
|
622
608
|
displayName: "StyledFloatingMenu",
|
|
623
609
|
componentId: "sc-1rc7ahb-0"
|
|
@@ -629,7 +615,7 @@ StyledFloatingMenu.defaultProps = {
|
|
|
629
615
|
const COMPONENT_ID$7 = 'dropdowns.menu.item';
|
|
630
616
|
const StyledItem = styled__default.default(StyledOption).attrs({
|
|
631
617
|
'data-garden-id': COMPONENT_ID$7,
|
|
632
|
-
'data-garden-version': '9.0.0-next.
|
|
618
|
+
'data-garden-version': '9.0.0-next.8'
|
|
633
619
|
}).withConfig({
|
|
634
620
|
displayName: "StyledItem",
|
|
635
621
|
componentId: "sc-1jp99dq-0"
|
|
@@ -641,7 +627,7 @@ StyledItem.defaultProps = {
|
|
|
641
627
|
const COMPONENT_ID$6 = 'dropdowns.menu.item.content';
|
|
642
628
|
const StyledItemContent = styled__default.default(StyledOptionContent).attrs({
|
|
643
629
|
'data-garden-id': COMPONENT_ID$6,
|
|
644
|
-
'data-garden-version': '9.0.0-next.
|
|
630
|
+
'data-garden-version': '9.0.0-next.8'
|
|
645
631
|
}).withConfig({
|
|
646
632
|
displayName: "StyledItemContent",
|
|
647
633
|
componentId: "sc-1opglsb-0"
|
|
@@ -653,7 +639,7 @@ StyledItemContent.defaultProps = {
|
|
|
653
639
|
const COMPONENT_ID$5 = 'dropdowns.menu.item_group';
|
|
654
640
|
const StyledItemGroup = styled__default.default(StyledOptGroup).attrs({
|
|
655
641
|
'data-garden-id': COMPONENT_ID$5,
|
|
656
|
-
'data-garden-version': '9.0.0-next.
|
|
642
|
+
'data-garden-version': '9.0.0-next.8'
|
|
657
643
|
}).withConfig({
|
|
658
644
|
displayName: "StyledItemGroup",
|
|
659
645
|
componentId: "sc-1umk3cg-0"
|
|
@@ -665,7 +651,7 @@ StyledItemGroup.defaultProps = {
|
|
|
665
651
|
const COMPONENT_ID$4 = 'dropdowns.menu.item.icon';
|
|
666
652
|
const StyledItemIcon = styled__default.default(StyledOptionIcon).attrs({
|
|
667
653
|
'data-garden-id': COMPONENT_ID$4,
|
|
668
|
-
'data-garden-version': '9.0.0-next.
|
|
654
|
+
'data-garden-version': '9.0.0-next.8'
|
|
669
655
|
}).withConfig({
|
|
670
656
|
displayName: "StyledItemIcon",
|
|
671
657
|
componentId: "sc-w9orqb-0"
|
|
@@ -677,7 +663,7 @@ StyledItemIcon.defaultProps = {
|
|
|
677
663
|
const COMPONENT_ID$3 = 'dropdowns.menu.item.meta';
|
|
678
664
|
const StyledItemMeta = styled__default.default(StyledOptionMeta).attrs({
|
|
679
665
|
'data-garden-id': COMPONENT_ID$3,
|
|
680
|
-
'data-garden-version': '9.0.0-next.
|
|
666
|
+
'data-garden-version': '9.0.0-next.8'
|
|
681
667
|
}).withConfig({
|
|
682
668
|
displayName: "StyledItemMeta",
|
|
683
669
|
componentId: "sc-1unw3x1-0"
|
|
@@ -689,7 +675,7 @@ StyledItemMeta.defaultProps = {
|
|
|
689
675
|
const COMPONENT_ID$2 = 'dropdowns.menu.item.type_icon';
|
|
690
676
|
const StyledItemTypeIcon = styled__default.default(StyledOptionTypeIcon).attrs({
|
|
691
677
|
'data-garden-id': COMPONENT_ID$2,
|
|
692
|
-
'data-garden-version': '9.0.0-next.
|
|
678
|
+
'data-garden-version': '9.0.0-next.8'
|
|
693
679
|
}).withConfig({
|
|
694
680
|
displayName: "StyledItemTypeIcon",
|
|
695
681
|
componentId: "sc-1pll3nu-0"
|
|
@@ -701,7 +687,7 @@ StyledItemTypeIcon.defaultProps = {
|
|
|
701
687
|
const COMPONENT_ID$1 = 'dropdowns.menu.button';
|
|
702
688
|
const StyledButton = styled__default.default(reactButtons.Button).attrs({
|
|
703
689
|
'data-garden-id': COMPONENT_ID$1,
|
|
704
|
-
'data-garden-version': '9.0.0-next.
|
|
690
|
+
'data-garden-version': '9.0.0-next.8'
|
|
705
691
|
}).withConfig({
|
|
706
692
|
displayName: "StyledButton",
|
|
707
693
|
componentId: "sc-5hs2jg-0"
|
|
@@ -713,7 +699,7 @@ StyledButton.defaultProps = {
|
|
|
713
699
|
const COMPONENT_ID = 'dropdowns.menu.separator';
|
|
714
700
|
const StyledSeparator = styled__default.default(StyledListboxSeparator).attrs({
|
|
715
701
|
'data-garden-id': COMPONENT_ID,
|
|
716
|
-
'data-garden-version': '9.0.0-next.
|
|
702
|
+
'data-garden-version': '9.0.0-next.8'
|
|
717
703
|
}).withConfig({
|
|
718
704
|
displayName: "StyledSeparator",
|
|
719
705
|
componentId: "sc-8kqwen-0"
|
|
@@ -807,7 +793,7 @@ const Listbox = React.forwardRef((_ref, ref) => {
|
|
|
807
793
|
},
|
|
808
794
|
zIndex: zIndex,
|
|
809
795
|
ref: floatingRef
|
|
810
|
-
}, React__namespace.default.createElement(StyledListbox,
|
|
796
|
+
}, React__namespace.default.createElement(StyledListbox, Object.assign({
|
|
811
797
|
isCompact: isCompact,
|
|
812
798
|
maxHeight: maxHeight,
|
|
813
799
|
minHeight: minHeight,
|
|
@@ -830,34 +816,6 @@ Listbox.propTypes = {
|
|
|
830
816
|
zIndex: PropTypes__default.default.number
|
|
831
817
|
};
|
|
832
818
|
|
|
833
|
-
const toString = option => typeof option.value === 'string' ? option.value : JSON.stringify(option.value);
|
|
834
|
-
const toOption = props => {
|
|
835
|
-
return {
|
|
836
|
-
value: props.value,
|
|
837
|
-
label: props.label,
|
|
838
|
-
hidden: props.isHidden,
|
|
839
|
-
disabled: props.isDisabled,
|
|
840
|
-
selected: props.isSelected
|
|
841
|
-
};
|
|
842
|
-
};
|
|
843
|
-
const toOptions = (children, optionTagProps) => React.Children.toArray(children).reduce((options, option) => {
|
|
844
|
-
const retVal = options;
|
|
845
|
-
if ( React.isValidElement(option)) {
|
|
846
|
-
if ('value' in option.props) {
|
|
847
|
-
retVal.push(toOption(option.props));
|
|
848
|
-
optionTagProps[toString(option.props)] = option.props.tagProps;
|
|
849
|
-
} else {
|
|
850
|
-
const props = option.props;
|
|
851
|
-
const groupOptions = toOptions(props.children, optionTagProps);
|
|
852
|
-
retVal.push({
|
|
853
|
-
label: props.legend,
|
|
854
|
-
options: groupOptions
|
|
855
|
-
});
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
return retVal;
|
|
859
|
-
}, []);
|
|
860
|
-
|
|
861
819
|
const TagAvatarComponent = reactTags.Tag.Avatar;
|
|
862
820
|
TagAvatarComponent.displayName = 'Tag.Avatar';
|
|
863
821
|
const TagAvatar = TagAvatarComponent;
|
|
@@ -875,7 +833,7 @@ const TagComponent = React.forwardRef((_ref, ref) => {
|
|
|
875
833
|
isCompact,
|
|
876
834
|
removeSelection
|
|
877
835
|
} = useComboboxContext();
|
|
878
|
-
const text = option.label ||
|
|
836
|
+
const text = option.label || option.value;
|
|
879
837
|
const ariaLabel = reactTheming.useText(
|
|
880
838
|
Tag, props, 'aria-label', `${text}, press delete or backspace to remove`, !option.disabled);
|
|
881
839
|
const tagProps = getTagProps({
|
|
@@ -885,7 +843,7 @@ const TagComponent = React.forwardRef((_ref, ref) => {
|
|
|
885
843
|
const theme = React.useContext(styled.ThemeContext) || reactTheming.DEFAULT_THEME;
|
|
886
844
|
const doc = reactTheming.useDocument(theme);
|
|
887
845
|
const handleClick = () => removeSelection(option.value);
|
|
888
|
-
return React__namespace.default.createElement(StyledTag,
|
|
846
|
+
return React__namespace.default.createElement(StyledTag, Object.assign({
|
|
889
847
|
"aria-disabled": option.disabled,
|
|
890
848
|
tabIndex: option.disabled ? undefined : 0
|
|
891
849
|
}, tagProps, props, {
|
|
@@ -924,21 +882,47 @@ const TagGroup = _ref => {
|
|
|
924
882
|
selection
|
|
925
883
|
} = _ref;
|
|
926
884
|
return React__namespace.default.createElement(React__namespace.default.Fragment, null, selection.map((option, index) => {
|
|
927
|
-
const key = toString(option);
|
|
928
885
|
const disabled = isDisabled || option.disabled;
|
|
929
|
-
return React__namespace.default.createElement(Tag,
|
|
930
|
-
key:
|
|
886
|
+
return React__namespace.default.createElement(Tag, Object.assign({
|
|
887
|
+
key: option.value,
|
|
931
888
|
hidden: !isExpanded && index >= maxTags,
|
|
932
889
|
option: {
|
|
933
890
|
...option,
|
|
934
891
|
disabled
|
|
935
892
|
},
|
|
936
893
|
tooltipZIndex: listboxZIndex ? listboxZIndex + 1 : undefined
|
|
937
|
-
}, optionTagProps[
|
|
894
|
+
}, optionTagProps[option.value]));
|
|
938
895
|
}), children);
|
|
939
896
|
};
|
|
940
897
|
TagGroup.displayName = 'TagGroup';
|
|
941
898
|
|
|
899
|
+
const toOption = props => {
|
|
900
|
+
return {
|
|
901
|
+
value: props.value,
|
|
902
|
+
label: props.label,
|
|
903
|
+
hidden: props.isHidden,
|
|
904
|
+
disabled: props.isDisabled,
|
|
905
|
+
selected: props.isSelected
|
|
906
|
+
};
|
|
907
|
+
};
|
|
908
|
+
const toOptions = (children, optionTagProps) => React.Children.toArray(children).reduce((options, option) => {
|
|
909
|
+
const retVal = options;
|
|
910
|
+
if ( React.isValidElement(option)) {
|
|
911
|
+
if ('value' in option.props) {
|
|
912
|
+
retVal.push(toOption(option.props));
|
|
913
|
+
optionTagProps[option.props.value] = option.props.tagProps;
|
|
914
|
+
} else {
|
|
915
|
+
const props = option.props;
|
|
916
|
+
const groupOptions = toOptions(props.children, optionTagProps);
|
|
917
|
+
retVal.push({
|
|
918
|
+
label: props.legend,
|
|
919
|
+
options: groupOptions
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
return retVal;
|
|
924
|
+
}, []);
|
|
925
|
+
|
|
942
926
|
const MAX_TAGS = 4;
|
|
943
927
|
const Combobox = React.forwardRef((_ref, ref) => {
|
|
944
928
|
let {
|
|
@@ -1128,7 +1112,7 @@ const Combobox = React.forwardRef((_ref, ref) => {
|
|
|
1128
1112
|
}, [getMessageProps, messageProps, setMessageProps]);
|
|
1129
1113
|
return React__namespace.default.createElement(ComboboxContext.Provider, {
|
|
1130
1114
|
value: contextValue
|
|
1131
|
-
}, React__namespace.default.createElement(StyledCombobox,
|
|
1115
|
+
}, React__namespace.default.createElement(StyledCombobox, Object.assign({
|
|
1132
1116
|
isCompact: isCompact,
|
|
1133
1117
|
tabIndex: -1
|
|
1134
1118
|
}, props, {
|
|
@@ -1168,7 +1152,7 @@ const Combobox = React.forwardRef((_ref, ref) => {
|
|
|
1168
1152
|
isEnd: true,
|
|
1169
1153
|
isLabelHovered: isLabelHovered,
|
|
1170
1154
|
isRotated: hasChevron && isExpanded
|
|
1171
|
-
}, hasChevron ? React__namespace.default.createElement(SvgChevronDownStroke, null) : endIcon))), React__namespace.default.createElement(Listbox,
|
|
1155
|
+
}, hasChevron ? React__namespace.default.createElement(SvgChevronDownStroke, null) : endIcon))), React__namespace.default.createElement(Listbox, Object.assign({
|
|
1172
1156
|
appendToNode: listboxAppendToNode,
|
|
1173
1157
|
isCompact: isCompact,
|
|
1174
1158
|
isExpanded: isExpanded,
|
|
@@ -1226,7 +1210,7 @@ const Hint = React.forwardRef((props, ref) => {
|
|
|
1226
1210
|
setHasHint(true);
|
|
1227
1211
|
return () => setHasHint(false);
|
|
1228
1212
|
}, [setHasHint]);
|
|
1229
|
-
return React__namespace.default.createElement(StyledHint,
|
|
1213
|
+
return React__namespace.default.createElement(StyledHint, Object.assign({}, hintProps, props, {
|
|
1230
1214
|
ref: ref
|
|
1231
1215
|
}));
|
|
1232
1216
|
});
|
|
@@ -1242,7 +1226,7 @@ const Label = React.forwardRef((_ref, ref) => {
|
|
|
1242
1226
|
const {
|
|
1243
1227
|
labelProps
|
|
1244
1228
|
} = useFieldContext();
|
|
1245
|
-
return React__namespace.default.createElement(StyledLabel,
|
|
1229
|
+
return React__namespace.default.createElement(StyledLabel, Object.assign({}, labelProps, {
|
|
1246
1230
|
onClick: containerUtilities.composeEventHandlers(onClick, labelProps?.onClick),
|
|
1247
1231
|
onMouseEnter: containerUtilities.composeEventHandlers(onMouseEnter, labelProps?.onMouseEnter),
|
|
1248
1232
|
onMouseLeave: containerUtilities.composeEventHandlers(onMouseLeave, labelProps?.onMouseLeave)
|
|
@@ -1265,7 +1249,7 @@ const Message = React.forwardRef((props, ref) => {
|
|
|
1265
1249
|
setHasMessage(true);
|
|
1266
1250
|
return () => setHasMessage(false);
|
|
1267
1251
|
}, [setHasMessage]);
|
|
1268
|
-
return React__namespace.default.createElement(StyledMessage,
|
|
1252
|
+
return React__namespace.default.createElement(StyledMessage, Object.assign({}, messageProps, props, {
|
|
1269
1253
|
ref: ref
|
|
1270
1254
|
}));
|
|
1271
1255
|
});
|
|
@@ -1295,7 +1279,7 @@ const FieldComponent = React.forwardRef((props, ref) => {
|
|
|
1295
1279
|
}), [labelProps, setLabelProps, hasHint, setHasHint, hintProps, setHintProps, hasMessage, setHasMessage, messageProps, setMessageProps]);
|
|
1296
1280
|
return React__namespace.default.createElement(FieldContext.Provider, {
|
|
1297
1281
|
value: contextValue
|
|
1298
|
-
}, React__namespace.default.createElement(StyledField,
|
|
1282
|
+
}, React__namespace.default.createElement(StyledField, Object.assign({}, props, {
|
|
1299
1283
|
ref: ref
|
|
1300
1284
|
})));
|
|
1301
1285
|
});
|
|
@@ -1389,7 +1373,7 @@ const OptionMetaComponent = React.forwardRef((props, ref) => {
|
|
|
1389
1373
|
const {
|
|
1390
1374
|
isDisabled
|
|
1391
1375
|
} = useOptionContext();
|
|
1392
|
-
return React__namespace.default.createElement(StyledOptionMeta,
|
|
1376
|
+
return React__namespace.default.createElement(StyledOptionMeta, Object.assign({
|
|
1393
1377
|
isDisabled: isDisabled
|
|
1394
1378
|
}, props, {
|
|
1395
1379
|
ref: ref
|
|
@@ -1456,16 +1440,14 @@ const OptionComponent = React.forwardRef((_ref, ref) => {
|
|
|
1456
1440
|
});
|
|
1457
1441
|
return React__namespace.default.createElement(OptionContext.Provider, {
|
|
1458
1442
|
value: contextValue
|
|
1459
|
-
}, React__namespace.default.createElement(StyledOption,
|
|
1443
|
+
}, React__namespace.default.createElement(StyledOption, Object.assign({
|
|
1460
1444
|
isActive: isActive,
|
|
1461
1445
|
isCompact: isCompact,
|
|
1462
1446
|
$type: type
|
|
1463
1447
|
}, props, optionProps), React__namespace.default.createElement(StyledOptionTypeIcon, {
|
|
1464
1448
|
isCompact: isCompact,
|
|
1465
1449
|
type: type
|
|
1466
|
-
}, renderActionIcon(type)), icon && React__namespace.default.createElement(StyledOptionIcon, null, icon), React__namespace.default.createElement(StyledOptionContent, null, children || label ||
|
|
1467
|
-
value
|
|
1468
|
-
}))));
|
|
1450
|
+
}, renderActionIcon(type)), icon && React__namespace.default.createElement(StyledOptionIcon, null, icon), React__namespace.default.createElement(StyledOptionContent, null, children || label || value)));
|
|
1469
1451
|
});
|
|
1470
1452
|
OptionComponent.displayName = 'Option';
|
|
1471
1453
|
OptionComponent.propTypes = {
|
|
@@ -1476,7 +1458,7 @@ OptionComponent.propTypes = {
|
|
|
1476
1458
|
label: PropTypes__default.default.string,
|
|
1477
1459
|
tagProps: PropTypes__default.default.object,
|
|
1478
1460
|
type: PropTypes__default.default.oneOf(OPTION_TYPE),
|
|
1479
|
-
value: PropTypes__default.default.
|
|
1461
|
+
value: PropTypes__default.default.string.isRequired
|
|
1480
1462
|
};
|
|
1481
1463
|
const Option = OptionComponent;
|
|
1482
1464
|
Option.Meta = OptionMeta;
|
|
@@ -1502,7 +1484,7 @@ const OptGroup = React.forwardRef((_ref, ref) => {
|
|
|
1502
1484
|
const optGroupProps = getOptGroupProps({
|
|
1503
1485
|
'aria-label': groupAriaLabel || legend
|
|
1504
1486
|
});
|
|
1505
|
-
return React__namespace.default.createElement(StyledOption,
|
|
1487
|
+
return React__namespace.default.createElement(StyledOption, Object.assign({
|
|
1506
1488
|
isCompact: isCompact,
|
|
1507
1489
|
$type: "group",
|
|
1508
1490
|
onMouseDown: containerUtilities.composeEventHandlers(onMouseDown, handleMouseDown),
|
|
@@ -1516,7 +1498,7 @@ const OptGroup = React.forwardRef((_ref, ref) => {
|
|
|
1516
1498
|
}, icon && React__namespace.default.createElement(StyledOptionTypeIcon, {
|
|
1517
1499
|
isCompact: isCompact,
|
|
1518
1500
|
type: "header"
|
|
1519
|
-
}, icon), content || legend), React__namespace.default.createElement(StyledOptGroup,
|
|
1501
|
+
}, icon), content || legend), React__namespace.default.createElement(StyledOptGroup, Object.assign({
|
|
1520
1502
|
isCompact: isCompact
|
|
1521
1503
|
}, optGroupProps), React__namespace.default.createElement(StyledListboxSeparator, {
|
|
1522
1504
|
role: "none"
|
|
@@ -1675,7 +1657,7 @@ const MenuList = React.forwardRef((_ref, ref) => {
|
|
|
1675
1657
|
transform
|
|
1676
1658
|
},
|
|
1677
1659
|
ref: floatingRef
|
|
1678
|
-
}, React__namespace.default.createElement(StyledMenu,
|
|
1660
|
+
}, React__namespace.default.createElement(StyledMenu, Object.assign({
|
|
1679
1661
|
"data-garden-animate-arrow": isVisible,
|
|
1680
1662
|
arrowPosition: hasArrow ? reactTheming.getArrowPosition(theme, placement) : undefined,
|
|
1681
1663
|
isCompact: isCompact,
|
|
@@ -1779,7 +1761,7 @@ const Menu = React.forwardRef((_ref, ref) => {
|
|
|
1779
1761
|
}), [isCompact, focusedValue, getItemProps, getItemGroupProps, getSeparatorProps]);
|
|
1780
1762
|
return React__namespace.default.createElement(MenuContext.Provider, {
|
|
1781
1763
|
value: contextValue
|
|
1782
|
-
}, trigger, React__namespace.default.createElement(MenuList,
|
|
1764
|
+
}, trigger, React__namespace.default.createElement(MenuList, Object.assign({}, props, getMenuProps({
|
|
1783
1765
|
onMouseLeave
|
|
1784
1766
|
}), {
|
|
1785
1767
|
ref: reactMergeRefs.mergeRefs([menuRef, ref]),
|
|
@@ -1843,7 +1825,7 @@ const ItemGroup = React.forwardRef((_ref, ref) => {
|
|
|
1843
1825
|
}), [type]);
|
|
1844
1826
|
return React__namespace.default.createElement(ItemGroupContext.Provider, {
|
|
1845
1827
|
value: contextValue
|
|
1846
|
-
}, React__namespace.default.createElement(StyledItem,
|
|
1828
|
+
}, React__namespace.default.createElement(StyledItem, Object.assign({
|
|
1847
1829
|
isCompact: isCompact,
|
|
1848
1830
|
$type: "group"
|
|
1849
1831
|
}, props, {
|
|
@@ -1855,7 +1837,7 @@ const ItemGroup = React.forwardRef((_ref, ref) => {
|
|
|
1855
1837
|
}, icon && React__namespace.default.createElement(StyledItemTypeIcon, {
|
|
1856
1838
|
isCompact: isCompact,
|
|
1857
1839
|
type: "header"
|
|
1858
|
-
}, icon), content || legend), React__namespace.default.createElement(StyledItemGroup,
|
|
1840
|
+
}, icon), content || legend), React__namespace.default.createElement(StyledItemGroup, Object.assign({
|
|
1859
1841
|
isCompact: isCompact
|
|
1860
1842
|
}, groupProps), React__namespace.default.createElement(StyledSeparator, {
|
|
1861
1843
|
role: "none"
|
|
@@ -1882,7 +1864,7 @@ const ItemMetaComponent = React.forwardRef((props, ref) => {
|
|
|
1882
1864
|
const {
|
|
1883
1865
|
isDisabled
|
|
1884
1866
|
} = useItemContext();
|
|
1885
|
-
return React__namespace.default.createElement(StyledItemMeta,
|
|
1867
|
+
return React__namespace.default.createElement(StyledItemMeta, Object.assign({
|
|
1886
1868
|
isDisabled: isDisabled
|
|
1887
1869
|
}, props, {
|
|
1888
1870
|
ref: ref
|
|
@@ -1954,7 +1936,7 @@ const ItemComponent = React.forwardRef((_ref, ref) => {
|
|
|
1954
1936
|
}), [isDisabled]);
|
|
1955
1937
|
return React__namespace.default.createElement(ItemContext.Provider, {
|
|
1956
1938
|
value: contextValue
|
|
1957
|
-
}, React__namespace.default.createElement(StyledItem,
|
|
1939
|
+
}, React__namespace.default.createElement(StyledItem, Object.assign({
|
|
1958
1940
|
$type: type,
|
|
1959
1941
|
isCompact: isCompact,
|
|
1960
1942
|
isActive: isActive
|
|
@@ -1988,7 +1970,7 @@ const Separator = React.forwardRef(
|
|
|
1988
1970
|
getSeparatorProps
|
|
1989
1971
|
} = useMenuContext();
|
|
1990
1972
|
const separatorProps = getSeparatorProps();
|
|
1991
|
-
return React__namespace.default.createElement(StyledSeparator,
|
|
1973
|
+
return React__namespace.default.createElement(StyledSeparator, Object.assign({}, props, separatorProps, {
|
|
1992
1974
|
ref: ref
|
|
1993
1975
|
}));
|
|
1994
1976
|
});
|
|
@@ -7,14 +7,6 @@
|
|
|
7
7
|
import { ReactNode } from 'react';
|
|
8
8
|
import { IOption } from '@zendeskgarden/container-combobox';
|
|
9
9
|
import { IOptionProps } from '../../types';
|
|
10
|
-
/**
|
|
11
|
-
* Convert an option object to a string.
|
|
12
|
-
*
|
|
13
|
-
* @param option An option of type `IOption`.
|
|
14
|
-
*
|
|
15
|
-
* @returns A string based on `option.value`.
|
|
16
|
-
*/
|
|
17
|
-
export declare const toString: (option: IOption) => string;
|
|
18
10
|
/**
|
|
19
11
|
* Convert `Option` props to a valid object for `useCombobox`.
|
|
20
12
|
*
|
|
@@ -146,7 +146,7 @@ export interface IOptionProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'val
|
|
|
146
146
|
/** Determines the option type */
|
|
147
147
|
type?: OptionType;
|
|
148
148
|
/** Sets the unique value that is returned upon selection */
|
|
149
|
-
value: string
|
|
149
|
+
value: string;
|
|
150
150
|
}
|
|
151
151
|
export interface IOptGroupProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'content'> {
|
|
152
152
|
/** Renders content for the option group (defaults to `label` text) */
|