@sk-web-gui/core 0.1.33 → 0.1.35
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 +46 -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 +7 -4
- 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/card.js
CHANGED
|
@@ -1,55 +1,54 @@
|
|
|
1
1
|
module.exports = Card = () => ({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"@apply hover:shadow-xl hover:cursor-pointer": {},
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
// "@apply bg-neutral-200 border border-neutral-100 text-body": {},
|
|
25
|
-
// dark
|
|
26
|
-
//"@apply dark:bg-neutral-700 dark:border-neutral-600 dark:text-neutral-300": {},
|
|
27
|
-
},
|
|
28
|
-
".card-outlined": {
|
|
29
|
-
"@apply border-2 border-gray-stroke": {},
|
|
30
|
-
},
|
|
31
|
-
".card-border-top": {
|
|
32
|
-
"@apply border-t-4 border-t-primary": {},
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
".card-body": {
|
|
36
|
-
"@apply text-body p-8": {},
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
".card-image": {
|
|
40
|
-
"@apply object-cover": {},
|
|
41
|
-
"width": "100%",
|
|
42
|
-
"height": "250px",
|
|
2
|
+
'.avatar': {
|
|
3
|
+
'@apply bg-primary-light text-primary rounded-full p-4': {},
|
|
4
|
+
},
|
|
5
|
+
|
|
6
|
+
'.card-list': {
|
|
7
|
+
'@apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10': {},
|
|
8
|
+
//"@apply text-center": {},
|
|
9
|
+
//"@apply justify-center items-center": {},
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
'.card': {
|
|
13
|
+
'@apply p-lg rounded shadow-lg bg-white relative': {},
|
|
14
|
+
'@apply p-0': {},
|
|
15
|
+
//padding: "2.4rem",
|
|
16
|
+
|
|
17
|
+
// clickable
|
|
18
|
+
'&-clickable': {
|
|
19
|
+
// Hover
|
|
20
|
+
'@apply hover:shadow-xl hover:cursor-pointer': {},
|
|
43
21
|
},
|
|
44
22
|
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
23
|
+
// "@apply bg-neutral-200 border border-neutral-100 text-body": {},
|
|
24
|
+
// dark
|
|
25
|
+
//"@apply dark:bg-neutral-700 dark:border-neutral-600 dark:text-neutral-300": {},
|
|
26
|
+
},
|
|
27
|
+
'.card-outlined': {
|
|
28
|
+
'@apply border-2 border-gray-stroke': {},
|
|
29
|
+
},
|
|
30
|
+
'.card-border-top': {
|
|
31
|
+
'@apply border-t-4 border-t-primary': {},
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
'.card-body': {
|
|
35
|
+
'@apply text-body p-8': {},
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
'.card-image': {
|
|
39
|
+
'@apply object-cover': {},
|
|
40
|
+
width: '100%',
|
|
41
|
+
height: '250px',
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
'.card-link': {
|
|
45
|
+
'&::after': {
|
|
46
|
+
content: "''",
|
|
47
|
+
position: 'absolute',
|
|
48
|
+
left: '0',
|
|
49
|
+
top: '0',
|
|
50
|
+
right: '0',
|
|
51
|
+
bottom: '0',
|
|
54
52
|
},
|
|
53
|
+
},
|
|
55
54
|
});
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
const svgToDataUri = require('mini-svg-data-uri');
|
|
2
2
|
|
|
3
3
|
module.exports = Checkbox = (colors, theme) => ({
|
|
4
|
-
|
|
4
|
+
'.form-checkbox': {
|
|
5
5
|
//"@apply rounded shadow-sm": {},
|
|
6
|
-
backgroundColor:
|
|
7
|
-
|
|
6
|
+
backgroundColor: 'inherit',
|
|
7
|
+
'@apply border-gray-stroke focus:bg-white': {},
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
'&[aria-invalid=true]': {
|
|
10
|
+
'--tw-border-opacity': '1',
|
|
11
|
+
borderColor: 'rgba(220, 38, 38, var(--tw-border-opacity))',
|
|
12
12
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
'&[aria-invalid=true]:hover': {
|
|
14
|
+
'--tw-border-opacity': '1',
|
|
15
|
+
'border-color': 'rgba(220, 38, 38, var(--tw-border-opacity))',
|
|
16
16
|
},
|
|
17
17
|
// dark colors
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
'@apply dark:border-neutral-400': {},
|
|
19
|
+
'.dark &[aria-invalid=true]': {
|
|
20
|
+
'--tw-border-opacity': '1',
|
|
21
|
+
borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
'.dark &[aria-invalid=true]:hover': {
|
|
24
|
+
'--tw-border-opacity': '1',
|
|
25
|
+
borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
|
|
26
26
|
},
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
'@media (prefers-color-scheme: dark)': {
|
|
29
|
+
'&[aria-invalid=true]': {
|
|
30
|
+
'--tw-border-opacity': '1',
|
|
31
|
+
borderColor: 'rgba(220, 38, 38, var(--tw-border-opacity))',
|
|
32
32
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
'&[aria-invalid=true]:hover': {
|
|
34
|
+
'--tw-border-opacity': '1',
|
|
35
|
+
'border-color': 'rgba(220, 38, 38, var(--tw-border-opacity))',
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
'&:checked': {
|
|
40
|
+
'@apply text-white bg-white border-primary': {},
|
|
41
41
|
[`@apply focus-visible:border-primary focus-visible:ring-primary`]: {},
|
|
42
42
|
|
|
43
43
|
backgroundImage: `url("${svgToDataUri(
|
|
@@ -48,15 +48,14 @@ module.exports = Checkbox = (colors, theme) => ({
|
|
|
48
48
|
|
|
49
49
|
[`&[data-color="primary"]`]: {
|
|
50
50
|
//[`@apply text-primary`]: {},
|
|
51
|
-
|
|
52
51
|
// dark
|
|
53
52
|
//[`@apply dark:text-primary`]: {},
|
|
54
53
|
//[`@apply dark:focus-visible:border-primary-400 dark:focus-visible:ring-primary-400`]: {},
|
|
55
54
|
},
|
|
56
55
|
|
|
57
56
|
// Fix focus stylign
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
'&:checked:hover, &:checked:focus': {
|
|
58
|
+
'@apply bg-white border-primary': {},
|
|
60
59
|
},
|
|
61
60
|
|
|
62
61
|
// colors
|
|
@@ -77,51 +76,51 @@ module.exports = Checkbox = (colors, theme) => ({
|
|
|
77
76
|
{}
|
|
78
77
|
),*/
|
|
79
78
|
|
|
80
|
-
|
|
79
|
+
'@apply dark:focus-visible:ring-offset-neutral-900': {},
|
|
81
80
|
|
|
82
81
|
// sizing
|
|
83
|
-
|
|
84
|
-
width:
|
|
85
|
-
height:
|
|
82
|
+
'&-sm': {
|
|
83
|
+
width: '1.4rem',
|
|
84
|
+
height: '1.4rem',
|
|
86
85
|
},
|
|
87
86
|
|
|
88
|
-
|
|
89
|
-
width:
|
|
90
|
-
height:
|
|
87
|
+
'&-md': {
|
|
88
|
+
width: '1.6rem',
|
|
89
|
+
height: '1.6rem',
|
|
91
90
|
//"@apply w-4 h-4": {},
|
|
92
91
|
},
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
width:
|
|
96
|
-
height:
|
|
93
|
+
'&-lg': {
|
|
94
|
+
width: '1.8rem',
|
|
95
|
+
height: '1.8rem',
|
|
97
96
|
},
|
|
98
97
|
|
|
99
98
|
// disabled
|
|
100
|
-
|
|
101
|
-
backgroundColor:
|
|
99
|
+
'&-disabled': {
|
|
100
|
+
backgroundColor: '#ECECEC',
|
|
102
101
|
//"@apply disabled:bg-gray-stroke": {},
|
|
103
102
|
//"@apply disabled:shadow-none disabled:border-neutral-300 disabled:bg-neutral-300 disabled:hover:text-neutral-300": {},
|
|
104
103
|
//"@apply dark:disabled:border-transparent dark:disabled:bg-white/20 dark:disabled:hover:text-white/20": {},
|
|
105
104
|
},
|
|
106
105
|
|
|
107
106
|
// label
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
marginLeft:
|
|
107
|
+
'&-label': {
|
|
108
|
+
'@apply text-body select-none text-sm': {},
|
|
109
|
+
marginLeft: '0.8rem',
|
|
111
110
|
//"@apply text-black": {},
|
|
112
111
|
// dark colors
|
|
113
|
-
|
|
112
|
+
'@apply dark:text-neutral-100': {},
|
|
114
113
|
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
'&-sm': {
|
|
115
|
+
'@apply text-xs': {},
|
|
117
116
|
},
|
|
118
117
|
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
'&-md': {
|
|
119
|
+
'@apply text-sm': {},
|
|
121
120
|
},
|
|
122
121
|
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
'&-lg': {
|
|
123
|
+
'@apply text-base': {},
|
|
125
124
|
},
|
|
126
125
|
},
|
|
127
126
|
},
|
package/src/components/code.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
module.exports = Code = () => ({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
'.code': {
|
|
3
|
+
'@apply inline-flex justify-center items-center capitalize text-xs rounded-sm font-mono break-all': {},
|
|
4
|
+
'@apply bg-neutral-200 border border-neutral-100 text-body': {},
|
|
5
5
|
// dark
|
|
6
|
-
|
|
7
|
-
padding:
|
|
6
|
+
'@apply dark:bg-neutral-700 dark:border-neutral-600 dark:text-neutral-300': {},
|
|
7
|
+
padding: '2px 3px 1px',
|
|
8
8
|
},
|
|
9
9
|
});
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
module.exports = CookieConsent = () => ({
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
'.cookie-consent': {
|
|
3
|
+
'@apply min-w-full fixed flex justify-center z-10 bottom-0 left-0 right-0 bg-white': {},
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
'&-close-btn': {
|
|
6
|
+
'@apply cursor-pointer hover:text-primary-active absolute right-8 top-6 border border-transparent focus-visible:border-black flex self-center':
|
|
7
|
+
{},
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"&-content-wrapper": {
|
|
14
|
-
"@apply flex flex-col container py-12 px-4 bg-white relative": {},
|
|
15
|
-
},
|
|
9
|
+
'&-icon': {
|
|
10
|
+
'@apply !text-2xl': {},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
'&-content-wrapper': {
|
|
15
|
+
'@apply flex flex-col container py-12 px-4 bg-white relative': {},
|
|
16
|
+
},
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
'&-title': {
|
|
19
|
+
'@apply text-2xl leading-2xl mb-1 mt-4 break-words': {},
|
|
20
|
+
},
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
'&-description': {
|
|
23
|
+
'@apply text-base leading-base mb-8': {},
|
|
24
|
+
},
|
|
28
25
|
|
|
26
|
+
'&-btn-wrapper': {
|
|
27
|
+
'@apply flex flex-col space-y-4 lg:block lg:space-y-0 lg:space-x-4': {},
|
|
29
28
|
},
|
|
29
|
+
},
|
|
30
30
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
module.exports = Divider = () => ({
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
'.divider': {
|
|
3
|
+
'@apply border-0 border-gray-stroke': {},
|
|
4
4
|
//borderColor: "inherit",
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
'&-vertical': {
|
|
6
|
+
'@apply border-l border-solid h-auto mx-2': {},
|
|
7
7
|
},
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
'&-horizontal': {
|
|
9
|
+
'@apply border-b border-solid w-auto my-2': {},
|
|
10
10
|
},
|
|
11
11
|
},
|
|
12
12
|
});
|
package/src/components/dot.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module.exports = Dot = (colors) => ({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
'.dot': {
|
|
3
|
+
'@apply relative inline-flex rounded-full': {},
|
|
4
|
+
'&-solid': {
|
|
5
|
+
'@apply bg-neutral-500': {},
|
|
6
6
|
|
|
7
7
|
...colors.reduce(
|
|
8
8
|
(styles, color) => ({
|
|
@@ -14,9 +14,9 @@ module.exports = Dot = (colors) => ({
|
|
|
14
14
|
{}
|
|
15
15
|
),
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
'&.dot-bordered': {
|
|
18
|
+
'@apply border-2 border-white': {},
|
|
19
|
+
'@apply dark:border-neutral-800': {},
|
|
20
20
|
},
|
|
21
21
|
|
|
22
22
|
...colors.reduce(
|
|
@@ -31,9 +31,9 @@ module.exports = Dot = (colors) => ({
|
|
|
31
31
|
),
|
|
32
32
|
},
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
'&-outline': {
|
|
35
|
+
'@apply bg-white border-2 border-neutral-500': {},
|
|
36
|
+
'@apply dark:bg-neutral-800': {},
|
|
37
37
|
...colors.reduce(
|
|
38
38
|
(styles, color) => ({
|
|
39
39
|
...styles,
|
|
@@ -45,40 +45,40 @@ module.exports = Dot = (colors) => ({
|
|
|
45
45
|
),
|
|
46
46
|
},
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
'&-3xs': {
|
|
49
|
+
'@apply w-1.5 h-1.5': {},
|
|
50
50
|
},
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
'&-2xs': {
|
|
53
|
+
'@apply w-2 h-2': {},
|
|
54
54
|
},
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
'&-xs': {
|
|
57
|
+
'@apply w-2.5 h-2.5': {},
|
|
58
58
|
},
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
'&-sm': {
|
|
61
|
+
'@apply w-3 h-3': {},
|
|
62
62
|
},
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
'&-md': {
|
|
65
|
+
'@apply w-3.5 h-3.5': {},
|
|
66
66
|
},
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
'&-lg': {
|
|
69
|
+
'@apply w-4 h-4': {},
|
|
70
70
|
},
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
'&-xl': {
|
|
73
|
+
'@apply w-5 h-5': {},
|
|
74
74
|
},
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
'&-2xl': {
|
|
77
|
+
'@apply w-6 h-6': {},
|
|
78
78
|
},
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
'&-3xl': {
|
|
81
|
+
'@apply w-8 h-8': {},
|
|
82
82
|
},
|
|
83
83
|
},
|
|
84
84
|
});
|
package/src/components/footer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports = Footer = (colors) => ({
|
|
2
2
|
'.footer': {
|
|
3
3
|
'&-innerwrapper': {
|
|
4
|
-
'@apply bg-gray text-white py-12
|
|
4
|
+
'@apply bg-gray text-white py-12': {},
|
|
5
5
|
|
|
6
6
|
...colors.reduce(
|
|
7
7
|
(styles, color) => ({
|
|
@@ -15,11 +15,11 @@ module.exports = Footer = (colors) => ({
|
|
|
15
15
|
},
|
|
16
16
|
|
|
17
17
|
'&-content': {
|
|
18
|
-
'@apply
|
|
18
|
+
'@apply px-md md:flex items-center justify-center m-auto': {},
|
|
19
19
|
},
|
|
20
20
|
|
|
21
21
|
'&-bottomlinks': {
|
|
22
|
-
'@apply bg-gray-middle text-body py-
|
|
22
|
+
'@apply bg-gray-middle text-body py-md': {},
|
|
23
23
|
|
|
24
24
|
...colors.reduce(
|
|
25
25
|
(styles, color) => ({
|
|
@@ -32,7 +32,10 @@ module.exports = Footer = (colors) => ({
|
|
|
32
32
|
),
|
|
33
33
|
|
|
34
34
|
'&-container': {
|
|
35
|
-
'@apply
|
|
35
|
+
'@apply px-md flex items-center items-center justify-center m-auto md:space-x-10 flex-col md:flex-row': {},
|
|
36
|
+
'> *': {
|
|
37
|
+
'@apply text-body text-sm leading-sm py-sm': {},
|
|
38
|
+
},
|
|
36
39
|
},
|
|
37
40
|
},
|
|
38
41
|
},
|