@pingux/astro 1.37.1 → 1.37.2-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/DataTable/DataTable.styles.js +7 -4
- package/lib/cjs/components/NavBar/NavBar.js +9 -13
- package/lib/cjs/components/NavBar/NavBar.stories.js +6 -3
- package/lib/cjs/components/NavBar/NavBar.test.js +56 -13
- package/lib/cjs/components/SearchField/SearchField.js +3 -1
- package/lib/cjs/recipes/Slider.stories.js +3 -3
- package/lib/cjs/styles/colors.js +5 -3
- package/lib/cjs/styles/forms/checkbox.js +4 -2
- package/lib/cjs/styles/forms/input.js +17 -4
- package/lib/cjs/styles/forms/radio.js +26 -5
- package/lib/cjs/styles/forms/select.js +3 -3
- package/lib/cjs/styles/variants/accordion.js +5 -27
- package/lib/cjs/styles/variants/boxes.js +17 -4
- package/lib/cjs/styles/variants/buttons.js +39 -25
- package/lib/cjs/styles/variants/collapsiblePanel.js +28 -5
- package/lib/cjs/styles/variants/links.js +5 -4
- package/lib/cjs/styles/variants/navBar.js +1 -1
- package/lib/cjs/styles/variants/stepper.js +4 -4
- package/lib/cjs/styles/variants/tabs.js +26 -1
- package/lib/components/DataTable/DataTable.styles.js +7 -4
- package/lib/components/NavBar/NavBar.js +10 -13
- package/lib/components/NavBar/NavBar.stories.js +6 -3
- package/lib/components/NavBar/NavBar.test.js +51 -13
- package/lib/components/SearchField/SearchField.js +3 -1
- package/lib/recipes/Slider.stories.js +2 -3
- package/lib/styles/colors.js +5 -3
- package/lib/styles/forms/checkbox.js +4 -2
- package/lib/styles/forms/input.js +17 -5
- package/lib/styles/forms/radio.js +17 -5
- package/lib/styles/forms/select.js +2 -3
- package/lib/styles/variants/accordion.js +5 -17
- package/lib/styles/variants/boxes.js +17 -4
- package/lib/styles/variants/buttons.js +37 -24
- package/lib/styles/variants/collapsiblePanel.js +18 -5
- package/lib/styles/variants/links.js +4 -4
- package/lib/styles/variants/navBar.js +1 -1
- package/lib/styles/variants/stepper.js +3 -3
- package/lib/styles/variants/tabs.js +16 -1
- package/package.json +1 -1
- package/NOTICE.html +0 -4665
@@ -22,7 +22,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
22
22
|
value: true
|
23
23
|
});
|
24
24
|
|
25
|
-
exports.defaultFocus = exports["default"] = void 0;
|
25
|
+
exports.focusWithCroppedOutline = exports.defaultFocus = exports["default"] = void 0;
|
26
26
|
|
27
27
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
28
28
|
|
@@ -70,10 +70,17 @@ var defaultHover = {
|
|
70
70
|
};
|
71
71
|
var defaultFocus = {
|
72
72
|
outline: '1px solid',
|
73
|
-
outlineColor: '
|
74
|
-
outlineOffset: '
|
73
|
+
outlineColor: 'focus',
|
74
|
+
outlineOffset: '2px'
|
75
75
|
};
|
76
76
|
exports.defaultFocus = defaultFocus;
|
77
|
+
var focusWithCroppedOutline = {
|
78
|
+
boxShadow: 'none',
|
79
|
+
outline: '1px solid',
|
80
|
+
outlineColor: 'focus',
|
81
|
+
outlineOffset: '1px'
|
82
|
+
};
|
83
|
+
exports.focusWithCroppedOutline = focusWithCroppedOutline;
|
77
84
|
var navItemButton = {
|
78
85
|
textDecoration: 'none',
|
79
86
|
outline: 'none',
|
@@ -97,7 +104,7 @@ var navItemButton = {
|
|
97
104
|
wordBreak: 'break-word',
|
98
105
|
'&.is-focused': {
|
99
106
|
outline: '1px solid',
|
100
|
-
outlineColor: '
|
107
|
+
outlineColor: 'focus'
|
101
108
|
},
|
102
109
|
'&.is-hovered': {
|
103
110
|
bg: 'accent.10'
|
@@ -277,7 +284,8 @@ var success = _objectSpread(_objectSpread({}, base), {}, {
|
|
277
284
|
bg: 'success.bright',
|
278
285
|
border: '1px solid',
|
279
286
|
borderColor: 'success.bright',
|
280
|
-
color: 'white'
|
287
|
+
color: 'white',
|
288
|
+
'&.is-focused': _objectSpread({}, defaultFocus)
|
281
289
|
});
|
282
290
|
|
283
291
|
var critical = _objectSpread(_objectSpread({}, base), {}, {
|
@@ -285,7 +293,8 @@ var critical = _objectSpread(_objectSpread({}, base), {}, {
|
|
285
293
|
bg: 'critical.bright',
|
286
294
|
border: '1px solid',
|
287
295
|
borderColor: 'critical.bright',
|
288
|
-
color: 'white'
|
296
|
+
color: 'white',
|
297
|
+
'&.is-focused': _objectSpread({}, defaultFocus)
|
289
298
|
});
|
290
299
|
|
291
300
|
var inverted = _objectSpread(_objectSpread({}, iconButton), {}, {
|
@@ -419,7 +428,7 @@ var text = _objectSpread(_objectSpread({}, base), {}, {
|
|
419
428
|
'&.is-hovered': {
|
420
429
|
textDecoration: 'underline'
|
421
430
|
},
|
422
|
-
'&.is-focused': _objectSpread({},
|
431
|
+
'&.is-focused': _objectSpread({}, focusWithCroppedOutline)
|
423
432
|
});
|
424
433
|
|
425
434
|
var quiet = {
|
@@ -433,12 +442,9 @@ var chipDeleteButton = {
|
|
433
442
|
mx: '3px !important',
|
434
443
|
p: 0,
|
435
444
|
width: 14,
|
436
|
-
'&.is-focused, &.is-hovered': {
|
437
|
-
bg: 'accent.40'
|
438
|
-
|
439
|
-
boxShadow: 'standard',
|
440
|
-
outline: 'none'
|
441
|
-
},
|
445
|
+
'&.is-focused, &.is-hovered': _objectSpread({
|
446
|
+
bg: 'accent.40'
|
447
|
+
}, focusWithCroppedOutline),
|
442
448
|
'&.is-pressed': {
|
443
449
|
bg: 'accent.20',
|
444
450
|
borderColor: 'accent.20'
|
@@ -490,16 +496,21 @@ var danger = _objectSpread(_objectSpread({}, base), {}, {
|
|
490
496
|
});
|
491
497
|
|
492
498
|
var copy = {
|
493
|
-
ml: '
|
499
|
+
ml: 'sm',
|
500
|
+
mr: 'sm',
|
494
501
|
outline: 'none',
|
495
502
|
height: 'auto',
|
503
|
+
width: 'auto',
|
496
504
|
cursor: 'pointer',
|
497
505
|
path: {
|
498
506
|
fill: 'neutral.10'
|
499
507
|
},
|
500
|
-
'&.is-focused':
|
501
|
-
boxShadow: 'none'
|
502
|
-
|
508
|
+
'&.is-focused': {
|
509
|
+
boxShadow: 'none',
|
510
|
+
outline: '1px solid',
|
511
|
+
outlineColor: 'focus',
|
512
|
+
outlineOffset: '1px'
|
513
|
+
}
|
503
514
|
};
|
504
515
|
var colorField = {
|
505
516
|
border: "1px solid ".concat(_colors.neutral['80']),
|
@@ -516,7 +527,10 @@ var imageUpload = _objectSpread(_objectSpread({}, base), {}, {
|
|
516
527
|
padding: 0,
|
517
528
|
backgroundColor: 'accent.99',
|
518
529
|
border: '2px solid',
|
519
|
-
borderColor: 'neutral.
|
530
|
+
borderColor: 'neutral.40',
|
531
|
+
'&.is-focused': _objectSpread(_objectSpread({}, defaultFocus), {}, {
|
532
|
+
borderColor: 'neutral.40'
|
533
|
+
})
|
520
534
|
});
|
521
535
|
|
522
536
|
var link = _objectSpread(_objectSpread({}, text), {}, {
|
@@ -528,7 +542,8 @@ var link = _objectSpread(_objectSpread({}, text), {}, {
|
|
528
542
|
'&.is-current': {
|
529
543
|
cursor: 'default',
|
530
544
|
color: 'text.primary'
|
531
|
-
}
|
545
|
+
},
|
546
|
+
'&.is-focused': _objectSpread({}, focusWithCroppedOutline)
|
532
547
|
});
|
533
548
|
|
534
549
|
var neutralText = _objectSpread(_objectSpread({}, link), {}, {
|
@@ -562,8 +577,9 @@ var environmentBreadcrumb = {
|
|
562
577
|
boxShadow: 'none'
|
563
578
|
},
|
564
579
|
'&.is-focused': {
|
565
|
-
|
566
|
-
|
580
|
+
outline: '1px solid',
|
581
|
+
outlineColor: 'focus',
|
582
|
+
outlineOffset: '1px'
|
567
583
|
},
|
568
584
|
'&:focus-visible': {
|
569
585
|
outline: 'none'
|
@@ -595,9 +611,7 @@ var fileInputField = {
|
|
595
611
|
textDecoration: 'underline'
|
596
612
|
}
|
597
613
|
},
|
598
|
-
'&.is-focused': {
|
599
|
-
boxShadow: 'focus'
|
600
|
-
}
|
614
|
+
'&.is-focused': _objectSpread({}, focusWithCroppedOutline)
|
601
615
|
};
|
602
616
|
|
603
617
|
var tooltipChip = _objectSpread(_objectSpread({}, _boxes.chip), {}, {
|
@@ -714,7 +728,7 @@ var navBarSectionButton = _objectSpread(_objectSpread({}, quiet), {}, {
|
|
714
728
|
width: '100%',
|
715
729
|
'&.is-focused': {
|
716
730
|
outline: '1px solid',
|
717
|
-
outlineColor: '
|
731
|
+
outlineColor: 'focus'
|
718
732
|
},
|
719
733
|
'&.is-hovered': {
|
720
734
|
backgroundColor: 'accent.10'
|
@@ -1,12 +1,37 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
|
+
|
3
5
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
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
|
+
|
5
21
|
_Object$defineProperty(exports, "__esModule", {
|
6
22
|
value: true
|
7
23
|
});
|
8
24
|
|
9
25
|
exports["default"] = void 0;
|
26
|
+
|
27
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
28
|
+
|
29
|
+
var _buttons = require("../variants/buttons");
|
30
|
+
|
31
|
+
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; }
|
32
|
+
|
33
|
+
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; }
|
34
|
+
|
10
35
|
var collapsiblePanelContainer = {
|
11
36
|
pr: 'sm',
|
12
37
|
minHeight: '80vh',
|
@@ -25,11 +50,9 @@ var collapsiblePanelContent = {
|
|
25
50
|
fontSize: 'sm',
|
26
51
|
height: '100%',
|
27
52
|
width: '300px',
|
28
|
-
'&.is-focused': {
|
29
|
-
borderColor: 'accent.80'
|
30
|
-
|
31
|
-
outline: 'none'
|
32
|
-
},
|
53
|
+
'&.is-focused': _objectSpread({
|
54
|
+
borderColor: 'accent.80'
|
55
|
+
}, _buttons.focusWithCroppedOutline),
|
33
56
|
'& div': {
|
34
57
|
alignItems: 'center',
|
35
58
|
display: 'flex',
|
@@ -26,6 +26,8 @@ exports["default"] = void 0;
|
|
26
26
|
|
27
27
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
28
28
|
|
29
|
+
var _buttons = require("./buttons");
|
30
|
+
|
29
31
|
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; }
|
30
32
|
|
31
33
|
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; }
|
@@ -39,9 +41,7 @@ var app = {
|
|
39
41
|
'&.is-hovered': {
|
40
42
|
textDecoration: 'underline'
|
41
43
|
},
|
42
|
-
'&.is-focused': {
|
43
|
-
textDecoration: 'underline'
|
44
|
-
},
|
44
|
+
'&.is-focused': _objectSpread({}, _buttons.focusWithCroppedOutline),
|
45
45
|
'&.is-pressed': {
|
46
46
|
color: 'accent.40',
|
47
47
|
textDecoration: 'underline'
|
@@ -55,7 +55,8 @@ var web = _objectSpread(_objectSpread({}, app), {}, {
|
|
55
55
|
textDecoration: 'underline',
|
56
56
|
'&:visited': {
|
57
57
|
color: 'decorative.7'
|
58
|
-
}
|
58
|
+
},
|
59
|
+
'&.is-focused': _objectSpread({}, _buttons.focusWithCroppedOutline)
|
59
60
|
});
|
60
61
|
|
61
62
|
var _default = {
|
@@ -26,11 +26,12 @@ exports["default"] = void 0;
|
|
26
26
|
|
27
27
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
28
28
|
|
29
|
+
var _buttons = require("./buttons");
|
30
|
+
|
29
31
|
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; }
|
30
32
|
|
31
33
|
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; }
|
32
34
|
|
33
|
-
/** Tabs styles */
|
34
35
|
var wrapper = {
|
35
36
|
width: '100%'
|
36
37
|
};
|
@@ -44,10 +45,9 @@ var tab = {
|
|
44
45
|
mb: 0,
|
45
46
|
mr: 0,
|
46
47
|
outline: 'none',
|
47
|
-
'&.is-focused': {
|
48
|
-
boxShadow: 'focus',
|
48
|
+
'&.is-focused': _objectSpread({
|
49
49
|
borderRadius: '50%'
|
50
|
-
},
|
50
|
+
}, _buttons.defaultFocus),
|
51
51
|
'&:not(:first-of-type)': {
|
52
52
|
flex: 1,
|
53
53
|
maxWidth: 122
|
@@ -1,12 +1,37 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
|
+
|
3
5
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
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
|
+
|
5
21
|
_Object$defineProperty(exports, "__esModule", {
|
6
22
|
value: true
|
7
23
|
});
|
8
24
|
|
9
25
|
exports.tabs = exports.tabPanel = exports.tabLine = exports.tab = void 0;
|
26
|
+
|
27
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
28
|
+
|
29
|
+
var _buttons = require("./buttons");
|
30
|
+
|
31
|
+
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; }
|
32
|
+
|
33
|
+
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; }
|
34
|
+
|
10
35
|
var tab = {
|
11
36
|
pt: 10,
|
12
37
|
cursor: 'pointer',
|
@@ -16,7 +41,7 @@ var tab = {
|
|
16
41
|
transform: 'translateY(1px)',
|
17
42
|
width: '100%',
|
18
43
|
'&.is-focused': {
|
19
|
-
|
44
|
+
'& > span': _objectSpread({}, _buttons.focusWithCroppedOutline)
|
20
45
|
},
|
21
46
|
'&.is-disabled': {
|
22
47
|
cursor: 'default'
|
@@ -23,7 +23,7 @@ var tableCell = _objectSpread(_objectSpread({}, text.tableData), {}, {
|
|
23
23
|
'&.is-key-focused': {
|
24
24
|
outline: '1px',
|
25
25
|
outlineStyle: 'solid',
|
26
|
-
outlineColor: '
|
26
|
+
outlineColor: 'focus',
|
27
27
|
outlineOffset: '-1px',
|
28
28
|
backgroundColor: 'white'
|
29
29
|
},
|
@@ -55,14 +55,17 @@ var tableRow = {
|
|
55
55
|
borderBottomStyle: 'solid !important',
|
56
56
|
backgroundColor: 'accent.99',
|
57
57
|
borderBottomColor: 'neutral.80',
|
58
|
+
borderTop: '1px solid transparent',
|
59
|
+
borderLeft: '1px solid transparent',
|
60
|
+
borderRight: '1px solid transparent',
|
58
61
|
'&:hover': {
|
59
62
|
backgroundColor: 'white'
|
60
63
|
},
|
61
64
|
'&.is-row-focus-visible': {
|
62
65
|
border: '1px solid',
|
63
|
-
borderColor: '
|
66
|
+
borderColor: 'focus',
|
64
67
|
borderBottom: '1px',
|
65
|
-
borderBottomColor: '
|
68
|
+
borderBottomColor: 'focus',
|
66
69
|
backgroundColor: 'white'
|
67
70
|
}
|
68
71
|
};
|
@@ -98,7 +101,7 @@ var tableHeadCell = _objectSpread(_objectSpread({}, text.label), {}, {
|
|
98
101
|
'&.is-key-focused': {
|
99
102
|
outline: '1px',
|
100
103
|
outlineStyle: 'solid',
|
101
|
-
outlineColor: '
|
104
|
+
outlineColor: '#D033FF !important',
|
102
105
|
outlineOffset: '-1px',
|
103
106
|
backgroundColor: 'accent.99 !important'
|
104
107
|
},
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
2
2
|
import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
|
3
3
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
4
|
-
import React, {
|
4
|
+
import React, { useState } from 'react';
|
5
5
|
import PropTypes from 'prop-types';
|
6
|
-
import { v4 as uuid } from 'uuid';
|
7
6
|
import { FocusScope, useFocusManager } from '@react-aria/focus';
|
8
7
|
import { NavBarContext } from '../../context/NavBarContext';
|
9
8
|
import { isIterableProp } from '../../utils/devUtils/props/isIterable';
|
@@ -38,17 +37,15 @@ var NavBar = function NavBar(props) {
|
|
38
37
|
selectedKey = _useProgressiveState2[0],
|
39
38
|
setSelectedKey = _useProgressiveState2[1];
|
40
39
|
|
41
|
-
var items =
|
42
|
-
return
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
}];
|
51
|
-
}, []);
|
40
|
+
var items = _Array$isArray(children) ? _mapInstanceProperty(children).call(children, function (child) {
|
41
|
+
return {
|
42
|
+
item: child,
|
43
|
+
key: child.key
|
44
|
+
};
|
45
|
+
}) : [{
|
46
|
+
item: children,
|
47
|
+
key: children.key
|
48
|
+
}];
|
52
49
|
var contextValue = {
|
53
50
|
selectedKey: selectedKey,
|
54
51
|
setSelectedKey: setSelectedKeyProp || setSelectedKey,
|
@@ -393,7 +393,8 @@ export var Controlled = function Controlled() {
|
|
393
393
|
setSelectedKey: setSelectedKey,
|
394
394
|
selectedKey: selectedKey
|
395
395
|
}, ___EmotionJSX(Box, {
|
396
|
-
padding: "md"
|
396
|
+
padding: "md",
|
397
|
+
key: "top-logo-parent"
|
397
398
|
}, ___EmotionJSX(Link, {
|
398
399
|
"aria-label": "home link",
|
399
400
|
href: "https://pingidentity.com",
|
@@ -401,10 +402,12 @@ export var Controlled = function Controlled() {
|
|
401
402
|
}, logo)), ___EmotionJSX(Separator, {
|
402
403
|
marginTop: "lg",
|
403
404
|
marginBottom: "0px",
|
404
|
-
backgroundColor: "neutral.60"
|
405
|
+
backgroundColor: "neutral.60",
|
406
|
+
key: "top-separator"
|
405
407
|
}), ___EmotionJSX(Box, {
|
406
408
|
variant: "navBar.sectionContainer",
|
407
|
-
paddingBottom: "xl"
|
409
|
+
paddingBottom: "xl",
|
410
|
+
key: "first-section-container"
|
408
411
|
}, ___EmotionJSX(NavBarItem, {
|
409
412
|
"data-id": "nav-bar-item",
|
410
413
|
icon: GlobeIcon,
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
2
3
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
3
4
|
import React, { useState } from 'react';
|
4
5
|
import userEvent from '@testing-library/user-event';
|
@@ -80,15 +81,18 @@ var getComponent = function getComponent() {
|
|
80
81
|
height: '100%',
|
81
82
|
maxHeight: '100%',
|
82
83
|
overflowY: 'overlay !important'
|
83
|
-
}
|
84
|
+
},
|
85
|
+
key: "top-logo-parent"
|
84
86
|
}, ___EmotionJSX(NavBarSection, {
|
85
87
|
items: data,
|
86
88
|
hasSeparator: true,
|
87
89
|
"data-testid": DATA_ID,
|
88
|
-
"data-id": DATA_ID
|
90
|
+
"data-id": DATA_ID,
|
91
|
+
key: "first-section"
|
89
92
|
}), ___EmotionJSX(NavBarSection, {
|
90
93
|
items: secondData,
|
91
|
-
title: "test_title"
|
94
|
+
title: "test_title",
|
95
|
+
key: "second-section"
|
92
96
|
}), ___EmotionJSX(NavBarItem, {
|
93
97
|
id: "Overview",
|
94
98
|
key: "Overview",
|
@@ -99,15 +103,13 @@ var getComponent = function getComponent() {
|
|
99
103
|
};
|
100
104
|
|
101
105
|
var ControlledComponent = function ControlledComponent() {
|
106
|
+
var _context;
|
107
|
+
|
102
108
|
var _useState = useState(''),
|
103
109
|
_useState2 = _slicedToArray(_useState, 2),
|
104
110
|
selectedKey = _useState2[0],
|
105
111
|
setSelectedKey = _useState2[1];
|
106
112
|
|
107
|
-
var setKeys = function setKeys(e) {
|
108
|
-
setSelectedKey(e);
|
109
|
-
};
|
110
|
-
|
111
113
|
var customData = [{
|
112
114
|
icon: GlobeIcon,
|
113
115
|
key: 'Environment',
|
@@ -120,16 +122,41 @@ var ControlledComponent = function ControlledComponent() {
|
|
120
122
|
}
|
121
123
|
}, "Click me for MFA Users"), ___EmotionJSX(NavBarItemButton, {
|
122
124
|
key: "Earth Button Group",
|
123
|
-
id: "Earth Button Group"
|
125
|
+
id: "Earth Button Group",
|
126
|
+
"data-testid": "group-item"
|
124
127
|
}, "Group")]
|
125
128
|
}];
|
129
|
+
|
130
|
+
var _useState3 = useState(_concatInstanceProperty(_context = []).call(_context, customData)),
|
131
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
132
|
+
thisData = _useState4[0],
|
133
|
+
setData = _useState4[1];
|
134
|
+
|
135
|
+
var testFunction = function testFunction() {
|
136
|
+
var _context2, _context3;
|
137
|
+
|
138
|
+
var newArray = _concatInstanceProperty(_context2 = []).call(_context2, customData);
|
139
|
+
|
140
|
+
newArray.pop();
|
141
|
+
setData(_concatInstanceProperty(_context3 = []).call(_context3, newArray));
|
142
|
+
};
|
143
|
+
|
144
|
+
var setKeys = function setKeys(e) {
|
145
|
+
setSelectedKey(e);
|
146
|
+
};
|
147
|
+
|
126
148
|
return ___EmotionJSX(NavBar, {
|
127
149
|
setSelectedKey: setKeys,
|
128
150
|
selectedKey: selectedKey
|
129
151
|
}, ___EmotionJSX(Box, {
|
130
152
|
variant: "navBar.sectionContainer",
|
131
|
-
paddingBottom: "xl"
|
132
|
-
|
153
|
+
paddingBottom: "xl",
|
154
|
+
key: "top-logo-parent"
|
155
|
+
}, ___EmotionJSX("button", {
|
156
|
+
key: "test-button",
|
157
|
+
"data-testid": "test-button",
|
158
|
+
onClick: testFunction
|
159
|
+
}, "click me!"), ___EmotionJSX(NavBarItem, {
|
133
160
|
id: "Overview",
|
134
161
|
key: "Overview",
|
135
162
|
text: "Overview",
|
@@ -145,20 +172,23 @@ var ControlledComponent = function ControlledComponent() {
|
|
145
172
|
title: "PingOne Services",
|
146
173
|
"data-id": "second-nav-bar-section"
|
147
174
|
}), ___EmotionJSX(NavBarSection, {
|
148
|
-
items:
|
175
|
+
items: thisData,
|
149
176
|
"data-id": "third-nav-bar-section"
|
150
177
|
})));
|
151
178
|
};
|
152
179
|
|
153
180
|
var getComponentWithMultipleChildren = function getComponentWithMultipleChildren() {
|
154
181
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
155
|
-
return render(___EmotionJSX(NavBar, props, ___EmotionJSX(Box,
|
182
|
+
return render(___EmotionJSX(NavBar, props, ___EmotionJSX(Box, {
|
183
|
+
key: "top-logo-parent"
|
184
|
+
}, ___EmotionJSX(Link, {
|
156
185
|
href: "https://pingidentity.com",
|
157
186
|
target: "_blank",
|
158
187
|
"aria-label": "home link",
|
159
188
|
"data-testid": "navLink"
|
160
189
|
}, "home")), ___EmotionJSX(Button, {
|
161
|
-
"data-testid": "navButton"
|
190
|
+
"data-testid": "navButton",
|
191
|
+
key: "nav-button"
|
162
192
|
}, "test button")));
|
163
193
|
};
|
164
194
|
|
@@ -428,4 +458,12 @@ test('when a child is selected, and the parent is collapsed, the parent has the
|
|
428
458
|
userEvent.click(parent);
|
429
459
|
var parentDiv = screen.queryByTestId('Overview');
|
430
460
|
expect(parentDiv).toHaveClass('is-selected');
|
461
|
+
});
|
462
|
+
test('controlled version: items can be updated.', function () {
|
463
|
+
render(___EmotionJSX(ControlledComponent, null));
|
464
|
+
var button = screen.getByTestId('test-button');
|
465
|
+
var thisitem = screen.getByTestId('Environment title that is so long, it wraps');
|
466
|
+
expect(thisitem).toBeInTheDocument();
|
467
|
+
userEvent.click(button);
|
468
|
+
expect(screen.queryByTestId('Environment title that is so long, it wraps')).not.toBeInTheDocument();
|
431
469
|
});
|
@@ -83,7 +83,9 @@ var SearchField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
83
83
|
ref: searchRef,
|
84
84
|
pl: 40,
|
85
85
|
pr: 40
|
86
|
-
}, fieldControlProps
|
86
|
+
}, fieldControlProps, {
|
87
|
+
variant: "forms.input.search"
|
88
|
+
})), icon && ___EmotionJSX(Icon, _extends({
|
87
89
|
icon: icon,
|
88
90
|
variant: "forms.search.icon",
|
89
91
|
size: 22
|
@@ -23,6 +23,7 @@ import { VisuallyHidden } from '@react-aria/visually-hidden';
|
|
23
23
|
import { mergeProps } from '@react-aria/utils';
|
24
24
|
import { useNumberFormatter } from '@react-aria/i18n';
|
25
25
|
import { Box } from '../index';
|
26
|
+
import { defaultFocus } from '../styles/variants/buttons';
|
26
27
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
27
28
|
export default {
|
28
29
|
title: 'Recipes/Slider'
|
@@ -199,9 +200,7 @@ var Thumb = function Thumb(props) {
|
|
199
200
|
left: "".concat(state.getThumbPercent(index) * 100, "%")
|
200
201
|
})
|
201
202
|
}, ___EmotionJSX(Box, _extends({}, thumbProps, {
|
202
|
-
sx: _objectSpread(_objectSpread({}, sx.thumb),
|
203
|
-
outline: isFocusVisible ? '5px solid rgba(41,150,204,0.5)' : 'none'
|
204
|
-
})
|
203
|
+
sx: _objectSpread(_objectSpread({}, sx.thumb), isFocusVisible && defaultFocus)
|
205
204
|
}), ___EmotionJSX(VisuallyHidden, null, ___EmotionJSX("input", _extends({
|
206
205
|
ref: inputRef
|
207
206
|
}, mergeProps(inputProps, focusProps))))));
|
package/lib/styles/colors.js
CHANGED
@@ -83,8 +83,9 @@ export var decorativeDark = _mapInstanceProperty(decorative).call(decorative, fu
|
|
83
83
|
});
|
84
84
|
export var decorativeLight = _mapInstanceProperty(decorative).call(decorative, function (color) {
|
85
85
|
return chroma(color).brighten(2).hex();
|
86
|
-
});
|
87
|
-
|
86
|
+
}); // export const focus = chroma(accent[50]).alpha(0.75).hex();
|
87
|
+
|
88
|
+
export var focus = chroma('#D033FF').hex(); // COMPONENT COLORS
|
88
89
|
|
89
90
|
export var button = {
|
90
91
|
primary: active,
|
@@ -92,7 +93,8 @@ export var button = {
|
|
92
93
|
label: active,
|
93
94
|
hoverBorder: accent,
|
94
95
|
hoverLabel: accent,
|
95
|
-
hoverBackground: accent[95]
|
96
|
+
hoverBackground: accent[95],
|
97
|
+
focus: focus
|
96
98
|
};
|
97
99
|
export var line = {
|
98
100
|
regular: neutral[50],
|