@masmarino/gabarit 1.4.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +231 -144
- 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 +477 -0
- package/fesm2022/masmarino-gabarit-autocomplete.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-avatar-group.mjs +199 -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 +1238 -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 +21 -11
- 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 +13 -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 +461 -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 +139 -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 +510 -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 +182 -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/fonts/OFL-ibm-plex.txt +93 -0
- package/fonts/ibm-plex-mono-400.woff2 +0 -0
- package/fonts/ibm-plex-mono-500.woff2 +0 -0
- package/fonts/ibm-plex-sans-400.woff2 +0 -0
- package/fonts/ibm-plex-sans-500.woff2 +0 -0
- package/fonts/ibm-plex-sans-600.woff2 +0 -0
- package/fonts/ibm-plex-sans-condensed-600.woff2 +0 -0
- package/fonts/index.scss +28 -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 +335 -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/src/lib/tokens/_a11y.scss +22 -0
- package/src/lib/tokens/_base.scss +31 -0
- package/src/lib/tokens/_palette.scss +52 -51
- package/src/lib/tokens/_semantic.scss +17 -124
- package/src/lib/tokens/_themes.scss +144 -0
- package/src/lib/tokens/_utilities.scss +10 -10
- package/src/lib/tokens/index.scss +3 -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 +139 -0
- package/types/masmarino-gabarit-avatar-group.d.ts +59 -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 +397 -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 +20 -59
- 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 +7 -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 +92 -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 +32 -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 +145 -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 +38 -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 -6605
- package/user-chip/README.md +42 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Breadcrumb
|
|
2
|
+
|
|
3
|
+
Trail of ancestor links plus a current segment — purely presentational,
|
|
4
|
+
no router dependency.
|
|
5
|
+
|
|
6
|
+
**Selector**: `gbt-breadcrumb`
|
|
7
|
+
|
|
8
|
+
## Inputs
|
|
9
|
+
|
|
10
|
+
| Input | Type | Role |
|
|
11
|
+
| ----------- | -------- | ---------------------------------------------------- |
|
|
12
|
+
| `ariaLabel` | `string` | Required. Accessible name of the breadcrumb `<nav>`. |
|
|
13
|
+
|
|
14
|
+
## Projected content
|
|
15
|
+
|
|
16
|
+
| Selector | Role |
|
|
17
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
18
|
+
| `[breadcrumb-ancestor]` | Zero or more ancestor items, in order — each projected as `<li breadcrumb-ancestor>` wrapping a real link (the `<ol>` content model and the CSS separator rule both depend on the projected node being an `<li>`, not the link itself). `.gbt-breadcrumb__item` (in `_utilities.scss`) for styling, applied to the link. |
|
|
19
|
+
| Default | The current segment: plain text, or an interactive element like `gbt-menu` if the current item doubles as a switcher. |
|
|
20
|
+
|
|
21
|
+
Separators (`/`) between items are rendered automatically via CSS — the
|
|
22
|
+
consuming app never adds them itself.
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<gbt-breadcrumb ariaLabel="Fil d'Ariane">
|
|
28
|
+
<li breadcrumb-ancestor><a class="gbt-breadcrumb__item" routerLink="/groupe">Groupe</a></li>
|
|
29
|
+
<li breadcrumb-ancestor>
|
|
30
|
+
<a class="gbt-breadcrumb__item" routerLink="/groupe/sous-groupe">Sous-groupe</a>
|
|
31
|
+
</li>
|
|
32
|
+
<gbt-menu label="Dépôt" align="start">
|
|
33
|
+
<a role="menuitem" class="gbt-menu__item" routerLink="/groupe/sous-groupe/autre-depot"
|
|
34
|
+
>autre-depot</a
|
|
35
|
+
>
|
|
36
|
+
</gbt-menu>
|
|
37
|
+
</gbt-breadcrumb>
|
|
38
|
+
```
|
package/button/README.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
Action button, or an anchor styled the same way — visual variants, sizes,
|
|
4
|
+
loading state, toggle and disclosure semantics. One component, two selectors
|
|
5
|
+
on the same class:
|
|
6
|
+
|
|
7
|
+
- **`gbt-button`** — a `<button>`, for an in-page action.
|
|
8
|
+
- **`a[gbtButton]`** — a real `<a>` that looks exactly like a `gbt-button`,
|
|
9
|
+
for a router link, a download, or any navigation. It is
|
|
10
|
+
**router-agnostic**: it never imports `@angular/router`. Put `routerLink`
|
|
11
|
+
(or a plain `href`), a `download`… on the same element yourself.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { Button } from '@masmarino/gabarit'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Inputs (button form — `gbt-button`)
|
|
18
|
+
|
|
19
|
+
| Input | Type | Default | Role |
|
|
20
|
+
| -------------- | ----------------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `variant` | `'primary' \| 'secondary' \| 'danger' \| 'ghost' \| 'ghost-danger' \| 'link'` | `'primary'` | Visual treatment. See [Variants](#variants). |
|
|
22
|
+
| `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Button size: at least 32 / 38 / 44px tall for `small` / `medium` / `large` (the shared `--gbt-control-height-*` scale, level with a field of the same tier); `large` is the 44px touch target. |
|
|
23
|
+
| `type` | `'button' \| 'submit'` | `'button'` | Native `type` attribute. |
|
|
24
|
+
| `text` | `string` | `''` | Visible label. The text `<span>` is only rendered when this is not empty. |
|
|
25
|
+
| `iconName` | `string \| null` | `null` | Icon shown before the text, if provided. |
|
|
26
|
+
| `ariaLabel` | `string \| null` | `null` | Accessible name, when the visible label isn't enough (mandatory for an icon-only button). |
|
|
27
|
+
| `loading` | `boolean` | `false` | Shows a loading indicator, disables the button. |
|
|
28
|
+
| `loadingLabel` | `string` | `'Loading'` | Text announced while loading (`.sr-only`). |
|
|
29
|
+
| `disabled` | `boolean` | `false` | Disables the button. |
|
|
30
|
+
| `pressed` | `boolean \| null` | `null` | Toggle button: renders `aria-pressed="true"` / `"false"`. `null` renders no attribute (an ordinary button). |
|
|
31
|
+
| `ariaExpanded` | `boolean \| null` | `null` | Disclosure or menu trigger: renders `aria-expanded`. `null` renders no attribute. |
|
|
32
|
+
| `ariaControls` | `string \| null` | `null` | Id of the element the button controls (`aria-controls`). |
|
|
33
|
+
| `ariaHaspopup` | `'menu' \| 'listbox' \| 'tree' \| 'grid' \| 'dialog' \| boolean \| null` | `null` | Kind of popup the button opens (`aria-haspopup`); `true` means a menu. |
|
|
34
|
+
| `block` | `boolean` | `false` | Stretches the button to the width of its container. |
|
|
35
|
+
| `iconOnly` | `boolean` | `false` | Squares the button around its icon (same padding on every side, as wide as tall: 32 / 38 / 44px for `small` / `medium` / `large`). Set `ariaLabel`. |
|
|
36
|
+
|
|
37
|
+
## Outputs (button form)
|
|
38
|
+
|
|
39
|
+
| Output | Type | Role |
|
|
40
|
+
| --------- | ------ | --------------------------------------------- |
|
|
41
|
+
| `clicked` | `void` | Emitted on click (not disabled, not loading). |
|
|
42
|
+
|
|
43
|
+
## Inputs (anchor form — `a[gbtButton]`)
|
|
44
|
+
|
|
45
|
+
| Input | Type | Default | Role |
|
|
46
|
+
| ---------- | ----------------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
47
|
+
| `variant` | `'primary' \| 'secondary' \| 'danger' \| 'ghost' \| 'ghost-danger' \| 'link'` | `'primary'` | Visual treatment (same as `gbt-button`). |
|
|
48
|
+
| `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Size: at least 32 / 38 / 44px tall for `small` / `medium` / `large` (the shared `--gbt-control-height-*` scale). |
|
|
49
|
+
| `iconName` | `string \| null` | `null` | Icon shown before the projected text. |
|
|
50
|
+
| `block` | `boolean` | `false` | Stretches the link to the width of its container. |
|
|
51
|
+
| `iconOnly` | `boolean` | `false` | Squares the link around its icon. Give the anchor an `aria-label`. |
|
|
52
|
+
| `disabled` | `boolean` | `false` | Link "disabled" semantics: `aria-disabled="true"`, `tabindex="-1"`, the click is swallowed (see below). |
|
|
53
|
+
|
|
54
|
+
The anchor's label is the projected content. Keep it a single text node or
|
|
55
|
+
wrap richer content in one `<span>`: the direct children are laid out as a
|
|
56
|
+
flex row with a 0.5rem gap, exactly like the button's icon and text. The
|
|
57
|
+
anchor form has no `type`, `text`, `ariaLabel`, `loading`, `loadingLabel`,
|
|
58
|
+
`pressed`, `ariaExpanded`, `ariaControls` or `ariaHaspopup` input — those are
|
|
59
|
+
native-`<button>` concerns the anchor form doesn't need (they exist on the
|
|
60
|
+
shared class but have no effect there; the anchor's accessible name is its
|
|
61
|
+
own `aria-label` attribute or its projected text, same as any link).
|
|
62
|
+
|
|
63
|
+
## One class, two selectors
|
|
64
|
+
|
|
65
|
+
`Button` is a single Angular class with `selector: 'gbt-button, a[gbtButton]'`.
|
|
66
|
+
Its constructor inspects `ElementRef.nativeElement.tagName` once to tell
|
|
67
|
+
which form it is applied to:
|
|
68
|
+
|
|
69
|
+
- On `<gbt-button>` it renders an internal native `<button>` carrying
|
|
70
|
+
`type`/`disabled`/the ARIA attributes above, and emits `clicked` on a real
|
|
71
|
+
click (guarded by `disabled`/`loading`).
|
|
72
|
+
- On `a[gbtButton]` there is no internal wrapper: the host **is** the anchor.
|
|
73
|
+
The button-look classes (`gbt-button`, `gbt-button--{variant}`,
|
|
74
|
+
`gbt-button--{size}`, `gbt-button--icon-only`) are put on the host itself,
|
|
75
|
+
and a capture-phase `click`/`auxclick` listener plus a tabindex-restore
|
|
76
|
+
effect implement the disabled-link semantics below. It never imports
|
|
77
|
+
`@angular/router`.
|
|
78
|
+
|
|
79
|
+
Both forms share the same variant/size look: `_button-look.scss` is a single
|
|
80
|
+
Sass mixin, called once for the inner `<button>` (class selectors) and once
|
|
81
|
+
more with `$host: true` for the anchor (`:host(...)` selectors) — there is
|
|
82
|
+
exactly one place that defines "the gbt-button look".
|
|
83
|
+
|
|
84
|
+
## Variants
|
|
85
|
+
|
|
86
|
+
| Variant | Use |
|
|
87
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
88
|
+
| `primary` | The main action of a view. |
|
|
89
|
+
| `secondary` | A neutral action, outlined. |
|
|
90
|
+
| `danger` | A destructive action, filled. |
|
|
91
|
+
| `ghost` | A quiet action: no fill, no border until hovered — toolbars, rows, icon-only buttons. |
|
|
92
|
+
| `ghost-danger` | A quiet destructive action (delete in a row): looks like `ghost` until hovered or focused, then turns red. |
|
|
93
|
+
| `link` | A text action inside running content: primary colour, underlined, no box. |
|
|
94
|
+
|
|
95
|
+
## Icon-only
|
|
96
|
+
|
|
97
|
+
`text` is left empty: no text `<span>` is rendered, so nothing but the icon
|
|
98
|
+
sits in the flex row (no stray gap). Add `iconOnly` to square the box, and an
|
|
99
|
+
`ariaLabel` for the accessible name:
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<gbt-button
|
|
103
|
+
variant="ghost-danger"
|
|
104
|
+
size="small"
|
|
105
|
+
iconName="x"
|
|
106
|
+
[iconOnly]="true"
|
|
107
|
+
ariaLabel="Delete label"
|
|
108
|
+
/>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Without `iconOnly` an icon-only button keeps the button's normal padding (a
|
|
112
|
+
slightly wider box) and renders no text `<span>` or gap around the icon.
|
|
113
|
+
|
|
114
|
+
## Toggle and disclosure
|
|
115
|
+
|
|
116
|
+
`pressed`, `ariaExpanded`, `ariaControls` and `ariaHaspopup` only reflect state:
|
|
117
|
+
the consumer flips it in its `clicked` handler. A pressed button also draws a
|
|
118
|
+
2px ring inside its box, so the state is not conveyed by colour alone.
|
|
119
|
+
|
|
120
|
+
```html
|
|
121
|
+
<gbt-button
|
|
122
|
+
variant="secondary"
|
|
123
|
+
[text]="following() ? 'Following' : 'Follow'"
|
|
124
|
+
[pressed]="following()"
|
|
125
|
+
(clicked)="toggle()"
|
|
126
|
+
/>
|
|
127
|
+
|
|
128
|
+
<gbt-button
|
|
129
|
+
text="Advanced"
|
|
130
|
+
iconName="chevron-down"
|
|
131
|
+
[ariaExpanded]="open()"
|
|
132
|
+
ariaControls="advanced"
|
|
133
|
+
(clicked)="open.set(!open())"
|
|
134
|
+
/>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Anchor: disabled
|
|
138
|
+
|
|
139
|
+
A link cannot be `disabled` natively. With `[disabled]="true"` the anchor gets
|
|
140
|
+
`aria-disabled="true"` and `tabindex="-1"` (a `tabindex` you had set is restored when it is enabled again), is dimmed with a `not-allowed`
|
|
141
|
+
cursor, and every `click` and middle click (`auxclick`) on it — including one
|
|
142
|
+
that lands on the icon — is stopped in the capture phase, before a `routerLink`
|
|
143
|
+
on the same element (or your own `(click)`) can run. `href` is left in place:
|
|
144
|
+
the attribute belongs to the consumer.
|
|
145
|
+
|
|
146
|
+
## Examples
|
|
147
|
+
|
|
148
|
+
```html
|
|
149
|
+
<gbt-button text="Enregistrer" variant="primary" (clicked)="save()" />
|
|
150
|
+
<gbt-button text="Se connecter" size="large" [block]="true" type="submit" />
|
|
151
|
+
|
|
152
|
+
<a gbtButton href="/groups">Groups</a>
|
|
153
|
+
|
|
154
|
+
<a gbtButton variant="secondary" iconName="folder" routerLink="/repositories">Repositories</a>
|
|
155
|
+
|
|
156
|
+
<a
|
|
157
|
+
gbtButton
|
|
158
|
+
variant="ghost"
|
|
159
|
+
size="small"
|
|
160
|
+
[iconOnly]="true"
|
|
161
|
+
iconName="plus"
|
|
162
|
+
aria-label="New group"
|
|
163
|
+
routerLink="/groups/new"
|
|
164
|
+
></a>
|
|
165
|
+
|
|
166
|
+
<a gbtButton href="/export.csv" download [disabled]="!ready()">Download</a>
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
With a router, activeness/`aria-current` stay the consumer's business
|
|
170
|
+
(`routerLinkActive`); the anchor renders exactly the attributes you put on it,
|
|
171
|
+
plus the ones above.
|
|
172
|
+
|
|
173
|
+
## Accessibility
|
|
174
|
+
|
|
175
|
+
See [AUDIT.md](AUDIT.md).
|
package/card/README.md
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# Card
|
|
2
|
+
|
|
3
|
+
Titled container: an optional heading over a box. Two looks for the box —
|
|
4
|
+
`elevated` (a shadow) and `outlined` (a quiet 1px edge) —, an optional
|
|
5
|
+
description and counter under / after the heading, a flush body for rows, a
|
|
6
|
+
tone and a selected state, and a link mode that makes the whole box
|
|
7
|
+
clickable.
|
|
8
|
+
|
|
9
|
+
**Selector**: `gbt-card` (+ the `CardHeader` directive and the `a[gbtCardLink]`
|
|
10
|
+
component, see below)
|
|
11
|
+
|
|
12
|
+
## Inputs
|
|
13
|
+
|
|
14
|
+
| Input | Type | Default | Role |
|
|
15
|
+
| --------------- | ------------------------------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
+
| `hoverable` | `boolean` | `false` | Adds a visual hover treatment. |
|
|
17
|
+
| `heading` | `string` | `''` | Header title. Empty by default: no header is rendered without it (or a `[card-header]` slot). |
|
|
18
|
+
| `icon` | `string` | `''` | Icon shown beside the title, in the header. A toned header without one shows the tone's icon. |
|
|
19
|
+
| `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `2` | Level of the rendered heading — choose it based on the block's place in the page hierarchy (RGAA 9.1). |
|
|
20
|
+
| `variant` | `'elevated' \| 'outlined'` | `'elevated'` | `outlined` swaps the box's shadow for a border. |
|
|
21
|
+
| `description` | `string` | `''` | One-line help text under the heading (built-in header only). |
|
|
22
|
+
| `count` | `number \| null` | `null` | Counter pill after the heading, `0` included. |
|
|
23
|
+
| `flush` | `boolean` | `false` | No padding inside the box: rows and tables reach its edges (clipped to its rounded corners). |
|
|
24
|
+
| `tone` | `'default' \| 'success' \| 'warning' \| 'error'` | `'default'` | Colours the header's icon and title (`error` for a subsystem that is down, `success` for a result). Needs a header; the box is never tinted. |
|
|
25
|
+
| `selected` | `boolean` | `false` | Accent ring (2px) and a faint wash on the box — the chosen option of a set of cards. |
|
|
26
|
+
| `selectedLabel` | `string` | `'Selected'` | Visually hidden text read by screen readers on a `selected` card (colour and ring are not enough). Empty removes it. |
|
|
27
|
+
| `href` | `string \| null` | `null` | Link mode: the heading becomes a link whose hit area covers the card's box (see below). |
|
|
28
|
+
| `linkLabel` | `string \| null` | `null` | `aria-label` of the link — the name of a link-mode card that has NO heading text. Ignored when there is a heading (the visible text stays the name: WCAG label in name). |
|
|
29
|
+
|
|
30
|
+
There is no `headerStyle` input: the header has a single look. A static
|
|
31
|
+
`headerStyle="…"` attribute still compiles (it renders as an inert
|
|
32
|
+
`headerstyle` DOM attribute); a bound `[headerStyle]="…"` fails to compile
|
|
33
|
+
(NG8002).
|
|
34
|
+
|
|
35
|
+
## Structure: a heading over a box
|
|
36
|
+
|
|
37
|
+
The component renders two siblings:
|
|
38
|
+
|
|
39
|
+
1. **The header** (`.gbt-card__header`, only when there is a `heading` or a
|
|
40
|
+
`[card-header]`): a plain heading **above** the card, like a section title
|
|
41
|
+
over a panel. It has no background, no border and no radius of its own —
|
|
42
|
+
the icon, the title (with its count), the description under it, and the
|
|
43
|
+
`[card-header-actions]` on the right. `0.5rem` separates it from the box
|
|
44
|
+
(the heading-to-content gap of `gbt-panel`).
|
|
45
|
+
2. **The box** (`.gbt-card`): the card itself — shadow (`elevated`) or 1px
|
|
46
|
+
edge (`outlined`), background, padding, and a full radius on all four
|
|
47
|
+
corners. It holds the body only. `selected` and the link target are the
|
|
48
|
+
box's; the header is a label over it.
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
<gbt-card> display: grid, position: relative
|
|
52
|
+
div.gbt-card__header heading, count, description, actions
|
|
53
|
+
div.gbt-card the box: data-variant, data-flush, data-selected, data-link
|
|
54
|
+
div.gbt-card__body your content
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`tone` is carried by the header (`data-tone` on `.gbt-card__header`), the
|
|
58
|
+
other states by the box. To restyle the box (padding, a flex column…), target
|
|
59
|
+
`.gbt-card`: it does not contain the heading.
|
|
60
|
+
|
|
61
|
+
## Projected content
|
|
62
|
+
|
|
63
|
+
- Default: the card's body. It sits in a `.gbt-card__body` wrapper that is `display: contents` (invisible to layout) unless the card is `flush`, so a `display: flex; gap` you put on the box (`.gbt-card`) still reaches your children directly.
|
|
64
|
+
- `[card-header-actions]`: actions shown on the right of the header (button, menu…).
|
|
65
|
+
- `[card-header]`: replaces the `heading` / `icon` / `description` / `count` block with your own header content, above the box. **Import the `CardHeader` directive next to `Card`** for the header layout (flex row, actions on the right). Without the import the marked element is still rendered — plain, at the top of the box, above the body — never dropped (same fallback as `gbt-menu`'s `MenuTrigger`).
|
|
66
|
+
|
|
67
|
+
## Tone
|
|
68
|
+
|
|
69
|
+
`tone` colours the header's icon and title in the tone's text colour
|
|
70
|
+
(`--color-success-text`, `--color-warning-text`, `--color-error-text` — the
|
|
71
|
+
pair `gbt-badge`'s outline look uses on the page). No wash, no tinted edge:
|
|
72
|
+
the box, the description and the count stay neutral. A toned header always
|
|
73
|
+
shows an icon — the one you give, or the tone's own (`check-circle`,
|
|
74
|
+
`alert-triangle`, `alert-circle`, as `gbt-alert`) — so the tone is never
|
|
75
|
+
conveyed by colour alone; the title text carries the meaning. A card without a
|
|
76
|
+
header shows no tone.
|
|
77
|
+
|
|
78
|
+
With a custom `[card-header]`, `tone` only sets `data-tone` on
|
|
79
|
+
`.gbt-card__header` — it does not colour your projected content or add an
|
|
80
|
+
icon (there is no built-in icon or title to colour). Style your own header
|
|
81
|
+
content by tone if needed, and pair the colour with an icon or a word so the
|
|
82
|
+
tone is not conveyed by colour alone:
|
|
83
|
+
|
|
84
|
+
```css
|
|
85
|
+
/* A global stylesheet, or behind `:host ::ng-deep` in a component's styles:
|
|
86
|
+
.gbt-card__header is gbt-card's own element, outside your encapsulation. */
|
|
87
|
+
.gbt-card__header[data-tone='warning'] .my-title {
|
|
88
|
+
color: var(--color-warning-text);
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Flush
|
|
93
|
+
|
|
94
|
+
`flush` only removes the box's padding: rows, a table, a `gbt-list-row` or a
|
|
95
|
+
`gbt-empty-state` reach the box's edges, and the body clips them to the box's
|
|
96
|
+
inner corners. The header is not in the box, so it is not affected.
|
|
97
|
+
|
|
98
|
+
## Examples
|
|
99
|
+
|
|
100
|
+
```html
|
|
101
|
+
<gbt-card heading="Registre Docker" [headingLevel]="2">
|
|
102
|
+
<gbt-gauge-bar ... />
|
|
103
|
+
</gbt-card>
|
|
104
|
+
|
|
105
|
+
<!-- A settings card: outlined, a heading above it, rows to the edges -->
|
|
106
|
+
<gbt-card
|
|
107
|
+
variant="outlined"
|
|
108
|
+
heading="Variables"
|
|
109
|
+
icon="key"
|
|
110
|
+
description="Injectées dans chaque job."
|
|
111
|
+
[count]="variables().length"
|
|
112
|
+
[flush]="true"
|
|
113
|
+
>
|
|
114
|
+
<gbt-button card-header-actions size="small" text="Ajouter" />
|
|
115
|
+
<ul>
|
|
116
|
+
…
|
|
117
|
+
</ul>
|
|
118
|
+
</gbt-card>
|
|
119
|
+
|
|
120
|
+
<!-- Your own header -->
|
|
121
|
+
<gbt-card variant="outlined">
|
|
122
|
+
<div card-header><strong>src/app/app.ts</strong> <gbt-badge>+12 −3</gbt-badge></div>
|
|
123
|
+
</gbt-card>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Whole-card link
|
|
127
|
+
|
|
128
|
+
Two ways, both use the **stretched link** pattern: the anchor stays the heading
|
|
129
|
+
text only (that is its accessible name), and a pseudo-element of the anchor
|
|
130
|
+
stretches its hit area over the card's **box**. There is **no interactive
|
|
131
|
+
content nested inside the link**, so screen readers announce one clear link and
|
|
132
|
+
axe's `nested-interactive` rule is satisfied.
|
|
133
|
+
|
|
134
|
+
The heading sits above the box, so the anchor is not inside the box: the host
|
|
135
|
+
is a positioned grid (`gbt-card-header` / `gbt-card-box` areas) and the
|
|
136
|
+
anchor's overlay names the `gbt-card-box` area, which makes the box's area its
|
|
137
|
+
containing block. The overlay therefore covers the box exactly — not the
|
|
138
|
+
heading row, whose only target is the heading text itself — and the hover
|
|
139
|
+
shadow and the focus ring are drawn on the box. Keep the host's
|
|
140
|
+
`display: grid` (do not set `display: block` on `gbt-card`): when the grid
|
|
141
|
+
does not apply, the overlay covers the header row too. The header's controls
|
|
142
|
+
(`[card-header-actions]`, anything interactive in a `[card-header]`) still
|
|
143
|
+
stay operable then, because they are lifted above the overlay the same way the
|
|
144
|
+
body's controls are (see below).
|
|
145
|
+
|
|
146
|
+
```html
|
|
147
|
+
<!-- 1. href: the heading becomes the link -->
|
|
148
|
+
<gbt-card
|
|
149
|
+
variant="outlined"
|
|
150
|
+
heading="Guide de démarrage"
|
|
151
|
+
href="/guide"
|
|
152
|
+
description="Installer le projet"
|
|
153
|
+
/>
|
|
154
|
+
|
|
155
|
+
<!-- 2. a projected anchor — router-agnostic, works with routerLink -->
|
|
156
|
+
<gbt-card variant="outlined">
|
|
157
|
+
<h3 card-header><a gbtCardLink [routerLink]="['/releases', id]">Release {{ version }}</a></h3>
|
|
158
|
+
<gbt-button card-header-actions size="small" variant="secondary" text="Télécharger" />
|
|
159
|
+
<p>Notes de version…</p>
|
|
160
|
+
<a [routerLink]="['/releases', id, 'notes']">Notes</a>
|
|
161
|
+
</gbt-card>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Import `CardLink` (and `CardHeader` for the second form). Rules of the pattern:
|
|
165
|
+
|
|
166
|
+
- **One link per card.** The stretched anchor is the card's target; put the heading, not a paragraph, in it. No heading? Use `href` with `linkLabel`.
|
|
167
|
+
- **Other controls stay separate.** Buttons, menus and links elsewhere in the card — in the box or in the header — are lifted above the stretched area (`z-index: 2`, and `position: relative` unless the control positions itself — a `gbt-switch`'s hidden input stays `absolute`) so they stay clickable and keep their own tab stop. The lifting rule has zero specificity: your own `position`/`z-index` on such a control wins. Do not wrap them in the link and do not put the link around the card (`<a>` around interactive content is a nested-interactive trap).
|
|
168
|
+
- The focus ring is drawn around the box (inside its edge).
|
|
169
|
+
- Trade-off of the pattern: text inside a linked card cannot be selected with the mouse.
|
|
170
|
+
|
|
171
|
+
## Heading level
|
|
172
|
+
|
|
173
|
+
`headingLevel` (default `2`) picks the `h1`…`h6`. Choose it from the card's
|
|
174
|
+
place in the page, not its size.
|
|
175
|
+
|
|
176
|
+
## Container queries
|
|
177
|
+
|
|
178
|
+
The card is not a size container: a page that adapts its contents to the card's
|
|
179
|
+
width should wrap the card in its own `container-type: inline-size` element.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Checkbox
|
|
2
|
+
|
|
3
|
+
Checkbox, integrated with reactive forms and `ngModel`.
|
|
4
|
+
|
|
5
|
+
**Selector**: `gbt-checkbox`
|
|
6
|
+
|
|
7
|
+
Implements `ControlValueAccessor` — driven via `formControlName` or
|
|
8
|
+
`[(ngModel)]`. Without Angular forms, use the `checked` model
|
|
9
|
+
(`[checked]` + `(checkedChange)`, or `[(checked)]`).
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
| Input | Type | Default | Role |
|
|
14
|
+
| ---------- | ----------------- | ---------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `id` | `string` | generated (`gbt-checkbox-N`) | DOM id, associates the `<label>`. |
|
|
16
|
+
| `label` | `string` | `''` | Visible label. |
|
|
17
|
+
| `disabled` | `boolean` | `false` | Disables the checkbox (cumulative with the form's disabled state). |
|
|
18
|
+
| `hint` | `string` | `''` | Help text under the label, linked to the input with `aria-describedby`. |
|
|
19
|
+
| `checked` | `boolean` (model) | `false` | Checked state for use **without** Angular forms: `[checked]` sets it, `(checkedChange)` follows it. |
|
|
20
|
+
|
|
21
|
+
## Outputs
|
|
22
|
+
|
|
23
|
+
| Output | Type | Role |
|
|
24
|
+
| --------------- | --------- | ------------------------------------------------ |
|
|
25
|
+
| `checkedChange` | `boolean` | Emitted when the user toggles the box (`model`). |
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<gbt-checkbox label="Se souvenir de moi" formControlName="remember" />
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Without Angular forms (`checked` model)
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<gbt-checkbox label="Push" [checked]="selected().has('push')" (checkedChange)="toggle('push')" />
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The native box reflects the bound value, and the user's toggle is reported
|
|
40
|
+
through `checkedChange` — the pattern for a list of options whose state lives
|
|
41
|
+
in a signal or a `Set`. For a whole group use [`gbt-checkbox-group`](../checkbox-group/README.md).
|
|
42
|
+
`checked` and the form value are the same state: do not bind both.
|
|
43
|
+
Set it with a binding, `[checked]="true"`: a bare `checked` attribute is not a boolean
|
|
44
|
+
attribute here (the model is not transformed) and fails strict templates.
|
|
45
|
+
|
|
46
|
+
## Hint
|
|
47
|
+
|
|
48
|
+
Without `hint` nothing is added. With it, the host becomes a block and the text
|
|
49
|
+
shows under the label, aligned with the label text; it is a `<p>` outside the
|
|
50
|
+
`<label>`, so it describes the checkbox (`aria-describedby`) without joining its name.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# CheckboxGroup
|
|
2
|
+
|
|
3
|
+
A set of checkboxes that answer one question ("Which events?") — a
|
|
4
|
+
`<fieldset>` with a `<legend>`, whose value is the **array of the checked
|
|
5
|
+
options' values**. Use [`Checkbox`](../checkbox/README.md) for a single
|
|
6
|
+
yes/no, [`RadioGroup`](../radio-group/README.md) for a single choice.
|
|
7
|
+
|
|
8
|
+
**Selector**: `gbt-checkbox-group`
|
|
9
|
+
|
|
10
|
+
Implements `ControlValueAccessor` (`formControlName`, `[(ngModel)]`) **and** exposes a
|
|
11
|
+
`value` model, so it also works without Angular forms (`[(value)]`).
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
|
|
15
|
+
| Input | Type | Default | Role |
|
|
16
|
+
| -------------- | --------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
17
|
+
| `legend` | `string` | required | The group's question, rendered as the `<legend>` (its accessible name). |
|
|
18
|
+
| `options` | `CheckboxGroupOption<T>[]` | `[]` | Flat list of options. |
|
|
19
|
+
| `groups` | `CheckboxGroupSection<T>[]` | `[]` | Options split into named sections, rendered after `options`. Each section is a `role="group"` named by its heading. |
|
|
20
|
+
| `value` | `T[]` (model) | `[]` | The checked options' values, in option order. Also the form value. |
|
|
21
|
+
| `columns` | `number \| 'auto'` | `1` | Equal columns, or `'auto'` to fit as many (min 11rem) as the width allows. On the flat list, or on the sections when there are `groups`. Only `'auto'` collapses on a narrow screen; a fixed count keeps its columns (short options only). |
|
|
22
|
+
| `hint` | `string` | `''` | Help text under the legend, linked with `aria-describedby`; replaced by the error while one shows. |
|
|
23
|
+
| `errorMessage` | `string \| null` | `null` | Error text (`role="alert"`), `aria-describedby` and `aria-invalid` on the fieldset. |
|
|
24
|
+
| `required` | `boolean` | `false` | Adds ` *` to the legend (same convention as `RadioGroup`). |
|
|
25
|
+
| `hideLegend` | `boolean` | `false` | Keeps the legend for assistive technology, removes it from the layout. |
|
|
26
|
+
| `disabled` | `boolean` | `false` | Disables every checkbox (cumulative with the form's disabled state). |
|
|
27
|
+
| `id` | `string` | generated (`gbt-checkbox-group-N`) | Prefix of the ids of the checkboxes, hint and error. |
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
interface CheckboxGroupOption<T = string> {
|
|
31
|
+
value: T
|
|
32
|
+
label: string
|
|
33
|
+
hint?: string // help text under this option
|
|
34
|
+
disabled?: boolean // disables this option only
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface CheckboxGroupSection<T = string> {
|
|
38
|
+
label: string // visible heading, names the role="group"
|
|
39
|
+
options: CheckboxGroupOption<T>[]
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`T` is compared by identity (`includes`), so primitives and shared object
|
|
44
|
+
references both work.
|
|
45
|
+
|
|
46
|
+
## Examples
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<!-- With Angular forms -->
|
|
50
|
+
<gbt-checkbox-group legend="Notify me about" [options]="options" formControlName="events" />
|
|
51
|
+
|
|
52
|
+
<!-- Without: two-way model -->
|
|
53
|
+
<gbt-checkbox-group legend="Notify me about" [options]="options" [(value)]="events" />
|
|
54
|
+
|
|
55
|
+
<!-- Named sections, as many columns as fit -->
|
|
56
|
+
<gbt-checkbox-group
|
|
57
|
+
legend="Events"
|
|
58
|
+
[groups]="eventGroups"
|
|
59
|
+
columns="auto"
|
|
60
|
+
formControlName="events"
|
|
61
|
+
/>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Behavior
|
|
65
|
+
|
|
66
|
+
- Toggling a box emits the new array (`valueChange` / form `onChange`) **in
|
|
67
|
+
option order**, not click order, so the value is stable; values that match no
|
|
68
|
+
option are kept at the end. The control is marked touched on the first toggle.
|
|
69
|
+
- Unchecking the last box emits `[]`, never `null`. `writeValue(null)` reads as `[]`.
|
|
70
|
+
|
|
71
|
+
## Accessibility
|
|
72
|
+
|
|
73
|
+
Native checkboxes (each is the existing `gbt-checkbox`) inside a
|
|
74
|
+
`<fieldset>`/`<legend>`: the group name is announced with each box, every box
|
|
75
|
+
is a tab stop and Space toggles it — no scripted keyboard handling, no roving
|
|
76
|
+
tabindex (it is a set of independent controls, not a composite widget). Named
|
|
77
|
+
sections add `role="group"` + `aria-labelledby` on the visible heading. See
|
|
78
|
+
[`AUDIT.md`](AUDIT.md).
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# ConfirmDangerModal
|
|
2
|
+
|
|
3
|
+
A confirmation dialog for a destructive, hard-to-reverse action. Two forms:
|
|
4
|
+
|
|
5
|
+
- **Typed** (`confirmText` given): the confirm button stays disabled until the user types an exact
|
|
6
|
+
match of a given string (e.g. the name of the thing being deleted), the same "type-to-confirm"
|
|
7
|
+
pattern GitLab uses for project/group deletion.
|
|
8
|
+
- **Light** (`confirmText` left out): no field, a normal confirm button, and a tinted icon beside
|
|
9
|
+
the message. For what is easy to redo (a webhook, a token, a collaborator).
|
|
10
|
+
|
|
11
|
+
**Selector**: `gbt-confirm-danger-modal`
|
|
12
|
+
|
|
13
|
+
Built on `Modal`: Escape, a backdrop click, or its own close button all
|
|
14
|
+
already work exactly as `Modal` documents them (including `busy`); this component only adds
|
|
15
|
+
the optional typed-confirmation gate and the Cancel/Confirm footer.
|
|
16
|
+
|
|
17
|
+
## Inputs
|
|
18
|
+
|
|
19
|
+
| Input | Type | Default | Role |
|
|
20
|
+
| ------------------- | ------------------------------------ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `isOpen` | `boolean` | required | Open/closed state, driven by the application. |
|
|
22
|
+
| `heading` | `string` | required | Dialog title. |
|
|
23
|
+
| `message` | `string` | required | Warning text shown above the confirmation input (typed) or beside the icon (light). |
|
|
24
|
+
| `confirmText` | `string \| null \| undefined` | `undefined` | The exact string the user must type before the confirm button enables — typically the name of the item being deleted. **Absent (or `null`): no typing gate, a light confirmation.** An empty string is still typed and fail-closed: it disables the confirm button permanently. An unresolved binding (`[confirmText]="repo()?.name"` while `repo()` is still `null`/`undefined`) also counts as absent and yields a light, one-click confirmation: for a destructive action, guard the `@if` that renders the modal until the name is known. |
|
|
25
|
+
| `confirmInputLabel` | `string` | `'Type to confirm'` | Label of the confirmation text field (typed form). |
|
|
26
|
+
| `confirmLabel` | `string` | `'Confirm'` | Text of the confirm button. |
|
|
27
|
+
| `cancelLabel` | `string` | `'Cancel'` | Text of the cancel button. |
|
|
28
|
+
| `closeLabel` | `string` | `'Close'` | Accessible name of the modal's own close (X) button. |
|
|
29
|
+
| `busy` | `boolean` | `false` | The request is running: the confirm button shows a spinner (and is disabled), Cancel is disabled, and Escape, the backdrop, the close button and a second click are ignored — nothing is emitted. The typing field is locked too. |
|
|
30
|
+
| `busyLabel` | `string` | `'Working'` | Read out on the confirm button and by the dialog while `busy`. |
|
|
31
|
+
| `confirmIcon` | `string \| null` | `null` | Icon (a registered `gbt-icon` name) before the confirm label. None by default. |
|
|
32
|
+
| `tone` | `'danger' \| 'warning' \| 'neutral'` | `'danger'` | `danger`: red confirm button and disc. `warning`: primary button, amber disc. `neutral`: primary button, blue disc (a plain confirmation). The disc only shows on the light form. |
|
|
33
|
+
|
|
34
|
+
## Outputs
|
|
35
|
+
|
|
36
|
+
| Output | Type | Role |
|
|
37
|
+
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
+
| `confirmed` | `void` | Emitted only when the confirm button is clicked — for a typed confirmation, only once the typed text exactly matches `confirmText`; never while `busy`. |
|
|
39
|
+
| `closed` | `void` | Emitted on Cancel, Escape, the close button, or a backdrop click (never while `busy`). The application must respond by setting `isOpen` to `false`. Never emitted together with `confirmed`. |
|
|
40
|
+
|
|
41
|
+
Whatever the user typed is cleared automatically whenever the modal closes,
|
|
42
|
+
so a later reopen never shows a stale value.
|
|
43
|
+
|
|
44
|
+
## Example
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<gbt-confirm-danger-modal
|
|
48
|
+
[isOpen]="confirming()"
|
|
49
|
+
heading="Supprimer le dépôt"
|
|
50
|
+
message="Cette action supprimera définitivement le dépôt et tout son contenu."
|
|
51
|
+
[confirmText]="repo().name"
|
|
52
|
+
confirmInputLabel="Tapez le nom du dépôt pour confirmer"
|
|
53
|
+
confirmLabel="Supprimer"
|
|
54
|
+
cancelLabel="Annuler"
|
|
55
|
+
closeLabel="Fermer"
|
|
56
|
+
(confirmed)="deleteRepository()"
|
|
57
|
+
(closed)="confirming.set(false)"
|
|
58
|
+
/>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
A light confirmation whose request is running:
|
|
62
|
+
|
|
63
|
+
```html
|
|
64
|
+
@if (pending(); as webhook) {
|
|
65
|
+
<gbt-confirm-danger-modal
|
|
66
|
+
[isOpen]="true"
|
|
67
|
+
heading="Delete the webhook"
|
|
68
|
+
[message]="'Deliveries to ' + webhook.url + ' will stop.'"
|
|
69
|
+
confirmLabel="Delete"
|
|
70
|
+
confirmIcon="trash-2"
|
|
71
|
+
[busy]="deleting()"
|
|
72
|
+
busyLabel="Deleting"
|
|
73
|
+
(confirmed)="delete(webhook)"
|
|
74
|
+
(closed)="pending.set(null)"
|
|
75
|
+
/>
|
|
76
|
+
}
|
|
77
|
+
```
|