@sk-web-gui/core 0.1.22 → 0.1.25
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/package.json +2 -2
- package/src/components/alert.js +2 -2
- package/src/components/badge.js +1 -1
- package/src/components/breadcrumb.js +2 -2
- package/src/components/button.js +3 -3
- package/src/components/card.js +2 -2
- package/src/components/checkbox.js +2 -2
- package/src/components/code.js +1 -1
- package/src/components/forms.js +5 -5
- package/src/components/kbd.js +2 -2
- package/src/components/link.js +1 -1
- package/src/components/message.js +48 -13
- package/src/components/notification.js +2 -2
- package/src/components/pagination.js +1 -1
- package/src/components/radio.js +2 -2
- package/src/components/tag.js +4 -4
- package/src/components/user-menu.js +2 -2
- package/src/components/zebratable.js +7 -3
- package/src/index.js +3 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sk-web-gui/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.25",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"postcss-import": "^14.0.2",
|
|
32
32
|
"tailwindcss": "^2.2.4"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "98dc00be73bb80955d4b41dd19c98b8ee44fceb7"
|
|
35
35
|
}
|
package/src/components/alert.js
CHANGED
|
@@ -2,7 +2,7 @@ function alertSubtle(colors) {
|
|
|
2
2
|
return {
|
|
3
3
|
".alert-subtle": {
|
|
4
4
|
"@apply border rounded-base": {},
|
|
5
|
-
"@apply text-
|
|
5
|
+
"@apply text-body": {},
|
|
6
6
|
|
|
7
7
|
...colors.reduce(
|
|
8
8
|
(styles, color) => ({
|
|
@@ -47,7 +47,7 @@ function alertLeftAccent(colors) {
|
|
|
47
47
|
return {
|
|
48
48
|
".alert-left-accent": {
|
|
49
49
|
"@apply border-l-2 rounded-none": {},
|
|
50
|
-
"@apply text-
|
|
50
|
+
"@apply text-body": {},
|
|
51
51
|
|
|
52
52
|
...colors.reduce(
|
|
53
53
|
(styles, color) => ({
|
package/src/components/badge.js
CHANGED
|
@@ -3,7 +3,7 @@ module.exports = Badge = (colors) => ({
|
|
|
3
3
|
"@apply inline-block text-xs font-medium leading-4 text-center whitespace-nowrap": {},
|
|
4
4
|
|
|
5
5
|
"&-light": {
|
|
6
|
-
"@apply text-
|
|
6
|
+
"@apply text-body bg-neutral-200 border border-transparent": {},
|
|
7
7
|
"@apply dark:text-neutral-100 dark:bg-neutral-700": {},
|
|
8
8
|
|
|
9
9
|
...colors.reduce(
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
module.exports = Breadcrumb = () => ({
|
|
2
2
|
".breadcrumb": {
|
|
3
|
-
"@apply relative": {},
|
|
3
|
+
"@apply text-body relative": {},
|
|
4
4
|
|
|
5
5
|
"&-item": {
|
|
6
6
|
"@apply inline-flex items-center whitespace-nowrap": {},
|
|
7
7
|
},
|
|
8
8
|
|
|
9
9
|
"&-separator": {
|
|
10
|
-
"@apply mx-2
|
|
10
|
+
"@apply mx-2": {},
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
13
|
});
|
package/src/components/button.js
CHANGED
|
@@ -73,7 +73,7 @@ function buttonOutline(colors) {
|
|
|
73
73
|
return {
|
|
74
74
|
"&-outline": {
|
|
75
75
|
"@apply border border-neutral-200": {},
|
|
76
|
-
"@apply text-
|
|
76
|
+
"@apply text-body bg-transparent": {},
|
|
77
77
|
/* hover */
|
|
78
78
|
"@apply hover:bg-neutral-100 hover:border-neutral-300": {},
|
|
79
79
|
/* focus */
|
|
@@ -129,7 +129,7 @@ function buttonOutline(colors) {
|
|
|
129
129
|
function buttonGhost(colors) {
|
|
130
130
|
return {
|
|
131
131
|
"&-ghost": {
|
|
132
|
-
"@apply text-
|
|
132
|
+
"@apply text-body bg-transparent": {},
|
|
133
133
|
"@apply hover:bg-neutral-100": {},
|
|
134
134
|
/* focus */
|
|
135
135
|
"@apply focus-visible:z-base": {},
|
|
@@ -171,7 +171,7 @@ function buttonLight(colors) {
|
|
|
171
171
|
"&-light": {
|
|
172
172
|
"@apply shadow-sm": {},
|
|
173
173
|
"@apply border border-transparent": {},
|
|
174
|
-
"@apply text-
|
|
174
|
+
"@apply text-body bg-neutral-100": {},
|
|
175
175
|
/* hover */
|
|
176
176
|
"@apply hover:bg-neutral-200": {},
|
|
177
177
|
/* focus */
|
package/src/components/card.js
CHANGED
|
@@ -21,7 +21,7 @@ module.exports = Card = () => ({
|
|
|
21
21
|
"@apply hover:shadow-xl hover:cursor-pointer": {},
|
|
22
22
|
},
|
|
23
23
|
|
|
24
|
-
// "@apply bg-neutral-200 border border-neutral-100 text-
|
|
24
|
+
// "@apply bg-neutral-200 border border-neutral-100 text-body": {},
|
|
25
25
|
// dark
|
|
26
26
|
//"@apply dark:bg-neutral-700 dark:border-neutral-600 dark:text-neutral-300": {},
|
|
27
27
|
},
|
|
@@ -33,7 +33,7 @@ module.exports = Card = () => ({
|
|
|
33
33
|
},
|
|
34
34
|
|
|
35
35
|
".card-body": {
|
|
36
|
-
"@apply p-8": {},
|
|
36
|
+
"@apply text-body p-8": {},
|
|
37
37
|
},
|
|
38
38
|
|
|
39
39
|
".card-image": {
|
|
@@ -101,12 +101,12 @@ module.exports = Checkbox = (colors, theme) => ({
|
|
|
101
101
|
backgroundColor: "#ECECEC",
|
|
102
102
|
//"@apply disabled:bg-gray-stroke": {},
|
|
103
103
|
//"@apply disabled:shadow-none disabled:border-neutral-300 disabled:bg-neutral-300 disabled:hover:text-neutral-300": {},
|
|
104
|
-
//"@apply dark:disabled:border-transparent dark:disabled:bg-
|
|
104
|
+
//"@apply dark:disabled:border-transparent dark:disabled:bg-white/20 dark:disabled:hover:text-white/20": {},
|
|
105
105
|
},
|
|
106
106
|
|
|
107
107
|
// label
|
|
108
108
|
"&-label": {
|
|
109
|
-
"@apply select-none text-sm": {},
|
|
109
|
+
"@apply text-body select-none text-sm": {},
|
|
110
110
|
marginLeft: "0.8rem",
|
|
111
111
|
//"@apply text-black": {},
|
|
112
112
|
// dark colors
|
package/src/components/code.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports = Code = () => ({
|
|
2
2
|
".code": {
|
|
3
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-
|
|
4
|
+
"@apply bg-neutral-200 border border-neutral-100 text-body": {},
|
|
5
5
|
// dark
|
|
6
6
|
"@apply dark:bg-neutral-700 dark:border-neutral-600 dark:text-neutral-300": {},
|
|
7
7
|
padding: "2px 3px 1px",
|
package/src/components/forms.js
CHANGED
|
@@ -73,8 +73,8 @@ function fieldSolid(colors) {
|
|
|
73
73
|
},
|
|
74
74
|
"focus-visible:ring-4": {},
|
|
75
75
|
/* dark mode */
|
|
76
|
-
"@apply dark:text-neutral-100 dark:bg-
|
|
77
|
-
"@apply dark:hover:bg-
|
|
76
|
+
"@apply dark:text-neutral-100 dark:bg-white/50": {},
|
|
77
|
+
"@apply dark:hover:bg-white/100": {},
|
|
78
78
|
".dark &[aria-invalid=true]": {
|
|
79
79
|
"--tw-border-opacity": "1",
|
|
80
80
|
borderColor: "rgba(248, 113, 113, var(--tw-border-opacity))",
|
|
@@ -110,7 +110,7 @@ function formControl() {
|
|
|
110
110
|
"@apply w-full relative": {},
|
|
111
111
|
},
|
|
112
112
|
".form-helper-text": {
|
|
113
|
-
"@apply mt-1.5 leading-none text-gray dark:text-
|
|
113
|
+
"@apply mt-1.5 leading-none text-gray dark:text-white/60": {},
|
|
114
114
|
},
|
|
115
115
|
".form-error-message": {
|
|
116
116
|
"@apply mt-1.5 leading-none flex items-center text-sm": {},
|
|
@@ -169,7 +169,7 @@ function formInputGroup() {
|
|
|
169
169
|
"@apply text-neutral-600 bg-neutral-50": {},
|
|
170
170
|
// dark colors
|
|
171
171
|
"@apply dark:border-neutral-700": {},
|
|
172
|
-
"@apply dark:text-neutral-100 dark:bg-
|
|
172
|
+
"@apply dark:text-neutral-100 dark:bg-white/30": {},
|
|
173
173
|
|
|
174
174
|
"&-sm": {
|
|
175
175
|
"@apply px-3 text-xs": {},
|
|
@@ -224,7 +224,7 @@ module.exports = Forms = (colors) => ({
|
|
|
224
224
|
"@apply disabled:bg-gray-lighter": {},
|
|
225
225
|
//"@apply disabled:shadow-none disabled:cursor-not-allowed disabled:opacity-60": {},
|
|
226
226
|
//"@apply disabled:border-neutral-200 disabled:bg-neutral-200": {},
|
|
227
|
-
//"@apply dark:disabled:border-transparent dark:disabled:bg-
|
|
227
|
+
//"@apply dark:disabled:border-transparent dark:disabled:bg-white/20": {},
|
|
228
228
|
},
|
|
229
229
|
|
|
230
230
|
// variants
|
package/src/components/kbd.js
CHANGED
|
@@ -2,8 +2,8 @@ module.exports = Kbd = () => ({
|
|
|
2
2
|
".kbd": {
|
|
3
3
|
"@apply inline-flex justify-center items-center capitalize text-xs p-1 rounded h-5 whitespace-nowrap font-sans": {},
|
|
4
4
|
"minWidth": "1.25rem",
|
|
5
|
-
"@apply bg-blackAlpha-100 text-
|
|
5
|
+
"@apply bg-blackAlpha-100 text-body": {},
|
|
6
6
|
// dark
|
|
7
|
-
"@apply dark:bg-
|
|
7
|
+
"@apply dark:bg-white/30 dark:text-neutral-300": {},
|
|
8
8
|
},
|
|
9
9
|
});
|
package/src/components/link.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module.exports = Link = () => ({
|
|
2
2
|
".link": {
|
|
3
|
-
"@apply cursor-base
|
|
3
|
+
"@apply cursor-base underline outline-none hover:underline": {},
|
|
4
4
|
"@apply text-primary dark:text-primary": {},
|
|
5
5
|
"@apply focus-visible:ring-4 focus-visible:ring-primary": {},
|
|
6
6
|
|
|
@@ -1,29 +1,64 @@
|
|
|
1
1
|
module.exports = Message = () => ({
|
|
2
2
|
".message": {
|
|
3
|
-
"@apply max-w-2xl flex items-center px-
|
|
4
|
-
"@apply text-
|
|
3
|
+
"@apply max-w-2xl flex items-center font-bold text-sm sm:text-base px-6 py-6 m-2 shadow-lg w-max break-words": {},
|
|
4
|
+
"@apply text-body bg-white border-l-4": {},
|
|
5
5
|
// dark
|
|
6
6
|
"@apply dark:text-neutral-100 dark:bg-neutral-700 dark:border-neutral-600": {},
|
|
7
|
-
|
|
7
|
+
"minWidth": "520px",
|
|
8
|
+
"width": "520px",
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
"&-text": {
|
|
11
|
+
"@apply text-left flex-grow": {},
|
|
12
|
+
},
|
|
11
13
|
|
|
12
14
|
"&-info": {
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
+
"@apply border-info": {},
|
|
16
|
+
|
|
17
|
+
".message-icon": {
|
|
18
|
+
"@apply text-info": {},
|
|
19
|
+
},
|
|
20
|
+
|
|
15
21
|
},
|
|
16
22
|
"&-success": {
|
|
17
|
-
"
|
|
18
|
-
|
|
23
|
+
"@apply border-success": {},
|
|
24
|
+
|
|
25
|
+
".message-icon": {
|
|
26
|
+
"@apply text-success": {},
|
|
27
|
+
},
|
|
19
28
|
},
|
|
20
29
|
"&-error": {
|
|
21
|
-
"
|
|
22
|
-
|
|
30
|
+
"@apply border-error": {},
|
|
31
|
+
|
|
32
|
+
".message-icon": {
|
|
33
|
+
"@apply text-error": {},
|
|
34
|
+
},
|
|
23
35
|
},
|
|
24
36
|
"&-warning": {
|
|
25
|
-
"
|
|
26
|
-
|
|
37
|
+
"@apply border-warning": {},
|
|
38
|
+
|
|
39
|
+
".message-icon": {
|
|
40
|
+
"@apply text-warning": {},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
".message-icon": {
|
|
46
|
+
"@apply mr-4 flex-shrink-0 w-10 h-10": {},
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
".message-close-button": {
|
|
50
|
+
"@apply text-body border-transparent flex items-center justify-center transition-all duration-150 rounded-full outline-none cursor-base": {},
|
|
51
|
+
fontSize: "1.2em",
|
|
52
|
+
padding: "0.36em",
|
|
53
|
+
marginLeft: "0.25em",
|
|
54
|
+
marginRight: "-0.55em",
|
|
55
|
+
|
|
56
|
+
"&-icon": {
|
|
57
|
+
fontSize: "1em"
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
"&-disabled": {
|
|
61
|
+
"@apply disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none": {},
|
|
27
62
|
},
|
|
28
63
|
},
|
|
29
64
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports = Notification = () => ({
|
|
2
2
|
".notification": {
|
|
3
3
|
"@apply relative flex p-4 text-sm w-96 m-2 max-w-full rounded-base shadow-sm sm:max-w-md": {},
|
|
4
|
-
"@apply text-
|
|
4
|
+
"@apply text-body bg-white border border-neutral-200": {},
|
|
5
5
|
// dark
|
|
6
6
|
"@apply dark:text-neutral-100 dark:bg-neutral-700 dark:border-neutral-600": {},
|
|
7
7
|
},
|
|
@@ -49,7 +49,7 @@ module.exports = Notification = () => ({
|
|
|
49
49
|
},
|
|
50
50
|
|
|
51
51
|
"&-close-button": {
|
|
52
|
-
"@apply cursor-base text-neutral-700 hover:text-
|
|
52
|
+
"@apply cursor-base text-neutral-700 hover:text-body": {},
|
|
53
53
|
"@apply dark:text-neutral-400 dark:hover:text-neutral-100": {},
|
|
54
54
|
},
|
|
55
55
|
},
|
|
@@ -29,7 +29,7 @@ module.exports = Pagination = () => ({
|
|
|
29
29
|
},
|
|
30
30
|
|
|
31
31
|
"&-prevNextButton": {
|
|
32
|
-
"@apply ml-4 inline-flex items-center sm:w-auto inline-flex flex-row leading-none":
|
|
32
|
+
"@apply text-body ml-4 inline-flex items-center sm:w-auto inline-flex flex-row leading-none":
|
|
33
33
|
{},
|
|
34
34
|
|
|
35
35
|
"&[data-reverse=true]": {
|
package/src/components/radio.js
CHANGED
|
@@ -73,13 +73,13 @@ module.exports = Radio = (colors) => ({
|
|
|
73
73
|
// disabled
|
|
74
74
|
"&-disabled": {
|
|
75
75
|
"@apply disabled:shadow-none disabled:border-neutral-300 disabled:bg-neutral-300 disabled:hover:text-neutral-300": {},
|
|
76
|
-
"@apply dark:disabled:border-transparent dark:disabled:bg-
|
|
76
|
+
"@apply dark:disabled:border-transparent dark:disabled:bg-white/20 dark:disabled:hover:text-white/20": {},
|
|
77
77
|
},
|
|
78
78
|
|
|
79
79
|
// label
|
|
80
80
|
"&-label": {
|
|
81
81
|
"@apply ml-2 select-none text-sm": {},
|
|
82
|
-
"@apply text-
|
|
82
|
+
"@apply text-body": {},
|
|
83
83
|
// dark colors
|
|
84
84
|
"@apply dark:text-neutral-100": {},
|
|
85
85
|
|
package/src/components/tag.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function tagOutline(colors) {
|
|
2
2
|
return {
|
|
3
3
|
".tag-outline": {
|
|
4
|
-
"@apply border bg-transparent border-gray-stroke text-
|
|
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`]: {},
|
|
@@ -24,7 +24,7 @@ function tagSolid(colors) {
|
|
|
24
24
|
},
|
|
25
25
|
|
|
26
26
|
".tag-close-button": {
|
|
27
|
-
"@apply text-white": {}
|
|
27
|
+
"@apply text-white hover:text-body": {}
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
};
|
|
@@ -33,7 +33,7 @@ function tagSolid(colors) {
|
|
|
33
33
|
function tagLight(colors) {
|
|
34
34
|
return {
|
|
35
35
|
".tag-light": {
|
|
36
|
-
"@apply border border-transparent text-
|
|
36
|
+
"@apply border border-transparent text-body": {},
|
|
37
37
|
|
|
38
38
|
"&[href]": {
|
|
39
39
|
[`@apply hover:border-hover`]: {},
|
|
@@ -78,7 +78,7 @@ module.exports = Tag = (colors) => ({
|
|
|
78
78
|
...tagLight(colors),
|
|
79
79
|
|
|
80
80
|
".tag-close-button": {
|
|
81
|
-
"@apply border-transparent flex items-center justify-center transition-all duration-150 rounded-full outline-none cursor-base": {},
|
|
81
|
+
"@apply text-body border-transparent flex items-center justify-center transition-all duration-150 rounded-full outline-none cursor-base": {},
|
|
82
82
|
fontSize: "1em",
|
|
83
83
|
padding: "0.36em",
|
|
84
84
|
marginLeft: "0.25em",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports = UserMenu = (colors) => ({
|
|
2
2
|
".usermenu": {
|
|
3
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 drop-shadow-none shadow-none filter-none": {},
|
|
4
|
+
"@apply text-body drop-shadow-none shadow-none filter-none": {},
|
|
5
5
|
// "@apply ": {},
|
|
6
6
|
"&-is-open": {
|
|
7
7
|
// "@apply border-2 border-gray-300 border-solid rounded": {},
|
|
@@ -14,7 +14,7 @@ module.exports = UserMenu = (colors) => ({
|
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
"&-item": {
|
|
17
|
-
"@apply block px-lg py-md lg:px-md lg:py-sm w-full cursor-pointer text-
|
|
17
|
+
"@apply block px-lg py-md lg:px-md lg:py-sm w-full cursor-pointer text-body no-underline": {},
|
|
18
18
|
"&.active": {
|
|
19
19
|
"@apply bg-hover text-white no-underline": {},
|
|
20
20
|
},
|
|
@@ -38,7 +38,7 @@ module.exports = ZebraTable = () => ({
|
|
|
38
38
|
},
|
|
39
39
|
|
|
40
40
|
"&-more": {
|
|
41
|
-
"@apply text-gray
|
|
41
|
+
"@apply text-gray": {},
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
},
|
|
@@ -48,7 +48,7 @@ module.exports = ZebraTable = () => ({
|
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
"&-tbody": {
|
|
51
|
-
"@apply lg:bg-white": {},
|
|
51
|
+
"@apply text-body lg:bg-white": {},
|
|
52
52
|
|
|
53
53
|
"&-tr": {
|
|
54
54
|
"@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": {},
|
|
@@ -64,7 +64,11 @@ module.exports = ZebraTable = () => ({
|
|
|
64
64
|
},
|
|
65
65
|
|
|
66
66
|
"&-paginationwrapper": {
|
|
67
|
-
"@apply
|
|
67
|
+
"@apply w-full text-lg flex justify-center lg:justify-start": {},
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
"&-bottomwrapper": {
|
|
71
|
+
"@apply mt-lg px-lg flex items-center justify-end": {},
|
|
68
72
|
},
|
|
69
73
|
},
|
|
70
74
|
});
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const plugin = require("tailwindcss/plugin");
|
|
2
2
|
|
|
3
|
-
const colors = require("
|
|
3
|
+
// const colors = require("/colors");
|
|
4
|
+
const { colors } = require("@sk-web-gui/theme");
|
|
4
5
|
const withOpacity = require("./with-opacity");
|
|
5
6
|
// components
|
|
6
7
|
const Alert = require("./components/alert");
|
|
@@ -141,16 +142,7 @@ module.exports = plugin.withOptions(
|
|
|
141
142
|
extend: {
|
|
142
143
|
colors: {
|
|
143
144
|
...colors,
|
|
144
|
-
|
|
145
|
-
DEFAULT: "#4b4b4b",
|
|
146
|
-
stroke: "#939393",
|
|
147
|
-
middle: "#ECECEC",
|
|
148
|
-
light: "#F4F4F4",
|
|
149
|
-
lighter: "#F9F9F9",
|
|
150
|
-
},
|
|
151
|
-
hover: {
|
|
152
|
-
DEFAULT: "#2B76B0",
|
|
153
|
-
},
|
|
145
|
+
current: 'currentColor',
|
|
154
146
|
},
|
|
155
147
|
cursor: {
|
|
156
148
|
base: "var(--vc-cursor)",
|