nexa-ui-kit 0.7.11 → 0.8.1
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/NButton.js +224 -224
- package/dist/components/NButton.nexa +274 -274
- package/dist/components/NCard.js +2 -2
- package/dist/components/NDataTable.js +58 -60
- package/dist/components/NDataTable.nexa +203 -204
- package/dist/components/NInputNumber.js +16 -16
- package/dist/components/NInputNumber.nexa +232 -232
- package/dist/components/NModal.js +130 -130
- package/dist/components/NModal.nexa +226 -226
- package/package.json +4 -4
- package/src/components/NButton.nexa +274 -274
- package/src/components/NDataTable.nexa +203 -204
- package/src/components/NInputNumber.nexa +232 -232
- package/src/components/NModal.nexa +226 -226
|
@@ -1,274 +1,274 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { signal, computed } from 'nexa-framework'
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
variant: { type: String, default: 'primary' },
|
|
6
|
-
size: { type: String, default: 'md' },
|
|
7
|
-
type: { type: String, default: 'button' },
|
|
8
|
-
disabled: { type: Boolean, default: false },
|
|
9
|
-
loading: { type: Boolean, default: false },
|
|
10
|
-
block: { type: Boolean, default: false },
|
|
11
|
-
rounded: { type: Boolean, default: false },
|
|
12
|
-
loadingText: { type: String, default: '' }
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
const emit = defineEmits(['click'])
|
|
16
|
-
|
|
17
|
-
const ripple = signal([])
|
|
18
|
-
|
|
19
|
-
const handleClick = (e) => {
|
|
20
|
-
if (props.disabled || props.loading) return
|
|
21
|
-
emit('click', e)
|
|
22
|
-
const rect = e.currentTarget.getBoundingClientRect()
|
|
23
|
-
const x = e.clientX - rect.left
|
|
24
|
-
const y = e.clientY - rect.top
|
|
25
|
-
const id = Date.now()
|
|
26
|
-
ripple.value = [...ripple.value, { id, x, y }]
|
|
27
|
-
setTimeout(() => {
|
|
28
|
-
ripple.value = ripple.value.filter(r => r.id !== id)
|
|
29
|
-
}, 600)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const btnClass = computed(() => {
|
|
33
|
-
return [
|
|
34
|
-
'n-btn',
|
|
35
|
-
`n-btn-${props.variant}`,
|
|
36
|
-
`n-btn-${props.size}`,
|
|
37
|
-
props.loading ? 'is-loading' : '',
|
|
38
|
-
props.block ? 'is-block' : '',
|
|
39
|
-
props.rounded ? 'is-rounded' : ''
|
|
40
|
-
].join(' ')
|
|
41
|
-
})
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<template>
|
|
45
|
-
<button
|
|
46
|
-
:class="btnClass.value"
|
|
47
|
-
:type="type"
|
|
48
|
-
:disabled="disabled || loading"
|
|
49
|
-
@click="handleClick"
|
|
50
|
-
>
|
|
51
|
-
<span v-if="loading" class="n-btn-loader"></span>
|
|
52
|
-
<span v-if="loading && loadingText" class="n-btn-loading-text">{{ loadingText }}</span>
|
|
53
|
-
<span v-if="!loading || (loading && !loadingText)" class="n-btn-content">
|
|
54
|
-
<slot />
|
|
55
|
-
</span>
|
|
56
|
-
<span v-for="r in ripple.value" :key="r.id" class="n-btn-ripple" :style="{ left: r.x + 'px', top: r.y + 'px' }"></span>
|
|
57
|
-
</button>
|
|
58
|
-
</template>
|
|
59
|
-
|
|
60
|
-
<style scoped>
|
|
61
|
-
.n-btn {
|
|
62
|
-
position: relative;
|
|
63
|
-
display: inline-flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
gap: var(--n-space-2);
|
|
67
|
-
font-family: var(--n-font-sans);
|
|
68
|
-
font-weight: var(--n-weight-semibold);
|
|
69
|
-
border-radius: var(--n-radius-md);
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
transition: all var(--n-transition-normal);
|
|
72
|
-
border: 1px solid transparent;
|
|
73
|
-
outline: none;
|
|
74
|
-
white-space: nowrap;
|
|
75
|
-
user-select: none;
|
|
76
|
-
overflow: hidden;
|
|
77
|
-
text-decoration: none;
|
|
78
|
-
line-height: var(--n-leading-normal, 1.5);
|
|
79
|
-
min-width: fit-content;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.n-btn:focus-visible {
|
|
83
|
-
box-shadow: 0 0 0 3px var(--n-color-primary-light);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* Sizes */
|
|
87
|
-
.n-btn-sm { padding: 0.5rem 1.25rem; font-size: var(--n-text-sm); gap: var(--n-space-1); border-radius: var(--n-radius-sm); min-height: 32px; }
|
|
88
|
-
.n-btn-md { padding: 0.65rem 1.75rem; font-size: var(--n-text-base); min-height: 40px; }
|
|
89
|
-
.n-btn-lg { padding: 0.85rem 2.5rem; font-size: var(--n-text-lg); border-radius: var(--n-radius-lg); min-height: 48px; }
|
|
90
|
-
|
|
91
|
-
/* Block */
|
|
92
|
-
.is-block { width: 100%; }
|
|
93
|
-
|
|
94
|
-
/* Rounded */
|
|
95
|
-
.is-rounded { border-radius: var(--n-radius-full); }
|
|
96
|
-
|
|
97
|
-
/* Variant: Primary */
|
|
98
|
-
.n-btn-primary {
|
|
99
|
-
background: linear-gradient(135deg, var(--n-color-primary) 0%, var(--n-color-primary-hover) 100%);
|
|
100
|
-
color: white;
|
|
101
|
-
box-shadow: var(--n-shadow-glow-primary);
|
|
102
|
-
}
|
|
103
|
-
.n-btn-primary:hover:not(:disabled) {
|
|
104
|
-
transform: translateY(-2px);
|
|
105
|
-
box-shadow: 0 8px 20px -3px var(--n-color-primary-glow);
|
|
106
|
-
}
|
|
107
|
-
.n-btn-primary:active:not(:disabled) {
|
|
108
|
-
transform: translateY(0) scale(0.97);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/* Variant: Secondary */
|
|
112
|
-
.n-btn-secondary {
|
|
113
|
-
background: var(--n-color-surface-alt);
|
|
114
|
-
color: var(--n-color-text);
|
|
115
|
-
border-color: var(--n-color-border);
|
|
116
|
-
}
|
|
117
|
-
.n-btn-secondary:hover:not(:disabled) {
|
|
118
|
-
background: var(--n-color-surface-hover);
|
|
119
|
-
border-color: var(--n-color-border-hover);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/* Variant: Success */
|
|
123
|
-
.n-btn-success {
|
|
124
|
-
background: linear-gradient(135deg, var(--n-color-success) 0%, var(--n-color-success-hover) 100%);
|
|
125
|
-
color: white;
|
|
126
|
-
box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.3);
|
|
127
|
-
}
|
|
128
|
-
.n-btn-success:hover:not(:disabled) {
|
|
129
|
-
transform: translateY(-2px);
|
|
130
|
-
box-shadow: 0 8px 20px -3px rgba(16, 185, 129, 0.4);
|
|
131
|
-
}
|
|
132
|
-
.n-btn-success:active:not(:disabled) {
|
|
133
|
-
transform: translateY(0) scale(0.97);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/* Variant: Warning */
|
|
137
|
-
.n-btn-warning {
|
|
138
|
-
background: linear-gradient(135deg, var(--n-color-warning) 0%, var(--n-color-warning-hover) 100%);
|
|
139
|
-
color: white;
|
|
140
|
-
box-shadow: 0 4px 12px -2px rgba(245, 158, 11, 0.3);
|
|
141
|
-
}
|
|
142
|
-
.n-btn-warning:hover:not(:disabled) {
|
|
143
|
-
transform: translateY(-2px);
|
|
144
|
-
box-shadow: 0 8px 20px -3px rgba(245, 158, 11, 0.4);
|
|
145
|
-
}
|
|
146
|
-
.n-btn-warning:active:not(:disabled) {
|
|
147
|
-
transform: translateY(0) scale(0.97);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/* Variant: Info */
|
|
151
|
-
.n-btn-info {
|
|
152
|
-
background: linear-gradient(135deg, var(--n-color-info) 0%, var(--n-color-info-hover) 100%);
|
|
153
|
-
color: white;
|
|
154
|
-
box-shadow: 0 4px 12px -2px rgba(6, 182, 212, 0.3);
|
|
155
|
-
}
|
|
156
|
-
.n-btn-info:hover:not(:disabled) {
|
|
157
|
-
transform: translateY(-2px);
|
|
158
|
-
box-shadow: 0 8px 20px -3px rgba(6, 182, 212, 0.4);
|
|
159
|
-
}
|
|
160
|
-
.n-btn-info:active:not(:disabled) {
|
|
161
|
-
transform: translateY(0) scale(0.97);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/* Variant: Danger */
|
|
165
|
-
.n-btn-danger {
|
|
166
|
-
background: linear-gradient(135deg, var(--n-color-danger) 0%, var(--n-color-danger-hover) 100%);
|
|
167
|
-
color: white;
|
|
168
|
-
box-shadow: 0 4px 12px -2px rgba(239, 68, 68, 0.3);
|
|
169
|
-
}
|
|
170
|
-
.n-btn-danger:hover:not(:disabled) {
|
|
171
|
-
transform: translateY(-2px);
|
|
172
|
-
box-shadow: 0 8px 20px -3px rgba(220, 38, 38, 0.4);
|
|
173
|
-
}
|
|
174
|
-
.n-btn-danger:active:not(:disabled) {
|
|
175
|
-
transform: translateY(0) scale(0.97);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/* Variant: Ghost */
|
|
179
|
-
.n-btn-ghost {
|
|
180
|
-
background: transparent;
|
|
181
|
-
color: var(--n-color-text-secondary);
|
|
182
|
-
}
|
|
183
|
-
.n-btn-ghost:hover:not(:disabled) {
|
|
184
|
-
background: var(--n-color-glass);
|
|
185
|
-
color: var(--n-color-text);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/* Variant: Outline */
|
|
189
|
-
.n-btn-outline {
|
|
190
|
-
background: transparent;
|
|
191
|
-
color: var(--n-color-primary);
|
|
192
|
-
border-color: var(--n-color-primary);
|
|
193
|
-
}
|
|
194
|
-
.n-btn-outline:hover:not(:disabled) {
|
|
195
|
-
background: var(--n-color-primary-light);
|
|
196
|
-
border-color: var(--n-color-primary-hover);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/* Variant: Glass */
|
|
200
|
-
.n-btn-glass {
|
|
201
|
-
background: var(--n-color-glass);
|
|
202
|
-
backdrop-filter: blur(10px);
|
|
203
|
-
border-color: var(--n-color-glass-border);
|
|
204
|
-
color: var(--n-color-text);
|
|
205
|
-
}
|
|
206
|
-
.n-btn-glass:hover:not(:disabled) {
|
|
207
|
-
background: var(--n-color-glass-hover);
|
|
208
|
-
border-color: var(--n-color-border-hover);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/* Disabled */
|
|
212
|
-
.n-btn:disabled {
|
|
213
|
-
opacity: 0.45;
|
|
214
|
-
cursor: not-allowed;
|
|
215
|
-
transform: none !important;
|
|
216
|
-
box-shadow: none !important;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/* Loader */
|
|
220
|
-
.n-btn-loader {
|
|
221
|
-
width: 1rem;
|
|
222
|
-
height: 1rem;
|
|
223
|
-
border: 2px solid currentColor;
|
|
224
|
-
border-right-color: transparent;
|
|
225
|
-
border-radius: var(--n-radius-full);
|
|
226
|
-
animation: n-spin 0.7s linear infinite;
|
|
227
|
-
flex-shrink: 0;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.n-btn-lg .n-btn-loader {
|
|
231
|
-
width: 1.25rem;
|
|
232
|
-
height: 1.25rem;
|
|
233
|
-
border-width: 2.5px;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.n-btn-sm .n-btn-loader {
|
|
237
|
-
width: 0.85rem;
|
|
238
|
-
height: 0.85rem;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.n-btn-loading-text {
|
|
242
|
-
opacity: 0.8;
|
|
243
|
-
font-weight: var(--n-weight-normal);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.n-btn-content {
|
|
247
|
-
display: inline-flex;
|
|
248
|
-
align-items: center;
|
|
249
|
-
gap: var(--n-space-2);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
@keyframes n-spin {
|
|
253
|
-
from { transform: rotate(0deg); }
|
|
254
|
-
to { transform: rotate(360deg); }
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/* Ripple */
|
|
258
|
-
.n-btn-ripple {
|
|
259
|
-
position: absolute;
|
|
260
|
-
border-radius: var(--n-radius-full);
|
|
261
|
-
background: rgba(255, 255, 255, 0.35);
|
|
262
|
-
width: 20px;
|
|
263
|
-
height: 20px;
|
|
264
|
-
margin-left: -10px;
|
|
265
|
-
margin-top: -10px;
|
|
266
|
-
pointer-events: none;
|
|
267
|
-
animation: n-ripple 0.6s ease-out forwards;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
@keyframes n-ripple {
|
|
271
|
-
from { transform: scale(0); opacity: 1; }
|
|
272
|
-
to { transform: scale(8); opacity: 0; }
|
|
273
|
-
}
|
|
274
|
-
</style>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { signal, computed } from 'nexa-framework'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
variant: { type: String, default: 'primary' },
|
|
6
|
+
size: { type: String, default: 'md' },
|
|
7
|
+
type: { type: String, default: 'button' },
|
|
8
|
+
disabled: { type: Boolean, default: false },
|
|
9
|
+
loading: { type: Boolean, default: false },
|
|
10
|
+
block: { type: Boolean, default: false },
|
|
11
|
+
rounded: { type: Boolean, default: false },
|
|
12
|
+
loadingText: { type: String, default: '' }
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const emit = defineEmits(['click'])
|
|
16
|
+
|
|
17
|
+
const ripple = signal([])
|
|
18
|
+
|
|
19
|
+
const handleClick = (e) => {
|
|
20
|
+
if (props.disabled || props.loading) return
|
|
21
|
+
emit('click', e)
|
|
22
|
+
const rect = e.currentTarget.getBoundingClientRect()
|
|
23
|
+
const x = e.clientX - rect.left
|
|
24
|
+
const y = e.clientY - rect.top
|
|
25
|
+
const id = Date.now()
|
|
26
|
+
ripple.value = [...ripple.value, { id, x, y }]
|
|
27
|
+
setTimeout(() => {
|
|
28
|
+
ripple.value = ripple.value.filter(r => r.id !== id)
|
|
29
|
+
}, 600)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const btnClass = computed(() => {
|
|
33
|
+
return [
|
|
34
|
+
'n-btn',
|
|
35
|
+
`n-btn-${props.variant}`,
|
|
36
|
+
`n-btn-${props.size}`,
|
|
37
|
+
props.loading ? 'is-loading' : '',
|
|
38
|
+
props.block ? 'is-block' : '',
|
|
39
|
+
props.rounded ? 'is-rounded' : ''
|
|
40
|
+
].join(' ')
|
|
41
|
+
})
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<button
|
|
46
|
+
:class="btnClass.value"
|
|
47
|
+
:type="type"
|
|
48
|
+
:disabled="disabled || loading"
|
|
49
|
+
@click="handleClick"
|
|
50
|
+
>
|
|
51
|
+
<span v-if="loading" class="n-btn-loader"></span>
|
|
52
|
+
<span v-if="loading && loadingText" class="n-btn-loading-text">{{ loadingText }}</span>
|
|
53
|
+
<span v-if="!loading || (loading && !loadingText)" class="n-btn-content">
|
|
54
|
+
<slot />
|
|
55
|
+
</span>
|
|
56
|
+
<span v-for="r in ripple.value" :key="r.id" class="n-btn-ripple" :style="{ left: r.x + 'px', top: r.y + 'px' }"></span>
|
|
57
|
+
</button>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<style scoped>
|
|
61
|
+
.n-btn {
|
|
62
|
+
position: relative;
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
gap: var(--n-space-2);
|
|
67
|
+
font-family: var(--n-font-sans);
|
|
68
|
+
font-weight: var(--n-weight-semibold);
|
|
69
|
+
border-radius: var(--n-radius-md);
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
transition: all var(--n-transition-normal);
|
|
72
|
+
border: 1px solid transparent;
|
|
73
|
+
outline: none;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
user-select: none;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
text-decoration: none;
|
|
78
|
+
line-height: var(--n-leading-normal, 1.5);
|
|
79
|
+
min-width: fit-content;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.n-btn:focus-visible {
|
|
83
|
+
box-shadow: 0 0 0 3px var(--n-color-primary-light);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Sizes */
|
|
87
|
+
.n-btn-sm { padding: 0.5rem 1.25rem; font-size: var(--n-text-sm); gap: var(--n-space-1); border-radius: var(--n-radius-sm); min-height: 32px; }
|
|
88
|
+
.n-btn-md { padding: 0.65rem 1.75rem; font-size: var(--n-text-base); min-height: 40px; }
|
|
89
|
+
.n-btn-lg { padding: 0.85rem 2.5rem; font-size: var(--n-text-lg); border-radius: var(--n-radius-lg); min-height: 48px; }
|
|
90
|
+
|
|
91
|
+
/* Block */
|
|
92
|
+
.is-block { width: 100%; }
|
|
93
|
+
|
|
94
|
+
/* Rounded */
|
|
95
|
+
.is-rounded { border-radius: var(--n-radius-full); }
|
|
96
|
+
|
|
97
|
+
/* Variant: Primary */
|
|
98
|
+
.n-btn-primary {
|
|
99
|
+
background: linear-gradient(135deg, var(--n-color-primary) 0%, var(--n-color-primary-hover) 100%);
|
|
100
|
+
color: white;
|
|
101
|
+
box-shadow: var(--n-shadow-glow-primary);
|
|
102
|
+
}
|
|
103
|
+
.n-btn-primary:hover:not(:disabled) {
|
|
104
|
+
transform: translateY(-2px);
|
|
105
|
+
box-shadow: 0 8px 20px -3px var(--n-color-primary-glow);
|
|
106
|
+
}
|
|
107
|
+
.n-btn-primary:active:not(:disabled) {
|
|
108
|
+
transform: translateY(0) scale(0.97);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Variant: Secondary */
|
|
112
|
+
.n-btn-secondary {
|
|
113
|
+
background: var(--n-color-surface-alt);
|
|
114
|
+
color: var(--n-color-text);
|
|
115
|
+
border-color: var(--n-color-border);
|
|
116
|
+
}
|
|
117
|
+
.n-btn-secondary:hover:not(:disabled) {
|
|
118
|
+
background: var(--n-color-surface-hover);
|
|
119
|
+
border-color: var(--n-color-border-hover);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Variant: Success */
|
|
123
|
+
.n-btn-success {
|
|
124
|
+
background: linear-gradient(135deg, var(--n-color-success) 0%, var(--n-color-success-hover) 100%);
|
|
125
|
+
color: white;
|
|
126
|
+
box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.3);
|
|
127
|
+
}
|
|
128
|
+
.n-btn-success:hover:not(:disabled) {
|
|
129
|
+
transform: translateY(-2px);
|
|
130
|
+
box-shadow: 0 8px 20px -3px rgba(16, 185, 129, 0.4);
|
|
131
|
+
}
|
|
132
|
+
.n-btn-success:active:not(:disabled) {
|
|
133
|
+
transform: translateY(0) scale(0.97);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Variant: Warning */
|
|
137
|
+
.n-btn-warning {
|
|
138
|
+
background: linear-gradient(135deg, var(--n-color-warning) 0%, var(--n-color-warning-hover) 100%);
|
|
139
|
+
color: white;
|
|
140
|
+
box-shadow: 0 4px 12px -2px rgba(245, 158, 11, 0.3);
|
|
141
|
+
}
|
|
142
|
+
.n-btn-warning:hover:not(:disabled) {
|
|
143
|
+
transform: translateY(-2px);
|
|
144
|
+
box-shadow: 0 8px 20px -3px rgba(245, 158, 11, 0.4);
|
|
145
|
+
}
|
|
146
|
+
.n-btn-warning:active:not(:disabled) {
|
|
147
|
+
transform: translateY(0) scale(0.97);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Variant: Info */
|
|
151
|
+
.n-btn-info {
|
|
152
|
+
background: linear-gradient(135deg, var(--n-color-info) 0%, var(--n-color-info-hover) 100%);
|
|
153
|
+
color: white;
|
|
154
|
+
box-shadow: 0 4px 12px -2px rgba(6, 182, 212, 0.3);
|
|
155
|
+
}
|
|
156
|
+
.n-btn-info:hover:not(:disabled) {
|
|
157
|
+
transform: translateY(-2px);
|
|
158
|
+
box-shadow: 0 8px 20px -3px rgba(6, 182, 212, 0.4);
|
|
159
|
+
}
|
|
160
|
+
.n-btn-info:active:not(:disabled) {
|
|
161
|
+
transform: translateY(0) scale(0.97);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Variant: Danger */
|
|
165
|
+
.n-btn-danger {
|
|
166
|
+
background: linear-gradient(135deg, var(--n-color-danger) 0%, var(--n-color-danger-hover) 100%);
|
|
167
|
+
color: white;
|
|
168
|
+
box-shadow: 0 4px 12px -2px rgba(239, 68, 68, 0.3);
|
|
169
|
+
}
|
|
170
|
+
.n-btn-danger:hover:not(:disabled) {
|
|
171
|
+
transform: translateY(-2px);
|
|
172
|
+
box-shadow: 0 8px 20px -3px rgba(220, 38, 38, 0.4);
|
|
173
|
+
}
|
|
174
|
+
.n-btn-danger:active:not(:disabled) {
|
|
175
|
+
transform: translateY(0) scale(0.97);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Variant: Ghost */
|
|
179
|
+
.n-btn-ghost {
|
|
180
|
+
background: transparent;
|
|
181
|
+
color: var(--n-color-text-secondary);
|
|
182
|
+
}
|
|
183
|
+
.n-btn-ghost:hover:not(:disabled) {
|
|
184
|
+
background: var(--n-color-glass);
|
|
185
|
+
color: var(--n-color-text);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* Variant: Outline */
|
|
189
|
+
.n-btn-outline {
|
|
190
|
+
background: transparent;
|
|
191
|
+
color: var(--n-color-primary);
|
|
192
|
+
border-color: var(--n-color-primary);
|
|
193
|
+
}
|
|
194
|
+
.n-btn-outline:hover:not(:disabled) {
|
|
195
|
+
background: var(--n-color-primary-light);
|
|
196
|
+
border-color: var(--n-color-primary-hover);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* Variant: Glass */
|
|
200
|
+
.n-btn-glass {
|
|
201
|
+
background: var(--n-color-glass);
|
|
202
|
+
backdrop-filter: blur(10px);
|
|
203
|
+
border-color: var(--n-color-glass-border);
|
|
204
|
+
color: var(--n-color-text);
|
|
205
|
+
}
|
|
206
|
+
.n-btn-glass:hover:not(:disabled) {
|
|
207
|
+
background: var(--n-color-glass-hover);
|
|
208
|
+
border-color: var(--n-color-border-hover);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* Disabled */
|
|
212
|
+
.n-btn:disabled {
|
|
213
|
+
opacity: 0.45;
|
|
214
|
+
cursor: not-allowed;
|
|
215
|
+
transform: none !important;
|
|
216
|
+
box-shadow: none !important;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Loader */
|
|
220
|
+
.n-btn-loader {
|
|
221
|
+
width: 1rem;
|
|
222
|
+
height: 1rem;
|
|
223
|
+
border: 2px solid currentColor;
|
|
224
|
+
border-right-color: transparent;
|
|
225
|
+
border-radius: var(--n-radius-full);
|
|
226
|
+
animation: n-spin 0.7s linear infinite;
|
|
227
|
+
flex-shrink: 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.n-btn-lg .n-btn-loader {
|
|
231
|
+
width: 1.25rem;
|
|
232
|
+
height: 1.25rem;
|
|
233
|
+
border-width: 2.5px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.n-btn-sm .n-btn-loader {
|
|
237
|
+
width: 0.85rem;
|
|
238
|
+
height: 0.85rem;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.n-btn-loading-text {
|
|
242
|
+
opacity: 0.8;
|
|
243
|
+
font-weight: var(--n-weight-normal);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.n-btn-content {
|
|
247
|
+
display: inline-flex;
|
|
248
|
+
align-items: center;
|
|
249
|
+
gap: var(--n-space-2);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
@keyframes n-spin {
|
|
253
|
+
from { transform: rotate(0deg); }
|
|
254
|
+
to { transform: rotate(360deg); }
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* Ripple */
|
|
258
|
+
.n-btn-ripple {
|
|
259
|
+
position: absolute;
|
|
260
|
+
border-radius: var(--n-radius-full);
|
|
261
|
+
background: rgba(255, 255, 255, 0.35);
|
|
262
|
+
width: 20px;
|
|
263
|
+
height: 20px;
|
|
264
|
+
margin-left: -10px;
|
|
265
|
+
margin-top: -10px;
|
|
266
|
+
pointer-events: none;
|
|
267
|
+
animation: n-ripple 0.6s ease-out forwards;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
@keyframes n-ripple {
|
|
271
|
+
from { transform: scale(0); opacity: 1; }
|
|
272
|
+
to { transform: scale(8); opacity: 0; }
|
|
273
|
+
}
|
|
274
|
+
</style>
|