shirkasoft-ui-components 1.3.15 → 1.4.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 +447 -71
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +7 -7
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-button.mjs +11 -11
- package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-chart.mjs +6 -6
- package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-config.mjs +914 -0
- package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +8 -8
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs +901 -753
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs +5 -5
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs +16 -9
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-icons.mjs +646 -0
- package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-knob.mjs +44 -17
- package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-loading.mjs +16 -16
- package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-modal.mjs +42 -31
- package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-notification.mjs +8 -8
- package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-price-input.mjs +79 -29
- package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +7 -7
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-select.mjs +50 -23
- package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs +6 -6
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs +4 -4
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-table.mjs +163 -102
- package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tabs.mjs +21 -23
- package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tag.mjs +9 -9
- package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-text-field.mjs +63 -30
- package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +280 -0
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs +180 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-timeline.mjs +10 -22
- package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-toggle.mjs +60 -53
- package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs +29 -11
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-utils.mjs +22 -11
- package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-wizard.mjs +9 -10
- package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
- package/package.json +33 -3
- package/src/baseline.css +2472 -0
- package/src/theme.css +15 -543
- package/src/themes/ocean.css +56 -0
- package/src/themes/sunset.css +55 -0
- package/src/themes/violet.css +25 -0
- package/src/tokens.css +612 -0
- package/types/shirkasoft-ui-components-button.d.ts +1 -1
- package/types/shirkasoft-ui-components-config.d.ts +368 -0
- package/types/shirkasoft-ui-components-confirm-dialog.d.ts +2 -1
- package/types/shirkasoft-ui-components-date-picker.d.ts +276 -224
- package/types/shirkasoft-ui-components-fieldset.d.ts +2 -1
- package/types/shirkasoft-ui-components-file-upload.d.ts +11 -5
- package/types/shirkasoft-ui-components-icons.d.ts +1422 -0
- package/types/shirkasoft-ui-components-knob.d.ts +28 -7
- package/types/shirkasoft-ui-components-modal.d.ts +11 -7
- package/types/shirkasoft-ui-components-notification.d.ts +2 -1
- package/types/shirkasoft-ui-components-price-input.d.ts +37 -9
- package/types/shirkasoft-ui-components-rail-sidebar.d.ts +3 -3
- package/types/shirkasoft-ui-components-select.d.ts +24 -8
- package/types/shirkasoft-ui-components-sidebar.d.ts +2 -1
- package/types/shirkasoft-ui-components-table.d.ts +91 -80
- package/types/shirkasoft-ui-components-tag.d.ts +1 -1
- package/types/shirkasoft-ui-components-text-field.d.ts +29 -13
- package/types/shirkasoft-ui-components-theme-picker.d.ts +83 -0
- package/types/shirkasoft-ui-components-theme.d.ts +88 -0
- package/types/shirkasoft-ui-components-timeline.d.ts +5 -4
- package/types/shirkasoft-ui-components-toggle.d.ts +20 -13
- package/types/shirkasoft-ui-components-tooltip.d.ts +6 -0
- package/types/shirkasoft-ui-components-utils.d.ts +16 -6
- package/types/shirkasoft-ui-components-wizard.d.ts +4 -3
|
@@ -1 +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,CAAC,OAAO;YAAE;AACd,QAAA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AA,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;;;;"}
|
|
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 ChangeDetectionStrategy,\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 changeDetection: ChangeDetectionStrategy.OnPush,\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 this.open();\n }\n\n /** Hides the tooltip on mouseleave. */\n @HostListener('mouseleave')\n onMouseLeave(): void {\n this.hide();\n }\n\n /** Also opens on keyboard focus, so icon-only triggers are readable. */\n @HostListener('focusin')\n onFocusIn(): void {\n this.open();\n }\n\n /** Closes when the focus leaves the trigger. */\n @HostListener('focusout')\n onFocusOut(): void {\n this.hide();\n }\n\n /** Opens the tooltip when there is text to show. */\n private open(): 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 /** 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: 'pre-line',\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":";;;;AAWA,MAAM,eAAe,GAAG,YAAY;AAEpC;;;;AAIG;AAEH;;;;AAIG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,EAAE,aAAa;oBACvB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE;;;;AAIT,EAAA,CAAA;AACF,iBAAA;;sBAoBE,YAAY;uBAAC,YAAY;;sBAMzB,YAAY;uBAAC,YAAY;;sBAMzB,YAAY;uBAAC,SAAS;;sBAMtB,YAAY;uBAAC,UAAU;;;ACtE1B;;AAEG;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LucideX, LucideUpload, LucideTriangleAlert, LucideTrash2, LucideSearch, LucideRefreshCw, LucidePlus, LucidePanelRight, LucideMinimize2, LucideMenu, LucideMaximize2, LucideLogOut, LucideLoaderCircle, LucideLoader, LucideInfo, LucideInbox, LucideLanguages, LucideGlobe, LucideFunnel, LucideFileText, LucideFileSpreadsheet, LucideFile, LucideEyeOff, LucideEye, LucideEllipsisVertical, LucideDownload, LucideCirclePlus, LucideCircleQuestionMark, LucideChevronsRight, LucideChevronsLeft, LucideChevronRight, LucideChevronLeft, LucideChevronDown, LucideCalendarDays, LucideCheck, LucideArrowUpDown, LucideArrowUp, LucideArrowDown, LucideArrowLeft } from '
|
|
1
|
+
import { LucideX, LucideUpload, LucideTriangleAlert, LucideTrash2, LucideSearch, LucideRefreshCw, LucidePlus, LucidePanelRight, LucideMinimize2, LucideMenu, LucideMaximize2, LucideLogOut, LucideLoaderCircle, LucideLoader, LucideInfo, LucideInbox, LucideLanguages, LucideGlobe, LucideFunnel, LucideFileText, LucideFileSpreadsheet, LucideFile, LucideEyeOff, LucideEye, LucideEllipsisVertical, LucideDownload, LucideCirclePlus, LucideCircleQuestionMark, LucideChevronsRight, LucideChevronsLeft, LucideChevronRight, LucideChevronLeft, LucideChevronDown, LucideCalendarDays, LucideCheck, LucideArrowUpDown, LucideArrowUp, LucideArrowDown, LucideArrowLeft, ICON_BY_NAME } from 'shirkasoft-ui-components/icons';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, ElementRef, afterNextRender, DestroyRef, Directive } from '@angular/core';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ import { inject, ElementRef, afterNextRender, DestroyRef, Directive } from '@ang
|
|
|
7
7
|
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
8
8
|
* Belongs to Shirkasoft.
|
|
9
9
|
*/
|
|
10
|
-
/** Maps the icon names used across the library to their
|
|
10
|
+
/** Maps the icon names used across the library to their SVG data. */
|
|
11
11
|
const ICONS = {
|
|
12
12
|
'arrow-left': LucideArrowLeft,
|
|
13
13
|
'arrow-down': LucideArrowDown,
|
|
@@ -50,16 +50,27 @@ const ICONS = {
|
|
|
50
50
|
x: LucideX,
|
|
51
51
|
};
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
53
|
+
* True when `icon` is a per-item resolver function such as `(row) => 'pencil'`.
|
|
54
|
+
*
|
|
55
|
+
* Classes are functions too, but must never be called: a v1 `@lucide/angular`
|
|
56
|
+
* component passed by an app that has not migrated yet would throw
|
|
57
|
+
* "Class constructor cannot be invoked without 'new'". Those fall through to
|
|
58
|
+
* `getIcon()`, which renders the fallback icon instead.
|
|
59
|
+
*/
|
|
60
|
+
function isIconResolver(icon) {
|
|
61
|
+
return typeof icon === 'function' && !/^class[\s{]/.test(Function.prototype.toString.call(icon));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Resolves the icon passed to a component into SVG data.
|
|
65
|
+
* Accepts a registered string name or an icon node array.
|
|
55
66
|
*/
|
|
56
67
|
function getIcon(icon, fallback = LucideCircleQuestionMark) {
|
|
57
68
|
if (!icon)
|
|
58
69
|
return null;
|
|
59
70
|
if (typeof icon === 'string') {
|
|
60
|
-
return ICONS[icon] ?? fallback;
|
|
71
|
+
return ICONS[icon] ?? ICON_BY_NAME[icon] ?? fallback;
|
|
61
72
|
}
|
|
62
|
-
if (
|
|
73
|
+
if (Array.isArray(icon)) {
|
|
63
74
|
return icon;
|
|
64
75
|
}
|
|
65
76
|
return fallback;
|
|
@@ -116,17 +127,17 @@ class PortalDirective {
|
|
|
116
127
|
});
|
|
117
128
|
inject(DestroyRef).onDestroy(() => remove?.());
|
|
118
129
|
}
|
|
119
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
120
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
130
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: PortalDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
131
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.27", type: PortalDirective, isStandalone: true, selector: "[shkPortal]", ngImport: i0 }); }
|
|
121
132
|
}
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: PortalDirective, decorators: [{
|
|
123
134
|
type: Directive,
|
|
124
|
-
args: [{ selector: '[shkPortal]'
|
|
135
|
+
args: [{ selector: '[shkPortal]' }]
|
|
125
136
|
}], ctorParameters: () => [] });
|
|
126
137
|
|
|
127
138
|
/**
|
|
128
139
|
* Generated bundle index. Do not edit.
|
|
129
140
|
*/
|
|
130
141
|
|
|
131
|
-
export { ICONS, PortalDirective, getIcon, portalToBody };
|
|
142
|
+
export { ICONS, PortalDirective, getIcon, isIconResolver, portalToBody };
|
|
132
143
|
//# sourceMappingURL=shirkasoft-ui-components-utils.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shirkasoft-ui-components-utils.mjs","sources":["../../../projects/ui-components/utils/icons.ts","../../../projects/ui-components/utils/portal.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,\n LucideDownload,\n LucideEllipsisVertical,\n LucideEye,\n LucideEyeOff,\n LucideFile,\n LucideFileSpreadsheet,\n LucideFileText,\n LucideFunnel,\n LucideGlobe,\n LucideLanguages,\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 '
|
|
1
|
+
{"version":3,"file":"shirkasoft-ui-components-utils.mjs","sources":["../../../projects/ui-components/utils/icons.ts","../../../projects/ui-components/utils/portal.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,\n LucideDownload,\n LucideEllipsisVertical,\n LucideEye,\n LucideEyeOff,\n LucideFile,\n LucideFileSpreadsheet,\n LucideFileText,\n LucideFunnel,\n LucideGlobe,\n LucideLanguages,\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 'shirkasoft-ui-components/icons';\nimport { ICON_BY_NAME } from 'shirkasoft-ui-components/icons';\nimport type { IconNode } from 'shirkasoft-ui-components/icons';\n\n/** Maps the icon names used across the library to their SVG data. */\nexport const ICONS: Record<string, IconNode> = {\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 'ellipsis-vertical': LucideEllipsisVertical,\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 languages: LucideLanguages,\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 * True when `icon` is a per-item resolver function such as `(row) => 'pencil'`.\n *\n * Classes are functions too, but must never be called: a v1 `@lucide/angular`\n * component passed by an app that has not migrated yet would throw\n * \"Class constructor cannot be invoked without 'new'\". Those fall through to\n * `getIcon()`, which renders the fallback icon instead.\n */\nexport function isIconResolver(icon: unknown): icon is (...args: any[]) => unknown {\n return typeof icon === 'function' && !/^class[\\s{]/.test(Function.prototype.toString.call(icon));\n}\n\n/**\n * Resolves the icon passed to a component into SVG data.\n * Accepts a registered string name or an icon node array.\n */\nexport function getIcon(icon?: any, fallback: any = LucideCircleQuestionMark): IconNode | null {\n if (!icon) return null;\n if (typeof icon === 'string') {\n return ICONS[icon] ?? ICON_BY_NAME[icon] ?? fallback;\n }\n if (Array.isArray(icon)) {\n return icon;\n }\n return fallback;\n}","import { Directive, DestroyRef, ElementRef, afterNextRender, inject } from '@angular/core';\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 * Moves a floating element (dropdown panel, popup, overlay) to `document.body`\n * so it always renders above the rest of the page.\n *\n * `position: fixed` + a high `z-index` is not enough on its own: an ancestor\n * with `transform`, `filter`, `backdrop-filter`, `contain`, or its own stacking\n * context (`z-index` + `position`, `sticky`, `opacity < 1`...) traps the element\n * inside it. Rendering it as a direct child of `body` avoids all of that.\n *\n * The element keeps being managed by Angular (bindings and listeners keep\n * working, and Angular removes it with `node.remove()` when it is hidden).\n * If the anchor lives inside a `.dark` container, the class is copied onto the\n * element so the dark theme (CSS variables, Tailwind `dark:` variants and\n * component `.dark .x` rules) still applies once it is outside the host.\n *\n * Returns a function that removes the element from the DOM; call it when the\n * owner component is destroyed so the element does not stay orphaned in `body`.\n */\nexport function portalToBody(element: HTMLElement, anchor?: HTMLElement | null): () => void {\n const doc = element.ownerDocument;\n if (element.parentNode !== doc.body) {\n doc.body.appendChild(element);\n }\n element.classList.toggle('dark', !!anchor?.closest('.dark'));\n return () => element.remove();\n}\n\n/**\n * Renders the host element in `document.body` (see `portalToBody`) once it is\n * rendered, and removes it when the element or its owner is destroyed.\n *\n * ```html\n * @if (isOpen()) {\n * <div shkPortal class=\"fixed z-[9999]\" [style.top.px]=\"top\">...</div>\n * }\n * ```\n */\n@Directive({ selector: '[shkPortal]' })\nexport class PortalDirective {\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n let remove: (() => void) | null = null;\n afterNextRender(() => {\n const node = this.el.nativeElement;\n remove = portalToBody(node, node.parentElement);\n });\n inject(DestroyRef).onDestroy(() => remove?.());\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;AAIG;AA6CH;AACO,MAAM,KAAK,GAA6B;AAC7C,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,mBAAmB,EAAE,sBAAsB;AAC3C,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,SAAS,EAAE,eAAe;AAC1B,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;A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AAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAC5D,IAAA,OAAO,MAAM,OAAO,CAAC,MAAM,EAAE;AAC/B;AAEA;;;;;;;;;AASG;MAEU,eAAe,CAAA;AAG1B,IAAA,WAAA,GAAA;AAFiB,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC;QAG/D,IAAI,MAAM,GAAwB,IAAI;QACtC,eAAe,CAAC,MAAK;AACnB,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa;YAClC,MAAM,GAAG,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC;AACjD,QAAA,CAAC,CAAC;AACF,QAAA,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,MAAM,MAAM,IAAI,CAAC;IAChD;+GAVW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,SAAS;mBAAC,EAAE,QAAQ,EAAE,aAAa,EAAE;;;AC7CtC;;AAEG;;;;"}
|
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, Directive, model, output, contentChildren, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { LucideChevronRight,
|
|
5
|
+
import { LucideChevronRight, ShkIconDirective } from 'shirkasoft-ui-components/icons';
|
|
6
6
|
import { getIcon } from 'shirkasoft-ui-components/utils';
|
|
7
7
|
|
|
8
8
|
/** Declares a step's content template: <ng-template shkWizardStepContent="stepId">…</ng-template>. */
|
|
@@ -11,14 +11,13 @@ class ShkWizardStepContent {
|
|
|
11
11
|
this.templateRef = templateRef;
|
|
12
12
|
this.stepId = input.required({ ...(ngDevMode ? { debugName: "stepId" } : /* istanbul ignore next */ {}), alias: 'shkWizardStepContent' });
|
|
13
13
|
}
|
|
14
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
15
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", 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.27", type: ShkWizardStepContent, isStandalone: true, selector: "ng-template[shkWizardStepContent]", inputs: { stepId: { classPropertyName: "stepId", publicName: "shkWizardStepContent", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
|
16
16
|
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: ShkWizardStepContent, decorators: [{
|
|
18
18
|
type: Directive,
|
|
19
19
|
args: [{
|
|
20
20
|
selector: 'ng-template[shkWizardStepContent]',
|
|
21
|
-
standalone: true,
|
|
22
21
|
}]
|
|
23
22
|
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { stepId: [{ type: i0.Input, args: [{ isSignal: true, alias: "shkWizardStepContent", required: true }] }] } });
|
|
24
23
|
let wizardCounter = 0;
|
|
@@ -46,7 +45,7 @@ class WizardComponent {
|
|
|
46
45
|
/** Shows the round back button in the header. */
|
|
47
46
|
this.showBackButton = input(true, ...(ngDevMode ? [{ debugName: "showBackButton" }] : /* istanbul ignore next */ []));
|
|
48
47
|
this.backTooltip = input('Atrás', ...(ngDevMode ? [{ debugName: "backTooltip" }] : /* istanbul ignore next */ []));
|
|
49
|
-
/** Optional
|
|
48
|
+
/** Optional icon (name or `IconNode` data) shown before the title. */
|
|
50
49
|
this.headerIcon = input('', ...(ngDevMode ? [{ debugName: "headerIcon" }] : /* istanbul ignore next */ []));
|
|
51
50
|
// Stepper
|
|
52
51
|
/** Shows the progress stepper (hide it for edit mode, like wac-app does). */
|
|
@@ -151,12 +150,12 @@ class WizardComponent {
|
|
|
151
150
|
this.onNext();
|
|
152
151
|
}
|
|
153
152
|
}
|
|
154
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
155
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", 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 }); }
|
|
153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WizardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
154
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.27", 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 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 [shkIcon]=\"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 [shkIcon]=\"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 truncate\">\n {{ headerTitle() }}\n </h1>\n @if (headerSubtitle()) {\n <p class=\"text-xs _shk-text-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 [shkIcon]=\"getIcon(step.icon || 'check')\" class=\"w-4 h-4\"></svg>\n } @else if (step.icon) {\n <svg [shkIcon]=\"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 >\n {{ step.label }}\n </span>\n </div>\n\n @if (!last) {\n <div class=\"flex-1 h-0.5 _shk-bg-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\">\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 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 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 [shkIcon]=\"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 [shkIcon]=\"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 [shkIcon]=\"getIcon('loader-circle')\" class=\"w-4 h-4 shk-wizard-spin\"></svg>\n } @else {\n @if (primaryActionIcon()) {\n <svg [shkIcon]=\"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: "directive", type: ShkIconDirective, selector: "svg[shkIcon]", inputs: ["shkIcon", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
156
155
|
}
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WizardComponent, decorators: [{
|
|
158
157
|
type: Component,
|
|
159
|
-
args: [{ selector: 'shk-wizard',
|
|
158
|
+
args: [{ selector: 'shk-wizard', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, ShkIconDirective], 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 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 [shkIcon]=\"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 [shkIcon]=\"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 truncate\">\n {{ headerTitle() }}\n </h1>\n @if (headerSubtitle()) {\n <p class=\"text-xs _shk-text-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 [shkIcon]=\"getIcon(step.icon || 'check')\" class=\"w-4 h-4\"></svg>\n } @else if (step.icon) {\n <svg [shkIcon]=\"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 >\n {{ step.label }}\n </span>\n </div>\n\n @if (!last) {\n <div class=\"flex-1 h-0.5 _shk-bg-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\">\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 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 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 [shkIcon]=\"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 [shkIcon]=\"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 [shkIcon]=\"getIcon('loader-circle')\" class=\"w-4 h-4 shk-wizard-spin\"></svg>\n } @else {\n @if (primaryActionIcon()) {\n <svg [shkIcon]=\"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
159
|
}], 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
160
|
|
|
162
161
|
/**
|
|
@@ -1 +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,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mCAAmC;AAC7C,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;AAMD,IAAI,aAAa,GAAG,CAAC;AAErB;;;;AAIG;AAEH;;;AAGG;MA6HU,eAAe,CAAA;AA5H5B,IAAA,WAAA,GAAA;AA6HY,QAAA,IAAA,CAAA,OAAO,GAAG,CAAC,IAAS,KAAKA,OAAkB,CAAC,IAAI,EAAE,kBAAkB,CAAC;;AAG/E,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAe,EAAE,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AC,IAAI,EAAE;QACpB;aAAO;YACL,IAAI,CAAC,MAAM,EAAE;QACf;IACF;+GA3HW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,+6HA6Dc,oBAAoB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC1O9D,u1NA6JA,EAAA,MAAA,EAAA,CAAA,ivEAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDxGY,YAAY,sMAAE,iBAAiB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAwH9B,eAAe,EAAA,UAAA,EAAA,CAAA;kBA5H3B,SAAS;+BACE,YAAY,EAAA,UAAA,EACV,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,YAAY,EAAE,iBAAiB,CAAC,EAAA,QAAA,EAAA,u1NAAA,EAAA,MAAA,EAAA,CAAA,ivEAAA,CAAA,EAAA;4oGAqLF,oBAAoB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE1O9D;;AAEG;;;;"}
|
|
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 { ShkIconDirective, LucideChevronRight } from 'shirkasoft-ui-components/icons';\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 icon (name or `IconNode` data) 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})\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 changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, ShkIconDirective],\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 icon (name or `IconNode` data) 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 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 [shkIcon]=\"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 [shkIcon]=\"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 truncate\">\n {{ headerTitle() }}\n </h1>\n @if (headerSubtitle()) {\n <p class=\"text-xs _shk-text-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 [shkIcon]=\"getIcon(step.icon || 'check')\" class=\"w-4 h-4\"></svg>\n } @else if (step.icon) {\n <svg [shkIcon]=\"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 >\n {{ step.label }}\n </span>\n </div>\n\n @if (!last) {\n <div class=\"flex-1 h-0.5 _shk-bg-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\">\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 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 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 [shkIcon]=\"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 [shkIcon]=\"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 [shkIcon]=\"getIcon('loader-circle')\" class=\"w-4 h-4 shk-wizard-spin\"></svg>\n } @else {\n @if (primaryActionIcon()) {\n <svg [shkIcon]=\"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;MAIa,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,U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A,UAAA,EAAA,CAAA;kBA3H3B,SAAS;+BACE,YAAY,EAAA,eAAA,EACL,uBAAuB,CAAC,MAAM,WACtC,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,03MAAA,EAAA,MAAA,EAAA,CAAA,ivEAAA,CAAA,EAAA;4oGAqLD,oBAAoB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AExO9D;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shirkasoft-ui-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Angular UI Components Library — themeable via CSS custom properties",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
7
7
|
"ui",
|
|
8
8
|
"components",
|
|
9
|
-
"
|
|
9
|
+
"css",
|
|
10
|
+
"themes",
|
|
10
11
|
"shirkasoft",
|
|
11
12
|
"theming"
|
|
12
13
|
],
|
|
@@ -27,17 +28,30 @@
|
|
|
27
28
|
"@angular/router": "^21.2.0",
|
|
28
29
|
"rxjs": "^7.8.0",
|
|
29
30
|
"@jsverse/transloco": ">= 8.0.0",
|
|
30
|
-
"@lucide/angular": "^1.30.0",
|
|
31
31
|
"chart.js": "^4.4.0"
|
|
32
32
|
},
|
|
33
|
+
"peerDependenciesMeta": {
|
|
34
|
+
"@jsverse/transloco": {
|
|
35
|
+
"optional": true
|
|
36
|
+
},
|
|
37
|
+
"chart.js": {
|
|
38
|
+
"optional": true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
33
41
|
"dependencies": {
|
|
34
42
|
"tslib": "^2.3.0"
|
|
35
43
|
},
|
|
36
44
|
"sideEffects": false,
|
|
37
45
|
"exports": {
|
|
46
|
+
"./tokens.css": {
|
|
47
|
+
"default": "./src/tokens.css"
|
|
48
|
+
},
|
|
38
49
|
"./theme.css": {
|
|
39
50
|
"default": "./src/theme.css"
|
|
40
51
|
},
|
|
52
|
+
"./themes/*.css": {
|
|
53
|
+
"default": "./src/themes/*.css"
|
|
54
|
+
},
|
|
41
55
|
"./package.json": {
|
|
42
56
|
"default": "./package.json"
|
|
43
57
|
},
|
|
@@ -57,6 +71,10 @@
|
|
|
57
71
|
"types": "./types/shirkasoft-ui-components-chart.d.ts",
|
|
58
72
|
"default": "./fesm2022/shirkasoft-ui-components-chart.mjs"
|
|
59
73
|
},
|
|
74
|
+
"./config": {
|
|
75
|
+
"types": "./types/shirkasoft-ui-components-config.d.ts",
|
|
76
|
+
"default": "./fesm2022/shirkasoft-ui-components-config.mjs"
|
|
77
|
+
},
|
|
60
78
|
"./confirm-dialog": {
|
|
61
79
|
"types": "./types/shirkasoft-ui-components-confirm-dialog.d.ts",
|
|
62
80
|
"default": "./fesm2022/shirkasoft-ui-components-confirm-dialog.mjs"
|
|
@@ -73,6 +91,10 @@
|
|
|
73
91
|
"types": "./types/shirkasoft-ui-components-file-upload.d.ts",
|
|
74
92
|
"default": "./fesm2022/shirkasoft-ui-components-file-upload.mjs"
|
|
75
93
|
},
|
|
94
|
+
"./icons": {
|
|
95
|
+
"types": "./types/shirkasoft-ui-components-icons.d.ts",
|
|
96
|
+
"default": "./fesm2022/shirkasoft-ui-components-icons.mjs"
|
|
97
|
+
},
|
|
76
98
|
"./knob": {
|
|
77
99
|
"types": "./types/shirkasoft-ui-components-knob.d.ts",
|
|
78
100
|
"default": "./fesm2022/shirkasoft-ui-components-knob.mjs"
|
|
@@ -125,6 +147,14 @@
|
|
|
125
147
|
"types": "./types/shirkasoft-ui-components-text-field.d.ts",
|
|
126
148
|
"default": "./fesm2022/shirkasoft-ui-components-text-field.mjs"
|
|
127
149
|
},
|
|
150
|
+
"./theme": {
|
|
151
|
+
"types": "./types/shirkasoft-ui-components-theme.d.ts",
|
|
152
|
+
"default": "./fesm2022/shirkasoft-ui-components-theme.mjs"
|
|
153
|
+
},
|
|
154
|
+
"./theme-picker": {
|
|
155
|
+
"types": "./types/shirkasoft-ui-components-theme-picker.d.ts",
|
|
156
|
+
"default": "./fesm2022/shirkasoft-ui-components-theme-picker.mjs"
|
|
157
|
+
},
|
|
128
158
|
"./timeline": {
|
|
129
159
|
"types": "./types/shirkasoft-ui-components-timeline.d.ts",
|
|
130
160
|
"default": "./fesm2022/shirkasoft-ui-components-timeline.mjs"
|