@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
package/README.md
CHANGED
|
@@ -13,6 +13,47 @@ dataviz, no external dependency.
|
|
|
13
13
|
npm install @masmarino/gabarit
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
## Imports
|
|
17
|
+
|
|
18
|
+
Every component is an entry point of its own, named after its folder (the folder of the README the
|
|
19
|
+
link on its name opens). Import it from there:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { Button } from '@masmarino/gabarit/button'
|
|
23
|
+
import { Select, type SelectOption } from '@masmarino/gabarit/select'
|
|
24
|
+
import { AuthLogin } from '@masmarino/gabarit/auth-login'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
An application's bundler (esbuild, behind `ng build`) splits its code by file, and an entry point is
|
|
28
|
+
one file: a component only a lazily loaded page uses stays in that page's chunk, out of the first
|
|
29
|
+
download. The root, `@masmarino/gabarit`, still re-exports every name, so code written for 2.0 builds
|
|
30
|
+
unchanged, but importing from it puts every component the application uses anywhere into its first
|
|
31
|
+
chunk: an application should not import from it.
|
|
32
|
+
|
|
33
|
+
A few entry points hold more than one component, because they are used together:
|
|
34
|
+
|
|
35
|
+
| Entry point | Holds |
|
|
36
|
+
| ---------------- | ---------------------------------------------------------------------------------------------- |
|
|
37
|
+
| `accordion` | `Accordion`, `AccordionItem` |
|
|
38
|
+
| `app-shell` | `AppShell`, `AppShellNavGroup` |
|
|
39
|
+
| `card` | `Card`, `CardHeader`, `CardLink` |
|
|
40
|
+
| `chart` | The chart's building blocks (`ChartFrame`, `ChartAxis`, `ChartTooltip`…) and its scales, ticks and paths |
|
|
41
|
+
| `copy-button` | `CopyButton` and the clipboard helpers (`copyToClipboard`, `ClipboardFeedback`…) |
|
|
42
|
+
| `date-picker` | `DatePicker`, `DateRangePicker` |
|
|
43
|
+
| `format` | The formatting functions and their pipes |
|
|
44
|
+
| `icon` | `Icon`, `IconRegistry` |
|
|
45
|
+
| `list-toolbar` | `ListToolbar`, `createListToolbarState` |
|
|
46
|
+
| `menu` | `Menu`, `MenuTrigger`, `MenuItem` |
|
|
47
|
+
| `nav-tabs` | `NavTabs`, `NavTab` |
|
|
48
|
+
| `stat-tile` | `StatTile`, `StatTileLink` |
|
|
49
|
+
| `tabs` | `Tabs`, `Tab` |
|
|
50
|
+
| `auth` | The auth kit's ports, labels, rules and error helpers, `AuthPanel`, `AuthFooter` |
|
|
51
|
+
| `mfa-enrollment` | `MfaEnrollment`, `TotpQr`, `BackupCodes` |
|
|
52
|
+
| `docs` | The documentation reader (see below) |
|
|
53
|
+
|
|
54
|
+
The auth pages are `auth-login`, `auth-register`, `auth-activate` and `auth-reset-password`; the
|
|
55
|
+
account settings blocks `mfa-settings` and `passkey-settings`.
|
|
56
|
+
|
|
16
57
|
## Components
|
|
17
58
|
|
|
18
59
|
Each component has its own README, with the detail of its inputs and
|
|
@@ -22,104 +63,102 @@ outputs — the link is on its name.
|
|
|
22
63
|
|
|
23
64
|
| Component | Selector | Role |
|
|
24
65
|
| --------------------------------------------------------------------------------------- | ---------------------- | -------------------------------------------------------------------- |
|
|
25
|
-
| [Avatar](projects/gabarit/
|
|
26
|
-
| [Badge](projects/gabarit/
|
|
27
|
-
| [Button](projects/gabarit/
|
|
28
|
-
| [
|
|
29
|
-
| [
|
|
30
|
-
| [
|
|
31
|
-
| [
|
|
32
|
-
| [
|
|
33
|
-
| [
|
|
34
|
-
| [
|
|
35
|
-
| [
|
|
36
|
-
| [
|
|
37
|
-
| [
|
|
38
|
-
| [
|
|
39
|
-
| [
|
|
40
|
-
| [
|
|
41
|
-
| [
|
|
42
|
-
| [
|
|
43
|
-
| [
|
|
44
|
-
| [
|
|
45
|
-
| [Switch](projects/gabarit/src/lib/components/atoms/switch/README.md) | `gbt-switch` | On/off toggle. |
|
|
46
|
-
| [Tag](projects/gabarit/src/lib/components/atoms/tag/README.md) | `gbt-tag` | Custom-colored, optionally removable label. |
|
|
47
|
-
| [Textarea](projects/gabarit/src/lib/components/atoms/textarea/README.md) | `gbt-textarea` | Multiline text field. |
|
|
66
|
+
| [Avatar](projects/gabarit/avatar/README.md) | `gbt-avatar` | User picture with an initials fallback. |
|
|
67
|
+
| [Badge](projects/gabarit/badge/README.md) | `gbt-badge` | Status/category label pill. |
|
|
68
|
+
| [Button](projects/gabarit/button/README.md) | `gbt-button` | Action button. |
|
|
69
|
+
| [Checkbox](projects/gabarit/checkbox/README.md) | `gbt-checkbox` | Checkbox, integrated with forms. |
|
|
70
|
+
| [CopyButton](projects/gabarit/copy-button/README.md) | `gbt-copy-button` | Copies a value to the clipboard, with a live-region confirmation. |
|
|
71
|
+
| [Divider](projects/gabarit/divider/README.md) | `gbt-divider` | Separating line with an optional centred label. |
|
|
72
|
+
| [GaugeBar](projects/gabarit/gauge-bar/README.md) | `gbt-gauge-bar` | Progress gauge with alert thresholds. |
|
|
73
|
+
| [Icon](projects/gabarit/icon/README.md) | `gbt-icon` | Registered SVG icon, with generic built-in glyphs (`Gallery` story). |
|
|
74
|
+
| [IconMarker](projects/gabarit/icon-marker/README.md) | `gbt-icon-marker` | Icon on a soft tinted disc or tile, six tones. |
|
|
75
|
+
| [Input](projects/gabarit/input/README.md) | `gbt-input` | Text or password field. |
|
|
76
|
+
| [JobStatus](projects/gabarit/job-status/README.md) | `gbt-job-status` | CI job status glyph (extracted from the job graph). |
|
|
77
|
+
| [NotificationDot](projects/gabarit/notification-dot/README.md) | `gbt-notification-dot` | Dot or count overlaid on the corner of what it wraps. |
|
|
78
|
+
| [SaveStatus](projects/gabarit/save-status/README.md) | `gbt-save-status` | Saving / saved / not saved status, live region. |
|
|
79
|
+
| [Skeleton](projects/gabarit/skeleton/README.md) | `gbt-skeleton` | Loading placeholder: line, circle or rectangle. |
|
|
80
|
+
| [Slider](projects/gabarit/slider/README.md) | `gbt-slider` | Native range slider, integrated with forms. |
|
|
81
|
+
| [Sparkline](projects/gabarit/sparkline/README.md) | `gbt-sparkline` | Fixed-size trend mini-chart. |
|
|
82
|
+
| [Spinner](projects/gabarit/spinner/README.md) | `gbt-spinner` | Standalone loading indicator. |
|
|
83
|
+
| [Switch](projects/gabarit/switch/README.md) | `gbt-switch` | On/off toggle. |
|
|
84
|
+
| [Tag](projects/gabarit/tag/README.md) | `gbt-tag` | Custom-colored, optionally removable label. |
|
|
85
|
+
| [Textarea](projects/gabarit/textarea/README.md) | `gbt-textarea` | Multiline text field. |
|
|
48
86
|
|
|
49
87
|
### Molecules
|
|
50
88
|
|
|
51
89
|
| Component | Selector | Role |
|
|
52
90
|
| --------------------------------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------------------------------------------- |
|
|
53
|
-
| [Accordion](projects/gabarit/
|
|
54
|
-
| [Alert](projects/gabarit/
|
|
55
|
-
| [Autocomplete](projects/gabarit/
|
|
56
|
-
| [AvatarGroup](projects/gabarit/
|
|
57
|
-
| [Breadcrumb](projects/gabarit/
|
|
58
|
-
| [Card](projects/gabarit/
|
|
59
|
-
| [CheckboxGroup](projects/gabarit/
|
|
60
|
-
| [CopyField](projects/gabarit/
|
|
61
|
-
| [DatePicker](projects/gabarit/
|
|
62
|
-
| [DateRangePicker](projects/gabarit/
|
|
63
|
-
| [DescriptionList](projects/gabarit/
|
|
64
|
-
| [DimensionCard](projects/gabarit/
|
|
65
|
-
| [Disclosure](projects/gabarit/
|
|
66
|
-
| [EmptyState](projects/gabarit/
|
|
67
|
-
| [FileUpload](projects/gabarit/
|
|
68
|
-
| [FunnelChart](projects/gabarit/
|
|
69
|
-
| [JobGraph](projects/gabarit/
|
|
70
|
-
| [ListCard](projects/gabarit/
|
|
71
|
-
| [ListRow](projects/gabarit/
|
|
72
|
-
| [ListToolbar](projects/gabarit/
|
|
73
|
-
| [Menu](projects/gabarit/
|
|
74
|
-
| [MenuItem](projects/gabarit/
|
|
75
|
-
| [NavTabs](projects/gabarit/
|
|
76
|
-
| [PageHeader](projects/gabarit/
|
|
77
|
-
| [Pagination](projects/gabarit/
|
|
78
|
-
| [Panel](projects/gabarit/
|
|
79
|
-
| [Popover](projects/gabarit/
|
|
80
|
-
| [RadioGroup](projects/gabarit/
|
|
81
|
-
| [SecretReveal](projects/gabarit/
|
|
82
|
-
| [SegmentedControl](projects/gabarit/
|
|
83
|
-
| [Select](projects/gabarit/
|
|
84
|
-
| [SkeletonList](projects/gabarit/
|
|
85
|
-
| [StatGrid](projects/gabarit/
|
|
86
|
-
| [StatTile](projects/gabarit/
|
|
87
|
-
| [Stepper](projects/gabarit/
|
|
88
|
-
| [Table](projects/gabarit/
|
|
89
|
-
| [Tabs](projects/gabarit/
|
|
90
|
-
| [TagInput](projects/gabarit/
|
|
91
|
-
| [Tooltip](projects/gabarit/
|
|
92
|
-
| [Tree](projects/gabarit/
|
|
93
|
-
| [UserChip](projects/gabarit/
|
|
91
|
+
| [Accordion](projects/gabarit/accordion/README.md) | `gbt-accordion` / `gbt-accordion-item` | Collapsible sections. |
|
|
92
|
+
| [Alert](projects/gabarit/alert/README.md) | `gbt-alert` | Persistent inline banner message. |
|
|
93
|
+
| [Autocomplete](projects/gabarit/autocomplete/README.md) | `gbt-autocomplete` | Text field with async suggestions. |
|
|
94
|
+
| [AvatarGroup](projects/gabarit/avatar-group/README.md) | `gbt-avatar-group` | Overlapping avatars with a +N overflow menu. |
|
|
95
|
+
| [Breadcrumb](projects/gabarit/breadcrumb/README.md) | `gbt-breadcrumb` | Ancestor trail plus current segment. |
|
|
96
|
+
| [Card](projects/gabarit/card/README.md) | `gbt-card` | Titled container. |
|
|
97
|
+
| [CheckboxGroup](projects/gabarit/checkbox-group/README.md) | `gbt-checkbox-group` | Group of checkboxes (fieldset + legend), value is an array. |
|
|
98
|
+
| [CopyField](projects/gabarit/copy-field/README.md) | `gbt-copy-field` | Read-only monospace value with a copy button. |
|
|
99
|
+
| [DatePicker](projects/gabarit/date-picker/README.md) | `gbt-date-picker` | Single date, calendar dropdown, integrated with forms. |
|
|
100
|
+
| [DateRangePicker](projects/gabarit/date-picker/date-range-picker/README.md) | `gbt-date-range-picker` | Start and end dates, calendar dropdown. |
|
|
101
|
+
| [DescriptionList](projects/gabarit/description-list/README.md) | `gbt-description-list` | Label/value pairs on a `dl`, `valueAlign`, opt-in stacking. |
|
|
102
|
+
| [DimensionCard](projects/gabarit/dimension-card/README.md) | `gbt-dimension-card` | Dimension table with an accented hover row. |
|
|
103
|
+
| [Disclosure](projects/gabarit/disclosure/README.md) | `gbt-disclosure` | Single disclosure: toggle button and panel, `open` model. |
|
|
104
|
+
| [EmptyState](projects/gabarit/empty-state/README.md) | `gbt-empty-state` | Placeholder for an empty list/grid. |
|
|
105
|
+
| [FileUpload](projects/gabarit/file-upload/README.md) | `gbt-file-upload` | Drag-and-drop or click file selection, removable list. |
|
|
106
|
+
| [FunnelChart](projects/gabarit/funnel-chart/README.md) | `gbt-funnel-chart` | Step-by-step conversion funnel. |
|
|
107
|
+
| [JobGraph](projects/gabarit/job-graph/README.md) | `gbt-job-graph` | Pipeline jobs by stage, linked by their dependencies. |
|
|
108
|
+
| [ListCard](projects/gabarit/list-card/README.md) | `gbt-list-card` | Card for a list: header band, loading / failed / empty / ready states. |
|
|
109
|
+
| [ListRow](projects/gabarit/list-row/README.md) | `gbt-list-row` | List item: leading status, title, meta, trailing actions. |
|
|
110
|
+
| [ListToolbar](projects/gabarit/list-toolbar/README.md) | `gbt-list-toolbar` | Search + sort controls for a list. |
|
|
111
|
+
| [Menu](projects/gabarit/menu/README.md) | `gbt-menu` | Generic dropdown menu. |
|
|
112
|
+
| [MenuItem](projects/gabarit/menu/menu-item/README.md) | `button[gbtMenuItem]` / `a[gbtMenuItem]` | Menu item: icon, danger variant, disabled, link form. |
|
|
113
|
+
| [NavTabs](projects/gabarit/nav-tabs/README.md) | `gbt-nav-tabs` / `a[gbtNavTab]` | Router-agnostic nav links: icon, badge, orientation, fades. |
|
|
114
|
+
| [PageHeader](projects/gabarit/page-header/README.md) | `gbt-page-header` | Page title block: heading, badges, meta, actions. |
|
|
115
|
+
| [Pagination](projects/gabarit/pagination/README.md) | `gbt-pagination` | Page navigation for a list/table. |
|
|
116
|
+
| [Panel](projects/gabarit/panel/README.md) | `gbt-panel` | Flat side-panel section: heading, actions, content. |
|
|
117
|
+
| [Popover](projects/gabarit/popover/README.md) | `gbt-popover` | Floating panel opened by a click on its trigger. |
|
|
118
|
+
| [RadioGroup](projects/gabarit/radio-group/README.md) | `gbt-radio-group` | Radio button group, integrated with forms. |
|
|
119
|
+
| [SecretReveal](projects/gabarit/secret-reveal/README.md) | `gbt-secret-reveal` | Masked secret: show / hide and copy. |
|
|
120
|
+
| [SegmentedControl](projects/gabarit/segmented-control/README.md) | `gbt-segmented-control` | Exclusive-choice button group (`tinted`, `fullWidth`, `wrap`). |
|
|
121
|
+
| [Select](projects/gabarit/select/README.md) | `gbt-select` | Dropdown list, single or multiple. |
|
|
122
|
+
| [SkeletonList](projects/gabarit/skeleton-list/README.md) | `gbt-skeleton-list` | Placeholder rows for a loading list, with a polite status. |
|
|
123
|
+
| [StatGrid](projects/gabarit/stat-grid/README.md) | `gbt-stat-grid` | Responsive grid of stat tiles (container query), loading state. |
|
|
124
|
+
| [StatTile](projects/gabarit/stat-tile/README.md) | `gbt-stat-tile` | Figure with label, icon, hint, trend and optional link. |
|
|
125
|
+
| [Stepper](projects/gabarit/stepper/README.md) | `gbt-stepper` | Informational progress through numbered steps. |
|
|
126
|
+
| [Table](projects/gabarit/table/README.md) | `gbt-table` | Data table. |
|
|
127
|
+
| [Tabs](projects/gabarit/tabs/README.md) | `gbt-tabs` / `gbt-tab` | Tab navigation. |
|
|
128
|
+
| [TagInput](projects/gabarit/tag-input/README.md) | `gbt-tag-input` | Free-typed values shown as removable tags. |
|
|
129
|
+
| [Tooltip](projects/gabarit/tooltip/README.md) | `gbt-tooltip` | Hover/focus info bubble for any content. |
|
|
130
|
+
| [Tree](projects/gabarit/tree/README.md) | `gbt-tree` | Expandable hierarchical list (WAI-ARIA tree view). |
|
|
131
|
+
| [UserChip](projects/gabarit/user-chip/README.md) | `gbt-user-chip` | Avatar + name on one line. |
|
|
94
132
|
|
|
95
133
|
### Organisms
|
|
96
134
|
|
|
97
135
|
| Component | Selector | Role |
|
|
98
136
|
| -------------------------------------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------ |
|
|
99
|
-
| [BarChart](projects/gabarit/
|
|
100
|
-
| [ChartAxis](projects/gabarit/
|
|
101
|
-
| [ChartEmpty](projects/gabarit/
|
|
102
|
-
| [ChartFrame](projects/gabarit/
|
|
103
|
-
| [ChartLegend](projects/gabarit/
|
|
104
|
-
| [ChartTable](projects/gabarit/
|
|
105
|
-
| [ChartTooltip](projects/gabarit/
|
|
106
|
-
| [ConfirmDangerModal](projects/gabarit/
|
|
107
|
-
| [Drawer](projects/gabarit/
|
|
108
|
-
| [GbtToastService](projects/gabarit/
|
|
109
|
-
| [LineChart](projects/gabarit/
|
|
110
|
-
| [Modal](projects/gabarit/
|
|
111
|
-
| [PieChart](projects/gabarit/
|
|
112
|
-
| [SearchBar](projects/gabarit/
|
|
113
|
-
| [TimelineChart](projects/gabarit/
|
|
114
|
-
| [Toaster](projects/gabarit/
|
|
137
|
+
| [BarChart](projects/gabarit/bar-chart/README.md) | `gbt-bar-chart` | Bar chart on the dataviz base. |
|
|
138
|
+
| [ChartAxis](projects/gabarit/chart/chart-axis/README.md) | `g[gbtChartAxis]` | Axis ticks — base building block. |
|
|
139
|
+
| [ChartEmpty](projects/gabarit/chart/chart-empty/README.md) | `gbt-chart-empty` | Empty state — base building block. |
|
|
140
|
+
| [ChartFrame](projects/gabarit/chart/chart-frame/README.md) | `gbt-chart-frame` | Low-level base, for a custom chart. |
|
|
141
|
+
| [ChartLegend](projects/gabarit/chart/chart-legend/README.md) | `gbt-chart-legend` | Multi-series legend — base building block. |
|
|
142
|
+
| [ChartTable](projects/gabarit/chart/chart-table/README.md) | `gbt-chart-table` | Non-visual table — base building block. |
|
|
143
|
+
| [ChartTooltip](projects/gabarit/chart/chart-tooltip/README.md) | `gbt-chart-tooltip` | Tooltip — base building block. |
|
|
144
|
+
| [ConfirmDangerModal](projects/gabarit/confirm-danger-modal/README.md) | `gbt-confirm-danger-modal` | Type-to-confirm destructive-action dialog. |
|
|
145
|
+
| [Drawer](projects/gabarit/drawer/README.md) | `gbt-drawer` | Side panel from a screen edge, focus trapped. |
|
|
146
|
+
| [GbtToastService](projects/gabarit/toaster/README.md) | `GbtToastService` | Signal store of toasts; `gbt-toaster` shows it when `toasts` is omitted. |
|
|
147
|
+
| [LineChart](projects/gabarit/line-chart/README.md) | `gbt-line-chart` | Line(s) on the dataviz base. |
|
|
148
|
+
| [Modal](projects/gabarit/modal/README.md) | `gbt-modal` | Modal dialog box. |
|
|
149
|
+
| [PieChart](projects/gabarit/pie-chart/README.md) | `gbt-pie-chart` | Pie or donut chart. |
|
|
150
|
+
| [SearchBar](projects/gabarit/search-bar/README.md) | `gbt-search-bar` | Search with grouped results. |
|
|
151
|
+
| [TimelineChart](projects/gabarit/timeline-chart/README.md) | `gbt-timeline-chart` | Timeline on the dataviz base. |
|
|
152
|
+
| [Toaster](projects/gabarit/toaster/README.md) | `gbt-toaster` | Stack of temporary notifications. |
|
|
115
153
|
|
|
116
154
|
### Templates
|
|
117
155
|
|
|
118
156
|
| Component | Selector | Role |
|
|
119
157
|
| ----------------------------------------------------------------------------------------------- | ------------------------- | --------------------------------------------------------- |
|
|
120
|
-
| [AppShell](projects/gabarit/
|
|
121
|
-
| [AppShellNavGroup](projects/gabarit/
|
|
122
|
-
| [
|
|
158
|
+
| [AppShell](projects/gabarit/app-shell/README.md) | `gbt-app-shell` | Page shell: side nav, header, content. |
|
|
159
|
+
| [AppShellNavGroup](projects/gabarit/app-shell/app-shell-nav-group/README.md) | `gbt-app-shell-nav-group` | Collapsible nav group, works in the collapsed rail. |
|
|
160
|
+
| [GitField](projects/gabarit/git-field/README.md) | `gbt-git-field` | The family's animated commit graph, behind the sign-in panel (`[auth-backdrop]`) or a dark band. |
|
|
161
|
+
| [PageLayout](projects/gabarit/page-layout/README.md) | `gbt-page-layout` | Page grid: main, aside and nav columns (container query). |
|
|
123
162
|
|
|
124
163
|
### Directives and helper components to import
|
|
125
164
|
|
|
@@ -143,7 +182,8 @@ because it needs `@angular/router`, `marked` and `dompurify`; see [its README](d
|
|
|
143
182
|
|
|
144
183
|
## Primitives and pipes
|
|
145
184
|
|
|
146
|
-
Pure functions
|
|
185
|
+
Pure functions from `@masmarino/gabarit/format` (the charts' scales, ticks and paths come from
|
|
186
|
+
`@masmarino/gabarit/chart`), usable in any TypeScript
|
|
147
187
|
file (no component, no injection context, no browser API beyond `Intl`) and
|
|
148
188
|
tree-shakable. Every formatter takes the **locale first**, because Gabarit
|
|
149
189
|
has no i18n of its own; the pipes default it to Angular's `LOCALE_ID`.
|
|
@@ -291,92 +331,139 @@ keep their source order); with `compare`, `desc` reverses the ascending result.
|
|
|
291
331
|
|
|
292
332
|
## Styles
|
|
293
333
|
|
|
294
|
-
|
|
334
|
+
Gabarit carries the look of the Ferris family: white paper and near-black ink in the light theme, a
|
|
335
|
+
cool graphite in the dark one, IBM Plex throughout, hairlines and square-ish corners. Neutrals carry
|
|
336
|
+
the screens; the crab's rust is kept for the marks that are the brand's own (focus, the current page),
|
|
337
|
+
patina green says success. Every text token reaches 7:1 on the page and on a panel, in both themes
|
|
338
|
+
(`contrast.spec.ts`).
|
|
339
|
+
|
|
340
|
+
Import the tokens, and the fonts, in the application's `styles.scss`:
|
|
295
341
|
|
|
296
342
|
```scss
|
|
297
|
-
@use 'gabarit/
|
|
343
|
+
@use '@masmarino/gabarit/fonts' with ($path: '/fonts/ibm-plex/');
|
|
344
|
+
@use '@masmarino/gabarit/tokens';
|
|
345
|
+
|
|
346
|
+
// Optional: body, h1–h3, code and selection in the family's type.
|
|
347
|
+
@include tokens.document-base;
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
The fonts entry declares IBM Plex Sans (400, 500, 600), Sans Condensed (600) and Mono (400, 500),
|
|
351
|
+
subset to Latin-1 (OFL licence beside the files). The application serves the files at `$path`, for
|
|
352
|
+
instance with an Angular asset:
|
|
353
|
+
|
|
354
|
+
```json
|
|
355
|
+
{ "glob": "*.woff2", "input": "node_modules/@masmarino/gabarit/fonts", "output": "fonts/ibm-plex" }
|
|
298
356
|
```
|
|
299
357
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
358
|
+
Without them the stacks fall back to the system's sans and monospace.
|
|
359
|
+
|
|
360
|
+
### The graphite frame
|
|
361
|
+
|
|
362
|
+
`gbt-app-shell` draws its rail and its bar as one graphite frame, the same in both themes, with the
|
|
363
|
+
page set into it as a sheet whose corner is rounded. The auth pages (`gbt-auth-panel`) open on the
|
|
364
|
+
same graphite, their panel keeping the page's theme. An application can lay its own parts on the
|
|
365
|
+
frame with the `frame-tokens` mixin, which sets the dark tokens on a deeper ground:
|
|
366
|
+
|
|
367
|
+
```scss
|
|
368
|
+
.public-header {
|
|
369
|
+
@include tokens.frame-tokens;
|
|
370
|
+
background: var(--bg-panel);
|
|
371
|
+
}
|
|
372
|
+
```
|
|
303
373
|
|
|
304
374
|
### Color tokens
|
|
305
375
|
|
|
306
|
-
Every component
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
(
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
|
313
|
-
|
|
|
314
|
-
|
|
|
315
|
-
|
|
|
316
|
-
|
|
|
317
|
-
| | `--bg-
|
|
318
|
-
| | `--bg-
|
|
319
|
-
|
|
|
320
|
-
| | `--
|
|
321
|
-
|
|
|
322
|
-
| | `--
|
|
323
|
-
|
|
|
324
|
-
|
|
|
325
|
-
|
|
|
326
|
-
|
|
|
327
|
-
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
376
|
+
Every component reads only the custom properties below, set on `:root` from the `light-tokens` and
|
|
377
|
+
`dark-tokens` mixins (`_themes.scss`). **These are what an application overrides to re-theme
|
|
378
|
+
itself**; the raw palette (`--slate-*`, `--graphite-*`, `--rust-*`…) is never referenced by a
|
|
379
|
+
component (enforced by `token-usage.spec.ts`).
|
|
380
|
+
|
|
381
|
+
| Category | Token | Role |
|
|
382
|
+
| ----------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------- |
|
|
383
|
+
| Brand | `--primary` / `--primary-hover` | Action colour (buttons, selected states): the ink |
|
|
384
|
+
| | `--accent` / `--accent-text` | The rust, for marks; its text shade |
|
|
385
|
+
| | `--focus-ring` | Every focus outline |
|
|
386
|
+
| Backgrounds | `--bg-principal` | Surfaces: cards, panels, fields |
|
|
387
|
+
| | `--bg-panel` | The page's ground |
|
|
388
|
+
| | `--bg-hover` | Hover state of an interactive element on a neutral background |
|
|
389
|
+
| | `--bg-track` | Track of a segmented control, visible on the page and on a panel |
|
|
390
|
+
| | `--frame` | The graphite of the shell and the auth pages, in both themes |
|
|
391
|
+
| Border | `--border-color` | The edge of a field or a control (3:1) |
|
|
392
|
+
| | `--gbt-hairline` / `--gbt-card-border` | Quiet separators and card edges |
|
|
393
|
+
| Text | `--text-primary` / `--text-secondary` / `--text-discret` | From most to least emphasized |
|
|
394
|
+
| | `--text-on-primary` / `--text-on-error` / `--text-on-color` | Text set on a `--primary` fill, an error fill, or a solid colour |
|
|
395
|
+
| Success | `--color-success-base` / `-hover` / `-text` / `-bg` / `-bg-text` | Fill, hover, text, light background, text on that background |
|
|
396
|
+
| Warning | `--color-warning-base` / `-hover` / `-text` / `-bg` / `-bg-text` | Same |
|
|
397
|
+
| Error | `--color-error-base` / `-fill` / `-hover` / `-text` / `-bg` / `-bg-text` | Same (`-fill`: a solid fill, the danger button) |
|
|
398
|
+
| Info | `--color-info-bg` / `-bg-text` / `-vivid-base` | Light background, text on it, the mark |
|
|
399
|
+
| Dataviz | `--chart-series-1-base` … `-6-base` | The chart series, in order |
|
|
400
|
+
| | `--chart-grid` | Chart grid and axes |
|
|
401
|
+
|
|
402
|
+
Other tokens live on `:root` without being colours: border radii (`--site-border-radius*`, 3 to
|
|
403
|
+
6px), shadows (`--site-shadow-*`, rings rather than drops), transitions (`--site-transition-*`) and
|
|
404
|
+
the type stacks (`--font-family`, `--font-display`, `--gbt-font-mono`).
|
|
332
405
|
|
|
333
406
|
### Theming hooks
|
|
334
407
|
|
|
335
|
-
A few more tokens are not set on `:root`: each component falls back to the
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
|
340
|
-
|
|
|
341
|
-
| `--gbt-
|
|
342
|
-
| `--gbt-
|
|
343
|
-
| `--gbt-radius-
|
|
344
|
-
| `--gbt-radius-
|
|
345
|
-
| `--gbt-radius-
|
|
346
|
-
| `--gbt-radius-
|
|
347
|
-
| `--gbt-
|
|
348
|
-
| `--gbt-nav-active-
|
|
349
|
-
| `--gbt-
|
|
350
|
-
| `--gbt-shell-border` | The app shell's navigation and header edges | `
|
|
351
|
-
| `--gbt-shell-header-bg` | The app shell's header |
|
|
352
|
-
| `--gbt-shell-content-padding` | The app shell's main content area
|
|
353
|
-
| `--gbt-auth-panel-backdrop` | The page behind the auth panels (login, register…) |
|
|
354
|
-
| `--gbt-auth-panel-radius` | The auth panel card | `
|
|
408
|
+
A few more tokens are not set on `:root`: each component falls back to the value in the last column,
|
|
409
|
+
so an app that leaves them alone gets the family's look. Set one to take that part in hand.
|
|
410
|
+
|
|
411
|
+
| Token | Used by | Fallback |
|
|
412
|
+
| ----------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------ |
|
|
413
|
+
| `--gbt-focus-ring` | Every focus outline | `var(--focus-ring)` |
|
|
414
|
+
| `--gbt-font-display` | Page, card, panel, modal and drawer titles, stat tile values, empty state | `var(--font-display)` |
|
|
415
|
+
| `--gbt-radius-badge` | Badges, card and tab counts | `3px` |
|
|
416
|
+
| `--gbt-radius-chip` | Mono badges, inline code in a list row, search bar keys | `2px` |
|
|
417
|
+
| `--gbt-radius-menu` | Select and autocomplete panels, menu items, search results | `4px` |
|
|
418
|
+
| `--gbt-radius-tile` | Icon marker tiles, job graph nodes, avatar group overflow, TOTP QR code | `4px` |
|
|
419
|
+
| `--gbt-radius-search` | The search bar field | `3px` |
|
|
420
|
+
| `--gbt-nav-active-bg` / `--gbt-nav-active-text` | The current page in the app shell navigation | a 9% ink tint / `--text-primary` |
|
|
421
|
+
| `--gbt-nav-active-mark` | A 2px rule on the start edge of the current page link | `var(--accent)` |
|
|
422
|
+
| `--gbt-shell-bar` | The height of the app shell's bar and of the logo's corner | `4rem` |
|
|
423
|
+
| `--gbt-shell-border` | The app shell's navigation and header edges | `transparent` |
|
|
424
|
+
| `--gbt-shell-header-bg` | The app shell's header | the frame |
|
|
425
|
+
| `--gbt-shell-content-padding` | The app shell's bar and main content area | `clamp(1rem, 0.25rem + 2vw, 2rem)` |
|
|
426
|
+
| `--gbt-auth-panel-backdrop` | The page behind the auth panels (login, register…) | `var(--frame)` |
|
|
427
|
+
| `--gbt-auth-panel-radius` | The auth panel card | `var(--site-border-radius-lg)` |
|
|
355
428
|
|
|
356
429
|
Overriding a token after the import:
|
|
357
430
|
|
|
358
431
|
```scss
|
|
359
|
-
@use 'gabarit/tokens'
|
|
432
|
+
@use '@masmarino/gabarit/tokens';
|
|
360
433
|
|
|
361
434
|
:root {
|
|
362
|
-
--
|
|
435
|
+
--accent: #7c3aed;
|
|
363
436
|
}
|
|
364
437
|
```
|
|
365
438
|
|
|
366
|
-
**Dark mode activates via `prefers-color-scheme` or `[data-theme='dark']`
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
dark mode, redeclare it under the same conditions as Gabarit, after its
|
|
370
|
-
import:
|
|
439
|
+
**Dark mode activates via `prefers-color-scheme` or `[data-theme='dark']` on `<html>`, and
|
|
440
|
+
reapplies to the same tokens.** An override set on a bare `:root` applies to both themes; for a value
|
|
441
|
+
specific to dark mode, redeclare it under the same conditions as Gabarit, after its import:
|
|
371
442
|
|
|
372
443
|
```scss
|
|
373
444
|
@media (prefers-color-scheme: dark) {
|
|
374
445
|
:root {
|
|
375
|
-
--
|
|
446
|
+
--accent: #a78bfa;
|
|
376
447
|
}
|
|
377
448
|
}
|
|
378
449
|
```
|
|
379
450
|
|
|
451
|
+
### Moving to the entry points (2.1)
|
|
452
|
+
|
|
453
|
+
Nothing breaks: the root still exports every name. To get the smaller first chunk, replace each
|
|
454
|
+
`import { … } from '@masmarino/gabarit'` by one import per entry point (see [Imports](#imports));
|
|
455
|
+
the compiler names any symbol imported from the wrong one.
|
|
456
|
+
|
|
457
|
+
### Upgrading from 1.x
|
|
458
|
+
|
|
459
|
+
- The default look is the Ferris family's (palette, IBM Plex, radii, the graphite shell and auth
|
|
460
|
+
pages). An application that themed 1.x by mapping its own tokens onto Gabarit's can drop that map.
|
|
461
|
+
- The raw palette is new (`--slate-*`, `--graphite-*`, `--rust-*`, `--patina-*`, `--amber-*`,
|
|
462
|
+
`--red-*`, `--indigo-*`); `--brand-*`, `--grey-*`, `--green-*` and `--emerald-*` are gone.
|
|
463
|
+
- New tokens: `--accent`, `--accent-text`, `--focus-ring`, `--frame`, `--font-display`; new mixins:
|
|
464
|
+
`light-tokens`, `dark-tokens`, `frame-tokens`, `document-base`, `visually-hidden`, `focus-ring`.
|
|
465
|
+
- `@masmarino/gabarit/fonts` replaces the font an application served for `'Inter'`.
|
|
466
|
+
|
|
380
467
|
## Internationalization
|
|
381
468
|
|
|
382
469
|
Gabarit ships no translation mechanism. Every visible string is a
|
|
@@ -384,7 +471,7 @@ component input, supplied by the application.
|
|
|
384
471
|
|
|
385
472
|
## Accessibility
|
|
386
473
|
|
|
387
|
-
[`ACCESSIBILITY.md`](
|
|
474
|
+
[`ACCESSIBILITY.md`](ACCESSIBILITY.md) documents what Gabarit
|
|
388
475
|
guarantees with respect to RGAA (30 out of 106 criteria, checked on every
|
|
389
476
|
push by CI — `axe-core` in the unit tests and a dedicated contrast test —
|
|
390
477
|
plus a manual audit checklist for 69 components), what remains the application's
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Accordion
|
|
2
|
+
|
|
3
|
+
Collapsible sections, with `gbt-accordion-item` as projected content —
|
|
4
|
+
each item renders its own header and panel, so header/panel pairs stay
|
|
5
|
+
next to each other in the DOM, unlike `Tabs`' separate trigger/panel
|
|
6
|
+
lists.
|
|
7
|
+
|
|
8
|
+
**Selector**: `gbt-accordion` (container), `gbt-accordion-item` (each
|
|
9
|
+
section)
|
|
10
|
+
|
|
11
|
+
Up/down arrows move focus between headers, with wraparound. Enter/Space
|
|
12
|
+
toggle the focused header (native `<button>` behavior).
|
|
13
|
+
|
|
14
|
+
`expanded` is an Angular `model()`, so it works uncontrolled (omit the
|
|
15
|
+
binding entirely) or controlled (bind `[expanded]`/`(expandedChange)`,
|
|
16
|
+
e.g. to open a specific section by default or persist it).
|
|
17
|
+
|
|
18
|
+
## Inputs of `gbt-accordion`
|
|
19
|
+
|
|
20
|
+
| Input | Type | Default | Role |
|
|
21
|
+
| ---------- | ------------------------ | ------------------------------- | --------------------------------------------------------------------- |
|
|
22
|
+
| `id` | `string` | generated (`gbt-accordion-N`) | Prefix of the DOM ids generated for each header/panel. |
|
|
23
|
+
| `mode` | `'single' \| 'multiple'` | `'single'` | `single`: opening an item closes any other, and re-clicking an open item closes it too — nothing is ever forced open. `multiple`: each item toggles independently. |
|
|
24
|
+
| `expanded` | `number[]` (model) | `[]` | Indices of the currently open items. |
|
|
25
|
+
|
|
26
|
+
## Inputs of `gbt-accordion-item`
|
|
27
|
+
|
|
28
|
+
| Input | Type | Role |
|
|
29
|
+
| ------- | -------- | ------------------------ |
|
|
30
|
+
| `label` | `string` | Required. Header label. |
|
|
31
|
+
|
|
32
|
+
## Example
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<gbt-accordion>
|
|
36
|
+
<gbt-accordion-item label="Comment créer un compte ?">...</gbt-accordion-item>
|
|
37
|
+
<gbt-accordion-item label="Comment contacter le support ?">...</gbt-accordion-item>
|
|
38
|
+
</gbt-accordion>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Open the first section by default:
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<gbt-accordion [expanded]="[0]">...</gbt-accordion>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Behavior
|
|
48
|
+
|
|
49
|
+
- The open/close transition animates `grid-template-rows` (0fr ↔ 1fr)
|
|
50
|
+
rather than a fixed `max-height` — it adapts to any content height
|
|
51
|
+
without guessing, and is disabled under `prefers-reduced-motion:
|
|
52
|
+
reduce`.
|
|
53
|
+
- A collapsed panel carries `inert` — its content (and everything
|
|
54
|
+
inside it) is unreachable by keyboard or a screen reader — instead of
|
|
55
|
+
the native `hidden` attribute, which would force `display: none` and
|
|
56
|
+
break the height transition.
|