@sk-web-gui/core 0.1.3 → 0.1.6

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