vanilla-jui 1.7.10 → 1.7.11

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 +1 -1
  5. package/src/components/accordion.ts +1 -1
  6. package/src/components/flow.ts +1 -1
  7. package/src/components/form.ts +1 -1
  8. package/src/components/modal.ts +1 -1
  9. package/src/css/index.css +1 -2
  10. package/src/css/layout.css +156 -63
  11. package/src/css/status.css +0 -1
  12. package/src/css/themes/default/accordion.css +37 -1
  13. package/src/css/themes/default/avatar.css +23 -1
  14. package/src/css/themes/default/badge.css +20 -3
  15. package/src/css/themes/default/breadcrumb.css +65 -1
  16. package/src/css/themes/default/button.css +64 -11
  17. package/src/css/themes/default/drop.css +19 -1
  18. package/src/css/themes/default/editor.css +781 -7
  19. package/src/css/themes/default/form.css +650 -2
  20. package/src/css/themes/default/index.css +17 -14
  21. package/src/css/themes/default/loading.css +144 -2
  22. package/src/css/themes/default/menu.css +113 -125
  23. package/src/css/themes/default/modal.css +26 -4
  24. package/src/css/themes/default/offcanvas.css +19 -1
  25. package/src/css/themes/default/pagination.css +13 -1
  26. package/src/css/themes/default/swiper.css +99 -1
  27. package/src/css/themes/default/tabs.css +50 -1
  28. package/src/css/themes/default/theme-palette.css +24 -1
  29. package/src/css/themes/default/tip.css +36 -1
  30. package/src/css/themes/default/toast.css +42 -1
  31. package/src/css/themes/default/toolbar.css +29 -1
  32. package/src/css/themes/default/tooltip.css +8 -2
  33. package/src/css/themes/default/tree.css +40 -3
  34. package/src/css/accordion.css +0 -47
  35. package/src/css/avatar.css +0 -27
  36. package/src/css/badge.css +0 -8
  37. package/src/css/breadcrumb.css +0 -71
  38. package/src/css/button.css +0 -32
  39. package/src/css/components.css +0 -28
  40. package/src/css/divider.css +0 -9
  41. package/src/css/drop.css +0 -21
  42. package/src/css/editor.css +0 -794
  43. package/src/css/form.css +0 -657
  44. package/src/css/loading.css +0 -150
  45. package/src/css/menu.css +0 -74
  46. package/src/css/modal.css +0 -33
  47. package/src/css/offcanvas.css +0 -23
  48. package/src/css/pagination.css +0 -15
  49. package/src/css/popup.css +0 -66
  50. package/src/css/skeleton.css +0 -72
  51. package/src/css/swiper.css +0 -107
  52. package/src/css/tabs.css +0 -58
  53. package/src/css/tag.css +0 -36
  54. package/src/css/theme-palette.css +0 -28
  55. package/src/css/themes/default/popup.css +0 -7
  56. package/src/css/themes/default/tag.css +0 -85
  57. package/src/css/tip.css +0 -40
  58. package/src/css/toast.css +0 -54
  59. package/src/css/toolbar.css +0 -34
  60. package/src/css/tooltip.css +0 -12
  61. package/src/css/tree.css +0 -51
  62. /package/src/css/{flow.css → themes/default/flow.css} +0 -0
@@ -1,9 +1,41 @@
1
- @layer themes {
1
+ @layer components {
2
2
  .j-swiper {
3
3
  --swiper-min-height: 120px;
4
4
  --swiper-title-inset: var(--s3);
5
5
  --swiper-title-font-size: var(--font-size-lg);
6
6
  --swiper-navigation-size: 36px;
7
+
8
+ position: relative;
9
+ display: block;
10
+ overflow: hidden;
11
+ touch-action: pan-y;
12
+ user-select: none;
13
+ width: 100%;
14
+ min-height: var(--swiper-min-height);
15
+ border-radius: var(--radius-md);
16
+ }
17
+
18
+ .j-swiper .swiper-wrapper {
19
+ display: flex;
20
+ will-change: transform;
21
+ position: relative;
22
+ width: 100%;
23
+ height: 100%;
24
+ aspect-ratio: inherit;
25
+ border-radius: inherit;
26
+ }
27
+
28
+ .j-swiper .swiper-slide {
29
+ position: relative;
30
+ display: block;
31
+ overflow: hidden;
32
+ color: inherit;
33
+ text-decoration: none;
34
+ user-select: none;
35
+ width: 100%;
36
+ min-width: 100%;
37
+ aspect-ratio: inherit;
38
+ border-radius: inherit;
7
39
  }
8
40
 
9
41
  .j-swiper .swiper-slide::before {
@@ -16,6 +48,31 @@
16
48
  transparent 1px
17
49
  );
18
50
  background-size: 20px 20px;
51
+
52
+ position: absolute;
53
+ content: 'loading';
54
+ top: 0;
55
+ left: 0;
56
+ width: 100%;
57
+ height: 100%;
58
+ aspect-ratio: inherit;
59
+ border-radius: inherit;
60
+ display: flex;
61
+ justify-content: center;
62
+ align-items: center;
63
+ letter-spacing: 1px;
64
+ }
65
+
66
+ .j-swiper .swiper-image {
67
+ position: relative;
68
+ display: block;
69
+ object-fit: cover;
70
+ pointer-events: none;
71
+ width: 100%;
72
+ height: 100%;
73
+ min-height: var(--swiper-min-height);
74
+ aspect-ratio: inherit;
75
+ border-radius: inherit;
19
76
  }
20
77
 
21
78
  .j-swiper .swiper-slide-title {
@@ -29,10 +86,23 @@
29
86
  background: rgb(0 0 0 / 35%);
30
87
  border-radius: var(--radius-sm);
31
88
  line-height: var(--line-height-heading);
89
+
90
+ display: block;
91
+ position: absolute;
92
+ text-overflow: ellipsis;
93
+ white-space: nowrap;
94
+ z-index: 1;
95
+ overflow: hidden;
32
96
  }
33
97
 
34
98
  .j-swiper .swiper-pagination {
35
99
  gap: 6px;
100
+
101
+ position: absolute;
102
+ display: flex;
103
+ align-items: center;
104
+ justify-content: center;
105
+ z-index: 2;
36
106
  }
37
107
 
38
108
  .j-swiper .swiper-pagination.is-horizontal {
@@ -47,6 +117,11 @@
47
117
  padding: 0;
48
118
  background: rgb(255 255 255 / 62%);
49
119
  border: 0;
120
+
121
+ display: inline-block;
122
+ cursor: pointer;
123
+ border-radius: 999px;
124
+ outline: none;
50
125
  }
51
126
 
52
127
  .j-swiper .swiper-pagination-indicator:hover,
@@ -68,6 +143,21 @@
68
143
  background: rgb(0 0 0 / 35%);
69
144
  border: 0;
70
145
  transform: translateY(-50%);
146
+ opacity: 0;
147
+
148
+ position: absolute;
149
+ top: 50%;
150
+ z-index: 2;
151
+ display: inline-flex;
152
+ align-items: center;
153
+ justify-content: center;
154
+ cursor: pointer;
155
+ border-radius: 999px;
156
+ transition: opacity 0.3s ease-in-out;
157
+ }
158
+
159
+ .j-swiper:hover .swiper-navigation {
160
+ opacity: 1;
71
161
  }
72
162
 
73
163
  .j-swiper .swiper-navigation:hover,
@@ -87,6 +177,14 @@
87
177
  .j-swiper .swiper-navigation svg {
88
178
  width: 18px;
89
179
  height: 18px;
180
+
181
+ pointer-events: none;
182
+ }
183
+
184
+ .j-swiper .swiper-navigation.is-disabled,
185
+ .j-swiper .swiper-navigation:disabled {
186
+ cursor: default;
187
+ opacity: 0.36;
90
188
  }
91
189
 
92
190
  @media (max-width: 640px) {
@@ -1,6 +1,31 @@
1
- @layer themes {
1
+ @layer components {
2
2
  .j-tabs {
3
3
  --tab-wrap-border: 1px solid var(--ui-border-subtle);
4
+
5
+ display: flex;
6
+ }
7
+
8
+ .j-tabs,
9
+ .j-tabs[data-tabs-direction='top'] {
10
+ flex-direction: column;
11
+ }
12
+
13
+ .j-tabs[data-tabs-direction='bottom'] {
14
+ flex-direction: column-reverse;
15
+ }
16
+
17
+ .j-tabs[data-tabs-direction='left'] {
18
+ flex-direction: row;
19
+ }
20
+
21
+ .j-tabs[data-tabs-direction='right'] {
22
+ flex-direction: row-reverse;
23
+ }
24
+
25
+ .j-tabs .tab-wrap {
26
+ overflow: hidden;
27
+ position: relative;
28
+ margin: 0;
4
29
  }
5
30
 
6
31
  .j-tabs[data-tabs-direction='top'] .tab-wrap {
@@ -19,11 +44,25 @@
19
44
  border-left: var(--tab-wrap-border);
20
45
  }
21
46
 
47
+ .j-tabs .tab-list {
48
+ display: flex;
49
+ -webkit-overflow-scrolling: touch;
50
+ scroll-behavior: smooth;
51
+ }
52
+
53
+ .j-tabs[data-tabs-direction='left'] .tab-list,
54
+ .j-tabs[data-tabs-direction='right'] .tab-list {
55
+ flex-direction: column;
56
+ }
57
+
22
58
  .j-tabs .tab-list .tab-item {
23
59
  padding: var(--s2) var(--s3);
24
60
  margin: 0;
25
61
  color: var(--tab-fg);
26
62
  font-weight: var(--font-medium);
63
+
64
+ flex-shrink: 0;
65
+ cursor: pointer;
27
66
  }
28
67
 
29
68
  .j-tabs .tab-list .tab-item[aria-selected='true'] {
@@ -37,9 +76,19 @@
37
76
  .j-tabs .panel-list {
38
77
  padding: var(--s3);
39
78
  margin: 0;
79
+
80
+ flex: 1;
40
81
  }
41
82
 
42
83
  .j-tabs .panel-list .panel-item {
43
84
  margin: 0;
85
+
86
+ display: none;
87
+ position: relative;
88
+ min-height: 22px;
89
+ }
90
+
91
+ .j-tabs .panel-list .panel-item[aria-hidden='false'] {
92
+ display: block;
44
93
  }
45
94
  }
@@ -1,9 +1,15 @@
1
- @layer themes {
1
+ @layer components {
2
2
  .j-theme-palette {
3
3
  padding-inline: var(--s4);
4
4
  padding-block: var(--s4) var(--s8);
5
5
  }
6
6
 
7
+ .j-theme-palette .palette-container,
8
+ .j-theme-palette .palette-item {
9
+ display: flex;
10
+ flex-direction: column;
11
+ }
12
+
7
13
  .j-theme-palette .palette-container {
8
14
  gap: var(--s4);
9
15
  }
@@ -19,6 +25,14 @@
19
25
 
20
26
  .j-theme-palette .items {
21
27
  gap: var(--space);
28
+
29
+ display: grid;
30
+ grid-template-columns: repeat(3, 1fr);
31
+ }
32
+
33
+ .j-theme-palette .j-button {
34
+ min-width: 0;
35
+ overflow: hidden;
22
36
  }
23
37
 
24
38
  .j-theme-palette [data-theme-group='theme'] .j-button {
@@ -29,6 +43,10 @@
29
43
  .j-theme-palette .j-button .item-hex {
30
44
  width: var(--font-size-sm);
31
45
  height: var(--font-size-sm);
46
+
47
+ display: inline-block;
48
+ border-radius: 50%;
49
+ flex-shrink: 0;
32
50
  }
33
51
 
34
52
  .mobile .j-theme-palette {
@@ -38,4 +56,9 @@
38
56
  .mobile .j-theme-palette [data-theme-group='theme'] .j-button {
39
57
  padding-inline: 6px;
40
58
  }
59
+
60
+ .j-theme-palette .j-button .button-text {
61
+ overflow: hidden;
62
+ text-overflow: ellipsis;
63
+ }
41
64
  }
@@ -1,4 +1,4 @@
1
- @layer themes {
1
+ @layer components {
2
2
  .j-tip {
3
3
  --tip-border-color: var(--ui-border);
4
4
  --tip-bg: var(--ui-bg);
@@ -14,6 +14,20 @@
14
14
  background: var(--tip-bg);
15
15
  box-shadow: var(--shadow-xs);
16
16
  backdrop-filter: blur(2px);
17
+
18
+ position: relative;
19
+ display: grid;
20
+ grid-template-columns: 0 1fr;
21
+ align-items: flex-start;
22
+ }
23
+
24
+ .j-tip:has(.tip-icon) {
25
+ column-gap: var(--s3);
26
+ grid-template-columns: var(--s4) 1fr;
27
+ }
28
+
29
+ .j-font-md .j-tip:has(.tip-icon) {
30
+ column-gap: var(--s5);
17
31
  }
18
32
 
19
33
  .j-tip .tip-icon {
@@ -34,6 +48,27 @@
34
48
 
35
49
  .j-tip .tip-title {
36
50
  font-weight: var(--font-medium);
51
+
52
+ grid-column-start: 2;
53
+ overflow: hidden;
54
+ display: -webkit-box;
55
+ -webkit-box-orient: vertical;
56
+ -webkit-line-clamp: 1;
57
+ line-clamp: 1;
58
+ margin: 0;
59
+ }
60
+
61
+ .j-tip .tip-content {
62
+ grid-column-start: 2;
63
+ color: var(--ui-gray);
64
+ }
65
+
66
+ .j-tip .tip-content > *:first-child {
67
+ margin-top: 0;
68
+ }
69
+
70
+ .j-tip .tip-content > *:last-child {
71
+ margin-bottom: 0;
37
72
  }
38
73
 
39
74
  .j-tip.is-primary {
@@ -1,8 +1,17 @@
1
- @layer themes {
1
+ @layer components {
2
2
  .j-toast-container {
3
3
  top: var(--s2);
4
4
  right: var(--s2);
5
5
  gap: var(--s2);
6
+
7
+ position: fixed;
8
+ z-index: var(--z-toast);
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: center;
12
+ left: 50%;
13
+ transform: translateX(-50%);
14
+ pointer-events: none;
6
15
  }
7
16
 
8
17
  .j-toast {
@@ -24,10 +33,24 @@
24
33
  min-width: 200px;
25
34
  max-width: 310px;
26
35
  backdrop-filter: blur(4px);
36
+
37
+ display: flex;
38
+ align-items: center;
39
+ word-break: break-all;
40
+ cursor: pointer;
41
+ pointer-events: auto;
27
42
  }
28
43
 
29
44
  .j-toast .el-icon {
30
45
  width: var(--font-size-lg);
46
+
47
+ position: relative;
48
+ color: inherit;
49
+ }
50
+
51
+ .j-toast .el-text {
52
+ flex: 1;
53
+ word-break: normal;
31
54
  }
32
55
 
33
56
  .j-toast.is-success {
@@ -61,15 +84,33 @@
61
84
  border-radius: var(--radius-md);
62
85
  padding: var(--s2) var(--s3);
63
86
  max-width: calc(var(--screen-sm) / 2);
87
+
88
+ position: fixed;
89
+ top: 45%;
90
+ left: 50%;
91
+ z-index: var(--z-toast);
92
+ width: fit-content;
93
+ text-align: center;
94
+ user-select: none;
95
+ pointer-events: none;
96
+ transform: translate(-50%, -50%);
64
97
  }
65
98
 
66
99
  .j-toast.is-confirm {
67
100
  gap: var(--s4);
68
101
  min-width: 280px;
102
+
103
+ flex-direction: column;
104
+ align-items: flex-start;
105
+ cursor: default;
69
106
  }
70
107
 
71
108
  .j-toast.is-confirm .toast-buttons {
72
109
  width: 100%;
73
110
  gap: var(--space);
111
+
112
+ display: flex;
113
+ justify-content: flex-end;
114
+ position: relative;
74
115
  }
75
116
  }
@@ -1,13 +1,30 @@
1
- @layer themes {
1
+ @layer components {
2
2
  .j-toolbar-container {
3
3
  background: var(--ui-bg);
4
4
  border-bottom: 1px solid var(--ui-border);
5
+
6
+ position: sticky;
7
+ top: 0;
8
+ width: 100%;
9
+ z-index: var(--z-toolbar);
10
+ overflow: hidden;
11
+ overflow-x: auto;
12
+ -webkit-overflow-scrolling: touch;
13
+ scrollbar-color: transparent transparent;
14
+ scrollbar-width: none;
15
+ -ms-overflow-style: none;
16
+ scroll-behavior: smooth;
5
17
  }
6
18
 
7
19
  .j-toolbar {
8
20
  gap: 0;
9
21
  padding: var(--s2);
10
22
  box-shadow: var(--shadow-sm);
23
+
24
+ position: relative;
25
+ display: flex;
26
+ justify-content: center;
27
+ align-items: center;
11
28
  }
12
29
 
13
30
  .j-toolbar button svg {
@@ -24,6 +41,11 @@
24
41
  align-self: center;
25
42
  }
26
43
 
44
+ .editor-drop-color .color-panel {
45
+ display: grid;
46
+ grid-template-columns: repeat(5, 1fr);
47
+ }
48
+
27
49
  .editor-drop-color .color-panel button.color-btn {
28
50
  cursor: pointer;
29
51
  padding: 0;
@@ -47,4 +69,10 @@
47
69
  .j-toolbar button.is-lg svg {
48
70
  --toolbar-icon-size: var(--font-size-2xl);
49
71
  }
72
+
73
+ @media screen and (max-width: 992px) {
74
+ .j-toolbar {
75
+ justify-content: flex-start;
76
+ }
77
+ }
50
78
  }
@@ -1,4 +1,4 @@
1
- @layer themes {
1
+ @layer comopnents {
2
2
  .j-tooltip {
3
3
  --tooltip-fg: var(--ui-bg);
4
4
  --tooltip-bg: var(--ui-fg);
@@ -12,6 +12,10 @@
12
12
  border-radius: var(--radius-md);
13
13
  max-width: 260px;
14
14
  padding: 2px 4px;
15
+
16
+ position: relative;
17
+ width: fit-content;
18
+ user-select: none;
15
19
  }
16
20
 
17
21
  .j-tooltip.is-reverse {
@@ -48,11 +52,13 @@
48
52
  padding: 2px var(--s2);
49
53
  font-size: var(--font-size-md);
50
54
  line-height: var(--line-height);
55
+
56
+ word-wrap: break-word;
57
+ position: relative;
51
58
  }
52
59
 
53
60
  .drop-container:has(.j-tooltip) {
54
61
  border: unset;
55
- /* border-radius: unset; */
56
62
  background: unset;
57
63
  box-shadow: unset;
58
64
  }
@@ -1,4 +1,4 @@
1
- @layer themes {
1
+ @layer components {
2
2
  .j-tree {
3
3
  padding: 14px;
4
4
  border: 1px solid var(--ui-border-subtle);
@@ -11,6 +11,20 @@
11
11
 
12
12
  .j-tree-list {
13
13
  gap: 2px;
14
+
15
+ display: grid;
16
+ margin: 0;
17
+ padding: 0;
18
+ list-style: none;
19
+ }
20
+
21
+ /* .j-tree-list[hidden] {
22
+ display: none;
23
+ } */
24
+
25
+ .j-tree-list .j-tree-list {
26
+ padding-left: 20px;
27
+ position: relative;
14
28
  }
15
29
 
16
30
  .j-tree-list .j-tree-list::before {
@@ -19,6 +33,13 @@
19
33
  left: 7px;
20
34
  width: 1px;
21
35
  background: var(--ui-border);
36
+
37
+ position: absolute;
38
+ content: '';
39
+ }
40
+
41
+ .j-tree-item {
42
+ position: relative;
22
43
  }
23
44
 
24
45
  .j-tree-list .j-tree-list > .j-tree-item::before {
@@ -27,6 +48,9 @@
27
48
  width: 12px;
28
49
  height: 1px;
29
50
  background: var(--ui-border);
51
+
52
+ position: absolute;
53
+ content: '';
30
54
  }
31
55
 
32
56
  .j-tree-list li {
@@ -40,6 +64,13 @@
40
64
  padding: 0 4px;
41
65
  border-radius: var(--radius-sm);
42
66
  color: var(--tone-caption);
67
+
68
+ display: flex;
69
+ align-items: center;
70
+ }
71
+
72
+ .j-tree-node[role='button'] {
73
+ cursor: pointer;
43
74
  }
44
75
 
45
76
  .j-tree-node[role='button']:hover,
@@ -58,6 +89,11 @@
58
89
  width: 16px;
59
90
  height: 16px;
60
91
  color: var(--tone-caption);
92
+
93
+ display: inline-flex;
94
+ flex: 0 0 auto;
95
+ align-items: center;
96
+ justify-content: center;
61
97
  }
62
98
 
63
99
  .j-tree-item.is-directory > .j-tree-node .j-tree-icon {
@@ -69,7 +105,8 @@
69
105
  height: 16px;
70
106
  }
71
107
 
72
- .j-tree-list .j-tree-list {
73
- padding-left: 20px;
108
+ .j-tree-label {
109
+ min-width: 0;
110
+ overflow-wrap: anywhere;
74
111
  }
75
112
  }
@@ -1,47 +0,0 @@
1
- @layer components {
2
- .j-accordion {
3
- display: flex;
4
- flex-direction: column;
5
- }
6
-
7
- .j-accordion[data-direction='horizontal'] {
8
- flex-direction: row;
9
- }
10
-
11
- .j-accordion .accordion-header {
12
- display: flex;
13
- align-items: center;
14
- cursor: pointer;
15
- user-select: none;
16
- }
17
-
18
- .j-accordion .accordion-header .header-title {
19
- flex: 1;
20
- text-align: left;
21
- }
22
-
23
- .j-accordion .accordion-header .header-arrow {
24
- display: flex;
25
- justify-content: center;
26
- align-items: center;
27
- transition: transform 0.3s ease-out;
28
- }
29
-
30
- .j-accordion .accordion-panel {
31
- position: relative;
32
- }
33
-
34
- .j-accordion .accordion-panel .panel-content {
35
- position: relative;
36
- min-height: inherit;
37
- }
38
-
39
- .j-accordion[data-direction='horizontal']
40
- .accordion-panel[aria-hidden='false']
41
- .panel-content {
42
- display: flex;
43
- flex-direction: column;
44
- justify-content: center;
45
- height: 100%;
46
- }
47
- }
@@ -1,27 +0,0 @@
1
- @layer components {
2
- .j-avatar {
3
- display: inline-block;
4
- vertical-align: middle;
5
- overflow: hidden;
6
- user-select: none;
7
- object-fit: cover;
8
- }
9
-
10
- .j-avatar img,
11
- .j-avatar svg {
12
- margin: 0;
13
- }
14
-
15
- .j-avatar.is-text {
16
- display: flex;
17
- justify-content: center;
18
- align-items: center;
19
- }
20
-
21
- .j-avatar-group {
22
- display: flex;
23
- justify-content: center;
24
- align-items: center;
25
- flex-wrap: nowrap;
26
- }
27
- }
package/src/css/badge.css DELETED
@@ -1,8 +0,0 @@
1
- @layer components {
2
- .j-badge {
3
- display: inline-flex;
4
- justify-content: center;
5
- align-items: center;
6
- user-select: none;
7
- }
8
- }