@masmarino/gabarit 2.1.1 → 3.0.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 (240) hide show
  1. package/ACCESSIBILITY.md +4 -0
  2. package/README.md +29 -11
  3. package/accordion/package.json +4 -0
  4. package/alert/package.json +4 -0
  5. package/app-shell/package.json +4 -0
  6. package/auth/package.json +4 -0
  7. package/auth-activate/package.json +4 -0
  8. package/auth-login/package.json +4 -0
  9. package/auth-register/package.json +4 -0
  10. package/auth-reset-password/package.json +4 -0
  11. package/autocomplete/package.json +4 -0
  12. package/avatar/package.json +4 -0
  13. package/avatar-group/package.json +4 -0
  14. package/badge/package.json +4 -0
  15. package/bar-chart/package.json +4 -0
  16. package/breadcrumb/package.json +4 -0
  17. package/button/package.json +4 -0
  18. package/card/README.md +1 -0
  19. package/card/package.json +4 -0
  20. package/chart/package.json +4 -0
  21. package/checkbox/package.json +4 -0
  22. package/checkbox-group/package.json +4 -0
  23. package/command-palette/README.md +65 -0
  24. package/command-palette/package.json +4 -0
  25. package/confirm-danger-modal/package.json +4 -0
  26. package/copy-button/package.json +4 -0
  27. package/copy-field/package.json +4 -0
  28. package/date-picker/package.json +4 -0
  29. package/description-list/package.json +4 -0
  30. package/dimension-card/package.json +4 -0
  31. package/disclosure/package.json +4 -0
  32. package/divider/package.json +4 -0
  33. package/docs/package.json +4 -0
  34. package/drawer/package.json +4 -0
  35. package/empty-state/package.json +4 -0
  36. package/fesm2022/masmarino-gabarit-accordion.mjs +8 -8
  37. package/fesm2022/masmarino-gabarit-accordion.mjs.map +1 -1
  38. package/fesm2022/masmarino-gabarit-alert.mjs +5 -5
  39. package/fesm2022/masmarino-gabarit-alert.mjs.map +1 -1
  40. package/fesm2022/masmarino-gabarit-app-shell.mjs +10 -10
  41. package/fesm2022/masmarino-gabarit-app-shell.mjs.map +1 -1
  42. package/fesm2022/masmarino-gabarit-auth-activate.mjs +3 -3
  43. package/fesm2022/masmarino-gabarit-auth-login.mjs +3 -3
  44. package/fesm2022/masmarino-gabarit-auth-register.mjs +3 -3
  45. package/fesm2022/masmarino-gabarit-auth-reset-password.mjs +3 -3
  46. package/fesm2022/masmarino-gabarit-auth.mjs +12 -12
  47. package/fesm2022/masmarino-gabarit-autocomplete.mjs +5 -5
  48. package/fesm2022/masmarino-gabarit-autocomplete.mjs.map +1 -1
  49. package/fesm2022/masmarino-gabarit-avatar-group.mjs +5 -5
  50. package/fesm2022/masmarino-gabarit-avatar-group.mjs.map +1 -1
  51. package/fesm2022/masmarino-gabarit-avatar.mjs +3 -3
  52. package/fesm2022/masmarino-gabarit-badge.mjs +5 -5
  53. package/fesm2022/masmarino-gabarit-badge.mjs.map +1 -1
  54. package/fesm2022/masmarino-gabarit-bar-chart.mjs +6 -6
  55. package/fesm2022/masmarino-gabarit-breadcrumb.mjs +3 -3
  56. package/fesm2022/masmarino-gabarit-button.mjs +5 -5
  57. package/fesm2022/masmarino-gabarit-button.mjs.map +1 -1
  58. package/fesm2022/masmarino-gabarit-card.mjs +32 -13
  59. package/fesm2022/masmarino-gabarit-card.mjs.map +1 -1
  60. package/fesm2022/masmarino-gabarit-chart.mjs +23 -23
  61. package/fesm2022/masmarino-gabarit-chart.mjs.map +1 -1
  62. package/fesm2022/masmarino-gabarit-checkbox-group.mjs +3 -3
  63. package/fesm2022/masmarino-gabarit-checkbox.mjs +5 -5
  64. package/fesm2022/masmarino-gabarit-checkbox.mjs.map +1 -1
  65. package/fesm2022/masmarino-gabarit-command-palette.mjs +649 -0
  66. package/fesm2022/masmarino-gabarit-command-palette.mjs.map +1 -0
  67. package/fesm2022/masmarino-gabarit-confirm-danger-modal.mjs +3 -3
  68. package/fesm2022/masmarino-gabarit-copy-button.mjs +3 -3
  69. package/fesm2022/masmarino-gabarit-copy-field.mjs +3 -3
  70. package/fesm2022/masmarino-gabarit-date-picker.mjs +10 -10
  71. package/fesm2022/masmarino-gabarit-date-picker.mjs.map +1 -1
  72. package/fesm2022/masmarino-gabarit-description-list.mjs +3 -3
  73. package/fesm2022/masmarino-gabarit-dimension-card.mjs +3 -3
  74. package/fesm2022/masmarino-gabarit-disclosure.mjs +5 -5
  75. package/fesm2022/masmarino-gabarit-disclosure.mjs.map +1 -1
  76. package/fesm2022/masmarino-gabarit-divider.mjs +3 -3
  77. package/fesm2022/masmarino-gabarit-docs.mjs +26 -25
  78. package/fesm2022/masmarino-gabarit-docs.mjs.map +1 -1
  79. package/fesm2022/masmarino-gabarit-drawer.mjs +5 -5
  80. package/fesm2022/masmarino-gabarit-drawer.mjs.map +1 -1
  81. package/fesm2022/masmarino-gabarit-empty-state.mjs +3 -3
  82. package/fesm2022/masmarino-gabarit-file-upload.mjs +5 -5
  83. package/fesm2022/masmarino-gabarit-file-upload.mjs.map +1 -1
  84. package/fesm2022/masmarino-gabarit-format.mjs +9 -9
  85. package/fesm2022/masmarino-gabarit-funnel-chart.mjs +3 -3
  86. package/fesm2022/masmarino-gabarit-gauge-bar.mjs +5 -5
  87. package/fesm2022/masmarino-gabarit-gauge-bar.mjs.map +1 -1
  88. package/fesm2022/masmarino-gabarit-git-field.mjs +5 -5
  89. package/fesm2022/masmarino-gabarit-git-field.mjs.map +1 -1
  90. package/fesm2022/masmarino-gabarit-icon-marker.mjs +5 -5
  91. package/fesm2022/masmarino-gabarit-icon-marker.mjs.map +1 -1
  92. package/fesm2022/masmarino-gabarit-icon.mjs +6 -6
  93. package/fesm2022/masmarino-gabarit-input.mjs +5 -5
  94. package/fesm2022/masmarino-gabarit-input.mjs.map +1 -1
  95. package/fesm2022/masmarino-gabarit-job-graph.mjs +5 -5
  96. package/fesm2022/masmarino-gabarit-job-graph.mjs.map +1 -1
  97. package/fesm2022/masmarino-gabarit-job-status.mjs +3 -3
  98. package/fesm2022/masmarino-gabarit-line-chart.mjs +6 -6
  99. package/fesm2022/masmarino-gabarit-list-card.mjs +5 -5
  100. package/fesm2022/masmarino-gabarit-list-card.mjs.map +1 -1
  101. package/fesm2022/masmarino-gabarit-list-row.mjs +5 -5
  102. package/fesm2022/masmarino-gabarit-list-row.mjs.map +1 -1
  103. package/fesm2022/masmarino-gabarit-list-toolbar.mjs +5 -5
  104. package/fesm2022/masmarino-gabarit-list-toolbar.mjs.map +1 -1
  105. package/fesm2022/masmarino-gabarit-menu.mjs +13 -13
  106. package/fesm2022/masmarino-gabarit-menu.mjs.map +1 -1
  107. package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs +12 -11
  108. package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs.map +1 -1
  109. package/fesm2022/masmarino-gabarit-mfa-settings.mjs +4 -3
  110. package/fesm2022/masmarino-gabarit-mfa-settings.mjs.map +1 -1
  111. package/fesm2022/masmarino-gabarit-modal.mjs +5 -5
  112. package/fesm2022/masmarino-gabarit-modal.mjs.map +1 -1
  113. package/fesm2022/masmarino-gabarit-nav-tabs.mjs +8 -8
  114. package/fesm2022/masmarino-gabarit-nav-tabs.mjs.map +1 -1
  115. package/fesm2022/masmarino-gabarit-notification-dot.mjs +3 -3
  116. package/fesm2022/masmarino-gabarit-page-header.mjs +3 -3
  117. package/fesm2022/masmarino-gabarit-page-layout.mjs +3 -3
  118. package/fesm2022/masmarino-gabarit-pagination.mjs +5 -5
  119. package/fesm2022/masmarino-gabarit-pagination.mjs.map +1 -1
  120. package/fesm2022/masmarino-gabarit-panel.mjs +3 -3
  121. package/fesm2022/masmarino-gabarit-passkey-settings.mjs +4 -3
  122. package/fesm2022/masmarino-gabarit-passkey-settings.mjs.map +1 -1
  123. package/fesm2022/masmarino-gabarit-pie-chart.mjs +5 -5
  124. package/fesm2022/masmarino-gabarit-pie-chart.mjs.map +1 -1
  125. package/fesm2022/masmarino-gabarit-popover.mjs +3 -3
  126. package/fesm2022/masmarino-gabarit-radio-group.mjs +5 -5
  127. package/fesm2022/masmarino-gabarit-radio-group.mjs.map +1 -1
  128. package/fesm2022/masmarino-gabarit-save-status.mjs +3 -3
  129. package/fesm2022/masmarino-gabarit-search-bar.mjs +5 -5
  130. package/fesm2022/masmarino-gabarit-search-bar.mjs.map +1 -1
  131. package/fesm2022/masmarino-gabarit-secret-reveal.mjs +3 -3
  132. package/fesm2022/masmarino-gabarit-segmented-control.mjs +5 -5
  133. package/fesm2022/masmarino-gabarit-segmented-control.mjs.map +1 -1
  134. package/fesm2022/masmarino-gabarit-select.mjs +5 -5
  135. package/fesm2022/masmarino-gabarit-select.mjs.map +1 -1
  136. package/fesm2022/masmarino-gabarit-skeleton-list.mjs +3 -3
  137. package/fesm2022/masmarino-gabarit-skeleton.mjs +3 -3
  138. package/fesm2022/masmarino-gabarit-slider.mjs +5 -5
  139. package/fesm2022/masmarino-gabarit-slider.mjs.map +1 -1
  140. package/fesm2022/masmarino-gabarit-sparkline.mjs +3 -3
  141. package/fesm2022/masmarino-gabarit-spinner.mjs +3 -3
  142. package/fesm2022/masmarino-gabarit-stat-grid.mjs +5 -5
  143. package/fesm2022/masmarino-gabarit-stat-grid.mjs.map +1 -1
  144. package/fesm2022/masmarino-gabarit-stat-tile.mjs +10 -10
  145. package/fesm2022/masmarino-gabarit-stat-tile.mjs.map +1 -1
  146. package/fesm2022/masmarino-gabarit-stepper.mjs +5 -5
  147. package/fesm2022/masmarino-gabarit-stepper.mjs.map +1 -1
  148. package/fesm2022/masmarino-gabarit-switch.mjs +5 -5
  149. package/fesm2022/masmarino-gabarit-switch.mjs.map +1 -1
  150. package/fesm2022/masmarino-gabarit-table.mjs +5 -5
  151. package/fesm2022/masmarino-gabarit-table.mjs.map +1 -1
  152. package/fesm2022/masmarino-gabarit-tabs.mjs +8 -8
  153. package/fesm2022/masmarino-gabarit-tabs.mjs.map +1 -1
  154. package/fesm2022/masmarino-gabarit-tag-input.mjs +5 -5
  155. package/fesm2022/masmarino-gabarit-tag-input.mjs.map +1 -1
  156. package/fesm2022/masmarino-gabarit-tag.mjs +5 -5
  157. package/fesm2022/masmarino-gabarit-tag.mjs.map +1 -1
  158. package/fesm2022/masmarino-gabarit-textarea.mjs +5 -5
  159. package/fesm2022/masmarino-gabarit-textarea.mjs.map +1 -1
  160. package/fesm2022/masmarino-gabarit-timeline-chart.mjs +6 -6
  161. package/fesm2022/masmarino-gabarit-toaster.mjs +8 -8
  162. package/fesm2022/masmarino-gabarit-toaster.mjs.map +1 -1
  163. package/fesm2022/masmarino-gabarit-tooltip.mjs +5 -5
  164. package/fesm2022/masmarino-gabarit-tooltip.mjs.map +1 -1
  165. package/fesm2022/masmarino-gabarit-tree.mjs +5 -5
  166. package/fesm2022/masmarino-gabarit-tree.mjs.map +1 -1
  167. package/fesm2022/masmarino-gabarit-user-chip.mjs +3 -3
  168. package/fesm2022/masmarino-gabarit.mjs +3 -2
  169. package/fesm2022/masmarino-gabarit.mjs.map +1 -1
  170. package/file-upload/package.json +4 -0
  171. package/floating-panel/package.json +4 -0
  172. package/format/package.json +4 -0
  173. package/funnel-chart/package.json +4 -0
  174. package/gauge-bar/package.json +4 -0
  175. package/git-field/package.json +4 -0
  176. package/icon/package.json +4 -0
  177. package/icon-marker/package.json +4 -0
  178. package/input/package.json +4 -0
  179. package/job-graph/package.json +4 -0
  180. package/job-status/package.json +4 -0
  181. package/line-chart/package.json +4 -0
  182. package/list-card/package.json +4 -0
  183. package/list-row/package.json +4 -0
  184. package/list-toolbar/package.json +4 -0
  185. package/menu/package.json +4 -0
  186. package/mfa-enrollment/package.json +4 -0
  187. package/mfa-settings/package.json +4 -0
  188. package/modal/package.json +4 -0
  189. package/nav-tabs/package.json +4 -0
  190. package/notification-dot/package.json +4 -0
  191. package/package.json +6 -2
  192. package/page-header/package.json +4 -0
  193. package/page-layout/package.json +4 -0
  194. package/pagination/package.json +4 -0
  195. package/panel/package.json +4 -0
  196. package/passkey-settings/package.json +4 -0
  197. package/pie-chart/package.json +4 -0
  198. package/popover/package.json +4 -0
  199. package/radio-group/package.json +4 -0
  200. package/save-status/package.json +4 -0
  201. package/search-bar/package.json +4 -0
  202. package/secret-reveal/package.json +4 -0
  203. package/segmented-control/package.json +4 -0
  204. package/select/package.json +4 -0
  205. package/skeleton/package.json +4 -0
  206. package/skeleton-list/package.json +4 -0
  207. package/slider/package.json +4 -0
  208. package/sparkline/package.json +4 -0
  209. package/spinner/package.json +4 -0
  210. package/src/lib/tokens/_base.scss +4 -0
  211. package/src/lib/tokens/_depth.scss +53 -0
  212. package/src/lib/tokens/_palette.scss +5 -1
  213. package/src/lib/tokens/_semantic.scss +9 -3
  214. package/src/lib/tokens/_themes.scss +79 -4
  215. package/src/lib/tokens/_utilities.scss +25 -2
  216. package/src/lib/tokens/index.scss +1 -0
  217. package/stat-grid/package.json +4 -0
  218. package/stat-tile/package.json +4 -0
  219. package/stepper/package.json +4 -0
  220. package/switch/package.json +4 -0
  221. package/table/package.json +4 -0
  222. package/tabs/package.json +4 -0
  223. package/tag/package.json +4 -0
  224. package/tag-input/package.json +4 -0
  225. package/textarea/package.json +4 -0
  226. package/timeline-chart/package.json +4 -0
  227. package/toaster/package.json +4 -0
  228. package/tooltip/package.json +4 -0
  229. package/tree/package.json +4 -0
  230. package/types/masmarino-gabarit-avatar.d.ts +1 -1
  231. package/types/masmarino-gabarit-card.d.ts +7 -0
  232. package/types/masmarino-gabarit-chart.d.ts +0 -27
  233. package/types/masmarino-gabarit-command-palette.d.ts +218 -0
  234. package/types/masmarino-gabarit-date-picker.d.ts +0 -59
  235. package/types/masmarino-gabarit-line-chart.d.ts +0 -1
  236. package/types/masmarino-gabarit-nav-tabs.d.ts +0 -5
  237. package/types/masmarino-gabarit-pagination.d.ts +0 -1
  238. package/types/masmarino-gabarit-tree.d.ts +0 -1
  239. package/types/masmarino-gabarit.d.ts +3 -2
  240. package/user-chip/package.json +4 -0
@@ -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.0",
86
+ version: "22.2.4",
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.0",
94
+ version: "22.2.4",
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 .75rem;font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);transition:border-color var(--site-transition-fast)}.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;color:var(--text-discret);cursor:pointer}.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)}\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"],
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.0",
281
+ version: "22.2.4",
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 .75rem;font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);transition:border-color var(--site-transition-fast)}.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;color:var(--text-discret);cursor:pointer}.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)}\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"]
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,CAA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,WAEpC,CACT;IACE,SAAS;IACT,aAAa,iBAAgB,QAAS;IACtC,OAAO;GACR,CACF;GAAA,UAAA;GAAA,QAAA,CAAA,gnEAAA;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;AA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AA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAQ,YAAA,CAAA;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,0nFAAA;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.0",
77
+ version: "22.2.4",
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.0",
85
+ version: "22.2.4",
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;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--gbt-radius-tile, 4px);color:var(--text-primary);font:inherit;text-align:left;cursor:pointer}.gbt-job-graph__node:hover{border-color:var(--primary)}.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]{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 30%,transparent)}.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;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--gbt-radius-tile, var(--site-border-radius));color:var(--text-primary);font:inherit;text-align:left;cursor:pointer}.gbt-job-graph__node:hover{border-color:var(--primary)}.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]{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 30%,transparent)}.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.0",
148
+ version: "22.2.4",
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;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--gbt-radius-tile, 4px);color:var(--text-primary);font:inherit;text-align:left;cursor:pointer}.gbt-job-graph__node:hover{border-color:var(--primary)}.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]{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 30%,transparent)}.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;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--gbt-radius-tile, var(--site-border-radius));color:var(--text-primary);font:inherit;text-align:left;cursor:pointer}.gbt-job-graph__node:hover{border-color:var(--primary)}.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]{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 30%,transparent)}.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: () => [],
@@ -1 +1 @@
1
- {"version":3,"file":"masmarino-gabarit-job-graph.mjs","names":[],"sources":["../../../projects/gabarit/job-graph/job-graph-layout.ts","../../../projects/gabarit/job-graph/job-graph.ts","../../../projects/gabarit/job-graph/job-graph.html"],"sourcesContent":["import type { JobGraphStage } from './job-graph.types'\n\nexport interface GraphEdge {\n from: string\n to: string\n}\n\nexport interface Box {\n left: number\n top: number\n width: number\n height: number\n}\n\nexport function graphEdges(stages: JobGraphStage[]): GraphEdge[] {\n const names = new Set(stages.flatMap((stage) => stage.jobs.map((job) => job.name)))\n return stages.flatMap((stage) =>\n stage.jobs.flatMap((job) =>\n job.needs.filter((need) => names.has(need)).map((need) => ({ from: need, to: job.name })),\n ),\n )\n}\n\nconst round = (value: number): number => Math.round(value * 10) / 10\n\nexport function linkPath(from: Box, to: Box): string {\n const x1 = from.left + from.width\n const y1 = from.top + from.height / 2\n const x2 = to.left\n const y2 = to.top + to.height / 2\n const dx = Math.max(24, (x2 - x1) / 2)\n return `M ${round(x1)} ${round(y1)} C ${round(x1 + dx)} ${round(y1)}, ${round(x2 - dx)} ${round(y2)}, ${round(x2)} ${round(y2)}`\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n afterNextRender,\n afterRenderEffect,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core'\nimport { JobStatus } from '@masmarino/gabarit/job-status'\nimport { graphEdges, linkPath } from './job-graph-layout'\nimport type { JobGraphStage, JobGraphStatus } from './job-graph.types'\n\nexport type { JobGraphJob, JobGraphStage, JobGraphStatus } from './job-graph.types'\n\ninterface GraphLink {\n key: string\n d: string\n done: boolean\n}\n\nconst DEFAULT_STATUS_LABELS: Record<JobGraphStatus, string> = {\n pending: 'Pending',\n running: 'Running',\n success: 'Succeeded',\n failed: 'Failed',\n canceled: 'Canceled',\n}\n\n@Component({\n selector: 'gbt-job-graph',\n standalone: true,\n imports: [JobStatus],\n templateUrl: './job-graph.html',\n styleUrl: './job-graph.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class JobGraph {\n stages = input.required<JobGraphStage[]>()\n selectedJobId = input<string | null>(null)\n statusLabels = input<Record<JobGraphStatus, string>>(DEFAULT_STATUS_LABELS)\n needsLabel = input<string>('Needs')\n ariaLabel = input<string>('Pipeline jobs')\n jobSelected = output<string>()\n\n protected readonly links = signal<GraphLink[]>([])\n\n private readonly graph = viewChild<ElementRef<HTMLElement>>('graph')\n private readonly destroyRef = inject(DestroyRef)\n\n constructor() {\n afterRenderEffect(() => {\n this.stages()\n this.measure()\n })\n afterNextRender(() => {\n const root = this.graph()?.nativeElement\n if (!root || typeof ResizeObserver === 'undefined') {\n return\n }\n const observer = new ResizeObserver(() => this.measure())\n observer.observe(root)\n this.destroyRef.onDestroy(() => observer.disconnect())\n })\n }\n\n private measure(): void {\n const root = this.graph()?.nativeElement\n if (!root) {\n return\n }\n const origin = root.getBoundingClientRect()\n const boxes = new Map<string, { left: number; top: number; width: number; height: number }>()\n root.querySelectorAll<HTMLElement>('[data-job-name]').forEach((node) => {\n const rect = node.getBoundingClientRect()\n boxes.set(node.dataset['jobName'] ?? '', {\n left: rect.left - origin.left + root.scrollLeft,\n top: rect.top - origin.top + root.scrollTop,\n width: rect.width,\n height: rect.height,\n })\n })\n const statuses = new Map(\n this.stages().flatMap((s) => s.jobs.map((j) => [j.name, j.status] as const)),\n )\n this.links.set(\n graphEdges(this.stages()).flatMap((edge) => {\n const from = boxes.get(edge.from)\n const to = boxes.get(edge.to)\n return from && to\n ? [\n {\n key: `${edge.from}->${edge.to}`,\n d: linkPath(from, to),\n done: statuses.get(edge.from) === 'success',\n },\n ]\n : []\n }),\n )\n }\n}\n","<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"],"mappings":";;;AAcA,SAAgB,WAAW,QAAuB;CAChD,MAAM,QAAQ,IAAI,IAAI,OAAO,SAAS,UAAU,MAAM,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,CAAC;CAClF,OAAO,OAAO,SAAS,UACrB,M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A;CAAQ,YAAA,CAAA;EARpB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAe,YACb;GAAI,SACP,CAAC,SAAS;GAAC,iBAGH,wBAAwB;GAAM,UAAA;GAAA,QAAA,CAAA,uiDAAA;EAAA,CAAA;CAYa,CAAA;CAAA,sBAAA,CAAA;CAAA,gBAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,eAAA,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,YAAA,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,aAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"masmarino-gabarit-job-graph.mjs","names":[],"sources":["../../../projects/gabarit/job-graph/job-graph-layout.ts","../../../projects/gabarit/job-graph/job-graph.ts","../../../projects/gabarit/job-graph/job-graph.html"],"sourcesContent":["import type { JobGraphStage } from './job-graph.types'\n\nexport interface GraphEdge {\n from: string\n to: string\n}\n\nexport interface Box {\n left: number\n top: number\n width: number\n height: number\n}\n\nexport function graphEdges(stages: JobGraphStage[]): GraphEdge[] {\n const names = new Set(stages.flatMap((stage) => stage.jobs.map((job) => job.name)))\n return stages.flatMap((stage) =>\n stage.jobs.flatMap((job) =>\n job.needs.filter((need) => names.has(need)).map((need) => ({ from: need, to: job.name })),\n ),\n )\n}\n\nconst round = (value: number): number => Math.round(value * 10) / 10\n\nexport function linkPath(from: Box, to: Box): string {\n const x1 = from.left + from.width\n const y1 = from.top + from.height / 2\n const x2 = to.left\n const y2 = to.top + to.height / 2\n const dx = Math.max(24, (x2 - x1) / 2)\n return `M ${round(x1)} ${round(y1)} C ${round(x1 + dx)} ${round(y1)}, ${round(x2 - dx)} ${round(y2)}, ${round(x2)} ${round(y2)}`\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n afterNextRender,\n afterRenderEffect,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core'\nimport { JobStatus } from '@masmarino/gabarit/job-status'\nimport { graphEdges, linkPath } from './job-graph-layout'\nimport type { JobGraphStage, JobGraphStatus } from './job-graph.types'\n\nexport type { JobGraphJob, JobGraphStage, JobGraphStatus } from './job-graph.types'\n\ninterface GraphLink {\n key: string\n d: string\n done: boolean\n}\n\nconst DEFAULT_STATUS_LABELS: Record<JobGraphStatus, string> = {\n pending: 'Pending',\n running: 'Running',\n success: 'Succeeded',\n failed: 'Failed',\n canceled: 'Canceled',\n}\n\n@Component({\n selector: 'gbt-job-graph',\n standalone: true,\n imports: [JobStatus],\n templateUrl: './job-graph.html',\n styleUrl: './job-graph.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class JobGraph {\n stages = input.required<JobGraphStage[]>()\n selectedJobId = input<string | null>(null)\n statusLabels = input<Record<JobGraphStatus, string>>(DEFAULT_STATUS_LABELS)\n needsLabel = input<string>('Needs')\n ariaLabel = input<string>('Pipeline jobs')\n jobSelected = output<string>()\n\n protected readonly links = signal<GraphLink[]>([])\n\n private readonly graph = viewChild<ElementRef<HTMLElement>>('graph')\n private readonly destroyRef = inject(DestroyRef)\n\n constructor() {\n afterRenderEffect(() => {\n this.stages()\n this.measure()\n })\n afterNextRender(() => {\n const root = this.graph()?.nativeElement\n if (!root || typeof ResizeObserver === 'undefined') {\n return\n }\n const observer = new ResizeObserver(() => this.measure())\n observer.observe(root)\n this.destroyRef.onDestroy(() => observer.disconnect())\n })\n }\n\n private measure(): void {\n const root = this.graph()?.nativeElement\n if (!root) {\n return\n }\n const origin = root.getBoundingClientRect()\n const boxes = new Map<string, { left: number; top: number; width: number; height: number }>()\n root.querySelectorAll<HTMLElement>('[data-job-name]').forEach((node) => {\n const rect = node.getBoundingClientRect()\n boxes.set(node.dataset['jobName'] ?? '', {\n left: rect.left - origin.left + root.scrollLeft,\n top: rect.top - origin.top + root.scrollTop,\n width: rect.width,\n height: rect.height,\n })\n })\n const statuses = new Map(\n this.stages().flatMap((s) => s.jobs.map((j) => [j.name, j.status] as const)),\n )\n this.links.set(\n graphEdges(this.stages()).flatMap((edge) => {\n const from = boxes.get(edge.from)\n const to = boxes.get(edge.to)\n return from && to\n ? [\n {\n key: `${edge.from}->${edge.to}`,\n d: linkPath(from, to),\n done: statuses.get(edge.from) === 'success',\n },\n ]\n : []\n }),\n )\n }\n}\n","<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"],"mappings":";;;AAcA,SAAgB,WAAW,QAAuB;CAChD,MAAM,QAAQ,IAAI,IAAI,OAAO,SAAS,UAAU,MAAM,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,CAAC;CAClF,OAAO,OAAO,SAAS,UACrB,MAAM,KAAK,SAAS,QAClB,IAAI,MAAM,QAAQ,SAAS,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,UAAU;EAAE,MAAM;EAAM,IAAI,IAAI;CAAI,EAAG,CAAC,CAC1F;AAEL;AAEA,MAAM,SAAS,UAA0B,KAAK,MAAM,QAAQ,EAAE,IAAI;AAElE,SAAgB,SAAS,MAAW,IAAO;CACzC,MAAM,KAAK,KAAK,OAAO,KAAK;CAC5B,MAAM,KAAK,KAAK,MAAM,KAAK,SAAS;CACpC,MAAM,KAAK,GAAG;CACd,MAAM,KAAK,GAAG,MAAM,GAAG,SAAS;CAChC,MAAM,KAAK,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC;CACrC,OAAO,KAAK,MAAM,EAAE,EAAC,GAAI,MAAM,EAAE,EAAC,KAAM,MAAM,KAAK,EAAE,EAAC,GAAI,MAAM,EAAE,EAAC,IAAK,MAAM,KAAK,EAAE,EAAC,GAAI,MAAM,EAAE,EAAC,IAAK,MAAM,EAAE,EAAC,GAAI,MAAM,EAAE;AAC/H;ACPA,MAAM,wBAAwD;CA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;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,aAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -7,7 +7,7 @@ var JobStatus = class JobStatus {
7
7
  label = input(null, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
8
8
  static ɵfac = i0.ɵɵngDeclareFactory({
9
9
  minVersion: "12.0.0",
10
- version: "22.2.0",
10
+ version: "22.2.4",
11
11
  ngImport: i0,
12
12
  type: JobStatus,
13
13
  deps: [],
@@ -15,7 +15,7 @@ var JobStatus = class JobStatus {
15
15
  });
16
16
  static ɵcmp = i0.ɵɵngDeclareComponent({
17
17
  minVersion: "17.0.0",
18
- version: "22.2.0",
18
+ version: "22.2.4",
19
19
  type: JobStatus,
20
20
  isStandalone: true,
21
21
  selector: "gbt-job-status",
@@ -62,7 +62,7 @@ var JobStatus = class JobStatus {
62
62
  };
63
63
  i0.ɵɵngDeclareClassMetadata({
64
64
  minVersion: "12.0.0",
65
- version: "22.2.0",
65
+ version: "22.2.4",
66
66
  ngImport: i0,
67
67
  type: JobStatus,
68
68
  decorators: [{
@@ -56,7 +56,7 @@ var LineSeries = class LineSeries {
56
56
  }, ...ngDevMode ? [{ debugName: "activeDots" }] : /* istanbul ignore next */ []);
57
57
  static ɵfac = i0.ɵɵngDeclareFactory({
58
58
  minVersion: "12.0.0",
59
- version: "22.2.0",
59
+ version: "22.2.4",
60
60
  ngImport: i0,
61
61
  type: LineSeries,
62
62
  deps: [],
@@ -64,7 +64,7 @@ var LineSeries = class LineSeries {
64
64
  });
65
65
  static ɵcmp = i0.ɵɵngDeclareComponent({
66
66
  minVersion: "17.0.0",
67
- version: "22.2.0",
67
+ version: "22.2.4",
68
68
  type: LineSeries,
69
69
  isStandalone: true,
70
70
  selector: "g[gbtLineSeries]",
@@ -93,7 +93,7 @@ var LineSeries = class LineSeries {
93
93
  };
94
94
  i0.ɵɵngDeclareClassMetadata({
95
95
  minVersion: "12.0.0",
96
- version: "22.2.0",
96
+ version: "22.2.4",
97
97
  ngImport: i0,
98
98
  type: LineSeries,
99
99
  decorators: [{
@@ -209,7 +209,7 @@ var LineChart = class LineChart {
209
209
  }
210
210
  static ɵfac = i0.ɵɵngDeclareFactory({
211
211
  minVersion: "12.0.0",
212
- version: "22.2.0",
212
+ version: "22.2.4",
213
213
  ngImport: i0,
214
214
  type: LineChart,
215
215
  deps: [],
@@ -217,7 +217,7 @@ var LineChart = class LineChart {
217
217
  });
218
218
  static ɵcmp = i0.ɵɵngDeclareComponent({
219
219
  minVersion: "17.0.0",
220
- version: "22.2.0",
220
+ version: "22.2.4",
221
221
  type: LineChart,
222
222
  isStandalone: true,
223
223
  selector: "gbt-line-chart",
@@ -415,7 +415,7 @@ var LineChart = class LineChart {
415
415
  };
416
416
  i0.ɵɵngDeclareClassMetadata({
417
417
  minVersion: "12.0.0",
418
- version: "22.2.0",
418
+ version: "22.2.4",
419
419
  ngImport: i0,
420
420
  type: LineChart,
421
421
  decorators: [{
@@ -36,7 +36,7 @@ var ListCard = class ListCard {
36
36
  placeholders = computed(() => Array.from({ length: Math.max(0, Math.floor(this.skeletonRows())) }, (_, index) => SKELETON_WIDTHS[index % SKELETON_WIDTHS.length]), ...ngDevMode ? [{ debugName: "placeholders" }] : /* istanbul ignore next */ []);
37
37
  static ɵfac = i0.ɵɵngDeclareFactory({
38
38
  minVersion: "12.0.0",
39
- version: "22.2.0",
39
+ version: "22.2.4",
40
40
  ngImport: i0,
41
41
  type: ListCard,
42
42
  deps: [],
@@ -44,7 +44,7 @@ var ListCard = class ListCard {
44
44
  });
45
45
  static ɵcmp = i0.ɵɵngDeclareComponent({
46
46
  minVersion: "17.0.0",
47
- version: "22.2.0",
47
+ version: "22.2.4",
48
48
  type: ListCard,
49
49
  isStandalone: true,
50
50
  selector: "gbt-list-card",
@@ -137,7 +137,7 @@ var ListCard = class ListCard {
137
137
  outputs: { retry: "retry" },
138
138
  ngImport: i0,
139
139
  template: "<section class=\"gbt-list-card\" [attr.aria-label]=\"ariaLabel()\" [attr.data-state]=\"state()\">\n <span class=\"sr-only\" role=\"status\">{{ state() === 'loading' ? loadingLabel() : '' }}</span>\n @switch (header()) {\n @case ('skeleton') {\n <div class=\"gbt-list-card__header\" aria-hidden=\"true\">\n <gbt-skeleton variant=\"rect\" width=\"14rem\" height=\"var(--gbt-control-height-sm)\" />\n </div>\n }\n @case ('slot') {\n <div class=\"gbt-list-card__header\"><ng-content select=\"[list-card-header]\" /></div>\n }\n }\n <div class=\"gbt-list-card__box\">\n @switch (state()) {\n @case ('loading') {\n <div class=\"gbt-list-card__loading\" aria-busy=\"true\">\n <div aria-hidden=\"true\">\n @for (width of placeholders(); track $index) {\n <div class=\"gbt-list-card__skeleton-row\">\n <gbt-skeleton variant=\"circle\" width=\"1rem\" height=\"1rem\" />\n <div class=\"gbt-list-card__skeleton-lines\">\n <gbt-skeleton [width]=\"width\" height=\"0.875rem\" />\n <gbt-skeleton width=\"36%\" height=\"0.625rem\" />\n </div>\n </div>\n }\n </div>\n </div>\n }\n @case ('failed') {\n <div class=\"gbt-list-card__failed\" role=\"alert\">\n <gbt-empty-state\n size=\"compact\"\n tone=\"error\"\n icon=\"alert-triangle\"\n [heading]=\"failedHeading()\"\n [message]=\"failedMessage()\"\n >\n @if (retryLabel(); as label) {\n <gbt-button\n variant=\"secondary\"\n size=\"small\"\n [text]=\"label\"\n (clicked)=\"retry.emit()\"\n />\n }\n <ng-content select=\"[list-card-failed]\" />\n </gbt-empty-state>\n </div>\n }\n @case ('empty') {\n <gbt-empty-state\n [size]=\"emptyIllustration() ? 'default' : 'compact'\"\n [illustration]=\"emptyIllustration()\"\n [icon]=\"emptyIcon()\"\n [heading]=\"emptyHeading()\"\n [message]=\"emptyMessage()\"\n >\n <ng-content select=\"[list-card-empty]\" />\n </gbt-empty-state>\n }\n @default {\n <div class=\"gbt-list-card__body\"><ng-content /></div>\n }\n }\n </div>\n</section>\n",
140
- styles: [":host{display:block;min-width:0}.gbt-list-card{position:relative;container:gbt-list-card/inline-size;display:grid;grid-template-areas:\"gbt-list-card-header\" \"gbt-list-card-box\";grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr;min-width:0}.gbt-list-card__header{grid-area:gbt-list-card-header;display:flex;align-items:center;gap:.75rem;min-height:var(--gbt-control-height-md);margin-bottom:.5rem}.gbt-list-card__header:empty{display:none}@container gbt-list-card (max-width: 559px){.gbt-list-card__header{gap:.5rem}}.gbt-list-card__box{grid-area:gbt-list-card-box;position:relative;min-width:0;overflow:hidden;border:1px solid var(--gbt-card-border);border-radius:var(--site-border-radius);background:var(--bg-principal)}.gbt-list-card__body ::ng-deep>ul,.gbt-list-card__body ::ng-deep>ol{margin:0;padding:0;list-style:none}.gbt-list-card__body ::ng-deep>[list-card-message]{margin:0;padding:2rem 1rem;color:var(--text-secondary);font-size:.875rem;text-align:center}.gbt-list-card__skeleton-row{display:flex;align-items:flex-start;gap:.75rem;padding:.875rem 1rem}.gbt-list-card__skeleton-row+.gbt-list-card__skeleton-row{border-top:1px solid var(--gbt-hairline)}.gbt-list-card__skeleton-row>gbt-skeleton{flex:none;margin-top:.125rem}.gbt-list-card__skeleton-lines{display:flex;flex:1;flex-direction:column;gap:.5rem;min-width:0}@media(pointer:coarse){.gbt-list-card ::ng-deep .gbt-empty-state__action .gbt-button{min-height:44px}}\n"],
140
+ styles: [":host{display:block;min-width:0}.gbt-list-card{position:relative;container:gbt-list-card/inline-size;display:grid;grid-template-areas:\"gbt-list-card-header\" \"gbt-list-card-box\";grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr;min-width:0}.gbt-list-card__header{grid-area:gbt-list-card-header;display:flex;align-items:center;gap:.75rem;min-height:var(--gbt-control-height-md);margin-bottom:.5rem}.gbt-list-card__header:empty{display:none}@container gbt-list-card (max-width: 559px){.gbt-list-card__header{gap:.5rem}}.gbt-list-card__box{grid-area:gbt-list-card-box;position:relative;min-width:0;overflow:hidden;border:1px solid var(--gbt-card-border);border-radius:var(--site-border-radius-lg);box-shadow:var(--site-shadow-sm);background:var(--bg-principal)}.gbt-list-card__body ::ng-deep>ul,.gbt-list-card__body ::ng-deep>ol{margin:0;padding:0;list-style:none}.gbt-list-card__body ::ng-deep>[list-card-message]{margin:0;padding:2rem 1rem;color:var(--text-secondary);font-size:.875rem;text-align:center}.gbt-list-card__skeleton-row{display:flex;align-items:flex-start;gap:.75rem;padding:.875rem 1rem}.gbt-list-card__skeleton-row+.gbt-list-card__skeleton-row{border-top:1px solid var(--gbt-hairline)}.gbt-list-card__skeleton-row>gbt-skeleton{flex:none;margin-top:.125rem}.gbt-list-card__skeleton-lines{display:flex;flex:1;flex-direction:column;gap:.5rem;min-width:0}@media(pointer:coarse){.gbt-list-card ::ng-deep .gbt-empty-state__action .gbt-button{min-height:44px}}\n"],
141
141
  dependencies: [
142
142
  {
143
143
  kind: "component",
@@ -194,7 +194,7 @@ var ListCard = class ListCard {
194
194
  };
195
195
  i0.ɵɵngDeclareClassMetadata({
196
196
  minVersion: "12.0.0",
197
- version: "22.2.0",
197
+ version: "22.2.4",
198
198
  ngImport: i0,
199
199
  type: ListCard,
200
200
  decorators: [{
@@ -209,7 +209,7 @@ i0.ɵɵngDeclareClassMetadata({
209
209
  ],
210
210
  changeDetection: ChangeDetectionStrategy.OnPush,
211
211
  template: "<section class=\"gbt-list-card\" [attr.aria-label]=\"ariaLabel()\" [attr.data-state]=\"state()\">\n <span class=\"sr-only\" role=\"status\">{{ state() === 'loading' ? loadingLabel() : '' }}</span>\n @switch (header()) {\n @case ('skeleton') {\n <div class=\"gbt-list-card__header\" aria-hidden=\"true\">\n <gbt-skeleton variant=\"rect\" width=\"14rem\" height=\"var(--gbt-control-height-sm)\" />\n </div>\n }\n @case ('slot') {\n <div class=\"gbt-list-card__header\"><ng-content select=\"[list-card-header]\" /></div>\n }\n }\n <div class=\"gbt-list-card__box\">\n @switch (state()) {\n @case ('loading') {\n <div class=\"gbt-list-card__loading\" aria-busy=\"true\">\n <div aria-hidden=\"true\">\n @for (width of placeholders(); track $index) {\n <div class=\"gbt-list-card__skeleton-row\">\n <gbt-skeleton variant=\"circle\" width=\"1rem\" height=\"1rem\" />\n <div class=\"gbt-list-card__skeleton-lines\">\n <gbt-skeleton [width]=\"width\" height=\"0.875rem\" />\n <gbt-skeleton width=\"36%\" height=\"0.625rem\" />\n </div>\n </div>\n }\n </div>\n </div>\n }\n @case ('failed') {\n <div class=\"gbt-list-card__failed\" role=\"alert\">\n <gbt-empty-state\n size=\"compact\"\n tone=\"error\"\n icon=\"alert-triangle\"\n [heading]=\"failedHeading()\"\n [message]=\"failedMessage()\"\n >\n @if (retryLabel(); as label) {\n <gbt-button\n variant=\"secondary\"\n size=\"small\"\n [text]=\"label\"\n (clicked)=\"retry.emit()\"\n />\n }\n <ng-content select=\"[list-card-failed]\" />\n </gbt-empty-state>\n </div>\n }\n @case ('empty') {\n <gbt-empty-state\n [size]=\"emptyIllustration() ? 'default' : 'compact'\"\n [illustration]=\"emptyIllustration()\"\n [icon]=\"emptyIcon()\"\n [heading]=\"emptyHeading()\"\n [message]=\"emptyMessage()\"\n >\n <ng-content select=\"[list-card-empty]\" />\n </gbt-empty-state>\n }\n @default {\n <div class=\"gbt-list-card__body\"><ng-content /></div>\n }\n }\n </div>\n</section>\n",
212
- styles: [":host{display:block;min-width:0}.gbt-list-card{position:relative;container:gbt-list-card/inline-size;display:grid;grid-template-areas:\"gbt-list-card-header\" \"gbt-list-card-box\";grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr;min-width:0}.gbt-list-card__header{grid-area:gbt-list-card-header;display:flex;align-items:center;gap:.75rem;min-height:var(--gbt-control-height-md);margin-bottom:.5rem}.gbt-list-card__header:empty{display:none}@container gbt-list-card (max-width: 559px){.gbt-list-card__header{gap:.5rem}}.gbt-list-card__box{grid-area:gbt-list-card-box;position:relative;min-width:0;overflow:hidden;border:1px solid var(--gbt-card-border);border-radius:var(--site-border-radius);background:var(--bg-principal)}.gbt-list-card__body ::ng-deep>ul,.gbt-list-card__body ::ng-deep>ol{margin:0;padding:0;list-style:none}.gbt-list-card__body ::ng-deep>[list-card-message]{margin:0;padding:2rem 1rem;color:var(--text-secondary);font-size:.875rem;text-align:center}.gbt-list-card__skeleton-row{display:flex;align-items:flex-start;gap:.75rem;padding:.875rem 1rem}.gbt-list-card__skeleton-row+.gbt-list-card__skeleton-row{border-top:1px solid var(--gbt-hairline)}.gbt-list-card__skeleton-row>gbt-skeleton{flex:none;margin-top:.125rem}.gbt-list-card__skeleton-lines{display:flex;flex:1;flex-direction:column;gap:.5rem;min-width:0}@media(pointer:coarse){.gbt-list-card ::ng-deep .gbt-empty-state__action .gbt-button{min-height:44px}}\n"]
212
+ styles: [":host{display:block;min-width:0}.gbt-list-card{position:relative;container:gbt-list-card/inline-size;display:grid;grid-template-areas:\"gbt-list-card-header\" \"gbt-list-card-box\";grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr;min-width:0}.gbt-list-card__header{grid-area:gbt-list-card-header;display:flex;align-items:center;gap:.75rem;min-height:var(--gbt-control-height-md);margin-bottom:.5rem}.gbt-list-card__header:empty{display:none}@container gbt-list-card (max-width: 559px){.gbt-list-card__header{gap:.5rem}}.gbt-list-card__box{grid-area:gbt-list-card-box;position:relative;min-width:0;overflow:hidden;border:1px solid var(--gbt-card-border);border-radius:var(--site-border-radius-lg);box-shadow:var(--site-shadow-sm);background:var(--bg-principal)}.gbt-list-card__body ::ng-deep>ul,.gbt-list-card__body ::ng-deep>ol{margin:0;padding:0;list-style:none}.gbt-list-card__body ::ng-deep>[list-card-message]{margin:0;padding:2rem 1rem;color:var(--text-secondary);font-size:.875rem;text-align:center}.gbt-list-card__skeleton-row{display:flex;align-items:flex-start;gap:.75rem;padding:.875rem 1rem}.gbt-list-card__skeleton-row+.gbt-list-card__skeleton-row{border-top:1px solid var(--gbt-hairline)}.gbt-list-card__skeleton-row>gbt-skeleton{flex:none;margin-top:.125rem}.gbt-list-card__skeleton-lines{display:flex;flex:1;flex-direction:column;gap:.5rem;min-width:0}@media(pointer:coarse){.gbt-list-card ::ng-deep .gbt-empty-state__action .gbt-button{min-height:44px}}\n"]
213
213
  }]
214
214
  }],
215
215
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"masmarino-gabarit-list-card.mjs","names":[],"sources":["../../../projects/gabarit/list-card/list-card.ts","../../../projects/gabarit/list-card/list-card.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core'\nimport { Button } from '@masmarino/gabarit/button'\nimport { Skeleton } from '@masmarino/gabarit/skeleton'\nimport { EmptyState, EmptyStateIllustration } from '@masmarino/gabarit/empty-state'\n\nexport type ListCardState = 'loading' | 'failed' | 'empty' | 'ready'\n\nconst SKELETON_WIDTHS = ['62%', '48%', '70%', '55%', '66%', '44%']\n\n@Component({\n selector: 'gbt-list-card',\n standalone: true,\n imports: [Button, EmptyState, Skeleton],\n templateUrl: './list-card.html',\n styleUrl: './list-card.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ListCard {\n state = input<ListCardState>('ready')\n ariaLabel = input<string | null>(null)\n\n loadingLabel = input('Loading…')\n skeletonRows = input(4)\n skeletonHeader = input(true)\n\n failedHeading = input('The list could not be loaded')\n failedMessage = input('')\n retryLabel = input<string | null>('Retry')\n retry = output<void>()\n\n emptyHeading = input('Nothing here yet')\n emptyMessage = input('')\n emptyIllustration = input<EmptyStateIllustration | null>(null)\n emptyIcon = input<string | null>(null)\n\n /** The projected header when ready, its placeholder while loading (unless skeletonHeader is off), else nothing. */\n protected readonly header = computed<'slot' | 'skeleton' | null>(() => {\n switch (this.state()) {\n case 'loading':\n return this.skeletonHeader() ? 'skeleton' : null\n case 'failed':\n case 'empty':\n return null\n default:\n return 'slot'\n }\n })\n\n protected readonly placeholders = computed(() =>\n Array.from(\n { length: Math.max(0, Math.floor(this.skeletonRows())) },\n (_, index) => SKELETON_WIDTHS[index % SKELETON_WIDTHS.length],\n ),\n )\n}\n","<section class=\"gbt-list-card\" [attr.aria-label]=\"ariaLabel()\" [attr.data-state]=\"state()\">\n <span class=\"sr-only\" role=\"status\">{{ state() === 'loading' ? loadingLabel() : '' }}</span>\n @switch (header()) {\n @case ('skeleton') {\n <div class=\"gbt-list-card__header\" aria-hidden=\"true\">\n <gbt-skeleton variant=\"rect\" width=\"14rem\" height=\"var(--gbt-control-height-sm)\" />\n </div>\n }\n @case ('slot') {\n <div class=\"gbt-list-card__header\"><ng-content select=\"[list-card-header]\" /></div>\n }\n }\n <div class=\"gbt-list-card__box\">\n @switch (state()) {\n @case ('loading') {\n <div class=\"gbt-list-card__loading\" aria-busy=\"true\">\n <div aria-hidden=\"true\">\n @for (width of placeholders(); track $index) {\n <div class=\"gbt-list-card__skeleton-row\">\n <gbt-skeleton variant=\"circle\" width=\"1rem\" height=\"1rem\" />\n <div class=\"gbt-list-card__skeleton-lines\">\n <gbt-skeleton [width]=\"width\" height=\"0.875rem\" />\n <gbt-skeleton width=\"36%\" height=\"0.625rem\" />\n </div>\n </div>\n }\n </div>\n </div>\n }\n @case ('failed') {\n <div class=\"gbt-list-card__failed\" role=\"alert\">\n <gbt-empty-state\n size=\"compact\"\n tone=\"error\"\n icon=\"alert-triangle\"\n [heading]=\"failedHeading()\"\n [message]=\"failedMessage()\"\n >\n @if (retryLabel(); as label) {\n <gbt-button\n variant=\"secondary\"\n size=\"small\"\n [text]=\"label\"\n (clicked)=\"retry.emit()\"\n />\n }\n <ng-content select=\"[list-card-failed]\" />\n </gbt-empty-state>\n </div>\n }\n @case ('empty') {\n <gbt-empty-state\n [size]=\"emptyIllustration() ? 'default' : 'compact'\"\n [illustration]=\"emptyIllustration()\"\n [icon]=\"emptyIcon()\"\n [heading]=\"emptyHeading()\"\n [message]=\"emptyMessage()\"\n >\n <ng-content select=\"[list-card-empty]\" />\n </gbt-empty-state>\n }\n @default {\n <div class=\"gbt-list-card__body\"><ng-content /></div>\n }\n }\n </div>\n</section>\n"],"mappings":";;;;;AAOA,MAAM,kBAAkB;CAAC;CAAO;CAAO;CAAO;CAAO;CAAO;AAAK;AAUjE,IAAa,WAAb,MAAa,SAAQ;CACnB,QAAQ,MAAqB,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACrC,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAEtC,eAAe,MAAM,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,eAAe,MAAM,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,iBAAiB,MAAM,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,iBAAA,CAAA,+BAAA,CAAA,CAAA;CAE5B,gBAAgB,MAAM,gCAA+B,GAAA,YAAA,CAAA,EAAA,WAAA,gBAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,gBAAgB,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,gBAAA,CAAA,+BAAA,CAAA,CAAA;CACzB,aAAa,MAAqB,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAC1C,QAAQ,OAAM;CAEd,eAAe,MAAM,oBAAmB,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CACxC,eAAe,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CACxB,oBAAoB,MAAqC,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,oBAAA,CAAA,+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AY;GAAQ;GAAC,iBAGtB,wBAAwB;GAAM,UAAA;GAAA,QAAA,CAAA,46CAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"masmarino-gabarit-list-card.mjs","names":[],"sources":["../../../projects/gabarit/list-card/list-card.ts","../../../projects/gabarit/list-card/list-card.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core'\nimport { Button } from '@masmarino/gabarit/button'\nimport { Skeleton } from '@masmarino/gabarit/skeleton'\nimport { EmptyState, EmptyStateIllustration } from '@masmarino/gabarit/empty-state'\n\nexport type ListCardState = 'loading' | 'failed' | 'empty' | 'ready'\n\nconst SKELETON_WIDTHS = ['62%', '48%', '70%', '55%', '66%', '44%']\n\n@Component({\n selector: 'gbt-list-card',\n standalone: true,\n imports: [Button, EmptyState, Skeleton],\n templateUrl: './list-card.html',\n styleUrl: './list-card.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ListCard {\n state = input<ListCardState>('ready')\n ariaLabel = input<string | null>(null)\n\n loadingLabel = input('Loading…')\n skeletonRows = input(4)\n skeletonHeader = input(true)\n\n failedHeading = input('The list could not be loaded')\n failedMessage = input('')\n retryLabel = input<string | null>('Retry')\n retry = output<void>()\n\n emptyHeading = input('Nothing here yet')\n emptyMessage = input('')\n emptyIllustration = input<EmptyStateIllustration | null>(null)\n emptyIcon = input<string | null>(null)\n\n /** The projected header when ready, its placeholder while loading (unless skeletonHeader is off), else nothing. */\n protected readonly header = computed<'slot' | 'skeleton' | null>(() => {\n switch (this.state()) {\n case 'loading':\n return this.skeletonHeader() ? 'skeleton' : null\n case 'failed':\n case 'empty':\n return null\n default:\n return 'slot'\n }\n })\n\n protected readonly placeholders = computed(() =>\n Array.from(\n { length: Math.max(0, Math.floor(this.skeletonRows())) },\n (_, index) => SKELETON_WIDTHS[index % SKELETON_WIDTHS.length],\n ),\n )\n}\n","<section class=\"gbt-list-card\" [attr.aria-label]=\"ariaLabel()\" [attr.data-state]=\"state()\">\n <span class=\"sr-only\" role=\"status\">{{ state() === 'loading' ? loadingLabel() : '' }}</span>\n @switch (header()) {\n @case ('skeleton') {\n <div class=\"gbt-list-card__header\" aria-hidden=\"true\">\n <gbt-skeleton variant=\"rect\" width=\"14rem\" height=\"var(--gbt-control-height-sm)\" />\n </div>\n }\n @case ('slot') {\n <div class=\"gbt-list-card__header\"><ng-content select=\"[list-card-header]\" /></div>\n }\n }\n <div class=\"gbt-list-card__box\">\n @switch (state()) {\n @case ('loading') {\n <div class=\"gbt-list-card__loading\" aria-busy=\"true\">\n <div aria-hidden=\"true\">\n @for (width of placeholders(); track $index) {\n <div class=\"gbt-list-card__skeleton-row\">\n <gbt-skeleton variant=\"circle\" width=\"1rem\" height=\"1rem\" />\n <div class=\"gbt-list-card__skeleton-lines\">\n <gbt-skeleton [width]=\"width\" height=\"0.875rem\" />\n <gbt-skeleton width=\"36%\" height=\"0.625rem\" />\n </div>\n </div>\n }\n </div>\n </div>\n }\n @case ('failed') {\n <div class=\"gbt-list-card__failed\" role=\"alert\">\n <gbt-empty-state\n size=\"compact\"\n tone=\"error\"\n icon=\"alert-triangle\"\n [heading]=\"failedHeading()\"\n [message]=\"failedMessage()\"\n >\n @if (retryLabel(); as label) {\n <gbt-button\n variant=\"secondary\"\n size=\"small\"\n [text]=\"label\"\n (clicked)=\"retry.emit()\"\n />\n }\n <ng-content select=\"[list-card-failed]\" />\n </gbt-empty-state>\n </div>\n }\n @case ('empty') {\n <gbt-empty-state\n [size]=\"emptyIllustration() ? 'default' : 'compact'\"\n [illustration]=\"emptyIllustration()\"\n [icon]=\"emptyIcon()\"\n [heading]=\"emptyHeading()\"\n [message]=\"emptyMessage()\"\n >\n <ng-content select=\"[list-card-empty]\" />\n </gbt-empty-state>\n }\n @default {\n <div class=\"gbt-list-card__body\"><ng-content /></div>\n }\n }\n </div>\n</section>\n"],"mappings":";;;;;AAOA,MAAM,kBAAkB;CAAC;CAAO;CAAO;CAAO;CAAO;CAAO;AAAK;AAUjE,I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12.0.0",
7
- version: "22.2.0",
7
+ version: "22.2.4",
8
8
  ngImport: i0,
9
9
  type: ListRow,
10
10
  deps: [],
@@ -12,7 +12,7 @@ var ListRow = class ListRow {
12
12
  });
13
13
  static ɵcmp = i0.ɵɵngDeclareComponent({
14
14
  minVersion: "17.1.0",
15
- version: "22.2.0",
15
+ version: "22.2.4",
16
16
  type: ListRow,
17
17
  isStandalone: true,
18
18
  selector: "gbt-list-row",
@@ -25,13 +25,13 @@ var ListRow = class ListRow {
25
25
  } },
26
26
  ngImport: i0,
27
27
  template: "<div class=\"gbt-list-row\">\n <div class=\"gbt-list-row__leading\" [attr.data-tone]=\"tone()\">\n <ng-content select=\"[row-leading]\" />\n </div>\n <div class=\"gbt-list-row__main\">\n <div class=\"gbt-list-row__title\"><ng-content /></div>\n <div class=\"gbt-list-row__meta\"><ng-content select=\"[row-meta]\" /></div>\n </div>\n <div class=\"gbt-list-row__trailing\"><ng-content select=\"[row-trailing]\" /></div>\n</div>\n",
28
- styles: [":host{display:block}::ng-deep li+li>gbt-list-row,::ng-deep gbt-list-row+gbt-list-row{border-top:1px solid var(--gbt-hairline)}.gbt-list-row{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.25rem .75rem;padding:.75rem 1rem;transition:background-color var(--site-transition-fast)}.gbt-list-row:hover,.gbt-list-row:focus-within{background:var(--bg-hover)}.gbt-list-row__leading{display:flex;flex:none;align-items:center;justify-content:center;width:1.25rem;height:1.5rem;color:var(--text-secondary);font-size:.8rem}.gbt-list-row__leading[data-tone=success]{color:var(--color-success-text)}.gbt-list-row__leading[data-tone=warning]{color:var(--color-warning-text)}.gbt-list-row__leading[data-tone=error]{color:var(--color-error-text)}.gbt-list-row__leading[data-tone=info]{color:var(--color-info-bg-text)}.gbt-list-row__main{display:flex;flex:1 1 10rem;flex-direction:column;gap:.125rem;min-width:0}.gbt-list-row__title{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .5rem;min-width:0;min-height:1.5rem;color:var(--text-primary);font-size:.9375rem;font-weight:600;line-height:1.5rem}.gbt-list-row__title ::ng-deep>*{flex:none}.gbt-list-row__title ::ng-deep>gbt-user-chip{flex:0 1 auto;min-width:0;max-width:100%}.gbt-list-row__title ::ng-deep>a{flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden;color:inherit;text-decoration:none;white-space:nowrap;text-overflow:ellipsis}.gbt-list-row__title ::ng-deep>a:hover{color:var(--primary);text-decoration:underline;text-underline-offset:2px}.gbt-list-row__title ::ng-deep>a:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px;border-radius:2px}.gbt-list-row__meta{display:flex;flex-wrap:wrap;align-items:center;gap:.125rem .375rem;min-width:0;color:var(--text-secondary);font-size:.8125rem;line-height:1.25rem;overflow-wrap:anywhere}.gbt-list-row__meta ::ng-deep a{color:inherit;font-weight:500;text-decoration:none}.gbt-list-row__meta ::ng-deep a:hover{color:var(--primary);text-decoration:underline;text-underline-offset:2px}.gbt-list-row__meta ::ng-deep a:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:1px;border-radius:2px}.gbt-list-row__meta ::ng-deep code{padding:0 .375rem;border-radius:var(--gbt-radius-chip, 2px);background:var(--bg-hover);color:var(--text-primary);font-family:var(--gbt-font-mono);font-size:.75rem;line-height:1.125rem}.gbt-list-row__trailing{display:flex;flex:none;align-items:center;gap:.75rem;min-height:1.5rem;margin-left:auto;color:var(--text-secondary);font-size:.8125rem;line-height:1.25rem}.gbt-list-row__trailing ::ng-deep>*{flex:none}.gbt-list-row__leading:empty,.gbt-list-row__meta:empty,.gbt-list-row__trailing:empty{display:none}@media(prefers-reduced-motion:reduce){.gbt-list-row{transition:none}}\n"],
28
+ styles: [":host{display:block}::ng-deep li+li>gbt-list-row,::ng-deep gbt-list-row+gbt-list-row{border-top:1px solid var(--gbt-hairline)}.gbt-list-row{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.25rem .75rem;padding:.75rem 1rem;transition:background-color var(--site-transition-fast)}.gbt-list-row:hover,.gbt-list-row:focus-within{background:var(--bg-hover)}.gbt-list-row:active{background:var(--bg-press)}.gbt-list-row__leading{display:flex;flex:none;align-items:center;justify-content:center;width:1.25rem;height:1.5rem;color:var(--text-secondary);font-size:.8rem}.gbt-list-row__leading[data-tone=success]{color:var(--color-success-text)}.gbt-list-row__leading[data-tone=warning]{color:var(--color-warning-text)}.gbt-list-row__leading[data-tone=error]{color:var(--color-error-text)}.gbt-list-row__leading[data-tone=info]{color:var(--color-info-bg-text)}.gbt-list-row__main{display:flex;flex:1 1 10rem;flex-direction:column;gap:.125rem;min-width:0}.gbt-list-row__title{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .5rem;min-width:0;min-height:1.5rem;color:var(--text-primary);font-size:.9375rem;font-weight:600;line-height:1.5rem}.gbt-list-row__title ::ng-deep>*{flex:none}.gbt-list-row__title ::ng-deep>gbt-user-chip{flex:0 1 auto;min-width:0;max-width:100%}.gbt-list-row__title ::ng-deep>a{flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden;color:inherit;text-decoration:none;white-space:nowrap;text-overflow:ellipsis}.gbt-list-row__title ::ng-deep>a:hover{color:var(--primary);text-decoration:underline;text-underline-offset:2px}.gbt-list-row__title ::ng-deep>a:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px;border-radius:2px}.gbt-list-row__meta{display:flex;flex-wrap:wrap;align-items:center;gap:.125rem .375rem;min-width:0;color:var(--text-secondary);font-size:.8125rem;line-height:1.25rem;overflow-wrap:anywhere}.gbt-list-row__meta ::ng-deep a{color:inherit;font-weight:500;text-decoration:none}.gbt-list-row__meta ::ng-deep a:hover{color:var(--primary);text-decoration:underline;text-underline-offset:2px}.gbt-list-row__meta ::ng-deep a:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:1px;border-radius:2px}.gbt-list-row__meta ::ng-deep code{padding:0 .375rem;border-radius:var(--gbt-radius-chip, var(--site-border-radius-xs));background:var(--bg-hover);color:var(--text-primary);font-family:var(--gbt-font-mono);font-size:.75rem;line-height:1.125rem}.gbt-list-row__trailing{display:flex;flex:none;align-items:center;gap:.75rem;min-height:1.5rem;margin-left:auto;color:var(--text-secondary);font-size:.8125rem;line-height:1.25rem}.gbt-list-row__trailing ::ng-deep>*{flex:none}.gbt-list-row__leading:empty,.gbt-list-row__meta:empty,.gbt-list-row__trailing:empty{display:none}@media(prefers-reduced-motion:reduce){.gbt-list-row{transition:none}}\n"],
29
29
  changeDetection: i0.ChangeDetectionStrategy.OnPush
30
30
  });
31
31
  };
32
32
  i0.ɵɵngDeclareClassMetadata({
33
33
  minVersion: "12.0.0",
34
- version: "22.2.0",
34
+ version: "22.2.4",
35
35
  ngImport: i0,
36
36
  type: ListRow,
37
37
  decorators: [{
@@ -41,7 +41,7 @@ i0.ɵɵngDeclareClassMetadata({
41
41
  standalone: true,
42
42
  changeDetection: ChangeDetectionStrategy.OnPush,
43
43
  template: "<div class=\"gbt-list-row\">\n <div class=\"gbt-list-row__leading\" [attr.data-tone]=\"tone()\">\n <ng-content select=\"[row-leading]\" />\n </div>\n <div class=\"gbt-list-row__main\">\n <div class=\"gbt-list-row__title\"><ng-content /></div>\n <div class=\"gbt-list-row__meta\"><ng-content select=\"[row-meta]\" /></div>\n </div>\n <div class=\"gbt-list-row__trailing\"><ng-content select=\"[row-trailing]\" /></div>\n</div>\n",
44
- styles: [":host{display:block}::ng-deep li+li>gbt-list-row,::ng-deep gbt-list-row+gbt-list-row{border-top:1px solid var(--gbt-hairline)}.gbt-list-row{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.25rem .75rem;padding:.75rem 1rem;transition:background-color var(--site-transition-fast)}.gbt-list-row:hover,.gbt-list-row:focus-within{background:var(--bg-hover)}.gbt-list-row__leading{display:flex;flex:none;align-items:center;justify-content:center;width:1.25rem;height:1.5rem;color:var(--text-secondary);font-size:.8rem}.gbt-list-row__leading[data-tone=success]{color:var(--color-success-text)}.gbt-list-row__leading[data-tone=warning]{color:var(--color-warning-text)}.gbt-list-row__leading[data-tone=error]{color:var(--color-error-text)}.gbt-list-row__leading[data-tone=info]{color:var(--color-info-bg-text)}.gbt-list-row__main{display:flex;flex:1 1 10rem;flex-direction:column;gap:.125rem;min-width:0}.gbt-list-row__title{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .5rem;min-width:0;min-height:1.5rem;color:var(--text-primary);font-size:.9375rem;font-weight:600;line-height:1.5rem}.gbt-list-row__title ::ng-deep>*{flex:none}.gbt-list-row__title ::ng-deep>gbt-user-chip{flex:0 1 auto;min-width:0;max-width:100%}.gbt-list-row__title ::ng-deep>a{flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden;color:inherit;text-decoration:none;white-space:nowrap;text-overflow:ellipsis}.gbt-list-row__title ::ng-deep>a:hover{color:var(--primary);text-decoration:underline;text-underline-offset:2px}.gbt-list-row__title ::ng-deep>a:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px;border-radius:2px}.gbt-list-row__meta{display:flex;flex-wrap:wrap;align-items:center;gap:.125rem .375rem;min-width:0;color:var(--text-secondary);font-size:.8125rem;line-height:1.25rem;overflow-wrap:anywhere}.gbt-list-row__meta ::ng-deep a{color:inherit;font-weight:500;text-decoration:none}.gbt-list-row__meta ::ng-deep a:hover{color:var(--primary);text-decoration:underline;text-underline-offset:2px}.gbt-list-row__meta ::ng-deep a:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:1px;border-radius:2px}.gbt-list-row__meta ::ng-deep code{padding:0 .375rem;border-radius:var(--gbt-radius-chip, 2px);background:var(--bg-hover);color:var(--text-primary);font-family:var(--gbt-font-mono);font-size:.75rem;line-height:1.125rem}.gbt-list-row__trailing{display:flex;flex:none;align-items:center;gap:.75rem;min-height:1.5rem;margin-left:auto;color:var(--text-secondary);font-size:.8125rem;line-height:1.25rem}.gbt-list-row__trailing ::ng-deep>*{flex:none}.gbt-list-row__leading:empty,.gbt-list-row__meta:empty,.gbt-list-row__trailing:empty{display:none}@media(prefers-reduced-motion:reduce){.gbt-list-row{transition:none}}\n"]
44
+ styles: [":host{display:block}::ng-deep li+li>gbt-list-row,::ng-deep gbt-list-row+gbt-list-row{border-top:1px solid var(--gbt-hairline)}.gbt-list-row{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.25rem .75rem;padding:.75rem 1rem;transition:background-color var(--site-transition-fast)}.gbt-list-row:hover,.gbt-list-row:focus-within{background:var(--bg-hover)}.gbt-list-row:active{background:var(--bg-press)}.gbt-list-row__leading{display:flex;flex:none;align-items:center;justify-content:center;width:1.25rem;height:1.5rem;color:var(--text-secondary);font-size:.8rem}.gbt-list-row__leading[data-tone=success]{color:var(--color-success-text)}.gbt-list-row__leading[data-tone=warning]{color:var(--color-warning-text)}.gbt-list-row__leading[data-tone=error]{color:var(--color-error-text)}.gbt-list-row__leading[data-tone=info]{color:var(--color-info-bg-text)}.gbt-list-row__main{display:flex;flex:1 1 10rem;flex-direction:column;gap:.125rem;min-width:0}.gbt-list-row__title{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .5rem;min-width:0;min-height:1.5rem;color:var(--text-primary);font-size:.9375rem;font-weight:600;line-height:1.5rem}.gbt-list-row__title ::ng-deep>*{flex:none}.gbt-list-row__title ::ng-deep>gbt-user-chip{flex:0 1 auto;min-width:0;max-width:100%}.gbt-list-row__title ::ng-deep>a{flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden;color:inherit;text-decoration:none;white-space:nowrap;text-overflow:ellipsis}.gbt-list-row__title ::ng-deep>a:hover{color:var(--primary);text-decoration:underline;text-underline-offset:2px}.gbt-list-row__title ::ng-deep>a:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px;border-radius:2px}.gbt-list-row__meta{display:flex;flex-wrap:wrap;align-items:center;gap:.125rem .375rem;min-width:0;color:var(--text-secondary);font-size:.8125rem;line-height:1.25rem;overflow-wrap:anywhere}.gbt-list-row__meta ::ng-deep a{color:inherit;font-weight:500;text-decoration:none}.gbt-list-row__meta ::ng-deep a:hover{color:var(--primary);text-decoration:underline;text-underline-offset:2px}.gbt-list-row__meta ::ng-deep a:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:1px;border-radius:2px}.gbt-list-row__meta ::ng-deep code{padding:0 .375rem;border-radius:var(--gbt-radius-chip, var(--site-border-radius-xs));background:var(--bg-hover);color:var(--text-primary);font-family:var(--gbt-font-mono);font-size:.75rem;line-height:1.125rem}.gbt-list-row__trailing{display:flex;flex:none;align-items:center;gap:.75rem;min-height:1.5rem;margin-left:auto;color:var(--text-secondary);font-size:.8125rem;line-height:1.25rem}.gbt-list-row__trailing ::ng-deep>*{flex:none}.gbt-list-row__leading:empty,.gbt-list-row__meta:empty,.gbt-list-row__trailing:empty{display:none}@media(prefers-reduced-motion:reduce){.gbt-list-row{transition:none}}\n"]
45
45
  }]
46
46
  }],
47
47
  propDecorators: { tone: [{
@@ -1 +1 @@
1
- {"version":3,"file":"masmarino-gabarit-list-row.mjs","names":[],"sources":["../../../projects/gabarit/list-row/list-row.ts","../../../projects/gabarit/list-row/list-row.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core'\n\nexport type ListRowTone = 'neutral' | 'success' | 'warning' | 'error' | 'info'\n\n@Component({\n selector: 'gbt-list-row',\n standalone: true,\n templateUrl: './list-row.html',\n styleUrl: './list-row.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ListRow {\n tone = input<ListRowTone>('neutral')\n}\n","<div class=\"gbt-list-row\">\n <div class=\"gbt-list-row__leading\" [attr.data-tone]=\"tone()\">\n <ng-content select=\"[row-leading]\" />\n </div>\n <div class=\"gbt-list-row__main\">\n <div class=\"gbt-list-row__title\"><ng-content /></div>\n <div class=\"gbt-list-row__meta\"><ng-content select=\"[row-meta]\" /></div>\n </div>\n <div class=\"gbt-list-row__trailing\"><ng-content select=\"[row-trailing]\" /></div>\n</div>\n"],"mappings":";;AAWA,IAAa,UAAb,MAAa,QAAO;CAClB,OAAO,MAAmB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CADzB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAO,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAP,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAO,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,MAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,UAAA;EAAA,UCXpB;EAUA,QAAA,CAAA,ouFAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;ADCa,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAO,YAAA,CAAA;EAPnB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAc,YACZ;GAAI,iBAGC,wBAAwB;GAAM,UAAA;GAAA,QAAA,CAAA,ouFAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"masmarino-gabarit-list-row.mjs","names":[],"sources":["../../../projects/gabarit/list-row/list-row.ts","../../../projects/gabarit/list-row/list-row.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core'\n\nexport type ListRowTone = 'neutral' | 'success' | 'warning' | 'error' | 'info'\n\n@Component({\n selector: 'gbt-list-row',\n standalone: true,\n templateUrl: './list-row.html',\n styleUrl: './list-row.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ListRow {\n tone = input<ListRowTone>('neutral')\n}\n","<div class=\"gbt-list-row\">\n <div class=\"gbt-list-row__leading\" [attr.data-tone]=\"tone()\">\n <ng-content select=\"[row-leading]\" />\n </div>\n <div class=\"gbt-list-row__main\">\n <div class=\"gbt-list-row__title\"><ng-content /></div>\n <div class=\"gbt-list-row__meta\"><ng-content select=\"[row-meta]\" /></div>\n </div>\n <div class=\"gbt-list-row__trailing\"><ng-content select=\"[row-trailing]\" /></div>\n</div>\n"],"mappings":";;AAWA,IAAa,UAAb,MAAa,QAAO;CAClB,OAAO,MAAmB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CADzB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAO,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAP,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAO,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,MAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,UAAA;EAAA,UCXpB;EAUA,QAAA,CAAA,6yFAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;ADCa,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAO,YAAA,CAAA;EAPnB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAc,YACZ;GAAI,iBAGC,wBAAwB;GAAM,UAAA;GAAA,QAAA,CAAA,6yFAAA;EAAA,CAAA"}
@@ -99,7 +99,7 @@ var ListToolbar = class ListToolbar {
99
99
  }
100
100
  static ɵfac = i0.ɵɵngDeclareFactory({
101
101
  minVersion: "12.0.0",
102
- version: "22.2.0",
102
+ version: "22.2.4",
103
103
  ngImport: i0,
104
104
  type: ListToolbar,
105
105
  deps: [],
@@ -107,7 +107,7 @@ var ListToolbar = class ListToolbar {
107
107
  });
108
108
  static ɵcmp = i0.ɵɵngDeclareComponent({
109
109
  minVersion: "17.1.0",
110
- version: "22.2.0",
110
+ version: "22.2.4",
111
111
  type: ListToolbar,
112
112
  isStandalone: true,
113
113
  selector: "gbt-list-toolbar",
@@ -176,7 +176,7 @@ var ListToolbar = class ListToolbar {
176
176
  },
177
177
  ngImport: i0,
178
178
  template: "<div class=\"gbt-list-toolbar\">\n <gbt-input\n class=\"gbt-list-toolbar__search\"\n [label]=\"searchLabel()\"\n [placeholder]=\"searchPlaceholder()\"\n [formControl]=\"searchControl\"\n />\n <gbt-select\n class=\"gbt-list-toolbar__sort\"\n [label]=\"sortLabel()\"\n [options]=\"asSelectOptions(sortOptions())\"\n [formControl]=\"sortControl\"\n />\n <button\n type=\"button\"\n class=\"gbt-list-toolbar__direction\"\n (click)=\"toggleDirection()\"\n [attr.aria-label]=\"directionLabel()\"\n [attr.aria-pressed]=\"sortDirection() === 'desc'\"\n >\n <gbt-icon [name]=\"sortDirection() === 'asc' ? 'arrow-up' : 'arrow-down'\" />\n </button>\n</div>\n",
179
- styles: [":host{display:block}.gbt-list-toolbar{display:flex;align-items:flex-end;gap:.75rem;flex-wrap:wrap}.gbt-list-toolbar__search{flex:1;min-width:200px}.gbt-list-toolbar__sort{min-width:160px}.gbt-list-toolbar__direction{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:var(--gbt-control-height-md);height:var(--gbt-control-height-md);flex-shrink:0;padding:0;border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);background:var(--bg-principal);color:var(--text-secondary);cursor:pointer;transition:background var(--site-transition-fast)}.gbt-list-toolbar__direction:hover{background:var(--bg-hover)}.gbt-list-toolbar__direction:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}\n"],
179
+ styles: [":host{display:block}.gbt-list-toolbar{display:flex;align-items:flex-end;gap:.75rem;flex-wrap:wrap}.gbt-list-toolbar__search{flex:1;min-width:200px}.gbt-list-toolbar__sort{min-width:160px}.gbt-list-toolbar__direction{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:var(--gbt-control-height-md);height:var(--gbt-control-height-md);flex-shrink:0;padding:0;border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);background:var(--bg-principal);color:var(--text-secondary);cursor:pointer;background-image:var(--gbt-sheen);box-shadow:var(--gbt-depth-raised);transition:background var(--site-transition-fast)}.gbt-list-toolbar__direction:hover{color:var(--text-primary);background-image:linear-gradient(var(--bg-hover),var(--bg-hover)),var(--gbt-sheen-hover);box-shadow:var(--gbt-depth-raised-hover)}.gbt-list-toolbar__direction:active{color:var(--text-primary);background-image:var(--gbt-sunk),linear-gradient(var(--bg-press),var(--bg-press));box-shadow:none}@media(prefers-reduced-motion:no-preference){.gbt-list-toolbar__direction:active{transform:translateY(.5px)}}.gbt-list-toolbar__direction:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}@media(prefers-reduced-motion:reduce){.gbt-list-toolbar__direction{transition:none}}\n"],
180
180
  dependencies: [
181
181
  {
182
182
  kind: "ngmodule",
@@ -265,7 +265,7 @@ var ListToolbar = class ListToolbar {
265
265
  };
266
266
  i0.ɵɵngDeclareClassMetadata({
267
267
  minVersion: "12.0.0",
268
- version: "22.2.0",
268
+ version: "22.2.4",
269
269
  ngImport: i0,
270
270
  type: ListToolbar,
271
271
  decorators: [{
@@ -281,7 +281,7 @@ i0.ɵɵngDeclareClassMetadata({
281
281
  ],
282
282
  changeDetection: ChangeDetectionStrategy.OnPush,
283
283
  template: "<div class=\"gbt-list-toolbar\">\n <gbt-input\n class=\"gbt-list-toolbar__search\"\n [label]=\"searchLabel()\"\n [placeholder]=\"searchPlaceholder()\"\n [formControl]=\"searchControl\"\n />\n <gbt-select\n class=\"gbt-list-toolbar__sort\"\n [label]=\"sortLabel()\"\n [options]=\"asSelectOptions(sortOptions())\"\n [formControl]=\"sortControl\"\n />\n <button\n type=\"button\"\n class=\"gbt-list-toolbar__direction\"\n (click)=\"toggleDirection()\"\n [attr.aria-label]=\"directionLabel()\"\n [attr.aria-pressed]=\"sortDirection() === 'desc'\"\n >\n <gbt-icon [name]=\"sortDirection() === 'asc' ? 'arrow-up' : 'arrow-down'\" />\n </button>\n</div>\n",
284
- styles: [":host{display:block}.gbt-list-toolbar{display:flex;align-items:flex-end;gap:.75rem;flex-wrap:wrap}.gbt-list-toolbar__search{flex:1;min-width:200px}.gbt-list-toolbar__sort{min-width:160px}.gbt-list-toolbar__direction{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:var(--gbt-control-height-md);height:var(--gbt-control-height-md);flex-shrink:0;padding:0;border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);background:var(--bg-principal);color:var(--text-secondary);cursor:pointer;transition:background var(--site-transition-fast)}.gbt-list-toolbar__direction:hover{background:var(--bg-hover)}.gbt-list-toolbar__direction:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}\n"]
284
+ styles: [":host{display:block}.gbt-list-toolbar{display:flex;align-items:flex-end;gap:.75rem;flex-wrap:wrap}.gbt-list-toolbar__search{flex:1;min-width:200px}.gbt-list-toolbar__sort{min-width:160px}.gbt-list-toolbar__direction{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:var(--gbt-control-height-md);height:var(--gbt-control-height-md);flex-shrink:0;padding:0;border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);background:var(--bg-principal);color:var(--text-secondary);cursor:pointer;background-image:var(--gbt-sheen);box-shadow:var(--gbt-depth-raised);transition:background var(--site-transition-fast)}.gbt-list-toolbar__direction:hover{color:var(--text-primary);background-image:linear-gradient(var(--bg-hover),var(--bg-hover)),var(--gbt-sheen-hover);box-shadow:var(--gbt-depth-raised-hover)}.gbt-list-toolbar__direction:active{color:var(--text-primary);background-image:var(--gbt-sunk),linear-gradient(var(--bg-press),var(--bg-press));box-shadow:none}@media(prefers-reduced-motion:no-preference){.gbt-list-toolbar__direction:active{transform:translateY(.5px)}}.gbt-list-toolbar__direction:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:2px}@media(prefers-reduced-motion:reduce){.gbt-list-toolbar__direction{transition:none}}\n"]
285
285
  }]
286
286
  }],
287
287
  ctorParameters: () => [],