@ids-group-ltd/ids-design-system 0.13.3 → 0.13.4
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/CHANGELOG.md +846 -14
- package/components.md +552 -29
- package/design-system.md +9 -0
- package/docs/agent/INDEX.md +57 -15
- package/docs/agent/charts/chart-colour-which-palette-a-chart-takes.md +1 -1
- package/docs/agent/charts/column-series-component.md +8 -0
- package/docs/agent/charts/ds-bar-chart.md +6 -1
- package/docs/agent/charts/ds-chart-data-table.md +10 -0
- package/docs/agent/charts/ds-chart.md +8 -0
- package/docs/agent/charts/ds-column-chart.md +5 -1
- package/docs/agent/charts/ds-funnel-chart.md +5 -1
- package/docs/agent/charts/ds-heatmap-chart.md +20 -0
- package/docs/agent/charts/ds-line-chart.md +8 -4
- package/docs/agent/charts/{ds-donut-chart.md → ds-pie-chart.md} +10 -6
- package/docs/agent/charts/ds-scatter-chart.md +20 -0
- package/docs/agent/charts/ds-waterfall-chart.md +20 -0
- package/docs/agent/charts/line-series-component.md +8 -0
- package/docs/agent/charts/reference-label-component.md +8 -0
- package/docs/agent/charts/reference-line-component.md +8 -0
- package/docs/agent/charts/series-annotation-component.md +10 -0
- package/docs/agent/feedback/ds-alert.md +4 -0
- package/docs/agent/feedback/ds-avatar-group.md +4 -0
- package/docs/agent/feedback/ds-avatar.md +4 -0
- package/docs/agent/feedback/ds-badge.md +4 -0
- package/docs/agent/feedback/ds-banner.md +5 -1
- package/docs/agent/feedback/ds-bar.md +4 -0
- package/docs/agent/feedback/ds-description-item.md +8 -0
- package/docs/agent/feedback/ds-description-list.md +8 -0
- package/docs/agent/feedback/ds-empty-state.md +4 -0
- package/docs/agent/feedback/ds-list-item.md +8 -0
- package/docs/agent/feedback/ds-list.md +8 -0
- package/docs/agent/feedback/ds-loading-overlay.md +8 -0
- package/docs/agent/feedback/ds-skeleton.md +4 -0
- package/docs/agent/feedback/ds-spinner.md +4 -0
- package/docs/agent/feedback/ds-stat.md +4 -0
- package/docs/agent/feedback/ds-status-dot.md +4 -0
- package/docs/agent/feedback/ds-tag.md +4 -0
- package/docs/agent/feedback/ds-timeline-item.md +8 -0
- package/docs/agent/feedback/ds-toast-region.md +8 -0
- package/docs/agent/feedback/ds-toast.md +4 -0
- package/docs/agent/feedback/ds-tree.md +8 -0
- package/docs/agent/forms/ds-autocomplete.md +4 -0
- package/docs/agent/forms/ds-button-group.md +8 -0
- package/docs/agent/forms/ds-button.md +6 -2
- package/docs/agent/forms/ds-checkbox.md +4 -0
- package/docs/agent/forms/ds-color-picker.md +8 -0
- package/docs/agent/forms/ds-date-picker.md +5 -1
- package/docs/agent/forms/ds-dropzone.md +4 -0
- package/docs/agent/forms/ds-field-group.md +8 -0
- package/docs/agent/forms/ds-filter-bar.md +8 -0
- package/docs/agent/forms/ds-icon-button.md +4 -0
- package/docs/agent/forms/ds-input.md +13 -1
- package/docs/agent/forms/ds-multi-select.md +4 -0
- package/docs/agent/forms/ds-number-stepper.md +4 -0
- package/docs/agent/forms/ds-otp-input.md +8 -0
- package/docs/agent/forms/ds-password-rules.md +8 -0
- package/docs/agent/forms/ds-radio-group.md +8 -0
- package/docs/agent/forms/ds-radio.md +4 -0
- package/docs/agent/forms/ds-search.md +4 -0
- package/docs/agent/forms/ds-segmented.md +8 -0
- package/docs/agent/forms/ds-select.md +4 -0
- package/docs/agent/forms/ds-slider.md +8 -0
- package/docs/agent/forms/ds-split-button.md +8 -0
- package/docs/agent/forms/ds-switch.md +4 -0
- package/docs/agent/forms/ds-textarea.md +5 -1
- package/docs/agent/forms/ds-time-picker.md +8 -0
- package/docs/agent/forms/ds-toggle-button.md +8 -0
- package/docs/agent/forms/filter-item-directive.md +8 -0
- package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +4 -0
- package/docs/agent/navigation/ds-app-layout.md +6 -2
- package/docs/agent/navigation/ds-auth-layout.md +5 -1
- package/docs/agent/navigation/ds-breadcrumbs.md +4 -0
- package/docs/agent/navigation/ds-container.md +8 -0
- package/docs/agent/navigation/ds-divider.md +4 -0
- package/docs/agent/navigation/ds-inline.md +8 -0
- package/docs/agent/navigation/ds-page-footer.md +4 -0
- package/docs/agent/navigation/ds-page-header.md +5 -1
- package/docs/agent/navigation/ds-pagination.md +5 -1
- package/docs/agent/navigation/ds-sidenav-footer.md +8 -0
- package/docs/agent/navigation/ds-sidenav-group.md +4 -0
- package/docs/agent/navigation/ds-sidenav-item.md +4 -0
- package/docs/agent/navigation/ds-sidenav.md +4 -0
- package/docs/agent/navigation/ds-stack.md +8 -0
- package/docs/agent/navigation/ds-stepper.md +4 -0
- package/docs/agent/navigation/ds-tab.md +8 -0
- package/docs/agent/navigation/ds-tabs.md +5 -1
- package/docs/agent/overlays/ds-bottom-sheet.md +4 -0
- package/docs/agent/overlays/ds-drawer.md +4 -0
- package/docs/agent/overlays/ds-menu.md +4 -0
- package/docs/agent/overlays/ds-modal-card.md +4 -0
- package/docs/agent/overlays/ds-modal.md +4 -0
- package/docs/agent/overlays/ds-popover.md +4 -0
- package/docs/agent/overlays/ds-tooltip-panel.md +8 -0
- package/docs/agent/overlays/ds-tooltip.md +4 -0
- package/docs/agent/surfaces/ds-accordion-item.md +8 -0
- package/docs/agent/surfaces/ds-accordion.md +4 -0
- package/docs/agent/surfaces/ds-card.md +6 -2
- package/docs/agent/tables/ds-cell-template.md +8 -0
- package/docs/agent/tables/ds-table-columns.md +8 -0
- package/docs/agent/tables/ds-table-export.md +8 -0
- package/docs/agent/tables/ds-table.md +9 -2
- package/docs/agent/tables/header-filter-directive.md +8 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +10 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +19 -19
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +7 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +9 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +117 -27
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +7 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs +32 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +14 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +404 -55
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +8 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +27 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +5 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +23 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +20 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +217 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +181 -500
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +6 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +7 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +14 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +391 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +5 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +300 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +9 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +7 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +4 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +9 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +5 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +34 -21
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +252 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +271 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +7 -3
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.10.0.json +2 -2
- package/migrations/0.10.1.json +3 -3
- package/migrations/0.10.2.json +8 -28
- package/migrations/0.11.0.json +3 -3
- package/migrations/0.11.1.json +15 -15
- package/migrations/0.11.2.json +9 -9
- package/migrations/0.11.3.json +1 -1
- package/migrations/0.11.4.json +8 -8
- package/migrations/0.12.1.json +1 -1
- package/migrations/0.12.2.json +1 -1
- package/migrations/0.12.3.json +3 -3
- package/migrations/0.13.0.json +24 -32
- package/migrations/0.13.1.json +5 -5
- package/migrations/0.13.4.json +994 -0
- package/migrations/0.5.0.json +1 -1
- package/migrations/0.8.0.json +4 -3
- package/migrations/0.9.0.json +1 -1
- package/package.json +41 -9
- package/styles/_chart-frame.scss +16 -3
- package/styles/_check-box.scss +12 -12
- package/styles/_dropdown-overlay.scss +14 -10
- package/styles/_field-box.scss +3 -3
- package/styles/_field-label.scss +7 -7
- package/styles/_overlay-motion.scss +1 -1
- package/styles/_table-controls.scss +3 -3
- package/styles/_tokens-charts.scss +40 -7
- package/styles/_tokens.scss +2 -2
- package/styles/_typography.scss +101 -101
- package/themes/dark/_theme.scss +13 -0
- package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +5 -4
- package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +17 -17
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +4 -2
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +37 -4
- package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +8 -4
- package/types/ids-group-ltd-ids-design-system-components-chart-data-table.d.ts +31 -0
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +4 -0
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +230 -44
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +6 -2
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +9 -7
- package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +4 -4
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +5 -2
- package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +124 -0
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +85 -139
- package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +13 -1
- package/types/{ids-group-ltd-ids-design-system-components-donut-chart.d.ts → ids-group-ltd-ids-design-system-components-pie-chart.d.ts} +24 -19
- package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +183 -0
- package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +5 -1
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-table-export.d.ts +3 -0
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +11 -11
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +5 -2
- package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +116 -0
- package/types/ids-group-ltd-ids-design-system-components.d.ts +97 -4
- package/types/ids-group-ltd-ids-design-system-core.d.ts +30 -7
- package/types/ids-group-ltd-ids-design-system.d.ts +14 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +0 -382
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-bar.mjs","sources":["../../../src/lib/components/bar/bar.component.ts","../../../src/lib/components/bar/bar.component.html","../../../src/lib/components/bar/ids-group-ltd-ids-design-system-components-bar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n} from '@angular/core';\nimport type { BarSemantics, BarVariant } from './bar.types';\n\n/**\n * One horizontal track with one fill: a task's completion, or a measurement on a known scale.\n *\n * The two are the same drawing and a different claim, which is what `semantics` carries — the\n * platform splits them the same way, into `<progress>` and `<meter>`. Getting it wrong is not\n * cosmetic: a table of two hundred rates under `'progress'` announces two hundred progress bars.\n */\n@Component({\n selector: 'ds-bar',\n standalone: true,\n imports: [],\n templateUrl: './bar.component.html',\n styleUrl: './bar.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[attr.role]': 'role()',\n '[attr.aria-hidden]': \"semantics() === 'none' ? true : null\",\n '[attr.aria-valuemin]': 'role() ? 0 : null',\n '[attr.aria-valuemax]': 'role() ? scale() : null',\n '[attr.aria-valuenow]': 'role() && !isIndet() ? clampedValue() : null',\n '[attr.aria-label]': 'ariaLabel()',\n '[class.success]': \"variant() === 'success'\",\n '[class.warning]': \"variant() === 'warning'\",\n '[class.error]': \"variant() === 'error'\",\n '[class.indeterminate]': 'isIndet()',\n },\n})\nexport class BarComponent {\n /** The reading, in units of `max`; clamped, and ignored while `indeterminate`. */\n readonly value = input(0, { transform: numberAttribute });\n /** The full scale `value` and `target` are read against. Left at 100 they are percentages. Set\n * it to the real total — `[value]=\"37\" [max]=\"80\"` — and the accessible name carries \"37 of 80\"\n * rather than the 46% a caller would otherwise have to compute. For a column of measurements\n * it is usually the column's own largest value, so the longest bar fills its track and the rest\n * are its share. Zero or less falls back to 100, because a scale with no width has no fraction\n * to draw. */\n readonly max = input(100, { transform: numberAttribute });\n /** What the bar is, and therefore how it is announced. See `BarSemantics`. Defaults to\n * `'progress'`. */\n readonly semantics = input<BarSemantics>('progress');\n /** Colour role — drives the success/warning/error styling. */\n readonly variant = input<BarVariant>('default');\n /** Indeterminate (unknown-duration) animation instead of a fixed `value`. Only a task has an\n * unknown duration, so it is ignored unless `semantics` is `'progress'`. */\n readonly indeterminate = input(false, { transform: booleanAttribute });\n /** Overrides the fill for this one bar. A whole column is coloured once through\n * `--ds-bar-fill-color` instead; use this where the colour carries meaning on one row. */\n readonly color = input<string | null>(null);\n /** Accessible name (e.g. \"Upload progress\"). With a `target` set, name the comparison here —\n * the mark is drawn and the role has no second value to announce, so \"Resolved 62% against a\n * 75% target\" is what reaches a screen reader. Unused under `semantics=\"none\"`. */\n readonly ariaLabel = input<string | null>(null);\n /** A second point on the same scale as `value`, drawn as a hairline across the track — a goal,\n * a baseline or a threshold to read `value` against. Clamped like `value`, ignored while\n * `indeterminate`, and unset draws nothing. */\n readonly target = input<number | null>(null);\n\n protected readonly role = computed(() => {\n const semantics = this.semantics();\n\n return semantics === 'none'\n ? null\n : semantics === 'meter'\n ? 'meter'\n : 'progressbar';\n });\n\n protected readonly scale = computed(() => {\n const max = this.max();\n\n return Number.isFinite(max) && max > 0 ? max : 100;\n });\n\n protected readonly clampedValue = computed(() => {\n const value = this.value();\n\n return Number.isFinite(value)\n ? Math.max(0, Math.min(this.scale(), value))\n : 0;\n });\n\n /** Width and offset are percentages of the track whatever the scale is. */\n protected readonly valuePercent = computed(\n () => (this.clampedValue() / this.scale()) * 100,\n );\n\n protected readonly clampedTarget = computed(() => {\n const target = this.target();\n\n return target == null || !Number.isFinite(target)\n ? null\n : Math.max(0, Math.min(this.scale(), target));\n });\n\n protected readonly targetPercent = computed(() => {\n const target = this.clampedTarget();\n\n return target === null ? null : (target / this.scale()) * 100;\n });\n\n protected readonly isIndet = computed(\n () => this.indeterminate() && this.semantics() === 'progress',\n );\n}\n","@if (isIndet()) {\n <span></span>\n} @else {\n <span\n [style.width.%]=\"valuePercent()\"\n [style.background]=\"color()\">\n </span>\n\n @if (targetPercent() !== null) {\n <div\n class=\"target\"\n [style.left.%]=\"targetPercent()\">\n </div>\n }\n}\n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
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-bar.mjs","sources":["../../../src/lib/components/bar/bar.component.ts","../../../src/lib/components/bar/bar.component.html","../../../src/lib/components/bar/ids-group-ltd-ids-design-system-components-bar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n} from '@angular/core';\nimport type { BarSemantics, BarVariant } from './bar.types';\n\n/**\n * One horizontal track with one fill: a task's completion, or a measurement on a known scale.\n *\n * The two are the same drawing and a different claim, which is what `semantics` carries — the\n * platform splits them the same way, into `<progress>` and `<meter>`. Getting it wrong is not\n * cosmetic: a table of two hundred rates under `'progress'` announces two hundred progress bars.\n */\n@Component({\n selector: 'ds-bar',\n standalone: true,\n imports: [],\n templateUrl: './bar.component.html',\n styleUrl: './bar.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[attr.role]': 'role()',\n '[attr.aria-hidden]': \"semantics() === 'none' ? true : null\",\n '[attr.aria-valuemin]': 'role() ? 0 : null',\n '[attr.aria-valuemax]': 'role() ? scale() : null',\n '[attr.aria-valuenow]': 'role() && !isIndet() ? clampedValue() : null',\n '[attr.aria-label]': 'ariaLabel()',\n '[class.success]': \"variant() === 'success'\",\n '[class.warning]': \"variant() === 'warning'\",\n '[class.error]': \"variant() === 'error'\",\n '[class.indeterminate]': 'isIndet()',\n },\n})\nexport class BarComponent {\n /** The reading, in units of `max`; clamped, and ignored while `indeterminate`. */\n readonly value = input(0, { transform: numberAttribute });\n /** The full scale `value` and `target` are read against. Left at 100 they are percentages. Set\n * it to the real total — `[value]=\"37\" [max]=\"80\"` — and the accessible name carries \"37 of 80\"\n * rather than the 46% a caller would otherwise have to compute. For a column of measurements\n * it is usually the column's own largest value, so the longest bar fills its track and the rest\n * are its share. Zero or less falls back to 100, because a scale with no width has no fraction\n * to draw. */\n readonly max = input(100, { transform: numberAttribute });\n /** What the bar is, and therefore how it is announced. See `BarSemantics`. Defaults to\n * `'progress'`. */\n readonly semantics = input<BarSemantics>('progress');\n /** Colour role — drives the success/warning/error styling. */\n readonly variant = input<BarVariant>('default');\n /** Indeterminate (unknown-duration) animation instead of a fixed `value`. Only a task has an\n * unknown duration, so it is ignored unless `semantics` is `'progress'`. */\n readonly indeterminate = input(false, { transform: booleanAttribute });\n /** Overrides the fill for this one bar. A whole column is coloured once through\n * `--ds-bar-fill-color` instead; use this where the colour carries meaning on one row. */\n readonly color = input<string | null>(null);\n /** Accessible name (e.g. \"Upload progress\"). With a `target` set, name the comparison here —\n * the mark is drawn and the role has no second value to announce, so \"Resolved 62% against a\n * 75% target\" is what reaches a screen reader. Unused under `semantics=\"none\"`. */\n readonly ariaLabel = input<string | null>(null);\n /** A second point on the same scale as `value`, drawn as a hairline across the track — a goal,\n * a baseline or a threshold to read `value` against. Clamped like `value`, ignored while\n * `indeterminate`, and unset draws nothing. */\n readonly target = input<number | null>(null);\n\n protected readonly role = computed(() => {\n const semantics = this.semantics();\n\n return semantics === 'none'\n ? null\n : semantics === 'meter'\n ? 'meter'\n : 'progressbar';\n });\n\n protected readonly scale = computed(() => {\n const max = this.max();\n\n return Number.isFinite(max) && max > 0 ? max : 100;\n });\n\n protected readonly clampedValue = computed(() => {\n const value = this.value();\n\n return Number.isFinite(value)\n ? Math.max(0, Math.min(this.scale(), value))\n : 0;\n });\n\n /** Width and offset are percentages of the track whatever the scale is. */\n protected readonly valuePercent = computed(\n () => (this.clampedValue() / this.scale()) * 100,\n );\n\n protected readonly clampedTarget = computed(() => {\n const target = this.target();\n\n return target == null || !Number.isFinite(target)\n ? null\n : Math.max(0, Math.min(this.scale(), target));\n });\n\n protected readonly targetPercent = computed(() => {\n const target = this.clampedTarget();\n\n return target === null ? null : (target / this.scale()) * 100;\n });\n\n protected readonly isIndet = computed(\n () => this.indeterminate() && this.semantics() === 'progress',\n );\n}\n","@if (isIndet()) {\n <span></span>\n} @else {\n <span\n [style.width.%]=\"valuePercent()\"\n [style.background]=\"color()\">\n </span>\n\n @if (targetPercent() !== null) {\n <div\n class=\"target\"\n [style.left.%]=\"targetPercent()\">\n </div>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAWA;;;;;;AAMG;MAsBU,YAAY,CAAA;;IAEd,KAAK,GAAG,KAAK,CAAC,CAAC,6EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AACzD;;;;;AAKe;IACN,GAAG,GAAG,KAAK,CAAC,GAAG,2EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AACzD;AACoB;AACX,IAAA,SAAS,GAAG,KAAK,CAAe,UAAU,gFAAC;;AAE3C,IAAA,OAAO,GAAG,KAAK,CAAa,SAAS,8EAAC;AAC/C;AAC6E;IACpE,aAAa,GAAG,KAAK,CAAC,KAAK,qFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACtE;AAC2F;AAClF,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;AAC3C;;AAEoF;AAC3E,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;AAC/C;;AAEgD;AACvC,IAAA,MAAM,GAAG,KAAK,CAAgB,IAAI,6EAAC;AAEzB,IAAA,IAAI,GAAG,QAAQ,CAAC,MAAK;AACtC,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE;QAElC,OAAO,SAAS,KAAK;AACnB,cAAE;cACA,SAAS,KAAK;AACd,kBAAE;kBACA,aAAa;AACrB,IAAA,CAAC,2EAAC;AAEiB,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAK;AACvC,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;AAEtB,QAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG;AACpD,IAAA,CAAC,4EAAC;AAEiB,IAAA,YAAY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,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,YAAY,shDCvCzB,yRAeA,EAAA,MAAA,EAAA,CAAA,orDAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDwBa,YAAY,EAAA,UAAA,EAAA,CAAA;kBArBxB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,QAAQ,EAAA,UAAA,EACN,IAAI,EAAA,OAAA,EACP,EAAE,EAAA,eAAA,EAGM,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,oBAAoB,EAAE,sCAAsC;AAC5D,wBAAA,sBAAsB,EAAE,mBAAmB;AAC3C,wBAAA,sBAAsB,EAAE,yBAAyB;AACjD,wBAAA,sBAAsB,EAAE,8CAA8C;AACtE,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,iBAAiB,EAAE,yBAAyB;AAC5C,wBAAA,iBAAiB,EAAE,yBAAyB;AAC5C,wBAAA,eAAe,EAAE,uBAAuB;AACxC,wBAAA,uBAAuB,EAAE,WAAW;AACrC,qBAAA,EAAA,QAAA,EAAA,yRAAA,EAAA,MAAA,EAAA,CAAA,orDAAA,CAAA,EAAA;;;AErCH;;AAEG;;;;"}
|
|
@@ -9,7 +9,7 @@ let nextId = 0;
|
|
|
9
9
|
/** Bottom-anchored sheet — the mobile sibling of ds-drawer. Closes on scrim
|
|
10
10
|
* tap, Escape, or a downward drag on the grab strip. While open it locks
|
|
11
11
|
* body scroll. On wide viewports the panel is capped by
|
|
12
|
-
* --ds-bottom-sheet-
|
|
12
|
+
* --ds-bottom-sheet-max-width and centred; prefer ds-modal / ds-drawer for
|
|
13
13
|
* desktop-first layouts. position: fixed resolves against the nearest
|
|
14
14
|
* ancestor containing block, so framed hosts contain the sheet. */
|
|
15
15
|
class BottomSheetComponent {
|
|
@@ -189,11 +189,11 @@ class BottomSheetComponent {
|
|
|
189
189
|
this.activeSnapIndex.set(nearestIndex);
|
|
190
190
|
}
|
|
191
191
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BottomSheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
192
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BottomSheetComponent, isStandalone: true, selector: "ds-bottom-sheet", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, snapPoints: { classPropertyName: "snapPoints", publicName: "snapPoints", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, host: { properties: { "attr.title": "null" } }, viewQueries: [{ propertyName: "sheetRef", first: true, predicate: ["sheet"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\">\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\">\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\">\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\">\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_bottom-sheet-
|
|
192
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BottomSheetComponent, isStandalone: true, selector: "ds-bottom-sheet", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, snapPoints: { classPropertyName: "snapPoints", publicName: "snapPoints", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, host: { properties: { "attr.title": "null" } }, viewQueries: [{ propertyName: "sheetRef", first: true, predicate: ["sheet"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\">\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\">\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\">\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\">\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_bottom-sheet-max-width: var(--ds-bottom-sheet-max-width, 480px);--_bottom-sheet-max-height: var(--ds-bottom-sheet-max-height, 80%);--_bottom-sheet-radius: var(--ds-bottom-sheet-radius, var(--ds-radius-panel));--_bottom-sheet-bg-color: var(--ds-bottom-sheet-bg-color, var(--surface-default));--_bottom-sheet-scrim-color: var(--ds-bottom-sheet-scrim-color, var(--surface-scrim));--_bottom-sheet-title-text-color: var(--ds-bottom-sheet-title-text-color, var(--text-primary));--_bottom-sheet-enter-keyframes: var(--ds-bottom-sheet-enter-keyframes, ds-slide-edge-in);--_bottom-sheet-leave-keyframes: var(--ds-bottom-sheet-leave-keyframes, ds-slide-edge-out);--_bottom-sheet-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-surface-duration));--_bottom-sheet-enter-easing: var(--ds-bottom-sheet-enter-easing, var(--ds-motion-enter-surface-easing));--_bottom-sheet-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-large-duration));--_bottom-sheet-leave-easing: var(--ds-bottom-sheet-leave-easing, var(--ds-motion-exit-large-easing));--_bottom-sheet-scrim-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-panel-duration));--_bottom-sheet-scrim-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-duration));--_ds-enter-scale: var(--ds-bottom-sheet-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_bottom-sheet-enter-duration: 0ms;--_bottom-sheet-leave-duration: 0ms;--_bottom-sheet-scrim-enter-duration: 0ms;--_bottom-sheet-scrim-leave-duration: 0ms}}.sheet-overlay{position:fixed;inset:0;z-index:var(--layer-modal);background:var(--_bottom-sheet-scrim-color);display:flex;flex-direction:column;justify-content:flex-end;overflow:clip;animation-name:ds-fade-in;animation-duration:var(--_bottom-sheet-scrim-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing)}.sheet-overlay.closing{animation-name:ds-fade-out;animation-duration:var(--_bottom-sheet-scrim-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.sheet{--_ds-enter-y: 100%;position:relative;width:min(100%,var(--_bottom-sheet-max-width));margin-inline:auto;background:var(--_bottom-sheet-bg-color);border-radius:var(--_bottom-sheet-radius) var(--_bottom-sheet-radius) 0 0;padding:0 var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom,0px));animation-name:var(--_bottom-sheet-enter-keyframes);animation-duration:var(--_bottom-sheet-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing);max-height:var(--_bottom-sheet-max-height);display:flex;flex-direction:column;transition:transform var(--duration-base) var(--ease-decelerate)}.sheet.dragging{transition:none}.sheet.snapping{transition:transform var(--duration-base) var(--ease-decelerate),height var(--duration-base) var(--ease-decelerate)}@media(prefers-reduced-motion:reduce){.sheet.snapping{transition:none}}.sheet.closing{animation-name:var(--_bottom-sheet-leave-keyframes);animation-duration:var(--_bottom-sheet-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.grab{padding:var(--space-3) 0;margin:0 calc(var(--space-4) * -1);cursor:grab;touch-action:none}.sheet-handle{width:var(--bottom-sheet-handle-w);height:var(--bottom-sheet-handle-h);background:var(--border-strong);border-radius:var(--radius-pill);margin:0 auto}.sheet-title{font:var(--font-weight-semibold) var(--font-size-l)/var(--line-height-snug) var(--font-sans);color:var(--_bottom-sheet-title-text-color);margin:0 0 var(--space-3)}.sheet-body{display:flex;flex-direction:column;gap:var(--space-2);overflow-y:auto;min-height:0;padding:var(--space-1);margin:calc(var(--space-1) * -1)}.sheet-actions{display:flex;flex-direction:column;gap:var(--space-2)}.sheet-actions:not(:empty){margin-top:var(--space-3)}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
|
|
193
193
|
}
|
|
194
194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BottomSheetComponent, decorators: [{
|
|
195
195
|
type: Component,
|
|
196
|
-
args: [{ selector: 'ds-bottom-sheet', standalone: true, imports: [A11yModule], host: { '[attr.title]': 'null' }, encapsulation: ViewEncapsulation.Emulated, template: "@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\">\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\">\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\">\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\">\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_bottom-sheet-
|
|
196
|
+
args: [{ selector: 'ds-bottom-sheet', standalone: true, imports: [A11yModule], host: { '[attr.title]': 'null' }, encapsulation: ViewEncapsulation.Emulated, template: "@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\">\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\">\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\">\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\">\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_bottom-sheet-max-width: var(--ds-bottom-sheet-max-width, 480px);--_bottom-sheet-max-height: var(--ds-bottom-sheet-max-height, 80%);--_bottom-sheet-radius: var(--ds-bottom-sheet-radius, var(--ds-radius-panel));--_bottom-sheet-bg-color: var(--ds-bottom-sheet-bg-color, var(--surface-default));--_bottom-sheet-scrim-color: var(--ds-bottom-sheet-scrim-color, var(--surface-scrim));--_bottom-sheet-title-text-color: var(--ds-bottom-sheet-title-text-color, var(--text-primary));--_bottom-sheet-enter-keyframes: var(--ds-bottom-sheet-enter-keyframes, ds-slide-edge-in);--_bottom-sheet-leave-keyframes: var(--ds-bottom-sheet-leave-keyframes, ds-slide-edge-out);--_bottom-sheet-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-surface-duration));--_bottom-sheet-enter-easing: var(--ds-bottom-sheet-enter-easing, var(--ds-motion-enter-surface-easing));--_bottom-sheet-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-large-duration));--_bottom-sheet-leave-easing: var(--ds-bottom-sheet-leave-easing, var(--ds-motion-exit-large-easing));--_bottom-sheet-scrim-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-panel-duration));--_bottom-sheet-scrim-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-duration));--_ds-enter-scale: var(--ds-bottom-sheet-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_bottom-sheet-enter-duration: 0ms;--_bottom-sheet-leave-duration: 0ms;--_bottom-sheet-scrim-enter-duration: 0ms;--_bottom-sheet-scrim-leave-duration: 0ms}}.sheet-overlay{position:fixed;inset:0;z-index:var(--layer-modal);background:var(--_bottom-sheet-scrim-color);display:flex;flex-direction:column;justify-content:flex-end;overflow:clip;animation-name:ds-fade-in;animation-duration:var(--_bottom-sheet-scrim-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing)}.sheet-overlay.closing{animation-name:ds-fade-out;animation-duration:var(--_bottom-sheet-scrim-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.sheet{--_ds-enter-y: 100%;position:relative;width:min(100%,var(--_bottom-sheet-max-width));margin-inline:auto;background:var(--_bottom-sheet-bg-color);border-radius:var(--_bottom-sheet-radius) var(--_bottom-sheet-radius) 0 0;padding:0 var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom,0px));animation-name:var(--_bottom-sheet-enter-keyframes);animation-duration:var(--_bottom-sheet-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing);max-height:var(--_bottom-sheet-max-height);display:flex;flex-direction:column;transition:transform var(--duration-base) var(--ease-decelerate)}.sheet.dragging{transition:none}.sheet.snapping{transition:transform var(--duration-base) var(--ease-decelerate),height var(--duration-base) var(--ease-decelerate)}@media(prefers-reduced-motion:reduce){.sheet.snapping{transition:none}}.sheet.closing{animation-name:var(--_bottom-sheet-leave-keyframes);animation-duration:var(--_bottom-sheet-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.grab{padding:var(--space-3) 0;margin:0 calc(var(--space-4) * -1);cursor:grab;touch-action:none}.sheet-handle{width:var(--bottom-sheet-handle-w);height:var(--bottom-sheet-handle-h);background:var(--border-strong);border-radius:var(--radius-pill);margin:0 auto}.sheet-title{font:var(--font-weight-semibold) var(--font-size-l)/var(--line-height-snug) var(--font-sans);color:var(--_bottom-sheet-title-text-color);margin:0 0 var(--space-3)}.sheet-body{display:flex;flex-direction:column;gap:var(--space-2);overflow-y:auto;min-height:0;padding:var(--space-1);margin:calc(var(--space-1) * -1)}.sheet-actions{display:flex;flex-direction:column;gap:var(--space-2)}.sheet-actions:not(:empty){margin-top:var(--space-3)}\n"] }]
|
|
197
197
|
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], closed: [{ type: i0.Output, args: ["closed"] }], snapPoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapPoints", required: false }] }], sheetRef: [{ type: i0.ViewChild, args: ['sheet', { isSignal: true }] }] } });
|
|
198
198
|
|
|
199
199
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-bottom-sheet.mjs","sources":["../../../src/lib/components/bottom-sheet/bottom-sheet.component.ts","../../../src/lib/components/bottom-sheet/bottom-sheet.component.html","../../../src/lib/components/bottom-sheet/ids-group-ltd-ids-design-system-components-bottom-sheet.ts"],"sourcesContent":["import {\n Component,\n DOCUMENT,\n ElementRef,\n type OnDestroy,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { BodyScrollLockService } from '@ids-group-ltd/ids-design-system/overlay';\nimport { backdropDismiss } from '@ids-group-ltd/ids-design-system/core';\n\nlet nextId = 0;\n\n/** Bottom-anchored sheet — the mobile sibling of ds-drawer. Closes on scrim\n * tap, Escape, or a downward drag on the grab strip. While open it locks\n * body scroll. On wide viewports the panel is capped by\n * --ds-bottom-sheet-maxw and centred; prefer ds-modal / ds-drawer for\n * desktop-first layouts. position: fixed resolves against the nearest\n * ancestor containing block, so framed hosts contain the sheet. */\n@Component({\n selector: 'ds-bottom-sheet',\n standalone: true,\n imports: [A11yModule],\n templateUrl: './bottom-sheet.component.html',\n styleUrl: './bottom-sheet.component.scss',\n // A static `title=\"…\"` feeding the input below ALSO stays in the DOM as the global attribute,\n // which makes the host a native browser tooltip over everything inside it.\n host: { '[attr.title]': 'null' },\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class BottomSheetComponent implements OnDestroy {\n /** Open state, two-way bound. */\n readonly open = model<boolean>(false);\n /** Sheet title, shown in the header and used for `aria-labelledby`. */\n readonly title = input.required<string>();\n /** Fires once the close (leave) animation finishes. */\n readonly closed = output<void>();\n\n protected readonly titleId = `ds-bottom-sheet-title-${++nextId}`;\n /**\n * Snap-point heights as fractions of viewport height (0–1), ascending.\n * e.g. [0.4, 0.9]. When provided the sheet opens at the first snap point;\n * dragging snaps to the nearest point; dragging below the lowest closes.\n * When empty (default) the original single-height behavior is preserved.\n */\n readonly snapPoints = input<readonly number[]>([]);\n\n private readonly doc = inject(DOCUMENT);\n private readonly scrollLock = inject(BodyScrollLockService);\n private readonly sheetRef = viewChild<ElementRef<HTMLElement>>('sheet');\n\n protected readonly dragOffset = signal<number | null>(null);\n /** Sheet is in the DOM (kept true through the leave animation). */\n protected readonly rendered = signal(false);\n /** Playing the slide-down + scrim-fade leave animation. */\n protected readonly closing = signal(false);\n /** Index of the currently active snap point (only used when snapPoints is non-empty). */\n protected readonly activeSnapIndex = signal(0);\n\n /** CSS height string derived from the active snap point, or null when snapPoints is empty. */\n protected readonly snapHeight = computed(() => {\n const points = this.snapPoints();\n if (points.length === 0) {\n return null;\n }\n const index = Math.min(this.activeSnapIndex(), points.length - 1);\n\n return `${points[index] * 100}vh`;\n });\n\n private dragStartY = 0;\n private lastMoveY = 0;\n private lastMoveTime = 0;\n private velocity = 0;\n private wasOpen = false;\n private closeFallbackTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n // open → DOM lifecycle. Opening renders immediately; closing keeps the\n // sheet mounted and flips `closing` so the leave animation can play —\n // teardown happens in onLeaveEnd() once animationend fires.\n effect(() => {\n const isOpen = this.open();\n if (isOpen) {\n this.closing.set(false);\n this.rendered.set(true);\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n if (this.snapPoints().length > 0) {\n this.activeSnapIndex.set(0);\n }\n } else if (this.wasOpen) {\n this.closing.set(true);\n // Chrome freezes CSS animations on a backgrounded tab, so animationend\n // may never fire — this synthetic fallback guarantees teardown anyway.\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = setTimeout(() => this.finishClose(), 300);\n }\n this.wasOpen = isOpen;\n });\n\n // Ref-counted body-scroll lock, shared with modal/drawer so stacked\n // overlays don't unlock each other. The cleanup fires on the rendered→false\n // transition and on destroy, keeping lock/unlock paired.\n effect((onCleanup) => {\n if (!this.rendered()) {\n return;\n }\n this.scrollLock.lock();\n onCleanup(() => this.scrollLock.unlock());\n });\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n }\n\n protected close(): void {\n this.dragOffset.set(null);\n this.open.set(false);\n }\n\n protected onLeaveEnd(event: AnimationEvent): void {\n // The animated element is the one with the handler, so its OWN animationend is\n // the signal; anything bubbling from inside is not. This replaces matching the\n // keyframes NAME, which is what made the exit un-overridable.\n if (event.target !== event.currentTarget) {\n return;\n }\n this.finishClose();\n }\n\n private finishClose(): void {\n if (!this.closing()) {\n return;\n }\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n this.closing.set(false);\n this.rendered.set(false);\n this.closed.emit();\n }\n\n protected onEscape(): void {\n if (this.open()) {\n this.close();\n }\n }\n\n protected readonly backdropPress = backdropDismiss();\n\n protected onBackdropRelease(event: PointerEvent): void {\n if (this.backdropPress.shouldDismiss(event)) {\n this.close();\n }\n }\n\n protected onGrabStart(event: PointerEvent): void {\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n this.dragStartY = event.clientY;\n this.lastMoveY = event.clientY;\n this.lastMoveTime = event.timeStamp;\n this.velocity = 0;\n this.dragOffset.set(0);\n }\n\n protected onGrabMove(event: PointerEvent): void {\n if (this.dragOffset() === null) {\n return;\n }\n const deltaTime = event.timeStamp - this.lastMoveTime;\n if (deltaTime > 0) {\n this.velocity = (event.clientY - this.lastMoveY) / deltaTime;\n }\n this.lastMoveY = event.clientY;\n this.lastMoveTime = event.timeStamp;\n this.dragOffset.set(Math.max(0, event.clientY - this.dragStartY));\n }\n\n protected onGrabEnd(): void {\n const offset = this.dragOffset();\n if (offset === null) {\n return;\n }\n\n const points = this.snapPoints();\n\n if (points.length === 0) {\n // Original single-height behavior.\n const sheetHeight = this.sheetRef()?.nativeElement.offsetHeight ?? 0;\n const pastThreshold = sheetHeight > 0 && offset > sheetHeight * 0.3;\n const flicked = this.velocity > 0.5;\n if (pastThreshold || flicked) {\n this.close();\n } else {\n this.dragOffset.set(null);\n }\n\n return;\n }\n\n // Snap-point behavior: determine which snap point to land on.\n const viewportHeight =\n this.doc.defaultView?.innerHeight ?? window.innerHeight;\n const currentIndex = this.activeSnapIndex();\n const currentHeightPx = points[currentIndex] * viewportHeight;\n // Positive offset = dragged downward.\n const targetHeightPx = currentHeightPx - offset;\n const flicked = this.velocity > 0.5;\n\n if (flicked || targetHeightPx < points[0] * viewportHeight * 0.7) {\n // Dragged below lowest snap point or flicked down → close.\n this.close();\n\n return;\n }\n\n let nearestIndex = 0;\n let smallestDelta = Infinity;\n for (let pointIndex = 0; pointIndex < points.length; pointIndex++) {\n const delta = Math.abs(\n points[pointIndex] * viewportHeight - targetHeightPx,\n );\n if (delta < smallestDelta) {\n smallestDelta = delta;\n nearestIndex = pointIndex;\n }\n }\n\n this.dragOffset.set(null);\n this.activeSnapIndex.set(nearestIndex);\n }\n}\n","@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\">\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\">\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\">\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\">\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAmBA,IAAI,MAAM,GAAG,CAAC;AAEd;;;;;AAKmE;MAYtD,oBAAoB,CAAA;;AAEtB,IAAA,IAAI,GAAG,KAAK,CAAU,KAAK,2EAAC;;AAE5B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;IAEhC,MAAM,GAAG,MAAM,EAAQ;AAEb,IAAA,OAAO,GAAG,CAAA,sBAAA,EAAyB,EAAE,MAAM,EAAE;AAChE;;;;;AAKG;AACM,IAAA,UAAU,GAAG,KAAK,CAAoB,EAAE,iFAAC;AAEjC,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,IAAA,UAAU,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAC1C,IAAA,QAAQ,GAAG,SAAS,CAA0B,OAAO,+EAAC;AAEpD,IAAA,UAAU,GAAG,MAAM,CAAgB,IAAI,iFAAC;;AAExC,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,+EAAC;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AAA,EAAA,CAAA,EAAA,YAAA,EAAA,UAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,OAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECtCjC,6nDAoDA,EAAA,MAAA,EAAA,CAAA,oxHAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDtBY,UAAU,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,cAAA,EAAA,yBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAQT,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,CAAC,EAAA,IAAA,EAKf,EAAE,cAAc,EAAE,MAAM,EAAE,EAAA,aAAA,EACjB,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,6nDAAA,EAAA,MAAA,EAAA,CAAA,oxHAAA,CAAA,EAAA;idAqBsB,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzDxE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-bottom-sheet.mjs","sources":["../../../src/lib/components/bottom-sheet/bottom-sheet.component.ts","../../../src/lib/components/bottom-sheet/bottom-sheet.component.html","../../../src/lib/components/bottom-sheet/ids-group-ltd-ids-design-system-components-bottom-sheet.ts"],"sourcesContent":["import {\n Component,\n DOCUMENT,\n ElementRef,\n type OnDestroy,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { BodyScrollLockService } from '@ids-group-ltd/ids-design-system/overlay';\nimport { backdropDismiss } from '@ids-group-ltd/ids-design-system/core';\n\nlet nextId = 0;\n\n/** Bottom-anchored sheet — the mobile sibling of ds-drawer. Closes on scrim\n * tap, Escape, or a downward drag on the grab strip. While open it locks\n * body scroll. On wide viewports the panel is capped by\n * --ds-bottom-sheet-max-width and centred; prefer ds-modal / ds-drawer for\n * desktop-first layouts. position: fixed resolves against the nearest\n * ancestor containing block, so framed hosts contain the sheet. */\n@Component({\n selector: 'ds-bottom-sheet',\n standalone: true,\n imports: [A11yModule],\n templateUrl: './bottom-sheet.component.html',\n styleUrl: './bottom-sheet.component.scss',\n // A static `title=\"…\"` feeding the input below ALSO stays in the DOM as the global attribute,\n // which makes the host a native browser tooltip over everything inside it.\n host: { '[attr.title]': 'null' },\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class BottomSheetComponent implements OnDestroy {\n /** Open state, two-way bound. */\n readonly open = model<boolean>(false);\n /** Sheet title, shown in the header and used for `aria-labelledby`. */\n readonly title = input.required<string>();\n /** Fires once the close (leave) animation finishes. */\n readonly closed = output<void>();\n\n protected readonly titleId = `ds-bottom-sheet-title-${++nextId}`;\n /**\n * Snap-point heights as fractions of viewport height (0–1), ascending.\n * e.g. [0.4, 0.9]. When provided the sheet opens at the first snap point;\n * dragging snaps to the nearest point; dragging below the lowest closes.\n * When empty (default) the original single-height behavior is preserved.\n */\n readonly snapPoints = input<readonly number[]>([]);\n\n private readonly doc = inject(DOCUMENT);\n private readonly scrollLock = inject(BodyScrollLockService);\n private readonly sheetRef = viewChild<ElementRef<HTMLElement>>('sheet');\n\n protected readonly dragOffset = signal<number | null>(null);\n /** Sheet is in the DOM (kept true through the leave animation). */\n protected readonly rendered = signal(false);\n /** Playing the slide-down + scrim-fade leave animation. */\n protected readonly closing = signal(false);\n /** Index of the currently active snap point (only used when snapPoints is non-empty). */\n protected readonly activeSnapIndex = signal(0);\n\n /** CSS height string derived from the active snap point, or null when snapPoints is empty. */\n protected readonly snapHeight = computed(() => {\n const points = this.snapPoints();\n if (points.length === 0) {\n return null;\n }\n const index = Math.min(this.activeSnapIndex(), points.length - 1);\n\n return `${points[index] * 100}vh`;\n });\n\n private dragStartY = 0;\n private lastMoveY = 0;\n private lastMoveTime = 0;\n private velocity = 0;\n private wasOpen = false;\n private closeFallbackTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n // open → DOM lifecycle. Opening renders immediately; closing keeps the\n // sheet mounted and flips `closing` so the leave animation can play —\n // teardown happens in onLeaveEnd() once animationend fires.\n effect(() => {\n const isOpen = this.open();\n if (isOpen) {\n this.closing.set(false);\n this.rendered.set(true);\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n if (this.snapPoints().length > 0) {\n this.activeSnapIndex.set(0);\n }\n } else if (this.wasOpen) {\n this.closing.set(true);\n // Chrome freezes CSS animations on a backgrounded tab, so animationend\n // may never fire — this synthetic fallback guarantees teardown anyway.\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = setTimeout(() => this.finishClose(), 300);\n }\n this.wasOpen = isOpen;\n });\n\n // Ref-counted body-scroll lock, shared with modal/drawer so stacked\n // overlays don't unlock each other. The cleanup fires on the rendered→false\n // transition and on destroy, keeping lock/unlock paired.\n effect((onCleanup) => {\n if (!this.rendered()) {\n return;\n }\n this.scrollLock.lock();\n onCleanup(() => this.scrollLock.unlock());\n });\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n }\n\n protected close(): void {\n this.dragOffset.set(null);\n this.open.set(false);\n }\n\n protected onLeaveEnd(event: AnimationEvent): void {\n // The animated element is the one with the handler, so its OWN animationend is\n // the signal; anything bubbling from inside is not. This replaces matching the\n // keyframes NAME, which is what made the exit un-overridable.\n if (event.target !== event.currentTarget) {\n return;\n }\n this.finishClose();\n }\n\n private finishClose(): void {\n if (!this.closing()) {\n return;\n }\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n this.closing.set(false);\n this.rendered.set(false);\n this.closed.emit();\n }\n\n protected onEscape(): void {\n if (this.open()) {\n this.close();\n }\n }\n\n protected readonly backdropPress = backdropDismiss();\n\n protected onBackdropRelease(event: PointerEvent): void {\n if (this.backdropPress.shouldDismiss(event)) {\n this.close();\n }\n }\n\n protected onGrabStart(event: PointerEvent): void {\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n this.dragStartY = event.clientY;\n this.lastMoveY = event.clientY;\n this.lastMoveTime = event.timeStamp;\n this.velocity = 0;\n this.dragOffset.set(0);\n }\n\n protected onGrabMove(event: PointerEvent): void {\n if (this.dragOffset() === null) {\n return;\n }\n const deltaTime = event.timeStamp - this.lastMoveTime;\n if (deltaTime > 0) {\n this.velocity = (event.clientY - this.lastMoveY) / deltaTime;\n }\n this.lastMoveY = event.clientY;\n this.lastMoveTime = event.timeStamp;\n this.dragOffset.set(Math.max(0, event.clientY - this.dragStartY));\n }\n\n protected onGrabEnd(): void {\n const offset = this.dragOffset();\n if (offset === null) {\n return;\n }\n\n const points = this.snapPoints();\n\n if (points.length === 0) {\n // Original single-height behavior.\n const sheetHeight = this.sheetRef()?.nativeElement.offsetHeight ?? 0;\n const pastThreshold = sheetHeight > 0 && offset > sheetHeight * 0.3;\n const flicked = this.velocity > 0.5;\n if (pastThreshold || flicked) {\n this.close();\n } else {\n this.dragOffset.set(null);\n }\n\n return;\n }\n\n // Snap-point behavior: determine which snap point to land on.\n const viewportHeight =\n this.doc.defaultView?.innerHeight ?? window.innerHeight;\n const currentIndex = this.activeSnapIndex();\n const currentHeightPx = points[currentIndex] * viewportHeight;\n // Positive offset = dragged downward.\n const targetHeightPx = currentHeightPx - offset;\n const flicked = this.velocity > 0.5;\n\n if (flicked || targetHeightPx < points[0] * viewportHeight * 0.7) {\n // Dragged below lowest snap point or flicked down → close.\n this.close();\n\n return;\n }\n\n let nearestIndex = 0;\n let smallestDelta = Infinity;\n for (let pointIndex = 0; pointIndex < points.length; pointIndex++) {\n const delta = Math.abs(\n points[pointIndex] * viewportHeight - targetHeightPx,\n );\n if (delta < smallestDelta) {\n smallestDelta = delta;\n nearestIndex = pointIndex;\n }\n }\n\n this.dragOffset.set(null);\n this.activeSnapIndex.set(nearestIndex);\n }\n}\n","@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\">\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\">\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\">\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\">\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not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ACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,CAAC,EAAA,IAAA,EAKf,EAAE,cAAc,EAAE,MAAM,EAAE,EAAA,aAAA,EACjB,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,6nDAAA,EAAA,MAAA,EAAA,CAAA,qzHAAA,CAAA,EAAA;idAqBsB,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzDxE;;AAEG;;;;"}
|
|
@@ -56,6 +56,9 @@ class ButtonComponent extends DsMessageBase {
|
|
|
56
56
|
* reason. `text` is discouraged for every colour — prefer the global `.link` class, and keep
|
|
57
57
|
* this one only where the ds-button API is needed. */
|
|
58
58
|
variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
59
|
+
/** Where the contents sit once the button is wider than them, which in practice means
|
|
60
|
+
* `fullWidth`. `'between'` pushes the label and a trailing icon to opposite edges. */
|
|
61
|
+
align = input('center', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
59
62
|
/** Button height — sm/md/lg.
|
|
60
63
|
* Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */
|
|
61
64
|
size = input(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
@@ -221,7 +224,7 @@ class ButtonComponent extends DsMessageBase {
|
|
|
221
224
|
this.pressed.emit(event);
|
|
222
225
|
}
|
|
223
226
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
224
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ButtonComponent, isStandalone: true, selector: "ds-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, fragment: { classPropertyName: "fragment", publicName: "fragment", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, queryParamsHandling: { classPropertyName: "queryParamsHandling", publicName: "queryParamsHandling", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, rel: { classPropertyName: "rel", publicName: "rel", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null }, ariaCurrent: { classPropertyName: "ariaCurrent", publicName: "ariaCurrent", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, trailingIcon: { classPropertyName: "trailingIcon", publicName: "trailingIcon", isSignal: true, isRequired: false, transformFunction: null }, ariaHasPopup: { classPropertyName: "ariaHasPopup", publicName: "ariaHasPopup", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "ariaExpanded", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "ariaControls", isSignal: true, isRequired: false, transformFunction: null }, disabledReason: { classPropertyName: "disabledReason", publicName: "disabledReason", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressed" }, host: { properties: { "class.in-group": "inGroup", "class.full-width": "fullWidth()", "attr.data-variant": "variant()", "attr.data-color": "color()", "class.with-message": "hasMessageRow()" } }, viewQueries: [{ propertyName: "controlRef", first: true, predicate: ["btn"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Every branch must keep #btn: `controlRef` is required, so dropping it leaves that destination\n throwing. `type`, `loading` and the native `disabled` are button-only, which is why the\n anchors take `aria-disabled` and `tabindex=\"-1\"` instead. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"(disabled() || loading()) && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the button's accessible NAME; the\n aria-describedby above still reaches it, because a node referenced\n directly is read even when hidden. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:inline-flex;width:fit-content}:host(.full-width){display:block;width:100%}:host(.with-message){display:inline-flex;flex-direction:column;align-items:stretch;gap:var(--field-label-gap)}:host(.with-message.full-width){display:flex}.button{--c-base: var(--accent);--c-on: var(--accent-on);--c-strong: var(--accent-strong);--c-subtitle: var(--accent-subtitle);--c-muted: var(--accent-muted);--c-muted-strong: var(--accent-muted-strong);--c-outline-border: var(--c-muted-strong);--_button-bg-color: var(--ds-button-bg-color, var(--c-base));--_button-label-color: var(--ds-button-label-color, var(--c-on));--_button-bg-color-hover: var(--ds-button-bg-color-hover, color-mix(in srgb, var(--_button-bg-color) 88%, black));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--_button-bg-color) 76%, black));--_button-label-color-hover: var(--ds-button-label-color-hover, var(--_button-label-color));--_button-label-color-active: var(--ds-button-label-color-active, var(--_button-label-color));--_button-accent: var(--_button-bg-color);--_button-border-color: var(--ds-button-border-color, transparent);--_button-border-width: var(--ds-button-border-width, var(--border-width-default));--_button-press-scale: var(--ds-button-press-scale, .98);--_button-pressed-shadow: var(--ds-button-pressed-shadow, none);--_button-shadow: var(--ds-button-shadow, none);--_button-shadow-hover: var(--ds-button-shadow-hover, var(--_button-shadow));--_button-radius: var(--ds-button-radius, var(--ds-radius-control));--_button-font-family: var(--ds-button-font-family, var(--font-sans));--_button-line-height: var(--ds-button-line-height, var(--line-height-flat));--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-weight: var(--ds-button-weight, var(--font-weight-extrabold));--_button-tracking: var(--ds-button-tracking, var(--letter-spacing-wide));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-pad-x: var(--ds-button-pad-x, var(--space-5));--_button-pad-y: var(--ds-button-pad-y, 0);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, oklch(from var(--_button-accent) 92% .03 h));--_button-label-color-disabled: var(--ds-button-label-color-disabled, oklch(from var(--_button-accent) 70% .035 h));--_button-border-color-disabled: var(--ds-button-border-color-disabled, oklch(from var(--_button-accent) 86% .04 h));display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);font:var(--_button-weight) var(--_button-font-size)/var(--_button-line-height) var(--_button-font-family);letter-spacing:var(--_button-tracking);color:var(--_button-label-color);background-color:var(--_button-bg-color);border:var(--_button-border-width) solid var(--_button-border-color);border-radius:var(--_button-radius);padding:var(--_button-pad-y) var(--_button-pad-x);height:var(--_button-height);width:100%;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;text-align:center;position:relative;box-shadow:var(--_button-shadow);transition:background var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),transform var(--duration-instant) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.button:hover{background-color:var(--_button-bg-color-hover);color:var(--_button-label-color-hover);box-shadow:var(--_button-shadow-hover)}.button:active{background-color:var(--_button-bg-color-active);color:var(--_button-label-color-active);box-shadow:var(--_button-pressed-shadow);transform:scale(var(--_button-press-scale))}.button[disabled],.button[aria-disabled=true]{background-color:var(--_button-bg-color-disabled);color:var(--_button-label-color-disabled);border-color:var(--_button-border-color-disabled);cursor:not-allowed;box-shadow:none;transform:none}.button[disabled]{pointer-events:none}.button:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);z-index:var(--btn-focus-z)}.button .icon{width:var(--icon-md);height:var(--icon-md);flex-shrink:0}.button .button-main{display:contents}.button .subtext-slot:empty{display:none}.button .subtext-slot,.button .reason{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-tight) var(--_button-font-family);letter-spacing:var(--letter-spacing-normal);text-align:center}.button .reason{max-width:100%;text-wrap:pretty}.button:has(.subtext-slot:not(:empty)),.button:has(.reason){flex-direction:column;gap:var(--space-1);height:auto;min-height:var(--field-h-md);padding-block:var(--ds-button-pad-y, var(--space-2));white-space:normal}.button:has(.subtext-slot:not(:empty)) .button-main,.button:has(.reason) .button-main{display:inline-flex;align-items:center;gap:var(--space-2)}.button:has(.subtext-slot:not(:empty)).lg,.button:has(.reason).lg{height:auto;min-height:var(--field-h-lg)}.button.lg{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-lg));--_button-pad-x: var(--ds-button-pad-x, var(--space-5))}.button.md{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-pad-x: var(--ds-button-pad-x, var(--space-5))}.button.sm{--_button-font-size: var(--ds-button-font-size, var(--font-size-s));--_button-height: var(--ds-button-height, var(--field-h-sm));--_button-pad-x: var(--ds-button-pad-x, var(--space-4))}.button.sm .icon{width:var(--icon-sm);height:var(--icon-sm)}.button.c-secondary{--c-base: var(--secondary);--c-on: var(--secondary-on);--c-strong: var(--secondary-strong);--c-subtitle: var(--secondary-subtitle);--c-muted: var(--secondary-muted);--c-muted-strong: var(--secondary-muted-strong)}.button.c-tertiary{--c-base: var(--tertiary);--c-on: var(--tertiary-on);--c-strong: var(--tertiary-strong);--c-subtitle: var(--tertiary-subtitle);--c-muted: var(--tertiary-muted);--c-muted-strong: var(--tertiary-muted-strong)}.button.c-neutral{--c-base: var(--text-secondary);--c-on: var(--surface-default);--c-strong: var(--text-primary);--c-subtitle: var(--surface-secondary);--c-muted: color-mix(in srgb, var(--text-secondary) 14%, var(--surface-default));--c-muted-strong: color-mix(in srgb, var(--text-secondary) 22%, var(--surface-default));--c-outline-border: var(--border-default)}.button.c-error{--c-base: var(--error);--c-on: var(--text-on-error);--c-strong: var(--error-text);--c-subtitle: var(--error-subtitle);--c-muted: var(--error-muted);--c-muted-strong: var(--error-muted-strong)}.button.c-success{--c-base: var(--success);--c-on: var(--text-on-success);--c-strong: var(--success-text);--c-subtitle: var(--success-subtitle);--c-muted: var(--success-muted);--c-muted-strong: var(--success-muted-strong)}.button.c-warning{--c-base: var(--warning);--c-on: var(--text-on-warning);--c-strong: var(--warning-text);--c-subtitle: var(--warning-subtitle);--c-muted: var(--warning-muted);--c-muted-strong: var(--warning-muted-strong)}.button.v-tonal{--_button-bg-color: var(--ds-button-bg-color, var(--c-muted));--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--c-muted-strong));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--c-muted-strong) 90%, black));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, color-mix(in srgb, var(--_button-bg-color) 28%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.v-ghost{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--c-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--c-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.v-outline{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-border-color: var(--ds-button-border-color, var(--c-outline-border));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--c-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--c-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, color-mix(in srgb, var(--_button-border-color) 55%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.v-text{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, transparent);--_button-bg-color-active: var(--ds-button-bg-color-active, transparent);--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)));padding:0;height:auto;width:auto;text-decoration:underline;text-underline-offset:var(--btn-link-uloff);--_button-label-color-hover: var(--ds-button-label-color-hover, var(--c-base))}.button.loading{color:transparent!important;pointer-events:none;background-color:var(--_button-bg-color);border-color:var(--_button-border-color)}.button.loading:after{content:\"\";position:absolute;width:var(--spinner-md);height:var(--spinner-md);border:var(--border-width-strong) solid var(--_button-label-color);border-right-color:transparent;border-radius:var(--radius-pill);animation:spin var(--duration-loop-fast) linear infinite}@keyframes spin{to{transform:rotate(360deg)}}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .button{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{outline:none}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
|
|
227
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ButtonComponent, isStandalone: true, selector: "ds-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, fragment: { classPropertyName: "fragment", publicName: "fragment", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, queryParamsHandling: { classPropertyName: "queryParamsHandling", publicName: "queryParamsHandling", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, rel: { classPropertyName: "rel", publicName: "rel", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null }, ariaCurrent: { classPropertyName: "ariaCurrent", publicName: "ariaCurrent", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, trailingIcon: { classPropertyName: "trailingIcon", publicName: "trailingIcon", isSignal: true, isRequired: false, transformFunction: null }, ariaHasPopup: { classPropertyName: "ariaHasPopup", publicName: "ariaHasPopup", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "ariaExpanded", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "ariaControls", isSignal: true, isRequired: false, transformFunction: null }, disabledReason: { classPropertyName: "disabledReason", publicName: "disabledReason", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressed" }, host: { properties: { "class.in-group": "inGroup", "class.full-width": "fullWidth()", "attr.data-variant": "variant()", "attr.data-color": "color()", "class.with-message": "hasMessageRow()", "class.align-between": "align() === 'between'" } }, viewQueries: [{ propertyName: "controlRef", first: true, predicate: ["btn"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Every branch must keep #btn: `controlRef` is required, so dropping it leaves that destination\n throwing. `type`, `loading` and the native `disabled` are button-only, which is why the\n anchors take `aria-disabled` and `tabindex=\"-1\"` instead. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"(disabled() || loading()) && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the button's accessible NAME; the\n aria-describedby above still reaches it, because a node referenced\n directly is read even when hidden. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:inline-flex;width:fit-content}:host(.full-width){display:block;width:100%}:host(.with-message){display:inline-flex;flex-direction:column;align-items:stretch;gap:var(--field-label-gap)}:host(.align-between) .button{--_button-justify: space-between}:host(.with-message.full-width){display:flex}.button{--c-base: var(--accent);--c-on: var(--accent-on);--c-strong: var(--accent-strong);--c-subtitle: var(--accent-subtitle);--c-muted: var(--accent-muted);--c-muted-strong: var(--accent-muted-strong);--c-outline-border: var(--c-muted-strong);--_button-justify: center;--_button-bg-color: var(--ds-button-bg-color, var(--c-base));--_button-label-color: var(--ds-button-label-color, var(--c-on));--_button-bg-color-hover: var(--ds-button-bg-color-hover, color-mix(in srgb, var(--_button-bg-color) 88%, black));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--_button-bg-color) 76%, black));--_button-label-color-hover: var(--ds-button-label-color-hover, var(--_button-label-color));--_button-label-color-active: var(--ds-button-label-color-active, var(--_button-label-color));--_button-accent: var(--_button-bg-color);--_button-border-color: var(--ds-button-border-color, transparent);--_button-border-width: var(--ds-button-border-width, var(--border-width-default));--_button-press-scale: var(--ds-button-press-scale, .98);--_button-pressed-shadow: var(--ds-button-pressed-shadow, none);--_button-shadow: var(--ds-button-shadow, none);--_button-shadow-hover: var(--ds-button-shadow-hover, var(--_button-shadow));--_button-radius: var(--ds-button-radius, var(--ds-radius-control));--_button-font-family: var(--ds-button-font-family, var(--font-sans));--_button-line-height: var(--ds-button-line-height, var(--line-height-flat));--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-font-weight: var(--ds-button-font-weight, var(--font-weight-extrabold));--_button-letter-spacing: var(--ds-button-letter-spacing, var(--letter-spacing-wide));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-padding-x: var(--ds-button-padding-x, var(--space-5));--_button-padding-y: var(--ds-button-padding-y, 0);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, oklch(from var(--_button-accent) 92% .03 h));--_button-label-color-disabled: var(--ds-button-label-color-disabled, oklch(from var(--_button-accent) 70% .035 h));--_button-border-color-disabled: var(--ds-button-border-color-disabled, oklch(from var(--_button-accent) 86% .04 h));display:inline-flex;align-items:center;justify-content:var(--_button-justify);gap:var(--space-2);font:var(--_button-font-weight) var(--_button-font-size)/var(--_button-line-height) var(--_button-font-family);letter-spacing:var(--_button-letter-spacing);color:var(--_button-label-color);background-color:var(--_button-bg-color);border:var(--_button-border-width) solid var(--_button-border-color);border-radius:var(--_button-radius);padding:var(--_button-padding-y) var(--_button-padding-x);height:var(--_button-height);width:100%;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;text-align:center;position:relative;box-shadow:var(--_button-shadow);transition:background var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),transform var(--duration-instant) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.button:hover{background-color:var(--_button-bg-color-hover);color:var(--_button-label-color-hover);box-shadow:var(--_button-shadow-hover)}.button:active{background-color:var(--_button-bg-color-active);color:var(--_button-label-color-active);box-shadow:var(--_button-pressed-shadow);transform:scale(var(--_button-press-scale))}.button[disabled],.button[aria-disabled=true]{background-color:var(--_button-bg-color-disabled);color:var(--_button-label-color-disabled);border-color:var(--_button-border-color-disabled);cursor:not-allowed;box-shadow:none;transform:none}.button[disabled]{pointer-events:none}.button:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);z-index:var(--btn-focus-z)}.button .icon{width:var(--icon-md);height:var(--icon-md);flex-shrink:0}.button .button-main{display:contents}.button .subtext-slot:empty{display:none}.button .subtext-slot,.button .reason{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-tight) var(--_button-font-family);letter-spacing:var(--letter-spacing-normal);text-align:center}.button .reason{max-width:100%;text-wrap:pretty}.button:has(.subtext-slot:not(:empty)),.button:has(.reason){flex-direction:column;gap:var(--space-1);height:auto;min-height:var(--field-h-md);padding-block:var(--ds-button-padding-y, var(--space-2));white-space:normal}.button:has(.subtext-slot:not(:empty)) .button-main,.button:has(.reason) .button-main{display:inline-flex;align-items:center;gap:var(--space-2)}.button:has(.subtext-slot:not(:empty)).lg,.button:has(.reason).lg{height:auto;min-height:var(--field-h-lg)}.button.lg{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-lg));--_button-padding-x: var(--ds-button-padding-x, var(--space-5))}.button.md{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-padding-x: var(--ds-button-padding-x, var(--space-5))}.button.sm{--_button-font-size: var(--ds-button-font-size, var(--font-size-s));--_button-height: var(--ds-button-height, var(--field-h-sm));--_button-padding-x: var(--ds-button-padding-x, var(--space-4))}.button.sm .icon{width:var(--icon-sm);height:var(--icon-sm)}.button.c-secondary{--c-base: var(--secondary);--c-on: var(--secondary-on);--c-strong: var(--secondary-strong);--c-subtitle: var(--secondary-subtitle);--c-muted: var(--secondary-muted);--c-muted-strong: var(--secondary-muted-strong)}.button.c-tertiary{--c-base: var(--tertiary);--c-on: var(--tertiary-on);--c-strong: var(--tertiary-strong);--c-subtitle: var(--tertiary-subtitle);--c-muted: var(--tertiary-muted);--c-muted-strong: var(--tertiary-muted-strong)}.button.c-neutral{--c-base: var(--text-secondary);--c-on: var(--surface-default);--c-strong: var(--text-primary);--c-subtitle: var(--surface-secondary);--c-muted: color-mix(in srgb, var(--text-secondary) 14%, var(--surface-default));--c-muted-strong: color-mix(in srgb, var(--text-secondary) 22%, var(--surface-default));--c-outline-border: var(--border-default)}.button.c-error{--c-base: var(--error);--c-on: var(--text-on-error);--c-strong: var(--error-text);--c-subtitle: var(--error-subtitle);--c-muted: var(--error-muted);--c-muted-strong: var(--error-muted-strong)}.button.c-success{--c-base: var(--success);--c-on: var(--text-on-success);--c-strong: var(--success-text);--c-subtitle: var(--success-subtitle);--c-muted: var(--success-muted);--c-muted-strong: var(--success-muted-strong)}.button.c-warning{--c-base: var(--warning);--c-on: var(--text-on-warning);--c-strong: var(--warning-text);--c-subtitle: var(--warning-subtitle);--c-muted: var(--warning-muted);--c-muted-strong: var(--warning-muted-strong)}.button.v-tonal{--_button-bg-color: var(--ds-button-bg-color, var(--c-muted));--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--c-muted-strong));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--c-muted-strong) 90%, black));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, color-mix(in srgb, var(--_button-bg-color) 28%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.v-ghost{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--c-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--c-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.v-outline{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-border-color: var(--ds-button-border-color, var(--c-outline-border));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--c-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--c-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, color-mix(in srgb, var(--_button-border-color) 55%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.v-text{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, transparent);--_button-bg-color-active: var(--ds-button-bg-color-active, transparent);--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)));padding:0;height:auto;width:auto;text-decoration:underline;text-underline-offset:var(--btn-link-uloff);--_button-label-color-hover: var(--ds-button-label-color-hover, var(--c-base))}.button.loading{color:transparent!important;pointer-events:none;background-color:var(--_button-bg-color);border-color:var(--_button-border-color)}.button.loading:after{content:\"\";position:absolute;width:var(--spinner-md);height:var(--spinner-md);border:var(--border-width-strong) solid var(--_button-label-color);border-right-color:transparent;border-radius:var(--radius-pill);animation:spin var(--duration-loop-fast) linear infinite}@keyframes spin{to{transform:rotate(360deg)}}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .button{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{outline:none}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
|
|
225
228
|
}
|
|
226
229
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
227
230
|
type: Component,
|
|
@@ -239,8 +242,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
239
242
|
'[attr.data-variant]': 'variant()',
|
|
240
243
|
'[attr.data-color]': 'color()',
|
|
241
244
|
'[class.with-message]': 'hasMessageRow()',
|
|
242
|
-
}, template: "<!-- Every branch must keep #btn: `controlRef` is required, so dropping it leaves that destination\n throwing. `type`, `loading` and the native `disabled` are button-only, which is why the\n anchors take `aria-disabled` and `tabindex=\"-1\"` instead. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"(disabled() || loading()) && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the button's accessible NAME; the\n aria-describedby above still reaches it, because a node referenced\n directly is read even when hidden. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:inline-flex;width:fit-content}:host(.full-width){display:block;width:100%}:host(.with-message){display:inline-flex;flex-direction:column;align-items:stretch;gap:var(--field-label-gap)}:host(.with-message.full-width){display:flex}.button{--c-base: var(--accent);--c-on: var(--accent-on);--c-strong: var(--accent-strong);--c-subtitle: var(--accent-subtitle);--c-muted: var(--accent-muted);--c-muted-strong: var(--accent-muted-strong);--c-outline-border: var(--c-muted-strong);--_button-bg-color: var(--ds-button-bg-color, var(--c-base));--_button-label-color: var(--ds-button-label-color, var(--c-on));--_button-bg-color-hover: var(--ds-button-bg-color-hover, color-mix(in srgb, var(--_button-bg-color) 88%, black));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--_button-bg-color) 76%, black));--_button-label-color-hover: var(--ds-button-label-color-hover, var(--_button-label-color));--_button-label-color-active: var(--ds-button-label-color-active, var(--_button-label-color));--_button-accent: var(--_button-bg-color);--_button-border-color: var(--ds-button-border-color, transparent);--_button-border-width: var(--ds-button-border-width, var(--border-width-default));--_button-press-scale: var(--ds-button-press-scale, .98);--_button-pressed-shadow: var(--ds-button-pressed-shadow, none);--_button-shadow: var(--ds-button-shadow, none);--_button-shadow-hover: var(--ds-button-shadow-hover, var(--_button-shadow));--_button-radius: var(--ds-button-radius, var(--ds-radius-control));--_button-font-family: var(--ds-button-font-family, var(--font-sans));--_button-line-height: var(--ds-button-line-height, var(--line-height-flat));--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-weight: var(--ds-button-weight, var(--font-weight-extrabold));--_button-tracking: var(--ds-button-tracking, var(--letter-spacing-wide));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-pad-x: var(--ds-button-pad-x, var(--space-5));--_button-pad-y: var(--ds-button-pad-y, 0);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, oklch(from var(--_button-accent) 92% .03 h));--_button-label-color-disabled: var(--ds-button-label-color-disabled, oklch(from var(--_button-accent) 70% .035 h));--_button-border-color-disabled: var(--ds-button-border-color-disabled, oklch(from var(--_button-accent) 86% .04 h));display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);font:var(--_button-weight) var(--_button-font-size)/var(--_button-line-height) var(--_button-font-family);letter-spacing:var(--_button-tracking);color:var(--_button-label-color);background-color:var(--_button-bg-color);border:var(--_button-border-width) solid var(--_button-border-color);border-radius:var(--_button-radius);padding:var(--_button-pad-y) var(--_button-pad-x);height:var(--_button-height);width:100%;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;text-align:center;position:relative;box-shadow:var(--_button-shadow);transition:background var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),transform var(--duration-instant) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.button:hover{background-color:var(--_button-bg-color-hover);color:var(--_button-label-color-hover);box-shadow:var(--_button-shadow-hover)}.button:active{background-color:var(--_button-bg-color-active);color:var(--_button-label-color-active);box-shadow:var(--_button-pressed-shadow);transform:scale(var(--_button-press-scale))}.button[disabled],.button[aria-disabled=true]{background-color:var(--_button-bg-color-disabled);color:var(--_button-label-color-disabled);border-color:var(--_button-border-color-disabled);cursor:not-allowed;box-shadow:none;transform:none}.button[disabled]{pointer-events:none}.button:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);z-index:var(--btn-focus-z)}.button .icon{width:var(--icon-md);height:var(--icon-md);flex-shrink:0}.button .button-main{display:contents}.button .subtext-slot:empty{display:none}.button .subtext-slot,.button .reason{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-tight) var(--_button-font-family);letter-spacing:var(--letter-spacing-normal);text-align:center}.button .reason{max-width:100%;text-wrap:pretty}.button:has(.subtext-slot:not(:empty)),.button:has(.reason){flex-direction:column;gap:var(--space-1);height:auto;min-height:var(--field-h-md);padding-block:var(--ds-button-pad-y, var(--space-2));white-space:normal}.button:has(.subtext-slot:not(:empty)) .button-main,.button:has(.reason) .button-main{display:inline-flex;align-items:center;gap:var(--space-2)}.button:has(.subtext-slot:not(:empty)).lg,.button:has(.reason).lg{height:auto;min-height:var(--field-h-lg)}.button.lg{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-lg));--_button-pad-x: var(--ds-button-pad-x, var(--space-5))}.button.md{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-pad-x: var(--ds-button-pad-x, var(--space-5))}.button.sm{--_button-font-size: var(--ds-button-font-size, var(--font-size-s));--_button-height: var(--ds-button-height, var(--field-h-sm));--_button-pad-x: var(--ds-button-pad-x, var(--space-4))}.button.sm .icon{width:var(--icon-sm);height:var(--icon-sm)}.button.c-secondary{--c-base: var(--secondary);--c-on: var(--secondary-on);--c-strong: var(--secondary-strong);--c-subtitle: var(--secondary-subtitle);--c-muted: var(--secondary-muted);--c-muted-strong: var(--secondary-muted-strong)}.button.c-tertiary{--c-base: var(--tertiary);--c-on: var(--tertiary-on);--c-strong: var(--tertiary-strong);--c-subtitle: var(--tertiary-subtitle);--c-muted: var(--tertiary-muted);--c-muted-strong: var(--tertiary-muted-strong)}.button.c-neutral{--c-base: var(--text-secondary);--c-on: var(--surface-default);--c-strong: var(--text-primary);--c-subtitle: var(--surface-secondary);--c-muted: color-mix(in srgb, var(--text-secondary) 14%, var(--surface-default));--c-muted-strong: color-mix(in srgb, var(--text-secondary) 22%, var(--surface-default));--c-outline-border: var(--border-default)}.button.c-error{--c-base: var(--error);--c-on: var(--text-on-error);--c-strong: var(--error-text);--c-subtitle: var(--error-subtitle);--c-muted: var(--error-muted);--c-muted-strong: var(--error-muted-strong)}.button.c-success{--c-base: var(--success);--c-on: var(--text-on-success);--c-strong: var(--success-text);--c-subtitle: var(--success-subtitle);--c-muted: var(--success-muted);--c-muted-strong: var(--success-muted-strong)}.button.c-warning{--c-base: var(--warning);--c-on: var(--text-on-warning);--c-strong: var(--warning-text);--c-subtitle: var(--warning-subtitle);--c-muted: var(--warning-muted);--c-muted-strong: var(--warning-muted-strong)}.button.v-tonal{--_button-bg-color: var(--ds-button-bg-color, var(--c-muted));--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--c-muted-strong));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--c-muted-strong) 90%, black));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, color-mix(in srgb, var(--_button-bg-color) 28%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.v-ghost{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--c-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--c-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.v-outline{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-border-color: var(--ds-button-border-color, var(--c-outline-border));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--c-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--c-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, color-mix(in srgb, var(--_button-border-color) 55%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.v-text{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, transparent);--_button-bg-color-active: var(--ds-button-bg-color-active, transparent);--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)));padding:0;height:auto;width:auto;text-decoration:underline;text-underline-offset:var(--btn-link-uloff);--_button-label-color-hover: var(--ds-button-label-color-hover, var(--c-base))}.button.loading{color:transparent!important;pointer-events:none;background-color:var(--_button-bg-color);border-color:var(--_button-border-color)}.button.loading:after{content:\"\";position:absolute;width:var(--spinner-md);height:var(--spinner-md);border:var(--border-width-strong) solid var(--_button-label-color);border-right-color:transparent;border-radius:var(--radius-pill);animation:spin var(--duration-loop-fast) linear infinite}@keyframes spin{to{transform:rotate(360deg)}}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .button{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{outline:none}}\n"] }]
|
|
243
|
-
}], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], fragment: [{ type: i0.Input, args: [{ isSignal: true, alias: "fragment", required: false }] }], queryParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParams", required: false }] }], queryParamsHandling: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParamsHandling", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], rel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rel", required: false }] }], routerLinkActiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkActiveOptions", required: false }] }], ariaCurrent: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaCurrent", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], trailingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingIcon", required: false }] }], ariaHasPopup: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaHasPopup", required: false }] }], ariaExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaExpanded", required: false }] }], ariaControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaControls", required: false }] }], disabledReason: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledReason", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }], pressed: [{ type: i0.Output, args: ["pressed"] }], controlRef: [{ type: i0.ViewChild, args: ['btn', { isSignal: true }] }] } });
|
|
245
|
+
'[class.align-between]': "align() === 'between'",
|
|
246
|
+
}, template: "<!-- Every branch must keep #btn: `controlRef` is required, so dropping it leaves that destination\n throwing. `type`, `loading` and the native `disabled` are button-only, which is why the\n anchors take `aria-disabled` and `tabindex=\"-1\"` instead. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"(disabled() || loading()) && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the button's accessible NAME; the\n aria-describedby above still reaches it, because a node referenced\n directly is read even when hidden. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:inline-flex;width:fit-content}:host(.full-width){display:block;width:100%}:host(.with-message){display:inline-flex;flex-direction:column;align-items:stretch;gap:var(--field-label-gap)}:host(.align-between) .button{--_button-justify: space-between}:host(.with-message.full-width){display:flex}.button{--c-base: var(--accent);--c-on: var(--accent-on);--c-strong: var(--accent-strong);--c-subtitle: var(--accent-subtitle);--c-muted: var(--accent-muted);--c-muted-strong: var(--accent-muted-strong);--c-outline-border: var(--c-muted-strong);--_button-justify: center;--_button-bg-color: var(--ds-button-bg-color, var(--c-base));--_button-label-color: var(--ds-button-label-color, var(--c-on));--_button-bg-color-hover: var(--ds-button-bg-color-hover, color-mix(in srgb, var(--_button-bg-color) 88%, black));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--_button-bg-color) 76%, black));--_button-label-color-hover: var(--ds-button-label-color-hover, var(--_button-label-color));--_button-label-color-active: var(--ds-button-label-color-active, var(--_button-label-color));--_button-accent: var(--_button-bg-color);--_button-border-color: var(--ds-button-border-color, transparent);--_button-border-width: var(--ds-button-border-width, var(--border-width-default));--_button-press-scale: var(--ds-button-press-scale, .98);--_button-pressed-shadow: var(--ds-button-pressed-shadow, none);--_button-shadow: var(--ds-button-shadow, none);--_button-shadow-hover: var(--ds-button-shadow-hover, var(--_button-shadow));--_button-radius: var(--ds-button-radius, var(--ds-radius-control));--_button-font-family: var(--ds-button-font-family, var(--font-sans));--_button-line-height: var(--ds-button-line-height, var(--line-height-flat));--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-font-weight: var(--ds-button-font-weight, var(--font-weight-extrabold));--_button-letter-spacing: var(--ds-button-letter-spacing, var(--letter-spacing-wide));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-padding-x: var(--ds-button-padding-x, var(--space-5));--_button-padding-y: var(--ds-button-padding-y, 0);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, oklch(from var(--_button-accent) 92% .03 h));--_button-label-color-disabled: var(--ds-button-label-color-disabled, oklch(from var(--_button-accent) 70% .035 h));--_button-border-color-disabled: var(--ds-button-border-color-disabled, oklch(from var(--_button-accent) 86% .04 h));display:inline-flex;align-items:center;justify-content:var(--_button-justify);gap:var(--space-2);font:var(--_button-font-weight) var(--_button-font-size)/var(--_button-line-height) var(--_button-font-family);letter-spacing:var(--_button-letter-spacing);color:var(--_button-label-color);background-color:var(--_button-bg-color);border:var(--_button-border-width) solid var(--_button-border-color);border-radius:var(--_button-radius);padding:var(--_button-padding-y) var(--_button-padding-x);height:var(--_button-height);width:100%;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;text-align:center;position:relative;box-shadow:var(--_button-shadow);transition:background var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),transform var(--duration-instant) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.button:hover{background-color:var(--_button-bg-color-hover);color:var(--_button-label-color-hover);box-shadow:var(--_button-shadow-hover)}.button:active{background-color:var(--_button-bg-color-active);color:var(--_button-label-color-active);box-shadow:var(--_button-pressed-shadow);transform:scale(var(--_button-press-scale))}.button[disabled],.button[aria-disabled=true]{background-color:var(--_button-bg-color-disabled);color:var(--_button-label-color-disabled);border-color:var(--_button-border-color-disabled);cursor:not-allowed;box-shadow:none;transform:none}.button[disabled]{pointer-events:none}.button:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);z-index:var(--btn-focus-z)}.button .icon{width:var(--icon-md);height:var(--icon-md);flex-shrink:0}.button .button-main{display:contents}.button .subtext-slot:empty{display:none}.button .subtext-slot,.button .reason{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-tight) var(--_button-font-family);letter-spacing:var(--letter-spacing-normal);text-align:center}.button .reason{max-width:100%;text-wrap:pretty}.button:has(.subtext-slot:not(:empty)),.button:has(.reason){flex-direction:column;gap:var(--space-1);height:auto;min-height:var(--field-h-md);padding-block:var(--ds-button-padding-y, var(--space-2));white-space:normal}.button:has(.subtext-slot:not(:empty)) .button-main,.button:has(.reason) .button-main{display:inline-flex;align-items:center;gap:var(--space-2)}.button:has(.subtext-slot:not(:empty)).lg,.button:has(.reason).lg{height:auto;min-height:var(--field-h-lg)}.button.lg{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-lg));--_button-padding-x: var(--ds-button-padding-x, var(--space-5))}.button.md{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-padding-x: var(--ds-button-padding-x, var(--space-5))}.button.sm{--_button-font-size: var(--ds-button-font-size, var(--font-size-s));--_button-height: var(--ds-button-height, var(--field-h-sm));--_button-padding-x: var(--ds-button-padding-x, var(--space-4))}.button.sm .icon{width:var(--icon-sm);height:var(--icon-sm)}.button.c-secondary{--c-base: var(--secondary);--c-on: var(--secondary-on);--c-strong: var(--secondary-strong);--c-subtitle: var(--secondary-subtitle);--c-muted: var(--secondary-muted);--c-muted-strong: var(--secondary-muted-strong)}.button.c-tertiary{--c-base: var(--tertiary);--c-on: var(--tertiary-on);--c-strong: var(--tertiary-strong);--c-subtitle: var(--tertiary-subtitle);--c-muted: var(--tertiary-muted);--c-muted-strong: var(--tertiary-muted-strong)}.button.c-neutral{--c-base: var(--text-secondary);--c-on: var(--surface-default);--c-strong: var(--text-primary);--c-subtitle: var(--surface-secondary);--c-muted: color-mix(in srgb, var(--text-secondary) 14%, var(--surface-default));--c-muted-strong: color-mix(in srgb, var(--text-secondary) 22%, var(--surface-default));--c-outline-border: var(--border-default)}.button.c-error{--c-base: var(--error);--c-on: var(--text-on-error);--c-strong: var(--error-text);--c-subtitle: var(--error-subtitle);--c-muted: var(--error-muted);--c-muted-strong: var(--error-muted-strong)}.button.c-success{--c-base: var(--success);--c-on: var(--text-on-success);--c-strong: var(--success-text);--c-subtitle: var(--success-subtitle);--c-muted: var(--success-muted);--c-muted-strong: var(--success-muted-strong)}.button.c-warning{--c-base: var(--warning);--c-on: var(--text-on-warning);--c-strong: var(--warning-text);--c-subtitle: var(--warning-subtitle);--c-muted: var(--warning-muted);--c-muted-strong: var(--warning-muted-strong)}.button.v-tonal{--_button-bg-color: var(--ds-button-bg-color, var(--c-muted));--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--c-muted-strong));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--c-muted-strong) 90%, black));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, color-mix(in srgb, var(--_button-bg-color) 28%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.v-ghost{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--c-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--c-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.v-outline{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-border-color: var(--ds-button-border-color, var(--c-outline-border));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--c-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--c-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, color-mix(in srgb, var(--_button-border-color) 55%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.v-text{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--c-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, transparent);--_button-bg-color-active: var(--ds-button-bg-color-active, transparent);--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)));padding:0;height:auto;width:auto;text-decoration:underline;text-underline-offset:var(--btn-link-uloff);--_button-label-color-hover: var(--ds-button-label-color-hover, var(--c-base))}.button.loading{color:transparent!important;pointer-events:none;background-color:var(--_button-bg-color);border-color:var(--_button-border-color)}.button.loading:after{content:\"\";position:absolute;width:var(--spinner-md);height:var(--spinner-md);border:var(--border-width-strong) solid var(--_button-label-color);border-right-color:transparent;border-radius:var(--radius-pill);animation:spin var(--duration-loop-fast) linear infinite}@keyframes spin{to{transform:rotate(360deg)}}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .button{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{outline:none}}\n"] }]
|
|
247
|
+
}], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], fragment: [{ type: i0.Input, args: [{ isSignal: true, alias: "fragment", required: false }] }], queryParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParams", required: false }] }], queryParamsHandling: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParamsHandling", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], rel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rel", required: false }] }], routerLinkActiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkActiveOptions", required: false }] }], ariaCurrent: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaCurrent", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], trailingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingIcon", required: false }] }], ariaHasPopup: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaHasPopup", required: false }] }], ariaExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaExpanded", required: false }] }], ariaControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaControls", required: false }] }], disabledReason: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledReason", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }], pressed: [{ type: i0.Output, args: ["pressed"] }], controlRef: [{ type: i0.ViewChild, args: ['btn', { isSignal: true }] }] } });
|
|
244
248
|
|
|
245
249
|
/**
|
|
246
250
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-button.mjs","sources":["../../../src/lib/components/button/button.component.ts","../../../src/lib/components/button/button.component.html","../../../src/lib/components/button/ids-group-ltd-ids-design-system-components-button.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport type {\n IsActiveMatchOptions,\n Params,\n QueryParamsHandling,\n} from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport {\n dsAriaCurrent,\n dsDestination,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n DsAriaCurrent,\n DsLinkModifiers,\n DsRouterLink,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type { ButtonColor, ButtonVariant, ButtonType } from './button.types';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { inFieldGroup } from '@ids-group-ltd/ids-design-system/components/field-group';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport { DsMessageBase } from '@ids-group-ltd/ids-design-system/components';\nimport {\n resolveFieldMessage,\n trimmedText,\n type DsFieldError,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\n// `resolveFieldMessage` reads a form control's validation state; a button has\n// none, so these stand in for the two sources a field feeds in from its control.\nconst NO_ERRORS = signal<readonly DsFieldError[]>([]).asReadonly();\nconst NEVER_INVALID = signal(false).asReadonly();\n\n// Modifiers that only reach the router branch. Read as a tuple so the warning can name the one\n// that was actually set.\nconst ROUTER_ONLY = [\n ['fragment'],\n ['queryParams'],\n ['queryParamsHandling'],\n] as const;\n\n// Discouraged, not blocked — two inputs cannot be narrowed against each other at compile time,\n// so the pair is warned about in dev and still renders.\nconst DISCOURAGED_COMBOS = new Map<string, string>([\n [\n 'neutral|solid',\n 'a solid grey button reads as disabled — prefer tonal/ghost/outline',\n ],\n [\n 'success|ghost',\n 'low-emphasis success rarely warrants an action affordance — prefer solid/tonal',\n ],\n [\n 'success|outline',\n 'low-emphasis success rarely warrants an action affordance — prefer solid/tonal',\n ],\n [\n 'warning|ghost',\n 'yellow at low emphasis is too low-contrast to read — prefer solid/tonal',\n ],\n [\n 'warning|outline',\n 'yellow at low emphasis is too low-contrast to read — prefer solid/tonal',\n ],\n]);\n\n@Component({\n selector: 'ds-button',\n standalone: true,\n imports: [\n IconComponent,\n FieldMessageComponent,\n NgTemplateOutlet,\n RouterLink,\n RouterLinkActive,\n ],\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.in-group]': 'inGroup',\n '[class.full-width]': 'fullWidth()',\n // Reflected so a consumer can target one axis without the inner class names, which sit on\n // the inner <button> and are unreachable from a host rule. Styling only.\n '[attr.data-variant]': 'variant()',\n '[attr.data-color]': 'color()',\n '[class.with-message]': 'hasMessageRow()',\n },\n})\nexport class ButtonComponent extends DsMessageBase {\n // A button is not a form row, so an app-wide `DS_CONFIG.field.reserveMessage` must not give it\n // an empty message line and the column box that comes with it. `[reserveMessage]` still works.\n protected override readonly reserveFollowsFieldDefault = false;\n\n // As a group segment the group owns the border, radius and ring, so `.in-group` strips this\n // control back to its bare contents.\n protected readonly inGroup = inFieldGroup();\n\n /** Brand/status hue family. */\n readonly color = input<ButtonColor>('primary');\n /** Fill pattern. Every color×variant pair renders; the discouraged ones dev-warn with the\n * reason. `text` is discouraged for every colour — prefer the global `.link` class, and keep\n * this one only where the ds-button API is needed. */\n readonly variant = input<ButtonVariant>('solid');\n /** Button height — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** `RouterLink` target. Set it and the button renders an `<a [routerLink]>` with\n * `routerLinkActive`: middle-click, open-in-new-tab and the announced \"link\" role depend on the\n * element, not on the look.\n *\n * Accepts a `UrlTree` as well as a path or a command array — `Router.createUrlTree` is the way\n * to reach the `UrlCreationOptions` that have no input of their own here (`relativeTo`,\n * `preserveFragment`). */\n readonly routerLink = input<DsRouterLink>(null);\n /** Plain `href` target, used when `routerLink` is not set — an external address or a download.\n * Renders an `<a href>`; same reasoning as `routerLink`. */\n readonly href = input<string>('');\n /** Hash to append to a `routerLink` destination — the section of the page to land on.\n * routerLink-only: on an `href` put it in the URL, and on a plain button it is ignored with a\n * dev warning. */\n readonly fragment = input<string | undefined>(undefined);\n /** Query parameters for a `routerLink` destination. routerLink-only, same as `fragment`. */\n readonly queryParams = input<Params | null | undefined>(undefined);\n /** How the destination's query merges with the current one — `'merge'`, `'preserve'` or\n * `'replace'`. routerLink-only. */\n readonly queryParamsHandling = input<QueryParamsHandling | null | undefined>(\n undefined,\n );\n /** Browsing context for the link — `'_blank'` and the rest. Both link destinations take it; on a\n * plain button it is ignored with a dev warning. */\n readonly target = input<string | undefined>(undefined);\n /** `rel` for the link. Pair it with `target=\"_blank\"`: without `noopener` the opened page can\n * reach back through `window.opener`. Both link destinations take it. */\n readonly rel = input<string | undefined>(undefined);\n /** How `routerLinkActive` decides the `active` CLASS — prefix by default, so a section link\n * stays lit inside its own pages. It also bounds the announcement, because the same directive\n * writes it: narrowed to `{ exact: true }`, a prefix match is no longer active and the link\n * announces nothing rather than `true`. Pass `ariaCurrent` alongside to keep one. */\n readonly routerLinkActiveOptions = input<\n { exact: boolean } | IsActiveMatchOptions\n >({ exact: false });\n /** Overrides what the link announces. Unset, an exact match announces `page` and a prefix match\n * announces `true`, which is what ARIA means by each; pass `null` to announce nothing, or one\n * of the other values when the link is a step or a location rather than a page. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Native `type`, defaulting to `'button'` so it never submits an ancestor form by accident.\n * Button-only: ignored on a link, with a dev warning. */\n readonly type = input<ButtonType>('button');\n /** Disables the button and blocks `pressed`. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Busy state — disables interaction and sets `aria-busy`. Button-only: a navigation cannot be\n * in flight before it starts, so on an anchor it is ignored with a dev-mode warning. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Stretch to fill the container: the host becomes block-level and 100% wide. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n /** Accessible name, forwarded as `aria-label`. For an icon-only or non-descriptive label. */\n readonly ariaLabel = input<string | null>(null);\n /** Leading icon, before the projected content. */\n readonly icon = input<IconName | null>(null);\n /** Trailing icon, after the projected content. */\n readonly trailingIcon = input<IconName | null>(null);\n /** ARIA `aria-haspopup`, forwarded to the inner <button> — set when this\n * button triggers a menu/dialog/listbox overlay. */\n readonly ariaHasPopup = input<\n 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | null\n >(null);\n /** ARIA `aria-expanded`, forwarded to the inner <button> — bind to the\n * overlay's open state on a trigger button. */\n readonly ariaExpanded = input<boolean | null>(null);\n /** ARIA `aria-controls`, forwarded to the inner <button> — the id of the panel\n * this button opens, e.g. `ds-app-layout`'s `railId`. */\n readonly ariaControls = input<string | null>(null);\n /** Why the button is refused, shown as its second line and read only while `disabled`. Setting\n * it also changes HOW the button is disabled — `aria-disabled` instead of the native attribute,\n * because a natively disabled button cannot be focused and the reason would never be announced,\n * so the click is swallowed in `onClick` instead. Uncapped: the text wraps and the button grows.\n * Same name and meaning as `TableRowAction.disabledReason`. */\n readonly disabledReason = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** ARIA `aria-describedby` — point the button at a description the app renders\n * itself, such as a `ds-field-message` under a form. Merged with the id of\n * `disabledReason` when both are present. */\n readonly ariaDescribedBy = input<string | null>(null);\n /** Fires on click, unless `disabled` or `loading`. */\n readonly pressed = output<MouseEvent>();\n\n /** The inner control, for an overlay trigger to position against and restore focus to. Typed\n * `HTMLElement`, not `HTMLButtonElement`: the element follows the destination. */\n readonly controlRef = viewChild.required<ElementRef<HTMLElement>>('btn');\n\n protected readonly destination = dsDestination(this.routerLink, this.href);\n protected readonly linkModifiers = computed<DsLinkModifiers>(() => ({\n fragment: this.fragment(),\n queryParams: this.queryParams(),\n queryParamsHandling: this.queryParamsHandling(),\n }));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.linkModifiers,\n this.ariaCurrent,\n );\n\n protected readonly classes = computed(() => {\n const color = this.color();\n const variant = this.variant();\n const parts = [\n 'button',\n color === 'primary' ? '' : `c-${color}`,\n variant === 'solid' ? '' : `v-${variant}`,\n this.sizeResolved(),\n this.loading() ? 'loading' : '',\n ];\n\n return parts.filter(Boolean).join(' ');\n });\n\n protected readonly softDisabled = computed(\n () => this.disabled() && this.disabledReason().length > 0,\n );\n\n private readonly uid = nextControlId('ds-button');\n protected readonly reasonId = `${this.uid}-reason`;\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n protected readonly describedBy = computed(() => {\n const ids = [\n this.softDisabled() ? this.reasonId : null,\n this.hintId(),\n this.ariaDescribedBy(),\n ].filter(Boolean);\n\n return ids.length ? ids.join(' ') : null;\n });\n\n protected readonly hasMessageRow = computed(\n () => this.message().text.length > 0 || this.reserveMessageResolved(),\n );\n\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: NO_ERRORS,\n invalid: NEVER_INVALID,\n });\n protected readonly message = this.fieldMessage.message;\n\n constructor() {\n super();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() => {\n const variant = this.variant();\n if (variant === 'text') {\n return '[ds-button] variant=\"text\" is discouraged — prefer the global `.link` class for link-styled actions. It renders, but `.link` is the canonical link affordance.';\n }\n const destination = this.destination();\n if (destination !== 'button') {\n if (this.loading()) {\n return '[ds-button] `loading` is ignored on a link-button — a navigation cannot be in flight before it starts. Remove it, or drop the destination and emit `(pressed)` instead.';\n }\n if (this.type() !== 'button') {\n return `[ds-button] type=\"${this.type()}\" is ignored on a link-button — an anchor has no form to submit. Drop the destination to submit a form.`;\n }\n }\n if (destination !== 'routerLink') {\n const routed = ROUTER_ONLY.find(\n ([name]) => this[name]() !== undefined,\n );\n if (routed) {\n return `[ds-button] \\`${routed[0]}\\` only applies to a \\`routerLink\\` destination${destination === 'href' ? ' — put it in the `href` URL instead' : ''}.`;\n }\n }\n if (destination === 'button' && (this.target() || this.rel())) {\n return '[ds-button] `target` and `rel` need a destination — set `routerLink` or `href`, or drop them.';\n }\n const reason = DISCOURAGED_COMBOS.get(`${this.color()}|${variant}`);\n\n return reason\n ? `[ds-button] color=\"${this.color()}\" variant=\"${variant}\" is a UX-discouraged combination — it renders, but ${reason}.`\n : null;\n });\n }\n }\n\n protected onClick(event: MouseEvent): void {\n // A soft-disabled button is only `aria-disabled`, so the browser still\n // dispatches the click — this is what stops it.\n if (this.disabled() || this.loading()) {\n // The routerLink branch binds `null`; an `<a href>` still navigates.\n if (this.destination() === 'href') {\n event.preventDefault();\n }\n\n return;\n }\n this.pressed.emit(event);\n }\n}\n","<!-- Every branch must keep #btn: `controlRef` is required, so dropping it leaves that destination\n throwing. `type`, `loading` and the native `disabled` are button-only, which is why the\n anchors take `aria-disabled` and `tabindex=\"-1\"` instead. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"(disabled() || loading()) && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the button's accessible NAME; the\n aria-describedby above still reaches it, because a node referenced\n directly is read even when hidden. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AA2CA;AACA;AACA,MAAM,SAAS,GAAG,MAAM,CAA0B,EAAE,CAAC,CAAC,UAAU,EAAE;AAClE,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE;AAEhD;AACA;AACA,MAAM,WAAW,GAAG;AAClB,IAAA,CAAC,UAAU,CAAC;AACZ,IAAA,CAAC,aAAa,CAAC;AACf,IAAA,CAAC,qBAAqB,CAAC;CACf;AAEV;AACA;AACA,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAiB;AACjD,IAAA;QACE,eAAe;QACf,oEAAoE;AACrE,KA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AA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACV,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,uBAAA,EAAA,kBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAeP,eAAe,EAAA,UAAA,EAAA,CAAA;kBAvB3B,SAAS;+BACE,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP;wBACP,aAAa;wBACb,qBAAqB;wBACrB,gBAAgB;wBAChB,UAAU;wBACV,gBAAgB;qBACjB,EAAA,aAAA,EAGc,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,kBAAkB,EAAE,SAAS;AAC7B,wBAAA,oBAAoB,EAAE,aAAa;;;AAGnC,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,sBAAsB,EAAE,iBAAiB;AAC1C,qBAAA,EAAA,QAAA,EAAA,myGAAA,EAAA,MAAA,EAAA,CAAA,6wXAAA,CAAA,EAAA;+9EA4GiE,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElNzE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-button.mjs","sources":["../../../src/lib/components/button/button.component.ts","../../../src/lib/components/button/button.component.html","../../../src/lib/components/button/ids-group-ltd-ids-design-system-components-button.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport type {\n IsActiveMatchOptions,\n Params,\n QueryParamsHandling,\n} from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport {\n dsAriaCurrent,\n dsDestination,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n DsAriaCurrent,\n DsLinkModifiers,\n DsRouterLink,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n ButtonAlign,\n ButtonColor,\n ButtonVariant,\n ButtonType,\n} from './button.types';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { inFieldGroup } from '@ids-group-ltd/ids-design-system/components/field-group';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport { DsMessageBase } from '@ids-group-ltd/ids-design-system/components';\nimport {\n resolveFieldMessage,\n trimmedText,\n type DsFieldError,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\n// `resolveFieldMessage` reads a form control's validation state; a button has\n// none, so these stand in for the two sources a field feeds in from its control.\nconst NO_ERRORS = signal<readonly DsFieldError[]>([]).asReadonly();\nconst NEVER_INVALID = signal(false).asReadonly();\n\n// Modifiers that only reach the router branch. Read as a tuple so the warning can name the one\n// that was actually set.\nconst ROUTER_ONLY = [\n ['fragment'],\n ['queryParams'],\n ['queryParamsHandling'],\n] as const;\n\n// Discouraged, not blocked — two inputs cannot be narrowed against each other at compile time,\n// so the pair is warned about in dev and still renders.\nconst DISCOURAGED_COMBOS = new Map<string, string>([\n [\n 'neutral|solid',\n 'a solid grey button reads as disabled — prefer tonal/ghost/outline',\n ],\n [\n 'success|ghost',\n 'low-emphasis success rarely warrants an action affordance — prefer solid/tonal',\n ],\n [\n 'success|outline',\n 'low-emphasis success rarely warrants an action affordance — prefer solid/tonal',\n ],\n [\n 'warning|ghost',\n 'yellow at low emphasis is too low-contrast to read — prefer solid/tonal',\n ],\n [\n 'warning|outline',\n 'yellow at low emphasis is too low-contrast to read — prefer solid/tonal',\n ],\n]);\n\n@Component({\n selector: 'ds-button',\n standalone: true,\n imports: [\n IconComponent,\n FieldMessageComponent,\n NgTemplateOutlet,\n RouterLink,\n RouterLinkActive,\n ],\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.in-group]': 'inGroup',\n '[class.full-width]': 'fullWidth()',\n // Reflected so a consumer can target one axis without the inner class names, which sit on\n // the inner <button> and are unreachable from a host rule. Styling only.\n '[attr.data-variant]': 'variant()',\n '[attr.data-color]': 'color()',\n '[class.with-message]': 'hasMessageRow()',\n '[class.align-between]': \"align() === 'between'\",\n },\n})\nexport class ButtonComponent extends DsMessageBase {\n // A button is not a form row, so an app-wide `DS_CONFIG.field.reserveMessage` must not give it\n // an empty message line and the column box that comes with it. `[reserveMessage]` still works.\n protected override readonly reserveFollowsFieldDefault = false;\n\n // As a group segment the group owns the border, radius and ring, so `.in-group` strips this\n // control back to its bare contents.\n protected readonly inGroup = inFieldGroup();\n\n /** Brand/status hue family. */\n readonly color = input<ButtonColor>('primary');\n /** Fill pattern. Every color×variant pair renders; the discouraged ones dev-warn with the\n * reason. `text` is discouraged for every colour — prefer the global `.link` class, and keep\n * this one only where the ds-button API is needed. */\n readonly variant = input<ButtonVariant>('solid');\n /** Where the contents sit once the button is wider than them, which in practice means\n * `fullWidth`. `'between'` pushes the label and a trailing icon to opposite edges. */\n readonly align = input<ButtonAlign>('center');\n /** Button height — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** `RouterLink` target. Set it and the button renders an `<a [routerLink]>` with\n * `routerLinkActive`: middle-click, open-in-new-tab and the announced \"link\" role depend on the\n * element, not on the look.\n *\n * Accepts a `UrlTree` as well as a path or a command array — `Router.createUrlTree` is the way\n * to reach the `UrlCreationOptions` that have no input of their own here (`relativeTo`,\n * `preserveFragment`). */\n readonly routerLink = input<DsRouterLink>(null);\n /** Plain `href` target, used when `routerLink` is not set — an external address or a download.\n * Renders an `<a href>`; same reasoning as `routerLink`. */\n readonly href = input<string>('');\n /** Hash to append to a `routerLink` destination — the section of the page to land on.\n * routerLink-only: on an `href` put it in the URL, and on a plain button it is ignored with a\n * dev warning. */\n readonly fragment = input<string | undefined>(undefined);\n /** Query parameters for a `routerLink` destination. routerLink-only, same as `fragment`. */\n readonly queryParams = input<Params | null | undefined>(undefined);\n /** How the destination's query merges with the current one — `'merge'`, `'preserve'` or\n * `'replace'`. routerLink-only. */\n readonly queryParamsHandling = input<QueryParamsHandling | null | undefined>(\n undefined,\n );\n /** Browsing context for the link — `'_blank'` and the rest. Both link destinations take it; on a\n * plain button it is ignored with a dev warning. */\n readonly target = input<string | undefined>(undefined);\n /** `rel` for the link. Pair it with `target=\"_blank\"`: without `noopener` the opened page can\n * reach back through `window.opener`. Both link destinations take it. */\n readonly rel = input<string | undefined>(undefined);\n /** How `routerLinkActive` decides the `active` CLASS — prefix by default, so a section link\n * stays lit inside its own pages. It also bounds the announcement, because the same directive\n * writes it: narrowed to `{ exact: true }`, a prefix match is no longer active and the link\n * announces nothing rather than `true`. Pass `ariaCurrent` alongside to keep one. */\n readonly routerLinkActiveOptions = input<\n { exact: boolean } | IsActiveMatchOptions\n >({ exact: false });\n /** Overrides what the link announces. Unset, an exact match announces `page` and a prefix match\n * announces `true`, which is what ARIA means by each; pass `null` to announce nothing, or one\n * of the other values when the link is a step or a location rather than a page. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Native `type`, defaulting to `'button'` so it never submits an ancestor form by accident.\n * Button-only: ignored on a link, with a dev warning. */\n readonly type = input<ButtonType>('button');\n /** Disables the button and blocks `pressed`. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Busy state — disables interaction and sets `aria-busy`. Button-only: a navigation cannot be\n * in flight before it starts, so on an anchor it is ignored with a dev-mode warning. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Stretch to fill the container: the host becomes block-level and 100% wide. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n /** Accessible name, forwarded as `aria-label`. For an icon-only or non-descriptive label. */\n readonly ariaLabel = input<string | null>(null);\n /** Leading icon, before the projected content. */\n readonly icon = input<IconName | null>(null);\n /** Trailing icon, after the projected content. */\n readonly trailingIcon = input<IconName | null>(null);\n /** ARIA `aria-haspopup`, forwarded to the inner <button> — set when this\n * button triggers a menu/dialog/listbox overlay. */\n readonly ariaHasPopup = input<\n 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | null\n >(null);\n /** ARIA `aria-expanded`, forwarded to the inner <button> — bind to the\n * overlay's open state on a trigger button. */\n readonly ariaExpanded = input<boolean | null>(null);\n /** ARIA `aria-controls`, forwarded to the inner <button> — the id of the panel\n * this button opens, e.g. `ds-app-layout`'s `railId`. */\n readonly ariaControls = input<string | null>(null);\n /** Why the button is refused, shown as its second line and read only while `disabled`. Setting\n * it also changes HOW the button is disabled — `aria-disabled` instead of the native attribute,\n * because a natively disabled button cannot be focused and the reason would never be announced,\n * so the click is swallowed in `onClick` instead. Uncapped: the text wraps and the button grows.\n * Same name and meaning as `TableRowAction.disabledReason`. */\n readonly disabledReason = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** ARIA `aria-describedby` — point the button at a description the app renders\n * itself, such as a `ds-field-message` under a form. Merged with the id of\n * `disabledReason` when both are present. */\n readonly ariaDescribedBy = input<string | null>(null);\n /** Fires on click, unless `disabled` or `loading`. */\n readonly pressed = output<MouseEvent>();\n\n /** The inner control, for an overlay trigger to position against and restore focus to. Typed\n * `HTMLElement`, not `HTMLButtonElement`: the element follows the destination. */\n readonly controlRef = viewChild.required<ElementRef<HTMLElement>>('btn');\n\n protected readonly destination = dsDestination(this.routerLink, this.href);\n protected readonly linkModifiers = computed<DsLinkModifiers>(() => ({\n fragment: this.fragment(),\n queryParams: this.queryParams(),\n queryParamsHandling: this.queryParamsHandling(),\n }));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.linkModifiers,\n this.ariaCurrent,\n );\n\n protected readonly classes = computed(() => {\n const color = this.color();\n const variant = this.variant();\n const parts = [\n 'button',\n color === 'primary' ? '' : `c-${color}`,\n variant === 'solid' ? '' : `v-${variant}`,\n this.sizeResolved(),\n this.loading() ? 'loading' : '',\n ];\n\n return parts.filter(Boolean).join(' ');\n });\n\n protected readonly softDisabled = computed(\n () => this.disabled() && this.disabledReason().length > 0,\n );\n\n private readonly uid = nextControlId('ds-button');\n protected readonly reasonId = `${this.uid}-reason`;\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n protected readonly describedBy = computed(() => {\n const ids = [\n this.softDisabled() ? this.reasonId : null,\n this.hintId(),\n this.ariaDescribedBy(),\n ].filter(Boolean);\n\n return ids.length ? ids.join(' ') : null;\n });\n\n protected readonly hasMessageRow = computed(\n () => this.message().text.length > 0 || this.reserveMessageResolved(),\n );\n\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: NO_ERRORS,\n invalid: NEVER_INVALID,\n });\n protected readonly message = this.fieldMessage.message;\n\n constructor() {\n super();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() => {\n const variant = this.variant();\n if (variant === 'text') {\n return '[ds-button] variant=\"text\" is discouraged — prefer the global `.link` class for link-styled actions. It renders, but `.link` is the canonical link affordance.';\n }\n const destination = this.destination();\n if (destination !== 'button') {\n if (this.loading()) {\n return '[ds-button] `loading` is ignored on a link-button — a navigation cannot be in flight before it starts. Remove it, or drop the destination and emit `(pressed)` instead.';\n }\n if (this.type() !== 'button') {\n return `[ds-button] type=\"${this.type()}\" is ignored on a link-button — an anchor has no form to submit. Drop the destination to submit a form.`;\n }\n }\n if (destination !== 'routerLink') {\n const routed = ROUTER_ONLY.find(\n ([name]) => this[name]() !== undefined,\n );\n if (routed) {\n return `[ds-button] \\`${routed[0]}\\` only applies to a \\`routerLink\\` destination${destination === 'href' ? ' — put it in the `href` URL instead' : ''}.`;\n }\n }\n if (destination === 'button' && (this.target() || this.rel())) {\n return '[ds-button] `target` and `rel` need a destination — set `routerLink` or `href`, or drop them.';\n }\n const reason = DISCOURAGED_COMBOS.get(`${this.color()}|${variant}`);\n\n return reason\n ? `[ds-button] color=\"${this.color()}\" variant=\"${variant}\" is a UX-discouraged combination — it renders, but ${reason}.`\n : null;\n });\n }\n }\n\n protected onClick(event: MouseEvent): void {\n // A soft-disabled button is only `aria-disabled`, so the browser still\n // dispatches the click — this is what stops it.\n if (this.disabled() || this.loading()) {\n // The routerLink branch binds `null`; an `<a href>` still navigates.\n if (this.destination() === 'href') {\n event.preventDefault();\n }\n\n return;\n }\n this.pressed.emit(event);\n }\n}\n","<!-- Every branch must keep #btn: `controlRef` is required, so dropping it leaves that destination\n throwing. `type`, `loading` and the native `disabled` are button-only, which is why the\n anchors take `aria-disabled` and `tabindex=\"-1\"` instead. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"(disabled() || loading()) && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the button's accessible NAME; the\n aria-describedby above still reaches it, because a node referenced\n directly is read even when hidden. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAgDA;AACA;AACA,MAAM,SAAS,GAAG,MAAM,CAA0B,EAAE,CAAC,CAAC,UAAU,EAAE;AAClE,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE;AAEhD;AACA;AACA,MAAM,WAAW,GAAG;AAClB,IAAA,CAAC,UAAU,CAAC;AACZ,IAAA,CAAC,aAAa,CAAC;AACf,IAAA,CAAC,qBAAqB,CAAC;CACf;AAEV;AACA;AACA,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAiB;AACjD,IAAA;QACE,eAAe;QACf,oEAAoE;AACrE,KAAA;AACD,IAAA;QACE,eAAe;QACf,gFAAgF;AACjF,KAAA;AACD,IAAA;QACE,iBAAiB;QACjB,gFAAgF;AACjF,KAAA;AACD,IAAA;QACE,eAAe;QACf,yEAAyE;AAC1E,KAAA;AACD,IAAA;QACE,iBAAiB;QACjB,yEAAyE;AAC1E,KAAA;AACF,CAAA,CAAC;AA0BI,MAAO,eAAgB,SAAQ,aAAa,CAAA;;;IAGpB,0BAA0B,GAAG,KAAK;;;IAI3C,OAAO,GAAG,YAAY,EAAE;;AAGlC,IAAA,KAAK,GAAG,KAAK,CAAc,SAAS,4EAAC;AAC9C;;AAEuD;AAC9C,IAAA,OAAO,GAAG,KAAK,CAAgB,OAAO,8EAAC;AAChD;AACuF;AAC9E,IAAA,KAAK,GAAG,KAAK,CAAc,QAAQ,4EAAC;AAC7C;AACiE;AACxD,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;IACjC,YAAY,GAAG,iBAAiB,CACvC,IAAI,CAAC,IAAI,EACT,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,EAChC,IAAc,CACf;AACD;;;;;;AAM2B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