@sk-web-gui/core 0.1.65 → 0.1.67
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/button.js +67 -6
- package/src/components/context-menu.js +11 -0
- package/src/components/dialog.js +12 -0
- package/src/components/dropdown-filter.js +7 -12
- package/src/components/forms.js +35 -9
- package/src/components/icon-button.js +26 -1
- package/src/components/link.js +3 -0
- package/src/components/side-menu.js +256 -46
- package/src/components/tag.js +1 -2
- package/src/index.js +4 -0
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.67",
|
|
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": "3b28fd1c88425187460540587be093692cf39cd4"
|
|
35
35
|
}
|
package/src/components/button.js
CHANGED
|
@@ -6,6 +6,10 @@ function buttonSolid(colors) {
|
|
|
6
6
|
'@apply text-body bg-white': {},
|
|
7
7
|
/* hover */
|
|
8
8
|
'@apply hover:text-white hover:bg-hover hover:border-primary-active': {},
|
|
9
|
+
/* keyboard active */
|
|
10
|
+
'&.active': {
|
|
11
|
+
'@apply text-white bg-hover border-primary-active': {},
|
|
12
|
+
},
|
|
9
13
|
/* focus */
|
|
10
14
|
'@apply focus-visible:z-base': {},
|
|
11
15
|
'@apply focus-visible:border-primary': {},
|
|
@@ -18,6 +22,10 @@ function buttonSolid(colors) {
|
|
|
18
22
|
'@apply dark:text-neutral-100 dark:bg-neutral-700': {},
|
|
19
23
|
/* dark hover */
|
|
20
24
|
'@apply dark:hover:border-hover dark:hover:bg-neutral-600': {},
|
|
25
|
+
/* dark keyboard active */
|
|
26
|
+
'&.active': {
|
|
27
|
+
'@apply dark:border-hover dark:bg-neutral-600': {},
|
|
28
|
+
},
|
|
21
29
|
/* dark focus */
|
|
22
30
|
'@apply dark:focus-visible:border-primary-500': {},
|
|
23
31
|
/* dark active */
|
|
@@ -31,6 +39,10 @@ function buttonSolid(colors) {
|
|
|
31
39
|
[`@apply text-white bg-${color}`]: {},
|
|
32
40
|
// hover
|
|
33
41
|
[`@apply hover:text-white hover:bg-${color}-active`]: {},
|
|
42
|
+
// keyboard active
|
|
43
|
+
'&.active': {
|
|
44
|
+
[`@apply text-white bg-${color}-active`]: {},
|
|
45
|
+
},
|
|
34
46
|
|
|
35
47
|
[`@apply active:text-white active:bg-${color}-active`]: {},
|
|
36
48
|
[`@apply focus-visible:ring-4 focus-visible:ring-black`]: {},
|
|
@@ -58,11 +70,17 @@ function buttonSolid(colors) {
|
|
|
58
70
|
|
|
59
71
|
"&[data-color='primary']": {
|
|
60
72
|
'@apply border-primary hover:border-primary-active': {},
|
|
73
|
+
'&.active': {
|
|
74
|
+
'@apply border-primary-active': {},
|
|
75
|
+
},
|
|
61
76
|
},
|
|
62
77
|
|
|
63
78
|
'&.btn': {
|
|
64
79
|
'&-disabled': {
|
|
65
80
|
'@apply disabled:border-gray-stroke hover:border-gray-stroke': {},
|
|
81
|
+
'&.active': {
|
|
82
|
+
'@apply border-gray-stroke': {},
|
|
83
|
+
},
|
|
66
84
|
},
|
|
67
85
|
},
|
|
68
86
|
},
|
|
@@ -76,6 +94,10 @@ function buttonOutline(colors) {
|
|
|
76
94
|
'@apply text-body bg-transparent': {},
|
|
77
95
|
/* hover */
|
|
78
96
|
'@apply hover:text-white hover:bg-primary-active hover:border-primary-active': {},
|
|
97
|
+
/* keyboard active */
|
|
98
|
+
'&.active': {
|
|
99
|
+
'@apply text-white bg-primary-active border-primary-active': {},
|
|
100
|
+
},
|
|
79
101
|
/* focus */
|
|
80
102
|
'@apply focus-visible:z-base': {},
|
|
81
103
|
'@apply focus-visible:border-primary-500': {},
|
|
@@ -87,6 +109,10 @@ function buttonOutline(colors) {
|
|
|
87
109
|
'@apply dark:text-neutral-100 dark:bg-transparent': {},
|
|
88
110
|
/* dark hover */
|
|
89
111
|
'@apply dark:hover:border-neutral-300 dark:hover:bg-neutral-700': {},
|
|
112
|
+
/* dark keyboard active */
|
|
113
|
+
'&.active': {
|
|
114
|
+
'@apply dark:border-neutral-300 dark:bg-neutral-700': {},
|
|
115
|
+
},
|
|
90
116
|
/* dark focus */
|
|
91
117
|
'@apply dark:focus-visible:border-primary-500': {},
|
|
92
118
|
/* dark active */
|
|
@@ -100,6 +126,10 @@ function buttonOutline(colors) {
|
|
|
100
126
|
[`@apply text-${color}-600 bg-transparent`]: {},
|
|
101
127
|
/* hover */
|
|
102
128
|
[`@apply hover:text-white hover:bg-${color}-active hover:border-${color}-active`]: {},
|
|
129
|
+
/* keyboard active */
|
|
130
|
+
'&.active': {
|
|
131
|
+
[`@apply text-white bg-${color}-active border-${color}-active`]: {},
|
|
132
|
+
},
|
|
103
133
|
/* focus */
|
|
104
134
|
[`@apply focus-visible:border-${color}-500`]: {},
|
|
105
135
|
[`@apply focus-visible:ring-${color}-500`]: {},
|
|
@@ -112,6 +142,11 @@ function buttonOutline(colors) {
|
|
|
112
142
|
/* dark hover */
|
|
113
143
|
[`@apply dark:hover:bg-${color}-200`]: {},
|
|
114
144
|
[`@apply dark:hover:bg-opacity-15`]: {},
|
|
145
|
+
/* dark keyboard active */
|
|
146
|
+
'&.active': {
|
|
147
|
+
[`@apply dark:bg-${color}-200`]: {},
|
|
148
|
+
[`@apply dark:bg-opacity-15`]: {},
|
|
149
|
+
},
|
|
115
150
|
/* dark focus */
|
|
116
151
|
[`@apply dark:focus-visible:border-${color}-500`]: {},
|
|
117
152
|
[`@apply dark:focus-visible:ring-${color}-500`]: {},
|
|
@@ -126,6 +161,9 @@ function buttonOutline(colors) {
|
|
|
126
161
|
'&.btn': {
|
|
127
162
|
'&-disabled': {
|
|
128
163
|
'@apply disabled:border-gray-stroke hover:border-gray-stroke': {},
|
|
164
|
+
'&.active': {
|
|
165
|
+
'@apply border-gray-stroke': {},
|
|
166
|
+
},
|
|
129
167
|
},
|
|
130
168
|
},
|
|
131
169
|
},
|
|
@@ -232,6 +270,9 @@ function buttonLink(colors) {
|
|
|
232
270
|
return {
|
|
233
271
|
'&-link': {
|
|
234
272
|
'@apply h-auto p-0 leading-normal text-neutral-600 hover:underline active:text-neutral-700': {},
|
|
273
|
+
'&.active': {
|
|
274
|
+
'@apply underline': {},
|
|
275
|
+
},
|
|
235
276
|
'@apply focus-visible:z-base focus-visible:ring-4 focus-visible:ring-primary-500': {},
|
|
236
277
|
// dark colors
|
|
237
278
|
'@apply dark:text-neutral-200': {},
|
|
@@ -258,15 +299,15 @@ module.exports = Button = (colors) => ({
|
|
|
258
299
|
'.btn': {
|
|
259
300
|
'@apply relative': {},
|
|
260
301
|
'@apply m-0': {},
|
|
261
|
-
'@apply
|
|
302
|
+
'@apply px-[3.2rem]': {},
|
|
303
|
+
'@apply py-0': {},
|
|
304
|
+
'@apply rounded-[0.4rem] inline-flex items-center justify-center flex-shrink-0 align-middle': {},
|
|
262
305
|
'@apply font-medium leading-tight': {},
|
|
263
306
|
transitionProperty: 'background-color, border-color, color, fill, stroke, box-shadow',
|
|
264
307
|
'@apply duration-75 ease-out': {},
|
|
265
308
|
'@apply outline-none appearance-none cursor-base select-none whitespace-nowrap': {},
|
|
266
309
|
'@apply focus-visible:outline-none': {},
|
|
267
310
|
|
|
268
|
-
padding: '1.2rem 3.2rem',
|
|
269
|
-
|
|
270
311
|
"&[data-rounded='true']": {
|
|
271
312
|
borderRadius: '3.2rem',
|
|
272
313
|
},
|
|
@@ -274,17 +315,24 @@ module.exports = Button = (colors) => ({
|
|
|
274
315
|
// sizing
|
|
275
316
|
'&-sm': {
|
|
276
317
|
'@apply text-xs': {},
|
|
277
|
-
|
|
318
|
+
minHeight: '4rem',
|
|
319
|
+
maxHeight: '4rem',
|
|
278
320
|
},
|
|
279
321
|
|
|
280
322
|
'&-md': {
|
|
281
323
|
'@apply text-sm': {},
|
|
282
|
-
|
|
324
|
+
minHeight: '4.4rem',
|
|
325
|
+
maxHeight: '4.4rem',
|
|
283
326
|
},
|
|
284
327
|
|
|
285
328
|
'&-lg': {
|
|
286
329
|
'@apply text-base': {},
|
|
287
|
-
|
|
330
|
+
minHeight: '4.8rem',
|
|
331
|
+
maxHeight: '4.8rem',
|
|
332
|
+
},
|
|
333
|
+
'&-fit-content': {
|
|
334
|
+
'@apply p-0': {},
|
|
335
|
+
fontSize: 'inherit',
|
|
288
336
|
},
|
|
289
337
|
|
|
290
338
|
// State
|
|
@@ -293,6 +341,11 @@ module.exports = Button = (colors) => ({
|
|
|
293
341
|
'@apply disabled:shadow-none disabled:cursor-not-allowed': {},
|
|
294
342
|
'@apply disabled:text-gray disabled:bg-gray-light !important': {},
|
|
295
343
|
},
|
|
344
|
+
'.MuiSvgIcon-root': {
|
|
345
|
+
fontSize: '1.5em',
|
|
346
|
+
width: '1em',
|
|
347
|
+
height: '1em',
|
|
348
|
+
},
|
|
296
349
|
|
|
297
350
|
// variants
|
|
298
351
|
...buttonSolid(colors),
|
|
@@ -301,4 +354,12 @@ module.exports = Button = (colors) => ({
|
|
|
301
354
|
//...buttonLight(colors),
|
|
302
355
|
...buttonLink(colors),
|
|
303
356
|
},
|
|
357
|
+
'.btn-has-icon': {
|
|
358
|
+
'&-left .MuiSvgIcon-root': {
|
|
359
|
+
'@apply mr-sm': {},
|
|
360
|
+
},
|
|
361
|
+
'&-right .MuiSvgIcon-root': {
|
|
362
|
+
'@apply ml-sm': {},
|
|
363
|
+
},
|
|
364
|
+
},
|
|
304
365
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module.exports = ContextMenu = () => ({
|
|
2
|
+
'.context-menu-wrapper': {
|
|
3
|
+
'.context-menu-items': {
|
|
4
|
+
'@apply absolute bg-white border border-body z-10 drop-shadow-md mt-sm flex flex-col space-y-4 justify-start items-start p-sm':
|
|
5
|
+
{},
|
|
6
|
+
'.context-menu-item': {
|
|
7
|
+
'@apply px-sm': {},
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module.exports = Dialog = () => ({
|
|
2
|
+
'.dialog': {
|
|
3
|
+
'@apply w-fit max-w-prose': {},
|
|
4
|
+
'&-buttons': {
|
|
5
|
+
'@apply grid grid-flow-col gap-lg place-content-stretch': {},
|
|
6
|
+
gridAutoColumns: 'minmax(0, 1fr)',
|
|
7
|
+
},
|
|
8
|
+
'&-content': {
|
|
9
|
+
'@apply text-center mb-lg': {},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module.exports = DropdownFilter = () => ({
|
|
2
|
-
'.
|
|
2
|
+
'.dropdown-filter': {
|
|
3
3
|
position: 'relative',
|
|
4
4
|
height: 50,
|
|
5
5
|
border: '1px solid #939393',
|
|
@@ -8,11 +8,10 @@ module.exports = DropdownFilter = () => ({
|
|
|
8
8
|
borderRadius: 2,
|
|
9
9
|
|
|
10
10
|
'.dropdown-button': {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
padding: '0 1rem',
|
|
11
|
+
'@apply flex justify-between items-center grow': {},
|
|
12
|
+
'.dropdown-button-icon': {
|
|
13
|
+
'@apply justify-self-end grow-0': {},
|
|
14
|
+
},
|
|
16
15
|
},
|
|
17
16
|
|
|
18
17
|
'.filter-container': {
|
|
@@ -23,28 +22,24 @@ module.exports = DropdownFilter = () => ({
|
|
|
23
22
|
width: 'calc(100% + 2px)',
|
|
24
23
|
background: '#fff',
|
|
25
24
|
border: '1px solid #939393',
|
|
26
|
-
padding: '1rem',
|
|
27
25
|
borderRadius: 2,
|
|
28
26
|
|
|
29
27
|
'.filter-controls': {
|
|
30
28
|
display: 'flex',
|
|
31
29
|
justifyContent: 'flex-end',
|
|
32
|
-
padding: '0 1rem',
|
|
33
|
-
paddingBottom: 12,
|
|
34
|
-
|
|
35
30
|
button: {
|
|
36
31
|
marginLeft: '1rem',
|
|
37
32
|
textDecoration: 'underline',
|
|
38
33
|
},
|
|
39
34
|
},
|
|
40
35
|
|
|
41
|
-
'.
|
|
36
|
+
'.filter-item': {
|
|
37
|
+
'@apply px-md': {},
|
|
42
38
|
height: 48,
|
|
43
39
|
display: 'flex',
|
|
44
40
|
justifyContent: 'space-between',
|
|
45
41
|
alignItems: 'center',
|
|
46
42
|
borderBottom: '1px solid #939393',
|
|
47
|
-
padding: '0 1rem',
|
|
48
43
|
|
|
49
44
|
'> label:first-child': {
|
|
50
45
|
'@apply flex-grow': {},
|
package/src/components/forms.js
CHANGED
|
@@ -196,19 +196,25 @@ module.exports = Forms = (colors) => ({
|
|
|
196
196
|
'&-sm': {
|
|
197
197
|
'@apply text-sm leading-sm': {},
|
|
198
198
|
borderRadius: '0.2rem',
|
|
199
|
-
padding: '
|
|
199
|
+
padding: '0 1.44rem',
|
|
200
|
+
minHeight: '4rem',
|
|
201
|
+
maxHeight: '4rem',
|
|
200
202
|
},
|
|
201
203
|
|
|
202
204
|
'&-md': {
|
|
203
205
|
'@apply text-base leading-base': {},
|
|
204
206
|
borderRadius: '0.2rem',
|
|
205
|
-
padding: '
|
|
207
|
+
padding: '0 1.6rem',
|
|
208
|
+
minHeight: '4.4rem',
|
|
209
|
+
maxHeight: '4.4rem',
|
|
206
210
|
},
|
|
207
211
|
|
|
208
212
|
'&-lg': {
|
|
209
213
|
'@apply text-lg leading-lg': {},
|
|
210
214
|
borderRadius: '0.2rem',
|
|
211
|
-
padding: '
|
|
215
|
+
padding: '0 1.76rem',
|
|
216
|
+
minHeight: '4.8rem',
|
|
217
|
+
maxHeight: '4.8rem',
|
|
212
218
|
},
|
|
213
219
|
|
|
214
220
|
'&-disabled, &&-disabled': {
|
|
@@ -218,7 +224,7 @@ module.exports = Forms = (colors) => ({
|
|
|
218
224
|
//"@apply disabled:border-neutral-200 disabled:bg-neutral-200": {},
|
|
219
225
|
//"@apply dark:disabled:border-transparent dark:disabled:bg-white/20": {},
|
|
220
226
|
},
|
|
221
|
-
|
|
227
|
+
|
|
222
228
|
"&[data-rounded='true']": {
|
|
223
229
|
borderRadius: '3.2rem',
|
|
224
230
|
},
|
|
@@ -229,7 +235,7 @@ module.exports = Forms = (colors) => ({
|
|
|
229
235
|
},
|
|
230
236
|
|
|
231
237
|
'.form-close-button': {
|
|
232
|
-
'@apply
|
|
238
|
+
'@apply border-0 ml-auto': {},
|
|
233
239
|
|
|
234
240
|
'&-icon': {
|
|
235
241
|
'@apply inline-flex': {},
|
|
@@ -250,20 +256,40 @@ module.exports = Forms = (colors) => ({
|
|
|
250
256
|
},
|
|
251
257
|
|
|
252
258
|
'.form-select': {
|
|
253
|
-
'@apply
|
|
259
|
+
'@apply justify-between items-center grow text-body bg-white caret-transparent select-none cursor-pointer border-gray-stroke':
|
|
260
|
+
{},
|
|
254
261
|
'background-image': 'none',
|
|
255
|
-
|
|
262
|
+
'&-wrapper': {
|
|
263
|
+
'@apply block w-full relative': {},
|
|
264
|
+
},
|
|
265
|
+
'&-icon': {
|
|
266
|
+
'@apply grow-0': {},
|
|
267
|
+
},
|
|
256
268
|
'&-list': {
|
|
257
269
|
'@apply z-10 absolute overflow-y-auto w-full bg-white mt-0 border border-gray-stroke border-t-0': {},
|
|
258
270
|
},
|
|
259
|
-
|
|
271
|
+
'&-has-multiple-choices': {
|
|
272
|
+
'@apply flex w-full h-full justify-between items-center pr-md': {},
|
|
273
|
+
},
|
|
274
|
+
'&-multiple-chioces': {
|
|
275
|
+
'@apply truncate pr-md': {},
|
|
276
|
+
},
|
|
260
277
|
'&-option': {
|
|
261
|
-
'@apply rounded-none cursor-default hover:text-white focus-visible:text-white hover:bg-primary focus-visible:bg-primary':
|
|
278
|
+
'@apply text-body rounded-none cursor-default hover:text-white focus-visible:text-white hover:bg-primary focus-visible:bg-primary flex items-center':
|
|
262
279
|
{},
|
|
263
280
|
|
|
281
|
+
'&.multiple.selected': {
|
|
282
|
+
'@apply bg-background-one': {},
|
|
283
|
+
},
|
|
264
284
|
'&.active': {
|
|
265
285
|
'@apply bg-primary text-white': {},
|
|
266
286
|
},
|
|
287
|
+
'&.active.selected': {
|
|
288
|
+
'@apply bg-primary text-white': {},
|
|
289
|
+
},
|
|
290
|
+
'&.disabled': {
|
|
291
|
+
'@apply opacity-75 cursor-not-allowed hover:bg-white hover:text-black': {},
|
|
292
|
+
},
|
|
267
293
|
},
|
|
268
294
|
},
|
|
269
295
|
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
module.exports = IconButton = () => ({
|
|
2
|
-
'.btn-icon': {
|
|
2
|
+
'.btn-icon, [data-icon="true"]': {
|
|
3
3
|
'@apply p-0': {},
|
|
4
|
+
"&[data-rounded='true']": {
|
|
5
|
+
'@apply rounded-full': {},
|
|
6
|
+
},
|
|
7
|
+
'&.btn-sm': {
|
|
8
|
+
minWidth: '4rem',
|
|
9
|
+
maxWidth: '4rem',
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
'&.btn-md': {
|
|
13
|
+
minWidth: '4.4rem',
|
|
14
|
+
maxWidth: '4.4rem',
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
'&.btn-lg': {
|
|
18
|
+
minWidth: '4.8rem',
|
|
19
|
+
maxWidth: '4.8rem',
|
|
20
|
+
},
|
|
21
|
+
'.btn-has-icon': {
|
|
22
|
+
'&-left .MuiSvgIcon-root': {
|
|
23
|
+
'@apply mr-0': {},
|
|
24
|
+
},
|
|
25
|
+
'&-right .MuiSvgIcon-root': {
|
|
26
|
+
'@apply ml-0': {},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
4
29
|
},
|
|
5
30
|
});
|
package/src/components/link.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
module.exports = Menu = () => ({
|
|
2
|
-
'.
|
|
2
|
+
'.side-menu': {
|
|
3
3
|
'@apply w-[440px]': {},
|
|
4
4
|
|
|
5
5
|
'.menu-header': {
|
|
6
|
-
'@apply py-[2rem] px-[1.6rem] bg-primary rounded-t-sm': {},
|
|
6
|
+
'@apply py-[2rem] px-[1.6rem] bg-primary text-white rounded-t-sm': {},
|
|
7
7
|
|
|
8
8
|
'label, .label': {
|
|
9
9
|
'@apply text-xl font-bold text-white': {},
|
|
@@ -29,37 +29,36 @@ module.exports = Menu = () => ({
|
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
|
-
|
|
33
32
|
|
|
34
|
-
'.menu-
|
|
35
|
-
'@apply
|
|
36
|
-
'>.MenuItem:first-child': {
|
|
37
|
-
'@apply border-t-0': {},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
'.MenuItem': {
|
|
42
|
-
'@apply bg-white h-full border-t border-gray-stroke': {},
|
|
33
|
+
'.menu-item': {
|
|
34
|
+
'@apply bg-white h-full': {},
|
|
43
35
|
|
|
44
36
|
'.items': {
|
|
45
37
|
'@apply block': {},
|
|
46
38
|
},
|
|
47
39
|
|
|
40
|
+
'&-label': {
|
|
41
|
+
'@apply flex-grow select-none': {},
|
|
42
|
+
},
|
|
43
|
+
|
|
48
44
|
'&.active': {
|
|
49
45
|
'> .wrapper': {
|
|
50
46
|
boxShadow: 'inset 6px 0 0 0 #005595',
|
|
51
|
-
|
|
52
|
-
'> .MenuItem-link': {
|
|
47
|
+
'.menu-item-label': {
|
|
53
48
|
'@apply underline': {},
|
|
54
49
|
},
|
|
55
50
|
},
|
|
56
51
|
},
|
|
57
52
|
|
|
58
|
-
'.
|
|
59
|
-
'@apply
|
|
53
|
+
'.expand path': {
|
|
54
|
+
'@apply fill-primary': {},
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
'& .wrapper': {
|
|
58
|
+
'@apply min-h-[48px] max-h-[48px] relative flex flex-wrap items-center': {},
|
|
60
59
|
|
|
61
|
-
'.
|
|
62
|
-
'@apply flex-grow text-left justify-start py-sm pr-
|
|
60
|
+
'.menu-item-link': {
|
|
61
|
+
'@apply flex-grow flex items-center text-base text-left justify-start py-sm pr-sm h-full': {},
|
|
63
62
|
},
|
|
64
63
|
|
|
65
64
|
'.expand': {
|
|
@@ -71,98 +70,309 @@ module.exports = Menu = () => ({
|
|
|
71
70
|
},
|
|
72
71
|
},
|
|
73
72
|
|
|
74
|
-
|
|
75
|
-
'.
|
|
76
|
-
'@apply
|
|
73
|
+
'&.open': {
|
|
74
|
+
'&:not(.moved-away) + .menu-item:not(.new-item) > .wrapper': {
|
|
75
|
+
'@apply border-t': {},
|
|
77
76
|
},
|
|
78
|
-
'@apply py-sm': {},
|
|
79
77
|
},
|
|
80
|
-
*/
|
|
81
78
|
|
|
82
|
-
'&.
|
|
83
|
-
'
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
'&.draggable': {
|
|
80
|
+
'&.dragenter': {
|
|
81
|
+
'> .wrapper': {
|
|
82
|
+
'@apply h-full max-h-full': {},
|
|
83
|
+
},
|
|
84
|
+
"> .wrapper > *:not([draggable='true'])": {
|
|
85
|
+
'@apply pointer-events-none': {},
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
'& > .wrapper::after': {
|
|
89
|
+
'@apply bg-info-light block relative w-full h-[44px]': {},
|
|
90
|
+
content: "''",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
'&.moving': {
|
|
95
|
+
'@apply hidden': {},
|
|
86
96
|
},
|
|
87
|
-
},
|
|
88
97
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
98
|
+
'& .menu-item-move-button': {
|
|
99
|
+
'@apply -translate-x-full text-gray-stroke absolute py-sm inset-y-0 my-auto': {},
|
|
100
|
+
|
|
101
|
+
svg: {
|
|
102
|
+
'@apply h-full': {},
|
|
103
|
+
},
|
|
104
|
+
'&-label': {
|
|
105
|
+
'@apply text-[#B65A06]': {},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
'.menu-item-error': {
|
|
110
|
+
'@apply text-error -ml-[5px] absolute -translate-x-full': {},
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
'&.moved-away': {
|
|
114
|
+
'@apply text-gray pointer-events-none': {},
|
|
115
|
+
|
|
116
|
+
'.menu-item-link': {
|
|
117
|
+
'@apply opacity-[78%] relative': {},
|
|
118
|
+
|
|
119
|
+
'&::before': {
|
|
120
|
+
'@apply absolute -translate-x-full -ml-sm block w-[10px] h-[10px] rounded-full bg-warning': {},
|
|
121
|
+
content: '""',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
'.menu-item-error, .menu-item-changes, .items': {
|
|
126
|
+
'@apply hidden': {},
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
'.menu-item-changes': {
|
|
130
|
+
'@apply bg-gray': {},
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
'.menu-item-move-button': {
|
|
134
|
+
'@apply hidden': {},
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
'.expand': {
|
|
138
|
+
'@apply opacity-[78%]': {},
|
|
139
|
+
path: {
|
|
140
|
+
'@apply fill-gray-stroke': {},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
'&.movedHere': {
|
|
146
|
+
"[draggable='true']": {
|
|
147
|
+
'@apply text-warning': {},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
'&.separator': {
|
|
152
|
+
'@apply bg-transparent relative': {},
|
|
153
|
+
|
|
154
|
+
'> div.wrapper, > .menu-item-link': {
|
|
155
|
+
'@apply h-[44px]': {},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
'&.new-item': {
|
|
160
|
+
'.wrapper': {
|
|
161
|
+
'@apply border-[3px] border-dashed border-[rgba(0,0,0,0.3)]': {},
|
|
162
|
+
boxSizing: 'border-box',
|
|
163
|
+
|
|
164
|
+
'.menu-item-move-button': {
|
|
165
|
+
'@apply -ml-[3px]': {},
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
'& .menu-item-changes': {
|
|
171
|
+
'@apply bg-warning rounded-full w-[24px] h-[24px] text-center text-sm font-bold text-white': {},
|
|
93
172
|
},
|
|
94
173
|
},
|
|
95
174
|
|
|
175
|
+
'&-separator': {
|
|
176
|
+
'@apply text-svartvik-200': {},
|
|
177
|
+
height: '1px',
|
|
178
|
+
width: '100%',
|
|
179
|
+
backgroundImage: `repeating-linear-gradient(0deg, currentColor, currentColor 19px, transparent 19px, transparent 38px, currentColor 38px), repeating-linear-gradient(90deg, currentColor, currentColor 19px, transparent 19px, transparent 38px, currentColor 38px), repeating-linear-gradient(180deg, currentColor, currentColor 19px, transparent 19px, transparent 38px, currentColor 38px), repeating-linear-gradient(270deg, currentColor, currentColor 19px, transparent 19px, transparent 38px, currentColor 38px)`,
|
|
180
|
+
backgroundSize: '2px 100%, 100% 2px, 2px 100% , 100% 2px',
|
|
181
|
+
backgroundPosition: '0 0, 0 0, 100% 0, 0 100%',
|
|
182
|
+
backgroundRepeat: 'no-repeat',
|
|
183
|
+
},
|
|
184
|
+
|
|
96
185
|
'&.lvl-0': {
|
|
97
|
-
'> .wrapper
|
|
98
|
-
'@apply
|
|
186
|
+
'&:first-child > .wrapper': {
|
|
187
|
+
'@apply border-t-0': {},
|
|
188
|
+
},
|
|
189
|
+
'> .wrapper': {
|
|
190
|
+
'@apply h-[64px] max-h-[64px] border border-svartvik-200': {},
|
|
99
191
|
|
|
100
|
-
'> .
|
|
101
|
-
'@apply
|
|
192
|
+
'> .menu-item-link': {
|
|
193
|
+
'@apply py-md': {},
|
|
102
194
|
paddingLeft: '3.2rem',
|
|
103
195
|
},
|
|
104
196
|
},
|
|
197
|
+
|
|
198
|
+
'.menu-item-link': {
|
|
199
|
+
'@apply h-[64px] max-h-[64px]': {},
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
'& + .menu-item > .wrapper': {
|
|
203
|
+
'@apply border-t-0': {},
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
'> .items': {
|
|
207
|
+
'@apply border-l border-r border-svartvik-200': {},
|
|
208
|
+
},
|
|
209
|
+
|
|
210
|
+
'&:last-child.open > .items': {
|
|
211
|
+
'@apply border-b border-svartvik-200': {},
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
'&.separator > .wrapper': {
|
|
215
|
+
'@apply border-l-0 border-r-0': {},
|
|
216
|
+
},
|
|
105
217
|
},
|
|
106
218
|
|
|
107
219
|
'&.lvl-1': {
|
|
108
|
-
'
|
|
220
|
+
'@apply bg-gray-lighter': {},
|
|
221
|
+
|
|
222
|
+
'> .wrapper, .menu-item-link': {
|
|
223
|
+
'@apply h-[56px] max-h-[56px]': {},
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
'&.new-item': {
|
|
227
|
+
'> .wrapper .menu-item-link': {
|
|
228
|
+
'@apply h-[50px] max-h-[50px]': {},
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
'&.open:not(.new-item) > .wrapper': {
|
|
233
|
+
'@apply border-b border-svartvik-200': {},
|
|
234
|
+
},
|
|
235
|
+
|
|
236
|
+
'> .wrapper > .menu-item-link': {
|
|
109
237
|
paddingLeft: '4.8rem',
|
|
110
238
|
},
|
|
111
239
|
},
|
|
112
240
|
|
|
113
241
|
'&.lvl-2': {
|
|
114
|
-
'
|
|
242
|
+
'.wrapper': {
|
|
243
|
+
'@apply bg-gray-middle h-[48px] max-h-[48px]': {},
|
|
244
|
+
|
|
245
|
+
'> .menu-item-link': {
|
|
246
|
+
'@apply h-[48px] max-h-[48px]': {},
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
'&.new-item, .new-item': {
|
|
251
|
+
'> .wrapper .menu-item-link': {
|
|
252
|
+
'@apply h-[42px] max-h-[42px]': {},
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
'> .wrapper > .menu-item-link': {
|
|
115
257
|
paddingLeft: '6.4rem',
|
|
116
258
|
},
|
|
117
259
|
},
|
|
118
260
|
|
|
119
261
|
'&.lvl-3': {
|
|
120
|
-
'> .wrapper > .
|
|
262
|
+
'> .wrapper > .menu-item-link': {
|
|
121
263
|
paddingLeft: '8rem',
|
|
122
264
|
},
|
|
123
265
|
},
|
|
124
266
|
|
|
125
267
|
'&.lvl-4': {
|
|
126
|
-
'
|
|
268
|
+
'.wrapper': {
|
|
269
|
+
'@apply bg-[#d4d4d4]': {},
|
|
270
|
+
},
|
|
271
|
+
'> .wrapper > .menu-item-link': {
|
|
127
272
|
paddingLeft: '9.6rem',
|
|
128
273
|
},
|
|
129
274
|
},
|
|
130
275
|
|
|
131
276
|
'&.lvl-5': {
|
|
132
|
-
'> .wrapper > .
|
|
277
|
+
'> .wrapper > .menu-item-link': {
|
|
133
278
|
paddingLeft: '11.2rem',
|
|
134
279
|
},
|
|
135
280
|
},
|
|
136
281
|
|
|
137
282
|
'&.lvl-6': {
|
|
138
|
-
'> .wrapper > .
|
|
283
|
+
'> .wrapper > .menu-item-link': {
|
|
139
284
|
paddingLeft: '12.8rem',
|
|
140
285
|
},
|
|
141
286
|
},
|
|
142
287
|
|
|
143
288
|
'&.lvl-7': {
|
|
144
|
-
'> .wrapper > .
|
|
289
|
+
'> .wrapper > .menu-item-link': {
|
|
145
290
|
paddingLeft: '14.4rem',
|
|
146
291
|
},
|
|
147
292
|
},
|
|
148
293
|
|
|
149
294
|
'&.lvl-8': {
|
|
150
|
-
'> .wrapper > .
|
|
295
|
+
'> .wrapper > .menu-item-link': {
|
|
151
296
|
paddingLeft: '16rem',
|
|
152
297
|
},
|
|
153
298
|
},
|
|
154
299
|
|
|
155
300
|
'&.lvl-9': {
|
|
156
|
-
'> .wrapper > .
|
|
301
|
+
'> .wrapper > .menu-item-link': {
|
|
157
302
|
paddingLeft: '17.6rem',
|
|
158
303
|
},
|
|
159
304
|
},
|
|
160
305
|
|
|
161
306
|
'&.lvl-10': {
|
|
162
|
-
'> .wrapper > .
|
|
307
|
+
'> .wrapper > .menu-item-link': {
|
|
163
308
|
paddingLeft: '19.2rem',
|
|
164
309
|
},
|
|
165
310
|
},
|
|
166
311
|
},
|
|
167
312
|
},
|
|
313
|
+
|
|
314
|
+
// Sparkle icon scss
|
|
315
|
+
'.sparkle-icon': {
|
|
316
|
+
'@apply inline-flex w-[25px] h-[18px] ml-md gap-[6px]': {},
|
|
317
|
+
},
|
|
318
|
+
'.sparkle-vert-lg': {
|
|
319
|
+
'@apply relative w-0 h-0 border-b-[10px] border-b-primary border-x-[4px] border-x-transparent border-t-[4px] border-t-transparent top-[-4px]':
|
|
320
|
+
{},
|
|
321
|
+
'&::after': {
|
|
322
|
+
'@apply content-[""] absolute left-[-4px] top-[12px] w-0 h-0 border-x-[4px] border-b-[4px] border-x-transparent border-b-transparent border-t-[10px] border-t-primary':
|
|
323
|
+
{},
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
'.sparkle-horizontal-lg': {
|
|
327
|
+
'@apply relative w-0 h-0 border-b-[10px] border-b-primary border-x-[4px] border-x-transparent border-t-[4px] border-t-transparent right-[-7px] top-[-10px] rotate-[90deg]':
|
|
328
|
+
{},
|
|
329
|
+
'&::after': {
|
|
330
|
+
'@apply content-[""] absolute left-[-4px] top-[10px] w-0 h-0 border-x-[4px] border-b-[4px] border-x-transparent border-b-transparent border-t-[10px] border-t-primary':
|
|
331
|
+
{},
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
'.sparkle-vert-sm': {
|
|
335
|
+
'@apply relative w-0 h-0 border-b-[6px] border-b-primary border-x-[2px] border-x-transparent border-t-[2px] border-t-transparent top-[-2px]':
|
|
336
|
+
{},
|
|
337
|
+
'&::after': {
|
|
338
|
+
'@apply content-[""] absolute left-[-1.8px] top-[6px] w-0 h-0 border-x-[2px] border-b-[2px] border-x-transparent border-b-transparent border-t-[6px] border-t-primary':
|
|
339
|
+
{},
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
'.sparkle-horizontal-sm': {
|
|
343
|
+
'@apply relative w-0 h-0 border-b-[6px] border-b-primary border-x-[2px] border-x-transparent border-t-[6px] border-t-transparent right-[-5.5px] top-[-8px] rotate-[90deg]':
|
|
344
|
+
{},
|
|
345
|
+
'&::after': {
|
|
346
|
+
'@apply content-[""] absolute left-[-2.2px] top-[5px] w-0 h-0 border-x-[2px] border-b-[6px] border-x-transparent border-b-transparent border-t-[6px] border-t-primary':
|
|
347
|
+
{},
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
'.twinkling-1': {
|
|
351
|
+
'@apply animate-pulse delay-75': {},
|
|
352
|
+
},
|
|
353
|
+
'.twinkling-2': {
|
|
354
|
+
'@apply animate-fast-pulse delay-75': {},
|
|
355
|
+
},
|
|
356
|
+
'.twinkling-3': {
|
|
357
|
+
'@apply animate-slow-pulse delay-1000': {},
|
|
358
|
+
},
|
|
359
|
+
|
|
360
|
+
'@keyframes slow-pulse': {
|
|
361
|
+
'75%': {
|
|
362
|
+
opacity: 0,
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
'@keyframes fast-pulse': {
|
|
366
|
+
'65%': {
|
|
367
|
+
opacity: 0,
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
|
|
371
|
+
'.animate-slow-pulse': {
|
|
372
|
+
animation: 'slow-pulse 2s cubic-bezier(0.1, 0.8, 0.2, 0.8) infinite',
|
|
373
|
+
},
|
|
374
|
+
|
|
375
|
+
'.animate-fast-pulse': {
|
|
376
|
+
animation: 'fast-pulse 1.5s cubic-bezier(0.4, 0.8, 0.8, 1) infinite',
|
|
377
|
+
},
|
|
168
378
|
});
|
package/src/components/tag.js
CHANGED
|
@@ -79,8 +79,7 @@ module.exports = Tag = (colors) => ({
|
|
|
79
79
|
...tagLight(colors),
|
|
80
80
|
|
|
81
81
|
'.tag-close-button': {
|
|
82
|
-
'@apply
|
|
83
|
-
{},
|
|
82
|
+
'@apply border-transparent cursor-base': {},
|
|
84
83
|
fontSize: '1em',
|
|
85
84
|
padding: '0.36em',
|
|
86
85
|
marginLeft: '0.25em',
|
package/src/index.js
CHANGED
|
@@ -10,6 +10,8 @@ const Breadcrumb = require('./components/breadcrumb');
|
|
|
10
10
|
const ButtonGroup = require('./components/button-group');
|
|
11
11
|
|
|
12
12
|
const Checkbox = require('./components/checkbox');
|
|
13
|
+
const ContextMenu = require('./components/context-menu');
|
|
14
|
+
const Dialog = require('./components/dialog');
|
|
13
15
|
const Dot = require('./components/dot');
|
|
14
16
|
const Forms = require('./components/forms');
|
|
15
17
|
const Calendar = require('./components/calendar');
|
|
@@ -51,6 +53,8 @@ const components = [
|
|
|
51
53
|
ButtonGroup,
|
|
52
54
|
Button,
|
|
53
55
|
Checkbox,
|
|
56
|
+
ContextMenu,
|
|
57
|
+
Dialog,
|
|
54
58
|
Dot,
|
|
55
59
|
Forms,
|
|
56
60
|
Calendar,
|