nexa-ui-kit 0.11.3 → 0.11.5

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 (68) hide show
  1. package/dist/components/NAlert.js +20 -5
  2. package/dist/components/NAlert.nexa +20 -5
  3. package/dist/components/NAvatar.js +2 -0
  4. package/dist/components/NAvatar.nexa +2 -0
  5. package/dist/components/NBadge.js +5 -4
  6. package/dist/components/NBadge.nexa +5 -4
  7. package/dist/components/NBottomSheet.js +24 -22
  8. package/dist/components/NBottomSheet.nexa +9 -7
  9. package/dist/components/NButton.js +57 -14
  10. package/dist/components/NButton.nexa +57 -14
  11. package/dist/components/NCard.js +6 -5
  12. package/dist/components/NCard.nexa +6 -5
  13. package/dist/components/NCheckbox.js +42 -33
  14. package/dist/components/NCheckbox.nexa +22 -15
  15. package/dist/components/NDataTable.js +124 -100
  16. package/dist/components/NDataTable.nexa +39 -15
  17. package/dist/components/NInput.js +27 -6
  18. package/dist/components/NInput.nexa +27 -6
  19. package/dist/components/NModal.js +22 -9
  20. package/dist/components/NModal.nexa +22 -9
  21. package/dist/components/NMultiSelect.js +1 -1
  22. package/dist/components/NMultiSelect.nexa +1 -1
  23. package/dist/components/NPaginator.js +83 -1
  24. package/dist/components/NPaginator.nexa +83 -1
  25. package/dist/components/NProgressBar.js +11 -9
  26. package/dist/components/NProgressBar.nexa +11 -9
  27. package/dist/components/NRadio.js +24 -24
  28. package/dist/components/NRadio.nexa +11 -10
  29. package/dist/components/NSelect.js +38 -12
  30. package/dist/components/NSelect.nexa +38 -12
  31. package/dist/components/NSwitch.js +5 -3
  32. package/dist/components/NSwitch.nexa +5 -3
  33. package/dist/components/NTabs.js +14 -6
  34. package/dist/components/NTabs.nexa +14 -6
  35. package/dist/components/NTag.js +14 -5
  36. package/dist/components/NTag.nexa +14 -5
  37. package/dist/components/NToastContainer.js +11 -4
  38. package/dist/components/NToastContainer.nexa +11 -4
  39. package/dist/components/NTooltip.js +5 -4
  40. package/dist/components/NTooltip.nexa +5 -4
  41. package/dist/components/NTreeMenu.js +79 -38
  42. package/dist/components/NTreeMenu.nexa +58 -17
  43. package/dist/styles/theme.js +69 -55
  44. package/dist/styles/tokens.css +90 -74
  45. package/package.json +4 -4
  46. package/src/components/NAlert.nexa +20 -5
  47. package/src/components/NAvatar.nexa +2 -0
  48. package/src/components/NBadge.nexa +5 -4
  49. package/src/components/NBottomSheet.nexa +9 -7
  50. package/src/components/NButton.nexa +57 -14
  51. package/src/components/NCard.nexa +6 -5
  52. package/src/components/NCheckbox.nexa +22 -15
  53. package/src/components/NDataTable.nexa +39 -15
  54. package/src/components/NInput.nexa +27 -6
  55. package/src/components/NModal.nexa +22 -9
  56. package/src/components/NMultiSelect.nexa +1 -1
  57. package/src/components/NPaginator.nexa +83 -1
  58. package/src/components/NProgressBar.nexa +11 -9
  59. package/src/components/NRadio.nexa +11 -10
  60. package/src/components/NSelect.nexa +38 -12
  61. package/src/components/NSwitch.nexa +5 -3
  62. package/src/components/NTabs.nexa +14 -6
  63. package/src/components/NTag.nexa +14 -5
  64. package/src/components/NToastContainer.nexa +11 -4
  65. package/src/components/NTooltip.nexa +5 -4
  66. package/src/components/NTreeMenu.nexa +58 -17
  67. package/src/styles/theme.ts +69 -55
  68. package/src/styles/tokens.css +90 -74
@@ -21,7 +21,7 @@ const emit = defineEmits(['close'])
21
21
  display: inline-flex;
22
22
  align-items: center;
23
23
  gap: var(--n-space-1);
24
- padding: 0.2rem 0.6rem;
24
+ padding: 0.25rem 0.7rem;
25
25
  font-size: var(--n-text-xs);
26
26
  font-weight: var(--n-weight-semibold);
27
27
  border-radius: var(--n-radius-sm);
@@ -29,14 +29,15 @@ const emit = defineEmits(['close'])
29
29
  font-family: var(--n-font-sans);
30
30
  white-space: nowrap;
31
31
  border: 1px solid transparent;
32
+ letter-spacing: 0.02em;
32
33
  }
33
34
 
34
35
  .n-tag.is-rounded {
35
36
  border-radius: var(--n-radius-full);
36
37
  }
37
38
 
38
- .n-tag-sm { padding: 0.1rem 0.4rem; font-size: 0.65rem; }
39
- .n-tag-lg { padding: 0.35rem 0.8rem; font-size: var(--n-text-sm); }
39
+ .n-tag-sm { padding: 0.15rem 0.5rem; font-size: 0.65rem; }
40
+ .n-tag-lg { padding: 0.4rem 0.9rem; font-size: var(--n-text-sm); }
40
41
 
41
42
  .n-tag-primary {
42
43
  background: var(--n-color-primary-light);
@@ -83,11 +84,19 @@ const emit = defineEmits(['close'])
83
84
  padding: 0;
84
85
  margin-left: var(--n-space-1);
85
86
  color: inherit;
86
- opacity: 0.6;
87
- transition: opacity var(--n-transition-fast);
87
+ opacity: 0.5;
88
+ transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
89
+ border-radius: var(--n-radius-sm);
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ width: 18px;
94
+ height: 18px;
88
95
  }
89
96
 
90
97
  .n-tag-close:hover {
91
98
  opacity: 1;
99
+ background: rgba(0,0,0,0.08);
100
+ transform: scale(1.15);
92
101
  }
93
102
  </style>
@@ -118,16 +118,23 @@ const __style = `.n-toast-container[data-v-4587cf3e]{
118
118
  pointer-events: auto;
119
119
  min-width: 300px;
120
120
  max-width: 420px;
121
- background: var(--n-color-surface);
121
+ background: var(--n-color-glass);
122
122
  border: 1px solid var(--n-color-border);
123
123
  border-radius: var(--n-radius-md);
124
124
  overflow: hidden;
125
- box-shadow: var(--n-shadow-lg);
125
+ box-shadow: var(--n-shadow-lg), 0 8px 32px rgba(0, 0, 0, 0.08);
126
126
  cursor: pointer;
127
- animation: n-toast-in var(--n-transition-spring);
128
- transition: all var(--n-transition-fast);
127
+ animation: n-toast-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
128
+ transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
129
+ backdrop-filter: blur(16px);
130
+ border-left: 3px solid var(--n-color-border);
129
131
  }
130
132
 
133
+ .is-success[data-v-4587cf3e]{ border-left-color: var(--n-color-success); }
134
+ .is-error[data-v-4587cf3e]{ border-left-color: var(--n-color-danger); }
135
+ .is-info[data-v-4587cf3e]{ border-left-color: var(--n-color-primary); }
136
+ .is-warning[data-v-4587cf3e]{ border-left-color: var(--n-color-warning); }
137
+
131
138
  .n-toast[data-v-4587cf3e]:hover{
132
139
  transform: scale(1.02);
133
140
  background: var(--n-color-surface-alt);
@@ -84,16 +84,23 @@ const positionClass = `is-${props.position.replace('-', '-')}`
84
84
  pointer-events: auto;
85
85
  min-width: 300px;
86
86
  max-width: 420px;
87
- background: var(--n-color-surface);
87
+ background: var(--n-color-glass);
88
88
  border: 1px solid var(--n-color-border);
89
89
  border-radius: var(--n-radius-md);
90
90
  overflow: hidden;
91
- box-shadow: var(--n-shadow-lg);
91
+ box-shadow: var(--n-shadow-lg), 0 8px 32px rgba(0, 0, 0, 0.08);
92
92
  cursor: pointer;
93
- animation: n-toast-in var(--n-transition-spring);
94
- transition: all var(--n-transition-fast);
93
+ animation: n-toast-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
94
+ transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
95
+ backdrop-filter: blur(16px);
96
+ border-left: 3px solid var(--n-color-border);
95
97
  }
96
98
 
99
+ .is-success { border-left-color: var(--n-color-success); }
100
+ .is-error { border-left-color: var(--n-color-danger); }
101
+ .is-info { border-left-color: var(--n-color-primary); }
102
+ .is-warning { border-left-color: var(--n-color-warning); }
103
+
97
104
  .n-toast:hover {
98
105
  transform: scale(1.02);
99
106
  background: var(--n-color-surface-alt);
@@ -92,18 +92,19 @@ const __style = `.n-tooltip-wrapper[data-v-522b965d]{
92
92
  }
93
93
 
94
94
  .n-tooltip[data-v-522b965d]{
95
- background: var(--n-color-bg);
95
+ background: var(--n-color-glass);
96
96
  color: var(--n-color-text);
97
97
  padding: var(--n-space-2) var(--n-space-3);
98
98
  border-radius: var(--n-radius-sm);
99
99
  font-size: var(--n-text-xs);
100
- font-weight: var(--n-weight-medium);
100
+ font-weight: var(--n-weight-semibold);
101
101
  white-space: nowrap;
102
102
  z-index: var(--n-z-tooltip);
103
- box-shadow: var(--n-shadow-lg);
103
+ box-shadow: var(--n-shadow-lg), 0 4px 16px rgba(0, 0, 0, 0.1);
104
104
  border: 1px solid var(--n-color-border);
105
105
  pointer-events: none;
106
- animation: n-tooltip-in 0.2s ease-out;
106
+ animation: n-tooltip-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
107
+ backdrop-filter: blur(12px);
107
108
  }
108
109
 
109
110
  @keyframes n-tooltip-in {
@@ -95,18 +95,19 @@ const hide = () => {
95
95
  }
96
96
 
97
97
  .n-tooltip {
98
- background: var(--n-color-bg);
98
+ background: var(--n-color-glass);
99
99
  color: var(--n-color-text);
100
100
  padding: var(--n-space-2) var(--n-space-3);
101
101
  border-radius: var(--n-radius-sm);
102
102
  font-size: var(--n-text-xs);
103
- font-weight: var(--n-weight-medium);
103
+ font-weight: var(--n-weight-semibold);
104
104
  white-space: nowrap;
105
105
  z-index: var(--n-z-tooltip);
106
- box-shadow: var(--n-shadow-lg);
106
+ box-shadow: var(--n-shadow-lg), 0 4px 16px rgba(0, 0, 0, 0.1);
107
107
  border: 1px solid var(--n-color-border);
108
108
  pointer-events: none;
109
- animation: n-tooltip-in 0.2s ease-out;
109
+ animation: n-tooltip-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
110
+ backdrop-filter: blur(12px);
110
111
  }
111
112
 
112
113
  @keyframes n-tooltip-in {
@@ -1,7 +1,7 @@
1
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-30df3c1d',
4
+ __scopeId: 'data-v-278e8175',
5
5
  __hmrId: 'NTreeMenu_nexa',
6
6
  props: {
7
7
  items: { type: Array, default: () => [] },
@@ -48,23 +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-30df3c1d": "" }, [
51
+ return h('div', { class: "n-tree-menu", role: "tree", "data-v-278e8175": "" }, [
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-30df3c1d": "" }, [
54
+ h('div', { class: ["n-tree-item", { 'is-selected': isSelected(item.id) }], key: item.id, style: { '--n-tree-depth': String(item._depth) }, "data-v-278e8175": "" }, [
55
55
  "\n ",
56
- h('div', { class: "n-tree-row", onClick: ($event) => { selectItem(item) }, "data-v-30df3c1d": "" }, [
56
+ h('div', { class: "n-tree-row", tabindex: "0", role: "treeitem", "aria-selected": isSelected(item.id), onClick: ($event) => { selectItem(item) }, "data-v-278e8175": "" }, [
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-30df3c1d": "" }, [
59
- 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-30df3c1d": "" }, [
60
- h('path', { d: "M12 5v14M5 12h14", "data-v-30df3c1d": "" })
58
+ (hasChildren(item)) ? h('button', { class: ["n-tree-toggle", { 'is-expanded': isExpanded(item.id) }], onClick: ($event) => { toggle(item.id, $event) }, "data-v-278e8175": "" }, [
59
+ h('span', { class: "n-tree-toggle-icon", "data-v-278e8175": "" }, [
60
+ isExpanded(item.id) ? '' : '+'
61
61
  ])
62
- ]) : (true) ? h('span', { class: "n-tree-toggle-placeholder", "data-v-30df3c1d": "" }) : null,
62
+ ]) : (true) ? h('span', { class: "n-tree-toggle-placeholder", "data-v-278e8175": "" }) : null,
63
63
  "\n ",
64
- (item.icon) ? h('span', { class: "n-tree-icon", "data-v-30df3c1d": "" }, [
64
+ (item.icon) ? h('span', { class: "n-tree-icon", "data-v-278e8175": "" }, [
65
65
  item.icon
66
66
  ]) : null,
67
- h('span', { class: "n-tree-label", "data-v-30df3c1d": "" }, [
67
+ h('span', { class: "n-tree-label", "data-v-278e8175": "" }, [
68
68
  item.label
69
69
  ]),
70
70
  "\n "
@@ -75,24 +75,29 @@ _sfc_main.render = function(ctx) {
75
75
  "\n "
76
76
  ])
77
77
  }
78
- _sfc_main.__scopeId = 'data-v-30df3c1d'
78
+ _sfc_main.__scopeId = 'data-v-278e8175'
79
79
  _sfc_main.__hmrId = 'NTreeMenu_nexa'
80
80
 
81
81
  export default _sfc_main
82
82
 
83
- const __style = `.n-tree-menu[data-v-30df3c1d]{
83
+ const __style = `.n-tree-menu[data-v-278e8175]{
84
84
  font-family: var(--n-font-sans);
85
85
  font-size: var(--n-text-sm);
86
86
  user-select: none;
87
87
  }
88
88
 
89
- .n-tree-item[data-v-30df3c1d]{
89
+ .n-tree-item[data-v-278e8175]{
90
90
  --n-tree-depth: 0;
91
91
  position: relative;
92
+ margin-bottom: 1px;
93
+ }
94
+
95
+ .n-tree-item[data-v-278e8175]:last-child{
96
+ margin-bottom: 0;
92
97
  }
93
98
 
94
99
  /* Líneas conectoras verticales */
95
- .n-tree-item[data-v-30df3c1d]:not([style*="--n-tree-depth: 0"])::before{
100
+ .n-tree-item[data-v-278e8175]:not([style*="--n-tree-depth: 0"])::before{
96
101
  content: '';
97
102
  position: absolute;
98
103
  left: calc(0.5rem + (var(--n-tree-depth, 0) - 1) * 1.25rem + 0.5rem);
@@ -100,24 +105,24 @@ const __style = `.n-tree-menu[data-v-30df3c1d]{
100
105
  bottom: 0;
101
106
  width: 1px;
102
107
  background: var(--n-color-border);
103
- opacity: 0.5;
108
+ opacity: 0.35;
104
109
  }
105
110
 
106
- .n-tree-row[data-v-30df3c1d]{
111
+ .n-tree-row[data-v-278e8175]{
107
112
  display: flex;
108
113
  align-items: center;
109
114
  gap: 0.5rem;
110
- padding: 0.5rem 0.75rem;
115
+ padding: 0.55rem 0.75rem;
111
116
  padding-left: calc(0.75rem + var(--n-tree-depth, 0) * 1.25rem);
112
117
  border-radius: var(--n-radius-sm);
113
118
  cursor: pointer;
114
- transition: all var(--n-transition-fast);
119
+ transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
115
120
  color: var(--n-color-text);
116
121
  position: relative;
117
122
  }
118
123
 
119
124
  /* Línea conectora horizontal */
120
- .n-tree-item[data-v-30df3c1d]:not([style*="--n-tree-depth: 0"]) .n-tree-row::before{
125
+ .n-tree-item[data-v-278e8175]:not([style*="--n-tree-depth: 0"]) .n-tree-row::before{
121
126
  content: '';
122
127
  position: absolute;
123
128
  left: calc(0.75rem + (var(--n-tree-depth, 0) - 1) * 1.25rem + 0.5rem);
@@ -125,66 +130,102 @@ const __style = `.n-tree-menu[data-v-30df3c1d]{
125
130
  width: 0.75rem;
126
131
  height: 1px;
127
132
  background: var(--n-color-border);
128
- opacity: 0.5;
133
+ opacity: 0.35;
129
134
  }
130
135
 
131
- .n-tree-row[data-v-30df3c1d]:hover{
132
- background: var(--n-color-surface-hover);
136
+ .n-tree-row[data-v-278e8175]:hover{
137
+ background: linear-gradient(135deg, var(--n-color-surface-hover), color-mix(in srgb, var(--n-color-surface-hover) 85%, var(--n-color-primary) 5%));
133
138
  }
134
139
 
135
- .n-tree-item.is-selected > .n-tree-row[data-v-30df3c1d]{
140
+ .n-tree-row[data-v-278e8175]:active{
141
+ background: color-mix(in srgb, var(--n-color-surface-hover) 80%, var(--n-color-text) 5%);
142
+ }
143
+
144
+ .n-tree-item.is-selected > .n-tree-row[data-v-278e8175]{
136
145
  background: var(--n-color-primary-light);
137
146
  color: var(--n-color-primary);
138
147
  font-weight: var(--n-weight-semibold);
139
148
  }
140
149
 
141
- .n-tree-toggle[data-v-30df3c1d]{
150
+ .n-tree-item.is-selected > .n-tree-row[data-v-278e8175]::after{
151
+ content: '';
152
+ position: absolute;
153
+ left: 0;
154
+ top: 0;
155
+ bottom: 0;
156
+ width: 3px;
157
+ background: var(--n-color-primary);
158
+ border-radius: 0 var(--n-radius-sm) var(--n-radius-sm) 0;
159
+ }
160
+
161
+ .n-tree-toggle[data-v-278e8175]{
142
162
  background: var(--n-color-glass);
143
163
  border: 1px solid var(--n-color-border);
144
- border-radius: var(--n-radius-sm);
164
+ border-radius: var(--n-radius-md);
145
165
  color: var(--n-color-text-secondary);
146
166
  cursor: pointer;
147
- width: 20px;
148
- height: 20px;
167
+ width: 22px;
168
+ height: 22px;
149
169
  display: flex;
150
170
  align-items: center;
151
171
  justify-content: center;
152
172
  padding: 0;
153
- transition: all var(--n-transition-fast);
173
+ transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
154
174
  flex-shrink: 0;
155
175
  }
156
176
 
157
- .n-tree-toggle[data-v-30df3c1d]:hover{
158
- background: var(--n-color-primary-light);
177
+ .n-tree-toggle[data-v-278e8175]:hover{
178
+ background: color-mix(in srgb, var(--n-color-primary-light) 80%, var(--n-color-primary) 10%);
159
179
  border-color: var(--n-color-primary);
160
180
  color: var(--n-color-primary);
181
+ transform: scale(1.05);
182
+ }
183
+
184
+ .n-tree-toggle[data-v-278e8175]:active{
185
+ transform: scale(0.95);
186
+ }
187
+
188
+ .n-tree-toggle[data-v-278e8175]:focus-visible{
189
+ outline: none;
190
+ box-shadow: 0 0 0 2px var(--n-color-background), 0 0 0 4px var(--n-color-primary);
191
+ z-index: 1;
161
192
  }
162
193
 
163
- .n-tree-toggle svg[data-v-30df3c1d]{
164
- transition: transform var(--n-transition-fast);
194
+ .n-tree-row[data-v-278e8175]:focus-visible{
195
+ outline: none;
196
+ box-shadow: inset 0 0 0 2px var(--n-color-primary);
197
+ border-radius: var(--n-radius-md);
165
198
  }
166
199
 
167
- .n-tree-toggle.is-expanded svg[data-v-30df3c1d]{
168
- transform: rotate(45deg);
200
+ .n-tree-toggle-icon[data-v-278e8175]{
201
+ font-size: 1rem;
202
+ line-height: 1;
203
+ font-weight: 700;
169
204
  }
170
205
 
171
- .n-tree-toggle-placeholder[data-v-30df3c1d]{
206
+ .n-tree-toggle-placeholder[data-v-278e8175]{
172
207
  width: 20px;
173
208
  height: 20px;
174
209
  flex-shrink: 0;
175
210
  }
176
211
 
177
- .n-tree-icon[data-v-30df3c1d]{
212
+ .n-tree-icon[data-v-278e8175]{
178
213
  font-size: 1.1rem;
179
214
  flex-shrink: 0;
180
215
  }
181
216
 
182
- .n-tree-label[data-v-30df3c1d]{
217
+ .n-tree-label[data-v-278e8175]{
183
218
  flex: 1;
184
219
  min-width: 0;
185
220
  overflow: hidden;
186
221
  text-overflow: ellipsis;
187
222
  white-space: nowrap;
188
223
  font-weight: var(--n-weight-medium);
224
+ letter-spacing: 0.01em;
225
+ }
226
+
227
+ .n-tree-item.is-selected .n-tree-label[data-v-278e8175]{
228
+ font-weight: var(--n-weight-bold);
229
+ letter-spacing: 0;
189
230
  }`
190
- injectStyle('data-v-30df3c1d', __style)
231
+ injectStyle('data-v-278e8175', __style)
@@ -48,18 +48,18 @@ const toggle = (id, e) => {
48
48
  </script>
49
49
 
50
50
  <template>
51
- <div class="n-tree-menu">
51
+ <div class="n-tree-menu" role="tree">
52
52
  <div v-for="item in flatTree.value" :key="item.id"
53
53
  class="n-tree-item"
54
54
  :class="{ 'is-selected': isSelected(item.id) }"
55
55
  :style="{ '--n-tree-depth': String(item._depth) }"
56
56
  >
57
- <div class="n-tree-row" @click="selectItem(item)">
57
+ <div class="n-tree-row" tabindex="0" role="treeitem" :aria-selected="isSelected(item.id)" @click="selectItem(item)">
58
58
  <button v-if="hasChildren(item)"
59
59
  class="n-tree-toggle"
60
60
  :class="{ 'is-expanded': isExpanded(item.id) }"
61
61
  @click="toggle(item.id, $event)"
62
- ><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"><path d="M12 5v14M5 12h14"/></svg></button>
62
+ ><span class="n-tree-toggle-icon">{{ isExpanded(item.id) ? '−' : '+' }}</span></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>
@@ -78,6 +78,11 @@ const toggle = (id, e) => {
78
78
  .n-tree-item {
79
79
  --n-tree-depth: 0;
80
80
  position: relative;
81
+ margin-bottom: 1px;
82
+ }
83
+
84
+ .n-tree-item:last-child {
85
+ margin-bottom: 0;
81
86
  }
82
87
 
83
88
  /* Líneas conectoras verticales */
@@ -89,18 +94,18 @@ const toggle = (id, e) => {
89
94
  bottom: 0;
90
95
  width: 1px;
91
96
  background: var(--n-color-border);
92
- opacity: 0.5;
97
+ opacity: 0.35;
93
98
  }
94
99
 
95
100
  .n-tree-row {
96
101
  display: flex;
97
102
  align-items: center;
98
103
  gap: 0.5rem;
99
- padding: 0.5rem 0.75rem;
104
+ padding: 0.55rem 0.75rem;
100
105
  padding-left: calc(0.75rem + var(--n-tree-depth, 0) * 1.25rem);
101
106
  border-radius: var(--n-radius-sm);
102
107
  cursor: pointer;
103
- transition: all var(--n-transition-fast);
108
+ transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
104
109
  color: var(--n-color-text);
105
110
  position: relative;
106
111
  }
@@ -114,11 +119,15 @@ const toggle = (id, e) => {
114
119
  width: 0.75rem;
115
120
  height: 1px;
116
121
  background: var(--n-color-border);
117
- opacity: 0.5;
122
+ opacity: 0.35;
118
123
  }
119
124
 
120
125
  .n-tree-row:hover {
121
- background: var(--n-color-surface-hover);
126
+ background: linear-gradient(135deg, var(--n-color-surface-hover), color-mix(in srgb, var(--n-color-surface-hover) 85%, var(--n-color-primary) 5%));
127
+ }
128
+
129
+ .n-tree-row:active {
130
+ background: color-mix(in srgb, var(--n-color-surface-hover) 80%, var(--n-color-text) 5%);
122
131
  }
123
132
 
124
133
  .n-tree-item.is-selected > .n-tree-row {
@@ -127,34 +136,60 @@ const toggle = (id, e) => {
127
136
  font-weight: var(--n-weight-semibold);
128
137
  }
129
138
 
139
+ .n-tree-item.is-selected > .n-tree-row::after {
140
+ content: '';
141
+ position: absolute;
142
+ left: 0;
143
+ top: 0;
144
+ bottom: 0;
145
+ width: 3px;
146
+ background: var(--n-color-primary);
147
+ border-radius: 0 var(--n-radius-sm) var(--n-radius-sm) 0;
148
+ }
149
+
130
150
  .n-tree-toggle {
131
151
  background: var(--n-color-glass);
132
152
  border: 1px solid var(--n-color-border);
133
- border-radius: var(--n-radius-sm);
153
+ border-radius: var(--n-radius-md);
134
154
  color: var(--n-color-text-secondary);
135
155
  cursor: pointer;
136
- width: 20px;
137
- height: 20px;
156
+ width: 22px;
157
+ height: 22px;
138
158
  display: flex;
139
159
  align-items: center;
140
160
  justify-content: center;
141
161
  padding: 0;
142
- transition: all var(--n-transition-fast);
162
+ transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
143
163
  flex-shrink: 0;
144
164
  }
145
165
 
146
166
  .n-tree-toggle:hover {
147
- background: var(--n-color-primary-light);
167
+ background: color-mix(in srgb, var(--n-color-primary-light) 80%, var(--n-color-primary) 10%);
148
168
  border-color: var(--n-color-primary);
149
169
  color: var(--n-color-primary);
170
+ transform: scale(1.05);
171
+ }
172
+
173
+ .n-tree-toggle:active {
174
+ transform: scale(0.95);
175
+ }
176
+
177
+ .n-tree-toggle:focus-visible {
178
+ outline: none;
179
+ box-shadow: 0 0 0 2px var(--n-color-background), 0 0 0 4px var(--n-color-primary);
180
+ z-index: 1;
150
181
  }
151
182
 
152
- .n-tree-toggle svg {
153
- transition: transform var(--n-transition-fast);
183
+ .n-tree-row:focus-visible {
184
+ outline: none;
185
+ box-shadow: inset 0 0 0 2px var(--n-color-primary);
186
+ border-radius: var(--n-radius-md);
154
187
  }
155
188
 
156
- .n-tree-toggle.is-expanded svg {
157
- transform: rotate(45deg);
189
+ .n-tree-toggle-icon {
190
+ font-size: 1rem;
191
+ line-height: 1;
192
+ font-weight: 700;
158
193
  }
159
194
 
160
195
  .n-tree-toggle-placeholder {
@@ -175,5 +210,11 @@ const toggle = (id, e) => {
175
210
  text-overflow: ellipsis;
176
211
  white-space: nowrap;
177
212
  font-weight: var(--n-weight-medium);
213
+ letter-spacing: 0.01em;
214
+ }
215
+
216
+ .n-tree-item.is-selected .n-tree-label {
217
+ font-weight: var(--n-weight-bold);
218
+ letter-spacing: 0;
178
219
  }
179
220
  </style>