@neural-ui/core 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -88
- package/accordion/package.json +4 -0
- package/alert/package.json +4 -0
- package/autocomplete/package.json +4 -0
- package/avatar/package.json +4 -0
- package/badge/package.json +4 -0
- package/block-ui/package.json +4 -0
- package/breadcrumb/package.json +4 -0
- package/button/package.json +4 -0
- package/card/package.json +4 -0
- package/chart/package.json +4 -0
- package/checkbox/package.json +4 -0
- package/chip/package.json +4 -0
- package/code-block/package.json +4 -0
- package/color-picker/package.json +4 -0
- package/command-palette/package.json +4 -0
- package/confirm-dialog/package.json +4 -0
- package/context-menu/package.json +4 -0
- package/dashboard-grid/package.json +4 -0
- package/date-input/package.json +4 -0
- package/divider/package.json +4 -0
- package/empty-state/package.json +4 -0
- package/fesm2022/neural-ui-core-accordion.mjs +162 -0
- package/fesm2022/neural-ui-core-accordion.mjs.map +1 -0
- package/fesm2022/neural-ui-core-alert.mjs +116 -0
- package/fesm2022/neural-ui-core-alert.mjs.map +1 -0
- package/fesm2022/neural-ui-core-autocomplete.mjs +332 -0
- package/fesm2022/neural-ui-core-autocomplete.mjs.map +1 -0
- package/fesm2022/neural-ui-core-avatar.mjs +109 -0
- package/fesm2022/neural-ui-core-avatar.mjs.map +1 -0
- package/fesm2022/neural-ui-core-badge.mjs +54 -0
- package/fesm2022/neural-ui-core-badge.mjs.map +1 -0
- package/fesm2022/neural-ui-core-block-ui.mjs +95 -0
- package/fesm2022/neural-ui-core-block-ui.mjs.map +1 -0
- package/fesm2022/neural-ui-core-breadcrumb.mjs +84 -0
- package/fesm2022/neural-ui-core-breadcrumb.mjs.map +1 -0
- package/fesm2022/neural-ui-core-button.mjs +125 -0
- package/fesm2022/neural-ui-core-button.mjs.map +1 -0
- package/fesm2022/neural-ui-core-card.mjs +69 -0
- package/fesm2022/neural-ui-core-card.mjs.map +1 -0
- package/fesm2022/neural-ui-core-chart.mjs +287 -0
- package/fesm2022/neural-ui-core-chart.mjs.map +1 -0
- package/fesm2022/neural-ui-core-checkbox.mjs +138 -0
- package/fesm2022/neural-ui-core-checkbox.mjs.map +1 -0
- package/fesm2022/neural-ui-core-chip.mjs +130 -0
- package/fesm2022/neural-ui-core-chip.mjs.map +1 -0
- package/fesm2022/neural-ui-core-code-block.mjs +250 -0
- package/fesm2022/neural-ui-core-code-block.mjs.map +1 -0
- package/fesm2022/neural-ui-core-color-picker.mjs +435 -0
- package/fesm2022/neural-ui-core-color-picker.mjs.map +1 -0
- package/fesm2022/neural-ui-core-command-palette.mjs +235 -0
- package/fesm2022/neural-ui-core-command-palette.mjs.map +1 -0
- package/fesm2022/neural-ui-core-confirm-dialog.mjs +118 -0
- package/fesm2022/neural-ui-core-confirm-dialog.mjs.map +1 -0
- package/fesm2022/neural-ui-core-context-menu.mjs +158 -0
- package/fesm2022/neural-ui-core-context-menu.mjs.map +1 -0
- package/fesm2022/neural-ui-core-dashboard-grid.mjs +144 -0
- package/fesm2022/neural-ui-core-dashboard-grid.mjs.map +1 -0
- package/fesm2022/neural-ui-core-date-input.mjs +1332 -0
- package/fesm2022/neural-ui-core-date-input.mjs.map +1 -0
- package/fesm2022/neural-ui-core-divider.mjs +54 -0
- package/fesm2022/neural-ui-core-divider.mjs.map +1 -0
- package/fesm2022/neural-ui-core-empty-state.mjs +84 -0
- package/fesm2022/neural-ui-core-empty-state.mjs.map +1 -0
- package/fesm2022/neural-ui-core-filter-bar.mjs +118 -0
- package/fesm2022/neural-ui-core-filter-bar.mjs.map +1 -0
- package/fesm2022/neural-ui-core-icon.mjs +50 -0
- package/fesm2022/neural-ui-core-icon.mjs.map +1 -0
- package/fesm2022/neural-ui-core-image-viewer.mjs +309 -0
- package/fesm2022/neural-ui-core-image-viewer.mjs.map +1 -0
- package/fesm2022/neural-ui-core-input-otp.mjs +192 -0
- package/fesm2022/neural-ui-core-input-otp.mjs.map +1 -0
- package/fesm2022/neural-ui-core-input.mjs +320 -0
- package/fesm2022/neural-ui-core-input.mjs.map +1 -0
- package/fesm2022/neural-ui-core-knob.mjs +323 -0
- package/fesm2022/neural-ui-core-knob.mjs.map +1 -0
- package/fesm2022/neural-ui-core-meter-group.mjs +122 -0
- package/fesm2022/neural-ui-core-meter-group.mjs.map +1 -0
- package/fesm2022/neural-ui-core-modal.mjs +156 -0
- package/fesm2022/neural-ui-core-modal.mjs.map +1 -0
- package/fesm2022/neural-ui-core-multiselect.mjs +748 -0
- package/fesm2022/neural-ui-core-multiselect.mjs.map +1 -0
- package/fesm2022/neural-ui-core-nav.mjs +952 -0
- package/fesm2022/neural-ui-core-nav.mjs.map +1 -0
- package/fesm2022/neural-ui-core-notification-center.mjs +264 -0
- package/fesm2022/neural-ui-core-notification-center.mjs.map +1 -0
- package/fesm2022/neural-ui-core-number-input.mjs +331 -0
- package/fesm2022/neural-ui-core-number-input.mjs.map +1 -0
- package/fesm2022/neural-ui-core-pagination.mjs +198 -0
- package/fesm2022/neural-ui-core-pagination.mjs.map +1 -0
- package/fesm2022/neural-ui-core-popover.mjs +207 -0
- package/fesm2022/neural-ui-core-popover.mjs.map +1 -0
- package/fesm2022/neural-ui-core-progress-bar.mjs +105 -0
- package/fesm2022/neural-ui-core-progress-bar.mjs.map +1 -0
- package/fesm2022/neural-ui-core-radio.mjs +171 -0
- package/fesm2022/neural-ui-core-radio.mjs.map +1 -0
- package/fesm2022/neural-ui-core-rating.mjs +151 -0
- package/fesm2022/neural-ui-core-rating.mjs.map +1 -0
- package/fesm2022/neural-ui-core-select.mjs +638 -0
- package/fesm2022/neural-ui-core-select.mjs.map +1 -0
- package/fesm2022/neural-ui-core-sidebar.mjs +214 -0
- package/fesm2022/neural-ui-core-sidebar.mjs.map +1 -0
- package/fesm2022/neural-ui-core-skeleton.mjs +40 -0
- package/fesm2022/neural-ui-core-skeleton.mjs.map +1 -0
- package/fesm2022/neural-ui-core-slider.mjs +146 -0
- package/fesm2022/neural-ui-core-slider.mjs.map +1 -0
- package/fesm2022/neural-ui-core-spinner.mjs +113 -0
- package/fesm2022/neural-ui-core-spinner.mjs.map +1 -0
- package/fesm2022/neural-ui-core-split-button.mjs +252 -0
- package/fesm2022/neural-ui-core-split-button.mjs.map +1 -0
- package/fesm2022/neural-ui-core-splitter.mjs +174 -0
- package/fesm2022/neural-ui-core-splitter.mjs.map +1 -0
- package/fesm2022/neural-ui-core-stats-card.mjs +163 -0
- package/fesm2022/neural-ui-core-stats-card.mjs.map +1 -0
- package/fesm2022/neural-ui-core-stepper.mjs +204 -0
- package/fesm2022/neural-ui-core-stepper.mjs.map +1 -0
- package/fesm2022/neural-ui-core-switch.mjs +111 -0
- package/fesm2022/neural-ui-core-switch.mjs.map +1 -0
- package/fesm2022/neural-ui-core-table.mjs +1860 -0
- package/fesm2022/neural-ui-core-table.mjs.map +1 -0
- package/fesm2022/neural-ui-core-tabs.mjs +246 -0
- package/fesm2022/neural-ui-core-tabs.mjs.map +1 -0
- package/fesm2022/neural-ui-core-textarea.mjs +188 -0
- package/fesm2022/neural-ui-core-textarea.mjs.map +1 -0
- package/fesm2022/neural-ui-core-timeline.mjs +117 -0
- package/fesm2022/neural-ui-core-timeline.mjs.map +1 -0
- package/fesm2022/neural-ui-core-toast.mjs +171 -0
- package/fesm2022/neural-ui-core-toast.mjs.map +1 -0
- package/fesm2022/neural-ui-core-toggle-button-group.mjs +162 -0
- package/fesm2022/neural-ui-core-toggle-button-group.mjs.map +1 -0
- package/fesm2022/neural-ui-core-toolbar.mjs +67 -0
- package/fesm2022/neural-ui-core-toolbar.mjs.map +1 -0
- package/fesm2022/neural-ui-core-tooltip.mjs +151 -0
- package/fesm2022/neural-ui-core-tooltip.mjs.map +1 -0
- package/fesm2022/neural-ui-core-url-state.mjs +96 -0
- package/fesm2022/neural-ui-core-url-state.mjs.map +1 -0
- package/fesm2022/neural-ui-core-virtual-list.mjs +126 -0
- package/fesm2022/neural-ui-core-virtual-list.mjs.map +1 -0
- package/fesm2022/neural-ui-core.mjs +11 -8544
- package/fesm2022/neural-ui-core.mjs.map +1 -1
- package/filter-bar/package.json +4 -0
- package/icon/package.json +4 -0
- package/image-viewer/package.json +4 -0
- package/input/package.json +4 -0
- package/input-otp/package.json +4 -0
- package/knob/package.json +4 -0
- package/meter-group/package.json +4 -0
- package/modal/package.json +4 -0
- package/multiselect/package.json +4 -0
- package/nav/package.json +4 -0
- package/notification-center/package.json +4 -0
- package/number-input/package.json +4 -0
- package/package.json +252 -5
- package/pagination/package.json +4 -0
- package/popover/package.json +4 -0
- package/progress-bar/package.json +4 -0
- package/radio/package.json +4 -0
- package/rating/package.json +4 -0
- package/select/package.json +4 -0
- package/sidebar/package.json +4 -0
- package/skeleton/package.json +4 -0
- package/slider/package.json +4 -0
- package/spinner/package.json +4 -0
- package/split-button/package.json +4 -0
- package/splitter/package.json +4 -0
- package/stats-card/package.json +4 -0
- package/stepper/package.json +4 -0
- package/styles/_tokens.scss +202 -0
- package/styles.scss +1 -0
- package/switch/package.json +4 -0
- package/table/package.json +4 -0
- package/tabs/package.json +4 -0
- package/textarea/package.json +4 -0
- package/timeline/package.json +4 -0
- package/toast/package.json +4 -0
- package/toggle-button-group/package.json +4 -0
- package/toolbar/package.json +4 -0
- package/tooltip/package.json +4 -0
- package/types/neural-ui-core-accordion.d.ts +55 -0
- package/types/neural-ui-core-alert.d.ts +47 -0
- package/types/neural-ui-core-autocomplete.d.ts +69 -0
- package/types/neural-ui-core-avatar.d.ts +39 -0
- package/types/neural-ui-core-badge.d.ts +36 -0
- package/types/neural-ui-core-block-ui.d.ts +46 -0
- package/types/neural-ui-core-breadcrumb.d.ts +38 -0
- package/types/neural-ui-core-button.d.ts +55 -0
- package/types/neural-ui-core-card.d.ts +37 -0
- package/types/neural-ui-core-chart.d.ts +236 -0
- package/types/neural-ui-core-checkbox.d.ts +33 -0
- package/types/neural-ui-core-chip.d.ts +53 -0
- package/types/neural-ui-core-code-block.d.ts +55 -0
- package/types/neural-ui-core-color-picker.d.ts +55 -0
- package/types/neural-ui-core-command-palette.d.ts +56 -0
- package/types/neural-ui-core-confirm-dialog.d.ts +50 -0
- package/types/neural-ui-core-context-menu.d.ts +66 -0
- package/types/neural-ui-core-dashboard-grid.d.ts +41 -0
- package/types/neural-ui-core-date-input.d.ts +178 -0
- package/types/neural-ui-core-divider.d.ts +20 -0
- package/types/neural-ui-core-empty-state.d.ts +32 -0
- package/types/neural-ui-core-filter-bar.d.ts +49 -0
- package/types/neural-ui-core-icon.d.ts +33 -0
- package/types/neural-ui-core-image-viewer.d.ts +67 -0
- package/types/neural-ui-core-input-otp.d.ts +49 -0
- package/types/neural-ui-core-input.d.ts +86 -0
- package/types/neural-ui-core-knob.d.ts +68 -0
- package/types/neural-ui-core-meter-group.d.ts +52 -0
- package/types/neural-ui-core-modal.d.ts +54 -0
- package/types/neural-ui-core-multiselect.d.ts +129 -0
- package/types/neural-ui-core-nav.d.ts +69 -0
- package/types/neural-ui-core-notification-center.d.ts +60 -0
- package/types/neural-ui-core-number-input.d.ts +63 -0
- package/types/neural-ui-core-pagination.d.ts +30 -0
- package/types/neural-ui-core-popover.d.ts +73 -0
- package/types/neural-ui-core-progress-bar.d.ts +35 -0
- package/types/neural-ui-core-radio.d.ts +51 -0
- package/types/neural-ui-core-rating.d.ts +34 -0
- package/types/neural-ui-core-select.d.ts +161 -0
- package/types/neural-ui-core-sidebar.d.ts +57 -0
- package/types/neural-ui-core-skeleton.d.ts +22 -0
- package/types/neural-ui-core-slider.d.ts +42 -0
- package/types/neural-ui-core-spinner.d.ts +38 -0
- package/types/neural-ui-core-split-button.d.ts +65 -0
- package/types/neural-ui-core-splitter.d.ts +28 -0
- package/types/neural-ui-core-stats-card.d.ts +39 -0
- package/types/neural-ui-core-stepper.d.ts +51 -0
- package/types/neural-ui-core-switch.d.ts +34 -0
- package/types/neural-ui-core-table.d.ts +282 -0
- package/types/neural-ui-core-tabs.d.ts +76 -0
- package/types/neural-ui-core-textarea.d.ts +52 -0
- package/types/neural-ui-core-timeline.d.ts +33 -0
- package/types/neural-ui-core-toast.d.ts +70 -0
- package/types/neural-ui-core-toggle-button-group.d.ts +63 -0
- package/types/neural-ui-core-toolbar.d.ts +36 -0
- package/types/neural-ui-core-tooltip.d.ts +48 -0
- package/types/neural-ui-core-url-state.d.ts +58 -0
- package/types/neural-ui-core-virtual-list.d.ts +60 -0
- package/types/neural-ui-core.d.ts +3 -2105
- package/url-state/package.json +4 -0
- package/virtual-list/package.json +4 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, signal, computed, viewChild, effect, forwardRef, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
|
|
5
|
+
let _neuTextareaIdSeq = 0;
|
|
6
|
+
/**
|
|
7
|
+
* NeuralUI Textarea Component
|
|
8
|
+
*
|
|
9
|
+
* Textarea con floating label y soporte completo para Angular Forms.
|
|
10
|
+
* Soporta auto-resize opcional.
|
|
11
|
+
*
|
|
12
|
+
* Uso:
|
|
13
|
+
* <neu-textarea label="Descripción" [formControl]="ctrl" />
|
|
14
|
+
* <neu-textarea label="Bio" [rows]="5" [autoResize]="true" />
|
|
15
|
+
*/
|
|
16
|
+
class NeuTextareaComponent {
|
|
17
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
18
|
+
rows = input(3, ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
19
|
+
/** Tamaño del campo: 'sm' = compacto | 'md' = estándar | 'lg' = grande / Field size */
|
|
20
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
21
|
+
autoResize = input(false, ...(ngDevMode ? [{ debugName: "autoResize" }] : /* istanbul ignore next */ []));
|
|
22
|
+
/** Permite al usuario redimensionar el campo manualmente (por defecto: true) / Allows the user to manually resize the field (default: true) */
|
|
23
|
+
resizable = input(true, ...(ngDevMode ? [{ debugName: "resizable" }] : /* istanbul ignore next */ []));
|
|
24
|
+
errorMessage = input('', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
25
|
+
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
26
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
27
|
+
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
28
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
29
|
+
name = input('', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
30
|
+
maxlength = input(null, ...(ngDevMode ? [{ debugName: "maxlength" }] : /* istanbul ignore next */ []));
|
|
31
|
+
_id = `neu-textarea-${_neuTextareaIdSeq++}`;
|
|
32
|
+
_value = signal('', ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
|
|
33
|
+
_focused = signal(false, ...(ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []));
|
|
34
|
+
_isDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_isDisabled" }] : /* istanbul ignore next */ []));
|
|
35
|
+
_isDisabledState = computed(() => this.disabled() || this._isDisabled(), ...(ngDevMode ? [{ debugName: "_isDisabledState" }] : /* istanbul ignore next */ []));
|
|
36
|
+
hasValue = computed(() => this._value().length > 0, ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
37
|
+
hasError = computed(() => !!this.errorMessage(), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
38
|
+
_resizeStyle = computed(() => {
|
|
39
|
+
if (this.autoResize())
|
|
40
|
+
return 'none';
|
|
41
|
+
return this.resizable() ? 'vertical' : 'none';
|
|
42
|
+
}, ...(ngDevMode ? [{ debugName: "_resizeStyle" }] : /* istanbul ignore next */ []));
|
|
43
|
+
_textareaRef = viewChild('textareaRef', ...(ngDevMode ? [{ debugName: "_textareaRef" }] : /* istanbul ignore next */ []));
|
|
44
|
+
_onChange = () => { };
|
|
45
|
+
_onTouched = () => { };
|
|
46
|
+
constructor() {
|
|
47
|
+
effect(() => {
|
|
48
|
+
if (this.autoResize()) {
|
|
49
|
+
const el = this._textareaRef()?.nativeElement;
|
|
50
|
+
if (el) {
|
|
51
|
+
el.style.height = 'auto';
|
|
52
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
onInput(event) {
|
|
58
|
+
const el = event.target;
|
|
59
|
+
this._value.set(el.value);
|
|
60
|
+
this._onChange(el.value);
|
|
61
|
+
if (this.autoResize()) {
|
|
62
|
+
el.style.height = 'auto';
|
|
63
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
onFocus() {
|
|
67
|
+
this._focused.set(true);
|
|
68
|
+
}
|
|
69
|
+
onBlur() {
|
|
70
|
+
this._focused.set(false);
|
|
71
|
+
this._onTouched();
|
|
72
|
+
}
|
|
73
|
+
writeValue(val) {
|
|
74
|
+
this._value.set(val == null ? '' : String(val));
|
|
75
|
+
}
|
|
76
|
+
registerOnChange(fn) {
|
|
77
|
+
this._onChange = fn;
|
|
78
|
+
}
|
|
79
|
+
registerOnTouched(fn) {
|
|
80
|
+
this._onTouched = fn;
|
|
81
|
+
}
|
|
82
|
+
setDisabledState(isDisabled) {
|
|
83
|
+
this._isDisabled.set(isDisabled);
|
|
84
|
+
}
|
|
85
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
86
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: NeuTextareaComponent, isStandalone: true, selector: "neu-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, autoResize: { classPropertyName: "autoResize", publicName: "autoResize", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.neu-textarea-host--sm": "size() === \"sm\"", "class.neu-textarea-host--lg": "size() === \"lg\"" }, classAttribute: "neu-textarea-host" }, providers: [
|
|
87
|
+
{
|
|
88
|
+
provide: NG_VALUE_ACCESSOR,
|
|
89
|
+
useExisting: forwardRef(() => NeuTextareaComponent),
|
|
90
|
+
multi: true,
|
|
91
|
+
},
|
|
92
|
+
], viewQueries: [{ propertyName: "_textareaRef", first: true, predicate: ["textareaRef"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
93
|
+
<div
|
|
94
|
+
class="neu-textarea__wrapper"
|
|
95
|
+
[class.neu-textarea__wrapper--focused]="_focused()"
|
|
96
|
+
[class.neu-textarea__wrapper--has-value]="hasValue()"
|
|
97
|
+
[class.neu-textarea__wrapper--error]="hasError()"
|
|
98
|
+
[class.neu-textarea__wrapper--disabled]="_isDisabledState()"
|
|
99
|
+
>
|
|
100
|
+
<textarea
|
|
101
|
+
#textareaRef
|
|
102
|
+
class="neu-textarea__field"
|
|
103
|
+
[id]="_id"
|
|
104
|
+
[rows]="rows()"
|
|
105
|
+
[placeholder]="' '"
|
|
106
|
+
[attr.disabled]="_isDisabledState() ? true : null"
|
|
107
|
+
[attr.readonly]="readonly() ? true : null"
|
|
108
|
+
[attr.required]="required() ? true : null"
|
|
109
|
+
[attr.maxlength]="maxlength() ?? null"
|
|
110
|
+
[attr.name]="name() || null"
|
|
111
|
+
[attr.aria-describedby]="hasError() ? _id + '-error' : hint() ? _id + '-hint' : null"
|
|
112
|
+
[attr.aria-invalid]="hasError() ? 'true' : null"
|
|
113
|
+
[style.resize]="_resizeStyle()"
|
|
114
|
+
[value]="_value()"
|
|
115
|
+
(input)="onInput($event)"
|
|
116
|
+
(focus)="onFocus()"
|
|
117
|
+
(blur)="onBlur()"
|
|
118
|
+
></textarea>
|
|
119
|
+
<label class="neu-textarea__label" [for]="_id">{{ label() }}</label>
|
|
120
|
+
@if (hint() && !hasError()) {
|
|
121
|
+
<span class="neu-textarea__hint" [id]="_id + '-hint'">{{ hint() }}</span>
|
|
122
|
+
}
|
|
123
|
+
@if (hasError()) {
|
|
124
|
+
<span class="neu-textarea__error" role="alert" [id]="_id + '-error'">{{
|
|
125
|
+
errorMessage()
|
|
126
|
+
}}</span>
|
|
127
|
+
}
|
|
128
|
+
</div>
|
|
129
|
+
`, isInline: true, styles: [".neu-textarea-host{display:block;width:100%}.neu-textarea__wrapper{position:relative;width:100%}.neu-textarea__wrapper--disabled{opacity:.5;pointer-events:none}.neu-textarea__field{width:100%;min-height:80px;padding:1.25rem var(--neu-space-4) var(--neu-space-3);font-family:var(--neu-font-sans);font-size:var(--neu-text-sm);color:var(--neu-text);background:var(--neu-surface);border:1.5px solid var(--neu-border);border-radius:var(--neu-radius);outline:none;resize:var(--_neu-textarea-resize, vertical);transition:border-color var(--neu-transition),box-shadow var(--neu-transition);line-height:1.5;box-sizing:border-box}.neu-textarea__field::placeholder{color:transparent}.neu-textarea__wrapper--error .neu-textarea__field{border-color:var(--neu-error)}.neu-textarea__wrapper--focused .neu-textarea__field{border-color:var(--neu-border-focus);box-shadow:var(--neu-focus-ring)}.neu-textarea__wrapper--disabled .neu-textarea__field{background:var(--neu-surface-2);cursor:not-allowed}.neu-textarea__field[style*=height]{resize:none;overflow:hidden}.neu-textarea__label{position:absolute;top:.9rem;left:var(--neu-space-4);font-size:var(--neu-text-base);color:var(--neu-text-muted);pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - var(--neu-space-8));transition:top var(--neu-transition),transform var(--neu-transition),color var(--neu-transition),font-size var(--neu-transition),padding var(--neu-transition),background var(--neu-transition)}.neu-textarea__wrapper--focused .neu-textarea__label,.neu-textarea__wrapper--has-value .neu-textarea__label{top:0;transform:translateY(-50%);font-size:12px;font-weight:600;letter-spacing:.01em;background:var(--neu-surface);padding:0 4px;left:calc(var(--neu-space-4) - 4px);color:var(--neu-primary)}.neu-textarea__wrapper--focused.neu-textarea__wrapper--error .neu-textarea__label,.neu-textarea__wrapper--error .neu-textarea__label{color:var(--neu-error)}.neu-textarea__wrapper--disabled .neu-textarea__label{background:var(--neu-surface-2)}.neu-textarea__hint{display:block;margin-top:var(--neu-space-1);font-size:var(--neu-text-xs);color:var(--neu-text-muted)}.neu-textarea__error{display:block;margin-top:var(--neu-space-1);font-size:var(--neu-text-xs);color:var(--neu-error-text)}.neu-textarea-host--sm .neu-textarea__field{min-height:60px;padding:.7rem var(--neu-space-3) var(--neu-space-2)}.neu-textarea-host--sm .neu-textarea__label{top:.6rem}.neu-textarea-host--lg .neu-textarea__field{min-height:100px;font-size:var(--neu-text-base);padding:1.5rem var(--neu-space-5) var(--neu-space-4)}.neu-textarea-host--lg .neu-textarea__label{top:1.2rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
130
|
+
}
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuTextareaComponent, decorators: [{
|
|
132
|
+
type: Component,
|
|
133
|
+
args: [{ selector: 'neu-textarea', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
134
|
+
class: 'neu-textarea-host',
|
|
135
|
+
'[class.neu-textarea-host--sm]': 'size() === "sm"',
|
|
136
|
+
'[class.neu-textarea-host--lg]': 'size() === "lg"',
|
|
137
|
+
}, providers: [
|
|
138
|
+
{
|
|
139
|
+
provide: NG_VALUE_ACCESSOR,
|
|
140
|
+
useExisting: forwardRef(() => NeuTextareaComponent),
|
|
141
|
+
multi: true,
|
|
142
|
+
},
|
|
143
|
+
], template: `
|
|
144
|
+
<div
|
|
145
|
+
class="neu-textarea__wrapper"
|
|
146
|
+
[class.neu-textarea__wrapper--focused]="_focused()"
|
|
147
|
+
[class.neu-textarea__wrapper--has-value]="hasValue()"
|
|
148
|
+
[class.neu-textarea__wrapper--error]="hasError()"
|
|
149
|
+
[class.neu-textarea__wrapper--disabled]="_isDisabledState()"
|
|
150
|
+
>
|
|
151
|
+
<textarea
|
|
152
|
+
#textareaRef
|
|
153
|
+
class="neu-textarea__field"
|
|
154
|
+
[id]="_id"
|
|
155
|
+
[rows]="rows()"
|
|
156
|
+
[placeholder]="' '"
|
|
157
|
+
[attr.disabled]="_isDisabledState() ? true : null"
|
|
158
|
+
[attr.readonly]="readonly() ? true : null"
|
|
159
|
+
[attr.required]="required() ? true : null"
|
|
160
|
+
[attr.maxlength]="maxlength() ?? null"
|
|
161
|
+
[attr.name]="name() || null"
|
|
162
|
+
[attr.aria-describedby]="hasError() ? _id + '-error' : hint() ? _id + '-hint' : null"
|
|
163
|
+
[attr.aria-invalid]="hasError() ? 'true' : null"
|
|
164
|
+
[style.resize]="_resizeStyle()"
|
|
165
|
+
[value]="_value()"
|
|
166
|
+
(input)="onInput($event)"
|
|
167
|
+
(focus)="onFocus()"
|
|
168
|
+
(blur)="onBlur()"
|
|
169
|
+
></textarea>
|
|
170
|
+
<label class="neu-textarea__label" [for]="_id">{{ label() }}</label>
|
|
171
|
+
@if (hint() && !hasError()) {
|
|
172
|
+
<span class="neu-textarea__hint" [id]="_id + '-hint'">{{ hint() }}</span>
|
|
173
|
+
}
|
|
174
|
+
@if (hasError()) {
|
|
175
|
+
<span class="neu-textarea__error" role="alert" [id]="_id + '-error'">{{
|
|
176
|
+
errorMessage()
|
|
177
|
+
}}</span>
|
|
178
|
+
}
|
|
179
|
+
</div>
|
|
180
|
+
`, styles: [".neu-textarea-host{display:block;width:100%}.neu-textarea__wrapper{position:relative;width:100%}.neu-textarea__wrapper--disabled{opacity:.5;pointer-events:none}.neu-textarea__field{width:100%;min-height:80px;padding:1.25rem var(--neu-space-4) var(--neu-space-3);font-family:var(--neu-font-sans);font-size:var(--neu-text-sm);color:var(--neu-text);background:var(--neu-surface);border:1.5px solid var(--neu-border);border-radius:var(--neu-radius);outline:none;resize:var(--_neu-textarea-resize, vertical);transition:border-color var(--neu-transition),box-shadow var(--neu-transition);line-height:1.5;box-sizing:border-box}.neu-textarea__field::placeholder{color:transparent}.neu-textarea__wrapper--error .neu-textarea__field{border-color:var(--neu-error)}.neu-textarea__wrapper--focused .neu-textarea__field{border-color:var(--neu-border-focus);box-shadow:var(--neu-focus-ring)}.neu-textarea__wrapper--disabled .neu-textarea__field{background:var(--neu-surface-2);cursor:not-allowed}.neu-textarea__field[style*=height]{resize:none;overflow:hidden}.neu-textarea__label{position:absolute;top:.9rem;left:var(--neu-space-4);font-size:var(--neu-text-base);color:var(--neu-text-muted);pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - var(--neu-space-8));transition:top var(--neu-transition),transform var(--neu-transition),color var(--neu-transition),font-size var(--neu-transition),padding var(--neu-transition),background var(--neu-transition)}.neu-textarea__wrapper--focused .neu-textarea__label,.neu-textarea__wrapper--has-value .neu-textarea__label{top:0;transform:translateY(-50%);font-size:12px;font-weight:600;letter-spacing:.01em;background:var(--neu-surface);padding:0 4px;left:calc(var(--neu-space-4) - 4px);color:var(--neu-primary)}.neu-textarea__wrapper--focused.neu-textarea__wrapper--error .neu-textarea__label,.neu-textarea__wrapper--error .neu-textarea__label{color:var(--neu-error)}.neu-textarea__wrapper--disabled .neu-textarea__label{background:var(--neu-surface-2)}.neu-textarea__hint{display:block;margin-top:var(--neu-space-1);font-size:var(--neu-text-xs);color:var(--neu-text-muted)}.neu-textarea__error{display:block;margin-top:var(--neu-space-1);font-size:var(--neu-text-xs);color:var(--neu-error-text)}.neu-textarea-host--sm .neu-textarea__field{min-height:60px;padding:.7rem var(--neu-space-3) var(--neu-space-2)}.neu-textarea-host--sm .neu-textarea__label{top:.6rem}.neu-textarea-host--lg .neu-textarea__field{min-height:100px;font-size:var(--neu-text-base);padding:1.5rem var(--neu-space-5) var(--neu-space-4)}.neu-textarea-host--lg .neu-textarea__label{top:1.2rem}\n"] }]
|
|
181
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], autoResize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoResize", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }], _textareaRef: [{ type: i0.ViewChild, args: ['textareaRef', { isSignal: true }] }] } });
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Generated bundle index. Do not edit.
|
|
185
|
+
*/
|
|
186
|
+
|
|
187
|
+
export { NeuTextareaComponent };
|
|
188
|
+
//# sourceMappingURL=neural-ui-core-textarea.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neural-ui-core-textarea.mjs","sources":["../../../../projects/ui-core/textarea/neu-textarea.component.ts","../../../../projects/ui-core/textarea/neural-ui-core-textarea.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nlet _neuTextareaIdSeq = 0;\n\n/**\n * NeuralUI Textarea Component\n *\n * Textarea con floating label y soporte completo para Angular Forms.\n * Soporta auto-resize opcional.\n *\n * Uso:\n * <neu-textarea label=\"Descripción\" [formControl]=\"ctrl\" />\n * <neu-textarea label=\"Bio\" [rows]=\"5\" [autoResize]=\"true\" />\n */\n@Component({\n selector: 'neu-textarea',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'neu-textarea-host',\n '[class.neu-textarea-host--sm]': 'size() === \"sm\"',\n '[class.neu-textarea-host--lg]': 'size() === \"lg\"',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NeuTextareaComponent),\n multi: true,\n },\n ],\n template: `\n <div\n class=\"neu-textarea__wrapper\"\n [class.neu-textarea__wrapper--focused]=\"_focused()\"\n [class.neu-textarea__wrapper--has-value]=\"hasValue()\"\n [class.neu-textarea__wrapper--error]=\"hasError()\"\n [class.neu-textarea__wrapper--disabled]=\"_isDisabledState()\"\n >\n <textarea\n #textareaRef\n class=\"neu-textarea__field\"\n [id]=\"_id\"\n [rows]=\"rows()\"\n [placeholder]=\"' '\"\n [attr.disabled]=\"_isDisabledState() ? true : null\"\n [attr.readonly]=\"readonly() ? true : null\"\n [attr.required]=\"required() ? true : null\"\n [attr.maxlength]=\"maxlength() ?? null\"\n [attr.name]=\"name() || null\"\n [attr.aria-describedby]=\"hasError() ? _id + '-error' : hint() ? _id + '-hint' : null\"\n [attr.aria-invalid]=\"hasError() ? 'true' : null\"\n [style.resize]=\"_resizeStyle()\"\n [value]=\"_value()\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n ></textarea>\n <label class=\"neu-textarea__label\" [for]=\"_id\">{{ label() }}</label>\n @if (hint() && !hasError()) {\n <span class=\"neu-textarea__hint\" [id]=\"_id + '-hint'\">{{ hint() }}</span>\n }\n @if (hasError()) {\n <span class=\"neu-textarea__error\" role=\"alert\" [id]=\"_id + '-error'\">{{\n errorMessage()\n }}</span>\n }\n </div>\n `,\n styleUrl: './neu-textarea.component.scss',\n})\nexport class NeuTextareaComponent implements ControlValueAccessor {\n readonly label = input('');\n readonly rows = input<number>(3);\n /** Tamaño del campo: 'sm' = compacto | 'md' = estándar | 'lg' = grande / Field size */\n readonly size = input<'sm' | 'md' | 'lg'>('md');\n readonly autoResize = input<boolean>(false);\n /** Permite al usuario redimensionar el campo manualmente (por defecto: true) / Allows the user to manually resize the field (default: true) */\n readonly resizable = input<boolean>(true);\n readonly errorMessage = input<string>('');\n readonly hint = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly readonly = input<boolean>(false);\n readonly required = input<boolean>(false);\n readonly name = input<string>('');\n readonly maxlength = input<number | null>(null);\n\n readonly _id = `neu-textarea-${_neuTextareaIdSeq++}`;\n\n protected readonly _value = signal('');\n protected readonly _focused = signal(false);\n protected readonly _isDisabled = signal(false);\n\n readonly _isDisabledState = computed(() => this.disabled() || this._isDisabled());\n readonly hasValue = computed(() => this._value().length > 0);\n readonly hasError = computed(() => !!this.errorMessage());\n readonly _resizeStyle = computed(() => {\n if (this.autoResize()) return 'none';\n return this.resizable() ? 'vertical' : 'none';\n });\n\n private readonly _textareaRef = viewChild<ElementRef<HTMLTextAreaElement>>('textareaRef');\n\n private _onChange: (v: string) => void = () => {};\n private _onTouched: () => void = () => {};\n\n constructor() {\n effect(() => {\n if (this.autoResize()) {\n const el = this._textareaRef()?.nativeElement;\n if (el) {\n el.style.height = 'auto';\n el.style.height = `${el.scrollHeight}px`;\n }\n }\n });\n }\n\n onInput(event: Event): void {\n const el = event.target as HTMLTextAreaElement;\n this._value.set(el.value);\n this._onChange(el.value);\n\n if (this.autoResize()) {\n el.style.height = 'auto';\n el.style.height = `${el.scrollHeight}px`;\n }\n }\n\n onFocus(): void {\n this._focused.set(true);\n }\n\n onBlur(): void {\n this._focused.set(false);\n this._onTouched();\n }\n\n writeValue(val: unknown): void {\n this._value.set(val == null ? '' : String(val));\n }\n\n registerOnChange(fn: (v: string) => 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._isDisabled.set(isDisabled);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAeA,IAAI,iBAAiB,GAAG,CAAC;AAEzB;;;;;;;;;AASG;MAyDU,oBAAoB,CAAA;AACtB,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,4EAAC;AACjB,IAAA,IAAI,GAAG,KAAK,CAAS,CAAC,2EAAC;;AAEvB,IAAA,IAAI,GAAG,KAAK,CAAqB,IAAI,2EAAC;AACtC,IAAA,UAAU,GAAG,KAAK,CAAU,KAAK,iFAAC;;AAElC,IAAA,SAAS,GAAG,KAAK,CAAU,IAAI,gFAAC;AAChC,IAAA,YAAY,GAAG,KAAK,CAAS,EAAE,mFAAC;AAChC,IAAA,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
5
|
+
* NeuralUI Timeline Component
|
|
6
|
+
*
|
|
7
|
+
* Lista vertical de eventos cronológicos con línea conectora. / Vertical list of chronological events with a connector line.
|
|
8
|
+
*
|
|
9
|
+
* Uso:
|
|
10
|
+
* <neu-timeline [items]="events" />
|
|
11
|
+
* <neu-timeline [items]="events" align="right" />
|
|
12
|
+
*/
|
|
13
|
+
class NeuTimelineComponent {
|
|
14
|
+
/** Eventos a mostrar / Events to display */
|
|
15
|
+
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuTimelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: NeuTimelineComponent, isStandalone: true, selector: "neu-timeline", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
18
|
+
<ol class="neu-timeline">
|
|
19
|
+
@for (item of items(); track item.title; let last = $last) {
|
|
20
|
+
<li class="neu-timeline__item" [class.neu-timeline__item--last]="last">
|
|
21
|
+
<!-- Eje izquierdo (punto + línea) -->
|
|
22
|
+
<div class="neu-timeline__axis">
|
|
23
|
+
<div
|
|
24
|
+
class="neu-timeline__dot"
|
|
25
|
+
[class]="'neu-timeline__dot--' + (item.variant ?? 'default')"
|
|
26
|
+
>
|
|
27
|
+
@if (item.icon) {
|
|
28
|
+
<svg
|
|
29
|
+
class="neu-timeline__dot-icon"
|
|
30
|
+
viewBox="0 0 24 24"
|
|
31
|
+
fill="none"
|
|
32
|
+
stroke="currentColor"
|
|
33
|
+
stroke-width="2"
|
|
34
|
+
stroke-linecap="round"
|
|
35
|
+
aria-hidden="true"
|
|
36
|
+
>
|
|
37
|
+
<path [attr.d]="item.icon" />
|
|
38
|
+
</svg>
|
|
39
|
+
}
|
|
40
|
+
</div>
|
|
41
|
+
@if (!last) {
|
|
42
|
+
<div class="neu-timeline__line"></div>
|
|
43
|
+
}
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<!-- Contenido -->
|
|
47
|
+
<div class="neu-timeline__content">
|
|
48
|
+
<div class="neu-timeline__header">
|
|
49
|
+
<span class="neu-timeline__title">{{ item.title }}</span>
|
|
50
|
+
@if (item.time) {
|
|
51
|
+
<span class="neu-timeline__time">{{ item.time }}</span>
|
|
52
|
+
}
|
|
53
|
+
</div>
|
|
54
|
+
@if (item.description) {
|
|
55
|
+
<p class="neu-timeline__desc">{{ item.description }}</p>
|
|
56
|
+
}
|
|
57
|
+
</div>
|
|
58
|
+
</li>
|
|
59
|
+
}
|
|
60
|
+
</ol>
|
|
61
|
+
`, isInline: true, styles: [".neu-timeline{list-style:none;margin:0;padding:0;font-family:var(--neu-font-sans)}.neu-timeline__item{display:flex;gap:var(--neu-space-4);min-height:56px}.neu-timeline__axis{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:24px}.neu-timeline__dot{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:2.5px solid;background:var(--neu-surface)}.neu-timeline__dot--default{border-color:var(--neu-border);color:var(--neu-text-disabled);background:var(--neu-surface-2)}.neu-timeline__dot--success{border-color:var(--neu-success);color:var(--neu-success)}.neu-timeline__dot--warning{border-color:var(--neu-warning);color:var(--neu-warning)}.neu-timeline__dot--danger{border-color:var(--neu-error);color:var(--neu-error)}.neu-timeline__dot--info{border-color:var(--neu-primary);color:var(--neu-primary)}.neu-timeline__dot-icon{width:12px;height:12px}.neu-timeline__line{width:2px;flex:1;background:var(--neu-border);margin:4px 0;min-height:16px}.neu-timeline__content{flex:1;padding-bottom:var(--neu-space-5);padding-top:2px}.neu-timeline__header{display:flex;align-items:baseline;justify-content:space-between;gap:var(--neu-space-3);margin-bottom:4px}.neu-timeline__title{font-size:var(--neu-text-sm);font-weight:600;color:var(--neu-text)}.neu-timeline__time{font-size:var(--neu-text-xs);color:var(--neu-text-disabled);white-space:nowrap;flex-shrink:0}.neu-timeline__desc{font-size:var(--neu-text-sm);color:var(--neu-text-muted);line-height:1.6;margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
62
|
+
}
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuTimelineComponent, decorators: [{
|
|
64
|
+
type: Component,
|
|
65
|
+
args: [{ selector: 'neu-timeline', imports: [], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
66
|
+
<ol class="neu-timeline">
|
|
67
|
+
@for (item of items(); track item.title; let last = $last) {
|
|
68
|
+
<li class="neu-timeline__item" [class.neu-timeline__item--last]="last">
|
|
69
|
+
<!-- Eje izquierdo (punto + línea) -->
|
|
70
|
+
<div class="neu-timeline__axis">
|
|
71
|
+
<div
|
|
72
|
+
class="neu-timeline__dot"
|
|
73
|
+
[class]="'neu-timeline__dot--' + (item.variant ?? 'default')"
|
|
74
|
+
>
|
|
75
|
+
@if (item.icon) {
|
|
76
|
+
<svg
|
|
77
|
+
class="neu-timeline__dot-icon"
|
|
78
|
+
viewBox="0 0 24 24"
|
|
79
|
+
fill="none"
|
|
80
|
+
stroke="currentColor"
|
|
81
|
+
stroke-width="2"
|
|
82
|
+
stroke-linecap="round"
|
|
83
|
+
aria-hidden="true"
|
|
84
|
+
>
|
|
85
|
+
<path [attr.d]="item.icon" />
|
|
86
|
+
</svg>
|
|
87
|
+
}
|
|
88
|
+
</div>
|
|
89
|
+
@if (!last) {
|
|
90
|
+
<div class="neu-timeline__line"></div>
|
|
91
|
+
}
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<!-- Contenido -->
|
|
95
|
+
<div class="neu-timeline__content">
|
|
96
|
+
<div class="neu-timeline__header">
|
|
97
|
+
<span class="neu-timeline__title">{{ item.title }}</span>
|
|
98
|
+
@if (item.time) {
|
|
99
|
+
<span class="neu-timeline__time">{{ item.time }}</span>
|
|
100
|
+
}
|
|
101
|
+
</div>
|
|
102
|
+
@if (item.description) {
|
|
103
|
+
<p class="neu-timeline__desc">{{ item.description }}</p>
|
|
104
|
+
}
|
|
105
|
+
</div>
|
|
106
|
+
</li>
|
|
107
|
+
}
|
|
108
|
+
</ol>
|
|
109
|
+
`, styles: [".neu-timeline{list-style:none;margin:0;padding:0;font-family:var(--neu-font-sans)}.neu-timeline__item{display:flex;gap:var(--neu-space-4);min-height:56px}.neu-timeline__axis{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:24px}.neu-timeline__dot{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:2.5px solid;background:var(--neu-surface)}.neu-timeline__dot--default{border-color:var(--neu-border);color:var(--neu-text-disabled);background:var(--neu-surface-2)}.neu-timeline__dot--success{border-color:var(--neu-success);color:var(--neu-success)}.neu-timeline__dot--warning{border-color:var(--neu-warning);color:var(--neu-warning)}.neu-timeline__dot--danger{border-color:var(--neu-error);color:var(--neu-error)}.neu-timeline__dot--info{border-color:var(--neu-primary);color:var(--neu-primary)}.neu-timeline__dot-icon{width:12px;height:12px}.neu-timeline__line{width:2px;flex:1;background:var(--neu-border);margin:4px 0;min-height:16px}.neu-timeline__content{flex:1;padding-bottom:var(--neu-space-5);padding-top:2px}.neu-timeline__header{display:flex;align-items:baseline;justify-content:space-between;gap:var(--neu-space-3);margin-bottom:4px}.neu-timeline__title{font-size:var(--neu-text-sm);font-weight:600;color:var(--neu-text)}.neu-timeline__time{font-size:var(--neu-text-xs);color:var(--neu-text-disabled);white-space:nowrap;flex-shrink:0}.neu-timeline__desc{font-size:var(--neu-text-sm);color:var(--neu-text-muted);line-height:1.6;margin:0}\n"] }]
|
|
110
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }] } });
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Generated bundle index. Do not edit.
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
export { NeuTimelineComponent };
|
|
117
|
+
//# sourceMappingURL=neural-ui-core-timeline.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neural-ui-core-timeline.mjs","sources":["../../../../projects/ui-core/timeline/neu-timeline.component.ts","../../../../projects/ui-core/timeline/neural-ui-core-timeline.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation, input } from '@angular/core';\n\nexport type NeuTimelineItemVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';\n\nexport interface NeuTimelineItem {\n /** Etiqueta de tiempo (ej. \"Hace 2h\", \"12 Mar\") / Time label (e.g. \"2h ago\", \"Mar 12\") */\n time?: string;\n /** Título del evento / Event title */\n title: string;\n /** Descripción opcional / Optional description */\n description?: string;\n /** Variante de color del punto / Dot color variant */\n variant?: NeuTimelineItemVariant;\n /** Icono SVG path opcional / Optional SVG path icon */\n icon?: string;\n}\n\n/**\n * NeuralUI Timeline Component\n *\n * Lista vertical de eventos cronológicos con línea conectora. / Vertical list of chronological events with a connector line.\n *\n * Uso:\n * <neu-timeline [items]=\"events\" />\n * <neu-timeline [items]=\"events\" align=\"right\" />\n */\n@Component({\n selector: 'neu-timeline',\n imports: [],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ol class=\"neu-timeline\">\n @for (item of items(); track item.title; let last = $last) {\n <li class=\"neu-timeline__item\" [class.neu-timeline__item--last]=\"last\">\n <!-- Eje izquierdo (punto + línea) -->\n <div class=\"neu-timeline__axis\">\n <div\n class=\"neu-timeline__dot\"\n [class]=\"'neu-timeline__dot--' + (item.variant ?? 'default')\"\n >\n @if (item.icon) {\n <svg\n class=\"neu-timeline__dot-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\"\n >\n <path [attr.d]=\"item.icon\" />\n </svg>\n }\n </div>\n @if (!last) {\n <div class=\"neu-timeline__line\"></div>\n }\n </div>\n\n <!-- Contenido -->\n <div class=\"neu-timeline__content\">\n <div class=\"neu-timeline__header\">\n <span class=\"neu-timeline__title\">{{ item.title }}</span>\n @if (item.time) {\n <span class=\"neu-timeline__time\">{{ item.time }}</span>\n }\n </div>\n @if (item.description) {\n <p class=\"neu-timeline__desc\">{{ item.description }}</p>\n }\n </div>\n </li>\n }\n </ol>\n `,\n styleUrl: './neu-timeline.component.scss',\n})\nexport class NeuTimelineComponent {\n /** Eventos a mostrar / Events to display */\n items = input<NeuTimelineItem[]>([]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;AAiBA;;;;;;;;AAQG;MAqDU,oBAAoB,CAAA;;AAE/B,IAAA,KAAK,GAAG,KAAK,CAAoB,EAAE,4EAAC;uGAFzB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA/CrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,qgDAAA,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;kBApDhC,SAAS;+BACE,cAAc,EAAA,OAAA,EACf,EAAE,EAAA,aAAA,EACI,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,qgDAAA,CAAA,EAAA;;;AC3EH;;AAEG;;;;"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, Injectable, inject, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import { NeuIconComponent } from '@neural-ui/core/icon';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* NeuralUI Toast Service
|
|
7
|
+
*
|
|
8
|
+
* Lanza notificaciones flotantes desde cualquier punto de la app.
|
|
9
|
+
* Requiere que `<neu-toast-container>` esté presente en la raíz del app.
|
|
10
|
+
*
|
|
11
|
+
* Uso:
|
|
12
|
+
* const toast = inject(NeuToastService);
|
|
13
|
+
* toast.success('Guardado correctamente');
|
|
14
|
+
* toast.error('Ha ocurrido un error', { title: 'Error', duration: 8000 });
|
|
15
|
+
*/
|
|
16
|
+
class NeuToastService {
|
|
17
|
+
/** Lista reactiva de toasts activos / Reactive list of active toasts */
|
|
18
|
+
toasts = signal([], ...(ngDevMode ? [{ debugName: "toasts" }] : /* istanbul ignore next */ []));
|
|
19
|
+
/** Posición del contenedor de toasts / Toast container position */
|
|
20
|
+
position = signal('top-right', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
21
|
+
setPosition(position) {
|
|
22
|
+
this.position.set(position);
|
|
23
|
+
}
|
|
24
|
+
show(options) {
|
|
25
|
+
const id = `neu-toast-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
|
|
26
|
+
const duration = options.duration ?? 4000;
|
|
27
|
+
const item = {
|
|
28
|
+
id,
|
|
29
|
+
message: options.message,
|
|
30
|
+
title: options.title ?? '',
|
|
31
|
+
type: options.type ?? 'info',
|
|
32
|
+
duration,
|
|
33
|
+
};
|
|
34
|
+
this.toasts.update((list) => [...list, item]);
|
|
35
|
+
if (duration > 0) {
|
|
36
|
+
setTimeout(() => this.dismiss(id), duration);
|
|
37
|
+
}
|
|
38
|
+
return id;
|
|
39
|
+
}
|
|
40
|
+
success(message, opts) {
|
|
41
|
+
return this.show({ ...opts, message, type: 'success' });
|
|
42
|
+
}
|
|
43
|
+
error(message, opts) {
|
|
44
|
+
return this.show({ ...opts, message, type: 'error' });
|
|
45
|
+
}
|
|
46
|
+
info(message, opts) {
|
|
47
|
+
return this.show({ ...opts, message, type: 'info' });
|
|
48
|
+
}
|
|
49
|
+
warning(message, opts) {
|
|
50
|
+
return this.show({ ...opts, message, type: 'warning' });
|
|
51
|
+
}
|
|
52
|
+
dismiss(id) {
|
|
53
|
+
this.toasts.update((list) => list.filter((t) => t.id !== id));
|
|
54
|
+
}
|
|
55
|
+
clear() {
|
|
56
|
+
this.toasts.set([]);
|
|
57
|
+
}
|
|
58
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
59
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuToastService, providedIn: 'root' });
|
|
60
|
+
}
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuToastService, decorators: [{
|
|
62
|
+
type: Injectable,
|
|
63
|
+
args: [{ providedIn: 'root' }]
|
|
64
|
+
}] });
|
|
65
|
+
|
|
66
|
+
/** Mapa de iconos Lucide por tipo de toast / Map of Lucide icons by toast type */
|
|
67
|
+
const TOAST_ICONS = {
|
|
68
|
+
success: 'lucideCheckCircle',
|
|
69
|
+
error: 'lucideXCircle',
|
|
70
|
+
warning: 'lucideAlertTriangle',
|
|
71
|
+
info: 'lucideInfo',
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* NeuralUI Toast Container Component
|
|
75
|
+
*
|
|
76
|
+
* Renderiza los toasts activos del NeuToastService.
|
|
77
|
+
* Añade este componente una sola vez en la raíz del app (app.html).
|
|
78
|
+
*
|
|
79
|
+
* Diseño mobile-first:
|
|
80
|
+
* - < 400px: banner inferior centrado
|
|
81
|
+
* - ≥ 400px: stack en la esquina superior derecha
|
|
82
|
+
*
|
|
83
|
+
* Uso:
|
|
84
|
+
* <!-- en app.html -->
|
|
85
|
+
* <neu-toast-container />
|
|
86
|
+
*/
|
|
87
|
+
class NeuToastContainerComponent {
|
|
88
|
+
toastService = inject(NeuToastService);
|
|
89
|
+
getIcon(type) {
|
|
90
|
+
return TOAST_ICONS[type];
|
|
91
|
+
}
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
93
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: NeuToastContainerComponent, isStandalone: true, selector: "neu-toast-container", host: { attributes: { "aria-live": "polite", "aria-atomic": "false" }, properties: { "class.neu-toast-container--top-right": "toastService.position() === \"top-right\"", "class.neu-toast-container--top-left": "toastService.position() === \"top-left\"", "class.neu-toast-container--bottom-right": "toastService.position() === \"bottom-right\"", "class.neu-toast-container--bottom-left": "toastService.position() === \"bottom-left\"" }, classAttribute: "neu-toast-container" }, ngImport: i0, template: `
|
|
94
|
+
@for (toast of toastService.toasts(); track toast.id) {
|
|
95
|
+
<div
|
|
96
|
+
class="neu-toast"
|
|
97
|
+
[class]="'neu-toast neu-toast--' + toast.type"
|
|
98
|
+
[attr.role]="toast.type === 'error' || toast.type === 'warning' ? 'alert' : 'status'"
|
|
99
|
+
[attr.aria-live]="
|
|
100
|
+
toast.type === 'error' || toast.type === 'warning' ? 'assertive' : 'polite'
|
|
101
|
+
"
|
|
102
|
+
>
|
|
103
|
+
<span class="neu-toast__icon-wrap" aria-hidden="true">
|
|
104
|
+
<neu-icon [name]="getIcon(toast.type)" size="1rem" />
|
|
105
|
+
</span>
|
|
106
|
+
<div class="neu-toast__body">
|
|
107
|
+
@if (toast.title) {
|
|
108
|
+
<p class="neu-toast__title">{{ toast.title }}</p>
|
|
109
|
+
}
|
|
110
|
+
<p class="neu-toast__message">{{ toast.message }}</p>
|
|
111
|
+
</div>
|
|
112
|
+
<button
|
|
113
|
+
class="neu-toast__close"
|
|
114
|
+
type="button"
|
|
115
|
+
[attr.aria-label]="'Cerrar'"
|
|
116
|
+
(click)="toastService.dismiss(toast.id)"
|
|
117
|
+
>
|
|
118
|
+
<neu-icon name="lucideX" size="1rem" />
|
|
119
|
+
</button>
|
|
120
|
+
</div>
|
|
121
|
+
}
|
|
122
|
+
`, isInline: true, styles: [".neu-toast-container{position:fixed;z-index:var(--neu-z-toast);display:flex;flex-direction:column;gap:var(--neu-space-3);pointer-events:none;bottom:var(--neu-space-6);left:50%;transform:translate(-50%);width:calc(100vw - var(--neu-space-8));max-width:400px;align-items:stretch}@media(min-width:400px){.neu-toast-container{bottom:auto;left:auto;transform:none;width:360px;align-items:flex-end}}@media(min-width:400px){.neu-toast-container--top-right{top:calc(var(--neu-header-height, 64px) + var(--neu-space-4));right:var(--neu-space-6);align-items:flex-end}.neu-toast-container--top-left{top:calc(var(--neu-header-height, 64px) + var(--neu-space-4));left:var(--neu-space-6);align-items:flex-start}.neu-toast-container--bottom-right{top:auto;bottom:var(--neu-space-6);right:var(--neu-space-6);align-items:flex-end}.neu-toast-container--bottom-left{top:auto;bottom:var(--neu-space-6);left:var(--neu-space-6);align-items:flex-start}}.neu-toast{display:flex;align-items:flex-start;gap:var(--neu-space-3);padding:var(--neu-space-4);background:var(--neu-toast-bg, var(--neu-surface));border-radius:var(--neu-toast-radius, 10px);box-shadow:var(--neu-toast-shadow, 0 8px 24px rgba(15, 23, 42, .12), 0 2px 6px rgba(15, 23, 42, .06));border-left:3px solid transparent;pointer-events:all;animation:neu-toast-in .25s cubic-bezier(.34,1.56,.64,1) forwards;width:100%}.neu-toast--success{border-color:var(--neu-success)}.neu-toast--success .neu-toast__icon-wrap{color:var(--neu-success)}.neu-toast--error{border-color:var(--neu-error)}.neu-toast--error .neu-toast__icon-wrap{color:var(--neu-error)}.neu-toast--warning{border-color:var(--neu-warning)}.neu-toast--warning .neu-toast__icon-wrap{color:var(--neu-warning)}.neu-toast--info{border-color:var(--neu-info)}.neu-toast--info .neu-toast__icon-wrap{color:var(--neu-info)}.neu-toast__icon-wrap{flex-shrink:0;display:flex;align-items:center;margin-top:1px}.neu-toast__body{flex:1;min-width:0}.neu-toast__title{margin:0 0 var(--neu-space-1);font-family:var(--neu-font-sans);font-size:var(--neu-text-sm);font-weight:600;color:var(--neu-text);line-height:1.3}.neu-toast__message{margin:0;font-family:var(--neu-font-sans);font-size:var(--neu-text-sm);color:var(--neu-text-muted);line-height:1.4;word-break:break-word}.neu-toast__close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;background:transparent;border:none;border-radius:var(--neu-radius-sm);color:var(--neu-text-muted);cursor:pointer;transition:background-color var(--neu-transition),color var(--neu-transition);margin-top:-2px;margin-right:-4px}.neu-toast__close:hover{background:var(--neu-surface-2);color:var(--neu-text)}.neu-toast__close:focus-visible{outline:2px solid var(--neu-primary);outline-offset:1px}@keyframes neu-toast-in{0%{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@media(min-width:400px){@keyframes neu-toast-in{0%{opacity:0;transform:translate(20px) scale(.96)}to{opacity:1;transform:translate(0) scale(1)}}}\n"], dependencies: [{ kind: "component", type: NeuIconComponent, selector: "neu-icon", inputs: ["name", "strokeWidth", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
123
|
+
}
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NeuToastContainerComponent, decorators: [{
|
|
125
|
+
type: Component,
|
|
126
|
+
args: [{ selector: 'neu-toast-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NeuIconComponent], host: {
|
|
127
|
+
class: 'neu-toast-container',
|
|
128
|
+
'aria-live': 'polite',
|
|
129
|
+
'aria-atomic': 'false',
|
|
130
|
+
'[class.neu-toast-container--top-right]': 'toastService.position() === "top-right"',
|
|
131
|
+
'[class.neu-toast-container--top-left]': 'toastService.position() === "top-left"',
|
|
132
|
+
'[class.neu-toast-container--bottom-right]': 'toastService.position() === "bottom-right"',
|
|
133
|
+
'[class.neu-toast-container--bottom-left]': 'toastService.position() === "bottom-left"',
|
|
134
|
+
}, template: `
|
|
135
|
+
@for (toast of toastService.toasts(); track toast.id) {
|
|
136
|
+
<div
|
|
137
|
+
class="neu-toast"
|
|
138
|
+
[class]="'neu-toast neu-toast--' + toast.type"
|
|
139
|
+
[attr.role]="toast.type === 'error' || toast.type === 'warning' ? 'alert' : 'status'"
|
|
140
|
+
[attr.aria-live]="
|
|
141
|
+
toast.type === 'error' || toast.type === 'warning' ? 'assertive' : 'polite'
|
|
142
|
+
"
|
|
143
|
+
>
|
|
144
|
+
<span class="neu-toast__icon-wrap" aria-hidden="true">
|
|
145
|
+
<neu-icon [name]="getIcon(toast.type)" size="1rem" />
|
|
146
|
+
</span>
|
|
147
|
+
<div class="neu-toast__body">
|
|
148
|
+
@if (toast.title) {
|
|
149
|
+
<p class="neu-toast__title">{{ toast.title }}</p>
|
|
150
|
+
}
|
|
151
|
+
<p class="neu-toast__message">{{ toast.message }}</p>
|
|
152
|
+
</div>
|
|
153
|
+
<button
|
|
154
|
+
class="neu-toast__close"
|
|
155
|
+
type="button"
|
|
156
|
+
[attr.aria-label]="'Cerrar'"
|
|
157
|
+
(click)="toastService.dismiss(toast.id)"
|
|
158
|
+
>
|
|
159
|
+
<neu-icon name="lucideX" size="1rem" />
|
|
160
|
+
</button>
|
|
161
|
+
</div>
|
|
162
|
+
}
|
|
163
|
+
`, styles: [".neu-toast-container{position:fixed;z-index:var(--neu-z-toast);display:flex;flex-direction:column;gap:var(--neu-space-3);pointer-events:none;bottom:var(--neu-space-6);left:50%;transform:translate(-50%);width:calc(100vw - var(--neu-space-8));max-width:400px;align-items:stretch}@media(min-width:400px){.neu-toast-container{bottom:auto;left:auto;transform:none;width:360px;align-items:flex-end}}@media(min-width:400px){.neu-toast-container--top-right{top:calc(var(--neu-header-height, 64px) + var(--neu-space-4));right:var(--neu-space-6);align-items:flex-end}.neu-toast-container--top-left{top:calc(var(--neu-header-height, 64px) + var(--neu-space-4));left:var(--neu-space-6);align-items:flex-start}.neu-toast-container--bottom-right{top:auto;bottom:var(--neu-space-6);right:var(--neu-space-6);align-items:flex-end}.neu-toast-container--bottom-left{top:auto;bottom:var(--neu-space-6);left:var(--neu-space-6);align-items:flex-start}}.neu-toast{display:flex;align-items:flex-start;gap:var(--neu-space-3);padding:var(--neu-space-4);background:var(--neu-toast-bg, var(--neu-surface));border-radius:var(--neu-toast-radius, 10px);box-shadow:var(--neu-toast-shadow, 0 8px 24px rgba(15, 23, 42, .12), 0 2px 6px rgba(15, 23, 42, .06));border-left:3px solid transparent;pointer-events:all;animation:neu-toast-in .25s cubic-bezier(.34,1.56,.64,1) forwards;width:100%}.neu-toast--success{border-color:var(--neu-success)}.neu-toast--success .neu-toast__icon-wrap{color:var(--neu-success)}.neu-toast--error{border-color:var(--neu-error)}.neu-toast--error .neu-toast__icon-wrap{color:var(--neu-error)}.neu-toast--warning{border-color:var(--neu-warning)}.neu-toast--warning .neu-toast__icon-wrap{color:var(--neu-warning)}.neu-toast--info{border-color:var(--neu-info)}.neu-toast--info .neu-toast__icon-wrap{color:var(--neu-info)}.neu-toast__icon-wrap{flex-shrink:0;display:flex;align-items:center;margin-top:1px}.neu-toast__body{flex:1;min-width:0}.neu-toast__title{margin:0 0 var(--neu-space-1);font-family:var(--neu-font-sans);font-size:var(--neu-text-sm);font-weight:600;color:var(--neu-text);line-height:1.3}.neu-toast__message{margin:0;font-family:var(--neu-font-sans);font-size:var(--neu-text-sm);color:var(--neu-text-muted);line-height:1.4;word-break:break-word}.neu-toast__close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;background:transparent;border:none;border-radius:var(--neu-radius-sm);color:var(--neu-text-muted);cursor:pointer;transition:background-color var(--neu-transition),color var(--neu-transition);margin-top:-2px;margin-right:-4px}.neu-toast__close:hover{background:var(--neu-surface-2);color:var(--neu-text)}.neu-toast__close:focus-visible{outline:2px solid var(--neu-primary);outline-offset:1px}@keyframes neu-toast-in{0%{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@media(min-width:400px){@keyframes neu-toast-in{0%{opacity:0;transform:translate(20px) scale(.96)}to{opacity:1;transform:translate(0) scale(1)}}}\n"] }]
|
|
164
|
+
}] });
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Generated bundle index. Do not edit.
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
export { NeuToastContainerComponent, NeuToastService };
|
|
171
|
+
//# sourceMappingURL=neural-ui-core-toast.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neural-ui-core-toast.mjs","sources":["../../../../projects/ui-core/toast/neu-toast.service.ts","../../../../projects/ui-core/toast/neu-toast.component.ts","../../../../projects/ui-core/toast/neural-ui-core-toast.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { NeuToastItem, NeuToastOptions, NeuToastPosition } from './neu-toast.types';\n\n/**\n * NeuralUI Toast Service\n *\n * Lanza notificaciones flotantes desde cualquier punto de la app.\n * Requiere que `<neu-toast-container>` esté presente en la raíz del app.\n *\n * Uso:\n * const toast = inject(NeuToastService);\n * toast.success('Guardado correctamente');\n * toast.error('Ha ocurrido un error', { title: 'Error', duration: 8000 });\n */\n@Injectable({ providedIn: 'root' })\nexport class NeuToastService {\n /** Lista reactiva de toasts activos / Reactive list of active toasts */\n readonly toasts = signal<NeuToastItem[]>([]);\n\n /** Posición del contenedor de toasts / Toast container position */\n readonly position = signal<NeuToastPosition>('top-right');\n\n setPosition(position: NeuToastPosition): void {\n this.position.set(position);\n }\n\n show(options: NeuToastOptions): string {\n const id = `neu-toast-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;\n const duration = options.duration ?? 4000;\n\n const item: NeuToastItem = {\n id,\n message: options.message,\n title: options.title ?? '',\n type: options.type ?? 'info',\n duration,\n };\n\n this.toasts.update((list) => [...list, item]);\n\n if (duration > 0) {\n setTimeout(() => this.dismiss(id), duration);\n }\n\n return id;\n }\n\n success(message: string, opts?: Partial<NeuToastOptions>): string {\n return this.show({ ...opts, message, type: 'success' });\n }\n\n error(message: string, opts?: Partial<NeuToastOptions>): string {\n return this.show({ ...opts, message, type: 'error' });\n }\n\n info(message: string, opts?: Partial<NeuToastOptions>): string {\n return this.show({ ...opts, message, type: 'info' });\n }\n\n warning(message: string, opts?: Partial<NeuToastOptions>): string {\n return this.show({ ...opts, message, type: 'warning' });\n }\n\n dismiss(id: string): void {\n this.toasts.update((list) => list.filter((t) => t.id !== id));\n }\n\n clear(): void {\n this.toasts.set([]);\n }\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, inject } from '@angular/core';\nimport { NeuToastService } from './neu-toast.service';\nimport { NeuToastType } from './neu-toast.types';\nimport { NeuIconComponent } from '@neural-ui/core/icon';\n\n/** Mapa de iconos Lucide por tipo de toast / Map of Lucide icons by toast type */\nconst TOAST_ICONS: Record<NeuToastType, string> = {\n success: 'lucideCheckCircle',\n error: 'lucideXCircle',\n warning: 'lucideAlertTriangle',\n info: 'lucideInfo',\n};\n\n/**\n * NeuralUI Toast Container Component\n *\n * Renderiza los toasts activos del NeuToastService.\n * Añade este componente una sola vez en la raíz del app (app.html).\n *\n * Diseño mobile-first:\n * - < 400px: banner inferior centrado\n * - ≥ 400px: stack en la esquina superior derecha\n *\n * Uso:\n * <!-- en app.html -->\n * <neu-toast-container />\n */\n@Component({\n selector: 'neu-toast-container',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NeuIconComponent],\n host: {\n class: 'neu-toast-container',\n 'aria-live': 'polite',\n 'aria-atomic': 'false',\n '[class.neu-toast-container--top-right]': 'toastService.position() === \"top-right\"',\n '[class.neu-toast-container--top-left]': 'toastService.position() === \"top-left\"',\n '[class.neu-toast-container--bottom-right]': 'toastService.position() === \"bottom-right\"',\n '[class.neu-toast-container--bottom-left]': 'toastService.position() === \"bottom-left\"',\n },\n template: `\n @for (toast of toastService.toasts(); track toast.id) {\n <div\n class=\"neu-toast\"\n [class]=\"'neu-toast neu-toast--' + toast.type\"\n [attr.role]=\"toast.type === 'error' || toast.type === 'warning' ? 'alert' : 'status'\"\n [attr.aria-live]=\"\n toast.type === 'error' || toast.type === 'warning' ? 'assertive' : 'polite'\n \"\n >\n <span class=\"neu-toast__icon-wrap\" aria-hidden=\"true\">\n <neu-icon [name]=\"getIcon(toast.type)\" size=\"1rem\" />\n </span>\n <div class=\"neu-toast__body\">\n @if (toast.title) {\n <p class=\"neu-toast__title\">{{ toast.title }}</p>\n }\n <p class=\"neu-toast__message\">{{ toast.message }}</p>\n </div>\n <button\n class=\"neu-toast__close\"\n type=\"button\"\n [attr.aria-label]=\"'Cerrar'\"\n (click)=\"toastService.dismiss(toast.id)\"\n >\n <neu-icon name=\"lucideX\" size=\"1rem\" />\n </button>\n </div>\n }\n `,\n styleUrl: './neu-toast.component.scss',\n})\nexport class NeuToastContainerComponent {\n readonly toastService = inject(NeuToastService);\n\n getIcon(type: NeuToastType): string {\n return TOAST_ICONS[type];\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAGA;;;;;;;;;;AAUG;MAEU,eAAe,CAAA;;AAEjB,IAAA,MAAM,GAAG,MAAM,CAAiB,EAAE,6EAAC;;AAGnC,IAAA,QAAQ,GAAG,MAAM,CAAmB,WAAW,+EAAC;AAEzD,IAAA,WAAW,CAAC,QAA0B,EAAA;AACpC,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC7B;AAEA,IAAA,IAAI,CAAC,OAAwB,EAAA;QAC3B,MAAM,EAAE,GAAG,CAAA,UAAA,EAAa,IAAI,CAAC,GAAG,EAAE,CAAA,CAAA,EAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA,CAAE;AAC9E,QAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,IAAI;AAEzC,QAAA,MAAM,IAAI,GAAiB;YACzB,EAAE;YACF,OAAO,EAAE,OAAO,CAAC,OAAO;AACxB,YAAA,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,EAAE;AAC1B,YAAA,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,MAAM;YAC5B,QAAQ;SACT;AAED,QAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC,CAAC;AAE7C,QAAA,IAAI,QAAQ,GAAG,CAAC,EAAE;AAChB,YAAA,UAAU,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC;QAC9C;AAEA,QAAA,OAAO,EAAE;IACX;IAEA,OAAO,CAAC,OAAe,E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