@masmarino/gabarit 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. package/README.md +131 -85
  2. package/accordion/README.md +56 -0
  3. package/alert/README.md +87 -0
  4. package/app-shell/README.md +133 -0
  5. package/auth/README.md +155 -0
  6. package/auth-activate/README.md +119 -0
  7. package/auth-login/README.md +113 -0
  8. package/auth-register/README.md +104 -0
  9. package/auth-reset-password/README.md +120 -0
  10. package/autocomplete/README.md +77 -0
  11. package/avatar/README.md +34 -0
  12. package/avatar-group/README.md +47 -0
  13. package/badge/README.md +177 -0
  14. package/bar-chart/README.md +44 -0
  15. package/breadcrumb/README.md +38 -0
  16. package/button/README.md +175 -0
  17. package/card/README.md +179 -0
  18. package/checkbox/README.md +50 -0
  19. package/checkbox-group/README.md +78 -0
  20. package/confirm-danger-modal/README.md +77 -0
  21. package/copy-button/README.md +90 -0
  22. package/copy-field/README.md +54 -0
  23. package/date-picker/README.md +84 -0
  24. package/description-list/README.md +63 -0
  25. package/dimension-card/README.md +39 -0
  26. package/disclosure/README.md +48 -0
  27. package/divider/README.md +31 -0
  28. package/drawer/README.md +49 -0
  29. package/empty-state/README.md +84 -0
  30. package/fesm2022/masmarino-gabarit-accordion.mjs +243 -0
  31. package/fesm2022/masmarino-gabarit-accordion.mjs.map +1 -0
  32. package/fesm2022/masmarino-gabarit-alert.mjs +208 -0
  33. package/fesm2022/masmarino-gabarit-alert.mjs.map +1 -0
  34. package/fesm2022/masmarino-gabarit-app-shell.mjs +378 -0
  35. package/fesm2022/masmarino-gabarit-app-shell.mjs.map +1 -0
  36. package/fesm2022/masmarino-gabarit-auth-activate.mjs +415 -0
  37. package/fesm2022/masmarino-gabarit-auth-activate.mjs.map +1 -0
  38. package/fesm2022/masmarino-gabarit-auth-login.mjs +467 -0
  39. package/fesm2022/masmarino-gabarit-auth-login.mjs.map +1 -0
  40. package/fesm2022/masmarino-gabarit-auth-register.mjs +457 -0
  41. package/fesm2022/masmarino-gabarit-auth-register.mjs.map +1 -0
  42. package/fesm2022/masmarino-gabarit-auth-reset-password.mjs +364 -0
  43. package/fesm2022/masmarino-gabarit-auth-reset-password.mjs.map +1 -0
  44. package/fesm2022/masmarino-gabarit-auth.mjs +844 -0
  45. package/fesm2022/masmarino-gabarit-auth.mjs.map +1 -0
  46. package/fesm2022/masmarino-gabarit-autocomplete.mjs +477 -0
  47. package/fesm2022/masmarino-gabarit-autocomplete.mjs.map +1 -0
  48. package/fesm2022/masmarino-gabarit-avatar-group.mjs +199 -0
  49. package/fesm2022/masmarino-gabarit-avatar-group.mjs.map +1 -0
  50. package/fesm2022/masmarino-gabarit-avatar.mjs +107 -0
  51. package/fesm2022/masmarino-gabarit-avatar.mjs.map +1 -0
  52. package/fesm2022/masmarino-gabarit-badge.mjs +449 -0
  53. package/fesm2022/masmarino-gabarit-badge.mjs.map +1 -0
  54. package/fesm2022/masmarino-gabarit-bar-chart.mjs +408 -0
  55. package/fesm2022/masmarino-gabarit-bar-chart.mjs.map +1 -0
  56. package/fesm2022/masmarino-gabarit-breadcrumb.mjs +59 -0
  57. package/fesm2022/masmarino-gabarit-breadcrumb.mjs.map +1 -0
  58. package/fesm2022/masmarino-gabarit-button.mjs +374 -0
  59. package/fesm2022/masmarino-gabarit-button.mjs.map +1 -0
  60. package/fesm2022/masmarino-gabarit-card.mjs +400 -0
  61. package/fesm2022/masmarino-gabarit-card.mjs.map +1 -0
  62. package/fesm2022/masmarino-gabarit-chart.mjs +1289 -0
  63. package/fesm2022/masmarino-gabarit-chart.mjs.map +1 -0
  64. package/fesm2022/masmarino-gabarit-checkbox-group.mjs +335 -0
  65. package/fesm2022/masmarino-gabarit-checkbox-group.mjs.map +1 -0
  66. package/fesm2022/masmarino-gabarit-checkbox.mjs +170 -0
  67. package/fesm2022/masmarino-gabarit-checkbox.mjs.map +1 -0
  68. package/fesm2022/masmarino-gabarit-confirm-danger-modal.mjs +387 -0
  69. package/fesm2022/masmarino-gabarit-confirm-danger-modal.mjs.map +1 -0
  70. package/fesm2022/masmarino-gabarit-copy-button.mjs +407 -0
  71. package/fesm2022/masmarino-gabarit-copy-button.mjs.map +1 -0
  72. package/fesm2022/masmarino-gabarit-copy-field.mjs +229 -0
  73. package/fesm2022/masmarino-gabarit-copy-field.mjs.map +1 -0
  74. package/fesm2022/masmarino-gabarit-date-picker.mjs +1238 -0
  75. package/fesm2022/masmarino-gabarit-date-picker.mjs.map +1 -0
  76. package/fesm2022/masmarino-gabarit-description-list.mjs +127 -0
  77. package/fesm2022/masmarino-gabarit-description-list.mjs.map +1 -0
  78. package/fesm2022/masmarino-gabarit-dimension-card.mjs +162 -0
  79. package/fesm2022/masmarino-gabarit-dimension-card.mjs.map +1 -0
  80. package/fesm2022/masmarino-gabarit-disclosure.mjs +154 -0
  81. package/fesm2022/masmarino-gabarit-disclosure.mjs.map +1 -0
  82. package/fesm2022/masmarino-gabarit-divider.mjs +90 -0
  83. package/fesm2022/masmarino-gabarit-divider.mjs.map +1 -0
  84. package/fesm2022/masmarino-gabarit-docs.mjs +11 -1
  85. package/fesm2022/masmarino-gabarit-docs.mjs.map +1 -1
  86. package/fesm2022/masmarino-gabarit-drawer.mjs +209 -0
  87. package/fesm2022/masmarino-gabarit-drawer.mjs.map +1 -0
  88. package/fesm2022/masmarino-gabarit-empty-state.mjs +226 -0
  89. package/fesm2022/masmarino-gabarit-empty-state.mjs.map +1 -0
  90. package/fesm2022/masmarino-gabarit-file-upload.mjs +335 -0
  91. package/fesm2022/masmarino-gabarit-file-upload.mjs.map +1 -0
  92. package/fesm2022/masmarino-gabarit-floating-panel.mjs +13 -0
  93. package/fesm2022/masmarino-gabarit-floating-panel.mjs.map +1 -0
  94. package/fesm2022/masmarino-gabarit-format.mjs +345 -0
  95. package/fesm2022/masmarino-gabarit-format.mjs.map +1 -0
  96. package/fesm2022/masmarino-gabarit-funnel-chart.mjs +247 -0
  97. package/fesm2022/masmarino-gabarit-funnel-chart.mjs.map +1 -0
  98. package/fesm2022/masmarino-gabarit-gauge-bar.mjs +180 -0
  99. package/fesm2022/masmarino-gabarit-gauge-bar.mjs.map +1 -0
  100. package/fesm2022/masmarino-gabarit-git-field.mjs +127 -0
  101. package/fesm2022/masmarino-gabarit-git-field.mjs.map +1 -0
  102. package/fesm2022/masmarino-gabarit-icon-marker.mjs +150 -0
  103. package/fesm2022/masmarino-gabarit-icon-marker.mjs.map +1 -0
  104. package/fesm2022/masmarino-gabarit-icon.mjs +308 -0
  105. package/fesm2022/masmarino-gabarit-icon.mjs.map +1 -0
  106. package/fesm2022/masmarino-gabarit-input.mjs +493 -0
  107. package/fesm2022/masmarino-gabarit-input.mjs.map +1 -0
  108. package/fesm2022/masmarino-gabarit-job-graph.mjs +216 -0
  109. package/fesm2022/masmarino-gabarit-job-graph.mjs.map +1 -0
  110. package/fesm2022/masmarino-gabarit-job-status.mjs +104 -0
  111. package/fesm2022/masmarino-gabarit-job-status.mjs.map +1 -0
  112. package/fesm2022/masmarino-gabarit-line-chart.mjs +574 -0
  113. package/fesm2022/masmarino-gabarit-line-chart.mjs.map +1 -0
  114. package/fesm2022/masmarino-gabarit-list-card.mjs +320 -0
  115. package/fesm2022/masmarino-gabarit-list-card.mjs.map +1 -0
  116. package/fesm2022/masmarino-gabarit-list-row.mjs +58 -0
  117. package/fesm2022/masmarino-gabarit-list-row.mjs.map +1 -0
  118. package/fesm2022/masmarino-gabarit-list-toolbar.mjs +369 -0
  119. package/fesm2022/masmarino-gabarit-list-toolbar.mjs.map +1 -0
  120. package/fesm2022/masmarino-gabarit-menu.mjs +461 -0
  121. package/fesm2022/masmarino-gabarit-menu.mjs.map +1 -0
  122. package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs +897 -0
  123. package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs.map +1 -0
  124. package/fesm2022/masmarino-gabarit-mfa-settings.mjs +629 -0
  125. package/fesm2022/masmarino-gabarit-mfa-settings.mjs.map +1 -0
  126. package/fesm2022/masmarino-gabarit-modal.mjs +260 -0
  127. package/fesm2022/masmarino-gabarit-modal.mjs.map +1 -0
  128. package/fesm2022/masmarino-gabarit-nav-tabs.mjs +332 -0
  129. package/fesm2022/masmarino-gabarit-nav-tabs.mjs.map +1 -0
  130. package/fesm2022/masmarino-gabarit-notification-dot.mjs +119 -0
  131. package/fesm2022/masmarino-gabarit-notification-dot.mjs.map +1 -0
  132. package/fesm2022/masmarino-gabarit-page-header.mjs +78 -0
  133. package/fesm2022/masmarino-gabarit-page-header.mjs.map +1 -0
  134. package/fesm2022/masmarino-gabarit-page-layout.mjs +157 -0
  135. package/fesm2022/masmarino-gabarit-page-layout.mjs.map +1 -0
  136. package/fesm2022/masmarino-gabarit-pagination.mjs +415 -0
  137. package/fesm2022/masmarino-gabarit-pagination.mjs.map +1 -0
  138. package/fesm2022/masmarino-gabarit-panel.mjs +80 -0
  139. package/fesm2022/masmarino-gabarit-panel.mjs.map +1 -0
  140. package/fesm2022/masmarino-gabarit-passkey-settings.mjs +606 -0
  141. package/fesm2022/masmarino-gabarit-passkey-settings.mjs.map +1 -0
  142. package/fesm2022/masmarino-gabarit-pie-chart.mjs +317 -0
  143. package/fesm2022/masmarino-gabarit-pie-chart.mjs.map +1 -0
  144. package/fesm2022/masmarino-gabarit-popover.mjs +139 -0
  145. package/fesm2022/masmarino-gabarit-popover.mjs.map +1 -0
  146. package/fesm2022/masmarino-gabarit-radio-group.mjs +202 -0
  147. package/fesm2022/masmarino-gabarit-radio-group.mjs.map +1 -0
  148. package/fesm2022/masmarino-gabarit-save-status.mjs +142 -0
  149. package/fesm2022/masmarino-gabarit-save-status.mjs.map +1 -0
  150. package/fesm2022/masmarino-gabarit-search-bar.mjs +576 -0
  151. package/fesm2022/masmarino-gabarit-search-bar.mjs.map +1 -0
  152. package/fesm2022/masmarino-gabarit-secret-reveal.mjs +348 -0
  153. package/fesm2022/masmarino-gabarit-secret-reveal.mjs.map +1 -0
  154. package/fesm2022/masmarino-gabarit-segmented-control.mjs +272 -0
  155. package/fesm2022/masmarino-gabarit-segmented-control.mjs.map +1 -0
  156. package/fesm2022/masmarino-gabarit-select.mjs +510 -0
  157. package/fesm2022/masmarino-gabarit-select.mjs.map +1 -0
  158. package/fesm2022/masmarino-gabarit-skeleton-list.mjs +189 -0
  159. package/fesm2022/masmarino-gabarit-skeleton-list.mjs.map +1 -0
  160. package/fesm2022/masmarino-gabarit-skeleton.mjs +109 -0
  161. package/fesm2022/masmarino-gabarit-skeleton.mjs.map +1 -0
  162. package/fesm2022/masmarino-gabarit-slider.mjs +239 -0
  163. package/fesm2022/masmarino-gabarit-slider.mjs.map +1 -0
  164. package/fesm2022/masmarino-gabarit-sparkline.mjs +276 -0
  165. package/fesm2022/masmarino-gabarit-sparkline.mjs.map +1 -0
  166. package/fesm2022/masmarino-gabarit-spinner.mjs +86 -0
  167. package/fesm2022/masmarino-gabarit-spinner.mjs.map +1 -0
  168. package/fesm2022/masmarino-gabarit-stat-grid.mjs +139 -0
  169. package/fesm2022/masmarino-gabarit-stat-grid.mjs.map +1 -0
  170. package/fesm2022/masmarino-gabarit-stat-tile.mjs +312 -0
  171. package/fesm2022/masmarino-gabarit-stat-tile.mjs.map +1 -0
  172. package/fesm2022/masmarino-gabarit-stepper.mjs +219 -0
  173. package/fesm2022/masmarino-gabarit-stepper.mjs.map +1 -0
  174. package/fesm2022/masmarino-gabarit-switch.mjs +151 -0
  175. package/fesm2022/masmarino-gabarit-switch.mjs.map +1 -0
  176. package/fesm2022/masmarino-gabarit-table.mjs +206 -0
  177. package/fesm2022/masmarino-gabarit-table.mjs.map +1 -0
  178. package/fesm2022/masmarino-gabarit-tabs.mjs +210 -0
  179. package/fesm2022/masmarino-gabarit-tabs.mjs.map +1 -0
  180. package/fesm2022/masmarino-gabarit-tag-input.mjs +288 -0
  181. package/fesm2022/masmarino-gabarit-tag-input.mjs.map +1 -0
  182. package/fesm2022/masmarino-gabarit-tag.mjs +155 -0
  183. package/fesm2022/masmarino-gabarit-tag.mjs.map +1 -0
  184. package/fesm2022/masmarino-gabarit-textarea.mjs +369 -0
  185. package/fesm2022/masmarino-gabarit-textarea.mjs.map +1 -0
  186. package/fesm2022/masmarino-gabarit-timeline-chart.mjs +521 -0
  187. package/fesm2022/masmarino-gabarit-timeline-chart.mjs.map +1 -0
  188. package/fesm2022/masmarino-gabarit-toaster.mjs +220 -0
  189. package/fesm2022/masmarino-gabarit-toaster.mjs.map +1 -0
  190. package/fesm2022/masmarino-gabarit-tooltip.mjs +182 -0
  191. package/fesm2022/masmarino-gabarit-tooltip.mjs.map +1 -0
  192. package/fesm2022/masmarino-gabarit-tree.mjs +258 -0
  193. package/fesm2022/masmarino-gabarit-tree.mjs.map +1 -0
  194. package/fesm2022/masmarino-gabarit-user-chip.mjs +106 -0
  195. package/fesm2022/masmarino-gabarit-user-chip.mjs.map +1 -0
  196. package/fesm2022/masmarino-gabarit.mjs +83 -24785
  197. package/fesm2022/masmarino-gabarit.mjs.map +1 -1
  198. package/file-upload/README.md +47 -0
  199. package/funnel-chart/README.md +39 -0
  200. package/gauge-bar/README.md +35 -0
  201. package/git-field/README.md +34 -0
  202. package/icon/README.md +52 -0
  203. package/icon-marker/README.md +37 -0
  204. package/input/README.md +120 -0
  205. package/job-graph/README.md +76 -0
  206. package/job-status/README.md +34 -0
  207. package/line-chart/README.md +52 -0
  208. package/list-card/README.md +144 -0
  209. package/list-row/README.md +72 -0
  210. package/list-toolbar/README.md +52 -0
  211. package/menu/README.md +90 -0
  212. package/mfa-enrollment/README.md +189 -0
  213. package/mfa-settings/README.md +154 -0
  214. package/modal/README.md +72 -0
  215. package/nav-tabs/README.md +106 -0
  216. package/notification-dot/README.md +43 -0
  217. package/package.json +329 -1
  218. package/page-header/README.md +56 -0
  219. package/page-layout/README.md +76 -0
  220. package/pagination/README.md +73 -0
  221. package/panel/README.md +56 -0
  222. package/passkey-settings/README.md +120 -0
  223. package/pie-chart/README.md +85 -0
  224. package/popover/README.md +62 -0
  225. package/radio-group/README.md +47 -0
  226. package/save-status/README.md +44 -0
  227. package/search-bar/README.md +84 -0
  228. package/secret-reveal/README.md +60 -0
  229. package/segmented-control/README.md +79 -0
  230. package/select/README.md +61 -0
  231. package/skeleton/README.md +49 -0
  232. package/skeleton-list/README.md +40 -0
  233. package/slider/README.md +44 -0
  234. package/sparkline/README.md +37 -0
  235. package/spinner/README.md +41 -0
  236. package/stat-grid/README.md +47 -0
  237. package/stat-tile/README.md +75 -0
  238. package/stepper/README.md +67 -0
  239. package/switch/README.md +51 -0
  240. package/table/README.md +75 -0
  241. package/tabs/README.md +34 -0
  242. package/tag/README.md +34 -0
  243. package/tag-input/README.md +45 -0
  244. package/textarea/README.md +76 -0
  245. package/timeline-chart/README.md +49 -0
  246. package/toaster/README.md +92 -0
  247. package/tooltip/README.md +50 -0
  248. package/tree/README.md +79 -0
  249. package/types/masmarino-gabarit-accordion.d.ts +54 -0
  250. package/types/masmarino-gabarit-alert.d.ts +65 -0
  251. package/types/masmarino-gabarit-app-shell.d.ts +102 -0
  252. package/types/masmarino-gabarit-auth-activate.d.ts +70 -0
  253. package/types/masmarino-gabarit-auth-login.d.ts +63 -0
  254. package/types/masmarino-gabarit-auth-register.d.ts +66 -0
  255. package/types/masmarino-gabarit-auth-reset-password.d.ts +53 -0
  256. package/types/masmarino-gabarit-auth.d.ts +543 -0
  257. package/types/masmarino-gabarit-autocomplete.d.ts +139 -0
  258. package/types/masmarino-gabarit-avatar-group.d.ts +59 -0
  259. package/types/masmarino-gabarit-avatar.d.ts +31 -0
  260. package/types/masmarino-gabarit-badge.d.ts +139 -0
  261. package/types/masmarino-gabarit-bar-chart.d.ts +111 -0
  262. package/types/masmarino-gabarit-breadcrumb.d.ts +12 -0
  263. package/types/masmarino-gabarit-button.d.ts +108 -0
  264. package/types/masmarino-gabarit-card.d.ts +102 -0
  265. package/types/masmarino-gabarit-chart.d.ts +361 -0
  266. package/types/masmarino-gabarit-checkbox-group.d.ts +113 -0
  267. package/types/masmarino-gabarit-checkbox.d.ts +49 -0
  268. package/types/masmarino-gabarit-confirm-danger-modal.d.ts +94 -0
  269. package/types/masmarino-gabarit-copy-button.d.ts +111 -0
  270. package/types/masmarino-gabarit-copy-field.d.ts +64 -0
  271. package/types/masmarino-gabarit-date-picker.d.ts +397 -0
  272. package/types/masmarino-gabarit-description-list.d.ts +40 -0
  273. package/types/masmarino-gabarit-dimension-card.d.ts +55 -0
  274. package/types/masmarino-gabarit-disclosure.d.ts +44 -0
  275. package/types/masmarino-gabarit-divider.d.ts +20 -0
  276. package/types/masmarino-gabarit-docs.d.ts +2 -1
  277. package/types/masmarino-gabarit-drawer.d.ts +51 -0
  278. package/types/masmarino-gabarit-empty-state.d.ts +67 -0
  279. package/types/masmarino-gabarit-file-upload.d.ts +95 -0
  280. package/types/masmarino-gabarit-floating-panel.d.ts +7 -0
  281. package/types/masmarino-gabarit-format.d.ts +54 -0
  282. package/types/masmarino-gabarit-funnel-chart.d.ts +78 -0
  283. package/types/masmarino-gabarit-gauge-bar.d.ts +54 -0
  284. package/types/masmarino-gabarit-git-field.d.ts +39 -0
  285. package/types/masmarino-gabarit-icon-marker.d.ts +47 -0
  286. package/types/masmarino-gabarit-icon.d.ts +23 -0
  287. package/types/masmarino-gabarit-input.d.ts +181 -0
  288. package/types/masmarino-gabarit-job-graph.d.ts +63 -0
  289. package/types/masmarino-gabarit-job-status.d.ts +20 -0
  290. package/types/masmarino-gabarit-line-chart.d.ts +153 -0
  291. package/types/masmarino-gabarit-list-card.d.ts +87 -0
  292. package/types/masmarino-gabarit-list-row.d.ts +14 -0
  293. package/types/masmarino-gabarit-list-toolbar.d.ts +100 -0
  294. package/types/masmarino-gabarit-menu.d.ts +92 -0
  295. package/types/masmarino-gabarit-mfa-enrollment.d.ts +142 -0
  296. package/types/masmarino-gabarit-mfa-settings.d.ts +89 -0
  297. package/types/masmarino-gabarit-modal.d.ts +60 -0
  298. package/types/masmarino-gabarit-nav-tabs.d.ts +65 -0
  299. package/types/masmarino-gabarit-notification-dot.d.ts +34 -0
  300. package/types/masmarino-gabarit-page-header.d.ts +20 -0
  301. package/types/masmarino-gabarit-page-layout.d.ts +46 -0
  302. package/types/masmarino-gabarit-pagination.d.ts +109 -0
  303. package/types/masmarino-gabarit-panel.d.ts +21 -0
  304. package/types/masmarino-gabarit-passkey-settings.d.ts +94 -0
  305. package/types/masmarino-gabarit-pie-chart.d.ts +94 -0
  306. package/types/masmarino-gabarit-popover.d.ts +32 -0
  307. package/types/masmarino-gabarit-radio-group.d.ts +66 -0
  308. package/types/masmarino-gabarit-save-status.d.ts +39 -0
  309. package/types/masmarino-gabarit-search-bar.d.ts +183 -0
  310. package/types/masmarino-gabarit-secret-reveal.d.ts +95 -0
  311. package/types/masmarino-gabarit-segmented-control.d.ts +76 -0
  312. package/types/masmarino-gabarit-select.d.ts +145 -0
  313. package/types/masmarino-gabarit-skeleton-list.d.ts +54 -0
  314. package/types/masmarino-gabarit-skeleton.d.ts +26 -0
  315. package/types/masmarino-gabarit-slider.d.ts +73 -0
  316. package/types/masmarino-gabarit-sparkline.d.ts +70 -0
  317. package/types/masmarino-gabarit-spinner.d.ts +20 -0
  318. package/types/masmarino-gabarit-stat-grid.d.ts +39 -0
  319. package/types/masmarino-gabarit-stat-tile.d.ts +79 -0
  320. package/types/masmarino-gabarit-stepper.d.ts +67 -0
  321. package/types/masmarino-gabarit-switch.d.ts +42 -0
  322. package/types/masmarino-gabarit-table.d.ts +60 -0
  323. package/types/masmarino-gabarit-tabs.d.ts +40 -0
  324. package/types/masmarino-gabarit-tag-input.d.ts +78 -0
  325. package/types/masmarino-gabarit-tag.d.ts +35 -0
  326. package/types/masmarino-gabarit-textarea.d.ts +109 -0
  327. package/types/masmarino-gabarit-timeline-chart.d.ts +145 -0
  328. package/types/masmarino-gabarit-toaster.d.ts +62 -0
  329. package/types/masmarino-gabarit-tooltip.d.ts +38 -0
  330. package/types/masmarino-gabarit-tree.d.ts +71 -0
  331. package/types/masmarino-gabarit-user-chip.d.ts +26 -0
  332. package/types/masmarino-gabarit.d.ts +83 -6599
  333. package/user-chip/README.md +42 -0
@@ -0,0 +1,77 @@
1
+ # Autocomplete
2
+
3
+ Text field with asynchronous suggestions. The app owns the data source
4
+ — it supplies a `search` function, `Autocomplete` owns debouncing the
5
+ input, tracking loading/empty/error state, and discarding a response
6
+ that arrives after a more recent one. Integrated with reactive forms
7
+ and `ngModel`, like `GbtInput`/`Select`.
8
+
9
+ Distinct from `Select` (a fixed, known-upfront list of options) and
10
+ from `SearchBar` (an organism dedicated exclusively to the header's
11
+ search — not a reusable form field).
12
+
13
+ **Selector**: `gbt-autocomplete`
14
+
15
+ ## Inputs
16
+
17
+ | Input | Type | Default | Role |
18
+ | --------------------- | ------------------------------------------------ | --------------------- | ---------------------------------------------------------------------------------------------- |
19
+ | `id` | `string` | generated | DOM id, associates the `<label>`. |
20
+ | `label` | `string` | `''` | Visible label. |
21
+ | `search` | `(query: string) => Observable<T[]> \| Promise<T[]>` | required | Runs the search — `Autocomplete` never makes the HTTP call itself. |
22
+ | `displayFn` | `(item: T) => string` | `String(item)` | Formats an item as text, both in the input once selected and as the default option rendering. |
23
+ | `itemTemplate` | `TemplateRef<{ $implicit: T }>` | none | Custom rendering per suggestion (e.g. avatar + name), in place of the plain `displayFn` text. |
24
+ | `debounceMs` | `number` | `300` | Delay after the last keystroke before `search` runs. |
25
+ | `minLength` | `number` | `1` | Minimum query length (after trimming) before searching. |
26
+ | `placeholder` | `string` | `''` | Input placeholder. |
27
+ | `disabled` | `boolean` | `false` | Disables the field. |
28
+ | `required` | `boolean` | `false` | Native `required` attribute. |
29
+ | `errorMessage` | `string \| null` | `null` | Error message shown under the field (form validation — distinct from a failed search). |
30
+ | `loadingMessage` | `string` | `'Searching…'` | Shown in the panel and announced while `search` is pending. |
31
+ | `noResultsMessage` | `string` | `'No results'` | Shown when `search` resolves to an empty array. |
32
+ | `searchErrorMessage` | `string` | `'Search failed'` | Shown when `search` rejects or errors. |
33
+ | `resultsAnnouncement` | `(count: number) => string` | `` `${count} result(s)` `` | Text announced to screen readers once results land. |
34
+
35
+ ## Outputs
36
+
37
+ | Output | Type | Role |
38
+ | -------------- | ---- | --------------------------------------------------------------------------------------- |
39
+ | `itemSelected` | `T` | Emitted when a suggestion is picked — in addition to the `ControlValueAccessor` value. |
40
+
41
+ ## Behavior
42
+
43
+ - Debounced: `search` only runs `debounceMs` after the last keystroke, not once per keystroke.
44
+ - A response that resolves after a more recent one is discarded — typing "a" then "al" before the first search settles never lets the "a" results flash back over "al"'s.
45
+ - Editing the text away from the current selection clears the form value (`null`) immediately — a stale object never lingers behind edited text.
46
+ - Works with either a `Promise`-returning or an `Observable`-returning `search` (an active `Observable` subscription is replaced, not stacked, when a newer search starts).
47
+ - The panel is positioned with `getBoundingClientRect()`, the same technique as `Select` — it escapes an ancestor's `overflow: hidden`.
48
+
49
+ ## Example
50
+
51
+ ```html
52
+ <gbt-autocomplete
53
+ label="Utilisateur"
54
+ placeholder="Rechercher un utilisateur…"
55
+ [search]="searchUsers"
56
+ [displayFn]="displayUser"
57
+ formControlName="assignee"
58
+ />
59
+ ```
60
+
61
+ ```ts
62
+ searchUsers = (query: string) =>
63
+ this.http.get<User[]>('/api/users', { params: { q: query } })
64
+
65
+ displayUser = (user: User) => user.name
66
+ ```
67
+
68
+ Custom rendering per suggestion, via `itemTemplate`:
69
+
70
+ ```html
71
+ <gbt-autocomplete [search]="searchUsers" [displayFn]="displayUser" [itemTemplate]="userRow" formControlName="assignee">
72
+ </gbt-autocomplete>
73
+ <ng-template #userRow let-user>
74
+ <img [src]="user.avatarUrl" width="20" height="20" />
75
+ <span>{{ user.name }}</span>
76
+ </ng-template>
77
+ ```
@@ -0,0 +1,34 @@
1
+ # Avatar
2
+
3
+ Visual representation of a user — an image, or a fallback of initials
4
+ computed from their name if there's no image, or the image fails to
5
+ load.
6
+
7
+ **Selector**: `gbt-avatar`
8
+
9
+ ## Inputs
10
+
11
+ | Input | Type | Default | Role |
12
+ | ------ | ----------------------- | ------- | --------------------------------------------------------------------- |
13
+ | `name` | `string` | required | Full name — drives the initials fallback and the image's `alt` text. |
14
+ | `src` | `string \| null` | `null` | Image URL. Falls back to initials if absent, or if it fails to load. |
15
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | 24px / 32px / 48px. |
16
+
17
+ ## Example
18
+
19
+ ```html
20
+ <gbt-avatar name="Ada Lovelace" [src]="user.avatarUrl" size="sm" />
21
+ ```
22
+
23
+ ## Behavior
24
+
25
+ - Initials: first letter of the first and last word of `name` (e.g.
26
+ "Ada Lovelace" → "AL"), or the first two letters for a single-word
27
+ name.
28
+ - A failed image load (`(error)`) switches to the initials fallback —
29
+ the broken-image icon a browser would otherwise show is never
30
+ visible.
31
+ - The fallback uses a single neutral color (`--primary`/
32
+ `--text-on-primary`, already AAA-contrast), not a color hashed per
33
+ user — simpler, and one fewer palette to audit. Revisit if visually
34
+ distinguishing users in a dense list turns out to matter.
@@ -0,0 +1,47 @@
1
+ # AvatarGroup
2
+
3
+ A row of overlapping `Avatar`s — up to `max` shown, the rest folded
4
+ into a "+N" indicator that opens a menu listing them. Every avatar,
5
+ visible or in the overflow menu, is clickable — e.g. to filter a list
6
+ down to that one user.
7
+
8
+ **Selector**: `gbt-avatar-group`
9
+
10
+ ## Inputs
11
+
12
+ | Input | Type | Default | Role |
13
+ | ----------- | -------------------------- | --------- | -------------------------------------------------------------------- |
14
+ | `items` | `T[]` (`{ name, src? }`) | required | The users to show. `T` can carry extra fields (e.g. `id`) — the full item comes back on `itemClick`. |
15
+ | `max` | `number` | `5` | Avatars shown before folding the rest into "+N". |
16
+ | `ariaLabel` | `string` | `'Users'` | Accessible name of the avatar row. |
17
+ | `moreLabel` | `(count: number) => string`| `` (count) => `${count} more` `` | Accessible name of the "+N" button, and the overflow menu's label. |
18
+ | `activeItem` | `T \| null` | `null` | The currently active filter, compared by reference against `items`. A visible avatar gets an outer ring; the matching row in the overflow menu gets a check icon (both also get `aria-current="true"`). |
19
+
20
+ ## Outputs
21
+
22
+ | Output | Type | Role |
23
+ | ----------- | ---- | ----------------------------------------------------------------------- |
24
+ | `itemClick` | `T` | Emitted when any avatar is clicked — the visible ones, or one from the overflow menu. |
25
+
26
+ ## Example
27
+
28
+ ```html
29
+ <gbt-avatar-group
30
+ [items]="users"
31
+ [max]="5"
32
+ [activeItem]="selectedUser"
33
+ (itemClick)="selectedUser = selectedUser === $event ? null : $event"
34
+ />
35
+ ```
36
+
37
+ ```ts
38
+ users: User[] = [{ id: '1', name: 'Ada Lovelace', src: user.avatarUrl }, ...]
39
+ selectedUser: User | null = null
40
+ ```
41
+
42
+ ## Behavior
43
+
44
+ - Reuses `Avatar` for each item (`md` size in the row, `sm` size in the
45
+ overflow menu) — no separate initials/fallback logic of its own.
46
+ - The overflow menu is positioned the same way as `Select`/`Menu`
47
+ (`getBoundingClientRect`), closes on `Escape` or an outside click.
@@ -0,0 +1,177 @@
1
+ # Badge
2
+
3
+ Short status/category label — a colored pill for text content (e.g. a
4
+ role, a status, a count), purely informational. Not interactive by default;
5
+ see [Copy](#copy) for the one exception (a small copy button inside the
6
+ pill). Not removable; see the component's GitHub issue if you need a
7
+ dismissible chip variant later.
8
+
9
+ **Selector**: `gbt-badge`. Also replaces the former `gbt-code-chip` (via the
10
+ `mono`/`copyable` inputs below) and `gbt-counter` (via `value`) — see
11
+ [Migrating from CodeChip](#migrating-from-codechip) and
12
+ [Migrating from Counter](#migrating-from-counter).
13
+
14
+ ## Inputs
15
+
16
+ | Input | Type | Default | Role |
17
+ | ------------- | ----------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
18
+ | `variant` | `BadgeVariant` | `'neutral'` | `'neutral' \| 'success' \| 'warning' \| 'error' \| 'info'`. |
19
+ | `icon` | `string` | none | Optional `gbt-icon` name, shown before the label. |
20
+ | `appearance` | `'filled' \| 'outline'` | `'filled'` | `outline`: transparent, 1px border in the variant's text colour (`--border-color` for `neutral`). Same height as `filled`. |
21
+ | `size` | `'md' \| 'sm'` | `'md'` | `sm`: smaller pill (11px), for counters and dense rows. |
22
+ | `truncate` | `boolean` | `false` | The badge may shrink below its content and ellipsises its label (see below). |
23
+ | `tabularNums` | `boolean` | `false` | `font-variant-numeric: tabular-nums`, so a live count keeps a steady width. |
24
+ | `mono` | `boolean` | `false` | Monospace font, hairline border, tighter shape — the look of the former `gbt-code-chip`. See [below](#mono-monospacecode). |
25
+ | `maxWidth` | `string \| null` | `null` | Caps the pill's width (any CSS length, `12rem`). From `gbt-code-chip`. |
26
+ | `fullText` | `string \| null` | `null` | The complete text, as a native tooltip (`title`) on the label: useful when `truncate` cuts it. From `gbt-code-chip`. |
27
+ | `copyable` | `boolean` | `false` | Adds a small copy button inside the badge. From `gbt-code-chip`. |
28
+ | `copyValue` | `string \| null` | `null` | What the button copies; by default the badge's own visible text. |
29
+ | `copyLabel` | `string` | `'Copy'` | Accessible name of the copy button ("Copy the commit SHA"). |
30
+ | `copiedText` | `string` | `'Copied'` | Announced after a copy (visually hidden live region: the glyph turns into a check). |
31
+ | `failedText` | `string` | `'Copy failed'` | Announced when the copy is refused; the badge text is selected for a manual copy. |
32
+ | `feedbackMs` | `number` | `2000` | How long the copied glyph stays. |
33
+ | `value` | `number \| null` | `null` | Numeric counter mode: replaces the projected content with this count. From `gbt-counter`. See [below](#value-numeric-counter-mode). |
34
+ | `max` | `number \| null` | `null` | Counter mode: caps the display, e.g. `max` `99` shows `120` as `99+`. `null`: no cap. |
35
+ | `hideZero` | `boolean` | `false` | Counter mode: hides the badge (`hidden` on the host) when the shown count is `0`. |
36
+ | `label` | `string \| null` | `null` | Counter mode: visually hidden text read after the number ("12 open issues"). |
37
+
38
+ ## Outputs
39
+
40
+ | Output | Type | Role |
41
+ | ------------ | -------- | ----------------------------------------------------------------------- |
42
+ | `copied` | `string` | Emitted with the copied text after a successful copy (`copyable` only). |
43
+ | `copyFailed` | `void` | Emitted when the copy is refused (`copyable` only). |
44
+
45
+ ## Content
46
+
47
+ The badge's text comes from projected content (`<ng-content />`), not
48
+ an input — like a native `<span>`, so it composes naturally with
49
+ interpolation, `@if`, or plain text — **except** in `value` mode (see
50
+ below), where the projected content is ignored and the computed count is
51
+ rendered instead.
52
+
53
+ ## Truncation
54
+
55
+ In a narrow row a long label pushes its badge past the container. With `truncate`
56
+ the host and the pill are allowed to shrink (`min-width: 0`, `max-width: 100%`) and
57
+ the label ends in an ellipsis; a `max-width` on `<gbt-badge>` (or the `maxWidth` input)
58
+ caps it below the container width. The full text stays in the DOM for assistive
59
+ technology; add a `title` on the host, or the `fullText` input, for a hover tooltip.
60
+ If the badge is a flex item, give its wrapper `min-width: 0` as well.
61
+
62
+ ```html
63
+ <li style="display: flex; min-width: 0">
64
+ <gbt-badge appearance="outline" truncate [attr.title]="event">{{ event }}</gbt-badge>
65
+ </li>
66
+ ```
67
+
68
+ ## `mono` (monospace/code)
69
+
70
+ `mono` gives the badge the monospace font, hairline border and tighter shape
71
+ suited for a commit SHA, a tag, a branch name or a repository path, in a row,
72
+ a meta line or a sentence. It
73
+ layers on top of `variant`/`appearance`: an explicit colored variant still
74
+ wins for background/color (declared later in `badge.scss`); `mono` alone
75
+ only changes the shape and the type.
76
+
77
+ ```html
78
+ <gbt-badge mono icon="git-commit" fullText="{{ sha }}">{{ sha.slice(0, 7) }}</gbt-badge>
79
+ ```
80
+
81
+ ## Copy
82
+
83
+ Same engine as [`gbt-copy-button`](../copy-button/README.md) (Clipboard API, `execCommand` fallback,
84
+ refusal selects the text), reusing `ClipboardFeedback` — no logic is duplicated. The badge itself is
85
+ not interactive: only its copy button is, with a 24 px hit area (drawn outside the pill so it does not
86
+ grow). The outcome is announced by a `role="status"` region that exists as long as the badge is
87
+ `copyable`.
88
+
89
+ ```html
90
+ <gbt-badge mono icon="git-commit" copyable [copyValue]="commit.sha" copyLabel="Copy the commit SHA"
91
+ >{{ commit.sha.slice(0, 7) }}</gbt-badge
92
+ >
93
+ ```
94
+
95
+ ## `value` (numeric counter mode)
96
+
97
+ Setting `value` switches the badge into the former `gbt-counter`'s mode: the
98
+ projected content is **ignored**, and the badge computes and renders the
99
+ count itself — fractions cut, negatives and non-numbers count as `0` — capped
100
+ by `max` (`120` with `max` `99` shows `99+`) and hideable at `0` with
101
+ `hideZero` (via the `hidden` attribute — the element stays in the DOM, no
102
+ `@if` needed around it). `label` adds a visually hidden suffix after the
103
+ number ("12 open issues"): **a bare number is ambiguous for assistive
104
+ technology** unless the surrounding context (a heading, a tab) already says
105
+ what it counts — see [AUDIT.md](AUDIT.md).
106
+
107
+ ```html
108
+ <h2>Pages <gbt-badge [value]="pages().length" hideZero label="pages" /></h2>
109
+
110
+ <button gbtTab>Closed <gbt-badge [value]="closed()" [max]="99" size="sm" /></button>
111
+ <gbt-badge [value]="toReview()" variant="info" size="sm" label="to review" />
112
+ ```
113
+
114
+ Badge already has `tabularNums` for equal-width digits (a live count does not
115
+ jitter) — set it explicitly in counter usage: it is not implied by `value`.
116
+
117
+ ## Migrating from CodeChip
118
+
119
+ `gbt-code-chip` is gone; use `gbt-badge` with `mono` (its label is a `<span>`, not a `<code>`
120
+ wrapper, styled the same way). Every other `gbt-code-chip` input keeps its name:
121
+
122
+ ```html
123
+ <!-- before -->
124
+ <gbt-code-chip icon="git-commit" copyable [copyValue]="sha" copyLabel="Copy the commit SHA"
125
+ >{{ sha.slice(0, 7) }}</gbt-code-chip
126
+ >
127
+
128
+ <!-- after -->
129
+ <gbt-badge mono icon="git-commit" copyable [copyValue]="sha" copyLabel="Copy the commit SHA"
130
+ >{{ sha.slice(0, 7) }}</gbt-badge
131
+ >
132
+ ```
133
+
134
+ One behavioural difference: `gbt-code-chip`'s `truncate` defaulted to `true`
135
+ (and `truncate="false"` made it wrap instead of overflowing, via
136
+ `white-space: normal; overflow-wrap: anywhere`). `gbt-badge`'s `truncate`
137
+ keeps its own default of `false` and has no such wrapping mode — a mono
138
+ badge that needs the ellipsis behaviour should set `truncate` explicitly; one
139
+ that needs to wrap instead should sit inside a block-level container.
140
+
141
+ ## Migrating from Counter
142
+
143
+ `gbt-counter` is gone; use `gbt-badge` with `value` (and the same `max` /
144
+ `hideZero` / `label` names):
145
+
146
+ ```html
147
+ <!-- before -->
148
+ <gbt-counter [value]="pages().length" hideZero label="pages" />
149
+
150
+ <!-- after -->
151
+ <gbt-badge [value]="pages().length" hideZero label="pages" />
152
+ ```
153
+
154
+ `gbt-counter`'s `appearance` (`'neutral' | 'primary'`) has no exact `gbt-badge`
155
+ equivalent: Badge's own `variant`/`appearance`/`size` axes replace it.
156
+ `appearance="neutral"` (the old default) is closest to `gbt-badge`'s own
157
+ default look (no `variant`, `appearance="filled"`); there is no ready-made
158
+ "brand-filled" look for the old `appearance="primary"` — pick the semantic
159
+ `variant` that fits (e.g. `variant="info"`) or a custom class. `size="sm"`/
160
+ `"md"` map directly. This is a visual difference to review when migrating a
161
+ call site, not just a rename.
162
+
163
+ ## Example
164
+
165
+ ```html
166
+ <gbt-badge variant="success">Actif</gbt-badge>
167
+ <gbt-badge variant="error" icon="alert-triangle">Erreur</gbt-badge>
168
+ ```
169
+
170
+ ```html
171
+ <gbt-badge appearance="outline" variant="success">Current version</gbt-badge>
172
+ <gbt-badge size="sm" tabularNums>1,118</gbt-badge>
173
+ ```
174
+
175
+ ## Accessibility
176
+
177
+ See [AUDIT.md](AUDIT.md).
@@ -0,0 +1,44 @@
1
+ # BarChart
2
+
3
+ Bar chart on the dataviz base — measures its container, reacts to the
4
+ pointer and keyboard, carries its own visually-hidden
5
+ `gbt-chart-table`.
6
+
7
+ **Selector**: `gbt-bar-chart`
8
+
9
+ ## Inputs
10
+
11
+ | Input | Type | Default | Role |
12
+ | -------------- | ------------------------------------------- | -------- | ---------------------------------------------------------------- |
13
+ | `series` | `ChartSeries<string>` | required | `{ label, points, pattern? }` — a series, category axis. |
14
+ | `locale` | `string` | required | Locale used to format numbers. |
15
+ | `label` | `string` | required | Accessible name of the chart. |
16
+ | `tableCaption` | `string` | required | Caption of the `sr-only` table. |
17
+ | `xColumn` | `string` | required | Header of that table's x-axis column. |
18
+ | `emptyMessage` | `string` | required | Message shown when the series is empty. |
19
+ | `yTickCount` | `number` | `5` | Target number of ticks on the y-axis. |
20
+ | `size` | `{ width: number; height: number } \| null` | `null` | Explicit dimensions — reserved for server rendering, tests. |
21
+ | `heading` | `string` | `''` | Block title. Empty by default: no header is rendered without it. |
22
+ | `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `2` | Level of the rendered heading. |
23
+ | `headline` | `string` | `''` | Current value, already formatted — "360 GiB". |
24
+ | `trend` | `string` | `''` | Change over the period, already formatted. |
25
+
26
+ **Fluid width with a chosen height** — the common case — is achieved by
27
+ setting the height in CSS on the wrapping container, without passing
28
+ `[size]`. See [`../chart-frame/README.md`](../chart/chart-frame/README.md) for
29
+ the full sizing contract and hover behavior.
30
+
31
+ ## Example
32
+
33
+ ```html
34
+ <div style="height: 18rem">
35
+ <gbt-bar-chart
36
+ [series]="{ label: 'Requêtes', points: [{ x: 'Lun', y: 12 }, { x: 'Mar', y: 40 }] }"
37
+ locale="fr-FR"
38
+ label="Requêtes par jour"
39
+ tableCaption="Détail des requêtes par jour"
40
+ xColumn="Jour"
41
+ emptyMessage="Aucune donnée"
42
+ />
43
+ </div>
44
+ ```
@@ -0,0 +1,38 @@
1
+ # Breadcrumb
2
+
3
+ Trail of ancestor links plus a current segment — purely presentational,
4
+ no router dependency.
5
+
6
+ **Selector**: `gbt-breadcrumb`
7
+
8
+ ## Inputs
9
+
10
+ | Input | Type | Role |
11
+ | ----------- | -------- | ---------------------------------------------------- |
12
+ | `ariaLabel` | `string` | Required. Accessible name of the breadcrumb `<nav>`. |
13
+
14
+ ## Projected content
15
+
16
+ | Selector | Role |
17
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
18
+ | `[breadcrumb-ancestor]` | Zero or more ancestor items, in order — each projected as `<li breadcrumb-ancestor>` wrapping a real link (the `<ol>` content model and the CSS separator rule both depend on the projected node being an `<li>`, not the link itself). `.gbt-breadcrumb__item` (in `_utilities.scss`) for styling, applied to the link. |
19
+ | Default | The current segment: plain text, or an interactive element like `gbt-menu` if the current item doubles as a switcher. |
20
+
21
+ Separators (`/`) between items are rendered automatically via CSS — the
22
+ consuming app never adds them itself.
23
+
24
+ ## Example
25
+
26
+ ```html
27
+ <gbt-breadcrumb ariaLabel="Fil d'Ariane">
28
+ <li breadcrumb-ancestor><a class="gbt-breadcrumb__item" routerLink="/groupe">Groupe</a></li>
29
+ <li breadcrumb-ancestor>
30
+ <a class="gbt-breadcrumb__item" routerLink="/groupe/sous-groupe">Sous-groupe</a>
31
+ </li>
32
+ <gbt-menu label="Dépôt" align="start">
33
+ <a role="menuitem" class="gbt-menu__item" routerLink="/groupe/sous-groupe/autre-depot"
34
+ >autre-depot</a
35
+ >
36
+ </gbt-menu>
37
+ </gbt-breadcrumb>
38
+ ```
@@ -0,0 +1,175 @@
1
+ # Button
2
+
3
+ Action button, or an anchor styled the same way — visual variants, sizes,
4
+ loading state, toggle and disclosure semantics. One component, two selectors
5
+ on the same class:
6
+
7
+ - **`gbt-button`** — a `<button>`, for an in-page action.
8
+ - **`a[gbtButton]`** — a real `<a>` that looks exactly like a `gbt-button`,
9
+ for a router link, a download, or any navigation. It is
10
+ **router-agnostic**: it never imports `@angular/router`. Put `routerLink`
11
+ (or a plain `href`), a `download`… on the same element yourself.
12
+
13
+ ```ts
14
+ import { Button } from '@masmarino/gabarit'
15
+ ```
16
+
17
+ ## Inputs (button form — `gbt-button`)
18
+
19
+ | Input | Type | Default | Role |
20
+ | -------------- | ----------------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | `variant` | `'primary' \| 'secondary' \| 'danger' \| 'ghost' \| 'ghost-danger' \| 'link'` | `'primary'` | Visual treatment. See [Variants](#variants). |
22
+ | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Button size: at least 32 / 38 / 44px tall for `small` / `medium` / `large` (the shared `--gbt-control-height-*` scale, level with a field of the same tier); `large` is the 44px touch target. |
23
+ | `type` | `'button' \| 'submit'` | `'button'` | Native `type` attribute. |
24
+ | `text` | `string` | `''` | Visible label. The text `<span>` is only rendered when this is not empty. |
25
+ | `iconName` | `string \| null` | `null` | Icon shown before the text, if provided. |
26
+ | `ariaLabel` | `string \| null` | `null` | Accessible name, when the visible label isn't enough (mandatory for an icon-only button). |
27
+ | `loading` | `boolean` | `false` | Shows a loading indicator, disables the button. |
28
+ | `loadingLabel` | `string` | `'Loading'` | Text announced while loading (`.sr-only`). |
29
+ | `disabled` | `boolean` | `false` | Disables the button. |
30
+ | `pressed` | `boolean \| null` | `null` | Toggle button: renders `aria-pressed="true"` / `"false"`. `null` renders no attribute (an ordinary button). |
31
+ | `ariaExpanded` | `boolean \| null` | `null` | Disclosure or menu trigger: renders `aria-expanded`. `null` renders no attribute. |
32
+ | `ariaControls` | `string \| null` | `null` | Id of the element the button controls (`aria-controls`). |
33
+ | `ariaHaspopup` | `'menu' \| 'listbox' \| 'tree' \| 'grid' \| 'dialog' \| boolean \| null` | `null` | Kind of popup the button opens (`aria-haspopup`); `true` means a menu. |
34
+ | `block` | `boolean` | `false` | Stretches the button to the width of its container. |
35
+ | `iconOnly` | `boolean` | `false` | Squares the button around its icon (same padding on every side, as wide as tall: 32 / 38 / 44px for `small` / `medium` / `large`). Set `ariaLabel`. |
36
+
37
+ ## Outputs (button form)
38
+
39
+ | Output | Type | Role |
40
+ | --------- | ------ | --------------------------------------------- |
41
+ | `clicked` | `void` | Emitted on click (not disabled, not loading). |
42
+
43
+ ## Inputs (anchor form — `a[gbtButton]`)
44
+
45
+ | Input | Type | Default | Role |
46
+ | ---------- | ----------------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------- |
47
+ | `variant` | `'primary' \| 'secondary' \| 'danger' \| 'ghost' \| 'ghost-danger' \| 'link'` | `'primary'` | Visual treatment (same as `gbt-button`). |
48
+ | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Size: at least 32 / 38 / 44px tall for `small` / `medium` / `large` (the shared `--gbt-control-height-*` scale). |
49
+ | `iconName` | `string \| null` | `null` | Icon shown before the projected text. |
50
+ | `block` | `boolean` | `false` | Stretches the link to the width of its container. |
51
+ | `iconOnly` | `boolean` | `false` | Squares the link around its icon. Give the anchor an `aria-label`. |
52
+ | `disabled` | `boolean` | `false` | Link "disabled" semantics: `aria-disabled="true"`, `tabindex="-1"`, the click is swallowed (see below). |
53
+
54
+ The anchor's label is the projected content. Keep it a single text node or
55
+ wrap richer content in one `<span>`: the direct children are laid out as a
56
+ flex row with a 0.5rem gap, exactly like the button's icon and text. The
57
+ anchor form has no `type`, `text`, `ariaLabel`, `loading`, `loadingLabel`,
58
+ `pressed`, `ariaExpanded`, `ariaControls` or `ariaHaspopup` input — those are
59
+ native-`<button>` concerns the anchor form doesn't need (they exist on the
60
+ shared class but have no effect there; the anchor's accessible name is its
61
+ own `aria-label` attribute or its projected text, same as any link).
62
+
63
+ ## One class, two selectors
64
+
65
+ `Button` is a single Angular class with `selector: 'gbt-button, a[gbtButton]'`.
66
+ Its constructor inspects `ElementRef.nativeElement.tagName` once to tell
67
+ which form it is applied to:
68
+
69
+ - On `<gbt-button>` it renders an internal native `<button>` carrying
70
+ `type`/`disabled`/the ARIA attributes above, and emits `clicked` on a real
71
+ click (guarded by `disabled`/`loading`).
72
+ - On `a[gbtButton]` there is no internal wrapper: the host **is** the anchor.
73
+ The button-look classes (`gbt-button`, `gbt-button--{variant}`,
74
+ `gbt-button--{size}`, `gbt-button--icon-only`) are put on the host itself,
75
+ and a capture-phase `click`/`auxclick` listener plus a tabindex-restore
76
+ effect implement the disabled-link semantics below. It never imports
77
+ `@angular/router`.
78
+
79
+ Both forms share the same variant/size look: `_button-look.scss` is a single
80
+ Sass mixin, called once for the inner `<button>` (class selectors) and once
81
+ more with `$host: true` for the anchor (`:host(...)` selectors) — there is
82
+ exactly one place that defines "the gbt-button look".
83
+
84
+ ## Variants
85
+
86
+ | Variant | Use |
87
+ | -------------- | ---------------------------------------------------------------------------------------------------------- |
88
+ | `primary` | The main action of a view. |
89
+ | `secondary` | A neutral action, outlined. |
90
+ | `danger` | A destructive action, filled. |
91
+ | `ghost` | A quiet action: no fill, no border until hovered — toolbars, rows, icon-only buttons. |
92
+ | `ghost-danger` | A quiet destructive action (delete in a row): looks like `ghost` until hovered or focused, then turns red. |
93
+ | `link` | A text action inside running content: primary colour, underlined, no box. |
94
+
95
+ ## Icon-only
96
+
97
+ `text` is left empty: no text `<span>` is rendered, so nothing but the icon
98
+ sits in the flex row (no stray gap). Add `iconOnly` to square the box, and an
99
+ `ariaLabel` for the accessible name:
100
+
101
+ ```html
102
+ <gbt-button
103
+ variant="ghost-danger"
104
+ size="small"
105
+ iconName="x"
106
+ [iconOnly]="true"
107
+ ariaLabel="Delete label"
108
+ />
109
+ ```
110
+
111
+ Without `iconOnly` an icon-only button keeps the button's normal padding (a
112
+ slightly wider box) and renders no text `<span>` or gap around the icon.
113
+
114
+ ## Toggle and disclosure
115
+
116
+ `pressed`, `ariaExpanded`, `ariaControls` and `ariaHaspopup` only reflect state:
117
+ the consumer flips it in its `clicked` handler. A pressed button also draws a
118
+ 2px ring inside its box, so the state is not conveyed by colour alone.
119
+
120
+ ```html
121
+ <gbt-button
122
+ variant="secondary"
123
+ [text]="following() ? 'Following' : 'Follow'"
124
+ [pressed]="following()"
125
+ (clicked)="toggle()"
126
+ />
127
+
128
+ <gbt-button
129
+ text="Advanced"
130
+ iconName="chevron-down"
131
+ [ariaExpanded]="open()"
132
+ ariaControls="advanced"
133
+ (clicked)="open.set(!open())"
134
+ />
135
+ ```
136
+
137
+ ## Anchor: disabled
138
+
139
+ A link cannot be `disabled` natively. With `[disabled]="true"` the anchor gets
140
+ `aria-disabled="true"` and `tabindex="-1"` (a `tabindex` you had set is restored when it is enabled again), is dimmed with a `not-allowed`
141
+ cursor, and every `click` and middle click (`auxclick`) on it — including one
142
+ that lands on the icon — is stopped in the capture phase, before a `routerLink`
143
+ on the same element (or your own `(click)`) can run. `href` is left in place:
144
+ the attribute belongs to the consumer.
145
+
146
+ ## Examples
147
+
148
+ ```html
149
+ <gbt-button text="Enregistrer" variant="primary" (clicked)="save()" />
150
+ <gbt-button text="Se connecter" size="large" [block]="true" type="submit" />
151
+
152
+ <a gbtButton href="/groups">Groups</a>
153
+
154
+ <a gbtButton variant="secondary" iconName="folder" routerLink="/repositories">Repositories</a>
155
+
156
+ <a
157
+ gbtButton
158
+ variant="ghost"
159
+ size="small"
160
+ [iconOnly]="true"
161
+ iconName="plus"
162
+ aria-label="New group"
163
+ routerLink="/groups/new"
164
+ ></a>
165
+
166
+ <a gbtButton href="/export.csv" download [disabled]="!ready()">Download</a>
167
+ ```
168
+
169
+ With a router, activeness/`aria-current` stay the consumer's business
170
+ (`routerLinkActive`); the anchor renders exactly the attributes you put on it,
171
+ plus the ones above.
172
+
173
+ ## Accessibility
174
+
175
+ See [AUDIT.md](AUDIT.md).