@ids-group-ltd/ids-design-system 0.14.7 → 0.15.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 +735 -230
- package/components.md +64 -25
- package/docs/agent/INDEX.md +3 -1
- package/docs/agent/charts/ds-bar-chart.md +7 -4
- package/docs/agent/charts/ds-chart.md +1 -1
- package/docs/agent/charts/ds-column-chart.md +1 -1
- package/docs/agent/charts/ds-funnel-chart.md +1 -1
- package/docs/agent/charts/ds-pie-chart.md +1 -1
- package/docs/agent/charts/ds-waterfall-chart.md +2 -2
- package/docs/agent/feedback/ds-loading-overlay.md +2 -0
- package/docs/agent/feedback/ds-skeleton.md +1 -1
- package/docs/agent/forms/ds-button.md +2 -2
- package/docs/agent/forms/ds-date-picker.md +1 -0
- package/docs/agent/foundations/global-helper-classes.md +3 -3
- package/docs/agent/overlays/ds-bottom-sheet.md +1 -1
- package/docs/agent/overlays/ds-definition-term.md +10 -0
- package/docs/agent/overlays/ds-drawer.md +1 -1
- package/docs/agent/overlays/ds-info-hint.md +10 -0
- package/docs/agent/overlays/ds-menu.md +1 -1
- package/docs/agent/overlays/ds-modal-card.md +1 -1
- package/docs/agent/overlays/ds-modal.md +19 -1
- package/docs/agent/overlays/ds-tooltip-panel.md +1 -1
- package/docs/agent/overlays/ds-tooltip.md +3 -3
- package/docs/agent/tables/ds-table.md +3 -2
- package/eslint/deprecated-api.json +889 -0
- package/eslint/index.mjs +394 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -2
- 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 +6 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +19 -7
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
- 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 +169 -37
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs +2 -2
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +195 -27
- 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 +23 -20
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
- 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 +9 -9
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-definition-term.mjs +107 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-definition-term.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs +2 -2
- 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 +5 -15
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +2 -2
- 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 +2 -2
- 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 +11 -8
- 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 +4 -3
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-info-hint.mjs +44 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-info-hint.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +6 -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 +10 -4
- 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 +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +136 -29
- 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 +21 -26
- 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 +19 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +8 -6
- 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 +2 -2
- 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 +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +19 -5
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +2 -2
- 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 +21 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +6 -6
- 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 +2 -2
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs +2 -2
- 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 +2 -2
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +223 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +4 -4
- 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 +4 -4
- 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 -2
- 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 +410 -145
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +2 -2
- 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 +14 -11
- 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 +86 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +18 -81
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +2 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.10.0.json +79 -21
- package/migrations/0.10.1.json +38 -21
- package/migrations/0.10.2.json +44 -7
- package/migrations/0.10.3.json +7 -5
- package/migrations/0.11.0.json +10 -7
- package/migrations/0.11.1.json +25 -14
- package/migrations/0.11.2.json +3 -3
- package/migrations/0.11.3.json +9 -6
- package/migrations/0.11.4.json +13 -12
- package/migrations/0.12.1.json +41 -14
- package/migrations/0.12.2.json +7 -6
- package/migrations/0.12.3.json +3 -3
- package/migrations/0.13.0.json +11 -11
- package/migrations/0.13.1.json +60 -8
- package/migrations/0.13.2.json +98 -44
- package/migrations/0.13.3.json +46 -16
- package/migrations/0.13.4.json +23 -22
- package/migrations/0.14.0.json +5 -5
- package/migrations/0.14.1.json +5 -5
- package/migrations/0.14.2.json +1 -1
- package/migrations/0.14.4.json +6 -5
- package/migrations/0.14.5.json +13 -7
- package/migrations/0.14.6.json +2 -2
- package/migrations/0.14.8.json +56 -0
- package/migrations/0.15.0.json +999 -0
- package/migrations/0.2.0.json +2 -2
- package/migrations/0.3.0.json +43 -6
- package/migrations/0.4.0.json +95 -13
- package/migrations/0.5.0.json +116 -10
- package/migrations/0.5.1.json +97 -11
- package/migrations/0.6.0.json +30 -1
- package/migrations/0.6.1.json +22 -1
- package/migrations/0.6.2.json +8 -4
- package/migrations/0.6.3.json +17 -5
- package/migrations/0.7.0.json +58 -9
- package/migrations/0.7.1.json +62 -8
- package/migrations/0.8.0.json +60 -12
- package/migrations/0.9.0.json +68 -25
- package/migrations/0.9.1.json +1 -1
- package/migrations/README.md +57 -3
- package/package.json +19 -1
- package/schematics/check-overrides/index.cjs +4 -11
- package/schematics/check-overrides/scan.cjs +12 -1
- package/schematics/check-overrides/surface.json +51 -10
- package/schematics/ng-add/index.cjs +7 -1
- package/stylelint/deprecated-tokens.json +2697 -0
- package/stylelint/index.mjs +94 -0
- package/stylelint/since-version.mjs +26 -0
- package/styles/_chart-motion.scss +3 -9
- package/styles/_chip-row.scss +5 -2
- package/styles/_clear-button.scss +2 -0
- package/styles/_component-base.scss +56 -0
- package/styles/_dismiss-button.scss +16 -0
- package/styles/_dropdown-overlay.scss +19 -0
- package/styles/_focus.scss +4 -1
- package/styles/_overlay-motion.scss +4 -6
- package/styles/_pinned.scss +43 -0
- package/styles/_skeleton-shimmer.scss +2 -8
- package/styles/_table-controls.scss +4 -0
- package/styles/_target.scss +40 -0
- package/styles/_text-clip.scss +23 -4
- package/styles/_tokens.scss +0 -1
- package/styles/_typography.scss +2 -0
- package/styles/_visually-hidden.scss +2 -0
- package/styles/ds.scss +0 -1
- package/themes/README.md +7 -7
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +74 -4
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +40 -4
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +8 -3
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +4 -3
- package/types/ids-group-ltd-ids-design-system-components-definition-term.d.ts +22 -0
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +0 -1
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +7 -3
- package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +1 -0
- package/types/ids-group-ltd-ids-design-system-components-info-hint.d.ts +14 -0
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +5 -0
- package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +8 -3
- package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +0 -2
- package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +5 -3
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +13 -3
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +30 -3
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +48 -17
- package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +6 -2
- package/types/ids-group-ltd-ids-design-system-components.d.ts +26 -2
- package/types/ids-group-ltd-ids-design-system-core.d.ts +7 -11
- package/types/ids-group-ltd-ids-design-system.d.ts +3 -1
|
@@ -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 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,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;AACwE;AACvD,IAAA,WAAW,GAAG;QAC7B,uBAAuB;QACvB,2BAA2B;QAC3B,qBAAqB;QACrB,qBAAqB;QACrB,sBAAsB;QACtB,wBAAwB;QACxB,wBAAwB;QACxB,yBAAyB;;QAEzB,qBAAqB;QACrB,qBAAqB;KACtB;;AAGQ,IAAA,KAAK,GAAG,KAAK,CAAe,OAAO,4EAAC;;AAEpC,IAAA,SAAS,GAAG,KAAK,CAAmB,QAAQ,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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;;AElSA;;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,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,g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KAAK;AACf,oBAAA,OAAO,EAAE,QAAQ;AAClB,iBAAA;aACF;;AAEP;;AElSA;;AAEG;;;;"}
|
|
@@ -84,11 +84,11 @@ class RadioComponent extends DsFieldBase {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
87
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RadioComponent, isStandalone: true, selector: "ds-radio", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, deselectable: { classPropertyName: "deselectable", publicName: "deselectable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\">\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n (click)=\"onClick()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n</div>\n", styles: [":host{--_radio-accent-color: var(--ds-radio-accent-color, var(--accent));--_radio-bg-color: var(--ds-radio-bg-color, var(--surface-default));--_radio-border-color: var(--ds-radio-border-color, var(--border-strong));--_radio-label-color: var(--ds-radio-label-color, var(--text-primary));--_radio-glyph: var(--check-size);--_radio-label-fs: var(--font-size-s);display:inline-flex}.radio-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.radio-field.size-sm{--_radio-glyph: var(--radio-glyph-sm);--_radio-label-fs: var(--font-size-xs)}.radio-field.size-lg{--_radio-glyph: var(--radio-glyph-lg);--_radio-label-fs: var(--font-size-m)}.control-line:has(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@media not (forced-colors:active){.control-line .radio:where(:focus-visible){outline:none}}.control-line{border-radius:var(--focus-ring-radius)}.control-line:has(.control-text:empty){--focus-ring-offset: var(--space-1-5)}.control-line{display:inline-flex;align-items:center}.control-line .control-text{padding-inline-start:var(--space-2);padding-block:var(--space-1);margin-block:calc(var(--space-1) * -1);font:var(--font-weight-regular) var(--ds-radio-label-font-size, var(--_radio-label-fs))/var(--line-height-base) var(--font-sans);color:var(--_radio-label-color);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text:empty{display:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.radio{appearance:none;width:var(--_radio-glyph);height:var(--_radio-glyph);border:var(--check-bw) solid var(--_radio-border-color);background:var(--_radio-bg-color);cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--radius-pill);transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),border-width var(--duration-fast) var(--ease-standard)}.radio:hover:not(:disabled){border-color:var(--accent)}.radio:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.radio:after{content:\"\";transform:scale(0);opacity:0;transform-origin:center;transition:transform var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.radio:checked{border-color:var(--_radio-accent-color);border-width:var(--radio-bw-checked)}.radio:checked:after{content:\"\";width:var(--radio-dot-size);height:var(--radio-dot-size);border-radius:var(--radius-pill);background:var(--_radio-accent-color);transform:scale(1);opacity:1}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
87
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RadioComponent, isStandalone: true, selector: "ds-radio", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, deselectable: { classPropertyName: "deselectable", publicName: "deselectable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\">\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n (click)=\"onClick()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n</div>\n", styles: ["@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}:host{--_radio-accent-color: var(--ds-radio-accent-color, var(--accent));--_radio-bg-color: var(--ds-radio-bg-color, var(--surface-default));--_radio-border-color: var(--ds-radio-border-color, var(--border-strong));--_radio-label-color: var(--ds-radio-label-color, var(--text-primary));--_radio-glyph: var(--check-size);--_radio-label-fs: var(--font-size-s);display:inline-flex}.radio-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.radio-field.size-sm{--_radio-glyph: var(--radio-glyph-sm);--_radio-label-fs: var(--font-size-xs)}.radio-field.size-lg{--_radio-glyph: var(--radio-glyph-lg);--_radio-label-fs: var(--font-size-m)}.control-line:has(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@media not (forced-colors:active){.control-line .radio:where(:focus-visible){outline:none}}.control-line{border-radius:var(--focus-ring-radius)}.control-line:has(.control-text:empty){--focus-ring-offset: var(--space-1-5)}.control-line{display:inline-flex;align-items:center}.control-line .control-text{padding-inline-start:var(--space-2);padding-block:var(--space-1);margin-block:calc(var(--space-1) * -1);font:var(--font-weight-regular) var(--ds-radio-label-font-size, var(--_radio-label-fs))/var(--line-height-base) var(--font-sans);color:var(--_radio-label-color);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text:empty{display:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.radio{appearance:none;width:var(--_radio-glyph);height:var(--_radio-glyph);border:var(--check-bw) solid var(--_radio-border-color);background:var(--_radio-bg-color);cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--radius-pill);transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),border-width var(--duration-fast) var(--ease-standard)}.radio:hover:not(:disabled){border-color:var(--accent)}.radio:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.radio:after{content:\"\";transform:scale(0);opacity:0;transform-origin:center;transition:transform var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.radio:checked{border-color:var(--_radio-accent-color);border-width:var(--radio-bw-checked)}.radio:checked:after{content:\"\";width:var(--radio-dot-size);height:var(--radio-dot-size);border-radius:var(--radius-pill);background:var(--_radio-accent-color);transform:scale(1);opacity:1}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
88
88
|
}
|
|
89
89
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RadioComponent, decorators: [{
|
|
90
90
|
type: Component,
|
|
91
|
-
args: [{ selector: 'ds-radio', standalone: true, imports: [FieldMessageComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\">\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n (click)=\"onClick()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n</div>\n", styles: [":host{--_radio-accent-color: var(--ds-radio-accent-color, var(--accent));--_radio-bg-color: var(--ds-radio-bg-color, var(--surface-default));--_radio-border-color: var(--ds-radio-border-color, var(--border-strong));--_radio-label-color: var(--ds-radio-label-color, var(--text-primary));--_radio-glyph: var(--check-size);--_radio-label-fs: var(--font-size-s);display:inline-flex}.radio-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.radio-field.size-sm{--_radio-glyph: var(--radio-glyph-sm);--_radio-label-fs: var(--font-size-xs)}.radio-field.size-lg{--_radio-glyph: var(--radio-glyph-lg);--_radio-label-fs: var(--font-size-m)}.control-line:has(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@media not (forced-colors:active){.control-line .radio:where(:focus-visible){outline:none}}.control-line{border-radius:var(--focus-ring-radius)}.control-line:has(.control-text:empty){--focus-ring-offset: var(--space-1-5)}.control-line{display:inline-flex;align-items:center}.control-line .control-text{padding-inline-start:var(--space-2);padding-block:var(--space-1);margin-block:calc(var(--space-1) * -1);font:var(--font-weight-regular) var(--ds-radio-label-font-size, var(--_radio-label-fs))/var(--line-height-base) var(--font-sans);color:var(--_radio-label-color);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text:empty{display:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.radio{appearance:none;width:var(--_radio-glyph);height:var(--_radio-glyph);border:var(--check-bw) solid var(--_radio-border-color);background:var(--_radio-bg-color);cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--radius-pill);transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),border-width var(--duration-fast) var(--ease-standard)}.radio:hover:not(:disabled){border-color:var(--accent)}.radio:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.radio:after{content:\"\";transform:scale(0);opacity:0;transform-origin:center;transition:transform var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.radio:checked{border-color:var(--_radio-accent-color);border-width:var(--radio-bw-checked)}.radio:checked:after{content:\"\";width:var(--radio-dot-size);height:var(--radio-dot-size);border-radius:var(--radius-pill);background:var(--_radio-accent-color);transform:scale(1);opacity:1}\n"] }]
|
|
91
|
+
args: [{ selector: 'ds-radio', standalone: true, imports: [FieldMessageComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\">\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n (click)=\"onClick()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n</div>\n", styles: ["@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}:host{--_radio-accent-color: var(--ds-radio-accent-color, var(--accent));--_radio-bg-color: var(--ds-radio-bg-color, var(--surface-default));--_radio-border-color: var(--ds-radio-border-color, var(--border-strong));--_radio-label-color: var(--ds-radio-label-color, var(--text-primary));--_radio-glyph: var(--check-size);--_radio-label-fs: var(--font-size-s);display:inline-flex}.radio-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.radio-field.size-sm{--_radio-glyph: var(--radio-glyph-sm);--_radio-label-fs: var(--font-size-xs)}.radio-field.size-lg{--_radio-glyph: var(--radio-glyph-lg);--_radio-label-fs: var(--font-size-m)}.control-line:has(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@media not (forced-colors:active){.control-line .radio:where(:focus-visible){outline:none}}.control-line{border-radius:var(--focus-ring-radius)}.control-line:has(.control-text:empty){--focus-ring-offset: var(--space-1-5)}.control-line{display:inline-flex;align-items:center}.control-line .control-text{padding-inline-start:var(--space-2);padding-block:var(--space-1);margin-block:calc(var(--space-1) * -1);font:var(--font-weight-regular) var(--ds-radio-label-font-size, var(--_radio-label-fs))/var(--line-height-base) var(--font-sans);color:var(--_radio-label-color);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text:empty{display:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.radio{appearance:none;width:var(--_radio-glyph);height:var(--_radio-glyph);border:var(--check-bw) solid var(--_radio-border-color);background:var(--_radio-bg-color);cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--radius-pill);transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),border-width var(--duration-fast) var(--ease-standard)}.radio:hover:not(:disabled){border-color:var(--accent)}.radio:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.radio:after{content:\"\";transform:scale(0);opacity:0;transform-origin:center;transition:transform var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.radio:checked{border-color:var(--_radio-accent-color);border-width:var(--radio-bw-checked)}.radio:checked:after{content:\"\";width:var(--radio-dot-size);height:var(--radio-dot-size);border-radius:var(--radius-pill);background:var(--_radio-accent-color);transform:scale(1);opacity:1}\n"] }]
|
|
92
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 }] }] } });
|
|
93
93
|
|
|
94
94
|
class RadioGroupComponent extends DsControlValueAccessor {
|
|
@@ -199,7 +199,7 @@ class RadioGroupComponent extends DsControlValueAccessor {
|
|
|
199
199
|
provide: RADIO_GROUP,
|
|
200
200
|
useExisting: forwardRef(() => RadioGroupComponent),
|
|
201
201
|
},
|
|
202
|
-
], queries: [{ propertyName: "radios", predicate: RadioComponent, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n}\n\n<div class=\"radios\">\n <ng-content />\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n", styles: [":host{display:flex;flex-direction:column;gap:var(--field-label-gap)}.label{--_field-label-font-size: var(--ds-field-label-font-size, var(--font-size-xs));--_field-label-font-weight: var(--ds-field-label-font-weight, var(--font-weight-bold));--_field-label-color: var(--ds-field-label-color, var(--text-secondary));--_field-label-text-transform: var(--ds-field-label-text-transform, none);--_field-label-letter-spacing: var(--ds-field-label-letter-spacing, normal);display:flex;align-items:center;gap:var(--field-gap-req);font:var(--_field-label-font-weight) var(--_field-label-font-size)/var(--line-height-base) var(--font-sans);color:var(--_field-label-color);text-transform:var(--_field-label-text-transform);letter-spacing:var(--_field-label-letter-spacing)}:host([data-field-state=error]) .label{color:var(--error-text)}:host([data-field-state=warning]) .label{color:var(--warning-text)}.radios{display:flex;flex-direction:column;gap:var(--space-2, 8px)}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
202
|
+
], queries: [{ propertyName: "radios", predicate: RadioComponent, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n}\n\n<div class=\"radios\">\n <ng-content />\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n", styles: ["@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}:host{display:flex;flex-direction:column;gap:var(--field-label-gap)}.label{--_field-label-font-size: var(--ds-field-label-font-size, var(--font-size-xs));--_field-label-font-weight: var(--ds-field-label-font-weight, var(--font-weight-bold));--_field-label-color: var(--ds-field-label-color, var(--text-secondary));--_field-label-text-transform: var(--ds-field-label-text-transform, none);--_field-label-letter-spacing: var(--ds-field-label-letter-spacing, normal);display:flex;align-items:center;gap:var(--field-gap-req);font:var(--_field-label-font-weight) var(--_field-label-font-size)/var(--line-height-base) var(--font-sans);color:var(--_field-label-color);text-transform:var(--_field-label-text-transform);letter-spacing:var(--_field-label-letter-spacing)}:host([data-field-state=error]) .label{color:var(--error-text)}:host([data-field-state=warning]) .label{color:var(--warning-text)}.radios{display:flex;flex-direction:column;gap:var(--space-2, 8px)}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
203
203
|
}
|
|
204
204
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RadioGroupComponent, decorators: [{
|
|
205
205
|
type: Component,
|
|
@@ -220,7 +220,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
220
220
|
provide: RADIO_GROUP,
|
|
221
221
|
useExisting: forwardRef(() => RadioGroupComponent),
|
|
222
222
|
},
|
|
223
|
-
], template: "@if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n}\n\n<div class=\"radios\">\n <ng-content />\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n", styles: [":host{display:flex;flex-direction:column;gap:var(--field-label-gap)}.label{--_field-label-font-size: var(--ds-field-label-font-size, var(--font-size-xs));--_field-label-font-weight: var(--ds-field-label-font-weight, var(--font-weight-bold));--_field-label-color: var(--ds-field-label-color, var(--text-secondary));--_field-label-text-transform: var(--ds-field-label-text-transform, none);--_field-label-letter-spacing: var(--ds-field-label-letter-spacing, normal);display:flex;align-items:center;gap:var(--field-gap-req);font:var(--_field-label-font-weight) var(--_field-label-font-size)/var(--line-height-base) var(--font-sans);color:var(--_field-label-color);text-transform:var(--_field-label-text-transform);letter-spacing:var(--_field-label-letter-spacing)}:host([data-field-state=error]) .label{color:var(--error-text)}:host([data-field-state=warning]) .label{color:var(--warning-text)}.radios{display:flex;flex-direction:column;gap:var(--space-2, 8px)}\n"] }]
|
|
223
|
+
], template: "@if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n}\n\n<div class=\"radios\">\n <ng-content />\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n", styles: ["@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}:host{display:flex;flex-direction:column;gap:var(--field-label-gap)}.label{--_field-label-font-size: var(--ds-field-label-font-size, var(--font-size-xs));--_field-label-font-weight: var(--ds-field-label-font-weight, var(--font-weight-bold));--_field-label-color: var(--ds-field-label-color, var(--text-secondary));--_field-label-text-transform: var(--ds-field-label-text-transform, none);--_field-label-letter-spacing: var(--ds-field-label-letter-spacing, normal);display:flex;align-items:center;gap:var(--field-gap-req);font:var(--_field-label-font-weight) var(--_field-label-font-size)/var(--line-height-base) var(--font-sans);color:var(--_field-label-color);text-transform:var(--_field-label-text-transform);letter-spacing:var(--_field-label-letter-spacing)}:host([data-field-state=error]) .label{color:var(--error-text)}:host([data-field-state=warning]) .label{color:var(--warning-text)}.radios{display:flex;flex-direction:column;gap:var(--space-2, 8px)}\n"] }]
|
|
224
224
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], radios: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => RadioComponent), { isSignal: true }] }] } });
|
|
225
225
|
|
|
226
226
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-radio-group.mjs","sources":["../../../src/lib/components/radio-group/radio-group.token.ts","../../../src/lib/components/radio-group/radio/radio.component.ts","../../../src/lib/components/radio-group/radio/radio.component.html","../../../src/lib/components/radio-group/radio-group.component.ts","../../../src/lib/components/radio-group/radio-group.component.html","../../../src/lib/components/radio-group/ids-group-ltd-ids-design-system-components-radio-group.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/** Contract ds-radio reads from its parent ds-radio-group; a token avoids the circular import. */\nexport interface RadioGroupContract {\n readonly value: () => unknown;\n readonly groupName: () => string;\n readonly isDisabled: () => boolean;\n isTabbable(radio: RadioGroupChild): boolean;\n select(value: unknown): void;\n}\n\nexport interface RadioGroupChild {\n readonly value: () => unknown;\n readonly effectiveDisabled: () => boolean;\n focus(): void;\n}\n\nexport const RADIO_GROUP = new InjectionToken<RadioGroupContract>(\n 'RADIO_GROUP',\n);\n","import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n viewChild,\n} from '@angular/core';\nimport { DsFieldBase } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { RADIO_GROUP } from '../../radio-group/radio-group.token';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-radio',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './radio.component.html',\n styleUrl: './radio.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class RadioComponent extends DsFieldBase {\n /** The only way to drive a lone radio: it is not a `ControlValueAccessor`, so `[formControl]`\n * and `ngModel` do not bind to it (inside `ds-radio-group` the group is the form control).\n * Not read inside a group. */\n readonly checked = model<boolean>(false);\n /** Lets a checked standalone radio be cleared by clicking it again. Ignored inside\n * `ds-radio-group`, which cannot see that gesture. */\n readonly deselectable = input(false, { transform: booleanAttribute });\n /** A disabled parent `ds-radio-group` also disables it, whatever this is set to. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Native `name`; the group's name overrides it inside `ds-radio-group`. */\n readonly name = input<string>('');\n /** Value compared against the group's selection when inside `ds-radio-group`. */\n readonly value = input<unknown>('');\n /** Overrides the generated id of the input and its label's `for`. */\n readonly inputId = input<string | null>(null);\n /** Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Shows an asterisk on the label and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Label beside the dot, wired via for/id. Omit to bring your own <label>. */\n readonly label = input<string>('');\n /** Accessible name for a control with no visible label; overrides `label` when both are set. */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly uid = nextControlId('ds-radio');\n protected readonly controlId = computed(() => this.inputId() ?? this.uid);\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.effectiveDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || null,\n );\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly group = inject(RADIO_GROUP, { optional: true });\n\n readonly effectiveDisabled = computed(\n () => this.group?.isDisabled() || this.disabled(),\n );\n protected readonly effectiveName = computed(\n () => this.group?.groupName() ?? this.name(),\n );\n protected readonly isChecked = computed(() =>\n this.group ? this.group.value() === this.value() : this.checked(),\n );\n\n protected readonly fieldClass = computed(\n () => `radio-field size-${this.sizeResolved()}`,\n );\n\n readonly inputElement = viewChild<ElementRef<HTMLInputElement>>('inputRef');\n\n protected get tabIndexAttr(): 0 | -1 {\n if (!this.group) {\n return 0;\n }\n\n return this.group.isTabbable(this) ? 0 : -1;\n }\n\n focus(): void {\n this.inputElement()?.nativeElement.focus();\n }\n\n // A radio fires no `change` when an already-checked one is clicked, so the clear cannot ride on\n // onSelect. Click runs before change, and on an unchecked radio isChecked() is still false here.\n protected onClick(): void {\n if (this.effectiveDisabled() || this.group || !this.deselectable()) {\n return;\n }\n if (this.isChecked()) {\n this.checked.set(false);\n }\n }\n\n protected onSelect(): void {\n if (this.effectiveDisabled()) {\n return;\n }\n if (this.group) {\n this.group.select(this.value());\n } else {\n this.checked.set(true);\n }\n }\n}\n","<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\">\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n (click)=\"onClick()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n</div>\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChildren,\n forwardRef,\n input,\n model,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { RadioComponent } from './radio/radio.component';\nimport {\n RADIO_GROUP,\n type RadioGroupChild,\n type RadioGroupContract,\n} from './radio-group.token';\nimport { isTextEntryTarget } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-radio-group',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './radio-group.component.html',\n styleUrl: './radio-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'radiogroup',\n '[attr.aria-label]': 'ariaLabel() || label() || null',\n '[attr.aria-describedby]': 'hintId()',\n '[attr.aria-invalid]': \"invalidResolved() ? 'true' : null\",\n '[attr.data-field-state]': 'controlState()',\n '(keydown)': 'onKeydown($event)',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioGroupComponent),\n multi: true,\n },\n {\n provide: RADIO_GROUP,\n useExisting: forwardRef(() => RadioGroupComponent),\n },\n ],\n})\nexport class RadioGroupComponent\n extends DsControlValueAccessor<unknown>\n implements RadioGroupContract\n{\n /** Value of the selected radio. */\n readonly value = model<unknown>(null);\n /** Native `name` shared by every radio. */\n readonly name = input<string | null>(null);\n /** Disables the whole group. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Accessible name when there is no visible `label`. */\n readonly ariaLabel = input<string | null>(null);\n /** Visible group label; omit to supply your own. */\n readonly label = input<string>('');\n\n readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n protected readonly uid = nextControlId('ds-radio-group');\n readonly groupName = computed(() => this.name() ?? this.uid);\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n protected readonly controlState = this.fieldMessage.controlState;\n\n private readonly radios = contentChildren(RadioComponent);\n\n private get enabledRadios(): RadioGroupChild[] {\n return (this.radios() as unknown as RadioGroupChild[]).filter(\n (radio) => !radio.effectiveDisabled(),\n );\n }\n\n isTabbable(radio: RadioGroupChild): boolean {\n const currentValue = this.value();\n const allRadios = this.radios() as unknown as RadioGroupChild[];\n\n if (currentValue !== null && currentValue !== undefined) {\n const matchIndex = allRadios.findIndex((r) => r.value() === currentValue);\n if (matchIndex !== -1) {\n return allRadios[matchIndex] === radio;\n }\n }\n\n const firstEnabled = allRadios.find((r) => !r.effectiveDisabled());\n\n return firstEnabled === radio;\n }\n\n select(value: unknown): void {\n this.value.set(value);\n this.markTouched();\n\n const selected = (this.radios() as unknown as RadioGroupChild[]).find(\n (radio) => radio.value() === value,\n );\n selected?.focus();\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const key = event.key;\n // Enter is deliberately absent: swallowing it would remove the form's keyboard submit.\n if (\n !['ArrowDown', 'ArrowRight', 'ArrowUp', 'ArrowLeft', ' '].includes(key)\n ) {\n return;\n }\n // A text field beside the radios (an \"Other\" row) types its own keys.\n if (isTextEntryTarget(event)) {\n return;\n }\n\n const enabled = this.enabledRadios;\n if (!enabled.length) {\n return;\n }\n\n event.preventDefault();\n\n if (key === ' ') {\n const allRadios = this.radios() as unknown as RadioGroupChild[];\n const focused = allRadios.find((radio) => {\n const component = radio as unknown as RadioComponent;\n\n return (\n component.inputElement()?.nativeElement === document.activeElement\n );\n });\n if (focused) {\n this.select(focused.value());\n }\n\n return;\n }\n\n const forward = key === 'ArrowDown' || key === 'ArrowRight';\n const currentValue = this.value();\n\n let currentIndex = enabled.findIndex((radio) => {\n const component = radio as unknown as RadioComponent;\n\n return component.inputElement()?.nativeElement === document.activeElement;\n });\n\n if (currentIndex === -1) {\n currentIndex = enabled.findIndex(\n (radio) => radio.value() === currentValue,\n );\n }\n\n let nextIndex: number;\n if (currentIndex === -1) {\n nextIndex = forward ? 0 : enabled.length - 1;\n } else {\n nextIndex = forward\n ? (currentIndex + 1) % enabled.length\n : (currentIndex - 1 + enabled.length) % enabled.length;\n }\n\n const target = enabled[nextIndex];\n this.select(target.value());\n }\n}\n","@if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n}\n\n<div class=\"radios\">\n <ng-content />\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAiBa,WAAW,GAAG,IAAI,cAAc,CAC3C,aAAa;;ACST,MAAO,cAAe,SAAQ,WAAW,CAAA;AAC7C;;AAE+B;AACtB,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;AACxC;AACuD;IAC9C,YAAY,GAAG,KAAK,CAAC,KAAK,oFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAE5D,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;;AAExB,IAAA,KAAK,GAAG,KAAK,CAAU,EAAE,4EAAC;;AAE1B,IAAA,OAAO,G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C;AACnD,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,wTAAA,EAAA,MAAA,EAAA,CAAA,k8BAAA,CAAA,EAAA;wlBAsCyC,cAAc,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtF1D;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-radio-group.mjs","sources":["../../../src/lib/components/radio-group/radio-group.token.ts","../../../src/lib/components/radio-group/radio/radio.component.ts","../../../src/lib/components/radio-group/radio/radio.component.html","../../../src/lib/components/radio-group/radio-group.component.ts","../../../src/lib/components/radio-group/radio-group.component.html","../../../src/lib/components/radio-group/ids-group-ltd-ids-design-system-components-radio-group.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/** Contract ds-radio reads from its parent ds-radio-group; a token avoids the circular import. */\nexport interface RadioGroupContract {\n readonly value: () => unknown;\n readonly groupName: () => string;\n readonly isDisabled: () => boolean;\n isTabbable(radio: RadioGroupChild): boolean;\n select(value: unknown): void;\n}\n\nexport interface RadioGroupChild {\n readonly value: () => unknown;\n readonly effectiveDisabled: () => boolean;\n focus(): void;\n}\n\nexport const RADIO_GROUP = new InjectionToken<RadioGroupContract>(\n 'RADIO_GROUP',\n);\n","import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n viewChild,\n} from '@angular/core';\nimport { DsFieldBase } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { RADIO_GROUP } from '../../radio-group/radio-group.token';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-radio',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './radio.component.html',\n styleUrl: './radio.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class RadioComponent extends DsFieldBase {\n /** The only way to drive a lone radio: it is not a `ControlValueAccessor`, so `[formControl]`\n * and `ngModel` do not bind to it (inside `ds-radio-group` the group is the form control).\n * Not read inside a group. */\n readonly checked = model<boolean>(false);\n /** Lets a checked standalone radio be cleared by clicking it again. Ignored inside\n * `ds-radio-group`, which cannot see that gesture. */\n readonly deselectable = input(false, { transform: booleanAttribute });\n /** A disabled parent `ds-radio-group` also disables it, whatever this is set to. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Native `name`; the group's name overrides it inside `ds-radio-group`. */\n readonly name = input<string>('');\n /** Value compared against the group's selection when inside `ds-radio-group`. */\n readonly value = input<unknown>('');\n /** Overrides the generated id of the input and its label's `for`. */\n readonly inputId = input<string | null>(null);\n /** Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Shows an asterisk on the label and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Label beside the dot, wired via for/id. Omit to bring your own <label>. */\n readonly label = input<string>('');\n /** Accessible name for a control with no visible label; overrides `label` when both are set. */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly uid = nextControlId('ds-radio');\n protected readonly controlId = computed(() => this.inputId() ?? this.uid);\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.effectiveDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || null,\n );\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly group = inject(RADIO_GROUP, { optional: true });\n\n readonly effectiveDisabled = computed(\n () => this.group?.isDisabled() || this.disabled(),\n );\n protected readonly effectiveName = computed(\n () => this.group?.groupName() ?? this.name(),\n );\n protected readonly isChecked = computed(() =>\n this.group ? this.group.value() === this.value() : this.checked(),\n );\n\n protected readonly fieldClass = computed(\n () => `radio-field size-${this.sizeResolved()}`,\n );\n\n readonly inputElement = viewChild<ElementRef<HTMLInputElement>>('inputRef');\n\n protected get tabIndexAttr(): 0 | -1 {\n if (!this.group) {\n return 0;\n }\n\n return this.group.isTabbable(this) ? 0 : -1;\n }\n\n focus(): void {\n this.inputElement()?.nativeElement.focus();\n }\n\n // A radio fires no `change` when an already-checked one is clicked, so the clear cannot ride on\n // onSelect. Click runs before change, and on an unchecked radio isChecked() is still false here.\n protected onClick(): void {\n if (this.effectiveDisabled() || this.group || !this.deselectable()) {\n return;\n }\n if (this.isChecked()) {\n this.checked.set(false);\n }\n }\n\n protected onSelect(): void {\n if (this.effectiveDisabled()) {\n return;\n }\n if (this.group) {\n this.group.select(this.value());\n } else {\n this.checked.set(true);\n }\n }\n}\n","<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\">\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n (click)=\"onClick()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n</div>\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChildren,\n forwardRef,\n input,\n model,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { RadioComponent } from './radio/radio.component';\nimport {\n RADIO_GROUP,\n type RadioGroupChild,\n type RadioGroupContract,\n} from './radio-group.token';\nimport { isTextEntryTarget } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-radio-group',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './radio-group.component.html',\n styleUrl: './radio-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'radiogroup',\n '[attr.aria-label]': 'ariaLabel() || label() || null',\n '[attr.aria-describedby]': 'hintId()',\n '[attr.aria-invalid]': \"invalidResolved() ? 'true' : null\",\n '[attr.data-field-state]': 'controlState()',\n '(keydown)': 'onKeydown($event)',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioGroupComponent),\n multi: true,\n },\n {\n provide: RADIO_GROUP,\n useExisting: forwardRef(() => RadioGroupComponent),\n },\n ],\n})\nexport class RadioGroupComponent\n extends DsControlValueAccessor<unknown>\n implements RadioGroupContract\n{\n /** Value of the selected radio. */\n readonly value = model<unknown>(null);\n /** Native `name` shared by every radio. */\n readonly name = input<string | null>(null);\n /** Disables the whole group. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Accessible name when there is no visible `label`. */\n readonly ariaLabel = input<string | null>(null);\n /** Visible group label; omit to supply your own. */\n readonly label = input<string>('');\n\n readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n protected readonly uid = nextControlId('ds-radio-group');\n readonly groupName = computed(() => this.name() ?? this.uid);\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n protected readonly controlState = this.fieldMessage.controlState;\n\n private readonly radios = contentChildren(RadioComponent);\n\n private get enabledRadios(): RadioGroupChild[] {\n return (this.radios() as unknown as RadioGroupChild[]).filter(\n (radio) => !radio.effectiveDisabled(),\n );\n }\n\n isTabbable(radio: RadioGroupChild): boolean {\n const currentValue = this.value();\n const allRadios = this.radios() as unknown as RadioGroupChild[];\n\n if (currentValue !== null && currentValue !== undefined) {\n const matchIndex = allRadios.findIndex((r) => r.value() === currentValue);\n if (matchIndex !== -1) {\n return allRadios[matchIndex] === radio;\n }\n }\n\n const firstEnabled = allRadios.find((r) => !r.effectiveDisabled());\n\n return firstEnabled === radio;\n }\n\n select(value: unknown): void {\n this.value.set(value);\n this.markTouched();\n\n const selected = (this.radios() as unknown as RadioGroupChild[]).find(\n (radio) => radio.value() === value,\n );\n selected?.focus();\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const key = event.key;\n // Enter is deliberately absent: swallowing it would remove the form's keyboard submit.\n if (\n !['ArrowDown', 'ArrowRight', 'ArrowUp', 'ArrowLeft', ' '].includes(key)\n ) {\n return;\n }\n // A text field beside the radios (an \"Other\" row) types its own keys.\n if (isTextEntryTarget(event)) {\n return;\n }\n\n const enabled = this.enabledRadios;\n if (!enabled.length) {\n return;\n }\n\n event.preventDefault();\n\n if (key === ' ') {\n const allRadios = this.radios() as unknown as RadioGroupChild[];\n const focused = allRadios.find((radio) => {\n const component = radio as unknown as RadioComponent;\n\n return (\n component.inputElement()?.nativeElement === document.activeElement\n );\n });\n if (focused) {\n this.select(focused.value());\n }\n\n return;\n }\n\n const forward = key === 'ArrowDown' || key === 'ArrowRight';\n const currentValue = this.value();\n\n let currentIndex = enabled.findIndex((radio) => {\n const component = radio as unknown as RadioComponent;\n\n return component.inputElement()?.nativeElement === document.activeElement;\n });\n\n if (currentIndex === -1) {\n currentIndex = enabled.findIndex(\n (radio) => radio.value() === currentValue,\n );\n }\n\n let nextIndex: number;\n if (currentIndex === -1) {\n nextIndex = forward ? 0 : enabled.length - 1;\n } else {\n nextIndex = forward\n ? (currentIndex + 1) % enabled.length\n : (currentIndex - 1 + enabled.length) % enabled.length;\n }\n\n const target = enabled[nextIndex];\n this.select(target.value());\n }\n}\n","@if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n}\n\n<div class=\"radios\">\n <ng-content />\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAiBa,WAAW,GAAG,IAAI,cAAc,CAC3C,aAAa;;ACST,MAAO,cAAe,SAAQ,WAAW,CAAA;AAC7C;;AAE+B;AACtB,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;AACxC;AACuD;IAC9C,YAAY,GAAG,KAAK,CAAC,KAAK,oFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAE5D,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;;AAExB,IAAA,KAAK,GAAG,KAAK,CAAU,EAAE,4EAAC;;AAE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AAC,yBAAyB,CAAC;AACnD,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,wTAAA,EAAA,MAAA,EAAA,CAAA,gkDAAA,CAAA,EAAA;wlBAsCyC,cAAc,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtF1D;;AAEG;;;;"}
|
|
@@ -82,6 +82,8 @@ class ScatterChartComponent extends DsChartBase {
|
|
|
82
82
|
width: SCATTER_VIEW_WIDTH - AXIS_GUTTER - EDGE_GUTTER,
|
|
83
83
|
height: SCATTER_VIEW_HEIGHT - CATEGORY_GUTTER - EDGE_GUTTER,
|
|
84
84
|
};
|
|
85
|
+
plotBottom = this.plot.top + this.plot.height;
|
|
86
|
+
plotRight = this.plot.left + this.plot.width;
|
|
85
87
|
isEmpty = computed(() => this.data().every((series) => series.data.length === 0), ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
86
88
|
/** One mark per drawn unit of plot width is the ceiling. */
|
|
87
89
|
budget = computed(() => decimationTarget(this.plot.width), ...(ngDevMode ? [{ debugName: "budget" }] : /* istanbul ignore next */ []));
|
|
@@ -154,8 +156,6 @@ class ScatterChartComponent extends DsChartBase {
|
|
|
154
156
|
label: format(value, 'tick'),
|
|
155
157
|
}));
|
|
156
158
|
}, ...(ngDevMode ? [{ debugName: "yTicks" }] : /* istanbul ignore next */ []));
|
|
157
|
-
plotBottom = this.plot.top + this.plot.height;
|
|
158
|
-
plotRight = this.plot.left + this.plot.width;
|
|
159
159
|
multiSeries = computed(() => this.data().length > 1, ...(ngDevMode ? [{ debugName: "multiSeries" }] : /* istanbul ignore next */ []));
|
|
160
160
|
/** The series named in the legend under the pointer, which fades the rest. */
|
|
161
161
|
highlightedSeries = signal(null, ...(ngDevMode ? [{ debugName: "highlightedSeries" }] : /* istanbul ignore next */ []));
|
|
@@ -201,7 +201,21 @@ class ScatterChartComponent extends DsChartBase {
|
|
|
201
201
|
/** `<details>` keeps its children in the DOM while shut, so rows exist only while it is open. */
|
|
202
202
|
tableOpen = signal(false, ...(ngDevMode ? [{ debugName: "tableOpen" }] : /* istanbul ignore next */ []));
|
|
203
203
|
tableIsOpen = computed(() => this.tableOpen() || this.dataTableResolved() === 'visible', ...(ngDevMode ? [{ debugName: "tableIsOpen" }] : /* istanbul ignore next */ []));
|
|
204
|
-
|
|
204
|
+
/** Where the drawn chart puts its grid lines and labels, as shares of the box, which keeps the
|
|
205
|
+
* drawn chart's aspect ratio. Marks are left out: no dots while loading. */
|
|
206
|
+
skeletonLayout = (() => {
|
|
207
|
+
const share = (value, of) => `${(value / of) * 100}%`;
|
|
208
|
+
const steps = [0, 0.25, 0.5, 0.75, 1];
|
|
209
|
+
return {
|
|
210
|
+
plotLeft: share(this.plot.left, SCATTER_VIEW_WIDTH),
|
|
211
|
+
plotWidth: share(this.plot.width, SCATTER_VIEW_WIDTH),
|
|
212
|
+
labelEnd: share(SCATTER_VIEW_WIDTH - this.plot.left + 8, SCATTER_VIEW_WIDTH),
|
|
213
|
+
categoryTop: share(this.plotBottom + 10, SCATTER_VIEW_HEIGHT),
|
|
214
|
+
titleTop: share(this.plotBottom + 26, SCATTER_VIEW_HEIGHT),
|
|
215
|
+
rows: steps.map((step) => share(this.plot.top + step * this.plot.height, SCATTER_VIEW_HEIGHT)),
|
|
216
|
+
columns: steps.map((step) => share(this.plot.left + step * this.plot.width, SCATTER_VIEW_WIDTH)),
|
|
217
|
+
};
|
|
218
|
+
})();
|
|
205
219
|
/** Flattened so one index addresses a mark (`chartActiveMark` counts marks). */
|
|
206
220
|
flatMarks = computed(() => this.series().flatMap((entry) => entry.points.map((mark) => ({ entry, mark }))), ...(ngDevMode ? [{ debugName: "flatMarks" }] : /* istanbul ignore next */ []));
|
|
207
221
|
/** Where each series starts in `flatMarks`. */
|
|
@@ -304,7 +318,7 @@ class ScatterChartComponent extends DsChartBase {
|
|
|
304
318
|
return `${series.label}, ${this.xLabel() ?? 'x'} ${format(point.x, 'tooltip')}, ${this.yLabel() ?? 'y'} ${format(point.y, 'tooltip')}`;
|
|
305
319
|
}
|
|
306
320
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ScatterChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
307
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ScatterChartComponent, isStandalone: true, selector: "ds-scatter-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, xLabel: { classPropertyName: "xLabel", publicName: "xLabel", isSignal: true, isRequired: false, transformFunction: null }, yLabel: { classPropertyName: "yLabel", publicName: "yLabel", isSignal: true, isRequired: false, transformFunction: null }, decimator: { classPropertyName: "decimator", publicName: "decimator", isSignal: true, isRequired: false, transformFunction: null }, tickCount: { classPropertyName: "tickCount", publicName: "tickCount", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, dimOthers: { classPropertyName: "dimOthers", publicName: "dimOthers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClicked: "pointClicked" }, host: { properties: { "class.framed": "frameResolved() === 'auto'" } }, exportAs: ["dsScatterChart"], usesInheritance: true, ngImport: i0, template: "<figure\n class=\"scatter-chart\"\n dsChartStates\n messageAxes\n [pinned]=\"activeMark.pinned()\"\n [caption]=\"caption()\"\n [error]=\"error()\"\n [errorText]=\"errorTextResolved()\"\n [pending]=\"loading() || !renderReady()\"\n [empty]=\"isEmpty()\"\n [emptyText]=\"emptyTextResolved()\"\n [skeleton]=\"skeleton\"\n [body]=\"body\"\n (release)=\"activeMark.release()\">\n</figure>\n\n<ng-template #skeleton>\n <ds-skeleton\n class=\"skeleton\"\n width=\"100%\"\n [shimmer]=\"loading()\"\n [height]=\"skeletonHeight + 'px'\" />\n</ng-template>\n\n<ng-template #body>\n <svg\n class=\"canvas\"\n [attr.viewBox]=\"viewBox\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipSwatches]=\"defaults.tooltipSwatches()\"\n [dsChartTooltipPinned]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n (pointerover)=\"onCanvasPointer($event)\"\n (pointermove)=\"onCanvasPointer($event)\"\n (pointerleave)=\"onCanvasLeave()\">\n <rect\n class=\"plot-bg\"\n [attr.x]=\"plot.left\"\n [attr.y]=\"plot.top\"\n [attr.width]=\"plot.width\"\n [attr.height]=\"plot.height\" />\n\n @for (tick of yTicks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"plot.left - 8\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of xTicks(); track tick.value) {\n <text\n class=\"axis-label is-horizontal\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"plotBottom + 18\">\n {{ tick.label }}\n </text>\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"plotBottom\"\n [attr.y2]=\"plotBottom\" />\n\n @for (entry of series(); track entry.key) {\n @let start = seriesStart().get(entry.key) ?? 0;\n\n <g\n [class.is-dimmed]=\"\n highlightedSeries() !== null &&\n highlightedSeries() !== entry.series.id\n \"\n [style.--_scatter-series-color]=\"entry.color\"\n (click)=\"onPointPress($event)\"\n (keydown.enter)=\"onPointActivate($event)\"\n (keydown.space)=\"onPointActivate($event)\">\n @for (mark of entry.points; track mark.key; let index = $index) {\n <circle\n class=\"point\"\n [class.interactive]=\"interactive()\"\n [class.pins]=\"defaults.pinOnClick()\"\n [class.is-active]=\"activeMark.index() === start + index\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === start + index\n \"\n [attr.cx]=\"mark.cx\"\n [attr.cy]=\"mark.cy\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"interactive() ? 0 : null\"\n [attr.data-mark-index]=\"start + index\"\n [attr.aria-label]=\"\n interactive() ? pointLabel(entry.series, mark.point) : null\n \" />\n }\n </g>\n }\n\n @if (pinnedPoint(); as point) {\n <svg:g\n dsChartPinMarker\n [attr.transform]=\"\n 'translate(' + point.cx + ',' + (point.cy - pinLift) + ')'\n \" />\n }\n\n @if (yLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.transform]=\"\n 'rotate(-90) translate(' + -(plot.top + plot.height / 2) + ', 12)'\n \">\n {{ yLabel() }}\n </text>\n }\n\n @if (xLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.x]=\"plot.left + plot.width / 2\"\n [attr.y]=\"plotBottom + 32\">\n {{ xLabel() }}\n </text>\n }\n </svg>\n\n @if (droppedCount() > 0) {\n <p\n class=\"thinned\"\n role=\"status\">\n {{ intl().chart.scatterThinned(droppedCount()) }}\n </p>\n }\n\n @if (multiSeries()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\n [(highlighted)]=\"highlightedSeries\" />\n }\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"dataTableColumns()\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\"\n (toggled)=\"tableOpen.set($event)\" />\n }\n</ng-template>\n", styles: ["@keyframes ds-chart-mark-grow-y{0%{transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-rise{0%{opacity:0;transform:translateY(var(--_chart-rise-distance, 4px))}}@keyframes ds-chart-mark-settle{0%{opacity:0;transform:scale(.96)}}@keyframes ds-chart-ring-sweep{0%{opacity:0;transform:rotate(-30deg) scale(.96)}}@keyframes ds-chart-line-draw{0%{stroke-dashoffset:1}}@keyframes ds-chart-mark-exit{to{opacity:0}}.point{transform-box:fill-box;transform-origin:center}.point{animation:ds-chart-mark-settle var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.point{animation-delay:0ms}}.point.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color, var(--ds-chart-bg-color));border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table{-webkit-user-select:text;user-select:text}.empty-text.is-error{color:var(--error)}:host{position:relative}:host(.framed){--_chart-pin-reset-inset: var(--ds-chart-frame-padding)}@media not (forced-colors:active){.point:focus{outline:none}}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.scatter-chart{--_scatter-chart-grid-line-color: var(--ds-scatter-chart-grid-line-color, var(--ds-chart-grid-line-color));--_scatter-chart-axis-line-color: var(--ds-scatter-chart-axis-line-color, var(--ds-chart-axis-line-color));--_scatter-chart-axis-label-color: var(--ds-scatter-chart-axis-label-color, var(--ds-chart-axis-label-color));--_scatter-chart-axis-font-size: var(--ds-scatter-chart-axis-font-size, var(--ds-chart-axis-font-size));--_scatter-chart-dot-radius: var(--ds-scatter-chart-dot-radius, var(--ds-chart-dot-radius));--_scatter-chart-dot-opacity: var(--ds-scatter-chart-dot-opacity, .72);--_scatter-chart-focus-color: var(--ds-scatter-chart-focus-color, var(--focus-ring-color));--_scatter-chart-focus-width: var(--ds-scatter-chart-focus-width, var(--focus-ring-width));--ds-chart-focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-width: var(--_scatter-chart-focus-width);margin:0}:host{--_chart-message-height: 240px}.canvas{display:block;inline-size:100%;block-size:auto}.grid-line{stroke:var(--_scatter-chart-grid-line-color);stroke-width:1}.axis-line{stroke:var(--_scatter-chart-axis-line-color);stroke-width:1}.axis-label,.axis-title{fill:var(--_scatter-chart-axis-label-color);font-size:var(--_scatter-chart-axis-font-size)}.axis-label{dominant-baseline:middle}.axis-label.is-horizontal{dominant-baseline:auto}.axis-title{font-weight:var(--font-weight-bold)}.point{r:var(--_scatter-chart-dot-radius);fill:var(--_scatter-series-color);fill-opacity:var(--_scatter-chart-dot-opacity)}.point.interactive,.point.pins{cursor:pointer}.canvas .point{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill-opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.canvas .point.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.is-active) .point:not(.is-active),.canvas.dims-others:has(.point.is-pinned) .point:not(.is-pinned){opacity:var(--ds-chart-dim-opacity)}@media not (forced-colors:active){.point.interactive:focus-visible{outline:none}}.point.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color, var(--ds-chart-bg-color)))}.thinned{margin-block:var(--space-2) 0;color:var(--text-secondary);font-size:var(--font-size-xs)}g.is-dimmed{opacity:var(--ds-chart-dim-opacity);transition:opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.plot-bg{fill:var(--ds-chart-plot-bg-color, transparent);pointer-events:none}\n"], dependencies: [{ kind: "component", type: ChartLegendComponent, selector: "ds-chart-legend", inputs: ["items", "hidden", "toggleable", "mode", "highlighted"], outputs: ["hiddenChange", "highlightedChange"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPinned", "dsChartTooltipSwatches"] }, { kind: "component", type: ChartPinMarkerComponent, selector: "g[dsChartPinMarker]" }, { kind: "component", type: ChartStatesComponent, selector: "figure[dsChartStates]", inputs: ["unpin", "pinned", "caption", "error", "errorText", "pending", "empty", "emptyText", "messageAxes", "skeleton", "body", "message"], outputs: ["release"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline", "shimmer"] }, { kind: "component", type: ChartDataTableComponent, selector: "ds-chart-data-table", inputs: ["columns", "rows", "caption", "open", "rowHeader"], outputs: ["toggled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
321
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ScatterChartComponent, isStandalone: true, selector: "ds-scatter-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, xLabel: { classPropertyName: "xLabel", publicName: "xLabel", isSignal: true, isRequired: false, transformFunction: null }, yLabel: { classPropertyName: "yLabel", publicName: "yLabel", isSignal: true, isRequired: false, transformFunction: null }, decimator: { classPropertyName: "decimator", publicName: "decimator", isSignal: true, isRequired: false, transformFunction: null }, tickCount: { classPropertyName: "tickCount", publicName: "tickCount", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, dimOthers: { classPropertyName: "dimOthers", publicName: "dimOthers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClicked: "pointClicked" }, host: { properties: { "class.framed": "frameResolved() === 'auto'" } }, exportAs: ["dsScatterChart"], usesInheritance: true, ngImport: i0, template: "<figure\n class=\"scatter-chart\"\n dsChartStates\n messageAxes\n [pinned]=\"activeMark.pinned()\"\n [caption]=\"caption()\"\n [error]=\"error()\"\n [errorText]=\"errorTextResolved()\"\n [pending]=\"(loading() && isEmpty()) || !renderReady()\"\n [reloading]=\"loading()\"\n [dataTable]=\"dataTableResolved() !== 'none'\"\n [shimmer]=\"loading()\"\n [empty]=\"isEmpty()\"\n [emptyText]=\"emptyTextResolved()\"\n [skeleton]=\"skeleton\"\n [body]=\"body\"\n (release)=\"activeMark.release()\">\n</figure>\n\n<ng-template #skeleton>\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (row of skeletonLayout.rows; track row) {\n <span\n class=\"skeleton-grid-line\"\n [class.is-axis]=\"$last\"\n [style.top]=\"row\"\n [style.left]=\"skeletonLayout.plotLeft\"\n [style.width]=\"skeletonLayout.plotWidth\">\n </span>\n\n <ds-skeleton\n class=\"skeleton-pill is-tick\"\n width=\"var(--space-6)\"\n height=\"var(--space-2)\"\n [style.top]=\"row\"\n [style.inset-inline-end]=\"skeletonLayout.labelEnd\"\n [shimmer]=\"loading()\" />\n }\n\n @for (column of skeletonLayout.columns; track column) {\n <ds-skeleton\n class=\"skeleton-pill is-category\"\n width=\"var(--space-6)\"\n height=\"var(--space-2)\"\n [style.left]=\"column\"\n [style.top]=\"skeletonLayout.categoryTop\"\n [shimmer]=\"loading()\" />\n }\n\n @if (xLabel()) {\n <ds-skeleton\n class=\"skeleton-pill is-category\"\n width=\"var(--space-24)\"\n height=\"var(--space-2)\"\n [style.left]=\"'50%'\"\n [style.top]=\"skeletonLayout.titleTop\"\n [shimmer]=\"loading()\" />\n }\n </div>\n</ng-template>\n\n<ng-template #body>\n <svg\n class=\"canvas\"\n [attr.viewBox]=\"viewBox\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipSwatches]=\"defaults.tooltipSwatches()\"\n [dsChartTooltipPinned]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n (pointerover)=\"onCanvasPointer($event)\"\n (pointermove)=\"onCanvasPointer($event)\"\n (pointerleave)=\"onCanvasLeave()\">\n <rect\n class=\"plot-bg\"\n [attr.x]=\"plot.left\"\n [attr.y]=\"plot.top\"\n [attr.width]=\"plot.width\"\n [attr.height]=\"plot.height\" />\n\n @for (tick of yTicks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"plot.left - 8\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of xTicks(); track tick.value) {\n <text\n class=\"axis-label is-horizontal\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"plotBottom + 18\">\n {{ tick.label }}\n </text>\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"plotBottom\"\n [attr.y2]=\"plotBottom\" />\n\n @for (entry of series(); track entry.key) {\n @let start = seriesStart().get(entry.key) ?? 0;\n\n <g\n [class.is-dimmed]=\"\n highlightedSeries() !== null &&\n highlightedSeries() !== entry.series.id\n \"\n [style.--_scatter-series-color]=\"entry.color\"\n (click)=\"onPointPress($event)\"\n (keydown.enter)=\"onPointActivate($event)\"\n (keydown.space)=\"onPointActivate($event)\">\n @for (mark of entry.points; track mark.key; let index = $index) {\n <circle\n class=\"point\"\n [class.interactive]=\"interactive()\"\n [class.pins]=\"defaults.pinOnClick()\"\n [class.is-active]=\"activeMark.index() === start + index\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === start + index\n \"\n [attr.cx]=\"mark.cx\"\n [attr.cy]=\"mark.cy\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"interactive() ? 0 : null\"\n [attr.data-mark-index]=\"start + index\"\n [attr.aria-label]=\"\n interactive() ? pointLabel(entry.series, mark.point) : null\n \" />\n }\n </g>\n }\n\n @if (pinnedPoint(); as point) {\n <svg:g\n dsChartPinMarker\n [attr.transform]=\"\n 'translate(' + point.cx + ',' + (point.cy - pinLift) + ')'\n \" />\n }\n\n @if (yLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.transform]=\"\n 'rotate(-90) translate(' + -(plot.top + plot.height / 2) + ', 12)'\n \">\n {{ yLabel() }}\n </text>\n }\n\n @if (xLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.x]=\"plot.left + plot.width / 2\"\n [attr.y]=\"plotBottom + 32\">\n {{ xLabel() }}\n </text>\n }\n </svg>\n\n @if (droppedCount() > 0) {\n <p\n class=\"thinned\"\n role=\"status\">\n {{ intl().chart.scatterThinned(droppedCount()) }}\n </p>\n }\n\n @if (multiSeries()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\n [(highlighted)]=\"highlightedSeries\" />\n }\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"dataTableColumns()\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\"\n (toggled)=\"tableOpen.set($event)\" />\n }\n</ng-template>\n", styles: ["@keyframes ds-chart-mark-grow-y{0%{transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-rise{0%{opacity:0;transform:translateY(var(--_chart-rise-distance, 4px))}}@keyframes ds-chart-mark-settle{0%{opacity:0;transform:scale(.96)}}@keyframes ds-chart-line-draw{0%{stroke-dashoffset:1}}@keyframes ds-chart-mark-exit{to{opacity:0}}@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}.point{transform-box:fill-box;transform-origin:center}.point{animation:ds-chart-mark-settle var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.point{animation-delay:0ms}}.point.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color, var(--ds-chart-bg-color));border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table{-webkit-user-select:text;user-select:text}.empty-text.is-error{color:var(--error)}:host{position:relative}:host(.framed){--_chart-pin-reset-inset: var(--ds-chart-frame-padding)}@media not (forced-colors:active){.point:focus{outline:none}}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.scatter-chart{--_scatter-chart-grid-line-color: var(--ds-scatter-chart-grid-line-color, var(--ds-chart-grid-line-color));--_scatter-chart-axis-line-color: var(--ds-scatter-chart-axis-line-color, var(--ds-chart-axis-line-color));--_scatter-chart-axis-label-color: var(--ds-scatter-chart-axis-label-color, var(--ds-chart-axis-label-color));--_scatter-chart-axis-font-size: var(--ds-scatter-chart-axis-font-size, var(--ds-chart-axis-font-size));--_scatter-chart-dot-radius: var(--ds-scatter-chart-dot-radius, var(--ds-chart-dot-radius));--_scatter-chart-dot-opacity: var(--ds-scatter-chart-dot-opacity, .72);--_scatter-chart-focus-color: var(--ds-scatter-chart-focus-color, var(--focus-ring-color));--_scatter-chart-focus-width: var(--ds-scatter-chart-focus-width, var(--focus-ring-width));--ds-chart-focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-width: var(--_scatter-chart-focus-width);margin:0}:host{--_chart-message-height: 240px}.canvas{display:block;inline-size:100%;block-size:auto}.skeleton{position:relative;aspect-ratio:640/360}.skeleton-grid-line{position:absolute;border-block-start:1px solid var(--_scatter-chart-grid-line-color)}.skeleton-grid-line.is-axis{border-block-start-color:var(--_scatter-chart-axis-line-color)}.skeleton-pill{position:absolute;border-radius:var(--radius-pill)}.skeleton-pill.is-tick{translate:0 -50%}.skeleton-pill.is-category{translate:-50% 0}.grid-line{stroke:var(--_scatter-chart-grid-line-color);stroke-width:1}.axis-line{stroke:var(--_scatter-chart-axis-line-color);stroke-width:1}.axis-label,.axis-title{fill:var(--_scatter-chart-axis-label-color);font-size:var(--_scatter-chart-axis-font-size)}.axis-label{dominant-baseline:middle}.axis-label.is-horizontal{dominant-baseline:auto}.axis-title{font-weight:var(--font-weight-bold)}.point{r:var(--_scatter-chart-dot-radius);fill:var(--_scatter-series-color);fill-opacity:var(--_scatter-chart-dot-opacity)}.point.interactive,.point.pins{cursor:pointer}.canvas .point{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill-opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.canvas .point.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.is-active) .point:not(.is-active),.canvas.dims-others:has(.point.is-pinned) .point:not(.is-pinned){opacity:var(--ds-chart-dim-opacity)}@media not (forced-colors:active){.point.interactive:focus-visible{outline:none}}.point.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color, var(--ds-chart-bg-color)))}.thinned{margin-block:var(--space-2) 0;color:var(--text-secondary);font-size:var(--font-size-xs)}g.is-dimmed{opacity:var(--ds-chart-dim-opacity);transition:opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.plot-bg{fill:var(--ds-chart-plot-bg-color, transparent);pointer-events:none}\n"], dependencies: [{ kind: "component", type: ChartLegendComponent, selector: "ds-chart-legend", inputs: ["items", "hidden", "toggleable", "mode", "highlighted"], outputs: ["hiddenChange", "highlightedChange"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPinned", "dsChartTooltipSwatches"] }, { kind: "component", type: ChartPinMarkerComponent, selector: "g[dsChartPinMarker]" }, { kind: "component", type: ChartStatesComponent, selector: "figure[dsChartStates]", inputs: ["unpin", "pinned", "caption", "error", "errorText", "pending", "dataTable", "shimmer", "reloading", "empty", "emptyText", "messageAxes", "skeleton", "body", "message"], outputs: ["release"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline", "shimmer"] }, { kind: "component", type: ChartDataTableComponent, selector: "ds-chart-data-table", inputs: ["columns", "rows", "caption", "open", "rowHeader"], outputs: ["toggled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
308
322
|
}
|
|
309
323
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ScatterChartComponent, decorators: [{
|
|
310
324
|
type: Component,
|
|
@@ -317,7 +331,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
317
331
|
ChartDataTableComponent,
|
|
318
332
|
], host: {
|
|
319
333
|
'[class.framed]': "frameResolved() === 'auto'",
|
|
320
|
-
}, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure\n class=\"scatter-chart\"\n dsChartStates\n messageAxes\n [pinned]=\"activeMark.pinned()\"\n [caption]=\"caption()\"\n [error]=\"error()\"\n [errorText]=\"errorTextResolved()\"\n [pending]=\"loading() || !renderReady()\"\n [empty]=\"isEmpty()\"\n [emptyText]=\"emptyTextResolved()\"\n [skeleton]=\"skeleton\"\n [body]=\"body\"\n (release)=\"activeMark.release()\">\n</figure>\n\n<ng-template #skeleton>\n <ds-skeleton\n class=\"skeleton\"\n width=\"100%\"\n [shimmer]=\"loading()\"\n [height]=\"skeletonHeight + 'px'\" />\n</ng-template>\n\n<ng-template #body>\n <svg\n class=\"canvas\"\n [attr.viewBox]=\"viewBox\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipSwatches]=\"defaults.tooltipSwatches()\"\n [dsChartTooltipPinned]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n (pointerover)=\"onCanvasPointer($event)\"\n (pointermove)=\"onCanvasPointer($event)\"\n (pointerleave)=\"onCanvasLeave()\">\n <rect\n class=\"plot-bg\"\n [attr.x]=\"plot.left\"\n [attr.y]=\"plot.top\"\n [attr.width]=\"plot.width\"\n [attr.height]=\"plot.height\" />\n\n @for (tick of yTicks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"plot.left - 8\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of xTicks(); track tick.value) {\n <text\n class=\"axis-label is-horizontal\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"plotBottom + 18\">\n {{ tick.label }}\n </text>\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"plotBottom\"\n [attr.y2]=\"plotBottom\" />\n\n @for (entry of series(); track entry.key) {\n @let start = seriesStart().get(entry.key) ?? 0;\n\n <g\n [class.is-dimmed]=\"\n highlightedSeries() !== null &&\n highlightedSeries() !== entry.series.id\n \"\n [style.--_scatter-series-color]=\"entry.color\"\n (click)=\"onPointPress($event)\"\n (keydown.enter)=\"onPointActivate($event)\"\n (keydown.space)=\"onPointActivate($event)\">\n @for (mark of entry.points; track mark.key; let index = $index) {\n <circle\n class=\"point\"\n [class.interactive]=\"interactive()\"\n [class.pins]=\"defaults.pinOnClick()\"\n [class.is-active]=\"activeMark.index() === start + index\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === start + index\n \"\n [attr.cx]=\"mark.cx\"\n [attr.cy]=\"mark.cy\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"interactive() ? 0 : null\"\n [attr.data-mark-index]=\"start + index\"\n [attr.aria-label]=\"\n interactive() ? pointLabel(entry.series, mark.point) : null\n \" />\n }\n </g>\n }\n\n @if (pinnedPoint(); as point) {\n <svg:g\n dsChartPinMarker\n [attr.transform]=\"\n 'translate(' + point.cx + ',' + (point.cy - pinLift) + ')'\n \" />\n }\n\n @if (yLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.transform]=\"\n 'rotate(-90) translate(' + -(plot.top + plot.height / 2) + ', 12)'\n \">\n {{ yLabel() }}\n </text>\n }\n\n @if (xLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.x]=\"plot.left + plot.width / 2\"\n [attr.y]=\"plotBottom + 32\">\n {{ xLabel() }}\n </text>\n }\n </svg>\n\n @if (droppedCount() > 0) {\n <p\n class=\"thinned\"\n role=\"status\">\n {{ intl().chart.scatterThinned(droppedCount()) }}\n </p>\n }\n\n @if (multiSeries()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\n [(highlighted)]=\"highlightedSeries\" />\n }\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"dataTableColumns()\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\"\n (toggled)=\"tableOpen.set($event)\" />\n }\n</ng-template>\n", styles: ["@keyframes ds-chart-mark-grow-y{0%{transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-rise{0%{opacity:0;transform:translateY(var(--_chart-rise-distance, 4px))}}@keyframes ds-chart-mark-settle{0%{opacity:0;transform:scale(.96)}}@keyframes ds-chart-ring-sweep{0%{opacity:0;transform:rotate(-30deg) scale(.96)}}@keyframes ds-chart-line-draw{0%{stroke-dashoffset:1}}@keyframes ds-chart-mark-exit{to{opacity:0}}.point{transform-box:fill-box;transform-origin:center}.point{animation:ds-chart-mark-settle var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.point{animation-delay:0ms}}.point.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color, var(--ds-chart-bg-color));border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table{-webkit-user-select:text;user-select:text}.empty-text.is-error{color:var(--error)}:host{position:relative}:host(.framed){--_chart-pin-reset-inset: var(--ds-chart-frame-padding)}@media not (forced-colors:active){.point:focus{outline:none}}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.scatter-chart{--_scatter-chart-grid-line-color: var(--ds-scatter-chart-grid-line-color, var(--ds-chart-grid-line-color));--_scatter-chart-axis-line-color: var(--ds-scatter-chart-axis-line-color, var(--ds-chart-axis-line-color));--_scatter-chart-axis-label-color: var(--ds-scatter-chart-axis-label-color, var(--ds-chart-axis-label-color));--_scatter-chart-axis-font-size: var(--ds-scatter-chart-axis-font-size, var(--ds-chart-axis-font-size));--_scatter-chart-dot-radius: var(--ds-scatter-chart-dot-radius, var(--ds-chart-dot-radius));--_scatter-chart-dot-opacity: var(--ds-scatter-chart-dot-opacity, .72);--_scatter-chart-focus-color: var(--ds-scatter-chart-focus-color, var(--focus-ring-color));--_scatter-chart-focus-width: var(--ds-scatter-chart-focus-width, var(--focus-ring-width));--ds-chart-focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-width: var(--_scatter-chart-focus-width);margin:0}:host{--_chart-message-height: 240px}.canvas{display:block;inline-size:100%;block-size:auto}.grid-line{stroke:var(--_scatter-chart-grid-line-color);stroke-width:1}.axis-line{stroke:var(--_scatter-chart-axis-line-color);stroke-width:1}.axis-label,.axis-title{fill:var(--_scatter-chart-axis-label-color);font-size:var(--_scatter-chart-axis-font-size)}.axis-label{dominant-baseline:middle}.axis-label.is-horizontal{dominant-baseline:auto}.axis-title{font-weight:var(--font-weight-bold)}.point{r:var(--_scatter-chart-dot-radius);fill:var(--_scatter-series-color);fill-opacity:var(--_scatter-chart-dot-opacity)}.point.interactive,.point.pins{cursor:pointer}.canvas .point{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill-opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.canvas .point.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.is-active) .point:not(.is-active),.canvas.dims-others:has(.point.is-pinned) .point:not(.is-pinned){opacity:var(--ds-chart-dim-opacity)}@media not (forced-colors:active){.point.interactive:focus-visible{outline:none}}.point.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color, var(--ds-chart-bg-color)))}.thinned{margin-block:var(--space-2) 0;color:var(--text-secondary);font-size:var(--font-size-xs)}g.is-dimmed{opacity:var(--ds-chart-dim-opacity);transition:opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.plot-bg{fill:var(--ds-chart-plot-bg-color, transparent);pointer-events:none}\n"] }]
|
|
334
|
+
}, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure\n class=\"scatter-chart\"\n dsChartStates\n messageAxes\n [pinned]=\"activeMark.pinned()\"\n [caption]=\"caption()\"\n [error]=\"error()\"\n [errorText]=\"errorTextResolved()\"\n [pending]=\"(loading() && isEmpty()) || !renderReady()\"\n [reloading]=\"loading()\"\n [dataTable]=\"dataTableResolved() !== 'none'\"\n [shimmer]=\"loading()\"\n [empty]=\"isEmpty()\"\n [emptyText]=\"emptyTextResolved()\"\n [skeleton]=\"skeleton\"\n [body]=\"body\"\n (release)=\"activeMark.release()\">\n</figure>\n\n<ng-template #skeleton>\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (row of skeletonLayout.rows; track row) {\n <span\n class=\"skeleton-grid-line\"\n [class.is-axis]=\"$last\"\n [style.top]=\"row\"\n [style.left]=\"skeletonLayout.plotLeft\"\n [style.width]=\"skeletonLayout.plotWidth\">\n </span>\n\n <ds-skeleton\n class=\"skeleton-pill is-tick\"\n width=\"var(--space-6)\"\n height=\"var(--space-2)\"\n [style.top]=\"row\"\n [style.inset-inline-end]=\"skeletonLayout.labelEnd\"\n [shimmer]=\"loading()\" />\n }\n\n @for (column of skeletonLayout.columns; track column) {\n <ds-skeleton\n class=\"skeleton-pill is-category\"\n width=\"var(--space-6)\"\n height=\"var(--space-2)\"\n [style.left]=\"column\"\n [style.top]=\"skeletonLayout.categoryTop\"\n [shimmer]=\"loading()\" />\n }\n\n @if (xLabel()) {\n <ds-skeleton\n class=\"skeleton-pill is-category\"\n width=\"var(--space-24)\"\n height=\"var(--space-2)\"\n [style.left]=\"'50%'\"\n [style.top]=\"skeletonLayout.titleTop\"\n [shimmer]=\"loading()\" />\n }\n </div>\n</ng-template>\n\n<ng-template #body>\n <svg\n class=\"canvas\"\n [attr.viewBox]=\"viewBox\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipSwatches]=\"defaults.tooltipSwatches()\"\n [dsChartTooltipPinned]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n (pointerover)=\"onCanvasPointer($event)\"\n (pointermove)=\"onCanvasPointer($event)\"\n (pointerleave)=\"onCanvasLeave()\">\n <rect\n class=\"plot-bg\"\n [attr.x]=\"plot.left\"\n [attr.y]=\"plot.top\"\n [attr.width]=\"plot.width\"\n [attr.height]=\"plot.height\" />\n\n @for (tick of yTicks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"plot.left - 8\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of xTicks(); track tick.value) {\n <text\n class=\"axis-label is-horizontal\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"plotBottom + 18\">\n {{ tick.label }}\n </text>\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"plotBottom\"\n [attr.y2]=\"plotBottom\" />\n\n @for (entry of series(); track entry.key) {\n @let start = seriesStart().get(entry.key) ?? 0;\n\n <g\n [class.is-dimmed]=\"\n highlightedSeries() !== null &&\n highlightedSeries() !== entry.series.id\n \"\n [style.--_scatter-series-color]=\"entry.color\"\n (click)=\"onPointPress($event)\"\n (keydown.enter)=\"onPointActivate($event)\"\n (keydown.space)=\"onPointActivate($event)\">\n @for (mark of entry.points; track mark.key; let index = $index) {\n <circle\n class=\"point\"\n [class.interactive]=\"interactive()\"\n [class.pins]=\"defaults.pinOnClick()\"\n [class.is-active]=\"activeMark.index() === start + index\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === start + index\n \"\n [attr.cx]=\"mark.cx\"\n [attr.cy]=\"mark.cy\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"interactive() ? 0 : null\"\n [attr.data-mark-index]=\"start + index\"\n [attr.aria-label]=\"\n interactive() ? pointLabel(entry.series, mark.point) : null\n \" />\n }\n </g>\n }\n\n @if (pinnedPoint(); as point) {\n <svg:g\n dsChartPinMarker\n [attr.transform]=\"\n 'translate(' + point.cx + ',' + (point.cy - pinLift) + ')'\n \" />\n }\n\n @if (yLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.transform]=\"\n 'rotate(-90) translate(' + -(plot.top + plot.height / 2) + ', 12)'\n \">\n {{ yLabel() }}\n </text>\n }\n\n @if (xLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.x]=\"plot.left + plot.width / 2\"\n [attr.y]=\"plotBottom + 32\">\n {{ xLabel() }}\n </text>\n }\n </svg>\n\n @if (droppedCount() > 0) {\n <p\n class=\"thinned\"\n role=\"status\">\n {{ intl().chart.scatterThinned(droppedCount()) }}\n </p>\n }\n\n @if (multiSeries()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\n [(highlighted)]=\"highlightedSeries\" />\n }\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"dataTableColumns()\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\"\n (toggled)=\"tableOpen.set($event)\" />\n }\n</ng-template>\n", styles: ["@keyframes ds-chart-mark-grow-y{0%{transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-rise{0%{opacity:0;transform:translateY(var(--_chart-rise-distance, 4px))}}@keyframes ds-chart-mark-settle{0%{opacity:0;transform:scale(.96)}}@keyframes ds-chart-line-draw{0%{stroke-dashoffset:1}}@keyframes ds-chart-mark-exit{to{opacity:0}}@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}.point{transform-box:fill-box;transform-origin:center}.point{animation:ds-chart-mark-settle var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.point{animation-delay:0ms}}.point.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color, var(--ds-chart-bg-color));border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table{-webkit-user-select:text;user-select:text}.empty-text.is-error{color:var(--error)}:host{position:relative}:host(.framed){--_chart-pin-reset-inset: var(--ds-chart-frame-padding)}@media not (forced-colors:active){.point:focus{outline:none}}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.scatter-chart{--_scatter-chart-grid-line-color: var(--ds-scatter-chart-grid-line-color, var(--ds-chart-grid-line-color));--_scatter-chart-axis-line-color: var(--ds-scatter-chart-axis-line-color, var(--ds-chart-axis-line-color));--_scatter-chart-axis-label-color: var(--ds-scatter-chart-axis-label-color, var(--ds-chart-axis-label-color));--_scatter-chart-axis-font-size: var(--ds-scatter-chart-axis-font-size, var(--ds-chart-axis-font-size));--_scatter-chart-dot-radius: var(--ds-scatter-chart-dot-radius, var(--ds-chart-dot-radius));--_scatter-chart-dot-opacity: var(--ds-scatter-chart-dot-opacity, .72);--_scatter-chart-focus-color: var(--ds-scatter-chart-focus-color, var(--focus-ring-color));--_scatter-chart-focus-width: var(--ds-scatter-chart-focus-width, var(--focus-ring-width));--ds-chart-focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-width: var(--_scatter-chart-focus-width);margin:0}:host{--_chart-message-height: 240px}.canvas{display:block;inline-size:100%;block-size:auto}.skeleton{position:relative;aspect-ratio:640/360}.skeleton-grid-line{position:absolute;border-block-start:1px solid var(--_scatter-chart-grid-line-color)}.skeleton-grid-line.is-axis{border-block-start-color:var(--_scatter-chart-axis-line-color)}.skeleton-pill{position:absolute;border-radius:var(--radius-pill)}.skeleton-pill.is-tick{translate:0 -50%}.skeleton-pill.is-category{translate:-50% 0}.grid-line{stroke:var(--_scatter-chart-grid-line-color);stroke-width:1}.axis-line{stroke:var(--_scatter-chart-axis-line-color);stroke-width:1}.axis-label,.axis-title{fill:var(--_scatter-chart-axis-label-color);font-size:var(--_scatter-chart-axis-font-size)}.axis-label{dominant-baseline:middle}.axis-label.is-horizontal{dominant-baseline:auto}.axis-title{font-weight:var(--font-weight-bold)}.point{r:var(--_scatter-chart-dot-radius);fill:var(--_scatter-series-color);fill-opacity:var(--_scatter-chart-dot-opacity)}.point.interactive,.point.pins{cursor:pointer}.canvas .point{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill-opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.canvas .point.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.is-active) .point:not(.is-active),.canvas.dims-others:has(.point.is-pinned) .point:not(.is-pinned){opacity:var(--ds-chart-dim-opacity)}@media not (forced-colors:active){.point.interactive:focus-visible{outline:none}}.point.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color, var(--ds-chart-bg-color)))}.thinned{margin-block:var(--space-2) 0;color:var(--text-secondary);font-size:var(--font-size-xs)}g.is-dimmed{opacity:var(--ds-chart-dim-opacity);transition:opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.plot-bg{fill:var(--ds-chart-plot-bg-color, transparent);pointer-events:none}\n"] }]
|
|
321
335
|
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], xLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "xLabel", required: false }] }], yLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yLabel", required: false }] }], decimator: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimator", required: false }] }], tickCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickCount", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], dimOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "dimOthers", required: false }] }], pointClicked: [{ type: i0.Output, args: ["pointClicked"] }] } });
|
|
322
336
|
|
|
323
337
|
/**
|