@pingux/astro 1.5.0-alpha.0 → 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.
@@ -1,20 +1,21 @@
1
1
  import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
2
2
  import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
3
3
  import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
4
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
5
4
  import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
6
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
7
5
  import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
8
6
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
9
7
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
10
8
  import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
11
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
9
+ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
12
10
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
11
+ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
12
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
13
+ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
13
14
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
14
15
 
15
16
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
16
17
 
17
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context2; _forEachInstanceProperty(_context2 = ownKeys(Object(source), true)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { var _context3; _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
18
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context6; _forEachInstanceProperty(_context6 = ownKeys(Object(source), true)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { var _context7; _forEachInstanceProperty(_context7 = ownKeys(Object(source))).call(_context7, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
18
19
 
19
20
  import React, { forwardRef, useImperativeHandle, useRef } from 'react';
20
21
  import PropTypes from 'prop-types';
@@ -27,16 +28,17 @@ import { usePropWarning } from '../../hooks';
27
28
  import { jsx as ___EmotionJSX } from "@emotion/react";
28
29
  export var TabsContext = /*#__PURE__*/React.createContext({});
29
30
  var Tabs = /*#__PURE__*/forwardRef(function (props, ref) {
30
- var _context;
31
+ var _context4, _context5;
31
32
 
32
33
  var children = props.children,
33
34
  isDisabled = props.isDisabled,
35
+ items = props.items,
34
36
  onSelectionChange = props.onSelectionChange,
35
37
  orientation = props.orientation,
36
38
  mode = props.mode,
37
39
  tabListProps = props.tabListProps,
38
40
  tabPanelProps = props.tabPanelProps,
39
- others = _objectWithoutProperties(props, ["children", "isDisabled", "onSelectionChange", "orientation", "mode", "tabListProps", "tabPanelProps"]);
41
+ others = _objectWithoutProperties(props, ["children", "isDisabled", "items", "onSelectionChange", "orientation", "mode", "tabListProps", "tabPanelProps"]);
40
42
 
41
43
  var tabListRef = useRef();
42
44
  usePropWarning(props, 'disabled', 'isDisabled');
@@ -51,8 +53,31 @@ var Tabs = /*#__PURE__*/forwardRef(function (props, ref) {
51
53
  useImperativeHandle(ref, function () {
52
54
  return tabPanelRef.current;
53
55
  });
56
+ var allItems = [];
57
+
58
+ if (mode === 'list') {
59
+ _forEachInstanceProperty(items).call(items, function (item) {
60
+ var _context;
61
+
62
+ allItems = _concatInstanceProperty(_context = []).call(_context, allItems, [item]);
63
+
64
+ if (item.list) {
65
+ var _context2, _context3;
66
+
67
+ var list = _mapInstanceProperty(_context2 = item.list).call(_context2, function (el) {
68
+ return _objectSpread(_objectSpread({}, el), {}, {
69
+ isListItem: true
70
+ });
71
+ });
72
+
73
+ allItems = _concatInstanceProperty(_context3 = []).call(_context3, allItems, list);
74
+ }
75
+ });
76
+ }
77
+
54
78
  var state = useTabListState(_objectSpread(_objectSpread({}, props), {}, {
55
- onSelectionChange: onSelectionChange
79
+ onSelectionChange: onSelectionChange,
80
+ items: mode === 'list' ? allItems : items
56
81
  }));
57
82
 
58
83
  var _useTabList = useTabList(props, state, tabListRef),
@@ -70,7 +95,11 @@ var Tabs = /*#__PURE__*/forwardRef(function (props, ref) {
70
95
  isRow: orientation === ORIENTATION.HORIZONTAL
71
96
  }, tabListProps, raTabListProps, {
72
97
  ref: tabListRef
73
- }), _mapInstanceProperty(_context = _Array$from(state.collection)).call(_context, function (item) {
98
+ }), _mapInstanceProperty(_context4 = _filterInstanceProperty(_context5 = _Array$from(state.collection)).call(_context5, function (item) {
99
+ var _item$value;
100
+
101
+ return !(item === null || item === void 0 ? void 0 : (_item$value = item.value) === null || _item$value === void 0 ? void 0 : _item$value.isListItem);
102
+ })).call(_context4, function (item) {
74
103
  var _item$props;
75
104
 
76
105
  return ___EmotionJSX(CollectionTab, {
@@ -100,7 +129,7 @@ Tabs.propTypes = {
100
129
  orientation: PropTypes.oneOf(['horizontal', 'vertical']),
101
130
 
102
131
  /** Determines the behavior model for the tabs. */
103
- mode: PropTypes.oneOf(['default', 'tooltip']),
132
+ mode: PropTypes.oneOf(['default', 'tooltip', 'list']),
104
133
 
105
134
  /**
106
135
  * *For performance reasons, use this prop instead of Array.map when iteratively rendering Items*.
@@ -118,12 +147,16 @@ Tabs.propTypes = {
118
147
  tabListProps: PropTypes.shape({}),
119
148
 
120
149
  /** Props object that is spread directly into all of the tab panel wrapper elements. */
121
- tabPanelProps: PropTypes.shape({})
150
+ tabPanelProps: PropTypes.shape({}),
151
+
152
+ /** Whether tabs are activated automatically on focus or manually¸ */
153
+ keyboardActivation: PropTypes.oneOf(['automatic', 'manual'])
122
154
  };
123
155
  Tabs.defaultProps = {
124
156
  isDisabled: false,
125
157
  orientation: 'horizontal',
126
- mode: 'default'
158
+ mode: 'default',
159
+ keyboardActivation: 'manual'
127
160
  };
128
161
  Tabs.displayName = 'Tabs';
129
162
  export default Tabs;
@@ -1,3 +1,4 @@
1
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
1
2
  import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
2
3
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
3
4
  import React, { useState } from 'react';
@@ -225,4 +226,30 @@ export var ContentSlots = function ContentSlots() {
225
226
  afterTab: afterTabNode
226
227
  }
227
228
  }, ___EmotionJSX(Text, null, "Users Matched"))));
229
+ };
230
+ export var WithList = function WithList() {
231
+ var _context;
232
+
233
+ var allTabs = _concatInstanceProperty(_context = []).call(_context, tabs, [{
234
+ name: 'Tab 4',
235
+ list: [{
236
+ key: 'tab1list',
237
+ name: 'Tab 1 list',
238
+ children: 'Tab 1 from list'
239
+ }, {
240
+ key: 'tab2list',
241
+ name: 'Tab 2 list',
242
+ children: 'Tab 2 from list'
243
+ }]
244
+ }]);
245
+
246
+ return ___EmotionJSX(Tabs, {
247
+ items: allTabs,
248
+ mode: "list"
249
+ }, function (item) {
250
+ return ___EmotionJSX(Tab, _extends({
251
+ key: item.name,
252
+ title: item.name
253
+ }, item), item.children);
254
+ });
228
255
  };
@@ -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 (_ref3, index) {
81
- var children = _ref3.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 via focus -- horizontal', function () {
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 _getTabs3 = getTabs(),
175
- tabs = _getTabs3.tabs,
176
- tab0 = _getTabs3.tab0,
177
- tab1 = _getTabs3.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 _getTabs4 = getTabs(),
205
- tab0 = _getTabs4.tab0,
206
- tab1 = _getTabs4.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 _getTabs5 = getTabs(),
230
- tabs = _getTabs5.tabs,
231
- tab0 = _getTabs5.tab0,
232
- tab1 = _getTabs5.tab1,
233
- tab2 = _getTabs5.tab2; // Ensure that clicking a disabled tab does nothing
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 _getTabs6 = getTabs(),
259
- tabs = _getTabs6.tabs,
260
- tab0 = _getTabs6.tab0,
261
- tab1 = _getTabs6.tab1,
262
- tab2 = _getTabs6.tab2; // Expect the second tab to be selected
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 _getTabs7 = getTabs(),
300
- tabs = _getTabs7.tabs,
301
- tab0 = _getTabs7.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 _getTabs8 = getTabs(),
331
- tabs = _getTabs8.tabs,
332
- tab0 = _getTabs8.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 _getTabs9, tab0;
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
- _getTabs9 = getTabs(), tab0 = _getTabs9.tab0;
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 _getTabs10 = getTabs(),
374
- tab0 = _getTabs10.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
  });
@@ -638,6 +638,18 @@ var colorBlock = {
638
638
  borderColor: 'accent.20'
639
639
  }
640
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
+
641
653
  export default {
642
654
  accordionHeader: accordionHeader,
643
655
  chipDeleteButton: chipDeleteButton,
@@ -680,6 +692,7 @@ export default {
680
692
  tooltipIconButton: tooltipIconButton,
681
693
  tooltipInline: tooltipInline,
682
694
  colorBlock: colorBlock,
695
+ menuTab: menuTab,
683
696
  multiselectToggle: multiselectToggle,
684
697
  neutralText: neutralText
685
698
  };
@@ -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: 6,
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: 5
42
+ mb: 8
38
43
  },
39
44
  '.is-disabled &': {
40
45
  color: 'neutral.80'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.5.0-alpha.0",
3
+ "version": "1.5.0-alpha.1",
4
4
  "description": "PingUX themeable React component library",
5
5
  "author": "ux-development@pingidentity.com",
6
6
  "license": "Apache-2.0",