@sk-web-gui/core 0.1.24 → 0.1.27
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/accordion.js +5 -1
- 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 +32 -19
- package/src/components/calendar.js +81 -0
- package/src/components/card.js +2 -2
- package/src/components/checkbox.js +2 -2
- package/src/components/code.js +1 -1
- package/src/components/cookie-consent.js +4 -0
- package/src/components/forms.js +14 -6
- package/src/components/kbd.js +2 -2
- package/src/components/link.js +5 -10
- package/src/components/message.js +11 -17
- package/src/components/notification.js +2 -2
- package/src/components/pagination.js +3 -3
- package/src/components/radio.js +2 -2
- package/src/components/switch.js +10 -0
- package/src/components/tag.js +5 -5
- package/src/components/user-menu.js +2 -2
- package/src/components/zebratable.js +6 -2
- package/src/index.js +4 -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.27",
|
|
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": "78eba5727e9a003897cfdb297a3ae1dabac3272b"
|
|
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
|
@@ -2,10 +2,10 @@ function buttonSolid(colors) {
|
|
|
2
2
|
return {
|
|
3
3
|
"&-solid": {
|
|
4
4
|
//"@apply text-": {},
|
|
5
|
-
"@apply border border-gray-stroke": {},
|
|
6
|
-
"@apply text-
|
|
5
|
+
"@apply font-semibold border border-gray-stroke": {},
|
|
6
|
+
"@apply text-body bg-white": {},
|
|
7
7
|
/* hover */
|
|
8
|
-
"@apply hover:text-white hover:bg-hover": {},
|
|
8
|
+
"@apply hover:text-white hover:bg-hover hover:border-primary-active": {},
|
|
9
9
|
/* focus */
|
|
10
10
|
"@apply focus-visible:z-base": {},
|
|
11
11
|
"@apply focus-visible:border-primary": {},
|
|
@@ -24,13 +24,6 @@ function buttonSolid(colors) {
|
|
|
24
24
|
/* dark active */
|
|
25
25
|
"@apply dark:active:bg-neutral-900 dark:active:border-neutral-600": {},
|
|
26
26
|
|
|
27
|
-
/* "&[data-color=\"primary\"]": {
|
|
28
|
-
"@apply text-white bg-primary": {},
|
|
29
|
-
"@apply hover:text-white hover:bg-hover": {},
|
|
30
|
-
"@apply active:text-white active:bg-hover": {},
|
|
31
|
-
"@apply focus-visible:ring-4 focus-visible:ring-black": {},
|
|
32
|
-
}, */
|
|
33
|
-
|
|
34
27
|
...colors.reduce(
|
|
35
28
|
(styles, color) => ({
|
|
36
29
|
...styles,
|
|
@@ -65,6 +58,16 @@ function buttonSolid(colors) {
|
|
|
65
58
|
{}
|
|
66
59
|
),
|
|
67
60
|
|
|
61
|
+
"&[data-color='primary']": {
|
|
62
|
+
"@apply border-primary hover:border-primary-active": {},
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
"&.btn": {
|
|
66
|
+
"&-disabled": {
|
|
67
|
+
"@apply disabled:border-gray-stroke hover:border-gray-stroke": {},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
|
|
68
71
|
},
|
|
69
72
|
};
|
|
70
73
|
}
|
|
@@ -72,10 +75,10 @@ function buttonSolid(colors) {
|
|
|
72
75
|
function buttonOutline(colors) {
|
|
73
76
|
return {
|
|
74
77
|
"&-outline": {
|
|
75
|
-
"@apply border border-
|
|
76
|
-
"@apply text-
|
|
78
|
+
"@apply font-semibold border border-gray-stroke": {},
|
|
79
|
+
"@apply text-body bg-transparent": {},
|
|
77
80
|
/* hover */
|
|
78
|
-
"@apply hover:bg-
|
|
81
|
+
"@apply hover:text-white hover:bg-primary-active hover:border-primary-active": {},
|
|
79
82
|
/* focus */
|
|
80
83
|
"@apply focus-visible:z-base": {},
|
|
81
84
|
"@apply focus-visible:border-primary-500": {},
|
|
@@ -99,7 +102,7 @@ function buttonOutline(colors) {
|
|
|
99
102
|
[`@apply border-current`]: {},
|
|
100
103
|
[`@apply text-${color}-600 bg-transparent`]: {},
|
|
101
104
|
/* hover */
|
|
102
|
-
[`@apply hover:bg-${color}-
|
|
105
|
+
[`@apply hover:text-white hover:bg-${color}-active hover:border-${color}-active`]: {},
|
|
103
106
|
/* focus */
|
|
104
107
|
[`@apply focus-visible:border-${color}-500`]: {},
|
|
105
108
|
[`@apply focus-visible:ring-${color}-500`]: {},
|
|
@@ -122,6 +125,13 @@ function buttonOutline(colors) {
|
|
|
122
125
|
}),
|
|
123
126
|
{}
|
|
124
127
|
),
|
|
128
|
+
|
|
129
|
+
"&.btn": {
|
|
130
|
+
"&-disabled": {
|
|
131
|
+
"@apply disabled:border-gray-stroke hover:border-gray-stroke": {},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
|
|
125
135
|
},
|
|
126
136
|
};
|
|
127
137
|
}
|
|
@@ -129,7 +139,7 @@ function buttonOutline(colors) {
|
|
|
129
139
|
function buttonGhost(colors) {
|
|
130
140
|
return {
|
|
131
141
|
"&-ghost": {
|
|
132
|
-
"@apply text-
|
|
142
|
+
"@apply text-body bg-transparent": {},
|
|
133
143
|
"@apply hover:bg-neutral-100": {},
|
|
134
144
|
/* focus */
|
|
135
145
|
"@apply focus-visible:z-base": {},
|
|
@@ -171,7 +181,7 @@ function buttonLight(colors) {
|
|
|
171
181
|
"&-light": {
|
|
172
182
|
"@apply shadow-sm": {},
|
|
173
183
|
"@apply border border-transparent": {},
|
|
174
|
-
"@apply text-
|
|
184
|
+
"@apply text-body bg-neutral-100": {},
|
|
175
185
|
/* hover */
|
|
176
186
|
"@apply hover:bg-neutral-200": {},
|
|
177
187
|
/* focus */
|
|
@@ -252,7 +262,7 @@ module.exports = Button = (colors) => ({
|
|
|
252
262
|
".btn": {
|
|
253
263
|
"@apply relative": {},
|
|
254
264
|
"@apply m-0": {},
|
|
255
|
-
"@apply inline-flex items-center justify-center flex-shrink-0 align-middle": {},
|
|
265
|
+
"@apply rounded-lg inline-flex items-center justify-center flex-shrink-0 align-middle": {},
|
|
256
266
|
"@apply font-medium leading-tight": {},
|
|
257
267
|
transitionProperty: "background-color, border-color, color, fill, stroke, box-shadow",
|
|
258
268
|
"@apply duration-75 ease-out": {},
|
|
@@ -260,7 +270,10 @@ module.exports = Button = (colors) => ({
|
|
|
260
270
|
"@apply focus-visible:outline-none": {},
|
|
261
271
|
|
|
262
272
|
padding: "1.2rem 3.2rem",
|
|
263
|
-
|
|
273
|
+
|
|
274
|
+
"&[data-rounded='true']": {
|
|
275
|
+
borderRadius: "3.2rem"
|
|
276
|
+
},
|
|
264
277
|
|
|
265
278
|
// sizing
|
|
266
279
|
"&-sm": {
|
|
@@ -282,7 +295,7 @@ module.exports = Button = (colors) => ({
|
|
|
282
295
|
|
|
283
296
|
"&-disabled": {
|
|
284
297
|
"@apply disabled:shadow-none disabled:cursor-not-allowed": {},
|
|
285
|
-
"@apply disabled:text-
|
|
298
|
+
"@apply disabled:text-gray disabled:bg-gray-light !important": {},
|
|
286
299
|
},
|
|
287
300
|
|
|
288
301
|
// variants
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
module.exports = Calendar = () => ({
|
|
2
|
+
|
|
3
|
+
// Month row
|
|
4
|
+
".MuiCalendarPicker-root > div:first-of-type": {
|
|
5
|
+
"@apply ml-2 -mr-2 px-10": {},
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
// Month
|
|
9
|
+
".MuiCalendarPicker-root > div:first-of-type > div": {
|
|
10
|
+
"@apply font-bold text-base text-body": {},
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
// Arrow switchers
|
|
14
|
+
".MuiCalendarPicker-root > div:first-of-type .MuiButtonBase-root .MuiSvgIcon-root": {
|
|
15
|
+
"@apply text-body text-lg": {},
|
|
16
|
+
},
|
|
17
|
+
".MuiCalendarPicker-root > div:first-of-type .MuiButtonBase-root": {
|
|
18
|
+
"@apply border-solid border border-transparent focus:text-transparent hover:text-transparent focus:bg-transparent hover:bg-transparent focus:border-primary hover:border-primary": {},
|
|
19
|
+
},
|
|
20
|
+
".MuiCalendarPicker-root > div:first-of-type .MuiButtonBase-root": {
|
|
21
|
+
"@apply border-solid border border-transparent focus:text-transparent hover:text-transparent focus:bg-transparent hover:bg-transparent focus:border-primary hover:border-primary": {},
|
|
22
|
+
},
|
|
23
|
+
// Arrow spacer
|
|
24
|
+
".MuiCalendarPicker-root .MuiPickersArrowSwitcher-spacer": {
|
|
25
|
+
"@apply w-11": {},
|
|
26
|
+
},
|
|
27
|
+
// Disabled arrow
|
|
28
|
+
".MuiCalendarPicker-root > div:first-of-type .MuiButtonBase-root[disabled] .MuiSvgIcon-root": {
|
|
29
|
+
"@apply text-gray-stroke": {},
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
// Weekdays
|
|
33
|
+
".MuiCalendarPicker-root div > div:first-of-type > .MuiTypography-root": {
|
|
34
|
+
"@apply font-bold text-body text-base":{},
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
// Days-Grid
|
|
38
|
+
".MuiCalendarPicker-root > div:last-of-type > div:last-of-type": {
|
|
39
|
+
"@apply min-h-min pb-6":{},
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
// Day picking
|
|
43
|
+
".MuiCalendarPicker-root .MuiPickersDay-root": {
|
|
44
|
+
"@apply text-base":{},
|
|
45
|
+
},
|
|
46
|
+
".MuiCalendarPicker-root .Mui-disabled": {
|
|
47
|
+
"@apply text-gray-stroke":{},
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
// Day picked
|
|
51
|
+
".MuiCalendarPicker-root .MuiButtonBase-root.MuiPickersDay-root.Mui-selected": {
|
|
52
|
+
"@apply bg-background-one text-body focus-visible:bg-background-one hover:bg-background-one focus:bg-background-one": {},
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
// Day hovered
|
|
56
|
+
".MuiCalendarPicker-root .MuiPickersDay-root, .MuiCalendarPicker-root .MuiPickersDay-root.MuiPickersDay-today": {
|
|
57
|
+
"@apply border-primary border-solid focus-visible:border hover:bg-transparent focus:bg-transparent hover:border": {},
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
// today
|
|
61
|
+
".MuiCalendarPicker-root .MuiPickersDay-root.MuiPickersDay-today": {
|
|
62
|
+
"@apply border-0 hover:border":{},
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
".calendar": {
|
|
66
|
+
// Input field
|
|
67
|
+
".datepicker-input": {
|
|
68
|
+
"@apply relative": {},
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
".datepicker-input input": {
|
|
72
|
+
"@apply pl-20 cursor-pointer":{},
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
".datepicker-input-icon": {
|
|
76
|
+
"@apply pointer-events-none absolute m-6 top-0 left-0 text-xl fill-body":{},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
});
|
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",
|
|
@@ -4,6 +4,10 @@ module.exports = CookieConsent = () => ({
|
|
|
4
4
|
|
|
5
5
|
"&-close-btn": {
|
|
6
6
|
"@apply cursor-pointer hover:text-primary-active absolute right-8 top-6 border border-transparent focus-visible:border-black flex self-center": {},
|
|
7
|
+
|
|
8
|
+
"&-icon": {
|
|
9
|
+
"@apply !text-2xl": {}
|
|
10
|
+
},
|
|
7
11
|
},
|
|
8
12
|
|
|
9
13
|
"&-content-wrapper": {
|
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
|
|
@@ -242,7 +242,15 @@ module.exports = Forms = (colors) => ({
|
|
|
242
242
|
},
|
|
243
243
|
|
|
244
244
|
".form-select": {
|
|
245
|
-
//"@apply
|
|
245
|
+
// "@apply ":{}
|
|
246
|
+
|
|
247
|
+
"&-option": {
|
|
248
|
+
"@apply rounded-none cursor-default hover:text-white focus-visible:text-white hover:bg-primary focus-visible:bg-primary": {},
|
|
249
|
+
|
|
250
|
+
"&.active": {
|
|
251
|
+
"@apply bg-primary text-white": {},
|
|
252
|
+
}
|
|
253
|
+
}
|
|
246
254
|
},
|
|
247
255
|
|
|
248
256
|
...formInputGroup(),
|
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
|
@@ -6,16 +6,11 @@ module.exports = Link = () => ({
|
|
|
6
6
|
|
|
7
7
|
"@apply hover:text-primary-active": {},
|
|
8
8
|
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
content: "'launch'",
|
|
15
|
-
lineHeight: "1",
|
|
16
|
-
marginLeft: ".25em",
|
|
17
|
-
verticalAlign: "text-top",
|
|
18
|
-
},
|
|
9
|
+
"&-external-icon": {
|
|
10
|
+
fontSize: "0.875em !important",
|
|
11
|
+
lineHeight: "1",
|
|
12
|
+
marginLeft: ".25em",
|
|
13
|
+
verticalAlign: "text-top",
|
|
19
14
|
},
|
|
20
15
|
|
|
21
16
|
"&-disabled": {
|
|
@@ -1,47 +1,41 @@
|
|
|
1
1
|
module.exports = Message = () => ({
|
|
2
2
|
".message": {
|
|
3
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-
|
|
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
|
-
"minWidth": "520px",
|
|
8
|
-
"width": "520px",
|
|
9
7
|
|
|
10
8
|
"&-text": {
|
|
11
9
|
"@apply text-left flex-grow": {},
|
|
12
10
|
},
|
|
13
11
|
|
|
14
12
|
"&-info": {
|
|
15
|
-
"
|
|
16
|
-
"borderColor": "rgba(59, 130, 246, var(--tw-text-opacity))",
|
|
13
|
+
"@apply border-info": {},
|
|
17
14
|
|
|
18
15
|
".message-icon": {
|
|
19
|
-
"
|
|
16
|
+
"@apply text-info": {},
|
|
20
17
|
},
|
|
21
18
|
|
|
22
19
|
},
|
|
23
20
|
"&-success": {
|
|
24
|
-
"
|
|
25
|
-
"borderColor": "rgba(34, 197, 94, var(--tw-text-opacity))",
|
|
21
|
+
"@apply border-success": {},
|
|
26
22
|
|
|
27
23
|
".message-icon": {
|
|
28
|
-
"
|
|
24
|
+
"@apply text-success": {},
|
|
29
25
|
},
|
|
30
26
|
},
|
|
31
27
|
"&-error": {
|
|
32
|
-
"
|
|
33
|
-
"borderColor": "rgba(239, 68, 68, var(--tw-text-opacity))",
|
|
28
|
+
"@apply border-error": {},
|
|
34
29
|
|
|
35
30
|
".message-icon": {
|
|
36
|
-
"
|
|
31
|
+
"@apply text-error": {},
|
|
37
32
|
},
|
|
38
33
|
},
|
|
39
34
|
"&-warning": {
|
|
40
|
-
"
|
|
41
|
-
"borderColor": "rgba(234, 179, 8, var(--tw-text-opacity))",
|
|
35
|
+
"@apply border-warning": {},
|
|
42
36
|
|
|
43
37
|
".message-icon": {
|
|
44
|
-
"
|
|
38
|
+
"@apply text-warning": {},
|
|
45
39
|
},
|
|
46
40
|
},
|
|
47
41
|
},
|
|
@@ -51,14 +45,14 @@ module.exports = Message = () => ({
|
|
|
51
45
|
},
|
|
52
46
|
|
|
53
47
|
".message-close-button": {
|
|
54
|
-
"@apply border-transparent flex items-center justify-center transition-all duration-150 rounded-full outline-none cursor-base": {},
|
|
48
|
+
"@apply text-body border-transparent flex items-center justify-center transition-all duration-150 rounded-full outline-none cursor-base": {},
|
|
55
49
|
fontSize: "1.2em",
|
|
56
50
|
padding: "0.36em",
|
|
57
51
|
marginLeft: "0.25em",
|
|
58
52
|
marginRight: "-0.55em",
|
|
59
53
|
|
|
60
54
|
"&-icon": {
|
|
61
|
-
|
|
55
|
+
"@apply !text-xl": {},
|
|
62
56
|
},
|
|
63
57
|
|
|
64
58
|
"&-disabled": {
|
|
@@ -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]": {
|
|
@@ -57,8 +57,8 @@ module.exports = Pagination = () => ({
|
|
|
57
57
|
"&-icon": {
|
|
58
58
|
"@apply m-1 align-text-bottom leading-none flex items-center": {},
|
|
59
59
|
|
|
60
|
-
".
|
|
61
|
-
fontSize: "
|
|
60
|
+
".MuiSvgIcon-root": {
|
|
61
|
+
fontSize: "1em",
|
|
62
62
|
},
|
|
63
63
|
},
|
|
64
64
|
},
|
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/switch.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
module.exports = Switch = (colors) => ({
|
|
2
2
|
".form-switch-label": {
|
|
3
3
|
"@apply inline-block align-middle": {},
|
|
4
|
+
|
|
5
|
+
"&[type='hidden']": {
|
|
6
|
+
"@apply hidden": {},
|
|
7
|
+
|
|
8
|
+
".form-switch": {
|
|
9
|
+
"@apply hidden": {},
|
|
10
|
+
},
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
4
14
|
},
|
|
5
15
|
".form-switch": {
|
|
6
16
|
"@apply rounded-full p-0.5 cursor-base focus:outline-none": {},
|
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,14 +78,14 @@ 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",
|
|
85
85
|
marginRight: "-0.55em",
|
|
86
86
|
|
|
87
87
|
"&-icon": {
|
|
88
|
-
fontSize: "1em"
|
|
88
|
+
fontSize: "1em !important"
|
|
89
89
|
},
|
|
90
90
|
|
|
91
91
|
"&-disabled": {
|
|
@@ -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
|
},
|
|
@@ -23,6 +23,10 @@ module.exports = ZebraTable = () => ({
|
|
|
23
23
|
|
|
24
24
|
"&-icon": {
|
|
25
25
|
"@apply inline-flex pl-sm": {},
|
|
26
|
+
|
|
27
|
+
".MuiSvgIcon-root": {
|
|
28
|
+
"@apply !text-lg": {},
|
|
29
|
+
},
|
|
26
30
|
|
|
27
31
|
|
|
28
32
|
"&-sort": {
|
|
@@ -38,7 +42,7 @@ module.exports = ZebraTable = () => ({
|
|
|
38
42
|
},
|
|
39
43
|
|
|
40
44
|
"&-more": {
|
|
41
|
-
"@apply text-gray
|
|
45
|
+
"@apply text-gray": {},
|
|
42
46
|
},
|
|
43
47
|
},
|
|
44
48
|
},
|
|
@@ -48,7 +52,7 @@ module.exports = ZebraTable = () => ({
|
|
|
48
52
|
},
|
|
49
53
|
|
|
50
54
|
"&-tbody": {
|
|
51
|
-
"@apply lg:bg-white": {},
|
|
55
|
+
"@apply text-body lg:bg-white": {},
|
|
52
56
|
|
|
53
57
|
"&-tr": {
|
|
54
58
|
"@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": {},
|
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");
|
|
@@ -10,6 +11,7 @@ const ButtonGroup = require("./components/button-group");
|
|
|
10
11
|
const Checkbox = require("./components/checkbox");
|
|
11
12
|
const Dot = require("./components/dot");
|
|
12
13
|
const Forms = require("./components/forms");
|
|
14
|
+
const Calendar = require("./components/calendar");
|
|
13
15
|
const IconButton = require("./components/icon-button");
|
|
14
16
|
const Icon = require("./components/icon");
|
|
15
17
|
const Link = require("./components/link");
|
|
@@ -41,6 +43,7 @@ const components = [
|
|
|
41
43
|
Checkbox,
|
|
42
44
|
Dot,
|
|
43
45
|
Forms,
|
|
46
|
+
Calendar,
|
|
44
47
|
IconButton,
|
|
45
48
|
Icon,
|
|
46
49
|
Link,
|
|
@@ -142,16 +145,6 @@ module.exports = plugin.withOptions(
|
|
|
142
145
|
colors: {
|
|
143
146
|
...colors,
|
|
144
147
|
current: 'currentColor',
|
|
145
|
-
gray: {
|
|
146
|
-
DEFAULT: "#4b4b4b",
|
|
147
|
-
stroke: "#939393",
|
|
148
|
-
middle: "#ECECEC",
|
|
149
|
-
light: "#F4F4F4",
|
|
150
|
-
lighter: "#F9F9F9",
|
|
151
|
-
},
|
|
152
|
-
hover: {
|
|
153
|
-
DEFAULT: "#2B76B0",
|
|
154
|
-
},
|
|
155
148
|
},
|
|
156
149
|
cursor: {
|
|
157
150
|
base: "var(--vc-cursor)",
|