@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.
Files changed (42) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +5 -5
  3. package/package.json +2 -2
  4. package/src/colors.js +145 -145
  5. package/src/components/accordion.js +89 -89
  6. package/src/components/alert.js +98 -98
  7. package/src/components/avatar.js +85 -85
  8. package/src/components/badge.js +60 -60
  9. package/src/components/breadcrumb.js +13 -13
  10. package/src/components/button-group.js +46 -46
  11. package/src/components/button.js +304 -304
  12. package/src/components/calendar.js +82 -82
  13. package/src/components/card.js +54 -54
  14. package/src/components/checkbox.js +127 -127
  15. package/src/components/code.js +9 -9
  16. package/src/components/cookie-consent.js +30 -30
  17. package/src/components/divider.js +12 -12
  18. package/src/components/dot.js +84 -84
  19. package/src/components/dropdown-filter.js +72 -72
  20. package/src/components/footer.js +42 -42
  21. package/src/components/forms.js +256 -256
  22. package/src/components/header.js +35 -35
  23. package/src/components/icon-button.js +5 -5
  24. package/src/components/icon.js +9 -9
  25. package/src/components/kbd.js +9 -9
  26. package/src/components/link.js +20 -20
  27. package/src/components/message.js +62 -62
  28. package/src/components/modal.js +30 -30
  29. package/src/components/notification.js +56 -56
  30. package/src/components/pagination.js +69 -69
  31. package/src/components/radio.js +104 -104
  32. package/src/components/search-bar.js +44 -44
  33. package/src/components/side-menu.js +186 -0
  34. package/src/components/switch.js +119 -119
  35. package/src/components/tab-menu.js +36 -36
  36. package/src/components/table.js +13 -13
  37. package/src/components/tag.js +97 -97
  38. package/src/components/user-menu.js +23 -23
  39. package/src/components/zebratable.js +77 -77
  40. package/src/index.js +272 -272
  41. package/src/with-opacity.js +6 -6
  42. package/src/components/menu.js +0 -171
@@ -1,104 +1,104 @@
1
- module.exports = Radio = (colors) => ({
2
- '.form-radio': {
3
- '@apply shadow-sm': {},
4
- backgroundColor: 'inherit',
5
- '@apply border-neutral-300': {},
6
- '&[aria-invalid=true]': {
7
- '--tw-border-opacity': '1',
8
- borderColor: 'rgba(220, 38, 38, var(--tw-border-opacity))',
9
- },
10
- '&[aria-invalid=true]:hover': {
11
- '--tw-border-opacity': '1',
12
- 'border-color': 'rgba(220, 38, 38, var(--tw-border-opacity))',
13
- },
14
- // dark colors
15
- '@apply dark:border-neutral-400': {},
16
- '.dark &[aria-invalid=true]': {
17
- '--tw-border-opacity': '1',
18
- borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
19
- },
20
- '.dark &[aria-invalid=true]:hover': {
21
- '--tw-border-opacity': '1',
22
- borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
23
- },
24
-
25
- '@media (prefers-color-scheme: dark)': {
26
- '&[aria-invalid=true]': {
27
- '--tw-border-opacity': '1',
28
- borderColor: 'rgba(220, 38, 38, var(--tw-border-opacity))',
29
- },
30
- '&[aria-invalid=true]:hover': {
31
- '--tw-border-opacity': '1',
32
- 'border-color': 'rgba(220, 38, 38, var(--tw-border-opacity))',
33
- },
34
- },
35
-
36
- '&:checked': {
37
- borderColor: 'transparent',
38
- },
39
-
40
- // colors
41
- ...colors.reduce(
42
- (styles, color) => ({
43
- ...styles,
44
- [`&[data-color="${color}"]`]: {
45
- [`@apply text-${color}-600`]: {},
46
- [`@apply focus-visible:border-${color}-600 focus-visible:ring-${color}-600`]: {},
47
- [`@apply dark:text-${color}-500`]: {},
48
- [`@apply dark:focus-visible:border-${color}-400 dark:focus-visible:ring-${color}-400`]: {},
49
- },
50
- }),
51
- {}
52
- ),
53
-
54
- '@apply dark:focus-visible:ring-offset-neutral-900': {},
55
-
56
- // sizing
57
- '&-sm': {
58
- '@apply w-3 h-3': {},
59
- },
60
-
61
- '&-md': {
62
- '@apply w-4 h-4': {},
63
- },
64
-
65
- '&-lg': {
66
- '@apply w-5 h-5': {},
67
- },
68
-
69
- '&-xl': {
70
- '@apply w-6 h-6': {},
71
- },
72
-
73
- // disabled
74
- '&-disabled': {
75
- '@apply disabled:shadow-none disabled:border-neutral-300 disabled:bg-neutral-300 disabled:hover:text-neutral-300':
76
- {},
77
- '@apply dark:disabled:border-transparent dark:disabled:bg-white/20 dark:disabled:hover:text-white/20': {},
78
- },
79
-
80
- // label
81
- '&-label': {
82
- '@apply ml-2 select-none text-sm': {},
83
- '@apply text-body': {},
84
- // dark colors
85
- '@apply dark:text-neutral-100': {},
86
-
87
- '&-sm': {
88
- '@apply text-xs': {},
89
- },
90
-
91
- '&-md': {
92
- '@apply text-sm': {},
93
- },
94
-
95
- '&-lg': {
96
- '@apply text-base': {},
97
- },
98
-
99
- '&-xl': {
100
- '@apply text-lg': {},
101
- },
102
- },
103
- },
104
- });
1
+ module.exports = Radio = (colors) => ({
2
+ '.form-radio': {
3
+ '@apply shadow-sm': {},
4
+ backgroundColor: 'inherit',
5
+ '@apply border-neutral-300': {},
6
+ '&[aria-invalid=true]': {
7
+ '--tw-border-opacity': '1',
8
+ borderColor: 'rgba(220, 38, 38, var(--tw-border-opacity))',
9
+ },
10
+ '&[aria-invalid=true]:hover': {
11
+ '--tw-border-opacity': '1',
12
+ 'border-color': 'rgba(220, 38, 38, var(--tw-border-opacity))',
13
+ },
14
+ // dark colors
15
+ '@apply dark:border-neutral-400': {},
16
+ '.dark &[aria-invalid=true]': {
17
+ '--tw-border-opacity': '1',
18
+ borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
19
+ },
20
+ '.dark &[aria-invalid=true]:hover': {
21
+ '--tw-border-opacity': '1',
22
+ borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
23
+ },
24
+
25
+ '@media (prefers-color-scheme: dark)': {
26
+ '&[aria-invalid=true]': {
27
+ '--tw-border-opacity': '1',
28
+ borderColor: 'rgba(220, 38, 38, var(--tw-border-opacity))',
29
+ },
30
+ '&[aria-invalid=true]:hover': {
31
+ '--tw-border-opacity': '1',
32
+ 'border-color': 'rgba(220, 38, 38, var(--tw-border-opacity))',
33
+ },
34
+ },
35
+
36
+ '&:checked': {
37
+ borderColor: 'transparent',
38
+ },
39
+
40
+ // colors
41
+ ...colors.reduce(
42
+ (styles, color) => ({
43
+ ...styles,
44
+ [`&[data-color="${color}"]`]: {
45
+ [`@apply text-${color}-600`]: {},
46
+ [`@apply focus-visible:border-${color}-600 focus-visible:ring-${color}-600`]: {},
47
+ [`@apply dark:text-${color}-500`]: {},
48
+ [`@apply dark:focus-visible:border-${color}-400 dark:focus-visible:ring-${color}-400`]: {},
49
+ },
50
+ }),
51
+ {}
52
+ ),
53
+
54
+ '@apply dark:focus-visible:ring-offset-neutral-900': {},
55
+
56
+ // sizing
57
+ '&-sm': {
58
+ '@apply w-3 h-3': {},
59
+ },
60
+
61
+ '&-md': {
62
+ '@apply w-4 h-4': {},
63
+ },
64
+
65
+ '&-lg': {
66
+ '@apply w-5 h-5': {},
67
+ },
68
+
69
+ '&-xl': {
70
+ '@apply w-6 h-6': {},
71
+ },
72
+
73
+ // disabled
74
+ '&-disabled': {
75
+ '@apply disabled:shadow-none disabled:border-neutral-300 disabled:bg-neutral-300 disabled:hover:text-neutral-300':
76
+ {},
77
+ '@apply dark:disabled:border-transparent dark:disabled:bg-white/20 dark:disabled:hover:text-white/20': {},
78
+ },
79
+
80
+ // label
81
+ '&-label': {
82
+ '@apply ml-2 select-none text-sm': {},
83
+ '@apply text-body': {},
84
+ // dark colors
85
+ '@apply dark:text-neutral-100': {},
86
+
87
+ '&-sm': {
88
+ '@apply text-xs': {},
89
+ },
90
+
91
+ '&-md': {
92
+ '@apply text-sm': {},
93
+ },
94
+
95
+ '&-lg': {
96
+ '@apply text-base': {},
97
+ },
98
+
99
+ '&-xl': {
100
+ '@apply text-lg': {},
101
+ },
102
+ },
103
+ },
104
+ });
@@ -1,45 +1,45 @@
1
- module.exports = SearchBar = () => ({
2
- ".SearchBar": {
3
- position: "relative",
4
- border: "1px solid #939393",
5
- borderRadius: 200,
6
- overflow: "hidden",
7
- height: 44,
8
-
9
- "input": {
10
- border: "none",
11
- position: "absolute",
12
- top: 0,
13
- left: 0,
14
- flexGrow: 1,
15
- width: "100%",
16
- height: "inherit",
17
- fontFamily: "Arial",
18
- fontStyle: "normal",
19
- fontWeight: 400,
20
- fontSize: 14,
21
- lineHeight: 20,
22
- color: "#4B4B4B",
23
- padding: "0px 44px 0px 16px"
24
- },
25
-
26
- ".search-icon": {
27
- border: "none",
28
- display: "flex",
29
- height: 42,
30
- width: 44,
31
- justifyContent: "center",
32
- alignItems: "center",
33
- position: "absolute",
34
- top: 0,
35
- right: 0,
36
-
37
- "svg.small": {
38
- height: 13,
39
- width: 13
40
- }
41
- }
42
-
43
- }
44
- })
1
+ module.exports = SearchBar = () => ({
2
+ ".SearchBar": {
3
+ position: "relative",
4
+ border: "1px solid #939393",
5
+ borderRadius: 200,
6
+ overflow: "hidden",
7
+ height: 44,
8
+
9
+ "input": {
10
+ border: "none",
11
+ position: "absolute",
12
+ top: 0,
13
+ left: 0,
14
+ flexGrow: 1,
15
+ width: "100%",
16
+ height: "inherit",
17
+ fontFamily: "Arial",
18
+ fontStyle: "normal",
19
+ fontWeight: 400,
20
+ fontSize: 14,
21
+ lineHeight: 20,
22
+ color: "#4B4B4B",
23
+ padding: "0px 44px 0px 16px"
24
+ },
25
+
26
+ ".search-icon": {
27
+ border: "none",
28
+ display: "flex",
29
+ height: 42,
30
+ width: 44,
31
+ justifyContent: "center",
32
+ alignItems: "center",
33
+ position: "absolute",
34
+ top: 0,
35
+ right: 0,
36
+
37
+ "svg.small": {
38
+ height: 13,
39
+ width: 13
40
+ }
41
+ }
42
+
43
+ }
44
+ })
45
45
 
@@ -0,0 +1,186 @@
1
+ module.exports = Menu = () => ({
2
+ ".SideMenu": {
3
+ width: "440px",
4
+ border: "1px solid #939393",
5
+ borderRadius: "2px",
6
+ overflow: "hidden",
7
+
8
+ ".menu-header": {
9
+ padding: "3rem 1rem 1.8rem",
10
+ backgroundColor: "#005595",
11
+ padding: "2rem 1rem",
12
+
13
+ "label": {
14
+ fontSize: "20px",
15
+ fontWeight: 700,
16
+ color: "#fff"
17
+ },
18
+
19
+ ".label-header": {
20
+ display: "flex",
21
+ alignItems: "center",
22
+
23
+
24
+ "span": {
25
+ marginLeft: "auto"
26
+ }
27
+ },
28
+ },
29
+
30
+
31
+ ".MenuItem": {
32
+ borderTop: "1px solid #939393",
33
+ transition: "500ms ease",
34
+ overflow: "hidden",
35
+
36
+ "&.active": {
37
+ "> .wrapper": {
38
+ boxShadow: "inset 6px 0 0 0 #005595",
39
+
40
+ "> div > a": {
41
+ fontWeight: 600,
42
+ }
43
+ }
44
+ },
45
+
46
+ ".items": {
47
+ height: 0
48
+ },
49
+
50
+ ".wrapper": {
51
+ minHeight: "64px",
52
+ display: "flex",
53
+ alignItems: "center",
54
+
55
+ "a, button": {
56
+ all: "unset",
57
+ cursor: "pointer",
58
+ width: "100%",
59
+ height: "100%",
60
+ display: "flex",
61
+ verticalAlign: "middle",
62
+ alignItems: "center",
63
+ paddingRight: '15px'
64
+ },
65
+
66
+
67
+ "label": {
68
+
69
+ },
70
+
71
+ ".expand": {
72
+ width: "50px",
73
+ height: "64px",
74
+ display: "flex",
75
+ justifyContent: "center",
76
+ alignItems: "center",
77
+ marginLeft: "auto",
78
+ padding: 0,
79
+
80
+ "span": {
81
+ display: "flex",
82
+ justifyContent: "center",
83
+ alignItems: "center",
84
+ borderLeft: "1px solid",
85
+ height: '24px',
86
+ width: '45px'
87
+ }
88
+ }
89
+ },
90
+
91
+ "&.open": {
92
+ "> .wrapper": {
93
+ boxShadow: "inset 6px 0 0 0 #005595"
94
+ },
95
+
96
+ "> .items": {
97
+ height: "unset"
98
+ }
99
+ },
100
+
101
+ "&.lvl-1, &.lvl-2, &.lvl-3, &.lvl-4, &.lvl-5, &.lvl-6, &.lvl-7, &.lvl-8, &.lvl-9, &.lvl-10": {
102
+ minHeight: "56px",
103
+ },
104
+
105
+
106
+
107
+ "&.lvl-0": {
108
+ backgroundColor: "#fff",
109
+ "> .wrapper > div > a": {
110
+ paddingLeft: "1rem"
111
+ }
112
+ },
113
+
114
+ "&.lvl-1": {
115
+ backgroundColor: "#F9F9F9",
116
+ "> .wrapper > div > a": {
117
+ paddingLeft: "2rem"
118
+ }
119
+ },
120
+
121
+ "&.lvl-2": {
122
+ backgroundColor: "#ECECEC",
123
+ "> .wrapper > div > a": {
124
+ paddingLeft: "3rem"
125
+ }
126
+ },
127
+
128
+ "&.lvl-3": {
129
+ backgroundColor: "#ECECEC",
130
+ "> .wrapper > div > a": {
131
+ paddingLeft: "4rem"
132
+ }
133
+ },
134
+
135
+ "&.lvl-4": {
136
+ backgroundColor: "#ECECEC",
137
+ "> .wrapper > div > a": {
138
+ paddingLeft: "5rem"
139
+ }
140
+ },
141
+
142
+ "&.lvl-5": {
143
+ backgroundColor: "#ECECEC",
144
+ "> .wrapper > div > a": {
145
+ paddingLeft: "6rem"
146
+ }
147
+ },
148
+
149
+ "&.lvl-6": {
150
+ backgroundColor: "#ECECEC",
151
+ "> .wrapper > div > a": {
152
+ paddingLeft: "7rem"
153
+ }
154
+ },
155
+
156
+ "&.lvl-7": {
157
+ backgroundColor: "#ECECEC",
158
+ "> .wrapper > div > a": {
159
+ paddingLeft: "8rem"
160
+ }
161
+ },
162
+
163
+ "&.lvl-8": {
164
+ backgroundColor: "#ECECEC",
165
+ "> .wrapper > div > a": {
166
+ paddingLeft: "9rem"
167
+ }
168
+ },
169
+
170
+ "&.lvl-9": {
171
+ backgroundColor: "#ECECEC",
172
+ "> .wrapper > div > a": {
173
+ paddingLeft: "10rem"
174
+ }
175
+ },
176
+
177
+ "&.lvl-10": {
178
+ backgroundColor: "#ECECEC",
179
+ "> .wrapper > div > a": {
180
+ paddingLeft: "11rem"
181
+ }
182
+ }
183
+ }
184
+ },
185
+ });
186
+