@sk-web-gui/core 0.1.37 → 0.1.39
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/LICENSE +21 -21
- package/README.md +5 -5
- package/package.json +2 -2
- package/src/colors.js +145 -145
- package/src/components/accordion.js +89 -89
- package/src/components/alert.js +98 -98
- package/src/components/avatar.js +85 -85
- package/src/components/badge.js +60 -60
- package/src/components/breadcrumb.js +13 -13
- package/src/components/button-group.js +46 -46
- package/src/components/button.js +304 -304
- package/src/components/calendar.js +82 -82
- package/src/components/card.js +54 -54
- package/src/components/checkbox.js +127 -127
- package/src/components/code.js +9 -9
- package/src/components/cookie-consent.js +30 -30
- package/src/components/divider.js +12 -12
- package/src/components/dot.js +84 -84
- package/src/components/dropdown-filter.js +72 -72
- package/src/components/footer.js +42 -42
- package/src/components/forms.js +256 -256
- package/src/components/header.js +35 -35
- package/src/components/icon-button.js +5 -5
- package/src/components/icon.js +9 -9
- package/src/components/kbd.js +9 -9
- package/src/components/link.js +20 -20
- package/src/components/message.js +62 -62
- package/src/components/modal.js +30 -30
- package/src/components/notification.js +56 -56
- package/src/components/pagination.js +69 -69
- package/src/components/radio.js +104 -104
- package/src/components/search-bar.js +44 -44
- package/src/components/side-menu.js +186 -0
- package/src/components/switch.js +119 -119
- package/src/components/tab-menu.js +36 -36
- package/src/components/table.js +13 -13
- package/src/components/tag.js +97 -97
- package/src/components/user-menu.js +23 -23
- package/src/components/zebratable.js +77 -77
- package/src/index.js +272 -272
- package/src/with-opacity.js +6 -6
- package/src/components/menu.js +0 -171
package/src/components/switch.js
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
module.exports = Switch = (colors) => ({
|
|
2
|
-
'.form-switch-label': {
|
|
3
|
-
'@apply inline-block align-middle': {},
|
|
4
|
-
|
|
5
|
-
"&[type='hidden']": {
|
|
6
|
-
'@apply hidden': {},
|
|
7
|
-
|
|
8
|
-
'.form-switch': {
|
|
9
|
-
'@apply hidden': {},
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
'.form-switch': {
|
|
14
|
-
'@apply rounded-full p-0.5 cursor-base focus:outline-none': {},
|
|
15
|
-
'@apply bg-gray-stroke dark:bg-neutral-700': {},
|
|
16
|
-
// Hover
|
|
17
|
-
//"@apply hover:bg-neutral-300 dark:hover:bg-neutral-600": {},
|
|
18
|
-
|
|
19
|
-
border: '0.1rem solid transparent',
|
|
20
|
-
|
|
21
|
-
'input[type=checkbox]:checked + &, input[type=checkbox][aria-checked=mixed] + &': {
|
|
22
|
-
backgroundColor: 'currentColor',
|
|
23
|
-
'.form-switch-box-sm': {
|
|
24
|
-
transform: 'translateX(1.42rem)',
|
|
25
|
-
},
|
|
26
|
-
'.form-switch-box-md': {
|
|
27
|
-
transform: 'translateX(1.6rem)',
|
|
28
|
-
},
|
|
29
|
-
'.form-switch-box-lg': {
|
|
30
|
-
transform: 'translateX(1.78rem)',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
'input[type=checkbox]:focus-visible + &': {
|
|
35
|
-
'@apply z-base !important': {},
|
|
36
|
-
'@apply border-primary !important': {},
|
|
37
|
-
'@apply ring-4 ring-black !important': {},
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
'input[type=checkbox]:checked:focus-visible + &, input[type=checkbox][aria-checked=mixed]:focus-visible + &': {
|
|
41
|
-
'@apply ring-black !important': {},
|
|
42
|
-
},
|
|
43
|
-
'.dark input[type=checkbox]:checked:focus-visible + &,.dark input[type=checkbox][aria-checked=mixed]:focus-visible + &':
|
|
44
|
-
{
|
|
45
|
-
'@apply ring-black !important': {},
|
|
46
|
-
},
|
|
47
|
-
'input[type=checkbox]:checked:hover:not(:disabled) + &, input[type=checkbox][aria-checked=mixed]:hover:not(:disabled) + &':
|
|
48
|
-
{
|
|
49
|
-
'@apply cursor-base': {},
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
// colors
|
|
53
|
-
...colors.reduce(
|
|
54
|
-
(styles, color) => ({
|
|
55
|
-
...styles,
|
|
56
|
-
[`&[data-color="${color}"]`]: {
|
|
57
|
-
[`@apply text-${color}`]: {},
|
|
58
|
-
|
|
59
|
-
'input[type=checkbox]:focus + &': {
|
|
60
|
-
borderColor: `theme('colors.${color}.DEFAULT')`,
|
|
61
|
-
boxShadow: `0 0 5px theme('colors.${color}.DEFAULT')`,
|
|
62
|
-
borderWidth: '0.1rem',
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
}),
|
|
66
|
-
{}
|
|
67
|
-
),
|
|
68
|
-
|
|
69
|
-
// disabled
|
|
70
|
-
'&-disabled': {
|
|
71
|
-
'@apply cursor-not-allowed': {},
|
|
72
|
-
|
|
73
|
-
'&': {
|
|
74
|
-
backgroundColor: '#ECECEC',
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
'input[type=checkbox]:not(:checked) + &-disabled .form-switch-box': {
|
|
79
|
-
'@apply bg-gray-stroke': {},
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
// sizing
|
|
83
|
-
'&-sm': {
|
|
84
|
-
height: '2.16rem',
|
|
85
|
-
width: '3.6rem',
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
'&-md': {
|
|
89
|
-
height: '2.4rem',
|
|
90
|
-
width: '4rem',
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
'&-lg': {
|
|
94
|
-
height: '2.64rem',
|
|
95
|
-
width: '4.4rem',
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
// Knob
|
|
100
|
-
'.form-switch-box': {
|
|
101
|
-
'@apply transition-transform ease-in-out duration-150 transform bg-white rounded-full shadow translate-x-0': {},
|
|
102
|
-
|
|
103
|
-
// sizing
|
|
104
|
-
'&-sm': {
|
|
105
|
-
height: '1.6rem',
|
|
106
|
-
width: '1.7rem',
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
'&-md': {
|
|
110
|
-
height: '2rem',
|
|
111
|
-
width: '2rem',
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
'&-lg': {
|
|
115
|
-
height: '2.2rem',
|
|
116
|
-
width: '2.2rem',
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
});
|
|
1
|
+
module.exports = Switch = (colors) => ({
|
|
2
|
+
'.form-switch-label': {
|
|
3
|
+
'@apply inline-block align-middle': {},
|
|
4
|
+
|
|
5
|
+
"&[type='hidden']": {
|
|
6
|
+
'@apply hidden': {},
|
|
7
|
+
|
|
8
|
+
'.form-switch': {
|
|
9
|
+
'@apply hidden': {},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
'.form-switch': {
|
|
14
|
+
'@apply rounded-full p-0.5 cursor-base focus:outline-none': {},
|
|
15
|
+
'@apply bg-gray-stroke dark:bg-neutral-700': {},
|
|
16
|
+
// Hover
|
|
17
|
+
//"@apply hover:bg-neutral-300 dark:hover:bg-neutral-600": {},
|
|
18
|
+
|
|
19
|
+
border: '0.1rem solid transparent',
|
|
20
|
+
|
|
21
|
+
'input[type=checkbox]:checked + &, input[type=checkbox][aria-checked=mixed] + &': {
|
|
22
|
+
backgroundColor: 'currentColor',
|
|
23
|
+
'.form-switch-box-sm': {
|
|
24
|
+
transform: 'translateX(1.42rem)',
|
|
25
|
+
},
|
|
26
|
+
'.form-switch-box-md': {
|
|
27
|
+
transform: 'translateX(1.6rem)',
|
|
28
|
+
},
|
|
29
|
+
'.form-switch-box-lg': {
|
|
30
|
+
transform: 'translateX(1.78rem)',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
'input[type=checkbox]:focus-visible + &': {
|
|
35
|
+
'@apply z-base !important': {},
|
|
36
|
+
'@apply border-primary !important': {},
|
|
37
|
+
'@apply ring-4 ring-black !important': {},
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
'input[type=checkbox]:checked:focus-visible + &, input[type=checkbox][aria-checked=mixed]:focus-visible + &': {
|
|
41
|
+
'@apply ring-black !important': {},
|
|
42
|
+
},
|
|
43
|
+
'.dark input[type=checkbox]:checked:focus-visible + &,.dark input[type=checkbox][aria-checked=mixed]:focus-visible + &':
|
|
44
|
+
{
|
|
45
|
+
'@apply ring-black !important': {},
|
|
46
|
+
},
|
|
47
|
+
'input[type=checkbox]:checked:hover:not(:disabled) + &, input[type=checkbox][aria-checked=mixed]:hover:not(:disabled) + &':
|
|
48
|
+
{
|
|
49
|
+
'@apply cursor-base': {},
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
// colors
|
|
53
|
+
...colors.reduce(
|
|
54
|
+
(styles, color) => ({
|
|
55
|
+
...styles,
|
|
56
|
+
[`&[data-color="${color}"]`]: {
|
|
57
|
+
[`@apply text-${color}`]: {},
|
|
58
|
+
|
|
59
|
+
'input[type=checkbox]:focus + &': {
|
|
60
|
+
borderColor: `theme('colors.${color}.DEFAULT')`,
|
|
61
|
+
boxShadow: `0 0 5px theme('colors.${color}.DEFAULT')`,
|
|
62
|
+
borderWidth: '0.1rem',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
}),
|
|
66
|
+
{}
|
|
67
|
+
),
|
|
68
|
+
|
|
69
|
+
// disabled
|
|
70
|
+
'&-disabled': {
|
|
71
|
+
'@apply cursor-not-allowed': {},
|
|
72
|
+
|
|
73
|
+
'&': {
|
|
74
|
+
backgroundColor: '#ECECEC',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
'input[type=checkbox]:not(:checked) + &-disabled .form-switch-box': {
|
|
79
|
+
'@apply bg-gray-stroke': {},
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
// sizing
|
|
83
|
+
'&-sm': {
|
|
84
|
+
height: '2.16rem',
|
|
85
|
+
width: '3.6rem',
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
'&-md': {
|
|
89
|
+
height: '2.4rem',
|
|
90
|
+
width: '4rem',
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
'&-lg': {
|
|
94
|
+
height: '2.64rem',
|
|
95
|
+
width: '4.4rem',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
// Knob
|
|
100
|
+
'.form-switch-box': {
|
|
101
|
+
'@apply transition-transform ease-in-out duration-150 transform bg-white rounded-full shadow translate-x-0': {},
|
|
102
|
+
|
|
103
|
+
// sizing
|
|
104
|
+
'&-sm': {
|
|
105
|
+
height: '1.6rem',
|
|
106
|
+
width: '1.7rem',
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
'&-md': {
|
|
110
|
+
height: '2rem',
|
|
111
|
+
width: '2rem',
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
'&-lg': {
|
|
115
|
+
height: '2.2rem',
|
|
116
|
+
width: '2.2rem',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
});
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
module.exports = TabMenu = () => ({
|
|
2
|
-
".TabMenu": {
|
|
3
|
-
|
|
4
|
-
".tab-wrapper": {
|
|
5
|
-
display: "flex",
|
|
6
|
-
flexDirection: "row"
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
".TabItem": {
|
|
10
|
-
all: 'unset',
|
|
11
|
-
height: 65,
|
|
12
|
-
display: "flex",
|
|
13
|
-
padding: "0 1rem",
|
|
14
|
-
marginRight: "5rem",
|
|
15
|
-
alignItems: "center",
|
|
16
|
-
position: "relative",
|
|
17
|
-
|
|
18
|
-
"&.active::after": {
|
|
19
|
-
content: '""',
|
|
20
|
-
display: "block",
|
|
21
|
-
position: "absolute",
|
|
22
|
-
width: "100%",
|
|
23
|
-
height: 6,
|
|
24
|
-
background: "#005595",
|
|
25
|
-
top: "100%",
|
|
26
|
-
left: 0,
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
".underline": {
|
|
31
|
-
width: "100%",
|
|
32
|
-
height: 6,
|
|
33
|
-
background: "#F4F4F4"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
});
|
|
1
|
+
module.exports = TabMenu = () => ({
|
|
2
|
+
".TabMenu": {
|
|
3
|
+
|
|
4
|
+
".tab-wrapper": {
|
|
5
|
+
display: "flex",
|
|
6
|
+
flexDirection: "row"
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
".TabItem": {
|
|
10
|
+
all: 'unset',
|
|
11
|
+
height: 65,
|
|
12
|
+
display: "flex",
|
|
13
|
+
padding: "0 1rem",
|
|
14
|
+
marginRight: "5rem",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
position: "relative",
|
|
17
|
+
|
|
18
|
+
"&.active::after": {
|
|
19
|
+
content: '""',
|
|
20
|
+
display: "block",
|
|
21
|
+
position: "absolute",
|
|
22
|
+
width: "100%",
|
|
23
|
+
height: 6,
|
|
24
|
+
background: "#005595",
|
|
25
|
+
top: "100%",
|
|
26
|
+
left: 0,
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
".underline": {
|
|
31
|
+
width: "100%",
|
|
32
|
+
height: 6,
|
|
33
|
+
background: "#F4F4F4"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
37
|
|
package/src/components/table.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
module.exports = Table = () => ({
|
|
2
|
-
'.table': {
|
|
3
|
-
'@apply min-w-full border-collapse border-gray-stroke divide-gray-lighter table-auto': {},
|
|
4
|
-
|
|
5
|
-
'&-item': {
|
|
6
|
-
'@apply px-6 py-4 border border-gray-stroke whitespace-nowrap': {},
|
|
7
|
-
|
|
8
|
-
'&:nth-child(odd)': {
|
|
9
|
-
'@apply bg-gray-lighter': {},
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
});
|
|
1
|
+
module.exports = Table = () => ({
|
|
2
|
+
'.table': {
|
|
3
|
+
'@apply min-w-full border-collapse border-gray-stroke divide-gray-lighter table-auto': {},
|
|
4
|
+
|
|
5
|
+
'&-item': {
|
|
6
|
+
'@apply px-6 py-4 border border-gray-stroke whitespace-nowrap': {},
|
|
7
|
+
|
|
8
|
+
'&:nth-child(odd)': {
|
|
9
|
+
'@apply bg-gray-lighter': {},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
package/src/components/tag.js
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
function tagOutline(colors) {
|
|
2
|
-
return {
|
|
3
|
-
'.tag-outline': {
|
|
4
|
-
'@apply border bg-transparent border-gray-stroke text-body': {},
|
|
5
|
-
|
|
6
|
-
'&[href]': {
|
|
7
|
-
[`@apply hover:border-hover hover:text-white hover:bg-hover`]: {},
|
|
8
|
-
[`@apply active:text-white active:bg-hover`]: {},
|
|
9
|
-
[`@apply focus-visible:text-white focus-visible:ring-4 focus-visible:ring-black focus-visible:bg-hover`]: {},
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function tagSolid(colors) {
|
|
16
|
-
return {
|
|
17
|
-
'.tag-solid': {
|
|
18
|
-
'@apply border bg-gray-stroke border-transparent text-white': {},
|
|
19
|
-
|
|
20
|
-
'&[href]': {
|
|
21
|
-
[`@apply hover:text-white hover:bg-hover`]: {},
|
|
22
|
-
[`@apply active:text-white active:bg-hover`]: {},
|
|
23
|
-
[`@apply focus-visible:text-white focus-visible:ring-4 focus-visible:ring-black focus-visible:bg-hover`]: {},
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
'.tag-close-button': {
|
|
27
|
-
'@apply text-white hover:text-body': {},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function tagLight(colors) {
|
|
34
|
-
return {
|
|
35
|
-
'.tag-light': {
|
|
36
|
-
'@apply border border-transparent text-body': {},
|
|
37
|
-
|
|
38
|
-
'&[href]': {
|
|
39
|
-
[`@apply hover:border-hover`]: {},
|
|
40
|
-
[`@apply active:border-hover`]: {},
|
|
41
|
-
[`@apply focus-visible:border-hover focus-visible:ring-4 focus-visible:ring-black`]: {},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
module.exports = Tag = (colors) => ({
|
|
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',
|
|
55
|
-
|
|
56
|
-
'&-text': {
|
|
57
|
-
padding: '0.5em 0',
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
'&-sm': {
|
|
61
|
-
'@apply text-xs': {},
|
|
62
|
-
minWidth: '1.25rem',
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
'&-md': {
|
|
66
|
-
'@apply text-sm': {},
|
|
67
|
-
minWidth: '1.5rem',
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
'&-lg': {
|
|
71
|
-
'@apply text-base': {},
|
|
72
|
-
minWidth: '1.75rem',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
// variants
|
|
77
|
-
...tagOutline(colors),
|
|
78
|
-
...tagSolid(colors),
|
|
79
|
-
...tagLight(colors),
|
|
80
|
-
|
|
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',
|
|
88
|
-
|
|
89
|
-
'&-icon': {
|
|
90
|
-
fontSize: '1em !important',
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
'&-disabled': {
|
|
94
|
-
'@apply disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none': {},
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
});
|
|
1
|
+
function tagOutline(colors) {
|
|
2
|
+
return {
|
|
3
|
+
'.tag-outline': {
|
|
4
|
+
'@apply border bg-transparent border-gray-stroke text-body': {},
|
|
5
|
+
|
|
6
|
+
'&[href]': {
|
|
7
|
+
[`@apply hover:border-hover hover:text-white hover:bg-hover`]: {},
|
|
8
|
+
[`@apply active:text-white active:bg-hover`]: {},
|
|
9
|
+
[`@apply focus-visible:text-white focus-visible:ring-4 focus-visible:ring-black focus-visible:bg-hover`]: {},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function tagSolid(colors) {
|
|
16
|
+
return {
|
|
17
|
+
'.tag-solid': {
|
|
18
|
+
'@apply border bg-gray-stroke border-transparent text-white': {},
|
|
19
|
+
|
|
20
|
+
'&[href]': {
|
|
21
|
+
[`@apply hover:text-white hover:bg-hover`]: {},
|
|
22
|
+
[`@apply active:text-white active:bg-hover`]: {},
|
|
23
|
+
[`@apply focus-visible:text-white focus-visible:ring-4 focus-visible:ring-black focus-visible:bg-hover`]: {},
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
'.tag-close-button': {
|
|
27
|
+
'@apply text-white hover:text-body': {},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function tagLight(colors) {
|
|
34
|
+
return {
|
|
35
|
+
'.tag-light': {
|
|
36
|
+
'@apply border border-transparent text-body': {},
|
|
37
|
+
|
|
38
|
+
'&[href]': {
|
|
39
|
+
[`@apply hover:border-hover`]: {},
|
|
40
|
+
[`@apply active:border-hover`]: {},
|
|
41
|
+
[`@apply focus-visible:border-hover focus-visible:ring-4 focus-visible:ring-black`]: {},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = Tag = (colors) => ({
|
|
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',
|
|
55
|
+
|
|
56
|
+
'&-text': {
|
|
57
|
+
padding: '0.5em 0',
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
'&-sm': {
|
|
61
|
+
'@apply text-xs': {},
|
|
62
|
+
minWidth: '1.25rem',
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
'&-md': {
|
|
66
|
+
'@apply text-sm': {},
|
|
67
|
+
minWidth: '1.5rem',
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
'&-lg': {
|
|
71
|
+
'@apply text-base': {},
|
|
72
|
+
minWidth: '1.75rem',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
// variants
|
|
77
|
+
...tagOutline(colors),
|
|
78
|
+
...tagSolid(colors),
|
|
79
|
+
...tagLight(colors),
|
|
80
|
+
|
|
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',
|
|
88
|
+
|
|
89
|
+
'&-icon': {
|
|
90
|
+
fontSize: '1em !important',
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
'&-disabled': {
|
|
94
|
+
'@apply disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none': {},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
});
|
|
@@ -1,23 +1,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
|
+
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
|
+
});
|