@zendeskgarden/react-dropdowns 9.15.8 → 9.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/elements/combobox/Combobox.js +18 -6
- package/dist/esm/elements/combobox/Listbox.js +13 -16
- 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 +1 -1
- package/dist/esm/views/combobox/StyledInputGroup.js +1 -1
- package/dist/esm/views/combobox/StyledInputIcon.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/esm/views/combobox/StyledOptionContent.js +1 -1
- package/dist/esm/views/combobox/StyledOptionIcon.js +1 -1
- package/dist/esm/views/combobox/StyledOptionMeta.js +1 -1
- package/dist/esm/views/combobox/StyledOptionSelectionIcon.js +1 -1
- package/dist/esm/views/combobox/StyledOptionTypeIcon.js +1 -1
- package/dist/esm/views/combobox/StyledTag.js +1 -1
- package/dist/esm/views/combobox/StyledTagsButton.js +1 -1
- package/dist/esm/views/combobox/StyledTrigger.js +1 -1
- package/dist/esm/views/combobox/StyledValue.js +1 -1
- package/dist/esm/views/menu/StyledFloatingMenu.js +1 -1
- package/dist/esm/views/menu/StyledItem.js +1 -1
- package/dist/esm/views/menu/StyledItemAnchor.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 +1 -1
- package/dist/esm/views/menu/StyledSeparator.js +1 -1
- package/dist/index.cjs.js +64 -55
- package/package.json +7 -7
|
@@ -111,6 +111,7 @@ const Combobox = forwardRef(({
|
|
|
111
111
|
const triggerRef = useRef(null);
|
|
112
112
|
const inputRef = useRef(null);
|
|
113
113
|
const listboxRef = useRef(null);
|
|
114
|
+
const blurTimeoutRef = useRef();
|
|
114
115
|
const theme = useContext(ThemeContext) || DEFAULT_THEME;
|
|
115
116
|
const environment = useWindow(theme);
|
|
116
117
|
const {
|
|
@@ -167,6 +168,7 @@ const Combobox = forwardRef(({
|
|
|
167
168
|
const triggerProps = getTriggerProps({
|
|
168
169
|
onFocus: () => {
|
|
169
170
|
if (!isDisabled) {
|
|
171
|
+
clearTimeout(blurTimeoutRef.current);
|
|
170
172
|
if (isEditable) {
|
|
171
173
|
setIsInputHidden(false);
|
|
172
174
|
}
|
|
@@ -177,12 +179,19 @@ const Combobox = forwardRef(({
|
|
|
177
179
|
},
|
|
178
180
|
onBlur: event => {
|
|
179
181
|
if (event.relatedTarget === null || !triggerRef.current?.contains(event.relatedTarget)) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
clearTimeout(blurTimeoutRef.current);
|
|
183
|
+
blurTimeoutRef.current = setTimeout(() => {
|
|
184
|
+
const activeElement = triggerRef.current?.ownerDocument.activeElement ?? null;
|
|
185
|
+
const isFocusContained = !!triggerRef.current?.contains(activeElement) || !!listboxRef.current?.contains(activeElement);
|
|
186
|
+
if (!isFocusContained) {
|
|
187
|
+
if (isEditable) {
|
|
188
|
+
setIsInputHidden(true);
|
|
189
|
+
}
|
|
190
|
+
if (isMultiselectable) {
|
|
191
|
+
setIsTagGroupExpanded(false);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}, 0);
|
|
186
195
|
}
|
|
187
196
|
}
|
|
188
197
|
});
|
|
@@ -197,6 +206,9 @@ const Combobox = forwardRef(({
|
|
|
197
206
|
const listboxProps = getListboxProps({
|
|
198
207
|
'aria-label': _listboxAriaLabel
|
|
199
208
|
});
|
|
209
|
+
useEffect(() => {
|
|
210
|
+
return () => clearTimeout(blurTimeoutRef.current);
|
|
211
|
+
}, []);
|
|
200
212
|
useEffect(() => {
|
|
201
213
|
if (!labelProps) {
|
|
202
214
|
const _labelProps = getLabelProps({
|
|
@@ -60,7 +60,7 @@ const Listbox = forwardRef(({
|
|
|
60
60
|
const floatingRef = useRef(null);
|
|
61
61
|
const isMountedRef = useRef(true);
|
|
62
62
|
const [isVisible, setIsVisible] = useState(false);
|
|
63
|
-
const [
|
|
63
|
+
const [availableHeight, setAvailableHeight] = useState();
|
|
64
64
|
const [width, setWidth] = useState();
|
|
65
65
|
const theme = useContext(ThemeContext) || DEFAULT_THEME;
|
|
66
66
|
const {
|
|
@@ -79,12 +79,14 @@ const Listbox = forwardRef(({
|
|
|
79
79
|
middleware: [offset(theme.space.base), flip(), size({
|
|
80
80
|
apply: ({
|
|
81
81
|
rects,
|
|
82
|
-
availableHeight
|
|
82
|
+
availableHeight: nextAvailableHeight
|
|
83
83
|
}) => {
|
|
84
84
|
if (rects.reference.width > 0 && isMountedRef.current) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
const nextWidth = Math.round(rects.reference.width);
|
|
86
|
+
setWidth(previous => previous === nextWidth ? previous : nextWidth);
|
|
87
|
+
if (!(minHeight === null || minHeight === 'fit-content')) {
|
|
88
|
+
const nextMaxHeight = Math.max(0, Math.floor(nextAvailableHeight));
|
|
89
|
+
setAvailableHeight(previous => previous === nextMaxHeight ? previous : nextMaxHeight);
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
}
|
|
@@ -114,19 +116,16 @@ const Listbox = forwardRef(({
|
|
|
114
116
|
timeout = setTimeout(() => {
|
|
115
117
|
if (isMountedRef.current) {
|
|
116
118
|
setIsVisible(false);
|
|
117
|
-
|
|
119
|
+
setAvailableHeight(undefined);
|
|
118
120
|
}
|
|
119
121
|
}, 200 );
|
|
120
122
|
}
|
|
121
123
|
return () => clearTimeout(timeout);
|
|
122
124
|
}, [isExpanded]);
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
}, [
|
|
129
|
-
children, update]);
|
|
125
|
+
const listboxStyle = {};
|
|
126
|
+
if (availableHeight !== undefined) {
|
|
127
|
+
listboxStyle.maxHeight = maxHeight ? `min(${maxHeight}, ${availableHeight}px)` : availableHeight;
|
|
128
|
+
}
|
|
130
129
|
const Node = React__default.createElement(StyledFloatingListbox, {
|
|
131
130
|
"data-garden-animate": isVisible ? 'true' : 'false',
|
|
132
131
|
$isHidden: !isExpanded,
|
|
@@ -144,9 +143,7 @@ const Listbox = forwardRef(({
|
|
|
144
143
|
"aria-hidden":
|
|
145
144
|
!isExpanded,
|
|
146
145
|
onMouseDown: composeEventHandlers(onMouseDown, handleMouseDown),
|
|
147
|
-
style:
|
|
148
|
-
height
|
|
149
|
-
}
|
|
146
|
+
style: listboxStyle
|
|
150
147
|
}, props, {
|
|
151
148
|
ref: ref
|
|
152
149
|
}), !!isVisible && children));
|
|
@@ -18,7 +18,7 @@ const sizeStyles$b = props => {
|
|
|
18
18
|
};
|
|
19
19
|
const StyledCombobox = styled.div.attrs({
|
|
20
20
|
'data-garden-id': COMPONENT_ID$t,
|
|
21
|
-
'data-garden-version': '9.
|
|
21
|
+
'data-garden-version': '9.16.0'
|
|
22
22
|
}).withConfig({
|
|
23
23
|
displayName: "StyledCombobox",
|
|
24
24
|
componentId: "sc-13eybg8-0"
|
|
@@ -10,7 +10,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID$s = 'dropdowns.combobox.container';
|
|
11
11
|
const StyledContainer = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID$s,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.16.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledContainer",
|
|
16
16
|
componentId: "sc-14i9jid-0"
|
|
@@ -10,7 +10,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID$r = 'dropdowns.combobox.field';
|
|
11
11
|
const StyledField = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID$r,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.16.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledField",
|
|
16
16
|
componentId: "sc-zc57xl-0"
|
|
@@ -10,7 +10,7 @@ import { menuStyles, componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID$q = 'dropdowns.combobox.floating';
|
|
11
11
|
const StyledFloatingListbox = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID$q,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.16.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledFloatingListbox",
|
|
16
16
|
componentId: "sc-1cp6spf-0"
|
|
@@ -11,7 +11,7 @@ import { Field } from '@zendeskgarden/react-forms';
|
|
|
11
11
|
const COMPONENT_ID$v = 'dropdowns.combobox.hint';
|
|
12
12
|
const StyledHint = styled(Field.Hint).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID$v,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.16.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledHint",
|
|
17
17
|
componentId: "sc-106qvqx-0"
|
|
@@ -34,7 +34,7 @@ const sizeStyles$a = props => {
|
|
|
34
34
|
};
|
|
35
35
|
const StyledInput = styled.input.attrs({
|
|
36
36
|
'data-garden-id': COMPONENT_ID$p,
|
|
37
|
-
'data-garden-version': '9.
|
|
37
|
+
'data-garden-version': '9.16.0'
|
|
38
38
|
}).withConfig({
|
|
39
39
|
displayName: "StyledInput",
|
|
40
40
|
componentId: "sc-1lkqdg-0"
|
|
@@ -14,7 +14,7 @@ const sizeStyles$9 = props => {
|
|
|
14
14
|
};
|
|
15
15
|
const StyledInputGroup = styled.div.attrs({
|
|
16
16
|
'data-garden-id': COMPONENT_ID$o,
|
|
17
|
-
'data-garden-version': '9.
|
|
17
|
+
'data-garden-version': '9.16.0'
|
|
18
18
|
}).withConfig({
|
|
19
19
|
displayName: "StyledInputGroup",
|
|
20
20
|
componentId: "sc-yx3q7u-0"
|
|
@@ -49,7 +49,7 @@ const sizeStyles$7 = props => {
|
|
|
49
49
|
};
|
|
50
50
|
const StyledInputIcon = styled(StyledBaseIcon).attrs({
|
|
51
51
|
'data-garden-id': COMPONENT_ID$m,
|
|
52
|
-
'data-garden-version': '9.
|
|
52
|
+
'data-garden-version': '9.16.0'
|
|
53
53
|
}).withConfig({
|
|
54
54
|
displayName: "StyledInputIcon",
|
|
55
55
|
componentId: "sc-gqbs1s-0"
|
|
@@ -11,7 +11,7 @@ import { Field } from '@zendeskgarden/react-forms';
|
|
|
11
11
|
const COMPONENT_ID$w = 'dropdowns.combobox.label';
|
|
12
12
|
const StyledLabel = styled(Field.Label).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID$w,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.16.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledLabel",
|
|
17
17
|
componentId: "sc-az6now-0"
|
|
@@ -18,7 +18,7 @@ const sizeStyles$4 = props => {
|
|
|
18
18
|
};
|
|
19
19
|
const StyledListbox = styled.ul.attrs({
|
|
20
20
|
'data-garden-id': COMPONENT_ID$h,
|
|
21
|
-
'data-garden-version': '9.
|
|
21
|
+
'data-garden-version': '9.16.0'
|
|
22
22
|
}).withConfig({
|
|
23
23
|
displayName: "StyledListbox",
|
|
24
24
|
componentId: "sc-1k13ba7-0"
|
|
@@ -24,7 +24,7 @@ const sizeStyles$5 = props => {
|
|
|
24
24
|
};
|
|
25
25
|
const StyledListboxSeparator = styled.li.attrs({
|
|
26
26
|
'data-garden-id': COMPONENT_ID$i,
|
|
27
|
-
'data-garden-version': '9.
|
|
27
|
+
'data-garden-version': '9.16.0'
|
|
28
28
|
}).withConfig({
|
|
29
29
|
displayName: "StyledListboxSeparator",
|
|
30
30
|
componentId: "sc-1p6toh2-0"
|
|
@@ -11,7 +11,7 @@ import { Field } from '@zendeskgarden/react-forms';
|
|
|
11
11
|
const COMPONENT_ID$u = 'dropdowns.combobox.message';
|
|
12
12
|
const StyledMessage = styled(Field.Message).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID$u,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.16.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledMessage",
|
|
17
17
|
componentId: "sc-jux8m5-0"
|
|
@@ -10,7 +10,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID$j = 'dropdowns.combobox.optgroup';
|
|
11
11
|
const StyledOptGroup = styled.ul.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID$j,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.16.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledOptGroup",
|
|
16
16
|
componentId: "sc-1kavqsx-0"
|
|
@@ -56,7 +56,7 @@ const sizeStyles$6 = props => {
|
|
|
56
56
|
};
|
|
57
57
|
const StyledOption = styled.li.attrs({
|
|
58
58
|
'data-garden-id': COMPONENT_ID$l,
|
|
59
|
-
'data-garden-version': '9.
|
|
59
|
+
'data-garden-version': '9.16.0'
|
|
60
60
|
}).withConfig({
|
|
61
61
|
displayName: "StyledOption",
|
|
62
62
|
componentId: "sc-jl4wn6-0"
|
|
@@ -10,7 +10,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID$k = 'dropdowns.combobox.option.content';
|
|
11
11
|
const StyledOptionContent = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID$k,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.16.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledOptionContent",
|
|
16
16
|
componentId: "sc-121ujpu-0"
|
|
@@ -38,7 +38,7 @@ const sizeStyles$3 = props => {
|
|
|
38
38
|
};
|
|
39
39
|
const StyledOptionIcon = styled(StyledBaseIcon).attrs({
|
|
40
40
|
'data-garden-id': COMPONENT_ID$g,
|
|
41
|
-
'data-garden-version': '9.
|
|
41
|
+
'data-garden-version': '9.16.0'
|
|
42
42
|
}).withConfig({
|
|
43
43
|
displayName: "StyledOptionIcon",
|
|
44
44
|
componentId: "sc-qsab3y-0"
|
|
@@ -26,7 +26,7 @@ const sizeStyles$2 = props => {
|
|
|
26
26
|
};
|
|
27
27
|
const StyledOptionMeta = styled.div.attrs({
|
|
28
28
|
'data-garden-id': COMPONENT_ID$f,
|
|
29
|
-
'data-garden-version': '9.
|
|
29
|
+
'data-garden-version': '9.16.0'
|
|
30
30
|
}).withConfig({
|
|
31
31
|
displayName: "StyledOptionMeta",
|
|
32
32
|
componentId: "sc-j6pu10-0"
|
|
@@ -34,7 +34,7 @@ const sizeStyles$1 = ({
|
|
|
34
34
|
};
|
|
35
35
|
const StyledOptionSelectionIcon = styled(StyledBaseIcon).attrs({
|
|
36
36
|
'data-garden-id': COMPONENT_ID$e,
|
|
37
|
-
'data-garden-version': '9.
|
|
37
|
+
'data-garden-version': '9.16.0'
|
|
38
38
|
}).withConfig({
|
|
39
39
|
displayName: "StyledOptionSelectionIcon",
|
|
40
40
|
componentId: "sc-12wj24m-0"
|
|
@@ -45,7 +45,7 @@ const sizeStyles = props => {
|
|
|
45
45
|
};
|
|
46
46
|
const StyledOptionTypeIcon = styled(StyledBaseIcon).attrs({
|
|
47
47
|
'data-garden-id': COMPONENT_ID$d,
|
|
48
|
-
'data-garden-version': '9.
|
|
48
|
+
'data-garden-version': '9.16.0'
|
|
49
49
|
}).withConfig({
|
|
50
50
|
displayName: "StyledOptionTypeIcon",
|
|
51
51
|
componentId: "sc-xpink2-0"
|
|
@@ -12,7 +12,7 @@ import { Tag } from '@zendeskgarden/react-tags';
|
|
|
12
12
|
const COMPONENT_ID$c = 'dropdowns.combobox.tag';
|
|
13
13
|
const StyledTag = styled(Tag).attrs({
|
|
14
14
|
'data-garden-id': COMPONENT_ID$c,
|
|
15
|
-
'data-garden-version': '9.
|
|
15
|
+
'data-garden-version': '9.16.0'
|
|
16
16
|
}).withConfig({
|
|
17
17
|
displayName: "StyledTag",
|
|
18
18
|
componentId: "sc-1alam0r-0"
|
|
@@ -21,7 +21,7 @@ const colorStyles = ({
|
|
|
21
21
|
const StyledTagsButton = styled(StyledValue).attrs({
|
|
22
22
|
as: 'button',
|
|
23
23
|
'data-garden-id': COMPONENT_ID$a,
|
|
24
|
-
'data-garden-version': '9.
|
|
24
|
+
'data-garden-version': '9.16.0'
|
|
25
25
|
}).withConfig({
|
|
26
26
|
displayName: "StyledTagsButton",
|
|
27
27
|
componentId: "sc-6q5w33-0"
|
|
@@ -112,7 +112,7 @@ const sizeStyles$8 = props => {
|
|
|
112
112
|
};
|
|
113
113
|
const StyledTrigger = styled.div.attrs({
|
|
114
114
|
'data-garden-id': COMPONENT_ID$n,
|
|
115
|
-
'data-garden-version': '9.
|
|
115
|
+
'data-garden-version': '9.16.0'
|
|
116
116
|
}).withConfig({
|
|
117
117
|
displayName: "StyledTrigger",
|
|
118
118
|
componentId: "sc-116nftk-0"
|
|
@@ -11,7 +11,7 @@ import { StyledFloatingListbox } from '../combobox/StyledFloatingListbox.js';
|
|
|
11
11
|
const COMPONENT_ID$8 = 'dropdowns.menu.floating';
|
|
12
12
|
const StyledFloatingMenu = styled(StyledFloatingListbox).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID$8,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.16.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledFloatingMenu",
|
|
17
17
|
componentId: "sc-1rc7ahb-0"
|
|
@@ -11,7 +11,7 @@ import { StyledOption } from '../combobox/StyledOption.js';
|
|
|
11
11
|
const COMPONENT_ID$7 = 'dropdowns.menu.item';
|
|
12
12
|
const StyledItem = styled(StyledOption).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID$7,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.16.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledItem",
|
|
17
17
|
componentId: "sc-1jp99dq-0"
|
|
@@ -12,7 +12,7 @@ import { StyledOption } from '../combobox/StyledOption.js';
|
|
|
12
12
|
const COMPONENT_ID$5 = 'dropdowns.menu.item_anchor';
|
|
13
13
|
const StyledItemAnchor = styled(StyledOption).attrs({
|
|
14
14
|
'data-garden-id': COMPONENT_ID$5,
|
|
15
|
-
'data-garden-version': '9.
|
|
15
|
+
'data-garden-version': '9.16.0',
|
|
16
16
|
as: 'a'
|
|
17
17
|
}).withConfig({
|
|
18
18
|
displayName: "StyledItemAnchor",
|
|
@@ -11,7 +11,7 @@ import { StyledOptionContent } from '../combobox/StyledOptionContent.js';
|
|
|
11
11
|
const COMPONENT_ID$4 = 'dropdowns.menu.item.content';
|
|
12
12
|
const StyledItemContent = styled(StyledOptionContent).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID$4,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.16.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledItemContent",
|
|
17
17
|
componentId: "sc-1opglsb-0"
|
|
@@ -11,7 +11,7 @@ import { StyledOptGroup } from '../combobox/StyledOptGroup.js';
|
|
|
11
11
|
const COMPONENT_ID$3 = 'dropdowns.menu.item_group';
|
|
12
12
|
const StyledItemGroup = styled(StyledOptGroup).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID$3,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.16.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledItemGroup",
|
|
17
17
|
componentId: "sc-1umk3cg-0"
|
|
@@ -11,7 +11,7 @@ import { StyledOptionIcon } from '../combobox/StyledOptionIcon.js';
|
|
|
11
11
|
const COMPONENT_ID$2 = 'dropdowns.menu.item.icon';
|
|
12
12
|
const StyledItemIcon = styled(StyledOptionIcon).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID$2,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.16.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledItemIcon",
|
|
17
17
|
componentId: "sc-w9orqb-0"
|
|
@@ -11,7 +11,7 @@ import { StyledOptionMeta } from '../combobox/StyledOptionMeta.js';
|
|
|
11
11
|
const COMPONENT_ID$1 = 'dropdowns.menu.item.meta';
|
|
12
12
|
const StyledItemMeta = styled(StyledOptionMeta).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID$1,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.16.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledItemMeta",
|
|
17
17
|
componentId: "sc-1unw3x1-0"
|
|
@@ -12,7 +12,7 @@ import { StyledItem } from './StyledItem.js';
|
|
|
12
12
|
const COMPONENT_ID$6 = 'dropdowns.menu.item.type_icon';
|
|
13
13
|
const StyledItemTypeIcon = styled(StyledOptionTypeIcon).attrs({
|
|
14
14
|
'data-garden-id': COMPONENT_ID$6,
|
|
15
|
-
'data-garden-version': '9.
|
|
15
|
+
'data-garden-version': '9.16.0'
|
|
16
16
|
}).withConfig({
|
|
17
17
|
displayName: "StyledItemTypeIcon",
|
|
18
18
|
componentId: "sc-1pll3nu-0"
|
|
@@ -11,7 +11,7 @@ import { StyledListbox } from '../combobox/StyledListbox.js';
|
|
|
11
11
|
const COMPONENT_ID$9 = 'dropdowns.menu';
|
|
12
12
|
const StyledMenu = styled(StyledListbox).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID$9,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.16.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledMenu",
|
|
17
17
|
componentId: "sc-f77ntu-0"
|
|
@@ -11,7 +11,7 @@ import { StyledListboxSeparator } from '../combobox/StyledListboxSeparator.js';
|
|
|
11
11
|
const COMPONENT_ID = 'dropdowns.menu.separator';
|
|
12
12
|
const StyledSeparator = styled(StyledListboxSeparator).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.16.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledSeparator",
|
|
17
17
|
componentId: "sc-8kqwen-0"
|
package/dist/index.cjs.js
CHANGED
|
@@ -83,7 +83,7 @@ const useFieldContext = () => {
|
|
|
83
83
|
const COMPONENT_ID$w = 'dropdowns.combobox.label';
|
|
84
84
|
const StyledLabel = styled__default.default(reactForms.Field.Label).attrs({
|
|
85
85
|
'data-garden-id': COMPONENT_ID$w,
|
|
86
|
-
'data-garden-version': '9.
|
|
86
|
+
'data-garden-version': '9.16.0'
|
|
87
87
|
}).withConfig({
|
|
88
88
|
displayName: "StyledLabel",
|
|
89
89
|
componentId: "sc-az6now-0"
|
|
@@ -92,7 +92,7 @@ const StyledLabel = styled__default.default(reactForms.Field.Label).attrs({
|
|
|
92
92
|
const COMPONENT_ID$v = 'dropdowns.combobox.hint';
|
|
93
93
|
const StyledHint = styled__default.default(reactForms.Field.Hint).attrs({
|
|
94
94
|
'data-garden-id': COMPONENT_ID$v,
|
|
95
|
-
'data-garden-version': '9.
|
|
95
|
+
'data-garden-version': '9.16.0'
|
|
96
96
|
}).withConfig({
|
|
97
97
|
displayName: "StyledHint",
|
|
98
98
|
componentId: "sc-106qvqx-0"
|
|
@@ -101,7 +101,7 @@ const StyledHint = styled__default.default(reactForms.Field.Hint).attrs({
|
|
|
101
101
|
const COMPONENT_ID$u = 'dropdowns.combobox.message';
|
|
102
102
|
const StyledMessage = styled__default.default(reactForms.Field.Message).attrs({
|
|
103
103
|
'data-garden-id': COMPONENT_ID$u,
|
|
104
|
-
'data-garden-version': '9.
|
|
104
|
+
'data-garden-version': '9.16.0'
|
|
105
105
|
}).withConfig({
|
|
106
106
|
displayName: "StyledMessage",
|
|
107
107
|
componentId: "sc-jux8m5-0"
|
|
@@ -115,7 +115,7 @@ const sizeStyles$b = props => {
|
|
|
115
115
|
};
|
|
116
116
|
const StyledCombobox = styled__default.default.div.attrs({
|
|
117
117
|
'data-garden-id': COMPONENT_ID$t,
|
|
118
|
-
'data-garden-version': '9.
|
|
118
|
+
'data-garden-version': '9.16.0'
|
|
119
119
|
}).withConfig({
|
|
120
120
|
displayName: "StyledCombobox",
|
|
121
121
|
componentId: "sc-13eybg8-0"
|
|
@@ -124,7 +124,7 @@ const StyledCombobox = styled__default.default.div.attrs({
|
|
|
124
124
|
const COMPONENT_ID$s = 'dropdowns.combobox.container';
|
|
125
125
|
const StyledContainer = styled__default.default.div.attrs({
|
|
126
126
|
'data-garden-id': COMPONENT_ID$s,
|
|
127
|
-
'data-garden-version': '9.
|
|
127
|
+
'data-garden-version': '9.16.0'
|
|
128
128
|
}).withConfig({
|
|
129
129
|
displayName: "StyledContainer",
|
|
130
130
|
componentId: "sc-14i9jid-0"
|
|
@@ -133,7 +133,7 @@ const StyledContainer = styled__default.default.div.attrs({
|
|
|
133
133
|
const COMPONENT_ID$r = 'dropdowns.combobox.field';
|
|
134
134
|
const StyledField = styled__default.default.div.attrs({
|
|
135
135
|
'data-garden-id': COMPONENT_ID$r,
|
|
136
|
-
'data-garden-version': '9.
|
|
136
|
+
'data-garden-version': '9.16.0'
|
|
137
137
|
}).withConfig({
|
|
138
138
|
displayName: "StyledField",
|
|
139
139
|
componentId: "sc-zc57xl-0"
|
|
@@ -142,7 +142,7 @@ const StyledField = styled__default.default.div.attrs({
|
|
|
142
142
|
const COMPONENT_ID$q = 'dropdowns.combobox.floating';
|
|
143
143
|
const StyledFloatingListbox = styled__default.default.div.attrs({
|
|
144
144
|
'data-garden-id': COMPONENT_ID$q,
|
|
145
|
-
'data-garden-version': '9.
|
|
145
|
+
'data-garden-version': '9.16.0'
|
|
146
146
|
}).withConfig({
|
|
147
147
|
displayName: "StyledFloatingListbox",
|
|
148
148
|
componentId: "sc-1cp6spf-0"
|
|
@@ -179,7 +179,7 @@ const sizeStyles$a = props => {
|
|
|
179
179
|
};
|
|
180
180
|
const StyledInput = styled__default.default.input.attrs({
|
|
181
181
|
'data-garden-id': COMPONENT_ID$p,
|
|
182
|
-
'data-garden-version': '9.
|
|
182
|
+
'data-garden-version': '9.16.0'
|
|
183
183
|
}).withConfig({
|
|
184
184
|
displayName: "StyledInput",
|
|
185
185
|
componentId: "sc-1lkqdg-0"
|
|
@@ -192,7 +192,7 @@ const sizeStyles$9 = props => {
|
|
|
192
192
|
};
|
|
193
193
|
const StyledInputGroup = styled__default.default.div.attrs({
|
|
194
194
|
'data-garden-id': COMPONENT_ID$o,
|
|
195
|
-
'data-garden-version': '9.
|
|
195
|
+
'data-garden-version': '9.16.0'
|
|
196
196
|
}).withConfig({
|
|
197
197
|
displayName: "StyledInputGroup",
|
|
198
198
|
componentId: "sc-yx3q7u-0"
|
|
@@ -301,7 +301,7 @@ const sizeStyles$8 = props => {
|
|
|
301
301
|
};
|
|
302
302
|
const StyledTrigger = styled__default.default.div.attrs({
|
|
303
303
|
'data-garden-id': COMPONENT_ID$n,
|
|
304
|
-
'data-garden-version': '9.
|
|
304
|
+
'data-garden-version': '9.16.0'
|
|
305
305
|
}).withConfig({
|
|
306
306
|
displayName: "StyledTrigger",
|
|
307
307
|
componentId: "sc-116nftk-0"
|
|
@@ -346,7 +346,7 @@ const sizeStyles$7 = props => {
|
|
|
346
346
|
};
|
|
347
347
|
const StyledInputIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
348
348
|
'data-garden-id': COMPONENT_ID$m,
|
|
349
|
-
'data-garden-version': '9.
|
|
349
|
+
'data-garden-version': '9.16.0'
|
|
350
350
|
}).withConfig({
|
|
351
351
|
displayName: "StyledInputIcon",
|
|
352
352
|
componentId: "sc-gqbs1s-0"
|
|
@@ -400,7 +400,7 @@ const sizeStyles$6 = props => {
|
|
|
400
400
|
};
|
|
401
401
|
const StyledOption = styled__default.default.li.attrs({
|
|
402
402
|
'data-garden-id': COMPONENT_ID$l,
|
|
403
|
-
'data-garden-version': '9.
|
|
403
|
+
'data-garden-version': '9.16.0'
|
|
404
404
|
}).withConfig({
|
|
405
405
|
displayName: "StyledOption",
|
|
406
406
|
componentId: "sc-jl4wn6-0"
|
|
@@ -409,7 +409,7 @@ const StyledOption = styled__default.default.li.attrs({
|
|
|
409
409
|
const COMPONENT_ID$k = 'dropdowns.combobox.option.content';
|
|
410
410
|
const StyledOptionContent = styled__default.default.div.attrs({
|
|
411
411
|
'data-garden-id': COMPONENT_ID$k,
|
|
412
|
-
'data-garden-version': '9.
|
|
412
|
+
'data-garden-version': '9.16.0'
|
|
413
413
|
}).withConfig({
|
|
414
414
|
displayName: "StyledOptionContent",
|
|
415
415
|
componentId: "sc-121ujpu-0"
|
|
@@ -418,7 +418,7 @@ const StyledOptionContent = styled__default.default.div.attrs({
|
|
|
418
418
|
const COMPONENT_ID$j = 'dropdowns.combobox.optgroup';
|
|
419
419
|
const StyledOptGroup = styled__default.default.ul.attrs({
|
|
420
420
|
'data-garden-id': COMPONENT_ID$j,
|
|
421
|
-
'data-garden-version': '9.
|
|
421
|
+
'data-garden-version': '9.16.0'
|
|
422
422
|
}).withConfig({
|
|
423
423
|
displayName: "StyledOptGroup",
|
|
424
424
|
componentId: "sc-1kavqsx-0"
|
|
@@ -441,7 +441,7 @@ const sizeStyles$5 = props => {
|
|
|
441
441
|
};
|
|
442
442
|
const StyledListboxSeparator = styled__default.default.li.attrs({
|
|
443
443
|
'data-garden-id': COMPONENT_ID$i,
|
|
444
|
-
'data-garden-version': '9.
|
|
444
|
+
'data-garden-version': '9.16.0'
|
|
445
445
|
}).withConfig({
|
|
446
446
|
displayName: "StyledListboxSeparator",
|
|
447
447
|
componentId: "sc-1p6toh2-0"
|
|
@@ -455,7 +455,7 @@ const sizeStyles$4 = props => {
|
|
|
455
455
|
};
|
|
456
456
|
const StyledListbox = styled__default.default.ul.attrs({
|
|
457
457
|
'data-garden-id': COMPONENT_ID$h,
|
|
458
|
-
'data-garden-version': '9.
|
|
458
|
+
'data-garden-version': '9.16.0'
|
|
459
459
|
}).withConfig({
|
|
460
460
|
displayName: "StyledListbox",
|
|
461
461
|
componentId: "sc-1k13ba7-0"
|
|
@@ -491,7 +491,7 @@ const sizeStyles$3 = props => {
|
|
|
491
491
|
};
|
|
492
492
|
const StyledOptionIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
493
493
|
'data-garden-id': COMPONENT_ID$g,
|
|
494
|
-
'data-garden-version': '9.
|
|
494
|
+
'data-garden-version': '9.16.0'
|
|
495
495
|
}).withConfig({
|
|
496
496
|
displayName: "StyledOptionIcon",
|
|
497
497
|
componentId: "sc-qsab3y-0"
|
|
@@ -516,7 +516,7 @@ const sizeStyles$2 = props => {
|
|
|
516
516
|
};
|
|
517
517
|
const StyledOptionMeta = styled__default.default.div.attrs({
|
|
518
518
|
'data-garden-id': COMPONENT_ID$f,
|
|
519
|
-
'data-garden-version': '9.
|
|
519
|
+
'data-garden-version': '9.16.0'
|
|
520
520
|
}).withConfig({
|
|
521
521
|
displayName: "StyledOptionMeta",
|
|
522
522
|
componentId: "sc-j6pu10-0"
|
|
@@ -547,7 +547,7 @@ const sizeStyles$1 = ({
|
|
|
547
547
|
};
|
|
548
548
|
const StyledOptionSelectionIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
549
549
|
'data-garden-id': COMPONENT_ID$e,
|
|
550
|
-
'data-garden-version': '9.
|
|
550
|
+
'data-garden-version': '9.16.0'
|
|
551
551
|
}).withConfig({
|
|
552
552
|
displayName: "StyledOptionSelectionIcon",
|
|
553
553
|
componentId: "sc-12wj24m-0"
|
|
@@ -589,7 +589,7 @@ const sizeStyles = props => {
|
|
|
589
589
|
};
|
|
590
590
|
const StyledOptionTypeIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
591
591
|
'data-garden-id': COMPONENT_ID$d,
|
|
592
|
-
'data-garden-version': '9.
|
|
592
|
+
'data-garden-version': '9.16.0'
|
|
593
593
|
}).withConfig({
|
|
594
594
|
displayName: "StyledOptionTypeIcon",
|
|
595
595
|
componentId: "sc-xpink2-0"
|
|
@@ -598,7 +598,7 @@ const StyledOptionTypeIcon = styled__default.default(reactTheming.StyledBaseIcon
|
|
|
598
598
|
const COMPONENT_ID$c = 'dropdowns.combobox.tag';
|
|
599
599
|
const StyledTag = styled__default.default(reactTags.Tag).attrs({
|
|
600
600
|
'data-garden-id': COMPONENT_ID$c,
|
|
601
|
-
'data-garden-version': '9.
|
|
601
|
+
'data-garden-version': '9.16.0'
|
|
602
602
|
}).withConfig({
|
|
603
603
|
displayName: "StyledTag",
|
|
604
604
|
componentId: "sc-1alam0r-0"
|
|
@@ -620,7 +620,7 @@ const colorStyles$1 = ({
|
|
|
620
620
|
};
|
|
621
621
|
const StyledValue = styled__default.default.div.attrs({
|
|
622
622
|
'data-garden-id': COMPONENT_ID$b,
|
|
623
|
-
'data-garden-version': '9.
|
|
623
|
+
'data-garden-version': '9.16.0'
|
|
624
624
|
}).withConfig({
|
|
625
625
|
displayName: "StyledValue",
|
|
626
626
|
componentId: "sc-t719sx-0"
|
|
@@ -644,7 +644,7 @@ const colorStyles = ({
|
|
|
644
644
|
const StyledTagsButton = styled__default.default(StyledValue).attrs({
|
|
645
645
|
as: 'button',
|
|
646
646
|
'data-garden-id': COMPONENT_ID$a,
|
|
647
|
-
'data-garden-version': '9.
|
|
647
|
+
'data-garden-version': '9.16.0'
|
|
648
648
|
}).withConfig({
|
|
649
649
|
displayName: "StyledTagsButton",
|
|
650
650
|
componentId: "sc-6q5w33-0"
|
|
@@ -653,7 +653,7 @@ const StyledTagsButton = styled__default.default(StyledValue).attrs({
|
|
|
653
653
|
const COMPONENT_ID$9 = 'dropdowns.menu';
|
|
654
654
|
const StyledMenu = styled__default.default(StyledListbox).attrs({
|
|
655
655
|
'data-garden-id': COMPONENT_ID$9,
|
|
656
|
-
'data-garden-version': '9.
|
|
656
|
+
'data-garden-version': '9.16.0'
|
|
657
657
|
}).withConfig({
|
|
658
658
|
displayName: "StyledMenu",
|
|
659
659
|
componentId: "sc-f77ntu-0"
|
|
@@ -666,7 +666,7 @@ const StyledMenu = styled__default.default(StyledListbox).attrs({
|
|
|
666
666
|
const COMPONENT_ID$8 = 'dropdowns.menu.floating';
|
|
667
667
|
const StyledFloatingMenu = styled__default.default(StyledFloatingListbox).attrs({
|
|
668
668
|
'data-garden-id': COMPONENT_ID$8,
|
|
669
|
-
'data-garden-version': '9.
|
|
669
|
+
'data-garden-version': '9.16.0'
|
|
670
670
|
}).withConfig({
|
|
671
671
|
displayName: "StyledFloatingMenu",
|
|
672
672
|
componentId: "sc-1rc7ahb-0"
|
|
@@ -675,7 +675,7 @@ const StyledFloatingMenu = styled__default.default(StyledFloatingListbox).attrs(
|
|
|
675
675
|
const COMPONENT_ID$7 = 'dropdowns.menu.item';
|
|
676
676
|
const StyledItem = styled__default.default(StyledOption).attrs({
|
|
677
677
|
'data-garden-id': COMPONENT_ID$7,
|
|
678
|
-
'data-garden-version': '9.
|
|
678
|
+
'data-garden-version': '9.16.0'
|
|
679
679
|
}).withConfig({
|
|
680
680
|
displayName: "StyledItem",
|
|
681
681
|
componentId: "sc-1jp99dq-0"
|
|
@@ -684,7 +684,7 @@ const StyledItem = styled__default.default(StyledOption).attrs({
|
|
|
684
684
|
const COMPONENT_ID$6 = 'dropdowns.menu.item.type_icon';
|
|
685
685
|
const StyledItemTypeIcon = styled__default.default(StyledOptionTypeIcon).attrs({
|
|
686
686
|
'data-garden-id': COMPONENT_ID$6,
|
|
687
|
-
'data-garden-version': '9.
|
|
687
|
+
'data-garden-version': '9.16.0'
|
|
688
688
|
}).withConfig({
|
|
689
689
|
displayName: "StyledItemTypeIcon",
|
|
690
690
|
componentId: "sc-1pll3nu-0"
|
|
@@ -693,7 +693,7 @@ const StyledItemTypeIcon = styled__default.default(StyledOptionTypeIcon).attrs({
|
|
|
693
693
|
const COMPONENT_ID$5 = 'dropdowns.menu.item_anchor';
|
|
694
694
|
const StyledItemAnchor = styled__default.default(StyledOption).attrs({
|
|
695
695
|
'data-garden-id': COMPONENT_ID$5,
|
|
696
|
-
'data-garden-version': '9.
|
|
696
|
+
'data-garden-version': '9.16.0',
|
|
697
697
|
as: 'a'
|
|
698
698
|
}).withConfig({
|
|
699
699
|
displayName: "StyledItemAnchor",
|
|
@@ -703,7 +703,7 @@ const StyledItemAnchor = styled__default.default(StyledOption).attrs({
|
|
|
703
703
|
const COMPONENT_ID$4 = 'dropdowns.menu.item.content';
|
|
704
704
|
const StyledItemContent = styled__default.default(StyledOptionContent).attrs({
|
|
705
705
|
'data-garden-id': COMPONENT_ID$4,
|
|
706
|
-
'data-garden-version': '9.
|
|
706
|
+
'data-garden-version': '9.16.0'
|
|
707
707
|
}).withConfig({
|
|
708
708
|
displayName: "StyledItemContent",
|
|
709
709
|
componentId: "sc-1opglsb-0"
|
|
@@ -712,7 +712,7 @@ const StyledItemContent = styled__default.default(StyledOptionContent).attrs({
|
|
|
712
712
|
const COMPONENT_ID$3 = 'dropdowns.menu.item_group';
|
|
713
713
|
const StyledItemGroup = styled__default.default(StyledOptGroup).attrs({
|
|
714
714
|
'data-garden-id': COMPONENT_ID$3,
|
|
715
|
-
'data-garden-version': '9.
|
|
715
|
+
'data-garden-version': '9.16.0'
|
|
716
716
|
}).withConfig({
|
|
717
717
|
displayName: "StyledItemGroup",
|
|
718
718
|
componentId: "sc-1umk3cg-0"
|
|
@@ -721,7 +721,7 @@ const StyledItemGroup = styled__default.default(StyledOptGroup).attrs({
|
|
|
721
721
|
const COMPONENT_ID$2 = 'dropdowns.menu.item.icon';
|
|
722
722
|
const StyledItemIcon = styled__default.default(StyledOptionIcon).attrs({
|
|
723
723
|
'data-garden-id': COMPONENT_ID$2,
|
|
724
|
-
'data-garden-version': '9.
|
|
724
|
+
'data-garden-version': '9.16.0'
|
|
725
725
|
}).withConfig({
|
|
726
726
|
displayName: "StyledItemIcon",
|
|
727
727
|
componentId: "sc-w9orqb-0"
|
|
@@ -730,7 +730,7 @@ const StyledItemIcon = styled__default.default(StyledOptionIcon).attrs({
|
|
|
730
730
|
const COMPONENT_ID$1 = 'dropdowns.menu.item.meta';
|
|
731
731
|
const StyledItemMeta = styled__default.default(StyledOptionMeta).attrs({
|
|
732
732
|
'data-garden-id': COMPONENT_ID$1,
|
|
733
|
-
'data-garden-version': '9.
|
|
733
|
+
'data-garden-version': '9.16.0'
|
|
734
734
|
}).withConfig({
|
|
735
735
|
displayName: "StyledItemMeta",
|
|
736
736
|
componentId: "sc-1unw3x1-0"
|
|
@@ -739,7 +739,7 @@ const StyledItemMeta = styled__default.default(StyledOptionMeta).attrs({
|
|
|
739
739
|
const COMPONENT_ID = 'dropdowns.menu.separator';
|
|
740
740
|
const StyledSeparator = styled__default.default(StyledListboxSeparator).attrs({
|
|
741
741
|
'data-garden-id': COMPONENT_ID,
|
|
742
|
-
'data-garden-version': '9.
|
|
742
|
+
'data-garden-version': '9.16.0'
|
|
743
743
|
}).withConfig({
|
|
744
744
|
displayName: "StyledSeparator",
|
|
745
745
|
componentId: "sc-8kqwen-0"
|
|
@@ -760,7 +760,7 @@ const Listbox = React.forwardRef(({
|
|
|
760
760
|
const floatingRef = React.useRef(null);
|
|
761
761
|
const isMountedRef = React.useRef(true);
|
|
762
762
|
const [isVisible, setIsVisible] = React.useState(false);
|
|
763
|
-
const [
|
|
763
|
+
const [availableHeight, setAvailableHeight] = React.useState();
|
|
764
764
|
const [width, setWidth] = React.useState();
|
|
765
765
|
const theme = React.useContext(styled.ThemeContext) || reactTheming.DEFAULT_THEME;
|
|
766
766
|
const {
|
|
@@ -779,12 +779,14 @@ const Listbox = React.forwardRef(({
|
|
|
779
779
|
middleware: [reactDom.offset(theme.space.base), reactDom.flip(), reactDom.size({
|
|
780
780
|
apply: ({
|
|
781
781
|
rects,
|
|
782
|
-
availableHeight
|
|
782
|
+
availableHeight: nextAvailableHeight
|
|
783
783
|
}) => {
|
|
784
784
|
if (rects.reference.width > 0 && isMountedRef.current) {
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
785
|
+
const nextWidth = Math.round(rects.reference.width);
|
|
786
|
+
setWidth(previous => previous === nextWidth ? previous : nextWidth);
|
|
787
|
+
if (!(minHeight === null || minHeight === 'fit-content')) {
|
|
788
|
+
const nextMaxHeight = Math.max(0, Math.floor(nextAvailableHeight));
|
|
789
|
+
setAvailableHeight(previous => previous === nextMaxHeight ? previous : nextMaxHeight);
|
|
788
790
|
}
|
|
789
791
|
}
|
|
790
792
|
}
|
|
@@ -814,19 +816,16 @@ const Listbox = React.forwardRef(({
|
|
|
814
816
|
timeout = setTimeout(() => {
|
|
815
817
|
if (isMountedRef.current) {
|
|
816
818
|
setIsVisible(false);
|
|
817
|
-
|
|
819
|
+
setAvailableHeight(undefined);
|
|
818
820
|
}
|
|
819
821
|
}, 200 );
|
|
820
822
|
}
|
|
821
823
|
return () => clearTimeout(timeout);
|
|
822
824
|
}, [isExpanded]);
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
}
|
|
828
|
-
}, [
|
|
829
|
-
children, update]);
|
|
825
|
+
const listboxStyle = {};
|
|
826
|
+
if (availableHeight !== undefined) {
|
|
827
|
+
listboxStyle.maxHeight = maxHeight ? `min(${maxHeight}, ${availableHeight}px)` : availableHeight;
|
|
828
|
+
}
|
|
830
829
|
const Node = React__namespace.default.createElement(StyledFloatingListbox, {
|
|
831
830
|
"data-garden-animate": isVisible ? 'true' : 'false',
|
|
832
831
|
$isHidden: !isExpanded,
|
|
@@ -844,9 +843,7 @@ const Listbox = React.forwardRef(({
|
|
|
844
843
|
"aria-hidden":
|
|
845
844
|
!isExpanded,
|
|
846
845
|
onMouseDown: containerUtilities.composeEventHandlers(onMouseDown, handleMouseDown),
|
|
847
|
-
style:
|
|
848
|
-
height
|
|
849
|
-
}
|
|
846
|
+
style: listboxStyle
|
|
850
847
|
}, props, {
|
|
851
848
|
ref: ref
|
|
852
849
|
}), !!isVisible && children));
|
|
@@ -1043,6 +1040,7 @@ const Combobox = React.forwardRef(({
|
|
|
1043
1040
|
const triggerRef = React.useRef(null);
|
|
1044
1041
|
const inputRef = React.useRef(null);
|
|
1045
1042
|
const listboxRef = React.useRef(null);
|
|
1043
|
+
const blurTimeoutRef = React.useRef();
|
|
1046
1044
|
const theme = React.useContext(styled.ThemeContext) || reactTheming.DEFAULT_THEME;
|
|
1047
1045
|
const environment = reactTheming.useWindow(theme);
|
|
1048
1046
|
const {
|
|
@@ -1099,6 +1097,7 @@ const Combobox = React.forwardRef(({
|
|
|
1099
1097
|
const triggerProps = getTriggerProps({
|
|
1100
1098
|
onFocus: () => {
|
|
1101
1099
|
if (!isDisabled) {
|
|
1100
|
+
clearTimeout(blurTimeoutRef.current);
|
|
1102
1101
|
if (isEditable) {
|
|
1103
1102
|
setIsInputHidden(false);
|
|
1104
1103
|
}
|
|
@@ -1109,12 +1108,19 @@ const Combobox = React.forwardRef(({
|
|
|
1109
1108
|
},
|
|
1110
1109
|
onBlur: event => {
|
|
1111
1110
|
if (event.relatedTarget === null || !triggerRef.current?.contains(event.relatedTarget)) {
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1111
|
+
clearTimeout(blurTimeoutRef.current);
|
|
1112
|
+
blurTimeoutRef.current = setTimeout(() => {
|
|
1113
|
+
const activeElement = triggerRef.current?.ownerDocument.activeElement ?? null;
|
|
1114
|
+
const isFocusContained = !!triggerRef.current?.contains(activeElement) || !!listboxRef.current?.contains(activeElement);
|
|
1115
|
+
if (!isFocusContained) {
|
|
1116
|
+
if (isEditable) {
|
|
1117
|
+
setIsInputHidden(true);
|
|
1118
|
+
}
|
|
1119
|
+
if (isMultiselectable) {
|
|
1120
|
+
setIsTagGroupExpanded(false);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}, 0);
|
|
1118
1124
|
}
|
|
1119
1125
|
}
|
|
1120
1126
|
});
|
|
@@ -1129,6 +1135,9 @@ const Combobox = React.forwardRef(({
|
|
|
1129
1135
|
const listboxProps = getListboxProps({
|
|
1130
1136
|
'aria-label': _listboxAriaLabel
|
|
1131
1137
|
});
|
|
1138
|
+
React.useEffect(() => {
|
|
1139
|
+
return () => clearTimeout(blurTimeoutRef.current);
|
|
1140
|
+
}, []);
|
|
1132
1141
|
React.useEffect(() => {
|
|
1133
1142
|
if (!labelProps) {
|
|
1134
1143
|
const _labelProps = getLabelProps({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-dropdowns",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.16.0",
|
|
4
4
|
"description": "Components related to dropdowns in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"@zendeskgarden/container-combobox": "^2.0.9",
|
|
26
26
|
"@zendeskgarden/container-menu": "^2.0.1",
|
|
27
27
|
"@zendeskgarden/container-utilities": "^2.0.4",
|
|
28
|
-
"@zendeskgarden/react-buttons": "^9.
|
|
29
|
-
"@zendeskgarden/react-forms": "^9.
|
|
30
|
-
"@zendeskgarden/react-tags": "^9.
|
|
31
|
-
"@zendeskgarden/react-tooltips": "^9.
|
|
28
|
+
"@zendeskgarden/react-buttons": "^9.16.0",
|
|
29
|
+
"@zendeskgarden/react-forms": "^9.16.0",
|
|
30
|
+
"@zendeskgarden/react-tags": "^9.16.0",
|
|
31
|
+
"@zendeskgarden/react-tooltips": "^9.16.0",
|
|
32
32
|
"polished": "^4.3.1",
|
|
33
33
|
"prop-types": "^15.7.2",
|
|
34
34
|
"react-merge-refs": "^2.0.0"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"styled-components": "^5.3.1 || ^6.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@zendeskgarden/react-theming": "^9.
|
|
43
|
+
"@zendeskgarden/react-theming": "^9.16.0",
|
|
44
44
|
"@zendeskgarden/svg-icons": "7.6.0"
|
|
45
45
|
},
|
|
46
46
|
"keywords": [
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"zendeskgarden:src": "src/index.ts",
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "26dc6a8cf9650e9214896d6994a4f3fba1e63541"
|
|
58
58
|
}
|