nexa-ui-kit 0.10.0 → 0.11.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.
Files changed (73) hide show
  1. package/dist/components/NAlert.js +49 -28
  2. package/dist/components/NAlert.nexa +12 -6
  3. package/dist/components/NAutocomplete.js +25 -20
  4. package/dist/components/NAutocomplete.nexa +3 -3
  5. package/dist/components/NAvatar.js +1 -1
  6. package/dist/components/NBadge.js +1 -1
  7. package/dist/components/NBottomSheet.js +17 -17
  8. package/dist/components/NBottomSheet.nexa +2 -2
  9. package/dist/components/NButton.js +59 -59
  10. package/dist/components/NButton.nexa +10 -9
  11. package/dist/components/NCard.js +2 -2
  12. package/dist/components/NCard.nexa +1 -1
  13. package/dist/components/NCheckbox.js +23 -19
  14. package/dist/components/NCheckbox.nexa +2 -1
  15. package/dist/components/NChips.js +13 -10
  16. package/dist/components/NChips.nexa +1 -1
  17. package/dist/components/NDataTable.js +360 -42
  18. package/dist/components/NDataTable.nexa +318 -10
  19. package/dist/components/NDatepicker.js +52 -43
  20. package/dist/components/NDatepicker.nexa +3 -3
  21. package/dist/components/NForm.js +1 -1
  22. package/dist/components/NFormField.js +1 -1
  23. package/dist/components/NInput.js +51 -41
  24. package/dist/components/NInput.nexa +4 -3
  25. package/dist/components/NInputNumber.js +18 -13
  26. package/dist/components/NInputNumber.nexa +2 -2
  27. package/dist/components/NModal.js +34 -28
  28. package/dist/components/NModal.nexa +4 -4
  29. package/dist/components/NMultiSelect.js +47 -38
  30. package/dist/components/NMultiSelect.nexa +3 -3
  31. package/dist/components/NPaginator.js +29 -21
  32. package/dist/components/NPaginator.nexa +4 -4
  33. package/dist/components/NPassword.js +61 -47
  34. package/dist/components/NPassword.nexa +5 -4
  35. package/dist/components/NProgressBar.js +5 -5
  36. package/dist/components/NProgressBar.nexa +4 -4
  37. package/dist/components/NRadio.js +1 -1
  38. package/dist/components/NScrollView.js +1 -1
  39. package/dist/components/NSelect.js +68 -63
  40. package/dist/components/NSelect.nexa +4 -4
  41. package/dist/components/NSkeleton.js +1 -1
  42. package/dist/components/NSwitch.js +1 -1
  43. package/dist/components/NTabs.js +1 -1
  44. package/dist/components/NTag.js +27 -24
  45. package/dist/components/NTag.nexa +6 -6
  46. package/dist/components/NToastContainer.js +65 -49
  47. package/dist/components/NToastContainer.nexa +6 -3
  48. package/dist/components/NTooltip.js +1 -1
  49. package/dist/components/NTreeMenu.js +74 -35
  50. package/dist/components/NTreeMenu.nexa +52 -15
  51. package/dist/styles/tokens.css +18 -0
  52. package/package.json +4 -4
  53. package/src/components/NAlert.nexa +12 -6
  54. package/src/components/NAutocomplete.nexa +3 -3
  55. package/src/components/NBottomSheet.nexa +2 -2
  56. package/src/components/NButton.nexa +10 -9
  57. package/src/components/NCard.nexa +1 -1
  58. package/src/components/NCheckbox.nexa +2 -1
  59. package/src/components/NChips.nexa +1 -1
  60. package/src/components/NDataTable.nexa +318 -10
  61. package/src/components/NDatepicker.nexa +3 -3
  62. package/src/components/NInput.nexa +4 -3
  63. package/src/components/NInputNumber.nexa +2 -2
  64. package/src/components/NModal.nexa +4 -4
  65. package/src/components/NMultiSelect.nexa +3 -3
  66. package/src/components/NPaginator.nexa +4 -4
  67. package/src/components/NPassword.nexa +5 -4
  68. package/src/components/NProgressBar.nexa +4 -4
  69. package/src/components/NSelect.nexa +4 -4
  70. package/src/components/NTag.nexa +6 -6
  71. package/src/components/NToastContainer.nexa +6 -3
  72. package/src/components/NTreeMenu.nexa +52 -15
  73. package/src/styles/tokens.css +18 -0
@@ -1,8 +1,8 @@
1
1
  import { useToast } from '../services/ToastService.js'
2
- import { h, hText, effect, signal, computed, onMounted, onUnmounted, defineComponent, registerComponent, reloadComponent, injectStyle, Teleport } from 'nexa-framework'
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-8ac4158',
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-8ac4158": "" }, [
20
+ return h(_ntc_Teleport, { to: "body", "data-v-4587cf3e": "" }, [
21
21
  "\n ",
22
- h('div', { class: ["n-toast-container", positionClass], "data-v-8ac4158": "" }, [
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-8ac4158": "" }, [
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-8ac4158": "" }, [
27
+ h('div', { class: "n-toast-body", "data-v-4587cf3e": "" }, [
28
28
  "\n ",
29
- h('span', { class: "n-toast-icon", "data-v-8ac4158": "" }, [
29
+ h('span', { class: "n-toast-icon", "data-v-4587cf3e": "" }, [
30
30
  "\n ",
31
- toast.type === 'success' ? '' : toast.type === 'error' ? '✕' : toast.type === 'warning' ? '⚡' : 'ℹ',
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-8ac4158": "" }, [
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-8ac4158": "" }, [
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-8ac4158": "" }) : null
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-8ac4158'
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-8ac4158]{
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-8ac4158]{
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-8ac4158]{
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-8ac4158]{
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-8ac4158]{
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-8ac4158]{
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-8ac4158]{
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 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
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-8ac4158]:hover{
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-8ac4158]{
137
+ from[data-v-4587cf3e]{
122
138
  opacity: 0;
123
139
  transform: translateX(30px) scale(0.95);
124
140
  }
125
- to[data-v-8ac4158]{
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-8ac4158]{
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-8ac4158]{
152
+ from[data-v-4587cf3e]{
137
153
  opacity: 0;
138
154
  transform: translateX(-30px) scale(0.95);
139
155
  }
140
- to[data-v-8ac4158]{
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-8ac4158],
147
- .is-bottom-left .n-toast[data-v-8ac4158]{
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-8ac4158]{
168
+ from[data-v-4587cf3e]{
153
169
  opacity: 0;
154
170
  transform: translateY(20px) scale(0.95);
155
171
  }
156
- to[data-v-8ac4158]{
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-8ac4158]{
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-8ac4158]{ background: var(--n-color-success); color: white; }
182
- .is-error .n-toast-icon[data-v-8ac4158]{ background: var(--n-color-danger); color: white; }
183
- .is-info .n-toast-icon[data-v-8ac4158]{ background: var(--n-color-primary); color: white; }
184
- .is-warning .n-toast-icon[data-v-8ac4158]{ background: var(--n-color-warning); color: white; }
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-8ac4158]{
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-8ac4158]{
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-8ac4158]:hover .n-toast-dismiss{
223
+ .n-toast[data-v-4587cf3e]:hover .n-toast-dismiss{
208
224
  opacity: 1;
209
225
  }
210
226
 
211
- .n-toast-dismiss[data-v-8ac4158]:hover{
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-8ac4158]{
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-8ac4158]::after{
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-8ac4158]::after{ background: var(--n-color-success); }
234
- .is-error .n-toast-progress[data-v-8ac4158]::after{ background: var(--n-color-danger); }
235
- .is-info .n-toast-progress[data-v-8ac4158]::after{ background: var(--n-color-primary); }
236
- .is-warning .n-toast-progress[data-v-8ac4158]::after{ background: var(--n-color-warning); }
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-8ac4158]{ transform: scaleX(1); }
240
- to[data-v-8ac4158]{ transform: scaleX(0); }
255
+ from[data-v-4587cf3e]{ transform: scaleX(1); }
256
+ to[data-v-4587cf3e]{ transform: scaleX(0); }
241
257
  }`
242
- injectStyle('data-v-8ac4158', __style)
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
- {{ toast.type === 'success' ? '✓' : toast.type === 'error' ? '✕' : toast.type === 'warning' ? '⚡' : 'ℹ' }}
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">&times;</button>
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 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
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, computed, onMounted, onUnmounted, defineComponent, registerComponent, reloadComponent, injectStyle, Teleport } from 'nexa-framework'
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, onMounted, onUnmounted, defineComponent, registerComponent, reloadComponent, injectStyle } from 'nexa-framework'
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-44b3942a',
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-44b3942a": "" }, [
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-44b3942a": "" }, [
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-44b3942a": "" }, [
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-44b3942a": "" }, [
59
- ""
60
- ]) : (true) ? h('span', { class: "n-tree-toggle-placeholder", "data-v-44b3942a": "" }) : null,
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-44b3942a": "" }, [
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-44b3942a": "" }, [
67
+ h('span', { class: "n-tree-label", "data-v-1dc3f956": "" }, [
66
68
  item.label
67
69
  ]),
68
70
  "\n "
@@ -73,79 +75,116 @@ _sfc_main.render = function(ctx) {
73
75
  "\n "
74
76
  ])
75
77
  }
76
- _sfc_main.__scopeId = 'data-v-44b3942a'
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-44b3942a]{
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-44b3942a]{
89
+ .n-tree-item[data-v-1dc3f956]{
88
90
  --n-tree-depth: 0;
91
+ position: relative;
92
+ }
93
+
94
+ /* Líneas conectoras verticales */
95
+ .n-tree-item[data-v-1dc3f956]:not([style*="--n-tree-depth: 0"])::before{
96
+ content: '';
97
+ position: absolute;
98
+ left: calc(0.5rem + (var(--n-tree-depth, 0) - 1) * 1.25rem + 0.5rem);
99
+ top: 0;
100
+ bottom: 0;
101
+ width: 1px;
102
+ background: var(--n-color-border);
103
+ opacity: 0.5;
89
104
  }
90
105
 
91
- .n-tree-row[data-v-44b3942a]{
106
+ .n-tree-row[data-v-1dc3f956]{
92
107
  display: flex;
93
108
  align-items: center;
94
- gap: 0.35rem;
95
- padding: 0.4rem 0.5rem;
96
- padding-left: calc(0.5rem + var(--n-tree-depth, 0) * 1.25rem);
109
+ gap: 0.5rem;
110
+ padding: 0.5rem 0.75rem;
111
+ padding-left: calc(0.75rem + var(--n-tree-depth, 0) * 1.25rem);
97
112
  border-radius: var(--n-radius-sm);
98
113
  cursor: pointer;
99
114
  transition: all var(--n-transition-fast);
100
115
  color: var(--n-color-text);
116
+ position: relative;
117
+ }
118
+
119
+ /* Línea conectora horizontal */
120
+ .n-tree-item[data-v-1dc3f956]:not([style*="--n-tree-depth: 0"]) .n-tree-row::before{
121
+ content: '';
122
+ position: absolute;
123
+ left: calc(0.75rem + (var(--n-tree-depth, 0) - 1) * 1.25rem + 0.5rem);
124
+ top: 50%;
125
+ width: 0.75rem;
126
+ height: 1px;
127
+ background: var(--n-color-border);
128
+ opacity: 0.5;
101
129
  }
102
130
 
103
- .n-tree-row[data-v-44b3942a]:hover{
131
+ .n-tree-row[data-v-1dc3f956]:hover{
104
132
  background: var(--n-color-surface-hover);
105
133
  }
106
134
 
107
- .n-tree-item.is-selected > .n-tree-row[data-v-44b3942a]{
135
+ .n-tree-item.is-selected > .n-tree-row[data-v-1dc3f956]{
108
136
  background: var(--n-color-primary-light);
109
137
  color: var(--n-color-primary);
110
138
  font-weight: var(--n-weight-semibold);
111
139
  }
112
140
 
113
- .n-tree-toggle[data-v-44b3942a]{
114
- background: none;
115
- border: none;
116
- color: var(--n-color-text-muted);
141
+ .n-tree-toggle[data-v-1dc3f956]{
142
+ background: var(--n-color-glass);
143
+ border: 1px solid var(--n-color-border);
144
+ border-radius: var(--n-radius-sm);
145
+ color: var(--n-color-text-secondary);
117
146
  cursor: pointer;
118
- font-size: 0.6rem;
119
- width: 16px;
120
- height: 16px;
147
+ width: 20px;
148
+ height: 20px;
121
149
  display: flex;
122
150
  align-items: center;
123
151
  justify-content: center;
124
152
  padding: 0;
125
- transition: transform var(--n-transition-fast);
153
+ transition: all var(--n-transition-fast);
126
154
  flex-shrink: 0;
127
155
  }
128
156
 
129
- .n-tree-toggle.is-expanded[data-v-44b3942a]{
157
+ .n-tree-toggle[data-v-1dc3f956]:hover{
158
+ background: var(--n-color-primary-light);
159
+ border-color: var(--n-color-primary);
160
+ color: var(--n-color-primary);
161
+ }
162
+
163
+ .n-tree-toggle svg[data-v-1dc3f956]{
164
+ transition: transform var(--n-transition-fast);
165
+ }
166
+
167
+ .n-tree-toggle.is-expanded svg[data-v-1dc3f956]{
130
168
  transform: rotate(90deg);
131
169
  }
132
170
 
133
- .n-tree-toggle-placeholder[data-v-44b3942a]{
134
- width: 16px;
135
- height: 16px;
171
+ .n-tree-toggle-placeholder[data-v-1dc3f956]{
172
+ width: 20px;
173
+ height: 20px;
136
174
  flex-shrink: 0;
137
175
  }
138
176
 
139
- .n-tree-icon[data-v-44b3942a]{
140
- font-size: 1rem;
177
+ .n-tree-icon[data-v-1dc3f956]{
178
+ font-size: 1.1rem;
141
179
  flex-shrink: 0;
142
180
  }
143
181
 
144
- .n-tree-label[data-v-44b3942a]{
182
+ .n-tree-label[data-v-1dc3f956]{
145
183
  flex: 1;
146
184
  min-width: 0;
147
185
  overflow: hidden;
148
186
  text-overflow: ellipsis;
149
187
  white-space: nowrap;
188
+ font-weight: var(--n-weight-medium);
150
189
  }`
151
- injectStyle('data-v-44b3942a', __style)
190
+ 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
- >▶</button>
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>
@@ -77,18 +77,44 @@ const toggle = (id, e) => {
77
77
 
78
78
  .n-tree-item {
79
79
  --n-tree-depth: 0;
80
+ position: relative;
81
+ }
82
+
83
+ /* Líneas conectoras verticales */
84
+ .n-tree-item:not([style*="--n-tree-depth: 0"])::before {
85
+ content: '';
86
+ position: absolute;
87
+ left: calc(0.5rem + (var(--n-tree-depth, 0) - 1) * 1.25rem + 0.5rem);
88
+ top: 0;
89
+ bottom: 0;
90
+ width: 1px;
91
+ background: var(--n-color-border);
92
+ opacity: 0.5;
80
93
  }
81
94
 
82
95
  .n-tree-row {
83
96
  display: flex;
84
97
  align-items: center;
85
- gap: 0.35rem;
86
- padding: 0.4rem 0.5rem;
87
- padding-left: calc(0.5rem + var(--n-tree-depth, 0) * 1.25rem);
98
+ gap: 0.5rem;
99
+ padding: 0.5rem 0.75rem;
100
+ padding-left: calc(0.75rem + var(--n-tree-depth, 0) * 1.25rem);
88
101
  border-radius: var(--n-radius-sm);
89
102
  cursor: pointer;
90
103
  transition: all var(--n-transition-fast);
91
104
  color: var(--n-color-text);
105
+ position: relative;
106
+ }
107
+
108
+ /* Línea conectora horizontal */
109
+ .n-tree-item:not([style*="--n-tree-depth: 0"]) .n-tree-row::before {
110
+ content: '';
111
+ position: absolute;
112
+ left: calc(0.75rem + (var(--n-tree-depth, 0) - 1) * 1.25rem + 0.5rem);
113
+ top: 50%;
114
+ width: 0.75rem;
115
+ height: 1px;
116
+ background: var(--n-color-border);
117
+ opacity: 0.5;
92
118
  }
93
119
 
94
120
  .n-tree-row:hover {
@@ -102,33 +128,43 @@ const toggle = (id, e) => {
102
128
  }
103
129
 
104
130
  .n-tree-toggle {
105
- background: none;
106
- border: none;
107
- color: var(--n-color-text-muted);
131
+ background: var(--n-color-glass);
132
+ border: 1px solid var(--n-color-border);
133
+ border-radius: var(--n-radius-sm);
134
+ color: var(--n-color-text-secondary);
108
135
  cursor: pointer;
109
- font-size: 0.6rem;
110
- width: 16px;
111
- height: 16px;
136
+ width: 20px;
137
+ height: 20px;
112
138
  display: flex;
113
139
  align-items: center;
114
140
  justify-content: center;
115
141
  padding: 0;
116
- transition: transform var(--n-transition-fast);
142
+ transition: all var(--n-transition-fast);
117
143
  flex-shrink: 0;
118
144
  }
119
145
 
120
- .n-tree-toggle.is-expanded {
146
+ .n-tree-toggle:hover {
147
+ background: var(--n-color-primary-light);
148
+ border-color: var(--n-color-primary);
149
+ color: var(--n-color-primary);
150
+ }
151
+
152
+ .n-tree-toggle svg {
153
+ transition: transform var(--n-transition-fast);
154
+ }
155
+
156
+ .n-tree-toggle.is-expanded svg {
121
157
  transform: rotate(90deg);
122
158
  }
123
159
 
124
160
  .n-tree-toggle-placeholder {
125
- width: 16px;
126
- height: 16px;
161
+ width: 20px;
162
+ height: 20px;
127
163
  flex-shrink: 0;
128
164
  }
129
165
 
130
166
  .n-tree-icon {
131
- font-size: 1rem;
167
+ font-size: 1.1rem;
132
168
  flex-shrink: 0;
133
169
  }
134
170
 
@@ -138,5 +174,6 @@ const toggle = (id, e) => {
138
174
  overflow: hidden;
139
175
  text-overflow: ellipsis;
140
176
  white-space: nowrap;
177
+ font-weight: var(--n-weight-medium);
141
178
  }
142
179
  </style>
@@ -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);