vanilla-jui 1.3.8 → 1.3.10

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 (77) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/index.umd.js +1 -1
  3. package/dist/style.css +1 -1
  4. package/package.json +3 -2
  5. package/src/components/accordion.js +373 -0
  6. package/src/components/components.js +0 -0
  7. package/src/components/drop.js +437 -0
  8. package/src/components/flow.js +1133 -0
  9. package/src/components/form.js +585 -0
  10. package/src/components/icons.js +83 -0
  11. package/src/components/menu.js +422 -0
  12. package/src/components/modal.js +1174 -0
  13. package/src/components/offcanvas.js +332 -0
  14. package/src/components/pagination.js +536 -0
  15. package/src/components/parabola.js +295 -0
  16. package/src/components/sticky.js +271 -0
  17. package/src/components/swiper.js +1123 -0
  18. package/src/components/tabs.js +746 -0
  19. package/src/components/theme.js +353 -0
  20. package/src/components/toast.js +329 -0
  21. package/src/components/toc.js +226 -0
  22. package/src/components/tooltip.js +86 -0
  23. package/src/components/validator.js +586 -0
  24. package/src/core/Component.js +248 -0
  25. package/src/css/accordion.css +72 -0
  26. package/src/css/animation.css +177 -0
  27. package/src/css/avatar.css +62 -0
  28. package/src/css/badge.css +66 -0
  29. package/src/css/breadcrumb.css +106 -0
  30. package/src/css/button.css +296 -0
  31. package/src/css/card.css +151 -0
  32. package/src/css/color.css +1176 -0
  33. package/src/css/color_p3.css +1184 -0
  34. package/src/css/components.css +26 -0
  35. package/src/css/content.css +716 -0
  36. package/src/css/divider.css +9 -0
  37. package/src/css/drop.css +28 -0
  38. package/src/css/flow.css +86 -0
  39. package/src/css/font.css +23 -0
  40. package/src/css/form.css +919 -0
  41. package/src/css/gradient.css +211 -0
  42. package/src/css/icon.css +63 -0
  43. package/src/css/index.css +12 -0
  44. package/src/css/layout.css +782 -0
  45. package/src/css/loading.css +38 -0
  46. package/src/css/menu.css +564 -0
  47. package/src/css/modal.css +111 -0
  48. package/src/css/offcanvas.css +104 -0
  49. package/src/css/pagination.css +25 -0
  50. package/src/css/popup.css +69 -0
  51. package/src/css/skeleton.css +76 -0
  52. package/src/css/status.css +56 -0
  53. package/src/css/swiper.css +160 -0
  54. package/src/css/table.css +52 -0
  55. package/src/css/tabs.css +95 -0
  56. package/src/css/tag.css +98 -0
  57. package/src/css/theme-palette.css +59 -0
  58. package/src/css/tip.css +84 -0
  59. package/src/css/toast.css +154 -0
  60. package/src/css/toast.min.css +1 -0
  61. package/src/css/toc.css +38 -0
  62. package/src/css/tokens.css +1324 -0
  63. package/src/css/toolbar.css +115 -0
  64. package/src/css/tooltip.css +19 -0
  65. package/src/icons/index.js +30 -0
  66. package/src/index.js +45 -0
  67. package/src/locales/index.js +45 -0
  68. package/src/locales/index.min.js +1 -0
  69. package/src/utilities/browser.js +111 -0
  70. package/src/utilities/cache.js +159 -0
  71. package/src/utilities/core.js +502 -0
  72. package/src/utilities/debug.js +103 -0
  73. package/src/utilities/dom.js +313 -0
  74. package/src/utilities/events.js +69 -0
  75. package/src/utilities/http.js +30 -0
  76. package/src/utilities/legacy-dom.js +179 -0
  77. package/src/utilities/storage.js +46 -0
@@ -0,0 +1,38 @@
1
+ @layer components {
2
+ .j-loading {
3
+ position: absolute;
4
+ top: 0;
5
+ left: 0;
6
+ width: 100%;
7
+ height: 100%;
8
+ background-color: var(--loading-background, var(--ui-bg));
9
+ display: none;
10
+ justify-content: center;
11
+ align-items: center;
12
+ backdrop-filter: var(--loading-backdrop-filter, blur(2px));
13
+ }
14
+
15
+ .j-loading.is-active {
16
+ display: flex;
17
+ z-index: var(--loading-index, inherit);
18
+ }
19
+
20
+ .loading-spinner {
21
+ width: var(--loading-spinner-size, 3rem);
22
+ height: var(--loading-spinner-size, 3rem);
23
+ /* border: var(--loading-spinner-width, 4px) solid var(--loading-spinner-background, var(--tone-fg)); */
24
+ border: var(--loading-spinner-width, 4px) solid var(--loading-spinner-background, var(--tone-soft));
25
+ border-top: var(--loading-spinner-width, 4px) solid var(--loading-spinner-color, var(--tone-solid));
26
+ border-radius: 50%;
27
+ animation: animate-spin 1s linear infinite;
28
+ }
29
+
30
+ .j-loading.is-bold .loading-spinner {
31
+ border: none;
32
+ aspect-ratio: 1;
33
+ background:
34
+ radial-gradient(farthest-side, var(--tone-solid) 94%, #0000) top/8px 8px no-repeat,
35
+ conic-gradient(#0000 30%, var(--tone-solid));
36
+ mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
37
+ }
38
+ }
@@ -0,0 +1,564 @@
1
+ @layer menu {
2
+ .j-menu {
3
+ width: 100%;
4
+ white-space: nowrap;
5
+ overflow-y: hidden;
6
+ overflow-x: auto;
7
+ -webkit-overflow-scrolling: touch;
8
+ scroll-behavior: smooth;
9
+ -ms-overflow-style: none;
10
+ scrollbar-width: none;
11
+ user-select: none;
12
+ }
13
+
14
+ .j-menu::-webkit-scrollbar {
15
+ display: none;
16
+ }
17
+
18
+ .j-menu ol,
19
+ .j-menu ul,
20
+ .j-menu ol li,
21
+ .j-menu ul li {
22
+ list-style: none;
23
+ margin: 0;
24
+ padding: 0;
25
+ }
26
+
27
+ .j-menu .menu {
28
+ display: flex;
29
+ align-items: center;
30
+ }
31
+
32
+ .j-menu .menu .menu-item {
33
+ flex-shrink: 0;
34
+ }
35
+
36
+ .j-menu .menu .menu-item:not(:has(a)) {
37
+ font-size: var(--font-size-md);
38
+ font-weight: var(--font-normal);
39
+ padding: var(--button-padding, 0.5rem 1rem);
40
+ height: var(--button-height, var(--el-height-md));
41
+ line-height: var(--line-height);
42
+ text-decoration: underline;
43
+ text-decoration-style: wavy;
44
+ text-decoration-color: var(--state-danger);
45
+ text-underline-offset: 4px;
46
+ position: relative;
47
+ cursor: help;
48
+ }
49
+
50
+ .j-menu .menu .menu-item:has(a) a {
51
+ display: flex;
52
+ justify-content: center;
53
+ align-items: center;
54
+ flex-wrap: nowrap;
55
+ gap: calc(var(--space) * 1);
56
+ white-space: nowrap;
57
+ cursor: pointer;
58
+ appearance: button;
59
+ touch-action: manipulation;
60
+ color: currentColor;
61
+ background-color: inherit;
62
+ font-weight: var(--font-medium);
63
+ font-size: var(--font-size-md);
64
+ text-decoration: none;
65
+ }
66
+
67
+ .j-menu .menu .menu-item:has(a) a .el-icon,
68
+ .j-menu .menu .menu-item:has(a) a svg {
69
+ width: var(--font-size-lg);
70
+ height: var(--font-size-lg);
71
+ }
72
+
73
+ .j-menu .menu .menu-item.menu-item-has-children>a {
74
+ pointer-events: none;
75
+ }
76
+
77
+ .j-menu .menu .menu-item.menu-item-has-children>a::after {
78
+ content: '';
79
+ width: 0;
80
+ height: 0;
81
+ margin-left: 4px;
82
+ vertical-align: middle;
83
+ border-left: 4px solid transparent;
84
+ border-right: 4px solid transparent;
85
+ border-top: 5px solid currentColor;
86
+ transition: transform 0.2s ease-in-out;
87
+ }
88
+
89
+ .j-menu .menu .menu-item.menu-item-has-children:hover>a::after {
90
+ transform: rotate(180deg);
91
+ }
92
+
93
+ /* menu type */
94
+ .j-menu .menu .menu-item:has(a) a {
95
+ padding: var(--button-padding, 0.5rem 1rem);
96
+ height: var(--button-height, var(--el-height-md));
97
+ line-height: var(--line-height);
98
+ border-width: var(--border-width, 1px);
99
+ border-style: var(--border-style, solid);
100
+ border-color: var(--button-border-color, transparent);
101
+ border-radius: var(--button-border-radius, var(--radius-md));
102
+ }
103
+
104
+ /* submenu */
105
+ .j-menu .menu .menu-item .sub-menu {
106
+ display: none;
107
+ position: absolute;
108
+ transform: translateY(1px);
109
+ padding: calc(var(--space) * 2) 0;
110
+ background-color: var(--ui-surface-subtle);
111
+ border: 1px solid var(--ui-border);
112
+ border-radius: var(--radius-md);
113
+ min-width: 120px;
114
+ max-width: 240px;
115
+ box-shadow: var(--shadow-sm);
116
+ }
117
+
118
+ .j-menu .menu .menu-item .sub-menu .menu-item a {
119
+ justify-content: flex-start;
120
+ border-radius: 0;
121
+ flex-wrap: wrap;
122
+ white-space: normal;
123
+ height: auto;
124
+ }
125
+
126
+ .j-menu .menu .menu-item.menu-item-has-children:hover .sub-menu {
127
+ display: block;
128
+ z-index: var(--z-index-submenu);
129
+ }
130
+
131
+ .j-menu .menu .menu-item .sub-menu .menu-item:hover a {
132
+ background-color: var(--tone-solid);
133
+ color: var(--tone-fg);
134
+ outline: 1px solid var(--tone-solid);
135
+ }
136
+
137
+ /* menu status */
138
+ .j-menu .menu .menu-item a:hover,
139
+ .j-menu .menu .menu-item.menu-item-has-children:hover>a {
140
+ text-decoration: none;
141
+ background-color: var(--tone-soft);
142
+ color: var(--tone-text);
143
+ }
144
+
145
+ .j-menu .menu>.menu-item.current-menu-item>a {
146
+ color: var(--tone-solid);
147
+ }
148
+
149
+ .j-menu .menu .menu-item.current-menu-item>.sub-menu>.menu-item:not(.current-menu-item) a {
150
+ color: inherit;
151
+ }
152
+
153
+ .j-menu .menu-item.current-menu-item>.sub-menu>.menu-item:not(.current-menu-item):hover a {
154
+ color: var(--tone-fg);
155
+ }
156
+
157
+ .j-menu .menu-item.menu-item-has-children:hover>.sub-menu>.menu-item.current-menu-item a {
158
+ color: var(--tone-fg);
159
+ background-color: var(--tone-solid);
160
+ outline: 1px solid var(--tone-solid);
161
+ }
162
+
163
+ /* error status */
164
+ .j-menu .menu .menu-item:not(:has(a)):hover,
165
+ .j-mobile-menu .menu .menu-item:not(:has(a)):hover {
166
+ background-color: var(--state-danger-subtle);
167
+ border-radius: var(--space);
168
+ }
169
+
170
+ .j-menu .menu .menu-item:not(:has(a)):hover::after,
171
+ .j-mobile-menu .menu .menu-item:not(:has(a)):hover::after {
172
+ content: 'Error';
173
+ position: absolute;
174
+ top: 0;
175
+ right: 0;
176
+ background-color: var(--state-danger);
177
+ color: var(--state-danger-fg);
178
+ font-size: var(--font-size-sm);
179
+ padding: 0 var(--space);
180
+ border-radius: var(--space);
181
+ }
182
+
183
+ /* menu extensions */
184
+ /* list card menu */
185
+ .j-menu .menu-item.menu-item-has-children.list-card-menu:hover>.sub-menu {
186
+ min-width: 240px;
187
+ max-width: 360px;
188
+ width: auto;
189
+ display: grid;
190
+ grid-template-columns: repeat(2, 1fr);
191
+ transform: translateX(-20%) translateY(1px);
192
+ }
193
+
194
+ .j-menu .menu-item.list-card-menu>.sub-menu>.menu-item>a {
195
+ overflow: hidden;
196
+ display: -webkit-box;
197
+ -webkit-box-orient: vertical;
198
+ -webkit-line-clamp: 1;
199
+ line-clamp: 1;
200
+ padding: calc(var(--space) * 1.25) calc(var(--space) * 2.5);
201
+ line-height: 1.75;
202
+ }
203
+
204
+ /* advanced card menu */
205
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu {
206
+ display: grid;
207
+ grid-template-columns: repeat(6, 1fr);
208
+ grid-template-rows: repeat(6, 1fr);
209
+ grid-column-gap: 0px;
210
+ grid-row-gap: 0px;
211
+ min-width: 400px;
212
+ max-width: 600px;
213
+ transform: translateX(-33.33%) translateY(1px);
214
+ }
215
+
216
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu img {
217
+ margin: 0;
218
+ }
219
+
220
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(1) {
221
+ grid-area: 1 / 1 / 2 / 3;
222
+ }
223
+
224
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(2) {
225
+ grid-area: 1 / 3 / 4 / 5;
226
+ }
227
+
228
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(3) {
229
+ grid-area: 1 / 5 / 4 / 7;
230
+ }
231
+
232
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(4) {
233
+ grid-area: 2 / 1 / 3 / 3;
234
+ }
235
+
236
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(5) {
237
+ grid-area: 3 / 1 / 4 / 3;
238
+ }
239
+
240
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(6) {
241
+ grid-area: 4 / 1 / 5 / 3;
242
+ }
243
+
244
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(7) {
245
+ grid-area: 4 / 3 / 7 / 5;
246
+ }
247
+
248
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(8) {
249
+ grid-area: 4 / 5 / 7 / 7;
250
+ }
251
+
252
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(9) {
253
+ grid-area: 5 / 1 / 6 / 3;
254
+ }
255
+
256
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(10) {
257
+ grid-area: 6 / 1 / 7 / 3;
258
+ }
259
+
260
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(2) a,
261
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(3) a,
262
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(7) a,
263
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(8) a {
264
+ padding: 0;
265
+ }
266
+
267
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(2) a:hover,
268
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(3) a:hover,
269
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(7) a:hover,
270
+ .j-menu .menu-item.menu-item-has-children.advanced-card-menu:hover>.sub-menu>.menu-item:nth-child(8) a:hover {
271
+ background-color: transparent;
272
+ outline-color: transparent;
273
+ }
274
+
275
+ /* mobile menu */
276
+ .j-mobile-menu {
277
+ width: 100%;
278
+ white-space: nowrap;
279
+ overflow-x: hidden;
280
+ overflow-y: auto;
281
+ -webkit-overflow-scrolling: touch;
282
+ scroll-behavior: smooth;
283
+ -ms-overflow-style: none;
284
+ scrollbar-width: none;
285
+ user-select: none;
286
+ background-color: var(--ui-bg);
287
+ }
288
+
289
+ .j-mobile-menu::-webkit-scrollbar {
290
+ display: none;
291
+ }
292
+
293
+ .j-mobile-menu ol,
294
+ .j-mobile-menu ul,
295
+ .j-mobile-menu ol li,
296
+ .j-mobile-menu ul li {
297
+ list-style: none;
298
+ margin: 0;
299
+ padding: 0;
300
+ }
301
+
302
+ .j-mobile-menu .menu {
303
+ display: flex;
304
+ flex-direction: column;
305
+ align-items: flex-start;
306
+ position: relative;
307
+ }
308
+
309
+ .j-mobile-menu .menu .menu-item {
310
+ width: 100%;
311
+ flex-shrink: 0;
312
+ font-size: var(--font-size-md);
313
+ font-weight: var(--font-medium);
314
+ }
315
+
316
+ .j-mobile-menu .menu .menu-item:not(:has(a)) {
317
+ padding: var(--button-padding, 0.5rem 1rem);
318
+ height: var(--button-height, var(--el-height-xl));
319
+ text-decoration: underline;
320
+ text-decoration-style: wavy;
321
+ text-decoration-color: var(--state-danger);
322
+ text-underline-offset: 4px;
323
+ position: relative;
324
+ cursor: help;
325
+ }
326
+
327
+ .j-mobile-menu .menu .menu-item:has(a) a {
328
+ display: flex;
329
+ justify-content: flex-start;
330
+ align-items: center;
331
+ flex-wrap: wrap;
332
+ gap: calc(var(--space) * 2);
333
+ white-space: normal;
334
+ appearance: button;
335
+ touch-action: manipulation;
336
+ color: currentColor;
337
+ min-height: var(--el-height-xl);
338
+ padding: calc(var(--space) * 2) calc(var(--space) * 4);
339
+ line-height: var(--line-height-paragraph);
340
+ position: relative;
341
+ text-decoration: none;
342
+ }
343
+
344
+ .j-mobile-menu .menu .menu-item:has(a) a .menu-text {
345
+ line-height: var(--line-height-paragraph);
346
+ }
347
+
348
+ .j-mobile-menu .menu .menu-item:has(a) a .el-icon,
349
+ .j-mobile-menu .menu .menu-item:has(a) a svg {
350
+ width: var(--font-size-lg);
351
+ height: var(--font-size-lg);
352
+ }
353
+
354
+ .j-mobile-menu .menu .menu-item.menu-item-has-children>a::after {
355
+ content: '';
356
+ width: 0;
357
+ height: 0;
358
+ vertical-align: middle;
359
+ position: absolute;
360
+ right: 1rem;
361
+ margin: 0;
362
+ border-left: 5px solid currentColor;
363
+ border-bottom: 4px solid transparent;
364
+ border-top: 4px solid transparent;
365
+ }
366
+
367
+ .j-mobile-menu .menu .menu-item .sub-menu {
368
+ display: block;
369
+ position: absolute;
370
+ top: 0;
371
+ left: 0;
372
+ width: 100%;
373
+ visibility: hidden;
374
+ opacity: 0;
375
+ transform: translateX(100%);
376
+ transition:
377
+ opacity 0.3s ease-in-out,
378
+ visibility 0.3s ease-in-out;
379
+
380
+ max-width: 100%;
381
+ background-color: var(--ui-bg);
382
+ z-index: -1;
383
+ }
384
+
385
+ .j-mobile-menu>.menu>.menu-item:hover>a,
386
+ .j-mobile-menu>.menu>.menu-item.menu-item-has-children .sub-menu>.menu-item:hover>a {
387
+ background-color: var(--tone-solid);
388
+ color: var(--tone-fg);
389
+ text-decoration: none;
390
+ }
391
+
392
+ .j-mobile-menu .menu .menu-item.menu-item-has-children.is-active>.sub-menu {
393
+ visibility: visible;
394
+ opacity: 1;
395
+ transform: translateX(0);
396
+ height: 100%;
397
+ z-index: var(--z-index-submenu);
398
+ }
399
+
400
+ /* bottom menu */
401
+ .j-bottom-menu {
402
+ width: 100%;
403
+ white-space: nowrap;
404
+ user-select: none;
405
+ position: fixed;
406
+ bottom: 0;
407
+ left: 0;
408
+ }
409
+
410
+ .j-bottom-menu ol,
411
+ .j-bottom-menu ul,
412
+ .j-bottom-menu ol li,
413
+ .j-bottom-menu ul li {
414
+ list-style: none;
415
+ margin: 0;
416
+ padding: 0;
417
+ }
418
+
419
+ .j-bottom-menu .menu {
420
+ position: relative;
421
+ display: flex;
422
+ justify-content: space-between;
423
+ align-items: center;
424
+ gap: 1px;
425
+ border-top: 1px solid var(--ui-border-subtle);
426
+ background: linear-gradient(to bottom,
427
+ var(--ui-surface-subtle) 20%,
428
+ var(--ui-bg-muted) 40%,
429
+ var(--ui-surface-muted) 50%,
430
+ var(--ui-bg-muted) 60%,
431
+ var(--ui-surface-subtle) 80%);
432
+ font-size: var(--font-size-md);
433
+ }
434
+
435
+ .j-bottom-menu .menu .menu-item {
436
+ width: 100%;
437
+ display: flex;
438
+ justify-content: center;
439
+ align-items: center;
440
+ background-color: var(--ui-surface-subtle);
441
+ }
442
+
443
+ .j-bottom-menu .menu .menu-item>a {
444
+ width: 100%;
445
+ text-align: center;
446
+ text-decoration: none;
447
+ height: var(--el-height-xl);
448
+ display: flex;
449
+ justify-content: center;
450
+ align-items: center;
451
+ gap: calc(var(--space) * 1);
452
+ color: var(--ui-fg);
453
+ padding: calc(var(--space) * 1.5);
454
+ }
455
+
456
+ .j-bottom-menu .menu .menu-item:has(a) a .el-icon,
457
+ .j-bottom-menu .menu .menu-item:has(a) a svg {
458
+ width: var(--font-size-lg);
459
+ height: var(--font-size-lg);
460
+ }
461
+
462
+ .j-bottom-menu>.menu>.menu-item.menu-item-has-children>a::after {
463
+ content: '☰';
464
+ font-size: var(--font-size-sm);
465
+ }
466
+
467
+ .j-bottom-menu .menu .menu-item.current-menu-parent>a,
468
+ .j-bottom-menu .menu .menu-item.current-menu-item>a,
469
+ .j-bottom-menu .menu .menu-item.menu-item-has-children.is-active>a {
470
+ background: var(--tone-subtle);
471
+ }
472
+
473
+ .j-bottom-menu .menu .menu-item.menu-item-has-children>.sub-menu {
474
+ opacity: 0;
475
+ visibility: hidden;
476
+ background: linear-gradient(to right,
477
+ var(--ui-surface-subtle) 20%,
478
+ var(--ui-bg-muted) 40%,
479
+ var(--ui-surface-muted) 50%,
480
+ var(--ui-bg-muted) 60%,
481
+ var(--ui-surface-subtle) 80%);
482
+ border: 1px solid var(--ui-border-subtle);
483
+ display: flex;
484
+ flex-direction: column;
485
+ align-items: center;
486
+ justify-content: center;
487
+ gap: 1px;
488
+ min-width: calc(var(--space) * 30);
489
+ max-width: calc(var(--space) * 76);
490
+ position: absolute;
491
+ left: 50%;
492
+ transform: translateX(-50%);
493
+ bottom: calc(100% + var(--space));
494
+ transition:
495
+ visibility 0.3s ease-in-out,
496
+ opacity 0.3s ease-in-out;
497
+ }
498
+
499
+ .j-bottom-menu .menu .menu-item.menu-item-has-children.is-active>.sub-menu {
500
+ opacity: 1;
501
+ visibility: visible;
502
+ }
503
+
504
+ .j-bottom-menu .menu .menu-item.menu-item-has-children>.sub-menu>.menu-item {
505
+ background-color: var(--ui-surface-subtle);
506
+ white-space: normal;
507
+ }
508
+
509
+ .j-bottom-menu .menu .menu-item.menu-item-has-children>.sub-menu>.menu-item>a {
510
+ padding: calc(var(--space) * 1.5) calc(var(--space) * 3);
511
+ }
512
+
513
+ /* drop menu */
514
+ .drop-menu {
515
+ min-width: 100px;
516
+ max-width: 200px;
517
+ padding: calc(var(--space) * 2);
518
+ font-size: var(--font-size-md);
519
+ background-color: var(--ui-surface-subtle);
520
+ border-radius: var(--radius-sm);
521
+ }
522
+
523
+ .drop-menu ul,
524
+ .drop-menu ol,
525
+ .drop-menu ul li,
526
+ .drop-menu ol li {
527
+ list-style: none;
528
+ margin: 0;
529
+ padding: 0;
530
+ }
531
+
532
+ .drop-menu .menu-item a {
533
+ display: flex;
534
+ align-items: center;
535
+ gap: var(--drop-menu-item-gap, calc(var(--space) * 2));
536
+ width: 100%;
537
+ padding: calc(var(--space) * 1) calc(var(--space) * 2);
538
+ text-decoration: none;
539
+ color: var(--ui-fg-muted);
540
+ border-radius: var(--radius-md);
541
+ user-select: none;
542
+ }
543
+
544
+ .drop-menu .menu-item a .menu-text {
545
+ flex-grow: 1;
546
+ }
547
+
548
+ .drop-menu .menu-item a:hover {
549
+ background-color: var(--tone-solid);
550
+ color: var(--tone-fg);
551
+ }
552
+
553
+ .drop-menu .el-icon,
554
+ .drop-menu svg {
555
+ width: var(--drop-menu-icon-size, calc(var(--space) * 4));
556
+ height: var(--drop-menu-icon-size, calc(var(--space) * 4));
557
+ }
558
+
559
+ .drop-menu .menu-item.menu-heading {
560
+ padding: var(--menu-item-heading, calc(var(--space) * 1) calc(var(--space) * 2));
561
+ color: var(--ui-fg-soft);
562
+ font-size: var(--font-size-sm);
563
+ }
564
+ }
@@ -0,0 +1,111 @@
1
+ @layer components {
2
+ .j-modal {
3
+ --modal-border: var(--modal-border-width, 1px) var(--modal-border-style, solid) var(--modal-border-color, transparent);
4
+
5
+ --modal-header-padding: calc(var(--space) * 4) calc(var(--space) * 4) 0;
6
+ --modal-header-gap: var(--space);
7
+ --modal-title-font-size: var(--font-size-md);
8
+ --modal-close-icon-size: var(--el-height-3xs);
9
+ --modal-close-font-size: var(--font-size-lg);
10
+ --modal-close-color: var(--ui-fg-muted);
11
+
12
+ --modal-body-padding: calc(var(--space) * 4);
13
+ --modal-body-line-height: var(--line-height-paragraph);
14
+
15
+ --modal-footer-padding: 0 calc(var(--space) * 4) calc(var(--space) * 4);
16
+ --modal-footer-gap: calc(var(--space) * 2);
17
+
18
+ background: var(--modal-background, var(--ui-bg));
19
+ border: var(--modal-border, 1px solid var(--ui-border));
20
+ border-radius: var(--modal-border-radius, var(--radius-md));
21
+ box-shadow: var(--modal-box-shadow, var(--shadow-md));
22
+ min-width: var(--modal-min-width, 300px);
23
+ max-width: var(--modal-max-width, 500px);
24
+ max-height: var(--modal-max-height, 90vh);
25
+ overflow: hidden;
26
+ animation: animate-fade-in 0.35s ease-in-out;
27
+ display: flex;
28
+ flex-direction: column;
29
+ position: relative;
30
+ }
31
+
32
+ .j-popup-layout:has(.is-fullscreen) {
33
+ padding: 0;
34
+ }
35
+
36
+ .j-modal.is-fullscreen {
37
+ width: 100%;
38
+ height: 100%;
39
+ max-width: none;
40
+ max-height: none;
41
+ /* --modal-border-color: var(--ui-border-subtle); */
42
+ }
43
+
44
+ .j-modal .modal-header {
45
+ padding: var(--modal-header-padding);
46
+ border-bottom: var(--modal-border);
47
+ display: flex;
48
+ justify-content: space-between;
49
+ align-items: center;
50
+ gap: var(--modal-header-gap);
51
+ }
52
+
53
+ .j-modal .modal-header .modal-title {
54
+ margin: 0;
55
+ font-size: var(--modal-title-font-size);
56
+ font-weight: 500;
57
+ }
58
+
59
+ .j-modal .modal-header .modal-close {
60
+ display: inline-flex;
61
+ align-items: center;
62
+ justify-content: center;
63
+ width: var(--modal-close-icon-size);
64
+ height: var(--modal-close-icon-size);
65
+ font-size: var(--modal-close-font-size);
66
+ color: var(--modal-close-color);
67
+ text-align: center;
68
+ }
69
+
70
+ .j-modal .modal-header .modal-close:focus-within {
71
+ outline: 2px solid var(--tone-solid);
72
+ color: var(--tone-solid);
73
+ }
74
+
75
+ .j-modal .modal-header .modal-close:hover {
76
+ color: var(--tone-solid);
77
+ background-color: var(--tone-subtle);
78
+ }
79
+
80
+ .j-modal .modal-body {
81
+ padding: var(--modal-body-padding);
82
+ overflow-y: auto;
83
+ overflow-wrap: break-word;
84
+ flex: 1;
85
+ }
86
+
87
+ .j-modal .modal-body p {
88
+ margin: 0;
89
+ line-height: var(--modal-body-line-height);
90
+ }
91
+
92
+ .j-modal.is-fullscreen .modal-header {
93
+ --modal-header-padding: calc(var(--space) * 4);
94
+ }
95
+
96
+ .j-modal.is-fullscreen .modal-body {
97
+ --modal-body-padding: 0;
98
+ }
99
+
100
+ .j-modal.is-fullscreen .modal-footer {
101
+ --modal-footer-padding: calc(var(--space) * 4);
102
+ }
103
+
104
+ .j-modal .modal-footer {
105
+ padding: var(--modal-footer-padding);
106
+ border-top: var(--modal-footer-border, var(--modal-border));
107
+ display: flex;
108
+ justify-content: flex-end;
109
+ gap: var(--modal-footer-gap);
110
+ }
111
+ }