@ids-group-ltd/ids-design-system 0.14.4 → 0.14.6-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +176 -1
- package/components.md +15 -15
- package/docs/agent/INDEX.md +1 -1
- package/docs/agent/charts/ds-bar-chart.md +1 -1
- package/docs/agent/charts/ds-chart.md +1 -1
- package/docs/agent/charts/ds-column-chart.md +1 -1
- package/docs/agent/charts/ds-config.md +1 -1
- package/docs/agent/charts/ds-funnel-chart.md +1 -1
- package/docs/agent/charts/ds-heatmap-chart.md +1 -1
- package/docs/agent/charts/ds-line-chart.md +1 -1
- package/docs/agent/charts/ds-pie-chart.md +3 -3
- package/docs/agent/charts/ds-scatter-chart.md +1 -1
- package/docs/agent/charts/ds-waterfall-chart.md +1 -1
- package/docs/agent/navigation/ds-breadcrumbs.md +1 -1
- package/docs/agent/overlays/ds-tooltip.md +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +4 -6
- 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 +2 -3
- 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 +58 -163
- 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 +21 -34
- 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 +34 -105
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +22 -48
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +7 -7
- 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 +6 -10
- 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 +28 -130
- 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 +11 -29
- 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 +10 -28
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +20 -13
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +42 -69
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +15 -20
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +6 -7
- 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 +3 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +12 -28
- 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 +58 -112
- 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 +182 -432
- 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 +8 -12
- 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 -22
- 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 +28 -123
- 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 +45 -116
- 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 +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs +4 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +7 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +7 -8
- 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 +3 -3
- 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 +16 -45
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +10 -14
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +19 -41
- 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 +48 -163
- 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 +27 -85
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +17 -25
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +21 -41
- 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 +3 -6
- 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 +50 -166
- 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 +7 -7
- 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 +6 -11
- 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 +19 -36
- 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 +30 -57
- 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 +37 -103
- 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 +5 -6
- 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 +9 -15
- 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-footer.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.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 +8 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs +9 -24
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +32 -120
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +14 -24
- 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 +15 -24
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs +9 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +27 -91
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +16 -41
- 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 +8 -11
- 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 +18 -52
- 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 +4 -7
- 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 +30 -49
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +8 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +6 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs +29 -13
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +8 -9
- 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 +5 -20
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +5 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +11 -23
- 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 +7 -16
- 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-resize.mjs +9 -43
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +167 -353
- 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 +33 -86
- 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 +7 -7
- 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 +23 -47
- 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 +21 -49
- 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 +4 -4
- 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 +35 -63
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +38 -50
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +3 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +28 -85
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +325 -579
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +52 -85
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +4 -21
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs +4 -13
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +1 -2
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -1
- package/migrations/0.14.5.json +311 -0
- package/migrations/0.14.6-beta.0.json +9 -0
- package/package.json +1 -1
- package/schematics/check-overrides/surface.json +20 -2
- package/styles/_breakpoints.scss +6 -23
- package/styles/_chart-data-table.scss +3 -11
- package/styles/_chart-frame.scss +14 -63
- package/styles/_chart-interactive.scss +8 -36
- package/styles/_chart-motion.scss +11 -39
- package/styles/_check-box.scss +7 -26
- package/styles/_check-mark.scss +7 -23
- package/styles/_chip-row.scss +3 -14
- package/styles/_clear-button.scss +2 -7
- package/styles/_control-label.scss +2 -13
- package/styles/_control-line.scss +2 -6
- package/styles/_dropdown-overlay.scss +8 -33
- package/styles/_ds-color.scss +9 -28
- package/styles/_field-box.scss +4 -16
- package/styles/_field-group-segment.scss +6 -6
- package/styles/_field-label.scss +3 -14
- package/styles/_field-state.scss +5 -10
- package/styles/_focus.scss +20 -60
- package/styles/_icon-base.scss +0 -2
- package/styles/_layout-utils.scss +0 -3
- package/styles/_link.scss +4 -18
- package/styles/_overlay-motion.scss +15 -38
- package/styles/_page-grid.scss +4 -29
- package/styles/_press.scss +5 -18
- package/styles/_reset.scss +1 -14
- package/styles/_scrollbar.scss +0 -2
- package/styles/_skeleton-shimmer.scss +3 -14
- package/styles/_status.scss +5 -13
- package/styles/_surface-motion.scss +7 -34
- package/styles/_table-controls.scss +3 -6
- package/styles/_text-clip.scss +2 -6
- package/styles/_theme-activation.scss +7 -20
- package/styles/_toast-overlay.scss +2 -6
- package/styles/_tokens-charts.scss +31 -90
- package/styles/_tokens.scss +111 -156
- package/styles/_typography.scss +6 -13
- package/styles/_visually-hidden.scss +2 -3
- package/styles/ds.scss +2 -10
- package/themes/_base-palette.scss +12 -35
- package/themes/_semantic.scss +29 -98
- package/themes/dark/_palette.scss +15 -29
- package/themes/dark/_theme.scss +14 -32
- package/themes/light/_palette.scss +2 -17
- package/themes/light/_theme.scss +1 -7
- package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +2 -6
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +2 -3
- package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +45 -119
- package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +19 -32
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +29 -92
- package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +23 -46
- package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +5 -5
- package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +4 -8
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +27 -136
- package/types/ids-group-ltd-ids-design-system-components-bar.d.ts +13 -32
- package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +6 -12
- package/types/ids-group-ltd-ids-design-system-components-breadcrumbs.d.ts +6 -9
- package/types/ids-group-ltd-ids-design-system-components-button-group.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +36 -55
- package/types/ids-group-ltd-ids-design-system-components-calendar-day.d.ts +13 -18
- package/types/ids-group-ltd-ids-design-system-components-card.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-chart-data-table.d.ts +5 -11
- package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +10 -26
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +27 -49
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +161 -385
- package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +6 -10
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +5 -14
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +29 -124
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +23 -70
- package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-divider.d.ts +3 -7
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +1 -3
- package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +6 -8
- package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +17 -50
- package/types/ids-group-ltd-ids-design-system-components-field-message.d.ts +8 -12
- package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +13 -28
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +25 -113
- package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +17 -85
- package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +15 -23
- package/types/ids-group-ltd-ids-design-system-components-input.d.ts +18 -37
- package/types/ids-group-ltd-ids-design-system-components-layout.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +51 -160
- package/types/ids-group-ltd-ids-design-system-components-list.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-loading-overlay.d.ts +4 -9
- package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +13 -21
- package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +15 -28
- package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +27 -83
- package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +5 -6
- package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +5 -7
- package/types/ids-group-ltd-ids-design-system-components-page-footer.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +6 -10
- package/types/ids-group-ltd-ids-design-system-components-password-rules.d.ts +8 -22
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +18 -102
- package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +7 -11
- package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +14 -25
- package/types/ids-group-ltd-ids-design-system-components-reserve-messages.d.ts +7 -12
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +21 -96
- package/types/ids-group-ltd-ids-design-system-components-search.d.ts +12 -33
- package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +6 -7
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +12 -41
- package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +8 -15
- package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +23 -40
- package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +3 -5
- package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +4 -4
- package/types/ids-group-ltd-ids-design-system-components-sparkline.d.ts +14 -10
- package/types/ids-group-ltd-ids-design-system-components-spinner.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +6 -7
- package/types/ids-group-ltd-ids-design-system-components-stat.d.ts +2 -15
- package/types/ids-group-ltd-ids-design-system-components-status-dot.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-stepper.d.ts +4 -6
- package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +5 -9
- package/types/ids-group-ltd-ids-design-system-components-table-columns.d.ts +3 -7
- package/types/ids-group-ltd-ids-design-system-components-table-export.d.ts +4 -8
- package/types/ids-group-ltd-ids-design-system-components-table-resize.d.ts +9 -43
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +160 -369
- package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +21 -49
- package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +5 -5
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +17 -34
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +17 -38
- package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +20 -37
- package/types/ids-group-ltd-ids-design-system-components-toggle-button.d.ts +2 -3
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +17 -36
- package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-w3w.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +21 -70
- package/types/ids-group-ltd-ids-design-system-components.d.ts +262 -415
- package/types/ids-group-ltd-ids-design-system-core.d.ts +134 -260
- package/types/ids-group-ltd-ids-design-system-icons.d.ts +2 -24
- package/types/ids-group-ltd-ids-design-system-overlay.d.ts +4 -13
- package/types/ids-group-ltd-ids-design-system-theme.d.ts +4 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-pie-chart.mjs","sources":["../../../src/lib/components/pie-chart/pie-chart.math.ts","../../../src/lib/components/pie-chart/pie-chart.component.ts","../../../src/lib/components/pie-chart/pie-chart.component.html","../../../src/lib/components/pie-chart/ids-group-ltd-ids-design-system-components-pie-chart.ts"],"sourcesContent":["import type { PieChartSlice } from './pie-chart.types';\n\nconst FULL_TURN = Math.PI * 2;\nconst FULL_TURN_EPSILON = 1e-9;\n\nexport const DEFAULT_INNER_RADIUS = 0.68;\n\n/** Valid over [0, 1): zero is a solid pie, and one would leave no ring to draw, so it falls back\n * along with every other unusable value. */\nexport function holeFraction(innerRadius: number): number {\n return Number.isFinite(innerRadius) && innerRadius >= 0 && innerRadius < 1\n ? round(innerRadius)\n : DEFAULT_INNER_RADIUS;\n}\n\n/** The slices a legend can carry, with everything past `limit` summed into one. The kept slices stay\n * in the order given — a ring is read against its legend top to bottom, so reordering by value\n * would move every other slice to make room for the grouping. The remainder takes the neutral\n * eighth palette slot, which is what that slot is for. */\nexport function groupSmallest(\n slices: readonly PieChartSlice[],\n limit: number | null,\n otherLabel: string,\n): PieChartSlice[] {\n if (limit === null || !Number.isInteger(limit) || limit < 2) {\n return [...slices];\n }\n if (slices.length <= limit) {\n return [...slices];\n }\n const ranked = [...slices]\n .map((slice, index) => ({ index, value: positiveValues([slice.value])[0] }))\n .sort((a, b) => b.value - a.value || a.index - b.index);\n const kept = new Set(ranked.slice(0, limit - 1).map((entry) => entry.index));\n const remainder = slices\n .filter((unusedSlice, index) => !kept.has(index))\n .reduce((sum, slice) => sum + positiveValues([slice.value])[0], 0);\n\n return [\n ...slices.filter((unusedSlice, index) => kept.has(index)),\n { id: 'ds-pie-other', label: otherLabel, value: remainder, slot: 8 },\n ];\n}\n\nexport interface PieArc {\n readonly startAngle: number;\n readonly endAngle: number;\n}\n\n/** A ring is a part-to-whole picture, so anything that is not a positive share\n * becomes zero. Non-finite values go in the same pass: one NaN reaches every\n * other slice through the total, and a `d` attribute holding NaN draws nothing\n * at all rather than failing loudly. */\nexport function positiveValues(values: readonly number[]): number[] {\n return values.map((value) =>\n Number.isFinite(value) && value > 0 ? value : 0,\n );\n}\n\nexport function resolveTotal(values: readonly number[]): number {\n return positiveValues(values).reduce((sum, value) => sum + value, 0);\n}\n\nexport function sliceArcs(values: readonly number[]): PieArc[] {\n const positive = positiveValues(values);\n const total = resolveTotal(positive);\n if (total <= 0) {\n return positive.map(() => ({ startAngle: 0, endAngle: 0 }));\n }\n let cursor = 0;\n\n return positive.map((value) => {\n const startAngle = cursor;\n cursor += (value / total) * FULL_TURN;\n\n return { startAngle, endAngle: cursor };\n });\n}\n\nexport function resolveInnerRadius(\n outerRadius: number,\n innerRadius: number,\n): number {\n if (!Number.isFinite(outerRadius) || outerRadius <= 0) {\n return 0;\n }\n\n return outerRadius * holeFraction(innerRadius);\n}\n\nexport function paletteIndex(\n slot: number | undefined,\n index: number,\n paletteLength: number,\n): number {\n if (paletteLength <= 0) {\n return 0;\n }\n if (slot !== undefined && Number.isInteger(slot) && slot > 0) {\n return (slot - 1) % paletteLength;\n }\n\n return index % paletteLength;\n}\n\n/** One `\"x y\"` pair for a path. Angles run clockwise from 12 o'clock, where a\n * reader expects a ring to start; SVG's y axis points down, so that is\n * (sin, -cos) rather than the (cos, sin) of the maths convention. */\nexport function ringPoint(\n centerX: number,\n centerY: number,\n radius: number,\n angle: number,\n): string {\n const { x, y } = ringCoords(centerX, centerY, radius, angle);\n\n return `${x} ${y}`;\n}\n\n/** The same point as numbers, for PLACING something rather than drawing a path. */\nexport function ringCoords(\n centerX: number,\n centerY: number,\n radius: number,\n angle: number,\n): { x: number; y: number } {\n return {\n x: round(centerX + radius * Math.sin(angle)),\n y: round(centerY - radius * Math.cos(angle)),\n };\n}\n\nexport function arcPath(\n centerX: number,\n centerY: number,\n outerRadius: number,\n innerRadius: number,\n startAngle: number,\n endAngle: number,\n): string {\n const finite = [\n centerX,\n centerY,\n outerRadius,\n innerRadius,\n startAngle,\n endAngle,\n ].every((value) => Number.isFinite(value));\n if (!finite || outerRadius <= 0) {\n return '';\n }\n const inner = Math.min(Math.max(innerRadius, 0), outerRadius);\n const sweep = endAngle - startAngle;\n if (sweep <= 0) {\n return '';\n }\n if (sweep >= FULL_TURN - FULL_TURN_EPSILON) {\n return fullRingPath(centerX, centerY, outerRadius, inner);\n }\n const largeArcFlag = sweep > Math.PI ? 1 : 0;\n const outerRadii = `${round(outerRadius)} ${round(outerRadius)}`;\n const outerArc =\n `M ${ringPoint(centerX, centerY, outerRadius, startAngle)}` +\n ` A ${outerRadii} 0 ${largeArcFlag} 1 ${ringPoint(centerX, centerY, outerRadius, endAngle)}`;\n if (inner === 0) {\n return `${outerArc} L ${round(centerX)} ${round(centerY)} Z`;\n }\n const innerRadii = `${round(inner)} ${round(inner)}`;\n\n return (\n `${outerArc} L ${ringPoint(centerX, centerY, inner, endAngle)}` +\n ` A ${innerRadii} 0 ${largeArcFlag} 0 ${ringPoint(centerX, centerY, inner, startAngle)} Z`\n );\n}\n\nfunction fullRingPath(\n centerX: number,\n centerY: number,\n outerRadius: number,\n innerRadius: number,\n): string {\n const outer = circlePath(centerX, centerY, outerRadius, 1);\n if (innerRadius <= 0) {\n return outer;\n }\n\n // The hole is cut by winding the inner circle the other way, which the default\n // nonzero fill rule then cancels against the outer one.\n return `${outer} ${circlePath(centerX, centerY, innerRadius, 0)}`;\n}\n\n/** A single arc of a full turn ends where it starts and SVG draws nothing for\n * it, so a closed circle is two half-turns. */\nfunction circlePath(\n centerX: number,\n centerY: number,\n radius: number,\n sweepFlag: 0 | 1,\n): string {\n const top = ringPoint(centerX, centerY, radius, 0);\n const bottom = ringPoint(centerX, centerY, radius, Math.PI);\n const radii = `${round(radius)} ${round(radius)}`;\n\n return `M ${top} A ${radii} 0 1 ${sweepFlag} ${bottom} A ${radii} 0 1 ${sweepFlag} ${top} Z`;\n}\n\nfunction round(value: number): number {\n return Math.round(value * 1000) / 1000;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n chartDwell,\n describeSeries,\n formatWholePercent,\n largestRemainder,\n markAt,\n rovingMarks,\n chartRenderGate,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n ChartTooltipDirective,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport {\n DEFAULT_INNER_RADIUS,\n arcPath,\n groupSmallest,\n holeFraction,\n paletteIndex,\n positiveValues,\n resolveInnerRadius,\n resolveTotal,\n ringCoords,\n sliceArcs,\n} from './pie-chart.math';\nimport type { PieChartSlice } from './pie-chart.types';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport { resolveChartDefaults } from '@ids-group-ltd/ids-design-system/components';\n\nconst RING_VIEW_BOX_SIZE = 100;\nconst RING_CENTER = RING_VIEW_BOX_SIZE / 2;\nconst RING_OUTER_RADIUS = RING_VIEW_BOX_SIZE / 2;\n\n@Component({\n selector: 'ds-pie-chart',\n standalone: true,\n imports: [\n SkeletonComponent,\n ChartTooltipDirective,\n IconComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './pie-chart.component.html',\n styleUrl: './pie-chart.component.scss',\n host: { '[class.framed]': \"frameResolved() === 'auto'\" },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PieChartComponent {\n protected readonly renderReady = chartRenderGate();\n\n /** One slice per entry. A non-positive or non-finite value counts as zero — a ring is a\n * part-to-whole picture and has no way to draw a negative share. */\n readonly data = input.required<readonly PieChartSlice[]>();\n\n /** Printed inside the ring. Null prints the sum through `valueFormat`. */\n readonly centerValue = input<string | null>(null);\n\n /** Caption under the centre value. */\n readonly centerLabel = input<string | null>(null);\n\n /** Logical placement, so a right-to-left page needs no second value. */\n readonly legend = input<'end' | 'bottom' | 'none'>('end');\n\n /** Longest legend to draw. Past it the smallest slices are summed into one, so a long tail does\n * not become a legend nobody reads. Off by default: grouping changes what the chart says, and\n * that is the consumer's call. Values below 2 are ignored — one slice is not a pie. */\n readonly maxSlices = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Names the grouped slice. Unset falls back to `DS_INTL.chart.other`. */\n readonly otherLabel = input<string | null>(null);\n\n readonly otherLabelResolved = computed(\n () => this.otherLabel() ?? this.intl().chart.other,\n );\n\n /** The hole, as a fraction of the outer radius. Zero draws a solid pie and takes the centre\n * content away with the hole that held it. */\n readonly innerRadius = input(DEFAULT_INNER_RADIUS, {\n transform: numberAttribute,\n });\n\n /** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;\n * `'none'` leaves the chart bare, for one placed inside a card the page has already drawn.\n * Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'` — whether charts live inside cards\n * is one decision per app rather than per plot. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** Whether the tooltip draws a colour dot beside each reading. Unset falls back to\n * `DS_CONFIG.chart.tooltipSwatches`, then draws them for up to four readings. */\n readonly tooltipSwatches = input<boolean | null>(null, {\n transform: (value: unknown) =>\n value == null ? null : booleanAttribute(value),\n });\n\n /** How long the tooltip stays after the pointer leaves the mark, in milliseconds. The default,\n * 500, lets the pointer cross to the next mark and find the same panel, which glides there\n * instead of closing and opening again. Zero takes it away at once. Unset falls back to\n * `DS_CONFIG.chart.tooltipLingerMs`, then 500. */\n readonly tooltipLingerMs = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n /** Printed above the plot as the chart's visible title, and reused as the annex table's\n * caption. */\n readonly caption = input<string | null>(null);\n\n /** Accessible name. Generated from the data when omitted. */\n readonly summary = input<string | null>(null);\n\n /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,\n * `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so\n * `'none'` belongs only where the same data is already in a table on the page.\n * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'none'`. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Prints each slice's share of the ring — in the legend, on the tooltip and in the data table.\n * On by default, unlike every other chart, because a ring IS parts of one whole: the share is a\n * real quantity here whatever the data, not a claim the consumer has to make. Off drops all\n * three, for a ring whose slices are already labelled in percent. */\n readonly partOfWhole = input(true, { transform: booleanAttribute });\n\n /** Draws skeleton marks in place of the data, at the same count, so the chart does not resize\n * when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_INTL.chart.empty`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shows `errorText` in place of the plot. Separate from `loading` and from an empty `data`,\n * because \"the request failed\" and \"there is nothing to show\" read the same to a reader and\n * mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** The message the error state prints. Unset falls back to `DS_INTL.chart.error`. */\n readonly errorText = input<string | null>(null);\n /** Formats every value the chart prints, the annex table and the generated description\n * included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then `DS_CONFIG.locale` /\n * `LOCALE_ID`. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n /** Holds the clicked mark and its tooltip in place, with a pin disc on it, until a second click,\n * Escape or a press outside releases it. Unset falls back to `DS_CONFIG.chart.pinOnClick`, then\n * `true`. `sliceClicked` fires either way - pinning is a state, not a handler. */\n readonly pinOnClick = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n // Declared after every input it reads: it takes each signal off `this` when it runs.\n protected readonly defaults = resolveChartDefaults(this);\n protected readonly intl = inject(DS_INTL);\n readonly frameResolved = this.defaults.frame;\n readonly dataTableResolved = this.defaults.dataTable;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n\n /** Turns on the click affordance — the pointer cursor and any hover tint.\n * The click output fires whether or not this is set, so a consumer that\n * binds the output and forgets the flag still receives every click. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** The slice that was clicked, or activated with Enter or Space. Fires whether or not\n * `interactive` is set. */\n readonly sliceClicked = output<PieChartSlice>();\n\n /** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the\n * one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed\n * marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full\n * opacity to 2.1 at `--ds-chart-dim-opacity`'s default 0.3 — so it buys loudness for one mark\n * and pays for it with the rest of the chart. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Accepted for parity with the other four charts and deliberately without effect here: a ring\n * arrives as ONE object, because arcs share their edges and fading them one at a time lets the\n * background through every seam. There is nothing to stagger. */\n readonly staggerMs = input(0, { transform: numberAttribute });\n\n /** Whether a hovered or focused slice opens a tooltip. `'axis'` is not offered — a ring\n * has no axis to group readings under. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n protected readonly tooltipTemplate =\n contentChild<TemplateRef<{ $implicit: ChartTooltipContext }>>(\n 'dsChartTooltip',\n );\n\n private readonly tooltipLingerResolved = this.defaults.tooltipLingerMs;\n\n protected readonly activeMark = chartActiveMark(\n () => this.tooltipLingerResolved(),\n () => this.defaults.hoverDelayMs(),\n );\n\n protected onMarkClick(\n payload: PieChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(payload);\n if (this.defaults.pinOnClick()) {\n this.activeMark.pin(index, event);\n }\n }\n protected readonly roving = rovingMarks(() => this.slices().length);\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.roving.focus(index);\n this.activeMark.enter(index, event);\n }\n\n private readonly legendHighlight = signal(-1);\n private readonly legendDwell = chartDwell(() => this.defaults.hoverDelayMs());\n\n /** A legend item stands for its arc, so it opens the arc's tooltip over the ARC and dims the\n * other slices — the same state hovering the arc itself produces. */\n protected onLegendEnter(index: number, event: Event): void {\n this.legendDwell.schedule(\n index,\n () => this.legendHighlight.set(index),\n event,\n );\n this.activeMark.enter(index, event, this.arcAt(event, index));\n }\n\n protected onLegendLeave(): void {\n this.legendDwell.cancel();\n this.legendHighlight.set(-1);\n this.activeMark.leave();\n }\n\n protected onLegendFocus(index: number, event: FocusEvent): void {\n this.roving.focus(index);\n this.onLegendEnter(index, event);\n }\n\n protected onLegendClick(\n slice: PieChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(slice);\n if (this.defaults.pinOnClick()) {\n this.activeMark.pin(index, event, this.arcAt(event, index));\n }\n }\n\n private arcAt(event: Event, index: number): Element | null {\n return markAt(\n (event.currentTarget as Element).closest('.chart'),\n index,\n '.slice',\n );\n }\n\n protected isDimmed(index: number): boolean {\n // Naming a slice in the legend fades the rest whether or not `dimOthers` is set, the way every\n // chart legend singles out its series; `dimOthers` governs what a pointer over the ring does.\n const legendHighlight = this.legendHighlight();\n if (legendHighlight !== -1) {\n return legendHighlight !== index;\n }\n\n return (\n this.dimOthers() &&\n this.activeMark.index() !== -1 &&\n this.activeMark.index() !== index\n );\n }\n\n protected onMarkNavigation(\n event: KeyboardEvent,\n index: number,\n scope: string,\n ): void {\n this.roving.navigate(\n event,\n index,\n (event.currentTarget as Element).closest(scope),\n );\n }\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const entry = this.slices()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !entry) {\n return null;\n }\n\n return {\n category: '',\n entries: [\n {\n label: entry.slice.label,\n value: entry.slice.value,\n formatted: this.partOfWhole()\n ? `${entry.formattedValue} · ${entry.formattedPercent}`\n : entry.formattedValue,\n color: entry.color,\n },\n ],\n };\n },\n );\n\n protected readonly viewBox = `0 0 ${RING_VIEW_BOX_SIZE} ${RING_VIEW_BOX_SIZE}`;\n\n protected readonly total = computed(() =>\n resolveTotal(this.data().map((slice) => slice.value)),\n );\n\n protected readonly visibleSlices = computed(() =>\n groupSmallest(this.data(), this.maxSlices(), this.otherLabelResolved()),\n );\n\n protected readonly dataTableColumns = computed<readonly string[]>(() =>\n this.partOfWhole()\n ? [\n this.intl().chart.labelColumn,\n this.intl().chart.valueColumn,\n this.intl().chart.shareColumn,\n ]\n : [this.intl().chart.labelColumn, this.intl().chart.valueColumn],\n );\n\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.slices().map((entry) => ({\n key: entry.slice.id,\n cells: this.partOfWhole()\n ? [entry.slice.label, entry.formattedValue, entry.formattedPercent]\n : [entry.slice.label, entry.formattedValue],\n })),\n );\n\n protected readonly slices = computed(() => {\n const data = this.visibleSlices();\n const values = data.map((slice) => slice.value);\n const arcs = sliceArcs(values);\n const percents = largestRemainder(positiveValues(values));\n const innerRadius = resolveInnerRadius(\n RING_OUTER_RADIUS,\n this.innerRadius(),\n );\n const format = (value: number) =>\n this.valueFormatResolved()(value, 'tooltip');\n\n const midRadius = (RING_OUTER_RADIUS + innerRadius) / 2;\n\n return data.map((slice, index) => ({\n slice,\n // Halfway along the arc and halfway through the ring: the one point that is inside a slice\n // whatever its sweep, which the bounding box of a curved wedge is not.\n center: ringCoords(\n RING_CENTER,\n RING_CENTER,\n midRadius,\n (arcs[index].startAngle + arcs[index].endAngle) / 2,\n ),\n path: arcPath(\n RING_CENTER,\n RING_CENTER,\n RING_OUTER_RADIUS,\n innerRadius,\n arcs[index].startAngle,\n arcs[index].endAngle,\n ),\n color:\n CHART_SERIES_COLORS[\n paletteIndex(slice.slot, index, CHART_SERIES_COLORS.length)\n ],\n formattedValue: format(slice.value),\n formattedPercent: formatWholePercent(\n percents[index],\n this.defaults.locale,\n ),\n }));\n });\n\n /** The held slice's centre as a share of the ring box. The badge is HTML over the ring rather\n * than a `foreignObject` inside it: inside, the viewBox scale grows the badge with the ring and\n * the grid that centres the glyph does not lay out. */\n protected readonly pinnedEntry = computed(() => {\n const entry = this.activeMark.pinned()\n ? this.slices()[this.activeMark.index()]\n : undefined;\n\n return entry\n ? {\n center: {\n x: (entry.center.x / RING_VIEW_BOX_SIZE) * 100,\n y: (entry.center.y / RING_VIEW_BOX_SIZE) * 100,\n },\n }\n : null;\n });\n\n protected readonly resolvedCenterValue = computed(\n () =>\n this.centerValue() ?? this.valueFormatResolved()(this.total(), 'tooltip'),\n );\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.intl().chart,\n this.caption() ?? this.intl().chart.title,\n this.data().map((slice) => ({\n label: slice.label,\n value: slice.value,\n })),\n (value) => this.valueFormatResolved()(value, 'tooltip'),\n this.dataTableResolved() !== 'none',\n ),\n );\n\n protected readonly hole = computed(() => holeFraction(this.innerRadius()));\n\n protected entryLabel(entry: {\n slice: PieChartSlice;\n formattedValue: string;\n formattedPercent: string;\n }) {\n return this.partOfWhole()\n ? `${entry.slice.label}, ${entry.formattedValue}, ${entry.formattedPercent}`\n : `${entry.slice.label}, ${entry.formattedValue}`;\n }\n\n protected onSliceKey(slice: PieChartSlice, event: Event): void {\n // Only the legend item's own key opens it: a key pressed on a control inside belongs to that\n // control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.sliceClicked.emit(slice);\n }\n\n // Both focusable would double the tab order; the legend items already carry the route.\n // Without this the ring is unreachable at `legend=\"none\"`.\n protected readonly ringCarriesTheRoute = computed(\n () => this.interactive() && this.legend() === 'none',\n );\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n /** Placeholder legend rows while loading. Follows the real slice count so the\n * chart does not resize when the data lands; falls back to three when `data`\n * is still empty. */\n protected readonly skeletonRows = computed(() =>\n Array.from({ length: Math.max(this.data().length, 3) }),\n );\n}\n","<figure\n class=\"pie-chart\"\n [style.--_pie-chart-hole-fraction]=\"hole()\">\n @if (activeMark.pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"activeMark.release()\">\n {{ intl().chart.unpin }}\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p\n class=\"empty-text is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n </div>\n } @else if (loading() || !renderReady()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\"\n [class.legend-bottom]=\"legend() === 'bottom'\">\n <ds-skeleton\n circle\n width=\"var(--_pie-chart-size)\"\n height=\"var(--_pie-chart-size)\"\n [shimmer]=\"loading()\" />\n\n @if (legend() !== 'none') {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonRows(); track $index) {\n <ds-skeleton\n height=\"var(--_pie-chart-legend-row-height)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p class=\"empty-text\">\n {{ emptyTextResolved() }}\n </p>\n </div>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [class.legend-bottom]=\"legend() === 'bottom'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipSwatches]=\"defaults.tooltipSwatches()\"\n [dsChartTooltipPinned]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <div\n class=\"ring\"\n [class.ring-outline]=\"total() === 0\">\n <svg\n class=\"ring-svg\"\n [class.dims-others]=\"dimOthers()\"\n [attr.aria-hidden]=\"ringCarriesTheRoute() ? null : true\"\n [attr.viewBox]=\"viewBox\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <path\n class=\"slice\"\n [class.interactive]=\"interactive()\"\n [class.pins]=\"defaults.pinOnClick()\"\n [class.is-active]=\"activeMark.index() === index\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === index\n \"\n [class.is-dimmed]=\"isDimmed(index)\"\n [class.focusable]=\"ringCarriesTheRoute()\"\n [attr.d]=\"entry.path\"\n [style.fill]=\"entry.color\"\n [attr.role]=\"ringCarriesTheRoute() ? 'button' : null\"\n [attr.tabindex]=\"\n ringCarriesTheRoute()\n ? index === roving.tabStop()\n ? 0\n : -1\n : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"\n ringCarriesTheRoute() ? entryLabel(entry) : null\n \"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.ring-svg')\"\n (click)=\"onMarkClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n </path>\n }\n </svg>\n\n @if (hole() > 0) {\n <div class=\"center\">\n <span class=\"center-value\">\n {{ resolvedCenterValue() }}\n </span>\n\n @if (centerLabel()) {\n <span class=\"center-label\">\n {{ centerLabel() }}\n </span>\n }\n </div>\n }\n\n @if (pinnedEntry(); as entry) {\n <span\n class=\"pin-marker\"\n [style.left.%]=\"entry.center.x\"\n [style.top.%]=\"entry.center.y\">\n <ds-icon\n name=\"pin\"\n [size]=\"14\" />\n </span>\n }\n </div>\n\n @if (legend() !== 'none') {\n <ul class=\"legend\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <li\n class=\"legend-item\"\n [class.interactive]=\"interactive()\"\n [class.pins]=\"defaults.pinOnClick()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === roving.tabStop() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"onLegendEnter(index, $event)\"\n (pointerleave)=\"onLegendLeave()\"\n (focus)=\"onLegendFocus(index, $event)\"\n (blur)=\"onLegendLeave()\"\n (keydown)=\"onMarkNavigation($event, index, '.legend')\"\n (click)=\"onLegendClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n <span\n class=\"swatch\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ entry.slice.label }}\n </span>\n\n <span class=\"legend-value\">\n {{ entry.formattedValue }}\n </span>\n\n @if (partOfWhole()) {\n <span class=\"legend-percent\">\n {{ entry.formattedPercent }}\n </span>\n }\n </li>\n }\n </ul>\n }\n </div>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"dataTableColumns()\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;AAC7B,MAAM,iBAAiB,GAAG,IAAI;AAEvB,MAAM,oBAAoB,GAAG,IAAI;AAExC;AAC6C;AACvC,SAAU,YAAY,CAAC,WAAmB,EAAA;AAC9C,IAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,WAAW,IAAI,CAAC,IAAI,WAAW,GAAG;AACvE,UAAE,KAAK,CAAC,WAAW;UACjB,oBAAoB;AAC1B;AAEA;;;AAG2D;SAC3C,aAAa,CAC3B,MAAgC,EAChC,KAAoB,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,EACrB,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACb,uBAAuB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,SAAA,EAAA,MAAA,EAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAQd,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAf7B,SAAS;+BACE,cAAc,EAAA,UAAA,EACZ,IAAI,EAAA,OAAA,EACP;wBACP,iBAAiB;wBACjB,qBAAqB;wBACrB,aAAa;wBACb,uBAAuB;AACxB,qBAAA,EAAA,IAAA,EAGK,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,EAAA,aAAA,EACzC,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,q5MAAA,EAAA,MAAA,EAAA,CAAA,4tVAAA,CAAA,EAAA;g8EA2I3C,gBAAgB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErNtB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-pie-chart.mjs","sources":["../../../src/lib/components/pie-chart/pie-chart.math.ts","../../../src/lib/components/pie-chart/pie-chart.component.ts","../../../src/lib/components/pie-chart/pie-chart.component.html","../../../src/lib/components/pie-chart/ids-group-ltd-ids-design-system-components-pie-chart.ts"],"sourcesContent":["import type { PieChartSlice } from './pie-chart.types';\n\nconst FULL_TURN = Math.PI * 2;\nconst FULL_TURN_EPSILON = 1e-9;\n\nexport const DEFAULT_INNER_RADIUS = 0.68;\n\n/** Valid over [0, 1); anything else falls back. */\nexport function holeFraction(innerRadius: number): number {\n return Number.isFinite(innerRadius) && innerRadius >= 0 && innerRadius < 1\n ? round(innerRadius)\n : DEFAULT_INNER_RADIUS;\n}\n\n/** The slices a legend can carry, with everything past `limit` summed into one that takes the neutral eighth palette slot. */\nexport function groupSmallest(\n slices: readonly PieChartSlice[],\n limit: number | null,\n otherLabel: string,\n): PieChartSlice[] {\n if (limit === null || !Number.isInteger(limit) || limit < 2) {\n return [...slices];\n }\n if (slices.length <= limit) {\n return [...slices];\n }\n const ranked = [...slices]\n .map((slice, index) => ({ index, value: positiveValues([slice.value])[0] }))\n .sort((a, b) => b.value - a.value || a.index - b.index);\n const kept = new Set(ranked.slice(0, limit - 1).map((entry) => entry.index));\n const remainder = slices\n .filter((unusedSlice, index) => !kept.has(index))\n .reduce((sum, slice) => sum + positiveValues([slice.value])[0], 0);\n\n return [\n ...slices.filter((unusedSlice, index) => kept.has(index)),\n { id: 'ds-pie-other', label: otherLabel, value: remainder, slot: 8 },\n ];\n}\n\nexport interface PieArc {\n readonly startAngle: number;\n readonly endAngle: number;\n}\n\n/** Anything that is not a positive share becomes zero; a NaN would reach every slice through the total and draw nothing, silently. */\nexport function positiveValues(values: readonly number[]): number[] {\n return values.map((value) =>\n Number.isFinite(value) && value > 0 ? value : 0,\n );\n}\n\nexport function resolveTotal(values: readonly number[]): number {\n return positiveValues(values).reduce((sum, value) => sum + value, 0);\n}\n\nexport function sliceArcs(values: readonly number[]): PieArc[] {\n const positive = positiveValues(values);\n const total = resolveTotal(positive);\n if (total <= 0) {\n return positive.map(() => ({ startAngle: 0, endAngle: 0 }));\n }\n let cursor = 0;\n\n return positive.map((value) => {\n const startAngle = cursor;\n cursor += (value / total) * FULL_TURN;\n\n return { startAngle, endAngle: cursor };\n });\n}\n\nexport function resolveInnerRadius(\n outerRadius: number,\n innerRadius: number,\n): number {\n if (!Number.isFinite(outerRadius) || outerRadius <= 0) {\n return 0;\n }\n\n return outerRadius * holeFraction(innerRadius);\n}\n\nexport function paletteIndex(\n slot: number | undefined,\n index: number,\n paletteLength: number,\n): number {\n if (paletteLength <= 0) {\n return 0;\n }\n if (slot !== undefined && Number.isInteger(slot) && slot > 0) {\n return (slot - 1) % paletteLength;\n }\n\n return index % paletteLength;\n}\n\n/** One `\"x y\"` pair for a path. Angles run clockwise from 12 o'clock. */\nexport function ringPoint(\n centerX: number,\n centerY: number,\n radius: number,\n angle: number,\n): string {\n const { x, y } = ringCoords(centerX, centerY, radius, angle);\n\n return `${x} ${y}`;\n}\n\n/** The same point as numbers. */\nexport function ringCoords(\n centerX: number,\n centerY: number,\n radius: number,\n angle: number,\n): { x: number; y: number } {\n return {\n x: round(centerX + radius * Math.sin(angle)),\n y: round(centerY - radius * Math.cos(angle)),\n };\n}\n\nexport function arcPath(\n centerX: number,\n centerY: number,\n outerRadius: number,\n innerRadius: number,\n startAngle: number,\n endAngle: number,\n): string {\n const finite = [\n centerX,\n centerY,\n outerRadius,\n innerRadius,\n startAngle,\n endAngle,\n ].every((value) => Number.isFinite(value));\n if (!finite || outerRadius <= 0) {\n return '';\n }\n const inner = Math.min(Math.max(innerRadius, 0), outerRadius);\n const sweep = endAngle - startAngle;\n if (sweep <= 0) {\n return '';\n }\n if (sweep >= FULL_TURN - FULL_TURN_EPSILON) {\n return fullRingPath(centerX, centerY, outerRadius, inner);\n }\n const largeArcFlag = sweep > Math.PI ? 1 : 0;\n const outerRadii = `${round(outerRadius)} ${round(outerRadius)}`;\n const outerArc =\n `M ${ringPoint(centerX, centerY, outerRadius, startAngle)}` +\n ` A ${outerRadii} 0 ${largeArcFlag} 1 ${ringPoint(centerX, centerY, outerRadius, endAngle)}`;\n if (inner === 0) {\n return `${outerArc} L ${round(centerX)} ${round(centerY)} Z`;\n }\n const innerRadii = `${round(inner)} ${round(inner)}`;\n\n return (\n `${outerArc} L ${ringPoint(centerX, centerY, inner, endAngle)}` +\n ` A ${innerRadii} 0 ${largeArcFlag} 0 ${ringPoint(centerX, centerY, inner, startAngle)} Z`\n );\n}\n\nfunction fullRingPath(\n centerX: number,\n centerY: number,\n outerRadius: number,\n innerRadius: number,\n): string {\n const outer = circlePath(centerX, centerY, outerRadius, 1);\n if (innerRadius <= 0) {\n return outer;\n }\n\n // The inner circle winds the other way so the nonzero fill rule cancels it against the outer one.\n return `${outer} ${circlePath(centerX, centerY, innerRadius, 0)}`;\n}\n\n/** A closed circle is two half-turns: a single full-turn SVG arc draws nothing. */\nfunction circlePath(\n centerX: number,\n centerY: number,\n radius: number,\n sweepFlag: 0 | 1,\n): string {\n const top = ringPoint(centerX, centerY, radius, 0);\n const bottom = ringPoint(centerX, centerY, radius, Math.PI);\n const radii = `${round(radius)} ${round(radius)}`;\n\n return `M ${top} A ${radii} 0 1 ${sweepFlag} ${bottom} A ${radii} 0 1 ${sweepFlag} ${top} Z`;\n}\n\nfunction round(value: number): number {\n return Math.round(value * 1000) / 1000;\n}\n","import type {\n ChartDimmable,\n ChartWithDataTable,\n ChartWithTooltipTrigger,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n chartDwell,\n describeSeries,\n formatWholePercent,\n largestRemainder,\n markAt,\n rovingMarks,\n chartRenderGate,\n DsChartBase,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { ChartDataTable } from '@ids-group-ltd/ids-design-system/core';\nimport {\n ChartTooltipDirective,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport {\n DEFAULT_INNER_RADIUS,\n arcPath,\n groupSmallest,\n holeFraction,\n paletteIndex,\n positiveValues,\n resolveInnerRadius,\n resolveTotal,\n ringCoords,\n sliceArcs,\n} from './pie-chart.math';\nimport type { PieChartSlice } from './pie-chart.types';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\n\nconst RING_VIEW_BOX_SIZE = 100;\nconst RING_CENTER = RING_VIEW_BOX_SIZE / 2;\nconst RING_OUTER_RADIUS = RING_VIEW_BOX_SIZE / 2;\n\n@Component({\n selector: 'ds-pie-chart',\n standalone: true,\n imports: [\n SkeletonComponent,\n ChartTooltipDirective,\n IconComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './pie-chart.component.html',\n styleUrl: './pie-chart.component.scss',\n host: { '[class.framed]': \"frameResolved() === 'auto'\" },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PieChartComponent\n extends DsChartBase\n implements ChartDimmable, ChartWithDataTable, ChartWithTooltipTrigger\n{\n protected readonly renderReady = chartRenderGate();\n\n /** One slice per entry. A non-positive or non-finite value counts as zero. */\n readonly data = input<readonly PieChartSlice[]>([]);\n\n /** Printed inside the ring. Null prints the sum through `valueFormat`. */\n readonly centerValue = input<string | null>(null);\n\n /** Caption under the centre value. */\n readonly centerLabel = input<string | null>(null);\n\n /** Legend placement, logical so it flips in right-to-left. */\n readonly legend = input<'end' | 'bottom' | 'none'>('end');\n\n /** Longest legend to draw; past it the smallest slices are summed into one. Values below 2 are ignored. */\n readonly maxSlices = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Names the grouped slice. Unset falls back to `DS_INTL.chart.other`. */\n readonly otherLabel = input<string | null>(null);\n\n readonly otherLabelResolved = computed(\n () => this.otherLabel() ?? this.intl().chart.other,\n );\n\n /** The hole, as a fraction of the outer radius. Zero draws a solid pie without centre content. */\n readonly innerRadius = input(DEFAULT_INNER_RADIUS, {\n transform: numberAttribute,\n });\n\n /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,\n * `'visible'` opens it, `'none'` renders none. Unset falls back to `DS_CONFIG.chart.dataTable`,\n * then `'none'`. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Prints each slice's share in the legend, the tooltip and the data table. */\n readonly partOfWhole = input(true, { transform: booleanAttribute });\n\n readonly dataTableResolved = this.defaults.dataTable;\n\n /** The slice that was clicked or activated with Enter or Space. */\n readonly sliceClicked = output<PieChartSlice>();\n\n /** Dims every other mark while one is hovered or focused. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Whether a hovered or focused slice opens a tooltip. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n protected readonly tooltipTemplate =\n contentChild<TemplateRef<{ $implicit: ChartTooltipContext }>>(\n 'dsChartTooltip',\n );\n\n private readonly tooltipLingerResolved = this.defaults.tooltipLingerMs;\n\n protected readonly activeMark = chartActiveMark(\n () => this.tooltipLingerResolved(),\n () => this.defaults.hoverDelayMs(),\n );\n\n protected onMarkClick(\n payload: PieChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(payload);\n if (this.defaults.pinOnClick()) {\n this.activeMark.pin(index, event);\n }\n }\n protected readonly roving = rovingMarks(() => this.slices().length);\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.roving.focus(index);\n this.activeMark.enter(index, event);\n }\n\n private readonly legendHighlight = signal(-1);\n private readonly legendDwell = chartDwell(() => this.defaults.hoverDelayMs());\n\n /** A legend item opens the arc's tooltip and dims the other slices, as hovering the arc does. */\n protected onLegendEnter(index: number, event: Event): void {\n this.legendDwell.schedule(\n index,\n () => this.legendHighlight.set(index),\n event,\n );\n this.activeMark.enter(index, event, this.arcAt(event, index));\n }\n\n protected onLegendLeave(): void {\n this.legendDwell.cancel();\n this.legendHighlight.set(-1);\n this.activeMark.leave();\n }\n\n protected onLegendFocus(index: number, event: FocusEvent): void {\n this.roving.focus(index);\n this.onLegendEnter(index, event);\n }\n\n protected onLegendClick(\n slice: PieChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(slice);\n if (this.defaults.pinOnClick()) {\n this.activeMark.pin(index, event, this.arcAt(event, index));\n }\n }\n\n private arcAt(event: Event, index: number): Element | null {\n return markAt(\n (event.currentTarget as Element).closest('.chart'),\n index,\n '.slice',\n );\n }\n\n protected isDimmed(index: number): boolean {\n // The legend dims the rest whether or not `dimOthers` is set; `dimOthers` governs the ring only.\n const legendHighlight = this.legendHighlight();\n if (legendHighlight !== -1) {\n return legendHighlight !== index;\n }\n\n return (\n this.dimOthers() &&\n this.activeMark.index() !== -1 &&\n this.activeMark.index() !== index\n );\n }\n\n protected onMarkNavigation(\n event: KeyboardEvent,\n index: number,\n scope: string,\n ): void {\n this.roving.navigate(\n event,\n index,\n (event.currentTarget as Element).closest(scope),\n );\n }\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const entry = this.slices()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !entry) {\n return null;\n }\n\n return {\n category: '',\n entries: [\n {\n label: entry.slice.label,\n value: entry.slice.value,\n formatted: this.partOfWhole()\n ? `${entry.formattedValue} · ${entry.formattedPercent}`\n : entry.formattedValue,\n color: entry.color,\n },\n ],\n };\n },\n );\n\n protected readonly viewBox = `0 0 ${RING_VIEW_BOX_SIZE} ${RING_VIEW_BOX_SIZE}`;\n\n protected readonly total = computed(() =>\n resolveTotal(this.data().map((slice) => slice.value)),\n );\n\n protected readonly visibleSlices = computed(() =>\n groupSmallest(this.data(), this.maxSlices(), this.otherLabelResolved()),\n );\n\n protected readonly dataTableColumns = computed<readonly string[]>(() =>\n this.partOfWhole()\n ? [\n this.intl().chart.labelColumn,\n this.intl().chart.valueColumn,\n this.intl().chart.shareColumn,\n ]\n : [this.intl().chart.labelColumn, this.intl().chart.valueColumn],\n );\n\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.slices().map((entry) => ({\n key: entry.slice.id,\n cells: this.partOfWhole()\n ? [entry.slice.label, entry.formattedValue, entry.formattedPercent]\n : [entry.slice.label, entry.formattedValue],\n })),\n );\n\n protected readonly slices = computed(() => {\n const data = this.visibleSlices();\n const values = data.map((slice) => slice.value);\n const arcs = sliceArcs(values);\n const percents = largestRemainder(positiveValues(values));\n const innerRadius = resolveInnerRadius(\n RING_OUTER_RADIUS,\n this.innerRadius(),\n );\n const format = (value: number) =>\n this.valueFormatResolved()(value, 'tooltip');\n\n const midRadius = (RING_OUTER_RADIUS + innerRadius) / 2;\n\n return data.map((slice, index) => ({\n slice,\n // Halfway along the arc and through the ring: inside the slice whatever its sweep.\n center: ringCoords(\n RING_CENTER,\n RING_CENTER,\n midRadius,\n (arcs[index].startAngle + arcs[index].endAngle) / 2,\n ),\n path: arcPath(\n RING_CENTER,\n RING_CENTER,\n RING_OUTER_RADIUS,\n innerRadius,\n arcs[index].startAngle,\n arcs[index].endAngle,\n ),\n color:\n CHART_SERIES_COLORS[\n paletteIndex(slice.slot, index, CHART_SERIES_COLORS.length)\n ],\n formattedValue: format(slice.value),\n formattedPercent: formatWholePercent(\n percents[index],\n this.defaults.locale,\n ),\n }));\n });\n\n /** The held slice's centre as a share of the ring box. The badge is HTML over the ring: inside a `foreignObject` the viewBox scale grows it and the centring grid does not lay out. */\n protected readonly pinnedEntry = computed(() => {\n const entry = this.activeMark.pinned()\n ? this.slices()[this.activeMark.index()]\n : undefined;\n\n return entry\n ? {\n center: {\n x: (entry.center.x / RING_VIEW_BOX_SIZE) * 100,\n y: (entry.center.y / RING_VIEW_BOX_SIZE) * 100,\n },\n }\n : null;\n });\n\n protected readonly resolvedCenterValue = computed(\n () =>\n this.centerValue() ?? this.valueFormatResolved()(this.total(), 'tooltip'),\n );\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.intl().chart,\n this.caption() ?? this.intl().chart.title,\n this.data().map((slice) => ({\n label: slice.label,\n value: slice.value,\n })),\n (value) => this.valueFormatResolved()(value, 'tooltip'),\n this.dataTableResolved() !== 'none',\n ),\n );\n\n protected readonly hole = computed(() => holeFraction(this.innerRadius()));\n\n protected entryLabel(entry: {\n slice: PieChartSlice;\n formattedValue: string;\n formattedPercent: string;\n }) {\n return this.partOfWhole()\n ? `${entry.slice.label}, ${entry.formattedValue}, ${entry.formattedPercent}`\n : `${entry.slice.label}, ${entry.formattedValue}`;\n }\n\n protected onSliceKey(slice: PieChartSlice, event: Event): void {\n // A key pressed on a control inside the item belongs to that control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.sliceClicked.emit(slice);\n }\n\n // The legend items carry the tab route; the ring needs it only at `legend=\"none\"`.\n protected readonly ringCarriesTheRoute = computed(\n () => this.interactive() && this.legend() === 'none',\n );\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n /** Placeholder legend rows while loading. */\n protected readonly skeletonRows = computed(() =>\n Array.from({ length: Math.max(this.data().length, 3) }),\n );\n}\n","<figure\n class=\"pie-chart\"\n [style.--_pie-chart-hole-fraction]=\"hole()\">\n @if (activeMark.pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"activeMark.release()\">\n {{ intl().chart.unpin }}\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p\n class=\"empty-text is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n </div>\n } @else if (loading() || !renderReady()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\"\n [class.legend-bottom]=\"legend() === 'bottom'\">\n <ds-skeleton\n circle\n width=\"var(--_pie-chart-size)\"\n height=\"var(--_pie-chart-size)\"\n [shimmer]=\"loading()\" />\n\n @if (legend() !== 'none') {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonRows(); track $index) {\n <ds-skeleton\n height=\"var(--_pie-chart-legend-row-height)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p class=\"empty-text\">\n {{ emptyTextResolved() }}\n </p>\n </div>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [class.legend-bottom]=\"legend() === 'bottom'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipSwatches]=\"defaults.tooltipSwatches()\"\n [dsChartTooltipPinned]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <div\n class=\"ring\"\n [class.ring-outline]=\"total() === 0\">\n <svg\n class=\"ring-svg\"\n [class.dims-others]=\"dimOthers()\"\n [attr.aria-hidden]=\"ringCarriesTheRoute() ? null : true\"\n [attr.viewBox]=\"viewBox\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <path\n class=\"slice\"\n [class.interactive]=\"interactive()\"\n [class.pins]=\"defaults.pinOnClick()\"\n [class.is-active]=\"activeMark.index() === index\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === index\n \"\n [class.is-dimmed]=\"isDimmed(index)\"\n [class.focusable]=\"ringCarriesTheRoute()\"\n [attr.d]=\"entry.path\"\n [style.fill]=\"entry.color\"\n [attr.role]=\"ringCarriesTheRoute() ? 'button' : null\"\n [attr.tabindex]=\"\n ringCarriesTheRoute()\n ? index === roving.tabStop()\n ? 0\n : -1\n : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"\n ringCarriesTheRoute() ? entryLabel(entry) : null\n \"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.ring-svg')\"\n (click)=\"onMarkClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n </path>\n }\n </svg>\n\n @if (hole() > 0) {\n <div class=\"center\">\n <span class=\"center-value\">\n {{ resolvedCenterValue() }}\n </span>\n\n @if (centerLabel()) {\n <span class=\"center-label\">\n {{ centerLabel() }}\n </span>\n }\n </div>\n }\n\n @if (pinnedEntry(); as entry) {\n <span\n class=\"pin-marker\"\n [style.left.%]=\"entry.center.x\"\n [style.top.%]=\"entry.center.y\">\n <ds-icon\n name=\"pin\"\n [size]=\"14\" />\n </span>\n }\n </div>\n\n @if (legend() !== 'none') {\n <ul class=\"legend\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <li\n class=\"legend-item\"\n [class.interactive]=\"interactive()\"\n [class.pins]=\"defaults.pinOnClick()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === roving.tabStop() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"onLegendEnter(index, $event)\"\n (pointerleave)=\"onLegendLeave()\"\n (focus)=\"onLegendFocus(index, $event)\"\n (blur)=\"onLegendLeave()\"\n (keydown)=\"onMarkNavigation($event, index, '.legend')\"\n (click)=\"onLegendClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n <span\n class=\"swatch\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ entry.slice.label }}\n </span>\n\n <span class=\"legend-value\">\n {{ entry.formattedValue }}\n </span>\n\n @if (partOfWhole()) {\n <span class=\"legend-percent\">\n {{ entry.formattedPercent }}\n </span>\n }\n </li>\n }\n </ul>\n }\n </div>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"dataTableColumns()\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;AAC7B,MAAM,iBAAiB,GAAG,IAAI;AAEvB,MAAM,oBAAoB,GAAG,IAAI;AAExC;AACM,SAAU,YAAY,CAAC,WAAmB,EAAA;AAC9C,IAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,WAAW,IAAI,CAAC,IAAI,WAAW,GAAG;AACvE,UAAE,KAAK,CAAC,WAAW;UACjB,oBAAoB;AAC1B;AAEA;SACgB,aAAa,CAC3B,MAAgC,EAChC,KAAoB,EACpB,UAAkB,EAAA;AAElB,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE;AAC3D,QAAA,OAAO,CAAC,GAAG,MAAM,CAAC;IACpB;AACA,IAAA,IAAI,MAAM,CAAC,MAAM,IAAI,KAAK,EAAE;AAC1B,QAAA,OAAO,CAAC,GAAG,MAAM,CAAC;IACpB;AACA,IAAA,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM;SACtB,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1E,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;AACzD,IAAA,MAAM,IAAI,GA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,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnItB;;AAEG;;;;"}
|
|
@@ -18,10 +18,8 @@ class PopoverComponent {
|
|
|
18
18
|
ref = null;
|
|
19
19
|
triggerElement = null;
|
|
20
20
|
focusTimer = null;
|
|
21
|
-
/** Public panel tokens forwarded onto the portaled overlay pane on open so
|
|
22
|
-
*
|
|
23
|
-
* Not the whole set: `prepareOverlayEnter` also forwards `DROPDOWN_PANEL_TOKENS`
|
|
24
|
-
* (overlay-motion.ts) onto every pane, the `--ds-option-*` family among them. */
|
|
21
|
+
/** Public panel tokens forwarded onto the portaled overlay pane on open, so a
|
|
22
|
+
* consumer's `ds-popover { --ds-popover-panel-*: ... }` reaches it. */
|
|
25
23
|
panelTokens = [
|
|
26
24
|
'--ds-popover-bg-color',
|
|
27
25
|
'--ds-popover-border-color',
|
|
@@ -31,8 +29,7 @@ class PopoverComponent {
|
|
|
31
29
|
'--ds-popover-max-width',
|
|
32
30
|
'--ds-popover-min-width',
|
|
33
31
|
'--ds-popover-arrow-size',
|
|
34
|
-
//
|
|
35
|
-
// consumer scoping the menu's width in their own DOM can't reach it.
|
|
32
|
+
// A projected ds-menu is portaled into the pane, out of reach of a scoped width.
|
|
36
33
|
'--ds-menu-min-width',
|
|
37
34
|
'--ds-menu-max-width',
|
|
38
35
|
];
|
|
@@ -42,27 +39,22 @@ class PopoverComponent {
|
|
|
42
39
|
placement = input('bottom', ...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
43
40
|
/** Render a small caret pointing at the trigger. */
|
|
44
41
|
arrow = input(false, { ...(ngDevMode ? { debugName: "arrow" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
45
|
-
/** ARIA role for the panel (e.g. 'dialog'
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* scroll leaves focus where it lands (non-modal). Leave null for plain,
|
|
49
|
-
* non-interactive text popovers. */
|
|
42
|
+
/** ARIA role for the panel (e.g. 'dialog'). When set, the panel traps focus and captures it
|
|
43
|
+
* on open; Escape or an in-panel close returns focus to the trigger, an outside click or
|
|
44
|
+
* scroll does not (non-modal). Leave null for plain text popovers. */
|
|
50
45
|
panelRole = input(null, ...(ngDevMode ? [{ debugName: "panelRole" }] : /* istanbul ignore next */ []));
|
|
51
46
|
/** Accessible name for the panel; pair with `panelRole`. */
|
|
52
47
|
panelLabel = input(null, ...(ngDevMode ? [{ debugName: "panelLabel" }] : /* istanbul ignore next */ []));
|
|
53
|
-
/** Open/closed state
|
|
48
|
+
/** Open/closed state, for callers binding `aria-expanded` on the trigger. */
|
|
54
49
|
opened = signal(false, ...(ngDevMode ? [{ debugName: "opened" }] : /* istanbul ignore next */ []));
|
|
55
|
-
/** Resolved placement after the overlay positions
|
|
50
|
+
/** Resolved placement after the overlay positions; drives the arrow direction. */
|
|
56
51
|
resolvedPlacement = signal('bottom', ...(ngDevMode ? [{ debugName: "resolvedPlacement" }] : /* istanbul ignore next */ []));
|
|
57
52
|
toggle(trigger) {
|
|
58
53
|
if (this.preview.staticPreview()) {
|
|
59
54
|
return;
|
|
60
55
|
}
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
// outside-pointer listener FIRST, so `ref` is already gone by the time this runs and the
|
|
64
|
-
// call re-opens on the new trigger instead of closing. ds-table's column filters, row menus
|
|
65
|
-
// and clipped-cell text all depend on that order.
|
|
56
|
+
// Clicking another trigger while open dismisses the overlay through the CDK's outside-pointer
|
|
57
|
+
// listener FIRST, so `ref` is already gone here and this re-opens on the new trigger.
|
|
66
58
|
if (this.ref) {
|
|
67
59
|
this.close();
|
|
68
60
|
return;
|
|
@@ -88,8 +80,7 @@ class PopoverComponent {
|
|
|
88
80
|
prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);
|
|
89
81
|
forwardOverlayTokens(this.ref, this.host.nativeElement, this.panelTokens);
|
|
90
82
|
closeOnOutsidePointer(this.ref, (target) => trigger.contains(target), () => this.close('dismiss'));
|
|
91
|
-
//
|
|
92
|
-
// overflow container, so close on any outside scroll ourselves.
|
|
83
|
+
// CDK's scroll strategies miss a plain overflow container, so close on any outside scroll ourselves.
|
|
93
84
|
const removeScrollClose = closeOnScroll(this.ref, () => this.close('dismiss'));
|
|
94
85
|
clearOnDetach(this.ref, {
|
|
95
86
|
current: () => this.ref,
|
|
@@ -109,8 +100,7 @@ class PopoverComponent {
|
|
|
109
100
|
this.resolvedPlacement.set(placement);
|
|
110
101
|
this.opened.set(true);
|
|
111
102
|
if (this.panelRole()) {
|
|
112
|
-
//
|
|
113
|
-
// restore — that restore steals focus on an outside/scroll close.
|
|
103
|
+
// cdkTrapFocusAutoCapture without its destroy-time restore, which steals focus on an outside/scroll close.
|
|
114
104
|
this.focusTimer = setTimeout(() => {
|
|
115
105
|
this.focusTimer = null;
|
|
116
106
|
void this.panelTrap()?.focusTrap?.focusInitialElementWhenReady();
|
|
@@ -142,7 +132,7 @@ class PopoverComponent {
|
|
|
142
132
|
provide: DsOverlayCloseRef,
|
|
143
133
|
useExisting: forwardRef(() => PopoverComponent),
|
|
144
134
|
},
|
|
145
|
-
], viewQueries: [{ propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "panelTrap", first: true, predicate: CdkTrapFocus, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "<!-- Projected content is captured
|
|
135
|
+
], viewQueries: [{ propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "panelTrap", first: true, predicate: CdkTrapFocus, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: [":host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--ds-radius-panel));--_popover-shadow: var(--ds-popover-shadow, var(--ds-elevation-overlay));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0;--ds-menu-clip-radius: calc( var(--_popover-radius) - var(--border-width-default) )}.arrow{--_popover-arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_popover-arrow-size) * 2);height:calc(var(--_popover-arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";position:absolute;width:var(--_popover-arrow-size);height:var(--_popover-arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
146
136
|
}
|
|
147
137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
148
138
|
type: Component,
|
|
@@ -151,7 +141,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
151
141
|
provide: DsOverlayCloseRef,
|
|
152
142
|
useExisting: forwardRef(() => PopoverComponent),
|
|
153
143
|
},
|
|
154
|
-
], template: "<!-- Projected content is captured
|
|
144
|
+
], template: "<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: [":host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--ds-radius-panel));--_popover-shadow: var(--ds-popover-shadow, var(--ds-elevation-overlay));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0;--ds-menu-clip-radius: calc( var(--_popover-radius) - var(--border-width-default) )}.arrow{--_popover-arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_popover-arrow-size) * 2);height:calc(var(--_popover-arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";position:absolute;width:var(--_popover-arrow-size);height:var(--_popover-arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"] }]
|
|
155
145
|
}], propDecorators: { panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], panelTrap: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkTrapFocus), { isSignal: true }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], arrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrow", required: false }] }], panelRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelRole", required: false }] }], panelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelLabel", required: false }] }] } });
|
|
156
146
|
function buildPositions(placement, align, offsetPx) {
|
|
157
147
|
const crossStart = align === 'start' ? 'start' : 'end';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-popover.mjs","sources":["../../../src/lib/components/popover/popover.component.ts","../../../src/lib/components/popover/popover.component.html","../../../src/lib/components/popover/ids-group-ltd-ids-design-system-components-popover.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n clearOnDetach,\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n focusIsInside,\n forwardOverlayTokens,\n overlayPlacementOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\n\nexport type PopoverAlign = 'start' | 'end';\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n@Component({\n selector: 'ds-popover',\n standalone: true,\n imports: [CdkTrapFocus, NgTemplateOutlet],\n templateUrl: './popover.component.html',\n styleUrl: './popover.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n // Expose this popover as a DsOverlayCloseRef so projected content (e.g.\n // ds-menu-item) can close it via DI — the popover never references a child.\n providers: [\n {\n provide: DsOverlayCloseRef,\n useExisting: forwardRef(() => PopoverComponent),\n },\n ],\n})\nexport class PopoverComponent implements OnDestroy, DsOverlayCloseRef {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n protected readonly preview = inject(DsStaticPreview);\n protected readonly panelTpl = viewChild<TemplateRef<unknown>>('panel');\n private readonly panelTrap = viewChild(CdkTrapFocus);\n private ref: OverlayRef | null = null;\n private triggerElement: HTMLElement | null = null;\n private focusTimer: ReturnType<typeof setTimeout> | null = null;\n /** Public panel tokens forwarded onto the portaled overlay pane on open so\n * a consumer's `ds-popover { --ds-popover-panel-*: … }` reaches it.\n * Not the whole set: `prepareOverlayEnter` also forwards `DROPDOWN_PANEL_TOKENS`\n * (overlay-motion.ts) onto every pane, the `--ds-option-*` family among them. */\n private readonly panelTokens = [\n '--ds-popover-bg-color',\n '--ds-popover-border-color',\n '--ds-popover-radius',\n '--ds-popover-shadow',\n '--ds-popover-padding',\n '--ds-popover-max-width',\n '--ds-popover-min-width',\n '--ds-popover-arrow-size',\n // Forwarded too: a projected ds-menu is portaled into the pane, so a\n // consumer scoping the menu's width in their own DOM can't reach it.\n '--ds-menu-min-width',\n '--ds-menu-max-width',\n ];\n\n /** Cross-axis alignment of the panel against the trigger. */\n readonly align = input<PopoverAlign>('start');\n /** Which side of the trigger the panel prefers to appear on. */\n readonly placement = input<PopoverPlacement>('bottom');\n /** Render a small caret pointing at the trigger. */\n readonly arrow = input(false, { transform: booleanAttribute });\n\n /** ARIA role for the panel (e.g. 'dialog' for interactive popovers). When set,\n * the panel traps focus and captures it on open; a keyboard (Escape) or\n * in-panel close returns focus to the trigger, while an outside click or\n * scroll leaves focus where it lands (non-modal). Leave null for plain,\n * non-interactive text popovers. */\n readonly panelRole = input<string | null>(null);\n /** Accessible name for the panel; pair with `panelRole`. */\n readonly panelLabel = input<string | null>(null);\n\n /** Open/closed state — for callers binding `aria-expanded` on the trigger. */\n readonly opened = signal(false);\n /** Resolved placement after the overlay positions — drives the arrow direction. */\n readonly resolvedPlacement = signal<PopoverPlacement>('bottom');\n\n toggle(trigger: HTMLElement): void {\n if (this.preview.staticPreview()) {\n return;\n }\n // Reads as \"a second click closes\", and that is also what makes ONE popover serve many\n // triggers: clicking another trigger while open dismisses the overlay through the CDK's\n // outside-pointer listener FIRST, so `ref` is already gone by the time this runs and the\n // call re-opens on the new trigger instead of closing. ds-table's column filters, row menus\n // and clipped-cell text all depend on that order.\n if (this.ref) {\n this.close();\n\n return;\n }\n\n this.triggerElement = trigger;\n const placement = this.placement();\n const arrowOffset = this.arrow() ? 8 : 4;\n\n const positionStrategy: FlexibleConnectedPositionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(trigger)\n .withPositions(buildPositions(placement, this.align(), arrowOffset))\n .withViewportMargin(8);\n\n positionStrategy.positionChanges.subscribe((change) => {\n this.resolvedPlacement.set(\n overlayPlacementOf(\n change.connectionPair.overlayY,\n change.connectionPair.overlayX,\n ),\n );\n });\n\n const cfg: OverlayConfig = {\n positionStrategy,\n hasBackdrop: false,\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n };\n this.ref = this.overlay.create(cfg);\n prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);\n forwardOverlayTokens(this.ref, this.host.nativeElement, this.panelTokens);\n closeOnOutsidePointer(\n this.ref,\n (target) => trigger.contains(target),\n () => this.close('dismiss'),\n );\n // No backdrop catches a page scroll and CDK's scroll strategies miss a plain\n // overflow container, so close on any outside scroll ourselves.\n const removeScrollClose = closeOnScroll(this.ref, () =>\n this.close('dismiss'),\n );\n clearOnDetach(this.ref, {\n current: () => this.ref,\n always: removeScrollClose,\n clear: () => {\n this.ref = null;\n this.opened.set(false);\n },\n });\n this.ref.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close('dismiss');\n }\n });\n this.ref.attach(new TemplatePortal(this.panelTpl()!, this.vcr));\n this.resolvedPlacement.set(placement);\n this.opened.set(true);\n if (this.panelRole()) {\n // Same initial focus as cdkTrapFocusAutoCapture, minus its destroy-time\n // restore — that restore steals focus on an outside/scroll close.\n this.focusTimer = setTimeout(() => {\n this.focusTimer = null;\n void this.panelTrap()?.focusTrap?.focusInitialElementWhenReady();\n });\n }\n }\n\n close(cause: DsOverlayCloseCause = 'select'): void {\n if (!this.ref) {\n return;\n }\n clearTimeout(this.focusTimer ?? undefined);\n this.focusTimer = null;\n const focusWasInPanel = focusIsInside(this.ref);\n disposeWithLeave(this.ref, cause);\n this.ref = null;\n this.opened.set(false);\n if (focusWasInPanel) {\n this.triggerElement?.focus({ preventScroll: true });\n }\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.focusTimer ?? undefined);\n this.ref?.dispose();\n this.ref = null;\n }\n}\n\nfunction buildPositions(\n placement: PopoverPlacement,\n align: PopoverAlign,\n offsetPx: number,\n): ConnectedPosition[] {\n const crossStart = align === 'start' ? 'start' : 'end';\n const crossEnd: 'start' | 'end' = align === 'start' ? 'end' : 'start';\n\n switch (placement) {\n case 'top':\n return [\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'top',\n overlayX: crossEnd,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n ];\n case 'left':\n return [\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n ];\n case 'right':\n return [\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n ];\n default: // bottom\n return [\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'bottom',\n overlayX: crossEnd,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n ];\n }\n}\n","<!-- Projected content is captured ONCE here and stamped into whichever render\n site is active — duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MA0Da,gBAAgB,CAAA;AACV,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EAAC;AACpC,IAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;AACjC,IAAA,QAAQ,GAAG,SAAS,CAAuB,OAAO,+EAAC;AACrD,IAAA,SAAS,GAAG,SAAS,CAAC,YAAY,gFAAC;IAC5C,GAAG,GAAsB,IAAI;IAC7B,cAAc,GAAuB,IAAI;IACzC,UAAU,GAAyC,IAAI;AAC/D;;;AAGkF;AACjE,IAAA,WAAW,GAAG;QAC7B,uBAAuB;QACvB,2BAA2B;QAC3B,qBAAqB;QACrB,qBAAqB;QACrB,sBAAsB;QACtB,wBAAwB;QACxB,wBAAwB;QACxB,yBAAyB;;;QAGzB,qBAAqB;QACrB,qBAAqB;KACtB;;AAGQ,IAAA,KAAK,GAAG,KAAK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Q;AAClB,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,QAAQ,EAAE,KAAK;AACf,oBAAA,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,CAAC,QAAQ;AACnB,iBAAA;aACF;AACH,QAAA;YACE,OAAO;AACL,gBAAA;AACE,oBAAA,OAAO,EAAE,UAAU;AACnB,oBAAA,OAAO,EAAE,QAAQ;AACjB,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,QAAQ,EAAE,KAAK;AACf,oBAAA,OAAO,EAAE,QAAQ;AAClB,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE,UAAU;AACnB,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,QAAQ,EAAE,QAAQ;oBAClB,OAAO,EAAE,CAAC,QAAQ;AACnB,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE,QAAQ;AACjB,oBAAA,OAAO,EAAE,QAAQ;AACjB,oBAAA,QAAQ,EAAE,QAAQ;AAClB,oBAAA,QAAQ,EAAE,KAAK;AACf,oBAAA,OAAO,EAAE,QAAQ;AAClB,iBAAA;aACF;;AAEP;;AE9SA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-popover.mjs","sources":["../../../src/lib/components/popover/popover.component.ts","../../../src/lib/components/popover/popover.component.html","../../../src/lib/components/popover/ids-group-ltd-ids-design-system-components-popover.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n clearOnDetach,\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n focusIsInside,\n forwardOverlayTokens,\n overlayPlacementOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\n\nexport type PopoverAlign = 'start' | 'end';\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n@Component({\n selector: 'ds-popover',\n standalone: true,\n imports: [CdkTrapFocus, NgTemplateOutlet],\n templateUrl: './popover.component.html',\n styleUrl: './popover.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n providers: [\n {\n provide: DsOverlayCloseRef,\n useExisting: forwardRef(() => PopoverComponent),\n },\n ],\n})\nexport class PopoverComponent implements OnDestroy, DsOverlayCloseRef {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n protected readonly preview = inject(DsStaticPreview);\n protected readonly panelTpl = viewChild<TemplateRef<unknown>>('panel');\n private readonly panelTrap = viewChild(CdkTrapFocus);\n private ref: OverlayRef | null = null;\n private triggerElement: HTMLElement | null = null;\n private focusTimer: ReturnType<typeof setTimeout> | null = null;\n /** Public panel tokens forwarded onto the portaled overlay pane on open, so a\n * consumer's `ds-popover { --ds-popover-panel-*: ... }` reaches it. */\n private readonly panelTokens = [\n '--ds-popover-bg-color',\n '--ds-popover-border-color',\n '--ds-popover-radius',\n '--ds-popover-shadow',\n '--ds-popover-padding',\n '--ds-popover-max-width',\n '--ds-popover-min-width',\n '--ds-popover-arrow-size',\n // A projected ds-menu is portaled into the pane, out of reach of a scoped width.\n '--ds-menu-min-width',\n '--ds-menu-max-width',\n ];\n\n /** Cross-axis alignment of the panel against the trigger. */\n readonly align = input<PopoverAlign>('start');\n /** Which side of the trigger the panel prefers to appear on. */\n readonly placement = input<PopoverPlacement>('bottom');\n /** Render a small caret pointing at the trigger. */\n readonly arrow = input(false, { transform: booleanAttribute });\n\n /** ARIA role for the panel (e.g. 'dialog'). When set, the panel traps focus and captures it\n * on open; Escape or an in-panel close returns focus to the trigger, an outside click or\n * scroll does not (non-modal). Leave null for plain text popovers. */\n readonly panelRole = input<string | null>(null);\n /** Accessible name for the panel; pair with `panelRole`. */\n readonly panelLabel = input<string | null>(null);\n\n /** Open/closed state, for callers binding `aria-expanded` on the trigger. */\n readonly opened = signal(false);\n /** Resolved placement after the overlay positions; drives the arrow direction. */\n readonly resolvedPlacement = signal<PopoverPlacement>('bottom');\n\n toggle(trigger: HTMLElement): void {\n if (this.preview.staticPreview()) {\n return;\n }\n // Clicking another trigger while open dismisses the overlay through the CDK's outside-pointer\n // listener FIRST, so `ref` is already gone here and this re-opens on the new trigger.\n if (this.ref) {\n this.close();\n\n return;\n }\n\n this.triggerElement = trigger;\n const placement = this.placement();\n const arrowOffset = this.arrow() ? 8 : 4;\n\n const positionStrategy: FlexibleConnectedPositionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(trigger)\n .withPositions(buildPositions(placement, this.align(), arrowOffset))\n .withViewportMargin(8);\n\n positionStrategy.positionChanges.subscribe((change) => {\n this.resolvedPlacement.set(\n overlayPlacementOf(\n change.connectionPair.overlayY,\n change.connectionPair.overlayX,\n ),\n );\n });\n\n const cfg: OverlayConfig = {\n positionStrategy,\n hasBackdrop: false,\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n };\n this.ref = this.overlay.create(cfg);\n prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);\n forwardOverlayTokens(this.ref, this.host.nativeElement, this.panelTokens);\n closeOnOutsidePointer(\n this.ref,\n (target) => trigger.contains(target),\n () => this.close('dismiss'),\n );\n // CDK's scroll strategies miss a plain overflow container, so close on any outside scroll ourselves.\n const removeScrollClose = closeOnScroll(this.ref, () =>\n this.close('dismiss'),\n );\n clearOnDetach(this.ref, {\n current: () => this.ref,\n always: removeScrollClose,\n clear: () => {\n this.ref = null;\n this.opened.set(false);\n },\n });\n this.ref.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close('dismiss');\n }\n });\n this.ref.attach(new TemplatePortal(this.panelTpl()!, this.vcr));\n this.resolvedPlacement.set(placement);\n this.opened.set(true);\n if (this.panelRole()) {\n // cdkTrapFocusAutoCapture without its destroy-time restore, which steals focus on an outside/scroll close.\n this.focusTimer = setTimeout(() => {\n this.focusTimer = null;\n void this.panelTrap()?.focusTrap?.focusInitialElementWhenReady();\n });\n }\n }\n\n close(cause: DsOverlayCloseCause = 'select'): void {\n if (!this.ref) {\n return;\n }\n clearTimeout(this.focusTimer ?? undefined);\n this.focusTimer = null;\n const focusWasInPanel = focusIsInside(this.ref);\n disposeWithLeave(this.ref, cause);\n this.ref = null;\n this.opened.set(false);\n if (focusWasInPanel) {\n this.triggerElement?.focus({ preventScroll: true });\n }\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.focusTimer ?? undefined);\n this.ref?.dispose();\n this.ref = null;\n }\n}\n\nfunction buildPositions(\n placement: PopoverPlacement,\n align: PopoverAlign,\n offsetPx: number,\n): ConnectedPosition[] {\n const crossStart = align === 'start' ? 'start' : 'end';\n const crossEnd: 'start' | 'end' = align === 'start' ? 'end' : 'start';\n\n switch (placement) {\n case 'top':\n return [\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'top',\n overlayX: crossEnd,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n ];\n case 'left':\n return [\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n ];\n case 'right':\n return [\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n ];\n default: // bottom\n return [\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'bottom',\n overlayX: crossEnd,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n ];\n }\n}\n","<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAwDa,gBAAgB,CAAA;AACV,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OAAO,EAAE,QAAQ;AACjB,oBAAA,QAAQ,EAAE,QAAQ;AAClB,oBAAA,QAAQ,EAAE,KAAK;AACf,oBAAA,OAAO,EAAE,QAAQ;AAClB,iBAAA;aACF;;AAEP;;AElSA;;AAEG;;;;"}
|
|
@@ -8,33 +8,29 @@ import { resolveWithConfig, isTextEntryTarget } from '@ids-group-ltd/ids-design-
|
|
|
8
8
|
const RADIO_GROUP = new InjectionToken('RADIO_GROUP');
|
|
9
9
|
|
|
10
10
|
class RadioComponent extends DsFieldBase {
|
|
11
|
-
/** The
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* is not read at all. */
|
|
11
|
+
/** The only way to drive a lone radio: it is not a `ControlValueAccessor`, so `[formControl]`
|
|
12
|
+
* and `ngModel` do not bind to it (inside `ds-radio-group` the group is the form control).
|
|
13
|
+
* Not read inside a group. */
|
|
15
14
|
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
16
|
-
/** Lets a checked standalone radio be cleared by clicking it again.
|
|
17
|
-
*
|
|
18
|
-
* would leave the group with no value through a gesture the group cannot see. */
|
|
15
|
+
/** Lets a checked standalone radio be cleared by clicking it again. Ignored inside
|
|
16
|
+
* `ds-radio-group`, which cannot see that gesture. */
|
|
19
17
|
deselectable = input(false, { ...(ngDevMode ? { debugName: "deselectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
20
18
|
/** A disabled parent `ds-radio-group` also disables it, whatever this is set to. */
|
|
21
19
|
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
22
|
-
/** Native `name
|
|
20
|
+
/** Native `name`; the group's name overrides it inside `ds-radio-group`. */
|
|
23
21
|
name = input('', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
24
22
|
/** Value compared against the group's selection when inside `ds-radio-group`. */
|
|
25
23
|
value = input('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
26
|
-
/** Overrides the
|
|
24
|
+
/** Overrides the generated id of the input and its label's `for`. */
|
|
27
25
|
inputId = input(null, ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
28
26
|
/** Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */
|
|
29
27
|
size = input(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
30
28
|
sizeResolved = resolveWithConfig(this.size, (config) => config.control?.size, 'md');
|
|
31
|
-
/**
|
|
29
|
+
/** Shows an asterisk on the label and sets `aria-required`. */
|
|
32
30
|
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
33
|
-
/**
|
|
34
|
-
* your own <label>. */
|
|
31
|
+
/** Label beside the dot, wired via for/id. Omit to bring your own <label>. */
|
|
35
32
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
36
|
-
/** Accessible name for a control with no visible label
|
|
37
|
-
* is empty, leaving nothing to name it. Set beside a label it OVERRIDES the label, per ARIA. */
|
|
33
|
+
/** Accessible name for a control with no visible label; overrides `label` when both are set. */
|
|
38
34
|
ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
39
35
|
uid = nextControlId('ds-radio');
|
|
40
36
|
controlId = computed(() => this.inputId() ?? this.uid, ...(ngDevMode ? [{ debugName: "controlId" }] : /* istanbul ignore next */ []));
|
|
@@ -49,16 +45,13 @@ class RadioComponent extends DsFieldBase {
|
|
|
49
45
|
touched: this.touched,
|
|
50
46
|
});
|
|
51
47
|
message = this.fieldMessage.message;
|
|
52
|
-
/** Only name via aria-label when there is no visible `<label for>` to do it. */
|
|
53
48
|
resolvedAriaLabel = computed(() => this.label() ? null : this.ariaLabel() || null, ...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
54
49
|
invalidResolved = this.fieldMessage.invalid;
|
|
55
|
-
/** Injected via token to avoid circular import with RadioGroupComponent. */
|
|
56
50
|
group = inject(RADIO_GROUP, { optional: true });
|
|
57
51
|
effectiveDisabled = computed(() => this.group?.isDisabled() || this.disabled(), ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
|
|
58
52
|
effectiveName = computed(() => this.group?.groupName() ?? this.name(), ...(ngDevMode ? [{ debugName: "effectiveName" }] : /* istanbul ignore next */ []));
|
|
59
53
|
isChecked = computed(() => this.group ? this.group.value() === this.value() : this.checked(), ...(ngDevMode ? [{ debugName: "isChecked" }] : /* istanbul ignore next */ []));
|
|
60
54
|
fieldClass = computed(() => `radio-field size-${this.sizeResolved()}`, ...(ngDevMode ? [{ debugName: "fieldClass" }] : /* istanbul ignore next */ []));
|
|
61
|
-
/** Exposed so the group can implement roving tabindex. */
|
|
62
55
|
inputElement = viewChild('inputRef', ...(ngDevMode ? [{ debugName: "inputElement" }] : /* istanbul ignore next */ []));
|
|
63
56
|
get tabIndexAttr() {
|
|
64
57
|
if (!this.group) {
|
|
@@ -66,7 +59,6 @@ class RadioComponent extends DsFieldBase {
|
|
|
66
59
|
}
|
|
67
60
|
return this.group.isTabbable(this) ? 0 : -1;
|
|
68
61
|
}
|
|
69
|
-
/** Called by the group's keyboard handler to focus this radio's input. */
|
|
70
62
|
focus() {
|
|
71
63
|
this.inputElement()?.nativeElement.focus();
|
|
72
64
|
}
|
|
@@ -100,13 +92,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
100
92
|
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], deselectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "deselectable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], inputElement: [{ type: i0.ViewChild, args: ['inputRef', { isSignal: true }] }] } });
|
|
101
93
|
|
|
102
94
|
class RadioGroupComponent extends DsControlValueAccessor {
|
|
103
|
-
/**
|
|
95
|
+
/** Value of the selected radio. */
|
|
104
96
|
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
105
|
-
/** Native `name` shared by every radio
|
|
97
|
+
/** Native `name` shared by every radio. */
|
|
106
98
|
name = input(null, ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
107
99
|
/** Disables the whole group. */
|
|
108
100
|
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
109
|
-
/** Accessible name
|
|
101
|
+
/** Accessible name when there is no visible `label`. */
|
|
110
102
|
ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
111
103
|
/** Visible group label; omit to supply your own. */
|
|
112
104
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -151,12 +143,11 @@ class RadioGroupComponent extends DsControlValueAccessor {
|
|
|
151
143
|
}
|
|
152
144
|
onKeydown(event) {
|
|
153
145
|
const key = event.key;
|
|
154
|
-
// Enter is deliberately absent:
|
|
155
|
-
// submit and swallowing it leaves the form with no keyboard way out.
|
|
146
|
+
// Enter is deliberately absent: swallowing it would remove the form's keyboard submit.
|
|
156
147
|
if (!['ArrowDown', 'ArrowRight', 'ArrowUp', 'ArrowLeft', ' '].includes(key)) {
|
|
157
148
|
return;
|
|
158
149
|
}
|
|
159
|
-
// A text field beside the radios (
|
|
150
|
+
// A text field beside the radios (an "Other" row) types its own keys.
|
|
160
151
|
if (isTextEntryTarget(event)) {
|
|
161
152
|
return;
|
|
162
153
|
}
|