nexa-ui-kit 0.10.0 → 0.11.0
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/components/NAlert.js +49 -28
- package/dist/components/NAlert.nexa +12 -6
- package/dist/components/NAutocomplete.js +25 -20
- package/dist/components/NAutocomplete.nexa +3 -3
- package/dist/components/NAvatar.js +1 -1
- package/dist/components/NBadge.js +1 -1
- package/dist/components/NBottomSheet.js +17 -17
- package/dist/components/NBottomSheet.nexa +2 -2
- package/dist/components/NButton.js +59 -59
- package/dist/components/NButton.nexa +10 -9
- package/dist/components/NCard.js +2 -2
- package/dist/components/NCard.nexa +1 -1
- package/dist/components/NCheckbox.js +23 -19
- package/dist/components/NCheckbox.nexa +2 -1
- package/dist/components/NChips.js +13 -10
- package/dist/components/NChips.nexa +1 -1
- package/dist/components/NDataTable.js +360 -42
- package/dist/components/NDataTable.nexa +318 -10
- package/dist/components/NDatepicker.js +52 -43
- package/dist/components/NDatepicker.nexa +3 -3
- package/dist/components/NForm.js +1 -1
- package/dist/components/NFormField.js +1 -1
- package/dist/components/NInput.js +51 -41
- package/dist/components/NInput.nexa +4 -3
- package/dist/components/NInputNumber.js +18 -13
- package/dist/components/NInputNumber.nexa +2 -2
- package/dist/components/NModal.js +34 -28
- package/dist/components/NModal.nexa +4 -4
- package/dist/components/NMultiSelect.js +47 -38
- package/dist/components/NMultiSelect.nexa +3 -3
- package/dist/components/NPaginator.js +29 -21
- package/dist/components/NPaginator.nexa +4 -4
- package/dist/components/NPassword.js +61 -47
- package/dist/components/NPassword.nexa +5 -4
- package/dist/components/NProgressBar.js +5 -5
- package/dist/components/NProgressBar.nexa +4 -4
- package/dist/components/NRadio.js +1 -1
- package/dist/components/NScrollView.js +1 -1
- package/dist/components/NSelect.js +68 -63
- package/dist/components/NSelect.nexa +4 -4
- package/dist/components/NSkeleton.js +1 -1
- package/dist/components/NSwitch.js +1 -1
- package/dist/components/NTabs.js +1 -1
- package/dist/components/NTag.js +27 -24
- package/dist/components/NTag.nexa +6 -6
- package/dist/components/NToastContainer.js +65 -49
- package/dist/components/NToastContainer.nexa +6 -3
- package/dist/components/NTooltip.js +1 -1
- package/dist/components/NTreeMenu.js +24 -22
- package/dist/components/NTreeMenu.nexa +1 -1
- package/dist/styles/tokens.css +18 -0
- package/package.json +4 -4
- package/src/components/NAlert.nexa +12 -6
- package/src/components/NAutocomplete.nexa +3 -3
- package/src/components/NBottomSheet.nexa +2 -2
- package/src/components/NButton.nexa +10 -9
- package/src/components/NCard.nexa +1 -1
- package/src/components/NCheckbox.nexa +2 -1
- package/src/components/NChips.nexa +1 -1
- package/src/components/NDataTable.nexa +318 -10
- package/src/components/NDatepicker.nexa +3 -3
- package/src/components/NInput.nexa +4 -3
- package/src/components/NInputNumber.nexa +2 -2
- package/src/components/NModal.nexa +4 -4
- package/src/components/NMultiSelect.nexa +3 -3
- package/src/components/NPaginator.nexa +4 -4
- package/src/components/NPassword.nexa +5 -4
- package/src/components/NProgressBar.nexa +4 -4
- package/src/components/NSelect.nexa +4 -4
- package/src/components/NTag.nexa +6 -6
- package/src/components/NToastContainer.nexa +6 -3
- package/src/components/NTreeMenu.nexa +1 -1
- package/src/styles/tokens.css +18 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useToast } from '../services/ToastService.js'
|
|
2
|
-
import { h, hText, effect,
|
|
2
|
+
import { h, hText, effect, defineComponent, registerComponent, reloadComponent, injectStyle, Teleport } from 'nexa-framework'
|
|
3
3
|
|
|
4
4
|
const _sfc_main = defineComponent({
|
|
5
|
-
__scopeId: 'data-v-
|
|
5
|
+
__scopeId: 'data-v-4587cf3e',
|
|
6
6
|
__hmrId: 'NToastContainer_nexa',
|
|
7
7
|
props: {
|
|
8
8
|
position: { type: String, default: 'top-right' }
|
|
@@ -17,32 +17,48 @@ const _sfc_main = defineComponent({
|
|
|
17
17
|
// Injected render function
|
|
18
18
|
_sfc_main.render = function(ctx) {
|
|
19
19
|
let { toasts, remove, positionClass, useToast, $slots, position, Fragment: _ntc_Fragment, Teleport: _ntc_Teleport } = ctx
|
|
20
|
-
return h(_ntc_Teleport, { to: "body", "data-v-
|
|
20
|
+
return h(_ntc_Teleport, { to: "body", "data-v-4587cf3e": "" }, [
|
|
21
21
|
"\n ",
|
|
22
|
-
h('div', { class: ["n-toast-container", positionClass], "data-v-
|
|
22
|
+
h('div', { class: ["n-toast-container", positionClass], "data-v-4587cf3e": "" }, [
|
|
23
23
|
"\n ",
|
|
24
24
|
(toasts.value).map((toast, index) =>
|
|
25
|
-
h('div', { class: ["n-toast", `is-${toast.type}`], key: toast.id, onClick: ($event) => { remove(toast.id) }, "data-v-
|
|
25
|
+
h('div', { class: ["n-toast", `is-${toast.type}`], key: toast.id, onClick: ($event) => { remove(toast.id) }, "data-v-4587cf3e": "" }, [
|
|
26
26
|
"\n ",
|
|
27
|
-
h('div', { class: "n-toast-body", "data-v-
|
|
27
|
+
h('div', { class: "n-toast-body", "data-v-4587cf3e": "" }, [
|
|
28
28
|
"\n ",
|
|
29
|
-
h('span', { class: "n-toast-icon", "data-v-
|
|
29
|
+
h('span', { class: "n-toast-icon", "data-v-4587cf3e": "" }, [
|
|
30
30
|
"\n ",
|
|
31
|
-
toast.type === 'success' ? '
|
|
31
|
+
(toast.type === 'success') ? h('svg', { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", "stroke-width": "3", "stroke-linecap": "round", "stroke-linejoin": "round", focusable: "false", "aria-hidden": "true", "data-v-4587cf3e": "" }, [
|
|
32
|
+
h('path', { d: "M20 6L9 17l-5-5", "data-v-4587cf3e": "" })
|
|
33
|
+
]) : (toast.type === 'error') ? h('svg', { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", "stroke-width": "3", "stroke-linecap": "round", "stroke-linejoin": "round", focusable: "false", "aria-hidden": "true", "data-v-4587cf3e": "" }, [
|
|
34
|
+
h('path', { d: "M18 6L6 18", "data-v-4587cf3e": "" }),
|
|
35
|
+
h('path', { d: "M6 6l12 12", "data-v-4587cf3e": "" })
|
|
36
|
+
]) : (toast.type === 'warning') ? h('svg', { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round", focusable: "false", "aria-hidden": "true", "data-v-4587cf3e": "" }, [
|
|
37
|
+
h('path', { d: "M12 9v4", "data-v-4587cf3e": "" }),
|
|
38
|
+
h('path', { d: "M12 17h.01", "data-v-4587cf3e": "" }),
|
|
39
|
+
h('path', { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z", "data-v-4587cf3e": "" })
|
|
40
|
+
]) : (true) ? h('svg', { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", "stroke-width": "3", "stroke-linecap": "round", "stroke-linejoin": "round", focusable: "false", "aria-hidden": "true", "data-v-4587cf3e": "" }, [
|
|
41
|
+
h('circle', { cx: "12", cy: "12", r: "10", "data-v-4587cf3e": "" }),
|
|
42
|
+
h('line', { x1: "12", y1: "16", x2: "12", y2: "12", "data-v-4587cf3e": "" }),
|
|
43
|
+
h('line', { x1: "12", y1: "8", x2: "12.01", y2: "8", "data-v-4587cf3e": "" })
|
|
44
|
+
]) : null,
|
|
32
45
|
"\n "
|
|
33
46
|
]),
|
|
34
47
|
"\n ",
|
|
35
|
-
h('span', { class: "n-toast-message", "data-v-
|
|
48
|
+
h('span', { class: "n-toast-message", "data-v-4587cf3e": "" }, [
|
|
36
49
|
toast.message
|
|
37
50
|
]),
|
|
38
51
|
"\n ",
|
|
39
|
-
h('button', { class: "n-toast-dismiss", onClick: ($event) => { $event.stopPropagation(); (($event) => { remove(toast.id) })($event) }, "aria-label": "Dismiss", "data-v-
|
|
40
|
-
"
|
|
52
|
+
h('button', { class: "n-toast-dismiss", onClick: ($event) => { $event.stopPropagation(); (($event) => { remove(toast.id) })($event) }, "aria-label": "Dismiss", "data-v-4587cf3e": "" }, [
|
|
53
|
+
h('svg', { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", focusable: "false", "aria-hidden": "true", "data-v-4587cf3e": "" }, [
|
|
54
|
+
h('path', { d: "M18 6L6 18", "data-v-4587cf3e": "" }),
|
|
55
|
+
h('path', { d: "M6 6l12 12", "data-v-4587cf3e": "" })
|
|
56
|
+
])
|
|
41
57
|
]),
|
|
42
58
|
"\n "
|
|
43
59
|
]),
|
|
44
60
|
"\n ",
|
|
45
|
-
(toast.duration > 0) ? h('div', { class: "n-toast-progress", style: { animationDuration: toast.duration + 'ms' }, "data-v-
|
|
61
|
+
(toast.duration > 0) ? h('div', { class: "n-toast-progress", style: { animationDuration: toast.duration + 'ms' }, "data-v-4587cf3e": "" }) : null
|
|
46
62
|
])
|
|
47
63
|
),
|
|
48
64
|
"\n "
|
|
@@ -50,12 +66,12 @@ _sfc_main.render = function(ctx) {
|
|
|
50
66
|
"\n "
|
|
51
67
|
])
|
|
52
68
|
}
|
|
53
|
-
_sfc_main.__scopeId = 'data-v-
|
|
69
|
+
_sfc_main.__scopeId = 'data-v-4587cf3e'
|
|
54
70
|
_sfc_main.__hmrId = 'NToastContainer_nexa'
|
|
55
71
|
|
|
56
72
|
export default _sfc_main
|
|
57
73
|
|
|
58
|
-
const __style = `.n-toast-container[data-v-
|
|
74
|
+
const __style = `.n-toast-container[data-v-4587cf3e]{
|
|
59
75
|
position: fixed;
|
|
60
76
|
z-index: var(--n-z-toast);
|
|
61
77
|
display: flex;
|
|
@@ -65,40 +81,40 @@ const __style = `.n-toast-container[data-v-8ac4158]{
|
|
|
65
81
|
padding: var(--n-space-4);
|
|
66
82
|
}
|
|
67
83
|
|
|
68
|
-
.is-top-right[data-v-
|
|
84
|
+
.is-top-right[data-v-4587cf3e]{
|
|
69
85
|
top: 0;
|
|
70
86
|
right: 0;
|
|
71
87
|
align-items: flex-end;
|
|
72
88
|
}
|
|
73
89
|
|
|
74
|
-
.is-top-left[data-v-
|
|
90
|
+
.is-top-left[data-v-4587cf3e]{
|
|
75
91
|
top: 0;
|
|
76
92
|
left: 0;
|
|
77
93
|
align-items: flex-start;
|
|
78
94
|
}
|
|
79
95
|
|
|
80
|
-
.is-bottom-right[data-v-
|
|
96
|
+
.is-bottom-right[data-v-4587cf3e]{
|
|
81
97
|
bottom: 0;
|
|
82
98
|
right: 0;
|
|
83
99
|
align-items: flex-end;
|
|
84
100
|
flex-direction: column-reverse;
|
|
85
101
|
}
|
|
86
102
|
|
|
87
|
-
.is-bottom-left[data-v-
|
|
103
|
+
.is-bottom-left[data-v-4587cf3e]{
|
|
88
104
|
bottom: 0;
|
|
89
105
|
left: 0;
|
|
90
106
|
align-items: flex-start;
|
|
91
107
|
flex-direction: column-reverse;
|
|
92
108
|
}
|
|
93
109
|
|
|
94
|
-
.is-top-center[data-v-
|
|
110
|
+
.is-top-center[data-v-4587cf3e]{
|
|
95
111
|
top: 0;
|
|
96
112
|
left: 50%;
|
|
97
113
|
transform: translateX(-50%);
|
|
98
114
|
align-items: center;
|
|
99
115
|
}
|
|
100
116
|
|
|
101
|
-
.n-toast[data-v-
|
|
117
|
+
.n-toast[data-v-4587cf3e]{
|
|
102
118
|
pointer-events: auto;
|
|
103
119
|
min-width: 300px;
|
|
104
120
|
max-width: 420px;
|
|
@@ -108,52 +124,52 @@ const __style = `.n-toast-container[data-v-8ac4158]{
|
|
|
108
124
|
overflow: hidden;
|
|
109
125
|
box-shadow: var(--n-shadow-lg);
|
|
110
126
|
cursor: pointer;
|
|
111
|
-
animation: n-toast-in
|
|
127
|
+
animation: n-toast-in var(--n-transition-spring);
|
|
112
128
|
transition: all var(--n-transition-fast);
|
|
113
129
|
}
|
|
114
130
|
|
|
115
|
-
.n-toast[data-v-
|
|
131
|
+
.n-toast[data-v-4587cf3e]:hover{
|
|
116
132
|
transform: scale(1.02);
|
|
117
133
|
background: var(--n-color-surface-alt);
|
|
118
134
|
}
|
|
119
135
|
|
|
120
136
|
@keyframes n-toast-in {
|
|
121
|
-
from[data-v-
|
|
137
|
+
from[data-v-4587cf3e]{
|
|
122
138
|
opacity: 0;
|
|
123
139
|
transform: translateX(30px) scale(0.95);
|
|
124
140
|
}
|
|
125
|
-
to[data-v-
|
|
141
|
+
to[data-v-4587cf3e]{
|
|
126
142
|
opacity: 1;
|
|
127
143
|
transform: translateX(0) scale(1);
|
|
128
144
|
}
|
|
129
145
|
}
|
|
130
146
|
|
|
131
|
-
.is-top-left .n-toast[data-v-
|
|
147
|
+
.is-top-left .n-toast[data-v-4587cf3e]{
|
|
132
148
|
animation-name: n-toast-in-left;
|
|
133
149
|
}
|
|
134
150
|
|
|
135
151
|
@keyframes n-toast-in-left {
|
|
136
|
-
from[data-v-
|
|
152
|
+
from[data-v-4587cf3e]{
|
|
137
153
|
opacity: 0;
|
|
138
154
|
transform: translateX(-30px) scale(0.95);
|
|
139
155
|
}
|
|
140
|
-
to[data-v-
|
|
156
|
+
to[data-v-4587cf3e]{
|
|
141
157
|
opacity: 1;
|
|
142
158
|
transform: translateX(0) scale(1);
|
|
143
159
|
}
|
|
144
160
|
}
|
|
145
161
|
|
|
146
|
-
.is-bottom-right .n-toast[data-v-
|
|
147
|
-
.is-bottom-left .n-toast[data-v-
|
|
162
|
+
.is-bottom-right .n-toast[data-v-4587cf3e],
|
|
163
|
+
.is-bottom-left .n-toast[data-v-4587cf3e]{
|
|
148
164
|
animation-name: n-toast-in-up;
|
|
149
165
|
}
|
|
150
166
|
|
|
151
167
|
@keyframes n-toast-in-up {
|
|
152
|
-
from[data-v-
|
|
168
|
+
from[data-v-4587cf3e]{
|
|
153
169
|
opacity: 0;
|
|
154
170
|
transform: translateY(20px) scale(0.95);
|
|
155
171
|
}
|
|
156
|
-
to[data-v-
|
|
172
|
+
to[data-v-4587cf3e]{
|
|
157
173
|
opacity: 1;
|
|
158
174
|
transform: translateY(0) scale(1);
|
|
159
175
|
}
|
|
@@ -166,7 +182,7 @@ to[data-v-8ac4158]{
|
|
|
166
182
|
padding: var(--n-space-4) var(--n-space-5);
|
|
167
183
|
}
|
|
168
184
|
|
|
169
|
-
.n-toast-icon[data-v-
|
|
185
|
+
.n-toast-icon[data-v-4587cf3e]{
|
|
170
186
|
width: 28px;
|
|
171
187
|
height: 28px;
|
|
172
188
|
border-radius: var(--n-radius-full);
|
|
@@ -178,12 +194,12 @@ to[data-v-8ac4158]{
|
|
|
178
194
|
flex-shrink: 0;
|
|
179
195
|
}
|
|
180
196
|
|
|
181
|
-
.is-success .n-toast-icon[data-v-
|
|
182
|
-
.is-error .n-toast-icon[data-v-
|
|
183
|
-
.is-info .n-toast-icon[data-v-
|
|
184
|
-
.is-warning .n-toast-icon[data-v-
|
|
197
|
+
.is-success .n-toast-icon[data-v-4587cf3e]{ background: var(--n-color-success); color: white; }
|
|
198
|
+
.is-error .n-toast-icon[data-v-4587cf3e]{ background: var(--n-color-danger); color: white; }
|
|
199
|
+
.is-info .n-toast-icon[data-v-4587cf3e]{ background: var(--n-color-primary); color: white; }
|
|
200
|
+
.is-warning .n-toast-icon[data-v-4587cf3e]{ background: var(--n-color-warning); color: white; }
|
|
185
201
|
|
|
186
|
-
.n-toast-message[data-v-
|
|
202
|
+
.n-toast-message[data-v-4587cf3e]{
|
|
187
203
|
color: var(--n-color-text);
|
|
188
204
|
font-size: var(--n-text-sm);
|
|
189
205
|
font-weight: var(--n-weight-medium);
|
|
@@ -191,7 +207,7 @@ to[data-v-8ac4158]{
|
|
|
191
207
|
line-height: var(--n-leading-normal);
|
|
192
208
|
}
|
|
193
209
|
|
|
194
|
-
.n-toast-dismiss[data-v-
|
|
210
|
+
.n-toast-dismiss[data-v-4587cf3e]{
|
|
195
211
|
background: transparent;
|
|
196
212
|
border: none;
|
|
197
213
|
color: var(--n-color-text-muted);
|
|
@@ -204,22 +220,22 @@ to[data-v-8ac4158]{
|
|
|
204
220
|
flex-shrink: 0;
|
|
205
221
|
}
|
|
206
222
|
|
|
207
|
-
.n-toast[data-v-
|
|
223
|
+
.n-toast[data-v-4587cf3e]:hover .n-toast-dismiss{
|
|
208
224
|
opacity: 1;
|
|
209
225
|
}
|
|
210
226
|
|
|
211
|
-
.n-toast-dismiss[data-v-
|
|
227
|
+
.n-toast-dismiss[data-v-4587cf3e]:hover{
|
|
212
228
|
color: var(--n-color-text);
|
|
213
229
|
}
|
|
214
230
|
|
|
215
|
-
.n-toast-progress[data-v-
|
|
231
|
+
.n-toast-progress[data-v-4587cf3e]{
|
|
216
232
|
height: 3px;
|
|
217
233
|
background: var(--n-color-border);
|
|
218
234
|
position: relative;
|
|
219
235
|
overflow: hidden;
|
|
220
236
|
}
|
|
221
237
|
|
|
222
|
-
.n-toast-progress[data-v-
|
|
238
|
+
.n-toast-progress[data-v-4587cf3e]::after{
|
|
223
239
|
content: '';
|
|
224
240
|
position: absolute;
|
|
225
241
|
top: 0;
|
|
@@ -230,13 +246,13 @@ to[data-v-8ac4158]{
|
|
|
230
246
|
animation: n-toast-shrink linear forwards;
|
|
231
247
|
}
|
|
232
248
|
|
|
233
|
-
.is-success .n-toast-progress[data-v-
|
|
234
|
-
.is-error .n-toast-progress[data-v-
|
|
235
|
-
.is-info .n-toast-progress[data-v-
|
|
236
|
-
.is-warning .n-toast-progress[data-v-
|
|
249
|
+
.is-success .n-toast-progress[data-v-4587cf3e]::after{ background: var(--n-color-success); }
|
|
250
|
+
.is-error .n-toast-progress[data-v-4587cf3e]::after{ background: var(--n-color-danger); }
|
|
251
|
+
.is-info .n-toast-progress[data-v-4587cf3e]::after{ background: var(--n-color-primary); }
|
|
252
|
+
.is-warning .n-toast-progress[data-v-4587cf3e]::after{ background: var(--n-color-warning); }
|
|
237
253
|
|
|
238
254
|
@keyframes n-toast-shrink {
|
|
239
|
-
from[data-v-
|
|
240
|
-
to[data-v-
|
|
255
|
+
from[data-v-4587cf3e]{ transform: scaleX(1); }
|
|
256
|
+
to[data-v-4587cf3e]{ transform: scaleX(0); }
|
|
241
257
|
}`
|
|
242
|
-
injectStyle('data-v-
|
|
258
|
+
injectStyle('data-v-4587cf3e', __style)
|
|
@@ -22,10 +22,13 @@ const positionClass = `is-${props.position.replace('-', '-')}`
|
|
|
22
22
|
>
|
|
23
23
|
<div class="n-toast-body">
|
|
24
24
|
<span class="n-toast-icon">
|
|
25
|
-
|
|
25
|
+
<svg v-if="toast.type === 'success'" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><path d="M20 6L9 17l-5-5"/></svg>
|
|
26
|
+
<svg v-else-if="toast.type === 'error'" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><path d="M18 6L6 18"/><path d="M6 6l12 12"/></svg>
|
|
27
|
+
<svg v-else-if="toast.type === 'warning'" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><path d="M12 9v4"/><path d="M12 17h.01"/><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/></svg>
|
|
28
|
+
<svg v-else viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>
|
|
26
29
|
</span>
|
|
27
30
|
<span class="n-toast-message">{{ toast.message }}</span>
|
|
28
|
-
<button class="n-toast-dismiss" @click.stop="remove(toast.id)" aria-label="Dismiss"
|
|
31
|
+
<button class="n-toast-dismiss" @click.stop="remove(toast.id)" aria-label="Dismiss"><svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><path d="M18 6L6 18"/><path d="M6 6l12 12"/></svg></button>
|
|
29
32
|
</div>
|
|
30
33
|
<div v-if="toast.duration > 0" class="n-toast-progress" :style="{ animationDuration: toast.duration + 'ms' }"></div>
|
|
31
34
|
</div>
|
|
@@ -87,7 +90,7 @@ const positionClass = `is-${props.position.replace('-', '-')}`
|
|
|
87
90
|
overflow: hidden;
|
|
88
91
|
box-shadow: var(--n-shadow-lg);
|
|
89
92
|
cursor: pointer;
|
|
90
|
-
animation: n-toast-in
|
|
93
|
+
animation: n-toast-in var(--n-transition-spring);
|
|
91
94
|
transition: all var(--n-transition-fast);
|
|
92
95
|
}
|
|
93
96
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { signal, h, hText, effect,
|
|
1
|
+
import { signal, h, hText, effect, defineComponent, registerComponent, reloadComponent, injectStyle, Teleport } from 'nexa-framework'
|
|
2
2
|
import { trackFloatingOverlay } from '../services/FloatingOverlay.js'
|
|
3
3
|
|
|
4
4
|
const _sfc_main = defineComponent({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { signal, computed, h, hText, effect,
|
|
1
|
+
import { signal, computed, h, hText, effect, defineComponent, registerComponent, reloadComponent, injectStyle } from 'nexa-framework'
|
|
2
2
|
|
|
3
3
|
const _sfc_main = defineComponent({
|
|
4
|
-
__scopeId: 'data-v-
|
|
4
|
+
__scopeId: 'data-v-1dc3f956',
|
|
5
5
|
__hmrId: 'NTreeMenu_nexa',
|
|
6
6
|
props: {
|
|
7
7
|
items: { type: Array, default: () => [] },
|
|
@@ -48,21 +48,23 @@ const _sfc_main = defineComponent({
|
|
|
48
48
|
// Injected render function
|
|
49
49
|
_sfc_main.render = function(ctx) {
|
|
50
50
|
let { expanded, toggleExpand, selectItem, hasChildren, isExpanded, isSelected, flatTree, toggle, $slots, emit, items, selectable, selected, Fragment: _ntc_Fragment } = ctx
|
|
51
|
-
return h('div', { class: "n-tree-menu", "data-v-
|
|
51
|
+
return h('div', { class: "n-tree-menu", "data-v-1dc3f956": "" }, [
|
|
52
52
|
"\n ",
|
|
53
53
|
(flatTree.value).map((item, index) =>
|
|
54
|
-
h('div', { class: ["n-tree-item", { 'is-selected': isSelected(item.id) }], key: item.id, style: { '--n-tree-depth': String(item._depth) }, "data-v-
|
|
54
|
+
h('div', { class: ["n-tree-item", { 'is-selected': isSelected(item.id) }], key: item.id, style: { '--n-tree-depth': String(item._depth) }, "data-v-1dc3f956": "" }, [
|
|
55
55
|
"\n ",
|
|
56
|
-
h('div', { class: "n-tree-row", onClick: ($event) => { selectItem(item) }, "data-v-
|
|
56
|
+
h('div', { class: "n-tree-row", onClick: ($event) => { selectItem(item) }, "data-v-1dc3f956": "" }, [
|
|
57
57
|
"\n ",
|
|
58
|
-
(hasChildren(item)) ? h('button', { class: ["n-tree-toggle", { 'is-expanded': isExpanded(item.id) }], onClick: ($event) => { toggle(item.id, $event) }, "data-v-
|
|
59
|
-
"
|
|
60
|
-
|
|
58
|
+
(hasChildren(item)) ? h('button', { class: ["n-tree-toggle", { 'is-expanded': isExpanded(item.id) }], onClick: ($event) => { toggle(item.id, $event) }, "data-v-1dc3f956": "" }, [
|
|
59
|
+
h('svg', { viewBox: "0 0 24 24", width: "12", height: "12", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", focusable: "false", "aria-hidden": "true", "data-v-1dc3f956": "" }, [
|
|
60
|
+
h('path', { d: "M9 18l6-6-6-6", "data-v-1dc3f956": "" })
|
|
61
|
+
])
|
|
62
|
+
]) : (true) ? h('span', { class: "n-tree-toggle-placeholder", "data-v-1dc3f956": "" }) : null,
|
|
61
63
|
"\n ",
|
|
62
|
-
(item.icon) ? h('span', { class: "n-tree-icon", "data-v-
|
|
64
|
+
(item.icon) ? h('span', { class: "n-tree-icon", "data-v-1dc3f956": "" }, [
|
|
63
65
|
item.icon
|
|
64
66
|
]) : null,
|
|
65
|
-
h('span', { class: "n-tree-label", "data-v-
|
|
67
|
+
h('span', { class: "n-tree-label", "data-v-1dc3f956": "" }, [
|
|
66
68
|
item.label
|
|
67
69
|
]),
|
|
68
70
|
"\n "
|
|
@@ -73,22 +75,22 @@ _sfc_main.render = function(ctx) {
|
|
|
73
75
|
"\n "
|
|
74
76
|
])
|
|
75
77
|
}
|
|
76
|
-
_sfc_main.__scopeId = 'data-v-
|
|
78
|
+
_sfc_main.__scopeId = 'data-v-1dc3f956'
|
|
77
79
|
_sfc_main.__hmrId = 'NTreeMenu_nexa'
|
|
78
80
|
|
|
79
81
|
export default _sfc_main
|
|
80
82
|
|
|
81
|
-
const __style = `.n-tree-menu[data-v-
|
|
83
|
+
const __style = `.n-tree-menu[data-v-1dc3f956]{
|
|
82
84
|
font-family: var(--n-font-sans);
|
|
83
85
|
font-size: var(--n-text-sm);
|
|
84
86
|
user-select: none;
|
|
85
87
|
}
|
|
86
88
|
|
|
87
|
-
.n-tree-item[data-v-
|
|
89
|
+
.n-tree-item[data-v-1dc3f956]{
|
|
88
90
|
--n-tree-depth: 0;
|
|
89
91
|
}
|
|
90
92
|
|
|
91
|
-
.n-tree-row[data-v-
|
|
93
|
+
.n-tree-row[data-v-1dc3f956]{
|
|
92
94
|
display: flex;
|
|
93
95
|
align-items: center;
|
|
94
96
|
gap: 0.35rem;
|
|
@@ -100,17 +102,17 @@ const __style = `.n-tree-menu[data-v-44b3942a]{
|
|
|
100
102
|
color: var(--n-color-text);
|
|
101
103
|
}
|
|
102
104
|
|
|
103
|
-
.n-tree-row[data-v-
|
|
105
|
+
.n-tree-row[data-v-1dc3f956]:hover{
|
|
104
106
|
background: var(--n-color-surface-hover);
|
|
105
107
|
}
|
|
106
108
|
|
|
107
|
-
.n-tree-item.is-selected > .n-tree-row[data-v-
|
|
109
|
+
.n-tree-item.is-selected > .n-tree-row[data-v-1dc3f956]{
|
|
108
110
|
background: var(--n-color-primary-light);
|
|
109
111
|
color: var(--n-color-primary);
|
|
110
112
|
font-weight: var(--n-weight-semibold);
|
|
111
113
|
}
|
|
112
114
|
|
|
113
|
-
.n-tree-toggle[data-v-
|
|
115
|
+
.n-tree-toggle[data-v-1dc3f956]{
|
|
114
116
|
background: none;
|
|
115
117
|
border: none;
|
|
116
118
|
color: var(--n-color-text-muted);
|
|
@@ -126,26 +128,26 @@ const __style = `.n-tree-menu[data-v-44b3942a]{
|
|
|
126
128
|
flex-shrink: 0;
|
|
127
129
|
}
|
|
128
130
|
|
|
129
|
-
.n-tree-toggle.is-expanded[data-v-
|
|
131
|
+
.n-tree-toggle.is-expanded[data-v-1dc3f956]{
|
|
130
132
|
transform: rotate(90deg);
|
|
131
133
|
}
|
|
132
134
|
|
|
133
|
-
.n-tree-toggle-placeholder[data-v-
|
|
135
|
+
.n-tree-toggle-placeholder[data-v-1dc3f956]{
|
|
134
136
|
width: 16px;
|
|
135
137
|
height: 16px;
|
|
136
138
|
flex-shrink: 0;
|
|
137
139
|
}
|
|
138
140
|
|
|
139
|
-
.n-tree-icon[data-v-
|
|
141
|
+
.n-tree-icon[data-v-1dc3f956]{
|
|
140
142
|
font-size: 1rem;
|
|
141
143
|
flex-shrink: 0;
|
|
142
144
|
}
|
|
143
145
|
|
|
144
|
-
.n-tree-label[data-v-
|
|
146
|
+
.n-tree-label[data-v-1dc3f956]{
|
|
145
147
|
flex: 1;
|
|
146
148
|
min-width: 0;
|
|
147
149
|
overflow: hidden;
|
|
148
150
|
text-overflow: ellipsis;
|
|
149
151
|
white-space: nowrap;
|
|
150
152
|
}`
|
|
151
|
-
injectStyle('data-v-
|
|
153
|
+
injectStyle('data-v-1dc3f956', __style)
|
|
@@ -59,7 +59,7 @@ const toggle = (id, e) => {
|
|
|
59
59
|
class="n-tree-toggle"
|
|
60
60
|
:class="{ 'is-expanded': isExpanded(item.id) }"
|
|
61
61
|
@click="toggle(item.id, $event)"
|
|
62
|
-
|
|
62
|
+
><svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><path d="M9 18l6-6-6-6"/></svg></button>
|
|
63
63
|
<span v-else class="n-tree-toggle-placeholder"></span>
|
|
64
64
|
<span v-if="item.icon" class="n-tree-icon">{{ item.icon }}</span>
|
|
65
65
|
<span class="n-tree-label">{{ item.label }}</span>
|
package/dist/styles/tokens.css
CHANGED
|
@@ -44,6 +44,15 @@
|
|
|
44
44
|
--n-color-glass-border: rgba(255, 255, 255, 0.08);
|
|
45
45
|
--n-color-glass-hover: rgba(255, 255, 255, 0.08);
|
|
46
46
|
|
|
47
|
+
--n-color-primary-border: rgba(59, 130, 246, 0.2);
|
|
48
|
+
--n-color-success-border: rgba(16, 185, 129, 0.2);
|
|
49
|
+
--n-color-warning-border: rgba(245, 158, 11, 0.2);
|
|
50
|
+
--n-color-danger-border: rgba(239, 68, 68, 0.2);
|
|
51
|
+
--n-color-info-border: rgba(6, 182, 212, 0.2);
|
|
52
|
+
|
|
53
|
+
--n-color-stripe: rgba(255, 255, 255, 0.12);
|
|
54
|
+
--n-shadow-top-lg: 0 -10px 25px -5px rgba(0, 0, 0, 0.3);
|
|
55
|
+
|
|
47
56
|
/* ─── Typography ─── */
|
|
48
57
|
--n-font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
49
58
|
--n-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
|
|
@@ -158,6 +167,15 @@
|
|
|
158
167
|
--n-color-glass-border: rgba(0, 0, 0, 0.06);
|
|
159
168
|
--n-color-glass-hover: rgba(255, 255, 255, 0.8);
|
|
160
169
|
|
|
170
|
+
--n-color-primary-border: rgba(37, 99, 235, 0.2);
|
|
171
|
+
--n-color-success-border: rgba(5, 150, 105, 0.2);
|
|
172
|
+
--n-color-warning-border: rgba(217, 119, 6, 0.2);
|
|
173
|
+
--n-color-danger-border: rgba(220, 38, 38, 0.2);
|
|
174
|
+
--n-color-info-border: rgba(8, 145, 178, 0.2);
|
|
175
|
+
|
|
176
|
+
--n-color-stripe: rgba(0, 0, 0, 0.08);
|
|
177
|
+
--n-shadow-top-lg: 0 -10px 25px -5px rgba(0, 0, 0, 0.2);
|
|
178
|
+
|
|
161
179
|
--n-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
162
180
|
--n-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
|
|
163
181
|
--n-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexa-ui-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Premium component library for Nexa Framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"src"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"nexa-framework": "0.
|
|
26
|
-
"nexa-mobile": "0.
|
|
25
|
+
"nexa-framework": "0.11.0",
|
|
26
|
+
"nexa-mobile": "0.11.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"cpx": "^1.5.0",
|
|
30
|
-
"nexa-compiler": "0.
|
|
30
|
+
"nexa-compiler": "0.11.0"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsc && node scripts/compile-nexa.js && node scripts/patch-imports.js && cpx \"src/**/*.nexa\" dist && cpx \"src/styles/*.css\" dist/styles",
|
|
@@ -22,12 +22,18 @@ const icons = { success: '✓', error: '✕', warning: '⚡', info: 'ℹ' }
|
|
|
22
22
|
|
|
23
23
|
<template>
|
|
24
24
|
<div v-if="visible.value" class="n-alert" :class="`is-${variant}`">
|
|
25
|
-
<span class="n-alert-icon">
|
|
25
|
+
<span class="n-alert-icon">
|
|
26
|
+
<template v-if="icon">{{ icon }}</template>
|
|
27
|
+
<svg v-else-if="variant === 'success'" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><path d="M20 6L9 17l-5-5"/></svg>
|
|
28
|
+
<svg v-else-if="variant === 'error'" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>
|
|
29
|
+
<svg v-else-if="variant === 'warning'" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
|
|
30
|
+
<svg v-else viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>
|
|
31
|
+
</span>
|
|
26
32
|
<div class="n-alert-body">
|
|
27
33
|
<span v-if="title" class="n-alert-title">{{ title }}</span>
|
|
28
34
|
<span class="n-alert-text"><slot /></span>
|
|
29
35
|
</div>
|
|
30
|
-
<button v-if="closable" class="n-alert-close" @click="dismiss"
|
|
36
|
+
<button v-if="closable" class="n-alert-close" @click="dismiss" aria-label="Close"><svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><path d="M18 6L6 18"/><path d="M6 6l12 12"/></svg></button>
|
|
31
37
|
</div>
|
|
32
38
|
</template>
|
|
33
39
|
|
|
@@ -51,25 +57,25 @@ const icons = { success: '✓', error: '✕', warning: '⚡', info: 'ℹ' }
|
|
|
51
57
|
|
|
52
58
|
.is-info {
|
|
53
59
|
background: var(--n-color-primary-light);
|
|
54
|
-
border-color:
|
|
60
|
+
border-color: var(--n-color-primary-border);
|
|
55
61
|
color: var(--n-color-primary);
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
.is-success {
|
|
59
65
|
background: var(--n-color-success-light);
|
|
60
|
-
border-color:
|
|
66
|
+
border-color: var(--n-color-success-border);
|
|
61
67
|
color: var(--n-color-success);
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
.is-warning {
|
|
65
71
|
background: var(--n-color-warning-light);
|
|
66
|
-
border-color:
|
|
72
|
+
border-color: var(--n-color-warning-border);
|
|
67
73
|
color: var(--n-color-warning);
|
|
68
74
|
}
|
|
69
75
|
|
|
70
76
|
.is-error {
|
|
71
77
|
background: var(--n-color-danger-light);
|
|
72
|
-
border-color:
|
|
78
|
+
border-color: var(--n-color-danger-border);
|
|
73
79
|
color: var(--n-color-danger);
|
|
74
80
|
}
|
|
75
81
|
|
|
@@ -37,8 +37,8 @@ onBeforeUnmount(() => { clearTimeout(completeTimer); close() })
|
|
|
37
37
|
<div class="n-ac-input-wrap" :class="{ 'is-disabled': disabled }">
|
|
38
38
|
<input class="n-ac-input" :id="inputId" :value="modelValue" :placeholder="placeholder" :disabled="disabled" :readonly="readonly" role="combobox" aria-autocomplete="list" :aria-expanded="isOpen.value" :aria-controls="listboxId" :aria-activedescendant="activeId.value || undefined" @input="onInput" @focus="onFocus" @keydown="onKeydown" />
|
|
39
39
|
<div class="n-ac-actions">
|
|
40
|
-
<button v-if="clearable && modelValue" type="button" class="n-ac-action" :disabled="disabled || readonly" aria-label="
|
|
41
|
-
<button v-if="dropdown" type="button" class="n-ac-action" :disabled="disabled || readonly" aria-label="
|
|
40
|
+
<button v-if="clearable && modelValue" type="button" class="n-ac-action" :disabled="disabled || readonly" aria-label="Clear" @click="clearValue"><svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><path d="M18 6L6 18"/><path d="M6 6l12 12"/></svg></button>
|
|
41
|
+
<button v-if="dropdown" type="button" class="n-ac-action" :disabled="disabled || readonly" aria-label="Open" @click="openAll"><svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg></button>
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
44
44
|
<Teleport to="body">
|
|
@@ -54,5 +54,5 @@ onBeforeUnmount(() => { clearTimeout(completeTimer); close() })
|
|
|
54
54
|
</template>
|
|
55
55
|
|
|
56
56
|
<style scoped>
|
|
57
|
-
.n-ac{display:flex;flex-direction:column;gap:var(--n-space-2);width:100%;font-family:var(--n-font-sans)}.n-ac-label{display:block;font-size:var(--n-text-sm);font-weight:var(--n-weight-medium);color:var(--n-color-text-secondary);margin-bottom:var(--n-space-2)}.n-ac-input-wrap{position:relative;display:flex;align-items:center;background:var(--n-color-surface);border:1px solid var(--n-color-border);border-radius:var(--n-radius-md);transition:all var(--n-transition-fast)}.n-ac-input-wrap:focus-within{border-color:var(--n-color-primary);box-shadow:0 0 0 3px var(--n-color-primary-light)}.n-ac-input{width:100%;background:transparent;border:none;outline:none;padding:0.75rem 2.75rem 0.75rem 1rem;color:var(--n-color-text);font-size:var(--n-text-base);font-family:inherit}.n-ac-input::placeholder{color:var(--n-color-text-muted)}.n-ac-actions{position:absolute;right:0.5rem;display:flex;align-items:center;gap:0.15rem}.n-ac-action{background:transparent;border:none;color:var(--n-color-text-muted);cursor:pointer;padding:0.25rem;border-radius:var(--n-radius-sm);transition:all var(--n-transition-fast);line-height:1;display:flex;align-items:center}.n-ac-action:hover:not(:disabled){color:var(--n-color-text);background:var(--n-color-glass)}.n-ac-action:disabled{opacity:0.5;cursor:not-allowed}.n-ac-input-wrap.is-disabled{opacity:0.5;cursor:not-allowed;background:var(--n-color-surface-alt)}.n-ac-popup{background:var(--n-color-surface);border:1px solid var(--n-color-border);border-radius:var(--n-radius-md);box-shadow:var(--n-shadow-lg);overflow:hidden;animation:n-ac-in .2s
|
|
57
|
+
.n-ac{display:flex;flex-direction:column;gap:var(--n-space-2);width:100%;font-family:var(--n-font-sans)}.n-ac-label{display:block;font-size:var(--n-text-sm);font-weight:var(--n-weight-medium);color:var(--n-color-text-secondary);margin-bottom:var(--n-space-2)}.n-ac-input-wrap{position:relative;display:flex;align-items:center;background:var(--n-color-surface);border:1px solid var(--n-color-border);border-radius:var(--n-radius-md);transition:all var(--n-transition-fast)}.n-ac-input-wrap:focus-within{border-color:var(--n-color-primary);box-shadow:0 0 0 3px var(--n-color-primary-light)}.n-ac-input{width:100%;background:transparent;border:none;outline:none;padding:0.75rem 2.75rem 0.75rem 1rem;color:var(--n-color-text);font-size:var(--n-text-base);font-family:inherit}.n-ac-input::placeholder{color:var(--n-color-text-muted)}.n-ac-actions{position:absolute;right:0.5rem;display:flex;align-items:center;gap:0.15rem}.n-ac-action{background:transparent;border:none;color:var(--n-color-text-muted);cursor:pointer;padding:0.25rem;border-radius:var(--n-radius-sm);transition:all var(--n-transition-fast);line-height:1;display:flex;align-items:center}.n-ac-action:hover:not(:disabled){color:var(--n-color-text);background:var(--n-color-glass)}.n-ac-action:disabled{opacity:0.5;cursor:not-allowed}.n-ac-input-wrap.is-disabled{opacity:0.5;cursor:not-allowed;background:var(--n-color-surface-alt)}.n-ac-popup{background:var(--n-color-surface);border:1px solid var(--n-color-border);border-radius:var(--n-radius-md);box-shadow:var(--n-shadow-lg);overflow:hidden;animation:n-ac-in .2s ease-out}.n-ac-popup.is-top{animation:n-ac-in-top .2s ease-out}@keyframes n-ac-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes n-ac-in-top{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.n-ac-loading{padding:var(--n-space-3) var(--n-space-4);color:var(--n-color-text-muted);font-size:var(--n-text-sm)}.n-ac-list{max-height:260px;overflow:auto;display:flex;flex-direction:column}.n-ac-option{text-align:left;padding:0.7rem 1rem;color:var(--n-color-text-secondary);background:transparent;border:none;cursor:pointer;transition:all var(--n-transition-fast)}.n-ac-option:hover,.n-ac-option.is-focused{background:var(--n-color-glass);color:var(--n-color-text)}.n-ac-empty{padding:var(--n-space-4);color:var(--n-color-text-muted);text-align:center;font-size:var(--n-text-sm)}
|
|
58
58
|
</style>
|
|
@@ -74,7 +74,7 @@ const overlayOpacity = computed(() => {
|
|
|
74
74
|
class="n-bottom-sheet-container"
|
|
75
75
|
:style="{
|
|
76
76
|
transform: `translateY(${translateY.value})`,
|
|
77
|
-
transition: isDragging.value ? 'none' : 'transform
|
|
77
|
+
transition: isDragging.value ? 'none' : 'transform var(--n-transition-slow)'
|
|
78
78
|
}"
|
|
79
79
|
>
|
|
80
80
|
<div class="n-bottom-sheet-handle"></div>
|
|
@@ -121,7 +121,7 @@ const overlayOpacity = computed(() => {
|
|
|
121
121
|
background: var(--n-color-surface);
|
|
122
122
|
border-top: 1px solid var(--n-color-border);
|
|
123
123
|
border-radius: var(--n-radius-2xl) var(--n-radius-2xl) 0 0;
|
|
124
|
-
box-shadow:
|
|
124
|
+
box-shadow: var(--n-shadow-top-lg);
|
|
125
125
|
padding-bottom: env(safe-area-inset-bottom, 20px);
|
|
126
126
|
touch-action: none;
|
|
127
127
|
display: flex;
|