@masmarino/gabarit 1.4.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 (348) hide show
  1. package/README.md +231 -144
  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 +21 -11
  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/fonts/OFL-ibm-plex.txt +93 -0
  200. package/fonts/ibm-plex-mono-400.woff2 +0 -0
  201. package/fonts/ibm-plex-mono-500.woff2 +0 -0
  202. package/fonts/ibm-plex-sans-400.woff2 +0 -0
  203. package/fonts/ibm-plex-sans-500.woff2 +0 -0
  204. package/fonts/ibm-plex-sans-600.woff2 +0 -0
  205. package/fonts/ibm-plex-sans-condensed-600.woff2 +0 -0
  206. package/fonts/index.scss +28 -0
  207. package/funnel-chart/README.md +39 -0
  208. package/gauge-bar/README.md +35 -0
  209. package/git-field/README.md +34 -0
  210. package/icon/README.md +52 -0
  211. package/icon-marker/README.md +37 -0
  212. package/input/README.md +120 -0
  213. package/job-graph/README.md +76 -0
  214. package/job-status/README.md +34 -0
  215. package/line-chart/README.md +52 -0
  216. package/list-card/README.md +144 -0
  217. package/list-row/README.md +72 -0
  218. package/list-toolbar/README.md +52 -0
  219. package/menu/README.md +90 -0
  220. package/mfa-enrollment/README.md +189 -0
  221. package/mfa-settings/README.md +154 -0
  222. package/modal/README.md +72 -0
  223. package/nav-tabs/README.md +106 -0
  224. package/notification-dot/README.md +43 -0
  225. package/package.json +335 -1
  226. package/page-header/README.md +56 -0
  227. package/page-layout/README.md +76 -0
  228. package/pagination/README.md +73 -0
  229. package/panel/README.md +56 -0
  230. package/passkey-settings/README.md +120 -0
  231. package/pie-chart/README.md +85 -0
  232. package/popover/README.md +62 -0
  233. package/radio-group/README.md +47 -0
  234. package/save-status/README.md +44 -0
  235. package/search-bar/README.md +84 -0
  236. package/secret-reveal/README.md +60 -0
  237. package/segmented-control/README.md +79 -0
  238. package/select/README.md +61 -0
  239. package/skeleton/README.md +49 -0
  240. package/skeleton-list/README.md +40 -0
  241. package/slider/README.md +44 -0
  242. package/sparkline/README.md +37 -0
  243. package/spinner/README.md +41 -0
  244. package/src/lib/tokens/_a11y.scss +22 -0
  245. package/src/lib/tokens/_base.scss +31 -0
  246. package/src/lib/tokens/_palette.scss +52 -51
  247. package/src/lib/tokens/_semantic.scss +17 -124
  248. package/src/lib/tokens/_themes.scss +144 -0
  249. package/src/lib/tokens/_utilities.scss +10 -10
  250. package/src/lib/tokens/index.scss +3 -0
  251. package/stat-grid/README.md +47 -0
  252. package/stat-tile/README.md +75 -0
  253. package/stepper/README.md +67 -0
  254. package/switch/README.md +51 -0
  255. package/table/README.md +75 -0
  256. package/tabs/README.md +34 -0
  257. package/tag/README.md +34 -0
  258. package/tag-input/README.md +45 -0
  259. package/textarea/README.md +76 -0
  260. package/timeline-chart/README.md +49 -0
  261. package/toaster/README.md +92 -0
  262. package/tooltip/README.md +50 -0
  263. package/tree/README.md +79 -0
  264. package/types/masmarino-gabarit-accordion.d.ts +54 -0
  265. package/types/masmarino-gabarit-alert.d.ts +65 -0
  266. package/types/masmarino-gabarit-app-shell.d.ts +102 -0
  267. package/types/masmarino-gabarit-auth-activate.d.ts +70 -0
  268. package/types/masmarino-gabarit-auth-login.d.ts +63 -0
  269. package/types/masmarino-gabarit-auth-register.d.ts +66 -0
  270. package/types/masmarino-gabarit-auth-reset-password.d.ts +53 -0
  271. package/types/masmarino-gabarit-auth.d.ts +543 -0
  272. package/types/masmarino-gabarit-autocomplete.d.ts +139 -0
  273. package/types/masmarino-gabarit-avatar-group.d.ts +59 -0
  274. package/types/masmarino-gabarit-avatar.d.ts +31 -0
  275. package/types/masmarino-gabarit-badge.d.ts +139 -0
  276. package/types/masmarino-gabarit-bar-chart.d.ts +111 -0
  277. package/types/masmarino-gabarit-breadcrumb.d.ts +12 -0
  278. package/types/masmarino-gabarit-button.d.ts +108 -0
  279. package/types/masmarino-gabarit-card.d.ts +102 -0
  280. package/types/masmarino-gabarit-chart.d.ts +361 -0
  281. package/types/masmarino-gabarit-checkbox-group.d.ts +113 -0
  282. package/types/masmarino-gabarit-checkbox.d.ts +49 -0
  283. package/types/masmarino-gabarit-confirm-danger-modal.d.ts +94 -0
  284. package/types/masmarino-gabarit-copy-button.d.ts +111 -0
  285. package/types/masmarino-gabarit-copy-field.d.ts +64 -0
  286. package/types/masmarino-gabarit-date-picker.d.ts +397 -0
  287. package/types/masmarino-gabarit-description-list.d.ts +40 -0
  288. package/types/masmarino-gabarit-dimension-card.d.ts +55 -0
  289. package/types/masmarino-gabarit-disclosure.d.ts +44 -0
  290. package/types/masmarino-gabarit-divider.d.ts +20 -0
  291. package/types/masmarino-gabarit-docs.d.ts +20 -59
  292. package/types/masmarino-gabarit-drawer.d.ts +51 -0
  293. package/types/masmarino-gabarit-empty-state.d.ts +67 -0
  294. package/types/masmarino-gabarit-file-upload.d.ts +95 -0
  295. package/types/masmarino-gabarit-floating-panel.d.ts +7 -0
  296. package/types/masmarino-gabarit-format.d.ts +54 -0
  297. package/types/masmarino-gabarit-funnel-chart.d.ts +78 -0
  298. package/types/masmarino-gabarit-gauge-bar.d.ts +54 -0
  299. package/types/masmarino-gabarit-git-field.d.ts +39 -0
  300. package/types/masmarino-gabarit-icon-marker.d.ts +47 -0
  301. package/types/masmarino-gabarit-icon.d.ts +23 -0
  302. package/types/masmarino-gabarit-input.d.ts +181 -0
  303. package/types/masmarino-gabarit-job-graph.d.ts +63 -0
  304. package/types/masmarino-gabarit-job-status.d.ts +20 -0
  305. package/types/masmarino-gabarit-line-chart.d.ts +153 -0
  306. package/types/masmarino-gabarit-list-card.d.ts +87 -0
  307. package/types/masmarino-gabarit-list-row.d.ts +14 -0
  308. package/types/masmarino-gabarit-list-toolbar.d.ts +100 -0
  309. package/types/masmarino-gabarit-menu.d.ts +92 -0
  310. package/types/masmarino-gabarit-mfa-enrollment.d.ts +142 -0
  311. package/types/masmarino-gabarit-mfa-settings.d.ts +89 -0
  312. package/types/masmarino-gabarit-modal.d.ts +60 -0
  313. package/types/masmarino-gabarit-nav-tabs.d.ts +65 -0
  314. package/types/masmarino-gabarit-notification-dot.d.ts +34 -0
  315. package/types/masmarino-gabarit-page-header.d.ts +20 -0
  316. package/types/masmarino-gabarit-page-layout.d.ts +46 -0
  317. package/types/masmarino-gabarit-pagination.d.ts +109 -0
  318. package/types/masmarino-gabarit-panel.d.ts +21 -0
  319. package/types/masmarino-gabarit-passkey-settings.d.ts +94 -0
  320. package/types/masmarino-gabarit-pie-chart.d.ts +94 -0
  321. package/types/masmarino-gabarit-popover.d.ts +32 -0
  322. package/types/masmarino-gabarit-radio-group.d.ts +66 -0
  323. package/types/masmarino-gabarit-save-status.d.ts +39 -0
  324. package/types/masmarino-gabarit-search-bar.d.ts +183 -0
  325. package/types/masmarino-gabarit-secret-reveal.d.ts +95 -0
  326. package/types/masmarino-gabarit-segmented-control.d.ts +76 -0
  327. package/types/masmarino-gabarit-select.d.ts +145 -0
  328. package/types/masmarino-gabarit-skeleton-list.d.ts +54 -0
  329. package/types/masmarino-gabarit-skeleton.d.ts +26 -0
  330. package/types/masmarino-gabarit-slider.d.ts +73 -0
  331. package/types/masmarino-gabarit-sparkline.d.ts +70 -0
  332. package/types/masmarino-gabarit-spinner.d.ts +20 -0
  333. package/types/masmarino-gabarit-stat-grid.d.ts +39 -0
  334. package/types/masmarino-gabarit-stat-tile.d.ts +79 -0
  335. package/types/masmarino-gabarit-stepper.d.ts +67 -0
  336. package/types/masmarino-gabarit-switch.d.ts +42 -0
  337. package/types/masmarino-gabarit-table.d.ts +60 -0
  338. package/types/masmarino-gabarit-tabs.d.ts +40 -0
  339. package/types/masmarino-gabarit-tag-input.d.ts +78 -0
  340. package/types/masmarino-gabarit-tag.d.ts +35 -0
  341. package/types/masmarino-gabarit-textarea.d.ts +109 -0
  342. package/types/masmarino-gabarit-timeline-chart.d.ts +145 -0
  343. package/types/masmarino-gabarit-toaster.d.ts +62 -0
  344. package/types/masmarino-gabarit-tooltip.d.ts +38 -0
  345. package/types/masmarino-gabarit-tree.d.ts +71 -0
  346. package/types/masmarino-gabarit-user-chip.d.ts +26 -0
  347. package/types/masmarino-gabarit.d.ts +83 -6605
  348. package/user-chip/README.md +42 -0
@@ -0,0 +1,510 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, computed, forwardRef, inject, input, signal } from "@angular/core";
3
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
4
+ import { Icon } from "@masmarino/gabarit/icon";
5
+ import { Tag } from "@masmarino/gabarit/tag";
6
+ import { floatingPanelAnchor } from "@masmarino/gabarit/floating-panel";
7
+ let nextSelectId = 0;
8
+ var Select = class Select {
9
+ elementRef = inject(ElementRef);
10
+ id = input(`gbt-select-${++nextSelectId}`, ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
11
+ label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
12
+ size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
13
+ hint = input("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
14
+ hideLabel = input(false, {
15
+ ...ngDevMode ? { debugName: "hideLabel" } : /* istanbul ignore next */ {},
16
+ transform: booleanAttribute
17
+ });
18
+ fullWidth = input(false, {
19
+ ...ngDevMode ? { debugName: "fullWidth" } : /* istanbul ignore next */ {},
20
+ transform: booleanAttribute
21
+ });
22
+ options = input.required(...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
23
+ multiple = input(false, {
24
+ ...ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {},
25
+ transform: booleanAttribute
26
+ });
27
+ chips = input(false, {
28
+ ...ngDevMode ? { debugName: "chips" } : /* istanbul ignore next */ {},
29
+ transform: booleanAttribute
30
+ });
31
+ placeholder = input("Select…", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
32
+ disabled = input(false, {
33
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
34
+ transform: booleanAttribute
35
+ });
36
+ required = input(false, {
37
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
38
+ transform: booleanAttribute
39
+ });
40
+ errorMessage = input(null, ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
41
+ selectedCountLabel = input((count) => `${count} selected`, ...ngDevMode ? [{ debugName: "selectedCountLabel" }] : /* istanbul ignore next */ []);
42
+ chipRemoveLabel = input((label) => `Remove ${label}`, ...ngDevMode ? [{ debugName: "chipRemoveLabel" }] : /* istanbul ignore next */ []);
43
+ noOptionsMessage = input("No options", ...ngDevMode ? [{ debugName: "noOptionsMessage" }] : /* istanbul ignore next */ []);
44
+ open = signal(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
45
+ activeIndex = signal(-1, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
46
+ selected = signal([], ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
47
+ panelStyle = signal(null, ...ngDevMode ? [{ debugName: "panelStyle" }] : /* istanbul ignore next */ []);
48
+ formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
49
+ labelId = computed(() => `${this.id()}-label`, ...ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []);
50
+ chipsId = computed(() => `${this.id()}-chips`, ...ngDevMode ? [{ debugName: "chipsId" }] : /* istanbul ignore next */ []);
51
+ hintId = computed(() => `${this.id()}-hint`, ...ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []);
52
+ showHint = computed(() => !!this.hint() && !this.errorMessage(), ...ngDevMode ? [{ debugName: "showHint" }] : /* istanbul ignore next */ []);
53
+ isDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
54
+ onChange = () => {};
55
+ onTouched = () => {};
56
+ setDisabledState(isDisabled) {
57
+ this.formDisabled.set(isDisabled);
58
+ }
59
+ writeValue(value) {
60
+ if (this.multiple()) this.selected.set(Array.isArray(value) ? value : []);
61
+ else this.selected.set(value === null || value === void 0 ? [] : [value]);
62
+ }
63
+ registerOnChange(fn) {
64
+ this.onChange = fn;
65
+ }
66
+ registerOnTouched(fn) {
67
+ this.onTouched = fn;
68
+ }
69
+ selectedOptions = computed(() => {
70
+ const selected = this.selected();
71
+ return this.options().filter((option) => selected.includes(option.value));
72
+ }, ...ngDevMode ? [{ debugName: "selectedOptions" }] : /* istanbul ignore next */ []);
73
+ triggerLabel = computed(() => {
74
+ const opts = this.selectedOptions();
75
+ if (opts.length === 0) return this.placeholder();
76
+ if (this.chips() && this.multiple()) return this.placeholder();
77
+ if (this.multiple() && opts.length > 1) return this.selectedCountLabel()(opts.length);
78
+ return opts[0].label;
79
+ }, ...ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []);
80
+ chipsVisible = computed(() => this.chips() && this.multiple() && this.selectedOptions().length > 0, ...ngDevMode ? [{ debugName: "chipsVisible" }] : /* istanbul ignore next */ []);
81
+ describedBy = computed(() => {
82
+ const ids = [];
83
+ if (this.chipsVisible()) ids.push(this.chipsId());
84
+ if (this.errorMessage()) ids.push(`${this.id()}-error`);
85
+ else if (this.showHint()) ids.push(this.hintId());
86
+ return ids.length > 0 ? ids.join(" ") : null;
87
+ }, ...ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []);
88
+ triggerIcon = computed(() => {
89
+ const opts = this.selectedOptions();
90
+ return opts.length === 1 ? opts[0].icon : void 0;
91
+ }, ...ngDevMode ? [{ debugName: "triggerIcon" }] : /* istanbul ignore next */ []);
92
+ activeOptionId = computed(() => this.open() && this.activeIndex() >= 0 ? `${this.id()}-option-${this.activeIndex()}` : null, ...ngDevMode ? [{ debugName: "activeOptionId" }] : /* istanbul ignore next */ []);
93
+ hasNoOptions = computed(() => this.options().length === 0, ...ngDevMode ? [{ debugName: "hasNoOptions" }] : /* istanbul ignore next */ []);
94
+ isSelected(value) {
95
+ return this.selected().includes(value);
96
+ }
97
+ toggleOpen() {
98
+ if (this.isDisabled()) return;
99
+ this.open.update((value) => !value);
100
+ if (this.open()) {
101
+ const options = this.options();
102
+ this.activeIndex.set(options.length === 0 ? -1 : Math.max(0, options.findIndex((o) => this.isSelected(o.value))));
103
+ this.updatePanelPosition();
104
+ } else this.onTouched();
105
+ }
106
+ updatePanelPosition() {
107
+ const trigger = this.elementRef.nativeElement.querySelector(".gbt-select__trigger");
108
+ const anchor = floatingPanelAnchor(this.open(), trigger, (rect) => {
109
+ const chipRow = this.elementRef.nativeElement.querySelector(".gbt-select__chips");
110
+ return chipRow ? Math.max(rect.bottom, chipRow.getBoundingClientRect().bottom) : rect.bottom;
111
+ });
112
+ if (anchor) this.panelStyle.set({
113
+ top: `${anchor.bottom}px`,
114
+ left: `${anchor.left}px`,
115
+ width: `${anchor.rect.width}px`
116
+ });
117
+ }
118
+ removeChip(value, index) {
119
+ if (this.isDisabled()) return;
120
+ const host = this.elementRef.nativeElement;
121
+ const removeButtons = Array.from(host.querySelectorAll(".gbt-select__chips .gbt-tag__remove"));
122
+ const nextFocus = removeButtons[index + 1] ?? removeButtons[index - 1] ?? host.querySelector(".gbt-select__trigger");
123
+ this.selectOption(value);
124
+ nextFocus?.focus();
125
+ }
126
+ selectOption(value) {
127
+ if (this.multiple()) {
128
+ const current = this.selected();
129
+ const next = current.includes(value) ? current.filter((v) => v !== value) : [...current, value];
130
+ this.selected.set(next);
131
+ this.onChange(next);
132
+ this.onTouched();
133
+ } else {
134
+ this.selected.set([value]);
135
+ this.onChange(value);
136
+ this.open.set(false);
137
+ this.onTouched();
138
+ }
139
+ }
140
+ handleClickOutside(event) {
141
+ if (this.open() && !this.elementRef.nativeElement.contains(event.target)) {
142
+ this.open.set(false);
143
+ this.onTouched();
144
+ }
145
+ }
146
+ onKeydown(event) {
147
+ if (this.isDisabled()) return;
148
+ if (!this.open()) {
149
+ if (event.key === "ArrowDown" || event.key === "Enter" || event.key === " ") {
150
+ event.preventDefault();
151
+ this.toggleOpen();
152
+ }
153
+ return;
154
+ }
155
+ const options = this.options();
156
+ switch (event.key) {
157
+ case "Escape":
158
+ event.preventDefault();
159
+ event.stopPropagation();
160
+ this.open.set(false);
161
+ this.onTouched();
162
+ break;
163
+ case "ArrowDown":
164
+ event.preventDefault();
165
+ if (options.length > 0) this.activeIndex.update((i) => Math.min(i + 1, options.length - 1));
166
+ break;
167
+ case "ArrowUp":
168
+ event.preventDefault();
169
+ if (options.length > 0) this.activeIndex.update((i) => Math.max(i - 1, 0));
170
+ break;
171
+ case "Enter":
172
+ case " ": {
173
+ event.preventDefault();
174
+ const active = options[this.activeIndex()];
175
+ if (active) this.selectOption(active.value);
176
+ break;
177
+ }
178
+ }
179
+ }
180
+ static ɵfac = i0.ɵɵngDeclareFactory({
181
+ minVersion: "12.0.0",
182
+ version: "22.2.0",
183
+ ngImport: i0,
184
+ type: Select,
185
+ deps: [],
186
+ target: i0.ɵɵFactoryTarget.Component
187
+ });
188
+ static ɵcmp = i0.ɵɵngDeclareComponent({
189
+ minVersion: "17.0.0",
190
+ version: "22.2.0",
191
+ type: Select,
192
+ isStandalone: true,
193
+ selector: "gbt-select",
194
+ inputs: {
195
+ id: {
196
+ classPropertyName: "id",
197
+ publicName: "id",
198
+ isSignal: true,
199
+ isRequired: false,
200
+ transformFunction: null
201
+ },
202
+ label: {
203
+ classPropertyName: "label",
204
+ publicName: "label",
205
+ isSignal: true,
206
+ isRequired: false,
207
+ transformFunction: null
208
+ },
209
+ size: {
210
+ classPropertyName: "size",
211
+ publicName: "size",
212
+ isSignal: true,
213
+ isRequired: false,
214
+ transformFunction: null
215
+ },
216
+ hint: {
217
+ classPropertyName: "hint",
218
+ publicName: "hint",
219
+ isSignal: true,
220
+ isRequired: false,
221
+ transformFunction: null
222
+ },
223
+ hideLabel: {
224
+ classPropertyName: "hideLabel",
225
+ publicName: "hideLabel",
226
+ isSignal: true,
227
+ isRequired: false,
228
+ transformFunction: null
229
+ },
230
+ fullWidth: {
231
+ classPropertyName: "fullWidth",
232
+ publicName: "fullWidth",
233
+ isSignal: true,
234
+ isRequired: false,
235
+ transformFunction: null
236
+ },
237
+ options: {
238
+ classPropertyName: "options",
239
+ publicName: "options",
240
+ isSignal: true,
241
+ isRequired: true,
242
+ transformFunction: null
243
+ },
244
+ multiple: {
245
+ classPropertyName: "multiple",
246
+ publicName: "multiple",
247
+ isSignal: true,
248
+ isRequired: false,
249
+ transformFunction: null
250
+ },
251
+ chips: {
252
+ classPropertyName: "chips",
253
+ publicName: "chips",
254
+ isSignal: true,
255
+ isRequired: false,
256
+ transformFunction: null
257
+ },
258
+ placeholder: {
259
+ classPropertyName: "placeholder",
260
+ publicName: "placeholder",
261
+ isSignal: true,
262
+ isRequired: false,
263
+ transformFunction: null
264
+ },
265
+ disabled: {
266
+ classPropertyName: "disabled",
267
+ publicName: "disabled",
268
+ isSignal: true,
269
+ isRequired: false,
270
+ transformFunction: null
271
+ },
272
+ required: {
273
+ classPropertyName: "required",
274
+ publicName: "required",
275
+ isSignal: true,
276
+ isRequired: false,
277
+ transformFunction: null
278
+ },
279
+ errorMessage: {
280
+ classPropertyName: "errorMessage",
281
+ publicName: "errorMessage",
282
+ isSignal: true,
283
+ isRequired: false,
284
+ transformFunction: null
285
+ },
286
+ selectedCountLabel: {
287
+ classPropertyName: "selectedCountLabel",
288
+ publicName: "selectedCountLabel",
289
+ isSignal: true,
290
+ isRequired: false,
291
+ transformFunction: null
292
+ },
293
+ chipRemoveLabel: {
294
+ classPropertyName: "chipRemoveLabel",
295
+ publicName: "chipRemoveLabel",
296
+ isSignal: true,
297
+ isRequired: false,
298
+ transformFunction: null
299
+ },
300
+ noOptionsMessage: {
301
+ classPropertyName: "noOptionsMessage",
302
+ publicName: "noOptionsMessage",
303
+ isSignal: true,
304
+ isRequired: false,
305
+ transformFunction: null
306
+ }
307
+ },
308
+ host: {
309
+ listeners: {
310
+ "document:click": "handleClickOutside($event)",
311
+ "keydown": "onKeydown($event)",
312
+ "window:scroll": "updatePanelPosition()",
313
+ "window:resize": "updatePanelPosition()"
314
+ },
315
+ properties: {
316
+ "class.gbt-select--sm": "size() === 'sm'",
317
+ "class.gbt-select--full": "fullWidth()"
318
+ }
319
+ },
320
+ providers: [{
321
+ provide: NG_VALUE_ACCESSOR,
322
+ useExisting: forwardRef(() => Select),
323
+ multi: true
324
+ }],
325
+ ngImport: i0,
326
+ template: "<div class=\"gbt-select\" [class.gbt-select--disabled]=\"isDisabled()\">\n @if (label()) {\n <label\n [id]=\"labelId()\"\n [for]=\"id()\"\n class=\"gbt-select__label\"\n [class.gbt-select__label--hidden]=\"hideLabel()\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n\n <button\n type=\"button\"\n [id]=\"id()\"\n class=\"gbt-select__trigger\"\n [class.gbt-select__trigger--open]=\"open()\"\n [disabled]=\"isDisabled()\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? id() + '-listbox' : null\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [attr.aria-labelledby]=\"label() ? labelId() + ' ' + id() : null\"\n [attr.aria-label]=\"label() ? null : placeholder() || null\"\n [attr.aria-required]=\"required() ? true : null\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"toggleOpen()\"\n >\n @if (triggerIcon(); as icon) {\n <gbt-icon [name]=\"icon\" class=\"gbt-select__trigger-icon\" aria-hidden=\"true\" />\n }\n <span\n class=\"gbt-select__trigger-label\"\n [class.gbt-select__trigger-label--placeholder]=\"selectedOptions().length === 0\"\n >\n {{ triggerLabel() }}\n </span>\n <gbt-icon name=\"chevron-down\" class=\"gbt-select__chevron\" aria-hidden=\"true\" />\n </button>\n @if (chipsVisible()) {\n <div class=\"gbt-select__chips\" [id]=\"chipsId()\">\n @for (option of selectedOptions(); track option.value; let i = $index) {\n <gbt-tag\n [color]=\"option.color ?? '#6b7280'\"\n [removable]=\"!isDisabled()\"\n [disabled]=\"isDisabled()\"\n [removeLabel]=\"chipRemoveLabel()(option.label)\"\n (removed)=\"removeChip(option.value, i)\"\n >\n {{ option.label }}\n </gbt-tag>\n }\n </div>\n }\n @if (chips() && multiple()) {\n <div role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">\n {{ selectedCountLabel()(selectedOptions().length) }}\n </div>\n }\n @if (open() && panelStyle(); as style) {\n @if (hasNoOptions()) {\n <div\n [id]=\"id() + '-listbox'\"\n class=\"gbt-select__panel gbt-select__empty\"\n role=\"status\"\n [style.top]=\"style.top\"\n [style.left]=\"style.left\"\n [style.width]=\"style.width\"\n >\n {{ noOptionsMessage() }}\n </div>\n } @else {\n <ul\n [id]=\"id() + '-listbox'\"\n class=\"gbt-select__panel\"\n role=\"listbox\"\n [attr.aria-label]=\"label() || placeholder()\"\n [attr.aria-multiselectable]=\"multiple()\"\n [style.top]=\"style.top\"\n [style.left]=\"style.left\"\n [style.width]=\"style.width\"\n >\n @for (option of options(); track option.value; let i = $index) {\n <li role=\"presentation\">\n <button\n [id]=\"id() + '-option-' + i\"\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"gbt-select__option\"\n [class.gbt-select__option--selected]=\"isSelected(option.value)\"\n [class.gbt-select__option--active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n (click)=\"selectOption(option.value)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (option.icon) {\n <gbt-icon [name]=\"option.icon\" class=\"gbt-select__option-icon\" aria-hidden=\"true\" />\n }\n <span class=\"gbt-select__option-label\">{{ option.label }}</span>\n @if (isSelected(option.value)) {\n <gbt-icon name=\"check\" class=\"gbt-select__option-check\" aria-hidden=\"true\" />\n }\n </button>\n </li>\n }\n </ul>\n }\n }\n @if (showHint()) {\n <p [id]=\"hintId()\" class=\"gbt-select__hint\">{{ hint() }}</p>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-select__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n",
327
+ styles: [":host{position:relative;display:inline-block;min-width:180px}.gbt-select{display:flex;flex-direction:column;gap:.375rem}.gbt-select--disabled{opacity:.5}.gbt-select__label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-select__label--hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host(.gbt-select--full){display:block;width:100%}.gbt-select__trigger{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;height:var(--gbt-control-height-md);padding:0 10px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);color:var(--text-primary);font-size:14px;cursor:pointer;transition:border-color .15s cubic-bezier(.4,0,.2,1),box-shadow .15s cubic-bezier(.4,0,.2,1)}.gbt-select__trigger:hover:not(:disabled){border-color:var(--border-color)}.gbt-select__trigger--open{border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 12%,transparent)}.gbt-select__trigger:disabled{cursor:not-allowed}:host(.gbt-select--sm){min-width:120px}:host(.gbt-select--sm) .gbt-select__trigger{height:var(--gbt-control-height-sm);padding:0 8px;font-size:13px}.gbt-select__trigger-icon{flex-shrink:0;color:var(--text-secondary)}.gbt-select__trigger-label{flex:1;min-width:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-select__trigger-label--placeholder{color:var(--text-discret)}.gbt-select__chevron{flex-shrink:0;color:var(--text-secondary);transition:transform .2s cubic-bezier(.4,0,.2,1)}.gbt-select__trigger--open .gbt-select__chevron{transform:rotate(180deg)}.gbt-select__panel{position:fixed;z-index:1000;margin:0;padding:6px;list-style:none;max-height:280px;overflow-y:auto;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);box-shadow:var(--site-shadow-lg);animation:gbt-select-scale-in .15s cubic-bezier(.34,1.56,.64,1) both}.gbt-select__panel::-webkit-scrollbar{width:6px}.gbt-select__panel::-webkit-scrollbar-track{background:transparent}.gbt-select__panel::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}.gbt-select__empty{box-sizing:border-box;padding:10px 12px;color:var(--text-secondary);font-size:13px}.gbt-select__option{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;background:transparent;border:none;border-radius:var(--gbt-radius-menu, 4px);color:var(--text-primary);font-size:14px;text-align:left;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-select__option:hover,.gbt-select__option--active{background:var(--bg-hover)}.gbt-select__option--selected{color:var(--primary);font-weight:600}.gbt-select__option-icon{flex-shrink:0;color:var(--text-secondary)}.gbt-select__option--selected .gbt-select__option-icon{color:var(--primary)}.gbt-select__option-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-select__option-check{flex-shrink:0;color:var(--primary)}@keyframes gbt-select-scale-in{0%{opacity:0;transform:scale(.97) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}.gbt-select__chips{display:flex;flex-wrap:wrap;gap:4px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.gbt-select__hint{margin:0;font-size:.75rem;color:var(--text-secondary)}.gbt-select__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-select__panel{animation:none}.gbt-select__chevron{transition:none}}\n"],
328
+ dependencies: [{
329
+ kind: "component",
330
+ type: Icon,
331
+ selector: "gbt-icon",
332
+ inputs: ["name"]
333
+ }, {
334
+ kind: "component",
335
+ type: Tag,
336
+ selector: "gbt-tag",
337
+ inputs: [
338
+ "color",
339
+ "removable",
340
+ "removeLabel",
341
+ "disabled"
342
+ ],
343
+ outputs: ["removed"]
344
+ }],
345
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
346
+ });
347
+ };
348
+ i0.ɵɵngDeclareClassMetadata({
349
+ minVersion: "12.0.0",
350
+ version: "22.2.0",
351
+ ngImport: i0,
352
+ type: Select,
353
+ decorators: [{
354
+ type: Component,
355
+ args: [{
356
+ selector: "gbt-select",
357
+ standalone: true,
358
+ imports: [Icon, Tag],
359
+ changeDetection: ChangeDetectionStrategy.OnPush,
360
+ host: {
361
+ "(document:click)": "handleClickOutside($event)",
362
+ "(keydown)": "onKeydown($event)",
363
+ "(window:scroll)": "updatePanelPosition()",
364
+ "(window:resize)": "updatePanelPosition()",
365
+ "[class.gbt-select--sm]": "size() === 'sm'",
366
+ "[class.gbt-select--full]": "fullWidth()"
367
+ },
368
+ providers: [{
369
+ provide: NG_VALUE_ACCESSOR,
370
+ useExisting: forwardRef(() => Select),
371
+ multi: true
372
+ }],
373
+ template: "<div class=\"gbt-select\" [class.gbt-select--disabled]=\"isDisabled()\">\n @if (label()) {\n <label\n [id]=\"labelId()\"\n [for]=\"id()\"\n class=\"gbt-select__label\"\n [class.gbt-select__label--hidden]=\"hideLabel()\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n\n <button\n type=\"button\"\n [id]=\"id()\"\n class=\"gbt-select__trigger\"\n [class.gbt-select__trigger--open]=\"open()\"\n [disabled]=\"isDisabled()\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? id() + '-listbox' : null\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [attr.aria-labelledby]=\"label() ? labelId() + ' ' + id() : null\"\n [attr.aria-label]=\"label() ? null : placeholder() || null\"\n [attr.aria-required]=\"required() ? true : null\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"toggleOpen()\"\n >\n @if (triggerIcon(); as icon) {\n <gbt-icon [name]=\"icon\" class=\"gbt-select__trigger-icon\" aria-hidden=\"true\" />\n }\n <span\n class=\"gbt-select__trigger-label\"\n [class.gbt-select__trigger-label--placeholder]=\"selectedOptions().length === 0\"\n >\n {{ triggerLabel() }}\n </span>\n <gbt-icon name=\"chevron-down\" class=\"gbt-select__chevron\" aria-hidden=\"true\" />\n </button>\n @if (chipsVisible()) {\n <div class=\"gbt-select__chips\" [id]=\"chipsId()\">\n @for (option of selectedOptions(); track option.value; let i = $index) {\n <gbt-tag\n [color]=\"option.color ?? '#6b7280'\"\n [removable]=\"!isDisabled()\"\n [disabled]=\"isDisabled()\"\n [removeLabel]=\"chipRemoveLabel()(option.label)\"\n (removed)=\"removeChip(option.value, i)\"\n >\n {{ option.label }}\n </gbt-tag>\n }\n </div>\n }\n @if (chips() && multiple()) {\n <div role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">\n {{ selectedCountLabel()(selectedOptions().length) }}\n </div>\n }\n @if (open() && panelStyle(); as style) {\n @if (hasNoOptions()) {\n <div\n [id]=\"id() + '-listbox'\"\n class=\"gbt-select__panel gbt-select__empty\"\n role=\"status\"\n [style.top]=\"style.top\"\n [style.left]=\"style.left\"\n [style.width]=\"style.width\"\n >\n {{ noOptionsMessage() }}\n </div>\n } @else {\n <ul\n [id]=\"id() + '-listbox'\"\n class=\"gbt-select__panel\"\n role=\"listbox\"\n [attr.aria-label]=\"label() || placeholder()\"\n [attr.aria-multiselectable]=\"multiple()\"\n [style.top]=\"style.top\"\n [style.left]=\"style.left\"\n [style.width]=\"style.width\"\n >\n @for (option of options(); track option.value; let i = $index) {\n <li role=\"presentation\">\n <button\n [id]=\"id() + '-option-' + i\"\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"gbt-select__option\"\n [class.gbt-select__option--selected]=\"isSelected(option.value)\"\n [class.gbt-select__option--active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n (click)=\"selectOption(option.value)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (option.icon) {\n <gbt-icon [name]=\"option.icon\" class=\"gbt-select__option-icon\" aria-hidden=\"true\" />\n }\n <span class=\"gbt-select__option-label\">{{ option.label }}</span>\n @if (isSelected(option.value)) {\n <gbt-icon name=\"check\" class=\"gbt-select__option-check\" aria-hidden=\"true\" />\n }\n </button>\n </li>\n }\n </ul>\n }\n }\n @if (showHint()) {\n <p [id]=\"hintId()\" class=\"gbt-select__hint\">{{ hint() }}</p>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-select__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n",
374
+ styles: [":host{position:relative;display:inline-block;min-width:180px}.gbt-select{display:flex;flex-direction:column;gap:.375rem}.gbt-select--disabled{opacity:.5}.gbt-select__label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-select__label--hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host(.gbt-select--full){display:block;width:100%}.gbt-select__trigger{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;height:var(--gbt-control-height-md);padding:0 10px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);color:var(--text-primary);font-size:14px;cursor:pointer;transition:border-color .15s cubic-bezier(.4,0,.2,1),box-shadow .15s cubic-bezier(.4,0,.2,1)}.gbt-select__trigger:hover:not(:disabled){border-color:var(--border-color)}.gbt-select__trigger--open{border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 12%,transparent)}.gbt-select__trigger:disabled{cursor:not-allowed}:host(.gbt-select--sm){min-width:120px}:host(.gbt-select--sm) .gbt-select__trigger{height:var(--gbt-control-height-sm);padding:0 8px;font-size:13px}.gbt-select__trigger-icon{flex-shrink:0;color:var(--text-secondary)}.gbt-select__trigger-label{flex:1;min-width:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-select__trigger-label--placeholder{color:var(--text-discret)}.gbt-select__chevron{flex-shrink:0;color:var(--text-secondary);transition:transform .2s cubic-bezier(.4,0,.2,1)}.gbt-select__trigger--open .gbt-select__chevron{transform:rotate(180deg)}.gbt-select__panel{position:fixed;z-index:1000;margin:0;padding:6px;list-style:none;max-height:280px;overflow-y:auto;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);box-shadow:var(--site-shadow-lg);animation:gbt-select-scale-in .15s cubic-bezier(.34,1.56,.64,1) both}.gbt-select__panel::-webkit-scrollbar{width:6px}.gbt-select__panel::-webkit-scrollbar-track{background:transparent}.gbt-select__panel::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}.gbt-select__empty{box-sizing:border-box;padding:10px 12px;color:var(--text-secondary);font-size:13px}.gbt-select__option{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;background:transparent;border:none;border-radius:var(--gbt-radius-menu, 4px);color:var(--text-primary);font-size:14px;text-align:left;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-select__option:hover,.gbt-select__option--active{background:var(--bg-hover)}.gbt-select__option--selected{color:var(--primary);font-weight:600}.gbt-select__option-icon{flex-shrink:0;color:var(--text-secondary)}.gbt-select__option--selected .gbt-select__option-icon{color:var(--primary)}.gbt-select__option-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-select__option-check{flex-shrink:0;color:var(--primary)}@keyframes gbt-select-scale-in{0%{opacity:0;transform:scale(.97) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}.gbt-select__chips{display:flex;flex-wrap:wrap;gap:4px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.gbt-select__hint{margin:0;font-size:.75rem;color:var(--text-secondary)}.gbt-select__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-select__panel{animation:none}.gbt-select__chevron{transition:none}}\n"]
375
+ }]
376
+ }],
377
+ propDecorators: {
378
+ id: [{
379
+ type: i0.Input,
380
+ args: [{
381
+ isSignal: true,
382
+ alias: "id",
383
+ required: false
384
+ }]
385
+ }],
386
+ label: [{
387
+ type: i0.Input,
388
+ args: [{
389
+ isSignal: true,
390
+ alias: "label",
391
+ required: false
392
+ }]
393
+ }],
394
+ size: [{
395
+ type: i0.Input,
396
+ args: [{
397
+ isSignal: true,
398
+ alias: "size",
399
+ required: false
400
+ }]
401
+ }],
402
+ hint: [{
403
+ type: i0.Input,
404
+ args: [{
405
+ isSignal: true,
406
+ alias: "hint",
407
+ required: false
408
+ }]
409
+ }],
410
+ hideLabel: [{
411
+ type: i0.Input,
412
+ args: [{
413
+ isSignal: true,
414
+ alias: "hideLabel",
415
+ required: false
416
+ }]
417
+ }],
418
+ fullWidth: [{
419
+ type: i0.Input,
420
+ args: [{
421
+ isSignal: true,
422
+ alias: "fullWidth",
423
+ required: false
424
+ }]
425
+ }],
426
+ options: [{
427
+ type: i0.Input,
428
+ args: [{
429
+ isSignal: true,
430
+ alias: "options",
431
+ required: true
432
+ }]
433
+ }],
434
+ multiple: [{
435
+ type: i0.Input,
436
+ args: [{
437
+ isSignal: true,
438
+ alias: "multiple",
439
+ required: false
440
+ }]
441
+ }],
442
+ chips: [{
443
+ type: i0.Input,
444
+ args: [{
445
+ isSignal: true,
446
+ alias: "chips",
447
+ required: false
448
+ }]
449
+ }],
450
+ placeholder: [{
451
+ type: i0.Input,
452
+ args: [{
453
+ isSignal: true,
454
+ alias: "placeholder",
455
+ required: false
456
+ }]
457
+ }],
458
+ disabled: [{
459
+ type: i0.Input,
460
+ args: [{
461
+ isSignal: true,
462
+ alias: "disabled",
463
+ required: false
464
+ }]
465
+ }],
466
+ required: [{
467
+ type: i0.Input,
468
+ args: [{
469
+ isSignal: true,
470
+ alias: "required",
471
+ required: false
472
+ }]
473
+ }],
474
+ errorMessage: [{
475
+ type: i0.Input,
476
+ args: [{
477
+ isSignal: true,
478
+ alias: "errorMessage",
479
+ required: false
480
+ }]
481
+ }],
482
+ selectedCountLabel: [{
483
+ type: i0.Input,
484
+ args: [{
485
+ isSignal: true,
486
+ alias: "selectedCountLabel",
487
+ required: false
488
+ }]
489
+ }],
490
+ chipRemoveLabel: [{
491
+ type: i0.Input,
492
+ args: [{
493
+ isSignal: true,
494
+ alias: "chipRemoveLabel",
495
+ required: false
496
+ }]
497
+ }],
498
+ noOptionsMessage: [{
499
+ type: i0.Input,
500
+ args: [{
501
+ isSignal: true,
502
+ alias: "noOptionsMessage",
503
+ required: false
504
+ }]
505
+ }]
506
+ }
507
+ });
508
+ export { Select };
509
+
510
+ //# sourceMappingURL=masmarino-gabarit-select.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"masmarino-gabarit-select.mjs","names":[],"sources":["../../../projects/gabarit/select/select.ts","../../../projects/gabarit/select/select.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n signal,\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { Icon } from '@masmarino/gabarit/icon'\nimport { Tag } from '@masmarino/gabarit/tag'\nimport { floatingPanelAnchor } from '@masmarino/gabarit/floating-panel'\n\nexport interface SelectOption<T = string> {\n value: T\n label: string\n icon?: string\n color?: string\n}\n\nlet nextSelectId = 0\n\n@Component({\n selector: 'gbt-select',\n standalone: true,\n imports: [Icon, Tag],\n templateUrl: './select.html',\n styleUrl: './select.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(document:click)': 'handleClickOutside($event)',\n '(keydown)': 'onKeydown($event)',\n '(window:scroll)': 'updatePanelPosition()',\n '(window:resize)': 'updatePanelPosition()',\n '[class.gbt-select--sm]': \"size() === 'sm'\",\n '[class.gbt-select--full]': 'fullWidth()',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Select),\n multi: true,\n },\n ],\n})\nexport class Select<T = string> implements ControlValueAccessor {\n private readonly elementRef = inject(ElementRef)\n\n id = input<string>(`gbt-select-${++nextSelectId}`)\n label = input<string>('')\n size = input<'md' | 'sm'>('md')\n hint = input<string>('')\n hideLabel = input(false, { transform: booleanAttribute })\n fullWidth = input(false, { transform: booleanAttribute })\n options = input.required<SelectOption<T>[]>()\n multiple = input(false, { transform: booleanAttribute })\n chips = input(false, { transform: booleanAttribute })\n placeholder = input<string>('Select…')\n disabled = input(false, { transform: booleanAttribute })\n required = input(false, { transform: booleanAttribute })\n errorMessage = input<string | null>(null)\n selectedCountLabel = input<(count: number) => string>((count) => `${count} selected`)\n chipRemoveLabel = input<(label: string) => string>((label) => `Remove ${label}`)\n noOptionsMessage = input<string>('No options')\n\n protected readonly open = signal(false)\n protected readonly activeIndex = signal(-1)\n protected readonly selected = signal<T[]>([])\n protected readonly panelStyle = signal<{ top: string; left: string; width: string } | null>(null)\n private readonly formDisabled = signal(false)\n\n protected readonly labelId = computed(() => `${this.id()}-label`)\n protected readonly chipsId = computed(() => `${this.id()}-chips`)\n protected readonly hintId = computed(() => `${this.id()}-hint`)\n protected readonly showHint = computed(() => !!this.hint() && !this.errorMessage())\n protected readonly isDisabled = computed(() => this.disabled() || this.formDisabled())\n\n private onChange: (value: T | T[] | null) => void = () => {}\n private onTouched: () => void = () => {}\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled)\n }\n\n writeValue(value: T | T[] | null): void {\n if (this.multiple()) {\n this.selected.set(Array.isArray(value) ? (value as T[]) : [])\n } else {\n this.selected.set(value === null || value === undefined ? [] : [value as T])\n }\n }\n\n registerOnChange(fn: (value: T | T[] | null) => void): void {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn\n }\n\n protected readonly selectedOptions = computed(() => {\n const selected = this.selected()\n return this.options().filter((option) => selected.includes(option.value))\n })\n\n protected readonly triggerLabel = computed(() => {\n const opts = this.selectedOptions()\n if (opts.length === 0) {\n return this.placeholder()\n }\n if (this.chips() && this.multiple()) {\n return this.placeholder()\n }\n if (this.multiple() && opts.length > 1) {\n return this.selectedCountLabel()(opts.length)\n }\n return opts[0].label\n })\n\n protected readonly chipsVisible = computed(\n () => this.chips() && this.multiple() && this.selectedOptions().length > 0,\n )\n\n protected readonly describedBy = computed(() => {\n const ids: string[] = []\n if (this.chipsVisible()) {\n ids.push(this.chipsId())\n }\n if (this.errorMessage()) {\n ids.push(`${this.id()}-error`)\n } else if (this.showHint()) {\n ids.push(this.hintId())\n }\n return ids.length > 0 ? ids.join(' ') : null\n })\n\n protected readonly triggerIcon = computed(() => {\n const opts = this.selectedOptions()\n return opts.length === 1 ? opts[0].icon : undefined\n })\n\n protected readonly activeOptionId = computed(() =>\n this.open() && this.activeIndex() >= 0 ? `${this.id()}-option-${this.activeIndex()}` : null,\n )\n\n protected readonly hasNoOptions = computed(() => this.options().length === 0)\n\n protected isSelected(value: T): boolean {\n return this.selected().includes(value)\n }\n\n protected toggleOpen(): void {\n if (this.isDisabled()) {\n return\n }\n this.open.update((value) => !value)\n if (this.open()) {\n const options = this.options()\n this.activeIndex.set(\n options.length === 0\n ? -1\n : Math.max(\n 0,\n options.findIndex((o) => this.isSelected(o.value)),\n ),\n )\n this.updatePanelPosition()\n } else {\n this.onTouched()\n }\n }\n\n protected updatePanelPosition(): void {\n const trigger = this.elementRef.nativeElement.querySelector(\n '.gbt-select__trigger',\n ) as HTMLElement | null\n const anchor = floatingPanelAnchor(this.open(), trigger, (rect) => {\n const chipRow = this.elementRef.nativeElement.querySelector(\n '.gbt-select__chips',\n ) as HTMLElement | null\n return chipRow ? Math.max(rect.bottom, chipRow.getBoundingClientRect().bottom) : rect.bottom\n })\n if (anchor) {\n this.panelStyle.set({\n top: `${anchor.bottom}px`,\n left: `${anchor.left}px`,\n width: `${anchor.rect.width}px`,\n })\n }\n }\n\n protected removeChip(value: T, index: number): void {\n if (this.isDisabled()) {\n return\n }\n const host = this.elementRef.nativeElement as HTMLElement\n const removeButtons = Array.from(\n host.querySelectorAll<HTMLElement>('.gbt-select__chips .gbt-tag__remove'),\n )\n const nextFocus =\n removeButtons[index + 1] ??\n removeButtons[index - 1] ??\n host.querySelector<HTMLElement>('.gbt-select__trigger')\n this.selectOption(value)\n nextFocus?.focus()\n }\n\n protected selectOption(value: T): void {\n if (this.multiple()) {\n const current = this.selected()\n const next = current.includes(value)\n ? current.filter((v) => v !== value)\n : [...current, value]\n this.selected.set(next)\n this.onChange(next)\n this.onTouched()\n } else {\n this.selected.set([value])\n this.onChange(value)\n this.open.set(false)\n this.onTouched()\n }\n }\n\n protected handleClickOutside(event: MouseEvent): void {\n if (this.open() && !this.elementRef.nativeElement.contains(event.target)) {\n this.open.set(false)\n this.onTouched()\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (this.isDisabled()) {\n return\n }\n if (!this.open()) {\n if (event.key === 'ArrowDown' || event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n this.toggleOpen()\n }\n return\n }\n const options = this.options()\n switch (event.key) {\n case 'Escape':\n event.preventDefault()\n event.stopPropagation()\n this.open.set(false)\n this.onTouched()\n break\n case 'ArrowDown':\n event.preventDefault()\n if (options.length > 0) {\n this.activeIndex.update((i) => Math.min(i + 1, options.length - 1))\n }\n break\n case 'ArrowUp':\n event.preventDefault()\n if (options.length > 0) {\n this.activeIndex.update((i) => Math.max(i - 1, 0))\n }\n break\n case 'Enter':\n case ' ': {\n event.preventDefault()\n const active = options[this.activeIndex()]\n if (active) {\n this.selectOption(active.value)\n }\n break\n }\n }\n }\n}\n","<div class=\"gbt-select\" [class.gbt-select--disabled]=\"isDisabled()\">\n @if (label()) {\n <label\n [id]=\"labelId()\"\n [for]=\"id()\"\n class=\"gbt-select__label\"\n [class.gbt-select__label--hidden]=\"hideLabel()\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n\n <button\n type=\"button\"\n [id]=\"id()\"\n class=\"gbt-select__trigger\"\n [class.gbt-select__trigger--open]=\"open()\"\n [disabled]=\"isDisabled()\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? id() + '-listbox' : null\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [attr.aria-labelledby]=\"label() ? labelId() + ' ' + id() : null\"\n [attr.aria-label]=\"label() ? null : placeholder() || null\"\n [attr.aria-required]=\"required() ? true : null\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"toggleOpen()\"\n >\n @if (triggerIcon(); as icon) {\n <gbt-icon [name]=\"icon\" class=\"gbt-select__trigger-icon\" aria-hidden=\"true\" />\n }\n <span\n class=\"gbt-select__trigger-label\"\n [class.gbt-select__trigger-label--placeholder]=\"selectedOptions().length === 0\"\n >\n {{ triggerLabel() }}\n </span>\n <gbt-icon name=\"chevron-down\" class=\"gbt-select__chevron\" aria-hidden=\"true\" />\n </button>\n @if (chipsVisible()) {\n <div class=\"gbt-select__chips\" [id]=\"chipsId()\">\n @for (option of selectedOptions(); track option.value; let i = $index) {\n <gbt-tag\n [color]=\"option.color ?? '#6b7280'\"\n [removable]=\"!isDisabled()\"\n [disabled]=\"isDisabled()\"\n [removeLabel]=\"chipRemoveLabel()(option.label)\"\n (removed)=\"removeChip(option.value, i)\"\n >\n {{ option.label }}\n </gbt-tag>\n }\n </div>\n }\n @if (chips() && multiple()) {\n <div role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">\n {{ selectedCountLabel()(selectedOptions().length) }}\n </div>\n }\n @if (open() && panelStyle(); as style) {\n @if (hasNoOptions()) {\n <div\n [id]=\"id() + '-listbox'\"\n class=\"gbt-select__panel gbt-select__empty\"\n role=\"status\"\n [style.top]=\"style.top\"\n [style.left]=\"style.left\"\n [style.width]=\"style.width\"\n >\n {{ noOptionsMessage() }}\n </div>\n } @else {\n <ul\n [id]=\"id() + '-listbox'\"\n class=\"gbt-select__panel\"\n role=\"listbox\"\n [attr.aria-label]=\"label() || placeholder()\"\n [attr.aria-multiselectable]=\"multiple()\"\n [style.top]=\"style.top\"\n [style.left]=\"style.left\"\n [style.width]=\"style.width\"\n >\n @for (option of options(); track option.value; let i = $index) {\n <li role=\"presentation\">\n <button\n [id]=\"id() + '-option-' + i\"\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"gbt-select__option\"\n [class.gbt-select__option--selected]=\"isSelected(option.value)\"\n [class.gbt-select__option--active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n (click)=\"selectOption(option.value)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (option.icon) {\n <gbt-icon [name]=\"option.icon\" class=\"gbt-select__option-icon\" aria-hidden=\"true\" />\n }\n <span class=\"gbt-select__option-label\">{{ option.label }}</span>\n @if (isSelected(option.value)) {\n <gbt-icon name=\"check\" class=\"gbt-select__option-check\" aria-hidden=\"true\" />\n }\n </button>\n </li>\n }\n </ul>\n }\n }\n @if (showHint()) {\n <p [id]=\"hintId()\" class=\"gbt-select__hint\">{{ hint() }}</p>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-select__error\" role=\"alert\">{{ errorMessage() }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