shirkasoft-ui-components 1.3.14 → 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.
Files changed (90) hide show
  1. package/README.md +447 -67
  2. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +7 -7
  3. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
  4. package/fesm2022/shirkasoft-ui-components-button.mjs +11 -11
  5. package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
  6. package/fesm2022/shirkasoft-ui-components-chart.mjs +6 -6
  7. package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
  8. package/fesm2022/shirkasoft-ui-components-config.mjs +914 -0
  9. package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
  10. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +8 -8
  11. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
  12. package/fesm2022/shirkasoft-ui-components-date-picker.mjs +901 -753
  13. package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
  14. package/fesm2022/shirkasoft-ui-components-fieldset.mjs +5 -5
  15. package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
  16. package/fesm2022/shirkasoft-ui-components-file-upload.mjs +16 -9
  17. package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
  18. package/fesm2022/shirkasoft-ui-components-icons.mjs +646 -0
  19. package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
  20. package/fesm2022/shirkasoft-ui-components-knob.mjs +44 -17
  21. package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
  22. package/fesm2022/shirkasoft-ui-components-loading.mjs +16 -16
  23. package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
  24. package/fesm2022/shirkasoft-ui-components-modal.mjs +42 -31
  25. package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
  26. package/fesm2022/shirkasoft-ui-components-notification.mjs +8 -8
  27. package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
  28. package/fesm2022/shirkasoft-ui-components-price-input.mjs +79 -29
  29. package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
  30. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +7 -7
  31. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
  32. package/fesm2022/shirkasoft-ui-components-select.mjs +50 -23
  33. package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
  34. package/fesm2022/shirkasoft-ui-components-sidebar.mjs +6 -6
  35. package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
  36. package/fesm2022/shirkasoft-ui-components-skeleton.mjs +4 -4
  37. package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
  38. package/fesm2022/shirkasoft-ui-components-table.mjs +165 -111
  39. package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
  40. package/fesm2022/shirkasoft-ui-components-tabs.mjs +21 -23
  41. package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
  42. package/fesm2022/shirkasoft-ui-components-tag.mjs +9 -9
  43. package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
  44. package/fesm2022/shirkasoft-ui-components-text-field.mjs +63 -30
  45. package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
  46. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +280 -0
  47. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
  48. package/fesm2022/shirkasoft-ui-components-theme.mjs +180 -0
  49. package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
  50. package/fesm2022/shirkasoft-ui-components-timeline.mjs +10 -22
  51. package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
  52. package/fesm2022/shirkasoft-ui-components-toggle.mjs +60 -53
  53. package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
  54. package/fesm2022/shirkasoft-ui-components-tooltip.mjs +29 -11
  55. package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
  56. package/fesm2022/shirkasoft-ui-components-utils.mjs +22 -11
  57. package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
  58. package/fesm2022/shirkasoft-ui-components-wizard.mjs +9 -10
  59. package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
  60. package/package.json +33 -3
  61. package/src/baseline.css +2472 -0
  62. package/src/theme.css +15 -543
  63. package/src/themes/ocean.css +56 -0
  64. package/src/themes/sunset.css +55 -0
  65. package/src/themes/violet.css +25 -0
  66. package/src/tokens.css +612 -0
  67. package/types/shirkasoft-ui-components-button.d.ts +1 -1
  68. package/types/shirkasoft-ui-components-config.d.ts +368 -0
  69. package/types/shirkasoft-ui-components-confirm-dialog.d.ts +2 -1
  70. package/types/shirkasoft-ui-components-date-picker.d.ts +276 -224
  71. package/types/shirkasoft-ui-components-fieldset.d.ts +2 -1
  72. package/types/shirkasoft-ui-components-file-upload.d.ts +11 -5
  73. package/types/shirkasoft-ui-components-icons.d.ts +1422 -0
  74. package/types/shirkasoft-ui-components-knob.d.ts +28 -7
  75. package/types/shirkasoft-ui-components-modal.d.ts +11 -7
  76. package/types/shirkasoft-ui-components-notification.d.ts +2 -1
  77. package/types/shirkasoft-ui-components-price-input.d.ts +37 -9
  78. package/types/shirkasoft-ui-components-rail-sidebar.d.ts +3 -3
  79. package/types/shirkasoft-ui-components-select.d.ts +24 -8
  80. package/types/shirkasoft-ui-components-sidebar.d.ts +2 -1
  81. package/types/shirkasoft-ui-components-table.d.ts +91 -77
  82. package/types/shirkasoft-ui-components-tag.d.ts +1 -1
  83. package/types/shirkasoft-ui-components-text-field.d.ts +29 -13
  84. package/types/shirkasoft-ui-components-theme-picker.d.ts +83 -0
  85. package/types/shirkasoft-ui-components-theme.d.ts +88 -0
  86. package/types/shirkasoft-ui-components-timeline.d.ts +5 -4
  87. package/types/shirkasoft-ui-components-toggle.d.ts +20 -13
  88. package/types/shirkasoft-ui-components-tooltip.d.ts +6 -0
  89. package/types/shirkasoft-ui-components-utils.d.ts +16 -6
  90. package/types/shirkasoft-ui-components-wizard.d.ts +4 -3
@@ -1 +1 @@
1
- {"version":3,"file":"shirkasoft-ui-components-loading.mjs","sources":["../../../projects/ui-components/loading/loading-spinner.component.ts","../../../projects/ui-components/loading/loading-bar.component.ts","../../../projects/ui-components/loading/loading-overlay.component.ts","../../../projects/ui-components/loading/loading-dots.component.ts","../../../projects/ui-components/loading/shirkasoft-ui-components-loading.ts"],"sourcesContent":["import { Component, input, ChangeDetectionStrategy } 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/** Circular indeterminate spinner. */\n@Component({\n selector: 'shk-loading-spinner',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n class=\"shk-loading-spinner\"\n [style]=\"{\n width: size(),\n height: size(),\n }\"\n role=\"status\"\n aria-label=\"Cargando\"\n >\n <div\n class=\"shk-loading-spinner-circle\"\n [style]=\"{\n borderWidth: thickness(),\n borderTopColor: color() || undefined,\n }\"\n ></div>\n </div>\n @if (label()) {\n <span class=\"shk-loading-spinner-label\">{{ label() }}</span>\n }\n `,\n styles: [\n `\n :host {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n }\n .shk-loading-spinner {\n display: inline-block;\n }\n .shk-loading-spinner-circle {\n width: 100%;\n height: 100%;\n border-radius: 9999px;\n border-style: solid;\n border-color: color-mix(in srgb, var(--shk-primary-600) 20%, transparent);\n border-top-color: var(--shk-primary-600);\n animation: shk-loading-spin 0.8s linear infinite;\n }\n .shk-loading-spinner-label {\n font-size: 0.8125rem;\n color: var(--shk-surface-500);\n }\n @keyframes shk-loading-spin {\n to {\n transform: rotate(360deg);\n }\n }\n `,\n ],\n})\nexport class LoadingSpinnerComponent {\n /** Diameter of the spinner. */\n size = input<string>('2rem');\n /** Border thickness in px. */\n thickness = input<number>(3);\n /** Color of the moving arc. Defaults to the primary token. */\n color = input<string>('');\n /** Optional text shown under the spinner. */\n label = input<string>('');\n}\n","import { Component, computed, input, ChangeDetectionStrategy } 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/** Progress bar with an indeterminate sweep or a determinate percentage. */\n@Component({\n selector: 'shk-loading-bar',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n class=\"shk-loading-bar\"\n [class.shk-loading-bar-indeterminate]=\"indeterminate()\"\n [style]=\"{ height: height(), borderRadius: rounded() ? '9999px' : undefined }\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"indeterminate() ? undefined : progress()\"\n aria-label=\"Progreso\"\n >\n <div\n class=\"shk-loading-bar-fill\"\n [style]=\"fillStyle()\"\n [style.background-color]=\"color() || undefined\"\n [style.border-radius]=\"rounded() ? '9999px' : undefined\"\n ></div>\n </div>\n `,\n styles: [\n `\n .shk-loading-bar {\n width: 100%;\n position: relative;\n overflow: hidden;\n background-color: var(--shk-surface-200);\n }\n .shk-loading-bar-fill {\n height: 100%;\n background-color: var(--shk-primary-600);\n transition: width 0.3s ease-in-out;\n }\n .shk-loading-bar-indeterminate .shk-loading-bar-fill {\n width: 40%;\n animation: shk-loading-bar-sweep 1.2s ease-in-out infinite;\n }\n @keyframes shk-loading-bar-sweep {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(350%);\n }\n }\n `,\n ],\n})\nexport class LoadingBarComponent {\n /** Height of the bar. */\n height = input<string>('0.25rem');\n /** When true the bar animates without a known percentage. */\n indeterminate = input<boolean>(true);\n /** Current progress 0-100 when `indeterminate` is false. */\n progress = input<number>(0);\n /** Fill color. Defaults to the primary token. */\n color = input<string>('');\n /** Renders fully rounded ends. */\n rounded = input<boolean>(true);\n\n /** Fill width/style for the determinate mode, empty for indeterminate. */\n protected fillStyle = computed(() => {\n if (this.indeterminate()) return {};\n return { width: `${Math.max(0, Math.min(100, this.progress()))}%` };\n });\n}\n","import { Component, input, ChangeDetectionStrategy } from '@angular/core';\nimport { LoadingSpinnerComponent } from './loading-spinner.component';\n\n/** Backdrop style behind the overlay: none, light or dark. */\nexport type LoadingOverlayBackdrop = 'transparent' | 'light' | 'dark';\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/** Wraps content and shows a centered spinner over it while `visible` is true. */\n@Component({\n selector: 'shk-loading-overlay',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LoadingSpinnerComponent],\n template: `\n <div\n class=\"shk-loading-overlay\"\n [class.shk-loading-overlay-light]=\"backdrop() === 'light'\"\n [class.shk-loading-overlay-dark]=\"backdrop() === 'dark'\"\n >\n <ng-content></ng-content>\n @if (visible()) {\n <div class=\"shk-loading-overlay-layer\">\n <shk-loading-spinner [size]=\"spinnerSize()\" [color]=\"color()\" [label]=\"message()\" />\n </div>\n }\n </div>\n `,\n styles: [\n `\n :host {\n display: block;\n }\n .shk-loading-overlay {\n position: relative;\n min-height: 1.5rem;\n }\n .shk-loading-overlay-layer {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n }\n .shk-loading-overlay-light .shk-loading-overlay-layer {\n background-color: rgba(255, 255, 255, 0.65);\n }\n :host-context(.dark) .shk-loading-overlay-light .shk-loading-overlay-layer {\n background-color: rgba(0, 0, 0, 0.55);\n }\n .shk-loading-overlay-dark .shk-loading-overlay-layer {\n background-color: rgba(0, 0, 0, 0.4);\n }\n `,\n ],\n})\nexport class LoadingOverlayComponent {\n /** Controls whether the spinner layer is shown. */\n visible = input<boolean>(false);\n /** Optional text under the spinner. */\n message = input<string>('');\n /** Diameter of the spinner. */\n spinnerSize = input<string>('2.5rem');\n /** Spinner color. Defaults to the primary token. */\n color = input<string>('');\n /** Backdrop behind the spinner. */\n backdrop = input<LoadingOverlayBackdrop>('transparent');\n}\n","import { Component, computed, input, ChangeDetectionStrategy } 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/** Bouncing dots loading indicator. */\n@Component({\n selector: 'shk-loading-dots',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span class=\"shk-loading-dots\" role=\"status\" aria-label=\"Cargando\">\n @for (dot of dots(); track $index) {\n <span\n class=\"shk-loading-dot\"\n [style]=\"{\n width: size(),\n height: size(),\n backgroundColor: color() || undefined,\n animationDelay: $index * 0.12 + 's',\n }\"\n ></span>\n }\n </span>\n @if (label()) {\n <span class=\"shk-loading-dots-label\">{{ label() }}</span>\n }\n `,\n styles: [\n `\n :host {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n }\n .shk-loading-dots {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n }\n .shk-loading-dot {\n border-radius: 9999px;\n background-color: var(--shk-primary-600);\n animation: shk-loading-dots-bounce 1.4s ease-in-out infinite;\n }\n .shk-loading-dots-label {\n font-size: 0.8125rem;\n color: var(--shk-surface-500);\n }\n @keyframes shk-loading-dots-bounce {\n 0%,\n 80%,\n 100% {\n transform: scale(0.6);\n opacity: 0.5;\n }\n 40% {\n transform: scale(1);\n opacity: 1;\n }\n }\n `,\n ],\n})\nexport class LoadingDotsComponent {\n /** Diameter of each dot. */\n size = input<string>('0.5rem');\n /** Dot color. Defaults to the primary token. */\n color = input<string>('');\n /** Number of dots. */\n count = input<number>(3);\n /** Optional text shown next to the dots. */\n label = input<string>('');\n\n /** Array of dot indices to render based on the `count` input. */\n protected dots = computed(() => Array.from({ length: Math.max(1, this.count()) }));\n}\n","/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EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAtDrB;;;;;;;;;;;;;;;;;AAiBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+bAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAqCU,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBA1DhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,cAChB,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;AAiBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,+bAAA,CAAA,EAAA;;;AC9BH;;AAEG;;;;"}
1
+ {"version":3,"file":"shirkasoft-ui-components-loading.mjs","sources":["../../../projects/ui-components/loading/loading-spinner.component.ts","../../../projects/ui-components/loading/loading-bar.component.ts","../../../projects/ui-components/loading/loading-overlay.component.ts","../../../projects/ui-components/loading/loading-dots.component.ts","../../../projects/ui-components/loading/shirkasoft-ui-components-loading.ts"],"sourcesContent":["import { Component, input, ChangeDetectionStrategy } 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/** Circular indeterminate spinner. */\n@Component({\n selector: 'shk-loading-spinner',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n class=\"shk-loading-spinner\"\n [style]=\"{\n width: size(),\n height: size(),\n }\"\n role=\"status\"\n aria-label=\"Cargando\"\n >\n <div\n class=\"shk-loading-spinner-circle\"\n [style]=\"{\n borderWidth: thickness(),\n borderTopColor: color() || undefined,\n }\"\n ></div>\n </div>\n @if (label()) {\n <span class=\"shk-loading-spinner-label\">{{ label() }}</span>\n }\n `,\n styles: [\n `\n :host {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n }\n .shk-loading-spinner {\n display: inline-block;\n }\n .shk-loading-spinner-circle {\n width: 100%;\n height: 100%;\n border-radius: 9999px;\n border-style: solid;\n border-color: color-mix(in srgb, var(--shk-primary-600) 20%, transparent);\n border-top-color: var(--shk-primary-600);\n animation: shk-loading-spin 0.8s linear infinite;\n }\n .shk-loading-spinner-label {\n font-size: 0.8125rem;\n color: var(--shk-surface-500);\n }\n @keyframes shk-loading-spin {\n to {\n transform: rotate(360deg);\n }\n }\n `,\n ],\n})\nexport class LoadingSpinnerComponent {\n /** Diameter of the spinner. */\n size = input<string>('2rem');\n /** Border thickness in px. */\n thickness = input<number>(3);\n /** Color of the moving arc. Defaults to the primary token. */\n color = input<string>('');\n /** Optional text shown under the spinner. */\n label = input<string>('');\n}\n","import { Component, computed, input, ChangeDetectionStrategy } 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/** Progress bar with an indeterminate sweep or a determinate percentage. */\n@Component({\n selector: 'shk-loading-bar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n class=\"shk-loading-bar\"\n [class.shk-loading-bar-indeterminate]=\"indeterminate()\"\n [style]=\"{ height: height(), borderRadius: rounded() ? '9999px' : undefined }\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"indeterminate() ? undefined : progress()\"\n aria-label=\"Progreso\"\n >\n <div\n class=\"shk-loading-bar-fill\"\n [style]=\"fillStyle()\"\n [style.background-color]=\"color() || undefined\"\n [style.border-radius]=\"rounded() ? '9999px' : undefined\"\n ></div>\n </div>\n `,\n styles: [\n `\n .shk-loading-bar {\n width: 100%;\n position: relative;\n overflow: hidden;\n background-color: var(--shk-surface-200);\n }\n .shk-loading-bar-fill {\n height: 100%;\n background-color: var(--shk-primary-600);\n transition: width 0.3s ease-in-out;\n }\n .shk-loading-bar-indeterminate .shk-loading-bar-fill {\n width: 40%;\n animation: shk-loading-bar-sweep 1.2s ease-in-out infinite;\n }\n @keyframes shk-loading-bar-sweep {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(350%);\n }\n }\n `,\n ],\n})\nexport class LoadingBarComponent {\n /** Height of the bar. */\n height = input<string>('0.25rem');\n /** When true the bar animates without a known percentage. */\n indeterminate = input<boolean>(true);\n /** Current progress 0-100 when `indeterminate` is false. */\n progress = input<number>(0);\n /** Fill color. Defaults to the primary token. */\n color = input<string>('');\n /** Renders fully rounded ends. */\n rounded = input<boolean>(true);\n\n /** Fill width/style for the determinate mode, empty for indeterminate. */\n protected fillStyle = computed(() => {\n if (this.indeterminate()) return {};\n return { width: `${Math.max(0, Math.min(100, this.progress()))}%` };\n });\n}\n","import { Component, input, ChangeDetectionStrategy } from '@angular/core';\nimport { LoadingSpinnerComponent } from './loading-spinner.component';\n\n/** Backdrop style behind the overlay: none, light or dark. */\nexport type LoadingOverlayBackdrop = 'transparent' | 'light' | 'dark';\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/** Wraps content and shows a centered spinner over it while `visible` is true. */\n@Component({\n selector: 'shk-loading-overlay',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LoadingSpinnerComponent],\n template: `\n <div\n class=\"shk-loading-overlay\"\n [class.shk-loading-overlay-light]=\"backdrop() === 'light'\"\n [class.shk-loading-overlay-dark]=\"backdrop() === 'dark'\"\n >\n <ng-content></ng-content>\n @if (visible()) {\n <div class=\"shk-loading-overlay-layer\">\n <shk-loading-spinner [size]=\"spinnerSize()\" [color]=\"color()\" [label]=\"message()\" />\n </div>\n }\n </div>\n `,\n styles: [\n `\n :host {\n display: block;\n }\n .shk-loading-overlay {\n position: relative;\n min-height: 1.5rem;\n }\n .shk-loading-overlay-layer {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n }\n .shk-loading-overlay-light .shk-loading-overlay-layer {\n background-color: rgba(255, 255, 255, 0.65);\n }\n :host-context(.dark) .shk-loading-overlay-light .shk-loading-overlay-layer {\n background-color: rgba(0, 0, 0, 0.55);\n }\n .shk-loading-overlay-dark .shk-loading-overlay-layer {\n background-color: rgba(0, 0, 0, 0.4);\n }\n `,\n ],\n})\nexport class LoadingOverlayComponent {\n /** Controls whether the spinner layer is shown. */\n visible = input<boolean>(false);\n /** Optional text under the spinner. */\n message = input<string>('');\n /** Diameter of the spinner. */\n spinnerSize = input<string>('2.5rem');\n /** Spinner color. Defaults to the primary token. */\n color = input<string>('');\n /** Backdrop behind the spinner. */\n backdrop = input<LoadingOverlayBackdrop>('transparent');\n}\n","import { Component, computed, input, ChangeDetectionStrategy } 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/** Bouncing dots loading indicator. */\n@Component({\n selector: 'shk-loading-dots',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span class=\"shk-loading-dots\" role=\"status\" aria-label=\"Cargando\">\n @for (dot of dots(); track $index) {\n <span\n class=\"shk-loading-dot\"\n [style]=\"{\n width: size(),\n height: size(),\n backgroundColor: color() || undefined,\n animationDelay: $index * 0.12 + 's',\n }\"\n ></span>\n }\n </span>\n @if (label()) {\n <span class=\"shk-loading-dots-label\">{{ label() }}</span>\n }\n `,\n styles: [\n `\n :host {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n }\n .shk-loading-dots {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n }\n .shk-loading-dot {\n border-radius: 9999px;\n background-color: var(--shk-primary-600);\n animation: shk-loading-dots-bounce 1.4s ease-in-out infinite;\n }\n .shk-loading-dots-label {\n font-size: 0.8125rem;\n color: var(--shk-surface-500);\n }\n @keyframes shk-loading-dots-bounce {\n 0%,\n 80%,\n 100% {\n transform: scale(0.6);\n opacity: 0.5;\n }\n 40% {\n transform: scale(1);\n opacity: 1;\n }\n }\n `,\n ],\n})\nexport class LoadingDotsComponent {\n /** Diameter of each dot. */\n size = input<string>('0.5rem');\n /** Dot color. Defaults to the primary token. */\n color = input<string>('');\n /** Number of dots. */\n count = input<number>(3);\n /** Optional text shown next to the dots. */\n label = input<string>('');\n\n /** Array of dot indices to render based on the `count` input. */\n protected dots = computed(() => Array.from({ length: Math.max(1, this.count()) }));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;;;AAIG;AAEH;MA2Da,uBAAuB,CAAA;AA1DpC,IAAA,WAAA,GAAA;;AA4DE,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,MAAM,2EAAC;;AAE5B,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,CAAC,gFAAC;;AAE5B,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AAC1B,IAAA;+GATY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,uBAAuB,EAAA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AAA,EAAA,CAAA,+bAAA,CAAA,EAAA;;;AC7BH;;AAEG;;;;"}
@@ -1,8 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { signal, inject, DestroyRef, computed, Injectable, ChangeDetectorRef, viewChild, ViewContainerRef, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
- import { LucideX, LucideDynamicIcon } from '@lucide/angular';
5
- import { FormControl, FormGroup } from '@angular/forms';
4
+ import { LucideX, ShkIconDirective } from 'shirkasoft-ui-components/icons';
6
5
  import { TranslocoService } from '@jsverse/transloco';
7
6
  import { Router } from '@angular/router';
8
7
  import { NotificationService } from 'shirkasoft-ui-components/notification';
@@ -56,19 +55,14 @@ class ModalService {
56
55
  clear() {
57
56
  this.stackSignal.set([]);
58
57
  }
59
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
60
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ModalService, providedIn: 'root' }); }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
59
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: ModalService, providedIn: 'root' }); }
61
60
  }
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ModalService, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: ModalService, decorators: [{
63
62
  type: Injectable,
64
63
  args: [{ providedIn: 'root' }]
65
64
  }], ctorParameters: () => [] });
66
65
 
67
- /**
68
- * Shirkasoft UI Components.
69
- * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
70
- * Belongs to Shirkasoft.
71
- */
72
66
  /**
73
67
  * Modal dialog that renders a dynamically loaded component, tracks its
74
68
  * form validity and submit outputs, and delegates accept/cancel to the
@@ -191,7 +185,9 @@ class ModalComponent {
191
185
  getFormValue() {
192
186
  const instance = this.componentRef?.instance;
193
187
  const form = instance ? this.getForm(instance) : null;
194
- return form ? form.getRawValue() : undefined;
188
+ if (!form)
189
+ return undefined;
190
+ return this.isSignalField(form) ? form.value() : form.getRawValue?.();
195
191
  }
196
192
  /** Closes the modal, calling the dynamic component's `handleCancel` if any. */
197
193
  closeModal() {
@@ -228,10 +224,17 @@ class ModalComponent {
228
224
  const instance = this.componentRef.instance;
229
225
  const form = this.getForm(instance);
230
226
  if (form) {
231
- this.markAllAsTouched(form);
227
+ // Signal Forms: markAsTouched() already cascades to every descendant.
228
+ if (this.isSignalField(form))
229
+ form.markAsTouched();
230
+ else
231
+ this.markAllAsTouched(form);
232
232
  this.componentRef.changeDetectorRef.markForCheck();
233
233
  this.cdr.markForCheck();
234
- if (this.hasRealErrors(form)) {
234
+ const invalid = this.isSignalField(form)
235
+ ? form.errorSummary().some((error) => error.kind !== 'warning')
236
+ : this.hasRealErrors(form);
237
+ if (invalid) {
235
238
  this.notificationSrv.addNotification(this.transloco.translate('modal.formInvalid'), 'warning');
236
239
  return;
237
240
  }
@@ -241,7 +244,11 @@ class ModalComponent {
241
244
  this.cdr.markForCheck();
242
245
  instance.onSubmit();
243
246
  }
244
- /** Resolves the dynamic component's form (property or getter function). */
247
+ /**
248
+ * Resolves the dynamic component's form: a reactive form (property or getter
249
+ * function) or a Signal Forms `FieldTree`, which is itself a function that
250
+ * returns its `FieldState`.
251
+ */
245
252
  getForm(instance) {
246
253
  if (!instance['form'])
247
254
  return null;
@@ -249,28 +256,32 @@ class ModalComponent {
249
256
  ? instance['form']()
250
257
  : instance['form'];
251
258
  }
259
+ /** True when the form is a Signal Forms `FieldState`, not a reactive control. */
260
+ isSignalField(form) {
261
+ return typeof form.errorSummary === 'function';
262
+ }
252
263
  /** Recursively checks for real validation errors (ignoring 'warning'). */
253
264
  hasRealErrors(control) {
254
- if (control instanceof FormControl) {
255
- const errors = control.errors;
256
- return errors
257
- ? Object.keys(errors).some((key) => key !== 'warning')
258
- : false;
259
- }
260
- const groupErrors = control.errors;
261
- if (groupErrors &&
262
- Object.keys(groupErrors).some((key) => key !== 'warning')) {
265
+ const errors = control.errors;
266
+ if (errors && Object.keys(errors).some((key) => key !== 'warning')) {
263
267
  return true;
264
268
  }
265
- return Object.values(control.controls).some((child) => this.hasRealErrors(child));
269
+ // A leaf control has no `controls`; groups and arrays do.
270
+ return this.childControls(control).some((child) => this.hasRealErrors(child));
266
271
  }
267
272
  /** Marks a form (and all its descendants) as touched. */
268
273
  markAllAsTouched(control) {
269
274
  control.markAsTouched();
270
275
  control.updateValueAndValidity({ onlySelf: true, emitEvent: true });
271
- if (control instanceof FormGroup) {
272
- Object.values(control.controls).forEach((child) => this.markAllAsTouched(child));
273
- }
276
+ this.childControls(control).forEach((child) => this.markAllAsTouched(child));
277
+ }
278
+ /** Normalizes `controls` (record for groups, array for form arrays). */
279
+ childControls(control) {
280
+ if (!control.controls)
281
+ return [];
282
+ return Array.isArray(control.controls)
283
+ ? control.controls
284
+ : Object.values(control.controls);
274
285
  }
275
286
  /**
276
287
  * True when the component exposes `onSubmit`. The `form` is optional:
@@ -288,12 +299,12 @@ class ModalComponent {
288
299
  this.componentRef = null;
289
300
  }
290
301
  }
291
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
292
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: ModalComponent, isStandalone: true, selector: "shk-modal", viewQueries: [{ propertyName: "container", first: true, predicate: ["dynamicContent"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "@if (visible()) {\n <div\n class=\"shk-dialog-backdrop fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-40 p-4 pt-4 overflow-y-auto _shk-scrollbar\"\n (click)=\"closeModal()\"\n >\n <div\n class=\"shk-dialog-panel bg-white dark:[background-color:var(--shk-surface-100)] rounded-xl shadow-2xl overflow-hidden flex flex-col\"\n [class.w-[95vw]]=\"isExpanded()\"\n [class.h-[90vh]]=\"isExpanded()\"\n [class.w-full]=\"!isExpanded()\"\n [style.max-width]=\"isExpanded() ? undefined : computedModalWidth()\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"shk-modal-header flex items-center justify-between px-6 pt-4 pb-2 shrink-0\">\n <span class=\"font-semibold text-lg _shk-text-surface-800 dark:[color:var(--shk-surface-800)]\">{{ title() }}</span>\n <div class=\"flex items-center gap-2\">\n @if (showExpandButton()) {\n <button\n type=\"button\"\n (click)=\"toggleExpand()\"\n class=\"p-1.5 rounded-lg hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 dark:[color:var(--shk-surface-500)] transition-colors\"\n >\n @if (isExpanded()) {\n <svg [lucideIcon]=\"getIcon('minimize-2')\" class=\"w-4 h-4\"></svg>\n } @else {\n <svg [lucideIcon]=\"getIcon('maximize-2')\" class=\"w-4 h-4\"></svg>\n }\n </button>\n }\n <button\n type=\"button\"\n (click)=\"closeModal()\"\n class=\"p-1.5 rounded-lg hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 dark:[color:var(--shk-surface-500)] transition-colors\"\n >\n <svg [lucideIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n </button>\n </div>\n </div>\n\n <div class=\"overflow-y-auto px-6 py-4 flex-1 max-h-[70vh] _shk-scrollbar\">\n <ng-container #dynamicContent></ng-container>\n </div>\n\n @if (modalButtonsVisible()) {\n <hr class=\"border-t _shk-border dark:[border-color:var(--shk-surface-200)] shrink-0\" />\n <div class=\"flex justify-end gap-3 px-6 py-4 shrink-0\">\n <button\n type=\"button\"\n (click)=\"closeModal()\"\n [disabled]=\"loading()\"\n class=\"px-4 py-2 text-sm font-semibold _shk-text-surface-600 dark:[color:var(--shk-surface-600)] _shk-bg-surface-100 dark:[background-color:var(--shk-surface-200)] hover:[background-color:var(--shk-surface-200)] dark:hover:[background-color:var(--shk-surface-300)] rounded-lg transition-colors flex items-center gap-2 disabled:opacity-50\"\n >\n <svg [lucideIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n {{ cancelLabel() }}\n </button>\n <button\n type=\"button\"\n (click)=\"onAccept()\"\n [disabled]=\"loading()\"\n class=\"px-4 py-2 text-sm font-semibold _shk-text-white _shk-bg-emerald hover:[background-color:var(--shk-emerald-700)] rounded-lg shadow-md transition-all flex items-center gap-2 disabled:opacity-50\"\n >\n @if (loading()) {\n <svg [lucideIcon]=\"getIcon('loader-circle')\" class=\"w-4 h-4 animate-spin\"></svg>\n } @else {\n <svg [lucideIcon]=\"getIcon('check')\" class=\"w-4 h-4\"></svg>\n }\n {{ acceptLabel() }}\n </button>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".shk-dialog-backdrop{animation:shk-dialog-fade .15s ease-out}.shk-dialog-panel{border:1px solid var(--shk-surface-200);box-shadow:0 24px 48px -12px #00000040,0 8px 16px -8px #0000001a;animation:shk-dialog-in .2s cubic-bezier(.21,1.02,.73,1)}:host-context(.dark) .shk-dialog-panel{box-shadow:0 24px 48px -12px #000000b3,0 8px 16px -8px #00000080}@keyframes shk-dialog-fade{0%{opacity:0}}@keyframes shk-dialog-in{0%{opacity:0;transform:translateY(8px) scale(.97)}}.shk-modal-header{padding-top:1.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
302
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
303
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.27", type: ModalComponent, isStandalone: true, selector: "shk-modal", viewQueries: [{ propertyName: "container", first: true, predicate: ["dynamicContent"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "@if (visible()) {\n <div\n class=\"shk-dialog-backdrop fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-40 p-4 pt-4 overflow-y-auto _shk-scrollbar\"\n (click)=\"closeModal()\"\n >\n <div\n class=\"shk-dialog-panel bg-white dark:[background-color:var(--shk-surface-100)] rounded-xl shadow-2xl overflow-hidden flex flex-col\"\n [class.w-[95vw]]=\"isExpanded()\"\n [class.h-[90vh]]=\"isExpanded()\"\n [class.w-full]=\"!isExpanded()\"\n [style.max-width]=\"isExpanded() ? undefined : computedModalWidth()\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"shk-modal-header flex items-center justify-between px-6 pt-4 pb-2 shrink-0\">\n <span class=\"font-semibold text-lg _shk-text-surface-800\">{{ title() }}</span>\n <div class=\"flex items-center gap-2\">\n @if (showExpandButton()) {\n <button\n type=\"button\"\n (click)=\"toggleExpand()\"\n class=\"p-1.5 rounded-lg hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 transition-colors\"\n >\n @if (isExpanded()) {\n <svg [shkIcon]=\"getIcon('minimize-2')\" class=\"w-4 h-4\"></svg>\n } @else {\n <svg [shkIcon]=\"getIcon('maximize-2')\" class=\"w-4 h-4\"></svg>\n }\n </button>\n }\n <button\n type=\"button\"\n (click)=\"closeModal()\"\n class=\"p-1.5 rounded-lg hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 transition-colors\"\n >\n <svg [shkIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n </button>\n </div>\n </div>\n\n <div class=\"overflow-y-auto px-6 py-4 flex-1 max-h-[70vh] _shk-scrollbar\">\n <ng-container #dynamicContent></ng-container>\n </div>\n\n @if (modalButtonsVisible()) {\n <hr class=\"border-t _shk-border shrink-0\" />\n <div class=\"flex justify-end gap-3 px-6 py-4 shrink-0\">\n <button\n type=\"button\"\n (click)=\"closeModal()\"\n [disabled]=\"loading()\"\n class=\"px-4 py-2 text-sm font-semibold _shk-text-surface-600 _shk-bg-surface-100 hover:[background-color:var(--shk-surface-200)] dark:hover:[background-color:var(--shk-surface-300)] rounded-lg transition-colors flex items-center gap-2 disabled:opacity-50\"\n >\n <svg [shkIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n {{ cancelLabel() }}\n </button>\n <button\n type=\"button\"\n (click)=\"onAccept()\"\n [disabled]=\"loading()\"\n class=\"px-4 py-2 text-sm font-semibold _shk-text-white _shk-bg-emerald hover:[background-color:var(--shk-emerald-700)] rounded-lg shadow-md transition-all flex items-center gap-2 disabled:opacity-50\"\n >\n @if (loading()) {\n <svg [shkIcon]=\"getIcon('loader-circle')\" class=\"w-4 h-4 animate-spin\"></svg>\n } @else {\n <svg [shkIcon]=\"getIcon('check')\" class=\"w-4 h-4\"></svg>\n }\n {{ acceptLabel() }}\n </button>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".shk-dialog-backdrop{animation:shk-dialog-fade .15s ease-out}.shk-dialog-panel{border:1px solid var(--shk-surface-200);box-shadow:0 24px 48px -12px #00000040,0 8px 16px -8px #0000001a;animation:shk-dialog-in .2s cubic-bezier(.21,1.02,.73,1)}:host-context(.dark) .shk-dialog-panel{box-shadow:0 24px 48px -12px #000000b3,0 8px 16px -8px #00000080}@keyframes shk-dialog-fade{0%{opacity:0}}@keyframes shk-dialog-in{0%{opacity:0;transform:translateY(8px) scale(.97)}}.shk-modal-header{padding-top:1.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: ShkIconDirective, selector: "svg[shkIcon]", inputs: ["shkIcon", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
293
304
  }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ModalComponent, decorators: [{
305
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: ModalComponent, decorators: [{
295
306
  type: Component,
296
- args: [{ selector: 'shk-modal', standalone: true, imports: [CommonModule, LucideDynamicIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (visible()) {\n <div\n class=\"shk-dialog-backdrop fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-40 p-4 pt-4 overflow-y-auto _shk-scrollbar\"\n (click)=\"closeModal()\"\n >\n <div\n class=\"shk-dialog-panel bg-white dark:[background-color:var(--shk-surface-100)] rounded-xl shadow-2xl overflow-hidden flex flex-col\"\n [class.w-[95vw]]=\"isExpanded()\"\n [class.h-[90vh]]=\"isExpanded()\"\n [class.w-full]=\"!isExpanded()\"\n [style.max-width]=\"isExpanded() ? undefined : computedModalWidth()\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"shk-modal-header flex items-center justify-between px-6 pt-4 pb-2 shrink-0\">\n <span class=\"font-semibold text-lg _shk-text-surface-800 dark:[color:var(--shk-surface-800)]\">{{ title() }}</span>\n <div class=\"flex items-center gap-2\">\n @if (showExpandButton()) {\n <button\n type=\"button\"\n (click)=\"toggleExpand()\"\n class=\"p-1.5 rounded-lg hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 dark:[color:var(--shk-surface-500)] transition-colors\"\n >\n @if (isExpanded()) {\n <svg [lucideIcon]=\"getIcon('minimize-2')\" class=\"w-4 h-4\"></svg>\n } @else {\n <svg [lucideIcon]=\"getIcon('maximize-2')\" class=\"w-4 h-4\"></svg>\n }\n </button>\n }\n <button\n type=\"button\"\n (click)=\"closeModal()\"\n class=\"p-1.5 rounded-lg hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 dark:[color:var(--shk-surface-500)] transition-colors\"\n >\n <svg [lucideIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n </button>\n </div>\n </div>\n\n <div class=\"overflow-y-auto px-6 py-4 flex-1 max-h-[70vh] _shk-scrollbar\">\n <ng-container #dynamicContent></ng-container>\n </div>\n\n @if (modalButtonsVisible()) {\n <hr class=\"border-t _shk-border dark:[border-color:var(--shk-surface-200)] shrink-0\" />\n <div class=\"flex justify-end gap-3 px-6 py-4 shrink-0\">\n <button\n type=\"button\"\n (click)=\"closeModal()\"\n [disabled]=\"loading()\"\n class=\"px-4 py-2 text-sm font-semibold _shk-text-surface-600 dark:[color:var(--shk-surface-600)] _shk-bg-surface-100 dark:[background-color:var(--shk-surface-200)] hover:[background-color:var(--shk-surface-200)] dark:hover:[background-color:var(--shk-surface-300)] rounded-lg transition-colors flex items-center gap-2 disabled:opacity-50\"\n >\n <svg [lucideIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n {{ cancelLabel() }}\n </button>\n <button\n type=\"button\"\n (click)=\"onAccept()\"\n [disabled]=\"loading()\"\n class=\"px-4 py-2 text-sm font-semibold _shk-text-white _shk-bg-emerald hover:[background-color:var(--shk-emerald-700)] rounded-lg shadow-md transition-all flex items-center gap-2 disabled:opacity-50\"\n >\n @if (loading()) {\n <svg [lucideIcon]=\"getIcon('loader-circle')\" class=\"w-4 h-4 animate-spin\"></svg>\n } @else {\n <svg [lucideIcon]=\"getIcon('check')\" class=\"w-4 h-4\"></svg>\n }\n {{ acceptLabel() }}\n </button>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".shk-dialog-backdrop{animation:shk-dialog-fade .15s ease-out}.shk-dialog-panel{border:1px solid var(--shk-surface-200);box-shadow:0 24px 48px -12px #00000040,0 8px 16px -8px #0000001a;animation:shk-dialog-in .2s cubic-bezier(.21,1.02,.73,1)}:host-context(.dark) .shk-dialog-panel{box-shadow:0 24px 48px -12px #000000b3,0 8px 16px -8px #00000080}@keyframes shk-dialog-fade{0%{opacity:0}}@keyframes shk-dialog-in{0%{opacity:0;transform:translateY(8px) scale(.97)}}.shk-modal-header{padding-top:1.25rem}\n"] }]
307
+ args: [{ selector: 'shk-modal', imports: [CommonModule, ShkIconDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (visible()) {\n <div\n class=\"shk-dialog-backdrop fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-40 p-4 pt-4 overflow-y-auto _shk-scrollbar\"\n (click)=\"closeModal()\"\n >\n <div\n class=\"shk-dialog-panel bg-white dark:[background-color:var(--shk-surface-100)] rounded-xl shadow-2xl overflow-hidden flex flex-col\"\n [class.w-[95vw]]=\"isExpanded()\"\n [class.h-[90vh]]=\"isExpanded()\"\n [class.w-full]=\"!isExpanded()\"\n [style.max-width]=\"isExpanded() ? undefined : computedModalWidth()\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"shk-modal-header flex items-center justify-between px-6 pt-4 pb-2 shrink-0\">\n <span class=\"font-semibold text-lg _shk-text-surface-800\">{{ title() }}</span>\n <div class=\"flex items-center gap-2\">\n @if (showExpandButton()) {\n <button\n type=\"button\"\n (click)=\"toggleExpand()\"\n class=\"p-1.5 rounded-lg hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 transition-colors\"\n >\n @if (isExpanded()) {\n <svg [shkIcon]=\"getIcon('minimize-2')\" class=\"w-4 h-4\"></svg>\n } @else {\n <svg [shkIcon]=\"getIcon('maximize-2')\" class=\"w-4 h-4\"></svg>\n }\n </button>\n }\n <button\n type=\"button\"\n (click)=\"closeModal()\"\n class=\"p-1.5 rounded-lg hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 transition-colors\"\n >\n <svg [shkIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n </button>\n </div>\n </div>\n\n <div class=\"overflow-y-auto px-6 py-4 flex-1 max-h-[70vh] _shk-scrollbar\">\n <ng-container #dynamicContent></ng-container>\n </div>\n\n @if (modalButtonsVisible()) {\n <hr class=\"border-t _shk-border shrink-0\" />\n <div class=\"flex justify-end gap-3 px-6 py-4 shrink-0\">\n <button\n type=\"button\"\n (click)=\"closeModal()\"\n [disabled]=\"loading()\"\n class=\"px-4 py-2 text-sm font-semibold _shk-text-surface-600 _shk-bg-surface-100 hover:[background-color:var(--shk-surface-200)] dark:hover:[background-color:var(--shk-surface-300)] rounded-lg transition-colors flex items-center gap-2 disabled:opacity-50\"\n >\n <svg [shkIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n {{ cancelLabel() }}\n </button>\n <button\n type=\"button\"\n (click)=\"onAccept()\"\n [disabled]=\"loading()\"\n class=\"px-4 py-2 text-sm font-semibold _shk-text-white _shk-bg-emerald hover:[background-color:var(--shk-emerald-700)] rounded-lg shadow-md transition-all flex items-center gap-2 disabled:opacity-50\"\n >\n @if (loading()) {\n <svg [shkIcon]=\"getIcon('loader-circle')\" class=\"w-4 h-4 animate-spin\"></svg>\n } @else {\n <svg [shkIcon]=\"getIcon('check')\" class=\"w-4 h-4\"></svg>\n }\n {{ acceptLabel() }}\n </button>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".shk-dialog-backdrop{animation:shk-dialog-fade .15s ease-out}.shk-dialog-panel{border:1px solid var(--shk-surface-200);box-shadow:0 24px 48px -12px #00000040,0 8px 16px -8px #0000001a;animation:shk-dialog-in .2s cubic-bezier(.21,1.02,.73,1)}:host-context(.dark) .shk-dialog-panel{box-shadow:0 24px 48px -12px #000000b3,0 8px 16px -8px #00000080}@keyframes shk-dialog-fade{0%{opacity:0}}@keyframes shk-dialog-in{0%{opacity:0;transform:translateY(8px) scale(.97)}}.shk-modal-header{padding-top:1.25rem}\n"] }]
297
308
  }], ctorParameters: () => [], propDecorators: { container: [{ type: i0.ViewChild, args: ['dynamicContent', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
298
309
 
299
310
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"shirkasoft-ui-components-modal.mjs","sources":["../../../projects/ui-components/modal/modal.service.ts","../../../projects/ui-components/modal/modal.component.ts","../../../projects/ui-components/modal/modal.component.html","../../../projects/ui-components/modal/shirkasoft-ui-components-modal.ts"],"sourcesContent":["import { Injectable, Type, signal, computed, inject, DestroyRef } from '@angular/core';\nimport { Router } from '@angular/router';\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/** Options for opening a modal through the service. */\nexport interface ModalConfig {\n /** Title shown in the modal header. */\n title: string;\n /** Component rendered inside the modal body. */\n component: Type<any>;\n /** Data passed to the modal component via inputs. */\n data?: Record<string, any>;\n /** Modal width (CSS value). */\n width?: string;\n /** Whether the accept/cancel buttons are shown. */\n showButtons?: boolean;\n /** Whether the expand (fullscreen) button is shown. */\n showExpandButton?: boolean;\n /** Label of the accept button. */\n acceptLabel?: string;\n /** Label of the cancel button. */\n cancelLabel?: string;\n /** Optional callback invoked when the modal closes. */\n onClose?: () => void;\n /**\n * Optional callback invoked when the modal is accepted, with the payload of\n * the dynamic component: the value emitted by its `submitSuccess` output or,\n * when it emits nothing, the raw value of its `form`. Omit it to keep the\n * previous behaviour.\n */\n onAccept?: (payload: any) => void;\n}\n\n/**\n * Global modal manager. Opens modals on a stack, exposing reactive access to\n * the current modal and the top-most opened config.\n */\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n /** Stack of open modals (top-most renders on top). */\n private stackSignal = signal<ModalConfig[]>([]);\n /** Counter emitted on each close, used to trigger close animations. */\n private closeRequestSignal = signal<number>(0);\n private router = inject(Router);\n private destroyRef = inject(DestroyRef);\n\n constructor() {\n // Close all modals on navigation and on service destruction.\n this.router.events.subscribe(() => {\n this.stackSignal.set([]);\n });\n this.destroyRef.onDestroy(() => this.stackSignal.set([]));\n }\n\n /** Reactive list of open modals. */\n modalStack = computed(() => this.stackSignal());\n /** Top-most modal on the stack, or null. */\n currentModal = computed<ModalConfig | null>(() => {\n const stack = this.stackSignal();\n return stack.length > 0 ? stack[stack.length - 1] : null;\n });\n /** Reactive close-request counter. */\n closeRequest = computed(() => this.closeRequestSignal());\n\n /** Opens a new modal on top of the stack. */\n open(config: ModalConfig) {\n this.stackSignal.update((stack) => [...stack, config]);\n }\n\n /** Alias of `close()` used by the accept button. */\n accept() {\n this.close();\n }\n\n /** Closes the top-most modal, invoking its onClose callback. */\n close() {\n const stack = this.stackSignal();\n if (stack.length > 0) {\n stack[stack.length - 1]?.onClose?.();\n this.stackSignal.set(stack.slice(0, -1));\n this.closeRequestSignal.update((v) => v + 1);\n }\n }\n\n /** Closes all open modals at once. */\n clear() {\n this.stackSignal.set([]);\n }\n}","import {\n Component,\n viewChild,\n ViewContainerRef,\n ComponentRef,\n inject,\n effect,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n signal,\n DestroyRef,\n computed,\n untracked,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n LucideDynamicIcon,\n LucideX,\n} from '@lucide/angular';\nimport { Subscription } from 'rxjs';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { TranslocoService } from '@jsverse/transloco';\nimport { ModalService, ModalConfig } from './modal.service';\nimport { NotificationService } from 'shirkasoft-ui-components/notification';\nimport { getIcon as getIconFromCentral } from 'shirkasoft-ui-components/utils';\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 * Modal dialog that renders a dynamically loaded component, tracks its\n * form validity and submit outputs, and delegates accept/cancel to the\n * shared ModalService.\n */\n@Component({\n selector: 'shk-modal',\n standalone: true,\n imports: [CommonModule, LucideDynamicIcon],\n templateUrl: './modal.component.html',\n styles: [\n `\n /* Own enter animation (the animate-in/zoom-in utilities used before\n need a Tailwind plugin that isn't part of the library). */\n .shk-dialog-backdrop {\n animation: shk-dialog-fade 0.15s ease-out;\n }\n .shk-dialog-panel {\n border: 1px solid var(--shk-surface-200);\n box-shadow:\n 0 24px 48px -12px rgba(0, 0, 0, 0.25),\n 0 8px 16px -8px rgba(0, 0, 0, 0.1);\n animation: shk-dialog-in 0.2s cubic-bezier(0.21, 1.02, 0.73, 1);\n }\n :host-context(.dark) .shk-dialog-panel {\n box-shadow:\n 0 24px 48px -12px rgba(0, 0, 0, 0.7),\n 0 8px 16px -8px rgba(0, 0, 0, 0.5);\n }\n @keyframes shk-dialog-fade {\n from {\n opacity: 0;\n }\n }\n @keyframes shk-dialog-in {\n from {\n opacity: 0;\n transform: translateY(8px) scale(0.97);\n }\n }\n .shk-modal-header {\n padding-top: 1.25rem;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalComponent {\n protected getIcon = (name: any) => getIconFromCentral(name, LucideX);\n\n private notificationSrv = inject(NotificationService);\n private destroyRef = inject(DestroyRef);\n private modalSrv = inject(ModalService);\n private transloco = inject(TranslocoService);\n private cdr = inject(ChangeDetectorRef);\n\n /** Reference where the dynamic content is rendered. */\n container = viewChild('dynamicContent', { read: ViewContainerRef });\n\n /** Configuration of the modal currently open (from the service). */\n currentConfig = signal<ModalConfig | null>(null);\n /** Modal title. */\n title = signal('');\n /** Whether the modal is visible. */\n visible = signal(false);\n /** Generic loading flag for the footer actions. */\n loading = signal(false);\n /** Whether the accept action is being processed. */\n isProcessing = signal(false);\n /** Whether the modal is currently expanded to fullscreen. */\n isExpanded = signal(false);\n /** True when the dynamic component reports a valid form. */\n isFormValid = signal(false);\n\n /** Reference to the dynamically created component. */\n componentRef: ComponentRef<any> | null = null;\n /** Subscriptions to the dynamic component outputs. */\n private subscriptions: Subscription[] = [];\n\n /** Width of the modal (fullscreen when expanded). */\n computedModalWidth = computed(() => {\n return this.isExpanded() ? '100vw' : (this.currentConfig()?.width ?? '560px');\n });\n\n /** Whether the footer buttons should be rendered. */\n modalButtonsVisible = computed(() => this.currentConfig()?.showButtons ?? true);\n /** Whether the expand/fullscreen button is shown. */\n showExpandButton = computed(() => this.currentConfig()?.showExpandButton ?? false);\n /** Resolved cancel button label. */\n cancelLabel = computed(() => this.currentConfig()?.cancelLabel || 'Cancelar');\n /** Resolved accept button label. */\n acceptLabel = computed(() => this.currentConfig()?.acceptLabel || 'Aceptar');\n\n constructor() {\n effect(() => {\n const config = this.modalSrv.currentModal();\n if (config) {\n this.currentConfig.set(config);\n this.title.set(config.title);\n this.isExpanded.set(false);\n this.visible.set(true);\n this.isProcessing.set(false);\n this.loading.set(false);\n this.cdr.markForCheck();\n setTimeout(() => {\n untracked(() => this.loadComponent(config));\n });\n } else {\n this.visible.set(false);\n this.currentConfig.set(null);\n this.cdr.markForCheck();\n }\n });\n\n this.destroyRef.onDestroy(() => this.cleanup());\n }\n\n /** Updates visibility when the backdrop/close controls change. */\n onVisibleChange(show: boolean) {\n this.visible.set(show);\n if (!show) {\n this.closeModal();\n }\n this.cdr.markForCheck();\n }\n\n /** Creates the dynamic component and wires its form/submit outputs. */\n private loadComponent(config: ModalConfig) {\n const containerRef = this.container();\n if (!containerRef) return;\n\n this.cleanup();\n containerRef.clear();\n\n this.componentRef = containerRef.createComponent(config.component);\n\n if (config.data) {\n Object.entries(config.data).forEach(([key, value]) => {\n this.componentRef?.setInput(key, value);\n });\n }\n\n const instance = this.componentRef.instance;\n\n this.subscribeToOutput(instance.formValid, (valid: boolean) => {\n this.isFormValid.set(valid);\n this.cdr.markForCheck();\n });\n this.subscribeToOutput(instance.submitSuccess, (payload: any) =>\n this.handleSubmit(true, payload),\n );\n this.subscribeToOutput(instance.submitError, () =>\n this.handleSubmit(false),\n );\n\n this.componentRef.changeDetectorRef.markForCheck();\n this.cdr.markForCheck();\n }\n\n /** Subscribes to a dynamic component output if it exists. */\n private subscribeToOutput(output: any, callback: (value: any) => void) {\n if (output?.subscribe) {\n this.subscriptions.push(output.subscribe(callback));\n }\n }\n\n /** Finalizes the submit flow, accepting the modal on success. */\n private handleSubmit(success: boolean, payload?: any) {\n this.isProcessing.set(false);\n this.loading.set(false);\n this.cdr.markForCheck();\n if (success) {\n // Hand the payload to `onAccept` (only when the modal config defines it).\n const onAccept = this.currentConfig()?.onAccept;\n if (onAccept) {\n untracked(() => onAccept(payload !== undefined ? payload : this.getFormValue()));\n }\n untracked(() => this.modalSrv.accept());\n }\n }\n\n /** Raw value of the dynamic component's form, or undefined when it has none. */\n private getFormValue(): any {\n const instance = this.componentRef?.instance;\n const form = instance ? this.getForm(instance) : null;\n return form ? form.getRawValue() : undefined;\n }\n\n /** Closes the modal, calling the dynamic component's `handleCancel` if any. */\n closeModal() {\n if (this.componentRef?.instance?.handleCancel) {\n this.componentRef.instance.handleCancel();\n }\n this.doClose();\n }\n\n /** Performs the actual close sequence and cleanup. */\n doClose() {\n this.visible.set(false);\n this.isProcessing.set(false);\n this.loading.set(false);\n if (this.isExpanded()) {\n this.isExpanded.set(false);\n }\n this.cdr.markForCheck();\n setTimeout(() => {\n this.cleanup();\n this.modalSrv.close();\n }, 100);\n }\n\n /** Toggles between normal width and fullscreen. */\n toggleExpand() {\n this.isExpanded.update((v) => !v);\n this.cdr.markForCheck();\n }\n\n /** Validates the dynamic component form and triggers its `onSubmit`. */\n onAccept() {\n if (!this.componentRef || !this.isDynamicComponent(this.componentRef.instance)) return;\n\n if (this.isProcessing()) return;\n\n const instance = this.componentRef.instance;\n const form = this.getForm(instance);\n\n if (form) {\n this.markAllAsTouched(form);\n this.componentRef.changeDetectorRef.markForCheck();\n this.cdr.markForCheck();\n\n if (this.hasRealErrors(form)) {\n this.notificationSrv.addNotification(\n this.transloco.translate('modal.formInvalid'),\n 'warning',\n );\n return;\n }\n }\n\n this.isProcessing.set(true);\n this.loading.set(true);\n this.cdr.markForCheck();\n instance.onSubmit();\n }\n\n /** Resolves the dynamic component's form (property or getter function). */\n private getForm(instance: any): FormGroup | null {\n if (!instance['form']) return null;\n return typeof instance['form'] === 'function'\n ? instance['form']()\n : instance['form'];\n }\n\n /** Recursively checks for real validation errors (ignoring 'warning'). */\n private hasRealErrors(control: FormGroup | FormControl): boolean {\n if (control instanceof FormControl) {\n const errors = control.errors;\n return errors\n ? Object.keys(errors).some((key) => key !== 'warning')\n : false;\n }\n\n const groupErrors = control.errors;\n if (\n groupErrors &&\n Object.keys(groupErrors).some((key) => key !== 'warning')\n ) {\n return true;\n }\n\n return Object.values(control.controls).some((child) =>\n this.hasRealErrors(child as any),\n );\n }\n\n /** Marks a form (and all its descendants) as touched. */\n private markAllAsTouched(control: FormGroup | FormControl): void {\n control.markAsTouched();\n control.updateValueAndValidity({ onlySelf: true, emitEvent: true });\n\n if (control instanceof FormGroup) {\n Object.values(control.controls).forEach((child) =>\n this.markAllAsTouched(child as any),\n );\n }\n }\n\n /**\n * True when the component exposes `onSubmit`. The `form` is optional:\n * without it, validation is skipped and `onSubmit` runs directly.\n */\n private isDynamicComponent(instance: any): boolean {\n return typeof instance?.onSubmit === 'function';\n }\n\n /** Unsubscribes outputs and destroys the dynamic component. */\n private cleanup() {\n this.subscriptions.forEach((sub) => sub.unsubscribe());\n this.subscriptions = [];\n\n if (this.componentRef) {\n this.componentRef.destroy();\n this.componentRef = null;\n }\n }\n}\n","@if (visible()) {\n <div\n class=\"shk-dialog-backdrop fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-40 p-4 pt-4 overflow-y-auto _shk-scrollbar\"\n (click)=\"closeModal()\"\n >\n <div\n class=\"shk-dialog-panel bg-white dark:[background-color:var(--shk-surface-100)] rounded-xl shadow-2xl overflow-hidden flex flex-col\"\n [class.w-[95vw]]=\"isExpanded()\"\n [class.h-[90vh]]=\"isExpanded()\"\n [class.w-full]=\"!isExpanded()\"\n [style.max-width]=\"isExpanded() ? undefined : computedModalWidth()\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"shk-modal-header flex items-center justify-between px-6 pt-4 pb-2 shrink-0\">\n <span class=\"font-semibold text-lg _shk-text-surface-800 dark:[color:var(--shk-surface-800)]\">{{ title() }}</span>\n <div class=\"flex items-center gap-2\">\n @if (showExpandButton()) {\n <button\n type=\"button\"\n (click)=\"toggleExpand()\"\n class=\"p-1.5 rounded-lg hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 dark:[color:var(--shk-surface-500)] transition-colors\"\n >\n @if (isExpanded()) {\n <svg [lucideIcon]=\"getIcon('minimize-2')\" class=\"w-4 h-4\"></svg>\n } @else {\n <svg [lucideIcon]=\"getIcon('maximize-2')\" class=\"w-4 h-4\"></svg>\n }\n </button>\n }\n <button\n type=\"button\"\n (click)=\"closeModal()\"\n class=\"p-1.5 rounded-lg hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 dark:[color:var(--shk-surface-500)] transition-colors\"\n >\n <svg [lucideIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n </button>\n </div>\n </div>\n\n <div class=\"overflow-y-auto px-6 py-4 flex-1 max-h-[70vh] _shk-scrollbar\">\n <ng-container #dynamicContent></ng-container>\n </div>\n\n @if (modalButtonsVisible()) {\n <hr class=\"border-t _shk-border dark:[border-color:var(--shk-surface-200)] shrink-0\" />\n <div class=\"flex justify-end gap-3 px-6 py-4 shrink-0\">\n <button\n type=\"button\"\n (click)=\"closeModal()\"\n [disabled]=\"loading()\"\n class=\"px-4 py-2 text-sm font-semibold _shk-text-surface-600 dark:[color:var(--shk-surface-600)] _shk-bg-surface-100 dark:[background-color:var(--shk-surface-200)] hover:[background-color:var(--shk-surface-200)] dark:hover:[background-color:var(--shk-surface-300)] rounded-lg transition-colors flex items-center gap-2 disabled:opacity-50\"\n >\n <svg [lucideIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n {{ cancelLabel() }}\n </button>\n <button\n type=\"button\"\n (click)=\"onAccept()\"\n [disabled]=\"loading()\"\n class=\"px-4 py-2 text-sm font-semibold _shk-text-white _shk-bg-emerald hover:[background-color:var(--shk-emerald-700)] rounded-lg shadow-md transition-all flex items-center gap-2 disabled:opacity-50\"\n >\n @if (loading()) {\n <svg [lucideIcon]=\"getIcon('loader-circle')\" class=\"w-4 h-4 animate-spin\"></svg>\n } @else {\n <svg [lucideIcon]=\"getIcon('check')\" class=\"w-4 h-4\"></svg>\n }\n {{ acceptLabel() }}\n </button>\n </div>\n }\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getIconFromCentral"],"mappings":";;;;;;;;;;AAsCA;;;AAGG;MAEU,YAAY,CAAA;AAQvB,IAAA,WAAA,GAAA;;AANQ,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAgB,EAAE,kFAAC;;AAEvC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAS,CAAC,yFAAC;AACtC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;QAWvC,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAC;;AAE/C,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAqB,MAAK;AAC/C,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE;YAChC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI;AAC1D,QAAA,CAAC,mFAAC;;QAEF,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,kBAAkB,EAAE,EAAA,IAAA,SAAA,GAA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mjs","sources":["../../../projects/ui-components/modal/modal.service.ts","../../../projects/ui-components/modal/modal.component.ts","../../../projects/ui-components/modal/modal.component.html","../../../projects/ui-components/modal/shirkasoft-ui-components-modal.ts"],"sourcesContent":["import { Injectable, Type, signal, computed, inject, DestroyRef } from '@angular/core';\nimport { Router } from '@angular/router';\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/** Options for opening a modal through the service. */\nexport interface ModalConfig {\n /** Title shown in the modal header. */\n title: string;\n /** Component rendered inside the modal body. */\n component: Type<any>;\n /** Data passed to the modal component via inputs. */\n data?: Record<string, any>;\n /** Modal width (CSS value). */\n width?: string;\n /** Whether the accept/cancel buttons are shown. */\n showButtons?: boolean;\n /** Whether the expand (fullscreen) button is shown. */\n showExpandButton?: boolean;\n /** Label of the accept button. */\n acceptLabel?: string;\n /** Label of the cancel button. */\n cancelLabel?: string;\n /** Optional callback invoked when the modal closes. */\n onClose?: () => void;\n /**\n * Optional callback invoked when the modal is accepted, with the payload of\n * the dynamic component: the value emitted by its `submitSuccess` output or,\n * when it emits nothing, the raw value of its `form`. Omit it to keep the\n * previous behaviour.\n */\n onAccept?: (payload: any) => void;\n}\n\n/**\n * Global modal manager. Opens modals on a stack, exposing reactive access to\n * the current modal and the top-most opened config.\n */\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n /** Stack of open modals (top-most renders on top). */\n private stackSignal = signal<ModalConfig[]>([]);\n /** Counter emitted on each close, used to trigger close animations. */\n private closeRequestSignal = signal<number>(0);\n private router = inject(Router);\n private destroyRef = inject(DestroyRef);\n\n constructor() {\n // Close all modals on navigation and on service destruction.\n this.router.events.subscribe(() => {\n this.stackSignal.set([]);\n });\n this.destroyRef.onDestroy(() => this.stackSignal.set([]));\n }\n\n /** Reactive list of open modals. */\n modalStack = computed(() => this.stackSignal());\n /** Top-most modal on the stack, or null. */\n currentModal = computed<ModalConfig | null>(() => {\n const stack = this.stackSignal();\n return stack.length > 0 ? stack[stack.length - 1] : null;\n });\n /** Reactive close-request counter. */\n closeRequest = computed(() => this.closeRequestSignal());\n\n /** Opens a new modal on top of the stack. */\n open(config: ModalConfig) {\n this.stackSignal.update((stack) => [...stack, config]);\n }\n\n /** Alias of `close()` used by the accept button. */\n accept() {\n this.close();\n }\n\n /** Closes the top-most modal, invoking its onClose callback. */\n close() {\n const stack = this.stackSignal();\n if (stack.length > 0) {\n stack[stack.length - 1]?.onClose?.();\n this.stackSignal.set(stack.slice(0, -1));\n this.closeRequestSignal.update((v) => v + 1);\n }\n }\n\n /** Closes all open modals at once. */\n clear() {\n this.stackSignal.set([]);\n }\n}","import {\n Component,\n viewChild,\n ViewContainerRef,\n ComponentRef,\n inject,\n effect,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n signal,\n DestroyRef,\n computed,\n untracked,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n ShkIconDirective,\n LucideX,\n} from 'shirkasoft-ui-components/icons';\nimport { Subscription } from 'rxjs';\nimport { TranslocoService } from '@jsverse/transloco';\nimport { ModalService, ModalConfig } from './modal.service';\nimport { NotificationService } from 'shirkasoft-ui-components/notification';\nimport { getIcon as getIconFromCentral } from 'shirkasoft-ui-components/utils';\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 * Minimal structural view of a reactive-form control.\n *\n * The modal only needs to walk errors and mark controls as touched, so it\n * checks the shape instead of importing `@angular/forms` at runtime. This\n * keeps the whole forms package out of apps that use the modal without forms.\n */\ninterface FormControlLike {\n errors: Record<string, unknown> | null;\n controls?: Record<string, FormControlLike> | FormControlLike[];\n markAsTouched(): void;\n updateValueAndValidity(options?: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n }): void;\n getRawValue?(): unknown;\n}\n\n/**\n * Minimal structural view of an Angular Signal Forms `FieldState`\n * (what calling a `FieldTree` such as `form(model)` returns).\n */\ninterface SignalFieldStateLike {\n value(): unknown;\n errorSummary(): ReadonlyArray<{ kind: string }>;\n markAsTouched(): void;\n}\n\n/** A form the modal knows how to validate. */\ntype ModalForm = FormControlLike | SignalFieldStateLike;\n\n/**\n * Modal dialog that renders a dynamically loaded component, tracks its\n * form validity and submit outputs, and delegates accept/cancel to the\n * shared ModalService.\n */\n@Component({\n selector: 'shk-modal',\n imports: [CommonModule, ShkIconDirective],\n templateUrl: './modal.component.html',\n styles: [\n `\n /* Own enter animation (the animate-in/zoom-in utilities used before\n need a Tailwind plugin that isn't part of the library). */\n .shk-dialog-backdrop {\n animation: shk-dialog-fade 0.15s ease-out;\n }\n .shk-dialog-panel {\n border: 1px solid var(--shk-surface-200);\n box-shadow:\n 0 24px 48px -12px rgba(0, 0, 0, 0.25),\n 0 8px 16px -8px rgba(0, 0, 0, 0.1);\n animation: shk-dialog-in 0.2s cubic-bezier(0.21, 1.02, 0.73, 1);\n }\n :host-context(.dark) .shk-dialog-panel {\n box-shadow:\n 0 24px 48px -12px rgba(0, 0, 0, 0.7),\n 0 8px 16px -8px rgba(0, 0, 0, 0.5);\n }\n @keyframes shk-dialog-fade {\n from {\n opacity: 0;\n }\n }\n @keyframes shk-dialog-in {\n from {\n opacity: 0;\n transform: translateY(8px) scale(0.97);\n }\n }\n .shk-modal-header {\n padding-top: 1.25rem;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalComponent {\n protected getIcon = (name: any) => getIconFromCentral(name, LucideX);\n\n private notificationSrv = inject(NotificationService);\n private destroyRef = inject(DestroyRef);\n private modalSrv = inject(ModalService);\n private transloco = inject(TranslocoService);\n private cdr = inject(ChangeDetectorRef);\n\n /** Reference where the dynamic content is rendered. */\n container = viewChild('dynamicContent', { read: ViewContainerRef });\n\n /** Configuration of the modal currently open (from the service). */\n currentConfig = signal<ModalConfig | null>(null);\n /** Modal title. */\n title = signal('');\n /** Whether the modal is visible. */\n visible = signal(false);\n /** Generic loading flag for the footer actions. */\n loading = signal(false);\n /** Whether the accept action is being processed. */\n isProcessing = signal(false);\n /** Whether the modal is currently expanded to fullscreen. */\n isExpanded = signal(false);\n /** True when the dynamic component reports a valid form. */\n isFormValid = signal(false);\n\n /** Reference to the dynamically created component. */\n componentRef: ComponentRef<any> | null = null;\n /** Subscriptions to the dynamic component outputs. */\n private subscriptions: Subscription[] = [];\n\n /** Width of the modal (fullscreen when expanded). */\n computedModalWidth = computed(() => {\n return this.isExpanded() ? '100vw' : (this.currentConfig()?.width ?? '560px');\n });\n\n /** Whether the footer buttons should be rendered. */\n modalButtonsVisible = computed(() => this.currentConfig()?.showButtons ?? true);\n /** Whether the expand/fullscreen button is shown. */\n showExpandButton = computed(() => this.currentConfig()?.showExpandButton ?? false);\n /** Resolved cancel button label. */\n cancelLabel = computed(() => this.currentConfig()?.cancelLabel || 'Cancelar');\n /** Resolved accept button label. */\n acceptLabel = computed(() => this.currentConfig()?.acceptLabel || 'Aceptar');\n\n constructor() {\n effect(() => {\n const config = this.modalSrv.currentModal();\n if (config) {\n this.currentConfig.set(config);\n this.title.set(config.title);\n this.isExpanded.set(false);\n this.visible.set(true);\n this.isProcessing.set(false);\n this.loading.set(false);\n this.cdr.markForCheck();\n setTimeout(() => {\n untracked(() => this.loadComponent(config));\n });\n } else {\n this.visible.set(false);\n this.currentConfig.set(null);\n this.cdr.markForCheck();\n }\n });\n\n this.destroyRef.onDestroy(() => this.cleanup());\n }\n\n /** Updates visibility when the backdrop/close controls change. */\n onVisibleChange(show: boolean) {\n this.visible.set(show);\n if (!show) {\n this.closeModal();\n }\n this.cdr.markForCheck();\n }\n\n /** Creates the dynamic component and wires its form/submit outputs. */\n private loadComponent(config: ModalConfig) {\n const containerRef = this.container();\n if (!containerRef) return;\n\n this.cleanup();\n containerRef.clear();\n\n this.componentRef = containerRef.createComponent(config.component);\n\n if (config.data) {\n Object.entries(config.data).forEach(([key, value]) => {\n this.componentRef?.setInput(key, value);\n });\n }\n\n const instance = this.componentRef.instance;\n\n this.subscribeToOutput(instance.formValid, (valid: boolean) => {\n this.isFormValid.set(valid);\n this.cdr.markForCheck();\n });\n this.subscribeToOutput(instance.submitSuccess, (payload: any) =>\n this.handleSubmit(true, payload),\n );\n this.subscribeToOutput(instance.submitError, () =>\n this.handleSubmit(false),\n );\n\n this.componentRef.changeDetectorRef.markForCheck();\n this.cdr.markForCheck();\n }\n\n /** Subscribes to a dynamic component output if it exists. */\n private subscribeToOutput(output: any, callback: (value: any) => void) {\n if (output?.subscribe) {\n this.subscriptions.push(output.subscribe(callback));\n }\n }\n\n /** Finalizes the submit flow, accepting the modal on success. */\n private handleSubmit(success: boolean, payload?: any) {\n this.isProcessing.set(false);\n this.loading.set(false);\n this.cdr.markForCheck();\n if (success) {\n // Hand the payload to `onAccept` (only when the modal config defines it).\n const onAccept = this.currentConfig()?.onAccept;\n if (onAccept) {\n untracked(() => onAccept(payload !== undefined ? payload : this.getFormValue()));\n }\n untracked(() => this.modalSrv.accept());\n }\n }\n\n /** Raw value of the dynamic component's form, or undefined when it has none. */\n private getFormValue(): any {\n const instance = this.componentRef?.instance;\n const form = instance ? this.getForm(instance) : null;\n if (!form) return undefined;\n return this.isSignalField(form) ? form.value() : form.getRawValue?.();\n }\n\n /** Closes the modal, calling the dynamic component's `handleCancel` if any. */\n closeModal() {\n if (this.componentRef?.instance?.handleCancel) {\n this.componentRef.instance.handleCancel();\n }\n this.doClose();\n }\n\n /** Performs the actual close sequence and cleanup. */\n doClose() {\n this.visible.set(false);\n this.isProcessing.set(false);\n this.loading.set(false);\n if (this.isExpanded()) {\n this.isExpanded.set(false);\n }\n this.cdr.markForCheck();\n setTimeout(() => {\n this.cleanup();\n this.modalSrv.close();\n }, 100);\n }\n\n /** Toggles between normal width and fullscreen. */\n toggleExpand() {\n this.isExpanded.update((v) => !v);\n this.cdr.markForCheck();\n }\n\n /** Validates the dynamic component form and triggers its `onSubmit`. */\n onAccept() {\n if (!this.componentRef || !this.isDynamicComponent(this.componentRef.instance)) return;\n\n if (this.isProcessing()) return;\n\n const instance = this.componentRef.instance;\n const form = this.getForm(instance);\n\n if (form) {\n // Signal Forms: markAsTouched() already cascades to every descendant.\n if (this.isSignalField(form)) form.markAsTouched();\n else this.markAllAsTouched(form);\n this.componentRef.changeDetectorRef.markForCheck();\n this.cdr.markForCheck();\n\n const invalid = this.isSignalField(form)\n ? form.errorSummary().some((error) => error.kind !== 'warning')\n : this.hasRealErrors(form);\n if (invalid) {\n this.notificationSrv.addNotification(\n this.transloco.translate('modal.formInvalid'),\n 'warning',\n );\n return;\n }\n }\n\n this.isProcessing.set(true);\n this.loading.set(true);\n this.cdr.markForCheck();\n instance.onSubmit();\n }\n\n /**\n * Resolves the dynamic component's form: a reactive form (property or getter\n * function) or a Signal Forms `FieldTree`, which is itself a function that\n * returns its `FieldState`.\n */\n private getForm(instance: any): ModalForm | null {\n if (!instance['form']) return null;\n return typeof instance['form'] === 'function'\n ? instance['form']()\n : instance['form'];\n }\n\n /** True when the form is a Signal Forms `FieldState`, not a reactive control. */\n private isSignalField(form: ModalForm): form is SignalFieldStateLike {\n return typeof (form as SignalFieldStateLike).errorSummary === 'function';\n }\n\n /** Recursively checks for real validation errors (ignoring 'warning'). */\n private hasRealErrors(control: FormControlLike): boolean {\n const errors = control.errors;\n if (errors && Object.keys(errors).some((key) => key !== 'warning')) {\n return true;\n }\n\n // A leaf control has no `controls`; groups and arrays do.\n return this.childControls(control).some((child) =>\n this.hasRealErrors(child),\n );\n }\n\n /** Marks a form (and all its descendants) as touched. */\n private markAllAsTouched(control: FormControlLike): void {\n control.markAsTouched();\n control.updateValueAndValidity({ onlySelf: true, emitEvent: true });\n\n this.childControls(control).forEach((child) =>\n this.markAllAsTouched(child),\n );\n }\n\n /** Normalizes `controls` (record for groups, array for form arrays). */\n private childControls(control: FormControlLike): FormControlLike[] {\n if (!control.controls) return [];\n return Array.isArray(control.controls)\n ? control.controls\n : Object.values(control.controls);\n }\n\n /**\n * True when the component exposes `onSubmit`. The `form` is optional:\n * without it, validation is skipped and `onSubmit` runs directly.\n */\n private isDynamicComponent(instance: any): boolean {\n return typeof instance?.onSubmit === 'function';\n }\n\n /** Unsubscribes outputs and destroys the dynamic component. */\n private cleanup() {\n this.subscriptions.forEach((sub) => sub.unsubscribe());\n this.subscriptions = [];\n\n if (this.componentRef) {\n this.componentRef.destroy();\n this.componentRef = null;\n }\n }\n}\n","@if (visible()) {\n <div\n class=\"shk-dialog-backdrop fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-40 p-4 pt-4 overflow-y-auto _shk-scrollbar\"\n (click)=\"closeModal()\"\n >\n <div\n class=\"shk-dialog-panel bg-white dark:[background-color:var(--shk-surface-100)] rounded-xl shadow-2xl overflow-hidden flex flex-col\"\n [class.w-[95vw]]=\"isExpanded()\"\n [class.h-[90vh]]=\"isExpanded()\"\n [class.w-full]=\"!isExpanded()\"\n [style.max-width]=\"isExpanded() ? undefined : computedModalWidth()\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"shk-modal-header flex items-center justify-between px-6 pt-4 pb-2 shrink-0\">\n <span class=\"font-semibold text-lg _shk-text-surface-800\">{{ title() }}</span>\n <div class=\"flex items-center gap-2\">\n @if (showExpandButton()) {\n <button\n type=\"button\"\n (click)=\"toggleExpand()\"\n class=\"p-1.5 rounded-lg hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 transition-colors\"\n >\n @if (isExpanded()) {\n <svg [shkIcon]=\"getIcon('minimize-2')\" class=\"w-4 h-4\"></svg>\n } @else {\n <svg [shkIcon]=\"getIcon('maximize-2')\" class=\"w-4 h-4\"></svg>\n }\n </button>\n }\n <button\n type=\"button\"\n (click)=\"closeModal()\"\n class=\"p-1.5 rounded-lg hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 transition-colors\"\n >\n <svg [shkIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n </button>\n </div>\n </div>\n\n <div class=\"overflow-y-auto px-6 py-4 flex-1 max-h-[70vh] _shk-scrollbar\">\n <ng-container #dynamicContent></ng-container>\n </div>\n\n @if (modalButtonsVisible()) {\n <hr class=\"border-t _shk-border shrink-0\" />\n <div class=\"flex justify-end gap-3 px-6 py-4 shrink-0\">\n <button\n type=\"button\"\n (click)=\"closeModal()\"\n [disabled]=\"loading()\"\n class=\"px-4 py-2 text-sm font-semibold _shk-text-surface-600 _shk-bg-surface-100 hover:[background-color:var(--shk-surface-200)] dark:hover:[background-color:var(--shk-surface-300)] rounded-lg transition-colors flex items-center gap-2 disabled:opacity-50\"\n >\n <svg [shkIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n {{ cancelLabel() }}\n </button>\n <button\n type=\"button\"\n (click)=\"onAccept()\"\n [disabled]=\"loading()\"\n class=\"px-4 py-2 text-sm font-semibold _shk-text-white _shk-bg-emerald hover:[background-color:var(--shk-emerald-700)] rounded-lg shadow-md transition-all flex items-center gap-2 disabled:opacity-50\"\n >\n @if (loading()) {\n <svg [shkIcon]=\"getIcon('loader-circle')\" class=\"w-4 h-4 animate-spin\"></svg>\n } @else {\n <svg [shkIcon]=\"getIcon('check')\" class=\"w-4 h-4\"></svg>\n }\n {{ acceptLabel() }}\n </button>\n </div>\n }\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getIconFromCentral"],"mappings":";;;;;;;;;AAsCA;;;AAGG;MAEU,YAAY,CAAA;AAQvB,IAAA,WAAA,GAAA;;AANQ,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAgB,EAAE,kFAAC;;AAEvC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAS,CAAC,yFAAC;AACtC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAA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A,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECtHlE,u1GAyEA,EAAA,MAAA,EAAA,CAAA,wfAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDJY,YAAY,+BAAE,gBAAgB,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,aAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAuC7B,cAAc,EAAA,UAAA,EAAA,CAAA;kBAzC1B,SAAS;+BACE,WAAW,EAAA,OAAA,EACZ,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,eAAA,EAqCxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,u1GAAA,EAAA,MAAA,EAAA,CAAA,wfAAA,CAAA,EAAA;AAYzB,SAAA,CAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,gBAAgB,EAAA,EAAA,GAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtHpE;;AAEG;;;;"}
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { signal, Injectable, input, inject, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import { LucideInfo, LucideDynamicIcon } from '@lucide/angular';
5
+ import { LucideInfo, ShkIconDirective } from 'shirkasoft-ui-components/icons';
6
6
  import { getIcon } from 'shirkasoft-ui-components/utils';
7
7
 
8
8
  /**
@@ -64,10 +64,10 @@ class NotificationService {
64
64
  clearAll() {
65
65
  this.notificationsSignal.set([]);
66
66
  }
67
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
68
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: NotificationService, providedIn: 'root' }); }
67
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
68
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: NotificationService, providedIn: 'root' }); }
69
69
  }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: NotificationService, decorators: [{
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: NotificationService, decorators: [{
71
71
  type: Injectable,
72
72
  args: [{
73
73
  providedIn: 'root',
@@ -127,12 +127,12 @@ class NotificationComponent {
127
127
  roundProgress(progress) {
128
128
  return Math.round(progress || 0);
129
129
  }
130
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: NotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
131
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: NotificationComponent, isStandalone: true, selector: "shk-notification", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"positionClass()\">\n @for (notification of sortedNotifications(); track notification.id) {\n <div\n class=\"shk-toast mb-4\"\n [ngClass]=\"'shk-toast-' + notification.type\"\n role=\"alert\"\n >\n <div class=\"shk-toast-icon\">\n <svg [lucideIcon]=\"getIcon(getNotificationIcon(notification.type))\"></svg>\n </div>\n <div class=\"shk-toast-message\">\n {{ notification.message }}\n </div>\n <button\n type=\"button\"\n (click)=\"removeNotification(notification)\"\n aria-label=\"Close\"\n class=\"shk-toast-close\"\n >\n <svg [lucideIcon]=\"getIcon('x')\"></svg>\n </button>\n </div>\n }\n</div>\n", styles: [".shk-toast{--shk-toast-accent: var(--shk-info-600);display:flex;align-items:center;gap:.75rem;width:100%;min-width:320px;max-width:28rem;padding:.75rem .75rem .75rem .875rem;border-radius:.75rem;background-color:#fff;border:1px solid var(--shk-surface-200);color:var(--shk-surface-800);box-shadow:0 12px 32px -8px #0000002e,0 4px 10px -4px #00000014;animation:shk-toast-in .25s cubic-bezier(.21,1.02,.73,1)}:host-context(.dark) .shk-toast{background-color:var(--shk-surface-100);border-color:var(--shk-surface-200);box-shadow:0 12px 32px -8px #0009,0 4px 10px -4px #0006}.shk-toast-success{--shk-toast-accent: var(--shk-success-600)}.shk-toast-error{--shk-toast-accent: var(--shk-error-600)}:host-context(.dark) .shk-toast-error{--shk-toast-accent: var(--shk-error-500)}.shk-toast-warning{--shk-toast-accent: var(--shk-warning-600)}.shk-toast-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:2rem;height:2rem;border-radius:9999px;color:var(--shk-toast-accent);background-color:color-mix(in srgb,var(--shk-toast-accent) 14%,transparent)}.shk-toast-icon svg{width:1.125rem;height:1.125rem}.shk-toast-message{flex:1;min-width:0;font-size:.875rem;line-height:1.25rem;font-weight:500;overflow-wrap:break-word}.shk-toast-close{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.75rem;height:1.75rem;border-radius:.375rem;background:transparent;color:var(--shk-surface-400);transition:background-color .15s ease,color .15s ease}.shk-toast-close:hover{color:var(--shk-surface-700);background-color:var(--shk-surface-100)}:host-context(.dark) .shk-toast-close:hover{background-color:var(--shk-surface-200)}.shk-toast-close:focus-visible{outline:none;box-shadow:0 0 0 2px color-mix(in srgb,var(--shk-primary-500) 45%,transparent)}.shk-toast-close svg{width:1rem;height:1rem}@keyframes shk-toast-in{0%{opacity:0;transform:translateY(-8px) scale(.97)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
130
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: NotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
131
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.27", type: NotificationComponent, isStandalone: true, selector: "shk-notification", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"positionClass()\">\n @for (notification of sortedNotifications(); track notification.id) {\n <div\n class=\"shk-toast mb-4\"\n [ngClass]=\"'shk-toast-' + notification.type\"\n role=\"alert\"\n >\n <div class=\"shk-toast-icon\">\n <svg [shkIcon]=\"getIcon(getNotificationIcon(notification.type))\"></svg>\n </div>\n <div class=\"shk-toast-message\">\n {{ notification.message }}\n </div>\n <button\n type=\"button\"\n (click)=\"removeNotification(notification)\"\n aria-label=\"Close\"\n class=\"shk-toast-close\"\n >\n <svg [shkIcon]=\"getIcon('x')\"></svg>\n </button>\n </div>\n }\n</div>\n", styles: [".shk-toast{--shk-toast-accent: var(--shk-info-600);display:flex;align-items:center;gap:.75rem;width:100%;min-width:320px;max-width:28rem;padding:.75rem .75rem .75rem .875rem;border-radius:.75rem;background-color:#fff;border:1px solid var(--shk-surface-200);color:var(--shk-surface-800);box-shadow:0 12px 32px -8px #0000002e,0 4px 10px -4px #00000014;animation:shk-toast-in .25s cubic-bezier(.21,1.02,.73,1)}:host-context(.dark) .shk-toast{background-color:var(--shk-surface-100);border-color:var(--shk-surface-200);box-shadow:0 12px 32px -8px #0009,0 4px 10px -4px #0006}.shk-toast-success{--shk-toast-accent: var(--shk-success-600)}.shk-toast-error{--shk-toast-accent: var(--shk-error-600)}:host-context(.dark) .shk-toast-error{--shk-toast-accent: var(--shk-error-500)}.shk-toast-warning{--shk-toast-accent: var(--shk-warning-600)}.shk-toast-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:2rem;height:2rem;border-radius:9999px;color:var(--shk-toast-accent);background-color:color-mix(in srgb,var(--shk-toast-accent) 14%,transparent)}.shk-toast-icon svg{width:1.125rem;height:1.125rem}.shk-toast-message{flex:1;min-width:0;font-size:.875rem;line-height:1.25rem;font-weight:500;overflow-wrap:break-word}.shk-toast-close{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.75rem;height:1.75rem;border-radius:.375rem;background:transparent;color:var(--shk-surface-400);transition:background-color .15s ease,color .15s ease}.shk-toast-close:hover{color:var(--shk-surface-700);background-color:var(--shk-surface-100)}:host-context(.dark) .shk-toast-close:hover{background-color:var(--shk-surface-200)}.shk-toast-close:focus-visible{outline:none;box-shadow:0 0 0 2px color-mix(in srgb,var(--shk-primary-500) 45%,transparent)}.shk-toast-close svg{width:1rem;height:1rem}@keyframes shk-toast-in{0%{opacity:0;transform:translateY(-8px) scale(.97)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: ShkIconDirective, selector: "svg[shkIcon]", inputs: ["shkIcon", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
132
132
  }
133
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: NotificationComponent, decorators: [{
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: NotificationComponent, decorators: [{
134
134
  type: Component,
135
- args: [{ selector: 'shk-notification', standalone: true, imports: [CommonModule, LucideDynamicIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"positionClass()\">\n @for (notification of sortedNotifications(); track notification.id) {\n <div\n class=\"shk-toast mb-4\"\n [ngClass]=\"'shk-toast-' + notification.type\"\n role=\"alert\"\n >\n <div class=\"shk-toast-icon\">\n <svg [lucideIcon]=\"getIcon(getNotificationIcon(notification.type))\"></svg>\n </div>\n <div class=\"shk-toast-message\">\n {{ notification.message }}\n </div>\n <button\n type=\"button\"\n (click)=\"removeNotification(notification)\"\n aria-label=\"Close\"\n class=\"shk-toast-close\"\n >\n <svg [lucideIcon]=\"getIcon('x')\"></svg>\n </button>\n </div>\n }\n</div>\n", styles: [".shk-toast{--shk-toast-accent: var(--shk-info-600);display:flex;align-items:center;gap:.75rem;width:100%;min-width:320px;max-width:28rem;padding:.75rem .75rem .75rem .875rem;border-radius:.75rem;background-color:#fff;border:1px solid var(--shk-surface-200);color:var(--shk-surface-800);box-shadow:0 12px 32px -8px #0000002e,0 4px 10px -4px #00000014;animation:shk-toast-in .25s cubic-bezier(.21,1.02,.73,1)}:host-context(.dark) .shk-toast{background-color:var(--shk-surface-100);border-color:var(--shk-surface-200);box-shadow:0 12px 32px -8px #0009,0 4px 10px -4px #0006}.shk-toast-success{--shk-toast-accent: var(--shk-success-600)}.shk-toast-error{--shk-toast-accent: var(--shk-error-600)}:host-context(.dark) .shk-toast-error{--shk-toast-accent: var(--shk-error-500)}.shk-toast-warning{--shk-toast-accent: var(--shk-warning-600)}.shk-toast-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:2rem;height:2rem;border-radius:9999px;color:var(--shk-toast-accent);background-color:color-mix(in srgb,var(--shk-toast-accent) 14%,transparent)}.shk-toast-icon svg{width:1.125rem;height:1.125rem}.shk-toast-message{flex:1;min-width:0;font-size:.875rem;line-height:1.25rem;font-weight:500;overflow-wrap:break-word}.shk-toast-close{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.75rem;height:1.75rem;border-radius:.375rem;background:transparent;color:var(--shk-surface-400);transition:background-color .15s ease,color .15s ease}.shk-toast-close:hover{color:var(--shk-surface-700);background-color:var(--shk-surface-100)}:host-context(.dark) .shk-toast-close:hover{background-color:var(--shk-surface-200)}.shk-toast-close:focus-visible{outline:none;box-shadow:0 0 0 2px color-mix(in srgb,var(--shk-primary-500) 45%,transparent)}.shk-toast-close svg{width:1rem;height:1rem}@keyframes shk-toast-in{0%{opacity:0;transform:translateY(-8px) scale(.97)}}\n"] }]
135
+ args: [{ selector: 'shk-notification', imports: [CommonModule, ShkIconDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"positionClass()\">\n @for (notification of sortedNotifications(); track notification.id) {\n <div\n class=\"shk-toast mb-4\"\n [ngClass]=\"'shk-toast-' + notification.type\"\n role=\"alert\"\n >\n <div class=\"shk-toast-icon\">\n <svg [shkIcon]=\"getIcon(getNotificationIcon(notification.type))\"></svg>\n </div>\n <div class=\"shk-toast-message\">\n {{ notification.message }}\n </div>\n <button\n type=\"button\"\n (click)=\"removeNotification(notification)\"\n aria-label=\"Close\"\n class=\"shk-toast-close\"\n >\n <svg [shkIcon]=\"getIcon('x')\"></svg>\n </button>\n </div>\n }\n</div>\n", styles: [".shk-toast{--shk-toast-accent: var(--shk-info-600);display:flex;align-items:center;gap:.75rem;width:100%;min-width:320px;max-width:28rem;padding:.75rem .75rem .75rem .875rem;border-radius:.75rem;background-color:#fff;border:1px solid var(--shk-surface-200);color:var(--shk-surface-800);box-shadow:0 12px 32px -8px #0000002e,0 4px 10px -4px #00000014;animation:shk-toast-in .25s cubic-bezier(.21,1.02,.73,1)}:host-context(.dark) .shk-toast{background-color:var(--shk-surface-100);border-color:var(--shk-surface-200);box-shadow:0 12px 32px -8px #0009,0 4px 10px -4px #0006}.shk-toast-success{--shk-toast-accent: var(--shk-success-600)}.shk-toast-error{--shk-toast-accent: var(--shk-error-600)}:host-context(.dark) .shk-toast-error{--shk-toast-accent: var(--shk-error-500)}.shk-toast-warning{--shk-toast-accent: var(--shk-warning-600)}.shk-toast-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:2rem;height:2rem;border-radius:9999px;color:var(--shk-toast-accent);background-color:color-mix(in srgb,var(--shk-toast-accent) 14%,transparent)}.shk-toast-icon svg{width:1.125rem;height:1.125rem}.shk-toast-message{flex:1;min-width:0;font-size:.875rem;line-height:1.25rem;font-weight:500;overflow-wrap:break-word}.shk-toast-close{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.75rem;height:1.75rem;border-radius:.375rem;background:transparent;color:var(--shk-surface-400);transition:background-color .15s ease,color .15s ease}.shk-toast-close:hover{color:var(--shk-surface-700);background-color:var(--shk-surface-100)}:host-context(.dark) .shk-toast-close:hover{background-color:var(--shk-surface-200)}.shk-toast-close:focus-visible{outline:none;box-shadow:0 0 0 2px color-mix(in srgb,var(--shk-primary-500) 45%,transparent)}.shk-toast-close svg{width:1rem;height:1rem}@keyframes shk-toast-in{0%{opacity:0;transform:translateY(-8px) scale(.97)}}\n"] }]
136
136
  }], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });
137
137
 
138
138
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"shirkasoft-ui-components-notification.mjs","sources":["../../../projects/ui-components/notification/notification.service.ts","../../../projects/ui-components/notification/notification.component.ts","../../../projects/ui-components/notification/notification.component.html","../../../projects/ui-components/notification/shirkasoft-ui-components-notification.ts"],"sourcesContent":["import { Injectable, signal } 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/** Toast-style notification entry. */\nexport interface Notification {\n id: string;\n message: string;\n type: 'success' | 'error' | 'warning' | 'info';\n /** Current progress 0-100 when `showProgress` is true. */\n progress?: number;\n /** Whether the notification renders a progress indicator. */\n showProgress?: boolean;\n}\n\n/**\n * Central notification store. Components push/update/remove notifications\n * reactively through signals for the notification component to render.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class NotificationService {\n /** Reactive list of visible notifications. */\n private notificationsSignal = signal<Notification[]>([]);\n /** Monotonic id counter for new notifications. */\n private currentId = 0;\n\n /** Readonly reactive list of visible notifications. */\n notifications = this.notificationsSignal.asReadonly();\n\n /**\n * Adds a notification and returns its id. When `showProgress` is false and\n * `duration` is positive, it auto-removes after that many ms.\n */\n addNotification(\n message: string,\n type: Notification['type'] = 'info',\n showProgress: boolean = false,\n duration: number = 5000\n ): string {\n const id = (++this.currentId).toString();\n const notification: Notification = {\n id,\n message,\n type,\n progress: showProgress ? 0 : undefined,\n showProgress,\n };\n\n this.notificationsSignal.update((notifications) => [\n ...notifications,\n notification,\n ]);\n\n if (duration > 0 && !showProgress) {\n setTimeout(() => this.removeNotificationById(id), duration);\n }\n\n return id;\n }\n\n /** Updates a progress notification; auto-removes when progress hits 100. */\n updateProgress(notificationId: string, progress: number) {\n const currentNotifications = this.notificationsSignal();\n const index = currentNotifications.findIndex(\n (n) => n.id === notificationId\n );\n\n if (index > -1 && currentNotifications[index].showProgress) {\n const updatedProgress = Math.min(100, Math.max(0, progress));\n\n this.notificationsSignal.update((notifications) =>\n notifications.map((n, i) =>\n i === index ? { ...n, progress: updatedProgress } : n\n )\n );\n\n if (progress >= 100) {\n setTimeout(() => this.removeNotificationById(notificationId), 2000);\n }\n }\n }\n\n /** Removes the given notification. */\n removeNotification(notification: Notification): void {\n this.removeNotificationById(notification.id);\n }\n\n /** Removes the notification with the given id. */\n removeNotificationById(notificationId: string): void {\n this.notificationsSignal.update((notifications) =>\n notifications.filter((n) => n.id !== notificationId)\n );\n }\n\n /** Removes every visible notification. */\n clearAll(): void {\n this.notificationsSignal.set([]);\n }\n}","import {\n Component,\n input,\n inject,\n ChangeDetectionStrategy,\n computed,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n NotificationService,\n Notification,\n} from './notification.service';\nimport {\n LucideDynamicIcon,\n LucideInfo,\n LucideTriangleAlert,\n} from '@lucide/angular';\nimport { getIcon as getIconFromCentral } from 'shirkasoft-ui-components/utils';\n\nexport type NotificationPosition = 'center-top' | 'right-top' | 'left-top';\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 * Toast notification host that renders the notifications pushed through the\n * NotificationService in the configured position.\n */\n@Component({\n selector: 'shk-notification',\n templateUrl: './notification.component.html',\n standalone: true,\n imports: [CommonModule, LucideDynamicIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [\n `\n .shk-toast {\n --shk-toast-accent: var(--shk-info-600);\n display: flex;\n align-items: center;\n gap: 0.75rem;\n width: 100%;\n min-width: 320px;\n max-width: 28rem;\n padding: 0.75rem 0.75rem 0.75rem 0.875rem;\n border-radius: 0.75rem;\n background-color: #fff;\n border: 1px solid var(--shk-surface-200);\n color: var(--shk-surface-800);\n box-shadow:\n 0 12px 32px -8px rgba(0, 0, 0, 0.18),\n 0 4px 10px -4px rgba(0, 0, 0, 0.08);\n animation: shk-toast-in 0.25s cubic-bezier(0.21, 1.02, 0.73, 1);\n }\n :host-context(.dark) .shk-toast {\n background-color: var(--shk-surface-100);\n border-color: var(--shk-surface-200);\n box-shadow:\n 0 12px 32px -8px rgba(0, 0, 0, 0.6),\n 0 4px 10px -4px rgba(0, 0, 0, 0.4);\n }\n .shk-toast-success {\n --shk-toast-accent: var(--shk-success-600);\n }\n .shk-toast-error {\n --shk-toast-accent: var(--shk-error-600);\n }\n :host-context(.dark) .shk-toast-error {\n --shk-toast-accent: var(--shk-error-500);\n }\n .shk-toast-warning {\n --shk-toast-accent: var(--shk-warning-600);\n }\n .shk-toast-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 2rem;\n height: 2rem;\n border-radius: 9999px;\n color: var(--shk-toast-accent);\n background-color: color-mix(in srgb, var(--shk-toast-accent) 14%, transparent);\n }\n .shk-toast-icon svg {\n width: 1.125rem;\n height: 1.125rem;\n }\n .shk-toast-message {\n flex: 1;\n min-width: 0;\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 500;\n overflow-wrap: break-word;\n }\n .shk-toast-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 1.75rem;\n height: 1.75rem;\n border-radius: 0.375rem;\n background: transparent;\n color: var(--shk-surface-400);\n transition:\n background-color 0.15s ease,\n color 0.15s ease;\n }\n .shk-toast-close:hover {\n color: var(--shk-surface-700);\n background-color: var(--shk-surface-100);\n }\n :host-context(.dark) .shk-toast-close:hover {\n background-color: var(--shk-surface-200);\n }\n .shk-toast-close:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--shk-primary-500) 45%, transparent);\n }\n .shk-toast-close svg {\n width: 1rem;\n height: 1rem;\n }\n @keyframes shk-toast-in {\n from {\n opacity: 0;\n transform: translateY(-8px) scale(0.97);\n }\n }\n `,\n ],\n})\nexport class NotificationComponent {\n /** Position of the notification stack: center, right or left top. */\n position = input<NotificationPosition>('center-top');\n\n private notificationService = inject(NotificationService);\n protected getIcon = (name: any) => getIconFromCentral(name, LucideInfo);\n\n /** Maps each notification type to its internal icon name. */\n private readonly iconMap: Record<string, string> = {\n success: 'check',\n error: 'circle-x',\n info: 'info',\n warning: 'triangle-alert',\n };\n\n /** Resolves the icon name for a notification type. */\n getNotificationIcon(type: string): string {\n return this.iconMap[type] || 'info';\n }\n\n /** Live list of active notifications. */\n notifications = this.notificationService.notifications;\n\n /** Notifications sorted with the newest first. */\n sortedNotifications = computed(\n () => [...this.notifications()].reverse(),\n );\n\n /** Removes a notification through the service. */\n removeNotification(notification: Notification): void {\n this.notificationService.removeNotification(notification);\n }\n\n /** Rounds the progress value of a notification. */\n roundProgress(progress: number | undefined): number {\n return Math.round(progress || 0);\n }\n\n /** Whether there are notifications to show. */\n hasNotifications = computed(() => this.notifications().length > 0);\n\n /** CSS classes positioning the stack according to `position`. */\n positionClass = computed(() => {\n const base = 'fixed top-4 z-[9999] space-y-4 sm:space-y-6 sm:top-6 lg:top-8';\n switch (this.position()) {\n case 'right-top':\n return `${base} right-4`;\n case 'left-top':\n return `${base} left-4`;\n default:\n return `${base} left-1/2 -translate-x-1/2`;\n }\n });\n}\n","<div [class]=\"positionClass()\">\n @for (notification of sortedNotifications(); track notification.id) {\n <div\n class=\"shk-toast mb-4\"\n [ngClass]=\"'shk-toast-' + notification.type\"\n role=\"alert\"\n >\n <div class=\"shk-toast-icon\">\n <svg [lucideIcon]=\"getIcon(getNotificationIcon(notification.type))\"></svg>\n </div>\n <div class=\"shk-toast-message\">\n {{ notification.message }}\n </div>\n <button\n type=\"button\"\n (click)=\"removeNotification(notification)\"\n aria-label=\"Close\"\n class=\"shk-toast-close\"\n >\n <svg [lucideIcon]=\"getIcon('x')\"></svg>\n </button>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getIconFromCentral"],"mappings":";;;;;;;AAmBA;;;AAGG;MAIU,mBAAmB,CAAA;AAHhC,IAAA,WAAA,GAAA;;AAKU,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAiB,EAAE,0FAAC;;QAEhD,IAAA,CAAA,SAAS,GAAG,CAAC;;AAGrB,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE;AAuEtD,IAAA;AArEC;;;AAGG;IACH,eAAe,CACb,OAAe,EACf,IAAA,GAA6B,MAAM,EACnC,YAAA,GAAwB,KAAK,EAC7B,QAAA,GAAmB,IAAI,EAAA;QAEvB,MAAM,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE;AACxC,QAAA,MAAM,YAAY,GAAiB;YACjC,EAAE;YACF,OAAO;YACP,IAAI;YACJ,QAAQ,EAAE,YAAY,GAAG,CAAC,GAAG,SAAS;YACtC,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,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzIlC,qtBAwBA,EAAA,MAAA,EAAA,CAAA,23DAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDWY,YAAY,6HAAE,iBAAiB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAsG9B,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBA1GjC,SAAS;+BACE,kBAAkB,EAAA,UAAA,EAEhB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,iBAAiB,CAAC,EAAA,eAAA,EACzB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,qtBAAA,EAAA,MAAA,EAAA,CAAA,23DAAA,CAAA,EAAA;;;AEpCjD;;AAEG;;;;"}
1
+ {"version":3,"file":"shirkasoft-ui-components-notification.mjs","sources":["../../../projects/ui-components/notification/notification.service.ts","../../../projects/ui-components/notification/notification.component.ts","../../../projects/ui-components/notification/notification.component.html","../../../projects/ui-components/notification/shirkasoft-ui-components-notification.ts"],"sourcesContent":["import { Injectable, signal } 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/** Toast-style notification entry. */\nexport interface Notification {\n id: string;\n message: string;\n type: 'success' | 'error' | 'warning' | 'info';\n /** Current progress 0-100 when `showProgress` is true. */\n progress?: number;\n /** Whether the notification renders a progress indicator. */\n showProgress?: boolean;\n}\n\n/**\n * Central notification store. Components push/update/remove notifications\n * reactively through signals for the notification component to render.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class NotificationService {\n /** Reactive list of visible notifications. */\n private notificationsSignal = signal<Notification[]>([]);\n /** Monotonic id counter for new notifications. */\n private currentId = 0;\n\n /** Readonly reactive list of visible notifications. */\n notifications = this.notificationsSignal.asReadonly();\n\n /**\n * Adds a notification and returns its id. When `showProgress` is false and\n * `duration` is positive, it auto-removes after that many ms.\n */\n addNotification(\n message: string,\n type: Notification['type'] = 'info',\n showProgress: boolean = false,\n duration: number = 5000\n ): string {\n const id = (++this.currentId).toString();\n const notification: Notification = {\n id,\n message,\n type,\n progress: showProgress ? 0 : undefined,\n showProgress,\n };\n\n this.notificationsSignal.update((notifications) => [\n ...notifications,\n notification,\n ]);\n\n if (duration > 0 && !showProgress) {\n setTimeout(() => this.removeNotificationById(id), duration);\n }\n\n return id;\n }\n\n /** Updates a progress notification; auto-removes when progress hits 100. */\n updateProgress(notificationId: string, progress: number) {\n const currentNotifications = this.notificationsSignal();\n const index = currentNotifications.findIndex(\n (n) => n.id === notificationId\n );\n\n if (index > -1 && currentNotifications[index].showProgress) {\n const updatedProgress = Math.min(100, Math.max(0, progress));\n\n this.notificationsSignal.update((notifications) =>\n notifications.map((n, i) =>\n i === index ? { ...n, progress: updatedProgress } : n\n )\n );\n\n if (progress >= 100) {\n setTimeout(() => this.removeNotificationById(notificationId), 2000);\n }\n }\n }\n\n /** Removes the given notification. */\n removeNotification(notification: Notification): void {\n this.removeNotificationById(notification.id);\n }\n\n /** Removes the notification with the given id. */\n removeNotificationById(notificationId: string): void {\n this.notificationsSignal.update((notifications) =>\n notifications.filter((n) => n.id !== notificationId)\n );\n }\n\n /** Removes every visible notification. */\n clearAll(): void {\n this.notificationsSignal.set([]);\n }\n}","import {\n Component,\n input,\n inject,\n ChangeDetectionStrategy,\n computed,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n NotificationService,\n Notification,\n} from './notification.service';\nimport {\n ShkIconDirective,\n LucideInfo,\n LucideTriangleAlert,\n} from 'shirkasoft-ui-components/icons';\nimport { getIcon as getIconFromCentral } from 'shirkasoft-ui-components/utils';\n\nexport type NotificationPosition = 'center-top' | 'right-top' | 'left-top';\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 * Toast notification host that renders the notifications pushed through the\n * NotificationService in the configured position.\n */\n@Component({\n selector: 'shk-notification',\n templateUrl: './notification.component.html',\n imports: [CommonModule, ShkIconDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [\n `\n .shk-toast {\n --shk-toast-accent: var(--shk-info-600);\n display: flex;\n align-items: center;\n gap: 0.75rem;\n width: 100%;\n min-width: 320px;\n max-width: 28rem;\n padding: 0.75rem 0.75rem 0.75rem 0.875rem;\n border-radius: 0.75rem;\n background-color: #fff;\n border: 1px solid var(--shk-surface-200);\n color: var(--shk-surface-800);\n box-shadow:\n 0 12px 32px -8px rgba(0, 0, 0, 0.18),\n 0 4px 10px -4px rgba(0, 0, 0, 0.08);\n animation: shk-toast-in 0.25s cubic-bezier(0.21, 1.02, 0.73, 1);\n }\n :host-context(.dark) .shk-toast {\n background-color: var(--shk-surface-100);\n border-color: var(--shk-surface-200);\n box-shadow:\n 0 12px 32px -8px rgba(0, 0, 0, 0.6),\n 0 4px 10px -4px rgba(0, 0, 0, 0.4);\n }\n .shk-toast-success {\n --shk-toast-accent: var(--shk-success-600);\n }\n .shk-toast-error {\n --shk-toast-accent: var(--shk-error-600);\n }\n :host-context(.dark) .shk-toast-error {\n --shk-toast-accent: var(--shk-error-500);\n }\n .shk-toast-warning {\n --shk-toast-accent: var(--shk-warning-600);\n }\n .shk-toast-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 2rem;\n height: 2rem;\n border-radius: 9999px;\n color: var(--shk-toast-accent);\n background-color: color-mix(in srgb, var(--shk-toast-accent) 14%, transparent);\n }\n .shk-toast-icon svg {\n width: 1.125rem;\n height: 1.125rem;\n }\n .shk-toast-message {\n flex: 1;\n min-width: 0;\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 500;\n overflow-wrap: break-word;\n }\n .shk-toast-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 1.75rem;\n height: 1.75rem;\n border-radius: 0.375rem;\n background: transparent;\n color: var(--shk-surface-400);\n transition:\n background-color 0.15s ease,\n color 0.15s ease;\n }\n .shk-toast-close:hover {\n color: var(--shk-surface-700);\n background-color: var(--shk-surface-100);\n }\n :host-context(.dark) .shk-toast-close:hover {\n background-color: var(--shk-surface-200);\n }\n .shk-toast-close:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--shk-primary-500) 45%, transparent);\n }\n .shk-toast-close svg {\n width: 1rem;\n height: 1rem;\n }\n @keyframes shk-toast-in {\n from {\n opacity: 0;\n transform: translateY(-8px) scale(0.97);\n }\n }\n `,\n ],\n})\nexport class NotificationComponent {\n /** Position of the notification stack: center, right or left top. */\n position = input<NotificationPosition>('center-top');\n\n private notificationService = inject(NotificationService);\n protected getIcon = (name: any) => getIconFromCentral(name, LucideInfo);\n\n /** Maps each notification type to its internal icon name. */\n private readonly iconMap: Record<string, string> = {\n success: 'check',\n error: 'circle-x',\n info: 'info',\n warning: 'triangle-alert',\n };\n\n /** Resolves the icon name for a notification type. */\n getNotificationIcon(type: string): string {\n return this.iconMap[type] || 'info';\n }\n\n /** Live list of active notifications. */\n notifications = this.notificationService.notifications;\n\n /** Notifications sorted with the newest first. */\n sortedNotifications = computed(\n () => [...this.notifications()].reverse(),\n );\n\n /** Removes a notification through the service. */\n removeNotification(notification: Notification): void {\n this.notificationService.removeNotification(notification);\n }\n\n /** Rounds the progress value of a notification. */\n roundProgress(progress: number | undefined): number {\n return Math.round(progress || 0);\n }\n\n /** Whether there are notifications to show. */\n hasNotifications = computed(() => this.notifications().length > 0);\n\n /** CSS classes positioning the stack according to `position`. */\n positionClass = computed(() => {\n const base = 'fixed top-4 z-[9999] space-y-4 sm:space-y-6 sm:top-6 lg:top-8';\n switch (this.position()) {\n case 'right-top':\n return `${base} right-4`;\n case 'left-top':\n return `${base} left-4`;\n default:\n return `${base} left-1/2 -translate-x-1/2`;\n }\n });\n}\n","<div [class]=\"positionClass()\">\n @for (notification of sortedNotifications(); track notification.id) {\n <div\n class=\"shk-toast mb-4\"\n [ngClass]=\"'shk-toast-' + notification.type\"\n role=\"alert\"\n >\n <div class=\"shk-toast-icon\">\n <svg [shkIcon]=\"getIcon(getNotificationIcon(notification.type))\"></svg>\n </div>\n <div class=\"shk-toast-message\">\n {{ notification.message }}\n </div>\n <button\n type=\"button\"\n (click)=\"removeNotification(notification)\"\n aria-label=\"Close\"\n class=\"shk-toast-close\"\n >\n <svg [shkIcon]=\"getIcon('x')\"></svg>\n </button>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getIconFromCentral"],"mappings":";;;;;;;AAmBA;;;AAGG;MAIU,mBAAmB,CAAA;AAHhC,IAAA,WAAA,GAAA;;AAKU,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAiB,EAAE,0FAAC;;QAEhD,IAAA,CAAA,SAAS,GAAG,CAAC;;AAGrB,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE;AAuEtD,IAAA;AArEC;;;AAGG;IACH,eAAe,CACb,OAAe,EACf,IAAA,GAA6B,MAAM,EACnC,YAAA,GAAwB,KAAK,EAC7B,QAAA,GAAmB,IAAI,EAAA;QAEvB,MAAM,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE;AACxC,QAAA,MAAM,YAAY,GAAiB;YACjC,EAAE;YACF,OAAO;YACP,IAA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