@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,90 @@
|
|
|
1
|
+
# CopyButton
|
|
2
|
+
|
|
3
|
+
A button that copies a value to the clipboard and says so. It replaces the five hand-written
|
|
4
|
+
"copy + Copied for 2 s + select the text on failure" implementations of an application (clone box,
|
|
5
|
+
recovery codes, file view, one-time token, row menu).
|
|
6
|
+
|
|
7
|
+
**Selector**: `gbt-copy-button`. Built on [`gbt-button`](../button/README.md); the clipboard logic
|
|
8
|
+
(`copyToClipboard`, `ClipboardFeedback`) lives in `clipboard.ts` and is shared with
|
|
9
|
+
[`gbt-copy-field`](../copy-field/README.md), [`gbt-secret-reveal`](../secret-reveal/README.md)
|
|
10
|
+
and [`gbt-badge`](../badge/README.md)'s `copyable` input.
|
|
11
|
+
|
|
12
|
+
## Inputs
|
|
13
|
+
|
|
14
|
+
| Input | Type | Default | Role |
|
|
15
|
+
| -------------- | ---------------------------------- | --------------- | --------------------------------------------------------------------------------------------------- |
|
|
16
|
+
| `value` | `string \| (() => string)` | `''` | The text to copy. A function is called when the button is pressed (a big file body, a fresh token). |
|
|
17
|
+
| `text` | `string` | `''` | Visible label. Empty: an icon-only square. |
|
|
18
|
+
| `ariaLabel` | `string \| null` | `null` | Accessible name. Defaults to `Copy` when icon-only and to `text` otherwise. |
|
|
19
|
+
| `copiedText` | `string` | `'Copied'` | Message shown and announced after a successful copy. |
|
|
20
|
+
| `failedText` | `string` | `'Copy failed'` | Message shown and announced when the copy is refused. |
|
|
21
|
+
| `feedbackMs` | `number` | `2000` | How long the "copied" message stays. A failure message stays twice as long. |
|
|
22
|
+
| `variant` | `ButtonVariant` | `'secondary'` | Same values as `gbt-button`. |
|
|
23
|
+
| `size` | `ButtonSize` | `'small'` | `small \| medium \| large`. |
|
|
24
|
+
| `icon` | `string` | `'copy'` | Glyph of the idle button (registered icon name; `copy` is built in). |
|
|
25
|
+
| `disabled` | `boolean` | `false` | |
|
|
26
|
+
| `feedback` | `'bubble' \| 'inline' \| 'hidden'` | `'bubble'` | Where the message is drawn (see below). |
|
|
27
|
+
| `selectTarget` | `HTMLElement \| null` | `null` | Selected when the copy fails, so the user can copy by hand with Ctrl+C / Cmd+C. |
|
|
28
|
+
|
|
29
|
+
## Outputs
|
|
30
|
+
|
|
31
|
+
| Output | Payload | Role |
|
|
32
|
+
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------ |
|
|
33
|
+
| `copied` | `string` | The text that was copied. |
|
|
34
|
+
| `copyFailed` | `void` | Neither the Clipboard API nor the fallback could copy (the text is shown selected if `selectTarget` is set). |
|
|
35
|
+
|
|
36
|
+
## How it copies
|
|
37
|
+
|
|
38
|
+
1. `navigator.clipboard.writeText` (secure contexts only: HTTPS or `localhost`).
|
|
39
|
+
2. Otherwise, or when the write is refused, `document.execCommand('copy')` on a throw-away textarea
|
|
40
|
+
(the focus and the selection of the page are restored). This is what makes a **plain-HTTP
|
|
41
|
+
self-hosted instance** work.
|
|
42
|
+
3. Otherwise `copyFailed` is emitted, the failure message shows and `selectTarget` is selected.
|
|
43
|
+
|
|
44
|
+
No browser API is read until the button is pressed, so rendering (SSR, jsdom) never touches
|
|
45
|
+
`navigator.clipboard`. A write that settles after the component is destroyed schedules nothing and
|
|
46
|
+
emits nothing.
|
|
47
|
+
|
|
48
|
+
## Stale messages
|
|
49
|
+
|
|
50
|
+
A "Copied" message belongs to the text that was copied: when `value` changes to a different **string** the message is
|
|
51
|
+
dropped (a function value is left alone, since a template may hand out a new closure on every change detection).
|
|
52
|
+
`reset()` (a public method) drops it on demand; `gbt-secret-reveal` calls it when the secret is hidden.
|
|
53
|
+
|
|
54
|
+
The legacy fallback puts its temporary textarea inside the trigger's `dialog` / `[role="dialog"]` when there is
|
|
55
|
+
one: a native modal `<dialog>` makes the rest of the page inert, and a textarea outside it could not be focused.
|
|
56
|
+
|
|
57
|
+
## Feedback
|
|
58
|
+
|
|
59
|
+
The accessible name never changes. The outcome is told by:
|
|
60
|
+
|
|
61
|
+
- a polite `role="status"` region that is **always in the DOM** (a live region only announces changes if
|
|
62
|
+
it was already rendered), holding `copiedText` or `failedText`;
|
|
63
|
+
- the icon: `copy`, then `check` (or `alert-circle` on failure), so it is never colour alone;
|
|
64
|
+
- visually, according to `feedback`: `bubble` is a small pill floating above the button, right-aligned
|
|
65
|
+
(clipped by an ancestor with `overflow: hidden`: use `inline` there); `inline` is the same message in
|
|
66
|
+
the flow after the button; `hidden` is for screen readers only.
|
|
67
|
+
|
|
68
|
+
The host carries `data-status="idle | copied | failed"` for styling.
|
|
69
|
+
|
|
70
|
+
## Example
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<code #url>{{ cloneUrl }}</code>
|
|
74
|
+
<gbt-copy-button
|
|
75
|
+
[value]="cloneUrl"
|
|
76
|
+
ariaLabel="Copy the clone URL"
|
|
77
|
+
copiedText="Copied"
|
|
78
|
+
failedText="Copy failed, press Ctrl+C"
|
|
79
|
+
[selectTarget]="url"
|
|
80
|
+
(copied)="analytics.track('clone-url-copied')"
|
|
81
|
+
/>
|
|
82
|
+
|
|
83
|
+
<!-- A label, and a value produced only when needed -->
|
|
84
|
+
<gbt-copy-button text="Copy the file" [value]="() => file().content" feedback="inline" />
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Accessibility
|
|
88
|
+
|
|
89
|
+
See [AUDIT.md](AUDIT.md). The icon-only button needs (and gets) a name; localise `ariaLabel`,
|
|
90
|
+
`copiedText` and `failedText` (the defaults are English).
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# CopyField
|
|
2
|
+
|
|
3
|
+
A read-only value in monospace with a copy button beside it: a clone URL, a webhook URL, an activation
|
|
4
|
+
link, a token that is shown in full.
|
|
5
|
+
|
|
6
|
+
**Selector**: `gbt-copy-field`. Built on [`gbt-copy-button`](../copy-button/README.md) (Clipboard API,
|
|
7
|
+
`execCommand` fallback, live-region confirmation). For a secret that must stay masked until asked for,
|
|
8
|
+
use [`gbt-secret-reveal`](../secret-reveal/README.md).
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
|
|
12
|
+
| Input | Type | Default | Role |
|
|
13
|
+
| ------------ | ---------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
14
|
+
| `value` | `string` | — | Required. The value shown and copied. |
|
|
15
|
+
| `label` | `string \| null` | `null` | Visible label above the field. It also names the group (`role="group"`, `aria-labelledby`). |
|
|
16
|
+
| `copyLabel` | `string` | `'Copy'` | Accessible name of the copy button. Say what is copied ("Copy the clone URL"). |
|
|
17
|
+
| `copiedText` | `string` | `'Copied'` | Message shown and announced after a successful copy. |
|
|
18
|
+
| `failedText` | `string` | `'Copy failed, value selected'` | Message when the copy is refused; the value is then selected for a manual Ctrl+C. |
|
|
19
|
+
| `feedbackMs` | `number` | `2000` | How long the confirmation stays (a failure stays twice as long). |
|
|
20
|
+
| `feedback` | `'bubble' \| 'inline' \| 'hidden'` | `'bubble'` | Where the confirmation is drawn (see `gbt-copy-button`). |
|
|
21
|
+
| `wrapAt` | `RegExp \| null` | after each `/` (not in `//`) | Where the value may wrap: it is cut after each match, with a `<wbr>`. `null`: no hint. |
|
|
22
|
+
|
|
23
|
+
## Outputs
|
|
24
|
+
|
|
25
|
+
| Output | Payload | Role |
|
|
26
|
+
| ------------ | -------- | ----------------------------------------------- |
|
|
27
|
+
| `copied` | `string` | The copied value. |
|
|
28
|
+
| `copyFailed` | `void` | Neither copy API worked; the value is selected. |
|
|
29
|
+
|
|
30
|
+
## Behaviour
|
|
31
|
+
|
|
32
|
+
- The value **wraps** instead of scrolling: it stays readable in a 240 px aside or on a phone with no scroll
|
|
33
|
+
region to reach by keyboard. Break opportunities follow `wrapAt`; a segment too long for a line breaks
|
|
34
|
+
anywhere.
|
|
35
|
+
- One click selects the whole value (`user-select: all`).
|
|
36
|
+
- The value is cut **after** each match of `wrapAt` (a `<wbr>` is inserted); the text itself is never altered, so a
|
|
37
|
+
capturing group or a separator such as `/\//` cannot drop or duplicate characters.
|
|
38
|
+
- `COPY_FIELD_WRAP_AT` (the default pattern) is exported by the component file if you want to extend it.
|
|
39
|
+
|
|
40
|
+
## Example
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<gbt-copy-field
|
|
44
|
+
label="Clone with HTTPS"
|
|
45
|
+
copyLabel="Copy the clone URL"
|
|
46
|
+
failedText="Copy failed, press Ctrl+C"
|
|
47
|
+
[value]="repo.cloneUrl"
|
|
48
|
+
(copied)="toast.show('URL copied', 'success')"
|
|
49
|
+
/>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Accessibility
|
|
53
|
+
|
|
54
|
+
See [AUDIT.md](AUDIT.md). Localise `label`, `copyLabel`, `copiedText` and `failedText`.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# DatePicker
|
|
2
|
+
|
|
3
|
+
Single-date selection — a trigger button showing the chosen date, and
|
|
4
|
+
a calendar grid dropdown, positioned like `Select`/`Menu`. Integrates
|
|
5
|
+
with Angular forms via `ControlValueAccessor`, like `Select` and
|
|
6
|
+
`Textarea`.
|
|
7
|
+
|
|
8
|
+
**Selector**: `gbt-date-picker`
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
|
|
12
|
+
| Input | Type | Default | Role |
|
|
13
|
+
| --------------------- | -------------------- | ---------------------- | -------------------------------------------------------------------- |
|
|
14
|
+
| `label` | `string` | `''` | Field label. |
|
|
15
|
+
| `placeholder` | `string` | `'Select a date…'` | Shown in the trigger when no date is selected. |
|
|
16
|
+
| `locale` | `string` | `'en-US'` | Passed to `Intl.DateTimeFormat` for the trigger's date, the month/year heading, and weekday names. |
|
|
17
|
+
| `weekStartsOn` | `0 \| 1` | `1` (Monday) | `0` for a Sunday-first week. |
|
|
18
|
+
| `disabled` | `boolean` | `false` | — |
|
|
19
|
+
| `required` | `boolean` | `false` | Appends `*` to the label. |
|
|
20
|
+
| `errorMessage` | `string \| null` | `null` | Rendered as `role="alert"` below the field. |
|
|
21
|
+
| `previousMonthLabel` | `string` | `'Previous month'` | Accessible name of the "go back a month" button. |
|
|
22
|
+
| `nextMonthLabel` | `string` | `'Next month'` | Accessible name of the "go forward a month" button. |
|
|
23
|
+
| `clearable` | `boolean` | `false` | Shows a clear button in place of the calendar icon once a date is selected. |
|
|
24
|
+
| `clearLabel` | `string` | `'Clear date'` | Accessible name of the clear button. |
|
|
25
|
+
| `visibleMonths` | `1 \| 2` | `1` | Shows one or two consecutive months side by side. |
|
|
26
|
+
| `monthSelectLabel` | `string` | `'Month'` | Accessible name of the month dropdown. |
|
|
27
|
+
| `yearSelectLabel` | `string` | `'Year'` | Accessible name of the year dropdown. |
|
|
28
|
+
| `minYear`/`maxYear` | `number` | current year ∓ 100/+10 | Bounds the year dropdown's options. |
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<gbt-date-picker label="Appointment date" [formControl]="date" />
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Behavior
|
|
37
|
+
|
|
38
|
+
- The trigger is a plain button showing the formatted date (or the
|
|
39
|
+
placeholder) — not an editable text field. Typing a date string
|
|
40
|
+
would need locale-aware parsing this component doesn't attempt; the
|
|
41
|
+
calendar is the only way to set a value.
|
|
42
|
+
- Keyboard, inside the open grid: `ArrowLeft`/`Right`/`Up`/`Down` move
|
|
43
|
+
focus by a day/week, rolling into the next or previous month at the
|
|
44
|
+
edges; `Home`/`End` jump to the start/end of the focused week;
|
|
45
|
+
`PageUp`/`PageDown` shift the view a month; `Shift+PageUp`/`PageDown`
|
|
46
|
+
shift a year; `Enter`/`Space` select the focused day. This matches
|
|
47
|
+
the WAI-ARIA "Date Picker Dialog" pattern.
|
|
48
|
+
- Clicking a leading/trailing day from an adjacent month (shown dimmed)
|
|
49
|
+
selects it and shifts the view to that month.
|
|
50
|
+
- `Escape` and an outside click close the panel without changing the
|
|
51
|
+
value; `Escape` also returns focus to the trigger.
|
|
52
|
+
- With `clearable`, a clear button replaces the calendar icon once a
|
|
53
|
+
date is selected — same position, so nothing shifts. It's a separate
|
|
54
|
+
button next to the trigger, not inside it (a `<button>` can't
|
|
55
|
+
contain another interactive element), overlapping the trigger's icon
|
|
56
|
+
slot visually. Hidden while `disabled`.
|
|
57
|
+
- The previous/next buttons sit on their own full-width row above the
|
|
58
|
+
calendar(s), one at each outer edge — not tied to either month's own
|
|
59
|
+
heading. With `visibleMonths="2"`, they move both visible months
|
|
60
|
+
together (the second is always the first's next month — the two
|
|
61
|
+
aren't independently navigable). Arrowing past the last day of the
|
|
62
|
+
first visible month moves focus into the second (already visible)
|
|
63
|
+
month without shifting the view; only arrowing past the *last*
|
|
64
|
+
visible month, or before the first, slides the view by one month.
|
|
65
|
+
- The first visible month's heading is two native `<select>` dropdowns
|
|
66
|
+
(month, year) for jumping directly anywhere, instead of plain text —
|
|
67
|
+
reused as-is rather than nesting the library's own `Select` (a
|
|
68
|
+
floating-panel component) inside this panel's own floating panel,
|
|
69
|
+
which would multiply the positioning/z-index/outside-click concerns
|
|
70
|
+
for no real benefit here. A second visible month (with
|
|
71
|
+
`visibleMonths="2"`) keeps a plain-text heading, sized to match the
|
|
72
|
+
selects' height exactly so both calendars stay aligned.
|
|
73
|
+
|
|
74
|
+
## Scope
|
|
75
|
+
|
|
76
|
+
Single date only. A range picker (start/end) is [`DateRangePicker`](date-range-picker/README.md),
|
|
77
|
+
a separate component rather than a mode of this one. `min`/`max` date bounds (disabling
|
|
78
|
+
out-of-range days) are also out of scope: nothing in the current use cases needs them, and they're a
|
|
79
|
+
straightforward addition later if one does.
|
|
80
|
+
|
|
81
|
+
No date library (day.js, date-fns) is used — calendar math (month
|
|
82
|
+
grid, leap years) is hand-rolled in `date-picker-calendar.ts` on top of
|
|
83
|
+
native `Date`/`Intl`, consistent with the rest of this library having
|
|
84
|
+
no such dependency.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# DescriptionList
|
|
2
|
+
|
|
3
|
+
Label/value pairs for a detail page (owner, creation date, size…),
|
|
4
|
+
built on the semantic `<dl>`/`<dt>`/`<dd>` elements rather than a
|
|
5
|
+
`<table>`. For a list of _records_ instead of a single item's
|
|
6
|
+
attributes, use `Table` or `DimensionCard`.
|
|
7
|
+
|
|
8
|
+
**Selector**: `gbt-description-list`
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
|
|
12
|
+
| Input | Type | Default | Role |
|
|
13
|
+
| ------------ | ----------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
14
|
+
| `items` | `{ term: string; value: string \| TemplateRef<unknown> }[]` | required | Each pair. `value` is either plain text, or a `TemplateRef` for rich content (a `Badge`, a link, …). |
|
|
15
|
+
| `layout` | `'stacked' \| 'inline'` | `'stacked'` | `stacked`: term above value. `inline`: term left, value right, in a two-column grid. Falls back to `stacked` below 768px either way (see `responsive`). |
|
|
16
|
+
| `valueAlign` | `'start' \| 'end'` | `'start'` | `end` right-aligns the values (the fact-sheet look: term on the left, value on the far edge of its row). When an inline list collapses to one column, values go back to the start edge. With `layout="stacked"` the values stay on the end edge at every width (under their terms). |
|
|
17
|
+
| `responsive` | `'viewport' \| 'container'` | `'viewport'` | What an inline list stacks on. `viewport` (default): stacks below a 768px viewport. `container`: the list's own width — it stacks below 30rem, whatever the viewport. |
|
|
18
|
+
|
|
19
|
+
### `responsive="container"`
|
|
20
|
+
|
|
21
|
+
The component becomes a size container (`display: block; container-type: inline-size`), so an inline
|
|
22
|
+
list in a narrow card or side panel stacks even on a wide screen, and keeps two columns in a
|
|
23
|
+
wide card even on a phone-sized viewport. Things to know:
|
|
24
|
+
|
|
25
|
+
- The host takes the width its parent gives it. In a flex row, give it `flex: 1` or a width (a size
|
|
26
|
+
container has no intrinsic inline size of its own).
|
|
27
|
+
- Browsers without container queries (`@supports (container-type: inline-size)` false) ignore the
|
|
28
|
+
option: the list stays on two columns at every width. Every evergreen browser has supported them
|
|
29
|
+
since early 2023.
|
|
30
|
+
- It is opt-in: with the default `viewport`, the list only uses the plain viewport media query described above.
|
|
31
|
+
|
|
32
|
+
## Example
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<ng-template #statusValue>
|
|
36
|
+
<gbt-badge variant="success">Actif</gbt-badge>
|
|
37
|
+
</ng-template>
|
|
38
|
+
|
|
39
|
+
<gbt-description-list
|
|
40
|
+
layout="inline"
|
|
41
|
+
[items]="[
|
|
42
|
+
{ term: 'Propriétaire', value: 'Ada Lovelace' },
|
|
43
|
+
{ term: 'Créé le', value: '12 mars 2024' },
|
|
44
|
+
{ term: 'Statut', value: statusValue },
|
|
45
|
+
]"
|
|
46
|
+
/>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
statusValue = viewChild.required<TemplateRef<unknown>>('statusValue')
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Why `items` + `TemplateRef`, not projected `<gbt-description-list-item>`s
|
|
54
|
+
|
|
55
|
+
`<dl>` may only directly contain `<dt>`/`<dd>` (or a `<div>` wrapping a
|
|
56
|
+
pair) — axe flags any other element, including a custom element set to
|
|
57
|
+
`display: contents`, as an invalid child, because that CSS property
|
|
58
|
+
changes rendering, not the actual DOM parent/child relationship the HTML
|
|
59
|
+
content model and ARIA role mapping both depend on. Rendering every
|
|
60
|
+
`<dt>`/`<dd>` directly from this component's own template (via `items`)
|
|
61
|
+
keeps them genuine direct children of `<dl>` while still supporting rich
|
|
62
|
+
values, which is why `value` accepts a `TemplateRef` instead of a
|
|
63
|
+
projected `<gbt-description-list-item>`.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# DimensionCard
|
|
2
|
+
|
|
3
|
+
Dimension table, with the hovered row accented — a decorative accent
|
|
4
|
+
only, everything it highlights is already in the visible table; its rows
|
|
5
|
+
are therefore not focusable.
|
|
6
|
+
|
|
7
|
+
**Selector**: `gbt-dimension-card`
|
|
8
|
+
|
|
9
|
+
Standalone, outside the dataviz base: no tooltip, no keyboard
|
|
10
|
+
navigation, no separate `sr-only` table — `gbt-dimension-card` **is**
|
|
11
|
+
already a real, visible table.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
|
|
15
|
+
| Input | Type | Role |
|
|
16
|
+
| -------------- | ---------------- | --------------------------------------------- |
|
|
17
|
+
| `rows` | `DimensionRow[]` | Required. `{ label, value, display? }` rows. |
|
|
18
|
+
| `caption` | `string` | Required. Table caption. |
|
|
19
|
+
| `labelColumn` | `string` | Required. Header of the label column. |
|
|
20
|
+
| `valueColumn` | `string` | Required. Header of the value column. |
|
|
21
|
+
| `emptyMessage` | `string` | Required. Message shown when `rows` is empty. |
|
|
22
|
+
| `locale` | `string` | Required. Locale used to format numbers. |
|
|
23
|
+
|
|
24
|
+
A row's `display` replaces the formatted number in the value column, for
|
|
25
|
+
values a locale-aware number format can't express — bytes, durations, a
|
|
26
|
+
currency. The bar still scales on `value`, so the comparison stays honest.
|
|
27
|
+
|
|
28
|
+
## Example
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<gbt-dimension-card
|
|
32
|
+
[rows]="[{ label: 'Europe', value: 4200 }, { label: 'Amériques', value: 3100 }]"
|
|
33
|
+
caption="Requêtes par région"
|
|
34
|
+
labelColumn="Région"
|
|
35
|
+
valueColumn="Requêtes"
|
|
36
|
+
emptyMessage="Aucune donnée"
|
|
37
|
+
locale="fr-FR"
|
|
38
|
+
/>
|
|
39
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Disclosure
|
|
2
|
+
|
|
3
|
+
A single disclosure: a toggle button and the panel it shows or hides ("Advanced options", "Files", "More
|
|
4
|
+
details"). It is [`gbt-accordion-item`](../accordion-item/README.md) without the accordion around it: no parent
|
|
5
|
+
group, no index, an `open` model you can bind.
|
|
6
|
+
|
|
7
|
+
**Selector**: `gbt-disclosure`
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
|
|
11
|
+
| Input | Type | Default | Role |
|
|
12
|
+
| -------------- | ------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
|
|
13
|
+
| `label` | `string` | — | Required. The text of the toggle. |
|
|
14
|
+
| `open` | `boolean` (model) | `false` | Whether the panel is shown. Two-way: `[(open)]`. |
|
|
15
|
+
| `icon` | `string \| null` | `null` | Registered icon name before the label. |
|
|
16
|
+
| `appearance` | `'bordered' \| 'plain'` | `'bordered'` | `bordered`: a framed box with a tinted panel. `plain`: only the toggle and the panel. |
|
|
17
|
+
| `headingLevel` | `2 \| 3 \| 4 \| 5 \| 6 \| null` | `null` | Wraps the toggle in a heading of that level (when the disclosure titles a section). `null`: no heading. |
|
|
18
|
+
|
|
19
|
+
`openChange` is emitted by the model each time the user toggles.
|
|
20
|
+
|
|
21
|
+
## Pattern
|
|
22
|
+
|
|
23
|
+
The ARIA disclosure pattern, on the repo's accordion-item ground:
|
|
24
|
+
|
|
25
|
+
- a native `<button type="button">` with `aria-expanded` and `aria-controls` (Enter and Space work natively);
|
|
26
|
+
- a panel that is **`inert` while closed** (nothing in it can be focused or read) and `visibility: hidden`
|
|
27
|
+
once the 200 ms collapse has run;
|
|
28
|
+
- a chevron that turns (not under `prefers-reduced-motion`).
|
|
29
|
+
|
|
30
|
+
The panel's content is always instantiated: a heavy component inside is created while closed. Wrap it in
|
|
31
|
+
`@if (open())` if that matters (the `open` model is right there).
|
|
32
|
+
|
|
33
|
+
## Example
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<gbt-disclosure label="Advanced options" [(open)]="advancedOpen">
|
|
37
|
+
<gbt-switch label="CI enabled" [(ngModel)]="ciEnabled" />
|
|
38
|
+
<gbt-input label="Pipeline file path" [(ngModel)]="pipelineFile" />
|
|
39
|
+
</gbt-disclosure>
|
|
40
|
+
|
|
41
|
+
<gbt-disclosure label="Danger zone" icon="alert-triangle" [headingLevel]="3">…</gbt-disclosure>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Accessibility
|
|
45
|
+
|
|
46
|
+
See [AUDIT.md](AUDIT.md). Not covered: a disclosure that is open at a wide width and collapsible only on a
|
|
47
|
+
phone (the file view's "Files" toggle) is a layout decision of the page: bind `[open]` to a breakpoint signal
|
|
48
|
+
you own.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Divider
|
|
2
|
+
|
|
3
|
+
A thin separating line between sections or list items, with an
|
|
4
|
+
optional centered label (e.g. "OR" between two sign-in buttons).
|
|
5
|
+
|
|
6
|
+
**Selector**: `gbt-divider`
|
|
7
|
+
|
|
8
|
+
## Inputs
|
|
9
|
+
|
|
10
|
+
| Input | Type | Default | Role |
|
|
11
|
+
| ------------- | ------------------------------ | ---------------- | --------------------------------------------------------------- |
|
|
12
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | `vertical` needs a defined height from its context — it stretches to fill it (`align-self: stretch`), it doesn't invent one. |
|
|
13
|
+
| `label` | `string` | `''` | Optional text centered between two line segments. |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<gbt-divider />
|
|
19
|
+
<gbt-divider label="OR" />
|
|
20
|
+
<gbt-divider orientation="vertical" />
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Behavior
|
|
24
|
+
|
|
25
|
+
- `role="separator"`, with `aria-orientation="vertical"` only for the
|
|
26
|
+
vertical case — `horizontal` is the ARIA default, so the attribute
|
|
27
|
+
is omitted rather than stated redundantly.
|
|
28
|
+
- A vertical divider inside a flex row needs the row to give it a
|
|
29
|
+
height (e.g. via `align-items: stretch`, the flex default, or an
|
|
30
|
+
explicit height on the row) — it has none of its own to fall back
|
|
31
|
+
on.
|
package/drawer/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Drawer
|
|
2
|
+
|
|
3
|
+
Side panel that slides in from an edge of the screen — traps focus,
|
|
4
|
+
closes on Escape or a click on the backdrop, same control pattern as
|
|
5
|
+
`Modal`. Unlike `Modal` (centered, blocks the whole page for a focused
|
|
6
|
+
task), `Drawer` is for application content that sits alongside the
|
|
7
|
+
page — a detail panel, advanced filters.
|
|
8
|
+
|
|
9
|
+
**Selector**: `gbt-drawer`
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
| Input | Type | Default | Role |
|
|
14
|
+
| -------------- | ----------------------------------------- | --------- | ------------------------------------------------ |
|
|
15
|
+
| `isOpen` | `boolean` | required | Open/closed state, driven by the application. |
|
|
16
|
+
| `edge` | `'right' \| 'left' \| 'top' \| 'bottom'` | `'right'` | Which edge the panel slides in from. |
|
|
17
|
+
| `heading` | `string` | `''` | Panel title. |
|
|
18
|
+
| `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `2` | Level of the rendered heading. |
|
|
19
|
+
| `closeLabel` | `string` | `'Close'` | Accessible name of the close button. |
|
|
20
|
+
|
|
21
|
+
## Outputs
|
|
22
|
+
|
|
23
|
+
| Output | Type | Role |
|
|
24
|
+
| -------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
25
|
+
| `closed` | `void` | Emitted on Escape, a click outside the panel, or a click on the close button. The application must respond by setting `isOpen` to `false`. |
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<gbt-drawer [isOpen]="open()" edge="right" heading="Filtres" (closed)="open.set(false)">
|
|
31
|
+
Contenu du tiroir.
|
|
32
|
+
</gbt-drawer>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Behavior
|
|
36
|
+
|
|
37
|
+
- Slides in/out with a matching backdrop fade (200ms), instead of
|
|
38
|
+
appearing/disappearing instantly like `Modal` — the panel stays
|
|
39
|
+
mounted for the closing animation's duration after `isOpen` becomes
|
|
40
|
+
`false`, then unmounts and returns focus, exactly like `Modal`
|
|
41
|
+
otherwise does immediately. Both animations are skipped under
|
|
42
|
+
`prefers-reduced-motion: reduce`.
|
|
43
|
+
- Sized `min(90vw, 400px)` for `left`/`right`, `min(90vh, 400px)` for
|
|
44
|
+
`top`/`bottom` — adapts to the viewport with a fixed cap, same
|
|
45
|
+
reasoning as `Modal`'s own `min(90vw, 480px)` dialog width.
|
|
46
|
+
- `AppShell`'s own mobile navigation drawer is a separate,
|
|
47
|
+
independent implementation, not built on `gbt-drawer`: its needs (a
|
|
48
|
+
fixed nav-link list, no arbitrary content) are narrower than this
|
|
49
|
+
component's.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# EmptyState
|
|
2
|
+
|
|
3
|
+
A placeholder shown instead of an empty list/grid: an illustration, a
|
|
4
|
+
heading, an optional message, and an optional action (a button)
|
|
5
|
+
projected as content — used to distinguish "there is genuinely nothing
|
|
6
|
+
here yet" from a plain "no results" text message.
|
|
7
|
+
|
|
8
|
+
**Selector**: `gbt-empty-state`
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
|
|
12
|
+
| Input | Type | Default | Role |
|
|
13
|
+
| ------------------ | ------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
14
|
+
| `illustration` | `EmptyStateIllustration` | `null` | One of `'folder' \| 'star' \| 'checklist' \| 'merge' \| 'pipeline' \| 'tag' \| 'book' \| 'server'`. Optional. |
|
|
15
|
+
| `heading` | `string` | — | Required. The primary message. |
|
|
16
|
+
| `message` | `string` | `''` | Optional secondary text, e.g. a hint or call to action description. |
|
|
17
|
+
| `icon` | `string \| null` | `null` | A registered icon name on a soft disc, in place of the artwork (ignored when an `illustration` is set). |
|
|
18
|
+
| `size` | `'default' \| 'compact'` | `'default'` | `compact` is the in-card block: smaller disc/artwork, tighter padding and type. |
|
|
19
|
+
| `tone` | `'default' \| 'error'` | `'default'` | `error` tints the disc (or the artwork) in the error colours — a list that could not be loaded. |
|
|
20
|
+
| `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6 \| null` | `null` | Renders the heading as an `h1`…`h6` (default: a `<p>`). |
|
|
21
|
+
| `headingId` | `string \| null` | `null` | `id` of the heading element, so a region can use `aria-labelledby`. |
|
|
22
|
+
| `headingFocusable` | `boolean` | `false` | Gives the heading `tabindex="-1"` (a programmatic focus target, not a tab stop; it shows no focus ring, being no control). |
|
|
23
|
+
|
|
24
|
+
## Methods
|
|
25
|
+
|
|
26
|
+
| Method | Role |
|
|
27
|
+
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
28
|
+
| `focusHeading()` | Moves focus to the heading — needs `headingFocusable`. For a result page (activation done, link expired) that moves focus to its title. |
|
|
29
|
+
|
|
30
|
+
## Content
|
|
31
|
+
|
|
32
|
+
An optional action (typically a `<gbt-button>`) is projected via
|
|
33
|
+
`<ng-content />`, rendered below the message.
|
|
34
|
+
|
|
35
|
+
## Example
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<gbt-empty-state
|
|
39
|
+
illustration="folder"
|
|
40
|
+
heading="Aucun dépôt pour l'instant"
|
|
41
|
+
message="Créez votre premier dépôt pour commencer."
|
|
42
|
+
>
|
|
43
|
+
<gbt-button text="Nouveau dépôt" (clicked)="openCreate()" />
|
|
44
|
+
</gbt-empty-state>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Icon, compact and in-card states
|
|
48
|
+
|
|
49
|
+
The 96 px artwork suits a whole page or an empty list. Inside a card, use the
|
|
50
|
+
compact block with an icon:
|
|
51
|
+
|
|
52
|
+
```html
|
|
53
|
+
<gbt-card variant="outlined" heading="Variables" flush>
|
|
54
|
+
<gbt-empty-state
|
|
55
|
+
size="compact"
|
|
56
|
+
icon="key"
|
|
57
|
+
heading="Aucune variable définie"
|
|
58
|
+
message="Les variables sont injectées dans chaque job."
|
|
59
|
+
/>
|
|
60
|
+
</gbt-card>
|
|
61
|
+
|
|
62
|
+
<gbt-empty-state size="compact" tone="error" icon="alert-circle" heading="Chargement impossible">
|
|
63
|
+
<gbt-button variant="secondary" size="small" text="Réessayer" (clicked)="retry()" />
|
|
64
|
+
</gbt-empty-state>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
With neither `illustration` nor `icon` a compact state is a bare heading (and
|
|
68
|
+
message): the "Not found." block.
|
|
69
|
+
|
|
70
|
+
## Heading level
|
|
71
|
+
|
|
72
|
+
By default the heading is a `<p>` — the component cannot know where it sits in
|
|
73
|
+
your page outline. Pass `headingLevel` when the state stands for a section (or
|
|
74
|
+
the whole page, `1`), and `headingId` to name a surrounding `<section>`.
|
|
75
|
+
|
|
76
|
+
## Choosing an illustration
|
|
77
|
+
|
|
78
|
+
Each illustration is a fixed, curated piece of art shipped by Gabarit —
|
|
79
|
+
not an extensible registry like `gbt-icon`'s. Pick whichever of the
|
|
80
|
+
eight best matches the empty collection: `folder` for
|
|
81
|
+
repositories/groups, `star` for a starred/favorites list, `checklist`
|
|
82
|
+
for issues, `merge` for merge/pull requests, `pipeline` for CI
|
|
83
|
+
pipelines, `tag` for releases, `book` for a wiki, `server` for
|
|
84
|
+
infrastructure (e.g. CI runners).
|