@pingux/astro 2.88.0 → 2.89.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/CodeView/CodeView.js +29 -4
- package/lib/cjs/components/CodeView/CodeView.test.js +10 -0
- package/lib/cjs/components/CopyText/CopyText.js +2 -2
- package/lib/cjs/components/Menu/Menu.js +1 -3
- package/lib/cjs/components/MenuItem/MenuItem.js +1 -3
- package/lib/cjs/components/Modal/Modal.js +1 -2
- package/lib/cjs/components/NavigationHeader/HeaderAccountMenu.d.ts +9 -0
- package/lib/cjs/components/NavigationHeader/HeaderAccountMenu.js +75 -0
- package/lib/cjs/components/NavigationHeader/NavigationHeader.d.ts +9 -0
- package/lib/cjs/components/NavigationHeader/NavigationHeader.js +49 -0
- package/lib/cjs/components/NavigationHeader/NavigationHeader.mdx +31 -0
- package/lib/cjs/components/NavigationHeader/NavigationHeader.stories.d.ts +12 -0
- package/lib/cjs/components/NavigationHeader/NavigationHeader.stories.js +210 -0
- package/lib/cjs/components/NavigationHeader/NavigationHeader.test.d.ts +1 -0
- package/lib/cjs/components/NavigationHeader/NavigationHeader.test.js +361 -0
- package/lib/cjs/components/NavigationHeader/index.d.ts +1 -0
- package/lib/cjs/components/NavigationHeader/index.js +14 -0
- package/lib/cjs/components/ProgressBar/ProgressBar.js +1 -5
- package/lib/cjs/components/RangeCalendar/RangeCalendarGrid.js +1 -4
- package/lib/cjs/components/Separator/Separator.js +1 -3
- package/lib/cjs/components/Tab/Tab.js +0 -1
- package/lib/cjs/components/Tabs/Tabs.js +2 -4
- package/lib/cjs/components/TimeField/TimeSegment.js +1 -3
- package/lib/cjs/hooks/useField/useField.d.ts +79 -79
- package/lib/cjs/index.d.ts +2 -0
- package/lib/cjs/index.js +55 -36
- package/lib/cjs/recipes/LinkedListView.stories.js +7 -0
- package/lib/cjs/styles/themes/next-gen/codeView/codeView.d.ts +15 -1
- package/lib/cjs/styles/themes/next-gen/codeView/codeView.js +22 -6
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +4 -2
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +261 -7
- package/lib/cjs/styles/themes/next-gen/next-gen.js +2 -0
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +5 -0
- package/lib/cjs/styles/themes/next-gen/variants/button.js +6 -4
- package/lib/cjs/styles/themes/next-gen/variants/navigationHeader.d.ts +140 -0
- package/lib/cjs/styles/themes/next-gen/variants/navigationHeader.js +131 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +107 -6
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +15 -9
- package/lib/cjs/types/codeView.d.ts +3 -2
- package/lib/cjs/types/copyText.d.ts +1 -1
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/cjs/types/index.js +65 -54
- package/lib/cjs/types/shared/dom.d.ts +2 -2
- package/lib/cjs/utils/devUtils/constants/images.d.ts +2 -0
- package/lib/cjs/utils/devUtils/constants/images.js +6 -2
- package/lib/components/CodeView/CodeView.js +30 -5
- package/lib/components/CodeView/CodeView.test.js +10 -0
- package/lib/components/CopyText/CopyText.js +2 -2
- package/lib/components/Menu/Menu.js +1 -3
- package/lib/components/MenuItem/MenuItem.js +1 -3
- package/lib/components/Modal/Modal.js +1 -2
- package/lib/components/NavigationHeader/HeaderAccountMenu.js +66 -0
- package/lib/components/NavigationHeader/NavigationHeader.js +37 -0
- package/lib/components/NavigationHeader/NavigationHeader.mdx +31 -0
- package/lib/components/NavigationHeader/NavigationHeader.stories.js +195 -0
- package/lib/components/NavigationHeader/NavigationHeader.test.js +358 -0
- package/lib/components/NavigationHeader/index.js +1 -0
- package/lib/components/ProgressBar/ProgressBar.js +1 -5
- package/lib/components/RangeCalendar/RangeCalendarGrid.js +1 -4
- package/lib/components/Separator/Separator.js +1 -3
- package/lib/components/Tab/Tab.js +0 -1
- package/lib/components/Tabs/Tabs.js +2 -4
- package/lib/components/TimeField/TimeSegment.js +1 -3
- package/lib/index.js +2 -0
- package/lib/recipes/LinkedListView.stories.js +7 -0
- package/lib/styles/themes/next-gen/codeView/codeView.js +20 -5
- package/lib/styles/themes/next-gen/convertedComponentList.js +2 -1
- package/lib/styles/themes/next-gen/next-gen.js +2 -0
- package/lib/styles/themes/next-gen/variants/button.js +6 -4
- package/lib/styles/themes/next-gen/variants/navigationHeader.js +123 -0
- package/lib/styles/themes/next-gen/variants/variants.js +14 -8
- package/lib/types/index.js +1 -0
- package/lib/utils/devUtils/constants/images.js +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
4
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
|
5
|
+
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
|
6
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
7
|
+
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
|
8
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
|
9
|
+
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
|
10
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
11
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
12
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
15
|
+
exports["default"] = void 0;
|
|
16
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
var defaultFocus = {
|
|
20
|
+
outline: '2px solid',
|
|
21
|
+
outlineColor: 'active'
|
|
22
|
+
};
|
|
23
|
+
var link = {
|
|
24
|
+
fontSize: 'md',
|
|
25
|
+
fontFamily: 'standard',
|
|
26
|
+
py: 'sm',
|
|
27
|
+
px: 'md',
|
|
28
|
+
fontWeight: '1',
|
|
29
|
+
color: 'text.primary',
|
|
30
|
+
textDecoration: 'none',
|
|
31
|
+
borderRadius: '3px',
|
|
32
|
+
'&.is-hovered': {
|
|
33
|
+
textDecoration: 'none',
|
|
34
|
+
color: 'text.secondary'
|
|
35
|
+
},
|
|
36
|
+
'&.is-focused': _objectSpread(_objectSpread({}, defaultFocus), {}, {
|
|
37
|
+
textDecoration: 'none'
|
|
38
|
+
}),
|
|
39
|
+
'&.is-pressed': {
|
|
40
|
+
textDecoration: 'none'
|
|
41
|
+
},
|
|
42
|
+
'&.is-visited': {
|
|
43
|
+
textDecoration: 'none'
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var logoBand = _objectSpread(_objectSpread({}, link), {}, {
|
|
47
|
+
p: 0
|
|
48
|
+
});
|
|
49
|
+
var headerPlaceholder = {
|
|
50
|
+
fontSize: 'lg',
|
|
51
|
+
ml: 'md',
|
|
52
|
+
color: 'text.primary',
|
|
53
|
+
lineHeight: 'body',
|
|
54
|
+
fontWeight: '1',
|
|
55
|
+
'&.is-hovered': {
|
|
56
|
+
color: 'text.secondary'
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
var navigationHeader = {
|
|
60
|
+
headerPlaceholder: headerPlaceholder,
|
|
61
|
+
link: link,
|
|
62
|
+
logoBand: logoBand,
|
|
63
|
+
container: {
|
|
64
|
+
fontFamily: 'standard',
|
|
65
|
+
borderBottom: '1px solid',
|
|
66
|
+
borderColor: 'gray-300',
|
|
67
|
+
bg: '#fff',
|
|
68
|
+
height: '4.5rem',
|
|
69
|
+
justifyContent: 'center'
|
|
70
|
+
},
|
|
71
|
+
wrapper: {
|
|
72
|
+
px: ['1.5rem', '1.5rem', '1.5rem', '3rem', '3rem', '3rem'],
|
|
73
|
+
maxWidth: '1540px',
|
|
74
|
+
mx: 'auto',
|
|
75
|
+
width: '100%'
|
|
76
|
+
},
|
|
77
|
+
dropdownMenu: {
|
|
78
|
+
maxWidth: 'unset',
|
|
79
|
+
p: 'sm',
|
|
80
|
+
'& > li': {
|
|
81
|
+
p: '0'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
dropdownMenuItem: _objectSpread(_objectSpread({}, link), {}, {
|
|
85
|
+
padding: '.675rem 1rem',
|
|
86
|
+
pr: '2.25rem',
|
|
87
|
+
'&.is-hovered': {
|
|
88
|
+
textDecoration: 'none'
|
|
89
|
+
},
|
|
90
|
+
'&.is-pressed': {
|
|
91
|
+
textDecoration: 'none'
|
|
92
|
+
},
|
|
93
|
+
'&.is-focused': {
|
|
94
|
+
textDecoration: 'none'
|
|
95
|
+
},
|
|
96
|
+
'&.is-visited': {
|
|
97
|
+
textDecoration: 'none'
|
|
98
|
+
}
|
|
99
|
+
}),
|
|
100
|
+
accountButton: {
|
|
101
|
+
display: 'flex',
|
|
102
|
+
width: 'auto',
|
|
103
|
+
height: 'auto',
|
|
104
|
+
cursor: 'pointer',
|
|
105
|
+
p: '0',
|
|
106
|
+
px: 'sm',
|
|
107
|
+
py: '1px',
|
|
108
|
+
border: 'none',
|
|
109
|
+
borderRadius: '3px',
|
|
110
|
+
bg: 'transparent',
|
|
111
|
+
'&.is-hovered': {
|
|
112
|
+
bg: 'transparent',
|
|
113
|
+
border: 'none',
|
|
114
|
+
boxShadow: 'none'
|
|
115
|
+
},
|
|
116
|
+
'&.is-pressed': {
|
|
117
|
+
bg: 'transparent',
|
|
118
|
+
border: 'none',
|
|
119
|
+
boxShadow: 'none'
|
|
120
|
+
},
|
|
121
|
+
'&.is-focused': _objectSpread(_objectSpread({}, defaultFocus), {}, {
|
|
122
|
+
bg: 'transparent'
|
|
123
|
+
}),
|
|
124
|
+
'&.is-visited': {
|
|
125
|
+
bg: 'transparent'
|
|
126
|
+
},
|
|
127
|
+
minWidth: '50px'
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
var _default = navigationHeader;
|
|
131
|
+
exports["default"] = _default;
|
|
@@ -435,6 +435,9 @@ declare const _default: {
|
|
|
435
435
|
separator: {
|
|
436
436
|
base: {
|
|
437
437
|
bg: string;
|
|
438
|
+
'&.is-vertical': {
|
|
439
|
+
m: string;
|
|
440
|
+
};
|
|
438
441
|
};
|
|
439
442
|
};
|
|
440
443
|
menuItem: {
|
|
@@ -612,19 +615,117 @@ declare const _default: {
|
|
|
612
615
|
};
|
|
613
616
|
};
|
|
614
617
|
codeView: {
|
|
618
|
+
theme: {
|
|
619
|
+
plain: {
|
|
620
|
+
color: string;
|
|
621
|
+
backgroundColor: string;
|
|
622
|
+
};
|
|
623
|
+
styles: ({
|
|
624
|
+
types: string[];
|
|
625
|
+
style: {
|
|
626
|
+
color: string;
|
|
627
|
+
background?: undefined;
|
|
628
|
+
fontWeight?: undefined;
|
|
629
|
+
cursor?: undefined;
|
|
630
|
+
};
|
|
631
|
+
} | {
|
|
632
|
+
types: string[];
|
|
633
|
+
style: {
|
|
634
|
+
color: string;
|
|
635
|
+
background: string;
|
|
636
|
+
fontWeight?: undefined;
|
|
637
|
+
cursor?: undefined;
|
|
638
|
+
};
|
|
639
|
+
} | {
|
|
640
|
+
types: string[];
|
|
641
|
+
style: {
|
|
642
|
+
fontWeight: string;
|
|
643
|
+
color?: undefined;
|
|
644
|
+
background?: undefined;
|
|
645
|
+
cursor?: undefined;
|
|
646
|
+
};
|
|
647
|
+
} | {
|
|
648
|
+
types: string[];
|
|
649
|
+
style: {
|
|
650
|
+
cursor: string;
|
|
651
|
+
color?: undefined;
|
|
652
|
+
background?: undefined;
|
|
653
|
+
fontWeight?: undefined;
|
|
654
|
+
};
|
|
655
|
+
})[];
|
|
656
|
+
};
|
|
615
657
|
wrapper: {
|
|
616
658
|
backgroundColor: string;
|
|
659
|
+
border: string;
|
|
660
|
+
borderColor: string;
|
|
617
661
|
borderRadius: string;
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
662
|
+
width: number;
|
|
663
|
+
height: number;
|
|
664
|
+
my: string;
|
|
665
|
+
overflow: string;
|
|
666
|
+
alignItems: string;
|
|
667
|
+
'&.is-focused, &:focus': {
|
|
668
|
+
boxShadow: string;
|
|
669
|
+
outline: string;
|
|
670
|
+
};
|
|
671
|
+
pre: {
|
|
672
|
+
backgroundColor: string;
|
|
673
|
+
padding: string;
|
|
674
|
+
height: string;
|
|
675
|
+
width: string;
|
|
676
|
+
overflowX: string;
|
|
677
|
+
overflowY: string;
|
|
678
|
+
fontSize: string;
|
|
679
|
+
'& .token-line': {
|
|
680
|
+
display: string;
|
|
681
|
+
alignItems: string;
|
|
682
|
+
'& .token': {
|
|
683
|
+
whiteSpace: string;
|
|
684
|
+
wordBreak: string;
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
fontFamily: string;
|
|
688
|
+
lineHeight: string;
|
|
689
|
+
};
|
|
690
|
+
'&.has-no-copy-button': {
|
|
691
|
+
pre: {
|
|
692
|
+
p: string;
|
|
622
693
|
};
|
|
623
694
|
};
|
|
624
|
-
'
|
|
625
|
-
|
|
695
|
+
'&.has-line-numbers': {
|
|
696
|
+
pre: {
|
|
697
|
+
p: string;
|
|
698
|
+
overflow: string;
|
|
699
|
+
'& .token-line:first-of-type *': {
|
|
700
|
+
pt: string;
|
|
701
|
+
};
|
|
702
|
+
'& .token-line': {
|
|
703
|
+
display: string;
|
|
704
|
+
'& .token': {
|
|
705
|
+
whiteSpace: string;
|
|
706
|
+
};
|
|
707
|
+
};
|
|
708
|
+
};
|
|
626
709
|
};
|
|
627
710
|
};
|
|
711
|
+
lineNo: {
|
|
712
|
+
display: string;
|
|
713
|
+
userSelect: string;
|
|
714
|
+
px: string;
|
|
715
|
+
m: string;
|
|
716
|
+
bg: string;
|
|
717
|
+
minWidth: number;
|
|
718
|
+
color: string;
|
|
719
|
+
lineHeight: string;
|
|
720
|
+
};
|
|
721
|
+
header: {
|
|
722
|
+
color: string;
|
|
723
|
+
px: string;
|
|
724
|
+
width: string;
|
|
725
|
+
border: string;
|
|
726
|
+
borderColor: string;
|
|
727
|
+
lineHeight: string;
|
|
728
|
+
};
|
|
628
729
|
};
|
|
629
730
|
tabs: {
|
|
630
731
|
gap: string;
|
|
@@ -14,6 +14,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
14
14
|
});
|
|
15
15
|
exports["default"] = exports.badges = exports.badgeDeleteButton = void 0;
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
17
|
+
var _codeView = _interopRequireDefault(require("../codeView/codeView"));
|
|
17
18
|
var _button = _interopRequireDefault(require("./button"));
|
|
18
19
|
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; }
|
|
19
20
|
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; }
|
|
@@ -252,7 +253,10 @@ var menuItem = {
|
|
|
252
253
|
};
|
|
253
254
|
var separator = {
|
|
254
255
|
base: {
|
|
255
|
-
bg: 'gray-300'
|
|
256
|
+
bg: 'gray-300',
|
|
257
|
+
'&.is-vertical': {
|
|
258
|
+
m: '0'
|
|
259
|
+
}
|
|
256
260
|
}
|
|
257
261
|
};
|
|
258
262
|
var avatar = {
|
|
@@ -501,21 +505,23 @@ var dataTable = {
|
|
|
501
505
|
fontSize: 'md'
|
|
502
506
|
}
|
|
503
507
|
};
|
|
504
|
-
|
|
508
|
+
|
|
509
|
+
/* const codeView = {
|
|
505
510
|
wrapper: {
|
|
506
511
|
backgroundColor: 'gray-900',
|
|
507
512
|
borderRadius: '4px',
|
|
508
513
|
'> button >svg': {
|
|
509
514
|
color: 'gray-300',
|
|
510
515
|
path: {
|
|
511
|
-
fill: 'gray-300'
|
|
512
|
-
}
|
|
516
|
+
fill: 'gray-300',
|
|
517
|
+
},
|
|
513
518
|
},
|
|
514
519
|
'> pre': {
|
|
515
|
-
p: 'md'
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
};
|
|
520
|
+
p: 'md',
|
|
521
|
+
},
|
|
522
|
+
},
|
|
523
|
+
}; */
|
|
524
|
+
|
|
519
525
|
var tabs = {
|
|
520
526
|
gap: '0px'
|
|
521
527
|
};
|
|
@@ -539,7 +545,7 @@ var _default = {
|
|
|
539
545
|
progressBar: progressBar,
|
|
540
546
|
listView: listView,
|
|
541
547
|
dataTable: dataTable,
|
|
542
|
-
codeView:
|
|
548
|
+
codeView: _codeView["default"],
|
|
543
549
|
tabs: tabs,
|
|
544
550
|
menu: menu
|
|
545
551
|
};
|
|
@@ -2,10 +2,10 @@ import type { PrismTheme } from 'prism-react-renderer';
|
|
|
2
2
|
import { Language, Prism as PrismRR } from 'prism-react-renderer';
|
|
3
3
|
import Prism from 'prismjs';
|
|
4
4
|
import { ThemeUICSSObject } from 'theme-ui';
|
|
5
|
-
import { HoverProps } from './shared';
|
|
5
|
+
import { HoverProps, StyleProps } from './shared';
|
|
6
6
|
export type PrismProps = typeof PrismRR & typeof Prism;
|
|
7
7
|
export type PrismThemeProps = PrismTheme;
|
|
8
|
-
export interface CodeViewProps extends HoverProps {
|
|
8
|
+
export interface CodeViewProps extends HoverProps, StyleProps {
|
|
9
9
|
children?: string;
|
|
10
10
|
className?: string;
|
|
11
11
|
hasLineNumbers?: boolean;
|
|
@@ -14,4 +14,5 @@ export interface CodeViewProps extends HoverProps {
|
|
|
14
14
|
Prism?: PrismProps;
|
|
15
15
|
sx?: ThemeUICSSObject;
|
|
16
16
|
stylesProp?: ThemeUICSSObject;
|
|
17
|
+
isNextGen?: boolean;
|
|
17
18
|
}
|
|
@@ -15,7 +15,7 @@ export interface TooltipWrapperProps {
|
|
|
15
15
|
}
|
|
16
16
|
export interface CopyTextProps extends HoverProps, TestingAttributes {
|
|
17
17
|
children?: React.ReactNode;
|
|
18
|
-
mode?: 'text' | 'link' | 'nonClickableContent';
|
|
18
|
+
mode?: 'text' | 'link' | 'nonClickableContent' | 'rightText';
|
|
19
19
|
textToCopy?: string;
|
|
20
20
|
tooltipText?: string;
|
|
21
21
|
tooltipProps?: TooltipTriggerProps;
|