@sixbell-telco/sdk 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +96 -55
  3. package/assets/styles/combobox.scss +17 -17
  4. package/components/accordion/accordion-item/accordion-item.component.d.ts +1 -2
  5. package/components/avatar/src/avatar.component.d.ts +11 -18
  6. package/components/button/src/button.component.d.ts +12 -19
  7. package/components/card/card-actions/card-actions.component.d.ts +8 -0
  8. package/components/card/card-content/card-content.component.d.ts +5 -0
  9. package/components/card/card-title/card-title.component.d.ts +5 -0
  10. package/components/card/public-api.d.ts +3 -0
  11. package/components/card/src/card.component.d.ts +19 -20
  12. package/components/countdown/src/countdown.component.d.ts +6 -1
  13. package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +10 -0
  14. package/components/dropdown/public-api.d.ts +1 -0
  15. package/components/dropdown/src/dropdown.component.d.ts +24 -42
  16. package/components/file-upload/file-uploader/src/file-uploader.component.d.ts +2 -5
  17. package/components/forms/checkbox/src/checkbox.component.d.ts +2 -3
  18. package/components/forms/input/src/input.component.d.ts +7 -8
  19. package/components/forms/radio/src/radio.component.d.ts +2 -6
  20. package/components/forms/select/src/select.component.d.ts +5 -8
  21. package/components/forms/textarea/src/textarea.component.d.ts +5 -11
  22. package/components/link/src/link.component.d.ts +18 -45
  23. package/components/modal/modal-actions/modal-actions.component.d.ts +8 -0
  24. package/components/modal/modal-content/modal-content.component.d.ts +5 -0
  25. package/components/modal/modal-title/modal-title.component.d.ts +5 -0
  26. package/components/modal/public-api.d.ts +3 -0
  27. package/components/modal/src/modal.component.d.ts +9 -13
  28. package/components/product-card/src/product-card.component.d.ts +5 -9
  29. package/components/tab/src/tab.component.d.ts +1 -2
  30. package/directives/click-outside/index.d.ts +5 -0
  31. package/directives/click-outside/public-api.d.ts +1 -0
  32. package/directives/click-outside/src/click-outside.directive.d.ts +10 -0
  33. package/directives/typography/src/typography.directive.d.ts +3 -4
  34. package/esm2022/components/accordion/accordion-item/accordion-item.component.mjs +5 -6
  35. package/esm2022/components/avatar/src/avatar.component.mjs +27 -43
  36. package/esm2022/components/button/src/button.component.mjs +12 -22
  37. package/esm2022/components/card/card-actions/card-actions.component.mjs +22 -0
  38. package/esm2022/components/card/card-content/card-content.component.mjs +12 -0
  39. package/esm2022/components/card/card-title/card-title.component.mjs +12 -0
  40. package/esm2022/components/card/public-api.mjs +4 -1
  41. package/esm2022/components/card/src/card.component.mjs +20 -45
  42. package/esm2022/components/countdown/src/countdown.component.mjs +10 -3
  43. package/esm2022/components/dropdown/dropdown-item/dropdown-item.component.mjs +24 -0
  44. package/esm2022/components/dropdown/public-api.mjs +2 -1
  45. package/esm2022/components/dropdown/src/dropdown.component.mjs +65 -101
  46. package/esm2022/components/dual-list/src/dual-list.component.mjs +3 -3
  47. package/esm2022/components/file-upload/file-dropzone/src/file-dropzone.component.mjs +3 -3
  48. package/esm2022/components/file-upload/file-uploader/src/file-uploader.component.mjs +3 -7
  49. package/esm2022/components/forms/checkbox/src/checkbox.component.mjs +9 -8
  50. package/esm2022/components/forms/combobox/src/combobox.component.mjs +3 -3
  51. package/esm2022/components/forms/datepicker/src/datepicker.component.mjs +2 -2
  52. package/esm2022/components/forms/form-error/src/form-error.component.mjs +3 -3
  53. package/esm2022/components/forms/input/src/input.component.mjs +51 -45
  54. package/esm2022/components/forms/radio/src/radio.component.mjs +5 -18
  55. package/esm2022/components/forms/range/src/range.component.mjs +3 -3
  56. package/esm2022/components/forms/select/src/select.component.mjs +24 -34
  57. package/esm2022/components/forms/switch/src/switch.component.mjs +3 -3
  58. package/esm2022/components/forms/textarea/src/textarea.component.mjs +35 -48
  59. package/esm2022/components/forms/toggle/src/toggle.component.mjs +3 -3
  60. package/esm2022/components/link/src/link.component.mjs +27 -183
  61. package/esm2022/components/modal/modal-actions/modal-actions.component.mjs +22 -0
  62. package/esm2022/components/modal/modal-content/modal-content.component.mjs +12 -0
  63. package/esm2022/components/modal/modal-title/modal-title.component.mjs +13 -0
  64. package/esm2022/components/modal/public-api.mjs +4 -1
  65. package/esm2022/components/modal/src/modal.component.mjs +31 -31
  66. package/esm2022/components/notification/src/notification.component.mjs +2 -5
  67. package/esm2022/components/paginator/components/pagination-item/pagination-item.component.mjs +24 -24
  68. package/esm2022/components/product-card/src/product-card.component.mjs +5 -14
  69. package/esm2022/components/progress/src/progress.component.mjs +3 -3
  70. package/esm2022/components/tab/src/tab.component.mjs +2 -4
  71. package/esm2022/components/table/src/table.component.mjs +4 -4
  72. package/esm2022/components/table/table-header-checkbox/table-header-checkbox.component.mjs +1 -1
  73. package/esm2022/components/table/table-row-checkbox/table-row-checkbox.component.mjs +1 -1
  74. package/esm2022/components/toast/toast-message/toast-message.component.mjs +4 -4
  75. package/esm2022/components/wizard/wizard-marker/wizard-marker.component.mjs +4 -4
  76. package/esm2022/components/wizard/wizard-step/wizard-step.component.mjs +3 -3
  77. package/esm2022/components/wizard/wizard-wrapper/wizard-wrapper.component.mjs +3 -3
  78. package/esm2022/directives/click-outside/public-api.mjs +2 -0
  79. package/esm2022/directives/click-outside/sixbell-telco-sdk-directives-click-outside.mjs +5 -0
  80. package/esm2022/directives/click-outside/src/click-outside.directive.mjs +30 -0
  81. package/esm2022/directives/typography/src/typography.directive.mjs +19 -18
  82. package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +4 -5
  83. package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
  84. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +26 -42
  85. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
  86. package/fesm2022/sixbell-telco-sdk-components-button.mjs +11 -21
  87. package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
  88. package/fesm2022/sixbell-telco-sdk-components-card.mjs +57 -46
  89. package/fesm2022/sixbell-telco-sdk-components-card.mjs.map +1 -1
  90. package/fesm2022/sixbell-telco-sdk-components-countdown.mjs +9 -2
  91. package/fesm2022/sixbell-telco-sdk-components-countdown.mjs.map +1 -1
  92. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +86 -101
  93. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
  94. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +2 -2
  95. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
  96. package/fesm2022/sixbell-telco-sdk-components-file-upload-file-dropzone.mjs +2 -2
  97. package/fesm2022/sixbell-telco-sdk-components-file-upload-file-dropzone.mjs.map +1 -1
  98. package/fesm2022/sixbell-telco-sdk-components-file-upload-file-uploader.mjs +2 -6
  99. package/fesm2022/sixbell-telco-sdk-components-file-upload-file-uploader.mjs.map +1 -1
  100. package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +8 -7
  101. package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
  102. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +2 -2
  103. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
  104. package/fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs +1 -1
  105. package/fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs.map +1 -1
  106. package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +2 -2
  107. package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
  108. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +51 -45
  109. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
  110. package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs +4 -17
  111. package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
  112. package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +2 -2
  113. package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
  114. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +23 -33
  115. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
  116. package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +2 -2
  117. package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
  118. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +34 -47
  119. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
  120. package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +2 -2
  121. package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
  122. package/fesm2022/sixbell-telco-sdk-components-link.mjs +27 -183
  123. package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
  124. package/fesm2022/sixbell-telco-sdk-components-modal.mjs +71 -33
  125. package/fesm2022/sixbell-telco-sdk-components-modal.mjs.map +1 -1
  126. package/fesm2022/sixbell-telco-sdk-components-notification.mjs +1 -4
  127. package/fesm2022/sixbell-telco-sdk-components-notification.mjs.map +1 -1
  128. package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +23 -23
  129. package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
  130. package/fesm2022/sixbell-telco-sdk-components-product-card.mjs +4 -13
  131. package/fesm2022/sixbell-telco-sdk-components-product-card.mjs.map +1 -1
  132. package/fesm2022/sixbell-telco-sdk-components-progress.mjs +2 -2
  133. package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
  134. package/fesm2022/sixbell-telco-sdk-components-tab.mjs +1 -3
  135. package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
  136. package/fesm2022/sixbell-telco-sdk-components-table.mjs +5 -5
  137. package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
  138. package/fesm2022/sixbell-telco-sdk-components-toast.mjs +3 -3
  139. package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +1 -1
  140. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +7 -7
  141. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
  142. package/fesm2022/sixbell-telco-sdk-directives-click-outside.mjs +37 -0
  143. package/fesm2022/sixbell-telco-sdk-directives-click-outside.mjs.map +1 -0
  144. package/fesm2022/sixbell-telco-sdk-directives-typography.mjs +18 -17
  145. package/fesm2022/sixbell-telco-sdk-directives-typography.mjs.map +1 -1
  146. package/package.json +31 -25
@@ -29,11 +29,11 @@ class DropzoneComponent {
29
29
  this.files.set(files);
30
30
  }
31
31
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DropzoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: DropzoneComponent, isStandalone: true, selector: "st-file-dropzone", inputs: { maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, showFiles: { classPropertyName: "showFiles", publicName: "showFiles", isSignal: true, isRequired: false, transformFunction: null }, extensions: { classPropertyName: "extensions", publicName: "extensions", isSignal: true, isRequired: false, transformFunction: null }, uploading: { classPropertyName: "uploading", publicName: "uploading", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDrop: "onDrop", files: "filesChange" }, ngImport: i0, template: "<ngx-dropzone (change)=\"handleDrop($event.addedFiles)\" [disabled]=\"uploading()\">\n\t<ngx-dropzone-label>\n\t\t@if (!uploading()) {\n\t\t\t<div typography [typographyVariant]=\"'body-sm'\">Haga clic y seleccione archivos o su\u00E9ltelos aqu\u00ED</div>\n\n\t\t\t@if (maxFileSize() > 0) {\n\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">\n\t\t\t\t\t\tTama\u00F1o m\u00E1ximo por archivo: <span class=\"primary-text\">{{ maxFileSize() | toBytes }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t@if (extensions().length > 0) {\n\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">\n\t\t\t\t\t\tArchivos aceptados: <span class=\"primary-text\">{{ extensions().join(', ') }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t}\n\t\t} @else {\n\t\t\t<div class=\"upload-progress\">\n\t\t\t\t<div class=\"mini-text mb-2\">Cargando archivos...</div>\n\t\t\t\t<div class=\"progress\"></div>\n\t\t\t</div>\n\t\t}\n\t</ngx-dropzone-label>\n</ngx-dropzone>\n\n@if (maxFiles() > 0) {\n\t<div class=\"mt-1 flex justify-end\">\n\t\t<div typography [typographyVariant]=\"'body-xs'\">\n\t\t\t<span [ngClass]=\"{ 'text-error': files().length > maxFiles() }\">\n\t\t\t\t{{ files().length }} {{ files().length === 1 ? 'archivo' : 'archivos' }} cargado de un maximo de {{ maxFiles() }}\n\t\t\t\t{{ maxFiles() === 1 ? 'archivo' : 'archivos' }}</span\n\t\t\t>\n\t\t</div>\n\t</div>\n}\n\n<!-- TODO: hacer la tabla mas chiquita y bonita :) -->\n@if (showFiles() && files().length > 0) {\n\t<st-table size=\"sm\" [data]=\"files()\">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th scope=\"col\">Archivo</th>\n\t\t\t\t<th scope=\"col\"></th>\n\t\t\t\t<th scope=\"col\"></th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t@for (file of files(); track $index) {\n\t\t\t\t<tr>\n\t\t\t\t\t@let tooBig = file.size > maxFileSize();\n\t\t\t\t\t@let extensionsList = extensions();\n\t\t\t\t\t@let hasExtension = extensionsList.length === 0 || (extensionsList.length > 0 && extensionsList.includes(file.name | extractExtension));\n\n\t\t\t\t\t<td [ngClass]=\"{ 'text-error': tooBig || !hasExtension }\">\n\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\" [typographyColor]=\"'inherit'\">{{ file.name }}</span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t@if (!hasExtension) {\n\t\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">La extensi\u00F3n del archivo no es v\u00E1lida</span>\n\t\t\t\t\t\t} @else if (tooBig) {\n\t\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">El tama\u00F1o del archivo excede el l\u00EDmite permitido</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<st-button variant=\"icon\" shape=\"round-sm\" [icon]=\"icon\" (click)=\"handleRemove(file)\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t}\n\t\t</tbody>\n\t</st-table>\n}\n", dependencies: [{ kind: "ngmodule", type: NgxDropzoneModule }, { kind: "component", type: i1.NgxDropzoneComponent, selector: "ngx-dropzone, [ngx-dropzone]", inputs: ["accept", "disabled", "multiple", "maxFileSize", "expandable", "disableClick", "processDirectoryDrop", "id", "aria-label", "aria-labelledby", "aria-describedby"], outputs: ["change"] }, { kind: "directive", type: i1.NgxDropzoneLabelDirective, selector: "ngx-dropzone-label" }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["typographyVariant", "typographyColor", "typographyFontWeight", "classes"] }, { kind: "pipe", type: ToBytesPipe, name: "toBytes" }, { kind: "pipe", type: ExtractExtensionPipe, name: "extractExtension" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: TableComponent, selector: "st-table", inputs: ["size", "height", "pinRows", "pinColumns", "zebra", "paginatorType", "labelEntriesByPage", "labelShowEntriesOf", "labelShowEntries", "data", "totalItems", "error", "pagination", "maxSize", "showItemsPerPage", "showEntries", "showPagination"], outputs: ["onPageChange", "onPageSizeChange", "onCheck"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "circle", "square", "glass", "block", "loader", "border", "size", "iconPosition", "fontSize", "label", "type", "icon", "disabled"] }] });
32
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: DropzoneComponent, isStandalone: true, selector: "st-file-dropzone", inputs: { maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, showFiles: { classPropertyName: "showFiles", publicName: "showFiles", isSignal: true, isRequired: false, transformFunction: null }, extensions: { classPropertyName: "extensions", publicName: "extensions", isSignal: true, isRequired: false, transformFunction: null }, uploading: { classPropertyName: "uploading", publicName: "uploading", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDrop: "onDrop", files: "filesChange" }, ngImport: i0, template: "<ngx-dropzone (change)=\"handleDrop($event.addedFiles)\" [disabled]=\"uploading()\">\n\t<ngx-dropzone-label>\n\t\t@if (!uploading()) {\n\t\t\t<div typography [tyVariant]=\"'body-sm'\">Haga clic y seleccione archivos o su\u00E9ltelos aqu\u00ED</div>\n\n\t\t\t@if (maxFileSize() > 0) {\n\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">\n\t\t\t\t\t\tTama\u00F1o m\u00E1ximo por archivo: <span class=\"primary-text\">{{ maxFileSize() | toBytes }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t@if (extensions().length > 0) {\n\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">\n\t\t\t\t\t\tArchivos aceptados: <span class=\"primary-text\">{{ extensions().join(', ') }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t}\n\t\t} @else {\n\t\t\t<div class=\"upload-progress\">\n\t\t\t\t<div class=\"mini-text mb-2\">Cargando archivos...</div>\n\t\t\t\t<div class=\"progress\"></div>\n\t\t\t</div>\n\t\t}\n\t</ngx-dropzone-label>\n</ngx-dropzone>\n\n@if (maxFiles() > 0) {\n\t<div class=\"mt-1 flex justify-end\">\n\t\t<div typography [tyVariant]=\"'body-xs'\">\n\t\t\t<span [ngClass]=\"{ 'text-error': files().length > maxFiles() }\">\n\t\t\t\t{{ files().length }} {{ files().length === 1 ? 'archivo' : 'archivos' }} cargado de un maximo de {{ maxFiles() }}\n\t\t\t\t{{ maxFiles() === 1 ? 'archivo' : 'archivos' }}</span\n\t\t\t>\n\t\t</div>\n\t</div>\n}\n\n<!-- TODO: hacer la tabla mas chiquita y bonita :) -->\n@if (showFiles() && files().length > 0) {\n\t<st-table size=\"sm\" [data]=\"files()\">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th scope=\"col\">Archivo</th>\n\t\t\t\t<th scope=\"col\"></th>\n\t\t\t\t<th scope=\"col\"></th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t@for (file of files(); track $index) {\n\t\t\t\t<tr>\n\t\t\t\t\t@let tooBig = file.size > maxFileSize();\n\t\t\t\t\t@let extensionsList = extensions();\n\t\t\t\t\t@let hasExtension = extensionsList.length === 0 || (extensionsList.length > 0 && extensionsList.includes(file.name | extractExtension));\n\n\t\t\t\t\t<td [ngClass]=\"{ 'text-error': tooBig || !hasExtension }\">\n\t\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\" [tyColor]=\"'inherit'\">{{ file.name }}</span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t@if (!hasExtension) {\n\t\t\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">La extensi\u00F3n del archivo no es v\u00E1lida</span>\n\t\t\t\t\t\t} @else if (tooBig) {\n\t\t\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">El tama\u00F1o del archivo excede el l\u00EDmite permitido</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<st-button variant=\"icon\" [icon]=\"icon\" (click)=\"handleRemove(file)\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t}\n\t\t</tbody>\n\t</st-table>\n}\n", dependencies: [{ kind: "ngmodule", type: NgxDropzoneModule }, { kind: "component", type: i1.NgxDropzoneComponent, selector: "ngx-dropzone, [ngx-dropzone]", inputs: ["accept", "disabled", "multiple", "maxFileSize", "expandable", "disableClick", "processDirectoryDrop", "id", "aria-label", "aria-labelledby", "aria-describedby"], outputs: ["change"] }, { kind: "directive", type: i1.NgxDropzoneLabelDirective, selector: "ngx-dropzone-label" }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight"] }, { kind: "pipe", type: ToBytesPipe, name: "toBytes" }, { kind: "pipe", type: ExtractExtensionPipe, name: "extractExtension" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: TableComponent, selector: "st-table", inputs: ["size", "height", "pinRows", "pinColumns", "zebra", "paginatorType", "labelEntriesByPage", "labelShowEntriesOf", "labelShowEntries", "data", "totalItems", "error", "pagination", "maxSize", "showItemsPerPage", "showEntries", "showPagination"], outputs: ["onPageChange", "onPageSizeChange", "onCheck"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "circle", "square", "glass", "block", "loader", "size", "icon", "iconPosition", "type", "disabled"] }] });
33
33
  }
34
34
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DropzoneComponent, decorators: [{
35
35
  type: Component,
36
- args: [{ selector: 'st-file-dropzone', standalone: true, imports: [NgxDropzoneModule, TypographyDirective, ToBytesPipe, ExtractExtensionPipe, NgClass, TableComponent, ButtonComponent], template: "<ngx-dropzone (change)=\"handleDrop($event.addedFiles)\" [disabled]=\"uploading()\">\n\t<ngx-dropzone-label>\n\t\t@if (!uploading()) {\n\t\t\t<div typography [typographyVariant]=\"'body-sm'\">Haga clic y seleccione archivos o su\u00E9ltelos aqu\u00ED</div>\n\n\t\t\t@if (maxFileSize() > 0) {\n\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">\n\t\t\t\t\t\tTama\u00F1o m\u00E1ximo por archivo: <span class=\"primary-text\">{{ maxFileSize() | toBytes }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t@if (extensions().length > 0) {\n\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">\n\t\t\t\t\t\tArchivos aceptados: <span class=\"primary-text\">{{ extensions().join(', ') }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t}\n\t\t} @else {\n\t\t\t<div class=\"upload-progress\">\n\t\t\t\t<div class=\"mini-text mb-2\">Cargando archivos...</div>\n\t\t\t\t<div class=\"progress\"></div>\n\t\t\t</div>\n\t\t}\n\t</ngx-dropzone-label>\n</ngx-dropzone>\n\n@if (maxFiles() > 0) {\n\t<div class=\"mt-1 flex justify-end\">\n\t\t<div typography [typographyVariant]=\"'body-xs'\">\n\t\t\t<span [ngClass]=\"{ 'text-error': files().length > maxFiles() }\">\n\t\t\t\t{{ files().length }} {{ files().length === 1 ? 'archivo' : 'archivos' }} cargado de un maximo de {{ maxFiles() }}\n\t\t\t\t{{ maxFiles() === 1 ? 'archivo' : 'archivos' }}</span\n\t\t\t>\n\t\t</div>\n\t</div>\n}\n\n<!-- TODO: hacer la tabla mas chiquita y bonita :) -->\n@if (showFiles() && files().length > 0) {\n\t<st-table size=\"sm\" [data]=\"files()\">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th scope=\"col\">Archivo</th>\n\t\t\t\t<th scope=\"col\"></th>\n\t\t\t\t<th scope=\"col\"></th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t@for (file of files(); track $index) {\n\t\t\t\t<tr>\n\t\t\t\t\t@let tooBig = file.size > maxFileSize();\n\t\t\t\t\t@let extensionsList = extensions();\n\t\t\t\t\t@let hasExtension = extensionsList.length === 0 || (extensionsList.length > 0 && extensionsList.includes(file.name | extractExtension));\n\n\t\t\t\t\t<td [ngClass]=\"{ 'text-error': tooBig || !hasExtension }\">\n\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\" [typographyColor]=\"'inherit'\">{{ file.name }}</span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t@if (!hasExtension) {\n\t\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">La extensi\u00F3n del archivo no es v\u00E1lida</span>\n\t\t\t\t\t\t} @else if (tooBig) {\n\t\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">El tama\u00F1o del archivo excede el l\u00EDmite permitido</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<st-button variant=\"icon\" shape=\"round-sm\" [icon]=\"icon\" (click)=\"handleRemove(file)\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t}\n\t\t</tbody>\n\t</st-table>\n}\n" }]
36
+ args: [{ selector: 'st-file-dropzone', standalone: true, imports: [NgxDropzoneModule, TypographyDirective, ToBytesPipe, ExtractExtensionPipe, NgClass, TableComponent, ButtonComponent], template: "<ngx-dropzone (change)=\"handleDrop($event.addedFiles)\" [disabled]=\"uploading()\">\n\t<ngx-dropzone-label>\n\t\t@if (!uploading()) {\n\t\t\t<div typography [tyVariant]=\"'body-sm'\">Haga clic y seleccione archivos o su\u00E9ltelos aqu\u00ED</div>\n\n\t\t\t@if (maxFileSize() > 0) {\n\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">\n\t\t\t\t\t\tTama\u00F1o m\u00E1ximo por archivo: <span class=\"primary-text\">{{ maxFileSize() | toBytes }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t@if (extensions().length > 0) {\n\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">\n\t\t\t\t\t\tArchivos aceptados: <span class=\"primary-text\">{{ extensions().join(', ') }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t}\n\t\t} @else {\n\t\t\t<div class=\"upload-progress\">\n\t\t\t\t<div class=\"mini-text mb-2\">Cargando archivos...</div>\n\t\t\t\t<div class=\"progress\"></div>\n\t\t\t</div>\n\t\t}\n\t</ngx-dropzone-label>\n</ngx-dropzone>\n\n@if (maxFiles() > 0) {\n\t<div class=\"mt-1 flex justify-end\">\n\t\t<div typography [tyVariant]=\"'body-xs'\">\n\t\t\t<span [ngClass]=\"{ 'text-error': files().length > maxFiles() }\">\n\t\t\t\t{{ files().length }} {{ files().length === 1 ? 'archivo' : 'archivos' }} cargado de un maximo de {{ maxFiles() }}\n\t\t\t\t{{ maxFiles() === 1 ? 'archivo' : 'archivos' }}</span\n\t\t\t>\n\t\t</div>\n\t</div>\n}\n\n<!-- TODO: hacer la tabla mas chiquita y bonita :) -->\n@if (showFiles() && files().length > 0) {\n\t<st-table size=\"sm\" [data]=\"files()\">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th scope=\"col\">Archivo</th>\n\t\t\t\t<th scope=\"col\"></th>\n\t\t\t\t<th scope=\"col\"></th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t@for (file of files(); track $index) {\n\t\t\t\t<tr>\n\t\t\t\t\t@let tooBig = file.size > maxFileSize();\n\t\t\t\t\t@let extensionsList = extensions();\n\t\t\t\t\t@let hasExtension = extensionsList.length === 0 || (extensionsList.length > 0 && extensionsList.includes(file.name | extractExtension));\n\n\t\t\t\t\t<td [ngClass]=\"{ 'text-error': tooBig || !hasExtension }\">\n\t\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\" [tyColor]=\"'inherit'\">{{ file.name }}</span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t@if (!hasExtension) {\n\t\t\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">La extensi\u00F3n del archivo no es v\u00E1lida</span>\n\t\t\t\t\t\t} @else if (tooBig) {\n\t\t\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">El tama\u00F1o del archivo excede el l\u00EDmite permitido</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<st-button variant=\"icon\" [icon]=\"icon\" (click)=\"handleRemove(file)\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t}\n\t\t</tbody>\n\t</st-table>\n}\n" }]
37
37
  }] });
38
38
 
39
39
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sixbell-telco-sdk-components-file-upload-file-dropzone.mjs","sources":["../../../projects/sdk/components/file-upload/file-dropzone/src/file-dropzone.component.ts","../../../projects/sdk/components/file-upload/file-dropzone/src/file-dropzone.component.html","../../../projects/sdk/components/file-upload/file-dropzone/sixbell-telco-sdk-components-file-upload-file-dropzone.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\nimport { Component, input, model, output } from '@angular/core';\nimport { ButtonComponent } from '@sixbell-telco/sdk/components/button';\nimport { matDeleteOutline } from '@sixbell-telco/sdk/components/icon/material/outline';\nimport { TableComponent } from '@sixbell-telco/sdk/components/table';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { ExtractExtensionPipe } from '@sixbell-telco/sdk/utils/pipes/extract-extension';\nimport { ToBytesPipe } from '@sixbell-telco/sdk/utils/pipes/to-bytes-extesion';\nimport { NgxDropzoneModule } from 'ngx-dropzone';\n\n@Component({\n\tselector: 'st-file-dropzone',\n\tstandalone: true,\n\timports: [NgxDropzoneModule, TypographyDirective, ToBytesPipe, ExtractExtensionPipe, NgClass, TableComponent, ButtonComponent],\n\ttemplateUrl: './file-dropzone.component.html',\n})\nexport class DropzoneComponent {\n\tmaxFiles = input(1);\n\tmaxFileSize = input(0);\n\tshowFiles = input(true);\n\textensions = input<string[]>([]);\n\tuploading = input(false);\n\tonDrop = output<File[]>();\n\n\ticon = matDeleteOutline;\n\n\tfiles = model<File[]>([]);\n\n\thandleDrop(files: File[]) {\n\t\tthis.files.update((currentFiles) => [...currentFiles, ...files]);\n\t\tthis.onDrop.emit(files);\n\t}\n\n\thandleRemove(file: File) {\n\t\tconst files = this.files();\n\t\tfiles.splice(files.indexOf(file), 1);\n\t\tthis.files.set(files);\n\t}\n}\n","<ngx-dropzone (change)=\"handleDrop($event.addedFiles)\" [disabled]=\"uploading()\">\n\t<ngx-dropzone-label>\n\t\t@if (!uploading()) {\n\t\t\t<div typography [typographyVariant]=\"'body-sm'\">Haga clic y seleccione archivos o suéltelos aquí</div>\n\n\t\t\t@if (maxFileSize() > 0) {\n\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">\n\t\t\t\t\t\tTamaño máximo por archivo: <span class=\"primary-text\">{{ maxFileSize() | toBytes }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t@if (extensions().length > 0) {\n\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">\n\t\t\t\t\t\tArchivos aceptados: <span class=\"primary-text\">{{ extensions().join(', ') }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t}\n\t\t} @else {\n\t\t\t<div class=\"upload-progress\">\n\t\t\t\t<div class=\"mini-text mb-2\">Cargando archivos...</div>\n\t\t\t\t<div class=\"progress\"></div>\n\t\t\t</div>\n\t\t}\n\t</ngx-dropzone-label>\n</ngx-dropzone>\n\n@if (maxFiles() > 0) {\n\t<div class=\"mt-1 flex justify-end\">\n\t\t<div typography [typographyVariant]=\"'body-xs'\">\n\t\t\t<span [ngClass]=\"{ 'text-error': files().length > maxFiles() }\">\n\t\t\t\t{{ files().length }} {{ files().length === 1 ? 'archivo' : 'archivos' }} cargado de un maximo de {{ maxFiles() }}\n\t\t\t\t{{ maxFiles() === 1 ? 'archivo' : 'archivos' }}</span\n\t\t\t>\n\t\t</div>\n\t</div>\n}\n\n<!-- TODO: hacer la tabla mas chiquita y bonita :) -->\n@if (showFiles() && files().length > 0) {\n\t<st-table size=\"sm\" [data]=\"files()\">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th scope=\"col\">Archivo</th>\n\t\t\t\t<th scope=\"col\"></th>\n\t\t\t\t<th scope=\"col\"></th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t@for (file of files(); track $index) {\n\t\t\t\t<tr>\n\t\t\t\t\t@let tooBig = file.size > maxFileSize();\n\t\t\t\t\t@let extensionsList = extensions();\n\t\t\t\t\t@let hasExtension = extensionsList.length === 0 || (extensionsList.length > 0 && extensionsList.includes(file.name | extractExtension));\n\n\t\t\t\t\t<td [ngClass]=\"{ 'text-error': tooBig || !hasExtension }\">\n\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\" [typographyColor]=\"'inherit'\">{{ file.name }}</span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t@if (!hasExtension) {\n\t\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">La extensión del archivo no es válida</span>\n\t\t\t\t\t\t} @else if (tooBig) {\n\t\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">El tamaño del archivo excede el límite permitido</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<st-button variant=\"icon\" shape=\"round-sm\" [icon]=\"icon\" (click)=\"handleRemove(file)\" />\n\t\t\t\t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A,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,mBAAA,EAAA,iBAAA,EAAA,sBAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,WAAW,EAAA,IAAA,EAAA,SAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,oBAAoB,EAAE,IAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,OAAO,EAAE,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,cAAc,2WAAE,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,QAAA,EAAA,OAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,cAAA,EAAA,UAAA,EAAA,OAAA,EAAA,MAAA,EAAA,MAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAGjH,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,cAChB,IAAI,EAAA,OAAA,EACP,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,EAAE,oBAAoB,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,CAAC,EAAA,QAAA,EAAA,qzFAAA,EAAA,CAAA;;;AEb/H;;AAEG;;;;"}
1
+ {"version":3,"file":"sixbell-telco-sdk-components-file-upload-file-dropzone.mjs","sources":["../../../projects/sdk/components/file-upload/file-dropzone/src/file-dropzone.component.ts","../../../projects/sdk/components/file-upload/file-dropzone/src/file-dropzone.component.html","../../../projects/sdk/components/file-upload/file-dropzone/sixbell-telco-sdk-components-file-upload-file-dropzone.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\nimport { Component, input, model, output } from '@angular/core';\nimport { ButtonComponent } from '@sixbell-telco/sdk/components/button';\nimport { matDeleteOutline } from '@sixbell-telco/sdk/components/icon/material/outline';\nimport { TableComponent } from '@sixbell-telco/sdk/components/table';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { ExtractExtensionPipe } from '@sixbell-telco/sdk/utils/pipes/extract-extension';\nimport { ToBytesPipe } from '@sixbell-telco/sdk/utils/pipes/to-bytes-extesion';\nimport { NgxDropzoneModule } from 'ngx-dropzone';\n\n@Component({\n\tselector: 'st-file-dropzone',\n\tstandalone: true,\n\timports: [NgxDropzoneModule, TypographyDirective, ToBytesPipe, ExtractExtensionPipe, NgClass, TableComponent, ButtonComponent],\n\ttemplateUrl: './file-dropzone.component.html',\n})\nexport class DropzoneComponent {\n\tmaxFiles = input(1);\n\tmaxFileSize = input(0);\n\tshowFiles = input(true);\n\textensions = input<string[]>([]);\n\tuploading = input(false);\n\tonDrop = output<File[]>();\n\n\ticon = matDeleteOutline;\n\n\tfiles = model<File[]>([]);\n\n\thandleDrop(files: File[]) {\n\t\tthis.files.update((currentFiles) => [...currentFiles, ...files]);\n\t\tthis.onDrop.emit(files);\n\t}\n\n\thandleRemove(file: File) {\n\t\tconst files = this.files();\n\t\tfiles.splice(files.indexOf(file), 1);\n\t\tthis.files.set(files);\n\t}\n}\n","<ngx-dropzone (change)=\"handleDrop($event.addedFiles)\" [disabled]=\"uploading()\">\n\t<ngx-dropzone-label>\n\t\t@if (!uploading()) {\n\t\t\t<div typography [tyVariant]=\"'body-sm'\">Haga clic y seleccione archivos o suéltelos aquí</div>\n\n\t\t\t@if (maxFileSize() > 0) {\n\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">\n\t\t\t\t\t\tTamaño máximo por archivo: <span class=\"primary-text\">{{ maxFileSize() | toBytes }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t@if (extensions().length > 0) {\n\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">\n\t\t\t\t\t\tArchivos aceptados: <span class=\"primary-text\">{{ extensions().join(', ') }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t}\n\t\t} @else {\n\t\t\t<div class=\"upload-progress\">\n\t\t\t\t<div class=\"mini-text mb-2\">Cargando archivos...</div>\n\t\t\t\t<div class=\"progress\"></div>\n\t\t\t</div>\n\t\t}\n\t</ngx-dropzone-label>\n</ngx-dropzone>\n\n@if (maxFiles() > 0) {\n\t<div class=\"mt-1 flex justify-end\">\n\t\t<div typography [tyVariant]=\"'body-xs'\">\n\t\t\t<span [ngClass]=\"{ 'text-error': files().length > maxFiles() }\">\n\t\t\t\t{{ files().length }} {{ files().length === 1 ? 'archivo' : 'archivos' }} cargado de un maximo de {{ maxFiles() }}\n\t\t\t\t{{ maxFiles() === 1 ? 'archivo' : 'archivos' }}</span\n\t\t\t>\n\t\t</div>\n\t</div>\n}\n\n<!-- TODO: hacer la tabla mas chiquita y bonita :) -->\n@if (showFiles() && files().length > 0) {\n\t<st-table size=\"sm\" [data]=\"files()\">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th scope=\"col\">Archivo</th>\n\t\t\t\t<th scope=\"col\"></th>\n\t\t\t\t<th scope=\"col\"></th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t@for (file of files(); track $index) {\n\t\t\t\t<tr>\n\t\t\t\t\t@let tooBig = file.size > maxFileSize();\n\t\t\t\t\t@let extensionsList = extensions();\n\t\t\t\t\t@let hasExtension = extensionsList.length === 0 || (extensionsList.length > 0 && extensionsList.includes(file.name | extractExtension));\n\n\t\t\t\t\t<td [ngClass]=\"{ 'text-error': tooBig || !hasExtension }\">\n\t\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\" [tyColor]=\"'inherit'\">{{ file.name }}</span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t@if (!hasExtension) {\n\t\t\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">La extensión del archivo no es válida</span>\n\t\t\t\t\t\t} @else if (tooBig) {\n\t\t\t\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">El tamaño del archivo excede el límite permitido</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<st-button variant=\"icon\" [icon]=\"icon\" (click)=\"handleRemove(file)\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t}\n\t\t</tbody>\n\t</st-table>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAgBa,iBAAiB,CAAA;AAC7B,IAAA,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AACpB,IAAA,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AACvB,IAAA,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;AACxB,IAAA,UAAU,GAAG,KAAK,CAAW,EAAE,CAAC,CAAC;AACjC,IAAA,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IACzB,MAAM,GAAG,MAAM,EAAU,CAAC;IAE1B,IAAI,GAAG,gBAAgB,CAAC;AAExB,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AAE1B,IAAA,UAAU,CAAC,KAAa,EAAA;AACvB,QAAA,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,YAAY,KAAK,CAAC,GAAG,YAAY,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;AACjE,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACxB;AAED,IAAA,YAAY,CAAC,IAAU,EAAA;AACtB,QAAA,MA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AC,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,EAAE,oBAAoB,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,CAAC,EAAA,QAAA,EAAA,kuFAAA,EAAA,CAAA;;;AEb/H;;AAEG;;;;"}
@@ -8,7 +8,6 @@ import { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';
8
8
  class FileUploaderComponent {
9
9
  // Base input properties
10
10
  variant = input('secondary');
11
- shape = input('round-sm');
12
11
  size = input('md');
13
12
  classes = input('');
14
13
  label = input('');
@@ -78,21 +77,18 @@ class FileUploaderComponent {
78
77
  componentClass() {
79
78
  return {
80
79
  variant: 'secondary',
81
- shape: 'round-md',
82
80
  size: 'md',
83
81
  };
84
82
  }
85
83
  errorClass() {
86
84
  return {
87
85
  variant: 'error',
88
- shape: this.shape(),
89
86
  size: this.size(),
90
87
  };
91
88
  }
92
89
  successClass() {
93
90
  return {
94
91
  variant: 'success',
95
- shape: this.shape(),
96
92
  size: this.size(),
97
93
  };
98
94
  }
@@ -110,11 +106,11 @@ class FileUploaderComponent {
110
106
  return this.componentClass();
111
107
  }
112
108
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FileUploaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
113
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FileUploaderComponent, isStandalone: true, selector: "st-file-uploader", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, classes: { classPropertyName: "classes", publicName: "classes", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showExtensions: { classPropertyName: "showExtensions", publicName: "showExtensions", isSignal: true, isRequired: false, transformFunction: null }, extensions: { classPropertyName: "extensions", publicName: "extensions", isSignal: true, isRequired: false, transformFunction: null }, parentForm: { classPropertyName: "parentForm", publicName: "parentForm", isSignal: true, isRequired: false, transformFunction: null }, formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFileChange: "onFileChange", value: "valueChange", disabled: "disabledChange" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploaderComponent), multi: true }], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["uploader"], descendants: true, isSignal: true }], ngImport: i0, template: "<st-input\n\t[label]=\"label()\"\n\t[placeholder]=\"placeholder()\"\n\tplaceholder=\"Seleccione un archivo...\"\n\t[readonly]=\"true\"\n\t(click)=\"handleClick()\"\n\t[(value)]=\"filename\"\n\t[name]=\"name()\"\n\t[variant]=\"validationClass().variant\"\n\t[size]=\"validationClass().size\"\n\t[shape]=\"validationClass().shape\"\n\t[classes]=\"classes()\"\n\t(onBlur)=\"_onTouched()\"\n\t[disabled]=\"disabled()\"\n>\n\t<div class=\"flex justify-between\">\n\t\t<div>\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (extensions().length > 0 && showExtensions()) {\n\t\t\t<div class=\"mt-1\">\n\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">Archivos aceptados: {{ formattedExtensions() }}</span>\n\t\t\t</div>\n\t\t}\n\t</div>\n</st-input>\n@if (parentForm()) {\n\t<input type=\"file\" [(value)]=\"fileValue\" #uploader hidden (change)=\"handleReadFile($event)\" (blur)=\"_onTouched()\" required />\n} @else {\n\t<input type=\"file\" [(value)]=\"fileValue\" #uploader hidden (change)=\"handleAddFile($event)\" required />\n}\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: InputComponent, selector: "st-input", inputs: ["variant", "shape", "size", "classes", "label", "type", "name", "placeholder", "icon", "iconPosition", "iconClasses", "readonly", "value", "parentForm", "formControlName", "disabled", "debounceTime"], outputs: ["valueChange", "disabledChange", "onEnter", "onBlur", "onDebounceChange"] }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["typographyVariant", "typographyColor", "typographyFontWeight", "classes"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
109
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FileUploaderComponent, isStandalone: true, selector: "st-file-uploader", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, classes: { classPropertyName: "classes", publicName: "classes", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showExtensions: { classPropertyName: "showExtensions", publicName: "showExtensions", isSignal: true, isRequired: false, transformFunction: null }, extensions: { classPropertyName: "extensions", publicName: "extensions", isSignal: true, isRequired: false, transformFunction: null }, parentForm: { classPropertyName: "parentForm", publicName: "parentForm", isSignal: true, isRequired: false, transformFunction: null }, formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFileChange: "onFileChange", value: "valueChange", disabled: "disabledChange" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploaderComponent), multi: true }], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["uploader"], descendants: true, isSignal: true }], ngImport: i0, template: "<st-input\n\t[label]=\"label()\"\n\t[placeholder]=\"placeholder()\"\n\tplaceholder=\"Seleccione un archivo...\"\n\t[readonly]=\"true\"\n\t(click)=\"handleClick()\"\n\t[(value)]=\"filename\"\n\t[name]=\"name()\"\n\t[variant]=\"validationClass().variant\"\n\t[size]=\"validationClass().size\"\n\t(onBlur)=\"_onTouched()\"\n\t[disabled]=\"disabled()\"\n>\n\t<div class=\"flex justify-between\">\n\t\t<div>\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (extensions().length > 0 && showExtensions()) {\n\t\t\t<div class=\"mt-1\">\n\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">Archivos aceptados: {{ formattedExtensions() }}</span>\n\t\t\t</div>\n\t\t}\n\t</div>\n</st-input>\n@if (parentForm()) {\n\t<input type=\"file\" [(value)]=\"fileValue\" #uploader hidden (change)=\"handleReadFile($event)\" (blur)=\"_onTouched()\" required />\n} @else {\n\t<input type=\"file\" [(value)]=\"fileValue\" #uploader hidden (change)=\"handleAddFile($event)\" required />\n}\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: InputComponent, selector: "st-input", inputs: ["variant", "size", "label", "type", "name", "placeholder", "icon", "iconPosition", "iconClasses", "readonly", "iconClickable", "ghost", "value", "parentForm", "formControlName", "disabled", "debounceTime"], outputs: ["onIconClick", "valueChange", "disabledChange", "onEnter", "onBlur", "onDebounceChange"] }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
114
110
  }
115
111
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FileUploaderComponent, decorators: [{
116
112
  type: Component,
117
- args: [{ selector: 'st-file-uploader', standalone: true, imports: [FormsModule, InputComponent, TypographyDirective], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploaderComponent), multi: true }], changeDetection: ChangeDetectionStrategy.Default, template: "<st-input\n\t[label]=\"label()\"\n\t[placeholder]=\"placeholder()\"\n\tplaceholder=\"Seleccione un archivo...\"\n\t[readonly]=\"true\"\n\t(click)=\"handleClick()\"\n\t[(value)]=\"filename\"\n\t[name]=\"name()\"\n\t[variant]=\"validationClass().variant\"\n\t[size]=\"validationClass().size\"\n\t[shape]=\"validationClass().shape\"\n\t[classes]=\"classes()\"\n\t(onBlur)=\"_onTouched()\"\n\t[disabled]=\"disabled()\"\n>\n\t<div class=\"flex justify-between\">\n\t\t<div>\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (extensions().length > 0 && showExtensions()) {\n\t\t\t<div class=\"mt-1\">\n\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">Archivos aceptados: {{ formattedExtensions() }}</span>\n\t\t\t</div>\n\t\t}\n\t</div>\n</st-input>\n@if (parentForm()) {\n\t<input type=\"file\" [(value)]=\"fileValue\" #uploader hidden (change)=\"handleReadFile($event)\" (blur)=\"_onTouched()\" required />\n} @else {\n\t<input type=\"file\" [(value)]=\"fileValue\" #uploader hidden (change)=\"handleAddFile($event)\" required />\n}\n" }]
113
+ args: [{ selector: 'st-file-uploader', standalone: true, imports: [FormsModule, InputComponent, TypographyDirective], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploaderComponent), multi: true }], changeDetection: ChangeDetectionStrategy.Default, template: "<st-input\n\t[label]=\"label()\"\n\t[placeholder]=\"placeholder()\"\n\tplaceholder=\"Seleccione un archivo...\"\n\t[readonly]=\"true\"\n\t(click)=\"handleClick()\"\n\t[(value)]=\"filename\"\n\t[name]=\"name()\"\n\t[variant]=\"validationClass().variant\"\n\t[size]=\"validationClass().size\"\n\t(onBlur)=\"_onTouched()\"\n\t[disabled]=\"disabled()\"\n>\n\t<div class=\"flex justify-between\">\n\t\t<div>\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (extensions().length > 0 && showExtensions()) {\n\t\t\t<div class=\"mt-1\">\n\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">Archivos aceptados: {{ formattedExtensions() }}</span>\n\t\t\t</div>\n\t\t}\n\t</div>\n</st-input>\n@if (parentForm()) {\n\t<input type=\"file\" [(value)]=\"fileValue\" #uploader hidden (change)=\"handleReadFile($event)\" (blur)=\"_onTouched()\" required />\n} @else {\n\t<input type=\"file\" [(value)]=\"fileValue\" #uploader hidden (change)=\"handleAddFile($event)\" required />\n}\n" }]
118
114
  }] });
119
115
 
120
116
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sixbell-telco-sdk-components-file-upload-file-uploader.mjs","sources":["../../../projects/sdk/components/file-upload/file-uploader/src/file-uploader.component.ts","../../../projects/sdk/components/file-upload/file-uploader/src/file-uploader.component.html","../../../projects/sdk/components/file-upload/file-uploader/sixbell-telco-sdk-components-file-upload-file-uploader.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ChangeDetectionStrategy, Component, computed, ElementRef, forwardRef, input, model, output, viewChild } from '@angular/core';\nimport { ControlValueAccessor, FormControl, FormGroup, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { InputComponent, InputShapeProps, InputSizeProps, InputVariantProps } from '@sixbell-telco/sdk/components/forms/input';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\n\n// Create a new type by excluding specific values from the variant property\nexport type FileUploaderVariantProps = Exclude<InputVariantProps, 'search' | 'search-ghost'>;\nexport type FileUploaderShapeProps = InputShapeProps;\nexport type FileUploaderSizeProps = InputSizeProps;\n\nexport type FileUploaderProps = {\n\tvariant?: FileUploaderVariantProps;\n\tshape?: FileUploaderShapeProps;\n\tsize?: FileUploaderSizeProps;\n};\n\n@Component({\n\tselector: 'st-file-uploader',\n\tstandalone: true,\n\timports: [FormsModule, InputComponent, TypographyDirective],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploaderComponent), multi: true }],\n\ttemplateUrl: './file-uploader.component.html',\n\tchangeDetection: ChangeDetectionStrategy.Default,\n})\nexport class FileUploaderComponent implements ControlValueAccessor {\n\t// Base input properties\n\tvariant = input<FileUploaderVariantProps>('secondary');\n\tshape = input<FileUploaderShapeProps>('round-sm');\n\tsize = input<FileUploaderSizeProps>('md');\n\tclasses = input<string>('');\n\tlabel = input<string>('');\n\tname = input<string | null>(null);\n\tplaceholder = input<string>('');\n\tshowExtensions = input<boolean>(true);\n\textensions = input<string[]>([]);\n\tonFileChange = output<File>();\n\n\tfilename = '';\n\tfileValue: File | null = null;\n\tformattedExtensions = computed(() => this.extensions().join(', '));\n\tfileInput = viewChild<ElementRef>('uploader');\n\n\t// Form control properties\n\tparentForm = input<FormGroup | null>(null);\n\tformControlName = input<string>('');\n\tvalue = model<File | null>(null);\n\n\t// ControlValueAccessor attributes\n\t_onChange: any;\n\t_onTouched: any;\n\tdisabled = model<boolean>(false);\n\n\tget formField(): FormControl | null {\n\t\tif (!this.parentForm()) return null;\n\t\treturn this.parentForm()?.get(this.formControlName()) as FormControl;\n\t}\n\n\twriteValue(value: any): void {\n\t\tthis.value.set(value);\n\t\tthis.filename = value?.name || '';\n\t}\n\tregisterOnChange(fn: any): void {\n\t\tthis._onChange = fn; // Register this as a change callback function\n\t}\n\tregisterOnTouched(fn: any): void {\n\t\tthis._onTouched = fn; // Register this as a blur callback function\n\t}\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabled.set(isDisabled);\n\t}\n\n\t// Input functions\n\thandleClick() {\n\t\tif (!this.fileInput()) return;\n\t\tthis.fileInput()?.nativeElement.click(); // Access the element to trigger click\n\t}\n\n\thandleReadFile(event: Event) {\n\t\tconst file: File | undefined = (event.target as HTMLInputElement).files?.[0];\n\t\tif (file instanceof File) {\n\t\t\tthis.filename = file.name;\n\t\t\tthis._onChange(file);\n\t\t\tthis.value.set(file);\n\t\t\tthis.onFileChange.emit(file);\n\t\t}\n\t}\n\n\thandleAddFile(event: Event) {\n\t\tconst file: File | undefined = (event.target as HTMLInputElement).files?.[0];\n\t\tif (file instanceof File) {\n\t\t\tthis.filename = file.name;\n\t\t\tthis.onFileChange.emit(file);\n\t\t}\n\t}\n\n\tremoveFile() {\n\t\tthis.filename = '';\n\t\tthis.value.set(null);\n\t\tthis._onChange(null);\n\t}\n\n\t// Style Getters\n\tcomponentClass(): FileUploaderProps {\n\t\treturn {\n\t\t\tvariant: 'secondary',\n\t\t\tshape: 'round-md',\n\t\t\tsize: 'md',\n\t\t};\n\t}\n\n\terrorClass(): FileUploaderProps {\n\t\treturn {\n\t\t\tvariant: 'error',\n\t\t\tshape: this.shape(),\n\t\t\tsize: this.size(),\n\t\t};\n\t}\n\n\tsuccessClass(): FileUploaderProps {\n\t\treturn {\n\t\t\tvariant: 'success',\n\t\t\tshape: this.shape(),\n\t\t\tsize: this.size(),\n\t\t};\n\t}\n\n\tvalidationClass(): FileUploaderProps {\n\t\tif (!this.formField) return this.componentClass();\n\t\tif (this.formField.dirty || this.formField.touched) {\n\t\t\tif (this.formField.invalid) {\n\t\t\t\treturn this.errorClass();\n\t\t\t} else if (this.formField.valid) {\n\t\t\t\treturn this.successClass();\n\t\t\t}\n\t\t}\n\n\t\treturn this.componentClass();\n\t}\n}\n","<st-input\n\t[label]=\"label()\"\n\t[placeholder]=\"placeholder()\"\n\tplaceholder=\"Seleccione un archivo...\"\n\t[readonly]=\"true\"\n\t(click)=\"handleClick()\"\n\t[(value)]=\"filename\"\n\t[name]=\"name()\"\n\t[variant]=\"validationClass().variant\"\n\t[size]=\"validationClass().size\"\n\t[shape]=\"validationClass().shape\"\n\t[classes]=\"classes()\"\n\t(onBlur)=\"_onTouched()\"\n\t[disabled]=\"disabled()\"\n>\n\t<div class=\"flex justify-between\">\n\t\t<div>\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (extensions().length > 0 && showExtensions()) {\n\t\t\t<div class=\"mt-1\">\n\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\">Archivos aceptados: {{ formattedExtensions() }}</span>\n\t\t\t</div>\n\t\t}\n\t</div>\n</st-input>\n@if (parentForm()) {\n\t<input type=\"file\" [(value)]=\"fileValue\" #uploader hidden (change)=\"handleReadFile($event)\" (blur)=\"_onTouched()\" required />\n} @else {\n\t<input type=\"file\" [(value)]=\"fileValue\" #uploader hidden (change)=\"handleAddFile($event)\" required />\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;MAyBa,qBAAqB,CAAA;;AAEjC,IAAA,OAAO,GAAG,KAAK,CAA2B,WAAW,CAAC,CAAC;AACvD,IAAA,KAAK,GAAG,KAAK,CAAyB,UAAU,CAAC,CAAC;AAClD,IAAA,IAAI,GAAG,KAAK,CAAwB,IAAI,CAAC,CAAC;AAC1C,IAAA,OAAO,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AAC5B,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AAC1B,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,CAAC,CAAC;AAClC,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AAChC,IAAA,cAAc,GAAG,KAAK,CAAU,IAAI,CAAC,CAAC;AACtC,IAAA,UAAU,GAAG,KAAK,CAAW,EAAE,CAAC,CAAC;IACjC,YAAY,GAAG,MAAM,EAAQ,CAAC;IAE9B,QAAQ,GAAG,EAAE,CAAC;IACd,SAAS,GAAgB,IAAI,CAAC;AAC9B,IAAA,mBAAmB,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACnE,IAAA,SAAS,GAAG,SAAS,CAAa,UAAU,CAAC,CAAC;;AAG9C,IAAA,UAAU,GA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AA,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAE7F,eAAA,EAAA,uBAAuB,CAAC,OAAO,EAAA,QAAA,EAAA,shCAAA,EAAA,CAAA;;;AEvBjD;;AAEG;;;;"}
1
+ {"version":3,"file":"sixbell-telco-sdk-components-file-upload-file-uploader.mjs","sources":["../../../projects/sdk/components/file-upload/file-uploader/src/file-uploader.component.ts","../../../projects/sdk/components/file-upload/file-uploader/src/file-uploader.component.html","../../../projects/sdk/components/file-upload/file-uploader/sixbell-telco-sdk-components-file-upload-file-uploader.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ChangeDetectionStrategy, Component, computed, ElementRef, forwardRef, input, model, output, viewChild } from '@angular/core';\nimport { ControlValueAccessor, FormControl, FormGroup, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { InputComponent, InputSizeProps, InputVariantProps } from '@sixbell-telco/sdk/components/forms/input';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\n\n// Create a new type by excluding specific values from the variant property\nexport type FileUploaderVariantProps = Exclude<InputVariantProps, 'search' | 'search-ghost'>;\nexport type FileUploaderSizeProps = InputSizeProps;\n\nexport type FileUploaderProps = {\n\tvariant?: FileUploaderVariantProps;\n\tsize?: FileUploaderSizeProps;\n};\n\n@Component({\n\tselector: 'st-file-uploader',\n\tstandalone: true,\n\timports: [FormsModule, InputComponent, TypographyDirective],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploaderComponent), multi: true }],\n\ttemplateUrl: './file-uploader.component.html',\n\tchangeDetection: ChangeDetectionStrategy.Default,\n})\nexport class FileUploaderComponent implements ControlValueAccessor {\n\t// Base input properties\n\tvariant = input<FileUploaderVariantProps>('secondary');\n\tsize = input<FileUploaderSizeProps>('md');\n\tclasses = input<string>('');\n\tlabel = input<string>('');\n\tname = input<string | null>(null);\n\tplaceholder = input<string>('');\n\tshowExtensions = input<boolean>(true);\n\textensions = input<string[]>([]);\n\tonFileChange = output<File>();\n\n\tfilename = '';\n\tfileValue: File | null = null;\n\tformattedExtensions = computed(() => this.extensions().join(', '));\n\tfileInput = viewChild<ElementRef>('uploader');\n\n\t// Form control properties\n\tparentForm = input<FormGroup | null>(null);\n\tformControlName = input<string>('');\n\tvalue = model<File | null>(null);\n\n\t// ControlValueAccessor attributes\n\t_onChange: any;\n\t_onTouched: any;\n\tdisabled = model<boolean>(false);\n\n\tget formField(): FormControl | null {\n\t\tif (!this.parentForm()) return null;\n\t\treturn this.parentForm()?.get(this.formControlName()) as FormControl;\n\t}\n\n\twriteValue(value: any): void {\n\t\tthis.value.set(value);\n\t\tthis.filename = value?.name || '';\n\t}\n\tregisterOnChange(fn: any): void {\n\t\tthis._onChange = fn; // Register this as a change callback function\n\t}\n\tregisterOnTouched(fn: any): void {\n\t\tthis._onTouched = fn; // Register this as a blur callback function\n\t}\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabled.set(isDisabled);\n\t}\n\n\t// Input functions\n\thandleClick() {\n\t\tif (!this.fileInput()) return;\n\t\tthis.fileInput()?.nativeElement.click(); // Access the element to trigger click\n\t}\n\n\thandleReadFile(event: Event) {\n\t\tconst file: File | undefined = (event.target as HTMLInputElement).files?.[0];\n\t\tif (file instanceof File) {\n\t\t\tthis.filename = file.name;\n\t\t\tthis._onChange(file);\n\t\t\tthis.value.set(file);\n\t\t\tthis.onFileChange.emit(file);\n\t\t}\n\t}\n\n\thandleAddFile(event: Event) {\n\t\tconst file: File | undefined = (event.target as HTMLInputElement).files?.[0];\n\t\tif (file instanceof File) {\n\t\t\tthis.filename = file.name;\n\t\t\tthis.onFileChange.emit(file);\n\t\t}\n\t}\n\n\tremoveFile() {\n\t\tthis.filename = '';\n\t\tthis.value.set(null);\n\t\tthis._onChange(null);\n\t}\n\n\t// Style Getters\n\tcomponentClass(): FileUploaderProps {\n\t\treturn {\n\t\t\tvariant: 'secondary',\n\t\t\tsize: 'md',\n\t\t};\n\t}\n\n\terrorClass(): FileUploaderProps {\n\t\treturn {\n\t\t\tvariant: 'error',\n\t\t\tsize: this.size(),\n\t\t};\n\t}\n\n\tsuccessClass(): FileUploaderProps {\n\t\treturn {\n\t\t\tvariant: 'success',\n\t\t\tsize: this.size(),\n\t\t};\n\t}\n\n\tvalidationClass(): FileUploaderProps {\n\t\tif (!this.formField) return this.componentClass();\n\t\tif (this.formField.dirty || this.formField.touched) {\n\t\t\tif (this.formField.invalid) {\n\t\t\t\treturn this.errorClass();\n\t\t\t} else if (this.formField.valid) {\n\t\t\t\treturn this.successClass();\n\t\t\t}\n\t\t}\n\n\t\treturn this.componentClass();\n\t}\n}\n","<st-input\n\t[label]=\"label()\"\n\t[placeholder]=\"placeholder()\"\n\tplaceholder=\"Seleccione un archivo...\"\n\t[readonly]=\"true\"\n\t(click)=\"handleClick()\"\n\t[(value)]=\"filename\"\n\t[name]=\"name()\"\n\t[variant]=\"validationClass().variant\"\n\t[size]=\"validationClass().size\"\n\t(onBlur)=\"_onTouched()\"\n\t[disabled]=\"disabled()\"\n>\n\t<div class=\"flex justify-between\">\n\t\t<div>\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (extensions().length > 0 && showExtensions()) {\n\t\t\t<div class=\"mt-1\">\n\t\t\t\t<span typography [tyVariant]=\"'body-xs'\">Archivos aceptados: {{ formattedExtensions() }}</span>\n\t\t\t</div>\n\t\t}\n\t</div>\n</st-input>\n@if (parentForm()) {\n\t<input type=\"file\" [(value)]=\"fileValue\" #uploader hidden (change)=\"handleReadFile($event)\" (blur)=\"_onTouched()\" required />\n} @else {\n\t<input type=\"file\" [(value)]=\"fileValue\" #uploader hidden (change)=\"handleAddFile($event)\" required />\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;MAuBa,qBAAqB,CAAA;;AAEj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EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,cAAc,iXAAE,mBAAmB,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,SAAA,EAAA,cAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,OAAA,EAAA,CAAA,CAAA;;4FAK9C,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBARjC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAChB,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,WAAW,EAAE,cAAc,EAAE,mBAAmB,CAAC,EAChD,SAAA,EAAA,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAE7F,eAAA,EAAA,uBAAuB,CAAC,OAAO,EAAA,QAAA,EAAA,48BAAA,EAAA,CAAA;;;AErBjD;;AAEG;;;;"}
@@ -7,14 +7,17 @@ import { cn } from '@sixbell-telco/sdk/utils/cn';
7
7
  import { cva } from 'class-variance-authority';
8
8
 
9
9
  /* eslint-disable @typescript-eslint/no-explicit-any */
10
- const checkboxComponent = cva(['checkbox', 'border-secondary'], {
10
+ const checkboxComponent = cva(['checkbox'], {
11
11
  variants: {
12
12
  variant: {
13
13
  primary: ['checkbox-primary'],
14
+ secondary: ['checkbox-secondary'],
15
+ tertiary: ['checkbox-tertiary'],
16
+ accent: ['checkbox-accent'],
14
17
  success: ['checkbox-success'],
15
- error: ['checkbox-error'],
16
18
  warning: ['checkbox-warning'],
17
19
  info: ['checkbox-info'],
20
+ error: ['checkbox-error'],
18
21
  },
19
22
  size: {
20
23
  xs: ['checkbox-xs'],
@@ -33,7 +36,6 @@ class CheckboxComponent {
33
36
  // Base checkbox properties
34
37
  variant = input();
35
38
  size = input();
36
- classes = input('');
37
39
  label = input('');
38
40
  name = input(null);
39
41
  value = model(false);
@@ -69,17 +71,16 @@ class CheckboxComponent {
69
71
  return cn(checkboxComponent({
70
72
  variant: this.variant(),
71
73
  size: this.size(),
72
- class: this.classes(),
73
74
  }));
74
75
  }
75
76
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
76
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.12", type: CheckboxComponent, isStandalone: true, selector: "st-checkbox", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, classes: { classPropertyName: "classes", publicName: "classes", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", onChange: "onChange" }, providers: [
77
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.12", type: CheckboxComponent, isStandalone: true, selector: "st-checkbox", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", onChange: "onChange" }, providers: [
77
78
  {
78
79
  provide: NG_VALUE_ACCESSOR,
79
80
  useExisting: CheckboxComponent,
80
81
  multi: true,
81
82
  },
82
- ], ngImport: i0, template: "<label class=\"flex cursor-pointer items-center justify-start gap-4\">\n\t<input\n\t\ttype=\"checkbox\"\n\t\t[class]=\"componentClass\"\n\t\t[(ngModel)]=\"value\"\n\t\t[disabled]=\"disabled()\"\n\t\t[attr.name]=\"name()\"\n\t\t(change)=\"handleChange()\"\n\t\t(blur)=\"handleBlur()\"\n\t/>\n\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'black'\">{{ label() }}</span>\n</label>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["typographyVariant", "typographyColor", "typographyFontWeight", "classes"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
83
+ ], ngImport: i0, template: "<label class=\"flex cursor-pointer items-center justify-start gap-2\">\n\t<input\n\t\ttype=\"checkbox\"\n\t\t[class]=\"componentClass\"\n\t\t[(ngModel)]=\"value\"\n\t\t[disabled]=\"disabled()\"\n\t\t[attr.name]=\"name()\"\n\t\t(change)=\"handleChange()\"\n\t\t(blur)=\"handleBlur()\"\n\t/>\n\t<span typography [tyVariant]=\"'body'\" [tyColor]=\"'base'\">{{ label() }}</span>\n</label>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
83
84
  }
84
85
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CheckboxComponent, decorators: [{
85
86
  type: Component,
@@ -89,7 +90,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
89
90
  useExisting: CheckboxComponent,
90
91
  multi: true,
91
92
  },
92
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"flex cursor-pointer items-center justify-start gap-4\">\n\t<input\n\t\ttype=\"checkbox\"\n\t\t[class]=\"componentClass\"\n\t\t[(ngModel)]=\"value\"\n\t\t[disabled]=\"disabled()\"\n\t\t[attr.name]=\"name()\"\n\t\t(change)=\"handleChange()\"\n\t\t(blur)=\"handleBlur()\"\n\t/>\n\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'black'\">{{ label() }}</span>\n</label>\n" }]
93
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"flex cursor-pointer items-center justify-start gap-2\">\n\t<input\n\t\ttype=\"checkbox\"\n\t\t[class]=\"componentClass\"\n\t\t[(ngModel)]=\"value\"\n\t\t[disabled]=\"disabled()\"\n\t\t[attr.name]=\"name()\"\n\t\t(change)=\"handleChange()\"\n\t\t(blur)=\"handleBlur()\"\n\t/>\n\t<span typography [tyVariant]=\"'body'\" [tyColor]=\"'base'\">{{ label() }}</span>\n</label>\n" }]
93
94
  }] });
94
95
 
95
96
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sixbell-telco-sdk-components-forms-checkbox.mjs","sources":["../../../projects/sdk/components/forms/checkbox/src/checkbox.component.ts","../../../projects/sdk/components/forms/checkbox/src/checkbox.component.html","../../../projects/sdk/components/forms/checkbox/sixbell-telco-sdk-components-forms-checkbox.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ChangeDetectionStrategy, Component, input, model, output } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nconst checkboxComponent = cva(['checkbox', 'border-secondary'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: ['checkbox-primary'],\n\t\t\tsuccess: ['checkbox-success'],\n\t\t\terror: ['checkbox-error'],\n\t\t\twarning: ['checkbox-warning'],\n\t\t\tinfo: ['checkbox-info'],\n\t\t},\n\t\tsize: {\n\t\t\txs: ['checkbox-xs'],\n\t\t\tsm: ['checkbox-sm'],\n\t\t\tmd: ['checkbox-md'],\n\t\t\tlg: ['checkbox-lg'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'primary',\n\t\tsize: 'md',\n\t},\n});\n\nexport type CheckboxVariantProps = 'primary' | 'success' | 'error' | 'warning' | 'info' | null | undefined;\nexport type CheckboxSizeProps = 'xs' | 'sm' | 'md' | 'lg' | null | undefined;\n\nexport type CheckboxProps = {\n\tvariant?: CheckboxVariantProps;\n\tsize?: CheckboxSizeProps;\n};\n\n@Component({\n\tselector: 'st-checkbox',\n\tstandalone: true,\n\timports: [FormsModule, TypographyDirective],\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: CheckboxComponent,\n\t\t\tmulti: true,\n\t\t},\n\t],\n\ttemplateUrl: './checkbox.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CheckboxComponent implements ControlValueAccessor {\n\t// Base checkbox properties\n\tvariant = input<CheckboxVariantProps>();\n\tsize = input<CheckboxSizeProps>();\n\tclasses = input<string>('');\n\tlabel = input<string>('');\n\tname = input<string | null>(null);\n\n\tvalue = model<boolean>(false);\n\n\t// ControlValueAccessor attributes\n\tprivate onControlChange: any = () => {};\n\tprivate onControlTouch: any = () => {};\n\tdisabled = model<boolean>(false);\n\n\t// ControlValueAccessor methods\n\twriteValue(obj: any): void {\n\t\tthis.value.set(obj);\n\t}\n\n\tregisterOnChange(fn: any): void {\n\t\tthis.onControlChange = fn;\n\t}\n\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onControlTouch = fn;\n\t}\n\n\tsetDisabledState?(isDisabled: boolean): void {\n\t\tthis.disabled.set(isDisabled);\n\t}\n\n\t// Change handler\n\tonChange = output<boolean>();\n\thandleChange(): void {\n\t\tthis.onControlChange(this.value());\n\t\tthis.onChange.emit(this.value());\n\t}\n\n\t// Blur handler\n\thandleBlur() {\n\t\tthis.onControlTouch();\n\t}\n\n\t// classes\n\tget componentClass() {\n\t\treturn cn(\n\t\t\tcheckboxComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tsize: this.size(),\n\t\t\t\tclass: this.classes(),\n\t\t\t}),\n\t\t);\n\t}\n}\n","<label class=\"flex cursor-pointer items-center justify-start gap-4\">\n\t<input\n\t\ttype=\"checkbox\"\n\t\t[class]=\"componentClass\"\n\t\t[(ngModel)]=\"value\"\n\t\t[disabled]=\"disabled()\"\n\t\t[attr.name]=\"name()\"\n\t\t(change)=\"handleChange()\"\n\t\t(blur)=\"handleBlur()\"\n\t/>\n\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'black'\">{{ label() }}</span>\n</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;AAOA,MAAM,iBAAiB,GAAG,GAAG,CAAC,CAAC,UAAU,EAAE,kBAAkB,CAAC,EA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,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,4BAAA,EAAA,QAAA,EAAA,uGAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,mBAAA,EAAA,iBAAA,EAAA,sBAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAW9B,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAd7B,SAAS;+BACC,aAAa,EAAA,UAAA,EACX,IAAI,EACP,OAAA,EAAA,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAChC,SAAA,EAAA;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAmB,iBAAA;AAC9B,4BAAA,KAAK,EAAE,IAAI;AACX,yBAAA;qBACD,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,qZAAA,EAAA,CAAA;;;AElDhD;;AAEG;;;;"}
1
+ {"version":3,"file":"sixbell-telco-sdk-components-forms-checkbox.mjs","sources":["../../../projects/sdk/components/forms/checkbox/src/checkbox.component.ts","../../../projects/sdk/components/forms/checkbox/src/checkbox.component.html","../../../projects/sdk/components/forms/checkbox/sixbell-telco-sdk-components-forms-checkbox.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ChangeDetectionStrategy, Component, input, model, output } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nconst checkboxComponent = cva(['checkbox'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: ['checkbox-primary'],\n\t\t\tsecondary: ['checkbox-secondary'],\n\t\t\ttertiary: ['checkbox-tertiary'],\n\t\t\taccent: ['checkbox-accent'],\n\t\t\tsuccess: ['checkbox-success'],\n\t\t\twarning: ['checkbox-warning'],\n\t\t\tinfo: ['checkbox-info'],\n\t\t\terror: ['checkbox-error'],\n\t\t},\n\t\tsize: {\n\t\t\txs: ['checkbox-xs'],\n\t\t\tsm: ['checkbox-sm'],\n\t\t\tmd: ['checkbox-md'],\n\t\t\tlg: ['checkbox-lg'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'primary',\n\t\tsize: 'md',\n\t},\n});\n\nexport type CheckboxVariantProps = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'success' | 'warning' | 'info' | 'error' | null | undefined;\nexport type CheckboxSizeProps = 'xs' | 'sm' | 'md' | 'lg' | null | undefined;\n\nexport type CheckboxProps = {\n\tvariant?: CheckboxVariantProps;\n\tsize?: CheckboxSizeProps;\n};\n\n@Component({\n\tselector: 'st-checkbox',\n\tstandalone: true,\n\timports: [FormsModule, TypographyDirective],\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: CheckboxComponent,\n\t\t\tmulti: true,\n\t\t},\n\t],\n\ttemplateUrl: './checkbox.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CheckboxComponent implements ControlValueAccessor {\n\t// Base checkbox properties\n\tvariant = input<CheckboxVariantProps>();\n\tsize = input<CheckboxSizeProps>();\n\tlabel = input<string>('');\n\tname = input<string | null>(null);\n\n\tvalue = model<boolean>(false);\n\n\t// ControlValueAccessor attributes\n\tprivate onControlChange: any = () => {};\n\tprivate onControlTouch: any = () => {};\n\tdisabled = model<boolean>(false);\n\n\t// ControlValueAccessor methods\n\twriteValue(obj: any): void {\n\t\tthis.value.set(obj);\n\t}\n\n\tregisterOnChange(fn: any): void {\n\t\tthis.onControlChange = fn;\n\t}\n\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onControlTouch = fn;\n\t}\n\n\tsetDisabledState?(isDisabled: boolean): void {\n\t\tthis.disabled.set(isDisabled);\n\t}\n\n\t// Change handler\n\tonChange = output<boolean>();\n\thandleChange(): void {\n\t\tthis.onControlChange(this.value());\n\t\tthis.onChange.emit(this.value());\n\t}\n\n\t// Blur handler\n\thandleBlur() {\n\t\tthis.onControlTouch();\n\t}\n\n\t// classes\n\tget componentClass() {\n\t\treturn cn(\n\t\t\tcheckboxComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tsize: this.size(),\n\t\t\t}),\n\t\t);\n\t}\n}\n","<label class=\"flex cursor-pointer items-center justify-start gap-2\">\n\t<input\n\t\ttype=\"checkbox\"\n\t\t[class]=\"componentClass\"\n\t\t[(ngModel)]=\"value\"\n\t\t[disabled]=\"disabled()\"\n\t\t[attr.name]=\"name()\"\n\t\t(change)=\"handleChange()\"\n\t\t(blur)=\"handleBlur()\"\n\t/>\n\t<span typography [tyVariant]=\"'body'\" [tyColor]=\"'base'\">{{ label() }}</span>\n</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;AAOA,MAAM,iBAAiB,GAAG,GAAG,CAAC,CAAC,UAAU,CAAC,EAAE;AAC3C,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,OAAO,EAAE,CAAC,kBAAkB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AA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,SAAA,EAAA,cAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAW9B,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAd7B,SAAS;+BACC,aAAa,EAAA,UAAA,EACX,IAAI,EACP,OAAA,EAAA,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAChC,SAAA,EAAA;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAmB,iBAAA;AAC9B,4BAAA,KAAK,EAAE,IAAI;AACX,yBAAA;qBACD,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,oYAAA,EAAA,CAAA;;;AErDhD;;AAEG;;;;"}
@@ -151,7 +151,7 @@ class ComboboxComponent {
151
151
  useExisting: ComboboxComponent,
152
152
  multi: true,
153
153
  },
154
- ], ngImport: i0, template: "<div class=\"flex flex-col gap-1\">\n\t@if (label()) {\n\t\t<label [for]=\"this.name()\" class=\"block\"\n\t\t\t><span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span></label\n\t\t>\n\t}\n\t<ng-select\n\t\t#select\n\t\tnotFoundText=\"Ning\u00FAn elemento encontrado...\"\n\t\tloadingText=\"Cargando...\"\n\t\t[searchable]=\"false\"\n\t\t[clearable]=\"false\"\n\t\t[(ngModel)]=\"value\"\n\t\t[bindLabel]=\"key()\"\n\t\t[disabled]=\"disabled()\"\n\t\t(change)=\"handleSelect()\"\n\t\t(blur)=\"handleBlur()\"\n\t\t[class]=\"validationClass\"\n\t>\n\t\t@if (emptyOptionText() && !search) {\n\t\t\t<ng-option value=\"\">\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{\n\t\t\t\t\temptyOptionText()\n\t\t\t\t}}</span></ng-option\n\t\t\t>\n\t\t}\n\t\t@if (simpleOption) {\n\t\t\t@for (option of options(); track option) {\n\t\t\t\t<ng-option [value]=\"option\">\n\t\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ option }}</span>\n\t\t\t\t</ng-option>\n\t\t\t}\n\t\t} @else {\n\t\t\t@for (option of options(); track option[trackBy()]) {\n\t\t\t\t<ng-option [value]=\"option\">\n\t\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ option[key()] }}</span>\n\t\t\t\t</ng-option>\n\t\t\t}\n\t\t}\n\t\t<ng-template ng-header-tmp>\n\t\t\t<st-input placeholder=\"Buscar...\" (onDebounceChange)=\"handleSearch($event)\" [variant]=\"'icon-ghost'\" />\n\t\t\t<!-- TODO: loader -->\n\t\t</ng-template>\n\t</ng-select>\n\t<ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i1.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick", "keyDownFn"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "component", type: i1.NgOptionComponent, selector: "ng-option", inputs: ["value", "disabled"] }, { kind: "directive", type: i1.NgHeaderTemplateDirective, selector: "[ng-header-tmp]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: InputComponent, selector: "st-input", inputs: ["variant", "shape", "size", "classes", "label", "type", "name", "placeholder", "icon", "iconPosition", "iconClasses", "readonly", "value", "parentForm", "formControlName", "disabled", "debounceTime"], outputs: ["valueChange", "disabledChange", "onEnter", "onBlur", "onDebounceChange"] }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["typographyVariant", "typographyColor", "typographyFontWeight", "classes"] }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
154
+ ], ngImport: i0, template: "<div class=\"flex flex-col gap-1\">\n\t@if (label()) {\n\t\t<label [for]=\"this.name()\" class=\"block\"\n\t\t\t><span typography [tyVariant]=\"'body'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ label() }}</span></label\n\t\t>\n\t}\n\t<ng-select\n\t\t#select\n\t\tnotFoundText=\"Ning\u00FAn elemento encontrado...\"\n\t\tloadingText=\"Cargando...\"\n\t\t[searchable]=\"false\"\n\t\t[clearable]=\"false\"\n\t\t[(ngModel)]=\"value\"\n\t\t[bindLabel]=\"key()\"\n\t\t[disabled]=\"disabled()\"\n\t\t(change)=\"handleSelect()\"\n\t\t(blur)=\"handleBlur()\"\n\t\t[class]=\"validationClass\"\n\t>\n\t\t@if (emptyOptionText() && !search) {\n\t\t\t<ng-option value=\"\">\n\t\t\t\t<span typography [tyVariant]=\"'body-sm'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ emptyOptionText() }}</span></ng-option\n\t\t\t>\n\t\t}\n\t\t@if (simpleOption) {\n\t\t\t@for (option of options(); track option) {\n\t\t\t\t<ng-option [value]=\"option\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body-sm'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ option }}</span>\n\t\t\t\t</ng-option>\n\t\t\t}\n\t\t} @else {\n\t\t\t@for (option of options(); track option[trackBy()]) {\n\t\t\t\t<ng-option [value]=\"option\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body-sm'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ option[key()] }}</span>\n\t\t\t\t</ng-option>\n\t\t\t}\n\t\t}\n\t\t<ng-template ng-header-tmp>\n\t\t\t<st-input placeholder=\"Buscar...\" (onDebounceChange)=\"handleSearch($event)\" variant=\"secondary\" [ghost]=\"true\" />\n\t\t\t<!-- TODO: loader -->\n\t\t</ng-template>\n\t</ng-select>\n\t<ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i1.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick", "keyDownFn"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "component", type: i1.NgOptionComponent, selector: "ng-option", inputs: ["value", "disabled"] }, { kind: "directive", type: i1.NgHeaderTemplateDirective, selector: "[ng-header-tmp]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: InputComponent, selector: "st-input", inputs: ["variant", "size", "label", "type", "name", "placeholder", "icon", "iconPosition", "iconClasses", "readonly", "iconClickable", "ghost", "value", "parentForm", "formControlName", "disabled", "debounceTime"], outputs: ["onIconClick", "valueChange", "disabledChange", "onEnter", "onBlur", "onDebounceChange"] }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight"] }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
155
155
  }
156
156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ComboboxComponent, decorators: [{
157
157
  type: Component,
@@ -161,7 +161,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
161
161
  useExisting: ComboboxComponent,
162
162
  multi: true,
163
163
  },
164
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col gap-1\">\n\t@if (label()) {\n\t\t<label [for]=\"this.name()\" class=\"block\"\n\t\t\t><span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span></label\n\t\t>\n\t}\n\t<ng-select\n\t\t#select\n\t\tnotFoundText=\"Ning\u00FAn elemento encontrado...\"\n\t\tloadingText=\"Cargando...\"\n\t\t[searchable]=\"false\"\n\t\t[clearable]=\"false\"\n\t\t[(ngModel)]=\"value\"\n\t\t[bindLabel]=\"key()\"\n\t\t[disabled]=\"disabled()\"\n\t\t(change)=\"handleSelect()\"\n\t\t(blur)=\"handleBlur()\"\n\t\t[class]=\"validationClass\"\n\t>\n\t\t@if (emptyOptionText() && !search) {\n\t\t\t<ng-option value=\"\">\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{\n\t\t\t\t\temptyOptionText()\n\t\t\t\t}}</span></ng-option\n\t\t\t>\n\t\t}\n\t\t@if (simpleOption) {\n\t\t\t@for (option of options(); track option) {\n\t\t\t\t<ng-option [value]=\"option\">\n\t\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ option }}</span>\n\t\t\t\t</ng-option>\n\t\t\t}\n\t\t} @else {\n\t\t\t@for (option of options(); track option[trackBy()]) {\n\t\t\t\t<ng-option [value]=\"option\">\n\t\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ option[key()] }}</span>\n\t\t\t\t</ng-option>\n\t\t\t}\n\t\t}\n\t\t<ng-template ng-header-tmp>\n\t\t\t<st-input placeholder=\"Buscar...\" (onDebounceChange)=\"handleSearch($event)\" [variant]=\"'icon-ghost'\" />\n\t\t\t<!-- TODO: loader -->\n\t\t</ng-template>\n\t</ng-select>\n\t<ng-content></ng-content>\n</div>\n" }]
164
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col gap-1\">\n\t@if (label()) {\n\t\t<label [for]=\"this.name()\" class=\"block\"\n\t\t\t><span typography [tyVariant]=\"'body'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ label() }}</span></label\n\t\t>\n\t}\n\t<ng-select\n\t\t#select\n\t\tnotFoundText=\"Ning\u00FAn elemento encontrado...\"\n\t\tloadingText=\"Cargando...\"\n\t\t[searchable]=\"false\"\n\t\t[clearable]=\"false\"\n\t\t[(ngModel)]=\"value\"\n\t\t[bindLabel]=\"key()\"\n\t\t[disabled]=\"disabled()\"\n\t\t(change)=\"handleSelect()\"\n\t\t(blur)=\"handleBlur()\"\n\t\t[class]=\"validationClass\"\n\t>\n\t\t@if (emptyOptionText() && !search) {\n\t\t\t<ng-option value=\"\">\n\t\t\t\t<span typography [tyVariant]=\"'body-sm'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ emptyOptionText() }}</span></ng-option\n\t\t\t>\n\t\t}\n\t\t@if (simpleOption) {\n\t\t\t@for (option of options(); track option) {\n\t\t\t\t<ng-option [value]=\"option\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body-sm'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ option }}</span>\n\t\t\t\t</ng-option>\n\t\t\t}\n\t\t} @else {\n\t\t\t@for (option of options(); track option[trackBy()]) {\n\t\t\t\t<ng-option [value]=\"option\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body-sm'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ option[key()] }}</span>\n\t\t\t\t</ng-option>\n\t\t\t}\n\t\t}\n\t\t<ng-template ng-header-tmp>\n\t\t\t<st-input placeholder=\"Buscar...\" (onDebounceChange)=\"handleSearch($event)\" variant=\"secondary\" [ghost]=\"true\" />\n\t\t\t<!-- TODO: loader -->\n\t\t</ng-template>\n\t</ng-select>\n\t<ng-content></ng-content>\n</div>\n" }]
165
165
  }] });
166
166
 
167
167
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sixbell-telco-sdk-components-forms-combobox.mjs","sources":["../../../projects/sdk/components/forms/combobox/src/combobox.component.ts","../../../projects/sdk/components/forms/combobox/src/combobox.component.html","../../../projects/sdk/components/forms/combobox/sixbell-telco-sdk-components-forms-combobox.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ChangeDetectionStrategy, Component, effect, input, model, output } from '@angular/core';\nimport { ControlValueAccessor, FormControl, FormGroup, FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';\nimport { NgSelectModule } from '@ng-select/ng-select';\nimport { InputComponent } from '@sixbell-telco/sdk/components/forms/input';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nconst comboboxComponent = cva(['[&>*]:w-full', 'font-body', 'custom-ng-select'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: ['combobox-primary first:'],\n\t\t\tsecondary: ['combobox-secondary'],\n\t\t\tsuccess: ['combobox-success'],\n\t\t\terror: ['combobox-error'],\n\t\t\twarning: ['combobox-warning'],\n\t\t},\n\t\tshape: {\n\t\t\t'round-none': ['[&>*]:rounded-[0px_!important]'],\n\t\t\t'round-sm': ['[&>*]:rounded-[var(--rounded-btn-sm)_!important]'],\n\t\t\t'round-md': ['[&>*]:rounded-[var(--rounded-btn-md)_!important]'],\n\t\t\t'round-lg': ['[&>*]:rounded-[var(--rounded-btn-lg)_!important]'],\n\t\t},\n\t\tsize: {\n\t\t\tsm: ['[&>*:first-child]:!px-2', '[&>*:first-child]:!py-1', '[&>*:first-child]:!h-auto', '[&>*:first-child]:!min-h-[auto]'],\n\t\t\tmd: ['[&>*:first-child]:!px-3', '[&>*:first-child]:!py-2', '[&>*:first-child]:!h-auto', '[&>*:first-child]:!min-h-[auto]'],\n\t\t\tlg: ['[&>*:first-child]:!px-4', '[&>*:first-child]:!py-3', '[&>*:first-child]:!h-auto', '[&>*:first-child]:!min-h-[auto]'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'secondary',\n\t\tshape: 'round-sm',\n\t\tsize: 'md',\n\t},\n});\n\nexport type ComboboxVariantProps = 'primary' | 'secondary' | 'success' | 'error' | 'warning' | null | undefined;\nexport type ComboboxShapeProps = 'round-none' | 'round-sm' | 'round-md' | 'round-lg' | null | undefined;\nexport type ComboboxSizeProps = 'sm' | 'md' | 'lg' | null | undefined;\n\nexport type ComboboxProps = {\n\tvariant?: ComboboxVariantProps;\n\tshape?: ComboboxShapeProps;\n\tsize?: ComboboxSizeProps;\n};\n\n/**\n * Search input component\n * A search input component that allows the user to search for an option from a list of options\n * This component was implemented using the ng-select library\n * Docs: https://github.com/ng-select/ng-select\n */\n@Component({\n\tselector: 'st-combobox',\n\tstandalone: true,\n\timports: [NgSelectModule, FormsModule, InputComponent, TypographyDirective, ReactiveFormsModule],\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: ComboboxComponent,\n\t\t\tmulti: true,\n\t\t},\n\t],\n\ttemplateUrl: './combobox.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComboboxComponent implements ControlValueAccessor {\n\t// Basic input properties\n\tvariant = input<ComboboxVariantProps>('secondary');\n\tshape = input<ComboboxShapeProps>('round-sm');\n\tsize = input<ComboboxSizeProps>('md');\n\tclasses = input<string>('');\n\tname = input<string | null>(null);\n\tlabel = input<string>('');\n\n\tvalue = model();\n\toptions = input<any[]>([]);\n\temptyOptionText = input<string>('');\n\tloading = input<boolean>(false);\n\tsearch = '';\n\n\t// Options properties\n\ttrackBy = input<string>('id');\n\tkey = input<string>('name');\n\n\t// Form control properties\n\tparentForm = input<FormGroup | null>(null);\n\tformControlName = input<string>('');\n\n\tget formField(): FormControl | null {\n\t\tif (!this.parentForm()) return null;\n\t\treturn this.parentForm()?.get(this.formControlName()) as FormControl;\n\t}\n\n\t// ControlValueAccessor attributes\n\tprivate onControlChange: any = () => {};\n\tprivate onControlTouch: any = () => {};\n\tdisabled = model<boolean>(false);\n\n\t// ControlValueAccessor methods\n\twriteValue(obj: any): void {\n\t\tthis.value.set(obj);\n\t}\n\n\tregisterOnChange(fn: any): void {\n\t\tthis.onControlChange = fn;\n\t}\n\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onControlTouch = fn;\n\t}\n\n\tsetDisabledState?(isDisabled: boolean): void {\n\t\tthis.disabled.set(isDisabled);\n\t}\n\n\t// Select handler\n\tonChange = output<any>();\n\thandleSelect() {\n\t\tthis.onChange.emit(this.value());\n\t\tthis.onControlChange(this.value());\n\t\tthis.handleSearch('');\n\t}\n\n\t// Search handler\n\tonSearch = output<string>();\n\thandleSearch(search: string) {\n\t\tthis.onSearch.emit(search);\n\t\tthis.search = search;\n\t}\n\n\t// Blur handler\n\thandleBlur() {\n\t\tthis.onControlTouch();\n\t}\n\n\t// Checks if options are primitives or not\n\tsimpleOption = false;\n\toptionsEffect = effect(() => {\n\t\tthis.simpleOption = this.options().every((option) => typeof option !== 'object');\n\t});\n\n\tget componentClass() {\n\t\treturn cn(\n\t\t\tcomboboxComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tshape: this.shape(),\n\t\t\t\tsize: this.size(),\n\t\t\t\tclass: this.classes(),\n\t\t\t}),\n\t\t);\n\t}\n\n\tget errorClass() {\n\t\treturn cn(\n\t\t\tcomboboxComponent({\n\t\t\t\tvariant: 'error',\n\t\t\t\tshape: this.shape(),\n\t\t\t\tsize: this.size(),\n\t\t\t\tclass: this.classes(),\n\t\t\t}),\n\t\t);\n\t}\n\n\tget successClass() {\n\t\treturn cn(\n\t\t\tcomboboxComponent({\n\t\t\t\tvariant: 'success',\n\t\t\t\tshape: this.shape(),\n\t\t\t\tsize: this.size(),\n\t\t\t\tclass: this.classes(),\n\t\t\t}),\n\t\t);\n\t}\n\n\tget validationClass() {\n\t\tif (!this.formField) return this.componentClass;\n\n\t\tif (this.formField.dirty || this.formField.touched) {\n\t\t\tif (this.formField.invalid) {\n\t\t\t\treturn this.errorClass;\n\t\t\t} else if (this.formField.valid) {\n\t\t\t\treturn this.successClass;\n\t\t\t}\n\t\t}\n\n\t\treturn this.componentClass;\n\t}\n}\n","<div class=\"flex flex-col gap-1\">\n\t@if (label()) {\n\t\t<label [for]=\"this.name()\" class=\"block\"\n\t\t\t><span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span></label\n\t\t>\n\t}\n\t<ng-select\n\t\t#select\n\t\tnotFoundText=\"Ningún elemento encontrado...\"\n\t\tloadingText=\"Cargando...\"\n\t\t[searchable]=\"false\"\n\t\t[clearable]=\"false\"\n\t\t[(ngModel)]=\"value\"\n\t\t[bindLabel]=\"key()\"\n\t\t[disabled]=\"disabled()\"\n\t\t(change)=\"handleSelect()\"\n\t\t(blur)=\"handleBlur()\"\n\t\t[class]=\"validationClass\"\n\t>\n\t\t@if (emptyOptionText() && !search) {\n\t\t\t<ng-option value=\"\">\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{\n\t\t\t\t\temptyOptionText()\n\t\t\t\t}}</span></ng-option\n\t\t\t>\n\t\t}\n\t\t@if (simpleOption) {\n\t\t\t@for (option of options(); track option) {\n\t\t\t\t<ng-option [value]=\"option\">\n\t\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ option }}</span>\n\t\t\t\t</ng-option>\n\t\t\t}\n\t\t} @else {\n\t\t\t@for (option of options(); track option[trackBy()]) {\n\t\t\t\t<ng-option [value]=\"option\">\n\t\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ option[key()] }}</span>\n\t\t\t\t</ng-option>\n\t\t\t}\n\t\t}\n\t\t<ng-template ng-header-tmp>\n\t\t\t<st-input placeholder=\"Buscar...\" (onDebounceChange)=\"handleSearch($event)\" [variant]=\"'icon-ghost'\" />\n\t\t\t<!-- TODO: loader -->\n\t\t</ng-template>\n\t</ng-select>\n\t<ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AASA,MAAM,iBAAiB,GAAG,GAAG,CAAC,CAAC,cAAc,EAAE,WAAW,EAAE,kBAAkB,CAAC,EAAE;AAChF,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,OAAO,EAAE,CAAC,yBAAyB,CAAC;YACpC,SAAS,EAAE,CAAC,oBAAoB,CAAC;YACjC,OAAO,EAAE,CAAC,kBAAkB,CAAC;YAC7B,KAAK,EAAE,CAAC,gBAAgB,CAAC;YACzB,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC7B,SAAA;AACD,QAAA,KAAK,EAAE;YACN,YAAY,EAAE,CAAC,gCAAgC,CAAC;YAChD,UAAU,EAAE,CAAC,kDAAkD,CAAC;YAChE,UAAU,EAAE,CAAC,kDAAkD,CAAC;YAChE,UAAU,EAAE,CAAC,kDAAkD,CAAC;AAChE,SAAA;AACD,QAAA,IAAI,EAAE;YACL,EAAE,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,iCAAiC,CAAC;YAC1H,EAAE,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,iCAAiC,CAAC;YAC1H,EAAE,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,iCAAiC,CAAC;AAC1H,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,eAAe,EAAE;AAChB,QAAA,OAAO,EAAE,WAAW;AACpB,QAAA,KAAK,EAAE,UAAU;AACjB,QAAA,IAAI,EAAE,IAAI;AACV,KAAA;AACD,CAAA,CAAC,CAAC;AA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BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAmB,iBAAA;AAC9B,4BAAA,KAAK,EAAE,IAAI;AACX,yBAAA;qBACD,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,+tDAAA,EAAA,CAAA;;;AElEhD;;AAEG;;;;"}
1
+ {"version":3,"file":"sixbell-telco-sdk-components-forms-combobox.mjs","sources":["../../../projects/sdk/components/forms/combobox/src/combobox.component.ts","../../../projects/sdk/components/forms/combobox/src/combobox.component.html","../../../projects/sdk/components/forms/combobox/sixbell-telco-sdk-components-forms-combobox.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ChangeDetectionStrategy, Component, effect, input, model, output } from '@angular/core';\nimport { ControlValueAccessor, FormControl, FormGroup, FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';\nimport { NgSelectModule } from '@ng-select/ng-select';\nimport { InputComponent } from '@sixbell-telco/sdk/components/forms/input';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nconst comboboxComponent = cva(['[&>*]:w-full', 'font-body', 'custom-ng-select'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: ['combobox-primary first:'],\n\t\t\tsecondary: ['combobox-secondary'],\n\t\t\tsuccess: ['combobox-success'],\n\t\t\terror: ['combobox-error'],\n\t\t\twarning: ['combobox-warning'],\n\t\t},\n\t\tshape: {\n\t\t\t'round-none': ['[&>*]:rounded-[0px_!important]'],\n\t\t\t'round-sm': ['[&>*]:rounded-[var(--rounded-btn-sm)_!important]'],\n\t\t\t'round-md': ['[&>*]:rounded-[var(--rounded-btn-md)_!important]'],\n\t\t\t'round-lg': ['[&>*]:rounded-[var(--rounded-btn-lg)_!important]'],\n\t\t},\n\t\tsize: {\n\t\t\tsm: ['[&>*:first-child]:!px-2', '[&>*:first-child]:!py-1', '[&>*:first-child]:!h-auto', '[&>*:first-child]:!min-h-[auto]'],\n\t\t\tmd: ['[&>*:first-child]:!px-3', '[&>*:first-child]:!py-2', '[&>*:first-child]:!h-auto', '[&>*:first-child]:!min-h-[auto]'],\n\t\t\tlg: ['[&>*:first-child]:!px-4', '[&>*:first-child]:!py-3', '[&>*:first-child]:!h-auto', '[&>*:first-child]:!min-h-[auto]'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'secondary',\n\t\tshape: 'round-sm',\n\t\tsize: 'md',\n\t},\n});\n\nexport type ComboboxVariantProps = 'primary' | 'secondary' | 'success' | 'error' | 'warning' | null | undefined;\nexport type ComboboxShapeProps = 'round-none' | 'round-sm' | 'round-md' | 'round-lg' | null | undefined;\nexport type ComboboxSizeProps = 'sm' | 'md' | 'lg' | null | undefined;\n\nexport type ComboboxProps = {\n\tvariant?: ComboboxVariantProps;\n\tshape?: ComboboxShapeProps;\n\tsize?: ComboboxSizeProps;\n};\n\n/**\n * Search input component\n * A search input component that allows the user to search for an option from a list of options\n * This component was implemented using the ng-select library\n * Docs: https://github.com/ng-select/ng-select\n */\n@Component({\n\tselector: 'st-combobox',\n\tstandalone: true,\n\timports: [NgSelectModule, FormsModule, InputComponent, TypographyDirective, ReactiveFormsModule],\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: ComboboxComponent,\n\t\t\tmulti: true,\n\t\t},\n\t],\n\ttemplateUrl: './combobox.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComboboxComponent implements ControlValueAccessor {\n\t// Basic input properties\n\tvariant = input<ComboboxVariantProps>('secondary');\n\tshape = input<ComboboxShapeProps>('round-sm');\n\tsize = input<ComboboxSizeProps>('md');\n\tclasses = input<string>('');\n\tname = input<string | null>(null);\n\tlabel = input<string>('');\n\n\tvalue = model();\n\toptions = input<any[]>([]);\n\temptyOptionText = input<string>('');\n\tloading = input<boolean>(false);\n\tsearch = '';\n\n\t// Options properties\n\ttrackBy = input<string>('id');\n\tkey = input<string>('name');\n\n\t// Form control properties\n\tparentForm = input<FormGroup | null>(null);\n\tformControlName = input<string>('');\n\n\tget formField(): FormControl | null {\n\t\tif (!this.parentForm()) return null;\n\t\treturn this.parentForm()?.get(this.formControlName()) as FormControl;\n\t}\n\n\t// ControlValueAccessor attributes\n\tprivate onControlChange: any = () => {};\n\tprivate onControlTouch: any = () => {};\n\tdisabled = model<boolean>(false);\n\n\t// ControlValueAccessor methods\n\twriteValue(obj: any): void {\n\t\tthis.value.set(obj);\n\t}\n\n\tregisterOnChange(fn: any): void {\n\t\tthis.onControlChange = fn;\n\t}\n\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onControlTouch = fn;\n\t}\n\n\tsetDisabledState?(isDisabled: boolean): void {\n\t\tthis.disabled.set(isDisabled);\n\t}\n\n\t// Select handler\n\tonChange = output<any>();\n\thandleSelect() {\n\t\tthis.onChange.emit(this.value());\n\t\tthis.onControlChange(this.value());\n\t\tthis.handleSearch('');\n\t}\n\n\t// Search handler\n\tonSearch = output<string>();\n\thandleSearch(search: string) {\n\t\tthis.onSearch.emit(search);\n\t\tthis.search = search;\n\t}\n\n\t// Blur handler\n\thandleBlur() {\n\t\tthis.onControlTouch();\n\t}\n\n\t// Checks if options are primitives or not\n\tsimpleOption = false;\n\toptionsEffect = effect(() => {\n\t\tthis.simpleOption = this.options().every((option) => typeof option !== 'object');\n\t});\n\n\tget componentClass() {\n\t\treturn cn(\n\t\t\tcomboboxComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tshape: this.shape(),\n\t\t\t\tsize: this.size(),\n\t\t\t\tclass: this.classes(),\n\t\t\t}),\n\t\t);\n\t}\n\n\tget errorClass() {\n\t\treturn cn(\n\t\t\tcomboboxComponent({\n\t\t\t\tvariant: 'error',\n\t\t\t\tshape: this.shape(),\n\t\t\t\tsize: this.size(),\n\t\t\t\tclass: this.classes(),\n\t\t\t}),\n\t\t);\n\t}\n\n\tget successClass() {\n\t\treturn cn(\n\t\t\tcomboboxComponent({\n\t\t\t\tvariant: 'success',\n\t\t\t\tshape: this.shape(),\n\t\t\t\tsize: this.size(),\n\t\t\t\tclass: this.classes(),\n\t\t\t}),\n\t\t);\n\t}\n\n\tget validationClass() {\n\t\tif (!this.formField) return this.componentClass;\n\n\t\tif (this.formField.dirty || this.formField.touched) {\n\t\t\tif (this.formField.invalid) {\n\t\t\t\treturn this.errorClass;\n\t\t\t} else if (this.formField.valid) {\n\t\t\t\treturn this.successClass;\n\t\t\t}\n\t\t}\n\n\t\treturn this.componentClass;\n\t}\n}\n","<div class=\"flex flex-col gap-1\">\n\t@if (label()) {\n\t\t<label [for]=\"this.name()\" class=\"block\"\n\t\t\t><span typography [tyVariant]=\"'body'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ label() }}</span></label\n\t\t>\n\t}\n\t<ng-select\n\t\t#select\n\t\tnotFoundText=\"Ningún elemento encontrado...\"\n\t\tloadingText=\"Cargando...\"\n\t\t[searchable]=\"false\"\n\t\t[clearable]=\"false\"\n\t\t[(ngModel)]=\"value\"\n\t\t[bindLabel]=\"key()\"\n\t\t[disabled]=\"disabled()\"\n\t\t(change)=\"handleSelect()\"\n\t\t(blur)=\"handleBlur()\"\n\t\t[class]=\"validationClass\"\n\t>\n\t\t@if (emptyOptionText() && !search) {\n\t\t\t<ng-option value=\"\">\n\t\t\t\t<span typography [tyVariant]=\"'body-sm'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ emptyOptionText() }}</span></ng-option\n\t\t\t>\n\t\t}\n\t\t@if (simpleOption) {\n\t\t\t@for (option of options(); track option) {\n\t\t\t\t<ng-option [value]=\"option\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body-sm'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ option }}</span>\n\t\t\t\t</ng-option>\n\t\t\t}\n\t\t} @else {\n\t\t\t@for (option of options(); track option[trackBy()]) {\n\t\t\t\t<ng-option [value]=\"option\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body-sm'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ option[key()] }}</span>\n\t\t\t\t</ng-option>\n\t\t\t}\n\t\t}\n\t\t<ng-template ng-header-tmp>\n\t\t\t<st-input placeholder=\"Buscar...\" (onDebounceChange)=\"handleSearch($event)\" variant=\"secondary\" [ghost]=\"true\" />\n\t\t\t<!-- TODO: loader -->\n\t\t</ng-template>\n\t</ng-select>\n\t<ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AASA,MAAM,iBAAiB,GAAG,GAAG,CAAC,CAAC,cAAc,EAAE,WAAW,EAAE,kBAAkB,CAAC,EAAE;AAChF,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,OAAO,EAAE,CAAC,yBAAyB,CAAC;YACpC,SAAS,EAAE,CAAC,oBAAoB,CAAC;YACjC,OAAO,EAAE,CAAC,kBAAkB,CAAC;YAC7B,KAAK,EAAE,CAAC,gBAAgB,CAAC;YACzB,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC7B,SAAA;AACD,QAAA,KAAK,EAAE;YACN,YAAY,EAAE,CAAC,gCAAgC,CAAC;YAChD,UAAU,EAAE,CAAC,kDAAkD,CAAC;YAChE,UAAU,EAAE,CAAC,kDAAkD,CAAC;YAChE,UAAU,EAAE,CAAC,kDAAkD,CAAC;AAChE,SAAA;AACD,QAAA,IAAI,EAAE;YACL,EAAE,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,iCAAiC,CAAC;YAC1H,EAAE,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,iCAAiC,CAAC;YAC1H,EAAE,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,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A;kBAd7B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EACX,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,CAAC,EACrF,SAAA,EAAA;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAmB,iBAAA;AAC9B,4BAAA,KAAK,EAAE,IAAI;AACX,yBAAA;qBACD,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mnDAAA,EAAA,CAAA;;;AElEhD;;AAEG;;;;"}
@@ -191,7 +191,7 @@ class DatepickerComponent {
191
191
  useExisting: DatepickerComponent,
192
192
  multi: true,
193
193
  },
194
- ], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<st-input (click)=\"toggleDatepicker()\" [(value)]=\"current\" [readonly]=\"true\" [label]=\"label()\" />\n<div class=\"datepicker-container\">\n\t<div [class]=\"isOpen ? 'calendar-wrapper active' : 'calendar-wrapper inactive'\">\n\t\t<div class=\"calendar-header\">\n\t\t\t<button (click)=\"changeMonth(true)\" class=\"btn-prev\">\n\t\t\t\t<!-- <img src=\"assets/icons/calendar/left.svg\" /> -->\n\t\t\t\t<st-icon class=\"text-secondary-content\" [icon]=\"iconArrowLeft\" color=\"inherit\">></st-icon>\n\t\t\t</button>\n\t\t\t<h1>{{ monthAndYearLabel | datepickerFormatMonth: language() }}</h1>\n\t\t\t<button (click)=\"changeMonth(false)\" class=\"btn-next\">\n\t\t\t\t<!-- <img src=\"assets/icons/calendar/right.svg\" /> -->\n\t\t\t\t<st-icon class=\"text-secondary-content\" [icon]=\"iconArrowRight\" color=\"inherit\"></st-icon>\n\t\t\t</button>\n\t\t</div>\n\t\t<ol class=\"days\">\n\t\t\t@for (day of weekFromLanguage(); track day) {\n\t\t\t\t<li class=\"day-name\">{{ day | slice: 0 : 1 }}</li>\n\t\t\t}\n\n\t\t\t@for (day of daysOfMonth; track day.value) {\n\t\t\t\t<li\n\t\t\t\t\tclass=\"day\"\n\t\t\t\t\t(click)=\"handleSelectDay(day)\"\n\t\t\t\t\t[ngClass]=\"{ active: day.date === current(), disabled: day.disabled }\"\n\t\t\t\t\t[style.gridColumnStart]=\"$first ? day.indexWeek : 'auto'\"\n\t\t\t\t>\n\t\t\t\t\t<span>{{ day.value }}</span>\n\t\t\t\t</li>\n\t\t\t}\n\t\t</ol>\n\t</div>\n</div>\n", styles: [".datepicker-container{position:relative}.calendar-wrapper{padding:20px;border:solid 1px #eaeaea;background:#fff;box-shadow:0 4px 15px #0000001a;border-radius:15px;position:absolute;top:5px;left:0;z-index:9999;max-width:280px}.calendar-wrapper.active{display:block}.calendar-wrapper.inactive{display:none}.calendar-header{display:flex;width:100%;justify-content:space-between;align-items:center;align-content:center;padding:10px 0 0;margin-bottom:10px}.calendar-header h1{width:100%;font-style:normal;font-weight:500;font-size:15px;line-height:18px;color:#777675;text-align:center;font-family:Roboto,sans-serif}.calendar-header button{cursor:pointer;background-color:transparent;border:0;width:40px;display:flex;justify-content:center;align-items:center}.days{list-style:none;display:grid;grid-template-columns:repeat(7,34px);margin:0;padding:0;gap:0}.days .day-name{font-weight:700;margin-bottom:2px;padding:4px;text-align:center;font-style:normal;font-size:15px;color:#4dd6ed;margin-top:10px}.days .day{display:flex;justify-content:center;align-items:center;width:100%;height:34px;padding:.25rem;font-size:15px;cursor:pointer;color:#636363}.days .day:hover{font-weight:600;background:#4dd6ed;border-radius:50%;color:#fff}.days .day.disabled{color:#ccc}.days .day.active{font-weight:600;background:#4dd6ed;border-radius:50%;color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: InputComponent, selector: "st-input", inputs: ["variant", "shape", "size", "classes", "label", "type", "name", "placeholder", "icon", "iconPosition", "iconClasses", "readonly", "value", "parentForm", "formControlName", "disabled", "debounceTime"], outputs: ["valueChange", "disabledChange", "onEnter", "onBlur", "onDebounceChange"] }, { kind: "pipe", type: DatepickerFormatMonthPipe, name: "datepickerFormatMonth" }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "classes", "icon"] }] });
194
+ ], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<st-input (click)=\"toggleDatepicker()\" [(value)]=\"current\" [readonly]=\"true\" [label]=\"label()\" />\n<div class=\"datepicker-container\">\n\t<div [class]=\"isOpen ? 'calendar-wrapper active' : 'calendar-wrapper inactive'\">\n\t\t<div class=\"calendar-header\">\n\t\t\t<button (click)=\"changeMonth(true)\" class=\"btn-prev\">\n\t\t\t\t<!-- <img src=\"assets/icons/calendar/left.svg\" /> -->\n\t\t\t\t<st-icon class=\"text-secondary-content\" [icon]=\"iconArrowLeft\" color=\"inherit\">></st-icon>\n\t\t\t</button>\n\t\t\t<h1>{{ monthAndYearLabel | datepickerFormatMonth: language() }}</h1>\n\t\t\t<button (click)=\"changeMonth(false)\" class=\"btn-next\">\n\t\t\t\t<!-- <img src=\"assets/icons/calendar/right.svg\" /> -->\n\t\t\t\t<st-icon class=\"text-secondary-content\" [icon]=\"iconArrowRight\" color=\"inherit\"></st-icon>\n\t\t\t</button>\n\t\t</div>\n\t\t<ol class=\"days\">\n\t\t\t@for (day of weekFromLanguage(); track day) {\n\t\t\t\t<li class=\"day-name\">{{ day | slice: 0 : 1 }}</li>\n\t\t\t}\n\n\t\t\t@for (day of daysOfMonth; track day.value) {\n\t\t\t\t<li\n\t\t\t\t\tclass=\"day\"\n\t\t\t\t\t(click)=\"handleSelectDay(day)\"\n\t\t\t\t\t[ngClass]=\"{ active: day.date === current(), disabled: day.disabled }\"\n\t\t\t\t\t[style.gridColumnStart]=\"$first ? day.indexWeek : 'auto'\"\n\t\t\t\t>\n\t\t\t\t\t<span>{{ day.value }}</span>\n\t\t\t\t</li>\n\t\t\t}\n\t\t</ol>\n\t</div>\n</div>\n", styles: [".datepicker-container{position:relative}.calendar-wrapper{padding:20px;border:solid 1px #eaeaea;background:#fff;box-shadow:0 4px 15px #0000001a;border-radius:15px;position:absolute;top:5px;left:0;z-index:9999;max-width:280px}.calendar-wrapper.active{display:block}.calendar-wrapper.inactive{display:none}.calendar-header{display:flex;width:100%;justify-content:space-between;align-items:center;align-content:center;padding:10px 0 0;margin-bottom:10px}.calendar-header h1{width:100%;font-style:normal;font-weight:500;font-size:15px;line-height:18px;color:#777675;text-align:center;font-family:Roboto,sans-serif}.calendar-header button{cursor:pointer;background-color:transparent;border:0;width:40px;display:flex;justify-content:center;align-items:center}.days{list-style:none;display:grid;grid-template-columns:repeat(7,34px);margin:0;padding:0;gap:0}.days .day-name{font-weight:700;margin-bottom:2px;padding:4px;text-align:center;font-style:normal;font-size:15px;color:#4dd6ed;margin-top:10px}.days .day{display:flex;justify-content:center;align-items:center;width:100%;height:34px;padding:.25rem;font-size:15px;cursor:pointer;color:#636363}.days .day:hover{font-weight:600;background:#4dd6ed;border-radius:50%;color:#fff}.days .day.disabled{color:#ccc}.days .day.active{font-weight:600;background:#4dd6ed;border-radius:50%;color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: InputComponent, selector: "st-input", inputs: ["variant", "size", "label", "type", "name", "placeholder", "icon", "iconPosition", "iconClasses", "readonly", "iconClickable", "ghost", "value", "parentForm", "formControlName", "disabled", "debounceTime"], outputs: ["onIconClick", "valueChange", "disabledChange", "onEnter", "onBlur", "onDebounceChange"] }, { kind: "pipe", type: DatepickerFormatMonthPipe, name: "datepickerFormatMonth" }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "classes", "icon"] }] });
195
195
  }
196
196
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DatepickerComponent, decorators: [{
197
197
  type: Component,