@sk-web-gui/core 0.1.33 → 0.1.34
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/README.md +1 -1
- package/package.json +2 -2
- package/src/colors.js +116 -116
- package/src/components/accordion.js +43 -43
- package/src/components/alert.js +17 -17
- package/src/components/avatar.js +43 -43
- package/src/components/badge.js +25 -26
- package/src/components/breadcrumb.js +6 -6
- package/src/components/button-group.js +24 -24
- package/src/components/button.js +81 -85
- package/src/components/calendar.js +68 -67
- package/src/components/card.js +49 -50
- package/src/components/checkbox.js +49 -50
- package/src/components/code.js +5 -5
- package/src/components/cookie-consent.js +21 -21
- package/src/components/divider.js +6 -6
- package/src/components/dot.js +28 -28
- package/src/components/footer.js +2 -1
- package/src/components/forms.js +139 -146
- package/src/components/header.js +33 -35
- package/src/components/icon-button.js +2 -2
- package/src/components/icon.js +4 -4
- package/src/components/kbd.js +5 -5
- package/src/components/link.js +12 -12
- package/src/components/message.js +35 -35
- package/src/components/modal.js +21 -20
- package/src/components/notification.js +31 -31
- package/src/components/pagination.js +33 -34
- package/src/components/radio.js +55 -54
- package/src/components/switch.js +61 -64
- package/src/components/table.js +9 -9
- package/src/components/tag.js +40 -38
- package/src/components/user-menu.js +23 -23
- package/src/components/zebratable.js +59 -60
- package/src/index.js +109 -119
package/src/components/tag.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
function tagOutline(colors) {
|
|
2
2
|
return {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
'.tag-outline': {
|
|
4
|
+
'@apply border bg-transparent border-gray-stroke text-body': {},
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
'&[href]': {
|
|
7
7
|
[`@apply hover:border-hover hover:text-white hover:bg-hover`]: {},
|
|
8
8
|
[`@apply active:text-white active:bg-hover`]: {},
|
|
9
9
|
[`@apply focus-visible:text-white focus-visible:ring-4 focus-visible:ring-black focus-visible:bg-hover`]: {},
|
|
@@ -14,17 +14,17 @@ function tagOutline(colors) {
|
|
|
14
14
|
|
|
15
15
|
function tagSolid(colors) {
|
|
16
16
|
return {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
'.tag-solid': {
|
|
18
|
+
'@apply border bg-gray-stroke border-transparent text-white': {},
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
'&[href]': {
|
|
21
21
|
[`@apply hover:text-white hover:bg-hover`]: {},
|
|
22
22
|
[`@apply active:text-white active:bg-hover`]: {},
|
|
23
23
|
[`@apply focus-visible:text-white focus-visible:ring-4 focus-visible:ring-black focus-visible:bg-hover`]: {},
|
|
24
24
|
},
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
'.tag-close-button': {
|
|
27
|
+
'@apply text-white hover:text-body': {},
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
};
|
|
@@ -32,10 +32,10 @@ function tagSolid(colors) {
|
|
|
32
32
|
|
|
33
33
|
function tagLight(colors) {
|
|
34
34
|
return {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
'.tag-light': {
|
|
36
|
+
'@apply border border-transparent text-body': {},
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
'&[href]': {
|
|
39
39
|
[`@apply hover:border-hover`]: {},
|
|
40
40
|
[`@apply active:border-hover`]: {},
|
|
41
41
|
[`@apply focus-visible:border-hover focus-visible:ring-4 focus-visible:ring-black`]: {},
|
|
@@ -45,30 +45,31 @@ function tagLight(colors) {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
module.exports = Tag = (colors) => ({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
'.tag': {
|
|
49
|
+
'@apply leading-none inline-flex items-center content-center max-h-full rounded-full font-normal outline-none whitespace-nowrap':
|
|
50
|
+
{},
|
|
51
|
+
width: 'fit-content',
|
|
52
|
+
height: 'fit-content',
|
|
53
|
+
padding: '0 1.145em 0 1.145em',
|
|
54
|
+
borderRadius: '3.2rem',
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
padding:
|
|
56
|
+
'&-text': {
|
|
57
|
+
padding: '0.5em 0',
|
|
57
58
|
},
|
|
58
59
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
minWidth:
|
|
60
|
+
'&-sm': {
|
|
61
|
+
'@apply text-xs': {},
|
|
62
|
+
minWidth: '1.25rem',
|
|
62
63
|
},
|
|
63
64
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
minWidth:
|
|
65
|
+
'&-md': {
|
|
66
|
+
'@apply text-sm': {},
|
|
67
|
+
minWidth: '1.5rem',
|
|
67
68
|
},
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
minWidth:
|
|
70
|
+
'&-lg': {
|
|
71
|
+
'@apply text-base': {},
|
|
72
|
+
minWidth: '1.75rem',
|
|
72
73
|
},
|
|
73
74
|
},
|
|
74
75
|
|
|
@@ -77,19 +78,20 @@ module.exports = Tag = (colors) => ({
|
|
|
77
78
|
...tagSolid(colors),
|
|
78
79
|
...tagLight(colors),
|
|
79
80
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
'.tag-close-button': {
|
|
82
|
+
'@apply text-body border-transparent flex items-center justify-center transition-all duration-150 rounded-full outline-none cursor-base':
|
|
83
|
+
{},
|
|
84
|
+
fontSize: '1em',
|
|
85
|
+
padding: '0.36em',
|
|
86
|
+
marginLeft: '0.25em',
|
|
87
|
+
marginRight: '-0.55em',
|
|
86
88
|
|
|
87
|
-
|
|
88
|
-
fontSize:
|
|
89
|
+
'&-icon': {
|
|
90
|
+
fontSize: '1em !important',
|
|
89
91
|
},
|
|
90
92
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
'&-disabled': {
|
|
94
|
+
'@apply disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none': {},
|
|
93
95
|
},
|
|
94
96
|
},
|
|
95
97
|
});
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
module.exports = UserMenu = (colors) => ({
|
|
2
|
-
|
|
3
|
-
// "@apply mx-sm mt-sm mb-0 px-md py-0 divide-y divide-y-2 divide-gray-300 bg-white border-2 border-white border-solid rounded":
|
|
4
|
-
|
|
5
|
-
// "@apply ": {},
|
|
6
|
-
|
|
7
|
-
// "@apply border-2 border-gray-300 border-solid rounded": {},
|
|
8
|
-
// "box-shadow": "0px 4px 12px rgba(27, 29, 31, 0.12)",
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
'[aria-expanded="true"] &': {
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
});
|
|
1
|
+
module.exports = UserMenu = (colors) => ({
|
|
2
|
+
'.usermenu': {
|
|
3
|
+
// "@apply mx-sm mt-sm mb-0 px-md py-0 divide-y divide-y-2 divide-gray-300 bg-white border-2 border-white border-solid rounded":
|
|
4
|
+
'@apply text-body': {},
|
|
5
|
+
// "@apply ": {},
|
|
6
|
+
'&-is-open': {
|
|
7
|
+
// "@apply border-2 border-gray-300 border-solid rounded": {},
|
|
8
|
+
// "box-shadow": "0px 4px 12px rgba(27, 29, 31, 0.12)",
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
'&-header': {
|
|
12
|
+
'[aria-expanded="true"] &': {
|
|
13
|
+
'@apply bg-hover': {},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
'&-item': {
|
|
17
|
+
'@apply block px-lg py-md lg:px-md lg:py-sm w-full cursor-pointer text-body no-underline': {},
|
|
18
|
+
'&.active': {
|
|
19
|
+
'@apply bg-hover text-white no-underline': {},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
});
|
|
@@ -1,78 +1,77 @@
|
|
|
1
|
-
module.exports = ZebraTable = () => ({
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
(module).exports = ZebraTable = () => ({
|
|
2
|
+
'.zebratable': {
|
|
3
|
+
'@apply w-full text-left table-auto': {},
|
|
4
4
|
|
|
5
|
+
'&-thead': {
|
|
6
|
+
'&-tr': {
|
|
7
|
+
'@apply text-sm hidden lg:table-row': {},
|
|
8
|
+
},
|
|
5
9
|
|
|
6
|
-
|
|
10
|
+
'&-th': {
|
|
11
|
+
'@apply py-sm first-of-type:pl-lg': {},
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
"&[data-isColumnSortable='true']": {
|
|
14
|
+
'@apply py-sm cursor-pointer': {},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
'&-sortbutton': {
|
|
20
|
+
'@apply flex items-center': {},
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
'&-icon': {
|
|
23
|
+
'@apply inline-flex pl-sm': {},
|
|
14
24
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
},
|
|
25
|
+
'.MuiSvgIcon-root': {
|
|
26
|
+
'@apply !text-lg': {},
|
|
19
27
|
},
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"&-sort": {
|
|
33
|
-
"@apply text-black transform": {},
|
|
34
|
-
|
|
35
|
-
"&[data-sortmodeascending='true']": {
|
|
36
|
-
"@apply -rotate-90": {},
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
"&[data-sortmodeascending='false']": {
|
|
40
|
-
"@apply rotate-90": {},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
"&-more": {
|
|
45
|
-
"@apply text-gray": {},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
29
|
+
'&-sort': {
|
|
30
|
+
'@apply text-black transform': {},
|
|
31
|
+
|
|
32
|
+
"&[data-sortmodeascending='true']": {
|
|
33
|
+
'@apply -rotate-90': {},
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
"&[data-sortmodeascending='false']": {
|
|
37
|
+
'@apply rotate-90': {},
|
|
38
|
+
},
|
|
48
39
|
},
|
|
49
40
|
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
'&-more': {
|
|
42
|
+
'@apply text-gray': {},
|
|
52
43
|
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
53
46
|
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
'.material-icons-outlined': {
|
|
48
|
+
fontSize: '1.25em',
|
|
49
|
+
},
|
|
56
50
|
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
'&-tbody': {
|
|
52
|
+
'@apply text-body lg:bg-white': {},
|
|
59
53
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
54
|
+
'&-tr': {
|
|
55
|
+
'@apply transition-all bg-white lg:even:bg-white lg:odd:bg-gray-100 px-md py-md md:px-lg md:py-lg my-lg first-of-type:mt-0 block shadow-md lg:shadow-none lg:table-row lg:my-0 lg:py-0 lg:px-lg':
|
|
56
|
+
{},
|
|
64
57
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
58
|
+
'&.highlighted': {
|
|
59
|
+
'@apply lg:border-4 lg:border-hover': {},
|
|
68
60
|
},
|
|
61
|
+
},
|
|
69
62
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
'&-td': {
|
|
64
|
+
'@apply empty:hidden py-4 px-sm lg:px-0 first-of-type:pl-sm lg:first-of-type:pl-lg last-of-type:px-0 lg:last-of-type:pr-lg last-of-type:text-right block lg:table-cell even:bg-white odd:bg-gray-100 last-of-type:bg-transparent lg:even:bg-transparent lg:odd:bg-transparent':
|
|
65
|
+
{},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
73
68
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
'&-paginationwrapper': {
|
|
70
|
+
'@apply w-full text-lg flex justify-center lg:justify-start': {},
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
'&-bottomwrapper': {
|
|
74
|
+
'@apply mt-lg px-lg flex items-center justify-end': {},
|
|
77
75
|
},
|
|
78
|
-
}
|
|
76
|
+
},
|
|
77
|
+
});
|
package/src/index.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
const plugin = require(
|
|
1
|
+
const plugin = require('tailwindcss/plugin');
|
|
2
2
|
|
|
3
3
|
// const colors = require("/colors");
|
|
4
|
-
const { colors } = require(
|
|
5
|
-
const withOpacity = require(
|
|
4
|
+
const { colors } = require('@sk-web-gui/theme');
|
|
5
|
+
const withOpacity = require('./with-opacity');
|
|
6
6
|
// components
|
|
7
|
-
const Alert = require(
|
|
8
|
-
const Breadcrumb = require(
|
|
9
|
-
const ButtonGroup = require(
|
|
7
|
+
const Alert = require('./components/alert');
|
|
8
|
+
const Breadcrumb = require('./components/breadcrumb');
|
|
9
|
+
const ButtonGroup = require('./components/button-group');
|
|
10
10
|
|
|
11
|
-
const Checkbox = require(
|
|
12
|
-
const Dot = require(
|
|
13
|
-
const Forms = require(
|
|
14
|
-
const Calendar = require(
|
|
15
|
-
const IconButton = require(
|
|
16
|
-
const Icon = require(
|
|
17
|
-
const Link = require(
|
|
18
|
-
const Message = require(
|
|
19
|
-
const Notification = require(
|
|
20
|
-
const Radio = require(
|
|
21
|
-
const Switch = require(
|
|
11
|
+
const Checkbox = require('./components/checkbox');
|
|
12
|
+
const Dot = require('./components/dot');
|
|
13
|
+
const Forms = require('./components/forms');
|
|
14
|
+
const Calendar = require('./components/calendar');
|
|
15
|
+
const IconButton = require('./components/icon-button');
|
|
16
|
+
const Icon = require('./components/icon');
|
|
17
|
+
const Link = require('./components/link');
|
|
18
|
+
const Message = require('./components/message');
|
|
19
|
+
const Notification = require('./components/notification');
|
|
20
|
+
const Radio = require('./components/radio');
|
|
21
|
+
const Switch = require('./components/switch');
|
|
22
22
|
|
|
23
|
-
const Button = require(
|
|
24
|
-
const Accordion = require(
|
|
25
|
-
const Card = require(
|
|
26
|
-
const Table = require(
|
|
27
|
-
const ZebraTable = require(
|
|
23
|
+
const Button = require('./components/button');
|
|
24
|
+
const Accordion = require('./components/accordion');
|
|
25
|
+
const Card = require('./components/card');
|
|
26
|
+
const Table = require('./components/table');
|
|
27
|
+
const ZebraTable = require('./components/zebratable');
|
|
28
28
|
|
|
29
|
-
const Modal = require(
|
|
30
|
-
const CookieConsent = require(
|
|
31
|
-
const Divider = require(
|
|
29
|
+
const Modal = require('./components/modal');
|
|
30
|
+
const CookieConsent = require('./components/cookie-consent');
|
|
31
|
+
const Divider = require('./components/divider');
|
|
32
32
|
|
|
33
|
-
const UserMenu = require(
|
|
33
|
+
const UserMenu = require('./components/user-menu');
|
|
34
34
|
|
|
35
|
-
const Tag = require(
|
|
36
|
-
const Pagination = require(
|
|
37
|
-
const Footer = require(
|
|
38
|
-
const Header = require(
|
|
35
|
+
const Tag = require('./components/tag');
|
|
36
|
+
const Pagination = require('./components/pagination');
|
|
37
|
+
const Footer = require('./components/footer');
|
|
38
|
+
const Header = require('./components/header');
|
|
39
39
|
|
|
40
40
|
const components = [
|
|
41
41
|
Alert,
|
|
@@ -71,19 +71,11 @@ const components = [
|
|
|
71
71
|
Header,
|
|
72
72
|
];
|
|
73
73
|
|
|
74
|
-
const defaultColors = [
|
|
74
|
+
const defaultColors = ['primary', 'secondary'];
|
|
75
75
|
|
|
76
76
|
module.exports = plugin.withOptions(
|
|
77
77
|
function (options = { colors: [], cssBase: true }) {
|
|
78
|
-
return function ({
|
|
79
|
-
addComponents,
|
|
80
|
-
addVariant,
|
|
81
|
-
addBase,
|
|
82
|
-
variants,
|
|
83
|
-
e,
|
|
84
|
-
theme,
|
|
85
|
-
addUtilities,
|
|
86
|
-
}) {
|
|
78
|
+
return function ({ addComponents, addVariant, addBase, variants, e, theme, addUtilities }) {
|
|
87
79
|
const optionColors = [...defaultColors, ...(options.colors || [])];
|
|
88
80
|
|
|
89
81
|
active({ addVariant, variants, e, theme, addUtilities });
|
|
@@ -100,50 +92,50 @@ module.exports = plugin.withOptions(
|
|
|
100
92
|
if (options.cssBase) {
|
|
101
93
|
addBase({
|
|
102
94
|
html: {
|
|
103
|
-
|
|
104
|
-
fontSize:
|
|
105
|
-
lineHeight:
|
|
106
|
-
textRendering:
|
|
107
|
-
textSizeAdjust:
|
|
108
|
-
touchAction:
|
|
95
|
+
'@apply text-foreground antialiased bg-base': {},
|
|
96
|
+
fontSize: '62.5%',
|
|
97
|
+
lineHeight: '1.5',
|
|
98
|
+
textRendering: 'optimizeLegibility',
|
|
99
|
+
textSizeAdjust: '100%',
|
|
100
|
+
touchAction: 'manipulation',
|
|
109
101
|
},
|
|
110
102
|
body: {
|
|
111
|
-
|
|
112
|
-
position:
|
|
113
|
-
minHeight:
|
|
103
|
+
'@apply text-base leading-base': {},
|
|
104
|
+
position: 'relative',
|
|
105
|
+
minHeight: '100%',
|
|
114
106
|
fontFeatureSettings: "'kern'",
|
|
115
107
|
},
|
|
116
|
-
|
|
117
|
-
|
|
108
|
+
'h1,h2,h3,h4,h5,h6': {
|
|
109
|
+
'@apply font-bold': {},
|
|
118
110
|
},
|
|
119
111
|
small: {
|
|
120
|
-
fontSize:
|
|
112
|
+
fontSize: '1.4rem',
|
|
121
113
|
},
|
|
122
|
-
h1: {
|
|
123
|
-
h2: {
|
|
124
|
-
h3: {
|
|
125
|
-
h4: {
|
|
126
|
-
h5: {
|
|
127
|
-
h6: {
|
|
128
|
-
p: {
|
|
114
|
+
h1: { '@apply text-3xl leading-3xl': {} },
|
|
115
|
+
h2: { '@apply text-2xl leading-2xl': {} },
|
|
116
|
+
h3: { '@apply text-xl leading-xl': {} },
|
|
117
|
+
h4: { '@apply text-lg leading-lg': {} },
|
|
118
|
+
h5: { '@apply text-base leading-base': {} },
|
|
119
|
+
h6: { '@apply text-sm leading-sm': {} },
|
|
120
|
+
p: { '@apply my-4': {} },
|
|
129
121
|
|
|
130
122
|
'.text-content': {
|
|
131
|
-
|
|
123
|
+
'@apply max-w-[80rem]': {},
|
|
132
124
|
|
|
133
|
-
h1: {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
125
|
+
h1: {
|
|
126
|
+
'@apply mb-md': {},
|
|
127
|
+
|
|
128
|
+
'+ p': {
|
|
129
|
+
'@apply mb-[40px] mt-0': {},
|
|
130
|
+
},
|
|
139
131
|
},
|
|
140
|
-
h2: {
|
|
141
|
-
h3: {
|
|
142
|
-
h4: {
|
|
143
|
-
h5: {
|
|
144
|
-
h6: {
|
|
145
|
-
p: {
|
|
146
|
-
}
|
|
132
|
+
h2: { '@apply mt-lg': {} },
|
|
133
|
+
h3: { '@apply mt-lg': {} },
|
|
134
|
+
h4: { '@apply mt-lg': {} },
|
|
135
|
+
h5: { '@apply mt-lg': {} },
|
|
136
|
+
h6: { '@apply mt-lg': {} },
|
|
137
|
+
p: { '@apply mt-sm leading-[1.5]': {} },
|
|
138
|
+
},
|
|
147
139
|
});
|
|
148
140
|
}
|
|
149
141
|
};
|
|
@@ -152,16 +144,16 @@ module.exports = plugin.withOptions(
|
|
|
152
144
|
return {
|
|
153
145
|
theme: {
|
|
154
146
|
fontSize: {
|
|
155
|
-
tiny:
|
|
156
|
-
xs:
|
|
157
|
-
sm:
|
|
158
|
-
base:
|
|
159
|
-
lg:
|
|
160
|
-
xl:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
147
|
+
tiny: '1rem',
|
|
148
|
+
xs: '1.2rem',
|
|
149
|
+
sm: '1.4rem',
|
|
150
|
+
base: '1.6rem',
|
|
151
|
+
lg: '1.8rem',
|
|
152
|
+
xl: '2.0rem',
|
|
153
|
+
'2xl': '2.4rem',
|
|
154
|
+
'3xl': '3.2rem',
|
|
155
|
+
'4xl': '4.0rem',
|
|
156
|
+
'5xl': '5.2rem',
|
|
165
157
|
},
|
|
166
158
|
extend: {
|
|
167
159
|
colors: {
|
|
@@ -169,40 +161,40 @@ module.exports = plugin.withOptions(
|
|
|
169
161
|
current: 'currentColor',
|
|
170
162
|
},
|
|
171
163
|
cursor: {
|
|
172
|
-
base:
|
|
164
|
+
base: 'var(--vc-cursor)',
|
|
173
165
|
},
|
|
174
166
|
spacing: {
|
|
175
|
-
xs:
|
|
176
|
-
sm:
|
|
177
|
-
md:
|
|
178
|
-
lg:
|
|
179
|
-
xl:
|
|
167
|
+
xs: '4px',
|
|
168
|
+
sm: '8px',
|
|
169
|
+
md: '16px',
|
|
170
|
+
lg: '24px',
|
|
171
|
+
xl: '48px',
|
|
180
172
|
},
|
|
181
173
|
lineHeight: {
|
|
182
|
-
tiny:
|
|
183
|
-
xs:
|
|
184
|
-
sm:
|
|
185
|
-
base:
|
|
186
|
-
lg:
|
|
187
|
-
xl:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
174
|
+
tiny: '1.4rem',
|
|
175
|
+
xs: '1.6rem',
|
|
176
|
+
sm: '2rem',
|
|
177
|
+
base: '2.4rem',
|
|
178
|
+
lg: '2.4rem',
|
|
179
|
+
xl: '3.2rem',
|
|
180
|
+
'2xl': '3.2rem',
|
|
181
|
+
'3xl': '4rem',
|
|
182
|
+
'4xl': '4.8rem',
|
|
183
|
+
'5xl': '5.8rem',
|
|
192
184
|
},
|
|
193
185
|
opacity: {
|
|
194
|
-
15:
|
|
186
|
+
15: '0.15',
|
|
195
187
|
},
|
|
196
188
|
backgroundColor: {
|
|
197
|
-
base: withOpacity(
|
|
198
|
-
fill: withOpacity(
|
|
189
|
+
base: withOpacity('--vc-colors-bg-base'),
|
|
190
|
+
fill: withOpacity('--vc-colors-bg-fill'),
|
|
199
191
|
},
|
|
200
192
|
textColor: {
|
|
201
|
-
foreground: withOpacity(
|
|
202
|
-
muted: withOpacity(
|
|
193
|
+
foreground: withOpacity('--vc-colors-text-foreground'),
|
|
194
|
+
muted: withOpacity('--vc-colors-text-muted'),
|
|
203
195
|
},
|
|
204
196
|
borderRadius: {
|
|
205
|
-
base:
|
|
197
|
+
base: 'var(--vc-rounded)',
|
|
206
198
|
},
|
|
207
199
|
zIndex: {
|
|
208
200
|
hide: -1,
|
|
@@ -223,13 +215,13 @@ module.exports = plugin.withOptions(
|
|
|
223
215
|
},
|
|
224
216
|
variants: {
|
|
225
217
|
extend: {
|
|
226
|
-
boxShadow: [
|
|
227
|
-
cursor: [
|
|
228
|
-
opacity: [
|
|
229
|
-
textColor: [
|
|
230
|
-
textDecoration: [
|
|
231
|
-
backgroundColor: [
|
|
232
|
-
borderColor: [
|
|
218
|
+
boxShadow: ['disabled'],
|
|
219
|
+
cursor: ['disabled'],
|
|
220
|
+
opacity: ['active', 'disabled'],
|
|
221
|
+
textColor: ['active', 'disabled:hover'],
|
|
222
|
+
textDecoration: ['disabled'],
|
|
223
|
+
backgroundColor: ['disabled'],
|
|
224
|
+
borderColor: ['disabled'],
|
|
233
225
|
},
|
|
234
226
|
},
|
|
235
227
|
};
|
|
@@ -237,7 +229,7 @@ module.exports = plugin.withOptions(
|
|
|
237
229
|
);
|
|
238
230
|
|
|
239
231
|
function active({ addVariant, e }) {
|
|
240
|
-
addVariant(
|
|
232
|
+
addVariant('active', ({ modifySelectors, separator }) => {
|
|
241
233
|
modifySelectors(({ className }) => {
|
|
242
234
|
return `.${e(`active${separator}${className}`)}:active, .${e(
|
|
243
235
|
`active${separator}${className}`
|
|
@@ -247,7 +239,7 @@ function active({ addVariant, e }) {
|
|
|
247
239
|
}
|
|
248
240
|
|
|
249
241
|
function selected({ addVariant, e }) {
|
|
250
|
-
addVariant(
|
|
242
|
+
addVariant('selected', ({ modifySelectors, separator }) => {
|
|
251
243
|
modifySelectors(({ className }) => {
|
|
252
244
|
return `.${e(`selected${separator}${className}`)}[aria-selected=true]`;
|
|
253
245
|
});
|
|
@@ -255,16 +247,14 @@ function selected({ addVariant, e }) {
|
|
|
255
247
|
}
|
|
256
248
|
|
|
257
249
|
function disabled({ addVariant, e }) {
|
|
258
|
-
addVariant(
|
|
250
|
+
addVariant('disabled', ({ modifySelectors, separator }) => {
|
|
259
251
|
modifySelectors(({ className }) => {
|
|
260
252
|
return `.${e(`disabled${separator}${className}`)}[aria-disabled=true]`;
|
|
261
253
|
});
|
|
262
254
|
});
|
|
263
|
-
addVariant(
|
|
255
|
+
addVariant('disabled:hover', ({ modifySelectors, separator }) => {
|
|
264
256
|
modifySelectors(({ className }) => {
|
|
265
|
-
return `.${e(
|
|
266
|
-
`disabled:hover${separator}${className}`
|
|
267
|
-
)}[aria-disabled=true]`;
|
|
257
|
+
return `.${e(`disabled:hover${separator}${className}`)}[aria-disabled=true]`;
|
|
268
258
|
});
|
|
269
259
|
});
|
|
270
260
|
}
|