vanilla-jui 1.7.31 → 1.7.32
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/dist/index.d.ts +24 -4
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/accordion.ts +22 -8
- package/src/components/flow.ts +1 -1
- package/src/components/form.ts +1 -1
- package/src/components/modal.ts +1 -1
- package/src/components/offcanvas.ts +2 -2
- package/src/components/pagination.ts +5 -5
- package/src/components/tabs.ts +132 -16
- package/src/css/animation.css +7 -3
- package/src/css/card.css +10 -10
- package/src/css/font.css +3 -6
- package/src/css/icon.css +3 -20
- package/src/css/layout.css +11 -18
- package/src/css/status.css +39 -3
- package/src/css/themes/default/accordion.css +13 -45
- package/src/css/themes/default/avatar.css +2 -3
- package/src/css/themes/default/badge.css +14 -22
- package/src/css/themes/default/breadcrumb.css +11 -12
- package/src/css/themes/default/button.css +101 -159
- package/src/css/themes/default/editor.css +36 -36
- package/src/css/themes/default/flow.css +4 -4
- package/src/css/themes/default/form.css +110 -217
- package/src/css/themes/default/loading.css +48 -63
- package/src/css/themes/default/menu.css +17 -17
- package/src/css/themes/default/modal.css +9 -9
- package/src/css/themes/default/offcanvas.css +3 -3
- package/src/css/themes/default/swiper.css +18 -18
- package/src/css/themes/default/tabs.css +38 -24
- package/src/css/themes/default/theme-palette.css +22 -18
- package/src/css/themes/default/tip.css +24 -13
- package/src/css/themes/default/toast.css +65 -45
- package/src/css/themes/default/toolbar.css +2 -2
- package/src/css/themes/default/tooltip.css +2 -3
- package/src/css/tokens.css +89 -59
- package/src/css/tokens_/345/211/257/346/234/254.css +4 -4
- package/src/icons/index.ts +9 -7
- package/src/locales/index.ts +3 -1
- package/src/primitives/theme.ts +7 -10
- package/src/primitives/toast.ts +191 -107
- package/src/utilities/browser.ts +1 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.j-tip {
|
|
3
|
-
--tip-border-color: var(--ui-border);
|
|
4
|
-
--tip-
|
|
3
|
+
--tip-border-color: var(--ui-border-subtle);
|
|
4
|
+
--tip-icon-shadow: var(--ui-bg-soft);
|
|
5
|
+
--tip-icon-bg: var(--ui-bg-soft);
|
|
5
6
|
|
|
6
|
-
row-gap:
|
|
7
|
+
row-gap: 8px;
|
|
7
8
|
width: 100%;
|
|
8
9
|
border: 1px solid var(--tip-border-color);
|
|
9
10
|
border-radius: var(--radius-md);
|
|
10
|
-
padding:
|
|
11
|
+
padding: 12px 16px;
|
|
11
12
|
font-size: var(--font-size-md);
|
|
12
13
|
background: var(--tip-bg);
|
|
13
14
|
box-shadow: var(--shadow-xs);
|
|
@@ -20,17 +21,19 @@
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
.j-tip:has(.tip-icon) {
|
|
23
|
-
column-gap:
|
|
24
|
-
grid-template-columns:
|
|
24
|
+
column-gap: 16px;
|
|
25
|
+
grid-template-columns: 16px 1fr;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
.j-font-md .j-tip:has(.tip-icon) {
|
|
28
|
-
column-gap:
|
|
29
|
+
column-gap: 20px;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
.j-tip .tip-icon {
|
|
32
|
-
transform: translateY(
|
|
33
|
-
|
|
33
|
+
transform: translateY(2px);
|
|
34
|
+
border-radius: 99px;
|
|
35
|
+
box-shadow: 0 0 0 3px var(--tip-icon-shadow);
|
|
36
|
+
background-color: var(--tip-icon-bg);
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
.j-tip .tip-icon,
|
|
@@ -75,25 +78,33 @@
|
|
|
75
78
|
|
|
76
79
|
.j-tip.is-info {
|
|
77
80
|
--tip-border-color: var(--state-info-border);
|
|
78
|
-
--tip-bg: var(--state-info-
|
|
81
|
+
--tip-bg: var(--state-info-subtle);
|
|
79
82
|
--tip-fg: var(--state-info-text);
|
|
83
|
+
--tip-icon-shadow: var(--state-info-soft);
|
|
84
|
+
--tip-icon-bg: var(--state-info-soft);
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
.j-tip.is-success {
|
|
83
88
|
--tip-border-color: var(--state-success-border);
|
|
84
|
-
--tip-bg: var(--state-success-
|
|
89
|
+
--tip-bg: var(--state-success-subtle);
|
|
85
90
|
--tip-fg: var(--state-success-text);
|
|
91
|
+
--tip-icon-shadow: var(--state-success-soft);
|
|
92
|
+
--tip-icon-bg: var(--state-success-soft);
|
|
86
93
|
}
|
|
87
94
|
|
|
88
95
|
.j-tip.is-warning {
|
|
89
96
|
--tip-border-color: var(--state-warning-border);
|
|
90
|
-
--tip-bg: var(--state-warning-
|
|
97
|
+
--tip-bg: var(--state-warning-subtle);
|
|
91
98
|
--tip-fg: var(--state-warning-text);
|
|
99
|
+
--tip-icon-shadow: var(--state-warning-soft);
|
|
100
|
+
--tip-icon-bg: var(--state-warning-soft);
|
|
92
101
|
}
|
|
93
102
|
|
|
94
103
|
.j-tip.is-error {
|
|
95
104
|
--tip-border-color: var(--state-error-border);
|
|
96
|
-
--tip-bg: var(--state-error-
|
|
105
|
+
--tip-bg: var(--state-error-subtle);
|
|
97
106
|
--tip-fg: var(--state-error-text);
|
|
107
|
+
--tip-icon-shadow: var(--state-error-soft);
|
|
108
|
+
--tip-icon-bg: var(--state-error-soft);
|
|
98
109
|
}
|
|
99
110
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.j-toast-container {
|
|
3
|
-
top:
|
|
4
|
-
right:
|
|
3
|
+
top: 16px;
|
|
4
|
+
right: 16px;
|
|
5
5
|
gap: var(--s2);
|
|
6
6
|
|
|
7
7
|
position: fixed;
|
|
@@ -14,73 +14,92 @@
|
|
|
14
14
|
pointer-events: none;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
body:has(#wpadminbar) .j-toast-container {
|
|
18
|
+
top: 32px;
|
|
19
|
+
}
|
|
20
|
+
|
|
17
21
|
.j-toast {
|
|
18
22
|
--toast-fg: var(--ui-fg);
|
|
19
23
|
--toast-bg: var(--ui-bg);
|
|
20
|
-
--toast-border-color: var(--ui-border-subtle);
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
padding: var(--s3) var(--s4);
|
|
25
|
+
padding: 12px 16px;
|
|
24
26
|
box-shadow: var(--shadow-md);
|
|
25
|
-
font-size: var(--font-size-md);
|
|
26
|
-
font-weight: var(--font-medium);
|
|
27
|
-
color: var(--toast-fg);
|
|
28
27
|
background: var(--toast-bg);
|
|
29
|
-
border: 1px solid var(--
|
|
28
|
+
border: 1px solid var(--ui-border-soft);
|
|
30
29
|
border-radius: var(--radius-md);
|
|
31
|
-
min-width:
|
|
30
|
+
min-width: 240px;
|
|
32
31
|
max-width: 310px;
|
|
33
32
|
backdrop-filter: blur(4px);
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
position: relative;
|
|
35
|
+
display: grid;
|
|
36
|
+
grid-template-columns: 0 1fr;
|
|
37
|
+
align-items: flex-start;
|
|
38
|
+
row-gap: 4px;
|
|
39
|
+
|
|
37
40
|
word-break: break-all;
|
|
38
41
|
cursor: pointer;
|
|
39
42
|
pointer-events: auto;
|
|
40
43
|
}
|
|
41
44
|
|
|
45
|
+
.j-toast:has(.el-icon) {
|
|
46
|
+
column-gap: 12px;
|
|
47
|
+
grid-template-columns: 16px 1fr;
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
.j-toast .el-icon {
|
|
43
51
|
width: var(--font-size-lg);
|
|
52
|
+
border-radius: 99px;
|
|
53
|
+
box-shadow: 0 0 0 3px var(--toast-icon-shadow);
|
|
54
|
+
background-color: var(--toast-icon-bg);
|
|
55
|
+
color: var(--toast-icon-fg);
|
|
44
56
|
|
|
57
|
+
margin-top: 2px;
|
|
45
58
|
position: relative;
|
|
46
|
-
color: inherit;
|
|
47
59
|
}
|
|
48
60
|
|
|
49
|
-
.j-toast .
|
|
50
|
-
|
|
61
|
+
.j-toast .toast-title {
|
|
62
|
+
color: var(--toast-fg);
|
|
63
|
+
font-size: var(--font-size-md);
|
|
64
|
+
font-weight: var(--font-medium);
|
|
65
|
+
|
|
51
66
|
word-break: normal;
|
|
67
|
+
grid-column-start: 2;
|
|
68
|
+
margin: 0;
|
|
52
69
|
}
|
|
53
70
|
|
|
54
|
-
.j-toast.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
71
|
+
.j-toast .toast-description {
|
|
72
|
+
grid-column-start: 2;
|
|
73
|
+
color: var(--tone-caption);
|
|
74
|
+
font-size: var(--font-size-sm);
|
|
75
|
+
}
|
|
58
76
|
|
|
59
|
-
|
|
77
|
+
.j-toast.is-info {
|
|
78
|
+
--toast-fg: var(--state-info-text);
|
|
79
|
+
--toast-icon-shadow: var(--state-info-soft);
|
|
80
|
+
--toast-icon-fg: var(--state-info-text);
|
|
81
|
+
--toast-icon-bg: var(--state-info-soft);
|
|
60
82
|
}
|
|
61
83
|
|
|
62
84
|
.j-toast.is-success {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
--toast-fg: var(--state-success);
|
|
85
|
+
--toast-fg: var(--state-success-text);
|
|
86
|
+
--toast-icon-shadow: var(--state-success-soft);
|
|
87
|
+
--toast-icon-fg: var(--state-success-text);
|
|
88
|
+
--toast-icon-bg: var(--state-success-soft);
|
|
68
89
|
}
|
|
69
90
|
|
|
70
91
|
.j-toast.is-warning {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
--toast-fg: var(--state-warning);
|
|
92
|
+
--toast-fg: var(--state-warning-text);
|
|
93
|
+
--toast-icon-shadow: var(--state-warning-soft);
|
|
94
|
+
--toast-icon-fg: var(--state-warning-text);
|
|
95
|
+
--toast-icon-bg: var(--state-warning-soft);
|
|
76
96
|
}
|
|
77
97
|
|
|
78
98
|
.j-toast.is-error {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
--toast-fg: var(--state-error);
|
|
99
|
+
--toast-fg: var(--state-error-text);
|
|
100
|
+
--toast-icon-shadow: var(--state-error-soft);
|
|
101
|
+
--toast-icon-fg: var(--state-error-text);
|
|
102
|
+
--toast-icon-bg: var(--state-error-soft);
|
|
84
103
|
}
|
|
85
104
|
|
|
86
105
|
.j-toast-lite {
|
|
@@ -88,34 +107,35 @@
|
|
|
88
107
|
color: var(--ui-bg);
|
|
89
108
|
background: var(--ui-fg);
|
|
90
109
|
border-radius: var(--radius-md);
|
|
91
|
-
padding: var(--s2)
|
|
92
|
-
max-width:
|
|
110
|
+
padding: var(--s2) 12px;
|
|
111
|
+
max-width: 288px;
|
|
112
|
+
z-index: var(--z-toast);
|
|
93
113
|
|
|
94
114
|
position: fixed;
|
|
95
|
-
top:
|
|
115
|
+
top: 40%;
|
|
96
116
|
left: 50%;
|
|
97
|
-
|
|
117
|
+
transform: translate(-50%, -50%);
|
|
98
118
|
width: fit-content;
|
|
99
119
|
text-align: center;
|
|
120
|
+
|
|
100
121
|
user-select: none;
|
|
101
122
|
pointer-events: none;
|
|
102
|
-
transform: translate(-50%, -50%);
|
|
103
123
|
}
|
|
104
124
|
|
|
105
125
|
.j-toast.is-confirm {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
gap: var(--s4);
|
|
126
|
+
gap: var(--s2);
|
|
109
127
|
min-width: 280px;
|
|
128
|
+
padding: 1rem;
|
|
110
129
|
|
|
130
|
+
display: flex;
|
|
111
131
|
flex-direction: column;
|
|
112
132
|
align-items: flex-start;
|
|
113
133
|
cursor: default;
|
|
114
134
|
}
|
|
115
135
|
|
|
116
|
-
.j-toast
|
|
136
|
+
.j-toast .toast-btns {
|
|
117
137
|
width: 100%;
|
|
118
|
-
gap:
|
|
138
|
+
gap: 4px;
|
|
119
139
|
|
|
120
140
|
display: flex;
|
|
121
141
|
justify-content: flex-end;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
.j-tooltip {
|
|
3
3
|
--tooltip-fg: var(--ui-bg);
|
|
4
4
|
--tooltip-bg: var(--ui-fg);
|
|
5
|
-
--tooltip-border-color: var(--ui-border
|
|
5
|
+
--tooltip-border-color: var(--ui-border);
|
|
6
6
|
|
|
7
7
|
background: var(--tooltip-bg);
|
|
8
8
|
color: var(--tooltip-fg);
|
|
@@ -47,12 +47,11 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.j-tooltip .el-text {
|
|
50
|
-
padding: 2px
|
|
50
|
+
padding: 2px 8px;
|
|
51
51
|
font-size: var(--font-size-md);
|
|
52
52
|
line-height: var(--line-height);
|
|
53
53
|
|
|
54
54
|
word-wrap: break-word;
|
|
55
|
-
position: relative;
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
.drop-container:has(.j-tooltip) {
|