@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/select/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Select
|
|
2
|
+
|
|
3
|
+
Dropdown list, single or multiple selection. Integrated with reactive
|
|
4
|
+
forms and `ngModel`.
|
|
5
|
+
|
|
6
|
+
**Selector**: `gbt-select`
|
|
7
|
+
|
|
8
|
+
## Inputs
|
|
9
|
+
|
|
10
|
+
| Input | Type | Default | Role |
|
|
11
|
+
| -------------------- | --------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
12
|
+
| `id` | `string` | generated (`gbt-select-N`) | DOM id, associates the `<label>`. |
|
|
13
|
+
| `label` | `string` | `''` | Visible label. |
|
|
14
|
+
| `hint` | `string` | `''` | Help text under the field, linked to the trigger with `aria-describedby`. Hidden (and unlinked) while an error shows. |
|
|
15
|
+
| `hideLabel` | `boolean` | `false` | Hides the label visually; it stays in the DOM and keeps naming the trigger. |
|
|
16
|
+
| `fullWidth` | `boolean` | `false` | Stretches the field to the width of its container (the default sizes to the content, 180px minimum). |
|
|
17
|
+
| `size` | `'md' \| 'sm'` | `'md'` | The trigger is 38px tall (`md`) or 32px (`sm`, for compact contexts like a table's rows-per-page selector, see `Pagination`): the shared `--gbt-control-height-md` / `-sm` scale, level with `gbt-input` and `gbt-button` of the same tier. |
|
|
18
|
+
| `options` | `SelectOption<T>[]` | required | `{ value, label, icon?, color? }` — the offered options. |
|
|
19
|
+
| `multiple` | `boolean` | `false` | Multiple selection. |
|
|
20
|
+
| `chips` | `boolean` | `false` | When `true` together with `multiple`, renders selected options as removable colored chips below the trigger instead of a collapsed count label. Each option's `color` field sets its chip color (a 6-digit hex — see `Tag`); options without one default to a neutral grey. When the field is disabled the chips stay visible but lose their remove buttons. |
|
|
21
|
+
| `placeholder` | `string` | `'Select…'` | Text shown with no selection. |
|
|
22
|
+
| `disabled` | `boolean` | `false` | Disables the field. |
|
|
23
|
+
| `required` | `boolean` | `false` | Native `required` attribute. |
|
|
24
|
+
| `errorMessage` | `string \| null` | `null` | Error message shown under the field. |
|
|
25
|
+
| `selectedCountLabel` | `(count: number) => string` | `` `${count} selected` `` | Trigger label in multiple-selection mode, beyond a single item. In `chips` mode the trigger shows the placeholder instead, and this string is what the screen-reader status region announces as chips are added or removed. |
|
|
26
|
+
| `chipRemoveLabel` | `(label: string) => string` | `` `Remove ${label}` `` | Accessible label of each chip's remove button, in `chips` mode. |
|
|
27
|
+
| `noOptionsMessage` | `string` | `'No options'` | Shown in place of the listbox when `options` is empty and the panel is opened. |
|
|
28
|
+
|
|
29
|
+
## Hint, hidden label, full width
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<gbt-select
|
|
33
|
+
label="Visibility"
|
|
34
|
+
hint="Who can see this repository."
|
|
35
|
+
[fullWidth]="true"
|
|
36
|
+
[options]="options"
|
|
37
|
+
formControlName="visibility"
|
|
38
|
+
/>
|
|
39
|
+
|
|
40
|
+
<gbt-select
|
|
41
|
+
label="Sort by"
|
|
42
|
+
[hideLabel]="true"
|
|
43
|
+
size="sm"
|
|
44
|
+
[options]="sortOptions"
|
|
45
|
+
formControlName="sort"
|
|
46
|
+
/>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
With `errorMessage` set the hint is not rendered and the trigger's
|
|
50
|
+
`aria-describedby` points at the error only (chips mode's chip row is
|
|
51
|
+
unaffected and still renders in the list).
|
|
52
|
+
|
|
53
|
+
## Example
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<gbt-select
|
|
57
|
+
label="Rôle"
|
|
58
|
+
[options]="[{ value: 'read', label: 'Lecture' }, { value: 'admin', label: 'Administration' }]"
|
|
59
|
+
formControlName="role"
|
|
60
|
+
/>
|
|
61
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Skeleton
|
|
2
|
+
|
|
3
|
+
Animated placeholder that echoes the shape of content still loading —
|
|
4
|
+
a line of text, a circle, or a rectangle. Combine several to mimic a
|
|
5
|
+
table row, a list item, or a card, instead of a generic spinner
|
|
6
|
+
unrelated to what's about to appear.
|
|
7
|
+
|
|
8
|
+
**Selector**: `gbt-skeleton`
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
|
|
12
|
+
| Input | Type | Default | Role |
|
|
13
|
+
| --------- | ----------------------------- | ------- | --------------------------------------------------------------------- |
|
|
14
|
+
| `variant` | `'text' \| 'circle' \| 'rect'` | `'text'` | Shape: rounded line, perfect circle (`aspect-ratio: 1`, sized by `width`), or rounded rectangle. |
|
|
15
|
+
| `width` | `string` | `'100%'` | Any CSS length (`'240px'`, `'60%'`, …). |
|
|
16
|
+
| `height` | `string \| null` | `null` | Any CSS length. Left unset, each variant falls back to a sensible default (`1em` for `text`, matches `width` for `circle`, `100px` for `rect`). |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<gbt-skeleton variant="text" width="60%" />
|
|
22
|
+
<gbt-skeleton variant="circle" width="40px" />
|
|
23
|
+
<gbt-skeleton variant="rect" width="100%" height="140px" />
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Composing a placeholder layout
|
|
27
|
+
|
|
28
|
+
There's no dedicated `TableSkeleton` or `CardSkeleton` — combine plain
|
|
29
|
+
`gbt-skeleton`s instead, e.g. a card:
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<div role="status" aria-label="Loading">
|
|
33
|
+
<gbt-skeleton variant="rect" width="100%" height="140px" />
|
|
34
|
+
<gbt-skeleton variant="text" width="80%" />
|
|
35
|
+
<gbt-skeleton variant="text" width="50%" />
|
|
36
|
+
</div>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Behavior
|
|
40
|
+
|
|
41
|
+
- A soft highlight band sweeps left to right across the shape to
|
|
42
|
+
signal "loading"; the animation is disabled under
|
|
43
|
+
`prefers-reduced-motion: reduce` (the shape stays visible, flat,
|
|
44
|
+
with no motion).
|
|
45
|
+
- Each `gbt-skeleton` sets `aria-hidden="true"` on itself — a screen
|
|
46
|
+
reader is never told about a dozen individual placeholder shapes.
|
|
47
|
+
Wrap the group in a single `role="status"` container with a label
|
|
48
|
+
(as in the example above) so "Loading" is announced once for the
|
|
49
|
+
whole layout, not once per shape.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# SkeletonList
|
|
2
|
+
|
|
3
|
+
The placeholder of a list while it loads: `rows` rows of an optional leading block (a status dot, an
|
|
4
|
+
avatar) and one to three text lines, at the rhythm of a real list row.
|
|
5
|
+
|
|
6
|
+
**Selector**: `gbt-skeleton-list`. Built on [`gbt-skeleton`](../skeleton/README.md). `gbt-list-card`
|
|
7
|
+
draws its own loading state; use this one in a settings section, a panel, a table body or any bordered box.
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
|
|
11
|
+
| Input | Type | Default | Role |
|
|
12
|
+
| -------------- | -------------------------------- | ------------ | ------------------------------------------------------------------------------- |
|
|
13
|
+
| `rows` | `number` | `4` | Number of placeholder rows (`0` or less: none, only the status). |
|
|
14
|
+
| `leading` | `'circle' \| 'square' \| 'none'` | `'circle'` | The block before the lines: a dot or avatar, a square, or nothing. |
|
|
15
|
+
| `leadingSize` | `string` | `'1rem'` | Its size (`1rem` a status dot, `2.25rem` an avatar). |
|
|
16
|
+
| `lines` | `1 \| 2 \| 3` | `2` | Text lines per row. The first is the longest; its width varies from row to row. |
|
|
17
|
+
| `loadingLabel` | `string` | `'Loading…'` | Read out (visually hidden, polite) while loading. |
|
|
18
|
+
| `divided` | `boolean` | `true` | A hairline between rows. |
|
|
19
|
+
| `padded` | `boolean` | `true` | 1 rem of side padding (a row inside a card). Turn it off in a bare list. |
|
|
20
|
+
|
|
21
|
+
## Behaviour and accessibility
|
|
22
|
+
|
|
23
|
+
- A `role="status"` region with `loadingLabel` is always rendered; the shapes are `aria-hidden`.
|
|
24
|
+
- **No `aria-busy`**: it would sit on an ancestor of the status region, and assistive technology may then hold
|
|
25
|
+
the announcement back until the busy state ends, which is exactly when the announcement is useless.
|
|
26
|
+
- Placeholders animate with `gbt-skeleton`'s shimmer, which stops under `prefers-reduced-motion`.
|
|
27
|
+
|
|
28
|
+
## Example
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
@if (loading()) {
|
|
32
|
+
<gbt-skeleton-list [rows]="3" leadingSize="2.25rem" loadingLabel="Chargement des membres…" />
|
|
33
|
+
} @else {
|
|
34
|
+
<ul>
|
|
35
|
+
…
|
|
36
|
+
</ul>
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
See [AUDIT.md](AUDIT.md).
|
package/slider/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Slider
|
|
2
|
+
|
|
3
|
+
A numeric value picked by dragging — a styled native
|
|
4
|
+
`<input type="range">`, integrated with Angular forms via
|
|
5
|
+
`ControlValueAccessor`, like `Select`.
|
|
6
|
+
|
|
7
|
+
**Selector**: `gbt-slider`
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
|
|
11
|
+
| Input | Type | Default | Role |
|
|
12
|
+
| -------------- | ------------------------------ | ------------------------- | ----------------------------------------------------------- |
|
|
13
|
+
| `label` | `string` | required | Field label — also the accessible name of the range input. |
|
|
14
|
+
| `min`/`max` | `number` | `0` / `100` | Bounds. |
|
|
15
|
+
| `step` | `number` | `1` | Increment. |
|
|
16
|
+
| `disabled` | `boolean` | `false` | — |
|
|
17
|
+
| `errorMessage`| `string \| null` | `null` | Rendered as `role="alert"` below the slider. |
|
|
18
|
+
| `showValue` | `boolean` | `true` | Shows the current value next to the label. |
|
|
19
|
+
| `formatValue` | `(value: number) => string` | `(v) => \`${v}\`` | Formats the displayed value (e.g. `€`, `%`). |
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<gbt-slider label="Budget" [min]="0" [max]="1000" [step]="50" [formatValue]="formatEuros" [formControl]="budget" />
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Behavior
|
|
28
|
+
|
|
29
|
+
- Built on a native `<input type="range">`, not a custom
|
|
30
|
+
`role="slider"` widget — keyboard operability (arrows, Home/End,
|
|
31
|
+
Page Up/Down) and screen reader support come from the browser for
|
|
32
|
+
free, at the cost of styling it (done here via
|
|
33
|
+
`::-webkit-slider-thumb`/`::-moz-range-thumb` and friends) rather
|
|
34
|
+
than building a widget from scratch.
|
|
35
|
+
- `label` is required: a slider with no accessible name is
|
|
36
|
+
meaningless to a screen reader, and there's no universal generic
|
|
37
|
+
default text a value-picker could fall back to (unlike `Spinner`'s
|
|
38
|
+
`'Loading…'`).
|
|
39
|
+
|
|
40
|
+
## Scope
|
|
41
|
+
|
|
42
|
+
Single value only. A two-handle range slider (min/max) was
|
|
43
|
+
deliberately left for a separate iteration if a real use case comes
|
|
44
|
+
up, the same reasoning `DatePicker` applied to a date-range picker.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Sparkline
|
|
2
|
+
|
|
3
|
+
Fixed-size trend mini-chart — built to live in a table cell, where a
|
|
4
|
+
`ResizeObserver` per row would be expensive for a width the caller
|
|
5
|
+
already knows.
|
|
6
|
+
|
|
7
|
+
**Selector**: `gbt-sparkline`
|
|
8
|
+
|
|
9
|
+
Standalone, outside the dataviz base — no tooltip or keyboard
|
|
10
|
+
navigation in the base's sense, but **focusable** and given an
|
|
11
|
+
accessible name, with its own visually-hidden `gbt-chart-table`.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
|
|
15
|
+
| Input | Type | Default | Role |
|
|
16
|
+
| -------------- | ---------- | -------- | ------------------------------------------- |
|
|
17
|
+
| `values` | `number[]` | required | Series values, in order. |
|
|
18
|
+
| `tableCaption` | `string` | required | Caption of the component's `sr-only` table. |
|
|
19
|
+
| `xColumn` | `string` | required | Header of that table's x-axis column. |
|
|
20
|
+
| `yColumn` | `string` | required | Header of that table's value column. |
|
|
21
|
+
| `locale` | `string` | required | Locale used to format numbers. |
|
|
22
|
+
| `emptyMessage` | `string` | required | Message shown when `values` is empty. |
|
|
23
|
+
| `width` | `number` | `80` | Width in pixels. |
|
|
24
|
+
| `height` | `number` | `24` | Height in pixels. |
|
|
25
|
+
|
|
26
|
+
## Example
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<gbt-sparkline
|
|
30
|
+
[values]="[12, 18, 9, 24, 30]"
|
|
31
|
+
tableCaption="Requêtes des 7 derniers jours"
|
|
32
|
+
xColumn="Jour"
|
|
33
|
+
yColumn="Requêtes"
|
|
34
|
+
locale="fr-FR"
|
|
35
|
+
emptyMessage="Aucune donnée"
|
|
36
|
+
/>
|
|
37
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Spinner
|
|
2
|
+
|
|
3
|
+
A standalone loading indicator, for use anywhere `Button`'s own
|
|
4
|
+
internal spinner doesn't reach — a card, a panel, a whole page section
|
|
5
|
+
— and `Skeleton` (which echoes the shape of content still loading)
|
|
6
|
+
isn't a fit, typically because there's no known destination layout to
|
|
7
|
+
echo yet.
|
|
8
|
+
|
|
9
|
+
**Selector**: `gbt-spinner`
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
| Input | Type | Default | Role |
|
|
14
|
+
| ------- | ----------------------- | -------------- | ------------------------------------------------- |
|
|
15
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | 16px / 24px / 40px. |
|
|
16
|
+
| `label` | `string` | `'Loading…'` | Announced once via `role="status"`, visually hidden. |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<gbt-spinner size="lg" label="Loading results…" />
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Behavior
|
|
25
|
+
|
|
26
|
+
- `role="status"` with a visually-hidden label — announced once,
|
|
27
|
+
unlike `Skeleton`'s "no live announcement per shape" stance, since a
|
|
28
|
+
spinner is usually the *only* loading cue on screen, not one of a
|
|
29
|
+
dozen placeholder shapes needing a single shared announcement.
|
|
30
|
+
- The ring inherits `color` (`--primary` by default) — set `color` on
|
|
31
|
+
an ancestor to recolor it, e.g. inside a button with a colored
|
|
32
|
+
background.
|
|
33
|
+
- The ring is two layers: a faint static track (`::before`, 15%
|
|
34
|
+
opacity) and the spinning arc on top (`::after`) — an arc alone,
|
|
35
|
+
with no track, reads as "a circle with a bite taken out of it"
|
|
36
|
+
rather than as motion over a fixed shape.
|
|
37
|
+
|
|
38
|
+
## Relationship to `Button`'s own spinner
|
|
39
|
+
|
|
40
|
+
`Button`'s internal loading spinner stays private and independent — the same call made for
|
|
41
|
+
`AppShell`'s mobile drawer versus `Drawer`: a separate, independent implementation.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# StatGrid
|
|
2
|
+
|
|
3
|
+
A responsive grid of [`gbt-stat-tile`](../stat-tile/README.md)s: two columns, and up to `columns` once the grid
|
|
4
|
+
is 600 px wide.
|
|
5
|
+
|
|
6
|
+
**Selector**: `gbt-stat-grid`
|
|
7
|
+
|
|
8
|
+
## Inputs
|
|
9
|
+
|
|
10
|
+
| Input | Type | Default | Role |
|
|
11
|
+
| -------------- | ----------------------- | ------------ | ------------------------------------------------------------- |
|
|
12
|
+
| `ariaLabel` | `string` | `'Summary'` | Names the list of tiles. |
|
|
13
|
+
| `columns` | `2 \| 3 \| 4 \| 5 \| 6` | `4` | Columns once the grid is 600 px wide or more (below that: 2). |
|
|
14
|
+
| `loading` | `boolean` | `false` | Shows placeholder tiles instead of the projected tiles. |
|
|
15
|
+
| `loadingCount` | `number` | `4` | Number of placeholder tiles. `0` or less: none, only the status region (same convention as `SkeletonList`'s `rows`). |
|
|
16
|
+
| `loadingLabel` | `string` | `'Loading…'` | Read out (visually hidden, polite) while `loading`. |
|
|
17
|
+
|
|
18
|
+
## Behaviour
|
|
19
|
+
|
|
20
|
+
- **Container query**: `container: gbt-stat-grid / inline-size`, breakpoint at 600 px of the GRID's width (custom
|
|
21
|
+
properties cannot be read in a container condition, so it is fixed). A grid in a 700 px column next to an aside
|
|
22
|
+
behaves like a grid on a 700 px page. The `MediumFrame` and `NarrowFrame` stories show it.
|
|
23
|
+
- **Containment side effect**: `container-type: inline-size` also applies layout containment to the grid, so a
|
|
24
|
+
`position: fixed` descendant (a popover or menu panel inside a tile) is placed against the grid, not the viewport.
|
|
25
|
+
Keep fixed-position overlays out of the tiles.
|
|
26
|
+
- **List semantics**: `role="list"` named by `ariaLabel`; the tiles are its `role="listitem"`s (a tile detects
|
|
27
|
+
its grid by injection: it gets the role only there).
|
|
28
|
+
- **Loading**: placeholders have a loaded tile's border, radius and padding, so nothing moves when the figures
|
|
29
|
+
arrive. The real tiles are not rendered meanwhile; the list is `aria-hidden` and a `role="status"` region
|
|
30
|
+
(outside the list, always in the DOM) says `loadingLabel`. No `aria-busy` is set: some assistive technology
|
|
31
|
+
would hold the status back.
|
|
32
|
+
- Tiles project directly into the grid: `<gbt-stat-tile>` elements as direct children (a wrapper `div` would
|
|
33
|
+
lose the list-item role).
|
|
34
|
+
|
|
35
|
+
## Example
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<gbt-stat-grid ariaLabel="Overview" [columns]="4" [loading]="!stats()">
|
|
39
|
+
@for (tile of stats(); track tile.key) {
|
|
40
|
+
<gbt-stat-tile [label]="tile.label" [value]="tile.value" [icon]="tile.icon" />
|
|
41
|
+
}
|
|
42
|
+
</gbt-stat-grid>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Accessibility
|
|
46
|
+
|
|
47
|
+
See [AUDIT.md](AUDIT.md).
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# StatTile
|
|
2
|
+
|
|
3
|
+
A figure with its label: "12 open issues", "3.4 GB stored". The figure and an optional icon marker on
|
|
4
|
+
top, the label under them, then an optional hint and trend.
|
|
5
|
+
|
|
6
|
+
**Selector**: `gbt-stat-tile`, plus the router-agnostic link anchor `a[gbtStatTileLink]` (class `StatTileLink`,
|
|
7
|
+
import it to get the stretched hit area). Put tiles in a [`gbt-stat-grid`](../stat-grid/README.md).
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
|
|
11
|
+
| Input | Type | Default | Role |
|
|
12
|
+
| ------------ | ----------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------ |
|
|
13
|
+
| `label` | `string` | `''` | The label under the figure. Not needed when a `gbtStatTileLink` is projected (its text is the label). |
|
|
14
|
+
| `value` | `string \| number` | — | Required. The figure, shown as is (format it: `1,284`, `3.4 GB`). |
|
|
15
|
+
| `icon` | `string \| null` | `null` | Registered icon name, on a tile-shaped [`gbt-icon-marker`](../icon-marker/README.md). |
|
|
16
|
+
| `iconTone` | `IconMarkerTone` | `'info'` | Tone of that marker. |
|
|
17
|
+
| `hint` | `string \| null` | `null` | A precision under the label ("last 30 days"). |
|
|
18
|
+
| `trend` | `'up' \| 'down' \| 'flat' \| null` | `null` | An arrow. Shown only with a `trendLabel`. |
|
|
19
|
+
| `trendLabel` | `string \| null` | `null` | The trend as text, with its sign or wording ("+12 %"): an arrow alone says nothing to a screen reader. |
|
|
20
|
+
| `trendTone` | `'neutral' \| 'success' \| 'error'` | `'neutral'` | Colours the trend by whether the movement is good or bad, whichever the direction. |
|
|
21
|
+
| `href` | `string \| null` | `null` | Turns the label into a link whose hit area is the whole tile. |
|
|
22
|
+
| `muted` | `boolean` | `false` | The tile steps back (quiet figure, neutral marker): a category with nothing in it. |
|
|
23
|
+
|
|
24
|
+
## Reading order
|
|
25
|
+
|
|
26
|
+
The label comes **first in the DOM**, the figure second (the grid areas put the figure on top): a screen
|
|
27
|
+
reader says "Open issues, 12". Do not swap them.
|
|
28
|
+
|
|
29
|
+
## Link
|
|
30
|
+
|
|
31
|
+
`href` renders the label as an anchor. With a router, project the anchor and let it replace the label:
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<gbt-stat-tile [value]="issues().length" icon="circle-dot">
|
|
35
|
+
<a gbtStatTileLink [routerLink]="['/issues']">Open issues</a>
|
|
36
|
+
</gbt-stat-tile>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If you forget to import `StatTileLink`, the projected anchor is still rendered with its text (the selector matches the
|
|
40
|
+
attribute), only unstyled: no stretched hit area and no tile hover, so a missing import is visible, never a silent empty label.
|
|
41
|
+
|
|
42
|
+
The anchor's `::after` covers the tile (the tile is `position: relative`); its keyboard focus outlines the
|
|
43
|
+
whole tile. No interactive element is nested in another.
|
|
44
|
+
|
|
45
|
+
## Narrow tiles
|
|
46
|
+
|
|
47
|
+
The tile is a size container named `gbt-stat-tile`: under 11 rem it tightens its padding and uses a smaller
|
|
48
|
+
figure (1.375 rem) so `1,284` is not cut, whatever the grid or the viewport. A figure that is still too long is
|
|
49
|
+
cut with an ellipsis, never overflowing. A tile outside a grid needs a definite width (a block).
|
|
50
|
+
|
|
51
|
+
**Containment side effect.** `container-type: inline-size` also applies layout containment to the host: a
|
|
52
|
+
`position: fixed` descendant (a popover, tooltip or menu panel projected into the tile) is placed against the tile,
|
|
53
|
+
not the viewport. Do not put a fixed-position overlay inside a tile; open it from outside (or use a native popover
|
|
54
|
+
in the top layer).
|
|
55
|
+
|
|
56
|
+
## Example
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<gbt-stat-grid ariaLabel="Summary">
|
|
60
|
+
<gbt-stat-tile
|
|
61
|
+
label="Repositories"
|
|
62
|
+
value="1,284"
|
|
63
|
+
icon="folder"
|
|
64
|
+
hint="last 30 days"
|
|
65
|
+
trend="up"
|
|
66
|
+
trendLabel="+12 %"
|
|
67
|
+
trendTone="success"
|
|
68
|
+
/>
|
|
69
|
+
<gbt-stat-tile label="Storage used" value="3.4 GB" icon="database" />
|
|
70
|
+
</gbt-stat-grid>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Accessibility
|
|
74
|
+
|
|
75
|
+
See [AUDIT.md](AUDIT.md).
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Stepper
|
|
2
|
+
|
|
3
|
+
An informational progress indicator through numbered steps (a
|
|
4
|
+
checkout tunnel, a multi-screen setup wizard) — distinct from
|
|
5
|
+
`SegmentedControl` (an exclusive choice) and `Tabs` (free navigation
|
|
6
|
+
between contents): a step can't be skipped, and this component itself
|
|
7
|
+
never navigates anywhere.
|
|
8
|
+
|
|
9
|
+
**Selector**: `gbt-stepper`
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
| Input | Type | Default | Role |
|
|
14
|
+
| ----------------- | --------------------------------- | --------------- | ------------------------------------------------------------------ |
|
|
15
|
+
| `steps` | `{ label: string; hasError?: boolean }[]` | required | The steps, in order. |
|
|
16
|
+
| `activeIndex` | `number` (model) | `0` | The current step's index. |
|
|
17
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | — |
|
|
18
|
+
| `completedLabel` | `string` | `'Completed'` | Visually-hidden suffix announced for a completed step. |
|
|
19
|
+
| `errorLabel` | `string` | `'Error'` | Visually-hidden suffix announced for a step with `hasError`. |
|
|
20
|
+
| `interactive` | `boolean` | `false` | Renders each step as a native button that sets `selectedIndex`. |
|
|
21
|
+
| `selectedIndex` | `number \| null` (model) | `null` | The step being viewed (interactive mode only); distinct from `activeIndex`. |
|
|
22
|
+
| `selectedLabel` | `string` | `'Selected'` | Visually-hidden suffix announced for the selected step. |
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<gbt-stepper
|
|
28
|
+
[steps]="[{ label: 'Account' }, { label: 'Shipping' }, { label: 'Payment' }]"
|
|
29
|
+
[activeIndex]="step()"
|
|
30
|
+
/>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Interactive mode
|
|
34
|
+
|
|
35
|
+
With `interactive`, every step becomes a real `<button type="button">`
|
|
36
|
+
inside its `<li>`. Clicking one only sets `selectedIndex` — the step
|
|
37
|
+
being *viewed* — while `activeIndex` stays the progress (and keeps
|
|
38
|
+
`aria-current="step"`). The consumer decides what a selection does:
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<gbt-stepper
|
|
42
|
+
[steps]="steps"
|
|
43
|
+
[activeIndex]="progress()"
|
|
44
|
+
[interactive]="true"
|
|
45
|
+
[(selectedIndex)]="viewed"
|
|
46
|
+
/>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Behavior
|
|
50
|
+
|
|
51
|
+
- Informational by default: without `interactive`, no click handler on
|
|
52
|
+
a step and no keyboard navigation of its own — this component only
|
|
53
|
+
ever *reflects* `activeIndex`, it never changes it. With
|
|
54
|
+
`interactive`, a click only sets `selectedIndex`; `activeIndex` is
|
|
55
|
+
never modified by this component.
|
|
56
|
+
- A step's status is derived purely from its position relative to
|
|
57
|
+
`activeIndex` (`completed` before it, `current` at it, `upcoming`
|
|
58
|
+
after it) and its own `hasError` — a step marked `hasError` only
|
|
59
|
+
shows as `error` once reached (at or before `activeIndex`), never
|
|
60
|
+
for a step further ahead that hasn't happened yet.
|
|
61
|
+
- Renders a real `<ol>`/`<li>` list — every step is rendered directly
|
|
62
|
+
by this component's own template (via the `steps` data array, not
|
|
63
|
+
content-projected per-step components), the same reasoning
|
|
64
|
+
`DescriptionList` already applied to `<dl>`/`<dt>`/`<dd>`: axe's
|
|
65
|
+
list-structure rule requires `<li>` to be a direct child of a
|
|
66
|
+
`<ul>`/`<ol>`, which a per-step custom element (even one set to
|
|
67
|
+
`display: contents`) does not satisfy.
|
package/switch/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Switch
|
|
2
|
+
|
|
3
|
+
Bascule on/off — alternative visuelle à `Checkbox` pour un réglage
|
|
4
|
+
binaire immédiat (ex. activer une option), plutôt qu'une sélection
|
|
5
|
+
dans un formulaire à valider.
|
|
6
|
+
|
|
7
|
+
**Selector**: `gbt-switch`
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
|
|
11
|
+
| Input | Type | Default | Role |
|
|
12
|
+
| ---------- | --------- | ------- | -------------------------------------------------------------------- |
|
|
13
|
+
| `id` | `string` | généré | `id` du champ natif. |
|
|
14
|
+
| `label` | `string` | `''` | Texte affiché à côté de la bascule. |
|
|
15
|
+
| `disabled` | `boolean` | `false` | Désactive le contrôle. |
|
|
16
|
+
| `hint` | `string` | `''` | Texte d'aide sous le libellé, relié au champ par `aria-describedby`. |
|
|
17
|
+
|
|
18
|
+
S'intègre aux formulaires Angular via `ControlValueAccessor`, comme
|
|
19
|
+
`Checkbox` — utilisable indifféremment avec `formControlName` ou
|
|
20
|
+
`[formControl]`.
|
|
21
|
+
|
|
22
|
+
## Exemple
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<gbt-switch label="Recevoir les notifications" formControlName="notifications" />
|
|
26
|
+
|
|
27
|
+
<gbt-switch
|
|
28
|
+
label="Envoyer un résumé quotidien"
|
|
29
|
+
hint="Un e-mail par jour, à 8 h."
|
|
30
|
+
formControlName="digest"
|
|
31
|
+
/>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Texte d'aide (`hint`)
|
|
35
|
+
|
|
36
|
+
Sans `hint`, le rendu ne comporte aucun élément supplémentaire (hôte inline).
|
|
37
|
+
Avec `hint`, l'hôte devient un bloc et le texte
|
|
38
|
+
s'affiche sous le libellé, aligné sur celui-ci (piste 2,25 rem + espace
|
|
39
|
+
0,5 rem) — plus besoin d'une indentation « magique » côté application.
|
|
40
|
+
Le texte est un `<p>` **hors** du `<label>` : il décrit le champ
|
|
41
|
+
(`aria-describedby`) sans s'ajouter à son nom accessible.
|
|
42
|
+
|
|
43
|
+
## Accessibilité
|
|
44
|
+
|
|
45
|
+
Basé sur `<input type="checkbox" role="switch">` — tout le
|
|
46
|
+
comportement natif (Space pour basculer, participation aux
|
|
47
|
+
formulaires, focus) est conservé ; `role="switch"` fait annoncer
|
|
48
|
+
"interrupteur" par les lecteurs d'écran plutôt que "case à cocher".
|
|
49
|
+
L'entrée native est visuellement masquée (`opacity: 0`) mais reste
|
|
50
|
+
dans l'arbre d'accessibilité et la zone cliquable — le rendu piste +
|
|
51
|
+
curseur est purement du CSS piloté par `:checked`, sans JavaScript.
|
package/table/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Table
|
|
2
|
+
|
|
3
|
+
Data table with optional clickable rows.
|
|
4
|
+
|
|
5
|
+
**Selector**: `gbt-table`
|
|
6
|
+
|
|
7
|
+
## Inputs
|
|
8
|
+
|
|
9
|
+
| Input | Type | Default | Role |
|
|
10
|
+
| --------------- | ------------------------------- | ----------- | -------------------------------------------------- |
|
|
11
|
+
| `data` | `T[]` | required | The rows. |
|
|
12
|
+
| `columns` | `TableColumn<T>[]` | required | `{ key, label, format?, cellTemplate? }` — the columns, in order. |
|
|
13
|
+
| `trackBy` | `((row: T) => unknown) \| null` | `null` | Row tracking function. |
|
|
14
|
+
| `emptyMessage` | `string` | `'No data'` | Message shown when `data` is empty. |
|
|
15
|
+
| `caption` | `string` | required | Table caption. |
|
|
16
|
+
| `clickableRows` | `boolean` | `false` | Makes rows focusable and keyboard-activatable. |
|
|
17
|
+
|
|
18
|
+
## Outputs
|
|
19
|
+
|
|
20
|
+
| Output | Type | Role |
|
|
21
|
+
| ---------- | ---- | ------------------------------------------------------------------------ |
|
|
22
|
+
| `rowClick` | `T` | Emitted on click or keyboard activation of a row (`clickableRows` only). |
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<gbt-table
|
|
28
|
+
caption="Dépôts"
|
|
29
|
+
[data]="depots"
|
|
30
|
+
[columns]="[{ key: 'nom', label: 'Nom' }, { key: 'taille', label: 'Taille' }]"
|
|
31
|
+
/>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Rich cell content: `cellTemplate`
|
|
35
|
+
|
|
36
|
+
A column's `format`/`key` can only ever produce plain text — there is
|
|
37
|
+
no way to put a link, a `Badge`, or a `Menu` in a cell through them.
|
|
38
|
+
`cellTemplate` renders a `TemplateRef` instead, with the row projected
|
|
39
|
+
as the template's `$implicit` context (the same escape hatch
|
|
40
|
+
`DescriptionList` offers for a value, adapted here to run once per
|
|
41
|
+
row):
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<ng-template #actionsCell let-repo>
|
|
45
|
+
<gbt-menu label="Actions" triggerIcon="ellipsis-vertical">
|
|
46
|
+
<button role="menuitem" class="gbt-menu__item" type="button" (click)="delete(repo)">Supprimer</button>
|
|
47
|
+
</gbt-menu>
|
|
48
|
+
</ng-template>
|
|
49
|
+
|
|
50
|
+
<gbt-table
|
|
51
|
+
caption="Dépôts"
|
|
52
|
+
[data]="depots"
|
|
53
|
+
[columns]="[
|
|
54
|
+
{ key: 'nom', label: 'Nom' },
|
|
55
|
+
{ key: 'actions', label: 'Actions', cellTemplate: actionsCell },
|
|
56
|
+
]"
|
|
57
|
+
/>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`key` still identifies the column (for `@for` tracking) even on a
|
|
61
|
+
template-only column — it doesn't have to name a real property of `T`,
|
|
62
|
+
a synthetic name like `'actions'` is fine since `format`/`row[key]` is
|
|
63
|
+
never reached for that column.
|
|
64
|
+
|
|
65
|
+
A `cellTemplate` cell is the consumer's own content, so its
|
|
66
|
+
accessibility is the consumer's responsibility — same delegation
|
|
67
|
+
`Table` already applies to `format`'s plain text, extended to richer
|
|
68
|
+
markup. An interactive element inside a `cellTemplate` (a link, a
|
|
69
|
+
`Menu` trigger) works normally with `Tab`/`Enter` since it's ordinary
|
|
70
|
+
projected DOM inside a `<td>`, nothing about `Table` intercepts it.
|
|
71
|
+
Combining it with `clickableRows` is supported: a click or `Enter`/`Space` on the projected
|
|
72
|
+
interactive element (a native control, a `<label>`, a `<summary>`, a `contenteditable` region, or an
|
|
73
|
+
element carrying an interactive WAI-ARIA widget role such as `button`, `link`, `checkbox`, `switch`,
|
|
74
|
+
`radio`, `tab`, `option`, `menuitem`, `textbox`, `searchbox`, `slider`) activates that element only
|
|
75
|
+
— it does not also fire `rowClick` — while the same click or key elsewhere in the row still does.
|
package/tabs/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Tabs
|
|
2
|
+
|
|
3
|
+
Tab navigation, with `gbt-tab` as projected content.
|
|
4
|
+
|
|
5
|
+
**Selector**: `gbt-tabs` (container), `gbt-tab` (each tab)
|
|
6
|
+
|
|
7
|
+
Left/right arrows to move between triggers, with wraparound.
|
|
8
|
+
|
|
9
|
+
`activeIndex` is an Angular `model()`, so it works uncontrolled (omit
|
|
10
|
+
the binding entirely, as every existing usage does) or controlled
|
|
11
|
+
(bind `[activeIndex]`/`(activeIndexChange)` to keep it in sync with,
|
|
12
|
+
e.g., a URL query parameter).
|
|
13
|
+
|
|
14
|
+
## Inputs of `gbt-tabs`
|
|
15
|
+
|
|
16
|
+
| Input | Type | Default | Role |
|
|
17
|
+
| ----- | -------- | ------------------------ | ------------------------------------------------------- |
|
|
18
|
+
| `id` | `string` | generated (`gbt-tabs-N`) | Prefix of the DOM ids generated for each trigger/panel. |
|
|
19
|
+
| `activeIndex` | `number` (model) | `0` | The active tab's index. Bind `[activeIndex]` (one-way — `Tabs` still updates it internally on click/arrow-key) or `[(activeIndex)]` (two-way) to control or observe it from outside. |
|
|
20
|
+
|
|
21
|
+
## Inputs of `gbt-tab`
|
|
22
|
+
|
|
23
|
+
| Input | Type | Role |
|
|
24
|
+
| ------- | -------- | ------------------------ |
|
|
25
|
+
| `label` | `string` | Required. Trigger label. |
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<gbt-tabs>
|
|
31
|
+
<gbt-tab label="Détails">...</gbt-tab>
|
|
32
|
+
<gbt-tab label="Historique">...</gbt-tab>
|
|
33
|
+
</gbt-tabs>
|
|
34
|
+
```
|