@pingux/astro 1.4.1 → 1.5.0-alpha.1
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/ListView/ListView.js +12 -13
- package/lib/cjs/components/ListView/ListView.test.js +8 -8
- package/lib/cjs/components/ListViewItem/ListViewItem.js +0 -2
- package/lib/cjs/components/MultiselectFilter/MultiselectFilter.js +143 -0
- package/lib/cjs/components/MultiselectFilter/MultiselectFilter.stories.js +283 -0
- package/lib/cjs/components/MultiselectFilter/MultiselectFilter.test.js +83 -0
- package/lib/cjs/components/MultiselectFilter/index.js +18 -0
- package/lib/cjs/components/MultiselectFilterItem/MultiselectFilterItem.js +55 -0
- package/lib/cjs/components/MultiselectFilterItem/MultiselectFilterItem.test.js +53 -0
- package/lib/cjs/components/MultiselectFilterItem/index.js +18 -0
- package/lib/cjs/components/MultiselectListContainer/MultiselectBadge.js +47 -0
- package/lib/cjs/components/MultiselectListContainer/MultiselectBadge.test.js +48 -0
- package/lib/cjs/components/MultiselectListContainer/MultiselectListContainer.js +157 -0
- package/lib/cjs/components/MultiselectListContainer/MultiselectListContainer.test.js +112 -0
- package/lib/cjs/components/MultiselectListContainer/index.js +18 -0
- package/lib/cjs/components/PopoverMenu/PopoverMenu.js +7 -2
- package/lib/cjs/components/Tab/Tab.js +22 -15
- package/lib/cjs/components/TabPicker/TabPicker.js +239 -0
- package/lib/cjs/components/TabPicker/index.js +18 -0
- package/lib/cjs/components/Tabs/Tabs.js +46 -13
- package/lib/cjs/components/Tabs/Tabs.stories.js +32 -2
- package/lib/cjs/components/Tabs/Tabs.test.js +183 -32
- package/lib/cjs/index.js +98 -32
- package/lib/cjs/styles/variants/buttons.js +38 -1
- package/lib/cjs/styles/variants/multiselectListContainer.js +73 -0
- package/lib/cjs/styles/variants/tabs.js +5 -1
- package/lib/cjs/styles/variants/text.js +29 -2
- package/lib/cjs/styles/variants/variants.js +3 -0
- package/lib/components/ListView/ListView.js +12 -13
- package/lib/components/ListView/ListView.test.js +8 -8
- package/lib/components/ListViewItem/ListViewItem.js +0 -2
- package/lib/components/MultiselectFilter/MultiselectFilter.js +118 -0
- package/lib/components/MultiselectFilter/MultiselectFilter.stories.js +251 -0
- package/lib/components/MultiselectFilter/MultiselectFilter.test.js +69 -0
- package/lib/components/MultiselectFilter/index.js +1 -0
- package/lib/components/MultiselectFilterItem/MultiselectFilterItem.js +36 -0
- package/lib/components/MultiselectFilterItem/MultiselectFilterItem.test.js +37 -0
- package/lib/components/MultiselectFilterItem/index.js +1 -0
- package/lib/components/MultiselectListContainer/MultiselectBadge.js +31 -0
- package/lib/components/MultiselectListContainer/MultiselectBadge.test.js +34 -0
- package/lib/components/MultiselectListContainer/MultiselectListContainer.js +123 -0
- package/lib/components/MultiselectListContainer/MultiselectListContainer.test.js +81 -0
- package/lib/components/MultiselectListContainer/index.js +1 -0
- package/lib/components/PopoverMenu/PopoverMenu.js +7 -2
- package/lib/components/Tab/Tab.js +14 -8
- package/lib/components/TabPicker/TabPicker.js +210 -0
- package/lib/components/TabPicker/index.js +1 -0
- package/lib/components/Tabs/Tabs.js +44 -11
- package/lib/components/Tabs/Tabs.stories.js +27 -0
- package/lib/components/Tabs/Tabs.test.js +165 -32
- package/lib/index.js +6 -0
- package/lib/styles/variants/buttons.js +38 -1
- package/lib/styles/variants/multiselectListContainer.js +63 -0
- package/lib/styles/variants/tabs.js +5 -1
- package/lib/styles/variants/text.js +29 -2
- package/lib/styles/variants/variants.js +2 -0
- package/package.json +1 -1
@@ -4,6 +4,7 @@ import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerat
|
|
4
4
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
5
5
|
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
6
6
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
7
|
+
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
7
8
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
8
9
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
9
10
|
import React from 'react';
|
@@ -33,6 +34,21 @@ var defaultTabs = [{
|
|
33
34
|
name: 'Tab 3',
|
34
35
|
children: 'Tab 3 body'
|
35
36
|
}];
|
37
|
+
var tabsWithList = [{
|
38
|
+
name: 'Tab 1',
|
39
|
+
children: 'Tab 1 body'
|
40
|
+
}, {
|
41
|
+
name: 'Tab 2',
|
42
|
+
list: [{
|
43
|
+
key: 'tab1list',
|
44
|
+
name: 'Tab 1 list',
|
45
|
+
children: 'Tab 1 from list'
|
46
|
+
}, {
|
47
|
+
key: 'tab2list',
|
48
|
+
name: 'Tab 2 list',
|
49
|
+
children: 'Tab 2 from list'
|
50
|
+
}]
|
51
|
+
}];
|
36
52
|
var defaultProps = {
|
37
53
|
'data-testid': testId,
|
38
54
|
defaultSelectedKey: defaultTabs[0].name
|
@@ -60,6 +76,21 @@ var getComponent = function getComponent() {
|
|
60
76
|
}))));
|
61
77
|
};
|
62
78
|
|
79
|
+
var getComponentWithDynamicItems = function getComponentWithDynamicItems(props) {
|
80
|
+
return render(___EmotionJSX(CacheProvider, {
|
81
|
+
value: emotionCache
|
82
|
+
}, ___EmotionJSX(Tabs, props, function (_ref3) {
|
83
|
+
var name = _ref3.name,
|
84
|
+
children = _ref3.children,
|
85
|
+
tabProps = _objectWithoutProperties(_ref3, ["name", "children"]);
|
86
|
+
|
87
|
+
return ___EmotionJSX(Tab, _extends({
|
88
|
+
key: name,
|
89
|
+
title: name
|
90
|
+
}, tabProps), children);
|
91
|
+
})));
|
92
|
+
};
|
93
|
+
|
63
94
|
var getTabs = function getTabs() {
|
64
95
|
var tabs = screen.queryAllByRole('tab');
|
65
96
|
|
@@ -77,8 +108,8 @@ var getTabs = function getTabs() {
|
|
77
108
|
};
|
78
109
|
|
79
110
|
var testTabPanel = function testTabPanel(expectedTabIndex) {
|
80
|
-
return _forEachInstanceProperty(defaultTabs).call(defaultTabs, function (
|
81
|
-
var children =
|
111
|
+
return _forEachInstanceProperty(defaultTabs).call(defaultTabs, function (_ref4, index) {
|
112
|
+
var children = _ref4.children;
|
82
113
|
return index === expectedTabIndex ? expect(screen.queryByText(children)).toBeInTheDocument() : expect(screen.queryByText(children)).not.toBeInTheDocument();
|
83
114
|
});
|
84
115
|
};
|
@@ -138,7 +169,7 @@ test('interacting with tabs via click', function () {
|
|
138
169
|
testSingleTab(tabs, tab0, 'toContainElement', [screen.getByRole('presentation')]);
|
139
170
|
testTabPanel(0);
|
140
171
|
});
|
141
|
-
test('interacting with tabs
|
172
|
+
test('interacting with tabs with manual activation', function () {
|
142
173
|
getComponent();
|
143
174
|
|
144
175
|
var _getTabs2 = getTabs(),
|
@@ -150,6 +181,36 @@ test('interacting with tabs via focus -- horizontal', function () {
|
|
150
181
|
return expect(tab).not.toHaveFocus();
|
151
182
|
});
|
152
183
|
|
184
|
+
userEvent.tab();
|
185
|
+
testSingleTab(tabs, tab0, 'toHaveFocus');
|
186
|
+
testTabPanel(0);
|
187
|
+
fireEvent.keyDown(tab0, {
|
188
|
+
key: 'ArrowRight',
|
189
|
+
code: 'ArrowRight'
|
190
|
+
});
|
191
|
+
testSingleTab(tabs, tab1, 'toHaveFocus');
|
192
|
+
testTabPanel(0);
|
193
|
+
fireEvent.keyDown(tab1, {
|
194
|
+
key: 'Enter',
|
195
|
+
code: 'Enter'
|
196
|
+
});
|
197
|
+
testSingleTab(tabs, tab1, 'toHaveFocus');
|
198
|
+
testTabPanel(1);
|
199
|
+
});
|
200
|
+
test('interacting with tabs via focus -- horizontal', function () {
|
201
|
+
getComponent({
|
202
|
+
keyboardActivation: 'automatic'
|
203
|
+
});
|
204
|
+
|
205
|
+
var _getTabs3 = getTabs(),
|
206
|
+
tabs = _getTabs3.tabs,
|
207
|
+
tab0 = _getTabs3.tab0,
|
208
|
+
tab1 = _getTabs3.tab1;
|
209
|
+
|
210
|
+
_forEachInstanceProperty(tabs).call(tabs, function (tab) {
|
211
|
+
return expect(tab).not.toHaveFocus();
|
212
|
+
});
|
213
|
+
|
153
214
|
userEvent.tab();
|
154
215
|
testSingleTab(tabs, tab0, 'toHaveFocus');
|
155
216
|
testTabPanel(0);
|
@@ -168,13 +229,14 @@ test('interacting with tabs via focus -- horizontal', function () {
|
|
168
229
|
});
|
169
230
|
test('interacting with tabs via focus -- vertical', function () {
|
170
231
|
getComponent({
|
171
|
-
orientation: 'vertical'
|
232
|
+
orientation: 'vertical',
|
233
|
+
keyboardActivation: 'automatic'
|
172
234
|
});
|
173
235
|
|
174
|
-
var
|
175
|
-
tabs =
|
176
|
-
tab0 =
|
177
|
-
tab1 =
|
236
|
+
var _getTabs4 = getTabs(),
|
237
|
+
tabs = _getTabs4.tabs,
|
238
|
+
tab0 = _getTabs4.tab0,
|
239
|
+
tab1 = _getTabs4.tab1;
|
178
240
|
|
179
241
|
_forEachInstanceProperty(tabs).call(tabs, function (tab) {
|
180
242
|
return expect(tab).not.toHaveFocus();
|
@@ -201,9 +263,9 @@ test('disabled all tabs', function () {
|
|
201
263
|
isDisabled: true
|
202
264
|
});
|
203
265
|
|
204
|
-
var
|
205
|
-
tab0 =
|
206
|
-
tab1 =
|
266
|
+
var _getTabs5 = getTabs(),
|
267
|
+
tab0 = _getTabs5.tab0,
|
268
|
+
tab1 = _getTabs5.tab1;
|
207
269
|
|
208
270
|
var tabLine = screen.queryByRole('presentation'); // Tabs cannot be DOM disabled so must check visuals
|
209
271
|
|
@@ -222,15 +284,16 @@ test('disabled all tabs', function () {
|
|
222
284
|
});
|
223
285
|
test('disabled tab is not accessible on click or focus', function () {
|
224
286
|
getComponent({
|
225
|
-
disabledKeys: [defaultTabs[1].name]
|
287
|
+
disabledKeys: [defaultTabs[1].name],
|
288
|
+
keyboardActivation: 'automatic'
|
226
289
|
});
|
227
290
|
testTabPanel(0);
|
228
291
|
|
229
|
-
var
|
230
|
-
tabs =
|
231
|
-
tab0 =
|
232
|
-
tab1 =
|
233
|
-
tab2 =
|
292
|
+
var _getTabs6 = getTabs(),
|
293
|
+
tabs = _getTabs6.tabs,
|
294
|
+
tab0 = _getTabs6.tab0,
|
295
|
+
tab1 = _getTabs6.tab1,
|
296
|
+
tab2 = _getTabs6.tab2; // Ensure that clicking a disabled tab does nothing
|
234
297
|
|
235
298
|
|
236
299
|
userEvent.click(tab1);
|
@@ -255,11 +318,11 @@ test('controlled tabs', function () {
|
|
255
318
|
}),
|
256
319
|
rerender = _getComponent.rerender;
|
257
320
|
|
258
|
-
var
|
259
|
-
tabs =
|
260
|
-
tab0 =
|
261
|
-
tab1 =
|
262
|
-
tab2 =
|
321
|
+
var _getTabs7 = getTabs(),
|
322
|
+
tabs = _getTabs7.tabs,
|
323
|
+
tab0 = _getTabs7.tab0,
|
324
|
+
tab1 = _getTabs7.tab1,
|
325
|
+
tab2 = _getTabs7.tab2; // Expect the second tab to be selected
|
263
326
|
|
264
327
|
|
265
328
|
expect(onSelectionChange).not.toHaveBeenCalled();
|
@@ -296,9 +359,9 @@ test('tab line props', function () {
|
|
296
359
|
}),
|
297
360
|
rerender = _getComponent2.rerender;
|
298
361
|
|
299
|
-
var
|
300
|
-
tabs =
|
301
|
-
tab0 =
|
362
|
+
var _getTabs8 = getTabs(),
|
363
|
+
tabs = _getTabs8.tabs,
|
364
|
+
tab0 = _getTabs8.tab0;
|
302
365
|
|
303
366
|
var tabLine = screen.getByRole('presentation'); // Expect the tab line to have a red background
|
304
367
|
|
@@ -327,16 +390,16 @@ test('tab with icon', function () {
|
|
327
390
|
tabs: newTabs
|
328
391
|
});
|
329
392
|
|
330
|
-
var
|
331
|
-
tabs =
|
332
|
-
tab0 =
|
393
|
+
var _getTabs9 = getTabs(),
|
394
|
+
tabs = _getTabs9.tabs,
|
395
|
+
tab0 = _getTabs9.tab0;
|
333
396
|
|
334
397
|
var icon = screen.getByTestId('icon'); // Expect the tab to have the given icon element
|
335
398
|
|
336
399
|
testSingleTab(tabs, tab0, 'toContainElement', [icon]);
|
337
400
|
});
|
338
401
|
test('tooltip renders on tab\'s hover in `tooltip` mode', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
339
|
-
var
|
402
|
+
var _getTabs10, tab0;
|
340
403
|
|
341
404
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
342
405
|
while (1) {
|
@@ -346,7 +409,7 @@ test('tooltip renders on tab\'s hover in `tooltip` mode', /*#__PURE__*/_asyncToG
|
|
346
409
|
mode: 'tooltip'
|
347
410
|
});
|
348
411
|
expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
|
349
|
-
|
412
|
+
_getTabs10 = getTabs(), tab0 = _getTabs10.tab0;
|
350
413
|
fireEvent.mouseMove(tab0);
|
351
414
|
fireEvent.mouseEnter(tab0);
|
352
415
|
|
@@ -370,8 +433,8 @@ test('tabs without selected keys show null tab panel content', function () {
|
|
370
433
|
test('hover tab style', function () {
|
371
434
|
getComponent();
|
372
435
|
|
373
|
-
var
|
374
|
-
tab0 =
|
436
|
+
var _getTabs11 = getTabs(),
|
437
|
+
tab0 = _getTabs11.tab0;
|
375
438
|
|
376
439
|
expect(tab0).not.toHaveClass('is-hovered');
|
377
440
|
userEvent.hover(tab0);
|
@@ -414,4 +477,74 @@ test('will render slots.afterTab if provided', function () {
|
|
414
477
|
tabs: tabs
|
415
478
|
});
|
416
479
|
expect(screen.getByText(testText)).toBeInTheDocument();
|
480
|
+
});
|
481
|
+
test('will render tab with list if provided', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
482
|
+
var _getTabs12, menuBtn, menuItems, firstListItemContent;
|
483
|
+
|
484
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
485
|
+
while (1) {
|
486
|
+
switch (_context2.prev = _context2.next) {
|
487
|
+
case 0:
|
488
|
+
getComponentWithDynamicItems({
|
489
|
+
items: tabsWithList,
|
490
|
+
mode: 'list'
|
491
|
+
});
|
492
|
+
testTabPanel(0);
|
493
|
+
_getTabs12 = getTabs(), menuBtn = _getTabs12.tab1.parentElement;
|
494
|
+
userEvent.click(menuBtn);
|
495
|
+
expect(screen.queryByRole('menu')).toBeInTheDocument();
|
496
|
+
testTabPanel(0);
|
497
|
+
menuItems = screen.queryAllByRole('menuitemradio');
|
498
|
+
expect(menuItems).toHaveLength(tabsWithList[1].list.length);
|
499
|
+
expect(menuItems[0]).not.toHaveFocus();
|
500
|
+
userEvent.click(menuItems[0]);
|
501
|
+
firstListItemContent = tabsWithList[1].list[0].children;
|
502
|
+
expect(screen.queryByRole('tabpanel')).toHaveTextContent(firstListItemContent);
|
503
|
+
expect(screen.queryByRole('menu')).not.toBeInTheDocument();
|
504
|
+
|
505
|
+
case 13:
|
506
|
+
case "end":
|
507
|
+
return _context2.stop();
|
508
|
+
}
|
509
|
+
}
|
510
|
+
}, _callee2);
|
511
|
+
})));
|
512
|
+
test('tab list is accessible via keyboard', function () {
|
513
|
+
getComponentWithDynamicItems({
|
514
|
+
items: tabsWithList,
|
515
|
+
mode: 'list'
|
516
|
+
});
|
517
|
+
|
518
|
+
var _getTabs13 = getTabs(),
|
519
|
+
tabs = _getTabs13.tabs,
|
520
|
+
tab0 = _getTabs13.tab0,
|
521
|
+
tab1 = _getTabs13.tab1;
|
522
|
+
|
523
|
+
_forEachInstanceProperty(tabs).call(tabs, function (tab) {
|
524
|
+
return expect(tab).not.toHaveFocus();
|
525
|
+
});
|
526
|
+
|
527
|
+
userEvent.tab();
|
528
|
+
testTabPanel(0);
|
529
|
+
fireEvent.keyDown(tab0, {
|
530
|
+
key: 'ArrowRight',
|
531
|
+
code: 'ArrowRight'
|
532
|
+
});
|
533
|
+
expect(tab1).toHaveFocus();
|
534
|
+
fireEvent.keyDown(tab1, {
|
535
|
+
key: 'Enter',
|
536
|
+
code: 'Enter'
|
537
|
+
});
|
538
|
+
expect(screen.queryByRole('menu')).toBeInTheDocument();
|
539
|
+
testTabPanel(0);
|
540
|
+
var menuItems = screen.queryAllByRole('menuitemradio');
|
541
|
+
expect(menuItems).toHaveLength(tabsWithList[1].list.length);
|
542
|
+
expect(menuItems[0]).toHaveFocus();
|
543
|
+
fireEvent.keyDown(menuItems[0], {
|
544
|
+
key: 'Enter',
|
545
|
+
code: 'Enter'
|
546
|
+
});
|
547
|
+
var firstListItemContent = tabsWithList[1].list[0].children;
|
548
|
+
expect(screen.queryByRole('tabpanel')).toHaveTextContent(firstListItemContent);
|
549
|
+
expect(screen.queryByRole('menu')).not.toBeInTheDocument();
|
417
550
|
});
|
package/lib/index.js
CHANGED
@@ -72,6 +72,12 @@ export { default as Messages } from './components/Messages';
|
|
72
72
|
export * from './components/Messages';
|
73
73
|
export { default as Modal } from './components/Modal';
|
74
74
|
export * from './components/Modal';
|
75
|
+
export { default as MultiselectFilter } from './components/MultiselectFilter';
|
76
|
+
export * from './components/MultiselectFilter';
|
77
|
+
export { default as MultiselectFilterItem } from './components/MultiselectFilterItem';
|
78
|
+
export * from './components/MultiselectFilterItem';
|
79
|
+
export { default as MultiselectListContainer } from './components/MultiselectListContainer';
|
80
|
+
export * from './components/MultiselectListContainer';
|
75
81
|
export { default as NavBar } from './components/NavBar';
|
76
82
|
export * from './components/NavBar';
|
77
83
|
export { default as NavBarSection } from './components/NavBarSection';
|
@@ -125,6 +125,24 @@ var modalCloseButton = _objectSpread(_objectSpread({}, iconButton), {}, {
|
|
125
125
|
right: 10
|
126
126
|
});
|
127
127
|
|
128
|
+
var multiselectToggle = _objectSpread(_objectSpread({}, square), {}, {
|
129
|
+
bg: 'accent.99',
|
130
|
+
height: '40px',
|
131
|
+
minWidth: 'max-content',
|
132
|
+
pl: '0px',
|
133
|
+
ml: '10px',
|
134
|
+
path: {
|
135
|
+
fill: 'active'
|
136
|
+
},
|
137
|
+
'&.is-hovered': {
|
138
|
+
backgroundColor: 'accent.99'
|
139
|
+
},
|
140
|
+
'&.is-focused': _objectSpread({}, defaultFocus),
|
141
|
+
'&.is-pressed': {
|
142
|
+
backgroundColor: 'accent.99'
|
143
|
+
}
|
144
|
+
});
|
145
|
+
|
128
146
|
var close = _objectSpread(_objectSpread({}, iconButton), {}, {
|
129
147
|
p: 0,
|
130
148
|
ml: 'auto',
|
@@ -461,6 +479,10 @@ var link = _objectSpread(_objectSpread({}, text), {}, {
|
|
461
479
|
width: 'max-content'
|
462
480
|
});
|
463
481
|
|
482
|
+
var neutralText = _objectSpread(_objectSpread({}, link), {}, {
|
483
|
+
color: 'neutral.10'
|
484
|
+
});
|
485
|
+
|
464
486
|
var expandableRow = {
|
465
487
|
chartWrapper: {
|
466
488
|
display: 'flex',
|
@@ -616,6 +638,18 @@ var colorBlock = {
|
|
616
638
|
borderColor: 'accent.20'
|
617
639
|
}
|
618
640
|
};
|
641
|
+
|
642
|
+
var menuTab = _objectSpread(_objectSpread({}, quiet), {}, {
|
643
|
+
color: 'neutral.40',
|
644
|
+
alignItems: 'center',
|
645
|
+
'&.is-selected *, &.is-hovered *': {
|
646
|
+
color: 'active'
|
647
|
+
},
|
648
|
+
'& + *:not(div:first-of-type)': {
|
649
|
+
'ml': 'md'
|
650
|
+
}
|
651
|
+
});
|
652
|
+
|
619
653
|
export default {
|
620
654
|
accordionHeader: accordionHeader,
|
621
655
|
chipDeleteButton: chipDeleteButton,
|
@@ -657,5 +691,8 @@ export default {
|
|
657
691
|
tooltipChip: tooltipChip,
|
658
692
|
tooltipIconButton: tooltipIconButton,
|
659
693
|
tooltipInline: tooltipInline,
|
660
|
-
colorBlock: colorBlock
|
694
|
+
colorBlock: colorBlock,
|
695
|
+
menuTab: menuTab,
|
696
|
+
multiselectToggle: multiselectToggle,
|
697
|
+
neutralText: neutralText
|
661
698
|
};
|
@@ -0,0 +1,63 @@
|
|
1
|
+
var multiselectListContainer = {
|
2
|
+
height: '40px',
|
3
|
+
overflowX: 'hidden',
|
4
|
+
pr: 'sm',
|
5
|
+
transition: 'right 500ms',
|
6
|
+
'&.is-open': {
|
7
|
+
height: '100%'
|
8
|
+
}
|
9
|
+
};
|
10
|
+
var multiselectListContent = {
|
11
|
+
bg: 'accent.99',
|
12
|
+
fontSize: 'sm',
|
13
|
+
height: '100%',
|
14
|
+
width: '300px',
|
15
|
+
'&.is-focused': {
|
16
|
+
borderColor: 'accent.80',
|
17
|
+
boxShadow: 'focus',
|
18
|
+
outline: 'none'
|
19
|
+
},
|
20
|
+
'& div': {
|
21
|
+
alignItems: 'center',
|
22
|
+
display: 'flex',
|
23
|
+
minHeight: '45px',
|
24
|
+
padding: '3px',
|
25
|
+
width: '100%'
|
26
|
+
}
|
27
|
+
};
|
28
|
+
var multiselectListTitle = {
|
29
|
+
alignContent: 'center',
|
30
|
+
bg: 'accent.99',
|
31
|
+
display: 'flex',
|
32
|
+
fontWeight: '500',
|
33
|
+
minHeight: '40px',
|
34
|
+
alignItems: 'center',
|
35
|
+
padding: '0 10px !important',
|
36
|
+
flexWrap: 'wrap',
|
37
|
+
maxWidth: 'max-content !important',
|
38
|
+
margin: '0 auto'
|
39
|
+
};
|
40
|
+
var multiselectListBadge = {
|
41
|
+
borderRadius: '5px',
|
42
|
+
display: 'flex',
|
43
|
+
height: '17px',
|
44
|
+
justifyContent: 'center',
|
45
|
+
minWidth: 'max-content',
|
46
|
+
position: 'relative',
|
47
|
+
pb: '0px !important',
|
48
|
+
pr: '3px !important',
|
49
|
+
pl: '3px !important',
|
50
|
+
alignItems: 'center',
|
51
|
+
fontWeight: 500
|
52
|
+
};
|
53
|
+
var multiselectFilterItem = {
|
54
|
+
minHeight: '45px',
|
55
|
+
margin: 'auto'
|
56
|
+
};
|
57
|
+
export default {
|
58
|
+
multiselectListContainer: multiselectListContainer,
|
59
|
+
multiselectListContent: multiselectListContent,
|
60
|
+
multiselectListTitle: multiselectListTitle,
|
61
|
+
multiselectListBadge: multiselectListBadge,
|
62
|
+
multiselectFilterItem: multiselectFilterItem
|
63
|
+
};
|
@@ -14,12 +14,16 @@ export var tab = {
|
|
14
14
|
},
|
15
15
|
'&.is-selected.is-vertical': {
|
16
16
|
bg: 'accent.95'
|
17
|
+
},
|
18
|
+
'& > svg': {
|
19
|
+
flexShrink: 0
|
17
20
|
}
|
18
21
|
};
|
19
22
|
export var tabLine = {
|
20
23
|
height: '2px',
|
21
24
|
width: '100%',
|
22
|
-
bg: 'active'
|
25
|
+
bg: 'active',
|
26
|
+
flexShrink: 0
|
23
27
|
};
|
24
28
|
export var tabPanel = {
|
25
29
|
outline: 'none'
|
@@ -30,11 +30,16 @@ var wordWrap = {
|
|
30
30
|
var tabLabel = _objectSpread(_objectSpread(_objectSpread({}, base), wordWrap), {}, {
|
31
31
|
fontSize: 'sm',
|
32
32
|
fontWeight: 1,
|
33
|
-
mb:
|
33
|
+
mb: 'sm',
|
34
|
+
lineHeight: '16px',
|
34
35
|
color: 'neutral.40',
|
36
|
+
height: '100%',
|
35
37
|
'.is-selected &, .is-hovered &': {
|
38
|
+
color: 'active'
|
39
|
+
},
|
40
|
+
'.is-selected &': {
|
36
41
|
color: 'active',
|
37
|
-
mb:
|
42
|
+
mb: 8
|
38
43
|
},
|
39
44
|
'.is-disabled &': {
|
40
45
|
color: 'neutral.80'
|
@@ -141,6 +146,26 @@ var navBarHeaderText = _objectSpread(_objectSpread({}, wordWrap), {}, {
|
|
141
146
|
fontWeight: 1
|
142
147
|
});
|
143
148
|
|
149
|
+
var multiselectFilterItem = _objectSpread(_objectSpread({}, wordWrap), {}, {
|
150
|
+
color: 'neutral.30',
|
151
|
+
fontSize: 'sm',
|
152
|
+
fontWeight: 500,
|
153
|
+
overflow: 'hidden',
|
154
|
+
marginRight: 'xs',
|
155
|
+
textOverflow: 'ellipsis',
|
156
|
+
whiteSpace: 'nowrap'
|
157
|
+
});
|
158
|
+
|
159
|
+
var multiselectFilterTitle = _objectSpread(_objectSpread({}, wordWrap), {}, {
|
160
|
+
fontSize: 'sm',
|
161
|
+
fontWeight: 500,
|
162
|
+
color: 'text.secondary',
|
163
|
+
whiteSpace: 'nowrap',
|
164
|
+
overflow: 'hidden',
|
165
|
+
textOverflow: 'ellipsis',
|
166
|
+
mr: 'xs'
|
167
|
+
});
|
168
|
+
|
144
169
|
var maskedValue = {
|
145
170
|
width: 252,
|
146
171
|
wordBreak: 'break-all',
|
@@ -229,6 +254,8 @@ export var text = {
|
|
229
254
|
}),
|
230
255
|
maskedValue: maskedValue,
|
231
256
|
expandableRow: expandableRow,
|
257
|
+
multiselectFilterItem: multiselectFilterItem,
|
258
|
+
multiselectFilterTitle: multiselectFilterTitle,
|
232
259
|
navBarHeaderText: navBarHeaderText,
|
233
260
|
navBarSubtitle: navBarSubtitle,
|
234
261
|
placeholder: {
|
@@ -34,6 +34,7 @@ import stepper from './stepper';
|
|
34
34
|
import table from './table';
|
35
35
|
import * as tabs from './tabs';
|
36
36
|
import tooltip from './tooltip';
|
37
|
+
import multiselectListContainer from './multiselectListContainer';
|
37
38
|
export default _objectSpread(_objectSpread({
|
38
39
|
accordion: accordion,
|
39
40
|
boxes: boxes,
|
@@ -47,6 +48,7 @@ export default _objectSpread(_objectSpread({
|
|
47
48
|
menuItem: menuItem,
|
48
49
|
messages: messages,
|
49
50
|
modal: modal,
|
51
|
+
multiselectListContainer: multiselectListContainer,
|
50
52
|
navBar: navBar,
|
51
53
|
numberField: numberField,
|
52
54
|
overlayPanel: overlayPanel,
|