@pingux/astro 1.7.0-alpha.10 → 1.7.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +1 -1
- package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +8 -4
- package/lib/cjs/components/ListViewItem/ListViewItem.js +2 -1
- package/lib/cjs/components/MultiselectFilter/MultiselectFilter.js +1 -1
- package/lib/cjs/components/MultiselectFilterItem/MultiselectFilterItem.js +32 -11
- package/lib/cjs/components/MultiselectFilterItem/MultiselectFilterItem.test.js +13 -1
- package/lib/cjs/components/Text/Text.js +5 -1
- package/lib/cjs/components/Text/Text.stories.js +56 -2
- package/lib/cjs/components/Text/Text.test.js +46 -0
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.js +21 -10
- package/lib/cjs/recipes/MultiselectListContainer.stories.js +352 -0
- package/lib/cjs/styles/variants/boxes.js +2 -2
- package/lib/cjs/styles/variants/multiselectListContainer.js +4 -6
- package/lib/components/ComboBoxField/ComboBoxField.js +1 -1
- package/lib/components/ComboBoxField/ComboBoxField.test.js +8 -4
- package/lib/components/ListViewItem/ListViewItem.js +2 -1
- package/lib/components/MultiselectFilter/MultiselectFilter.js +1 -1
- package/lib/components/MultiselectFilterItem/MultiselectFilterItem.js +35 -12
- package/lib/components/MultiselectFilterItem/MultiselectFilterItem.test.js +11 -1
- package/lib/components/Text/Text.js +7 -2
- package/lib/components/Text/Text.stories.js +50 -0
- package/lib/components/Text/Text.test.js +36 -0
- package/lib/components/TimeZonePicker/TimeZonePicker.js +21 -10
- package/lib/recipes/MultiselectListContainer.stories.js +306 -0
- package/lib/styles/variants/boxes.js +2 -2
- package/lib/styles/variants/multiselectListContainer.js +4 -6
- package/package.json +1 -1
@@ -315,7 +315,8 @@ test('should invoke onInputChange', function () {
|
|
315
315
|
test('should invoke onOpenChange on button click', function () {
|
316
316
|
var onOpenChange = jest.fn();
|
317
317
|
getComponent({
|
318
|
-
onOpenChange: onOpenChange
|
318
|
+
onOpenChange: onOpenChange,
|
319
|
+
menuTrigger: 'manual'
|
319
320
|
});
|
320
321
|
|
321
322
|
var button = _testWrapper.screen.queryByRole('button');
|
@@ -332,7 +333,8 @@ test('should invoke onOpenChange on button click', function () {
|
|
332
333
|
test('should invoke onOpenChange on input change', function () {
|
333
334
|
var onOpenChange = jest.fn();
|
334
335
|
getComponent({
|
335
|
-
onOpenChange: onOpenChange
|
336
|
+
onOpenChange: onOpenChange,
|
337
|
+
menuTrigger: 'input'
|
336
338
|
});
|
337
339
|
|
338
340
|
var input = _testWrapper.screen.queryByRole('combobox');
|
@@ -349,7 +351,8 @@ test('should invoke onOpenChange on input change', function () {
|
|
349
351
|
test('should invoke onOpenChange on keyboard arrow down', function () {
|
350
352
|
var onOpenChange = jest.fn();
|
351
353
|
getComponent({
|
352
|
-
onOpenChange: onOpenChange
|
354
|
+
onOpenChange: onOpenChange,
|
355
|
+
menuTrigger: 'manual'
|
353
356
|
});
|
354
357
|
|
355
358
|
var input = _testWrapper.screen.queryByRole('combobox');
|
@@ -366,7 +369,8 @@ test('should invoke onOpenChange on keyboard arrow down', function () {
|
|
366
369
|
test('should invoke onOpenChange on keyboard arrow up', function () {
|
367
370
|
var onOpenChange = jest.fn();
|
368
371
|
getComponent({
|
369
|
-
onOpenChange: onOpenChange
|
372
|
+
onOpenChange: onOpenChange,
|
373
|
+
menuTrigger: 'manual'
|
370
374
|
});
|
371
375
|
|
372
376
|
var input = _testWrapper.screen.queryByRole('combobox');
|
@@ -67,6 +67,7 @@ var ListViewItem = function ListViewItem(props) {
|
|
67
67
|
var isDisabled = state.disabledKeys.has(item.key);
|
68
68
|
var rowRef = (0, _react.useRef)();
|
69
69
|
var cellRef = (0, _react.useRef)();
|
70
|
+
var isSelectable = state.selectionManager.selectionMode !== 'none';
|
70
71
|
|
71
72
|
var _useFocusRing = (0, _focus.useFocusRing)({
|
72
73
|
within: true
|
@@ -106,7 +107,7 @@ var ListViewItem = function ListViewItem(props) {
|
|
106
107
|
var mergedProps = (0, _utils.mergeProps)(gridCellProps, hoverProps, focusWithinProps, focusProps, selectableItemProps);
|
107
108
|
|
108
109
|
var _useStatusClasses = (0, _hooks.useStatusClasses)(className, {
|
109
|
-
isHovered: isHovered,
|
110
|
+
isHovered: isSelectable && isHovered,
|
110
111
|
isSelected: isSelected,
|
111
112
|
isFocused: isDisabled ? false : isFocusVisible,
|
112
113
|
hasSeparator: hasSeparator
|
@@ -105,7 +105,7 @@ var MultiselectFilter = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref
|
|
105
105
|
}, (0, _react2.jsx)(_index.ListView, {
|
106
106
|
items: items,
|
107
107
|
onSelectionChange: onSelectionChange,
|
108
|
-
selectionMode: "
|
108
|
+
selectionMode: "none",
|
109
109
|
style: {
|
110
110
|
width: '100%'
|
111
111
|
},
|
@@ -30,22 +30,32 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
30
30
|
|
31
31
|
var MultiselectFilterItem = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
32
32
|
var text = props.text,
|
33
|
-
icon = props.icon
|
33
|
+
icon = props.icon,
|
34
|
+
isDefaultSelected = props.isDefaultSelected,
|
35
|
+
onPress = props.onPress;
|
36
|
+
var iconElement = icon && (0, _react2.jsx)(_index.Icon, {
|
37
|
+
"data-testid": "multiselect-filter-data-icon",
|
38
|
+
icon: icon,
|
39
|
+
color: isDefaultSelected ? 'neutral.10' : 'active',
|
40
|
+
size: 13
|
41
|
+
});
|
34
42
|
return (0, _react2.jsx)(_index.Box, {
|
35
43
|
"data-testid": "multiselect-filter-item",
|
36
44
|
isRow: true,
|
37
|
-
justifyContent: "space-between",
|
38
45
|
ref: ref
|
39
46
|
}, (0, _react2.jsx)(_index.Text, {
|
40
47
|
variant: "multiselectFilterItem"
|
41
|
-
}, text),
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
48
|
+
}, text), iconElement && (isDefaultSelected ? iconElement : (0, _react2.jsx)(_index.IconButton, {
|
49
|
+
sx: {
|
50
|
+
width: 13,
|
51
|
+
height: 13,
|
52
|
+
alignSelf: 'auto',
|
53
|
+
'& path': {
|
54
|
+
fill: 'inherit'
|
55
|
+
}
|
56
|
+
},
|
57
|
+
onPress: onPress
|
58
|
+
}, iconElement)));
|
49
59
|
});
|
50
60
|
MultiselectFilterItem.propTypes = {
|
51
61
|
/**
|
@@ -56,7 +66,18 @@ MultiselectFilterItem.propTypes = {
|
|
56
66
|
/**
|
57
67
|
* List icon.
|
58
68
|
*/
|
59
|
-
icon: _propTypes["default"].shape({})
|
69
|
+
icon: _propTypes["default"].shape({}),
|
70
|
+
|
71
|
+
/**
|
72
|
+
* Whether the element is default selected
|
73
|
+
* and has to use Icon element instead of IconButton
|
74
|
+
*/
|
75
|
+
isDefaultSelected: _propTypes["default"].bool,
|
76
|
+
|
77
|
+
/**
|
78
|
+
* Handler that is called at the press on icon button
|
79
|
+
*/
|
80
|
+
onPress: _propTypes["default"].func
|
60
81
|
};
|
61
82
|
MultiselectFilterItem.displayName = 'MultiselectFilterItem';
|
62
83
|
var _default = MultiselectFilterItem;
|
@@ -42,7 +42,7 @@ test('default multiselectFilter', function () {
|
|
42
42
|
expect(icon).not.toBeInTheDocument();
|
43
43
|
expect(multiselectFilterItem).toBeInTheDocument();
|
44
44
|
});
|
45
|
-
test('icon displays when icon prop is present', function () {
|
45
|
+
test('icon button displays when icon prop is present', function () {
|
46
46
|
getComponent({
|
47
47
|
icon: _FilterIcon["default"]
|
48
48
|
});
|
@@ -50,4 +50,16 @@ test('icon displays when icon prop is present', function () {
|
|
50
50
|
var icon = _testWrapper.screen.getByTestId(iconId);
|
51
51
|
|
52
52
|
expect(icon).toBeInTheDocument();
|
53
|
+
expect(icon.parentElement).toBeInstanceOf(HTMLButtonElement);
|
54
|
+
});
|
55
|
+
test('icon displays when icon prop is present and default selected', function () {
|
56
|
+
getComponent({
|
57
|
+
icon: _FilterIcon["default"],
|
58
|
+
isDefaultSelected: true
|
59
|
+
});
|
60
|
+
|
61
|
+
var icon = _testWrapper.screen.getByTestId(iconId);
|
62
|
+
|
63
|
+
expect(icon).toBeInTheDocument();
|
64
|
+
expect(icon.parentElement).not.toBeInstanceOf(HTMLButtonElement);
|
53
65
|
});
|
@@ -31,7 +31,11 @@ var ExtendedText = ( /*#__PURE__*/0, _base["default"])(_themeUi.Text, process.en
|
|
31
31
|
} : {
|
32
32
|
target: "eifd86o0",
|
33
33
|
label: "ExtendedText"
|
34
|
-
})(_styledSystem.layout, _styledSystem.flexbox, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
34
|
+
})(_styledSystem.layout, _styledSystem.flexbox, _styledSystem.typography, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1RleHQvVGV4dC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRcUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvVGV4dC9UZXh0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBsYXlvdXQsIGZsZXhib3gsIHR5cG9ncmFwaHkgfSBmcm9tICdzdHlsZWQtc3lzdGVtJztcbmltcG9ydCB7IFRleHQgYXMgVGhlbWVVSVRleHQgfSBmcm9tICd0aGVtZS11aSc7XG5cbmltcG9ydCB7IHRleHRWYXJpYW50cyB9IGZyb20gJy4uLy4uL3V0aWxzL2RldlV0aWxzL2NvbnN0YW50cy92YXJpYW50cyc7XG5cbmNvbnN0IEV4dGVuZGVkVGV4dCA9IHN0eWxlZChUaGVtZVVJVGV4dCkobGF5b3V0LCBmbGV4Ym94LCB0eXBvZ3JhcGh5KTtcblxuLyoqXG4gKiBUaGUgVGV4dCBjb21wb25lbnQgaXMgdXNlZCBmb3IgZGlzcGxheWluZyB0ZXh0LlxuICogVGV4dCBzdXBwb3J0cyBbVHlwb2dyYXBoeSBQcm9wcyBmcm9tIFN0eWxlZCBTeXN0ZW0gXShodHRwczovL3N0eWxlZC1zeXN0ZW0uY29tL3RhYmxlLyN0eXBvZ3JhcGh5KS5cbiAqL1xuXG5jb25zdCBUZXh0ID0gUmVhY3QuZm9yd2FyZFJlZigocHJvcHMsIHJlZikgPT4gKFxuICA8RXh0ZW5kZWRUZXh0IHZhcmlhbnQ9XCJiYXNlXCIgey4uLnByb3BzfSByZWY9e3JlZn0gLz5cbikpO1xuXG5UZXh0LnByb3BUeXBlcyA9IHtcbiAgdmFyaWFudDogUHJvcFR5cGVzLnN0cmluZyxcbn07XG5cblxuVGV4dC5kZWZhdWx0UHJvcHMgPSB7XG4gIHZhcmlhbnQ6IHRleHRWYXJpYW50cy5CQVNFLFxufTtcblxuVGV4dC5kaXNwbGF5TmFtZSA9ICdUZXh0JztcblxuZXhwb3J0IGRlZmF1bHQgVGV4dDtcbiJdfQ== */");
|
35
|
+
/**
|
36
|
+
* The Text component is used for displaying text.
|
37
|
+
* Text supports [Typography Props from Styled System ](https://styled-system.com/table/#typography).
|
38
|
+
*/
|
35
39
|
|
36
40
|
var Text = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
37
41
|
return (0, _react2.jsx)(ExtendedText, (0, _extends2["default"])({
|
@@ -8,7 +8,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
9
9
|
});
|
10
10
|
|
11
|
-
exports["default"] = exports.WithCustomWidth = exports.Default = void 0;
|
11
|
+
exports["default"] = exports.WithCustomWidth = exports.TypographyStyleProps = exports.Default = void 0;
|
12
12
|
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
14
14
|
|
@@ -24,6 +24,8 @@ var _values = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-sta
|
|
24
24
|
|
25
25
|
var _react = _interopRequireDefault(require("react"));
|
26
26
|
|
27
|
+
var _themeUi = require("theme-ui");
|
28
|
+
|
27
29
|
var _Text = _interopRequireDefault(require("./Text"));
|
28
30
|
|
29
31
|
var _variants = require("../../utils/devUtils/constants/variants.js");
|
@@ -123,4 +125,56 @@ var WithCustomWidth = function WithCustomWidth() {
|
|
123
125
|
}, "superlongtextinonelinewithnowhitespacessoitcanbelongerthatanywidth"));
|
124
126
|
};
|
125
127
|
|
126
|
-
exports.WithCustomWidth = WithCustomWidth;
|
128
|
+
exports.WithCustomWidth = WithCustomWidth;
|
129
|
+
|
130
|
+
var TypographyStyleProps = function TypographyStyleProps() {
|
131
|
+
var textProps = {
|
132
|
+
fontFamily: 'times',
|
133
|
+
fontSize: 'md',
|
134
|
+
fontWeight: 900,
|
135
|
+
lineHeight: '2em',
|
136
|
+
letterSpacing: '5px',
|
137
|
+
textAlign: 'right',
|
138
|
+
fontStyle: 'italic'
|
139
|
+
};
|
140
|
+
var loremText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.';
|
141
|
+
return (0, _react2.jsx)(_index.Box, {
|
142
|
+
p: "xx",
|
143
|
+
gap: "md"
|
144
|
+
}, (0, _react2.jsx)(_Text["default"], {
|
145
|
+
variant: "title"
|
146
|
+
}, "The Text component allows typography style props to be passed in directly."), (0, _react2.jsx)(_Text["default"], textProps, loremText), (0, _react2.jsx)(_themeUi.Divider, null), (0, _react2.jsx)(_Text["default"], {
|
147
|
+
variant: "title"
|
148
|
+
}, "Typography styles can also be passed in through the sx prop for the same result."), (0, _react2.jsx)(_Text["default"], {
|
149
|
+
sx: textProps
|
150
|
+
}, loremText));
|
151
|
+
};
|
152
|
+
|
153
|
+
exports.TypographyStyleProps = TypographyStyleProps;
|
154
|
+
TypographyStyleProps.argTypes = {
|
155
|
+
variant: {
|
156
|
+
control: {
|
157
|
+
type: 'none'
|
158
|
+
}
|
159
|
+
},
|
160
|
+
children: {
|
161
|
+
control: {
|
162
|
+
type: 'none'
|
163
|
+
}
|
164
|
+
},
|
165
|
+
color: {
|
166
|
+
control: {
|
167
|
+
type: 'none'
|
168
|
+
}
|
169
|
+
},
|
170
|
+
bg: {
|
171
|
+
control: {
|
172
|
+
type: 'none'
|
173
|
+
}
|
174
|
+
},
|
175
|
+
tabPanelProps: {
|
176
|
+
control: {
|
177
|
+
type: 'none'
|
178
|
+
}
|
179
|
+
}
|
180
|
+
};
|
@@ -2,6 +2,24 @@
|
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
4
|
|
5
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
+
|
7
|
+
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
8
|
+
|
9
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
10
|
+
|
11
|
+
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
12
|
+
|
13
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
14
|
+
|
15
|
+
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
16
|
+
|
17
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
18
|
+
|
19
|
+
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
20
|
+
|
21
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
22
|
+
|
5
23
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
6
24
|
|
7
25
|
var _react = _interopRequireDefault(require("react"));
|
@@ -18,6 +36,10 @@ var _testTheme = _interopRequireDefault(require("../../utils/testUtils/testTheme
|
|
18
36
|
|
19
37
|
var _react2 = require("@emotion/react");
|
20
38
|
|
39
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
40
|
+
|
41
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
42
|
+
|
21
43
|
var testId = 'test-text';
|
22
44
|
var defaultProps = {
|
23
45
|
'data-testid': testId
|
@@ -40,4 +62,28 @@ test('default text', function () {
|
|
40
62
|
|
41
63
|
expect(text).toBeInstanceOf(HTMLSpanElement);
|
42
64
|
expect(text).toBeInTheDocument();
|
65
|
+
});
|
66
|
+
test('typography props will be applied', function () {
|
67
|
+
var customTypographyProps = {
|
68
|
+
fontFamily: 'times',
|
69
|
+
fontSize: 'xx',
|
70
|
+
fontWeight: 900,
|
71
|
+
lineHeight: '2em',
|
72
|
+
letterSpacing: '5px',
|
73
|
+
textAlign: 'right',
|
74
|
+
fontStyle: 'italic'
|
75
|
+
};
|
76
|
+
getComponent(_objectSpread({}, customTypographyProps));
|
77
|
+
|
78
|
+
var text = _testWrapper.screen.getByTestId(testId);
|
79
|
+
|
80
|
+
expect(text).toHaveStyle({
|
81
|
+
fontFamily: 'times',
|
82
|
+
fontSize: '23px',
|
83
|
+
fontWeight: 900,
|
84
|
+
lineHeight: '2em',
|
85
|
+
letterSpacing: '5px',
|
86
|
+
textAlign: 'right',
|
87
|
+
fontStyle: 'italic'
|
88
|
+
});
|
43
89
|
});
|
@@ -187,16 +187,16 @@ var TimeZonePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
187
187
|
return aNum - bNum;
|
188
188
|
};
|
189
189
|
|
190
|
-
var
|
191
|
-
|
190
|
+
var checkIsSelectedItem = function checkIsSelectedItem() {
|
191
|
+
return (0, _filter["default"])(timeZones).call(timeZones, function (tz) {
|
192
|
+
return tz.timeZone === search;
|
193
|
+
}).length > 0;
|
194
|
+
};
|
192
195
|
|
193
|
-
|
194
|
-
|
195
|
-
key: emptySearchText
|
196
|
-
}, emptySearchText);
|
197
|
-
}
|
196
|
+
var renderTimeZones = function renderTimeZones(timeZonesToRender) {
|
197
|
+
var _context7;
|
198
198
|
|
199
|
-
return (0, _map["default"])(_context7 = (0, _sort["default"])(
|
199
|
+
return (0, _map["default"])(_context7 = (0, _sort["default"])(timeZonesToRender).call(timeZonesToRender, sortByGMT)).call(_context7, function (_ref4) {
|
200
200
|
var gmt = _ref4.gmt,
|
201
201
|
time = _ref4.time,
|
202
202
|
timeZone = _ref4.timeZone;
|
@@ -218,7 +218,17 @@ var TimeZonePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
218
218
|
variant: "timeZone.time"
|
219
219
|
}, time))));
|
220
220
|
});
|
221
|
-
}
|
221
|
+
};
|
222
|
+
|
223
|
+
var items = (0, _react.useMemo)(function () {
|
224
|
+
if (filteredTimezones.length === 0) {
|
225
|
+
return (0, _react2.jsx)(_index.Item, {
|
226
|
+
key: emptySearchText
|
227
|
+
}, emptySearchText);
|
228
|
+
}
|
229
|
+
|
230
|
+
return renderTimeZones(checkIsSelectedItem() ? timeZones : filteredTimezones);
|
231
|
+
}, [emptySearchText, filteredTimezones, search, timeZones]);
|
222
232
|
var comboBoxFieldProps = (0, _react.useMemo)(function () {
|
223
233
|
return _objectSpread({
|
224
234
|
controlProps: {
|
@@ -239,7 +249,8 @@ var TimeZonePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
239
249
|
}, otherProps);
|
240
250
|
}, [emptySearchText, filteredTimezones, otherProps]);
|
241
251
|
return (0, _react2.jsx)(_index.ComboBoxField, (0, _extends2["default"])({}, comboBoxFieldProps, {
|
242
|
-
disabledKeys: [emptySearchText]
|
252
|
+
disabledKeys: [emptySearchText],
|
253
|
+
menuTrigger: "focus"
|
243
254
|
}), items);
|
244
255
|
});
|
245
256
|
TimeZonePicker.propTypes = {
|