@neural-ui/core 1.5.14 → 1.6.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 (137) hide show
  1. package/fesm2022/neural-ui-core-accordion.mjs +13 -9
  2. package/fesm2022/neural-ui-core-accordion.mjs.map +1 -1
  3. package/fesm2022/neural-ui-core-alert.mjs +25 -14
  4. package/fesm2022/neural-ui-core-alert.mjs.map +1 -1
  5. package/fesm2022/neural-ui-core-autocomplete.mjs +53 -28
  6. package/fesm2022/neural-ui-core-autocomplete.mjs.map +1 -1
  7. package/fesm2022/neural-ui-core-avatar.mjs +23 -13
  8. package/fesm2022/neural-ui-core-avatar.mjs.map +1 -1
  9. package/fesm2022/neural-ui-core-badge.mjs +15 -9
  10. package/fesm2022/neural-ui-core-badge.mjs.map +1 -1
  11. package/fesm2022/neural-ui-core-block-ui.mjs +16 -11
  12. package/fesm2022/neural-ui-core-block-ui.mjs.map +1 -1
  13. package/fesm2022/neural-ui-core-breadcrumb.mjs +8 -6
  14. package/fesm2022/neural-ui-core-breadcrumb.mjs.map +1 -1
  15. package/fesm2022/neural-ui-core-button.mjs +29 -16
  16. package/fesm2022/neural-ui-core-button.mjs.map +1 -1
  17. package/fesm2022/neural-ui-core-calendar.mjs +75 -50
  18. package/fesm2022/neural-ui-core-calendar.mjs.map +1 -1
  19. package/fesm2022/neural-ui-core-card.mjs +13 -8
  20. package/fesm2022/neural-ui-core-card.mjs.map +1 -1
  21. package/fesm2022/neural-ui-core-chart.mjs +45 -24
  22. package/fesm2022/neural-ui-core-chart.mjs.map +1 -1
  23. package/fesm2022/neural-ui-core-checkbox.mjs +15 -9
  24. package/fesm2022/neural-ui-core-checkbox.mjs.map +1 -1
  25. package/fesm2022/neural-ui-core-chip.mjs +23 -13
  26. package/fesm2022/neural-ui-core-chip.mjs.map +1 -1
  27. package/fesm2022/neural-ui-core-code-block.mjs +32 -17
  28. package/fesm2022/neural-ui-core-code-block.mjs.map +1 -1
  29. package/fesm2022/neural-ui-core-color-picker.mjs +19 -11
  30. package/fesm2022/neural-ui-core-color-picker.mjs.map +1 -1
  31. package/fesm2022/neural-ui-core-command-palette.mjs +16 -11
  32. package/fesm2022/neural-ui-core-command-palette.mjs.map +1 -1
  33. package/fesm2022/neural-ui-core-confirm-dialog.mjs +6 -6
  34. package/fesm2022/neural-ui-core-context-menu.mjs +12 -9
  35. package/fesm2022/neural-ui-core-context-menu.mjs.map +1 -1
  36. package/fesm2022/neural-ui-core-dashboard-grid.mjs +11 -7
  37. package/fesm2022/neural-ui-core-dashboard-grid.mjs.map +1 -1
  38. package/fesm2022/neural-ui-core-date-input.mjs +111 -57
  39. package/fesm2022/neural-ui-core-date-input.mjs.map +1 -1
  40. package/fesm2022/neural-ui-core-divider.mjs +7 -5
  41. package/fesm2022/neural-ui-core-divider.mjs.map +1 -1
  42. package/fesm2022/neural-ui-core-empty-state.mjs +13 -8
  43. package/fesm2022/neural-ui-core-empty-state.mjs.map +1 -1
  44. package/fesm2022/neural-ui-core-filter-bar.mjs +19 -11
  45. package/fesm2022/neural-ui-core-filter-bar.mjs.map +1 -1
  46. package/fesm2022/neural-ui-core-icon.mjs +11 -7
  47. package/fesm2022/neural-ui-core-icon.mjs.map +1 -1
  48. package/fesm2022/neural-ui-core-image-gallery.mjs +23 -13
  49. package/fesm2022/neural-ui-core-image-gallery.mjs.map +1 -1
  50. package/fesm2022/neural-ui-core-image-viewer.mjs +22 -14
  51. package/fesm2022/neural-ui-core-image-viewer.mjs.map +1 -1
  52. package/fesm2022/neural-ui-core-input-otp.mjs +19 -11
  53. package/fesm2022/neural-ui-core-input-otp.mjs.map +1 -1
  54. package/fesm2022/neural-ui-core-input.mjs +67 -35
  55. package/fesm2022/neural-ui-core-input.mjs.map +1 -1
  56. package/fesm2022/neural-ui-core-kanban.mjs +17 -11
  57. package/fesm2022/neural-ui-core-kanban.mjs.map +1 -1
  58. package/fesm2022/neural-ui-core-knob.mjs +41 -22
  59. package/fesm2022/neural-ui-core-knob.mjs.map +1 -1
  60. package/fesm2022/neural-ui-core-meter-group.mjs +23 -13
  61. package/fesm2022/neural-ui-core-meter-group.mjs.map +1 -1
  62. package/fesm2022/neural-ui-core-modal.mjs +16 -11
  63. package/fesm2022/neural-ui-core-modal.mjs.map +1 -1
  64. package/fesm2022/neural-ui-core-multiselect.mjs +72 -39
  65. package/fesm2022/neural-ui-core-multiselect.mjs.map +1 -1
  66. package/fesm2022/neural-ui-core-nav.mjs +22 -13
  67. package/fesm2022/neural-ui-core-nav.mjs.map +1 -1
  68. package/fesm2022/neural-ui-core-notification-center.mjs +27 -10
  69. package/fesm2022/neural-ui-core-notification-center.mjs.map +1 -1
  70. package/fesm2022/neural-ui-core-number-input.mjs +35 -19
  71. package/fesm2022/neural-ui-core-number-input.mjs.map +1 -1
  72. package/fesm2022/neural-ui-core-pagination.mjs +15 -9
  73. package/fesm2022/neural-ui-core-pagination.mjs.map +1 -1
  74. package/fesm2022/neural-ui-core-popover.mjs +22 -14
  75. package/fesm2022/neural-ui-core-popover.mjs.map +1 -1
  76. package/fesm2022/neural-ui-core-progress-bar.mjs +19 -11
  77. package/fesm2022/neural-ui-core-progress-bar.mjs.map +1 -1
  78. package/fesm2022/neural-ui-core-radio.mjs +24 -15
  79. package/fesm2022/neural-ui-core-radio.mjs.map +1 -1
  80. package/fesm2022/neural-ui-core-rating.mjs +13 -8
  81. package/fesm2022/neural-ui-core-rating.mjs.map +1 -1
  82. package/fesm2022/neural-ui-core-rich-text-editor.mjs +773 -0
  83. package/fesm2022/neural-ui-core-rich-text-editor.mjs.map +1 -0
  84. package/fesm2022/neural-ui-core-scheduler-gantt.mjs +41 -22
  85. package/fesm2022/neural-ui-core-scheduler-gantt.mjs.map +1 -1
  86. package/fesm2022/neural-ui-core-select.mjs +77 -43
  87. package/fesm2022/neural-ui-core-select.mjs.map +1 -1
  88. package/fesm2022/neural-ui-core-sidebar.mjs +23 -14
  89. package/fesm2022/neural-ui-core-sidebar.mjs.map +1 -1
  90. package/fesm2022/neural-ui-core-skeleton.mjs +11 -7
  91. package/fesm2022/neural-ui-core-skeleton.mjs.map +1 -1
  92. package/fesm2022/neural-ui-core-slider.mjs +23 -13
  93. package/fesm2022/neural-ui-core-slider.mjs.map +1 -1
  94. package/fesm2022/neural-ui-core-spinner.mjs +17 -10
  95. package/fesm2022/neural-ui-core-spinner.mjs.map +1 -1
  96. package/fesm2022/neural-ui-core-split-button.mjs +27 -15
  97. package/fesm2022/neural-ui-core-split-button.mjs.map +1 -1
  98. package/fesm2022/neural-ui-core-splitter.mjs +9 -6
  99. package/fesm2022/neural-ui-core-splitter.mjs.map +1 -1
  100. package/fesm2022/neural-ui-core-stats-card.mjs +19 -11
  101. package/fesm2022/neural-ui-core-stats-card.mjs.map +1 -1
  102. package/fesm2022/neural-ui-core-stepper.mjs +13 -8
  103. package/fesm2022/neural-ui-core-stepper.mjs.map +1 -1
  104. package/fesm2022/neural-ui-core-switch.mjs +15 -9
  105. package/fesm2022/neural-ui-core-switch.mjs.map +1 -1
  106. package/fesm2022/neural-ui-core-table.mjs +242 -124
  107. package/fesm2022/neural-ui-core-table.mjs.map +1 -1
  108. package/fesm2022/neural-ui-core-tabs.mjs +30 -18
  109. package/fesm2022/neural-ui-core-tabs.mjs.map +1 -1
  110. package/fesm2022/neural-ui-core-textarea.mjs +43 -23
  111. package/fesm2022/neural-ui-core-textarea.mjs.map +1 -1
  112. package/fesm2022/neural-ui-core-timeline-grid.mjs +21 -12
  113. package/fesm2022/neural-ui-core-timeline-grid.mjs.map +1 -1
  114. package/fesm2022/neural-ui-core-timeline.mjs +5 -4
  115. package/fesm2022/neural-ui-core-timeline.mjs.map +1 -1
  116. package/fesm2022/neural-ui-core-toast.mjs +25 -9
  117. package/fesm2022/neural-ui-core-toast.mjs.map +1 -1
  118. package/fesm2022/neural-ui-core-toggle-button-group.mjs +17 -10
  119. package/fesm2022/neural-ui-core-toggle-button-group.mjs.map +1 -1
  120. package/fesm2022/neural-ui-core-toolbar.mjs +13 -8
  121. package/fesm2022/neural-ui-core-toolbar.mjs.map +1 -1
  122. package/fesm2022/neural-ui-core-tooltip.mjs +16 -11
  123. package/fesm2022/neural-ui-core-tooltip.mjs.map +1 -1
  124. package/fesm2022/neural-ui-core-tree-table.mjs +57 -30
  125. package/fesm2022/neural-ui-core-tree-table.mjs.map +1 -1
  126. package/fesm2022/neural-ui-core-tree.mjs +31 -17
  127. package/fesm2022/neural-ui-core-tree.mjs.map +1 -1
  128. package/fesm2022/neural-ui-core-uploader.mjs +91 -47
  129. package/fesm2022/neural-ui-core-uploader.mjs.map +1 -1
  130. package/fesm2022/neural-ui-core-url-state.mjs +7 -5
  131. package/fesm2022/neural-ui-core-url-state.mjs.map +1 -1
  132. package/fesm2022/neural-ui-core-virtual-list.mjs +32 -19
  133. package/fesm2022/neural-ui-core-virtual-list.mjs.map +1 -1
  134. package/package.json +5 -1
  135. package/types/neural-ui-core-notification-center.d.ts +2 -0
  136. package/types/neural-ui-core-rich-text-editor.d.ts +97 -0
  137. package/types/neural-ui-core-toast.d.ts +2 -0
@@ -31,23 +31,32 @@ function computeParetoCumulative(data) {
31
31
  */
32
32
  class NeuChartComponent {
33
33
  /** Tipo de gráfica. / Chart type. */
34
- type = input('line', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
34
+ type = input('line', /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
35
36
  /** Series para gráficas de ejes (line, area, bar, pareto…). / Series for axis-based charts (line, area, bar, pareto…). */
36
- series = input([], ...(ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []));
37
+ series = input([], /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []));
37
39
  /** Series para gráficas sin ejes (donut, pie). / Series for non-axis charts (donut, pie). */
38
- pieSeries = input([], ...(ngDevMode ? [{ debugName: "pieSeries" }] : /* istanbul ignore next */ []));
40
+ pieSeries = input([], /* @ts-ignore */
41
+ ...(ngDevMode ? [{ debugName: "pieSeries" }] : /* istanbul ignore next */ []));
39
42
  /** Etiquetas del eje X. / X-axis labels. */
40
- categories = input([], ...(ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []));
43
+ categories = input([], /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []));
41
45
  /** Etiquetas para donut/pie. / Labels for donut/pie. */
42
- labels = input([], ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
46
+ labels = input([], /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
43
48
  /** Altura en px. / Height in px. */
44
- height = input(280, ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
49
+ height = input(280, /* @ts-ignore */
50
+ ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
45
51
  /** Colores custom. Si no se proveen, usa la paleta Neural-Blue. / Custom colors. If not provided, uses the Neural-Blue palette. */
46
- colors = input([], ...(ngDevMode ? [{ debugName: "colors" }] : /* istanbul ignore next */ []));
52
+ colors = input([], /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "colors" }] : /* istanbul ignore next */ []));
47
54
  /** Muestra/oculta las etiquetas de datos. / Shows/hides data labels. */
48
- showDataLabels = input(false, ...(ngDevMode ? [{ debugName: "showDataLabels" }] : /* istanbul ignore next */ []));
55
+ showDataLabels = input(false, /* @ts-ignore */
56
+ ...(ngDevMode ? [{ debugName: "showDataLabels" }] : /* istanbul ignore next */ []));
49
57
  /** Título de la gráfica. / Chart title. */
50
- title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
58
+ title = input('', /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
51
60
  // --------------------------------------------------
52
61
  // Helpers privados
53
62
  // --------------------------------------------------
@@ -63,7 +72,8 @@ class NeuChartComponent {
63
72
  // --------------------------------------------------
64
73
  // Configs computadas
65
74
  // --------------------------------------------------
66
- resolvedColors = computed(() => this.colors().length ? this.colors() : DEFAULT_COLORS, ...(ngDevMode ? [{ debugName: "resolvedColors" }] : /* istanbul ignore next */ []));
75
+ resolvedColors = computed(() => this.colors().length ? this.colors() : DEFAULT_COLORS, /* @ts-ignore */
76
+ ...(ngDevMode ? [{ debugName: "resolvedColors" }] : /* istanbul ignore next */ []));
67
77
  resolvedSeries = computed(() => {
68
78
  const t = this.type();
69
79
  if (t === 'donut' || t === 'pie' || t === 'radialBar')
@@ -79,7 +89,8 @@ class NeuChartComponent {
79
89
  ];
80
90
  }
81
91
  return this.series();
82
- }, ...(ngDevMode ? [{ debugName: "resolvedSeries" }] : /* istanbul ignore next */ []));
92
+ }, /* @ts-ignore */
93
+ ...(ngDevMode ? [{ debugName: "resolvedSeries" }] : /* istanbul ignore next */ []));
83
94
  chartConfig = computed(() => {
84
95
  const t = this.type();
85
96
  const apexType = t === 'bar-stacked' || t === 'bar-horizontal' || t === 'bar-horizontal-stacked'
@@ -99,7 +110,8 @@ class NeuChartComponent {
99
110
  zoom: { enabled: false },
100
111
  animations: { enabled: true, speed: 500 },
101
112
  };
102
- }, ...(ngDevMode ? [{ debugName: "chartConfig" }] : /* istanbul ignore next */ []));
113
+ }, /* @ts-ignore */
114
+ ...(ngDevMode ? [{ debugName: "chartConfig" }] : /* istanbul ignore next */ []));
103
115
  xaxisConfig = computed(() => ({
104
116
  categories: this.categories(),
105
117
  labels: {
@@ -107,7 +119,8 @@ class NeuChartComponent {
107
119
  },
108
120
  axisBorder: { show: false },
109
121
  axisTicks: { show: false },
110
- }), ...(ngDevMode ? [{ debugName: "xaxisConfig" }] : /* istanbul ignore next */ []));
122
+ }), /* @ts-ignore */
123
+ ...(ngDevMode ? [{ debugName: "xaxisConfig" }] : /* istanbul ignore next */ []));
111
124
  yaxisConfig = computed(() => {
112
125
  const labelStyle = { fontSize: '12px', fontFamily: 'inherit', colors: '#94a3b8' };
113
126
  if (this.type() === 'pareto') {
@@ -126,7 +139,8 @@ class NeuChartComponent {
126
139
  ];
127
140
  }
128
141
  return { labels: { style: labelStyle } };
129
- }, ...(ngDevMode ? [{ debugName: "yaxisConfig" }] : /* istanbul ignore next */ []));
142
+ }, /* @ts-ignore */
143
+ ...(ngDevMode ? [{ debugName: "yaxisConfig" }] : /* istanbul ignore next */ []));
130
144
  strokeConfig = computed(() => {
131
145
  const t = this.type();
132
146
  if (t === 'pareto') {
@@ -140,7 +154,8 @@ class NeuChartComponent {
140
154
  if (this._isBar || t === 'donut' || t === 'pie' || t === 'radialBar')
141
155
  return { show: false };
142
156
  return { curve: 'smooth', width: 2 };
143
- }, ...(ngDevMode ? [{ debugName: "strokeConfig" }] : /* istanbul ignore next */ []));
157
+ }, /* @ts-ignore */
158
+ ...(ngDevMode ? [{ debugName: "strokeConfig" }] : /* istanbul ignore next */ []));
144
159
  fillConfig = computed(() => {
145
160
  const t = this.type();
146
161
  if (t === 'area') {
@@ -150,25 +165,29 @@ class NeuChartComponent {
150
165
  };
151
166
  }
152
167
  return { opacity: 0.85 };
153
- }, ...(ngDevMode ? [{ debugName: "fillConfig" }] : /* istanbul ignore next */ []));
168
+ }, /* @ts-ignore */
169
+ ...(ngDevMode ? [{ debugName: "fillConfig" }] : /* istanbul ignore next */ []));
154
170
  dataLabelsConfig = computed(() => ({
155
171
  enabled: this.showDataLabels(),
156
172
  style: { fontSize: '11px', fontFamily: 'inherit' },
157
- }), ...(ngDevMode ? [{ debugName: "dataLabelsConfig" }] : /* istanbul ignore next */ []));
173
+ }), /* @ts-ignore */
174
+ ...(ngDevMode ? [{ debugName: "dataLabelsConfig" }] : /* istanbul ignore next */ []));
158
175
  gridConfig = computed(() => ({
159
176
  borderColor: '#e2e8f0',
160
177
  strokeDashArray: 4,
161
178
  xaxis: { lines: { show: false } },
162
179
  yaxis: { lines: { show: true } },
163
180
  padding: { left: 4, right: 4 },
164
- }), ...(ngDevMode ? [{ debugName: "gridConfig" }] : /* istanbul ignore next */ []));
181
+ }), /* @ts-ignore */
182
+ ...(ngDevMode ? [{ debugName: "gridConfig" }] : /* istanbul ignore next */ []));
165
183
  legendConfig = computed(() => ({
166
184
  position: 'bottom',
167
185
  fontFamily: 'inherit',
168
186
  fontSize: '12px',
169
187
  markers: { size: 6 },
170
188
  itemMargin: { horizontal: 8 },
171
- }), ...(ngDevMode ? [{ debugName: "legendConfig" }] : /* istanbul ignore next */ []));
189
+ }), /* @ts-ignore */
190
+ ...(ngDevMode ? [{ debugName: "legendConfig" }] : /* istanbul ignore next */ []));
172
191
  tooltipConfig = computed(() => {
173
192
  const base = {
174
193
  theme: 'light',
@@ -185,7 +204,8 @@ class NeuChartComponent {
185
204
  };
186
205
  }
187
206
  return base;
188
- }, ...(ngDevMode ? [{ debugName: "tooltipConfig" }] : /* istanbul ignore next */ []));
207
+ }, /* @ts-ignore */
208
+ ...(ngDevMode ? [{ debugName: "tooltipConfig" }] : /* istanbul ignore next */ []));
189
209
  plotOptionsConfig = computed(() => {
190
210
  const t = this.type();
191
211
  if (t === 'donut' || t === 'pie') {
@@ -239,9 +259,10 @@ class NeuChartComponent {
239
259
  };
240
260
  }
241
261
  return {};
242
- }, ...(ngDevMode ? [{ debugName: "plotOptionsConfig" }] : /* istanbul ignore next */ []));
243
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
244
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: NeuChartComponent, isStandalone: true, selector: "neu-chart", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: false, transformFunction: null }, pieSeries: { classPropertyName: "pieSeries", publicName: "pieSeries", isSignal: true, isRequired: false, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null }, showDataLabels: { classPropertyName: "showDataLabels", publicName: "showDataLabels", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "neu-chart" }, ngImport: i0, template: `
262
+ }, /* @ts-ignore */
263
+ ...(ngDevMode ? [{ debugName: "plotOptionsConfig" }] : /* istanbul ignore next */ []));
264
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NeuChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
265
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: NeuChartComponent, isStandalone: true, selector: "neu-chart", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: false, transformFunction: null }, pieSeries: { classPropertyName: "pieSeries", publicName: "pieSeries", isSignal: true, isRequired: false, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null }, showDataLabels: { classPropertyName: "showDataLabels", publicName: "showDataLabels", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "neu-chart" }, ngImport: i0, template: `
245
266
  <apx-chart
246
267
  [chart]="chartConfig()"
247
268
  [series]="resolvedSeries()"
@@ -259,7 +280,7 @@ class NeuChartComponent {
259
280
  />
260
281
  `, isInline: true, styles: [".neu-chart{display:block;width:100%}.neu-chart .apexcharts-canvas{background:transparent!important}.neu-chart .apexcharts-canvas circle[fill=transparent]{pointer-events:none}.neu-chart .apexcharts-tooltip{border:1px solid var(--neu-border)!important;box-shadow:var(--neu-shadow-sm)!important;border-radius:var(--neu-radius)!important;font-family:inherit!important;font-size:12px!important;background:var(--neu-surface)!important;color:var(--neu-text)!important}.neu-chart .apexcharts-tooltip-title{background:var(--neu-surface-2)!important;border-bottom:1px solid var(--neu-border)!important;font-weight:600!important;color:var(--neu-text)!important;padding:6px 10px!important}.neu-chart .apexcharts-xaxistooltip,.neu-chart .apexcharts-yaxistooltip{background:var(--neu-surface)!important;border-color:var(--neu-border)!important;color:var(--neu-text-muted)!important}.neu-chart .apexcharts-legend-text{color:var(--neu-text-muted)!important;font-family:inherit!important}.neu-chart .apexcharts-yaxis-label,.neu-chart .apexcharts-xaxis-label{fill:var(--neu-text-muted)!important;font-family:inherit!important}.neu-chart .apexcharts-gridline{stroke:var(--neu-border)!important}\n"], dependencies: [{ kind: "component", type: ChartComponent, selector: "apx-chart", inputs: ["chart", "annotations", "colors", "dataLabels", "series", "stroke", "labels", "legend", "markers", "noData", "parsing", "fill", "tooltip", "plotOptions", "responsive", "xaxis", "yaxis", "forecastDataPoints", "grid", "states", "title", "subtitle", "theme", "autoUpdateSeries"], outputs: ["chartReady"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
261
282
  }
262
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuChartComponent, decorators: [{
283
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NeuChartComponent, decorators: [{
263
284
  type: Component,
264
285
  args: [{ selector: 'neu-chart', imports: [ChartComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'neu-chart' }, template: `
265
286
  <apx-chart
@@ -1 +1 @@
1
- {"version":3,"file":"neural-ui-core-chart.mjs","sources":["../../../../projects/ui-core/chart/neu-chart.component.ts","../../../../projects/ui-core/chart/neural-ui-core-chart.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n} from '@angular/core';\nimport { ChartComponent } from 'ng-apexcharts';\n\nexport type NeuChartType =\n | 'line'\n | 'area'\n | 'bar'\n | 'bar-stacked'\n | 'bar-horizontal'\n | 'bar-horizontal-stacked'\n | 'pareto'\n | 'donut'\n | 'pie'\n | 'radialBar';\n\nexport interface NeuChartSeries {\n name: string;\n data: number[];\n}\n\n/** Paleta por defecto Neural-Blue / Default Neural-Blue palette */\nconst DEFAULT_COLORS = ['#007aff', '#5856d6', '#34c759', '#ff9f0a', '#ff3b30', '#64748b'];\n\n/** Calcula la línea acumulada porcentual para un diagrama de Pareto. / Calculates the cumulative percentage line for a Pareto chart. */\nfunction computeParetoCumulative(data: number[]): number[] {\n const total = data.reduce((s, v) => s + Math.abs(v), 0);\n if (total === 0) return data.map(() => 0);\n let cum = 0;\n return data.map((v) => {\n cum += Math.abs(v);\n return Math.round((cum / total) * 1000) / 10;\n });\n}\n\n/**\n * NeuChart — Wrapper reactivo de ApexCharts con estética Neural-Blue.\n *\n * Tipos soportados:\n * line · area · bar · bar-stacked · bar-horizontal · bar-horizontal-stacked · pareto · donut · pie · radialBar\n *\n * Uso:\n * <neu-chart\n * type=\"bar-stacked\"\n * [series]=\"series()\"\n * [categories]=\"months()\"\n * height=\"280\"\n * />\n */\n@Component({\n selector: 'neu-chart',\n imports: [ChartComponent],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'neu-chart' },\n template: `\n <apx-chart\n [chart]=\"chartConfig()\"\n [series]=\"resolvedSeries()\"\n [labels]=\"labels()\"\n [xaxis]=\"xaxisConfig()\"\n [yaxis]=\"yaxisConfig()\"\n [colors]=\"resolvedColors()\"\n [stroke]=\"strokeConfig()\"\n [fill]=\"fillConfig()\"\n [dataLabels]=\"dataLabelsConfig()\"\n [grid]=\"gridConfig()\"\n [legend]=\"legendConfig()\"\n [tooltip]=\"tooltipConfig()\"\n [plotOptions]=\"plotOptionsConfig()\"\n />\n `,\n styleUrl: './neu-chart.component.scss',\n})\nexport class NeuChartComponent {\n /** Tipo de gráfica. / Chart type. */\n type = input<NeuChartType>('line');\n /** Series para gráficas de ejes (line, area, bar, pareto…). / Series for axis-based charts (line, area, bar, pareto…). */\n series = input<NeuChartSeries[]>([]);\n /** Series para gráficas sin ejes (donut, pie). / Series for non-axis charts (donut, pie). */\n pieSeries = input<number[]>([]);\n /** Etiquetas del eje X. / X-axis labels. */\n categories = input<string[]>([]);\n /** Etiquetas para donut/pie. / Labels for donut/pie. */\n labels = input<string[]>([]);\n /** Altura en px. / Height in px. */\n height = input<number>(280);\n /** Colores custom. Si no se proveen, usa la paleta Neural-Blue. / Custom colors. If not provided, uses the Neural-Blue palette. */\n colors = input<string[]>([]);\n /** Muestra/oculta las etiquetas de datos. / Shows/hides data labels. */\n showDataLabels = input<boolean>(false);\n /** Título de la gráfica. / Chart title. */\n title = input<string>('');\n\n // --------------------------------------------------\n // Helpers privados\n // --------------------------------------------------\n\n private get _isBar(): boolean {\n return ['bar', 'bar-stacked', 'bar-horizontal', 'bar-horizontal-stacked', 'pareto'].includes(\n this.type(),\n );\n }\n\n private get _isStacked(): boolean {\n return ['bar-stacked', 'bar-horizontal-stacked'].includes(this.type());\n }\n\n private get _isHorizontal(): boolean {\n return ['bar-horizontal', 'bar-horizontal-stacked'].includes(this.type());\n }\n\n // --------------------------------------------------\n // Configs computadas\n // --------------------------------------------------\n\n protected readonly resolvedColors = computed(() =>\n this.colors().length ? this.colors() : DEFAULT_COLORS,\n );\n\n protected readonly resolvedSeries = computed((): any => {\n const t = this.type();\n if (t === 'donut' || t === 'pie' || t === 'radialBar') return this.pieSeries();\n if (t === 'pareto') {\n const first = this.series()[0];\n if (!first) return [];\n const cumulative = computeParetoCumulative(first.data);\n return [\n { name: first.name, type: 'bar', data: first.data },\n { name: 'Cumulative %', type: 'line', data: cumulative },\n ];\n }\n return this.series();\n });\n\n protected readonly chartConfig = computed(() => {\n const t = this.type();\n const apexType: string =\n t === 'bar-stacked' || t === 'bar-horizontal' || t === 'bar-horizontal-stacked'\n ? 'bar'\n : t === 'pareto'\n ? 'bar'\n : t;\n return {\n type: apexType as any,\n height: this.height(),\n stacked: this._isStacked,\n fontFamily: 'Inter, system-ui, -apple-system, sans-serif',\n foreColor: '#64748b',\n background: 'transparent',\n toolbar: { show: false },\n sparkline: { enabled: false },\n zoom: { enabled: false },\n animations: { enabled: true, speed: 500 },\n };\n });\n\n protected readonly xaxisConfig = computed(() => ({\n categories: this.categories(),\n labels: {\n style: { fontSize: '12px', fontFamily: 'inherit', colors: '#94a3b8' },\n },\n axisBorder: { show: false },\n axisTicks: { show: false },\n }));\n\n protected readonly yaxisConfig = computed((): any => {\n const labelStyle = { fontSize: '12px', fontFamily: 'inherit', colors: '#94a3b8' };\n if (this.type() === 'pareto') {\n return [\n { labels: { style: labelStyle } },\n {\n opposite: true,\n min: 0,\n max: 100,\n tickAmount: 5,\n labels: {\n style: labelStyle,\n formatter: (v: number) => `${v}%`,\n },\n },\n ];\n }\n return { labels: { style: labelStyle } };\n });\n\n protected readonly strokeConfig = computed(() => {\n const t = this.type();\n if (t === 'pareto') {\n return {\n show: true,\n width: [0, 2],\n curve: ['straight', 'smooth'] as any,\n lineCap: 'round' as const,\n };\n }\n if (this._isBar || t === 'donut' || t === 'pie' || t === 'radialBar') return { show: false };\n return { curve: 'smooth' as const, width: 2 };\n });\n\n protected readonly fillConfig = computed(() => {\n const t = this.type();\n if (t === 'area') {\n return {\n type: 'gradient' as const,\n gradient: { shadeIntensity: 1, opacityFrom: 0.35, opacityTo: 0.02, stops: [0, 100] },\n };\n }\n return { opacity: 0.85 };\n });\n\n protected readonly dataLabelsConfig = computed(() => ({\n enabled: this.showDataLabels(),\n style: { fontSize: '11px', fontFamily: 'inherit' },\n }));\n\n protected readonly gridConfig = computed(() => ({\n borderColor: '#e2e8f0',\n strokeDashArray: 4,\n xaxis: { lines: { show: false } },\n yaxis: { lines: { show: true } },\n padding: { left: 4, right: 4 },\n }));\n\n protected readonly legendConfig = computed(() => ({\n position: 'bottom' as const,\n fontFamily: 'inherit',\n fontSize: '12px',\n markers: { size: 6 },\n itemMargin: { horizontal: 8 },\n }));\n\n protected readonly tooltipConfig = computed(() => {\n const base = {\n theme: 'light' as const,\n style: { fontSize: '12px', fontFamily: 'inherit' },\n x: { show: true },\n };\n if (this.type() === 'pareto') {\n return {\n ...base,\n y: [\n { formatter: (v: number) => String(v) },\n { formatter: (v: number) => `${v.toFixed(1)}%` },\n ],\n };\n }\n return base;\n });\n\n protected readonly plotOptionsConfig = computed(() => {\n const t = this.type();\n if (t === 'donut' || t === 'pie') {\n return { pie: { donut: { size: '68%' } } };\n }\n if (t === 'radialBar') {\n return {\n radialBar: {\n hollow: { margin: 4, size: '55%' },\n track: { background: 'var(--neu-surface-2, #f1f5f9)', strokeWidth: '100%', margin: 4 },\n dataLabels: {\n name: {\n fontSize: '14px',\n fontFamily: 'inherit',\n color: 'var(--neu-text-secondary, #64748b)',\n offsetY: -6,\n },\n value: {\n fontSize: '20px',\n fontFamily: 'inherit',\n fontWeight: 600,\n color: 'var(--neu-text-primary, #0f172a)',\n offsetY: 4,\n formatter: (v: number) => `${Math.round(v)}%`,\n },\n total: {\n show: true,\n label: 'Average',\n fontSize: '13px',\n fontFamily: 'inherit',\n color: 'var(--neu-text-secondary, #64748b)',\n formatter: (w: any) => {\n const vals: number[] = w.globals.series;\n const avg = vals.reduce((s: number, v: number) => s + v, 0) / vals.length;\n return `${Math.round(avg)}%`;\n },\n },\n },\n },\n };\n }\n if (this._isBar || t === 'pareto') {\n return {\n bar: {\n horizontal: this._isHorizontal,\n borderRadius: this._isStacked ? 0 : 4,\n columnWidth: '60%',\n barHeight: '70%',\n dataLabels: { total: { enabled: false } },\n },\n };\n }\n return {};\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AA0BA;AACA,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;AAEzF;AACA,SAAS,uBAAuB,CAAC,IAAc,EAAA;IAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACvD,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,GAAG,GAAG,CAAC;AACX,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAI;AACpB,QAAA,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAClB,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,KAAK,IAAI,IAAI,CAAC,GAAG,EAAE;AAC9C,IAAA,CAAC,CAAC;AACJ;AAEA;;;;;;;;;;;;;AAaG;MA0BU,iBAAiB,CAAA;;AAE5B,IAAA,IAAI,GAAG,KAAK,CAAe,MAAM,2EAAC;;AAElC,IAAA,MAAM,GAAG,KAAK,CAAmB,EAAE,6EAAC;;AAEpC,IAAA,SAAS,GAAG,KAAK,CAAW,EAAE,gFAAC;;AAE/B,IAAA,UAAU,GAAG,KAAK,CAAW,EAAE,iFAAC;;AAEhC,IAAA,MAAM,GAAG,KAAK,CAAW,EAAE,6EAAC;;AAE5B,IAAA,MAAM,GAAG,KAAK,CAAS,GAAG,6EAAC;;AAE3B,IAAA,MAAM,GAAG,KAAK,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AAA,EAAA,oBAAA,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,kBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAuBb,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAzB7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,WACZ,CAAC,cAAc,CAAC,EAAA,aAAA,EACV,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAA,QAAA,EAClB;;;;;;;;;;;;;;;;AAgBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,2pCAAA,CAAA,EAAA;;;AC5EH;;AAEG;;;;"}
1
+ {"version":3,"file":"neural-ui-core-chart.mjs","sources":["../../../../projects/ui-core/chart/neu-chart.component.ts","../../../../projects/ui-core/chart/neural-ui-core-chart.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n} from '@angular/core';\nimport { ChartComponent } from 'ng-apexcharts';\n\nexport type NeuChartType =\n | 'line'\n | 'area'\n | 'bar'\n | 'bar-stacked'\n | 'bar-horizontal'\n | 'bar-horizontal-stacked'\n | 'pareto'\n | 'donut'\n | 'pie'\n | 'radialBar';\n\nexport interface NeuChartSeries {\n name: string;\n data: number[];\n}\n\n/** Paleta por defecto Neural-Blue / Default Neural-Blue palette */\nconst DEFAULT_COLORS = ['#007aff', '#5856d6', '#34c759', '#ff9f0a', '#ff3b30', '#64748b'];\n\n/** Calcula la línea acumulada porcentual para un diagrama de Pareto. / Calculates the cumulative percentage line for a Pareto chart. */\nfunction computeParetoCumulative(data: number[]): number[] {\n const total = data.reduce((s, v) => s + Math.abs(v), 0);\n if (total === 0) return data.map(() => 0);\n let cum = 0;\n return data.map((v) => {\n cum += Math.abs(v);\n return Math.round((cum / total) * 1000) / 10;\n });\n}\n\n/**\n * NeuChart — Wrapper reactivo de ApexCharts con estética Neural-Blue.\n *\n * Tipos soportados:\n * line · area · bar · bar-stacked · bar-horizontal · bar-horizontal-stacked · pareto · donut · pie · radialBar\n *\n * Uso:\n * <neu-chart\n * type=\"bar-stacked\"\n * [series]=\"series()\"\n * [categories]=\"months()\"\n * height=\"280\"\n * />\n */\n@Component({\n selector: 'neu-chart',\n imports: [ChartComponent],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'neu-chart' },\n template: `\n <apx-chart\n [chart]=\"chartConfig()\"\n [series]=\"resolvedSeries()\"\n [labels]=\"labels()\"\n [xaxis]=\"xaxisConfig()\"\n [yaxis]=\"yaxisConfig()\"\n [colors]=\"resolvedColors()\"\n [stroke]=\"strokeConfig()\"\n [fill]=\"fillConfig()\"\n [dataLabels]=\"dataLabelsConfig()\"\n [grid]=\"gridConfig()\"\n [legend]=\"legendConfig()\"\n [tooltip]=\"tooltipConfig()\"\n [plotOptions]=\"plotOptionsConfig()\"\n />\n `,\n styleUrl: './neu-chart.component.scss',\n})\nexport class NeuChartComponent {\n /** Tipo de gráfica. / Chart type. */\n type = input<NeuChartType>('line');\n /** Series para gráficas de ejes (line, area, bar, pareto…). / Series for axis-based charts (line, area, bar, pareto…). */\n series = input<NeuChartSeries[]>([]);\n /** Series para gráficas sin ejes (donut, pie). / Series for non-axis charts (donut, pie). */\n pieSeries = input<number[]>([]);\n /** Etiquetas del eje X. / X-axis labels. */\n categories = input<string[]>([]);\n /** Etiquetas para donut/pie. / Labels for donut/pie. */\n labels = input<string[]>([]);\n /** Altura en px. / Height in px. */\n height = input<number>(280);\n /** Colores custom. Si no se proveen, usa la paleta Neural-Blue. / Custom colors. If not provided, uses the Neural-Blue palette. */\n colors = input<string[]>([]);\n /** Muestra/oculta las etiquetas de datos. / Shows/hides data labels. */\n showDataLabels = input<boolean>(false);\n /** Título de la gráfica. / Chart title. */\n title = input<string>('');\n\n // --------------------------------------------------\n // Helpers privados\n // --------------------------------------------------\n\n private get _isBar(): boolean {\n return ['bar', 'bar-stacked', 'bar-horizontal', 'bar-horizontal-stacked', 'pareto'].includes(\n this.type(),\n );\n }\n\n private get _isStacked(): boolean {\n return ['bar-stacked', 'bar-horizontal-stacked'].includes(this.type());\n }\n\n private get _isHorizontal(): boolean {\n return ['bar-horizontal', 'bar-horizontal-stacked'].includes(this.type());\n }\n\n // --------------------------------------------------\n // Configs computadas\n // --------------------------------------------------\n\n protected readonly resolvedColors = computed(() =>\n this.colors().length ? this.colors() : DEFAULT_COLORS,\n );\n\n protected readonly resolvedSeries = computed((): any => {\n const t = this.type();\n if (t === 'donut' || t === 'pie' || t === 'radialBar') return this.pieSeries();\n if (t === 'pareto') {\n const first = this.series()[0];\n if (!first) return [];\n const cumulative = computeParetoCumulative(first.data);\n return [\n { name: first.name, type: 'bar', data: first.data },\n { name: 'Cumulative %', type: 'line', data: cumulative },\n ];\n }\n return this.series();\n });\n\n protected readonly chartConfig = computed(() => {\n const t = this.type();\n const apexType: string =\n t === 'bar-stacked' || t === 'bar-horizontal' || t === 'bar-horizontal-stacked'\n ? 'bar'\n : t === 'pareto'\n ? 'bar'\n : t;\n return {\n type: apexType as any,\n height: this.height(),\n stacked: this._isStacked,\n fontFamily: 'Inter, system-ui, -apple-system, sans-serif',\n foreColor: '#64748b',\n background: 'transparent',\n toolbar: { show: false },\n sparkline: { enabled: false },\n zoom: { enabled: false },\n animations: { enabled: true, speed: 500 },\n };\n });\n\n protected readonly xaxisConfig = computed(() => ({\n categories: this.categories(),\n labels: {\n style: { fontSize: '12px', fontFamily: 'inherit', colors: '#94a3b8' },\n },\n axisBorder: { show: false },\n axisTicks: { show: false },\n }));\n\n protected readonly yaxisConfig = computed((): any => {\n const labelStyle = { fontSize: '12px', fontFamily: 'inherit', colors: '#94a3b8' };\n if (this.type() === 'pareto') {\n return [\n { labels: { style: labelStyle } },\n {\n opposite: true,\n min: 0,\n max: 100,\n tickAmount: 5,\n labels: {\n style: labelStyle,\n formatter: (v: number) => `${v}%`,\n },\n },\n ];\n }\n return { labels: { style: labelStyle } };\n });\n\n protected readonly strokeConfig = computed(() => {\n const t = this.type();\n if (t === 'pareto') {\n return {\n show: true,\n width: [0, 2],\n curve: ['straight', 'smooth'] as any,\n lineCap: 'round' as const,\n };\n }\n if (this._isBar || t === 'donut' || t === 'pie' || t === 'radialBar') return { show: false };\n return { curve: 'smooth' as const, width: 2 };\n });\n\n protected readonly fillConfig = computed(() => {\n const t = this.type();\n if (t === 'area') {\n return {\n type: 'gradient' as const,\n gradient: { shadeIntensity: 1, opacityFrom: 0.35, opacityTo: 0.02, stops: [0, 100] },\n };\n }\n return { opacity: 0.85 };\n });\n\n protected readonly dataLabelsConfig = computed(() => ({\n enabled: this.showDataLabels(),\n style: { fontSize: '11px', fontFamily: 'inherit' },\n }));\n\n protected readonly gridConfig = computed(() => ({\n borderColor: '#e2e8f0',\n strokeDashArray: 4,\n xaxis: { lines: { show: false } },\n yaxis: { lines: { show: true } },\n padding: { left: 4, right: 4 },\n }));\n\n protected readonly legendConfig = computed(() => ({\n position: 'bottom' as const,\n fontFamily: 'inherit',\n fontSize: '12px',\n markers: { size: 6 },\n itemMargin: { horizontal: 8 },\n }));\n\n protected readonly tooltipConfig = computed(() => {\n const base = {\n theme: 'light' as const,\n style: { fontSize: '12px', fontFamily: 'inherit' },\n x: { show: true },\n };\n if (this.type() === 'pareto') {\n return {\n ...base,\n y: [\n { formatter: (v: number) => String(v) },\n { formatter: (v: number) => `${v.toFixed(1)}%` },\n ],\n };\n }\n return base;\n });\n\n protected readonly plotOptionsConfig = computed(() => {\n const t = this.type();\n if (t === 'donut' || t === 'pie') {\n return { pie: { donut: { size: '68%' } } };\n }\n if (t === 'radialBar') {\n return {\n radialBar: {\n hollow: { margin: 4, size: '55%' },\n track: { background: 'var(--neu-surface-2, #f1f5f9)', strokeWidth: '100%', margin: 4 },\n dataLabels: {\n name: {\n fontSize: '14px',\n fontFamily: 'inherit',\n color: 'var(--neu-text-secondary, #64748b)',\n offsetY: -6,\n },\n value: {\n fontSize: '20px',\n fontFamily: 'inherit',\n fontWeight: 600,\n color: 'var(--neu-text-primary, #0f172a)',\n offsetY: 4,\n formatter: (v: number) => `${Math.round(v)}%`,\n },\n total: {\n show: true,\n label: 'Average',\n fontSize: '13px',\n fontFamily: 'inherit',\n color: 'var(--neu-text-secondary, #64748b)',\n formatter: (w: any) => {\n const vals: number[] = w.globals.series;\n const avg = vals.reduce((s: number, v: number) => s + v, 0) / vals.length;\n return `${Math.round(avg)}%`;\n },\n },\n },\n },\n };\n }\n if (this._isBar || t === 'pareto') {\n return {\n bar: {\n horizontal: this._isHorizontal,\n borderRadius: this._isStacked ? 0 : 4,\n columnWidth: '60%',\n barHeight: '70%',\n dataLabels: { total: { enabled: false } },\n },\n };\n }\n return {};\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AA0BA;AACA,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;AAEzF;AACA,SAAS,uBAAuB,CAAC,IAAc,EAAA;IAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACvD,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,GAAG,GAAG,CAAC;AACX,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAI;AACpB,QAAA,GAAG,IAAI,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A,MAAA,EAAA,CAAA,2pCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EApBS,cAAc,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,aAAA,EAAA,QAAA,EAAA,YAAA,EAAA,QAAA,EAAA,QAAA,EAAA,QAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,SAAA,EAAA,aAAA,EAAA,YAAA,EAAA,OAAA,EAAA,OAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,kBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAuBb,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAzB7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,WACZ,CAAC,cAAc,CAAC,EAAA,aAAA,EACV,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAA,QAAA,EAClB;;;;;;;;;;;;;;;;AAgBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,2pCAAA,CAAA,EAAA;;;AC5EH;;AAEG;;;;"}
@@ -12,14 +12,20 @@ let _neuCheckboxIdSeq = 0;
12
12
  * <neu-checkbox label="Acepto los términos" [formControl]="termsCtrl" />
13
13
  */
14
14
  class NeuCheckboxComponent {
15
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
16
- name = input('', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
17
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
15
+ label = input('', /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
17
+ name = input('', /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
19
+ disabled = input(false, /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
18
21
  _id = `neu-checkbox-${_neuCheckboxIdSeq++}`;
19
- _checked = signal(false, ...(ngDevMode ? [{ debugName: "_checked" }] : /* istanbul ignore next */ []));
22
+ _checked = signal(false, /* @ts-ignore */
23
+ ...(ngDevMode ? [{ debugName: "_checked" }] : /* istanbul ignore next */ []));
20
24
  /** Estado disabled interno — combina el input `disabled` con el CVA setDisabledState / Internal disabled state — combines the `disabled` input with CVA setDisabledState */
21
- _cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []));
22
- _isDisabled = computed(() => this.disabled() || this._cvaDisabled(), ...(ngDevMode ? [{ debugName: "_isDisabled" }] : /* istanbul ignore next */ []));
25
+ _cvaDisabled = signal(false, /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []));
27
+ _isDisabled = computed(() => this.disabled() || this._cvaDisabled(), /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "_isDisabled" }] : /* istanbul ignore next */ []));
23
29
  _onChange = () => { };
24
30
  _onTouched = () => { };
25
31
  onChange(event) {
@@ -42,8 +48,8 @@ class NeuCheckboxComponent {
42
48
  setDisabledState(isDisabled) {
43
49
  this._cvaDisabled.set(isDisabled);
44
50
  }
45
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
46
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: NeuCheckboxComponent, isStandalone: true, selector: "neu-checkbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "neu-checkbox-host" }, providers: [
51
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NeuCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
52
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NeuCheckboxComponent, isStandalone: true, selector: "neu-checkbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "neu-checkbox-host" }, providers: [
47
53
  {
48
54
  provide: NG_VALUE_ACCESSOR,
49
55
  useExisting: forwardRef(() => NeuCheckboxComponent),
@@ -85,7 +91,7 @@ class NeuCheckboxComponent {
85
91
  </label>
86
92
  `, isInline: true, styles: [".neu-checkbox-host{display:inline-block}.neu-checkbox{display:inline-flex;align-items:center;gap:var(--neu-space-3);cursor:pointer;-webkit-user-select:none;user-select:none}.neu-checkbox--disabled{opacity:.5;pointer-events:none}.neu-checkbox__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.neu-checkbox__input:focus-visible+.neu-checkbox__box{outline:2px solid var(--neu-primary);outline-offset:2px}.neu-checkbox__box{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:18px;height:18px;background:var(--neu-surface);border:1.5px solid var(--neu-border-hover);border-radius:var(--neu-radius-sm);transition:background-color var(--neu-transition),border-color var(--neu-transition),box-shadow var(--neu-transition)}.neu-checkbox__box--checked{background:var(--neu-primary);border-color:var(--neu-primary);box-shadow:var(--neu-focus-ring-strong)}.neu-checkbox__check{width:12px;height:10px;opacity:0;transform:scale(.6);transition:opacity .15s ease,transform .15s ease}.neu-checkbox__check--visible{opacity:1;transform:scale(1)}.neu-checkbox__label{font-family:var(--neu-font-sans);font-size:var(--neu-text-sm);color:var(--neu-text);font-weight:500;line-height:1}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
87
93
  }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuCheckboxComponent, decorators: [{
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NeuCheckboxComponent, decorators: [{
89
95
  type: Component,
90
96
  args: [{ selector: 'neu-checkbox', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'neu-checkbox-host' }, providers: [
91
97
  {
@@ -1 +1 @@
1
- {"version":3,"file":"neural-ui-core-checkbox.mjs","sources":["../../../../projects/ui-core/checkbox/neu-checkbox.component.ts","../../../../projects/ui-core/checkbox/neural-ui-core-checkbox.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n forwardRef,\n input,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nlet _neuCheckboxIdSeq = 0;\n\n/**\n * NeuralUI Checkbox Component\n *\n * Checkbox personalizado y accesible para Angular Forms.\n *\n * Uso:\n * <neu-checkbox label=\"Acepto los términos\" [formControl]=\"termsCtrl\" />\n */\n@Component({\n selector: 'neu-checkbox',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'neu-checkbox-host' },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NeuCheckboxComponent),\n multi: true,\n },\n ],\n template: `\n <label class=\"neu-checkbox\" [class.neu-checkbox--disabled]=\"_isDisabled()\" [for]=\"_id\">\n <input\n type=\"checkbox\"\n class=\"neu-checkbox__input\"\n [id]=\"_id\"\n [attr.name]=\"name() || null\"\n [checked]=\"_checked()\"\n [disabled]=\"_isDisabled()\"\n (change)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span class=\"neu-checkbox__box\" [class.neu-checkbox__box--checked]=\"_checked()\">\n <svg\n class=\"neu-checkbox__check\"\n viewBox=\"0 0 12 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n [class.neu-checkbox__check--visible]=\"_checked()\"\n >\n <path\n d=\"M1 5L4.5 8.5L11 1\"\n stroke=\"white\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n @if (label()) {\n <span class=\"neu-checkbox__label\">{{ label() }}</span>\n }\n </label>\n `,\n styleUrl: './neu-checkbox.component.scss',\n})\nexport class NeuCheckboxComponent implements ControlValueAccessor {\n readonly label = input<string>('');\n readonly name = input<string>('');\n readonly disabled = input<boolean>(false);\n\n readonly _id = `neu-checkbox-${_neuCheckboxIdSeq++}`;\n\n protected readonly _checked = signal(false);\n /** Estado disabled interno — combina el input `disabled` con el CVA setDisabledState / Internal disabled state — combines the `disabled` input with CVA setDisabledState */\n private readonly _cvaDisabled = signal(false);\n protected readonly _isDisabled = computed(() => this.disabled() || this._cvaDisabled());\n\n private _onChange: (v: boolean) => void = () => {};\n private _onTouched: () => void = () => {};\n\n onChange(event: Event): void {\n const checked = (event.target as HTMLInputElement).checked;\n this._checked.set(checked);\n this._onChange(checked);\n }\n\n onBlur(): void {\n this._onTouched();\n }\n\n writeValue(val: unknown): void {\n this._checked.set(!!val);\n }\n\n registerOnChange(fn: (v: boolean) => void): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._cvaDisabled.set(isDisabled);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAWA,IAAI,iBAAiB,GAAG,CAAC;AAEzB;;;;;;;AAOG;MAkDU,oBAAoB,CAAA;AACtB,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AACzB,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;AACxB,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;AAEhC,IAAA,GAAG,GAAG,CAAA,aAAA,EAAgB,iBAAiB,EAAE,EAAE;AAEjC,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,+EAAC;;AAE1B,IAAA,YAAY,GAAG,MAAM,CAAC,KAAK,mFAAC;AAC1B,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,YAAY,EAAE,kFAAC;AAE/E,IAAA,SAAS,GAAyB,MAAK,EAAE,CAAC;AAC1C,IAAA,UAAU,GAAe,MAAK,EAAE,CAAC;AAEzC,IAAA,QAAQ,CAAC,KAAY,EAAA;AACnB,QAAA,MAAM,OAAO,GAAI,KAAK,CAAC,MAA2B,CAAC,OAAO;AAC1D,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC;AAC1B,QAAA,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;IACzB;IAEA,MAAM,GAAA;QACJ,IAAI,CAAC,UAAU,EAAE;IACnB;AAEA,IAAA,UAAU,CAAC,GAAY,EAAA;QACrB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC1B;AAEA,IAAA,gBAAgB,CAAC,EAAwB,EAAA;AACvC,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;IACrB;A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;;;;AAkCT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,uvCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAGU,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAjDhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,aAAA,EACT,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAA,SAAA,EACzB;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,QAAA,EACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,uvCAAA,CAAA,EAAA;;;ACnEH;;AAEG;;;;"}
1
+ {"version":3,"file":"neural-ui-core-checkbox.mjs","sources":["../../../../projects/ui-core/checkbox/neu-checkbox.component.ts","../../../../projects/ui-core/checkbox/neural-ui-core-checkbox.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n forwardRef,\n input,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nlet _neuCheckboxIdSeq = 0;\n\n/**\n * NeuralUI Checkbox Component\n *\n * Checkbox personalizado y accesible para Angular Forms.\n *\n * Uso:\n * <neu-checkbox label=\"Acepto los términos\" [formControl]=\"termsCtrl\" />\n */\n@Component({\n selector: 'neu-checkbox',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'neu-checkbox-host' },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NeuCheckboxComponent),\n multi: true,\n },\n ],\n template: `\n <label class=\"neu-checkbox\" [class.neu-checkbox--disabled]=\"_isDisabled()\" [for]=\"_id\">\n <input\n type=\"checkbox\"\n class=\"neu-checkbox__input\"\n [id]=\"_id\"\n [attr.name]=\"name() || null\"\n [checked]=\"_checked()\"\n [disabled]=\"_isDisabled()\"\n (change)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span class=\"neu-checkbox__box\" [class.neu-checkbox__box--checked]=\"_checked()\">\n <svg\n class=\"neu-checkbox__check\"\n viewBox=\"0 0 12 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n [class.neu-checkbox__check--visible]=\"_checked()\"\n >\n <path\n d=\"M1 5L4.5 8.5L11 1\"\n stroke=\"white\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n @if (label()) {\n <span class=\"neu-checkbox__label\">{{ label() }}</span>\n }\n </label>\n `,\n styleUrl: './neu-checkbox.component.scss',\n})\nexport class NeuCheckboxComponent implements ControlValueAccessor {\n readonly label = input<string>('');\n readonly name = input<string>('');\n readonly disabled = input<boolean>(false);\n\n readonly _id = `neu-checkbox-${_neuCheckboxIdSeq++}`;\n\n protected readonly _checked = signal(false);\n /** Estado disabled interno — combina el input `disabled` con el CVA setDisabledState / Internal disabled state — combines the `disabled` input with CVA setDisabledState */\n private readonly _cvaDisabled = signal(false);\n protected readonly _isDisabled = computed(() => this.disabled() || this._cvaDisabled());\n\n private _onChange: (v: boolean) => void = () => {};\n private _onTouched: () => void = () => {};\n\n onChange(event: Event): void {\n const checked = (event.target as HTMLInputElement).checked;\n this._checked.set(checked);\n this._onChange(checked);\n }\n\n onBlur(): void {\n this._onTouched();\n }\n\n writeValue(val: unknown): void {\n this._checked.set(!!val);\n }\n\n registerOnChange(fn: (v: boolean) => void): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._cvaDisabled.set(isDisabled);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAWA,IAAI,iBAAiB,GAAG,CAAC;AAEzB;;;;;;;AAOG;MAkDU,oBAAoB,CAAA;IACtB,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;IACzB,IAAI,GAAG,KAAK,CAAS,EAAE;6EAAC;IACxB,QAAQ,GAAG,KAAK,CAAU,KAAK;iFAAC;AAEhC,IAAA,GAAG,GAAG,CAAA,aAAA,EAAgB,iBAAiB,EAAE,EAAE;IAEjC,QAAQ,GAAG,MAAM,CAAC,KAAK;iFAAC;;IAE1B,YAAY,GAAG,MAAM,CAAC,KAAK;qFAAC;AAC1B,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,YAAY,EAAE;oFAAC;AAE/E,IAAA,SAAS,GAAyB,MAAK,EAAE,CAAC;AAC1C,IAAA,UAAU,GAAe,MAAK,EAAE,CAAC;AAEzC,IAAA,QAAQ,CAAC,KAAY,EAAA;AACnB,QAAA,MAAM,OAAO,GAAI,KAAK,CAAC,MAA2B,CAAC,OAAO;AAC1D,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC;AAC1B,QAAA,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;IACzB;IAEA,MAAM,GAAA;QACJ,IAAI,CAAC,UAAU,EAAE;IACnB;AAEA,IAAA,UAAU,CAAC,GAAY,EAAA;QACrB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC1B;AAEA,IAAA,gBAAgB,CAAC,EAAwB,EAAA;AACvC,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;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;;;;;;;;;;AAkCT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,uvCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAGU,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAjDhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,aAAA,EACT,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAA,SAAA,EACzB;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,QAAA,EACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,uvCAAA,CAAA,EAAA;;;ACnEH;;AAEG;;;;"}
@@ -14,17 +14,23 @@ import { input, output, computed, ChangeDetectionStrategy, ViewEncapsulation, Co
14
14
  */
15
15
  class NeuChipComponent {
16
16
  /** Variante de color / Color variant */
17
- variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
17
+ variant = input('default', /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
18
19
  /** Tamaño / Size */
19
- size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
20
+ size = input('md', /* @ts-ignore */
21
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
20
22
  /** Estado seleccionado / Selected state */
21
- selected = input(false, ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
23
+ selected = input(false, /* @ts-ignore */
24
+ ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
22
25
  /** Muestra botón de cierre / Shows close button */
23
- removable = input(false, ...(ngDevMode ? [{ debugName: "removable" }] : /* istanbul ignore next */ []));
26
+ removable = input(false, /* @ts-ignore */
27
+ ...(ngDevMode ? [{ debugName: "removable" }] : /* istanbul ignore next */ []));
24
28
  /** Deshabilitado / Disabled */
25
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
29
+ disabled = input(false, /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
26
31
  /** Aria-label del botón de eliminar / Aria-label for the delete button */
27
- removeAriaLabel = input('Eliminar', ...(ngDevMode ? [{ debugName: "removeAriaLabel" }] : /* istanbul ignore next */ []));
32
+ removeAriaLabel = input('Eliminar', /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "removeAriaLabel" }] : /* istanbul ignore next */ []));
28
34
  /** Emite al hacer clic o pulsar espacio/enter / Emits on click or space/enter press */
29
35
  selectedChange = output();
30
36
  /** Emite al pulsar el botón de cierre / Emits when the close button is pressed */
@@ -36,17 +42,21 @@ class NeuChipComponent {
36
42
  'neu-chip--selected': this.selected(),
37
43
  'neu-chip--removable': this.removable(),
38
44
  'neu-chip--disabled': this.disabled(),
39
- }), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
45
+ }), /* @ts-ignore */
46
+ ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
40
47
  /** Rol ARIA del host: 'button' cuando seleccionable, 'group' cuando también eliminable / Host ARIA role: 'button' when selectable, 'group' when removable */
41
- _hostRole = computed(() => (this.removable() ? 'group' : 'button'), ...(ngDevMode ? [{ debugName: "_hostRole" }] : /* istanbul ignore next */ []));
48
+ _hostRole = computed(() => (this.removable() ? 'group' : 'button'), /* @ts-ignore */
49
+ ...(ngDevMode ? [{ debugName: "_hostRole" }] : /* istanbul ignore next */ []));
42
50
  /** aria-pressed solo cuando actúa como botón toggle / aria-pressed only when acting as toggle button */
43
- _hostAriaPressed = computed(() => this.removable() ? null : this.selected(), ...(ngDevMode ? [{ debugName: "_hostAriaPressed" }] : /* istanbul ignore next */ []));
51
+ _hostAriaPressed = computed(() => this.removable() ? null : this.selected(), /* @ts-ignore */
52
+ ...(ngDevMode ? [{ debugName: "_hostAriaPressed" }] : /* istanbul ignore next */ []));
44
53
  /** tabindex nulo en el host grupo para no saturar el orden de foco / null tabindex on group host to not saturate focus order */
45
54
  _hostTabindex = computed(() => {
46
55
  if (this.removable())
47
56
  return null;
48
57
  return this.disabled() ? -1 : 0;
49
- }, ...(ngDevMode ? [{ debugName: "_hostTabindex" }] : /* istanbul ignore next */ []));
58
+ }, /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "_hostTabindex" }] : /* istanbul ignore next */ []));
50
60
  onToggle() {
51
61
  if (!this.disabled() && !this.removable()) {
52
62
  this.selectedChange.emit(!this.selected());
@@ -57,8 +67,8 @@ class NeuChipComponent {
57
67
  this.removed.emit();
58
68
  }
59
69
  }
60
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
61
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: NeuChipComponent, isStandalone: true, selector: "neu-chip", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, removeAriaLabel: { classPropertyName: "removeAriaLabel", publicName: "removeAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedChange: "selectedChange", removed: "removed" }, host: { listeners: { "keydown.space": "onToggle()", "keydown.enter": "onToggle()" }, properties: { "class": "hostClasses()", "attr.role": "_hostRole()", "attr.aria-pressed": "_hostAriaPressed()", "attr.tabindex": "_hostTabindex()" } }, ngImport: i0, template: `
70
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NeuChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
71
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NeuChipComponent, isStandalone: true, selector: "neu-chip", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, removeAriaLabel: { classPropertyName: "removeAriaLabel", publicName: "removeAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedChange: "selectedChange", removed: "removed" }, host: { listeners: { "keydown.space": "onToggle()", "keydown.enter": "onToggle()" }, properties: { "class": "hostClasses()", "attr.role": "_hostRole()", "attr.aria-pressed": "_hostAriaPressed()", "attr.tabindex": "_hostTabindex()" } }, ngImport: i0, template: `
62
72
  <ng-content />
63
73
  @if (removable()) {
64
74
  <button
@@ -85,7 +95,7 @@ class NeuChipComponent {
85
95
  }
86
96
  `, isInline: true, styles: [".neu-chip{display:inline-flex;align-items:center;gap:6px;font-family:var(--neu-font-sans);font-weight:500;white-space:nowrap;cursor:pointer;border:1.5px solid transparent;transition:background var(--neu-transition),border-color var(--neu-transition),color var(--neu-transition),box-shadow var(--neu-transition);-webkit-user-select:none;user-select:none;outline:none}.neu-chip:focus-visible{outline:2px solid var(--neu-primary);outline-offset:2px}.neu-chip--sm{padding:3px 10px;font-size:var(--neu-text-xs);border-radius:var(--neu-radius-full)}.neu-chip--md{padding:5px 14px;font-size:var(--neu-text-sm);border-radius:var(--neu-radius-full)}.neu-chip--default{background:var(--neu-surface-2);color:var(--neu-text-muted);border-color:var(--neu-border)}.neu-chip--default:hover:not(.neu-chip--disabled){background:var(--neu-surface-3);border-color:var(--neu-border-hover)}.neu-chip--default.neu-chip--selected{background:var(--neu-primary-100);color:var(--neu-primary);border-color:var(--neu-primary)}.neu-chip--primary{background:var(--neu-primary-50);color:var(--neu-primary-dark, var(--neu-primary));border-color:color-mix(in srgb,var(--neu-primary-dark, var(--neu-primary)) 28%,transparent)}.neu-chip--primary:hover:not(.neu-chip--disabled){background:var(--neu-primary-100);color:var(--neu-primary-dark, var(--neu-primary))}.neu-chip--primary.neu-chip--selected{background:var(--neu-primary-solid, var(--neu-primary-dark, var(--neu-primary)));color:var(--neu-primary-solid-fg, var(--neu-primary-fg));border-color:var(--neu-primary-solid, var(--neu-primary-dark, var(--neu-primary)))}.neu-chip--success{background:var(--neu-success-bg);color:var(--neu-success-text);border-color:transparent}.neu-chip--success.neu-chip--selected{background:var(--neu-success);color:var(--neu-primary-fg)}.neu-chip--warning{background:var(--neu-warning-bg);color:var(--neu-warning-text);border-color:transparent}.neu-chip--warning.neu-chip--selected{background:var(--neu-warning);color:var(--neu-primary-fg)}.neu-chip--danger{background:var(--neu-error-bg);color:var(--neu-error-text);border-color:transparent}.neu-chip--danger.neu-chip--selected{background:var(--neu-error);color:var(--neu-primary-fg)}.neu-chip--disabled{background:var(--neu-surface-2);color:var(--neu-text-muted);border-color:var(--neu-border);cursor:not-allowed;pointer-events:none}.neu-chip__remove{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:2px;border:none;border-radius:50%;background:transparent;cursor:pointer;color:currentColor;opacity:.6;padding:0;flex-shrink:0;transition:opacity var(--neu-transition),background var(--neu-transition);outline:none}.neu-chip__remove:hover{opacity:1;background:var(--neu-alert-dismiss-hover-bg)}.neu-chip__remove:focus-visible{outline:2px solid currentColor;outline-offset:1px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
87
97
  }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuChipComponent, decorators: [{
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NeuChipComponent, decorators: [{
89
99
  type: Component,
90
100
  args: [{ selector: 'neu-chip', imports: [], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
91
101
  '[class]': 'hostClasses()',
@@ -1 +1 @@
1
- {"version":3,"file":"neural-ui-core-chip.mjs","sources":["../../../../projects/ui-core/chip/neu-chip.component.ts","../../../../projects/ui-core/chip/neural-ui-core-chip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n output,\n} from '@angular/core';\n\nexport type NeuChipVariant = 'default' | 'primary' | 'success' | 'warning' | 'danger';\nexport type NeuChipSize = 'sm' | 'md';\n\n/**\n * NeuralUI Chip Component\n *\n * Etiqueta compacta seleccionable y/o eliminable. Ideal para filtros,\n * listas de tags y multiselección visual.\n *\n * Uso:\n * <neu-chip>Angular</neu-chip>\n * <neu-chip [removable]=\"true\" (removed)=\"onRemove()\">CSS</neu-chip>\n * <neu-chip [selected]=\"true\" (selectedChange)=\"toggle()\">TypeScript</neu-chip>\n */\n@Component({\n selector: 'neu-chip',\n imports: [],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n '[attr.role]': '_hostRole()',\n '[attr.aria-pressed]': '_hostAriaPressed()',\n '[attr.tabindex]': '_hostTabindex()',\n '(keydown.space)': 'onToggle()',\n '(keydown.enter)': 'onToggle()',\n },\n template: `\n <ng-content />\n @if (removable()) {\n <button\n class=\"neu-chip__remove\"\n type=\"button\"\n [disabled]=\"disabled()\"\n (click)=\"$event.stopPropagation(); onRemove()\"\n [attr.aria-label]=\"removeAriaLabel()\"\n >\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n }\n `,\n styleUrl: './neu-chip.component.scss',\n})\nexport class NeuChipComponent {\n /** Variante de color / Color variant */\n variant = input<NeuChipVariant>('default');\n\n /** Tamaño / Size */\n size = input<NeuChipSize>('md');\n\n /** Estado seleccionado / Selected state */\n selected = input<boolean>(false);\n\n /** Muestra botón de cierre / Shows close button */\n removable = input<boolean>(false);\n\n /** Deshabilitado / Disabled */\n disabled = input<boolean>(false);\n\n /** Aria-label del botón de eliminar / Aria-label for the delete button */\n removeAriaLabel = input<string>('Eliminar');\n\n /** Emite al hacer clic o pulsar espacio/enter / Emits on click or space/enter press */\n selectedChange = output<boolean>();\n\n /** Emite al pulsar el botón de cierre / Emits when the close button is pressed */\n removed = output<void>();\n\n readonly hostClasses = computed(() => ({\n 'neu-chip': true,\n [`neu-chip--${this.variant()}`]: true,\n [`neu-chip--${this.size()}`]: true,\n 'neu-chip--selected': this.selected(),\n 'neu-chip--removable': this.removable(),\n 'neu-chip--disabled': this.disabled(),\n }));\n\n /** Rol ARIA del host: 'button' cuando seleccionable, 'group' cuando también eliminable / Host ARIA role: 'button' when selectable, 'group' when removable */\n readonly _hostRole = computed(() => (this.removable() ? 'group' : 'button'));\n\n /** aria-pressed solo cuando actúa como botón toggle / aria-pressed only when acting as toggle button */\n readonly _hostAriaPressed = computed<boolean | null>(() =>\n this.removable() ? null : this.selected(),\n );\n\n /** tabindex nulo en el host grupo para no saturar el orden de foco / null tabindex on group host to not saturate focus order */\n readonly _hostTabindex = computed<number | null>(() => {\n if (this.removable()) return null;\n return this.disabled() ? -1 : 0;\n });\n\n onToggle(): void {\n if (!this.disabled() && !this.removable()) {\n this.selectedChange.emit(!this.selected());\n }\n }\n\n onRemove(): void {\n if (!this.disabled()) {\n this.removed.emit();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;AAYA;;;;;;;;;;AAUG;MA0CU,gBAAgB,CAAA;;AAE3B,IAAA,OAAO,GAAG,KAAK,CAAiB,SAAS,8EAAC;;AAG1C,IAAA,IAAI,GAAG,KAAK,CAAc,IAAI,2EAAC;;AAG/B,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;;AAGhC,IAAA,SAAS,GAAG,KAAK,CAAU,KAAK,gFAAC;;AAGjC,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;;AAGhC,IAAA,eAAe,GAAG,KAAK,CAAS,UAAU,sFAAC;;IAG3C,cAAc,GAAG,MAAM,EAAW;;IAGlC,OAAO,GAAG,MAAM,EAAQ;AAEf,IAAA,WAAW,GAAG,QAAQ,CAAC,OAAO;AACrC,QAAA,UAAU,EAAE,IAAI;QAChB,CAAC,CAAA,UAAA,EAAa,IAAI,CAAC,OAAO,EAAE,CAAA,CAAE,GAAG,IAAI;QACrC,CAAC,CAAA,UAAA,EAAa,IAAI,CAAC,IAAI,EAAE,CAAA,CAAE,GAAG,IAAI;AAClC,QAAA,oBAAoB,EAAE,IAAI,CAAC,QAAQ,EAAE;AACrC,QAAA,qBAAqB,EAAE,IAAI,CAAC,SAAS,EAAE;AACvC,QAAA,oBAAoB,EAAE,IAAI,CAAC,QAAQ,EAAE;AACtC,KAAA,CAAC,kFAAC;;IAGM,SAAS,GAAG,QAAQ,CAAC,OA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AA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,6wFAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAGU,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAzC5B,SAAS;+BACE,UAAU,EAAA,OAAA,EACX,EAAE,EAAA,aAAA,EACI,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,aAAa,EAAE,aAAa;AAC5B,wBAAA,qBAAqB,EAAE,oBAAoB;AAC3C,wBAAA,iBAAiB,EAAE,iBAAiB;AACpC,wBAAA,iBAAiB,EAAE,YAAY;AAC/B,wBAAA,iBAAiB,EAAE,YAAY;qBAChC,EAAA,QAAA,EACS;;;;;;;;;;;;;;;;;;;;;;;;;AAyBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,6wFAAA,CAAA,EAAA;;;AC7DH;;AAEG;;;;"}
1
+ {"version":3,"file":"neural-ui-core-chip.mjs","sources":["../../../../projects/ui-core/chip/neu-chip.component.ts","../../../../projects/ui-core/chip/neural-ui-core-chip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n output,\n} from '@angular/core';\n\nexport type NeuChipVariant = 'default' | 'primary' | 'success' | 'warning' | 'danger';\nexport type NeuChipSize = 'sm' | 'md';\n\n/**\n * NeuralUI Chip Component\n *\n * Etiqueta compacta seleccionable y/o eliminable. Ideal para filtros,\n * listas de tags y multiselección visual.\n *\n * Uso:\n * <neu-chip>Angular</neu-chip>\n * <neu-chip [removable]=\"true\" (removed)=\"onRemove()\">CSS</neu-chip>\n * <neu-chip [selected]=\"true\" (selectedChange)=\"toggle()\">TypeScript</neu-chip>\n */\n@Component({\n selector: 'neu-chip',\n imports: [],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n '[attr.role]': '_hostRole()',\n '[attr.aria-pressed]': '_hostAriaPressed()',\n '[attr.tabindex]': '_hostTabindex()',\n '(keydown.space)': 'onToggle()',\n '(keydown.enter)': 'onToggle()',\n },\n template: `\n <ng-content />\n @if (removable()) {\n <button\n class=\"neu-chip__remove\"\n type=\"button\"\n [disabled]=\"disabled()\"\n (click)=\"$event.stopPropagation(); onRemove()\"\n [attr.aria-label]=\"removeAriaLabel()\"\n >\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n }\n `,\n styleUrl: './neu-chip.component.scss',\n})\nexport class NeuChipComponent {\n /** Variante de color / Color variant */\n variant = input<NeuChipVariant>('default');\n\n /** Tamaño / Size */\n size = input<NeuChipSize>('md');\n\n /** Estado seleccionado / Selected state */\n selected = input<boolean>(false);\n\n /** Muestra botón de cierre / Shows close button */\n removable = input<boolean>(false);\n\n /** Deshabilitado / Disabled */\n disabled = input<boolean>(false);\n\n /** Aria-label del botón de eliminar / Aria-label for the delete button */\n removeAriaLabel = input<string>('Eliminar');\n\n /** Emite al hacer clic o pulsar espacio/enter / Emits on click or space/enter press */\n selectedChange = output<boolean>();\n\n /** Emite al pulsar el botón de cierre / Emits when the close button is pressed */\n removed = output<void>();\n\n readonly hostClasses = computed(() => ({\n 'neu-chip': true,\n [`neu-chip--${this.variant()}`]: true,\n [`neu-chip--${this.size()}`]: true,\n 'neu-chip--selected': this.selected(),\n 'neu-chip--removable': this.removable(),\n 'neu-chip--disabled': this.disabled(),\n }));\n\n /** Rol ARIA del host: 'button' cuando seleccionable, 'group' cuando también eliminable / Host ARIA role: 'button' when selectable, 'group' when removable */\n readonly _hostRole = computed(() => (this.removable() ? 'group' : 'button'));\n\n /** aria-pressed solo cuando actúa como botón toggle / aria-pressed only when acting as toggle button */\n readonly _hostAriaPressed = computed<boolean | null>(() =>\n this.removable() ? null : this.selected(),\n );\n\n /** tabindex nulo en el host grupo para no saturar el orden de foco / null tabindex on group host to not saturate focus order */\n readonly _hostTabindex = computed<number | null>(() => {\n if (this.removable()) return null;\n return this.disabled() ? -1 : 0;\n });\n\n onToggle(): void {\n if (!this.disabled() && !this.removable()) {\n this.selectedChange.emit(!this.selected());\n }\n }\n\n onRemove(): void {\n if (!this.disabled()) {\n this.removed.emit();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;AAYA;;;;;;;;;;AAUG;MA0CU,gBAAgB,CAAA;;IAE3B,OAAO,GAAG,KAAK,CAAiB,SAAS;gFAAC;;IAG1C,IAAI,GAAG,KAAK,CAAc,IAAI;6EAAC;;IAG/B,QAAQ,GAAG,KAAK,CAAU,KAAK;iFAAC;;IAGhC,SAAS,GAAG,KAAK,CAAU,KAAK;kFAAC;;IAGjC,QAAQ,GAAG,KAAK,CAAU,KAAK;iFAAC;;IAGhC,eAAe,GAAG,KAAK,CAAS,UAAU;wFAAC;;IAG3C,cAAc,GAAG,MAAM,EAAW;;IAGlC,OAAO,GAAG,MAAM,EAAQ;AAEf,IAAA,WAAW,GAAG,QAAQ,CAAC,OAAO;AACrC,QAAA,UAAU,EAAE,IAAI;QAChB,CAAC,CAAA,UAAA,EAAa,IAAI,CAAC,OAAO,EAAE,CAAA,CAAE,GAAG,IAAI;QACrC,CAAC,CAAA,UAAA,EAAa,IAAI,CAAC,IAAI,EAAE,CAAA,CAAE,GAAG,IAAI;AAClC,QAAA,oBAAoB,EAAE,IAAI,CAAC,QAAQ,EAAE;AACrC,QAAA,qBAAqB,EAAE,IAAI,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CAAA,6wFAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAGU,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAzC5B,SAAS;+BACE,UAAU,EAAA,OAAA,EACX,EAAE,EAAA,aAAA,EACI,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,aAAa,EAAE,aAAa;AAC5B,wBAAA,qBAAqB,EAAE,oBAAoB;AAC3C,wBAAA,iBAAiB,EAAE,iBAAiB;AACpC,wBAAA,iBAAiB,EAAE,YAAY;AAC/B,wBAAA,iBAAiB,EAAE,YAAY;qBAChC,EAAA,QAAA,EACS;;;;;;;;;;;;;;;;;;;;;;;;;AAyBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,6wFAAA,CAAA,EAAA;;;AC7DH;;AAEG;;;;"}
@@ -19,15 +19,18 @@ class NeuCodeBlockComponent {
19
19
  doc = inject(DOCUMENT);
20
20
  destroyRef = inject(DestroyRef);
21
21
  /** Código fuente a mostrar / Source code to display */
22
- code = input('', ...(ngDevMode ? [{ debugName: "code" }] : /* istanbul ignore next */ []));
22
+ code = input('', /* @ts-ignore */
23
+ ...(ngDevMode ? [{ debugName: "code" }] : /* istanbul ignore next */ []));
23
24
  /** Nombre del lenguaje (decorativo) / Language name (decorative) */
24
- lang = input('', ...(ngDevMode ? [{ debugName: "lang" }] : /* istanbul ignore next */ []));
25
+ lang = input('', /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "lang" }] : /* istanbul ignore next */ []));
25
27
  /**
26
28
  * Identificador de lenguaje estándar (typescript, scss, html, bash…).
27
29
  * Genera automáticamente el label legible para el badge.
28
30
  * Language identifier — auto-generates a readable badge label.
29
31
  */
30
- language = input('', ...(ngDevMode ? [{ debugName: "language" }] : /* istanbul ignore next */ []));
32
+ language = input('', /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "language" }] : /* istanbul ignore next */ []));
31
34
  /** Label legible derivado de lang o language / Readable label derived from lang or language */
32
35
  displayLang = computed(() => {
33
36
  const explicit = this.lang();
@@ -55,25 +58,37 @@ class NeuCodeBlockComponent {
55
58
  tsx: 'TSX',
56
59
  };
57
60
  return map[id] ?? (id ? id.toUpperCase() : 'TypeScript');
58
- }, ...(ngDevMode ? [{ debugName: "displayLang" }] : /* istanbul ignore next */ []));
61
+ }, /* @ts-ignore */
62
+ ...(ngDevMode ? [{ debugName: "displayLang" }] : /* istanbul ignore next */ []));
59
63
  /** Texto del botón cuando no se ha copiado / Button text when not yet copied */
60
- copyLabel = input(undefined, ...(ngDevMode ? [{ debugName: "copyLabel" }] : /* istanbul ignore next */ []));
64
+ copyLabel = input(undefined, /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "copyLabel" }] : /* istanbul ignore next */ []));
61
66
  /** Texto del botón tras copiar / Button text after copying */
62
- copiedLabel = input(undefined, ...(ngDevMode ? [{ debugName: "copiedLabel" }] : /* istanbul ignore next */ []));
67
+ copiedLabel = input(undefined, /* @ts-ignore */
68
+ ...(ngDevMode ? [{ debugName: "copiedLabel" }] : /* istanbul ignore next */ []));
63
69
  /** Aria-label del botón copiar / Aria-label for the copy button */
64
- copyAriaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "copyAriaLabel" }] : /* istanbul ignore next */ []));
70
+ copyAriaLabel = input(undefined, /* @ts-ignore */
71
+ ...(ngDevMode ? [{ debugName: "copyAriaLabel" }] : /* istanbul ignore next */ []));
65
72
  /** Aria-label del botón tras copiar / Aria-label for the button after copying */
66
- copiedAriaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "copiedAriaLabel" }] : /* istanbul ignore next */ []));
67
- localeLabels = signal(this._getLocaleLabels(), ...(ngDevMode ? [{ debugName: "localeLabels" }] : /* istanbul ignore next */ []));
68
- resolvedCopyLabel = computed(() => this._resolveInputLabel(this.copyLabel()) ?? this.localeLabels().copyLabel, ...(ngDevMode ? [{ debugName: "resolvedCopyLabel" }] : /* istanbul ignore next */ []));
69
- resolvedCopiedLabel = computed(() => this._resolveInputLabel(this.copiedLabel()) ?? this.localeLabels().copiedLabel, ...(ngDevMode ? [{ debugName: "resolvedCopiedLabel" }] : /* istanbul ignore next */ []));
70
- resolvedCopyAriaLabel = computed(() => this._resolveInputLabel(this.copyAriaLabel()) ?? this.localeLabels().copyAriaLabel, ...(ngDevMode ? [{ debugName: "resolvedCopyAriaLabel" }] : /* istanbul ignore next */ []));
71
- resolvedCopiedAriaLabel = computed(() => this._resolveInputLabel(this.copiedAriaLabel()) ?? this.localeLabels().copiedAriaLabel, ...(ngDevMode ? [{ debugName: "resolvedCopiedAriaLabel" }] : /* istanbul ignore next */ []));
72
- copied = signal(false, ...(ngDevMode ? [{ debugName: "copied" }] : /* istanbul ignore next */ []));
73
+ copiedAriaLabel = input(undefined, /* @ts-ignore */
74
+ ...(ngDevMode ? [{ debugName: "copiedAriaLabel" }] : /* istanbul ignore next */ []));
75
+ localeLabels = signal(this._getLocaleLabels(), /* @ts-ignore */
76
+ ...(ngDevMode ? [{ debugName: "localeLabels" }] : /* istanbul ignore next */ []));
77
+ resolvedCopyLabel = computed(() => this._resolveInputLabel(this.copyLabel()) ?? this.localeLabels().copyLabel, /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "resolvedCopyLabel" }] : /* istanbul ignore next */ []));
79
+ resolvedCopiedLabel = computed(() => this._resolveInputLabel(this.copiedLabel()) ?? this.localeLabels().copiedLabel, /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "resolvedCopiedLabel" }] : /* istanbul ignore next */ []));
81
+ resolvedCopyAriaLabel = computed(() => this._resolveInputLabel(this.copyAriaLabel()) ?? this.localeLabels().copyAriaLabel, /* @ts-ignore */
82
+ ...(ngDevMode ? [{ debugName: "resolvedCopyAriaLabel" }] : /* istanbul ignore next */ []));
83
+ resolvedCopiedAriaLabel = computed(() => this._resolveInputLabel(this.copiedAriaLabel()) ?? this.localeLabels().copiedAriaLabel, /* @ts-ignore */
84
+ ...(ngDevMode ? [{ debugName: "resolvedCopiedAriaLabel" }] : /* istanbul ignore next */ []));
85
+ copied = signal(false, /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "copied" }] : /* istanbul ignore next */ []));
73
87
  _copyTimer;
74
88
  constructor() {
75
89
  const root = this.doc.documentElement;
76
90
  const win = this.doc.defaultView;
91
+ this.destroyRef.onDestroy(() => clearTimeout(this._copyTimer));
77
92
  if (!root || !win?.MutationObserver)
78
93
  return;
79
94
  const observer = new win.MutationObserver(() => {
@@ -134,8 +149,8 @@ class NeuCodeBlockComponent {
134
149
  const trimmed = value?.trim();
135
150
  return trimmed ? value : undefined;
136
151
  }
137
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuCodeBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
138
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: NeuCodeBlockComponent, isStandalone: true, selector: "neu-code-block", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: false, transformFunction: null }, lang: { classPropertyName: "lang", publicName: "lang", isSignal: true, isRequired: false, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null }, copyLabel: { classPropertyName: "copyLabel", publicName: "copyLabel", isSignal: true, isRequired: false, transformFunction: null }, copiedLabel: { classPropertyName: "copiedLabel", publicName: "copiedLabel", isSignal: true, isRequired: false, transformFunction: null }, copyAriaLabel: { classPropertyName: "copyAriaLabel", publicName: "copyAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, copiedAriaLabel: { classPropertyName: "copiedAriaLabel", publicName: "copiedAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.lang": "null" } }, ngImport: i0, template: `
152
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NeuCodeBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
153
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NeuCodeBlockComponent, isStandalone: true, selector: "neu-code-block", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: false, transformFunction: null }, lang: { classPropertyName: "lang", publicName: "lang", isSignal: true, isRequired: false, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null }, copyLabel: { classPropertyName: "copyLabel", publicName: "copyLabel", isSignal: true, isRequired: false, transformFunction: null }, copiedLabel: { classPropertyName: "copiedLabel", publicName: "copiedLabel", isSignal: true, isRequired: false, transformFunction: null }, copyAriaLabel: { classPropertyName: "copyAriaLabel", publicName: "copyAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, copiedAriaLabel: { classPropertyName: "copiedAriaLabel", publicName: "copiedAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.lang": "null" } }, ngImport: i0, template: `
139
154
  <div class="neu-code-block">
140
155
  <!-- Encabezado del editor -->
141
156
  <div class="neu-code-block__header">
@@ -187,7 +202,7 @@ class NeuCodeBlockComponent {
187
202
  </div>
188
203
  `, isInline: true, styles: [".neu-code-block{border-radius:var(--neu-radius-lg);overflow:hidden;border:1px solid var(--neu-code-block-border);font-family:var(--neu-font-mono)}.neu-code-block__header{display:flex;align-items:center;gap:var(--neu-space-3);padding:10px 16px;background:var(--neu-code-block-bar-bg);border-bottom:1px solid var(--neu-code-block-border)}.neu-code-block__dots{display:flex;gap:6px;flex-shrink:0}.neu-code-block__dots span{display:block;width:12px;height:12px;border-radius:50%}.neu-code-block__dots span:nth-child(1){background:#ff5f57}.neu-code-block__dots span:nth-child(2){background:#febc2e}.neu-code-block__dots span:nth-child(3){background:#28c840}.neu-code-block__lang{flex:1;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--neu-code-block-accent);font-family:var(--neu-font-mono)}.neu-code-block__copy{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;background:var(--neu-code-block-border);border:1px solid var(--neu-code-block-copy-border);border-radius:6px;font-size:11px;font-weight:500;color:var(--neu-code-block-copy-text);cursor:pointer;font-family:var(--neu-font-sans);transition:all var(--neu-transition);flex-shrink:0}.neu-code-block__copy svg{width:12px;height:12px;flex-shrink:0}.neu-code-block__copy:hover{background:var(--neu-code-block-copy-hover-bg);color:var(--neu-code-block-copy-hover-text);border-color:var(--neu-code-block-copy-hover-border)}.neu-code-block__pre{margin:0;padding:20px 24px;background:var(--neu-code-block-bg);overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--neu-code-block-muted) transparent}.neu-code-block__pre::-webkit-scrollbar{height:4px}.neu-code-block__pre::-webkit-scrollbar-track{background:transparent}.neu-code-block__pre::-webkit-scrollbar-thumb{background:var(--neu-code-block-muted);border-radius:99px}.neu-code-block__code{display:block;font-size:13.5px;line-height:1.75;color:var(--neu-code-block-text);font-family:inherit;white-space:pre;tab-size:2}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
189
204
  }
190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuCodeBlockComponent, decorators: [{
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NeuCodeBlockComponent, decorators: [{
191
206
  type: Component,
192
207
  args: [{ selector: 'neu-code-block', imports: [], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: `
193
208
  <div class="neu-code-block">