shirkasoft-ui-components 1.2.0 → 1.3.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 (79) hide show
  1. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +199 -0
  2. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -0
  3. package/fesm2022/shirkasoft-ui-components-button.mjs +148 -0
  4. package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -0
  5. package/fesm2022/shirkasoft-ui-components-chart.mjs +153 -0
  6. package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -0
  7. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +143 -0
  8. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -0
  9. package/fesm2022/shirkasoft-ui-components-date-picker.mjs +638 -0
  10. package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -0
  11. package/fesm2022/shirkasoft-ui-components-fieldset.mjs +94 -0
  12. package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -0
  13. package/fesm2022/shirkasoft-ui-components-file-upload.mjs +294 -0
  14. package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -0
  15. package/fesm2022/shirkasoft-ui-components-knob.mjs +269 -0
  16. package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -0
  17. package/fesm2022/shirkasoft-ui-components-loading.mjs +255 -0
  18. package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -0
  19. package/fesm2022/shirkasoft-ui-components-modal.mjs +290 -0
  20. package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -0
  21. package/fesm2022/shirkasoft-ui-components-notification.mjs +143 -0
  22. package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -0
  23. package/fesm2022/shirkasoft-ui-components-price-input.mjs +243 -0
  24. package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -0
  25. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +205 -0
  26. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -0
  27. package/fesm2022/shirkasoft-ui-components-select.mjs +737 -0
  28. package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -0
  29. package/fesm2022/shirkasoft-ui-components-sidebar.mjs +185 -0
  30. package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -0
  31. package/fesm2022/shirkasoft-ui-components-skeleton.mjs +74 -0
  32. package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -0
  33. package/fesm2022/shirkasoft-ui-components-table.mjs +689 -0
  34. package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -0
  35. package/fesm2022/shirkasoft-ui-components-tabs.mjs +249 -0
  36. package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -0
  37. package/fesm2022/shirkasoft-ui-components-tag.mjs +70 -0
  38. package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -0
  39. package/fesm2022/shirkasoft-ui-components-text-field.mjs +370 -0
  40. package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -0
  41. package/fesm2022/shirkasoft-ui-components-timeline.mjs +222 -0
  42. package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -0
  43. package/fesm2022/shirkasoft-ui-components-toggle.mjs +186 -0
  44. package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -0
  45. package/fesm2022/shirkasoft-ui-components-tooltip.mjs +169 -0
  46. package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -0
  47. package/fesm2022/shirkasoft-ui-components-utils.mjs +69 -0
  48. package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -0
  49. package/fesm2022/shirkasoft-ui-components-wizard.mjs +167 -0
  50. package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -0
  51. package/fesm2022/shirkasoft-ui-components.mjs +0 -5729
  52. package/fesm2022/shirkasoft-ui-components.mjs.map +1 -1
  53. package/package.json +101 -1
  54. package/types/shirkasoft-ui-components-breadcrumb.d.ts +68 -0
  55. package/types/shirkasoft-ui-components-button.d.ts +59 -0
  56. package/types/shirkasoft-ui-components-chart.d.ts +65 -0
  57. package/types/shirkasoft-ui-components-confirm-dialog.d.ts +88 -0
  58. package/types/shirkasoft-ui-components-date-picker.d.ts +200 -0
  59. package/types/shirkasoft-ui-components-fieldset.d.ts +72 -0
  60. package/types/shirkasoft-ui-components-file-upload.d.ts +121 -0
  61. package/types/shirkasoft-ui-components-knob.d.ts +69 -0
  62. package/types/shirkasoft-ui-components-loading.d.ts +94 -0
  63. package/types/shirkasoft-ui-components-modal.d.ts +139 -0
  64. package/types/shirkasoft-ui-components-notification.d.ts +82 -0
  65. package/types/shirkasoft-ui-components-price-input.d.ts +90 -0
  66. package/types/shirkasoft-ui-components-rail-sidebar.d.ts +121 -0
  67. package/types/shirkasoft-ui-components-select.d.ts +182 -0
  68. package/types/shirkasoft-ui-components-sidebar.d.ts +106 -0
  69. package/types/shirkasoft-ui-components-skeleton.d.ts +36 -0
  70. package/types/shirkasoft-ui-components-table.d.ts +293 -0
  71. package/types/shirkasoft-ui-components-tabs.d.ts +102 -0
  72. package/types/shirkasoft-ui-components-tag.d.ts +31 -0
  73. package/types/shirkasoft-ui-components-text-field.d.ts +120 -0
  74. package/types/shirkasoft-ui-components-timeline.d.ts +178 -0
  75. package/types/shirkasoft-ui-components-toggle.d.ts +48 -0
  76. package/types/shirkasoft-ui-components-tooltip.d.ts +47 -0
  77. package/types/shirkasoft-ui-components-utils.d.ts +9 -0
  78. package/types/shirkasoft-ui-components-wizard.d.ts +101 -0
  79. package/types/shirkasoft-ui-components.d.ts +1 -2333
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shirkasoft-ui-components-toggle.mjs","sources":["../../../projects/ui-components/toggle/toggle.component.ts","../../../projects/ui-components/toggle/shirkasoft-ui-components-toggle.ts"],"sourcesContent":["import { Component, forwardRef, input, output, signal, effect } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/**\n * Switch / checkbox component that implements ControlValueAccessor so it can\n * be used with reactive and template-driven forms.\n */\n@Component({\n selector: 'shk-toggle',\n standalone: true,\n imports: [CommonModule],\n template: `\n <div class=\"relative\">\n <label\n class=\"inline-flex items-center gap-3 cursor-pointer select-none\"\n [class.opacity-50]=\"_disabled()\"\n [class.cursor-not-allowed]=\"_disabled()\"\n >\n @if (mode() === 'toggle') {\n <div class=\"relative flex-shrink-0\" (click)=\"toggle()\">\n <div\n class=\"w-10 h-6 rounded-full transition-colors duration-200\"\n [class._shk-bg-primary]=\"_value()\"\n [class._shk-bg-surface-300]=\"!_value()\"\n [class._shk-dark-bg-surface-600]=\"!_value()\"\n ></div>\n <div\n class=\"absolute top-0.5 left-0.5 w-5 h-5 _shk-bg-white rounded-full shadow transition-transform duration-200\"\n [class.translate-x-4]=\"_value()\"\n ></div>\n </div>\n } @else {\n <div\n class=\"flex-shrink-0 w-4 h-4 rounded border-2 transition-colors duration-200 flex items-center justify-center\"\n [class._shk-bg-primary]=\"_value()\"\n [class._shk-border-primary]=\"_value()\"\n [class._shk-border-surface-300]=\"!_value()\"\n [class._shk-dark-border-surface-600]=\"!_value()\"\n (click)=\"toggle()\"\n >\n @if (_value()) {\n <svg class=\"w-3 h-3 text-white\" viewBox=\"0 0 12 12\" fill=\"none\">\n <path d=\"M2 6l3 3 5-5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n </div>\n }\n @if (label()) {\n <span class=\"text-sm _shk-text-surface-700 _shk-dark-text-surface-300\">\n {{ label() }}\n </span>\n }\n </label>\n </div>\n `,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n },\n ],\n})\nexport class ToggleComponent implements ControlValueAccessor {\n /** Text displayed next to the control. */\n label = input<string>('');\n /** Visual style: 'toggle' (switch) or 'checkbox'. Defaults to 'toggle'. */\n mode = input<'toggle' | 'checkbox'>('toggle');\n /** Manually controlled checked state (supports one-way binding). */\n checked = input<boolean | undefined>(undefined);\n /** Emitted with the new value when the user toggles the control. */\n checkedChange = output<boolean>();\n\n /** Internal controlled/reactive value. */\n _value = signal(false);\n /** Reactive disabled state. */\n _disabled = signal(false);\n\n /** Callback notified with the new value on change (ControlValueAccessor). */\n private onChange: (value: boolean) => void = () => {};\n\n /** Callback notified when the control loses focus or is touched. */\n private onTouched: () => void = () => {};\n\n constructor() {\n effect(() => {\n const manual = this.checked();\n if (manual !== undefined) {\n this._value.set(manual);\n }\n });\n }\n\n /** Sets the value from the form control. */\n writeValue(value: any): void {\n this._value.set(!!value);\n }\n\n /** Registers the callback invoked on value changes (ControlValueAccessor). */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** Registers the callback invoked when the control is touched. */\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /** Reflects the disabled state of the form control. */\n setDisabledState(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n }\n\n /**\n * Inverts the current value (unless disabled), notifies the form control,\n * marks the control as touched and emits `checkedChange`.\n */\n toggle(): void {\n if (this._disabled()) return;\n const newValue = !this._value();\n this._value.set(newValue);\n this.onChange(newValue);\n this.onTouched();\n this.checkedChange.emit(newValue);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAIA;;;;AAIG;AAEH;;;AAGG;MAyDU,eAAe,CAAA;AAqB1B,IAAA,WAAA,GAAA;;AAnBA,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAwB,QAAQ,2EAAC;;AAE7C,QAAA,IAAA,CA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AAY,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAqDX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAxD3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CT,EAAA,CAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,qBAAqB,CAAC;AAC9C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA;;;ACrED;;AAEG;;;;"}
@@ -0,0 +1,169 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, inject, ElementRef, HostListener, Component } from '@angular/core';
3
+ import { DOCUMENT } from '@angular/common';
4
+
5
+ const TOOLTIP_Z_INDEX = '2147483647';
6
+ /**
7
+ * Shirkasoft UI Components.
8
+ * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
9
+ * Belongs to Shirkasoft.
10
+ */
11
+ /**
12
+ * Tooltip rendered in `document.body` with `position: fixed`, so it always
13
+ * floats above any container (tables with `overflow: hidden`, modals, scroll
14
+ * wrappers, etc.) and never gets clipped or hidden behind its anchor element.
15
+ */
16
+ class TooltipComponent {
17
+ constructor() {
18
+ /** Content of the tooltip. */
19
+ this.text = input('', ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
20
+ /** Preferred placement relative to the trigger. */
21
+ this.position = input('bottom', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
22
+ /** 'hover' shows on mouse enter; 'fixed' stays pinned to the content. */
23
+ this.mode = input('hover', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
24
+ /** Distance (px) between the tooltip and the trigger. */
25
+ this.offset = input(8, ...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
26
+ this.host = inject((ElementRef));
27
+ this.document = inject(DOCUMENT);
28
+ /** The dynamically created tooltip element. */
29
+ this.tooltipEl = null;
30
+ /** Unsubscribe callbacks for the scroll/resize listeners. */
31
+ this.cleanup = null;
32
+ }
33
+ /** Shows the tooltip over the host trigger on mouseenter. */
34
+ onMouseEnter() {
35
+ if (!this.text())
36
+ return;
37
+ const trigger = this.host.nativeElement.querySelector('.shk-tooltip-trigger');
38
+ if (!trigger)
39
+ return;
40
+ this.show(trigger);
41
+ }
42
+ /** Hides the tooltip on mouseleave. */
43
+ onMouseLeave() {
44
+ this.hide();
45
+ }
46
+ /** Creates and positions the tooltip element on `document.body`. */
47
+ show(trigger) {
48
+ this.removeTooltip();
49
+ const el = this.document.createElement('span');
50
+ el.className = 'shk-tooltip-dynamic';
51
+ el.textContent = this.text();
52
+ Object.assign(el.style, {
53
+ position: 'fixed',
54
+ zIndex: TOOLTIP_Z_INDEX,
55
+ backgroundColor: 'var(--shk-tooltip-bg, #27272a)',
56
+ color: 'var(--shk-tooltip-text, #fff)',
57
+ padding: '4px 8px',
58
+ borderRadius: '6px',
59
+ fontSize: '12px',
60
+ lineHeight: '1.4',
61
+ whiteSpace: 'normal',
62
+ maxWidth: 'min(80vw, 22rem)',
63
+ boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
64
+ pointerEvents: 'none',
65
+ opacity: '0',
66
+ transition: 'opacity 0.15s ease',
67
+ });
68
+ this.document.body.appendChild(el);
69
+ this.tooltipEl = el;
70
+ const place = () => {
71
+ const rect = trigger.getBoundingClientRect();
72
+ const w = el.offsetWidth;
73
+ const h = el.offsetHeight;
74
+ const { left, top } = this.computePosition(rect, w, h);
75
+ el.style.left = `${left}px`;
76
+ el.style.top = `${top}px`;
77
+ };
78
+ place();
79
+ requestAnimationFrame(() => {
80
+ if (this.tooltipEl === el) {
81
+ el.style.opacity = '1';
82
+ }
83
+ });
84
+ const onScrollOrResize = () => place();
85
+ window.addEventListener('scroll', onScrollOrResize, true);
86
+ window.addEventListener('resize', onScrollOrResize);
87
+ this.cleanup = () => {
88
+ window.removeEventListener('scroll', onScrollOrResize, true);
89
+ window.removeEventListener('resize', onScrollOrResize);
90
+ };
91
+ }
92
+ /** Computes the tooltip position, clamped to the viewport. */
93
+ computePosition(rect, width, height) {
94
+ const off = this.offset();
95
+ const viewportW = this.document.defaultView?.innerWidth ?? 0;
96
+ const viewportH = this.document.defaultView?.innerHeight ?? 0;
97
+ let x;
98
+ let y;
99
+ if (this.position() === 'right') {
100
+ x = rect.right + off;
101
+ y = rect.top + rect.height / 2 - height / 2;
102
+ }
103
+ else if (this.position() === 'bottom') {
104
+ x = rect.left + rect.width / 2 - width / 2;
105
+ y = rect.bottom + off;
106
+ }
107
+ else {
108
+ x = rect.left + rect.width / 2 - width / 2;
109
+ y = rect.top - off - height;
110
+ }
111
+ const margin = 4;
112
+ const left = Math.max(margin, Math.min(x, Math.max(margin, viewportW - width - margin)));
113
+ const top = Math.max(margin, Math.min(y, Math.max(margin, viewportH - height - margin)));
114
+ return { left, top };
115
+ }
116
+ /** Fades the tooltip out and removes it from the DOM. */
117
+ hide() {
118
+ if (!this.tooltipEl)
119
+ return;
120
+ const el = this.tooltipEl;
121
+ el.style.opacity = '0';
122
+ this.tooltipEl = null;
123
+ setTimeout(() => {
124
+ el.remove();
125
+ }, 150);
126
+ }
127
+ /** Removes the tooltip and its listeners. */
128
+ removeTooltip() {
129
+ this.cleanup?.();
130
+ this.cleanup = null;
131
+ this.tooltipEl?.remove();
132
+ this.tooltipEl = null;
133
+ }
134
+ /** Cleans up the tooltip on component destroy. */
135
+ ngOnDestroy() {
136
+ this.removeTooltip();
137
+ }
138
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
139
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.18", type: TooltipComponent, isStandalone: true, selector: "shk-tooltip", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, ngImport: i0, template: `
140
+ <div class="shk-tooltip-trigger inline-flex">
141
+ <ng-content></ng-content>
142
+ </div>
143
+ `, isInline: true }); }
144
+ }
145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: TooltipComponent, decorators: [{
146
+ type: Component,
147
+ args: [{
148
+ selector: 'shk-tooltip',
149
+ standalone: true,
150
+ template: `
151
+ <div class="shk-tooltip-trigger inline-flex">
152
+ <ng-content></ng-content>
153
+ </div>
154
+ `,
155
+ }]
156
+ }], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], onMouseEnter: [{
157
+ type: HostListener,
158
+ args: ['mouseenter']
159
+ }], onMouseLeave: [{
160
+ type: HostListener,
161
+ args: ['mouseleave']
162
+ }] } });
163
+
164
+ /**
165
+ * Generated bundle index. Do not edit.
166
+ */
167
+
168
+ export { TooltipComponent };
169
+ //# sourceMappingURL=shirkasoft-ui-components-tooltip.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shirkasoft-ui-components-tooltip.mjs","sources":["../../../projects/ui-components/tooltip/tooltip.component.ts","../../../projects/ui-components/tooltip/shirkasoft-ui-components-tooltip.ts"],"sourcesContent":["import {\n Component,\n input,\n ElementRef,\n inject,\n HostListener,\n OnDestroy,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nconst TOOLTIP_Z_INDEX = '2147483647';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/**\n * Tooltip rendered in `document.body` with `position: fixed`, so it always\n * floats above any container (tables with `overflow: hidden`, modals, scroll\n * wrappers, etc.) and never gets clipped or hidden behind its anchor element.\n */\n@Component({\n selector: 'shk-tooltip',\n standalone: true,\n template: `\n <div class=\"shk-tooltip-trigger inline-flex\">\n <ng-content></ng-content>\n </div>\n `,\n})\nexport class TooltipComponent implements OnDestroy {\n /** Content of the tooltip. */\n readonly text = input<string>('');\n /** Preferred placement relative to the trigger. */\n readonly position = input<'top' | 'bottom' | 'right'>('bottom');\n /** 'hover' shows on mouse enter; 'fixed' stays pinned to the content. */\n readonly mode = input<'hover' | 'fixed'>('hover');\n /** Distance (px) between the tooltip and the trigger. */\n readonly offset = input(8);\n\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly document = inject(DOCUMENT);\n\n /** The dynamically created tooltip element. */\n private tooltipEl: HTMLElement | null = null;\n /** Unsubscribe callbacks for the scroll/resize listeners. */\n private cleanup: (() => void) | null = null;\n\n /** Shows the tooltip over the host trigger on mouseenter. */\n @HostListener('mouseenter')\n onMouseEnter(): void {\n if (!this.text()) return;\n const trigger = this.host.nativeElement.querySelector(\n '.shk-tooltip-trigger',\n ) as HTMLElement | null;\n if (!trigger) return;\n this.show(trigger);\n }\n\n /** Hides the tooltip on mouseleave. */\n @HostListener('mouseleave')\n onMouseLeave(): void {\n this.hide();\n }\n\n /** Creates and positions the tooltip element on `document.body`. */\n private show(trigger: HTMLElement): void {\n this.removeTooltip();\n\n const el = this.document.createElement('span');\n el.className = 'shk-tooltip-dynamic';\n el.textContent = this.text();\n Object.assign(el.style, {\n position: 'fixed',\n zIndex: TOOLTIP_Z_INDEX,\n backgroundColor: 'var(--shk-tooltip-bg, #27272a)',\n color: 'var(--shk-tooltip-text, #fff)',\n padding: '4px 8px',\n borderRadius: '6px',\n fontSize: '12px',\n lineHeight: '1.4',\n whiteSpace: 'normal',\n maxWidth: 'min(80vw, 22rem)',\n boxShadow:\n '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',\n pointerEvents: 'none',\n opacity: '0',\n transition: 'opacity 0.15s ease',\n });\n\n this.document.body.appendChild(el);\n this.tooltipEl = el;\n\n const place = () => {\n const rect = trigger.getBoundingClientRect();\n const w = el.offsetWidth;\n const h = el.offsetHeight;\n const { left, top } = this.computePosition(rect, w, h);\n el.style.left = `${left}px`;\n el.style.top = `${top}px`;\n };\n\n place();\n requestAnimationFrame(() => {\n if (this.tooltipEl === el) {\n el.style.opacity = '1';\n }\n });\n\n const onScrollOrResize = () => place();\n window.addEventListener('scroll', onScrollOrResize, true);\n window.addEventListener('resize', onScrollOrResize);\n this.cleanup = () => {\n window.removeEventListener('scroll', onScrollOrResize, true);\n window.removeEventListener('resize', onScrollOrResize);\n };\n }\n\n /** Computes the tooltip position, clamped to the viewport. */\n private computePosition(\n rect: DOMRect,\n width: number,\n height: number,\n ): { left: number; top: number } {\n const off = this.offset();\n const viewportW = this.document.defaultView?.innerWidth ?? 0;\n const viewportH = this.document.defaultView?.innerHeight ?? 0;\n\n let x: number;\n let y: number;\n\n if (this.position() === 'right') {\n x = rect.right + off;\n y = rect.top + rect.height / 2 - height / 2;\n } else if (this.position() === 'bottom') {\n x = rect.left + rect.width / 2 - width / 2;\n y = rect.bottom + off;\n } else {\n x = rect.left + rect.width / 2 - width / 2;\n y = rect.top - off - height;\n }\n\n const margin = 4;\n const left = Math.max(\n margin,\n Math.min(x, Math.max(margin, viewportW - width - margin)),\n );\n const top = Math.max(\n margin,\n Math.min(y, Math.max(margin, viewportH - height - margin)),\n );\n return { left, top };\n }\n\n /** Fades the tooltip out and removes it from the DOM. */\n private hide(): void {\n if (!this.tooltipEl) return;\n const el = this.tooltipEl;\n el.style.opacity = '0';\n this.tooltipEl = null;\n setTimeout(() => {\n el.remove();\n }, 150);\n }\n\n /** Removes the tooltip and its listeners. */\n private removeTooltip(): void {\n this.cleanup?.();\n this.cleanup = null;\n this.tooltipEl?.remove();\n this.tooltipEl = null;\n }\n\n /** Cleans up the tooltip on component destroy. */\n ngOnDestroy(): void {\n this.removeTooltip();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAUA,MAAM,eAAe,GAAG,YAAY;AAEpC;;;;AAIG;AAEH;;;;AAIG;MAUU,gBAAgB,CAAA;AAT7B,IAAA,WAAA,GAAA;;AAWW,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;;AAExB,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAA6B,QAAQ,+EAAC;;AAEtD,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAoB,OAAO,2EAAC;;AAExC,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,CAAC,6EAAC;AAET,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EAAC;AACtC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;;QAGpC,IAAA,CAAA,SAAS,GAAuB,IAAI;;QAEpC,IAAA,CAAA,OAAO,GAAwB,IAAI;AAmI5C,IAAA;;IA/HC,YAAY,GAAA;AACV,QAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YAAE;AAClB,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CACnD,sBAAsB,CACD;AACvB,QAAA,IAAI,C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AAA,YAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EANjB;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;4FAEU,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAT5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE;;;;AAIT,EAAA,CAAA;AACF,iBAAA;;sBAoBE,YAAY;uBAAC,YAAY;;sBAWzB,YAAY;uBAAC,YAAY;;;AC9D5B;;AAEG;;;;"}
@@ -0,0 +1,69 @@
1
+ import { LucideX, LucideUpload, LucideTriangleAlert, LucideTrash2, LucideSearch, LucideRefreshCw, LucidePlus, LucidePanelRight, LucideMinimize2, LucideMenu, LucideMaximize2, LucideLogOut, LucideLoaderCircle, LucideLoader, LucideInfo, LucideInbox, LucideGlobe, LucideFunnel, LucideFileText, LucideFileSpreadsheet, LucideFile, LucideEyeOff, LucideEye, LucideDownload, LucideCirclePlus, LucideCircleQuestionMark, LucideChevronsRight, LucideChevronsLeft, LucideChevronRight, LucideChevronLeft, LucideChevronDown, LucideCalendarDays, LucideCheck, LucideArrowUpDown, LucideArrowUp, LucideArrowDown, LucideArrowLeft } from '@lucide/angular';
2
+
3
+ /**
4
+ * Shirkasoft UI Components.
5
+ * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
6
+ * Belongs to Shirkasoft.
7
+ */
8
+ /** Maps the icon names used across the library to their Lucide component. */
9
+ const ICONS = {
10
+ 'arrow-left': LucideArrowLeft,
11
+ 'arrow-down': LucideArrowDown,
12
+ 'arrow-up': LucideArrowUp,
13
+ 'arrow-up-down': LucideArrowUpDown,
14
+ check: LucideCheck,
15
+ 'calendar-days': LucideCalendarDays,
16
+ 'chevron-down': LucideChevronDown,
17
+ 'chevron-left': LucideChevronLeft,
18
+ 'chevron-right': LucideChevronRight,
19
+ 'chevrons-left': LucideChevronsLeft,
20
+ 'chevrons-right': LucideChevronsRight,
21
+ 'circle-help': LucideCircleQuestionMark,
22
+ 'circle-plus': LucideCirclePlus,
23
+ download: LucideDownload,
24
+ eye: LucideEye,
25
+ 'eye-off': LucideEyeOff,
26
+ file: LucideFile,
27
+ 'file-spreadsheet': LucideFileSpreadsheet,
28
+ 'file-text': LucideFileText,
29
+ filter: LucideFunnel,
30
+ globe: LucideGlobe,
31
+ inbox: LucideInbox,
32
+ info: LucideInfo,
33
+ loader: LucideLoader,
34
+ 'loader-circle': LucideLoaderCircle,
35
+ 'log-out': LucideLogOut,
36
+ 'maximize-2': LucideMaximize2,
37
+ menu: LucideMenu,
38
+ 'minimize-2': LucideMinimize2,
39
+ 'panel-right': LucidePanelRight,
40
+ plus: LucidePlus,
41
+ refresh: LucideRefreshCw,
42
+ search: LucideSearch,
43
+ 'trash-2': LucideTrash2,
44
+ 'triangle-alert': LucideTriangleAlert,
45
+ upload: LucideUpload,
46
+ x: LucideX,
47
+ };
48
+ /**
49
+ * Resolves the icon passed to a component into a lucide component.
50
+ * Accepts a registered string name, an existing lucide component or a LucideIconData object.
51
+ */
52
+ function getIcon(icon, fallback = LucideCircleQuestionMark) {
53
+ if (!icon)
54
+ return null;
55
+ if (typeof icon === 'string') {
56
+ return ICONS[icon] ?? fallback;
57
+ }
58
+ if (typeof icon === 'function') {
59
+ return icon;
60
+ }
61
+ return fallback;
62
+ }
63
+
64
+ /**
65
+ * Generated bundle index. Do not edit.
66
+ */
67
+
68
+ export { ICONS, getIcon };
69
+ //# sourceMappingURL=shirkasoft-ui-components-utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shirkasoft-ui-components-utils.mjs","sources":["../../../projects/ui-components/utils/icons.ts","../../../projects/ui-components/utils/shirkasoft-ui-components-utils.ts"],"sourcesContent":["/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\nimport {\n LucideArrowDown,\n LucideArrowLeft,\n LucideArrowUp,\n LucideArrowUpDown,\n LucideCalendarDays,\n LucideCheck,\n LucideChevronDown,\n LucideChevronLeft,\n LucideChevronRight,\n LucideChevronsLeft,\n LucideChevronsRight,\n LucideCircleQuestionMark,\n LucideCirclePlus,\nLucideDownload,\n LucideEye,\n LucideEyeOff,\n LucideFile,\n LucideFileSpreadsheet,\n LucideFileText,\n LucideFunnel,\n LucideGlobe,\n LucideInbox,\n LucideInfo,\n LucideLoader,\n LucideLoaderCircle,\n LucideLogOut,\n LucideMaximize2,\n LucideMenu,\n LucideMinimize2,\n LucidePanelRight,\n LucidePlus,\n LucideRefreshCw,\n LucideSearch,\n LucideTrash2,\n LucideTriangleAlert,\n LucideUpload,\n LucideX,\n} from '@lucide/angular';\n\n/** Maps the icon names used across the library to their Lucide component. */\nexport const ICONS: Record<string, any> = {\n 'arrow-left': LucideArrowLeft,\n 'arrow-down': LucideArrowDown,\n 'arrow-up': LucideArrowUp,\n 'arrow-up-down': LucideArrowUpDown,\n check: LucideCheck,\n 'calendar-days': LucideCalendarDays,\n 'chevron-down': LucideChevronDown,\n 'chevron-left': LucideChevronLeft,\n 'chevron-right': LucideChevronRight,\n 'chevrons-left': LucideChevronsLeft,\n 'chevrons-right': LucideChevronsRight,\n 'circle-help': LucideCircleQuestionMark,\n 'circle-plus': LucideCirclePlus,\n download: LucideDownload,\n eye: LucideEye,\n 'eye-off': LucideEyeOff,\n file: LucideFile,\n 'file-spreadsheet': LucideFileSpreadsheet,\n 'file-text': LucideFileText,\n filter: LucideFunnel,\n globe: LucideGlobe,\n inbox: LucideInbox,\n info: LucideInfo,\n loader: LucideLoader,\n 'loader-circle': LucideLoaderCircle,\n 'log-out': LucideLogOut,\n 'maximize-2': LucideMaximize2,\n menu: LucideMenu,\n 'minimize-2': LucideMinimize2,\n 'panel-right': LucidePanelRight,\n plus: LucidePlus,\n refresh: LucideRefreshCw,\n search: LucideSearch,\n 'trash-2': LucideTrash2,\n 'triangle-alert': LucideTriangleAlert,\n upload: LucideUpload,\n x: LucideX,\n};\n\n/**\n * Resolves the icon passed to a component into a lucide component.\n * Accepts a registered string name, an existing lucide component or a LucideIconData object.\n */\nexport function getIcon(icon?: any, fallback: any = LucideCircleQuestionMark): any {\n if (!icon) return null;\n if (typeof icon === 'string') {\n return ICONS[icon] ?? fallback;\n }\n if (typeof icon === 'function') {\n return icon;\n }\n return fallback;\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;AAIG;AAyCH;AACO,MAAM,KAAK,GAAwB;AACxC,IAAA,YAAY,EAAE,eAAe;AAC7B,IAAA,YAAY,EAAE,eAAe;AAC7B,IAAA,UAAU,EAAE,aAAa;AACzB,IAAA,eAAe,EAAE,iBAAiB;AAClC,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,eAAe,EAAE,kBAAkB;AACnC,IAAA,cAAc,EAAE,iBAAiB;AACjC,IAAA,cAAc,EAAE,iBAAiB;AACjC,IAAA,eAAe,EAAE,kBAAkB;AACnC,IAAA,eAAe,EAAE,kBAAkB;AACnC,IAAA,gBAAgB,EAAE,mBAAmB;AACrC,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,aAAa,EAAE,gBAAgB;AAC/B,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,GAAG,EAAE,SAAS;AACd,IAAA,SAAS,EAAE,YAAY;AACvB,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,kBAAkB,EAAE,qBAAqB;AACzC,IAAA,WAAW,EAAE,cAAc;AAC3B,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,eAAe,EAAE,kBAAkB;AACnC,IAAA,SAAS,EAAE,YAAY;AACvB,IAAA,YAAY,EAAE,eAAe;AAC7B,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,YAAY,EAAE,eAAe;AAC7B,IAAA,aAAa,EAAE,gBAAgB;AAC/B,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,SAAS,EAAE,YAAY;AACvB,IAAA,gBAAgB,EAAE,mBAAmB;AACrC,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,CAAC,EAAE,OAAO;;AAGZ;;;AAGG;SACa,OAAO,CAAC,IAAU,EAAE,WAAgB,wBAAwB,EAAA;AAC1E,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,IAAI;AACtB,IAAA,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAC5B,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,QAAQ;IAChC;AACA,IAAA,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE;AAC9B,QAAA,OAAO,IAAI;IACb;AACA,IAAA,OAAO,QAAQ;AACjB;;ACnGA;;AAEG;;;;"}
@@ -0,0 +1,167 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, Directive, model, output, contentChildren, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import { LucideChevronRight, LucideDynamicIcon } from '@lucide/angular';
6
+ import { getIcon } from 'shirkasoft-ui-components/utils';
7
+
8
+ /** Declares a step's content template: <ng-template shkWizardStepContent="stepId">…</ng-template>. */
9
+ class ShkWizardStepContent {
10
+ constructor(templateRef) {
11
+ this.templateRef = templateRef;
12
+ this.stepId = input.required({ ...(ngDevMode ? { debugName: "stepId" } : /* istanbul ignore next */ {}), alias: 'shkWizardStepContent' });
13
+ }
14
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ShkWizardStepContent, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
15
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.18", type: ShkWizardStepContent, isStandalone: true, selector: "ng-template[shkWizardStepContent]", inputs: { stepId: { classPropertyName: "stepId", publicName: "shkWizardStepContent", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
16
+ }
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ShkWizardStepContent, decorators: [{
18
+ type: Directive,
19
+ args: [{
20
+ selector: 'ng-template[shkWizardStepContent]',
21
+ standalone: true,
22
+ }]
23
+ }], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { stepId: [{ type: i0.Input, args: [{ isSignal: true, alias: "shkWizardStepContent", required: true }] }] } });
24
+ let wizardCounter = 0;
25
+ /**
26
+ * Shirkasoft UI Components.
27
+ * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
28
+ * Belongs to Shirkasoft.
29
+ */
30
+ /**
31
+ * Multi-step wizard with a progress stepper, header, footer actions and
32
+ * content templates declared with `shkWizardStepContent`.
33
+ */
34
+ class WizardComponent {
35
+ constructor() {
36
+ this.getIcon = (name) => getIcon(name, LucideChevronRight);
37
+ /** Steps definition shown in the stepper and used to resolve step content. */
38
+ this.steps = input([], ...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
39
+ /** Active step id. Two-way bindable with [(currentStep)]. Null resolves to the first step. */
40
+ this.currentStep = model(null, ...(ngDevMode ? [{ debugName: "currentStep" }] : /* istanbul ignore next */ []));
41
+ // Header
42
+ /** Shows the sticky header (back button + title). */
43
+ this.showHeader = input(true, ...(ngDevMode ? [{ debugName: "showHeader" }] : /* istanbul ignore next */ []));
44
+ this.headerTitle = input('', ...(ngDevMode ? [{ debugName: "headerTitle" }] : /* istanbul ignore next */ []));
45
+ this.headerSubtitle = input('', ...(ngDevMode ? [{ debugName: "headerSubtitle" }] : /* istanbul ignore next */ []));
46
+ /** Shows the round back button in the header. */
47
+ this.showBackButton = input(true, ...(ngDevMode ? [{ debugName: "showBackButton" }] : /* istanbul ignore next */ []));
48
+ this.backTooltip = input('Atrás', ...(ngDevMode ? [{ debugName: "backTooltip" }] : /* istanbul ignore next */ []));
49
+ /** Optional lucide icon shown before the title. */
50
+ this.headerIcon = input('', ...(ngDevMode ? [{ debugName: "headerIcon" }] : /* istanbul ignore next */ []));
51
+ // Stepper
52
+ /** Shows the progress stepper (hide it for edit mode, like wac-app does). */
53
+ this.showStepper = input(true, ...(ngDevMode ? [{ debugName: "showStepper" }] : /* istanbul ignore next */ []));
54
+ /** Lets the user click on previous steps to jump back. */
55
+ this.stepperClickable = input(false, ...(ngDevMode ? [{ debugName: "stepperClickable" }] : /* istanbul ignore next */ []));
56
+ // Footer
57
+ this.showFooter = input(true, ...(ngDevMode ? [{ debugName: "showFooter" }] : /* istanbul ignore next */ []));
58
+ /** Shows a "Paso X / N" counter on the left of the footer. */
59
+ this.showStepCounter = input(false, ...(ngDevMode ? [{ debugName: "showStepCounter" }] : /* istanbul ignore next */ []));
60
+ this.stepCounterPrefix = input('Paso', ...(ngDevMode ? [{ debugName: "stepCounterPrefix" }] : /* istanbul ignore next */ []));
61
+ /** Shows the Cancel button on the first step (instead of a back button). */
62
+ this.showCancel = input(true, ...(ngDevMode ? [{ debugName: "showCancel" }] : /* istanbul ignore next */ []));
63
+ /** Auto-advances to the next step on the primary button when it is not the last step. */
64
+ this.advanceOnNext = input(true, ...(ngDevMode ? [{ debugName: "advanceOnNext" }] : /* istanbul ignore next */ []));
65
+ this.prevLabel = input('Atrás', ...(ngDevMode ? [{ debugName: "prevLabel" }] : /* istanbul ignore next */ []));
66
+ this.prevIcon = input('chevron-left', ...(ngDevMode ? [{ debugName: "prevIcon" }] : /* istanbul ignore next */ []));
67
+ this.cancelLabel = input('Cancelar', ...(ngDevMode ? [{ debugName: "cancelLabel" }] : /* istanbul ignore next */ []));
68
+ this.cancelIcon = input('x', ...(ngDevMode ? [{ debugName: "cancelIcon" }] : /* istanbul ignore next */ []));
69
+ this.nextLabel = input('Continuar', ...(ngDevMode ? [{ debugName: "nextLabel" }] : /* istanbul ignore next */ []));
70
+ this.nextIcon = input('chevron-right', ...(ngDevMode ? [{ debugName: "nextIcon" }] : /* istanbul ignore next */ []));
71
+ this.finishLabel = input('Finalizar', ...(ngDevMode ? [{ debugName: "finishLabel" }] : /* istanbul ignore next */ []));
72
+ this.finishIcon = input('check', ...(ngDevMode ? [{ debugName: "finishIcon" }] : /* istanbul ignore next */ []));
73
+ /** Overrides the primary footer button label for every step. */
74
+ this.primaryLabel = input(null, ...(ngDevMode ? [{ debugName: "primaryLabel" }] : /* istanbul ignore next */ []));
75
+ /** Overrides the primary footer button icon for every step. */
76
+ this.primaryIcon = input(null, ...(ngDevMode ? [{ debugName: "primaryIcon" }] : /* istanbul ignore next */ []));
77
+ /** Shows a loading spinner on the primary button and disables it. */
78
+ this.primaryLoading = input(false, ...(ngDevMode ? [{ debugName: "primaryLoading" }] : /* istanbul ignore next */ []));
79
+ /** Disables the primary footer button (e.g. while the step form is invalid). */
80
+ this.primaryDisabled = input(false, ...(ngDevMode ? [{ debugName: "primaryDisabled" }] : /* istanbul ignore next */ []));
81
+ // Outputs
82
+ this.back = output();
83
+ this.cancel = output();
84
+ this.prev = output();
85
+ this.next = output();
86
+ this.finish = output();
87
+ this.stepChange = output();
88
+ this.stepContents = contentChildren(ShkWizardStepContent, ...(ngDevMode ? [{ debugName: "stepContents" }] : /* istanbul ignore next */ []));
89
+ this.currentIndex = computed(() => {
90
+ const id = this.currentStep();
91
+ if (id == null)
92
+ return this.steps().length > 0 ? 0 : -1;
93
+ return this.steps().findIndex((s) => s.id === id);
94
+ }, ...(ngDevMode ? [{ debugName: "currentIndex" }] : /* istanbul ignore next */ []));
95
+ this.currentStepObj = computed(() => this.steps()[this.currentIndex()] ?? null, ...(ngDevMode ? [{ debugName: "currentStepObj" }] : /* istanbul ignore next */ []));
96
+ this.isFirstStep = computed(() => this.currentIndex() === 0, ...(ngDevMode ? [{ debugName: "isFirstStep" }] : /* istanbul ignore next */ []));
97
+ this.isLastStep = computed(() => this.currentIndex() === this.steps().length - 1, ...(ngDevMode ? [{ debugName: "isLastStep" }] : /* istanbul ignore next */ []));
98
+ this.primaryActionLabel = computed(() => {
99
+ if (this.primaryLabel())
100
+ return this.primaryLabel();
101
+ const step = this.currentStepObj();
102
+ if (step?.primaryLabel)
103
+ return step.primaryLabel;
104
+ return this.isLastStep() ? this.finishLabel() : this.nextLabel();
105
+ }, ...(ngDevMode ? [{ debugName: "primaryActionLabel" }] : /* istanbul ignore next */ []));
106
+ this.primaryActionIcon = computed(() => {
107
+ if (this.primaryIcon())
108
+ return this.primaryIcon();
109
+ const step = this.currentStepObj();
110
+ if (step?.primaryIcon)
111
+ return step.primaryIcon;
112
+ return this.isLastStep() ? this.finishIcon() : this.nextIcon();
113
+ }, ...(ngDevMode ? [{ debugName: "primaryActionIcon" }] : /* istanbul ignore next */ []));
114
+ }
115
+ getStepTemplate(id) {
116
+ return this.stepContents().find((c) => c.stepId() === id)?.templateRef;
117
+ }
118
+ goTo(stepId) {
119
+ const idx = this.steps().findIndex((s) => s.id === stepId);
120
+ if (idx < 0)
121
+ return;
122
+ if (this.currentStep() === stepId)
123
+ return;
124
+ this.currentStep.set(stepId);
125
+ this.stepChange.emit({ step: this.steps()[idx], index: idx });
126
+ }
127
+ onPrev() {
128
+ const idx = this.currentIndex();
129
+ if (idx <= 0)
130
+ return;
131
+ this.prev.emit();
132
+ this.goTo(this.steps()[idx - 1].id);
133
+ }
134
+ onNext() {
135
+ const idx = this.currentIndex();
136
+ const next = this.steps()[idx + 1];
137
+ if (!next)
138
+ return;
139
+ this.next.emit();
140
+ if (this.advanceOnNext()) {
141
+ this.goTo(next.id);
142
+ }
143
+ }
144
+ onPrimary() {
145
+ if (this.primaryLoading() || this.primaryDisabled())
146
+ return;
147
+ if (this.isLastStep()) {
148
+ this.finish.emit();
149
+ }
150
+ else {
151
+ this.onNext();
152
+ }
153
+ }
154
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: WizardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
155
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: WizardComponent, isStandalone: true, selector: "shk-wizard", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, currentStep: { classPropertyName: "currentStep", publicName: "currentStep", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, headerTitle: { classPropertyName: "headerTitle", publicName: "headerTitle", isSignal: true, isRequired: false, transformFunction: null }, headerSubtitle: { classPropertyName: "headerSubtitle", publicName: "headerSubtitle", isSignal: true, isRequired: false, transformFunction: null }, showBackButton: { classPropertyName: "showBackButton", publicName: "showBackButton", isSignal: true, isRequired: false, transformFunction: null }, backTooltip: { classPropertyName: "backTooltip", publicName: "backTooltip", isSignal: true, isRequired: false, transformFunction: null }, headerIcon: { classPropertyName: "headerIcon", publicName: "headerIcon", isSignal: true, isRequired: false, transformFunction: null }, showStepper: { classPropertyName: "showStepper", publicName: "showStepper", isSignal: true, isRequired: false, transformFunction: null }, stepperClickable: { classPropertyName: "stepperClickable", publicName: "stepperClickable", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, showStepCounter: { classPropertyName: "showStepCounter", publicName: "showStepCounter", isSignal: true, isRequired: false, transformFunction: null }, stepCounterPrefix: { classPropertyName: "stepCounterPrefix", publicName: "stepCounterPrefix", isSignal: true, isRequired: false, transformFunction: null }, showCancel: { classPropertyName: "showCancel", publicName: "showCancel", isSignal: true, isRequired: false, transformFunction: null }, advanceOnNext: { classPropertyName: "advanceOnNext", publicName: "advanceOnNext", isSignal: true, isRequired: false, transformFunction: null }, prevLabel: { classPropertyName: "prevLabel", publicName: "prevLabel", isSignal: true, isRequired: false, transformFunction: null }, prevIcon: { classPropertyName: "prevIcon", publicName: "prevIcon", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelIcon: { classPropertyName: "cancelIcon", publicName: "cancelIcon", isSignal: true, isRequired: false, transformFunction: null }, nextLabel: { classPropertyName: "nextLabel", publicName: "nextLabel", isSignal: true, isRequired: false, transformFunction: null }, nextIcon: { classPropertyName: "nextIcon", publicName: "nextIcon", isSignal: true, isRequired: false, transformFunction: null }, finishLabel: { classPropertyName: "finishLabel", publicName: "finishLabel", isSignal: true, isRequired: false, transformFunction: null }, finishIcon: { classPropertyName: "finishIcon", publicName: "finishIcon", isSignal: true, isRequired: false, transformFunction: null }, primaryLabel: { classPropertyName: "primaryLabel", publicName: "primaryLabel", isSignal: true, isRequired: false, transformFunction: null }, primaryIcon: { classPropertyName: "primaryIcon", publicName: "primaryIcon", isSignal: true, isRequired: false, transformFunction: null }, primaryLoading: { classPropertyName: "primaryLoading", publicName: "primaryLoading", isSignal: true, isRequired: false, transformFunction: null }, primaryDisabled: { classPropertyName: "primaryDisabled", publicName: "primaryDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentStep: "currentStepChange", back: "back", cancel: "cancel", prev: "prev", next: "next", finish: "finish", stepChange: "stepChange" }, queries: [{ propertyName: "stepContents", predicate: ShkWizardStepContent, isSignal: true }], ngImport: i0, template: "<div class=\"min-h-full bg-transparent\">\n\n <!-- ============ Sticky Header + Stepper ============ -->\n @if (showHeader()) {\n <div\n class=\"sticky top-0 z-20 bg-white dark:[background-color:var(--shk-surface-50)] border-b _shk-border dark:[border-color:var(--shk-surface-200)] shadow-sm\"\n >\n <div class=\"w-full px-4 sm:px-6 lg:px-8 py-4\">\n <div class=\"flex items-center gap-4 mb-4\">\n @if (showBackButton()) {\n <button\n type=\"button\"\n (click)=\"back.emit()\"\n [attr.aria-label]=\"backTooltip()\"\n [attr.title]=\"backTooltip()\"\n class=\"shk-wizard-icon-btn shrink-0\"\n >\n <svg [lucideIcon]=\"getIcon('arrow-left')\" class=\"w-4 h-4\"></svg>\n </button>\n }\n <div class=\"flex-1 min-w-0 flex items-center gap-2.5\">\n @if (headerIcon()) {\n <span class=\"w-9 h-9 rounded-lg _shk-bg-primary-soft _shk-text-primary flex items-center justify-center shrink-0\">\n <svg [lucideIcon]=\"getIcon(headerIcon())\" class=\"w-4 h-4\"></svg>\n </span>\n }\n <div class=\"min-w-0\">\n <h1 class=\"text-xl font-bold _shk-text-surface-800 dark:[color:var(--shk-surface-800)] truncate\">\n {{ headerTitle() }}\n </h1>\n @if (headerSubtitle()) {\n <p class=\"text-xs _shk-text-surface-500 dark:[color:var(--shk-surface-500)] mt-0.5 truncate\">\n {{ headerSubtitle() }}\n </p>\n }\n </div>\n </div>\n <ng-content select=\"[shkWizardHeaderActions]\"></ng-content>\n </div>\n\n <!-- Stepper -->\n @if (showStepper() && steps().length > 1) {\n <div class=\"flex items-center gap-2 w-full max-w-3xl mx-auto\">\n @for (step of steps(); track step.id; let i = $index, last = $last) {\n <div class=\"flex items-center gap-3 shrink-0\">\n <button\n type=\"button\"\n (click)=\"goTo(step.id)\"\n [disabled]=\"!stepperClickable() || currentIndex() < i\"\n [attr.aria-label]=\"step.label\"\n class=\"shk-wizard-stepper-dot\"\n [class._shk-bg-primary]=\"currentIndex() > i || currentIndex() === i\"\n [class.text-white]=\"currentIndex() > i || currentIndex() === i\"\n [class._shk-bg-surface-200]=\"currentIndex() < i\"\n [class._shk-text-surface-500]=\"currentIndex() < i\"\n [class.cursor-pointer]=\"stepperClickable() && currentIndex() >= i\"\n [class.cursor-default]=\"!stepperClickable() || currentIndex() < i\"\n >\n @if (currentIndex() > i) {\n <svg [lucideIcon]=\"getIcon(step.icon || 'check')\" class=\"w-4 h-4\"></svg>\n } @else if (step.icon) {\n <svg [lucideIcon]=\"getIcon(step.icon)\" class=\"w-4 h-4\"></svg>\n } @else {\n {{ i + 1 }}\n }\n </button>\n <span\n class=\"text-sm font-semibold transition-colors whitespace-nowrap hidden sm:inline\"\n [class._shk-text-surface-800]=\"currentIndex() === i\"\n [class._shk-text-surface-500]=\"currentIndex() !== i\"\n [class.dark:[color:var(--shk-surface-800)]]=\"currentIndex() === i\"\n [class.dark:[color:var(--shk-surface-500)]]=\"currentIndex() !== i\"\n >\n {{ step.label }}\n </span>\n </div>\n\n @if (!last) {\n <div class=\"flex-1 h-0.5 _shk-bg-surface-200 dark:[background-color:var(--shk-surface-200)] relative overflow-hidden rounded-full\">\n <div\n class=\"absolute inset-y-0 left-0 _shk-bg-primary transition-all duration-300\"\n [class.w-full]=\"currentIndex() > i\"\n [class.w-0]=\"currentIndex() <= i\"\n ></div>\n </div>\n }\n }\n </div>\n }\n </div>\n </div>\n }\n\n <!-- ============ Active step content ============ -->\n <div class=\"w-full px-4 sm:px-6 lg:px-8 py-6 pb-28\">\n @if (currentIndex() >= 0) {\n @if (getStepTemplate(steps()[currentIndex()].id); as tpl) {\n <div class=\"shk-wizard-fade\" [style.view-transition-name]=\"'shk-wizard-step'\">\n <ng-container\n *ngTemplateOutlet=\"tpl; context: { step: currentStepObj(), index: currentIndex() }\"\n ></ng-container>\n </div>\n } @else {\n <p class=\"text-sm _shk-text-surface-400 dark:[color:var(--shk-surface-400)]\">\n No hay contenido definido para el paso \u00AB{{ steps()[currentIndex()].label }}\u00BB.\n </p>\n }\n }\n </div>\n\n <!-- ============ Sticky Footer ============ -->\n @if (showFooter() && steps().length > 0) {\n <div\n class=\"sticky bottom-0 z-20 bg-white dark:[background-color:var(--shk-surface-50)] border-t _shk-border dark:[border-color:var(--shk-surface-200)] shadow-[0_-4px_12px_rgba(0,0,0,0.04)] mt-8\"\n >\n <div class=\"w-full px-4 sm:px-6 lg:px-8 py-4 flex items-center justify-end gap-3\">\n @if (showStepCounter()) {\n <span class=\"text-sm _shk-text-surface-500 dark:[color:var(--shk-surface-500)] mr-auto\">\n {{ stepCounterPrefix() }} {{ currentIndex() + 1 }} / {{ steps().length }}\n </span>\n }\n\n @if (isFirstStep()) {\n @if (showCancel()) {\n <button type=\"button\" (click)=\"cancel.emit()\" class=\"shk-wizard-btn-secondary\">\n @if (cancelIcon()) {\n <svg [lucideIcon]=\"getIcon(cancelIcon())\" class=\"w-4 h-4\"></svg>\n }\n {{ cancelLabel() }}\n </button>\n }\n } @else {\n <button type=\"button\" (click)=\"onPrev()\" class=\"shk-wizard-btn-secondary\">\n <svg [lucideIcon]=\"getIcon(prevIcon())\" class=\"w-4 h-4\"></svg>\n {{ prevLabel() }}\n </button>\n }\n\n <button\n type=\"button\"\n (click)=\"onPrimary()\"\n [disabled]=\"primaryDisabled() || primaryLoading()\"\n class=\"shk-wizard-btn-primary\"\n >\n @if (primaryLoading()) {\n <svg [lucideIcon]=\"getIcon('loader-circle')\" class=\"w-4 h-4 shk-wizard-spin\"></svg>\n } @else {\n @if (primaryActionIcon()) {\n <svg [lucideIcon]=\"getIcon(primaryActionIcon())\" class=\"w-4 h-4\"></svg>\n }\n }\n {{ primaryActionLabel() }}\n </button>\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:block}.shk-wizard-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:9999px;color:var(--shk-surface-600);transition:background-color .15s ease-in-out,color .15s ease-in-out}.shk-wizard-icon-btn:hover:not(:disabled){background-color:var(--shk-surface-100);color:var(--shk-surface-800)}.shk-wizard-icon-btn:disabled{cursor:default}.shk-wizard-icon-btn svg{width:1rem!important;height:1rem!important}.shk-wizard-stepper-dot{display:flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:9999px;font-size:.875rem;font-weight:700;flex-shrink:0;transition:background-color .15s ease-in-out,color .15s ease-in-out}.shk-wizard-stepper-dot svg{width:1rem!important;height:1rem!important}.shk-wizard-btn-secondary{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:.5rem;font-size:.875rem;font-weight:500;color:var(--shk-surface-700);background-color:transparent;border:1px solid var(--shk-surface-200);transition:background-color .15s ease-in-out,border-color .15s ease-in-out,color .15s ease-in-out}.shk-wizard-btn-secondary:hover:not(:disabled){background-color:var(--shk-surface-100);border-color:var(--shk-surface-300);color:var(--shk-surface-900)}.shk-wizard-btn-secondary:disabled{opacity:.5;cursor:not-allowed}.shk-wizard-btn-secondary svg{width:1rem!important;height:1rem!important}.shk-wizard-btn-primary{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:.5rem;font-size:.875rem;font-weight:500;color:#fff;background-color:var(--shk-primary-600);box-shadow:0 6px 20px -6px color-mix(in srgb,var(--shk-primary-600) 55%,transparent);transition:background-color .15s ease-in-out,opacity .15s ease-in-out}.shk-wizard-btn-primary:hover:not(:disabled){background-color:var(--shk-primary-700)}.shk-wizard-btn-primary:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}.shk-wizard-btn-primary svg{width:1rem!important;height:1rem!important}.shk-wizard-spin{animation:shk-wizard-spin .8s linear infinite}@keyframes shk-wizard-spin{to{transform:rotate(360deg)}}.shk-wizard-fade{animation:shk-wizard-fade .25s ease-out}@keyframes shk-wizard-fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
156
+ }
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: WizardComponent, decorators: [{
158
+ type: Component,
159
+ args: [{ selector: 'shk-wizard', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, LucideDynamicIcon], template: "<div class=\"min-h-full bg-transparent\">\n\n <!-- ============ Sticky Header + Stepper ============ -->\n @if (showHeader()) {\n <div\n class=\"sticky top-0 z-20 bg-white dark:[background-color:var(--shk-surface-50)] border-b _shk-border dark:[border-color:var(--shk-surface-200)] shadow-sm\"\n >\n <div class=\"w-full px-4 sm:px-6 lg:px-8 py-4\">\n <div class=\"flex items-center gap-4 mb-4\">\n @if (showBackButton()) {\n <button\n type=\"button\"\n (click)=\"back.emit()\"\n [attr.aria-label]=\"backTooltip()\"\n [attr.title]=\"backTooltip()\"\n class=\"shk-wizard-icon-btn shrink-0\"\n >\n <svg [lucideIcon]=\"getIcon('arrow-left')\" class=\"w-4 h-4\"></svg>\n </button>\n }\n <div class=\"flex-1 min-w-0 flex items-center gap-2.5\">\n @if (headerIcon()) {\n <span class=\"w-9 h-9 rounded-lg _shk-bg-primary-soft _shk-text-primary flex items-center justify-center shrink-0\">\n <svg [lucideIcon]=\"getIcon(headerIcon())\" class=\"w-4 h-4\"></svg>\n </span>\n }\n <div class=\"min-w-0\">\n <h1 class=\"text-xl font-bold _shk-text-surface-800 dark:[color:var(--shk-surface-800)] truncate\">\n {{ headerTitle() }}\n </h1>\n @if (headerSubtitle()) {\n <p class=\"text-xs _shk-text-surface-500 dark:[color:var(--shk-surface-500)] mt-0.5 truncate\">\n {{ headerSubtitle() }}\n </p>\n }\n </div>\n </div>\n <ng-content select=\"[shkWizardHeaderActions]\"></ng-content>\n </div>\n\n <!-- Stepper -->\n @if (showStepper() && steps().length > 1) {\n <div class=\"flex items-center gap-2 w-full max-w-3xl mx-auto\">\n @for (step of steps(); track step.id; let i = $index, last = $last) {\n <div class=\"flex items-center gap-3 shrink-0\">\n <button\n type=\"button\"\n (click)=\"goTo(step.id)\"\n [disabled]=\"!stepperClickable() || currentIndex() < i\"\n [attr.aria-label]=\"step.label\"\n class=\"shk-wizard-stepper-dot\"\n [class._shk-bg-primary]=\"currentIndex() > i || currentIndex() === i\"\n [class.text-white]=\"currentIndex() > i || currentIndex() === i\"\n [class._shk-bg-surface-200]=\"currentIndex() < i\"\n [class._shk-text-surface-500]=\"currentIndex() < i\"\n [class.cursor-pointer]=\"stepperClickable() && currentIndex() >= i\"\n [class.cursor-default]=\"!stepperClickable() || currentIndex() < i\"\n >\n @if (currentIndex() > i) {\n <svg [lucideIcon]=\"getIcon(step.icon || 'check')\" class=\"w-4 h-4\"></svg>\n } @else if (step.icon) {\n <svg [lucideIcon]=\"getIcon(step.icon)\" class=\"w-4 h-4\"></svg>\n } @else {\n {{ i + 1 }}\n }\n </button>\n <span\n class=\"text-sm font-semibold transition-colors whitespace-nowrap hidden sm:inline\"\n [class._shk-text-surface-800]=\"currentIndex() === i\"\n [class._shk-text-surface-500]=\"currentIndex() !== i\"\n [class.dark:[color:var(--shk-surface-800)]]=\"currentIndex() === i\"\n [class.dark:[color:var(--shk-surface-500)]]=\"currentIndex() !== i\"\n >\n {{ step.label }}\n </span>\n </div>\n\n @if (!last) {\n <div class=\"flex-1 h-0.5 _shk-bg-surface-200 dark:[background-color:var(--shk-surface-200)] relative overflow-hidden rounded-full\">\n <div\n class=\"absolute inset-y-0 left-0 _shk-bg-primary transition-all duration-300\"\n [class.w-full]=\"currentIndex() > i\"\n [class.w-0]=\"currentIndex() <= i\"\n ></div>\n </div>\n }\n }\n </div>\n }\n </div>\n </div>\n }\n\n <!-- ============ Active step content ============ -->\n <div class=\"w-full px-4 sm:px-6 lg:px-8 py-6 pb-28\">\n @if (currentIndex() >= 0) {\n @if (getStepTemplate(steps()[currentIndex()].id); as tpl) {\n <div class=\"shk-wizard-fade\" [style.view-transition-name]=\"'shk-wizard-step'\">\n <ng-container\n *ngTemplateOutlet=\"tpl; context: { step: currentStepObj(), index: currentIndex() }\"\n ></ng-container>\n </div>\n } @else {\n <p class=\"text-sm _shk-text-surface-400 dark:[color:var(--shk-surface-400)]\">\n No hay contenido definido para el paso \u00AB{{ steps()[currentIndex()].label }}\u00BB.\n </p>\n }\n }\n </div>\n\n <!-- ============ Sticky Footer ============ -->\n @if (showFooter() && steps().length > 0) {\n <div\n class=\"sticky bottom-0 z-20 bg-white dark:[background-color:var(--shk-surface-50)] border-t _shk-border dark:[border-color:var(--shk-surface-200)] shadow-[0_-4px_12px_rgba(0,0,0,0.04)] mt-8\"\n >\n <div class=\"w-full px-4 sm:px-6 lg:px-8 py-4 flex items-center justify-end gap-3\">\n @if (showStepCounter()) {\n <span class=\"text-sm _shk-text-surface-500 dark:[color:var(--shk-surface-500)] mr-auto\">\n {{ stepCounterPrefix() }} {{ currentIndex() + 1 }} / {{ steps().length }}\n </span>\n }\n\n @if (isFirstStep()) {\n @if (showCancel()) {\n <button type=\"button\" (click)=\"cancel.emit()\" class=\"shk-wizard-btn-secondary\">\n @if (cancelIcon()) {\n <svg [lucideIcon]=\"getIcon(cancelIcon())\" class=\"w-4 h-4\"></svg>\n }\n {{ cancelLabel() }}\n </button>\n }\n } @else {\n <button type=\"button\" (click)=\"onPrev()\" class=\"shk-wizard-btn-secondary\">\n <svg [lucideIcon]=\"getIcon(prevIcon())\" class=\"w-4 h-4\"></svg>\n {{ prevLabel() }}\n </button>\n }\n\n <button\n type=\"button\"\n (click)=\"onPrimary()\"\n [disabled]=\"primaryDisabled() || primaryLoading()\"\n class=\"shk-wizard-btn-primary\"\n >\n @if (primaryLoading()) {\n <svg [lucideIcon]=\"getIcon('loader-circle')\" class=\"w-4 h-4 shk-wizard-spin\"></svg>\n } @else {\n @if (primaryActionIcon()) {\n <svg [lucideIcon]=\"getIcon(primaryActionIcon())\" class=\"w-4 h-4\"></svg>\n }\n }\n {{ primaryActionLabel() }}\n </button>\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:block}.shk-wizard-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:9999px;color:var(--shk-surface-600);transition:background-color .15s ease-in-out,color .15s ease-in-out}.shk-wizard-icon-btn:hover:not(:disabled){background-color:var(--shk-surface-100);color:var(--shk-surface-800)}.shk-wizard-icon-btn:disabled{cursor:default}.shk-wizard-icon-btn svg{width:1rem!important;height:1rem!important}.shk-wizard-stepper-dot{display:flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:9999px;font-size:.875rem;font-weight:700;flex-shrink:0;transition:background-color .15s ease-in-out,color .15s ease-in-out}.shk-wizard-stepper-dot svg{width:1rem!important;height:1rem!important}.shk-wizard-btn-secondary{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:.5rem;font-size:.875rem;font-weight:500;color:var(--shk-surface-700);background-color:transparent;border:1px solid var(--shk-surface-200);transition:background-color .15s ease-in-out,border-color .15s ease-in-out,color .15s ease-in-out}.shk-wizard-btn-secondary:hover:not(:disabled){background-color:var(--shk-surface-100);border-color:var(--shk-surface-300);color:var(--shk-surface-900)}.shk-wizard-btn-secondary:disabled{opacity:.5;cursor:not-allowed}.shk-wizard-btn-secondary svg{width:1rem!important;height:1rem!important}.shk-wizard-btn-primary{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:.5rem;font-size:.875rem;font-weight:500;color:#fff;background-color:var(--shk-primary-600);box-shadow:0 6px 20px -6px color-mix(in srgb,var(--shk-primary-600) 55%,transparent);transition:background-color .15s ease-in-out,opacity .15s ease-in-out}.shk-wizard-btn-primary:hover:not(:disabled){background-color:var(--shk-primary-700)}.shk-wizard-btn-primary:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}.shk-wizard-btn-primary svg{width:1rem!important;height:1rem!important}.shk-wizard-spin{animation:shk-wizard-spin .8s linear infinite}@keyframes shk-wizard-spin{to{transform:rotate(360deg)}}.shk-wizard-fade{animation:shk-wizard-fade .25s ease-out}@keyframes shk-wizard-fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}\n"] }]
160
+ }], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: false }] }], currentStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentStep", required: false }] }, { type: i0.Output, args: ["currentStepChange"] }], showHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHeader", required: false }] }], headerTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerTitle", required: false }] }], headerSubtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerSubtitle", required: false }] }], showBackButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackButton", required: false }] }], backTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "backTooltip", required: false }] }], headerIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerIcon", required: false }] }], showStepper: [{ type: i0.Input, args: [{ isSignal: true, alias: "showStepper", required: false }] }], stepperClickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepperClickable", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], showStepCounter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showStepCounter", required: false }] }], stepCounterPrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepCounterPrefix", required: false }] }], showCancel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCancel", required: false }] }], advanceOnNext: [{ type: i0.Input, args: [{ isSignal: true, alias: "advanceOnNext", required: false }] }], prevLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "prevLabel", required: false }] }], prevIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "prevIcon", required: false }] }], cancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelLabel", required: false }] }], cancelIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelIcon", required: false }] }], nextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextLabel", required: false }] }], nextIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextIcon", required: false }] }], finishLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "finishLabel", required: false }] }], finishIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "finishIcon", required: false }] }], primaryLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryLabel", required: false }] }], primaryIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryIcon", required: false }] }], primaryLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryLoading", required: false }] }], primaryDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryDisabled", required: false }] }], back: [{ type: i0.Output, args: ["back"] }], cancel: [{ type: i0.Output, args: ["cancel"] }], prev: [{ type: i0.Output, args: ["prev"] }], next: [{ type: i0.Output, args: ["next"] }], finish: [{ type: i0.Output, args: ["finish"] }], stepChange: [{ type: i0.Output, args: ["stepChange"] }], stepContents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ShkWizardStepContent), { isSignal: true }] }] } });
161
+
162
+ /**
163
+ * Generated bundle index. Do not edit.
164
+ */
165
+
166
+ export { ShkWizardStepContent, WizardComponent };
167
+ //# sourceMappingURL=shirkasoft-ui-components-wizard.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shirkasoft-ui-components-wizard.mjs","sources":["../../../projects/ui-components/wizard/wizard.component.ts","../../../projects/ui-components/wizard/wizard.component.html","../../../projects/ui-components/wizard/shirkasoft-ui-components-wizard.ts"],"sourcesContent":["import {\n Component,\n Directive,\n TemplateRef,\n ChangeDetectionStrategy,\n computed,\n contentChildren,\n input,\n model,\n output,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideDynamicIcon, LucideChevronRight } from '@lucide/angular';\nimport { getIcon as getIconFromCentral } from 'shirkasoft-ui-components/utils';\n\n/** A step of the wizard shown in the stepper. */\nexport interface WizardStep {\n id: string | number;\n label: string;\n /** Optional lucide icon rendered inside the step circle. */\n icon?: string;\n /** Overrides the primary footer button label for this step. */\n primaryLabel?: string;\n /** Overrides the primary footer button icon for this step. */\n primaryIcon?: string;\n}\n\n/** Declares a step's content template: <ng-template shkWizardStepContent=\"stepId\">…</ng-template>. */\n@Directive({\n selector: 'ng-template[shkWizardStepContent]',\n standalone: true,\n})\nexport class ShkWizardStepContent {\n stepId = input.required<string | number>({ alias: 'shkWizardStepContent' });\n constructor(public templateRef: TemplateRef<unknown>) {}\n}\n\nlet wizardCounter = 0;\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/**\n * Multi-step wizard with a progress stepper, header, footer actions and\n * content templates declared with `shkWizardStepContent`.\n */\n@Component({\n selector: 'shk-wizard',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, LucideDynamicIcon],\n templateUrl: './wizard.component.html',\n styles: [\n `\n :host {\n display: block;\n }\n .shk-wizard-icon-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n border-radius: 9999px;\n color: var(--shk-surface-600);\n transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;\n }\n .shk-wizard-icon-btn:hover:not(:disabled) {\n background-color: var(--shk-surface-100);\n color: var(--shk-surface-800);\n }\n .shk-wizard-icon-btn:disabled {\n cursor: default;\n }\n .shk-wizard-icon-btn svg {\n width: 1rem !important;\n height: 1rem !important;\n }\n .shk-wizard-stepper-dot {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2.25rem;\n height: 2.25rem;\n border-radius: 9999px;\n font-size: 0.875rem;\n font-weight: 700;\n flex-shrink: 0;\n transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;\n }\n .shk-wizard-stepper-dot svg {\n width: 1rem !important;\n height: 1rem !important;\n }\n .shk-wizard-btn-secondary {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n border-radius: 0.5rem;\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--shk-surface-700);\n background-color: transparent;\n border: 1px solid var(--shk-surface-200);\n transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,\n color 0.15s ease-in-out;\n }\n .shk-wizard-btn-secondary:hover:not(:disabled) {\n background-color: var(--shk-surface-100);\n border-color: var(--shk-surface-300);\n color: var(--shk-surface-900);\n }\n .shk-wizard-btn-secondary:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .shk-wizard-btn-secondary svg {\n width: 1rem !important;\n height: 1rem !important;\n }\n .shk-wizard-btn-primary {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n border-radius: 0.5rem;\n font-size: 0.875rem;\n font-weight: 500;\n color: #fff;\n background-color: var(--shk-primary-600);\n box-shadow: 0 6px 20px -6px color-mix(in srgb, var(--shk-primary-600) 55%, transparent);\n transition: background-color 0.15s ease-in-out, opacity 0.15s ease-in-out;\n }\n .shk-wizard-btn-primary:hover:not(:disabled) {\n background-color: var(--shk-primary-700);\n }\n .shk-wizard-btn-primary:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n box-shadow: none;\n }\n .shk-wizard-btn-primary svg {\n width: 1rem !important;\n height: 1rem !important;\n }\n .shk-wizard-spin {\n animation: shk-wizard-spin 0.8s linear infinite;\n }\n @keyframes shk-wizard-spin {\n to {\n transform: rotate(360deg);\n }\n }\n .shk-wizard-fade {\n animation: shk-wizard-fade 0.25s ease-out;\n }\n @keyframes shk-wizard-fade {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n `,\n ],\n})\nexport class WizardComponent {\n protected getIcon = (name: any) => getIconFromCentral(name, LucideChevronRight);\n\n /** Steps definition shown in the stepper and used to resolve step content. */\n steps = input<WizardStep[]>([]);\n /** Active step id. Two-way bindable with [(currentStep)]. Null resolves to the first step. */\n currentStep = model<string | number | null>(null);\n\n // Header\n /** Shows the sticky header (back button + title). */\n showHeader = input<boolean>(true);\n headerTitle = input<string>('');\n headerSubtitle = input<string>('');\n /** Shows the round back button in the header. */\n showBackButton = input<boolean>(true);\n backTooltip = input<string>('Atrás');\n /** Optional lucide icon shown before the title. */\n headerIcon = input<string>('');\n\n // Stepper\n /** Shows the progress stepper (hide it for edit mode, like wac-app does). */\n showStepper = input<boolean>(true);\n /** Lets the user click on previous steps to jump back. */\n stepperClickable = input<boolean>(false);\n\n // Footer\n showFooter = input<boolean>(true);\n /** Shows a \"Paso X / N\" counter on the left of the footer. */\n showStepCounter = input<boolean>(false);\n stepCounterPrefix = input<string>('Paso');\n /** Shows the Cancel button on the first step (instead of a back button). */\n showCancel = input<boolean>(true);\n /** Auto-advances to the next step on the primary button when it is not the last step. */\n advanceOnNext = input<boolean>(true);\n\n prevLabel = input<string>('Atrás');\n prevIcon = input<string>('chevron-left');\n cancelLabel = input<string>('Cancelar');\n cancelIcon = input<string>('x');\n nextLabel = input<string>('Continuar');\n nextIcon = input<string>('chevron-right');\n finishLabel = input<string>('Finalizar');\n finishIcon = input<string>('check');\n\n /** Overrides the primary footer button label for every step. */\n primaryLabel = input<string | null>(null);\n /** Overrides the primary footer button icon for every step. */\n primaryIcon = input<string | null>(null);\n /** Shows a loading spinner on the primary button and disables it. */\n primaryLoading = input<boolean>(false);\n /** Disables the primary footer button (e.g. while the step form is invalid). */\n primaryDisabled = input<boolean>(false);\n\n // Outputs\n back = output<void>();\n cancel = output<void>();\n prev = output<void>();\n next = output<void>();\n finish = output<void>();\n stepChange = output<{ step: WizardStep | null; index: number }>();\n\n readonly stepContents = contentChildren(ShkWizardStepContent);\n\n currentIndex = computed(() => {\n const id = this.currentStep();\n if (id == null) return this.steps().length > 0 ? 0 : -1;\n return this.steps().findIndex((s) => s.id === id);\n });\n\n currentStepObj = computed(() => this.steps()[this.currentIndex()] ?? null);\n isFirstStep = computed(() => this.currentIndex() === 0);\n isLastStep = computed(() => this.currentIndex() === this.steps().length - 1);\n\n primaryActionLabel = computed(() => {\n if (this.primaryLabel()) return this.primaryLabel()!;\n const step = this.currentStepObj();\n if (step?.primaryLabel) return step.primaryLabel;\n return this.isLastStep() ? this.finishLabel() : this.nextLabel();\n });\n\n primaryActionIcon = computed(() => {\n if (this.primaryIcon()) return this.primaryIcon()!;\n const step = this.currentStepObj();\n if (step?.primaryIcon) return step.primaryIcon;\n return this.isLastStep() ? this.finishIcon() : this.nextIcon();\n });\n\n getStepTemplate(id: string | number): TemplateRef<unknown> | undefined {\n return this.stepContents().find((c) => c.stepId() === id)?.templateRef;\n }\n\n goTo(stepId: string | number): void {\n const idx = this.steps().findIndex((s) => s.id === stepId);\n if (idx < 0) return;\n if (this.currentStep() === stepId) return;\n this.currentStep.set(stepId);\n this.stepChange.emit({ step: this.steps()[idx], index: idx });\n }\n\n onPrev(): void {\n const idx = this.currentIndex();\n if (idx <= 0) return;\n this.prev.emit();\n this.goTo(this.steps()[idx - 1].id);\n }\n\n onNext(): void {\n const idx = this.currentIndex();\n const next = this.steps()[idx + 1];\n if (!next) return;\n this.next.emit();\n if (this.advanceOnNext()) {\n this.goTo(next.id);\n }\n }\n\n onPrimary(): void {\n if (this.primaryLoading() || this.primaryDisabled()) return;\n if (this.isLastStep()) {\n this.finish.emit();\n } else {\n this.onNext();\n }\n }\n}\n","<div class=\"min-h-full bg-transparent\">\n\n <!-- ============ Sticky Header + Stepper ============ -->\n @if (showHeader()) {\n <div\n class=\"sticky top-0 z-20 bg-white dark:[background-color:var(--shk-surface-50)] border-b _shk-border dark:[border-color:var(--shk-surface-200)] shadow-sm\"\n >\n <div class=\"w-full px-4 sm:px-6 lg:px-8 py-4\">\n <div class=\"flex items-center gap-4 mb-4\">\n @if (showBackButton()) {\n <button\n type=\"button\"\n (click)=\"back.emit()\"\n [attr.aria-label]=\"backTooltip()\"\n [attr.title]=\"backTooltip()\"\n class=\"shk-wizard-icon-btn shrink-0\"\n >\n <svg [lucideIcon]=\"getIcon('arrow-left')\" class=\"w-4 h-4\"></svg>\n </button>\n }\n <div class=\"flex-1 min-w-0 flex items-center gap-2.5\">\n @if (headerIcon()) {\n <span class=\"w-9 h-9 rounded-lg _shk-bg-primary-soft _shk-text-primary flex items-center justify-center shrink-0\">\n <svg [lucideIcon]=\"getIcon(headerIcon())\" class=\"w-4 h-4\"></svg>\n </span>\n }\n <div class=\"min-w-0\">\n <h1 class=\"text-xl font-bold _shk-text-surface-800 dark:[color:var(--shk-surface-800)] truncate\">\n {{ headerTitle() }}\n </h1>\n @if (headerSubtitle()) {\n <p class=\"text-xs _shk-text-surface-500 dark:[color:var(--shk-surface-500)] mt-0.5 truncate\">\n {{ headerSubtitle() }}\n </p>\n }\n </div>\n </div>\n <ng-content select=\"[shkWizardHeaderActions]\"></ng-content>\n </div>\n\n <!-- Stepper -->\n @if (showStepper() && steps().length > 1) {\n <div class=\"flex items-center gap-2 w-full max-w-3xl mx-auto\">\n @for (step of steps(); track step.id; let i = $index, last = $last) {\n <div class=\"flex items-center gap-3 shrink-0\">\n <button\n type=\"button\"\n (click)=\"goTo(step.id)\"\n [disabled]=\"!stepperClickable() || currentIndex() < i\"\n [attr.aria-label]=\"step.label\"\n class=\"shk-wizard-stepper-dot\"\n [class._shk-bg-primary]=\"currentIndex() > i || currentIndex() === i\"\n [class.text-white]=\"currentIndex() > i || currentIndex() === i\"\n [class._shk-bg-surface-200]=\"currentIndex() < i\"\n [class._shk-text-surface-500]=\"currentIndex() < i\"\n [class.cursor-pointer]=\"stepperClickable() && currentIndex() >= i\"\n [class.cursor-default]=\"!stepperClickable() || currentIndex() < i\"\n >\n @if (currentIndex() > i) {\n <svg [lucideIcon]=\"getIcon(step.icon || 'check')\" class=\"w-4 h-4\"></svg>\n } @else if (step.icon) {\n <svg [lucideIcon]=\"getIcon(step.icon)\" class=\"w-4 h-4\"></svg>\n } @else {\n {{ i + 1 }}\n }\n </button>\n <span\n class=\"text-sm font-semibold transition-colors whitespace-nowrap hidden sm:inline\"\n [class._shk-text-surface-800]=\"currentIndex() === i\"\n [class._shk-text-surface-500]=\"currentIndex() !== i\"\n [class.dark:[color:var(--shk-surface-800)]]=\"currentIndex() === i\"\n [class.dark:[color:var(--shk-surface-500)]]=\"currentIndex() !== i\"\n >\n {{ step.label }}\n </span>\n </div>\n\n @if (!last) {\n <div class=\"flex-1 h-0.5 _shk-bg-surface-200 dark:[background-color:var(--shk-surface-200)] relative overflow-hidden rounded-full\">\n <div\n class=\"absolute inset-y-0 left-0 _shk-bg-primary transition-all duration-300\"\n [class.w-full]=\"currentIndex() > i\"\n [class.w-0]=\"currentIndex() <= i\"\n ></div>\n </div>\n }\n }\n </div>\n }\n </div>\n </div>\n }\n\n <!-- ============ Active step content ============ -->\n <div class=\"w-full px-4 sm:px-6 lg:px-8 py-6 pb-28\">\n @if (currentIndex() >= 0) {\n @if (getStepTemplate(steps()[currentIndex()].id); as tpl) {\n <div class=\"shk-wizard-fade\" [style.view-transition-name]=\"'shk-wizard-step'\">\n <ng-container\n *ngTemplateOutlet=\"tpl; context: { step: currentStepObj(), index: currentIndex() }\"\n ></ng-container>\n </div>\n } @else {\n <p class=\"text-sm _shk-text-surface-400 dark:[color:var(--shk-surface-400)]\">\n No hay contenido definido para el paso «{{ steps()[currentIndex()].label }}».\n </p>\n }\n }\n </div>\n\n <!-- ============ Sticky Footer ============ -->\n @if (showFooter() && steps().length > 0) {\n <div\n class=\"sticky bottom-0 z-20 bg-white dark:[background-color:var(--shk-surface-50)] border-t _shk-border dark:[border-color:var(--shk-surface-200)] shadow-[0_-4px_12px_rgba(0,0,0,0.04)] mt-8\"\n >\n <div class=\"w-full px-4 sm:px-6 lg:px-8 py-4 flex items-center justify-end gap-3\">\n @if (showStepCounter()) {\n <span class=\"text-sm _shk-text-surface-500 dark:[color:var(--shk-surface-500)] mr-auto\">\n {{ stepCounterPrefix() }} {{ currentIndex() + 1 }} / {{ steps().length }}\n </span>\n }\n\n @if (isFirstStep()) {\n @if (showCancel()) {\n <button type=\"button\" (click)=\"cancel.emit()\" class=\"shk-wizard-btn-secondary\">\n @if (cancelIcon()) {\n <svg [lucideIcon]=\"getIcon(cancelIcon())\" class=\"w-4 h-4\"></svg>\n }\n {{ cancelLabel() }}\n </button>\n }\n } @else {\n <button type=\"button\" (click)=\"onPrev()\" class=\"shk-wizard-btn-secondary\">\n <svg [lucideIcon]=\"getIcon(prevIcon())\" class=\"w-4 h-4\"></svg>\n {{ prevLabel() }}\n </button>\n }\n\n <button\n type=\"button\"\n (click)=\"onPrimary()\"\n [disabled]=\"primaryDisabled() || primaryLoading()\"\n class=\"shk-wizard-btn-primary\"\n >\n @if (primaryLoading()) {\n <svg [lucideIcon]=\"getIcon('loader-circle')\" class=\"w-4 h-4 shk-wizard-spin\"></svg>\n } @else {\n @if (primaryActionIcon()) {\n <svg [lucideIcon]=\"getIcon(primaryActionIcon())\" class=\"w-4 h-4\"></svg>\n }\n }\n {{ primaryActionLabel() }}\n </button>\n </div>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getIconFromCentral"],"mappings":";;;;;;;AA2BA;MAKa,oBAAoB,CAAA;AAE/B,IAAA,WAAA,CAAmB,WAAiC,EAAA;QAAjC,IAAA,CAAA,WAAW,GAAX,WAAW;QAD9B,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,6EAAoB,KAAK,EAAE,sBAAsB,EAAA,CAAG;IACpB;+GAF5C,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,sBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAApB,oB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