@masmarino/gabarit 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/button/README.md +11 -4
  2. package/fesm2022/masmarino-gabarit-accordion.mjs +6 -6
  3. package/fesm2022/masmarino-gabarit-alert.mjs +5 -5
  4. package/fesm2022/masmarino-gabarit-alert.mjs.map +1 -1
  5. package/fesm2022/masmarino-gabarit-app-shell.mjs +8 -8
  6. package/fesm2022/masmarino-gabarit-app-shell.mjs.map +1 -1
  7. package/fesm2022/masmarino-gabarit-auth-activate.mjs +3 -3
  8. package/fesm2022/masmarino-gabarit-auth-login.mjs +3 -3
  9. package/fesm2022/masmarino-gabarit-auth-register.mjs +5 -5
  10. package/fesm2022/masmarino-gabarit-auth-register.mjs.map +1 -1
  11. package/fesm2022/masmarino-gabarit-auth-reset-password.mjs +3 -3
  12. package/fesm2022/masmarino-gabarit-auth.mjs +12 -12
  13. package/fesm2022/masmarino-gabarit-autocomplete.mjs +5 -5
  14. package/fesm2022/masmarino-gabarit-autocomplete.mjs.map +1 -1
  15. package/fesm2022/masmarino-gabarit-avatar-group.mjs +5 -5
  16. package/fesm2022/masmarino-gabarit-avatar-group.mjs.map +1 -1
  17. package/fesm2022/masmarino-gabarit-avatar.mjs +3 -3
  18. package/fesm2022/masmarino-gabarit-badge.mjs +7 -7
  19. package/fesm2022/masmarino-gabarit-badge.mjs.map +1 -1
  20. package/fesm2022/masmarino-gabarit-bar-chart.mjs +6 -6
  21. package/fesm2022/masmarino-gabarit-breadcrumb.mjs +3 -3
  22. package/fesm2022/masmarino-gabarit-button.mjs +5 -5
  23. package/fesm2022/masmarino-gabarit-button.mjs.map +1 -1
  24. package/fesm2022/masmarino-gabarit-card.mjs +13 -13
  25. package/fesm2022/masmarino-gabarit-card.mjs.map +1 -1
  26. package/fesm2022/masmarino-gabarit-chart.mjs +27 -27
  27. package/fesm2022/masmarino-gabarit-chart.mjs.map +1 -1
  28. package/fesm2022/masmarino-gabarit-checkbox-group.mjs +3 -3
  29. package/fesm2022/masmarino-gabarit-checkbox.mjs +7 -7
  30. package/fesm2022/masmarino-gabarit-checkbox.mjs.map +1 -1
  31. package/fesm2022/masmarino-gabarit-command-palette.mjs +10 -10
  32. package/fesm2022/masmarino-gabarit-command-palette.mjs.map +1 -1
  33. package/fesm2022/masmarino-gabarit-confirm-danger-modal.mjs +3 -3
  34. package/fesm2022/masmarino-gabarit-copy-button.mjs +3 -3
  35. package/fesm2022/masmarino-gabarit-copy-field.mjs +5 -5
  36. package/fesm2022/masmarino-gabarit-copy-field.mjs.map +1 -1
  37. package/fesm2022/masmarino-gabarit-date-picker.mjs +10 -10
  38. package/fesm2022/masmarino-gabarit-date-picker.mjs.map +1 -1
  39. package/fesm2022/masmarino-gabarit-description-list.mjs +3 -3
  40. package/fesm2022/masmarino-gabarit-dimension-card.mjs +3 -3
  41. package/fesm2022/masmarino-gabarit-disclosure.mjs +5 -5
  42. package/fesm2022/masmarino-gabarit-disclosure.mjs.map +1 -1
  43. package/fesm2022/masmarino-gabarit-divider.mjs +3 -3
  44. package/fesm2022/masmarino-gabarit-docs.mjs +31 -31
  45. package/fesm2022/masmarino-gabarit-docs.mjs.map +1 -1
  46. package/fesm2022/masmarino-gabarit-drawer.mjs +5 -5
  47. package/fesm2022/masmarino-gabarit-drawer.mjs.map +1 -1
  48. package/fesm2022/masmarino-gabarit-empty-state.mjs +3 -3
  49. package/fesm2022/masmarino-gabarit-file-upload.mjs +5 -5
  50. package/fesm2022/masmarino-gabarit-file-upload.mjs.map +1 -1
  51. package/fesm2022/masmarino-gabarit-format.mjs +9 -9
  52. package/fesm2022/masmarino-gabarit-funnel-chart.mjs +3 -3
  53. package/fesm2022/masmarino-gabarit-gauge-bar.mjs +3 -3
  54. package/fesm2022/masmarino-gabarit-git-field.mjs +3 -3
  55. package/fesm2022/masmarino-gabarit-icon-marker.mjs +3 -3
  56. package/fesm2022/masmarino-gabarit-icon.mjs +6 -6
  57. package/fesm2022/masmarino-gabarit-input.mjs +5 -5
  58. package/fesm2022/masmarino-gabarit-input.mjs.map +1 -1
  59. package/fesm2022/masmarino-gabarit-job-graph.mjs +5 -5
  60. package/fesm2022/masmarino-gabarit-job-graph.mjs.map +1 -1
  61. package/fesm2022/masmarino-gabarit-job-status.mjs +3 -3
  62. package/fesm2022/masmarino-gabarit-line-chart.mjs +6 -6
  63. package/fesm2022/masmarino-gabarit-list-card.mjs +3 -3
  64. package/fesm2022/masmarino-gabarit-list-row.mjs +5 -5
  65. package/fesm2022/masmarino-gabarit-list-row.mjs.map +1 -1
  66. package/fesm2022/masmarino-gabarit-list-toolbar.mjs +5 -5
  67. package/fesm2022/masmarino-gabarit-list-toolbar.mjs.map +1 -1
  68. package/fesm2022/masmarino-gabarit-menu.mjs +11 -11
  69. package/fesm2022/masmarino-gabarit-menu.mjs.map +1 -1
  70. package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs +13 -13
  71. package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs.map +1 -1
  72. package/fesm2022/masmarino-gabarit-mfa-settings.mjs +5 -5
  73. package/fesm2022/masmarino-gabarit-mfa-settings.mjs.map +1 -1
  74. package/fesm2022/masmarino-gabarit-modal.mjs +5 -5
  75. package/fesm2022/masmarino-gabarit-modal.mjs.map +1 -1
  76. package/fesm2022/masmarino-gabarit-nav-tabs.mjs +8 -8
  77. package/fesm2022/masmarino-gabarit-nav-tabs.mjs.map +1 -1
  78. package/fesm2022/masmarino-gabarit-notification-dot.mjs +3 -3
  79. package/fesm2022/masmarino-gabarit-page-header.mjs +3 -3
  80. package/fesm2022/masmarino-gabarit-page-layout.mjs +3 -3
  81. package/fesm2022/masmarino-gabarit-pagination.mjs +5 -5
  82. package/fesm2022/masmarino-gabarit-pagination.mjs.map +1 -1
  83. package/fesm2022/masmarino-gabarit-panel.mjs +3 -3
  84. package/fesm2022/masmarino-gabarit-passkey-settings.mjs +5 -5
  85. package/fesm2022/masmarino-gabarit-passkey-settings.mjs.map +1 -1
  86. package/fesm2022/masmarino-gabarit-pie-chart.mjs +3 -3
  87. package/fesm2022/masmarino-gabarit-popover.mjs +5 -5
  88. package/fesm2022/masmarino-gabarit-popover.mjs.map +1 -1
  89. package/fesm2022/masmarino-gabarit-radio-group.mjs +3 -3
  90. package/fesm2022/masmarino-gabarit-save-status.mjs +3 -3
  91. package/fesm2022/masmarino-gabarit-search-bar.mjs +5 -5
  92. package/fesm2022/masmarino-gabarit-search-bar.mjs.map +1 -1
  93. package/fesm2022/masmarino-gabarit-secret-reveal.mjs +5 -5
  94. package/fesm2022/masmarino-gabarit-secret-reveal.mjs.map +1 -1
  95. package/fesm2022/masmarino-gabarit-segmented-control.mjs +50 -8
  96. package/fesm2022/masmarino-gabarit-segmented-control.mjs.map +1 -1
  97. package/fesm2022/masmarino-gabarit-select.mjs +5 -5
  98. package/fesm2022/masmarino-gabarit-select.mjs.map +1 -1
  99. package/fesm2022/masmarino-gabarit-skeleton-list.mjs +5 -5
  100. package/fesm2022/masmarino-gabarit-skeleton-list.mjs.map +1 -1
  101. package/fesm2022/masmarino-gabarit-skeleton.mjs +5 -5
  102. package/fesm2022/masmarino-gabarit-skeleton.mjs.map +1 -1
  103. package/fesm2022/masmarino-gabarit-slider.mjs +5 -5
  104. package/fesm2022/masmarino-gabarit-slider.mjs.map +1 -1
  105. package/fesm2022/masmarino-gabarit-sparkline.mjs +5 -5
  106. package/fesm2022/masmarino-gabarit-sparkline.mjs.map +1 -1
  107. package/fesm2022/masmarino-gabarit-spinner.mjs +3 -3
  108. package/fesm2022/masmarino-gabarit-stat-grid.mjs +3 -3
  109. package/fesm2022/masmarino-gabarit-stat-tile.mjs +8 -8
  110. package/fesm2022/masmarino-gabarit-stat-tile.mjs.map +1 -1
  111. package/fesm2022/masmarino-gabarit-stepper.mjs +5 -5
  112. package/fesm2022/masmarino-gabarit-stepper.mjs.map +1 -1
  113. package/fesm2022/masmarino-gabarit-switch.mjs +5 -5
  114. package/fesm2022/masmarino-gabarit-switch.mjs.map +1 -1
  115. package/fesm2022/masmarino-gabarit-table.mjs +3 -3
  116. package/fesm2022/masmarino-gabarit-tabs.mjs +60 -11
  117. package/fesm2022/masmarino-gabarit-tabs.mjs.map +1 -1
  118. package/fesm2022/masmarino-gabarit-tag-input.mjs +5 -5
  119. package/fesm2022/masmarino-gabarit-tag-input.mjs.map +1 -1
  120. package/fesm2022/masmarino-gabarit-tag.mjs +5 -5
  121. package/fesm2022/masmarino-gabarit-tag.mjs.map +1 -1
  122. package/fesm2022/masmarino-gabarit-textarea.mjs +5 -5
  123. package/fesm2022/masmarino-gabarit-textarea.mjs.map +1 -1
  124. package/fesm2022/masmarino-gabarit-timeline-chart.mjs +6 -6
  125. package/fesm2022/masmarino-gabarit-toaster.mjs +6 -6
  126. package/fesm2022/masmarino-gabarit-tooltip.mjs +5 -5
  127. package/fesm2022/masmarino-gabarit-tooltip.mjs.map +1 -1
  128. package/fesm2022/masmarino-gabarit-tree.mjs +5 -5
  129. package/fesm2022/masmarino-gabarit-tree.mjs.map +1 -1
  130. package/fesm2022/masmarino-gabarit-user-chip.mjs +3 -3
  131. package/fesm2022/masmarino-gabarit.mjs +1 -1
  132. package/fesm2022/masmarino-gabarit.mjs.map +1 -1
  133. package/package.json +1 -1
  134. package/src/lib/tokens/_glass.scss +140 -0
  135. package/src/lib/tokens/_grounds.scss +70 -0
  136. package/src/lib/tokens/_themes.scss +22 -4
  137. package/src/lib/tokens/_utilities.scss +54 -4
  138. package/types/masmarino-gabarit-button.d.ts +1 -1
  139. package/types/masmarino-gabarit-segmented-control.d.ts +14 -0
  140. package/types/masmarino-gabarit-tabs.d.ts +14 -0
  141. package/types/masmarino-gabarit.d.ts +1 -1
@@ -99,7 +99,7 @@ var FileUpload = class FileUpload {
99
99
  }
100
100
  static ɵfac = i0.ɵɵngDeclareFactory({
101
101
  minVersion: "12.0.0",
102
- version: "22.2.4",
102
+ version: "22.2.6",
103
103
  ngImport: i0,
104
104
  type: FileUpload,
105
105
  deps: [],
@@ -107,7 +107,7 @@ var FileUpload = class FileUpload {
107
107
  });
108
108
  static ɵcmp = i0.ɵɵngDeclareComponent({
109
109
  minVersion: "17.0.0",
110
- version: "22.2.4",
110
+ version: "22.2.6",
111
111
  type: FileUpload,
112
112
  isStandalone: true,
113
113
  selector: "gbt-file-upload",
@@ -204,7 +204,7 @@ var FileUpload = class FileUpload {
204
204
  }],
205
205
  ngImport: i0,
206
206
  template: "<div class=\"gbt-file-upload\">\n @if (label()) {\n <span class=\"gbt-file-upload__label\" [id]=\"id() + '-label'\">{{ label() }}</span>\n }\n <button\n type=\"button\"\n class=\"gbt-file-upload__dropzone\"\n [class.gbt-file-upload__dropzone--drag-over]=\"dragOver()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-labelledby]=\"label() ? id() + '-label' : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (click)=\"openPicker()\"\n (dragenter)=\"onDragEnter($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop($event)\"\n >\n <gbt-icon name=\"upload\" class=\"gbt-file-upload__icon\" aria-hidden=\"true\" />\n <span class=\"gbt-file-upload__hint\">{{ dropLabel() }}</span>\n </button>\n <input\n #fileInput\n type=\"file\"\n class=\"gbt-file-upload__input\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [multiple]=\"multiple()\"\n [attr.accept]=\"accept() || null\"\n [disabled]=\"isDisabled()\"\n (change)=\"onFilesSelected($event)\"\n />\n @if (rejections().length > 0) {\n <div class=\"gbt-file-upload__rejections\" role=\"alert\">\n <ul>\n @for (message of rejections(); track message) {\n <li>{{ message }}</li>\n }\n </ul>\n </div>\n }\n @if (files().length > 0) {\n <ul class=\"gbt-file-upload__files\">\n @for (file of files(); track file) {\n <li class=\"gbt-file-upload__file\">\n <span class=\"gbt-file-upload__file-name\">{{ file.name }}</span>\n <span class=\"gbt-file-upload__file-size\">{{ formatFileSize(file.size) }}</span>\n <button\n type=\"button\"\n class=\"gbt-file-upload__file-remove\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"removeLabel()(file.name)\"\n (click)=\"removeFile(file)\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n </li>\n }\n </ul>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-file-upload__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n",
207
- styles: [".gbt-file-upload{display:flex;flex-direction:column;gap:.5rem}.gbt-file-upload__label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-file-upload__dropzone{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:.5rem;width:100%;padding:1.5rem 1rem;background:var(--bg-panel);border:1px dashed var(--border-color);border-radius:var(--site-border-radius-sm);color:var(--text-secondary);cursor:pointer;transition:border-color .15s cubic-bezier(.4,0,.2,1),background .15s cubic-bezier(.4,0,.2,1)}.gbt-file-upload__dropzone:hover:not(:disabled){border-color:var(--primary)}.gbt-file-upload__dropzone:active:not(:disabled){background:var(--bg-hover)}.gbt-file-upload__dropzone:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}.gbt-file-upload__dropzone--drag-over{background:color-mix(in srgb,var(--primary) 8%,var(--bg-panel));border-color:var(--primary)}.gbt-file-upload__dropzone:disabled{cursor:not-allowed;opacity:.5}.gbt-file-upload__icon{color:var(--text-discret)}.gbt-file-upload__hint{font-size:13px;text-align:center}.gbt-file-upload__input{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0}.gbt-file-upload__rejections{font-size:.75rem;color:var(--color-error-text)}.gbt-file-upload__rejections ul{margin:0;padding:0;list-style:none}.gbt-file-upload__files{display:flex;flex-direction:column;gap:.375rem;margin:0;padding:0;list-style:none}.gbt-file-upload__file{box-sizing:border-box;display:flex;align-items:center;gap:.5rem;padding:.5rem .625rem;background:var(--bg-panel);border-radius:var(--site-border-radius-sm)}.gbt-file-upload__file-name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;color:var(--text-primary)}.gbt-file-upload__file-size{flex-shrink:0;font-size:12px;color:var(--text-secondary)}.gbt-file-upload__file-remove{position:relative;display:inline-flex;flex-shrink:0;background:none;border:none;color:var(--text-secondary);cursor:pointer}.gbt-file-upload__file-remove:hover:not(:disabled){color:var(--text-primary)}.gbt-file-upload__file-remove:active:not(:disabled){color:var(--text-discret)}.gbt-file-upload__file-remove:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}.gbt-file-upload__file-remove:disabled{cursor:not-allowed;opacity:.5}.gbt-file-upload__file-remove:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-file-upload__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-file-upload__dropzone{transition:none}}\n"],
207
+ styles: [".gbt-file-upload{display:flex;flex-direction:column;gap:.5rem}.gbt-file-upload__label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-file-upload__dropzone{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:.5rem;width:100%;padding:1.5rem 1rem;background:var(--bg-panel);border:1px dashed var(--border-color);border-radius:var(--gbt-radius-row);color:var(--text-secondary);cursor:pointer;transition:border-color .15s cubic-bezier(.4,0,.2,1),background .15s cubic-bezier(.4,0,.2,1)}.gbt-file-upload__dropzone:hover:not(:disabled){border-color:var(--primary)}.gbt-file-upload__dropzone:active:not(:disabled){background:var(--bg-hover)}.gbt-file-upload__dropzone:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}.gbt-file-upload__dropzone--drag-over{background:color-mix(in srgb,var(--primary) 8%,var(--bg-panel));border-color:var(--primary)}.gbt-file-upload__dropzone:disabled{cursor:not-allowed;opacity:.5}.gbt-file-upload__icon{color:var(--text-discret)}.gbt-file-upload__hint{font-size:13px;text-align:center}.gbt-file-upload__input{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0}.gbt-file-upload__rejections{font-size:.75rem;color:var(--color-error-text)}.gbt-file-upload__rejections ul{margin:0;padding:0;list-style:none}.gbt-file-upload__files{display:flex;flex-direction:column;gap:.375rem;margin:0;padding:0;list-style:none}.gbt-file-upload__file{box-sizing:border-box;display:flex;align-items:center;gap:.5rem;padding:.5rem .625rem;background:var(--bg-panel);border-radius:var(--gbt-radius-row)}.gbt-file-upload__file-name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;color:var(--text-primary)}.gbt-file-upload__file-size{flex-shrink:0;font-size:12px;color:var(--text-secondary)}.gbt-file-upload__file-remove{position:relative;display:inline-flex;flex-shrink:0;background:none;border:none;color:var(--text-secondary);cursor:pointer}.gbt-file-upload__file-remove:hover:not(:disabled){color:var(--text-primary)}.gbt-file-upload__file-remove:active:not(:disabled){color:var(--text-discret)}.gbt-file-upload__file-remove:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}.gbt-file-upload__file-remove:disabled{cursor:not-allowed;opacity:.5}.gbt-file-upload__file-remove:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-file-upload__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-file-upload__dropzone{transition:none}}\n"],
208
208
  dependencies: [{
209
209
  kind: "component",
210
210
  type: Icon,
@@ -216,7 +216,7 @@ var FileUpload = class FileUpload {
216
216
  };
217
217
  i0.ɵɵngDeclareClassMetadata({
218
218
  minVersion: "12.0.0",
219
- version: "22.2.4",
219
+ version: "22.2.6",
220
220
  ngImport: i0,
221
221
  type: FileUpload,
222
222
  decorators: [{
@@ -232,7 +232,7 @@ i0.ɵɵngDeclareClassMetadata({
232
232
  multi: true
233
233
  }],
234
234
  template: "<div class=\"gbt-file-upload\">\n @if (label()) {\n <span class=\"gbt-file-upload__label\" [id]=\"id() + '-label'\">{{ label() }}</span>\n }\n <button\n type=\"button\"\n class=\"gbt-file-upload__dropzone\"\n [class.gbt-file-upload__dropzone--drag-over]=\"dragOver()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-labelledby]=\"label() ? id() + '-label' : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (click)=\"openPicker()\"\n (dragenter)=\"onDragEnter($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop($event)\"\n >\n <gbt-icon name=\"upload\" class=\"gbt-file-upload__icon\" aria-hidden=\"true\" />\n <span class=\"gbt-file-upload__hint\">{{ dropLabel() }}</span>\n </button>\n <input\n #fileInput\n type=\"file\"\n class=\"gbt-file-upload__input\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [multiple]=\"multiple()\"\n [attr.accept]=\"accept() || null\"\n [disabled]=\"isDisabled()\"\n (change)=\"onFilesSelected($event)\"\n />\n @if (rejections().length > 0) {\n <div class=\"gbt-file-upload__rejections\" role=\"alert\">\n <ul>\n @for (message of rejections(); track message) {\n <li>{{ message }}</li>\n }\n </ul>\n </div>\n }\n @if (files().length > 0) {\n <ul class=\"gbt-file-upload__files\">\n @for (file of files(); track file) {\n <li class=\"gbt-file-upload__file\">\n <span class=\"gbt-file-upload__file-name\">{{ file.name }}</span>\n <span class=\"gbt-file-upload__file-size\">{{ formatFileSize(file.size) }}</span>\n <button\n type=\"button\"\n class=\"gbt-file-upload__file-remove\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"removeLabel()(file.name)\"\n (click)=\"removeFile(file)\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n </li>\n }\n </ul>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-file-upload__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n",
235
- styles: [".gbt-file-upload{display:flex;flex-direction:column;gap:.5rem}.gbt-file-upload__label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-file-upload__dropzone{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:.5rem;width:100%;padding:1.5rem 1rem;background:var(--bg-panel);border:1px dashed var(--border-color);border-radius:var(--site-border-radius-sm);color:var(--text-secondary);cursor:pointer;transition:border-color .15s cubic-bezier(.4,0,.2,1),background .15s cubic-bezier(.4,0,.2,1)}.gbt-file-upload__dropzone:hover:not(:disabled){border-color:var(--primary)}.gbt-file-upload__dropzone:active:not(:disabled){background:var(--bg-hover)}.gbt-file-upload__dropzone:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}.gbt-file-upload__dropzone--drag-over{background:color-mix(in srgb,var(--primary) 8%,var(--bg-panel));border-color:var(--primary)}.gbt-file-upload__dropzone:disabled{cursor:not-allowed;opacity:.5}.gbt-file-upload__icon{color:var(--text-discret)}.gbt-file-upload__hint{font-size:13px;text-align:center}.gbt-file-upload__input{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0}.gbt-file-upload__rejections{font-size:.75rem;color:var(--color-error-text)}.gbt-file-upload__rejections ul{margin:0;padding:0;list-style:none}.gbt-file-upload__files{display:flex;flex-direction:column;gap:.375rem;margin:0;padding:0;list-style:none}.gbt-file-upload__file{box-sizing:border-box;display:flex;align-items:center;gap:.5rem;padding:.5rem .625rem;background:var(--bg-panel);border-radius:var(--site-border-radius-sm)}.gbt-file-upload__file-name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;color:var(--text-primary)}.gbt-file-upload__file-size{flex-shrink:0;font-size:12px;color:var(--text-secondary)}.gbt-file-upload__file-remove{position:relative;display:inline-flex;flex-shrink:0;background:none;border:none;color:var(--text-secondary);cursor:pointer}.gbt-file-upload__file-remove:hover:not(:disabled){color:var(--text-primary)}.gbt-file-upload__file-remove:active:not(:disabled){color:var(--text-discret)}.gbt-file-upload__file-remove:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}.gbt-file-upload__file-remove:disabled{cursor:not-allowed;opacity:.5}.gbt-file-upload__file-remove:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-file-upload__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-file-upload__dropzone{transition:none}}\n"]
235
+ styles: [".gbt-file-upload{display:flex;flex-direction:column;gap:.5rem}.gbt-file-upload__label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-file-upload__dropzone{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:.5rem;width:100%;padding:1.5rem 1rem;background:var(--bg-panel);border:1px dashed var(--border-color);border-radius:var(--gbt-radius-row);color:var(--text-secondary);cursor:pointer;transition:border-color .15s cubic-bezier(.4,0,.2,1),background .15s cubic-bezier(.4,0,.2,1)}.gbt-file-upload__dropzone:hover:not(:disabled){border-color:var(--primary)}.gbt-file-upload__dropzone:active:not(:disabled){background:var(--bg-hover)}.gbt-file-upload__dropzone:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}.gbt-file-upload__dropzone--drag-over{background:color-mix(in srgb,var(--primary) 8%,var(--bg-panel));border-color:var(--primary)}.gbt-file-upload__dropzone:disabled{cursor:not-allowed;opacity:.5}.gbt-file-upload__icon{color:var(--text-discret)}.gbt-file-upload__hint{font-size:13px;text-align:center}.gbt-file-upload__input{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0}.gbt-file-upload__rejections{font-size:.75rem;color:var(--color-error-text)}.gbt-file-upload__rejections ul{margin:0;padding:0;list-style:none}.gbt-file-upload__files{display:flex;flex-direction:column;gap:.375rem;margin:0;padding:0;list-style:none}.gbt-file-upload__file{box-sizing:border-box;display:flex;align-items:center;gap:.5rem;padding:.5rem .625rem;background:var(--bg-panel);border-radius:var(--gbt-radius-row)}.gbt-file-upload__file-name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;color:var(--text-primary)}.gbt-file-upload__file-size{flex-shrink:0;font-size:12px;color:var(--text-secondary)}.gbt-file-upload__file-remove{position:relative;display:inline-flex;flex-shrink:0;background:none;border:none;color:var(--text-secondary);cursor:pointer}.gbt-file-upload__file-remove:hover:not(:disabled){color:var(--text-primary)}.gbt-file-upload__file-remove:active:not(:disabled){color:var(--text-discret)}.gbt-file-upload__file-remove:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}.gbt-file-upload__file-remove:disabled{cursor:not-allowed;opacity:.5}.gbt-file-upload__file-remove:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-file-upload__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-file-upload__dropzone{transition:none}}\n"]
236
236
  }]
237
237
  }],
238
238
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"masmarino-gabarit-file-upload.mjs","names":[],"sources":["../../../projects/gabarit/file-upload/file-upload.ts","../../../projects/gabarit/file-upload/file-upload.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n signal,\n viewChild,\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { Icon } from '@masmarino/gabarit/icon'\n\nlet nextId = 0\n\nfunction formatFileSize(bytes: number): string {\n if (bytes < 1024) {\n return `${bytes} B`\n }\n if (bytes < 1024 * 1024) {\n return `${(bytes / 1024).toFixed(1)} KB`\n }\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`\n}\n\n@Component({\n selector: 'gbt-file-upload',\n standalone: true,\n imports: [Icon],\n templateUrl: './file-upload.html',\n styleUrl: './file-upload.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => FileUpload),\n multi: true,\n },\n ],\n})\nexport class FileUpload implements ControlValueAccessor {\n private readonly fileInput = viewChild<ElementRef<HTMLInputElement>>('fileInput')\n\n id = input<string>(`gbt-file-upload-${++nextId}`)\n label = input<string>('')\n multiple = input(false, { transform: booleanAttribute })\n accept = input<string>('')\n maxSizeMb = input<number | null>(null)\n disabled = input(false, { transform: booleanAttribute })\n errorMessage = input<string | null>(null)\n dropLabel = input<string>('Drag and drop a file here, or click to browse')\n removeLabel = input<(name: string) => string>((name) => `Remove ${name}`)\n oversizeMessage = input<(name: string, maxSizeMb: number) => string>(\n (name, maxSizeMb) => `${name} exceeds ${maxSizeMb} MB and was not added.`,\n )\n extraFileMessage = input<(name: string) => string>(\n (name) => `${name} was not added — only one file is allowed.`,\n )\n\n protected readonly files = signal<File[]>([])\n protected readonly rejections = signal<string[]>([])\n protected readonly dragOver = signal(false)\n\n protected readonly formatFileSize = formatFileSize\n\n private readonly formDisabled = signal(false)\n protected readonly isDisabled = computed(() => this.disabled() || this.formDisabled())\n\n private onChange: (value: File[]) => void = () => {}\n private onTouched: () => void = () => {}\n\n writeValue(value: File[] | null): void {\n this.files.set(value ?? [])\n }\n\n registerOnChange(fn: (value: File[]) => void): void {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled)\n }\n\n protected openPicker(): void {\n if (this.isDisabled()) {\n return\n }\n this.fileInput()?.nativeElement.click()\n }\n\n protected onFilesSelected(event: Event): void {\n const input = event.target as HTMLInputElement\n this.addFiles(input.files)\n input.value = ''\n }\n\n protected onDragEnter(event: DragEvent): void {\n event.preventDefault()\n if (!this.isDisabled()) {\n this.dragOver.set(true)\n }\n }\n\n protected onDragOver(event: DragEvent): void {\n event.preventDefault()\n }\n\n protected onDragLeave(event: DragEvent): void {\n event.preventDefault()\n this.dragOver.set(false)\n }\n\n protected onDrop(event: DragEvent): void {\n event.preventDefault()\n this.dragOver.set(false)\n if (this.isDisabled()) {\n return\n }\n this.addFiles(event.dataTransfer?.files ?? null)\n }\n\n protected removeFile(file: File): void {\n if (this.isDisabled()) {\n return\n }\n const next = this.files().filter((f) => f !== file)\n this.files.set(next)\n this.onChange(next)\n this.onTouched()\n }\n\n private addFiles(fileList: FileList | null): void {\n if (!fileList || fileList.length === 0) {\n return\n }\n const incoming = Array.from(fileList)\n const maxSizeMb = this.maxSizeMb()\n const accepted: File[] = []\n const rejected: string[] = []\n for (const file of incoming) {\n if (maxSizeMb !== null && file.size > maxSizeMb * 1024 * 1024) {\n rejected.push(this.oversizeMessage()(file.name, maxSizeMb))\n } else {\n accepted.push(file)\n }\n }\n const extra = this.multiple() ? [] : accepted.slice(1)\n for (const file of extra) {\n rejected.push(this.extraFileMessage()(file.name))\n }\n this.rejections.set(rejected)\n if (accepted.length === 0) {\n return\n }\n const next = this.multiple() ? [...this.files(), ...accepted] : accepted.slice(0, 1)\n this.files.set(next)\n this.onChange(next)\n this.onTouched()\n }\n}\n","<div class=\"gbt-file-upload\">\n @if (label()) {\n <span class=\"gbt-file-upload__label\" [id]=\"id() + '-label'\">{{ label() }}</span>\n }\n <button\n type=\"button\"\n class=\"gbt-file-upload__dropzone\"\n [class.gbt-file-upload__dropzone--drag-over]=\"dragOver()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-labelledby]=\"label() ? id() + '-label' : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (click)=\"openPicker()\"\n (dragenter)=\"onDragEnter($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop($event)\"\n >\n <gbt-icon name=\"upload\" class=\"gbt-file-upload__icon\" aria-hidden=\"true\" />\n <span class=\"gbt-file-upload__hint\">{{ dropLabel() }}</span>\n </button>\n <input\n #fileInput\n type=\"file\"\n class=\"gbt-file-upload__input\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [multiple]=\"multiple()\"\n [attr.accept]=\"accept() || null\"\n [disabled]=\"isDisabled()\"\n (change)=\"onFilesSelected($event)\"\n />\n @if (rejections().length > 0) {\n <div class=\"gbt-file-upload__rejections\" role=\"alert\">\n <ul>\n @for (message of rejections(); track message) {\n <li>{{ message }}</li>\n }\n </ul>\n </div>\n }\n @if (files().length > 0) {\n <ul class=\"gbt-file-upload__files\">\n @for (file of files(); track file) {\n <li class=\"gbt-file-upload__file\">\n <span class=\"gbt-file-upload__file-name\">{{ file.name }}</span>\n <span class=\"gbt-file-upload__file-size\">{{ formatFileSize(file.size) }}</span>\n <button\n type=\"button\"\n class=\"gbt-file-upload__file-remove\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"removeLabel()(file.name)\"\n (click)=\"removeFile(file)\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n </li>\n }\n </ul>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-file-upload__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n"],"mappings":";;;;AAcA,IAAI,SAAS;AAEb,SAAS,eAAe,OAAa;CACnC,IAAI,QAAQ,MACV,OAAO,GAAG,MAAK;CAEjB,IAAI,QAAQ,SACV,OAAO,IAAI,QAAQ,KAAA,CAAM,QAAQ,CAAC,EAAC;CAErC,OAAO,IAAI,QAAS,QAAO,CAAO,QAAQ,CAAC,EAAC;AAC9C;AAiBA,IAAa,aAAb,MAAa,WAAU;CACJ,YAAY,UAAwC,aAAY,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAEjF,KAAK,MAAc,mBAAmB,EAAE,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CACjD,QAAQ,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+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AAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"masmarino-gabarit-file-upload.mjs","names":[],"sources":["../../../projects/gabarit/file-upload/file-upload.ts","../../../projects/gabarit/file-upload/file-upload.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n signal,\n viewChild,\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { Icon } from '@masmarino/gabarit/icon'\n\nlet nextId = 0\n\nfunction formatFileSize(bytes: number): string {\n if (bytes < 1024) {\n return `${bytes} B`\n }\n if (bytes < 1024 * 1024) {\n return `${(bytes / 1024).toFixed(1)} KB`\n }\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`\n}\n\n@Component({\n selector: 'gbt-file-upload',\n standalone: true,\n imports: [Icon],\n templateUrl: './file-upload.html',\n styleUrl: './file-upload.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => FileUpload),\n multi: true,\n },\n ],\n})\nexport class FileUpload implements ControlValueAccessor {\n private readonly fileInput = viewChild<ElementRef<HTMLInputElement>>('fileInput')\n\n id = input<string>(`gbt-file-upload-${++nextId}`)\n label = input<string>('')\n multiple = input(false, { transform: booleanAttribute })\n accept = input<string>('')\n maxSizeMb = input<number | null>(null)\n disabled = input(false, { transform: booleanAttribute })\n errorMessage = input<string | null>(null)\n dropLabel = input<string>('Drag and drop a file here, or click to browse')\n removeLabel = input<(name: string) => string>((name) => `Remove ${name}`)\n oversizeMessage = input<(name: string, maxSizeMb: number) => string>(\n (name, maxSizeMb) => `${name} exceeds ${maxSizeMb} MB and was not added.`,\n )\n extraFileMessage = input<(name: string) => string>(\n (name) => `${name} was not added — only one file is allowed.`,\n )\n\n protected readonly files = signal<File[]>([])\n protected readonly rejections = signal<string[]>([])\n protected readonly dragOver = signal(false)\n\n protected readonly formatFileSize = formatFileSize\n\n private readonly formDisabled = signal(false)\n protected readonly isDisabled = computed(() => this.disabled() || this.formDisabled())\n\n private onChange: (value: File[]) => void = () => {}\n private onTouched: () => void = () => {}\n\n writeValue(value: File[] | null): void {\n this.files.set(value ?? [])\n }\n\n registerOnChange(fn: (value: File[]) => void): void {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled)\n }\n\n protected openPicker(): void {\n if (this.isDisabled()) {\n return\n }\n this.fileInput()?.nativeElement.click()\n }\n\n protected onFilesSelected(event: Event): void {\n const input = event.target as HTMLInputElement\n this.addFiles(input.files)\n input.value = ''\n }\n\n protected onDragEnter(event: DragEvent): void {\n event.preventDefault()\n if (!this.isDisabled()) {\n this.dragOver.set(true)\n }\n }\n\n protected onDragOver(event: DragEvent): void {\n event.preventDefault()\n }\n\n protected onDragLeave(event: DragEvent): void {\n event.preventDefault()\n this.dragOver.set(false)\n }\n\n protected onDrop(event: DragEvent): void {\n event.preventDefault()\n this.dragOver.set(false)\n if (this.isDisabled()) {\n return\n }\n this.addFiles(event.dataTransfer?.files ?? null)\n }\n\n protected removeFile(file: File): void {\n if (this.isDisabled()) {\n return\n }\n const next = this.files().filter((f) => f !== file)\n this.files.set(next)\n this.onChange(next)\n this.onTouched()\n }\n\n private addFiles(fileList: FileList | null): void {\n if (!fileList || fileList.length === 0) {\n return\n }\n const incoming = Array.from(fileList)\n const maxSizeMb = this.maxSizeMb()\n const accepted: File[] = []\n const rejected: string[] = []\n for (const file of incoming) {\n if (maxSizeMb !== null && file.size > maxSizeMb * 1024 * 1024) {\n rejected.push(this.oversizeMessage()(file.name, maxSizeMb))\n } else {\n accepted.push(file)\n }\n }\n const extra = this.multiple() ? [] : accepted.slice(1)\n for (const file of extra) {\n rejected.push(this.extraFileMessage()(file.name))\n }\n this.rejections.set(rejected)\n if (accepted.length === 0) {\n return\n }\n const next = this.multiple() ? [...this.files(), ...accepted] : accepted.slice(0, 1)\n this.files.set(next)\n this.onChange(next)\n this.onTouched()\n }\n}\n","<div class=\"gbt-file-upload\">\n @if (label()) {\n <span class=\"gbt-file-upload__label\" [id]=\"id() + '-label'\">{{ label() }}</span>\n }\n <button\n type=\"button\"\n class=\"gbt-file-upload__dropzone\"\n [class.gbt-file-upload__dropzone--drag-over]=\"dragOver()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-labelledby]=\"label() ? id() + '-label' : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (click)=\"openPicker()\"\n (dragenter)=\"onDragEnter($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop($event)\"\n >\n <gbt-icon name=\"upload\" class=\"gbt-file-upload__icon\" aria-hidden=\"true\" />\n <span class=\"gbt-file-upload__hint\">{{ dropLabel() }}</span>\n </button>\n <input\n #fileInput\n type=\"file\"\n class=\"gbt-file-upload__input\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [multiple]=\"multiple()\"\n [attr.accept]=\"accept() || null\"\n [disabled]=\"isDisabled()\"\n (change)=\"onFilesSelected($event)\"\n />\n @if (rejections().length > 0) {\n <div class=\"gbt-file-upload__rejections\" role=\"alert\">\n <ul>\n @for (message of rejections(); track message) {\n <li>{{ message }}</li>\n }\n </ul>\n </div>\n }\n @if (files().length > 0) {\n <ul class=\"gbt-file-upload__files\">\n @for (file of files(); track file) {\n <li class=\"gbt-file-upload__file\">\n <span class=\"gbt-file-upload__file-name\">{{ file.name }}</span>\n <span class=\"gbt-file-upload__file-size\">{{ formatFileSize(file.size) }}</span>\n <button\n type=\"button\"\n class=\"gbt-file-upload__file-remove\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"removeLabel()(file.name)\"\n (click)=\"removeFile(file)\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n </li>\n }\n </ul>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-file-upload__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n"],"mappings":";;;;AAcA,IAAI,SAAS;AAEb,SAAS,eAAe,OAAa;CACnC,IAAI,QAAQ,MACV,OAAO,GAAG,MAAK;CAEjB,IAAI,QAAQ,SACV,OAAO,IAAI,QAAQ,KAAA,CAAM,QAAQ,CAAC,EAAC;CAErC,OAAO,IAAI,QAAS,QAAO,CAAO,QAAQ,CAAC,EAAC;AAC9C;AAiBA,IAAa,aAAb,MAAa,WAAU;CACJ,YAAY,UAAwC,aAAY,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAEjF,KAAK,MAAc,mBAAmB,EAAE,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CACjD,QAAQ,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACzB,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACrD,SAAS,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAC1B,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACtC,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACrD,eAAe,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+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A,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -188,7 +188,7 @@ var GbtRelativeTimePipe = class GbtRelativeTimePipe {
188
188
  }
189
189
  static ɵfac = i0.ɵɵngDeclareFactory({
190
190
  minVersion: "12.0.0",
191
- version: "22.2.4",
191
+ version: "22.2.6",
192
192
  ngImport: i0,
193
193
  type: GbtRelativeTimePipe,
194
194
  deps: [],
@@ -196,7 +196,7 @@ var GbtRelativeTimePipe = class GbtRelativeTimePipe {
196
196
  });
197
197
  static ɵpipe = i0.ɵɵngDeclarePipe({
198
198
  minVersion: "14.0.0",
199
- version: "22.2.4",
199
+ version: "22.2.6",
200
200
  ngImport: i0,
201
201
  type: GbtRelativeTimePipe,
202
202
  isStandalone: true,
@@ -205,7 +205,7 @@ var GbtRelativeTimePipe = class GbtRelativeTimePipe {
205
205
  };
206
206
  i0.ɵɵngDeclareClassMetadata({
207
207
  minVersion: "12.0.0",
208
- version: "22.2.4",
208
+ version: "22.2.6",
209
209
  ngImport: i0,
210
210
  type: GbtRelativeTimePipe,
211
211
  decorators: [{
@@ -225,7 +225,7 @@ var GbtBytesPipe = class GbtBytesPipe {
225
225
  }
226
226
  static ɵfac = i0.ɵɵngDeclareFactory({
227
227
  minVersion: "12.0.0",
228
- version: "22.2.4",
228
+ version: "22.2.6",
229
229
  ngImport: i0,
230
230
  type: GbtBytesPipe,
231
231
  deps: [],
@@ -233,7 +233,7 @@ var GbtBytesPipe = class GbtBytesPipe {
233
233
  });
234
234
  static ɵpipe = i0.ɵɵngDeclarePipe({
235
235
  minVersion: "14.0.0",
236
- version: "22.2.4",
236
+ version: "22.2.6",
237
237
  ngImport: i0,
238
238
  type: GbtBytesPipe,
239
239
  isStandalone: true,
@@ -242,7 +242,7 @@ var GbtBytesPipe = class GbtBytesPipe {
242
242
  };
243
243
  i0.ɵɵngDeclareClassMetadata({
244
244
  minVersion: "12.0.0",
245
- version: "22.2.4",
245
+ version: "22.2.6",
246
246
  ngImport: i0,
247
247
  type: GbtBytesPipe,
248
248
  decorators: [{
@@ -261,7 +261,7 @@ var GbtDateTimePipe = class GbtDateTimePipe {
261
261
  }
262
262
  static ɵfac = i0.ɵɵngDeclareFactory({
263
263
  minVersion: "12.0.0",
264
- version: "22.2.4",
264
+ version: "22.2.6",
265
265
  ngImport: i0,
266
266
  type: GbtDateTimePipe,
267
267
  deps: [],
@@ -269,7 +269,7 @@ var GbtDateTimePipe = class GbtDateTimePipe {
269
269
  });
270
270
  static ɵpipe = i0.ɵɵngDeclarePipe({
271
271
  minVersion: "14.0.0",
272
- version: "22.2.4",
272
+ version: "22.2.6",
273
273
  ngImport: i0,
274
274
  type: GbtDateTimePipe,
275
275
  isStandalone: true,
@@ -278,7 +278,7 @@ var GbtDateTimePipe = class GbtDateTimePipe {
278
278
  };
279
279
  i0.ɵɵngDeclareClassMetadata({
280
280
  minVersion: "12.0.0",
281
- version: "22.2.4",
281
+ version: "22.2.6",
282
282
  ngImport: i0,
283
283
  type: GbtDateTimePipe,
284
284
  decorators: [{
@@ -52,7 +52,7 @@ var FunnelChart = class FunnelChart {
52
52
  }, ...ngDevMode ? [{ debugName: "tableRows" }] : /* istanbul ignore next */ []);
53
53
  static ɵfac = i0.ɵɵngDeclareFactory({
54
54
  minVersion: "12.0.0",
55
- version: "22.2.4",
55
+ version: "22.2.6",
56
56
  ngImport: i0,
57
57
  type: FunnelChart,
58
58
  deps: [],
@@ -60,7 +60,7 @@ var FunnelChart = class FunnelChart {
60
60
  });
61
61
  static ɵcmp = i0.ɵɵngDeclareComponent({
62
62
  minVersion: "17.0.0",
63
- version: "22.2.4",
63
+ version: "22.2.6",
64
64
  type: FunnelChart,
65
65
  isStandalone: true,
66
66
  selector: "gbt-funnel-chart",
@@ -153,7 +153,7 @@ var FunnelChart = class FunnelChart {
153
153
  };
154
154
  i0.ɵɵngDeclareClassMetadata({
155
155
  minVersion: "12.0.0",
156
- version: "22.2.4",
156
+ version: "22.2.6",
157
157
  ngImport: i0,
158
158
  type: FunnelChart,
159
159
  decorators: [{
@@ -31,7 +31,7 @@ var GaugeBar = class GaugeBar {
31
31
  }, ...ngDevMode ? [{ debugName: "severityLabel" }] : /* istanbul ignore next */ []);
32
32
  static ɵfac = i0.ɵɵngDeclareFactory({
33
33
  minVersion: "12.0.0",
34
- version: "22.2.4",
34
+ version: "22.2.6",
35
35
  ngImport: i0,
36
36
  type: GaugeBar,
37
37
  deps: [],
@@ -39,7 +39,7 @@ var GaugeBar = class GaugeBar {
39
39
  });
40
40
  static ɵcmp = i0.ɵɵngDeclareComponent({
41
41
  minVersion: "17.0.0",
42
- version: "22.2.4",
42
+ version: "22.2.6",
43
43
  type: GaugeBar,
44
44
  isStandalone: true,
45
45
  selector: "gbt-gauge-bar",
@@ -102,7 +102,7 @@ var GaugeBar = class GaugeBar {
102
102
  };
103
103
  i0.ɵɵngDeclareClassMetadata({
104
104
  minVersion: "12.0.0",
105
- version: "22.2.4",
105
+ version: "22.2.6",
106
106
  ngImport: i0,
107
107
  type: GaugeBar,
108
108
  decorators: [{
@@ -81,7 +81,7 @@ var GitField = class GitField {
81
81
  drawing = DRAWING;
82
82
  static ɵfac = i0.ɵɵngDeclareFactory({
83
83
  minVersion: "12.0.0",
84
- version: "22.2.4",
84
+ version: "22.2.6",
85
85
  ngImport: i0,
86
86
  type: GitField,
87
87
  deps: [],
@@ -89,7 +89,7 @@ var GitField = class GitField {
89
89
  });
90
90
  static ɵcmp = i0.ɵɵngDeclareComponent({
91
91
  minVersion: "17.0.0",
92
- version: "22.2.4",
92
+ version: "22.2.6",
93
93
  type: GitField,
94
94
  isStandalone: true,
95
95
  selector: "gbt-git-field",
@@ -105,7 +105,7 @@ var GitField = class GitField {
105
105
  };
106
106
  i0.ɵɵngDeclareClassMetadata({
107
107
  minVersion: "12.0.0",
108
- version: "22.2.4",
108
+ version: "22.2.6",
109
109
  ngImport: i0,
110
110
  type: GitField,
111
111
  decorators: [{
@@ -10,7 +10,7 @@ var IconMarker = class IconMarker {
10
10
  label = input(null, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
11
11
  static ɵfac = i0.ɵɵngDeclareFactory({
12
12
  minVersion: "12.0.0",
13
- version: "22.2.4",
13
+ version: "22.2.6",
14
14
  ngImport: i0,
15
15
  type: IconMarker,
16
16
  deps: [],
@@ -18,7 +18,7 @@ var IconMarker = class IconMarker {
18
18
  });
19
19
  static ɵcmp = i0.ɵɵngDeclareComponent({
20
20
  minVersion: "17.1.0",
21
- version: "22.2.4",
21
+ version: "22.2.6",
22
22
  type: IconMarker,
23
23
  isStandalone: true,
24
24
  selector: "gbt-icon-marker",
@@ -80,7 +80,7 @@ var IconMarker = class IconMarker {
80
80
  };
81
81
  i0.ɵɵngDeclareClassMetadata({
82
82
  minVersion: "12.0.0",
83
- version: "22.2.4",
83
+ version: "22.2.6",
84
84
  ngImport: i0,
85
85
  type: IconMarker,
86
86
  decorators: [{
@@ -189,7 +189,7 @@ var IconRegistry = class IconRegistry {
189
189
  }
190
190
  static ɵfac = i0.ɵɵngDeclareFactory({
191
191
  minVersion: "12.0.0",
192
- version: "22.2.4",
192
+ version: "22.2.6",
193
193
  ngImport: i0,
194
194
  type: IconRegistry,
195
195
  deps: [],
@@ -197,7 +197,7 @@ var IconRegistry = class IconRegistry {
197
197
  });
198
198
  static ɵprov = i0.ɵɵngDeclareInjectable({
199
199
  minVersion: "12.0.0",
200
- version: "22.2.4",
200
+ version: "22.2.6",
201
201
  ngImport: i0,
202
202
  type: IconRegistry,
203
203
  providedIn: "root"
@@ -205,7 +205,7 @@ var IconRegistry = class IconRegistry {
205
205
  };
206
206
  i0.ɵɵngDeclareClassMetadata({
207
207
  minVersion: "12.0.0",
208
- version: "22.2.4",
208
+ version: "22.2.6",
209
209
  ngImport: i0,
210
210
  type: IconRegistry,
211
211
  decorators: [{
@@ -223,7 +223,7 @@ var Icon = class Icon {
223
223
  }, ...ngDevMode ? [{ debugName: "svgContent" }] : /* istanbul ignore next */ []);
224
224
  static ɵfac = i0.ɵɵngDeclareFactory({
225
225
  minVersion: "12.0.0",
226
- version: "22.2.4",
226
+ version: "22.2.6",
227
227
  ngImport: i0,
228
228
  type: Icon,
229
229
  deps: [],
@@ -231,7 +231,7 @@ var Icon = class Icon {
231
231
  });
232
232
  static ɵcmp = i0.ɵɵngDeclareComponent({
233
233
  minVersion: "17.0.0",
234
- version: "22.2.4",
234
+ version: "22.2.6",
235
235
  type: Icon,
236
236
  isStandalone: true,
237
237
  selector: "gbt-icon",
@@ -266,7 +266,7 @@ var Icon = class Icon {
266
266
  };
267
267
  i0.ɵɵngDeclareClassMetadata({
268
268
  minVersion: "12.0.0",
269
- version: "22.2.4",
269
+ version: "22.2.6",
270
270
  ngImport: i0,
271
271
  type: Icon,
272
272
  decorators: [{
@@ -83,7 +83,7 @@ var GbtInput = class GbtInput {
83
83
  }
84
84
  static ɵfac = i0.ɵɵngDeclareFactory({
85
85
  minVersion: "12.0.0",
86
- version: "22.2.4",
86
+ version: "22.2.6",
87
87
  ngImport: i0,
88
88
  type: GbtInput,
89
89
  deps: [],
@@ -91,7 +91,7 @@ var GbtInput = class GbtInput {
91
91
  });
92
92
  static ɵcmp = i0.ɵɵngDeclareComponent({
93
93
  minVersion: "17.0.0",
94
- version: "22.2.4",
94
+ version: "22.2.6",
95
95
  type: GbtInput,
96
96
  isStandalone: true,
97
97
  selector: "gbt-input",
@@ -266,7 +266,7 @@ var GbtInput = class GbtInput {
266
266
  }],
267
267
  ngImport: i0,
268
268
  template: "<div\n class=\"gbt-input\"\n [class.gbt-input--sm]=\"size() === 'sm'\"\n [class.gbt-input--mono]=\"mono()\"\n [class.gbt-input--leading]=\"!!leadingIcon()\"\n>\n @if (label()) {\n <label [for]=\"id()\" [class.gbt-input__label--hidden]=\"hideLabel()\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n <div class=\"gbt-input__wrapper\">\n @if (leadingIcon(); as icon) {\n <span class=\"gbt-input__leading\" aria-hidden=\"true\">\n <gbt-icon [name]=\"icon\" />\n </span>\n }\n <input\n [id]=\"id()\"\n [type]=\"effectiveType()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.inputmode]=\"inputmode()\"\n [attr.spellcheck]=\"spellcheck()\"\n [attr.autocapitalize]=\"autocapitalize()\"\n [attr.enterkeyhint]=\"enterkeyhint()\"\n [attr.maxlength]=\"maxlength()\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n [value]=\"value()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.role]=\"combobox() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"combobox() ? 'list' : null\"\n [attr.aria-expanded]=\"combobox()?.expanded ?? null\"\n [attr.aria-controls]=\"combobox()?.controls ?? null\"\n [attr.aria-activedescendant]=\"combobox()?.activeDescendant ?? null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n @if (type() === 'password') {\n <button\n type=\"button\"\n class=\"gbt-input__toggle\"\n (click)=\"togglePasswordVisibility()\"\n [attr.aria-label]=\"passwordVisible() ? hidePasswordLabel() : showPasswordLabel()\"\n >\n <gbt-icon [name]=\"passwordVisible() ? 'eye-off' : 'eye'\" aria-hidden=\"true\" />\n </button>\n }\n </div>\n @if (showHint()) {\n <p [id]=\"hintId()\" class=\"gbt-input__hint\">{{ hint() }}</p>\n }\n @if (errorMessage()) {\n <p [id]=\"errorId()\" class=\"gbt-input__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n",
269
- styles: [":host{display:block}.gbt-input{display:flex;flex-direction:column;gap:.375rem}.gbt-input label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-input__wrapper{position:relative;display:flex;align-items:center}.gbt-input input{box-sizing:border-box;width:100%;height:var(--gbt-control-height-md);padding:0 var(--gbt-field-padding, .75rem);font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);background:var(--gbt-field-ground, var(--bg-principal));border:1px solid var(--gbt-field-border, var(--border-color));border-radius:var(--site-border-radius-sm);box-shadow:var(--gbt-field-hollow, var(--gbt-depth-hollow));transition:border-color var(--site-transition-fast)}.gbt-input input:hover:not(:disabled):not(:focus){border-color:var(--gbt-field-border-hover, var(--text-discret))}.gbt-input input:focus{outline:none;border-color:var(--primary)}.gbt-input input:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:1px}.gbt-input input:disabled{background:var(--bg-panel);cursor:not-allowed}.gbt-input input[type=search]{-webkit-appearance:none;appearance:none}.gbt-input__label--hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.gbt-input__hint{margin:0;font-size:.75rem;color:var(--text-secondary)}.gbt-input__leading{position:absolute;left:.75rem;display:inline-flex;font-size:.875rem;color:var(--text-discret);pointer-events:none}.gbt-input--leading input{padding-left:2.25rem}.gbt-input--mono input{font-family:var(--gbt-font-mono, \"IBM Plex Mono\", ui-monospace, \"SF Mono\", Menlo, Consolas, monospace),serif;font-size:.8125rem}.gbt-input--sm input{height:var(--gbt-control-height-sm);padding:0 .625rem;font-size:.8125rem}.gbt-input--sm .gbt-input__leading{left:.625rem;font-size:.8125rem}.gbt-input--sm.gbt-input--mono input{font-size:.75rem}.gbt-input--sm.gbt-input--leading input{padding-left:2rem}.gbt-input__toggle{position:absolute;right:.5rem;display:inline-flex;align-items:center;justify-content:center;min-width:24px;min-height:24px;background:none;border:none;border-radius:var(--site-border-radius-sm);color:var(--text-discret);cursor:pointer}.gbt-input__toggle:hover{background:var(--bg-hover);color:var(--text-primary)}.gbt-input__toggle:active{background:var(--bg-press);color:var(--text-primary)}.gbt-input__toggle:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-input__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-input input{transition:none}}\n"],
269
+ styles: [":host{display:block}.gbt-input{display:flex;flex-direction:column;gap:.375rem}.gbt-input label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-input__wrapper{position:relative;display:flex;align-items:center}.gbt-input input{box-sizing:border-box;width:100%;height:var(--gbt-control-height-md);padding:0 var(--gbt-field-padding, .75rem);font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);border-radius:999px;background:var(--gbt-field-ground, var(--gbt-glass-thin));border:1px solid var(--gbt-field-border, transparent);box-shadow:var(--gbt-field-hollow, inset 0 1px 3px var(--gbt-glass-hollow), inset 0 -1px 0 var(--gbt-glass-rim-bottom))}@media(prefers-contrast:more){.gbt-input input{border-color:var(--gbt-field-border, var(--border-color))}}.gbt-input input{transition:border-color var(--site-transition-fast),background-color var(--site-transition-fast)}.gbt-input input:hover:not(:disabled):not(:focus){background:var(--gbt-field-ground, var(--gbt-glass-regular))}.gbt-input input:focus{outline:none;border-color:var(--primary)}.gbt-input input:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:1px}.gbt-input input:disabled{background:var(--bg-panel);cursor:not-allowed}.gbt-input input[type=search]{-webkit-appearance:none;appearance:none}.gbt-input__label--hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.gbt-input__hint{margin:0;font-size:.75rem;color:var(--text-secondary)}.gbt-input__leading{position:absolute;left:.75rem;display:inline-flex;font-size:.875rem;color:var(--text-discret);pointer-events:none}.gbt-input--leading input{padding-left:2.25rem}.gbt-input--mono input{font-family:var(--gbt-font-mono, \"IBM Plex Mono\", ui-monospace, \"SF Mono\", Menlo, Consolas, monospace),serif;font-size:.8125rem}.gbt-input--sm input{height:var(--gbt-control-height-sm);padding:0 .625rem;font-size:.8125rem}.gbt-input--sm .gbt-input__leading{left:.625rem;font-size:.8125rem}.gbt-input--sm.gbt-input--mono input{font-size:.75rem}.gbt-input--sm.gbt-input--leading input{padding-left:2rem}.gbt-input__toggle{position:absolute;right:.5rem;display:inline-flex;align-items:center;justify-content:center;min-width:24px;min-height:24px;background:none;border:none;border-radius:999px;color:var(--text-discret);cursor:pointer}.gbt-input__toggle:hover{background:var(--bg-hover);color:var(--text-primary)}.gbt-input__toggle:active{background:var(--bg-press);color:var(--text-primary)}.gbt-input__toggle:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-input__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-input input{transition:none}}\n"],
270
270
  dependencies: [{
271
271
  kind: "component",
272
272
  type: Icon,
@@ -278,7 +278,7 @@ var GbtInput = class GbtInput {
278
278
  };
279
279
  i0.ɵɵngDeclareClassMetadata({
280
280
  minVersion: "12.0.0",
281
- version: "22.2.4",
281
+ version: "22.2.6",
282
282
  ngImport: i0,
283
283
  type: GbtInput,
284
284
  decorators: [{
@@ -294,7 +294,7 @@ i0.ɵɵngDeclareClassMetadata({
294
294
  multi: true
295
295
  }],
296
296
  template: "<div\n class=\"gbt-input\"\n [class.gbt-input--sm]=\"size() === 'sm'\"\n [class.gbt-input--mono]=\"mono()\"\n [class.gbt-input--leading]=\"!!leadingIcon()\"\n>\n @if (label()) {\n <label [for]=\"id()\" [class.gbt-input__label--hidden]=\"hideLabel()\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n <div class=\"gbt-input__wrapper\">\n @if (leadingIcon(); as icon) {\n <span class=\"gbt-input__leading\" aria-hidden=\"true\">\n <gbt-icon [name]=\"icon\" />\n </span>\n }\n <input\n [id]=\"id()\"\n [type]=\"effectiveType()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.inputmode]=\"inputmode()\"\n [attr.spellcheck]=\"spellcheck()\"\n [attr.autocapitalize]=\"autocapitalize()\"\n [attr.enterkeyhint]=\"enterkeyhint()\"\n [attr.maxlength]=\"maxlength()\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n [value]=\"value()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.role]=\"combobox() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"combobox() ? 'list' : null\"\n [attr.aria-expanded]=\"combobox()?.expanded ?? null\"\n [attr.aria-controls]=\"combobox()?.controls ?? null\"\n [attr.aria-activedescendant]=\"combobox()?.activeDescendant ?? null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n @if (type() === 'password') {\n <button\n type=\"button\"\n class=\"gbt-input__toggle\"\n (click)=\"togglePasswordVisibility()\"\n [attr.aria-label]=\"passwordVisible() ? hidePasswordLabel() : showPasswordLabel()\"\n >\n <gbt-icon [name]=\"passwordVisible() ? 'eye-off' : 'eye'\" aria-hidden=\"true\" />\n </button>\n }\n </div>\n @if (showHint()) {\n <p [id]=\"hintId()\" class=\"gbt-input__hint\">{{ hint() }}</p>\n }\n @if (errorMessage()) {\n <p [id]=\"errorId()\" class=\"gbt-input__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n",
297
- styles: [":host{display:block}.gbt-input{display:flex;flex-direction:column;gap:.375rem}.gbt-input label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-input__wrapper{position:relative;display:flex;align-items:center}.gbt-input input{box-sizing:border-box;width:100%;height:var(--gbt-control-height-md);padding:0 var(--gbt-field-padding, .75rem);font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);background:var(--gbt-field-ground, var(--bg-principal));border:1px solid var(--gbt-field-border, var(--border-color));border-radius:var(--site-border-radius-sm);box-shadow:var(--gbt-field-hollow, var(--gbt-depth-hollow));transition:border-color var(--site-transition-fast)}.gbt-input input:hover:not(:disabled):not(:focus){border-color:var(--gbt-field-border-hover, var(--text-discret))}.gbt-input input:focus{outline:none;border-color:var(--primary)}.gbt-input input:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:1px}.gbt-input input:disabled{background:var(--bg-panel);cursor:not-allowed}.gbt-input input[type=search]{-webkit-appearance:none;appearance:none}.gbt-input__label--hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.gbt-input__hint{margin:0;font-size:.75rem;color:var(--text-secondary)}.gbt-input__leading{position:absolute;left:.75rem;display:inline-flex;font-size:.875rem;color:var(--text-discret);pointer-events:none}.gbt-input--leading input{padding-left:2.25rem}.gbt-input--mono input{font-family:var(--gbt-font-mono, \"IBM Plex Mono\", ui-monospace, \"SF Mono\", Menlo, Consolas, monospace),serif;font-size:.8125rem}.gbt-input--sm input{height:var(--gbt-control-height-sm);padding:0 .625rem;font-size:.8125rem}.gbt-input--sm .gbt-input__leading{left:.625rem;font-size:.8125rem}.gbt-input--sm.gbt-input--mono input{font-size:.75rem}.gbt-input--sm.gbt-input--leading input{padding-left:2rem}.gbt-input__toggle{position:absolute;right:.5rem;display:inline-flex;align-items:center;justify-content:center;min-width:24px;min-height:24px;background:none;border:none;border-radius:var(--site-border-radius-sm);color:var(--text-discret);cursor:pointer}.gbt-input__toggle:hover{background:var(--bg-hover);color:var(--text-primary)}.gbt-input__toggle:active{background:var(--bg-press);color:var(--text-primary)}.gbt-input__toggle:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-input__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-input input{transition:none}}\n"]
297
+ styles: [":host{display:block}.gbt-input{display:flex;flex-direction:column;gap:.375rem}.gbt-input label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-input__wrapper{position:relative;display:flex;align-items:center}.gbt-input input{box-sizing:border-box;width:100%;height:var(--gbt-control-height-md);padding:0 var(--gbt-field-padding, .75rem);font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);border-radius:999px;background:var(--gbt-field-ground, var(--gbt-glass-thin));border:1px solid var(--gbt-field-border, transparent);box-shadow:var(--gbt-field-hollow, inset 0 1px 3px var(--gbt-glass-hollow), inset 0 -1px 0 var(--gbt-glass-rim-bottom))}@media(prefers-contrast:more){.gbt-input input{border-color:var(--gbt-field-border, var(--border-color))}}.gbt-input input{transition:border-color var(--site-transition-fast),background-color var(--site-transition-fast)}.gbt-input input:hover:not(:disabled):not(:focus){background:var(--gbt-field-ground, var(--gbt-glass-regular))}.gbt-input input:focus{outline:none;border-color:var(--primary)}.gbt-input input:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:1px}.gbt-input input:disabled{background:var(--bg-panel);cursor:not-allowed}.gbt-input input[type=search]{-webkit-appearance:none;appearance:none}.gbt-input__label--hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.gbt-input__hint{margin:0;font-size:.75rem;color:var(--text-secondary)}.gbt-input__leading{position:absolute;left:.75rem;display:inline-flex;font-size:.875rem;color:var(--text-discret);pointer-events:none}.gbt-input--leading input{padding-left:2.25rem}.gbt-input--mono input{font-family:var(--gbt-font-mono, \"IBM Plex Mono\", ui-monospace, \"SF Mono\", Menlo, Consolas, monospace),serif;font-size:.8125rem}.gbt-input--sm input{height:var(--gbt-control-height-sm);padding:0 .625rem;font-size:.8125rem}.gbt-input--sm .gbt-input__leading{left:.625rem;font-size:.8125rem}.gbt-input--sm.gbt-input--mono input{font-size:.75rem}.gbt-input--sm.gbt-input--leading input{padding-left:2rem}.gbt-input__toggle{position:absolute;right:.5rem;display:inline-flex;align-items:center;justify-content:center;min-width:24px;min-height:24px;background:none;border:none;border-radius:999px;color:var(--text-discret);cursor:pointer}.gbt-input__toggle:hover{background:var(--bg-hover);color:var(--text-primary)}.gbt-input__toggle:active{background:var(--bg-press);color:var(--text-primary)}.gbt-input__toggle:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-input__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-input input{transition:none}}\n"]
298
298
  }]
299
299
  }],
300
300
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"masmarino-gabarit-input.mjs","names":[],"sources":["../../../projects/gabarit/input/input.ts","../../../projects/gabarit/input/input.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n output,\n signal,\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { Icon } from '@masmarino/gabarit/icon'\n\nlet nextInputId = 0\n\nexport type InputType = 'text' | 'password' | 'email' | 'number' | 'search' | 'url'\nexport type InputSize = 'md' | 'sm'\nexport type InputInputmode =\n 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'\nexport type InputAutocapitalize = 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'\nexport type InputEnterkeyhint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'\n\n/** Makes the field the combobox of a suggestion list the caller renders, with its keys and active option. */\nexport interface InputCombobox {\n /** Whether the listbox is shown. */\n expanded: boolean\n /** The id of the listbox. */\n controls: string\n /** The id of the highlighted option, `null` when none is. */\n activeDescendant: string | null\n}\n\n@Component({\n selector: 'gbt-input',\n standalone: true,\n imports: [Icon],\n templateUrl: './input.html',\n styleUrl: './input.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => GbtInput),\n multi: true,\n },\n ],\n})\nexport class GbtInput implements ControlValueAccessor {\n id = input<string>(`gbt-input-${++nextInputId}`)\n label = input<string>('')\n type = input<InputType>('text')\n required = input(false, { transform: booleanAttribute })\n disabled = input(false, { transform: booleanAttribute })\n placeholder = input<string>('')\n errorMessage = input<string | null>(null)\n autocomplete = input<string>('off')\n\n hint = input<string>('')\n hideLabel = input(false, { transform: booleanAttribute })\n size = input<InputSize>('md')\n mono = input(false, { transform: booleanAttribute })\n leadingIcon = input<string | null>(null)\n inputmode = input<InputInputmode | null>(null)\n spellcheck = input<boolean | null>(null)\n autocapitalize = input<InputAutocapitalize | null>(null)\n enterkeyhint = input<InputEnterkeyhint | null>(null)\n maxlength = input<number | null>(null)\n min = input<number | string | null>(null)\n max = input<number | string | null>(null)\n\n combobox = input<InputCombobox | null>(null)\n\n showPasswordLabel = input<string>('Show password')\n\n hidePasswordLabel = input<string>('Hide password')\n\n committed = output<string>()\n\n protected readonly value = signal('')\n protected readonly passwordVisible = signal(false)\n protected readonly effectiveType = computed(() => {\n if (this.type() !== 'password') {\n return this.type()\n }\n return this.passwordVisible() ? 'text' : 'password'\n })\n\n protected readonly hintId = computed(() => `${this.id()}-hint`)\n protected readonly errorId = computed(() => `${this.id()}-error`)\n protected readonly showHint = computed(() => !!this.hint() && !this.errorMessage())\n protected readonly describedBy = computed(() => {\n if (this.errorMessage()) {\n return this.errorId()\n }\n return this.showHint() ? this.hintId() : null\n })\n\n private readonly formDisabled = signal(false)\n protected readonly isDisabled = computed(() => this.disabled() || this.formDisabled())\n\n private onChange: (value: string) => void = () => {}\n private onTouched: () => void = () => {}\n\n writeValue(value: string): void {\n this.value.set(value ?? '')\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled)\n }\n\n protected onInput(event: Event): void {\n const value = (event.target as HTMLInputElement).value\n this.value.set(value)\n this.onChange(value)\n }\n\n protected onBlur(): void {\n this.onTouched()\n this.committed.emit(this.value())\n }\n\n protected togglePasswordVisibility(): void {\n this.passwordVisible.update((visible) => !visible)\n }\n}\n","<div\n class=\"gbt-input\"\n [class.gbt-input--sm]=\"size() === 'sm'\"\n [class.gbt-input--mono]=\"mono()\"\n [class.gbt-input--leading]=\"!!leadingIcon()\"\n>\n @if (label()) {\n <label [for]=\"id()\" [class.gbt-input__label--hidden]=\"hideLabel()\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n <div class=\"gbt-input__wrapper\">\n @if (leadingIcon(); as icon) {\n <span class=\"gbt-input__leading\" aria-hidden=\"true\">\n <gbt-icon [name]=\"icon\" />\n </span>\n }\n <input\n [id]=\"id()\"\n [type]=\"effectiveType()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.inputmode]=\"inputmode()\"\n [attr.spellcheck]=\"spellcheck()\"\n [attr.autocapitalize]=\"autocapitalize()\"\n [attr.enterkeyhint]=\"enterkeyhint()\"\n [attr.maxlength]=\"maxlength()\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n [value]=\"value()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.role]=\"combobox() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"combobox() ? 'list' : null\"\n [attr.aria-expanded]=\"combobox()?.expanded ?? null\"\n [attr.aria-controls]=\"combobox()?.controls ?? null\"\n [attr.aria-activedescendant]=\"combobox()?.activeDescendant ?? null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n @if (type() === 'password') {\n <button\n type=\"button\"\n class=\"gbt-input__toggle\"\n (click)=\"togglePasswordVisibility()\"\n [attr.aria-label]=\"passwordVisible() ? hidePasswordLabel() : showPasswordLabel()\"\n >\n <gbt-icon [name]=\"passwordVisible() ? 'eye-off' : 'eye'\" aria-hidden=\"true\" />\n </button>\n }\n </div>\n @if (showHint()) {\n <p [id]=\"hintId()\" class=\"gbt-input__hint\">{{ hint() }}</p>\n }\n @if (errorMessage()) {\n <p [id]=\"errorId()\" class=\"gbt-input__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n"],"mappings":";;;;AAaA,IAAI,cAAc;AAmClB,IAAa,WAAb,MAAa,SAAQ;CACnB,KAAK,MAAc,aAAa,EAAE,eAAc,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CAChD,QAAQ,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACzB,OAAO,MAA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GACR,CACF;GAAA,UAAA;GAAA,QAAA,CAAA,0nFAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"masmarino-gabarit-input.mjs","names":[],"sources":["../../../projects/gabarit/input/input.ts","../../../projects/gabarit/input/input.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n output,\n signal,\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { Icon } from '@masmarino/gabarit/icon'\n\nlet nextInputId = 0\n\nexport type InputType = 'text' | 'password' | 'email' | 'number' | 'search' | 'url'\nexport type InputSize = 'md' | 'sm'\nexport type InputInputmode =\n 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'\nexport type InputAutocapitalize = 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'\nexport type InputEnterkeyhint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'\n\n/** Makes the field the combobox of a suggestion list the caller renders, with its keys and active option. */\nexport interface InputCombobox {\n /** Whether the listbox is shown. */\n expanded: boolean\n /** The id of the listbox. */\n controls: string\n /** The id of the highlighted option, `null` when none is. */\n activeDescendant: string | null\n}\n\n@Component({\n selector: 'gbt-input',\n standalone: true,\n imports: [Icon],\n templateUrl: './input.html',\n styleUrl: './input.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => GbtInput),\n multi: true,\n },\n ],\n})\nexport class GbtInput implements ControlValueAccessor {\n id = input<string>(`gbt-input-${++nextInputId}`)\n label = input<string>('')\n type = input<InputType>('text')\n required = input(false, { transform: booleanAttribute })\n disabled = input(false, { transform: booleanAttribute })\n placeholder = input<string>('')\n errorMessage = input<string | null>(null)\n autocomplete = input<string>('off')\n\n hint = input<string>('')\n hideLabel = input(false, { transform: booleanAttribute })\n size = input<InputSize>('md')\n mono = input(false, { transform: booleanAttribute })\n leadingIcon = input<string | null>(null)\n inputmode = input<InputInputmode | null>(null)\n spellcheck = input<boolean | null>(null)\n autocapitalize = input<InputAutocapitalize | null>(null)\n enterkeyhint = input<InputEnterkeyhint | null>(null)\n maxlength = input<number | null>(null)\n min = input<number | string | null>(null)\n max = input<number | string | null>(null)\n\n combobox = input<InputCombobox | null>(null)\n\n showPasswordLabel = input<string>('Show password')\n\n hidePasswordLabel = input<string>('Hide password')\n\n committed = output<string>()\n\n protected readonly value = signal('')\n protected readonly passwordVisible = signal(false)\n protected readonly effectiveType = computed(() => {\n if (this.type() !== 'password') {\n return this.type()\n }\n return this.passwordVisible() ? 'text' : 'password'\n })\n\n protected readonly hintId = computed(() => `${this.id()}-hint`)\n protected readonly errorId = computed(() => `${this.id()}-error`)\n protected readonly showHint = computed(() => !!this.hint() && !this.errorMessage())\n protected readonly describedBy = computed(() => {\n if (this.errorMessage()) {\n return this.errorId()\n }\n return this.showHint() ? this.hintId() : null\n })\n\n private readonly formDisabled = signal(false)\n protected readonly isDisabled = computed(() => this.disabled() || this.formDisabled())\n\n private onChange: (value: string) => void = () => {}\n private onTouched: () => void = () => {}\n\n writeValue(value: string): void {\n this.value.set(value ?? '')\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled)\n }\n\n protected onInput(event: Event): void {\n const value = (event.target as HTMLInputElement).value\n this.value.set(value)\n this.onChange(value)\n }\n\n protected onBlur(): void {\n this.onTouched()\n this.committed.emit(this.value())\n }\n\n protected togglePasswordVisibility(): void {\n this.passwordVisible.update((visible) => !visible)\n }\n}\n","<div\n class=\"gbt-input\"\n [class.gbt-input--sm]=\"size() === 'sm'\"\n [class.gbt-input--mono]=\"mono()\"\n [class.gbt-input--leading]=\"!!leadingIcon()\"\n>\n @if (label()) {\n <label [for]=\"id()\" [class.gbt-input__label--hidden]=\"hideLabel()\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n <div class=\"gbt-input__wrapper\">\n @if (leadingIcon(); as icon) {\n <span class=\"gbt-input__leading\" aria-hidden=\"true\">\n <gbt-icon [name]=\"icon\" />\n </span>\n }\n <input\n [id]=\"id()\"\n [type]=\"effectiveType()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.inputmode]=\"inputmode()\"\n [attr.spellcheck]=\"spellcheck()\"\n [attr.autocapitalize]=\"autocapitalize()\"\n [attr.enterkeyhint]=\"enterkeyhint()\"\n [attr.maxlength]=\"maxlength()\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n [value]=\"value()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.role]=\"combobox() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"combobox() ? 'list' : null\"\n [attr.aria-expanded]=\"combobox()?.expanded ?? null\"\n [attr.aria-controls]=\"combobox()?.controls ?? null\"\n [attr.aria-activedescendant]=\"combobox()?.activeDescendant ?? null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n @if (type() === 'password') {\n <button\n type=\"button\"\n class=\"gbt-input__toggle\"\n (click)=\"togglePasswordVisibility()\"\n [attr.aria-label]=\"passwordVisible() ? hidePasswordLabel() : showPasswordLabel()\"\n >\n <gbt-icon [name]=\"passwordVisible() ? 'eye-off' : 'eye'\" aria-hidden=\"true\" />\n </button>\n }\n </div>\n @if (showHint()) {\n <p [id]=\"hintId()\" class=\"gbt-input__hint\">{{ hint() }}</p>\n }\n @if (errorMessage()) {\n <p [id]=\"errorId()\" class=\"gbt-input__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n"],"mappings":";;;;AAaA,IAAI,cAAc;AAmClB,IAAa,WAAb,MAAa,SAAQ;CACnB,KAAK,MAAc,aAAa,EAAE,e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AA;EAhBpB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAW,YACT;GAAI,SACP,CAAC,IAAI;GAAC,iBAGE,wBAAwB;GAAM,WAEpC,CACT;IACE,SAAS;IACT,aAAa,iBAAgB,QAAS;IACtC,OAAO;GACR,CACF;GAAA,UAAA;GAAA,QAAA,CAAA,uyFAAA;EAAA,CAAA"}
@@ -74,7 +74,7 @@ var JobGraph = class JobGraph {
74
74
  }
75
75
  static ɵfac = i0.ɵɵngDeclareFactory({
76
76
  minVersion: "12.0.0",
77
- version: "22.2.4",
77
+ version: "22.2.6",
78
78
  ngImport: i0,
79
79
  type: JobGraph,
80
80
  deps: [],
@@ -82,7 +82,7 @@ var JobGraph = class JobGraph {
82
82
  });
83
83
  static ɵcmp = i0.ɵɵngDeclareComponent({
84
84
  minVersion: "17.0.0",
85
- version: "22.2.4",
85
+ version: "22.2.6",
86
86
  type: JobGraph,
87
87
  isStandalone: true,
88
88
  selector: "gbt-job-graph",
@@ -133,7 +133,7 @@ var JobGraph = class JobGraph {
133
133
  }],
134
134
  ngImport: i0,
135
135
  template: "<div class=\"gbt-job-graph\" #graph>\n <ol class=\"gbt-job-graph__stages\" [attr.aria-label]=\"ariaLabel()\">\n @for (stage of stages(); track stage.name) {\n <li class=\"gbt-job-graph__stage\">\n <h3 class=\"gbt-job-graph__stage-name\">{{ stage.name }}</h3>\n <ul class=\"gbt-job-graph__jobs\">\n @for (job of stage.jobs; track job.id) {\n <li>\n <button\n type=\"button\"\n class=\"gbt-job-graph__node\"\n [attr.data-job-name]=\"job.name\"\n [attr.data-status]=\"job.status\"\n [attr.aria-current]=\"job.id === selectedJobId() ? 'true' : null\"\n (click)=\"jobSelected.emit(job.id)\"\n >\n <gbt-job-status class=\"gbt-job-graph__glyph\" data-glyph [status]=\"job.status\" />\n <span class=\"gbt-job-graph__name\">{{ job.name }}</span>\n @if (job.durationLabel) {\n <span class=\"gbt-job-graph__duration\">{{ job.durationLabel }}</span>\n }\n <!-- prettier-ignore -->\n <span class=\"sr-only\">\n — {{ statusLabels()[job.status] }}@if (job.needs.length > 0) {. {{ needsLabel() }}: {{ job.needs.join(', ') }}}\n </span>\n </button>\n </li>\n }\n </ul>\n </li>\n }\n </ol>\n <svg class=\"gbt-job-graph__links\" aria-hidden=\"true\" focusable=\"false\">\n @for (link of links(); track link.key) {\n <path [attr.d]=\"link.d\" [attr.data-done]=\"link.done ? '' : null\" />\n }\n </svg>\n</div>\n",
136
- styles: [".gbt-job-graph{position:relative;overflow-x:auto}.gbt-job-graph__stages{position:relative;z-index:1;display:flex;gap:4rem;margin:0;padding:.5rem;list-style:none}.gbt-job-graph__stage-name{margin:0 0 .75rem;font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-secondary)}.gbt-job-graph__jobs{display:flex;flex-direction:column;gap:.75rem;margin:0;padding:0;list-style:none}.gbt-job-graph__node{display:flex;align-items:center;gap:.5rem;min-width:13rem;padding:.5rem .75rem;border:none;border-radius:var(--gbt-radius-tile, var(--site-border-radius-lg));background:var(--gbt-glass-thin);-webkit-backdrop-filter:var(--gbt-glass-blur);backdrop-filter:var(--gbt-glass-blur);box-shadow:var(--gbt-glass-rim-light),0 0 transparent;--text-discret: var(--gbt-ground-text-discret);--border-color: var(--gbt-ground-border);--color-success-text: var(--color-success-bg-text);--color-warning-text: var(--color-warning-bg-text);--color-error-text: var(--color-error-bg-text)}@media(prefers-reduced-transparency:reduce){.gbt-job-graph__node{background:linear-gradient(var(--gbt-glass-thick),var(--gbt-glass-thick)),var(--bg-principal);-webkit-backdrop-filter:none;backdrop-filter:none}}@media(prefers-contrast:more){.gbt-job-graph__node{box-shadow:inset 0 0 0 1px var(--border-color),0 0 transparent}}.gbt-job-graph__node{color:var(--text-primary);font:inherit;text-align:left;cursor:pointer}.gbt-job-graph__node:hover{background:var(--gbt-glass-thick)}.gbt-job-graph__node:active{background:var(--bg-hover)}.gbt-job-graph__node:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}.gbt-job-graph__node[aria-current=true]{background:var(--gbt-glass-thick);box-shadow:inset 0 0 0 2px var(--primary),var(--gbt-glass-rim-light)}.gbt-job-graph__glyph{display:inline-flex;flex-shrink:0}.gbt-job-graph__name{flex:1;font-weight:600}.gbt-job-graph__duration{font-size:12px;color:var(--text-secondary)}.gbt-job-graph__links{position:absolute;inset:0;z-index:0;width:100%;height:100%;pointer-events:none;overflow:visible}.gbt-job-graph__links path{fill:none;stroke:var(--border-color);stroke-width:2}.gbt-job-graph__links path[data-done]{stroke:var(--color-success-base)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n"],
136
+ styles: [".gbt-job-graph{position:relative;overflow-x:auto}.gbt-job-graph__stages{position:relative;z-index:1;display:flex;gap:4rem;margin:0;padding:.5rem;list-style:none}.gbt-job-graph__stage-name{margin:0 0 .75rem;font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-secondary)}.gbt-job-graph__jobs{display:flex;flex-direction:column;gap:.75rem;margin:0;padding:0;list-style:none}.gbt-job-graph__node{display:flex;align-items:center;gap:.5rem;min-width:13rem;padding:.5rem .75rem;border:none;border-radius:var(--gbt-radius-tile, var(--gbt-radius-row));background:var(--gbt-glass-thin);-webkit-backdrop-filter:var(--gbt-glass-blur);backdrop-filter:var(--gbt-glass-blur);box-shadow:var(--gbt-glass-rim-light),0 0 transparent;--text-discret: var(--gbt-ground-text-discret);--border-color: var(--gbt-ground-border);--color-success-text: var(--color-success-bg-text);--color-warning-text: var(--color-warning-bg-text);--color-error-text: var(--color-error-bg-text)}@media(prefers-reduced-transparency:reduce){.gbt-job-graph__node{background:linear-gradient(var(--gbt-glass-thick),var(--gbt-glass-thick)),var(--bg-principal);-webkit-backdrop-filter:none;backdrop-filter:none}}@media(prefers-contrast:more){.gbt-job-graph__node{box-shadow:inset 0 0 0 1px var(--border-color),0 0 transparent}}.gbt-job-graph__node{color:var(--text-primary);font:inherit;text-align:left;cursor:pointer}.gbt-job-graph__node:hover{background:var(--gbt-glass-thick)}.gbt-job-graph__node:active{background:var(--bg-hover)}.gbt-job-graph__node:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}.gbt-job-graph__node[aria-current=true]{background:var(--gbt-glass-thick);box-shadow:inset 0 0 0 2px var(--primary),var(--gbt-glass-rim-light)}.gbt-job-graph__glyph{display:inline-flex;flex-shrink:0}.gbt-job-graph__name{flex:1;font-weight:600}.gbt-job-graph__duration{font-size:12px;color:var(--text-secondary)}.gbt-job-graph__links{position:absolute;inset:0;z-index:0;width:100%;height:100%;pointer-events:none;overflow:visible}.gbt-job-graph__links path{fill:none;stroke:var(--border-color);stroke-width:2}.gbt-job-graph__links path[data-done]{stroke:var(--color-success-base)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n"],
137
137
  dependencies: [{
138
138
  kind: "component",
139
139
  type: JobStatus,
@@ -145,7 +145,7 @@ var JobGraph = class JobGraph {
145
145
  };
146
146
  i0.ɵɵngDeclareClassMetadata({
147
147
  minVersion: "12.0.0",
148
- version: "22.2.4",
148
+ version: "22.2.6",
149
149
  ngImport: i0,
150
150
  type: JobGraph,
151
151
  decorators: [{
@@ -156,7 +156,7 @@ i0.ɵɵngDeclareClassMetadata({
156
156
  imports: [JobStatus],
157
157
  changeDetection: ChangeDetectionStrategy.OnPush,
158
158
  template: "<div class=\"gbt-job-graph\" #graph>\n <ol class=\"gbt-job-graph__stages\" [attr.aria-label]=\"ariaLabel()\">\n @for (stage of stages(); track stage.name) {\n <li class=\"gbt-job-graph__stage\">\n <h3 class=\"gbt-job-graph__stage-name\">{{ stage.name }}</h3>\n <ul class=\"gbt-job-graph__jobs\">\n @for (job of stage.jobs; track job.id) {\n <li>\n <button\n type=\"button\"\n class=\"gbt-job-graph__node\"\n [attr.data-job-name]=\"job.name\"\n [attr.data-status]=\"job.status\"\n [attr.aria-current]=\"job.id === selectedJobId() ? 'true' : null\"\n (click)=\"jobSelected.emit(job.id)\"\n >\n <gbt-job-status class=\"gbt-job-graph__glyph\" data-glyph [status]=\"job.status\" />\n <span class=\"gbt-job-graph__name\">{{ job.name }}</span>\n @if (job.durationLabel) {\n <span class=\"gbt-job-graph__duration\">{{ job.durationLabel }}</span>\n }\n <!-- prettier-ignore -->\n <span class=\"sr-only\">\n — {{ statusLabels()[job.status] }}@if (job.needs.length > 0) {. {{ needsLabel() }}: {{ job.needs.join(', ') }}}\n </span>\n </button>\n </li>\n }\n </ul>\n </li>\n }\n </ol>\n <svg class=\"gbt-job-graph__links\" aria-hidden=\"true\" focusable=\"false\">\n @for (link of links(); track link.key) {\n <path [attr.d]=\"link.d\" [attr.data-done]=\"link.done ? '' : null\" />\n }\n </svg>\n</div>\n",
159
- styles: [".gbt-job-graph{position:relative;overflow-x:auto}.gbt-job-graph__stages{position:relative;z-index:1;display:flex;gap:4rem;margin:0;padding:.5rem;list-style:none}.gbt-job-graph__stage-name{margin:0 0 .75rem;font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-secondary)}.gbt-job-graph__jobs{display:flex;flex-direction:column;gap:.75rem;margin:0;padding:0;list-style:none}.gbt-job-graph__node{display:flex;align-items:center;gap:.5rem;min-width:13rem;padding:.5rem .75rem;border:none;border-radius:var(--gbt-radius-tile, var(--site-border-radius-lg));background:var(--gbt-glass-thin);-webkit-backdrop-filter:var(--gbt-glass-blur);backdrop-filter:var(--gbt-glass-blur);box-shadow:var(--gbt-glass-rim-light),0 0 transparent;--text-discret: var(--gbt-ground-text-discret);--border-color: var(--gbt-ground-border);--color-success-text: var(--color-success-bg-text);--color-warning-text: var(--color-warning-bg-text);--color-error-text: var(--color-error-bg-text)}@media(prefers-reduced-transparency:reduce){.gbt-job-graph__node{background:linear-gradient(var(--gbt-glass-thick),var(--gbt-glass-thick)),var(--bg-principal);-webkit-backdrop-filter:none;backdrop-filter:none}}@media(prefers-contrast:more){.gbt-job-graph__node{box-shadow:inset 0 0 0 1px var(--border-color),0 0 transparent}}.gbt-job-graph__node{color:var(--text-primary);font:inherit;text-align:left;cursor:pointer}.gbt-job-graph__node:hover{background:var(--gbt-glass-thick)}.gbt-job-graph__node:active{background:var(--bg-hover)}.gbt-job-graph__node:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}.gbt-job-graph__node[aria-current=true]{background:var(--gbt-glass-thick);box-shadow:inset 0 0 0 2px var(--primary),var(--gbt-glass-rim-light)}.gbt-job-graph__glyph{display:inline-flex;flex-shrink:0}.gbt-job-graph__name{flex:1;font-weight:600}.gbt-job-graph__duration{font-size:12px;color:var(--text-secondary)}.gbt-job-graph__links{position:absolute;inset:0;z-index:0;width:100%;height:100%;pointer-events:none;overflow:visible}.gbt-job-graph__links path{fill:none;stroke:var(--border-color);stroke-width:2}.gbt-job-graph__links path[data-done]{stroke:var(--color-success-base)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n"]
159
+ styles: [".gbt-job-graph{position:relative;overflow-x:auto}.gbt-job-graph__stages{position:relative;z-index:1;display:flex;gap:4rem;margin:0;padding:.5rem;list-style:none}.gbt-job-graph__stage-name{margin:0 0 .75rem;font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-secondary)}.gbt-job-graph__jobs{display:flex;flex-direction:column;gap:.75rem;margin:0;padding:0;list-style:none}.gbt-job-graph__node{display:flex;align-items:center;gap:.5rem;min-width:13rem;padding:.5rem .75rem;border:none;border-radius:var(--gbt-radius-tile, var(--gbt-radius-row));background:var(--gbt-glass-thin);-webkit-backdrop-filter:var(--gbt-glass-blur);backdrop-filter:var(--gbt-glass-blur);box-shadow:var(--gbt-glass-rim-light),0 0 transparent;--text-discret: var(--gbt-ground-text-discret);--border-color: var(--gbt-ground-border);--color-success-text: var(--color-success-bg-text);--color-warning-text: var(--color-warning-bg-text);--color-error-text: var(--color-error-bg-text)}@media(prefers-reduced-transparency:reduce){.gbt-job-graph__node{background:linear-gradient(var(--gbt-glass-thick),var(--gbt-glass-thick)),var(--bg-principal);-webkit-backdrop-filter:none;backdrop-filter:none}}@media(prefers-contrast:more){.gbt-job-graph__node{box-shadow:inset 0 0 0 1px var(--border-color),0 0 transparent}}.gbt-job-graph__node{color:var(--text-primary);font:inherit;text-align:left;cursor:pointer}.gbt-job-graph__node:hover{background:var(--gbt-glass-thick)}.gbt-job-graph__node:active{background:var(--bg-hover)}.gbt-job-graph__node:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}.gbt-job-graph__node[aria-current=true]{background:var(--gbt-glass-thick);box-shadow:inset 0 0 0 2px var(--primary),var(--gbt-glass-rim-light)}.gbt-job-graph__glyph{display:inline-flex;flex-shrink:0}.gbt-job-graph__name{flex:1;font-weight:600}.gbt-job-graph__duration{font-size:12px;color:var(--text-secondary)}.gbt-job-graph__links{position:absolute;inset:0;z-index:0;width:100%;height:100%;pointer-events:none;overflow:visible}.gbt-job-graph__links path{fill:none;stroke:var(--border-color);stroke-width:2}.gbt-job-graph__links path[data-done]{stroke:var(--color-success-base)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n"]
160
160
  }]
161
161
  }],
162
162
  ctorParameters: () => [],