vanilla-jui 1.5.34 → 1.5.36

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 (62) 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 +7 -4
  5. package/src/css/accordion.css +3 -73
  6. package/src/css/animation.css +143 -0
  7. package/src/css/avatar.css +4 -13
  8. package/src/css/badge.css +4 -11
  9. package/src/css/breadcrumb.css +4 -11
  10. package/src/css/button.css +6 -64
  11. package/src/css/card.css +25 -23
  12. package/src/css/components.css +4 -3
  13. package/src/css/drop.css +0 -10
  14. package/src/css/editor.css +84 -68
  15. package/src/css/flow.css +2 -3
  16. package/src/css/form.css +45 -178
  17. package/src/css/index.css +2 -2
  18. package/src/css/layout.css +32 -0
  19. package/src/css/loading.css +230 -1
  20. package/src/css/menu.css +16 -5
  21. package/src/css/modal.css +0 -29
  22. package/src/css/offcanvas.css +0 -35
  23. package/src/css/pagination.css +0 -10
  24. package/src/css/popup.css +0 -3
  25. package/src/css/skeleton.css +14 -8
  26. package/src/css/status.css +6 -1
  27. package/src/css/swiper.css +7 -74
  28. package/src/css/table.css +4 -48
  29. package/src/css/tabs.css +0 -7
  30. package/src/css/theme-palette.css +6 -40
  31. package/src/css/themes/default/accordion.css +84 -7
  32. package/src/css/themes/default/avatar.css +15 -0
  33. package/src/css/themes/default/badge.css +24 -3
  34. package/src/css/themes/default/breadcrumb.css +18 -0
  35. package/src/css/themes/default/button.css +124 -26
  36. package/src/css/themes/default/drop.css +10 -8
  37. package/src/css/themes/default/editor.css +24 -8
  38. package/src/css/themes/default/form.css +170 -0
  39. package/src/css/themes/default/index.css +5 -2
  40. package/src/css/themes/default/loading.css +0 -1
  41. package/src/css/themes/default/menu.css +0 -3
  42. package/src/css/themes/default/modal.css +39 -17
  43. package/src/css/themes/default/offcanvas.css +40 -3
  44. package/src/css/themes/default/pagination.css +11 -4
  45. package/src/css/themes/default/popup.css +4 -3
  46. package/src/css/themes/default/swiper.css +83 -19
  47. package/src/css/themes/default/table.css +22 -14
  48. package/src/css/themes/default/tabs.css +16 -6
  49. package/src/css/themes/default/theme-palette.css +33 -8
  50. package/src/css/themes/default/tip.css +27 -17
  51. package/src/css/themes/default/toast.css +30 -18
  52. package/src/css/themes/default/toc.css +25 -0
  53. package/src/css/themes/default/toolbar.css +54 -9
  54. package/src/css/themes/default/tooltip.css +14 -7
  55. package/src/css/themes/default/tree.css +75 -0
  56. package/src/css/tip.css +2 -27
  57. package/src/css/toast.css +5 -21
  58. package/src/css/toc.css +0 -24
  59. package/src/css/tokens.css +52 -17
  60. package/src/css/toolbar.css +2 -48
  61. package/src/css/tooltip.css +2 -10
  62. package/src/css/tree.css +49 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vanilla-jui",
3
- "version": "1.5.34",
3
+ "version": "1.5.36",
4
4
  "private": false,
5
5
  "description": "A lightweight, reactive, and fully customizable vanilla JS UI library.",
6
6
  "keywords": [
@@ -66,10 +66,10 @@
66
66
  "vanilla-signal-i18n": "^1.1.2"
67
67
  },
68
68
  "devDependencies": {
69
- "@tsdown/css": "latest",
69
+ "@tsdown/css": "^0.22.14",
70
70
  "jsdom": "^30.0.1",
71
- "typescript": "latest",
72
- "vite-plus": "latest"
71
+ "typescript": "^7.0.2",
72
+ "vite-plus": "^0.3.0"
73
73
  },
74
74
  "registry": {
75
75
  "type": "git",
@@ -81,5 +81,8 @@
81
81
  "version": "12.0.2",
82
82
  "onFail": "download"
83
83
  }
84
+ },
85
+ "allowScripts": {
86
+ "fsevents@2.3.3": true
84
87
  }
85
88
  }
@@ -12,34 +12,10 @@
12
12
  display: flex;
13
13
  align-items: center;
14
14
  cursor: pointer;
15
+ -webkit-user-select: none;
16
+ -moz-user-select: none;
17
+ -ms-user-select: none;
15
18
  user-select: none;
16
-
17
- padding: var(--accordion-header-padding);
18
- margin: var(--accordion-header-margin);
19
- font-weight: var(--accordion-font-weight);
20
- font-size: var(--accordion-header-font-size);
21
- background: var(--accordion-bg);
22
- border-bottom: var(--accordion-border);
23
- }
24
-
25
- .j-accordion[data-direction='horizontal'] .accordion-header {
26
- gap: var(--space);
27
- border-bottom: 0;
28
- border-right: var(--accordion-border);
29
- }
30
-
31
- .j-accordion[data-direction='horizontal']
32
- .accordion-header[aria-expanded='true'] {
33
- border-right: 0;
34
- }
35
-
36
- .j-accordion .accordion-header[aria-expanded='false']:hover {
37
- --accordion-bg: var(--ui-bg-subtle);
38
- }
39
-
40
- .j-accordion[data-direction='horizontal']
41
- .accordion-header[aria-expanded='false']:nth-last-child(2) {
42
- border-right: 0;
43
19
  }
44
20
 
45
21
  .j-accordion .accordion-header .header-title {
@@ -47,64 +23,18 @@
47
23
  text-align: left;
48
24
  }
49
25
 
50
- .j-accordion .accordion-header[aria-expanded='true'] .header-title {
51
- --accordion-font-weight: var(--font-bold);
52
- }
53
-
54
26
  .j-accordion .accordion-header .header-arrow {
55
27
  display: flex;
56
28
  justify-content: center;
57
29
  align-items: center;
58
30
  transition: transform 0.3s ease-out;
59
- transform: var(--accordion-icon-transform);
60
- }
61
-
62
- .j-accordion[data-direction='horizontal'] .accordion-header .header-arrow {
63
- --accordion-icon-transform: rotate(-90deg);
64
- }
65
-
66
- .j-accordion .accordion-header[aria-expanded='true'] .header-arrow {
67
- --accordion-icon-transform: rotate(180deg);
68
- }
69
-
70
- .j-accordion[data-direction='horizontal']
71
- .accordion-header[aria-expanded='true']
72
- .header-arrow {
73
- --accordion-icon-transform: rotate(90deg);
74
31
  }
75
32
 
76
33
  .j-accordion .accordion-panel {
77
- margin: var(--accordion-panel-margin);
78
- font-size: var(--accordion-font-size);
79
- border-bottom: var(--accordion-border);
80
34
  position: relative;
81
35
  }
82
36
 
83
- .j-accordion .accordion-panel[aria-hidden='false'] {
84
- min-height: 2rem;
85
- }
86
-
87
- .j-accordion[data-direction='horizontal']
88
- .accordion-panel[aria-hidden='false'] {
89
- border-right: var(--accordion-border);
90
- border-bottom: 0;
91
- flex: 1;
92
- }
93
-
94
- .j-accordion .accordion-header[aria-expanded='true'],
95
- .j-accordion .accordion-header[aria-expanded='false']:nth-last-child(2),
96
- .j-accordion .accordion-panel[aria-hidden='true'],
97
- .j-accordion .accordion-panel:last-child {
98
- border-bottom: 0;
99
- }
100
-
101
- .j-accordion[data-direction='horizontal'] .accordion-panel:last-child {
102
- border-right: 0;
103
- }
104
-
105
37
  .j-accordion .accordion-panel .panel-content {
106
- margin: var(--accordion-panel-content-margin);
107
- padding: var(--accordion-panel-content-padding);
108
38
  position: relative;
109
39
  min-height: inherit;
110
40
  }
@@ -1,14 +1,22 @@
1
1
  @layer animation {
2
2
  /* none */
3
3
  .animate-none {
4
+ -webkit-animation: none;
4
5
  animation: none;
5
6
  }
6
7
 
7
8
  /* spin */
8
9
  .animate-spin {
10
+ -webkit-animation: animate-spin 1s linear infinite;
9
11
  animation: animate-spin 1s linear infinite;
10
12
  }
11
13
 
14
+ @-webkit-keyframes animate-spin {
15
+ to {
16
+ transform: rotate(360deg);
17
+ }
18
+ }
19
+
12
20
  @keyframes animate-spin {
13
21
  to {
14
22
  transform: rotate(360deg);
@@ -17,9 +25,18 @@
17
25
 
18
26
  /* ping */
19
27
  .animate-ping {
28
+ -webkit-animation: animate-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
20
29
  animation: animate-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
21
30
  }
22
31
 
32
+ @-webkit-keyframes animate-ping {
33
+ 75%,
34
+ 100% {
35
+ transform: scale(2);
36
+ opacity: 0;
37
+ }
38
+ }
39
+
23
40
  @keyframes animate-ping {
24
41
  75%,
25
42
  100% {
@@ -30,9 +47,16 @@
30
47
 
31
48
  /* pulse */
32
49
  .animate-pulse {
50
+ -webkit-animation: animate-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
33
51
  animation: animate-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
34
52
  }
35
53
 
54
+ @-webkit-keyframes animate-pulse {
55
+ 50% {
56
+ opacity: 0.5;
57
+ }
58
+ }
59
+
36
60
  @keyframes animate-pulse {
37
61
  50% {
38
62
  opacity: 0.5;
@@ -41,27 +65,58 @@
41
65
 
42
66
  /* bounce */
43
67
  .animate-bounce {
68
+ -webkit-animation: animate-bounce 1s infinite;
44
69
  animation: animate-bounce 1s infinite;
45
70
  }
46
71
 
72
+ @-webkit-keyframes animate-bounce {
73
+ 0%,
74
+ 100% {
75
+ transform: translateY(-25%);
76
+ -webkit-animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
77
+ animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
78
+ }
79
+
80
+ 50% {
81
+ transform: translateY(0);
82
+ -webkit-animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
83
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
84
+ }
85
+ }
86
+
47
87
  @keyframes animate-bounce {
48
88
  0%,
49
89
  100% {
50
90
  transform: translateY(-25%);
91
+ -webkit-animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
51
92
  animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
52
93
  }
53
94
 
54
95
  50% {
55
96
  transform: translateY(0);
97
+ -webkit-animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
56
98
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
57
99
  }
58
100
  }
59
101
 
60
102
  /* fade in */
61
103
  .animate-fade-in {
104
+ -webkit-animation: animate-fade-in 0.3s ease-in-out;
62
105
  animation: animate-fade-in 0.3s ease-in-out;
63
106
  }
64
107
 
108
+ @-webkit-keyframes animate-fade-in {
109
+ 0% {
110
+ opacity: 0;
111
+ transform: scale(0.8);
112
+ }
113
+
114
+ 100% {
115
+ opacity: 1;
116
+ transform: scale(1);
117
+ }
118
+ }
119
+
65
120
  @keyframes animate-fade-in {
66
121
  0% {
67
122
  opacity: 0;
@@ -76,9 +131,22 @@
76
131
 
77
132
  /* fade out */
78
133
  .animate-fade-out {
134
+ -webkit-animation: animate-fade-out 0.3s ease-in-out;
79
135
  animation: animate-fade-out 0.3s ease-in-out;
80
136
  }
81
137
 
138
+ @-webkit-keyframes animate-fade-out {
139
+ 0% {
140
+ opacity: 1;
141
+ transform: scale(1);
142
+ }
143
+
144
+ 100% {
145
+ opacity: 0;
146
+ transform: scale(0.8);
147
+ }
148
+ }
149
+
82
150
  @keyframes animate-fade-out {
83
151
  0% {
84
152
  opacity: 1;
@@ -93,9 +161,29 @@
93
161
 
94
162
  /* shake */
95
163
  .animate-shake {
164
+ -webkit-animation: animate-shake 0.3s ease-in-out;
96
165
  animation: animate-shake 0.3s ease-in-out;
97
166
  }
98
167
 
168
+ @-webkit-keyframes animate-shake {
169
+ 0%,
170
+ 100% {
171
+ transform: translateX(0);
172
+ }
173
+
174
+ 25% {
175
+ transform: translateX(-10px);
176
+ }
177
+
178
+ 50% {
179
+ transform: translateX(10px);
180
+ }
181
+
182
+ 75% {
183
+ transform: translateX(-10px);
184
+ }
185
+ }
186
+
99
187
  @keyframes animate-shake {
100
188
  0%,
101
189
  100% {
@@ -117,9 +205,20 @@
117
205
 
118
206
  /* slide-to-top */
119
207
  .animate-slide-to-top {
208
+ -webkit-animation: animate-slide-to-top 0.3s ease-in-out;
120
209
  animation: animate-slide-to-top 0.3s ease-in-out;
121
210
  }
122
211
 
212
+ @-webkit-keyframes animate-slide-to-top {
213
+ 0% {
214
+ transform: translateY(0);
215
+ }
216
+
217
+ 100% {
218
+ transform: translateY(-100%);
219
+ }
220
+ }
221
+
123
222
  @keyframes animate-slide-to-top {
124
223
  0% {
125
224
  transform: translateY(0);
@@ -132,9 +231,20 @@
132
231
 
133
232
  /* slide-to-right */
134
233
  .animate-slide-to-right {
234
+ -webkit-animation: animate-slide-to-right 0.3s ease-in-out;
135
235
  animation: animate-slide-to-right 0.3s ease-in-out;
136
236
  }
137
237
 
238
+ @-webkit-keyframes animate-slide-to-right {
239
+ 0% {
240
+ transform: translateX(0);
241
+ }
242
+
243
+ 100% {
244
+ transform: translateX(100%);
245
+ }
246
+ }
247
+
138
248
  @keyframes animate-slide-to-right {
139
249
  0% {
140
250
  transform: translateX(0);
@@ -147,9 +257,20 @@
147
257
 
148
258
  /* slide-to-bottom */
149
259
  .animate-slide-to-bottom {
260
+ -webkit-animation: animate-slide-to-bottom 0.3s ease-in-out;
150
261
  animation: animate-slide-to-bottom 0.3s ease-in-out;
151
262
  }
152
263
 
264
+ @-webkit-keyframes animate-slide-to-bottom {
265
+ 0% {
266
+ transform: translateY(0);
267
+ }
268
+
269
+ 100% {
270
+ transform: translateY(100%);
271
+ }
272
+ }
273
+
153
274
  @keyframes animate-slide-to-bottom {
154
275
  0% {
155
276
  transform: translateY(0);
@@ -162,9 +283,20 @@
162
283
 
163
284
  /* slide-to-left */
164
285
  .animate-slide-to-left {
286
+ -webkit-animation: animate-slide-to-left 0.3s ease-in-out;
165
287
  animation: animate-slide-to-left 0.3s ease-in-out;
166
288
  }
167
289
 
290
+ @-webkit-keyframes animate-slide-to-left {
291
+ 0% {
292
+ transform: translateX(0);
293
+ }
294
+
295
+ 100% {
296
+ transform: translateX(-100%);
297
+ }
298
+ }
299
+
168
300
  @keyframes animate-slide-to-left {
169
301
  0% {
170
302
  transform: translateX(0);
@@ -179,21 +311,32 @@
179
311
  [data-reveal] {
180
312
  opacity: 0;
181
313
  transform: translateY(12px);
314
+ -webkit-animation: reveal 0.62s ease forwards;
182
315
  animation: reveal 0.62s ease forwards;
183
316
  }
184
317
 
185
318
  [data-reveal='2'] {
319
+ -webkit-animation-delay: 0.08s;
186
320
  animation-delay: 0.08s;
187
321
  }
188
322
 
189
323
  [data-reveal='3'] {
324
+ -webkit-animation-delay: 0.14s;
190
325
  animation-delay: 0.14s;
191
326
  }
192
327
 
193
328
  [data-reveal='4'] {
329
+ -webkit-animation-delay: 0.2s;
194
330
  animation-delay: 0.2s;
195
331
  }
196
332
 
333
+ @-webkit-keyframes reveal {
334
+ to {
335
+ opacity: 1;
336
+ transform: translateY(0);
337
+ }
338
+ }
339
+
197
340
  @keyframes reveal {
198
341
  to {
199
342
  opacity: 1;
@@ -2,22 +2,13 @@
2
2
  .j-avatar {
3
3
  display: inline-block;
4
4
  vertical-align: middle;
5
- width: var(--avatar-size);
6
- height: var(--avatar-size);
7
5
  overflow: hidden;
6
+ -webkit-user-select: none;
7
+ -moz-user-select: none;
8
+ -ms-user-select: none;
8
9
  user-select: none;
10
+ -o-object-fit: cover;
9
11
  object-fit: cover;
10
- box-shadow: var(--avatar-box-shadow);
11
- border: var(--avatar-border);
12
- border-radius: var(--avatar-border-radius);
13
- background: var(--avatar-bg);
14
- color: var(--avatar-fg);
15
- font-size: var(--avatar-font-size);
16
- font-weight: var(--avatar-font-weight);
17
- }
18
-
19
- .j-avatar img {
20
- border-radius: var(--avatar-border-radius);
21
12
  }
22
13
 
23
14
  .j-avatar img,
package/src/css/badge.css CHANGED
@@ -3,16 +3,9 @@
3
3
  display: inline-flex;
4
4
  justify-content: center;
5
5
  align-items: center;
6
- padding: var(--badge-padding);
7
- min-width: var(--badge-min-width);
8
- height: var(--badge-height);
9
- line-height: var(--badge-line-height);
10
- font-size: var(--badge-font-size);
11
- font-weight: var(--badge-font-weight);
12
- border-radius: var(--badge-radius);
13
- border: 1px solid var(--badge-border-color);
14
- color: var(--badge-fg);
15
- background-color: var(--badge-bg);
16
- box-shadow: var(--badge-box-shadow);
6
+ -webkit-user-select: none;
7
+ -moz-user-select: none;
8
+ -ms-user-select: none;
9
+ user-select: none;
17
10
  }
18
11
  }
@@ -1,16 +1,12 @@
1
1
  @layer components {
2
2
  .j-breadcrumb {
3
- font-size: var(--breadcrumb-font-size);
4
- color: var(--breadcrumb-fg);
5
3
  white-space: nowrap;
4
+ -webkit-user-select: none;
5
+ -moz-user-select: none;
6
+ -ms-user-select: none;
6
7
  user-select: none;
7
8
  }
8
9
 
9
- .j-breadcrumb svg {
10
- width: var(--breadcrumb-icon-size);
11
- height: var(--breadcrumb-icon-size);
12
- }
13
-
14
10
  .j-breadcrumb > ol,
15
11
  .j-breadcrumb > ul {
16
12
  display: flex;
@@ -29,11 +25,11 @@
29
25
  }
30
26
 
31
27
  .j-breadcrumb li:first-child a {
28
+ -webkit-padding-start: 0;
32
29
  padding-inline-start: 0;
33
30
  }
34
31
 
35
32
  .j-breadcrumb li + li::before {
36
- color: var(--breadcrumb-divider-fg);
37
33
  content: '/';
38
34
  }
39
35
 
@@ -53,9 +49,6 @@
53
49
  display: flex;
54
50
  align-items: center;
55
51
  justify-content: center;
56
- gap: var(--space);
57
- color: var(--breadcrumb-link-fg);
58
- padding: var(--breadcrumb-item-padding);
59
52
  text-decoration: none;
60
53
  }
61
54
 
@@ -4,22 +4,14 @@
4
4
  justify-content: center;
5
5
  align-items: center;
6
6
  flex-wrap: nowrap;
7
- gap: var(--btn-gap);
8
7
  position: relative;
9
8
  white-space: nowrap;
10
- /* font-weight: var(--btn-font-weight); */
11
- font-size: var(--btn-font-size);
12
- height: var(--btn-height);
13
- line-height: var(--btn-line-height);
14
- color: var(--btn-fg);
15
- background-color: var(--btn-bg);
16
- padding: var(--btn-padding);
17
- border-width: var(--btn-border-width);
18
- border-style: var(--btn-border-style);
19
- border-color: var(--btn-border-color);
20
- border-radius: var(--btn-border-radius);
21
- box-shadow: var(--btn-box-shadow);
9
+ -webkit-appearance: button;
10
+ -moz-appearance: button;
22
11
  appearance: button;
12
+ -webkit-user-select: none;
13
+ -moz-user-select: none;
14
+ -ms-user-select: none;
23
15
  user-select: none;
24
16
  touch-action: manipulation;
25
17
  }
@@ -30,7 +22,7 @@
30
22
  }
31
23
 
32
24
  .j-button svg {
33
- width: var(--btn-svg-size);
25
+ width: var(--btn-font-size);
34
26
  fill: currentColor;
35
27
  }
36
28
 
@@ -39,57 +31,7 @@
39
31
  color: inherit;
40
32
  }
41
33
 
42
- /* group */
43
34
  .j-button-group {
44
35
  display: flex;
45
- margin: 0;
46
- box-shadow: var(--btn-group-box-shadow);
47
- }
48
-
49
- .j-button-group .j-button:not(:first-child) {
50
- border-top-left-radius: 0;
51
- border-bottom-left-radius: 0;
52
- }
53
-
54
- .j-button-group .j-button:not(:last-child) {
55
- border-top-right-radius: 0;
56
- border-bottom-right-radius: 0;
57
- }
58
-
59
- .j-button-group .j-button:not(:first-child):not(:last-child) {
60
- border-top-width: var(--btn-border-width);
61
- border-bottom-width: var(--btn-border-width);
62
- border-left-width: 0;
63
- border-right-width: 0;
64
- }
65
-
66
- .j-button-group.is-vertical {
67
- flex-direction: column;
68
- }
69
-
70
- .j-button-group.is-vertical .j-button:not(:last-child) {
71
- border-bottom-left-radius: 0;
72
- border-bottom-right-radius: 0;
73
- }
74
-
75
- .j-button-group.is-vertical .j-button:not(:first-child) {
76
- margin-left: 0;
77
- border-top-left-radius: 0;
78
- border-top-right-radius: 0;
79
- }
80
-
81
- .j-button-group.is-vertical .j-button:not(:last-child):not(:first-child) {
82
- border-left-width: var(--btn-border-width);
83
- border-right-width: var(--btn-border-width);
84
- border-top-width: 0;
85
- border-bottom-width: 0;
86
- }
87
-
88
- .j-button-group.is-vertical .j-button:first-child {
89
- border-top-right-radius: var(--radius-md);
90
- }
91
-
92
- .j-button-group.is-vertical .j-button:last-child {
93
- border-bottom-left-radius: var(--radius-md);
94
36
  }
95
37
  }