@zendeskgarden/react-dropdowns 9.15.0 → 9.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/elements/combobox/Combobox.js +7 -2
- package/dist/esm/elements/combobox/Listbox.js +11 -5
- package/dist/esm/elements/combobox/TagGroup.js +9 -3
- package/dist/esm/elements/menu/MenuList.js +12 -6
- 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 +71 -48
- package/package.json +7 -7
|
@@ -221,9 +221,14 @@ const Combobox = forwardRef(({
|
|
|
221
221
|
}
|
|
222
222
|
return () => messageProps && setMessageProps(undefined);
|
|
223
223
|
}, [getMessageProps, messageProps, setMessageProps]);
|
|
224
|
+
const selectionFingerprint = Array.isArray(selection) ? selection.map(o => o.value).join('\0') : selection?.value ?? null;
|
|
225
|
+
const prevSelectionRef = useRef(selectionFingerprint);
|
|
224
226
|
useEffect(() => {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
+
if (prevSelectionRef.current !== selectionFingerprint) {
|
|
228
|
+
prevSelectionRef.current = selectionFingerprint;
|
|
229
|
+
inputRef.current?.scrollIntoView?.();
|
|
230
|
+
}
|
|
231
|
+
}, [selectionFingerprint]);
|
|
227
232
|
return React__default.createElement(ComboboxContext.Provider, {
|
|
228
233
|
value: contextValue
|
|
229
234
|
}, React__default.createElement(StyledCombobox, Object.assign({
|
|
@@ -58,6 +58,7 @@ const Listbox = forwardRef(({
|
|
|
58
58
|
...props
|
|
59
59
|
}, ref) => {
|
|
60
60
|
const floatingRef = useRef(null);
|
|
61
|
+
const isMountedRef = useRef(true);
|
|
61
62
|
const [isVisible, setIsVisible] = useState(false);
|
|
62
63
|
const [height, setHeight] = useState();
|
|
63
64
|
const [width, setWidth] = useState();
|
|
@@ -80,7 +81,7 @@ const Listbox = forwardRef(({
|
|
|
80
81
|
rects,
|
|
81
82
|
availableHeight
|
|
82
83
|
}) => {
|
|
83
|
-
if (rects.reference.width > 0) {
|
|
84
|
+
if (rects.reference.width > 0 && isMountedRef.current) {
|
|
84
85
|
setWidth(rects.reference.width);
|
|
85
86
|
if (!(minHeight === null || minHeight === 'fit-content') && rects.floating.height > availableHeight) {
|
|
86
87
|
setHeight(availableHeight);
|
|
@@ -90,6 +91,9 @@ const Listbox = forwardRef(({
|
|
|
90
91
|
})]
|
|
91
92
|
});
|
|
92
93
|
const handleMouseDown = event => event.preventDefault();
|
|
94
|
+
useEffect(() => () => {
|
|
95
|
+
isMountedRef.current = false;
|
|
96
|
+
}, []);
|
|
93
97
|
useEffect(() => {
|
|
94
98
|
let cleanup;
|
|
95
99
|
if (isExpanded && refs.reference.current && refs.floating.current) {
|
|
@@ -102,18 +106,20 @@ const Listbox = forwardRef(({
|
|
|
102
106
|
useEffect(() => {
|
|
103
107
|
let timeout;
|
|
104
108
|
if (isExpanded) {
|
|
105
|
-
setIsVisible(true);
|
|
109
|
+
if (isMountedRef.current) setIsVisible(true);
|
|
106
110
|
} else {
|
|
107
111
|
timeout = setTimeout(() => {
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
if (isMountedRef.current) {
|
|
113
|
+
setIsVisible(false);
|
|
114
|
+
setHeight(undefined);
|
|
115
|
+
}
|
|
110
116
|
}, 200 );
|
|
111
117
|
}
|
|
112
118
|
return () => clearTimeout(timeout);
|
|
113
119
|
}, [isExpanded]);
|
|
114
120
|
useEffect(() => {
|
|
115
121
|
if (height) {
|
|
116
|
-
setHeight(undefined);
|
|
122
|
+
if (isMountedRef.current) setHeight(undefined);
|
|
117
123
|
update();
|
|
118
124
|
}
|
|
119
125
|
}, [
|
|
@@ -18,11 +18,17 @@ const TagGroup = ({
|
|
|
18
18
|
selection
|
|
19
19
|
}) => {
|
|
20
20
|
const lastTagRef = useRef(null);
|
|
21
|
+
const isMountedRef = useRef(false);
|
|
22
|
+
const selectionFingerprint = selection.map(o => o.value).join('\0');
|
|
21
23
|
useEffect(() => {
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
+
if (isMountedRef.current) {
|
|
25
|
+
if (!isEditable) {
|
|
26
|
+
lastTagRef.current?.scrollIntoView?.();
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
isMountedRef.current = true;
|
|
24
30
|
}
|
|
25
|
-
}, [isEditable,
|
|
31
|
+
}, [isEditable, selectionFingerprint]);
|
|
26
32
|
return React__default.createElement(React__default.Fragment, null, selection.map((option, index) => {
|
|
27
33
|
const disabled = isDisabled || option.disabled;
|
|
28
34
|
return React__default.createElement(Tag, Object.assign({
|
|
@@ -8,7 +8,7 @@ import React__default, { forwardRef, useRef, useState, useContext, useEffect } f
|
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import { ThemeContext } from 'styled-components';
|
|
10
10
|
import { DEFAULT_THEME, getFloatingPlacements, getMenuPosition, getArrowPosition } from '@zendeskgarden/react-theming';
|
|
11
|
-
import { useFloating, offset, autoPlacement, flip, size,
|
|
11
|
+
import { useFloating, platform, offset, autoPlacement, flip, size, autoUpdate } from '@floating-ui/react-dom';
|
|
12
12
|
import { PLACEMENT } from '../../types/index.js';
|
|
13
13
|
import '../../views/combobox/StyledCombobox.js';
|
|
14
14
|
import '../../views/combobox/StyledContainer.js';
|
|
@@ -61,6 +61,7 @@ const MenuList = forwardRef(({
|
|
|
61
61
|
...props
|
|
62
62
|
}, ref) => {
|
|
63
63
|
const floatingRef = useRef(null);
|
|
64
|
+
const isMountedRef = useRef(true);
|
|
64
65
|
const [isVisible, setIsVisible] = useState(isExpanded);
|
|
65
66
|
const [height, setHeight] = useState();
|
|
66
67
|
const theme = useContext(ThemeContext) || DEFAULT_THEME;
|
|
@@ -90,13 +91,16 @@ const MenuList = forwardRef(({
|
|
|
90
91
|
availableHeight
|
|
91
92
|
}) => {
|
|
92
93
|
if (!(minHeight === null || minHeight === 'fit-content')) {
|
|
93
|
-
if (rects.floating.height > availableHeight) {
|
|
94
|
+
if (rects.floating.height > availableHeight && isMountedRef.current) {
|
|
94
95
|
setHeight(availableHeight);
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
})]
|
|
99
100
|
});
|
|
101
|
+
useEffect(() => () => {
|
|
102
|
+
isMountedRef.current = false;
|
|
103
|
+
}, []);
|
|
100
104
|
useEffect(() => {
|
|
101
105
|
let cleanup;
|
|
102
106
|
if (isExpanded && refs.reference.current && refs.floating.current) {
|
|
@@ -109,18 +113,20 @@ const MenuList = forwardRef(({
|
|
|
109
113
|
useEffect(() => {
|
|
110
114
|
let timeout;
|
|
111
115
|
if (isExpanded) {
|
|
112
|
-
setIsVisible(true);
|
|
116
|
+
if (isMountedRef.current) setIsVisible(true);
|
|
113
117
|
} else {
|
|
114
118
|
timeout = setTimeout(() => {
|
|
115
|
-
|
|
116
|
-
|
|
119
|
+
if (isMountedRef.current) {
|
|
120
|
+
setIsVisible(false);
|
|
121
|
+
setHeight(undefined);
|
|
122
|
+
}
|
|
117
123
|
}, 200 );
|
|
118
124
|
}
|
|
119
125
|
return () => clearTimeout(timeout);
|
|
120
126
|
}, [isExpanded]);
|
|
121
127
|
useEffect(() => {
|
|
122
128
|
if (height) {
|
|
123
|
-
setHeight(undefined);
|
|
129
|
+
if (isMountedRef.current) setHeight(undefined);
|
|
124
130
|
update();
|
|
125
131
|
}
|
|
126
132
|
}, [
|
|
@@ -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.15.
|
|
21
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
13
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
13
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
13
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
14
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
37
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
17
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
52
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
14
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
21
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
27
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
14
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
13
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
59
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
13
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
41
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
29
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
37
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
48
|
+
'data-garden-version': '9.15.2'
|
|
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.
|
|
15
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
24
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
115
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
14
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
14
|
+
'data-garden-version': '9.15.2'
|
|
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.
|
|
15
|
+
'data-garden-version': '9.15.2',
|
|
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.15.
|
|
14
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
14
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
14
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
14
|
+
'data-garden-version': '9.15.2'
|
|
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.
|
|
15
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
14
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
14
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
86
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
95
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
104
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
118
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
127
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
136
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
145
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
182
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
195
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
304
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
349
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
403
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
412
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
421
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
444
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
458
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
494
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
519
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
550
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
592
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
601
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
623
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
647
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
656
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
669
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
678
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
687
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
696
|
+
'data-garden-version': '9.15.2',
|
|
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.15.
|
|
706
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
715
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
724
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
733
|
+
'data-garden-version': '9.15.2'
|
|
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.15.
|
|
742
|
+
'data-garden-version': '9.15.2'
|
|
743
743
|
}).withConfig({
|
|
744
744
|
displayName: "StyledSeparator",
|
|
745
745
|
componentId: "sc-8kqwen-0"
|
|
@@ -758,6 +758,7 @@ const Listbox = React.forwardRef(({
|
|
|
758
758
|
...props
|
|
759
759
|
}, ref) => {
|
|
760
760
|
const floatingRef = React.useRef(null);
|
|
761
|
+
const isMountedRef = React.useRef(true);
|
|
761
762
|
const [isVisible, setIsVisible] = React.useState(false);
|
|
762
763
|
const [height, setHeight] = React.useState();
|
|
763
764
|
const [width, setWidth] = React.useState();
|
|
@@ -780,7 +781,7 @@ const Listbox = React.forwardRef(({
|
|
|
780
781
|
rects,
|
|
781
782
|
availableHeight
|
|
782
783
|
}) => {
|
|
783
|
-
if (rects.reference.width > 0) {
|
|
784
|
+
if (rects.reference.width > 0 && isMountedRef.current) {
|
|
784
785
|
setWidth(rects.reference.width);
|
|
785
786
|
if (!(minHeight === null || minHeight === 'fit-content') && rects.floating.height > availableHeight) {
|
|
786
787
|
setHeight(availableHeight);
|
|
@@ -790,6 +791,9 @@ const Listbox = React.forwardRef(({
|
|
|
790
791
|
})]
|
|
791
792
|
});
|
|
792
793
|
const handleMouseDown = event => event.preventDefault();
|
|
794
|
+
React.useEffect(() => () => {
|
|
795
|
+
isMountedRef.current = false;
|
|
796
|
+
}, []);
|
|
793
797
|
React.useEffect(() => {
|
|
794
798
|
let cleanup;
|
|
795
799
|
if (isExpanded && refs.reference.current && refs.floating.current) {
|
|
@@ -802,18 +806,20 @@ const Listbox = React.forwardRef(({
|
|
|
802
806
|
React.useEffect(() => {
|
|
803
807
|
let timeout;
|
|
804
808
|
if (isExpanded) {
|
|
805
|
-
setIsVisible(true);
|
|
809
|
+
if (isMountedRef.current) setIsVisible(true);
|
|
806
810
|
} else {
|
|
807
811
|
timeout = setTimeout(() => {
|
|
808
|
-
|
|
809
|
-
|
|
812
|
+
if (isMountedRef.current) {
|
|
813
|
+
setIsVisible(false);
|
|
814
|
+
setHeight(undefined);
|
|
815
|
+
}
|
|
810
816
|
}, 200 );
|
|
811
817
|
}
|
|
812
818
|
return () => clearTimeout(timeout);
|
|
813
819
|
}, [isExpanded]);
|
|
814
820
|
React.useEffect(() => {
|
|
815
821
|
if (height) {
|
|
816
|
-
setHeight(undefined);
|
|
822
|
+
if (isMountedRef.current) setHeight(undefined);
|
|
817
823
|
update();
|
|
818
824
|
}
|
|
819
825
|
}, [
|
|
@@ -918,11 +924,17 @@ const TagGroup = ({
|
|
|
918
924
|
selection
|
|
919
925
|
}) => {
|
|
920
926
|
const lastTagRef = React.useRef(null);
|
|
927
|
+
const isMountedRef = React.useRef(false);
|
|
928
|
+
const selectionFingerprint = selection.map(o => o.value).join('\0');
|
|
921
929
|
React.useEffect(() => {
|
|
922
|
-
if (
|
|
923
|
-
|
|
930
|
+
if (isMountedRef.current) {
|
|
931
|
+
if (!isEditable) {
|
|
932
|
+
lastTagRef.current?.scrollIntoView?.();
|
|
933
|
+
}
|
|
934
|
+
} else {
|
|
935
|
+
isMountedRef.current = true;
|
|
924
936
|
}
|
|
925
|
-
}, [isEditable,
|
|
937
|
+
}, [isEditable, selectionFingerprint]);
|
|
926
938
|
return React__namespace.default.createElement(React__namespace.default.Fragment, null, selection.map((option, index) => {
|
|
927
939
|
const disabled = isDisabled || option.disabled;
|
|
928
940
|
return React__namespace.default.createElement(Tag, Object.assign({
|
|
@@ -1138,9 +1150,14 @@ const Combobox = React.forwardRef(({
|
|
|
1138
1150
|
}
|
|
1139
1151
|
return () => messageProps && setMessageProps(undefined);
|
|
1140
1152
|
}, [getMessageProps, messageProps, setMessageProps]);
|
|
1153
|
+
const selectionFingerprint = Array.isArray(selection) ? selection.map(o => o.value).join('\0') : selection?.value ?? null;
|
|
1154
|
+
const prevSelectionRef = React.useRef(selectionFingerprint);
|
|
1141
1155
|
React.useEffect(() => {
|
|
1142
|
-
|
|
1143
|
-
|
|
1156
|
+
if (prevSelectionRef.current !== selectionFingerprint) {
|
|
1157
|
+
prevSelectionRef.current = selectionFingerprint;
|
|
1158
|
+
inputRef.current?.scrollIntoView?.();
|
|
1159
|
+
}
|
|
1160
|
+
}, [selectionFingerprint]);
|
|
1144
1161
|
return React__namespace.default.createElement(ComboboxContext.Provider, {
|
|
1145
1162
|
value: contextValue
|
|
1146
1163
|
}, React__namespace.default.createElement(StyledCombobox, Object.assign({
|
|
@@ -1656,6 +1673,7 @@ const MenuList = React.forwardRef(({
|
|
|
1656
1673
|
...props
|
|
1657
1674
|
}, ref) => {
|
|
1658
1675
|
const floatingRef = React.useRef(null);
|
|
1676
|
+
const isMountedRef = React.useRef(true);
|
|
1659
1677
|
const [isVisible, setIsVisible] = React.useState(isExpanded);
|
|
1660
1678
|
const [height, setHeight] = React.useState();
|
|
1661
1679
|
const theme = React.useContext(styled.ThemeContext) || reactTheming.DEFAULT_THEME;
|
|
@@ -1685,13 +1703,16 @@ const MenuList = React.forwardRef(({
|
|
|
1685
1703
|
availableHeight
|
|
1686
1704
|
}) => {
|
|
1687
1705
|
if (!(minHeight === null || minHeight === 'fit-content')) {
|
|
1688
|
-
if (rects.floating.height > availableHeight) {
|
|
1706
|
+
if (rects.floating.height > availableHeight && isMountedRef.current) {
|
|
1689
1707
|
setHeight(availableHeight);
|
|
1690
1708
|
}
|
|
1691
1709
|
}
|
|
1692
1710
|
}
|
|
1693
1711
|
})]
|
|
1694
1712
|
});
|
|
1713
|
+
React.useEffect(() => () => {
|
|
1714
|
+
isMountedRef.current = false;
|
|
1715
|
+
}, []);
|
|
1695
1716
|
React.useEffect(() => {
|
|
1696
1717
|
let cleanup;
|
|
1697
1718
|
if (isExpanded && refs.reference.current && refs.floating.current) {
|
|
@@ -1704,18 +1725,20 @@ const MenuList = React.forwardRef(({
|
|
|
1704
1725
|
React.useEffect(() => {
|
|
1705
1726
|
let timeout;
|
|
1706
1727
|
if (isExpanded) {
|
|
1707
|
-
setIsVisible(true);
|
|
1728
|
+
if (isMountedRef.current) setIsVisible(true);
|
|
1708
1729
|
} else {
|
|
1709
1730
|
timeout = setTimeout(() => {
|
|
1710
|
-
|
|
1711
|
-
|
|
1731
|
+
if (isMountedRef.current) {
|
|
1732
|
+
setIsVisible(false);
|
|
1733
|
+
setHeight(undefined);
|
|
1734
|
+
}
|
|
1712
1735
|
}, 200 );
|
|
1713
1736
|
}
|
|
1714
1737
|
return () => clearTimeout(timeout);
|
|
1715
1738
|
}, [isExpanded]);
|
|
1716
1739
|
React.useEffect(() => {
|
|
1717
1740
|
if (height) {
|
|
1718
|
-
setHeight(undefined);
|
|
1741
|
+
if (isMountedRef.current) setHeight(undefined);
|
|
1719
1742
|
update();
|
|
1720
1743
|
}
|
|
1721
1744
|
}, [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-dropdowns",
|
|
3
|
-
"version": "9.15.
|
|
3
|
+
"version": "9.15.2",
|
|
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.7",
|
|
26
26
|
"@zendeskgarden/container-menu": "^2.0.1",
|
|
27
27
|
"@zendeskgarden/container-utilities": "^2.0.4",
|
|
28
|
-
"@zendeskgarden/react-buttons": "^9.15.
|
|
29
|
-
"@zendeskgarden/react-forms": "^9.15.
|
|
30
|
-
"@zendeskgarden/react-tags": "^9.15.
|
|
31
|
-
"@zendeskgarden/react-tooltips": "^9.15.
|
|
28
|
+
"@zendeskgarden/react-buttons": "^9.15.2",
|
|
29
|
+
"@zendeskgarden/react-forms": "^9.15.2",
|
|
30
|
+
"@zendeskgarden/react-tags": "^9.15.2",
|
|
31
|
+
"@zendeskgarden/react-tooltips": "^9.15.2",
|
|
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.15.
|
|
43
|
+
"@zendeskgarden/react-theming": "^9.15.2",
|
|
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": "e48f699853ed87994f1531c280189b5f035a5077"
|
|
58
58
|
}
|