@masmarino/gabarit 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +131 -85
- package/accordion/README.md +56 -0
- package/alert/README.md +87 -0
- package/app-shell/README.md +133 -0
- package/auth/README.md +155 -0
- package/auth-activate/README.md +119 -0
- package/auth-login/README.md +113 -0
- package/auth-register/README.md +104 -0
- package/auth-reset-password/README.md +120 -0
- package/autocomplete/README.md +77 -0
- package/avatar/README.md +34 -0
- package/avatar-group/README.md +47 -0
- package/badge/README.md +177 -0
- package/bar-chart/README.md +44 -0
- package/breadcrumb/README.md +38 -0
- package/button/README.md +175 -0
- package/card/README.md +179 -0
- package/checkbox/README.md +50 -0
- package/checkbox-group/README.md +78 -0
- package/confirm-danger-modal/README.md +77 -0
- package/copy-button/README.md +90 -0
- package/copy-field/README.md +54 -0
- package/date-picker/README.md +84 -0
- package/description-list/README.md +63 -0
- package/dimension-card/README.md +39 -0
- package/disclosure/README.md +48 -0
- package/divider/README.md +31 -0
- package/drawer/README.md +49 -0
- package/empty-state/README.md +84 -0
- package/fesm2022/masmarino-gabarit-accordion.mjs +243 -0
- package/fesm2022/masmarino-gabarit-accordion.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-alert.mjs +208 -0
- package/fesm2022/masmarino-gabarit-alert.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-app-shell.mjs +378 -0
- package/fesm2022/masmarino-gabarit-app-shell.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth-activate.mjs +415 -0
- package/fesm2022/masmarino-gabarit-auth-activate.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth-login.mjs +467 -0
- package/fesm2022/masmarino-gabarit-auth-login.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth-register.mjs +457 -0
- package/fesm2022/masmarino-gabarit-auth-register.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth-reset-password.mjs +364 -0
- package/fesm2022/masmarino-gabarit-auth-reset-password.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth.mjs +844 -0
- package/fesm2022/masmarino-gabarit-auth.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-autocomplete.mjs +475 -0
- package/fesm2022/masmarino-gabarit-autocomplete.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-avatar-group.mjs +202 -0
- package/fesm2022/masmarino-gabarit-avatar-group.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-avatar.mjs +107 -0
- package/fesm2022/masmarino-gabarit-avatar.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-badge.mjs +449 -0
- package/fesm2022/masmarino-gabarit-badge.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-bar-chart.mjs +408 -0
- package/fesm2022/masmarino-gabarit-bar-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-breadcrumb.mjs +59 -0
- package/fesm2022/masmarino-gabarit-breadcrumb.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-button.mjs +374 -0
- package/fesm2022/masmarino-gabarit-button.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-card.mjs +400 -0
- package/fesm2022/masmarino-gabarit-card.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-chart.mjs +1289 -0
- package/fesm2022/masmarino-gabarit-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-checkbox-group.mjs +335 -0
- package/fesm2022/masmarino-gabarit-checkbox-group.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-checkbox.mjs +170 -0
- package/fesm2022/masmarino-gabarit-checkbox.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-confirm-danger-modal.mjs +387 -0
- package/fesm2022/masmarino-gabarit-confirm-danger-modal.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-copy-button.mjs +407 -0
- package/fesm2022/masmarino-gabarit-copy-button.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-copy-field.mjs +229 -0
- package/fesm2022/masmarino-gabarit-copy-field.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-date-picker.mjs +1242 -0
- package/fesm2022/masmarino-gabarit-date-picker.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-description-list.mjs +127 -0
- package/fesm2022/masmarino-gabarit-description-list.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-dimension-card.mjs +162 -0
- package/fesm2022/masmarino-gabarit-dimension-card.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-disclosure.mjs +154 -0
- package/fesm2022/masmarino-gabarit-disclosure.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-divider.mjs +90 -0
- package/fesm2022/masmarino-gabarit-divider.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-docs.mjs +16 -2
- package/fesm2022/masmarino-gabarit-docs.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-drawer.mjs +209 -0
- package/fesm2022/masmarino-gabarit-drawer.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-empty-state.mjs +226 -0
- package/fesm2022/masmarino-gabarit-empty-state.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-file-upload.mjs +335 -0
- package/fesm2022/masmarino-gabarit-file-upload.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-floating-panel.mjs +24 -0
- package/fesm2022/masmarino-gabarit-floating-panel.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-format.mjs +345 -0
- package/fesm2022/masmarino-gabarit-format.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-funnel-chart.mjs +247 -0
- package/fesm2022/masmarino-gabarit-funnel-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-gauge-bar.mjs +180 -0
- package/fesm2022/masmarino-gabarit-gauge-bar.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-git-field.mjs +127 -0
- package/fesm2022/masmarino-gabarit-git-field.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-icon-marker.mjs +150 -0
- package/fesm2022/masmarino-gabarit-icon-marker.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-icon.mjs +308 -0
- package/fesm2022/masmarino-gabarit-icon.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-input.mjs +493 -0
- package/fesm2022/masmarino-gabarit-input.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-job-graph.mjs +216 -0
- package/fesm2022/masmarino-gabarit-job-graph.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-job-status.mjs +104 -0
- package/fesm2022/masmarino-gabarit-job-status.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-line-chart.mjs +574 -0
- package/fesm2022/masmarino-gabarit-line-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-list-card.mjs +320 -0
- package/fesm2022/masmarino-gabarit-list-card.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-list-row.mjs +58 -0
- package/fesm2022/masmarino-gabarit-list-row.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-list-toolbar.mjs +369 -0
- package/fesm2022/masmarino-gabarit-list-toolbar.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-menu.mjs +464 -0
- package/fesm2022/masmarino-gabarit-menu.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs +897 -0
- package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-mfa-settings.mjs +629 -0
- package/fesm2022/masmarino-gabarit-mfa-settings.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-modal.mjs +260 -0
- package/fesm2022/masmarino-gabarit-modal.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-nav-tabs.mjs +332 -0
- package/fesm2022/masmarino-gabarit-nav-tabs.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-notification-dot.mjs +119 -0
- package/fesm2022/masmarino-gabarit-notification-dot.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-page-header.mjs +78 -0
- package/fesm2022/masmarino-gabarit-page-header.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-page-layout.mjs +157 -0
- package/fesm2022/masmarino-gabarit-page-layout.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-pagination.mjs +415 -0
- package/fesm2022/masmarino-gabarit-pagination.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-panel.mjs +80 -0
- package/fesm2022/masmarino-gabarit-panel.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-passkey-settings.mjs +606 -0
- package/fesm2022/masmarino-gabarit-passkey-settings.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-pie-chart.mjs +317 -0
- package/fesm2022/masmarino-gabarit-pie-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-popover.mjs +142 -0
- package/fesm2022/masmarino-gabarit-popover.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-radio-group.mjs +202 -0
- package/fesm2022/masmarino-gabarit-radio-group.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-save-status.mjs +142 -0
- package/fesm2022/masmarino-gabarit-save-status.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-search-bar.mjs +576 -0
- package/fesm2022/masmarino-gabarit-search-bar.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-secret-reveal.mjs +348 -0
- package/fesm2022/masmarino-gabarit-secret-reveal.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-segmented-control.mjs +272 -0
- package/fesm2022/masmarino-gabarit-segmented-control.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-select.mjs +512 -0
- package/fesm2022/masmarino-gabarit-select.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-skeleton-list.mjs +189 -0
- package/fesm2022/masmarino-gabarit-skeleton-list.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-skeleton.mjs +109 -0
- package/fesm2022/masmarino-gabarit-skeleton.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-slider.mjs +239 -0
- package/fesm2022/masmarino-gabarit-slider.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-sparkline.mjs +276 -0
- package/fesm2022/masmarino-gabarit-sparkline.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-spinner.mjs +86 -0
- package/fesm2022/masmarino-gabarit-spinner.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-stat-grid.mjs +139 -0
- package/fesm2022/masmarino-gabarit-stat-grid.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-stat-tile.mjs +312 -0
- package/fesm2022/masmarino-gabarit-stat-tile.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-stepper.mjs +219 -0
- package/fesm2022/masmarino-gabarit-stepper.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-switch.mjs +151 -0
- package/fesm2022/masmarino-gabarit-switch.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-table.mjs +206 -0
- package/fesm2022/masmarino-gabarit-table.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tabs.mjs +210 -0
- package/fesm2022/masmarino-gabarit-tabs.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tag-input.mjs +288 -0
- package/fesm2022/masmarino-gabarit-tag-input.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tag.mjs +155 -0
- package/fesm2022/masmarino-gabarit-tag.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-textarea.mjs +369 -0
- package/fesm2022/masmarino-gabarit-textarea.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-timeline-chart.mjs +521 -0
- package/fesm2022/masmarino-gabarit-timeline-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-toaster.mjs +220 -0
- package/fesm2022/masmarino-gabarit-toaster.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tooltip.mjs +185 -0
- package/fesm2022/masmarino-gabarit-tooltip.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tree.mjs +258 -0
- package/fesm2022/masmarino-gabarit-tree.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-user-chip.mjs +106 -0
- package/fesm2022/masmarino-gabarit-user-chip.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit.mjs +83 -24785
- package/fesm2022/masmarino-gabarit.mjs.map +1 -1
- package/file-upload/README.md +47 -0
- package/funnel-chart/README.md +39 -0
- package/gauge-bar/README.md +35 -0
- package/git-field/README.md +34 -0
- package/icon/README.md +52 -0
- package/icon-marker/README.md +37 -0
- package/input/README.md +120 -0
- package/job-graph/README.md +76 -0
- package/job-status/README.md +34 -0
- package/line-chart/README.md +52 -0
- package/list-card/README.md +144 -0
- package/list-row/README.md +72 -0
- package/list-toolbar/README.md +52 -0
- package/menu/README.md +90 -0
- package/mfa-enrollment/README.md +189 -0
- package/mfa-settings/README.md +154 -0
- package/modal/README.md +72 -0
- package/nav-tabs/README.md +106 -0
- package/notification-dot/README.md +43 -0
- package/package.json +329 -1
- package/page-header/README.md +56 -0
- package/page-layout/README.md +76 -0
- package/pagination/README.md +73 -0
- package/panel/README.md +56 -0
- package/passkey-settings/README.md +120 -0
- package/pie-chart/README.md +85 -0
- package/popover/README.md +62 -0
- package/radio-group/README.md +47 -0
- package/save-status/README.md +44 -0
- package/search-bar/README.md +84 -0
- package/secret-reveal/README.md +60 -0
- package/segmented-control/README.md +79 -0
- package/select/README.md +61 -0
- package/skeleton/README.md +49 -0
- package/skeleton-list/README.md +40 -0
- package/slider/README.md +44 -0
- package/sparkline/README.md +37 -0
- package/spinner/README.md +41 -0
- package/stat-grid/README.md +47 -0
- package/stat-tile/README.md +75 -0
- package/stepper/README.md +67 -0
- package/switch/README.md +51 -0
- package/table/README.md +75 -0
- package/tabs/README.md +34 -0
- package/tag/README.md +34 -0
- package/tag-input/README.md +45 -0
- package/textarea/README.md +76 -0
- package/timeline-chart/README.md +49 -0
- package/toaster/README.md +92 -0
- package/tooltip/README.md +50 -0
- package/tree/README.md +79 -0
- package/types/masmarino-gabarit-accordion.d.ts +54 -0
- package/types/masmarino-gabarit-alert.d.ts +65 -0
- package/types/masmarino-gabarit-app-shell.d.ts +102 -0
- package/types/masmarino-gabarit-auth-activate.d.ts +70 -0
- package/types/masmarino-gabarit-auth-login.d.ts +63 -0
- package/types/masmarino-gabarit-auth-register.d.ts +66 -0
- package/types/masmarino-gabarit-auth-reset-password.d.ts +53 -0
- package/types/masmarino-gabarit-auth.d.ts +543 -0
- package/types/masmarino-gabarit-autocomplete.d.ts +140 -0
- package/types/masmarino-gabarit-avatar-group.d.ts +60 -0
- package/types/masmarino-gabarit-avatar.d.ts +31 -0
- package/types/masmarino-gabarit-badge.d.ts +139 -0
- package/types/masmarino-gabarit-bar-chart.d.ts +111 -0
- package/types/masmarino-gabarit-breadcrumb.d.ts +12 -0
- package/types/masmarino-gabarit-button.d.ts +108 -0
- package/types/masmarino-gabarit-card.d.ts +102 -0
- package/types/masmarino-gabarit-chart.d.ts +361 -0
- package/types/masmarino-gabarit-checkbox-group.d.ts +113 -0
- package/types/masmarino-gabarit-checkbox.d.ts +49 -0
- package/types/masmarino-gabarit-confirm-danger-modal.d.ts +94 -0
- package/types/masmarino-gabarit-copy-button.d.ts +111 -0
- package/types/masmarino-gabarit-copy-field.d.ts +64 -0
- package/types/masmarino-gabarit-date-picker.d.ts +399 -0
- package/types/masmarino-gabarit-description-list.d.ts +40 -0
- package/types/masmarino-gabarit-dimension-card.d.ts +55 -0
- package/types/masmarino-gabarit-disclosure.d.ts +44 -0
- package/types/masmarino-gabarit-divider.d.ts +20 -0
- package/types/masmarino-gabarit-docs.d.ts +2 -1
- package/types/masmarino-gabarit-drawer.d.ts +51 -0
- package/types/masmarino-gabarit-empty-state.d.ts +67 -0
- package/types/masmarino-gabarit-file-upload.d.ts +95 -0
- package/types/masmarino-gabarit-floating-panel.d.ts +14 -0
- package/types/masmarino-gabarit-format.d.ts +54 -0
- package/types/masmarino-gabarit-funnel-chart.d.ts +78 -0
- package/types/masmarino-gabarit-gauge-bar.d.ts +54 -0
- package/types/masmarino-gabarit-git-field.d.ts +39 -0
- package/types/masmarino-gabarit-icon-marker.d.ts +47 -0
- package/types/masmarino-gabarit-icon.d.ts +23 -0
- package/types/masmarino-gabarit-input.d.ts +181 -0
- package/types/masmarino-gabarit-job-graph.d.ts +63 -0
- package/types/masmarino-gabarit-job-status.d.ts +20 -0
- package/types/masmarino-gabarit-line-chart.d.ts +153 -0
- package/types/masmarino-gabarit-list-card.d.ts +87 -0
- package/types/masmarino-gabarit-list-row.d.ts +14 -0
- package/types/masmarino-gabarit-list-toolbar.d.ts +100 -0
- package/types/masmarino-gabarit-menu.d.ts +93 -0
- package/types/masmarino-gabarit-mfa-enrollment.d.ts +142 -0
- package/types/masmarino-gabarit-mfa-settings.d.ts +89 -0
- package/types/masmarino-gabarit-modal.d.ts +60 -0
- package/types/masmarino-gabarit-nav-tabs.d.ts +65 -0
- package/types/masmarino-gabarit-notification-dot.d.ts +34 -0
- package/types/masmarino-gabarit-page-header.d.ts +20 -0
- package/types/masmarino-gabarit-page-layout.d.ts +46 -0
- package/types/masmarino-gabarit-pagination.d.ts +109 -0
- package/types/masmarino-gabarit-panel.d.ts +21 -0
- package/types/masmarino-gabarit-passkey-settings.d.ts +94 -0
- package/types/masmarino-gabarit-pie-chart.d.ts +94 -0
- package/types/masmarino-gabarit-popover.d.ts +33 -0
- package/types/masmarino-gabarit-radio-group.d.ts +66 -0
- package/types/masmarino-gabarit-save-status.d.ts +39 -0
- package/types/masmarino-gabarit-search-bar.d.ts +183 -0
- package/types/masmarino-gabarit-secret-reveal.d.ts +95 -0
- package/types/masmarino-gabarit-segmented-control.d.ts +76 -0
- package/types/masmarino-gabarit-select.d.ts +146 -0
- package/types/masmarino-gabarit-skeleton-list.d.ts +54 -0
- package/types/masmarino-gabarit-skeleton.d.ts +26 -0
- package/types/masmarino-gabarit-slider.d.ts +73 -0
- package/types/masmarino-gabarit-sparkline.d.ts +70 -0
- package/types/masmarino-gabarit-spinner.d.ts +20 -0
- package/types/masmarino-gabarit-stat-grid.d.ts +39 -0
- package/types/masmarino-gabarit-stat-tile.d.ts +79 -0
- package/types/masmarino-gabarit-stepper.d.ts +67 -0
- package/types/masmarino-gabarit-switch.d.ts +42 -0
- package/types/masmarino-gabarit-table.d.ts +60 -0
- package/types/masmarino-gabarit-tabs.d.ts +40 -0
- package/types/masmarino-gabarit-tag-input.d.ts +78 -0
- package/types/masmarino-gabarit-tag.d.ts +35 -0
- package/types/masmarino-gabarit-textarea.d.ts +109 -0
- package/types/masmarino-gabarit-timeline-chart.d.ts +145 -0
- package/types/masmarino-gabarit-toaster.d.ts +62 -0
- package/types/masmarino-gabarit-tooltip.d.ts +39 -0
- package/types/masmarino-gabarit-tree.d.ts +71 -0
- package/types/masmarino-gabarit-user-chip.d.ts +26 -0
- package/types/masmarino-gabarit.d.ts +83 -6599
- package/user-chip/README.md +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masmarino-gabarit-date-picker.mjs","names":[],"sources":["../../../projects/gabarit/date-picker/date-picker-calendar.ts","../../../projects/gabarit/date-picker/calendar-panel.ts","../../../projects/gabarit/date-picker/date-picker.ts","../../../projects/gabarit/date-picker/date-picker.html","../../../projects/gabarit/date-picker/date-range-picker/date-range-picker.ts","../../../projects/gabarit/date-picker/date-range-picker/date-range-picker.html"],"sourcesContent":["export type WeekStartsOn = 0 | 1\n\nexport interface CalendarDay {\n date: Date\n inCurrentMonth: boolean\n isToday: boolean\n}\n\nexport function isSameDay(a: Date, b: Date): boolean {\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n )\n}\n\nexport function addMonths(date: Date, delta: number): Date {\n const day = date.getDate()\n const firstOfTarget = new Date(date.getFullYear(), date.getMonth() + delta, 1)\n const daysInTarget = new Date(\n firstOfTarget.getFullYear(),\n firstOfTarget.getMonth() + 1,\n 0,\n ).getDate()\n return new Date(\n firstOfTarget.getFullYear(),\n firstOfTarget.getMonth(),\n Math.min(day, daysInTarget),\n )\n}\n\nexport function addYears(date: Date, delta: number): Date {\n return addMonths(date, delta * 12)\n}\n\nexport function shiftDays(date: Date, delta: number): Date {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate() + delta)\n}\n\nexport function startOfWeek(date: Date, weekStartsOn: WeekStartsOn): Date {\n const weekday = date.getDay()\n const diff = (weekday - weekStartsOn + 7) % 7\n const result = new Date(date.getFullYear(), date.getMonth(), date.getDate())\n result.setDate(result.getDate() - diff)\n return result\n}\n\nexport function endOfWeek(date: Date, weekStartsOn: WeekStartsOn): Date {\n const start = startOfWeek(date, weekStartsOn)\n start.setDate(start.getDate() + 6)\n return start\n}\n\nexport function buildCalendarGrid(\n year: number,\n month: number,\n weekStartsOn: WeekStartsOn,\n): CalendarDay[] {\n const firstOfMonth = new Date(year, month, 1)\n const gridStart = startOfWeek(firstOfMonth, weekStartsOn)\n const today = new Date()\n\n const days: CalendarDay[] = []\n for (let i = 0; i < 42; i++) {\n const date = new Date(gridStart.getFullYear(), gridStart.getMonth(), gridStart.getDate() + i)\n days.push({\n date,\n inCurrentMonth: date.getMonth() === month,\n isToday: isSameDay(date, today),\n })\n }\n return days\n}\n\nexport function weekdayLabels(locale: string, weekStartsOn: WeekStartsOn): string[] {\n const formatter = new Intl.DateTimeFormat(locale, { weekday: 'short' })\n const reference = new Date(2024, 0, 7 + weekStartsOn)\n return Array.from({ length: 7 }, (_, i) => {\n const date = new Date(reference.getFullYear(), reference.getMonth(), reference.getDate() + i)\n return formatter.format(date)\n })\n}\n","import { ElementRef, Injector, afterNextRender, computed, signal } from '@angular/core'\nimport { floatingPanelAnchor } from '@masmarino/gabarit/floating-panel'\nimport {\n CalendarDay,\n WeekStartsOn,\n addMonths,\n addYears,\n buildCalendarGrid,\n endOfWeek,\n isSameDay,\n shiftDays,\n startOfWeek,\n weekdayLabels as computeWeekdayLabels,\n} from './date-picker-calendar'\n\nexport interface CalendarPanelView {\n year: number\n month: number\n label: string\n weeks: CalendarDay[][]\n}\n\nexport interface CalendarPanelDeps {\n elementRef: ElementRef<HTMLElement>\n injector: Injector\n triggerSelector: string\n locale: () => string\n weekStartsOn: () => WeekStartsOn\n visibleMonths: () => number\n minYear: () => number\n maxYear: () => number\n onTouched: () => void\n}\n\nexport type NavigationResult = 'month-changed' | 'day-changed' | 'unhandled'\n\n/** Panel and calendar-grid mechanics shared by `DatePicker` and `DateRangePicker`; one instance per component. */\nexport class CalendarPanel {\n readonly open = signal(false)\n readonly anchorDate = signal<Date>(new Date())\n readonly focusedDate = signal<Date>(new Date())\n readonly panelStyle = signal<{ top: string; left: string } | null>(null)\n\n readonly monthViews = computed<CalendarPanelView[]>(() => {\n const anchor = this.anchorDate()\n const count = this.deps.visibleMonths()\n const formatter = new Intl.DateTimeFormat(this.deps.locale(), {\n month: 'long',\n year: 'numeric',\n })\n const views = Array.from({ length: count }, (_, i) => {\n const monthDate = new Date(anchor.getFullYear(), anchor.getMonth() + i, 1)\n const year = monthDate.getFullYear()\n const month = monthDate.getMonth()\n const days = buildCalendarGrid(year, month, this.deps.weekStartsOn())\n const weeks: CalendarDay[][] = []\n for (let d = 0; d < days.length; d += 7) {\n weeks.push(days.slice(d, d + 7))\n }\n return { year, month, label: formatter.format(monthDate), weeks }\n })\n const neededWeeks = views.map((view) => {\n let last = view.weeks.length\n while (last > 1 && view.weeks[last - 1].every((day) => !day.inCurrentMonth)) {\n last--\n }\n return last\n })\n const sharedWeeks = Math.max(...neededWeeks)\n return views.map((view) => ({ ...view, weeks: view.weeks.slice(0, sharedWeeks) }))\n })\n\n readonly panelLabel = computed(() => {\n const views = this.monthViews()\n return views.length === 1\n ? views[0].label\n : `${views[0].label} – ${views[views.length - 1].label}`\n })\n\n readonly weekdayLabels = computed(() =>\n computeWeekdayLabels(this.deps.locale(), this.deps.weekStartsOn()),\n )\n\n readonly monthOptions = computed(() => {\n const formatter = new Intl.DateTimeFormat(this.deps.locale(), { month: 'long' })\n return Array.from({ length: 12 }, (_, i) => ({\n value: i,\n label: formatter.format(new Date(2024, i, 1)),\n }))\n })\n\n readonly yearOptions = computed(() => {\n const min = this.deps.minYear()\n const max = this.deps.maxYear()\n return Array.from({ length: max - min + 1 }, (_, i) => min + i)\n })\n\n constructor(private readonly deps: CalendarPanelDeps) {}\n\n cellId(date: Date): string {\n return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(\n date.getDate(),\n ).padStart(2, '0')}`\n }\n\n isFocused(date: Date): boolean {\n return isSameDay(this.focusedDate(), date)\n }\n\n toggle(onOpen: () => Date): void {\n this.open.update((value) => !value)\n if (this.open()) {\n const target = onOpen()\n this.focusedDate.set(target)\n this.anchorDate.set(new Date(target.getFullYear(), target.getMonth(), 1))\n this.updatePanelPosition()\n this.focusCellAfterRender()\n } else {\n this.deps.onTouched()\n }\n }\n\n close(returnFocus: boolean): void {\n if (!this.open()) {\n return\n }\n this.open.set(false)\n this.deps.onTouched()\n if (returnFocus) {\n this.trigger()?.focus()\n }\n }\n\n shiftMonth(delta: number): void {\n this.anchorDate.set(addMonths(this.anchorDate(), delta))\n this.focusedDate.set(addMonths(this.focusedDate(), delta))\n this.updatePanelPosition()\n this.focusCellAfterRender()\n }\n\n onMonthSelect(value: string): void {\n this.setAnchorMonth(this.anchorDate().getFullYear(), Number(value))\n }\n\n onYearSelect(value: string): void {\n this.setAnchorMonth(Number(value), this.anchorDate().getMonth())\n }\n\n private setAnchorMonth(year: number, month: number): void {\n const dayOfMonth = this.focusedDate().getDate()\n const daysInTarget = new Date(year, month + 1, 0).getDate()\n this.anchorDate.set(new Date(year, month, 1))\n this.focusedDate.set(new Date(year, month, Math.min(dayOfMonth, daysInTarget)))\n this.updatePanelPosition()\n this.focusCellAfterRender()\n }\n\n handleNavigationKeydown(event: KeyboardEvent): NavigationResult {\n const current = this.focusedDate()\n if (event.key === 'PageDown' || event.key === 'PageUp') {\n event.preventDefault()\n const delta = event.key === 'PageDown' ? 1 : -1\n if (event.shiftKey) {\n this.anchorDate.set(addYears(this.anchorDate(), delta))\n this.focusedDate.set(addYears(current, delta))\n } else {\n this.anchorDate.set(addMonths(this.anchorDate(), delta))\n this.focusedDate.set(addMonths(current, delta))\n }\n this.updatePanelPosition()\n this.focusCellAfterRender()\n return 'month-changed'\n }\n const next = this.nextFocusedDate(current, event)\n if (next === null) {\n return 'unhandled'\n }\n event.preventDefault()\n this.ensureVisible(next)\n this.focusedDate.set(next)\n this.focusCellAfterRender()\n return 'day-changed'\n }\n\n private nextFocusedDate(current: Date, event: KeyboardEvent): Date | null {\n switch (event.key) {\n case 'ArrowRight':\n return shiftDays(current, 1)\n case 'ArrowLeft':\n return shiftDays(current, -1)\n case 'ArrowDown':\n return shiftDays(current, 7)\n case 'ArrowUp':\n return shiftDays(current, -7)\n case 'Home':\n return startOfWeek(current, this.deps.weekStartsOn())\n case 'End':\n return endOfWeek(current, this.deps.weekStartsOn())\n default:\n return null\n }\n }\n\n ensureVisible(date: Date): void {\n const anchor = this.anchorDate()\n const visibleMonths = this.deps.visibleMonths()\n const monthsDiff =\n (date.getFullYear() - anchor.getFullYear()) * 12 + (date.getMonth() - anchor.getMonth())\n if (monthsDiff < 0) {\n this.anchorDate.set(new Date(date.getFullYear(), date.getMonth(), 1))\n } else if (monthsDiff >= visibleMonths) {\n this.anchorDate.set(addMonths(anchor, monthsDiff - visibleMonths + 1))\n }\n }\n\n onEscape(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this.open()) {\n event.preventDefault()\n event.stopPropagation()\n this.close(true)\n }\n }\n\n handleClickOutside(event: MouseEvent): void {\n if (this.open() && !this.deps.elementRef.nativeElement.contains(event.target as Node)) {\n this.close(false)\n }\n }\n\n updatePanelPosition(): void {\n const anchor = floatingPanelAnchor(this.open(), this.trigger())\n if (anchor) {\n this.panelStyle.set({ top: `${anchor.bottom}px`, left: `${anchor.left}px` })\n }\n }\n\n private trigger(): HTMLButtonElement | null {\n return this.deps.elementRef.nativeElement.querySelector(this.deps.triggerSelector)\n }\n\n focusCellAfterRender(): void {\n afterNextRender(\n () => {\n const id = this.cellId(this.focusedDate())\n const host = this.deps.elementRef.nativeElement\n host.querySelector<HTMLElement>(`[data-date=\"${id}\"]`)?.focus()\n },\n { injector: this.deps.injector },\n )\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n signal,\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { Icon } from '@masmarino/gabarit/icon'\nimport { CalendarPanel, type CalendarPanelView } from './calendar-panel'\nimport { CalendarDay, WeekStartsOn, isSameDay } from './date-picker-calendar'\nimport { followPageScroll } from '@masmarino/gabarit/floating-panel'\n\nexport type DatePickerVisibleMonths = 1 | 2\n\nexport type DatePickerMonthView = CalendarPanelView\n\nlet nextDatePickerId = 0\n\nconst CURRENT_YEAR = new Date().getFullYear()\n\n@Component({\n selector: 'gbt-date-picker',\n standalone: true,\n imports: [Icon],\n templateUrl: './date-picker.html',\n styleUrl: './date-picker.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(document:click)': 'handleClickOutside($event)',\n '(keydown)': 'onEscape($event)',\n '(window:resize)': 'updatePanelPosition()',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DatePicker),\n multi: true,\n },\n ],\n})\nexport class DatePicker implements ControlValueAccessor {\n private readonly elementRef = inject(ElementRef)\n private readonly injector = inject(Injector)\n\n id = input<string>(`gbt-date-picker-${++nextDatePickerId}`)\n label = input<string>('')\n placeholder = input<string>('Select a date…')\n locale = input<string>('en-US')\n weekStartsOn = input<WeekStartsOn>(1)\n disabled = input(false, { transform: booleanAttribute })\n required = input(false, { transform: booleanAttribute })\n errorMessage = input<string | null>(null)\n previousMonthLabel = input<string>('Previous month')\n nextMonthLabel = input<string>('Next month')\n clearable = input(false, { transform: booleanAttribute })\n clearLabel = input<string>('Clear date')\n visibleMonths = input<DatePickerVisibleMonths>(1)\n monthSelectLabel = input<string>('Month')\n yearSelectLabel = input<string>('Year')\n minYear = input<number>(CURRENT_YEAR - 100)\n maxYear = input<number>(CURRENT_YEAR + 10)\n\n private readonly panel = new CalendarPanel({\n elementRef: this.elementRef,\n injector: this.injector,\n triggerSelector: '.gbt-date-picker__trigger',\n locale: () => this.locale(),\n weekStartsOn: () => this.weekStartsOn(),\n visibleMonths: () => this.visibleMonths(),\n minYear: () => this.minYear(),\n maxYear: () => this.maxYear(),\n onTouched: () => this.onTouched(),\n })\n\n protected readonly open = this.panel.open\n protected readonly selected = signal<Date | null>(null)\n protected readonly focusedDate = this.panel.focusedDate\n protected readonly anchorDate = this.panel.anchorDate\n protected readonly panelStyle = this.panel.panelStyle\n\n private readonly formDisabled = signal(false)\n private onChange: (value: Date | null) => void = () => {}\n private onTouched: () => void = () => {}\n\n protected readonly isDisabled = computed(() => this.disabled() || this.formDisabled())\n protected readonly showClear = computed(\n () => this.clearable() && this.selected() !== null && !this.isDisabled(),\n )\n\n protected readonly monthViews = this.panel.monthViews\n protected readonly panelLabel = this.panel.panelLabel\n protected readonly weekdayLabels = this.panel.weekdayLabels\n protected readonly monthOptions = this.panel.monthOptions\n protected readonly yearOptions = this.panel.yearOptions\n\n protected readonly triggerLabel = computed(() => {\n const value = this.selected()\n return value\n ? new Intl.DateTimeFormat(this.locale(), { dateStyle: 'medium' }).format(value)\n : ''\n })\n\n writeValue(value: Date | null): void {\n this.selected.set(value)\n if (value) {\n this.focusedDate.set(value)\n this.anchorDate.set(new Date(value.getFullYear(), value.getMonth(), 1))\n }\n }\n\n registerOnChange(fn: (value: Date | null) => void): void {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled)\n }\n\n protected isSelected(date: Date): boolean {\n const value = this.selected()\n return value !== null && isSameDay(value, date)\n }\n\n protected isFocused(date: Date): boolean {\n return this.panel.isFocused(date)\n }\n\n protected cellId(date: Date): string {\n return this.panel.cellId(date)\n }\n\n protected toggleOpen(): void {\n if (this.isDisabled()) {\n return\n }\n this.panel.toggle(() => this.selected() ?? new Date())\n }\n\n protected close(returnFocus: boolean): void {\n this.panel.close(returnFocus)\n }\n\n protected clear(event: Event): void {\n event.stopPropagation()\n if (this.isDisabled()) {\n return\n }\n this.selected.set(null)\n this.onChange(null)\n this.onTouched()\n this.panel.close(false)\n }\n\n protected selectDay(day: CalendarDay): void {\n if (this.isDisabled()) {\n return\n }\n this.selected.set(day.date)\n this.focusedDate.set(day.date)\n this.panel.ensureVisible(day.date)\n this.onChange(day.date)\n this.panel.close(true)\n }\n\n protected shiftMonth(delta: number): void {\n this.panel.shiftMonth(delta)\n }\n\n protected onMonthSelect(value: string): void {\n this.panel.onMonthSelect(value)\n }\n\n protected onYearSelect(value: string): void {\n this.panel.onYearSelect(value)\n }\n\n protected onGridKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n const current = this.focusedDate()\n this.selectDay({\n date: current,\n inCurrentMonth: true,\n isToday: isSameDay(current, new Date()),\n })\n return\n }\n this.panel.handleNavigationKeydown(event)\n }\n\n protected onEscape(event: KeyboardEvent): void {\n this.panel.onEscape(event)\n }\n\n protected handleClickOutside(event: MouseEvent): void {\n this.panel.handleClickOutside(event)\n }\n\n constructor() {\n followPageScroll(() => this.updatePanelPosition())\n }\n\n protected updatePanelPosition(): void {\n this.panel.updatePanelPosition()\n }\n}\n","<div class=\"gbt-date-picker\">\n @if (label()) {\n <label [for]=\"id()\" class=\"gbt-date-picker__label\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n <div class=\"gbt-date-picker__field\">\n <button\n type=\"button\"\n [id]=\"id()\"\n class=\"gbt-date-picker__trigger\"\n [class.gbt-date-picker__trigger--open]=\"open()\"\n [disabled]=\"isDisabled()\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (click)=\"toggleOpen()\"\n >\n <span\n class=\"gbt-date-picker__trigger-label\"\n [class.gbt-date-picker__trigger-label--placeholder]=\"!triggerLabel()\"\n >\n {{ triggerLabel() || placeholder() }}\n </span>\n </button>\n @if (showClear()) {\n <button\n type=\"button\"\n class=\"gbt-date-picker__clear\"\n [attr.aria-label]=\"clearLabel()\"\n (click)=\"clear($event)\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n } @else {\n <gbt-icon name=\"calendar\" class=\"gbt-date-picker__icon\" aria-hidden=\"true\" />\n }\n </div>\n @if (open() && panelStyle(); as pos) {\n <div\n class=\"gbt-date-picker__panel\"\n role=\"dialog\"\n aria-modal=\"false\"\n [attr.aria-label]=\"panelLabel()\"\n [style.top]=\"pos.top\"\n [style.left]=\"pos.left\"\n >\n <div class=\"gbt-date-picker__nav\">\n <button\n type=\"button\"\n class=\"gbt-date-picker__nav-button\"\n [attr.aria-label]=\"previousMonthLabel()\"\n (click)=\"shiftMonth(-1)\"\n >\n <gbt-icon name=\"chevron-left\" aria-hidden=\"true\" />\n </button>\n <div class=\"gbt-date-picker__headings\">\n @for (view of monthViews(); track view.year + '-' + view.month; let i = $index) {\n <div class=\"gbt-date-picker__month-heading\">\n @if (i === 0) {\n <select\n #monthSelect\n class=\"gbt-date-picker__select\"\n [attr.aria-label]=\"monthSelectLabel()\"\n (change)=\"onMonthSelect(monthSelect.value)\"\n >\n @for (opt of monthOptions(); track opt.value) {\n <option [value]=\"opt.value\" [selected]=\"opt.value === anchorDate().getMonth()\">\n {{ opt.label }}\n </option>\n }\n </select>\n <select\n #yearSelect\n class=\"gbt-date-picker__select\"\n [attr.aria-label]=\"yearSelectLabel()\"\n (change)=\"onYearSelect(yearSelect.value)\"\n >\n @for (year of yearOptions(); track year) {\n <option [value]=\"year\" [selected]=\"year === anchorDate().getFullYear()\">\n {{ year }}\n </option>\n }\n </select>\n } @else {\n <span class=\"gbt-date-picker__month-label\">{{ view.label }}</span>\n }\n </div>\n }\n </div>\n <button\n type=\"button\"\n class=\"gbt-date-picker__nav-button\"\n [attr.aria-label]=\"nextMonthLabel()\"\n (click)=\"shiftMonth(1)\"\n >\n <gbt-icon name=\"chevron-right\" aria-hidden=\"true\" />\n </button>\n </div>\n <div class=\"gbt-date-picker__months\">\n @for (view of monthViews(); track view.year + '-' + view.month) {\n <div class=\"gbt-date-picker__month\">\n <div\n class=\"gbt-date-picker__grid\"\n role=\"grid\"\n tabindex=\"-1\"\n [attr.aria-label]=\"view.label\"\n (keydown)=\"onGridKeydown($event)\"\n >\n <div class=\"gbt-date-picker__row gbt-date-picker__row--head\" role=\"row\">\n @for (wd of weekdayLabels(); track $index) {\n <span role=\"columnheader\" class=\"gbt-date-picker__weekday\">{{ wd }}</span>\n }\n </div>\n @for (week of view.weeks; track $index) {\n <div class=\"gbt-date-picker__row\" role=\"row\">\n @for (day of week; track day.date.getTime()) {\n @if (day.inCurrentMonth) {\n <button\n type=\"button\"\n role=\"gridcell\"\n class=\"gbt-date-picker__day\"\n [class.gbt-date-picker__day--today]=\"day.isToday\"\n [class.gbt-date-picker__day--selected]=\"isSelected(day.date)\"\n [attr.data-date]=\"cellId(day.date)\"\n [attr.aria-selected]=\"isSelected(day.date)\"\n [attr.aria-current]=\"day.isToday ? 'date' : null\"\n [tabIndex]=\"isFocused(day.date) ? 0 : -1\"\n (click)=\"selectDay(day)\"\n >\n {{ day.date.getDate() }}\n </button>\n } @else {\n <span\n role=\"gridcell\"\n class=\"gbt-date-picker__day gbt-date-picker__day--empty\"\n ></span>\n }\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-date-picker__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n signal,\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { Icon } from '@masmarino/gabarit/icon'\nimport { CalendarPanel, type CalendarPanelView } from '../calendar-panel'\nimport { WeekStartsOn, isSameDay } from '../date-picker-calendar'\nimport { followPageScroll } from '@masmarino/gabarit/floating-panel'\n\nexport type DateRangeVisibleMonths = 1 | 2\n\nexport interface DateRangeValue {\n start: Date\n end: Date | null\n}\n\nexport type DateRangePickerMonthView = CalendarPanelView\n\nlet nextId = 0\n\nconst CURRENT_YEAR = new Date().getFullYear()\n\n@Component({\n selector: 'gbt-date-range-picker',\n standalone: true,\n imports: [Icon],\n templateUrl: './date-range-picker.html',\n styleUrl: './date-range-picker.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(document:click)': 'handleClickOutside($event)',\n '(keydown)': 'onEscape($event)',\n '(window:resize)': 'updatePanelPosition()',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateRangePicker),\n multi: true,\n },\n ],\n})\nexport class DateRangePicker implements ControlValueAccessor {\n private readonly elementRef = inject(ElementRef)\n private readonly injector = inject(Injector)\n\n id = input<string>(`gbt-date-range-picker-${++nextId}`)\n label = input<string>('')\n placeholder = input<string>('Select a date range…')\n locale = input<string>('en-US')\n weekStartsOn = input<WeekStartsOn>(1)\n disabled = input(false, { transform: booleanAttribute })\n required = input(false, { transform: booleanAttribute })\n errorMessage = input<string | null>(null)\n previousMonthLabel = input<string>('Previous month')\n nextMonthLabel = input<string>('Next month')\n clearable = input(false, { transform: booleanAttribute })\n clearLabel = input<string>('Clear date range')\n visibleMonths = input<DateRangeVisibleMonths>(2)\n monthSelectLabel = input<string>('Month')\n yearSelectLabel = input<string>('Year')\n minYear = input<number>(CURRENT_YEAR - 100)\n maxYear = input<number>(CURRENT_YEAR + 10)\n rangeStatus = input<(start: string | null, end: string | null) => string>((start, end) => {\n if (!start) return ''\n if (!end) return `${start} selected as the start date. Choose an end date.`\n return `Date range: ${start} to ${end}.`\n })\n\n private readonly panel = new CalendarPanel({\n elementRef: this.elementRef,\n injector: this.injector,\n triggerSelector: '.gbt-date-range-picker__trigger',\n locale: () => this.locale(),\n weekStartsOn: () => this.weekStartsOn(),\n visibleMonths: () => this.visibleMonths(),\n minYear: () => this.minYear(),\n maxYear: () => this.maxYear(),\n onTouched: () => this.onTouched(),\n })\n\n protected readonly open = this.panel.open\n protected readonly value = signal<DateRangeValue | null>(null)\n protected readonly draftStart = signal<Date | null>(null)\n protected readonly draftEnd = signal<Date | null>(null)\n protected readonly hoveredDate = signal<Date | null>(null)\n protected readonly focusedDate = this.panel.focusedDate\n protected readonly anchorDate = this.panel.anchorDate\n protected readonly panelStyle = this.panel.panelStyle\n\n private readonly formDisabled = signal(false)\n private onChange: (value: DateRangeValue | null) => void = () => {}\n private onTouched: () => void = () => {}\n\n protected readonly isDisabled = computed(() => this.disabled() || this.formDisabled())\n protected readonly showClear = computed(\n () => this.clearable() && this.value() !== null && !this.isDisabled(),\n )\n\n protected readonly monthViews = this.panel.monthViews\n protected readonly panelLabel = this.panel.panelLabel\n protected readonly weekdayLabels = this.panel.weekdayLabels\n protected readonly monthOptions = this.panel.monthOptions\n protected readonly yearOptions = this.panel.yearOptions\n\n private readonly dateFormatter = computed(\n () => new Intl.DateTimeFormat(this.locale(), { dateStyle: 'medium' }),\n )\n\n protected readonly triggerLabel = computed(() => {\n const v = this.value()\n if (!v) return ''\n const formatter = this.dateFormatter()\n if (!v.end) return formatter.format(v.start)\n return `${formatter.format(v.start)} – ${formatter.format(v.end)}`\n })\n\n private readonly previewBounds = computed<{ lower: Date; upper: Date } | null>(() => {\n const start = this.draftStart()\n if (!start) return null\n const other = this.draftEnd() ?? this.hoveredDate()\n if (!other) return null\n return start.getTime() <= other.getTime()\n ? { lower: start, upper: other }\n : { lower: other, upper: start }\n })\n\n protected readonly isPreviewing = computed(\n () => this.draftStart() !== null && this.draftEnd() === null,\n )\n\n protected readonly statusMessage = computed(() => {\n const start = this.draftStart()\n if (!start) return ''\n const formatter = this.dateFormatter()\n const end = this.draftEnd()\n return this.rangeStatus()(formatter.format(start), end ? formatter.format(end) : null)\n })\n\n writeValue(value: DateRangeValue | null): void {\n this.value.set(value)\n if (value) {\n this.focusedDate.set(value.start)\n this.anchorDate.set(new Date(value.start.getFullYear(), value.start.getMonth(), 1))\n }\n }\n\n registerOnChange(fn: (value: DateRangeValue | null) => void): void {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled)\n }\n\n protected isRangeStartCap(date: Date): boolean {\n const bounds = this.previewBounds()\n return bounds !== null && isSameDay(date, bounds.lower)\n }\n\n protected isRangeEndCap(date: Date): boolean {\n const bounds = this.previewBounds()\n return bounds !== null && isSameDay(date, bounds.upper)\n }\n\n protected isInRange(date: Date): boolean {\n const bounds = this.previewBounds()\n return (\n bounds !== null &&\n date.getTime() > bounds.lower.getTime() &&\n date.getTime() < bounds.upper.getTime()\n )\n }\n\n protected isFocused(date: Date): boolean {\n return this.panel.isFocused(date)\n }\n\n protected cellId(date: Date): string {\n return this.panel.cellId(date)\n }\n\n protected toggleOpen(): void {\n if (this.isDisabled()) {\n return\n }\n this.panel.toggle(() => {\n const value = this.value()\n this.draftStart.set(value?.start ?? null)\n this.draftEnd.set(value?.end ?? null)\n this.hoveredDate.set(null)\n return value?.start ?? new Date()\n })\n }\n\n protected close(returnFocus: boolean): void {\n this.panel.close(returnFocus)\n }\n\n protected clear(event: Event): void {\n event.stopPropagation()\n if (this.isDisabled()) {\n return\n }\n this.value.set(null)\n this.draftStart.set(null)\n this.draftEnd.set(null)\n this.onChange(null)\n this.onTouched()\n this.panel.close(false)\n }\n\n protected selectDay(date: Date): void {\n if (this.isDisabled()) {\n return\n }\n const start = this.draftStart()\n const complete = start !== null && this.draftEnd() !== null\n if (!start || complete) {\n this.draftStart.set(date)\n this.draftEnd.set(null)\n this.focusedDate.set(date)\n this.panel.ensureVisible(date)\n this.panel.focusCellAfterRender()\n return\n }\n const [rangeStart, rangeEnd] = start.getTime() <= date.getTime() ? [start, date] : [date, start]\n this.draftStart.set(rangeStart)\n this.draftEnd.set(rangeEnd)\n this.focusedDate.set(date)\n this.panel.ensureVisible(date)\n const next: DateRangeValue = { start: rangeStart, end: rangeEnd }\n this.value.set(next)\n this.onChange(next)\n this.onTouched()\n this.panel.close(true)\n }\n\n protected onDayMouseEnter(date: Date): void {\n this.hoveredDate.set(date)\n }\n\n protected onDayMouseLeave(): void {\n this.hoveredDate.set(null)\n }\n\n protected shiftMonth(delta: number): void {\n this.panel.shiftMonth(delta)\n }\n\n protected onMonthSelect(value: string): void {\n this.panel.onMonthSelect(value)\n }\n\n protected onYearSelect(value: string): void {\n this.panel.onYearSelect(value)\n }\n\n protected onGridKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n this.selectDay(this.focusedDate())\n return\n }\n this.panel.handleNavigationKeydown(event)\n }\n\n protected onEscape(event: KeyboardEvent): void {\n this.panel.onEscape(event)\n }\n\n protected handleClickOutside(event: MouseEvent): void {\n this.panel.handleClickOutside(event)\n }\n\n constructor() {\n followPageScroll(() => this.updatePanelPosition())\n }\n\n protected updatePanelPosition(): void {\n this.panel.updatePanelPosition()\n }\n}\n","<div class=\"gbt-date-range-picker\">\n @if (label()) {\n <label [for]=\"id()\" class=\"gbt-date-range-picker__label\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n <div class=\"gbt-date-range-picker__field\">\n <button\n type=\"button\"\n [id]=\"id()\"\n class=\"gbt-date-range-picker__trigger\"\n [class.gbt-date-range-picker__trigger--open]=\"open()\"\n [disabled]=\"isDisabled()\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (click)=\"toggleOpen()\"\n >\n <span\n class=\"gbt-date-range-picker__trigger-label\"\n [class.gbt-date-range-picker__trigger-label--placeholder]=\"!triggerLabel()\"\n >\n {{ triggerLabel() || placeholder() }}\n </span>\n </button>\n @if (showClear()) {\n <button\n type=\"button\"\n class=\"gbt-date-range-picker__clear\"\n [attr.aria-label]=\"clearLabel()\"\n (click)=\"clear($event)\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n } @else {\n <gbt-icon name=\"calendar\" class=\"gbt-date-range-picker__icon\" aria-hidden=\"true\" />\n }\n </div>\n @if (open() && panelStyle(); as pos) {\n <div\n class=\"gbt-date-range-picker__panel\"\n role=\"dialog\"\n aria-modal=\"false\"\n [attr.aria-label]=\"panelLabel()\"\n [style.top]=\"pos.top\"\n [style.left]=\"pos.left\"\n >\n <div class=\"gbt-date-range-picker__nav\">\n <button\n type=\"button\"\n class=\"gbt-date-range-picker__nav-button\"\n [attr.aria-label]=\"previousMonthLabel()\"\n (click)=\"shiftMonth(-1)\"\n >\n <gbt-icon name=\"chevron-left\" aria-hidden=\"true\" />\n </button>\n <div class=\"gbt-date-range-picker__headings\">\n @for (view of monthViews(); track view.year + '-' + view.month; let i = $index) {\n <div class=\"gbt-date-range-picker__month-heading\">\n @if (i === 0) {\n <select\n #monthSelect\n class=\"gbt-date-range-picker__select\"\n [attr.aria-label]=\"monthSelectLabel()\"\n (change)=\"onMonthSelect(monthSelect.value)\"\n >\n @for (opt of monthOptions(); track opt.value) {\n <option [value]=\"opt.value\" [selected]=\"opt.value === anchorDate().getMonth()\">\n {{ opt.label }}\n </option>\n }\n </select>\n <select\n #yearSelect\n class=\"gbt-date-range-picker__select\"\n [attr.aria-label]=\"yearSelectLabel()\"\n (change)=\"onYearSelect(yearSelect.value)\"\n >\n @for (year of yearOptions(); track year) {\n <option [value]=\"year\" [selected]=\"year === anchorDate().getFullYear()\">\n {{ year }}\n </option>\n }\n </select>\n } @else {\n <span class=\"gbt-date-range-picker__month-label\">{{ view.label }}</span>\n }\n </div>\n }\n </div>\n <button\n type=\"button\"\n class=\"gbt-date-range-picker__nav-button\"\n [attr.aria-label]=\"nextMonthLabel()\"\n (click)=\"shiftMonth(1)\"\n >\n <gbt-icon name=\"chevron-right\" aria-hidden=\"true\" />\n </button>\n </div>\n <div class=\"gbt-date-range-picker__months\">\n @for (view of monthViews(); track view.year + '-' + view.month) {\n <div class=\"gbt-date-range-picker__month\">\n <div\n class=\"gbt-date-range-picker__grid\"\n role=\"grid\"\n tabindex=\"-1\"\n [attr.aria-label]=\"view.label\"\n (keydown)=\"onGridKeydown($event)\"\n >\n <div class=\"gbt-date-range-picker__row gbt-date-range-picker__row--head\" role=\"row\">\n @for (wd of weekdayLabels(); track $index) {\n <span role=\"columnheader\" class=\"gbt-date-range-picker__weekday\">{{ wd }}</span>\n }\n </div>\n @for (week of view.weeks; track $index) {\n <div class=\"gbt-date-range-picker__row\" role=\"row\">\n @for (day of week; track day.date.getTime()) {\n @if (day.inCurrentMonth) {\n <button\n type=\"button\"\n role=\"gridcell\"\n class=\"gbt-date-range-picker__day\"\n [class.gbt-date-range-picker__day--today]=\"day.isToday\"\n [class.gbt-date-range-picker__day--start-cap]=\"isRangeStartCap(day.date)\"\n [class.gbt-date-range-picker__day--end-cap]=\"isRangeEndCap(day.date)\"\n [class.gbt-date-range-picker__day--in-range]=\"isInRange(day.date)\"\n [class.gbt-date-range-picker__day--preview]=\"isPreviewing()\"\n [attr.data-date]=\"cellId(day.date)\"\n [attr.aria-current]=\"day.isToday ? 'date' : null\"\n [tabIndex]=\"isFocused(day.date) ? 0 : -1\"\n (click)=\"selectDay(day.date)\"\n (mouseenter)=\"onDayMouseEnter(day.date)\"\n (mouseleave)=\"onDayMouseLeave()\"\n >\n {{ day.date.getDate() }}\n </button>\n } @else {\n <span\n role=\"gridcell\"\n class=\"gbt-date-range-picker__day gbt-date-range-picker__day--empty\"\n ></span>\n }\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n <div class=\"gbt-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {{ statusMessage() }}\n </div>\n </div>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-date-range-picker__error\" role=\"alert\">\n {{ errorMessage() }}\n </p>\n }\n</div>\n"],"mappings":";;;;;AAQA,SAAgB,UAAU,GAAS,GAAO;CACxC,OACE,EAAE,YAAW,MAAO,EAAE,YAAW,KACjC,EAAE,SAAQ,MAAO,EAAE,SAAQ,KAC3B,EAAE,QAAO,MAAO,EAAE,QAAO;AAE7B;AAEA,SAAgB,UAAU,MAAY,OAAa;CACjD,MAAM,MAAM,KAAK,QAAO;CACxB,MAAM,gBAAgB,IAAI,KAAK,KAAK,YAAW,GAAI,KAAK,SAAQ,IAAK,OAAO,CAAC;CAC7E,MAAM,eAAe,IAAI,KACvB,cAAc,YAAW,GACzB,cAAc,SAAQ,IAAK,GAC3B,CAAC,CACF,CAAC,QAAO;CACT,OAAO,IAAI,KACT,cAAc,YAAW,GACzB,cAAc,SAAQ,GACtB,KAAK,IAAI,KAAK,YAAY,CAAC;AAE/B;AAEA,SAAgB,SAAS,MAAY,OAAa;CAChD,OAAO,UAAU,MAAM,QAAQ,EAAE;AACnC;AAEA,SAAgB,UAAU,MAAY,OAAa;CACjD,OAAO,IAAI,KAAK,KAAK,YAAW,GAAI,KAAK,SAAQ,GAAI,KAAK,QAAO,IAAK,KAAK;AAC7E;AAEA,SAAgB,YAAY,MAAY,cAA0B;CAEhE,MAAM,QADU,KAAK,OACP,IAAU,eAAe,KAAK;CAC5C,MAAM,SAAS,IAAI,KAAK,KAAK,YAAW,GAAI,KAAK,SAAQ,GAAI,KAAK,QAAO,CAAE;CAC3E,OAAO,QAAQ,OAAO,QAAO,IAAK,IAAI;CACtC,OAAO;AACT;AAEA,SAAgB,UAAU,MAAY,cAA0B;CAC9D,MAAM,QAAQ,YAAY,MAAM,YAAY;CAC5C,MAAM,QAAQ,MAAM,QAAO,IAAK,CAAC;CACjC,OAAO;AACT;AAEA,SAAgB,kBAC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AAI,SACP,CAAC,IAAI;GAAC,iBAGE,wBAAwB;GAAM,MACzC;IACJ,oBAAoB;IACpB,aAAa;IACb,mBAAmB;GACpB;GAAA,WACU,CACT;IACE,SAAS;IACT,aAAa,iBAAgB,eAAgB;IAC7C,OAAO;GACR,CACF;GAAA,UAAA;GAAA,QAAA,CAAA,szLAAA;EAAA,CAAA"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, TemplateRef, input } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
var DescriptionList = class DescriptionList {
|
|
5
|
+
items = input.required(...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
6
|
+
layout = input("stacked", ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
7
|
+
valueAlign = input("start", ...ngDevMode ? [{ debugName: "valueAlign" }] : /* istanbul ignore next */ []);
|
|
8
|
+
responsive = input("viewport", ...ngDevMode ? [{ debugName: "responsive" }] : /* istanbul ignore next */ []);
|
|
9
|
+
isTemplate(value) {
|
|
10
|
+
return value instanceof TemplateRef;
|
|
11
|
+
}
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
13
|
+
minVersion: "12.0.0",
|
|
14
|
+
version: "22.2.0",
|
|
15
|
+
ngImport: i0,
|
|
16
|
+
type: DescriptionList,
|
|
17
|
+
deps: [],
|
|
18
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
19
|
+
});
|
|
20
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
21
|
+
minVersion: "17.0.0",
|
|
22
|
+
version: "22.2.0",
|
|
23
|
+
type: DescriptionList,
|
|
24
|
+
isStandalone: true,
|
|
25
|
+
selector: "gbt-description-list",
|
|
26
|
+
inputs: {
|
|
27
|
+
items: {
|
|
28
|
+
classPropertyName: "items",
|
|
29
|
+
publicName: "items",
|
|
30
|
+
isSignal: true,
|
|
31
|
+
isRequired: true,
|
|
32
|
+
transformFunction: null
|
|
33
|
+
},
|
|
34
|
+
layout: {
|
|
35
|
+
classPropertyName: "layout",
|
|
36
|
+
publicName: "layout",
|
|
37
|
+
isSignal: true,
|
|
38
|
+
isRequired: false,
|
|
39
|
+
transformFunction: null
|
|
40
|
+
},
|
|
41
|
+
valueAlign: {
|
|
42
|
+
classPropertyName: "valueAlign",
|
|
43
|
+
publicName: "valueAlign",
|
|
44
|
+
isSignal: true,
|
|
45
|
+
isRequired: false,
|
|
46
|
+
transformFunction: null
|
|
47
|
+
},
|
|
48
|
+
responsive: {
|
|
49
|
+
classPropertyName: "responsive",
|
|
50
|
+
publicName: "responsive",
|
|
51
|
+
isSignal: true,
|
|
52
|
+
isRequired: false,
|
|
53
|
+
transformFunction: null
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
host: { properties: { "attr.data-responsive": "responsive() === 'container' ? 'container' : null" } },
|
|
57
|
+
ngImport: i0,
|
|
58
|
+
template: "<dl\n class=\"gbt-description-list\"\n [attr.data-layout]=\"layout()\"\n [attr.data-value-align]=\"valueAlign() === 'end' ? 'end' : null\"\n [attr.data-responsive]=\"responsive() === 'container' ? 'container' : null\"\n>\n @for (item of items(); track $index) {\n <dt class=\"gbt-description-list__term\">{{ item.term }}</dt>\n <dd class=\"gbt-description-list__value\">\n @if (isTemplate(item.value)) {\n <ng-container [ngTemplateOutlet]=\"item.value\"></ng-container>\n } @else {\n {{ item.value }}\n }\n </dd>\n }\n</dl>\n",
|
|
59
|
+
styles: ["@supports (container-type: inline-size){:host([data-responsive=container]){display:block;container-type:inline-size}}.gbt-description-list{margin:0}.gbt-description-list[data-layout=stacked]{display:block}.gbt-description-list[data-layout=inline]{display:grid;grid-template-columns:max-content 1fr;column-gap:1rem;row-gap:.5rem;align-items:baseline}@media(max-width:768px){.gbt-description-list[data-layout=inline]{display:block}}.gbt-description-list__term{margin:0;font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-description-list__value{margin:0 0 1rem;color:var(--text-primary);font-size:.875rem}.gbt-description-list[data-layout=inline] .gbt-description-list__value{margin-bottom:0}@media(max-width:768px){.gbt-description-list[data-layout=inline] .gbt-description-list__value{margin-bottom:1rem}}.gbt-description-list[data-value-align=end] .gbt-description-list__value{text-align:end}@media(max-width:768px){.gbt-description-list[data-layout=inline][data-value-align=end]:not([data-responsive=container]) .gbt-description-list__value{text-align:start}.gbt-description-list[data-layout=inline][data-responsive=container]{display:grid}.gbt-description-list[data-layout=inline][data-responsive=container] .gbt-description-list__value{margin-bottom:0}}@container (max-width: 30rem){.gbt-description-list[data-layout=inline][data-responsive=container]{display:block}.gbt-description-list[data-layout=inline][data-responsive=container] .gbt-description-list__value{margin-bottom:1rem}.gbt-description-list[data-layout=inline][data-responsive=container][data-value-align=end] .gbt-description-list__value{text-align:start}}\n"],
|
|
60
|
+
dependencies: [{
|
|
61
|
+
kind: "directive",
|
|
62
|
+
type: NgTemplateOutlet,
|
|
63
|
+
selector: "[ngTemplateOutlet]",
|
|
64
|
+
inputs: [
|
|
65
|
+
"ngTemplateOutletContext",
|
|
66
|
+
"ngTemplateOutlet",
|
|
67
|
+
"ngTemplateOutletInjector"
|
|
68
|
+
]
|
|
69
|
+
}],
|
|
70
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
74
|
+
minVersion: "12.0.0",
|
|
75
|
+
version: "22.2.0",
|
|
76
|
+
ngImport: i0,
|
|
77
|
+
type: DescriptionList,
|
|
78
|
+
decorators: [{
|
|
79
|
+
type: Component,
|
|
80
|
+
args: [{
|
|
81
|
+
selector: "gbt-description-list",
|
|
82
|
+
standalone: true,
|
|
83
|
+
imports: [NgTemplateOutlet],
|
|
84
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
85
|
+
host: { "[attr.data-responsive]": "responsive() === 'container' ? 'container' : null" },
|
|
86
|
+
template: "<dl\n class=\"gbt-description-list\"\n [attr.data-layout]=\"layout()\"\n [attr.data-value-align]=\"valueAlign() === 'end' ? 'end' : null\"\n [attr.data-responsive]=\"responsive() === 'container' ? 'container' : null\"\n>\n @for (item of items(); track $index) {\n <dt class=\"gbt-description-list__term\">{{ item.term }}</dt>\n <dd class=\"gbt-description-list__value\">\n @if (isTemplate(item.value)) {\n <ng-container [ngTemplateOutlet]=\"item.value\"></ng-container>\n } @else {\n {{ item.value }}\n }\n </dd>\n }\n</dl>\n",
|
|
87
|
+
styles: ["@supports (container-type: inline-size){:host([data-responsive=container]){display:block;container-type:inline-size}}.gbt-description-list{margin:0}.gbt-description-list[data-layout=stacked]{display:block}.gbt-description-list[data-layout=inline]{display:grid;grid-template-columns:max-content 1fr;column-gap:1rem;row-gap:.5rem;align-items:baseline}@media(max-width:768px){.gbt-description-list[data-layout=inline]{display:block}}.gbt-description-list__term{margin:0;font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-description-list__value{margin:0 0 1rem;color:var(--text-primary);font-size:.875rem}.gbt-description-list[data-layout=inline] .gbt-description-list__value{margin-bottom:0}@media(max-width:768px){.gbt-description-list[data-layout=inline] .gbt-description-list__value{margin-bottom:1rem}}.gbt-description-list[data-value-align=end] .gbt-description-list__value{text-align:end}@media(max-width:768px){.gbt-description-list[data-layout=inline][data-value-align=end]:not([data-responsive=container]) .gbt-description-list__value{text-align:start}.gbt-description-list[data-layout=inline][data-responsive=container]{display:grid}.gbt-description-list[data-layout=inline][data-responsive=container] .gbt-description-list__value{margin-bottom:0}}@container (max-width: 30rem){.gbt-description-list[data-layout=inline][data-responsive=container]{display:block}.gbt-description-list[data-layout=inline][data-responsive=container] .gbt-description-list__value{margin-bottom:1rem}.gbt-description-list[data-layout=inline][data-responsive=container][data-value-align=end] .gbt-description-list__value{text-align:start}}\n"]
|
|
88
|
+
}]
|
|
89
|
+
}],
|
|
90
|
+
propDecorators: {
|
|
91
|
+
items: [{
|
|
92
|
+
type: i0.Input,
|
|
93
|
+
args: [{
|
|
94
|
+
isSignal: true,
|
|
95
|
+
alias: "items",
|
|
96
|
+
required: true
|
|
97
|
+
}]
|
|
98
|
+
}],
|
|
99
|
+
layout: [{
|
|
100
|
+
type: i0.Input,
|
|
101
|
+
args: [{
|
|
102
|
+
isSignal: true,
|
|
103
|
+
alias: "layout",
|
|
104
|
+
required: false
|
|
105
|
+
}]
|
|
106
|
+
}],
|
|
107
|
+
valueAlign: [{
|
|
108
|
+
type: i0.Input,
|
|
109
|
+
args: [{
|
|
110
|
+
isSignal: true,
|
|
111
|
+
alias: "valueAlign",
|
|
112
|
+
required: false
|
|
113
|
+
}]
|
|
114
|
+
}],
|
|
115
|
+
responsive: [{
|
|
116
|
+
type: i0.Input,
|
|
117
|
+
args: [{
|
|
118
|
+
isSignal: true,
|
|
119
|
+
alias: "responsive",
|
|
120
|
+
required: false
|
|
121
|
+
}]
|
|
122
|
+
}]
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
export { DescriptionList };
|
|
126
|
+
|
|
127
|
+
//# sourceMappingURL=masmarino-gabarit-description-list.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masmarino-gabarit-description-list.mjs","names":[],"sources":["../../../projects/gabarit/description-list/description-list.ts","../../../projects/gabarit/description-list/description-list.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, TemplateRef, input } from '@angular/core'\nimport { NgTemplateOutlet } from '@angular/common'\n\nexport type DescriptionListLayout = 'stacked' | 'inline'\nexport type DescriptionListValueAlign = 'start' | 'end'\nexport type DescriptionListResponsive = 'viewport' | 'container'\n\nexport interface DescriptionListEntry {\n term: string\n value: string | TemplateRef<unknown>\n}\n\n@Component({\n selector: 'gbt-description-list',\n standalone: true,\n imports: [NgTemplateOutlet],\n templateUrl: './description-list.html',\n styleUrl: './description-list.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-responsive]': \"responsive() === 'container' ? 'container' : null\",\n },\n})\nexport class DescriptionList {\n items = input.required<DescriptionListEntry[]>()\n layout = input<DescriptionListLayout>('stacked')\n valueAlign = input<DescriptionListValueAlign>('start')\n responsive = input<DescriptionListResponsive>('viewport')\n\n protected isTemplate(value: DescriptionListEntry['value']): value is TemplateRef<unknown> {\n return value instanceof TemplateRef\n }\n}\n","<dl\n class=\"gbt-description-list\"\n [attr.data-layout]=\"layout()\"\n [attr.data-value-align]=\"valueAlign() === 'end' ? 'end' : null\"\n [attr.data-responsive]=\"responsive() === 'container' ? 'container' : null\"\n>\n @for (item of items(); track $index) {\n <dt class=\"gbt-description-list__term\">{{ item.term }}</dt>\n <dd class=\"gbt-description-list__value\">\n @if (isTemplate(item.value)) {\n <ng-container [ngTemplateOutlet]=\"item.value\"></ng-container>\n } @else {\n {{ item.value }}\n }\n </dd>\n }\n</dl>\n"],"mappings":";;;AAuBA,IAAa,kBAAb,MAAa,gBAAe;CAC1B,QAAQ,MAAM,SAAkC,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChD,SAAS,MAA6B,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAChD,aAAa,MAAiC,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CACtD,aAAa,MAAiC,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAE/C,WAAW,OAAoC;EACvD,OAAO,iBAAiB;CAC1B;CARW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAe,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAf,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAe,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,QAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,YAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,YAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA,EAAA,YAAA,EAAA,wBAAA,oDAAA,EAAA;EAAA,UAAA;EAAA,UCvB5B;EAiBA,QAAA,CAAA,6mDAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MDFY;GAAgB,UAAA;GAAA,QAAA;IAAA;IAAA;IAAA;GAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAQf,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAe,YAAA,CAAA;EAX3B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAsB,YACpB;GAAI,SACP,CAAC,gBAAgB;GAAC,iBAGV,wBAAwB;GAAM,MACzC,EACJ,0BAA0B,oDAC3B;GAAA,UAAA;GAAA,QAAA,CAAA,6mDAAA;EAAA,CAAA"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input, signal } from "@angular/core";
|
|
3
|
+
import { ChartEmpty } from "@masmarino/gabarit/chart";
|
|
4
|
+
import { formatNumber } from "@masmarino/gabarit/format";
|
|
5
|
+
var DimensionCard = class DimensionCard {
|
|
6
|
+
rows = input.required(...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
7
|
+
caption = input.required(...ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []);
|
|
8
|
+
labelColumn = input.required(...ngDevMode ? [{ debugName: "labelColumn" }] : /* istanbul ignore next */ []);
|
|
9
|
+
valueColumn = input.required(...ngDevMode ? [{ debugName: "valueColumn" }] : /* istanbul ignore next */ []);
|
|
10
|
+
emptyMessage = input.required(...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
|
|
11
|
+
locale = input.required(...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
|
|
12
|
+
activeIndex = signal(null, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
13
|
+
renderedRows = computed(() => {
|
|
14
|
+
const rows = this.rows();
|
|
15
|
+
const maxValue = rows.reduce((max, row) => Math.max(max, row.value), 0);
|
|
16
|
+
return rows.map((row) => ({
|
|
17
|
+
label: row.label,
|
|
18
|
+
formattedValue: row.display ?? formatNumber(row.value, this.locale()),
|
|
19
|
+
part: maxValue <= 0 ? 0 : row.value / maxValue * 100
|
|
20
|
+
}));
|
|
21
|
+
}, ...ngDevMode ? [{ debugName: "renderedRows" }] : /* istanbul ignore next */ []);
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
23
|
+
minVersion: "12.0.0",
|
|
24
|
+
version: "22.2.0",
|
|
25
|
+
ngImport: i0,
|
|
26
|
+
type: DimensionCard,
|
|
27
|
+
deps: [],
|
|
28
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
29
|
+
});
|
|
30
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
31
|
+
minVersion: "17.0.0",
|
|
32
|
+
version: "22.2.0",
|
|
33
|
+
type: DimensionCard,
|
|
34
|
+
isStandalone: true,
|
|
35
|
+
selector: "gbt-dimension-card",
|
|
36
|
+
inputs: {
|
|
37
|
+
rows: {
|
|
38
|
+
classPropertyName: "rows",
|
|
39
|
+
publicName: "rows",
|
|
40
|
+
isSignal: true,
|
|
41
|
+
isRequired: true,
|
|
42
|
+
transformFunction: null
|
|
43
|
+
},
|
|
44
|
+
caption: {
|
|
45
|
+
classPropertyName: "caption",
|
|
46
|
+
publicName: "caption",
|
|
47
|
+
isSignal: true,
|
|
48
|
+
isRequired: true,
|
|
49
|
+
transformFunction: null
|
|
50
|
+
},
|
|
51
|
+
labelColumn: {
|
|
52
|
+
classPropertyName: "labelColumn",
|
|
53
|
+
publicName: "labelColumn",
|
|
54
|
+
isSignal: true,
|
|
55
|
+
isRequired: true,
|
|
56
|
+
transformFunction: null
|
|
57
|
+
},
|
|
58
|
+
valueColumn: {
|
|
59
|
+
classPropertyName: "valueColumn",
|
|
60
|
+
publicName: "valueColumn",
|
|
61
|
+
isSignal: true,
|
|
62
|
+
isRequired: true,
|
|
63
|
+
transformFunction: null
|
|
64
|
+
},
|
|
65
|
+
emptyMessage: {
|
|
66
|
+
classPropertyName: "emptyMessage",
|
|
67
|
+
publicName: "emptyMessage",
|
|
68
|
+
isSignal: true,
|
|
69
|
+
isRequired: true,
|
|
70
|
+
transformFunction: null
|
|
71
|
+
},
|
|
72
|
+
locale: {
|
|
73
|
+
classPropertyName: "locale",
|
|
74
|
+
publicName: "locale",
|
|
75
|
+
isSignal: true,
|
|
76
|
+
isRequired: true,
|
|
77
|
+
transformFunction: null
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
ngImport: i0,
|
|
81
|
+
template: "@if (rows().length > 0) {\n <table class=\"gbt-dimension-card\">\n <caption>\n {{\n caption()\n }}\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">{{ labelColumn() }}</th>\n <th scope=\"col\">{{ valueColumn() }}</th>\n </tr>\n </thead>\n <tbody>\n @for (row of renderedRows(); track $index) {\n <tr\n [attr.data-active]=\"$index === activeIndex() ? '' : null\"\n (mouseenter)=\"activeIndex.set($index)\"\n (mouseleave)=\"activeIndex.set(null)\"\n >\n <th scope=\"row\" class=\"gbt-dimension-card__cell\">\n <span\n class=\"gbt-dimension-card__bar\"\n [style.width.%]=\"row.part\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"gbt-dimension-card__label\">{{ row.label }}</span>\n </th>\n <td class=\"gbt-dimension-card__value\">{{ row.formattedValue }}</td>\n </tr>\n }\n </tbody>\n </table>\n} @else {\n <gbt-chart-empty [message]=\"emptyMessage()\" />\n}\n",
|
|
82
|
+
styles: [":host{display:block}.gbt-dimension-card{width:100%;border-collapse:collapse;font-size:.875rem}.gbt-dimension-card caption{margin-bottom:.5rem;color:var(--text-primary);font-weight:600;text-align:left}.gbt-dimension-card th,.gbt-dimension-card td{padding:.375rem .5rem;text-align:left;font-weight:400;color:var(--text-primary)}.gbt-dimension-card thead th{color:var(--text-secondary);font-size:.75rem}.gbt-dimension-card__cell{position:relative}.gbt-dimension-card__bar{position:absolute;inset:0 auto 0 0;background:var(--chart-series-3-base);opacity:.16;border-radius:var(--site-border-radius)}.gbt-dimension-card__label,.gbt-dimension-card__value{position:relative}.gbt-dimension-card__value{text-align:right;font-variant-numeric:tabular-nums}.gbt-dimension-card tbody tr[data-active]{background:var(--bg-hover)}\n"],
|
|
83
|
+
dependencies: [{
|
|
84
|
+
kind: "component",
|
|
85
|
+
type: ChartEmpty,
|
|
86
|
+
selector: "gbt-chart-empty",
|
|
87
|
+
inputs: ["message", "actionLabel"],
|
|
88
|
+
outputs: ["action"]
|
|
89
|
+
}],
|
|
90
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
94
|
+
minVersion: "12.0.0",
|
|
95
|
+
version: "22.2.0",
|
|
96
|
+
ngImport: i0,
|
|
97
|
+
type: DimensionCard,
|
|
98
|
+
decorators: [{
|
|
99
|
+
type: Component,
|
|
100
|
+
args: [{
|
|
101
|
+
selector: "gbt-dimension-card",
|
|
102
|
+
standalone: true,
|
|
103
|
+
imports: [ChartEmpty],
|
|
104
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
105
|
+
template: "@if (rows().length > 0) {\n <table class=\"gbt-dimension-card\">\n <caption>\n {{\n caption()\n }}\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">{{ labelColumn() }}</th>\n <th scope=\"col\">{{ valueColumn() }}</th>\n </tr>\n </thead>\n <tbody>\n @for (row of renderedRows(); track $index) {\n <tr\n [attr.data-active]=\"$index === activeIndex() ? '' : null\"\n (mouseenter)=\"activeIndex.set($index)\"\n (mouseleave)=\"activeIndex.set(null)\"\n >\n <th scope=\"row\" class=\"gbt-dimension-card__cell\">\n <span\n class=\"gbt-dimension-card__bar\"\n [style.width.%]=\"row.part\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"gbt-dimension-card__label\">{{ row.label }}</span>\n </th>\n <td class=\"gbt-dimension-card__value\">{{ row.formattedValue }}</td>\n </tr>\n }\n </tbody>\n </table>\n} @else {\n <gbt-chart-empty [message]=\"emptyMessage()\" />\n}\n",
|
|
106
|
+
styles: [":host{display:block}.gbt-dimension-card{width:100%;border-collapse:collapse;font-size:.875rem}.gbt-dimension-card caption{margin-bottom:.5rem;color:var(--text-primary);font-weight:600;text-align:left}.gbt-dimension-card th,.gbt-dimension-card td{padding:.375rem .5rem;text-align:left;font-weight:400;color:var(--text-primary)}.gbt-dimension-card thead th{color:var(--text-secondary);font-size:.75rem}.gbt-dimension-card__cell{position:relative}.gbt-dimension-card__bar{position:absolute;inset:0 auto 0 0;background:var(--chart-series-3-base);opacity:.16;border-radius:var(--site-border-radius)}.gbt-dimension-card__label,.gbt-dimension-card__value{position:relative}.gbt-dimension-card__value{text-align:right;font-variant-numeric:tabular-nums}.gbt-dimension-card tbody tr[data-active]{background:var(--bg-hover)}\n"]
|
|
107
|
+
}]
|
|
108
|
+
}],
|
|
109
|
+
propDecorators: {
|
|
110
|
+
rows: [{
|
|
111
|
+
type: i0.Input,
|
|
112
|
+
args: [{
|
|
113
|
+
isSignal: true,
|
|
114
|
+
alias: "rows",
|
|
115
|
+
required: true
|
|
116
|
+
}]
|
|
117
|
+
}],
|
|
118
|
+
caption: [{
|
|
119
|
+
type: i0.Input,
|
|
120
|
+
args: [{
|
|
121
|
+
isSignal: true,
|
|
122
|
+
alias: "caption",
|
|
123
|
+
required: true
|
|
124
|
+
}]
|
|
125
|
+
}],
|
|
126
|
+
labelColumn: [{
|
|
127
|
+
type: i0.Input,
|
|
128
|
+
args: [{
|
|
129
|
+
isSignal: true,
|
|
130
|
+
alias: "labelColumn",
|
|
131
|
+
required: true
|
|
132
|
+
}]
|
|
133
|
+
}],
|
|
134
|
+
valueColumn: [{
|
|
135
|
+
type: i0.Input,
|
|
136
|
+
args: [{
|
|
137
|
+
isSignal: true,
|
|
138
|
+
alias: "valueColumn",
|
|
139
|
+
required: true
|
|
140
|
+
}]
|
|
141
|
+
}],
|
|
142
|
+
emptyMessage: [{
|
|
143
|
+
type: i0.Input,
|
|
144
|
+
args: [{
|
|
145
|
+
isSignal: true,
|
|
146
|
+
alias: "emptyMessage",
|
|
147
|
+
required: true
|
|
148
|
+
}]
|
|
149
|
+
}],
|
|
150
|
+
locale: [{
|
|
151
|
+
type: i0.Input,
|
|
152
|
+
args: [{
|
|
153
|
+
isSignal: true,
|
|
154
|
+
alias: "locale",
|
|
155
|
+
required: true
|
|
156
|
+
}]
|
|
157
|
+
}]
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
export { DimensionCard };
|
|
161
|
+
|
|
162
|
+
//# sourceMappingURL=masmarino-gabarit-dimension-card.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masmarino-gabarit-dimension-card.mjs","names":[],"sources":["../../../projects/gabarit/dimension-card/dimension-card.ts","../../../projects/gabarit/dimension-card/dimension-card.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, signal } from '@angular/core'\nimport { ChartEmpty } from '@masmarino/gabarit/chart'\nimport { formatNumber } from '@masmarino/gabarit/format'\n\nexport interface DimensionRow {\n label: string\n value: number\n\n display?: string\n}\n\ninterface RenderedRow {\n label: string\n formattedValue: string\n\n part: number\n}\n\n@Component({\n selector: 'gbt-dimension-card',\n standalone: true,\n imports: [ChartEmpty],\n templateUrl: './dimension-card.html',\n styleUrl: './dimension-card.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DimensionCard {\n rows = input.required<DimensionRow[]>()\n caption = input.required<string>()\n labelColumn = input.required<string>()\n valueColumn = input.required<string>()\n emptyMessage = input.required<string>()\n locale = input.required<string>()\n\n protected readonly activeIndex = signal<number | null>(null)\n\n protected readonly renderedRows = computed<RenderedRow[]>(() => {\n const rows = this.rows()\n const maxValue = rows.reduce((max, row) => Math.max(max, row.value), 0)\n return rows.map((row) => ({\n label: row.label,\n formattedValue: row.display ?? formatNumber(row.value, this.locale()),\n\n part: maxValue <= 0 ? 0 : (row.value / maxValue) * 100,\n }))\n })\n}\n","@if (rows().length > 0) {\n <table class=\"gbt-dimension-card\">\n <caption>\n {{\n caption()\n }}\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">{{ labelColumn() }}</th>\n <th scope=\"col\">{{ valueColumn() }}</th>\n </tr>\n </thead>\n <tbody>\n @for (row of renderedRows(); track $index) {\n <tr\n [attr.data-active]=\"$index === activeIndex() ? '' : null\"\n (mouseenter)=\"activeIndex.set($index)\"\n (mouseleave)=\"activeIndex.set(null)\"\n >\n <th scope=\"row\" class=\"gbt-dimension-card__cell\">\n <span\n class=\"gbt-dimension-card__bar\"\n [style.width.%]=\"row.part\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"gbt-dimension-card__label\">{{ row.label }}</span>\n </th>\n <td class=\"gbt-dimension-card__value\">{{ row.formattedValue }}</td>\n </tr>\n }\n </tbody>\n </table>\n} @else {\n <gbt-chart-empty [message]=\"emptyMessage()\" />\n}\n"],"mappings":";;;;AA0BA,IAAa,gBAAb,MAAa,cAAa;CACxB,OAAO,MAAM,SAA0B,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACvC,UAAU,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAA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GAAA,aAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,aAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,cAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,QAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,UAAA;EAAA,UC1B1B;EAoCA,QAAA,CAAA,izBAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MDfY;GAAU,UAAA;GAAA,QAAA,CAAA,WAAA,aAAA;GAAA,SAAA,CAAA,QAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAKT,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAa,YAAA,CAAA;EARzB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAoB,YAClB;GAAI,SACP,CAAC,UAAU;GAAC,iBAGJ,wBAAwB;GAAM,UAAA;GAAA,QAAA,CAAA,izBAAA;EAAA,CAAA"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, input, model } from "@angular/core";
|
|
4
|
+
import { Icon } from "@masmarino/gabarit/icon";
|
|
5
|
+
let nextDisclosureId = 0;
|
|
6
|
+
var Disclosure = class Disclosure {
|
|
7
|
+
label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
8
|
+
open = model(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
9
|
+
icon = input(null, ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
|
|
10
|
+
appearance = input("bordered", ...ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []);
|
|
11
|
+
headingLevel = input(null, ...ngDevMode ? [{ debugName: "headingLevel" }] : /* istanbul ignore next */ []);
|
|
12
|
+
buttonId = `gbt-disclosure-${++nextDisclosureId}`;
|
|
13
|
+
panelId = `${this.buttonId}-panel`;
|
|
14
|
+
toggle() {
|
|
15
|
+
this.open.set(!this.open());
|
|
16
|
+
}
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
18
|
+
minVersion: "12.0.0",
|
|
19
|
+
version: "22.2.0",
|
|
20
|
+
ngImport: i0,
|
|
21
|
+
type: Disclosure,
|
|
22
|
+
deps: [],
|
|
23
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
24
|
+
});
|
|
25
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
26
|
+
minVersion: "17.0.0",
|
|
27
|
+
version: "22.2.0",
|
|
28
|
+
type: Disclosure,
|
|
29
|
+
isStandalone: true,
|
|
30
|
+
selector: "gbt-disclosure",
|
|
31
|
+
inputs: {
|
|
32
|
+
label: {
|
|
33
|
+
classPropertyName: "label",
|
|
34
|
+
publicName: "label",
|
|
35
|
+
isSignal: true,
|
|
36
|
+
isRequired: true,
|
|
37
|
+
transformFunction: null
|
|
38
|
+
},
|
|
39
|
+
open: {
|
|
40
|
+
classPropertyName: "open",
|
|
41
|
+
publicName: "open",
|
|
42
|
+
isSignal: true,
|
|
43
|
+
isRequired: false,
|
|
44
|
+
transformFunction: null
|
|
45
|
+
},
|
|
46
|
+
icon: {
|
|
47
|
+
classPropertyName: "icon",
|
|
48
|
+
publicName: "icon",
|
|
49
|
+
isSignal: true,
|
|
50
|
+
isRequired: false,
|
|
51
|
+
transformFunction: null
|
|
52
|
+
},
|
|
53
|
+
appearance: {
|
|
54
|
+
classPropertyName: "appearance",
|
|
55
|
+
publicName: "appearance",
|
|
56
|
+
isSignal: true,
|
|
57
|
+
isRequired: false,
|
|
58
|
+
transformFunction: null
|
|
59
|
+
},
|
|
60
|
+
headingLevel: {
|
|
61
|
+
classPropertyName: "headingLevel",
|
|
62
|
+
publicName: "headingLevel",
|
|
63
|
+
isSignal: true,
|
|
64
|
+
isRequired: false,
|
|
65
|
+
transformFunction: null
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
outputs: { open: "openChange" },
|
|
69
|
+
ngImport: i0,
|
|
70
|
+
template: "<div\n class=\"gbt-disclosure\"\n [attr.data-appearance]=\"appearance()\"\n [attr.data-open]=\"open() ? '' : null\"\n>\n @switch (headingLevel()) {\n @case (2) {\n <h2 class=\"gbt-disclosure__heading\"><ng-container *ngTemplateOutlet=\"toggleButton\" /></h2>\n }\n @case (3) {\n <h3 class=\"gbt-disclosure__heading\"><ng-container *ngTemplateOutlet=\"toggleButton\" /></h3>\n }\n @case (4) {\n <h4 class=\"gbt-disclosure__heading\"><ng-container *ngTemplateOutlet=\"toggleButton\" /></h4>\n }\n @case (5) {\n <h5 class=\"gbt-disclosure__heading\"><ng-container *ngTemplateOutlet=\"toggleButton\" /></h5>\n }\n @case (6) {\n <h6 class=\"gbt-disclosure__heading\"><ng-container *ngTemplateOutlet=\"toggleButton\" /></h6>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"toggleButton\" />\n }\n }\n <div\n class=\"gbt-disclosure__panel\"\n [id]=\"panelId\"\n [attr.data-open]=\"open() ? '' : null\"\n [attr.inert]=\"open() ? null : ''\"\n >\n <div class=\"gbt-disclosure__panel-inner\">\n <div class=\"gbt-disclosure__content\"><ng-content /></div>\n </div>\n </div>\n</div>\n\n<ng-template #toggleButton>\n <button\n type=\"button\"\n class=\"gbt-disclosure__toggle\"\n [id]=\"buttonId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"panelId\"\n (click)=\"toggle()\"\n >\n @if (icon(); as name) {\n <gbt-icon class=\"gbt-disclosure__icon\" [name]=\"name\" />\n }\n <span class=\"gbt-disclosure__label\">{{ label() }}</span>\n <gbt-icon class=\"gbt-disclosure__chevron\" name=\"chevron-down\" />\n </button>\n</ng-template>\n",
|
|
71
|
+
styles: [":host{display:block}.gbt-disclosure[data-appearance=bordered]{border:1px solid var(--gbt-card-border);border-radius:var(--site-border-radius-sm);background:var(--bg-principal)}.gbt-disclosure__heading{margin:0;font:inherit}.gbt-disclosure__toggle{box-sizing:border-box;display:flex;align-items:center;gap:.5rem;width:100%;min-height:2.5rem;padding:.5rem .875rem;border:0;border-radius:var(--site-border-radius-sm);background:none;color:var(--text-primary);font:inherit;font-size:.875rem;font-weight:600;line-height:1.25rem;text-align:left;cursor:pointer}.gbt-disclosure__toggle:hover{background:var(--bg-hover)}.gbt-disclosure__toggle:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:-2px}.gbt-disclosure[data-appearance=plain] .gbt-disclosure__toggle{width:auto;min-height:2rem;padding-inline:.5rem}.gbt-disclosure__icon{flex:none;color:var(--text-secondary)}.gbt-disclosure__label{flex:1 1 auto;min-width:0}.gbt-disclosure__chevron{flex:none;color:var(--text-secondary);transition:transform .2s cubic-bezier(.4,0,.2,1)}.gbt-disclosure[data-open] .gbt-disclosure__chevron{transform:rotate(180deg)}.gbt-disclosure__panel{display:grid;grid-template-rows:0fr;visibility:hidden;transition:grid-template-rows .2s cubic-bezier(.4,0,.2,1),visibility 0s linear .2s}.gbt-disclosure__panel[data-open]{grid-template-rows:1fr;visibility:visible;transition:grid-template-rows .2s cubic-bezier(.4,0,.2,1),visibility 0s}.gbt-disclosure__panel-inner{min-height:0;overflow:hidden}.gbt-disclosure__content{padding:.875rem}.gbt-disclosure[data-appearance=bordered] .gbt-disclosure__content{border-top:1px solid var(--gbt-hairline);border-radius:0 0 var(--site-border-radius-sm) var(--site-border-radius-sm);background:var(--bg-hover)}@media(prefers-reduced-motion:reduce){.gbt-disclosure__chevron,.gbt-disclosure__panel,.gbt-disclosure__panel[data-open]{transition:none}}\n"],
|
|
72
|
+
dependencies: [{
|
|
73
|
+
kind: "component",
|
|
74
|
+
type: Icon,
|
|
75
|
+
selector: "gbt-icon",
|
|
76
|
+
inputs: ["name"]
|
|
77
|
+
}, {
|
|
78
|
+
kind: "directive",
|
|
79
|
+
type: NgTemplateOutlet,
|
|
80
|
+
selector: "[ngTemplateOutlet]",
|
|
81
|
+
inputs: [
|
|
82
|
+
"ngTemplateOutletContext",
|
|
83
|
+
"ngTemplateOutlet",
|
|
84
|
+
"ngTemplateOutletInjector"
|
|
85
|
+
]
|
|
86
|
+
}],
|
|
87
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
91
|
+
minVersion: "12.0.0",
|
|
92
|
+
version: "22.2.0",
|
|
93
|
+
ngImport: i0,
|
|
94
|
+
type: Disclosure,
|
|
95
|
+
decorators: [{
|
|
96
|
+
type: Component,
|
|
97
|
+
args: [{
|
|
98
|
+
selector: "gbt-disclosure",
|
|
99
|
+
standalone: true,
|
|
100
|
+
imports: [Icon, NgTemplateOutlet],
|
|
101
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
102
|
+
template: "<div\n class=\"gbt-disclosure\"\n [attr.data-appearance]=\"appearance()\"\n [attr.data-open]=\"open() ? '' : null\"\n>\n @switch (headingLevel()) {\n @case (2) {\n <h2 class=\"gbt-disclosure__heading\"><ng-container *ngTemplateOutlet=\"toggleButton\" /></h2>\n }\n @case (3) {\n <h3 class=\"gbt-disclosure__heading\"><ng-container *ngTemplateOutlet=\"toggleButton\" /></h3>\n }\n @case (4) {\n <h4 class=\"gbt-disclosure__heading\"><ng-container *ngTemplateOutlet=\"toggleButton\" /></h4>\n }\n @case (5) {\n <h5 class=\"gbt-disclosure__heading\"><ng-container *ngTemplateOutlet=\"toggleButton\" /></h5>\n }\n @case (6) {\n <h6 class=\"gbt-disclosure__heading\"><ng-container *ngTemplateOutlet=\"toggleButton\" /></h6>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"toggleButton\" />\n }\n }\n <div\n class=\"gbt-disclosure__panel\"\n [id]=\"panelId\"\n [attr.data-open]=\"open() ? '' : null\"\n [attr.inert]=\"open() ? null : ''\"\n >\n <div class=\"gbt-disclosure__panel-inner\">\n <div class=\"gbt-disclosure__content\"><ng-content /></div>\n </div>\n </div>\n</div>\n\n<ng-template #toggleButton>\n <button\n type=\"button\"\n class=\"gbt-disclosure__toggle\"\n [id]=\"buttonId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"panelId\"\n (click)=\"toggle()\"\n >\n @if (icon(); as name) {\n <gbt-icon class=\"gbt-disclosure__icon\" [name]=\"name\" />\n }\n <span class=\"gbt-disclosure__label\">{{ label() }}</span>\n <gbt-icon class=\"gbt-disclosure__chevron\" name=\"chevron-down\" />\n </button>\n</ng-template>\n",
|
|
103
|
+
styles: [":host{display:block}.gbt-disclosure[data-appearance=bordered]{border:1px solid var(--gbt-card-border);border-radius:var(--site-border-radius-sm);background:var(--bg-principal)}.gbt-disclosure__heading{margin:0;font:inherit}.gbt-disclosure__toggle{box-sizing:border-box;display:flex;align-items:center;gap:.5rem;width:100%;min-height:2.5rem;padding:.5rem .875rem;border:0;border-radius:var(--site-border-radius-sm);background:none;color:var(--text-primary);font:inherit;font-size:.875rem;font-weight:600;line-height:1.25rem;text-align:left;cursor:pointer}.gbt-disclosure__toggle:hover{background:var(--bg-hover)}.gbt-disclosure__toggle:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:-2px}.gbt-disclosure[data-appearance=plain] .gbt-disclosure__toggle{width:auto;min-height:2rem;padding-inline:.5rem}.gbt-disclosure__icon{flex:none;color:var(--text-secondary)}.gbt-disclosure__label{flex:1 1 auto;min-width:0}.gbt-disclosure__chevron{flex:none;color:var(--text-secondary);transition:transform .2s cubic-bezier(.4,0,.2,1)}.gbt-disclosure[data-open] .gbt-disclosure__chevron{transform:rotate(180deg)}.gbt-disclosure__panel{display:grid;grid-template-rows:0fr;visibility:hidden;transition:grid-template-rows .2s cubic-bezier(.4,0,.2,1),visibility 0s linear .2s}.gbt-disclosure__panel[data-open]{grid-template-rows:1fr;visibility:visible;transition:grid-template-rows .2s cubic-bezier(.4,0,.2,1),visibility 0s}.gbt-disclosure__panel-inner{min-height:0;overflow:hidden}.gbt-disclosure__content{padding:.875rem}.gbt-disclosure[data-appearance=bordered] .gbt-disclosure__content{border-top:1px solid var(--gbt-hairline);border-radius:0 0 var(--site-border-radius-sm) var(--site-border-radius-sm);background:var(--bg-hover)}@media(prefers-reduced-motion:reduce){.gbt-disclosure__chevron,.gbt-disclosure__panel,.gbt-disclosure__panel[data-open]{transition:none}}\n"]
|
|
104
|
+
}]
|
|
105
|
+
}],
|
|
106
|
+
propDecorators: {
|
|
107
|
+
label: [{
|
|
108
|
+
type: i0.Input,
|
|
109
|
+
args: [{
|
|
110
|
+
isSignal: true,
|
|
111
|
+
alias: "label",
|
|
112
|
+
required: true
|
|
113
|
+
}]
|
|
114
|
+
}],
|
|
115
|
+
open: [{
|
|
116
|
+
type: i0.Input,
|
|
117
|
+
args: [{
|
|
118
|
+
isSignal: true,
|
|
119
|
+
alias: "open",
|
|
120
|
+
required: false
|
|
121
|
+
}]
|
|
122
|
+
}, {
|
|
123
|
+
type: i0.Output,
|
|
124
|
+
args: ["openChange"]
|
|
125
|
+
}],
|
|
126
|
+
icon: [{
|
|
127
|
+
type: i0.Input,
|
|
128
|
+
args: [{
|
|
129
|
+
isSignal: true,
|
|
130
|
+
alias: "icon",
|
|
131
|
+
required: false
|
|
132
|
+
}]
|
|
133
|
+
}],
|
|
134
|
+
appearance: [{
|
|
135
|
+
type: i0.Input,
|
|
136
|
+
args: [{
|
|
137
|
+
isSignal: true,
|
|
138
|
+
alias: "appearance",
|
|
139
|
+
required: false
|
|
140
|
+
}]
|
|
141
|
+
}],
|
|
142
|
+
headingLevel: [{
|
|
143
|
+
type: i0.Input,
|
|
144
|
+
args: [{
|
|
145
|
+
isSignal: true,
|
|
146
|
+
alias: "headingLevel",
|
|
147
|
+
required: false
|
|
148
|
+
}]
|
|
149
|
+
}]
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
export { Disclosure };
|
|
153
|
+
|
|
154
|
+
//# sourceMappingURL=masmarino-gabarit-disclosure.mjs.map
|