@sk-web-gui/core 0.1.68 → 0.1.70

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sk-web-gui/core",
3
- "version": "0.1.68",
3
+ "version": "0.1.70",
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": "b4d080f30347f482b696750c233c39f3f2a7da62"
34
+ "gitHead": "df8579fb46bdf8153829a6a70b554f7b23abeaaf"
35
35
  }
@@ -34,7 +34,7 @@ module.exports = Accordion = (colors) => ({
34
34
  },
35
35
 
36
36
  '&-body': {
37
- '@apply h-0 overflow-hidden m-lg': {},
37
+ '@apply h-0 overflow-hidden': {},
38
38
  transitionProperty: 'visibility, height, padding, margin',
39
39
  transitionTimingFunction: 'cubic-bezier(0.4, 0, 0.2, 1)',
40
40
  transitionDuration: '180ms',
@@ -3,37 +3,6 @@ function fieldOutline(colors) {
3
3
  '&-outline': {
4
4
  '@apply border shadow-sm border-gray-stroke': {},
5
5
  '@apply text-gray bg-white': {},
6
- //"@apply hover:border-neutral-300": {},
7
-
8
- '&[aria-invalid=true]': {
9
- '--tw-border-opacity': '1',
10
- borderColor: 'rgba(220, 38, 38, var(--tw-border-opacity))',
11
- '--tw-ring-offset-shadow': 'var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)',
12
- '--tw-ring-shadow': 'var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)',
13
- boxShadow: 'var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)',
14
- '--tw-ring-opacity': '1',
15
- '--tw-ring-color': 'rgba(220, 38, 38, var(--tw-ring-opacity))',
16
- },
17
- 'focus-visible:ring-4': {},
18
- /* dark mode */
19
- '@apply dark:border-neutral-700': {},
20
- '@apply dark:text-neutral-100 dark:bg-base': {},
21
- '@apply dark:hover:border-neutral-600': {},
22
-
23
- '.dark &[aria-invalid=true]': {
24
- '--tw-border-opacity': '1',
25
- borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
26
- '--tw-ring-opacity': '1',
27
- '--tw-ring-color': 'rgba(248, 113, 113, var(--tw-ring-opacity))',
28
- },
29
- '@media (prefers-color-scheme: dark)': {
30
- '&[aria-invalid=true]': {
31
- '--tw-border-opacity': '1',
32
- borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
33
- '--tw-ring-opacity': '1',
34
- '--tw-ring-color': 'rgba(248, 113, 113, var(--tw-ring-opacity))',
35
- },
36
- },
37
6
 
38
7
  ...colors.reduce(
39
8
  (styles, color) => ({
@@ -45,6 +14,14 @@ function fieldOutline(colors) {
45
14
  }),
46
15
  {}
47
16
  ),
17
+
18
+ '&[aria-invalid=true]': {
19
+ '@apply border-error ring-error': {},
20
+
21
+ '&:focus-visible': {
22
+ '@apply border-error ring-error': {},
23
+ },
24
+ },
48
25
  },
49
26
  };
50
27
  }
@@ -54,35 +31,6 @@ function fieldSolid(colors) {
54
31
  '&-solid': {
55
32
  '@apply border border-transparent': {},
56
33
  '@apply text-black bg-gray-light': {},
57
- //"@apply hover:bg-gray-200": {},
58
-
59
- '&[aria-invalid=true]': {
60
- '--tw-border-opacity': '1',
61
- borderColor: 'rgba(220, 38, 38, var(--tw-border-opacity))',
62
- '--tw-ring-offset-shadow': 'var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)',
63
- '--tw-ring-shadow': 'var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)',
64
- boxShadow: 'var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)',
65
- '--tw-ring-opacity': '1',
66
- '--tw-ring-color': 'rgba(220, 38, 38, var(--tw-ring-opacity))',
67
- },
68
- 'focus-visible:ring-4': {},
69
- /* dark mode */
70
- '@apply dark:text-neutral-100 dark:bg-white/50': {},
71
- '@apply dark:hover:bg-white/100': {},
72
- '.dark &[aria-invalid=true]': {
73
- '--tw-border-opacity': '1',
74
- borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
75
- '--tw-ring-opacity': '1',
76
- '--tw-ring-color': 'rgba(248, 113, 113, var(--tw-ring-opacity))',
77
- },
78
- '@media (prefers-color-scheme: dark)': {
79
- '&[aria-invalid=true]': {
80
- '--tw-border-opacity': '1',
81
- borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
82
- '--tw-ring-opacity': '1',
83
- '--tw-ring-color': 'rgba(248, 113, 113, var(--tw-ring-opacity))',
84
- },
85
- },
86
34
 
87
35
  ...colors.reduce(
88
36
  (styles, color) => ({
@@ -94,6 +42,14 @@ function fieldSolid(colors) {
94
42
  }),
95
43
  {}
96
44
  ),
45
+
46
+ '&[aria-invalid=true]': {
47
+ '@apply border-error ring-error': {},
48
+
49
+ '&:focus-visible': {
50
+ '@apply border-error ring-error': {},
51
+ },
52
+ },
97
53
  },
98
54
  };
99
55
  }
@@ -107,20 +63,10 @@ function formControl() {
107
63
  '@apply mt-1.5 leading-none text-gray dark:text-white/60': {},
108
64
  },
109
65
  '.form-error-message': {
110
- '@apply mt-1.5 leading-none flex items-center text-sm': {},
111
- '--tw-text-opacity': '1',
112
- color: 'rgba(239, 68, 68, var(--tw-text-opacity))',
113
- '.dark &': {
114
- '--tw-text-opacity': '1',
115
- color: 'rgba(252, 165, 165, var(--tw-text-opacity))',
116
- },
66
+ '@apply mt-1.5 leading-none flex items-center text-sm text-error': {},
117
67
  },
118
68
  '.form-label': {
119
69
  '@apply text-sm font-medium text-left align-middle block mb-1.5': {},
120
-
121
- '&-disabled': {
122
- //"@apply opacity-60": {},
123
- },
124
70
  },
125
71
  '.form-required-indicator': {
126
72
  '@apply ml-1 text-sm': {},
@@ -137,7 +83,59 @@ function formControl() {
137
83
  function formInputGroup() {
138
84
  return {
139
85
  '.form-input-group': {
140
- '@apply flex relative': {},
86
+ '@apply flex relative h-fit w-full rounded-[0.2rem] border border-gray-stroke': {},
87
+
88
+ '&:focus-within': {
89
+ '@apply border border-primary ring-primary ring-1': {},
90
+ },
91
+
92
+ '> *': {
93
+ '@apply border-0 ring-0': {},
94
+
95
+ '&:focus': {
96
+ '@apply ring-0': {},
97
+ },
98
+ },
99
+
100
+ '&-sm': {
101
+ '@apply min-h-[4rem] max-h-[4rem]': {},
102
+
103
+ '.form-field': {
104
+ '@apply min-h-[3.8rem] max-h-[3.8rem]': {},
105
+ },
106
+ },
107
+
108
+ '&-md': {
109
+ '@apply min-h-[4.4rem] max-h-[4.4rem]': {},
110
+
111
+ '.form-field': {
112
+ '@apply min-h-[4.2rem] max-h-[4.2rem]': {},
113
+ },
114
+ },
115
+
116
+ '&-lg': {
117
+ '@apply min-h-[4.8rem] max-h-[4.8rem]': {},
118
+
119
+ '.form-field': {
120
+ '@apply min-h-[4.6rem] max-h-[4.6rem]': {},
121
+ },
122
+ },
123
+
124
+ "&[data-rounded='true']": {
125
+ '@apply rounded-[3.2rem]': {},
126
+
127
+ '> *:first-child': {
128
+ '@apply rounded-[3.2rem]': {},
129
+ },
130
+
131
+ '> *:last-child': {
132
+ '@apply rounded-[3.2rem]': {},
133
+ },
134
+ },
135
+
136
+ '&[aria-invalid=true]': {
137
+ '@apply border-error ring-error': {},
138
+ },
141
139
  },
142
140
 
143
141
  '.form-input-element': {
@@ -157,8 +155,7 @@ function formInputGroup() {
157
155
  },
158
156
 
159
157
  '.form-input-addon': {
160
- '@apply flex items-center w-auto rounded-base shadow-sm whitespace-nowrap': {},
161
- '@apply border border-neutral-300': {},
158
+ '@apply flex items-center w-auto shadow-sm whitespace-nowrap': {},
162
159
  '@apply text-neutral-600 bg-neutral-50': {},
163
160
  // dark colors
164
161
  '@apply dark:border-neutral-700': {},
@@ -177,11 +174,35 @@ function formInputGroup() {
177
174
  },
178
175
 
179
176
  '&-left': {
180
- '@apply -mr-1 rounded-r-none': {},
177
+ '@apply rounded-r-none': {},
181
178
  },
182
179
 
183
180
  '&-right': {
184
- '@apply -ml-1 rounded-l-none': {},
181
+ '@apply rounded-l-none': {},
182
+ },
183
+ },
184
+ '.form-input-addin': {
185
+ '@apply flex items-center w-auto whitespace-nowrap': {},
186
+ '@apply text-body': {},
187
+
188
+ '&-sm': {
189
+ '@apply px-[1.44rem] text-xs': {},
190
+ },
191
+
192
+ '&-md': {
193
+ '@apply px-[1.6rem] text-sm': {},
194
+ },
195
+
196
+ '&-lg': {
197
+ '@apply px-[1.76rem] text-base': {},
198
+ },
199
+
200
+ '&-left': {
201
+ '@apply pr-0 rounded-r-none': {},
202
+ },
203
+
204
+ '&-right': {
205
+ '@apply pl-0 rounded-l-none': {},
185
206
  },
186
207
  },
187
208
  };
@@ -189,44 +210,32 @@ function formInputGroup() {
189
210
 
190
211
  module.exports = Forms = (colors) => ({
191
212
  '.form-field': {
192
- '@apply placeholder-gray-stroke': {},
213
+ '@apply rounded-[0.2rem] placeholder-gray-stroke': {},
193
214
  '@apply relative w-full min-w-0 inline-flex items-center appearance-none focus-visible:outline-none': {},
194
215
  '@apply transition-colors duration-75 ease-out': {},
195
216
 
196
217
  '&-sm': {
197
218
  '@apply text-sm leading-sm': {},
198
- borderRadius: '0.2rem',
199
- padding: '0 1.44rem',
200
- minHeight: '4rem',
201
- maxHeight: '4rem',
219
+ '@apply py-0 px-[1.44rem] min-h-[4rem] max-h-[4rem]': {},
202
220
  },
203
221
 
204
222
  '&-md': {
205
223
  '@apply text-base leading-base': {},
206
- borderRadius: '0.2rem',
207
- padding: '0 1.6rem',
208
- minHeight: '4.4rem',
209
- maxHeight: '4.4rem',
224
+ '@apply py-0 px-[1.6rem] min-h-[4.4rem] max-h-[4.4rem]': {},
210
225
  },
211
226
 
212
227
  '&-lg': {
213
- '@apply text-lg leading-lg': {},
214
- borderRadius: '0.2rem',
215
- padding: '0 1.76rem',
216
- minHeight: '4.8rem',
217
- maxHeight: '4.8rem',
228
+ '@apply text-base leading-lg': {},
229
+ '@apply py-0 px-[1.76rem] min-h-[4.8rem] max-h-[4.8rem]': {},
218
230
  },
219
231
 
220
232
  '&-disabled, &&-disabled': {
221
233
  '@apply disabled:cursor-not-allowed cursor-not-allowed': {},
222
234
  '@apply disabled:bg-gray-lighter bg-gray-lighter': {},
223
- //"@apply disabled:shadow-none disabled:cursor-not-allowed disabled:opacity-60": {},
224
- //"@apply disabled:border-neutral-200 disabled:bg-neutral-200": {},
225
- //"@apply dark:disabled:border-transparent dark:disabled:bg-white/20": {},
226
235
  },
227
236
 
228
237
  "&[data-rounded='true']": {
229
- borderRadius: '3.2rem',
238
+ '@apply rounded-[3.2rem]': {},
230
239
  },
231
240
 
232
241
  // variants
@@ -234,8 +243,12 @@ module.exports = Forms = (colors) => ({
234
243
  ...fieldSolid(colors),
235
244
  },
236
245
 
237
- '.form-close-button': {
238
- '@apply border-0 ml-auto': {},
246
+ '.form-button': {
247
+ '@apply text-[1.1433em] border-0 ml-auto text-primary hover:text-white': {},
248
+
249
+ '&[data-icon=true]': {
250
+ '@apply p-[0.2em]': {},
251
+ },
239
252
 
240
253
  '&-icon': {
241
254
  '@apply inline-flex': {},
@@ -1,17 +1,5 @@
1
1
  module.exports = SearchBar = () => ({
2
- '.SearchBar': {
3
- width: '100%',
4
- position: 'relative',
5
-
6
- '.search-button': {
7
- '@apply flex items-center absolute inset-y-0 right-md text-primary': {},
8
- '&-icon': {
9
- '@apply !text-2xl': {},
10
-
11
- '&.small': {
12
- '@apply h-[13px] w-[13px]': {},
13
- },
14
- },
15
- },
2
+ '.search-bar': {
3
+ '@apply w-full relative': {},
16
4
  },
17
5
  });