nexa-ui-kit 0.11.6 → 0.11.9
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 +2 -14
- package/dist/components/NAlert.nexa +3 -14
- package/dist/components/NAutocomplete.js +1 -1
- package/dist/components/NAutocomplete.nexa +2 -1
- package/dist/components/NAvatar.js +0 -5
- package/dist/components/NAvatar.nexa +1 -5
- package/dist/components/NBadge.js +0 -6
- package/dist/components/NBadge.nexa +1 -6
- package/dist/components/NBottomSheet.js +0 -5
- package/dist/components/NBottomSheet.nexa +1 -5
- package/dist/components/NButton.js +219 -296
- package/dist/components/NButton.nexa +241 -320
- package/dist/components/NCard.js +39 -82
- package/dist/components/NCard.nexa +27 -71
- package/dist/components/NCheckbox.js +74 -63
- package/dist/components/NCheckbox.nexa +64 -44
- package/dist/components/NChips.nexa +1 -0
- package/dist/components/NDataTable.js +300 -356
- package/dist/components/NDataTable.nexa +265 -320
- package/dist/components/NDatepicker.js +4 -25
- package/dist/components/NDatepicker.nexa +5 -25
- package/dist/components/NForm.nexa +1 -0
- package/dist/components/NFormField.js +0 -5
- package/dist/components/NFormField.nexa +1 -5
- package/dist/components/NImage.js +1 -6
- package/dist/components/NImage.nexa +2 -6
- package/dist/components/NInput.js +96 -263
- package/dist/components/NInput.nexa +89 -259
- package/dist/components/NInputNumber.nexa +1 -1
- package/dist/components/NModal.js +1 -118
- package/dist/components/NModal.nexa +2 -119
- package/dist/components/NMultiSelect.js +1 -1
- package/dist/components/NMultiSelect.nexa +2 -1
- package/dist/components/NPaginator.js +1 -11
- package/dist/components/NPaginator.nexa +2 -11
- package/dist/components/NPassword.nexa +1 -0
- package/dist/components/NProgressBar.js +0 -11
- package/dist/components/NProgressBar.nexa +1 -11
- package/dist/components/NRadio.js +1 -8
- package/dist/components/NRadio.nexa +2 -8
- package/dist/components/NScrollView.js +0 -6
- package/dist/components/NScrollView.nexa +1 -6
- package/dist/components/NSelect.js +7 -35
- package/dist/components/NSelect.nexa +8 -35
- package/dist/components/NSkeleton.js +3 -9
- package/dist/components/NSkeleton.nexa +4 -9
- package/dist/components/NSwitch.js +0 -6
- package/dist/components/NSwitch.nexa +1 -6
- package/dist/components/NTabs.js +0 -11
- package/dist/components/NTabs.nexa +1 -11
- package/dist/components/NTag.js +1 -11
- package/dist/components/NTag.nexa +2 -11
- package/dist/components/NToastContainer.js +3 -27
- package/dist/components/NToastContainer.nexa +4 -27
- package/dist/components/NTooltip.js +0 -13
- package/dist/components/NTooltip.nexa +1 -13
- package/dist/components/NTreeMenu.js +1 -21
- package/dist/components/NTreeMenu.nexa +2 -21
- package/dist/components/NVirtualList.js +0 -2
- package/dist/components/NVirtualList.nexa +1 -2
- package/dist/styles/tokens.css +82 -173
- package/package.json +5 -5
- package/src/components/NAlert.nexa +3 -14
- package/src/components/NAutocomplete.nexa +2 -1
- package/src/components/NAvatar.nexa +1 -5
- package/src/components/NBadge.nexa +1 -6
- package/src/components/NBottomSheet.nexa +1 -5
- package/src/components/NButton.nexa +241 -320
- package/src/components/NCard.nexa +27 -71
- package/src/components/NCheckbox.nexa +64 -44
- package/src/components/NChips.nexa +1 -0
- package/src/components/NDataTable.nexa +265 -320
- package/src/components/NDatepicker.nexa +5 -25
- package/src/components/NForm.nexa +1 -0
- package/src/components/NFormField.nexa +1 -5
- package/src/components/NImage.nexa +2 -6
- package/src/components/NInput.nexa +89 -259
- package/src/components/NInputNumber.nexa +1 -1
- package/src/components/NModal.nexa +2 -119
- package/src/components/NMultiSelect.nexa +2 -1
- package/src/components/NPaginator.nexa +2 -11
- package/src/components/NPassword.nexa +1 -0
- package/src/components/NProgressBar.nexa +1 -11
- package/src/components/NRadio.nexa +2 -8
- package/src/components/NScrollView.nexa +1 -6
- package/src/components/NSelect.nexa +8 -35
- package/src/components/NSkeleton.nexa +4 -9
- package/src/components/NSwitch.nexa +1 -6
- package/src/components/NTabs.nexa +1 -11
- package/src/components/NTag.nexa +2 -11
- package/src/components/NToastContainer.nexa +4 -27
- package/src/components/NTooltip.nexa +1 -13
- package/src/components/NTreeMenu.nexa +2 -21
- package/src/components/NVirtualList.nexa +1 -2
- package/src/styles/tokens.css +82 -173
|
@@ -44,26 +44,22 @@ const initials = computed(() => {
|
|
|
44
44
|
user-select: none;
|
|
45
45
|
transition: all var(--n-transition-fast);
|
|
46
46
|
border: 1px solid var(--n-color-border);
|
|
47
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
|
|
48
47
|
}
|
|
49
|
-
|
|
50
48
|
.is-sm { width: 32px; height: 32px; font-size: var(--n-text-xs); }
|
|
51
49
|
.is-md { width: 40px; height: 40px; font-size: var(--n-text-sm); }
|
|
52
50
|
.is-lg { width: 56px; height: 56px; font-size: var(--n-text-lg); }
|
|
53
51
|
.is-xl { width: 72px; height: 72px; font-size: var(--n-text-2xl); }
|
|
54
|
-
|
|
55
52
|
.is-circle { border-radius: var(--n-radius-full); }
|
|
56
53
|
.is-rounded { border-radius: var(--n-radius-md); }
|
|
57
54
|
.is-square { border-radius: 0; }
|
|
58
|
-
|
|
59
55
|
.is-primary { background-color: var(--n-color-primary); color: white; }
|
|
60
56
|
.is-success { background-color: var(--n-color-success); color: white; }
|
|
61
57
|
.is-danger { background-color: var(--n-color-danger); color: white; }
|
|
62
58
|
.is-warning { background-color: var(--n-color-warning); color: white; }
|
|
63
59
|
.is-info { background-color: var(--n-color-info); color: white; }
|
|
64
|
-
|
|
65
60
|
.n-avatar-initials {
|
|
66
61
|
line-height: 1;
|
|
67
62
|
font-weight: var(--n-weight-bold);
|
|
68
63
|
}
|
|
64
|
+
|
|
69
65
|
</style>
|
|
@@ -29,21 +29,16 @@ const props = defineProps({
|
|
|
29
29
|
text-transform: uppercase;
|
|
30
30
|
letter-spacing: 0.03em;
|
|
31
31
|
transition: all var(--n-transition-fast);
|
|
32
|
-
box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
|
|
33
32
|
}
|
|
34
|
-
|
|
35
33
|
.n-badge-primary { background: var(--n-color-primary); color: white; }
|
|
36
34
|
.n-badge-success { background: var(--n-color-success); color: white; }
|
|
37
35
|
.n-badge-danger { background: var(--n-color-danger); color: white; }
|
|
38
36
|
.n-badge-warning { background: var(--n-color-warning); color: white; }
|
|
39
37
|
.n-badge-info { background: var(--n-color-info); color: white; }
|
|
40
38
|
.n-badge-secondary { background: var(--n-color-surface-hover); color: var(--n-color-text); }
|
|
41
|
-
|
|
42
39
|
.n-badge-sm { padding: 0.15rem 0.4rem; font-size: 0.65rem; }
|
|
43
40
|
.n-badge-lg { padding: 0.4rem 0.8rem; font-size: var(--n-text-sm); }
|
|
44
|
-
|
|
45
41
|
.is-rounded { border-radius: var(--n-radius-full); }
|
|
46
|
-
|
|
47
42
|
.n-badge-dot {
|
|
48
43
|
display: inline-block;
|
|
49
44
|
width: 8px;
|
|
@@ -52,11 +47,11 @@ const props = defineProps({
|
|
|
52
47
|
vertical-align: middle;
|
|
53
48
|
flex-shrink: 0;
|
|
54
49
|
}
|
|
55
|
-
|
|
56
50
|
.n-badge-dot.is-primary { background: var(--n-color-primary); }
|
|
57
51
|
.n-badge-dot.is-success { background: var(--n-color-success); }
|
|
58
52
|
.n-badge-dot.is-danger { background: var(--n-color-danger); }
|
|
59
53
|
.n-badge-dot.is-warning { background: var(--n-color-warning); }
|
|
60
54
|
.n-badge-dot.is-info { background: var(--n-color-info); }
|
|
61
55
|
.n-badge-dot.is-secondary { background: var(--n-color-text-muted); }
|
|
56
|
+
|
|
62
57
|
</style>
|
|
@@ -98,11 +98,9 @@ const overlayOpacity = computed(() => {
|
|
|
98
98
|
display: flex;
|
|
99
99
|
align-items: flex-end;
|
|
100
100
|
}
|
|
101
|
-
|
|
102
101
|
.n-bottom-sheet-root.is-active {
|
|
103
102
|
pointer-events: auto;
|
|
104
103
|
}
|
|
105
|
-
|
|
106
104
|
.n-bottom-sheet-overlay {
|
|
107
105
|
position: absolute;
|
|
108
106
|
top: 0;
|
|
@@ -113,7 +111,6 @@ const overlayOpacity = computed(() => {
|
|
|
113
111
|
backdrop-filter: blur(8px);
|
|
114
112
|
transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
|
|
115
113
|
}
|
|
116
|
-
|
|
117
114
|
.n-bottom-sheet-container {
|
|
118
115
|
position: relative;
|
|
119
116
|
width: 100%;
|
|
@@ -128,7 +125,6 @@ const overlayOpacity = computed(() => {
|
|
|
128
125
|
flex-direction: column;
|
|
129
126
|
transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
|
130
127
|
}
|
|
131
|
-
|
|
132
128
|
.n-bottom-sheet-handle {
|
|
133
129
|
width: 48px;
|
|
134
130
|
height: 5px;
|
|
@@ -138,10 +134,10 @@ const overlayOpacity = computed(() => {
|
|
|
138
134
|
flex-shrink: 0;
|
|
139
135
|
opacity: 0.3;
|
|
140
136
|
}
|
|
141
|
-
|
|
142
137
|
.n-bottom-sheet-inner {
|
|
143
138
|
padding: var(--n-space-4) var(--n-space-8) var(--n-space-8);
|
|
144
139
|
overflow-y: auto;
|
|
145
140
|
flex: 1;
|
|
146
141
|
}
|
|
142
|
+
|
|
147
143
|
</style>
|
|
@@ -1,320 +1,241 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { signal, computed } from 'nexa-framework'
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
disabled: { type: Boolean, default: false },
|
|
9
|
-
loading: { type: Boolean, default: false },
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
</
|
|
43
|
-
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
.
|
|
93
|
-
.
|
|
94
|
-
|
|
95
|
-
/*
|
|
96
|
-
.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
box-shadow:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
.n-btn-secondary {
|
|
124
|
-
background: var(--n-color-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
.n-btn-success:
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
.n-btn-warning
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
.n-btn-
|
|
167
|
-
background
|
|
168
|
-
color:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
color:
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
.n-btn-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
-
|
|
198
|
-
color: var(--n-color-text
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
.
|
|
209
|
-
background:
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
.n-btn-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
.n-btn-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
.n-btn-glass:active:not(:disabled) {
|
|
244
|
-
box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/* Disabled */
|
|
248
|
-
.n-btn:disabled {
|
|
249
|
-
cursor: not-allowed;
|
|
250
|
-
transform: none !important;
|
|
251
|
-
box-shadow: none !important;
|
|
252
|
-
pointer-events: none;
|
|
253
|
-
opacity: 0.55;
|
|
254
|
-
}
|
|
255
|
-
.n-btn:disabled::after {
|
|
256
|
-
content: '';
|
|
257
|
-
position: absolute;
|
|
258
|
-
inset: 0;
|
|
259
|
-
border-radius: inherit;
|
|
260
|
-
background: var(--n-color-surface, #fff);
|
|
261
|
-
opacity: 0.3;
|
|
262
|
-
pointer-events: none;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/* Loader */
|
|
266
|
-
.n-btn-loader {
|
|
267
|
-
width: 1rem;
|
|
268
|
-
height: 1rem;
|
|
269
|
-
border: 2px solid currentColor;
|
|
270
|
-
border-right-color: transparent;
|
|
271
|
-
border-radius: var(--n-radius-full);
|
|
272
|
-
animation: n-spin 0.7s linear infinite;
|
|
273
|
-
flex-shrink: 0;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.n-btn-lg .n-btn-loader {
|
|
277
|
-
width: 1.25rem;
|
|
278
|
-
height: 1.25rem;
|
|
279
|
-
border-width: 2.5px;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.n-btn-sm .n-btn-loader {
|
|
283
|
-
width: 0.85rem;
|
|
284
|
-
height: 0.85rem;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.n-btn-loading-text {
|
|
288
|
-
opacity: 0.8;
|
|
289
|
-
font-weight: var(--n-weight-normal);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.n-btn-content {
|
|
293
|
-
display: inline-flex;
|
|
294
|
-
align-items: center;
|
|
295
|
-
gap: var(--n-space-2);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
@keyframes n-spin {
|
|
299
|
-
from { transform: rotate(0deg); }
|
|
300
|
-
to { transform: rotate(360deg); }
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/* Ripple */
|
|
304
|
-
.n-btn-ripple {
|
|
305
|
-
position: absolute;
|
|
306
|
-
border-radius: var(--n-radius-full);
|
|
307
|
-
background: var(--n-color-glass);
|
|
308
|
-
width: 20px;
|
|
309
|
-
height: 20px;
|
|
310
|
-
margin-left: -10px;
|
|
311
|
-
margin-top: -10px;
|
|
312
|
-
pointer-events: none;
|
|
313
|
-
animation: n-ripple 0.6s ease-out forwards;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
@keyframes n-ripple {
|
|
317
|
-
from { transform: scale(0); opacity: 1; }
|
|
318
|
-
to { transform: scale(8); opacity: 0; }
|
|
319
|
-
}
|
|
320
|
-
</style>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { signal, computed } from 'nexa-framework'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
label: { type: String, default: '' },
|
|
6
|
+
variant: { type: String, default: 'primary' },
|
|
7
|
+
size: { type: String, default: 'md' },
|
|
8
|
+
disabled: { type: Boolean, default: false },
|
|
9
|
+
loading: { type: Boolean, default: false },
|
|
10
|
+
icon: { type: String, default: '' },
|
|
11
|
+
iconRight: { type: String, default: '' },
|
|
12
|
+
block: { type: Boolean, default: false },
|
|
13
|
+
rounded: { type: Boolean, default: false },
|
|
14
|
+
outlined: { type: Boolean, default: false }
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const emit = defineEmits(['click'])
|
|
18
|
+
|
|
19
|
+
const isPressed = signal(false)
|
|
20
|
+
|
|
21
|
+
const handleClick = (e) => {
|
|
22
|
+
if (props.disabled || props.loading) return
|
|
23
|
+
isPressed.value = true
|
|
24
|
+
setTimeout(() => { isPressed.value = false }, 150)
|
|
25
|
+
emit('click', e)
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<button
|
|
31
|
+
class="n-btn"
|
|
32
|
+
:class="[
|
|
33
|
+
`n-btn-${variant}`,
|
|
34
|
+
`n-btn-${size}`,
|
|
35
|
+
{ 'is-block': block, 'is-rounded': rounded, 'is-outlined': outlined, 'is-pressed': isPressed }
|
|
36
|
+
]"
|
|
37
|
+
:disabled="disabled || loading"
|
|
38
|
+
@click="handleClick"
|
|
39
|
+
>
|
|
40
|
+
<span v-if="loading" class="n-btn-spinner"></span>
|
|
41
|
+
<span v-if="icon && !loading" class="n-btn-icon">{{ icon }}</span>
|
|
42
|
+
<span v-if="label" class="n-btn-label">{{ label }}</span>
|
|
43
|
+
<span v-if="iconRight" class="n-btn-icon-right">{{ iconRight }}</span>
|
|
44
|
+
<slot />
|
|
45
|
+
</button>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<style scoped>
|
|
49
|
+
.n-btn {
|
|
50
|
+
display: inline-flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
gap: 0.5rem;
|
|
54
|
+
font-family: inherit;
|
|
55
|
+
font-weight: 500;
|
|
56
|
+
border: 1px solid transparent;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
transition: background-color var(--n-transition-fast), border-color var(--n-transition-fast), color var(--n-transition-fast), box-shadow var(--n-transition-fast);
|
|
59
|
+
position: relative;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
user-select: none;
|
|
62
|
+
}
|
|
63
|
+
.n-btn:disabled {
|
|
64
|
+
opacity: 0.6;
|
|
65
|
+
cursor: not-allowed;
|
|
66
|
+
}
|
|
67
|
+
.n-btn:focus-visible {
|
|
68
|
+
outline: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Sizes */
|
|
72
|
+
.n-btn-sm {
|
|
73
|
+
padding: 0.375rem 0.75rem;
|
|
74
|
+
font-size: var(--n-text-sm);
|
|
75
|
+
border-radius: var(--n-radius-md);
|
|
76
|
+
min-height: 32px;
|
|
77
|
+
}
|
|
78
|
+
.n-btn-md {
|
|
79
|
+
padding: 0.5rem 1rem;
|
|
80
|
+
font-size: var(--n-text-base);
|
|
81
|
+
border-radius: var(--n-radius-md);
|
|
82
|
+
min-height: 40px;
|
|
83
|
+
}
|
|
84
|
+
.n-btn-lg {
|
|
85
|
+
padding: 0.75rem 1.5rem;
|
|
86
|
+
font-size: var(--n-text-lg);
|
|
87
|
+
border-radius: var(--n-radius-lg);
|
|
88
|
+
min-height: 48px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Block & Rounded */
|
|
92
|
+
.is-block { width: 100%; }
|
|
93
|
+
.is-rounded { border-radius: var(--n-radius-full); }
|
|
94
|
+
|
|
95
|
+
/* Primary */
|
|
96
|
+
.n-btn-primary {
|
|
97
|
+
background-color: var(--n-color-primary);
|
|
98
|
+
color: var(--n-color-primary-text);
|
|
99
|
+
border-color: var(--n-color-primary);
|
|
100
|
+
}
|
|
101
|
+
.n-btn-primary:hover:not(:disabled) {
|
|
102
|
+
background-color: var(--n-color-primary-hover);
|
|
103
|
+
border-color: var(--n-color-primary-hover);
|
|
104
|
+
}
|
|
105
|
+
.n-btn-primary:active:not(:disabled), .is-pressed.n-btn-primary {
|
|
106
|
+
background-color: var(--n-color-primary-active);
|
|
107
|
+
border-color: var(--n-color-primary-active);
|
|
108
|
+
}
|
|
109
|
+
.n-btn-primary:focus-visible {
|
|
110
|
+
box-shadow: var(--n-ring-primary);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Secondary */
|
|
114
|
+
.n-btn-secondary {
|
|
115
|
+
background-color: var(--n-color-surface-alt);
|
|
116
|
+
color: var(--n-color-text);
|
|
117
|
+
border-color: var(--n-color-border);
|
|
118
|
+
}
|
|
119
|
+
.n-btn-secondary:hover:not(:disabled) {
|
|
120
|
+
background-color: var(--n-color-surface-hover);
|
|
121
|
+
border-color: var(--n-color-border-hover);
|
|
122
|
+
}
|
|
123
|
+
.n-btn-secondary:active:not(:disabled), .is-pressed.n-btn-secondary {
|
|
124
|
+
background-color: var(--n-color-border);
|
|
125
|
+
}
|
|
126
|
+
.n-btn-secondary:focus-visible {
|
|
127
|
+
box-shadow: var(--n-ring-surface);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Success */
|
|
131
|
+
.n-btn-success {
|
|
132
|
+
background-color: var(--n-color-success);
|
|
133
|
+
color: #fff;
|
|
134
|
+
border-color: var(--n-color-success);
|
|
135
|
+
}
|
|
136
|
+
.n-btn-success:hover:not(:disabled) {
|
|
137
|
+
background-color: var(--n-color-success-hover);
|
|
138
|
+
border-color: var(--n-color-success-hover);
|
|
139
|
+
}
|
|
140
|
+
.n-btn-success:active:not(:disabled), .is-pressed.n-btn-success {
|
|
141
|
+
background-color: var(--n-color-success-active);
|
|
142
|
+
}
|
|
143
|
+
.n-btn-success:focus-visible { box-shadow: var(--n-ring-success); }
|
|
144
|
+
|
|
145
|
+
/* Danger */
|
|
146
|
+
.n-btn-danger {
|
|
147
|
+
background-color: var(--n-color-danger);
|
|
148
|
+
color: #fff;
|
|
149
|
+
border-color: var(--n-color-danger);
|
|
150
|
+
}
|
|
151
|
+
.n-btn-danger:hover:not(:disabled) {
|
|
152
|
+
background-color: var(--n-color-danger-hover);
|
|
153
|
+
border-color: var(--n-color-danger-hover);
|
|
154
|
+
}
|
|
155
|
+
.n-btn-danger:active:not(:disabled), .is-pressed.n-btn-danger {
|
|
156
|
+
background-color: var(--n-color-danger-active);
|
|
157
|
+
}
|
|
158
|
+
.n-btn-danger:focus-visible { box-shadow: var(--n-ring-danger); }
|
|
159
|
+
|
|
160
|
+
/* Warning */
|
|
161
|
+
.n-btn-warning {
|
|
162
|
+
background-color: var(--n-color-warning);
|
|
163
|
+
color: #fff;
|
|
164
|
+
border-color: var(--n-color-warning);
|
|
165
|
+
}
|
|
166
|
+
.n-btn-warning:hover:not(:disabled) {
|
|
167
|
+
background-color: var(--n-color-warning-hover);
|
|
168
|
+
border-color: var(--n-color-warning-hover);
|
|
169
|
+
}
|
|
170
|
+
.n-btn-warning:active:not(:disabled), .is-pressed.n-btn-warning {
|
|
171
|
+
background-color: var(--n-color-warning-active);
|
|
172
|
+
}
|
|
173
|
+
.n-btn-warning:focus-visible { box-shadow: var(--n-ring-warning); }
|
|
174
|
+
|
|
175
|
+
/* Info */
|
|
176
|
+
.n-btn-info {
|
|
177
|
+
background-color: var(--n-color-info);
|
|
178
|
+
color: #fff;
|
|
179
|
+
border-color: var(--n-color-info);
|
|
180
|
+
}
|
|
181
|
+
.n-btn-info:hover:not(:disabled) {
|
|
182
|
+
background-color: var(--n-color-info-hover);
|
|
183
|
+
border-color: var(--n-color-info-hover);
|
|
184
|
+
}
|
|
185
|
+
.n-btn-info:active:not(:disabled), .is-pressed.n-btn-info {
|
|
186
|
+
background-color: var(--n-color-info-active);
|
|
187
|
+
}
|
|
188
|
+
.n-btn-info:focus-visible { box-shadow: var(--n-ring-info); }
|
|
189
|
+
|
|
190
|
+
/* Ghost */
|
|
191
|
+
.n-btn-ghost {
|
|
192
|
+
background-color: transparent;
|
|
193
|
+
color: var(--n-color-text);
|
|
194
|
+
border-color: transparent;
|
|
195
|
+
}
|
|
196
|
+
.n-btn-ghost:hover:not(:disabled) {
|
|
197
|
+
background-color: var(--n-color-surface-hover);
|
|
198
|
+
color: var(--n-color-text);
|
|
199
|
+
}
|
|
200
|
+
.n-btn-ghost:active:not(:disabled), .is-pressed.n-btn-ghost {
|
|
201
|
+
background-color: var(--n-color-border);
|
|
202
|
+
}
|
|
203
|
+
.n-btn-ghost:focus-visible {
|
|
204
|
+
box-shadow: var(--n-ring-surface);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Outlined variants */
|
|
208
|
+
.is-outlined {
|
|
209
|
+
background-color: transparent !important;
|
|
210
|
+
}
|
|
211
|
+
.is-outlined.n-btn-primary { color: var(--n-color-primary); }
|
|
212
|
+
.is-outlined.n-btn-primary:hover:not(:disabled) { background-color: var(--n-color-primary-light) !important; }
|
|
213
|
+
|
|
214
|
+
.is-outlined.n-btn-success { color: var(--n-color-success); border-color: var(--n-color-success); }
|
|
215
|
+
.is-outlined.n-btn-success:hover:not(:disabled) { background-color: rgba(34, 197, 94, 0.1) !important; }
|
|
216
|
+
|
|
217
|
+
.is-outlined.n-btn-danger { color: var(--n-color-danger); border-color: var(--n-color-danger); }
|
|
218
|
+
.is-outlined.n-btn-danger:hover:not(:disabled) { background-color: rgba(239, 68, 68, 0.1) !important; }
|
|
219
|
+
|
|
220
|
+
/* Spinner */
|
|
221
|
+
.n-btn-spinner {
|
|
222
|
+
width: 16px;
|
|
223
|
+
height: 16px;
|
|
224
|
+
border: 2px solid currentColor;
|
|
225
|
+
border-right-color: transparent;
|
|
226
|
+
border-radius: 50%;
|
|
227
|
+
animation: n-spin 0.6s linear infinite;
|
|
228
|
+
}
|
|
229
|
+
@keyframes n-spin {
|
|
230
|
+
to { transform: rotate(360deg); }
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.n-btn-icon, .n-btn-icon-right {
|
|
234
|
+
display: flex;
|
|
235
|
+
align-items: center;
|
|
236
|
+
justify-content: center;
|
|
237
|
+
}
|
|
238
|
+
.n-btn-label {
|
|
239
|
+
line-height: 1;
|
|
240
|
+
}
|
|
241
|
+
</style>
|