vanilla-jui 1.5.35 → 1.5.37

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 -67
  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 +5 -565
  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 -33
  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 +591 -42
  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
@@ -1,19 +1,9 @@
1
1
  @layer components {
2
- .j-pagination {
3
- font-size: var(--pagination-font-size);
4
- }
5
-
6
- .j-pagination a {
7
- text-decoration: var(--pagination-link-decoration);
8
- color: var(--pagination-link-fg);
9
- }
10
-
11
2
  .j-pagination .pagination {
12
3
  list-style: none;
13
4
  display: flex;
14
5
  justify-content: center;
15
6
  align-items: center;
16
- gap: var(--pagination-gap);
17
7
  margin: 0;
18
8
  padding: 0;
19
9
  }
package/src/css/popup.css CHANGED
@@ -6,9 +6,6 @@
6
6
  left: 0;
7
7
  width: 100%;
8
8
  height: 100%;
9
- background: var(--popup-bg);
10
- backdrop-filter: var(--popup-backdrop-filter);
11
- padding: var(--popup-layout-padding);
12
9
  z-index: var(--z-popup);
13
10
  }
14
11
 
@@ -1,19 +1,23 @@
1
1
  @layer components {
2
2
  .j-skeleton {
3
- --skeleton-background: var(--ui-surface-muted);
4
- --skeleton-radius: var(--radius-sm, 4px);
5
- --skeleton-duration: 1.5s;
6
-
7
3
  display: block;
8
4
  width: 100%;
9
5
  min-height: var(--el-height-2xs);
10
- border-radius: var(--skeleton-radius);
11
- background: var(--skeleton-background);
6
+ border-radius: var(--radius-sm);
7
+ background: var(--ui-surface-muted);
12
8
  color: transparent;
13
9
  pointer-events: none;
10
+ -webkit-user-select: none;
11
+ -moz-user-select: none;
12
+ -ms-user-select: none;
14
13
  user-select: none;
15
- animation: animate-pulse var(--skeleton-duration)
16
- cubic-bezier(0.4, 0, 0.6, 1) infinite;
14
+ -webkit-animation: animate-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
15
+ animation: animate-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
16
+ }
17
+
18
+ .j-skeleton::-moz-selection {
19
+ color: transparent;
20
+ background: transparent;
17
21
  }
18
22
 
19
23
  .j-skeleton::selection {
@@ -66,11 +70,13 @@
66
70
 
67
71
  .j-skeleton.skeleton-static,
68
72
  .j-skeleton[aria-busy='false'] {
73
+ -webkit-animation: none;
69
74
  animation: none;
70
75
  }
71
76
 
72
77
  @media (prefers-reduced-motion: reduce) {
73
78
  .j-skeleton {
79
+ -webkit-animation: none;
74
80
  animation: none;
75
81
  }
76
82
  }
@@ -6,6 +6,7 @@
6
6
  * - data-action
7
7
  * - shape status
8
8
  * - drag status
9
+ * - hidden
9
10
  */
10
11
  @layer status {
11
12
  /* sad mode */
@@ -44,11 +45,15 @@
44
45
  }
45
46
 
46
47
  /* disabled */
47
- [disabled],
48
48
  :disabled,
49
49
  .is-disabled,
50
50
  [aria-disabled='true'] {
51
51
  cursor: not-allowed;
52
52
  user-select: none;
53
53
  }
54
+
55
+ [hidden],
56
+ [aria-hidden='true'] {
57
+ display: none;
58
+ }
54
59
  }
@@ -4,6 +4,9 @@
4
4
  display: block;
5
5
  overflow: hidden;
6
6
  touch-action: pan-y;
7
+ -webkit-user-select: none;
8
+ -moz-user-select: none;
9
+ -ms-user-select: none;
7
10
  user-select: none;
8
11
  width: 100%;
9
12
  min-height: var(--swiper-min-height);
@@ -26,6 +29,9 @@
26
29
  overflow: hidden;
27
30
  color: inherit;
28
31
  text-decoration: none;
32
+ -webkit-user-select: none;
33
+ -moz-user-select: none;
34
+ -ms-user-select: none;
29
35
  user-select: none;
30
36
  width: 100%;
31
37
  min-width: 100%;
@@ -45,23 +51,13 @@
45
51
  display: flex;
46
52
  justify-content: center;
47
53
  align-items: center;
48
-
49
- color: var(--ui-fg-soft);
50
- font-size: var(--font-size-md);
51
54
  letter-spacing: 1px;
52
-
53
- background-color: var(--tone-wash);
54
- background-image: radial-gradient(
55
- circle,
56
- var(--ui-border) 1px,
57
- transparent 1px
58
- );
59
- background-size: 20px 20px;
60
55
  }
61
56
 
62
57
  .j-swiper .swiper-image {
63
58
  position: relative;
64
59
  display: block;
60
+ -o-object-fit: cover;
65
61
  object-fit: cover;
66
62
  pointer-events: none;
67
63
  width: 100%;
@@ -74,16 +70,6 @@
74
70
  .j-swiper .swiper-slide-title {
75
71
  display: block;
76
72
  position: absolute;
77
- right: var(--swiper-title-inset);
78
- bottom: var(--swiper-title-inset);
79
- left: var(--swiper-title-inset);
80
- padding: var(--swiper-title-padding);
81
- color: var(--swiper-title-color);
82
- font-size: var(--swiper-title-font-size);
83
- font-weight: var(--swiper-title-font-weight);
84
- background: var(--swiper-title-bg);
85
- border-radius: var(--swiper-title-border-radius);
86
- line-height: var(--swiper-title-line-height);
87
73
  text-overflow: ellipsis;
88
74
  white-space: nowrap;
89
75
  z-index: 1;
@@ -93,43 +79,16 @@
93
79
  .j-swiper .swiper-pagination {
94
80
  position: absolute;
95
81
  display: flex;
96
- gap: var(--swiper-pagination-gap);
97
82
  align-items: center;
98
83
  justify-content: center;
99
84
  z-index: 2;
100
85
  }
101
86
 
102
- .j-swiper .swiper-pagination.is-horizontal {
103
- right: var(--swiper-pagination-inline);
104
- bottom: var(--swiper-pagination-block);
105
- left: var(--swiper-pagination-inline);
106
- }
107
-
108
87
  .j-swiper .swiper-pagination-indicator {
109
88
  display: inline-block;
110
- width: var(--swiper-indicator-size);
111
- height: var(--swiper-indicator-size);
112
- padding: 0;
113
89
  cursor: pointer;
114
- background: var(--swiper-indicator-bg);
115
- border: 0;
116
90
  border-radius: 999px;
117
91
  outline: none;
118
- transition:
119
- width var(--duration-fast, 160ms) ease,
120
- background-color var(--duration-fast, 160ms) ease,
121
- opacity var(--duration-fast, 160ms) ease;
122
- }
123
-
124
- .j-swiper .swiper-pagination-indicator:hover,
125
- .j-swiper .swiper-pagination-indicator:focus-visible {
126
- background: var(--swiper-indicator-hover-bg);
127
- }
128
-
129
- .j-swiper .swiper-pagination-indicator.is-active,
130
- .j-swiper .swiper-pagination-indicator.active {
131
- width: var(--swiper-indicator-active-width);
132
- background: var(--swiper-indicator-active-bg);
133
92
  }
134
93
 
135
94
  .j-swiper .swiper-navigation {
@@ -139,37 +98,11 @@
139
98
  display: inline-flex;
140
99
  align-items: center;
141
100
  justify-content: center;
142
- width: var(--swiper-navigation-size);
143
- height: var(--swiper-navigation-size);
144
- padding: 0;
145
- color: var(--swiper-navigation-fg);
146
101
  cursor: pointer;
147
- background: var(--swiper-navigation-bg);
148
- border: 0;
149
102
  border-radius: 999px;
150
- transform: translateY(-50%);
151
- transition:
152
- background-color var(--duration-fast, 160ms) ease,
153
- opacity var(--duration-fast, 160ms) ease;
154
- }
155
-
156
- .j-swiper .swiper-navigation:hover,
157
- .j-swiper .swiper-navigation:focus-visible {
158
- background: var(--swiper-navigation-hover-bg);
159
- outline: none;
160
- }
161
-
162
- .j-swiper .swiper-navigation.is-prev {
163
- left: var(--swiper-navigation-offset);
164
- }
165
-
166
- .j-swiper .swiper-navigation.is-next {
167
- right: var(--swiper-navigation-offset);
168
103
  }
169
104
 
170
105
  .j-swiper .swiper-navigation svg {
171
- width: var(--swiper-navigation-icon-size);
172
- height: var(--swiper-navigation-icon-size);
173
106
  pointer-events: none;
174
107
  }
175
108
 
package/src/css/table.css CHANGED
@@ -1,41 +1,12 @@
1
1
  @layer components {
2
- .j-table-container {
3
- max-width: 100%;
4
- overflow-y: hidden;
5
- overflow-x: auto;
6
- scrollbar-width: thin;
7
- scrollbar-color: var(--ui-border) transparent;
8
- }
9
-
10
2
  table {
11
- /* width: var(--table-width); */
12
3
  text-indent: 0;
13
4
  border-color: inherit;
14
5
  border-collapse: collapse;
15
- /* border-spacing: 0; */
16
- }
17
-
18
- table td,
19
- table th {
20
- border-width: var(--table-border-width);
21
- border-style: var(--table-border-style);
22
- border-color: var(--table-border-color);
23
- padding: var(--table-cell-padding);
24
- text-align: var(--table-cell-text-align);
25
- vertical-align: var(--table-cell-vertical-align);
26
- }
27
6
 
28
- table thead th {
29
- background: var(--table-striped-bg);
30
- font-weight: var(--table-header-font-weight);
31
- white-space: nowrap;
32
- }
33
-
34
- table tbody td {
35
- min-width: var(--table-cell-min-width);
36
- }
37
-
38
- table tbody tr:hover {
39
- background: var(--table-hover-bg);
7
+ overflow-x: auto;
8
+ scrollbar-width: thin;
9
+ scrollbar-color: var(--ui-border) transparent;
10
+ display: block;
40
11
  }
41
12
  }
package/src/css/tabs.css CHANGED
@@ -38,23 +38,16 @@
38
38
  }
39
39
 
40
40
  .j-tabs .tab-list .tab-item {
41
- padding: var(--tab-list-item-padding);
42
- margin: var(--tab-list-item-margin);
43
- color: var(--tab-fg);
44
- font-weight: var(--tab-list-font-weight);
45
41
  flex-shrink: 0;
46
42
  cursor: pointer;
47
43
  }
48
44
 
49
45
  .j-tabs .panel-list {
50
- padding: var(--panel-list-padding);
51
- margin: var(--panel-list-margin);
52
46
  flex: 1;
53
47
  }
54
48
 
55
49
  .j-tabs .panel-list .panel-item {
56
50
  display: none;
57
- margin: var(--panel-list-item-margin);
58
51
  position: relative;
59
52
  min-height: 22px;
60
53
  }
@@ -1,65 +1,31 @@
1
1
  @layer components {
2
- .j-theme-palette {
3
- padding: var(--palette-padding);
4
- }
5
-
6
2
  .j-theme-palette .palette-container {
7
3
  display: flex;
8
4
  flex-direction: column;
9
- gap: var(--palette-container-gap);
10
5
  }
11
6
 
12
- .j-theme-palette .palette-container .palette-item {
7
+ .j-theme-palette .palette-item {
13
8
  display: flex;
14
9
  flex-direction: column;
15
- gap: var(--palette-item-gap);
16
- }
17
-
18
- .j-theme-palette .palette-container .palette-item .item-title {
19
- font-size: var(--palette-item-title-font-size);
20
- font-weight: var(--palette-item-title-font-weight);
21
10
  }
22
11
 
23
- .j-theme-palette .palette-container .palette-item .items {
12
+ .j-theme-palette .items {
24
13
  display: grid;
25
- grid-template-columns: var(--palette-items-columns);
26
- gap: var(--palette-items-gap);
14
+ grid-template-columns: repeat(3, 1fr);
27
15
  }
28
16
 
29
- .j-theme-palette .palette-container .palette-item .items > button {
30
- padding-inline: var(--s2);
17
+ .j-theme-palette .j-button {
31
18
  min-width: 0;
32
19
  overflow: hidden;
33
20
  }
34
21
 
35
- .j-theme-palette
36
- .palette-container
37
- .palette-item[data-palette='theme']
38
- .items
39
- > button {
40
- justify-content: flex-start;
41
- }
42
-
43
- .j-theme-palette
44
- .palette-container
45
- .palette-item
46
- .items
47
- > button
48
- span.item-hex {
22
+ .j-theme-palette .j-button .item-hex {
49
23
  display: inline-block;
50
- width: var(--palette-items-icon-size);
51
- height: var(--palette-items-icon-size);
52
24
  border-radius: 50%;
53
25
  flex-shrink: 0;
54
- margin-right: var(--space);
55
26
  }
56
27
 
57
- .j-theme-palette
58
- .palette-container
59
- .palette-item
60
- .items
61
- > button
62
- span.button-text {
28
+ .j-theme-palette .j-button .button-text {
63
29
  overflow: hidden;
64
30
  text-overflow: ellipsis;
65
31
  }
@@ -1,14 +1,91 @@
1
1
  @layer themes {
2
2
  .j-accordion {
3
- --accordion-font-size: var(--font-size-md);
4
3
  --accordion-font-weight: var(--font-medium);
5
- --accordion-header-font-size: var(--font-size-md);
6
- --accordion-header-padding: var(--s2) var(--s3);
7
- --accordion-header-margin: 0;
8
4
  --accordion-border: 1px solid var(--ui-border-subtle);
9
5
  --accordion-icon-transform: rotate(0deg);
10
- --accordion-panel-margin: 0;
11
- --accordion-panel-content-margin: 0;
12
- --accordion-panel-content-padding: 0 var(--s3) var(--s2);
6
+ }
7
+
8
+ .j-accordion .accordion-header {
9
+ padding: var(--s2) var(--s3);
10
+ margin: 0;
11
+ font-weight: var(--accordion-font-weight);
12
+ font-size: var(--font-size-md);
13
+
14
+ border-bottom: var(--accordion-border);
15
+ }
16
+
17
+ .j-accordion[data-direction='horizontal'] .accordion-header {
18
+ gap: var(--space);
19
+ border-bottom: 0;
20
+ border-right: var(--accordion-border);
21
+ }
22
+
23
+ .j-accordion[data-direction='horizontal']
24
+ .accordion-header[aria-expanded='true'] {
25
+ border-right: 0;
26
+ }
27
+
28
+ .j-accordion .accordion-header[aria-expanded='false']:hover {
29
+ background: var(--ui-bg-subtle);
30
+ }
31
+
32
+ .j-accordion[data-direction='horizontal']
33
+ .accordion-header[aria-expanded='false']:nth-last-child(2) {
34
+ border-right: 0;
35
+ }
36
+
37
+ .j-accordion .accordion-header[aria-expanded='true'] .header-title {
38
+ --accordion-font-weight: var(--font-bold);
39
+ }
40
+
41
+ .j-accordion .accordion-header .header-arrow {
42
+ transform: var(--accordion-icon-transform);
43
+ }
44
+
45
+ .j-accordion[data-direction='horizontal'] .accordion-header .header-arrow {
46
+ --accordion-icon-transform: rotate(-90deg);
47
+ }
48
+
49
+ .j-accordion .accordion-header[aria-expanded='true'] .header-arrow {
50
+ --accordion-icon-transform: rotate(180deg);
51
+ }
52
+
53
+ .j-accordion[data-direction='horizontal']
54
+ .accordion-header[aria-expanded='true']
55
+ .header-arrow {
56
+ --accordion-icon-transform: rotate(90deg);
57
+ }
58
+
59
+ .j-accordion .accordion-panel {
60
+ margin: 0;
61
+ font-size: var(--font-size-md);
62
+ border-bottom: var(--accordion-border);
63
+ }
64
+
65
+ .j-accordion .accordion-panel[aria-hidden='false'] {
66
+ min-height: 2rem;
67
+ }
68
+
69
+ .j-accordion[data-direction='horizontal']
70
+ .accordion-panel[aria-hidden='false'] {
71
+ border-right: var(--accordion-border);
72
+ border-bottom: 0;
73
+ flex: 1;
74
+ }
75
+
76
+ .j-accordion .accordion-header[aria-expanded='true'],
77
+ .j-accordion .accordion-header[aria-expanded='false']:nth-last-child(2),
78
+ .j-accordion .accordion-panel[aria-hidden='true'],
79
+ .j-accordion .accordion-panel:last-child {
80
+ border-bottom: 0;
81
+ }
82
+
83
+ .j-accordion[data-direction='horizontal'] .accordion-panel:last-child {
84
+ border-right: 0;
85
+ }
86
+
87
+ .j-accordion .accordion-panel .panel-content {
88
+ margin: 0;
89
+ padding: 0 var(--s3) var(--s2);
13
90
  }
14
91
  }
@@ -3,6 +3,20 @@
3
3
  --avatar-size: var(--el-height-md);
4
4
  --avatar-border-radius: var(--radius-sm);
5
5
  --avatar-box-shadow: var(--shadow-sm);
6
+
7
+ width: var(--avatar-size);
8
+ height: var(--avatar-size);
9
+ box-shadow: var(--avatar-box-shadow);
10
+ border: var(--avatar-border);
11
+ border-radius: var(--avatar-border-radius);
12
+ background: var(--avatar-bg);
13
+ color: var(--avatar-fg);
14
+ font-size: var(--avatar-font-size);
15
+ font-weight: var(--avatar-font-weight);
16
+ }
17
+
18
+ .j-avatar img {
19
+ border-radius: var(--avatar-border-radius);
6
20
  }
7
21
 
8
22
  .j-avatar.is-2xs {
@@ -44,6 +58,7 @@
44
58
  }
45
59
 
46
60
  .j-avatar-group .j-avatar:not(:first-child) {
61
+ -webkit-margin-start: calc(var(--space) * -3);
47
62
  margin-inline-start: calc(var(--space) * -3);
48
63
  }
49
64
 
@@ -5,19 +5,40 @@
5
5
  --badge-height: 1.25rem;
6
6
  --badge-font-size: var(--font-size-sm);
7
7
  --badge-font-weight: var(--font-medium);
8
- --badge-line-height: var(--line-height-self);
9
8
  --badge-radius: 500px;
10
9
  --badge-border-color: var(--ui-border);
11
10
  --badge-fg: var(--ui-fg);
12
11
  --badge-bg: var(--ui-bg);
13
12
  --badge-box-shadow: none;
13
+ --badge-gap: 4px;
14
+
15
+ gap: var(--badge-gap);
16
+ padding: var(--badge-padding);
17
+ min-width: var(--badge-min-width);
18
+ height: var(--badge-height);
19
+ font-size: var(--badge-font-size);
20
+ font-weight: var(--badge-font-weight);
21
+ border-radius: var(--badge-radius);
22
+ border: 1px solid var(--badge-border-color);
23
+ color: var(--badge-fg);
24
+ background-color: var(--badge-bg);
25
+ box-shadow: var(--badge-box-shadow);
26
+ }
27
+
28
+ .j-badge svg {
29
+ width: var(--font-size-sm);
30
+ }
31
+
32
+ .j-badge.is-sm svg {
33
+ width: var(--font-size-xs);
14
34
  }
15
35
 
16
36
  .j-badge.is-sm {
17
- --badge-padding: 0 calc(var(--space) * 0.75);
37
+ --badge-padding: 0 var(--space);
18
38
  --badge-min-width: 1rem;
19
39
  --badge-height: 1rem;
20
- --badge-font-size: 0.625rem;
40
+ --badge-font-size: var(--font-size-xs);
41
+ --badge-gap: 2px;
21
42
  }
22
43
 
23
44
  .j-badge.is-reverse {
@@ -6,6 +6,14 @@
6
6
  --breadcrumb-divider-fg: var(--ui-fg-soft);
7
7
  --breadcrumb-link-fg: var(--tone-text);
8
8
  --breadcrumb-item-padding: 0 var(--s2);
9
+
10
+ font-size: var(--breadcrumb-font-size);
11
+ color: var(--breadcrumb-fg);
12
+ }
13
+
14
+ .j-breadcrumb svg {
15
+ width: var(--breadcrumb-icon-size);
16
+ height: var(--breadcrumb-icon-size);
9
17
  }
10
18
 
11
19
  .j-breadcrumb.is-sm {
@@ -18,10 +26,20 @@
18
26
  --breadcrumb-icon-size: var(--font-size-lg);
19
27
  }
20
28
 
29
+ .j-breadcrumb a {
30
+ gap: var(--space);
31
+ color: var(--breadcrumb-link-fg);
32
+ padding: var(--breadcrumb-item-padding);
33
+ }
34
+
21
35
  .j-breadcrumb a:hover {
22
36
  --breadcrumb-link-fg: var(--tone-solid);
23
37
  }
24
38
 
39
+ .j-breadcrumb li + li::before {
40
+ color: var(--breadcrumb-divider-fg);
41
+ }
42
+
25
43
  .j-breadcrumb li.is-active a {
26
44
  --breadcrumb-link-fg: var(--ui-fg-muted);
27
45
  }