@masmarino/gabarit 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +131 -85
- package/accordion/README.md +56 -0
- package/alert/README.md +87 -0
- package/app-shell/README.md +133 -0
- package/auth/README.md +155 -0
- package/auth-activate/README.md +119 -0
- package/auth-login/README.md +113 -0
- package/auth-register/README.md +104 -0
- package/auth-reset-password/README.md +120 -0
- package/autocomplete/README.md +77 -0
- package/avatar/README.md +34 -0
- package/avatar-group/README.md +47 -0
- package/badge/README.md +177 -0
- package/bar-chart/README.md +44 -0
- package/breadcrumb/README.md +38 -0
- package/button/README.md +175 -0
- package/card/README.md +179 -0
- package/checkbox/README.md +50 -0
- package/checkbox-group/README.md +78 -0
- package/confirm-danger-modal/README.md +77 -0
- package/copy-button/README.md +90 -0
- package/copy-field/README.md +54 -0
- package/date-picker/README.md +84 -0
- package/description-list/README.md +63 -0
- package/dimension-card/README.md +39 -0
- package/disclosure/README.md +48 -0
- package/divider/README.md +31 -0
- package/drawer/README.md +49 -0
- package/empty-state/README.md +84 -0
- package/fesm2022/masmarino-gabarit-accordion.mjs +243 -0
- package/fesm2022/masmarino-gabarit-accordion.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-alert.mjs +208 -0
- package/fesm2022/masmarino-gabarit-alert.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-app-shell.mjs +378 -0
- package/fesm2022/masmarino-gabarit-app-shell.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth-activate.mjs +415 -0
- package/fesm2022/masmarino-gabarit-auth-activate.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth-login.mjs +467 -0
- package/fesm2022/masmarino-gabarit-auth-login.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth-register.mjs +457 -0
- package/fesm2022/masmarino-gabarit-auth-register.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth-reset-password.mjs +364 -0
- package/fesm2022/masmarino-gabarit-auth-reset-password.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth.mjs +844 -0
- package/fesm2022/masmarino-gabarit-auth.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-autocomplete.mjs +475 -0
- package/fesm2022/masmarino-gabarit-autocomplete.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-avatar-group.mjs +202 -0
- package/fesm2022/masmarino-gabarit-avatar-group.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-avatar.mjs +107 -0
- package/fesm2022/masmarino-gabarit-avatar.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-badge.mjs +449 -0
- package/fesm2022/masmarino-gabarit-badge.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-bar-chart.mjs +408 -0
- package/fesm2022/masmarino-gabarit-bar-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-breadcrumb.mjs +59 -0
- package/fesm2022/masmarino-gabarit-breadcrumb.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-button.mjs +374 -0
- package/fesm2022/masmarino-gabarit-button.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-card.mjs +400 -0
- package/fesm2022/masmarino-gabarit-card.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-chart.mjs +1289 -0
- package/fesm2022/masmarino-gabarit-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-checkbox-group.mjs +335 -0
- package/fesm2022/masmarino-gabarit-checkbox-group.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-checkbox.mjs +170 -0
- package/fesm2022/masmarino-gabarit-checkbox.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-confirm-danger-modal.mjs +387 -0
- package/fesm2022/masmarino-gabarit-confirm-danger-modal.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-copy-button.mjs +407 -0
- package/fesm2022/masmarino-gabarit-copy-button.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-copy-field.mjs +229 -0
- package/fesm2022/masmarino-gabarit-copy-field.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-date-picker.mjs +1242 -0
- package/fesm2022/masmarino-gabarit-date-picker.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-description-list.mjs +127 -0
- package/fesm2022/masmarino-gabarit-description-list.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-dimension-card.mjs +162 -0
- package/fesm2022/masmarino-gabarit-dimension-card.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-disclosure.mjs +154 -0
- package/fesm2022/masmarino-gabarit-disclosure.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-divider.mjs +90 -0
- package/fesm2022/masmarino-gabarit-divider.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-docs.mjs +16 -2
- package/fesm2022/masmarino-gabarit-docs.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-drawer.mjs +209 -0
- package/fesm2022/masmarino-gabarit-drawer.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-empty-state.mjs +226 -0
- package/fesm2022/masmarino-gabarit-empty-state.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-file-upload.mjs +335 -0
- package/fesm2022/masmarino-gabarit-file-upload.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-floating-panel.mjs +24 -0
- package/fesm2022/masmarino-gabarit-floating-panel.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-format.mjs +345 -0
- package/fesm2022/masmarino-gabarit-format.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-funnel-chart.mjs +247 -0
- package/fesm2022/masmarino-gabarit-funnel-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-gauge-bar.mjs +180 -0
- package/fesm2022/masmarino-gabarit-gauge-bar.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-git-field.mjs +127 -0
- package/fesm2022/masmarino-gabarit-git-field.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-icon-marker.mjs +150 -0
- package/fesm2022/masmarino-gabarit-icon-marker.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-icon.mjs +308 -0
- package/fesm2022/masmarino-gabarit-icon.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-input.mjs +493 -0
- package/fesm2022/masmarino-gabarit-input.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-job-graph.mjs +216 -0
- package/fesm2022/masmarino-gabarit-job-graph.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-job-status.mjs +104 -0
- package/fesm2022/masmarino-gabarit-job-status.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-line-chart.mjs +574 -0
- package/fesm2022/masmarino-gabarit-line-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-list-card.mjs +320 -0
- package/fesm2022/masmarino-gabarit-list-card.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-list-row.mjs +58 -0
- package/fesm2022/masmarino-gabarit-list-row.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-list-toolbar.mjs +369 -0
- package/fesm2022/masmarino-gabarit-list-toolbar.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-menu.mjs +464 -0
- package/fesm2022/masmarino-gabarit-menu.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs +897 -0
- package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-mfa-settings.mjs +629 -0
- package/fesm2022/masmarino-gabarit-mfa-settings.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-modal.mjs +260 -0
- package/fesm2022/masmarino-gabarit-modal.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-nav-tabs.mjs +332 -0
- package/fesm2022/masmarino-gabarit-nav-tabs.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-notification-dot.mjs +119 -0
- package/fesm2022/masmarino-gabarit-notification-dot.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-page-header.mjs +78 -0
- package/fesm2022/masmarino-gabarit-page-header.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-page-layout.mjs +157 -0
- package/fesm2022/masmarino-gabarit-page-layout.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-pagination.mjs +415 -0
- package/fesm2022/masmarino-gabarit-pagination.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-panel.mjs +80 -0
- package/fesm2022/masmarino-gabarit-panel.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-passkey-settings.mjs +606 -0
- package/fesm2022/masmarino-gabarit-passkey-settings.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-pie-chart.mjs +317 -0
- package/fesm2022/masmarino-gabarit-pie-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-popover.mjs +142 -0
- package/fesm2022/masmarino-gabarit-popover.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-radio-group.mjs +202 -0
- package/fesm2022/masmarino-gabarit-radio-group.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-save-status.mjs +142 -0
- package/fesm2022/masmarino-gabarit-save-status.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-search-bar.mjs +576 -0
- package/fesm2022/masmarino-gabarit-search-bar.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-secret-reveal.mjs +348 -0
- package/fesm2022/masmarino-gabarit-secret-reveal.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-segmented-control.mjs +272 -0
- package/fesm2022/masmarino-gabarit-segmented-control.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-select.mjs +512 -0
- package/fesm2022/masmarino-gabarit-select.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-skeleton-list.mjs +189 -0
- package/fesm2022/masmarino-gabarit-skeleton-list.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-skeleton.mjs +109 -0
- package/fesm2022/masmarino-gabarit-skeleton.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-slider.mjs +239 -0
- package/fesm2022/masmarino-gabarit-slider.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-sparkline.mjs +276 -0
- package/fesm2022/masmarino-gabarit-sparkline.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-spinner.mjs +86 -0
- package/fesm2022/masmarino-gabarit-spinner.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-stat-grid.mjs +139 -0
- package/fesm2022/masmarino-gabarit-stat-grid.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-stat-tile.mjs +312 -0
- package/fesm2022/masmarino-gabarit-stat-tile.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-stepper.mjs +219 -0
- package/fesm2022/masmarino-gabarit-stepper.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-switch.mjs +151 -0
- package/fesm2022/masmarino-gabarit-switch.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-table.mjs +206 -0
- package/fesm2022/masmarino-gabarit-table.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tabs.mjs +210 -0
- package/fesm2022/masmarino-gabarit-tabs.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tag-input.mjs +288 -0
- package/fesm2022/masmarino-gabarit-tag-input.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tag.mjs +155 -0
- package/fesm2022/masmarino-gabarit-tag.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-textarea.mjs +369 -0
- package/fesm2022/masmarino-gabarit-textarea.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-timeline-chart.mjs +521 -0
- package/fesm2022/masmarino-gabarit-timeline-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-toaster.mjs +220 -0
- package/fesm2022/masmarino-gabarit-toaster.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tooltip.mjs +185 -0
- package/fesm2022/masmarino-gabarit-tooltip.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tree.mjs +258 -0
- package/fesm2022/masmarino-gabarit-tree.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-user-chip.mjs +106 -0
- package/fesm2022/masmarino-gabarit-user-chip.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit.mjs +83 -24785
- package/fesm2022/masmarino-gabarit.mjs.map +1 -1
- package/file-upload/README.md +47 -0
- package/funnel-chart/README.md +39 -0
- package/gauge-bar/README.md +35 -0
- package/git-field/README.md +34 -0
- package/icon/README.md +52 -0
- package/icon-marker/README.md +37 -0
- package/input/README.md +120 -0
- package/job-graph/README.md +76 -0
- package/job-status/README.md +34 -0
- package/line-chart/README.md +52 -0
- package/list-card/README.md +144 -0
- package/list-row/README.md +72 -0
- package/list-toolbar/README.md +52 -0
- package/menu/README.md +90 -0
- package/mfa-enrollment/README.md +189 -0
- package/mfa-settings/README.md +154 -0
- package/modal/README.md +72 -0
- package/nav-tabs/README.md +106 -0
- package/notification-dot/README.md +43 -0
- package/package.json +329 -1
- package/page-header/README.md +56 -0
- package/page-layout/README.md +76 -0
- package/pagination/README.md +73 -0
- package/panel/README.md +56 -0
- package/passkey-settings/README.md +120 -0
- package/pie-chart/README.md +85 -0
- package/popover/README.md +62 -0
- package/radio-group/README.md +47 -0
- package/save-status/README.md +44 -0
- package/search-bar/README.md +84 -0
- package/secret-reveal/README.md +60 -0
- package/segmented-control/README.md +79 -0
- package/select/README.md +61 -0
- package/skeleton/README.md +49 -0
- package/skeleton-list/README.md +40 -0
- package/slider/README.md +44 -0
- package/sparkline/README.md +37 -0
- package/spinner/README.md +41 -0
- package/stat-grid/README.md +47 -0
- package/stat-tile/README.md +75 -0
- package/stepper/README.md +67 -0
- package/switch/README.md +51 -0
- package/table/README.md +75 -0
- package/tabs/README.md +34 -0
- package/tag/README.md +34 -0
- package/tag-input/README.md +45 -0
- package/textarea/README.md +76 -0
- package/timeline-chart/README.md +49 -0
- package/toaster/README.md +92 -0
- package/tooltip/README.md +50 -0
- package/tree/README.md +79 -0
- package/types/masmarino-gabarit-accordion.d.ts +54 -0
- package/types/masmarino-gabarit-alert.d.ts +65 -0
- package/types/masmarino-gabarit-app-shell.d.ts +102 -0
- package/types/masmarino-gabarit-auth-activate.d.ts +70 -0
- package/types/masmarino-gabarit-auth-login.d.ts +63 -0
- package/types/masmarino-gabarit-auth-register.d.ts +66 -0
- package/types/masmarino-gabarit-auth-reset-password.d.ts +53 -0
- package/types/masmarino-gabarit-auth.d.ts +543 -0
- package/types/masmarino-gabarit-autocomplete.d.ts +140 -0
- package/types/masmarino-gabarit-avatar-group.d.ts +60 -0
- package/types/masmarino-gabarit-avatar.d.ts +31 -0
- package/types/masmarino-gabarit-badge.d.ts +139 -0
- package/types/masmarino-gabarit-bar-chart.d.ts +111 -0
- package/types/masmarino-gabarit-breadcrumb.d.ts +12 -0
- package/types/masmarino-gabarit-button.d.ts +108 -0
- package/types/masmarino-gabarit-card.d.ts +102 -0
- package/types/masmarino-gabarit-chart.d.ts +361 -0
- package/types/masmarino-gabarit-checkbox-group.d.ts +113 -0
- package/types/masmarino-gabarit-checkbox.d.ts +49 -0
- package/types/masmarino-gabarit-confirm-danger-modal.d.ts +94 -0
- package/types/masmarino-gabarit-copy-button.d.ts +111 -0
- package/types/masmarino-gabarit-copy-field.d.ts +64 -0
- package/types/masmarino-gabarit-date-picker.d.ts +399 -0
- package/types/masmarino-gabarit-description-list.d.ts +40 -0
- package/types/masmarino-gabarit-dimension-card.d.ts +55 -0
- package/types/masmarino-gabarit-disclosure.d.ts +44 -0
- package/types/masmarino-gabarit-divider.d.ts +20 -0
- package/types/masmarino-gabarit-docs.d.ts +2 -1
- package/types/masmarino-gabarit-drawer.d.ts +51 -0
- package/types/masmarino-gabarit-empty-state.d.ts +67 -0
- package/types/masmarino-gabarit-file-upload.d.ts +95 -0
- package/types/masmarino-gabarit-floating-panel.d.ts +14 -0
- package/types/masmarino-gabarit-format.d.ts +54 -0
- package/types/masmarino-gabarit-funnel-chart.d.ts +78 -0
- package/types/masmarino-gabarit-gauge-bar.d.ts +54 -0
- package/types/masmarino-gabarit-git-field.d.ts +39 -0
- package/types/masmarino-gabarit-icon-marker.d.ts +47 -0
- package/types/masmarino-gabarit-icon.d.ts +23 -0
- package/types/masmarino-gabarit-input.d.ts +181 -0
- package/types/masmarino-gabarit-job-graph.d.ts +63 -0
- package/types/masmarino-gabarit-job-status.d.ts +20 -0
- package/types/masmarino-gabarit-line-chart.d.ts +153 -0
- package/types/masmarino-gabarit-list-card.d.ts +87 -0
- package/types/masmarino-gabarit-list-row.d.ts +14 -0
- package/types/masmarino-gabarit-list-toolbar.d.ts +100 -0
- package/types/masmarino-gabarit-menu.d.ts +93 -0
- package/types/masmarino-gabarit-mfa-enrollment.d.ts +142 -0
- package/types/masmarino-gabarit-mfa-settings.d.ts +89 -0
- package/types/masmarino-gabarit-modal.d.ts +60 -0
- package/types/masmarino-gabarit-nav-tabs.d.ts +65 -0
- package/types/masmarino-gabarit-notification-dot.d.ts +34 -0
- package/types/masmarino-gabarit-page-header.d.ts +20 -0
- package/types/masmarino-gabarit-page-layout.d.ts +46 -0
- package/types/masmarino-gabarit-pagination.d.ts +109 -0
- package/types/masmarino-gabarit-panel.d.ts +21 -0
- package/types/masmarino-gabarit-passkey-settings.d.ts +94 -0
- package/types/masmarino-gabarit-pie-chart.d.ts +94 -0
- package/types/masmarino-gabarit-popover.d.ts +33 -0
- package/types/masmarino-gabarit-radio-group.d.ts +66 -0
- package/types/masmarino-gabarit-save-status.d.ts +39 -0
- package/types/masmarino-gabarit-search-bar.d.ts +183 -0
- package/types/masmarino-gabarit-secret-reveal.d.ts +95 -0
- package/types/masmarino-gabarit-segmented-control.d.ts +76 -0
- package/types/masmarino-gabarit-select.d.ts +146 -0
- package/types/masmarino-gabarit-skeleton-list.d.ts +54 -0
- package/types/masmarino-gabarit-skeleton.d.ts +26 -0
- package/types/masmarino-gabarit-slider.d.ts +73 -0
- package/types/masmarino-gabarit-sparkline.d.ts +70 -0
- package/types/masmarino-gabarit-spinner.d.ts +20 -0
- package/types/masmarino-gabarit-stat-grid.d.ts +39 -0
- package/types/masmarino-gabarit-stat-tile.d.ts +79 -0
- package/types/masmarino-gabarit-stepper.d.ts +67 -0
- package/types/masmarino-gabarit-switch.d.ts +42 -0
- package/types/masmarino-gabarit-table.d.ts +60 -0
- package/types/masmarino-gabarit-tabs.d.ts +40 -0
- package/types/masmarino-gabarit-tag-input.d.ts +78 -0
- package/types/masmarino-gabarit-tag.d.ts +35 -0
- package/types/masmarino-gabarit-textarea.d.ts +109 -0
- package/types/masmarino-gabarit-timeline-chart.d.ts +145 -0
- package/types/masmarino-gabarit-toaster.d.ts +62 -0
- package/types/masmarino-gabarit-tooltip.d.ts +39 -0
- package/types/masmarino-gabarit-tree.d.ts +71 -0
- package/types/masmarino-gabarit-user-chip.d.ts +26 -0
- package/types/masmarino-gabarit.d.ts +83 -6599
- package/user-chip/README.md +42 -0
package/tag/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Tag
|
|
2
|
+
|
|
3
|
+
A small chip rendering an arbitrary background color with automatically
|
|
4
|
+
computed readable text, used for user-defined labels (e.g. issue labels)
|
|
5
|
+
that don't fit the fixed `Badge` semantic variants. Optionally removable.
|
|
6
|
+
|
|
7
|
+
**Selector:** `gbt-tag`
|
|
8
|
+
|
|
9
|
+
**Inputs**
|
|
10
|
+
|
|
11
|
+
| Input | Type | Default | Role |
|
|
12
|
+
|---|---|---|---|
|
|
13
|
+
| `color` | `string` (required) | — | Background color as a **6-digit hex** string, with or without the leading `#` (e.g. `#dc2626`, `dc2626`). Text color is computed automatically for WCAG-readable contrast (`#ffffff` or `#000000`, worst case 4.58:1). Shorthand hex (`#abc`), CSS named colors, `rgb()`/`hsl()` and custom properties are **not** supported and throw — silently guessing would paint unreadable text. |
|
|
14
|
+
| `removable` | `boolean` | `false` | Shows a remove (`×`) button when `true`. |
|
|
15
|
+
| `removeLabel` | `string` | `'Remove'` | Accessible label for the remove button. English by default, like every other default string in the library — externalize it per the caller's own i18n strings in a non-English context. |
|
|
16
|
+
| `disabled` | `boolean` | `false` | Marks the chip `aria-disabled="true"` — for a container-level disabled state (e.g. `TagInput`, `Select` in chips mode) that visually dims the chip via CSS `opacity`, so contrast-checking tools recognize it as an inactive component rather than flagging its now-lower-contrast text. Purely an ARIA signal — pair it with `[removable]="false"` to actually remove the remove button. |
|
|
17
|
+
|
|
18
|
+
**Outputs**
|
|
19
|
+
|
|
20
|
+
| Output | Payload | Fires when |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `removed` | `void` | The remove button is clicked. The click does not bubble to any parent click handler. |
|
|
23
|
+
|
|
24
|
+
**Content**
|
|
25
|
+
|
|
26
|
+
Project the tag's visible text via `<ng-content />`.
|
|
27
|
+
|
|
28
|
+
**Example**
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<gbt-tag color="#dc2626" [removable]="true" removeLabel="Retirer Bug" (removed)="onRemoveLabel()">
|
|
32
|
+
Bug
|
|
33
|
+
</gbt-tag>
|
|
34
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# TagInput
|
|
2
|
+
|
|
3
|
+
Freely-typed values, each shown as a removable `Tag` — for values the
|
|
4
|
+
consumer invents (custom labels, email recipients), not chosen from a
|
|
5
|
+
predefined list. Distinct from `Select`'s chips, which pick among
|
|
6
|
+
fixed options. Integrates with Angular forms via
|
|
7
|
+
`ControlValueAccessor` (`string[]`), like `Select`.
|
|
8
|
+
|
|
9
|
+
**Selector**: `gbt-tag-input`
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
| Input | Type | Default | Role |
|
|
14
|
+
| ------------------ | ------------------------------- | -------------------------------- | --------------------------------------------------------------- |
|
|
15
|
+
| `label` | `string` | `''` | Field label. |
|
|
16
|
+
| `placeholder` | `string` | `''` | Shown only while the list of tags is empty. |
|
|
17
|
+
| `disabled` | `boolean` | `false` | — |
|
|
18
|
+
| `errorMessage` | `string \| null` | `null` | Rendered as `role="alert"` below the field. |
|
|
19
|
+
| `separatorKeys` | `string[]` | `['Enter', ',']` | Keys that commit the current text as a new tag. |
|
|
20
|
+
| `allowDuplicates` | `boolean` | `false` | Silently ignores a duplicate value when `false`. |
|
|
21
|
+
| `color` | `string` | `'#6b7280'` | Background color passed to each `Tag` (a 6-digit hex, per `Tag`'s own contract). |
|
|
22
|
+
| `removeLabel` | `(value: string) => string` | `` (v) => `Remove ${v}` `` | Accessible name of each tag's remove button. |
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<gbt-tag-input label="Labels" placeholder="Add a label…" [formControl]="labels" />
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Behavior
|
|
31
|
+
|
|
32
|
+
- Typing text and pressing a `separatorKeys` key (Enter or comma by
|
|
33
|
+
default) commits it as a new tag and clears the field. A pending
|
|
34
|
+
draft is also committed on blur, so nothing is silently lost if the
|
|
35
|
+
user clicks away instead of pressing Enter.
|
|
36
|
+
- `Backspace` on an *empty* field removes the last tag — the same
|
|
37
|
+
convenience most tag/recipient fields offer (Gmail's "To" field,
|
|
38
|
+
GitHub's label picker), not triggered while there's still text to
|
|
39
|
+
delete normally.
|
|
40
|
+
- Clicking anywhere in the field (not just precisely on the thin text
|
|
41
|
+
input) focuses it — a documented lint exception, since the real
|
|
42
|
+
keyboard equivalent (Tab to the input directly) already exists; see
|
|
43
|
+
`AUDIT.md`.
|
|
44
|
+
- Reuses `gbt-tag` for display, inheriting its automatic
|
|
45
|
+
readable-text-color computation — no separate contrast logic here.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Textarea
|
|
2
|
+
|
|
3
|
+
Champ de texte multiligne, cohérent avec `GbtInput` — même API, même
|
|
4
|
+
intégration `ControlValueAccessor`.
|
|
5
|
+
|
|
6
|
+
**Selector**: `gbt-textarea`
|
|
7
|
+
|
|
8
|
+
## Inputs
|
|
9
|
+
|
|
10
|
+
| Input | Type | Default | Role |
|
|
11
|
+
| -------------- | ------------------------------------------------ | ------------ | --------------------------------------------------------------------------------------------------------- |
|
|
12
|
+
| `id` | `string` | généré | `id` du champ natif. |
|
|
13
|
+
| `label` | `string` | `''` | Libellé affiché au-dessus du champ. |
|
|
14
|
+
| `required` | `boolean` | `false` | Affiche un `*` à côté du label. |
|
|
15
|
+
| `disabled` | `boolean` | `false` | Désactive le champ. |
|
|
16
|
+
| `placeholder` | `string` | `''` | Texte indicatif. |
|
|
17
|
+
| `errorMessage` | `string \| null` | `null` | Message d'erreur, associé via `aria-describedby`. |
|
|
18
|
+
| `rows` | `number` | `3` | Hauteur initiale, en lignes (hauteur minimale avec `autosize`). |
|
|
19
|
+
| `hint` | `string` | `''` | Aide sous le champ, associée via `aria-describedby`. Masquée (et déliée) tant qu'une erreur est affichée. |
|
|
20
|
+
| `hideLabel` | `boolean` | `false` | Masque le libellé visuellement ; il reste dans le DOM et continue de nommer le champ. |
|
|
21
|
+
| `mono` | `boolean` | `false` | Police à chasse fixe (`--gbt-font-mono` si définie, sinon la pile monospace du système). |
|
|
22
|
+
| `autosize` | `boolean` | `false` | Le champ grandit avec son contenu au lieu de défiler. Désactive la poignée de redimensionnement. |
|
|
23
|
+
| `maxRows` | `number \| null` | `null` | Avec `autosize` : nombre de lignes au-delà duquel le champ cesse de grandir et défile. |
|
|
24
|
+
| `resize` | `'vertical' \| 'none' \| 'both' \| 'horizontal'` | `'vertical'` | Poignée de redimensionnement (ignorée avec `autosize`). |
|
|
25
|
+
|
|
26
|
+
Tous ces inputs sont « éteints » par défaut : un champ qui ne les utilise pas
|
|
27
|
+
garde le même rendu.
|
|
28
|
+
|
|
29
|
+
## Outputs
|
|
30
|
+
|
|
31
|
+
| Output | Type | Role |
|
|
32
|
+
| ----------- | -------- | ------------------------------------------------------------------------------------------------------ |
|
|
33
|
+
| `committed` | `string` | Émis au blur, avec la valeur sur laquelle l'utilisateur s'est arrêté (même convention que `GbtInput`). |
|
|
34
|
+
|
|
35
|
+
## Exemple
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<gbt-textarea label="Description" [rows]="5" formControlName="description" />
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Aide, libellé masqué, monospace
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<gbt-textarea label="Description" hint="Markdown accepté." formControlName="description" />
|
|
45
|
+
|
|
46
|
+
<gbt-textarea label="Ajouter un commentaire" [hideLabel]="true" [rows]="2" />
|
|
47
|
+
|
|
48
|
+
<gbt-textarea label="Variables d'environnement" [mono]="true" [rows]="4" />
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
L'aide (`<p id="<id>-hint">`) est le `aria-describedby` du champ ; tant que
|
|
52
|
+
`errorMessage` est renseigné, elle n'est plus rendue et l'erreur prend sa
|
|
53
|
+
place.
|
|
54
|
+
|
|
55
|
+
## Redimensionnement
|
|
56
|
+
|
|
57
|
+
Par défaut, `resize: vertical` natif — l'utilisateur agrandit en tirant le
|
|
58
|
+
coin. `resize` accepte aussi `none`, `both` et `horizontal`.
|
|
59
|
+
|
|
60
|
+
Avec `autosize`, le champ grandit à la saisie (et se recale quand la valeur
|
|
61
|
+
est écrite par le formulaire ou quand sa largeur change) ; `rows` reste la
|
|
62
|
+
hauteur minimale et `maxRows` plafonne la hauteur, au-delà de laquelle le
|
|
63
|
+
champ défile. Le plafond est un `max-height` CSS calculé avec l'unité `lh` : un
|
|
64
|
+
navigateur qui ne la connaît pas laisse simplement le champ grandir sans
|
|
65
|
+
limite. Pas de compteur de caractères intégré (à ajouter côté application si
|
|
66
|
+
un besoin réel apparaît).
|
|
67
|
+
|
|
68
|
+
```html
|
|
69
|
+
<gbt-textarea label="Message de commit" [autosize]="true" [rows]="2" [maxRows]="6" />
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Valeur
|
|
73
|
+
|
|
74
|
+
La valeur est liée à la propriété `value` du `<textarea>` : `writeValue('')`,
|
|
75
|
+
`reset()` ou un `ngModel` remis à `''` vident bien le champ, même après une
|
|
76
|
+
saisie.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# TimelineChart
|
|
2
|
+
|
|
3
|
+
Timeline on the dataviz base — a time series and annotated intervals,
|
|
4
|
+
measures its container, reacts to the pointer and keyboard, carries its
|
|
5
|
+
own visually-hidden `gbt-chart-table`.
|
|
6
|
+
|
|
7
|
+
**Selector**: `gbt-timeline-chart`
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
|
|
11
|
+
| Input | Type | Default | Role |
|
|
12
|
+
| ------------------ | ------------------------------------------- | -------- | ----------------------------------------------------------- |
|
|
13
|
+
| `series` | `ChartSeries<Date>` | required | `{ label, points, pattern? }` — the series, time axis. |
|
|
14
|
+
| `intervals` | `ChartInterval[]` | required | `{ start, end, label }[]` — the annotated intervals. |
|
|
15
|
+
| `locale` | `string` | required | Locale used to format dates. |
|
|
16
|
+
| `label` | `string` | required | Accessible name of the chart. |
|
|
17
|
+
| `tableCaption` | `string` | required | Caption of the series' `sr-only` table. |
|
|
18
|
+
| `intervalsCaption` | `string` | required | Caption of the intervals' `sr-only` table. |
|
|
19
|
+
| `xColumn` | `string` | required | Header of the series table's x-axis column. |
|
|
20
|
+
| `emptyMessage` | `string` | required | Message shown when the series is empty. |
|
|
21
|
+
| `yZero` | `boolean` | `true` | Forces the y-axis domain to contain zero. |
|
|
22
|
+
| `yTickCount` | `number` | `5` | Target number of ticks on the y-axis. |
|
|
23
|
+
| `size` | `{ width: number; height: number } \| null` | `null` | Explicit dimensions — reserved for server rendering, tests. |
|
|
24
|
+
| `heading` | `string` | `''` | Block title. Empty by default. |
|
|
25
|
+
| `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `2` | Level of the rendered heading. |
|
|
26
|
+
| `headline` | `string` | `''` | Current value, already formatted. |
|
|
27
|
+
| `trend` | `string` | `''` | Change over the period, already formatted. |
|
|
28
|
+
|
|
29
|
+
**Fluid width with a chosen height** — the common case — is achieved by
|
|
30
|
+
setting the height in CSS on the wrapping container, without passing
|
|
31
|
+
`[size]`. See [`../chart-frame/README.md`](../chart/chart-frame/README.md) for
|
|
32
|
+
the full sizing contract and hover behavior.
|
|
33
|
+
|
|
34
|
+
## Example
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<div style="height: 18rem">
|
|
38
|
+
<gbt-timeline-chart
|
|
39
|
+
[series]="{ label: 'Statut', points: [{ x: new Date('2026-01-01'), y: 1 }] }"
|
|
40
|
+
[intervals]="[{ start: d1, end: d2, label: 'Incident' }]"
|
|
41
|
+
locale="fr-FR"
|
|
42
|
+
label="Chronologie des incidents"
|
|
43
|
+
tableCaption="Détail de la chronologie"
|
|
44
|
+
intervalsCaption="Détail des incidents"
|
|
45
|
+
xColumn="Date"
|
|
46
|
+
emptyMessage="Aucune donnée"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
```
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Toaster
|
|
2
|
+
|
|
3
|
+
Pile de notifications temporaires (toasts) — l'application possède le
|
|
4
|
+
tableau de toasts et le composant gère l'empilement, l'auto-dismiss et
|
|
5
|
+
l'accessibilité.
|
|
6
|
+
|
|
7
|
+
**Selector**: `gbt-toaster`
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
|
|
11
|
+
| Input | Type | Default | Role |
|
|
12
|
+
| ------------ | ----------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
+
| `toasts` | `ToastItem[]` | — (le service) | Toasts affichés, possédés par l'application. Omis, le toaster affiche le store de `GbtToastService` (voir plus bas). |
|
|
14
|
+
| `position` | `ToasterPosition` | `'bottom-right'` | Coin ou bord de l'écran où empiler les toasts. |
|
|
15
|
+
| `closeLabel` | `string` | `'Close'` | Nom accessible du bouton de fermeture de chaque toast. |
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
interface ToastItem {
|
|
19
|
+
id: string
|
|
20
|
+
variant: 'success' | 'error' | 'warning' | 'info'
|
|
21
|
+
message: string
|
|
22
|
+
duration?: number // ms, défaut 5000 ; 0 ou Infinity = pas d'auto-dismiss
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Outputs
|
|
27
|
+
|
|
28
|
+
| Output | Type | Role |
|
|
29
|
+
| ----------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
30
|
+
| `dismissed` | `string` | Émis avec l'`id` du toast à retirer — auto-dismiss écoulé ou clic sur le bouton fermer. L'application doit filtrer son tableau. |
|
|
31
|
+
|
|
32
|
+
## Exemple
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<gbt-toaster [toasts]="toasts()" (dismissed)="onDismissed($event)" />
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
toasts = signal<ToastItem[]>([])
|
|
40
|
+
|
|
41
|
+
onDismissed(id: string): void {
|
|
42
|
+
this.toasts.update((toasts) => toasts.filter((toast) => toast.id !== id))
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Pour afficher un nouveau toast, l'application pousse un élément dans
|
|
47
|
+
son propre tableau (avec un `id` unique, par ex. `crypto.randomUUID()`)
|
|
48
|
+
— le composant se charge de programmer son auto-dismiss.
|
|
49
|
+
|
|
50
|
+
## Service : `GbtToastService`
|
|
51
|
+
|
|
52
|
+
Un store de toasts pour toute l'application, à injecter n'importe où (`providedIn: 'root'`). Le toaster placé une
|
|
53
|
+
fois dans le shell l'affiche quand son entrée `toasts` est **omise** ; l'API explicite ci-dessus reste inchangée.
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
private readonly toasts = inject(GbtToastService)
|
|
57
|
+
|
|
58
|
+
this.toasts.show('Token révoqué') // succès, disparaît après 5 s
|
|
59
|
+
this.toasts.show('La requête a échoué', 'error', { duration: 0 }) // reste jusqu'à fermeture
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<gbt-toaster />
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
| Membre | Rôle |
|
|
67
|
+
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
68
|
+
| `show(message, kind?, options?)` | Ajoute un toast et retourne son `id`. `kind` : `'success'` (défaut) `\| 'error' \| 'info' \| 'warning'`. `options.duration` en ms. |
|
|
69
|
+
| `dismiss(id)` | Retire un toast (et son minuteur). Un `id` inconnu est ignoré. |
|
|
70
|
+
| `clear()` | Retire tous les toasts. |
|
|
71
|
+
| `toasts` | Signal en lecture seule des toasts affichés (`ToastItem[]`), du plus ancien au plus récent. |
|
|
72
|
+
| `defaultDuration` | Signal de la durée par défaut, en ms (`5000`). `0` ou `Infinity` : aucun toast ne disparaît seul. |
|
|
73
|
+
|
|
74
|
+
Le service possède les minuteurs d'auto-dismiss (un toast affiché avant que le toaster n'existe disparaît quand même
|
|
75
|
+
à l'heure), les annule au `dismiss`/`clear` et à la destruction de l'injecteur, et fabrique ses `id` avec un compteur
|
|
76
|
+
(`crypto.randomUUID` n'existe pas hors contexte sécurisé). En mode service, le toaster ne programme aucun minuteur : le
|
|
77
|
+
bouton fermer appelle `dismiss()` (et émet aussi `dismissed`) ; l'expiration ne l'émet pas.
|
|
78
|
+
|
|
79
|
+
## Accessibilité
|
|
80
|
+
|
|
81
|
+
Chaque toast porte `role="status"` (succès, info) ou `role="alert"`
|
|
82
|
+
(warning, error), avec `aria-atomic="true"`, pour que les lecteurs
|
|
83
|
+
d'écran annoncent le message sans action de l'utilisateur. C'est la
|
|
84
|
+
même chose en mode service : les erreurs et avertissements sont
|
|
85
|
+
annoncés de façon assertive, les autres poliment.
|
|
86
|
+
|
|
87
|
+
**À savoir.** (1) Tous les toasts, erreurs comprises, disparaissent après 5 s par défaut et rien ne les suspend au
|
|
88
|
+
survol ou au focus : un utilisateur qui lit lentement (loupe, clavier) peut manquer un message d'erreur (WCAG 2.2.1).
|
|
89
|
+
Passez `{ duration: 0 }` pour une erreur qui doit rester jusqu'à fermeture. (2) Un avertissement est annoncé de façon
|
|
90
|
+
assertive (`role="alert"`) : un `warning` non bloquant interrompt donc la lecture. (3) En mode
|
|
91
|
+
service, placez **un seul** `<gbt-toaster />` dans l'application : deux toasters affichent le même store et
|
|
92
|
+
annoncent chaque message deux fois.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Tooltip
|
|
2
|
+
|
|
3
|
+
Info-bulle générique qui enveloppe n'importe quel élément projeté et
|
|
4
|
+
l'affiche au survol ou au focus clavier.
|
|
5
|
+
|
|
6
|
+
**Selector**: `gbt-tooltip` (`exportAs="gbtTooltip"`)
|
|
7
|
+
|
|
8
|
+
## Inputs
|
|
9
|
+
|
|
10
|
+
| Input | Type | Default | Role |
|
|
11
|
+
| ---------- | -------------------------------------------- | --------- | -------------------------------------- |
|
|
12
|
+
| `text` | `string` | required | Texte affiché dans la bulle. |
|
|
13
|
+
| `position` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'top'` | Côté de l'élément où placer la bulle. |
|
|
14
|
+
|
|
15
|
+
Pas de retournement automatique si la bulle déborde de l'écran —
|
|
16
|
+
l'application choisit la position adaptée à son layout (même logique
|
|
17
|
+
que `gbt-menu`).
|
|
18
|
+
|
|
19
|
+
## Comportement
|
|
20
|
+
|
|
21
|
+
- Apparition après ~400ms de survol (annulée si le pointeur repart
|
|
22
|
+
avant), immédiate au focus clavier.
|
|
23
|
+
- Disparition sur `mouseleave`, `focusout`, ou `Escape`, avec un court
|
|
24
|
+
fondu (120ms) avant que la bulle ne quitte le DOM — un nouveau
|
|
25
|
+
survol/focus pendant ce délai annule la disparition et la bulle
|
|
26
|
+
reste affichée.
|
|
27
|
+
- Contenu texte uniquement — pas d'élément interactif à l'intérieur de
|
|
28
|
+
la bulle (voir WCAG 1.4.13, § Accessibilité ci-dessous).
|
|
29
|
+
|
|
30
|
+
## Accessibilité
|
|
31
|
+
|
|
32
|
+
`gbt-tooltip` ne peut pas poser `aria-describedby` automatiquement sur
|
|
33
|
+
l'élément projeté (il ne connaît pas sa structure interne). Câblez-le
|
|
34
|
+
vous-même via `tooltipId`, exposé par `exportAs="gbtTooltip"` :
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<gbt-tooltip text="Supprimer" #tip="gbtTooltip">
|
|
38
|
+
<button [attr.aria-describedby]="tip.tooltipId" aria-label="Supprimer">
|
|
39
|
+
<gbt-icon name="x" />
|
|
40
|
+
</button>
|
|
41
|
+
</gbt-tooltip>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Exemple
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<gbt-tooltip text="Cette action est définitive" position="right">
|
|
48
|
+
<button type="button">Supprimer</button>
|
|
49
|
+
</gbt-tooltip>
|
|
50
|
+
```
|
package/tree/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Tree
|
|
2
|
+
|
|
3
|
+
A hierarchical list of expandable/collapsible nodes — file trees,
|
|
4
|
+
nested categories, org charts — implementing the WAI-ARIA
|
|
5
|
+
[Tree View](https://www.w3.org/WAI/ARIA/apg/patterns/treeview/)
|
|
6
|
+
pattern. Distinct from nested `Accordion`s: a tree supports arrow-key
|
|
7
|
+
navigation across the whole hierarchy and a single-selection model,
|
|
8
|
+
where an accordion is a flat list of independently-toggled panels.
|
|
9
|
+
|
|
10
|
+
**Selector**: `gbt-tree`
|
|
11
|
+
|
|
12
|
+
## Inputs
|
|
13
|
+
|
|
14
|
+
| Input | Type | Default | Role |
|
|
15
|
+
| ---------------- | --------------- | ------------- | ------------------------------------------------------------------ |
|
|
16
|
+
| `items` | `TreeNode[]` | *required* | The hierarchy to render (see `TreeNode` below). |
|
|
17
|
+
| `ariaLabel` | `string` | `''` | Accessible name of the tree, when there's no visible heading for it. |
|
|
18
|
+
| `selectedId` | `string \| null` (model) | `null` | The currently selected node's id. Two-way bindable. |
|
|
19
|
+
| `expandedIds` | `string[]` (model) | `[]` | Ids of currently expanded nodes. Two-way bindable. |
|
|
20
|
+
| `expandLabel` | `string` | `'Expand'` | Accessible name of a collapsed node's toggle button. |
|
|
21
|
+
| `collapseLabel` | `string` | `'Collapse'` | Accessible name of an expanded node's toggle button. |
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
interface TreeNode {
|
|
25
|
+
id: string
|
|
26
|
+
label: string
|
|
27
|
+
icon?: string
|
|
28
|
+
children?: TreeNode[]
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Example
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<gbt-tree
|
|
36
|
+
[items]="repoTree"
|
|
37
|
+
ariaLabel="Fichiers du dépôt"
|
|
38
|
+
[(expandedIds)]="expanded"
|
|
39
|
+
[(selectedId)]="selected"
|
|
40
|
+
/>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Behavior
|
|
44
|
+
|
|
45
|
+
- Clicking a node with children both selects it **and** toggles its
|
|
46
|
+
expanded state — the same one-click convenience VS Code's file
|
|
47
|
+
explorer and most desktop file trees offer, rather than requiring a
|
|
48
|
+
separate click on the chevron just to open a folder.
|
|
49
|
+
- Clicking the chevron button directly toggles expansion only, without
|
|
50
|
+
changing the selection (`$event.stopPropagation()` keeps the row
|
|
51
|
+
click from also firing).
|
|
52
|
+
- Full keyboard support per the WAI-ARIA pattern: `ArrowDown`/`ArrowUp`
|
|
53
|
+
move focus to the next/previous visible row, `ArrowRight` expands a
|
|
54
|
+
collapsed node (or moves into its first child if already expanded),
|
|
55
|
+
`ArrowLeft` collapses an expanded node (or moves focus to its parent
|
|
56
|
+
if already collapsed/a leaf), `Home`/`End` jump to the first/last
|
|
57
|
+
visible row, `Enter`/`Space` select the focused row.
|
|
58
|
+
- Roving `tabindex`: only the active row is a `Tab` stop; arrow keys
|
|
59
|
+
move focus without adding the whole tree to the tab order row by
|
|
60
|
+
row.
|
|
61
|
+
|
|
62
|
+
## Why a flat list instead of nested groups
|
|
63
|
+
|
|
64
|
+
The WAI-ARIA pattern allows a tree to be built either as nested
|
|
65
|
+
`role="group"` containers per level, or as a single flat list where
|
|
66
|
+
each item's depth is conveyed by `aria-level`. This component uses the
|
|
67
|
+
flat form: `items` is flattened (respecting which nodes are currently
|
|
68
|
+
expanded) into one array rendered by a single `@for`, with `role="tree"`
|
|
69
|
+
on the `<ul>` and `role="treeitem"` + `aria-level`/`aria-expanded`
|
|
70
|
+
directly on each `<li>`. This avoids a recursive per-node component
|
|
71
|
+
(and the extra indirection that comes with it) and sidesteps relying
|
|
72
|
+
on native `<ul>`/`<li>` list semantics for a structure that isn't
|
|
73
|
+
actually a native nested list — the same reasoning that led to an
|
|
74
|
+
explicit ARIA role here rather than leaning on HTML's own content
|
|
75
|
+
model.
|
|
76
|
+
|
|
77
|
+
## Accessibility
|
|
78
|
+
|
|
79
|
+
See `AUDIT.md` for the full RGAA checklist.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class AccordionItem {
|
|
3
|
+
private readonly parent;
|
|
4
|
+
private readonly header;
|
|
5
|
+
label: import("@angular/core").InputSignal<string>;
|
|
6
|
+
protected readonly active: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
+
protected readonly index: import("@angular/core").WritableSignal<number>;
|
|
8
|
+
protected readonly groupId: import("@angular/core").WritableSignal<string>;
|
|
9
|
+
protected readonly headerId: import("@angular/core").Signal<string>;
|
|
10
|
+
protected readonly panelId: import("@angular/core").Signal<string>;
|
|
11
|
+
setState(index: number, active: boolean, groupId: string): void;
|
|
12
|
+
focusHeader(): void;
|
|
13
|
+
protected toggle(): void;
|
|
14
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AccordionItem, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AccordionItem, "gbt-accordion-item", never, {
|
|
17
|
+
"label": {
|
|
18
|
+
"alias": "label";
|
|
19
|
+
"required": true;
|
|
20
|
+
"isSignal": true;
|
|
21
|
+
};
|
|
22
|
+
}, {}, never, ["*"], true, never>;
|
|
23
|
+
}
|
|
24
|
+
type AccordionMode = 'single' | 'multiple';
|
|
25
|
+
export declare class Accordion {
|
|
26
|
+
id: import("@angular/core").InputSignal<string>;
|
|
27
|
+
mode: import("@angular/core").InputSignal<AccordionMode>;
|
|
28
|
+
expanded: import("@angular/core").ModelSignal<number[]>;
|
|
29
|
+
protected readonly items: import("@angular/core").Signal<readonly AccordionItem[]>;
|
|
30
|
+
constructor();
|
|
31
|
+
toggle(index: number): void;
|
|
32
|
+
focusHeader(index: number): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Accordion, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Accordion, "gbt-accordion", never, {
|
|
35
|
+
"id": {
|
|
36
|
+
"alias": "id";
|
|
37
|
+
"required": false;
|
|
38
|
+
"isSignal": true;
|
|
39
|
+
};
|
|
40
|
+
"mode": {
|
|
41
|
+
"alias": "mode";
|
|
42
|
+
"required": false;
|
|
43
|
+
"isSignal": true;
|
|
44
|
+
};
|
|
45
|
+
"expanded": {
|
|
46
|
+
"alias": "expanded";
|
|
47
|
+
"required": false;
|
|
48
|
+
"isSignal": true;
|
|
49
|
+
};
|
|
50
|
+
}, {
|
|
51
|
+
"expanded": "expandedChange";
|
|
52
|
+
}, ["items"], ["*"], true, never>;
|
|
53
|
+
}
|
|
54
|
+
export type { AccordionMode };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
type AlertVariant = 'info' | 'success' | 'warning' | 'error' | 'neutral';
|
|
3
|
+
type AlertLive = 'auto' | 'assertive' | 'polite' | 'off';
|
|
4
|
+
type AlertSize = 'md' | 'sm';
|
|
5
|
+
type AlertAppearance = 'default' | 'subtle';
|
|
6
|
+
type AlertIconAlign = 'auto' | 'center' | 'start';
|
|
7
|
+
export declare class Alert {
|
|
8
|
+
variant: import("@angular/core").InputSignal<AlertVariant>;
|
|
9
|
+
dismissible: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
10
|
+
closeLabel: import("@angular/core").InputSignal<string>;
|
|
11
|
+
live: import("@angular/core").InputSignal<AlertLive>;
|
|
12
|
+
heading: import("@angular/core").InputSignal<string>;
|
|
13
|
+
size: import("@angular/core").InputSignal<AlertSize>;
|
|
14
|
+
appearance: import("@angular/core").InputSignal<AlertAppearance>;
|
|
15
|
+
iconAlign: import("@angular/core").InputSignal<AlertIconAlign>;
|
|
16
|
+
dismissed: import("@angular/core").OutputEmitterRef<void>;
|
|
17
|
+
protected readonly role: import("@angular/core").Signal<"alert" | "status" | null>;
|
|
18
|
+
protected readonly icon: import("@angular/core").Signal<string>;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Alert, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Alert, "gbt-alert", never, {
|
|
21
|
+
"variant": {
|
|
22
|
+
"alias": "variant";
|
|
23
|
+
"required": false;
|
|
24
|
+
"isSignal": true;
|
|
25
|
+
};
|
|
26
|
+
"dismissible": {
|
|
27
|
+
"alias": "dismissible";
|
|
28
|
+
"required": false;
|
|
29
|
+
"isSignal": true;
|
|
30
|
+
};
|
|
31
|
+
"closeLabel": {
|
|
32
|
+
"alias": "closeLabel";
|
|
33
|
+
"required": false;
|
|
34
|
+
"isSignal": true;
|
|
35
|
+
};
|
|
36
|
+
"live": {
|
|
37
|
+
"alias": "live";
|
|
38
|
+
"required": false;
|
|
39
|
+
"isSignal": true;
|
|
40
|
+
};
|
|
41
|
+
"heading": {
|
|
42
|
+
"alias": "heading";
|
|
43
|
+
"required": false;
|
|
44
|
+
"isSignal": true;
|
|
45
|
+
};
|
|
46
|
+
"size": {
|
|
47
|
+
"alias": "size";
|
|
48
|
+
"required": false;
|
|
49
|
+
"isSignal": true;
|
|
50
|
+
};
|
|
51
|
+
"appearance": {
|
|
52
|
+
"alias": "appearance";
|
|
53
|
+
"required": false;
|
|
54
|
+
"isSignal": true;
|
|
55
|
+
};
|
|
56
|
+
"iconAlign": {
|
|
57
|
+
"alias": "iconAlign";
|
|
58
|
+
"required": false;
|
|
59
|
+
"isSignal": true;
|
|
60
|
+
};
|
|
61
|
+
}, {
|
|
62
|
+
"dismissed": "dismissed";
|
|
63
|
+
}, never, ["*", "[alert-actions]"], true, never>;
|
|
64
|
+
}
|
|
65
|
+
export type { AlertAppearance, AlertIconAlign, AlertLive, AlertSize, AlertVariant };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class AppShellNavGroup {
|
|
3
|
+
label: import("@angular/core").InputSignal<string>;
|
|
4
|
+
icon: import("@angular/core").InputSignal<string | null>;
|
|
5
|
+
expanded: import("@angular/core").ModelSignal<boolean>;
|
|
6
|
+
protected readonly panelId: string;
|
|
7
|
+
protected toggle(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppShellNavGroup, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppShellNavGroup, "gbt-app-shell-nav-group", never, {
|
|
10
|
+
"label": {
|
|
11
|
+
"alias": "label";
|
|
12
|
+
"required": true;
|
|
13
|
+
"isSignal": true;
|
|
14
|
+
};
|
|
15
|
+
"icon": {
|
|
16
|
+
"alias": "icon";
|
|
17
|
+
"required": false;
|
|
18
|
+
"isSignal": true;
|
|
19
|
+
};
|
|
20
|
+
"expanded": {
|
|
21
|
+
"alias": "expanded";
|
|
22
|
+
"required": false;
|
|
23
|
+
"isSignal": true;
|
|
24
|
+
};
|
|
25
|
+
}, {
|
|
26
|
+
"expanded": "expandedChange";
|
|
27
|
+
}, never, ["*"], true, never>;
|
|
28
|
+
}
|
|
29
|
+
export declare class AppShell {
|
|
30
|
+
navLabel: import("@angular/core").InputSignal<string>;
|
|
31
|
+
skipLabel: import("@angular/core").InputSignal<string>;
|
|
32
|
+
openMenuLabel: import("@angular/core").InputSignal<string>;
|
|
33
|
+
closeMenuLabel: import("@angular/core").InputSignal<string>;
|
|
34
|
+
collapseLabel: import("@angular/core").InputSignal<string>;
|
|
35
|
+
expandLabel: import("@angular/core").InputSignal<string>;
|
|
36
|
+
versionLabel: import("@angular/core").InputSignal<string | null>;
|
|
37
|
+
collapsed: import("@angular/core").InputSignal<boolean>;
|
|
38
|
+
collapsible: import("@angular/core").InputSignal<boolean>;
|
|
39
|
+
collapsedChange: import("@angular/core").OutputEmitterRef<boolean>;
|
|
40
|
+
private readonly id;
|
|
41
|
+
protected readonly mainId: string;
|
|
42
|
+
protected readonly navId: string;
|
|
43
|
+
protected readonly menuOpen: import("@angular/core").WritableSignal<boolean>;
|
|
44
|
+
protected readonly menuLabel: import("@angular/core").Signal<string>;
|
|
45
|
+
private readonly toggleButton;
|
|
46
|
+
private readonly nav;
|
|
47
|
+
protected toggleMenu(): void;
|
|
48
|
+
protected close(): void;
|
|
49
|
+
protected toggleCollapsed(): void;
|
|
50
|
+
protected onEscape(): void;
|
|
51
|
+
protected onNavKeydown(event: KeyboardEvent): void;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppShell, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppShell, "gbt-app-shell", never, {
|
|
54
|
+
"navLabel": {
|
|
55
|
+
"alias": "navLabel";
|
|
56
|
+
"required": true;
|
|
57
|
+
"isSignal": true;
|
|
58
|
+
};
|
|
59
|
+
"skipLabel": {
|
|
60
|
+
"alias": "skipLabel";
|
|
61
|
+
"required": true;
|
|
62
|
+
"isSignal": true;
|
|
63
|
+
};
|
|
64
|
+
"openMenuLabel": {
|
|
65
|
+
"alias": "openMenuLabel";
|
|
66
|
+
"required": true;
|
|
67
|
+
"isSignal": true;
|
|
68
|
+
};
|
|
69
|
+
"closeMenuLabel": {
|
|
70
|
+
"alias": "closeMenuLabel";
|
|
71
|
+
"required": true;
|
|
72
|
+
"isSignal": true;
|
|
73
|
+
};
|
|
74
|
+
"collapseLabel": {
|
|
75
|
+
"alias": "collapseLabel";
|
|
76
|
+
"required": false;
|
|
77
|
+
"isSignal": true;
|
|
78
|
+
};
|
|
79
|
+
"expandLabel": {
|
|
80
|
+
"alias": "expandLabel";
|
|
81
|
+
"required": false;
|
|
82
|
+
"isSignal": true;
|
|
83
|
+
};
|
|
84
|
+
"versionLabel": {
|
|
85
|
+
"alias": "versionLabel";
|
|
86
|
+
"required": false;
|
|
87
|
+
"isSignal": true;
|
|
88
|
+
};
|
|
89
|
+
"collapsed": {
|
|
90
|
+
"alias": "collapsed";
|
|
91
|
+
"required": false;
|
|
92
|
+
"isSignal": true;
|
|
93
|
+
};
|
|
94
|
+
"collapsible": {
|
|
95
|
+
"alias": "collapsible";
|
|
96
|
+
"required": false;
|
|
97
|
+
"isSignal": true;
|
|
98
|
+
};
|
|
99
|
+
}, {
|
|
100
|
+
"collapsedChange": "collapsedChange";
|
|
101
|
+
}, never, ["[shell-brand]", "[shell-nav]", "[shell-header]", "*"], true, never>;
|
|
102
|
+
}
|