@ids-group-ltd/ids-design-system 0.13.3 → 0.14.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 +1104 -14
- package/components.md +567 -34
- package/design-system.md +9 -0
- package/docs/agent/INDEX.md +57 -15
- package/docs/agent/charts/chart-colour-which-palette-a-chart-takes.md +1 -1
- package/docs/agent/charts/column-series-component.md +8 -0
- package/docs/agent/charts/ds-bar-chart.md +6 -1
- package/docs/agent/charts/ds-chart-data-table.md +10 -0
- package/docs/agent/charts/ds-chart.md +10 -0
- package/docs/agent/charts/ds-column-chart.md +5 -1
- package/docs/agent/charts/ds-funnel-chart.md +5 -1
- package/docs/agent/charts/ds-heatmap-chart.md +20 -0
- package/docs/agent/charts/ds-line-chart.md +8 -4
- package/docs/agent/charts/{ds-donut-chart.md → ds-pie-chart.md} +10 -6
- package/docs/agent/charts/ds-scatter-chart.md +20 -0
- package/docs/agent/charts/ds-waterfall-chart.md +20 -0
- package/docs/agent/charts/line-series-component.md +8 -0
- package/docs/agent/charts/reference-label-component.md +8 -0
- package/docs/agent/charts/reference-line-component.md +8 -0
- package/docs/agent/charts/series-annotation-component.md +10 -0
- package/docs/agent/feedback/ds-alert.md +4 -0
- package/docs/agent/feedback/ds-avatar-group.md +4 -0
- package/docs/agent/feedback/ds-avatar.md +4 -0
- package/docs/agent/feedback/ds-badge.md +4 -0
- package/docs/agent/feedback/ds-banner.md +5 -1
- package/docs/agent/feedback/ds-bar.md +4 -0
- package/docs/agent/feedback/ds-description-item.md +8 -0
- package/docs/agent/feedback/ds-description-list.md +8 -0
- package/docs/agent/feedback/ds-empty-state.md +4 -0
- package/docs/agent/feedback/ds-list-item.md +8 -0
- package/docs/agent/feedback/ds-list.md +8 -0
- package/docs/agent/feedback/ds-loading-overlay.md +8 -0
- package/docs/agent/feedback/ds-skeleton.md +4 -0
- package/docs/agent/feedback/ds-spinner.md +4 -0
- package/docs/agent/feedback/ds-stat.md +4 -0
- package/docs/agent/feedback/ds-status-dot.md +4 -0
- package/docs/agent/feedback/ds-tag.md +4 -0
- package/docs/agent/feedback/ds-timeline-item.md +8 -0
- package/docs/agent/feedback/ds-toast-region.md +8 -0
- package/docs/agent/feedback/ds-toast.md +4 -0
- package/docs/agent/feedback/ds-tree.md +8 -0
- package/docs/agent/forms/ds-autocomplete.md +4 -0
- package/docs/agent/forms/ds-button-group.md +8 -0
- package/docs/agent/forms/ds-button.md +6 -2
- package/docs/agent/forms/ds-checkbox.md +4 -0
- package/docs/agent/forms/ds-color-picker.md +8 -0
- package/docs/agent/forms/ds-date-picker.md +5 -1
- package/docs/agent/forms/ds-dropzone.md +4 -0
- package/docs/agent/forms/ds-field-group.md +8 -0
- package/docs/agent/forms/ds-filter-bar.md +8 -0
- package/docs/agent/forms/ds-icon-button.md +4 -0
- package/docs/agent/forms/ds-input.md +13 -1
- package/docs/agent/forms/ds-multi-select.md +4 -0
- package/docs/agent/forms/ds-number-stepper.md +4 -0
- package/docs/agent/forms/ds-otp-input.md +8 -0
- package/docs/agent/forms/ds-password-rules.md +8 -0
- package/docs/agent/forms/ds-radio-group.md +8 -0
- package/docs/agent/forms/ds-radio.md +4 -0
- package/docs/agent/forms/ds-search.md +5 -1
- package/docs/agent/forms/ds-segmented.md +8 -0
- package/docs/agent/forms/ds-select.md +4 -0
- package/docs/agent/forms/ds-slider.md +8 -0
- package/docs/agent/forms/ds-split-button.md +8 -0
- package/docs/agent/forms/ds-switch.md +7 -1
- package/docs/agent/forms/ds-textarea.md +6 -1
- package/docs/agent/forms/ds-time-picker.md +8 -0
- package/docs/agent/forms/ds-toggle-button.md +8 -0
- package/docs/agent/forms/filter-item-directive.md +8 -0
- package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +4 -0
- package/docs/agent/navigation/ds-app-layout.md +6 -2
- package/docs/agent/navigation/ds-auth-layout.md +5 -1
- package/docs/agent/navigation/ds-breadcrumbs.md +4 -0
- package/docs/agent/navigation/ds-container.md +8 -0
- package/docs/agent/navigation/ds-divider.md +4 -0
- package/docs/agent/navigation/ds-inline.md +8 -0
- package/docs/agent/navigation/ds-page-footer.md +4 -0
- package/docs/agent/navigation/ds-page-header.md +5 -1
- package/docs/agent/navigation/ds-pagination.md +5 -1
- package/docs/agent/navigation/ds-sidenav-footer.md +8 -0
- package/docs/agent/navigation/ds-sidenav-group.md +4 -0
- package/docs/agent/navigation/ds-sidenav-item.md +4 -0
- package/docs/agent/navigation/ds-sidenav.md +4 -0
- package/docs/agent/navigation/ds-stack.md +8 -0
- package/docs/agent/navigation/ds-stepper.md +4 -0
- package/docs/agent/navigation/ds-tab.md +8 -0
- package/docs/agent/navigation/ds-tabs.md +5 -1
- package/docs/agent/overlays/ds-bottom-sheet.md +4 -0
- package/docs/agent/overlays/ds-drawer.md +4 -0
- package/docs/agent/overlays/ds-menu.md +4 -0
- package/docs/agent/overlays/ds-modal-card.md +4 -0
- package/docs/agent/overlays/ds-modal.md +4 -0
- package/docs/agent/overlays/ds-popover.md +4 -0
- package/docs/agent/overlays/ds-tooltip-panel.md +8 -0
- package/docs/agent/overlays/ds-tooltip.md +4 -0
- package/docs/agent/platform/ds-config.md +2 -1
- package/docs/agent/surfaces/ds-accordion-item.md +8 -0
- package/docs/agent/surfaces/ds-accordion.md +4 -0
- package/docs/agent/surfaces/ds-card.md +6 -2
- package/docs/agent/tables/ds-cell-template.md +8 -0
- package/docs/agent/tables/ds-table-columns.md +8 -0
- package/docs/agent/tables/ds-table-export.md +8 -0
- package/docs/agent/tables/ds-table.md +12 -4
- package/docs/agent/tables/header-filter-directive.md +8 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +10 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +19 -19
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +7 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +9 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +140 -43
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +7 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs +42 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +39 -14
- 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 +727 -93
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +8 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +29 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +5 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +23 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +25 -24
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +217 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +183 -501
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +44 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +7 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +22 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +382 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +5 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +322 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +6 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +9 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +7 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +23 -4
- 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-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-switch.mjs +20 -5
- 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 +6 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +4 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +36 -28
- 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 +23 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +5 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +34 -21
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +252 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +361 -17
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +2 -3
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +7 -3
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.10.0.json +2 -2
- package/migrations/0.10.1.json +3 -3
- package/migrations/0.10.2.json +8 -28
- package/migrations/0.11.0.json +3 -3
- package/migrations/0.11.1.json +15 -15
- package/migrations/0.11.2.json +9 -9
- package/migrations/0.11.3.json +1 -1
- package/migrations/0.11.4.json +8 -8
- package/migrations/0.12.1.json +1 -1
- package/migrations/0.12.2.json +5 -2
- package/migrations/0.12.3.json +3 -3
- package/migrations/0.13.0.json +24 -32
- package/migrations/0.13.1.json +5 -5
- package/migrations/0.13.3.json +32 -10
- package/migrations/0.13.4.json +2492 -0
- package/migrations/0.14.0.json +591 -0
- package/migrations/0.5.0.json +11 -5
- package/migrations/0.7.0.json +5 -2
- package/migrations/0.8.0.json +4 -3
- package/migrations/0.9.0.json +6 -3
- package/migrations/README.md +7 -2
- package/package.json +41 -9
- package/styles/_chart-frame.scss +19 -6
- package/styles/_chart-motion.scss +17 -10
- package/styles/_check-box.scss +12 -12
- package/styles/_dropdown-overlay.scss +14 -10
- package/styles/_field-box.scss +3 -3
- package/styles/_field-label.scss +7 -7
- package/styles/_overlay-motion.scss +15 -7
- package/styles/_skeleton-shimmer.scss +4 -1
- package/styles/_table-controls.scss +3 -3
- package/styles/_tokens-charts.scss +40 -7
- package/styles/_tokens.scss +3 -3
- package/styles/_typography.scss +101 -101
- package/themes/dark/_theme.scss +13 -0
- package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +5 -4
- package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +17 -17
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +4 -2
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +40 -9
- package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +8 -4
- package/types/ids-group-ltd-ids-design-system-components-chart-data-table.d.ts +34 -0
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +15 -3
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +345 -60
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +8 -2
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +9 -7
- package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +4 -4
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +8 -7
- package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +124 -0
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +88 -139
- package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +4 -0
- package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +18 -1
- package/types/{ids-group-ltd-ids-design-system-components-donut-chart.d.ts → ids-group-ltd-ids-design-system-components-pie-chart.d.ts} +25 -23
- package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +189 -0
- package/types/ids-group-ltd-ids-design-system-components-search.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +5 -1
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +1 -0
- package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +10 -1
- package/types/ids-group-ltd-ids-design-system-components-table-export.d.ts +3 -0
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +44 -33
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +13 -0
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +5 -2
- package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +116 -0
- package/types/ids-group-ltd-ids-design-system-components.d.ts +142 -6
- package/types/ids-group-ltd-ids-design-system-core.d.ts +42 -10
- package/types/ids-group-ltd-ids-design-system.d.ts +14 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +0 -382
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +0 -1
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, numberAttribute, booleanAttribute, output, computed, signal, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import { resolveChartDefaults, decimationTarget, needsDecimating, lttbDecimate, minMaxDecimate, niceDomain, CHART_SERIES_COLORS, linearScale, tickValues, markOf } from '@ids-group-ltd/ids-design-system/components';
|
|
4
|
+
import { ChartLegendComponent } from '@ids-group-ltd/ids-design-system/components/chart-legend';
|
|
5
|
+
import { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';
|
|
6
|
+
import { chartActiveMark, ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
|
|
7
|
+
import { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';
|
|
8
|
+
|
|
9
|
+
const SCATTER_VIEW_WIDTH = 640;
|
|
10
|
+
const SCATTER_VIEW_HEIGHT = 360;
|
|
11
|
+
const SCATTER_DEFAULT_TICK_COUNT = 5;
|
|
12
|
+
/** The span of every plotted reading on both scales. A non-finite coordinate is not a position, so
|
|
13
|
+
* it neither widens the plot nor lands on an edge of it.
|
|
14
|
+
*
|
|
15
|
+
* @internal */
|
|
16
|
+
function scatterExtent(series) {
|
|
17
|
+
const points = series
|
|
18
|
+
.flatMap((entry) => entry.data)
|
|
19
|
+
.filter((point) => Number.isFinite(point.x) && Number.isFinite(point.y));
|
|
20
|
+
if (points.length === 0) {
|
|
21
|
+
return { xMin: 0, xMax: 0, yMin: 0, yMax: 0 };
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
xMin: Math.min(...points.map((point) => point.x)),
|
|
25
|
+
xMax: Math.max(...points.map((point) => point.x)),
|
|
26
|
+
yMin: Math.min(...points.map((point) => point.y)),
|
|
27
|
+
yMax: Math.max(...points.map((point) => point.y)),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/** Where one reading lands, clamped into the plot. A domain pinned narrower than the data would
|
|
31
|
+
* otherwise put a mark over the axis labels rather than on an edge.
|
|
32
|
+
*
|
|
33
|
+
* @internal */
|
|
34
|
+
function scatterPlacement(point, extent, plot) {
|
|
35
|
+
const share = (value, min, max) => {
|
|
36
|
+
const span = max - min;
|
|
37
|
+
if (!Number.isFinite(span) || span <= 0 || !Number.isFinite(value)) {
|
|
38
|
+
return 0;
|
|
39
|
+
}
|
|
40
|
+
return Math.min(1, Math.max(0, (value - min) / span));
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
cx: plot.left + share(point.x, extent.xMin, extent.xMax) * plot.width,
|
|
44
|
+
cy: plot.top +
|
|
45
|
+
plot.height -
|
|
46
|
+
share(point.y, extent.yMin, extent.yMax) * plot.height,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Room for the axis labels outside the plot, in the canvas's own units. */
|
|
51
|
+
const AXIS_GUTTER = 52;
|
|
52
|
+
const CATEGORY_GUTTER = 34;
|
|
53
|
+
const EDGE_GUTTER = 12;
|
|
54
|
+
/**
|
|
55
|
+
* Two continuous quantities against each other: weight against carriage cost, distance against
|
|
56
|
+
* time, volume against conversion. None of the other five charts draws this.
|
|
57
|
+
*
|
|
58
|
+
* It is the only chart in the family whose mark count the CALLER decides - an area has one node per
|
|
59
|
+
* series, a waterfall one per step, a heat map one per cell, and all three are bounded by the
|
|
60
|
+
* question itself. So it is also the only one that thins its own data before drawing: past four
|
|
61
|
+
* times the plot's width in marks the series is decimated, and the chart says so on its face
|
|
62
|
+
* rather than leaving the reader to count points that are not there.
|
|
63
|
+
*/
|
|
64
|
+
class ScatterChartComponent {
|
|
65
|
+
/** One entry per series, each carrying its own readings. Both scales are continuous, so a
|
|
66
|
+
* point holds its position on each rather than an index into a list of categories. */
|
|
67
|
+
data = input([], ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
68
|
+
/** Names the horizontal quantity under the plot. Without it the reader has two numbers and no
|
|
69
|
+
* idea which is which - on a scatter that is the whole reading. */
|
|
70
|
+
xLabel = input(null, ...(ngDevMode ? [{ debugName: "xLabel" }] : /* istanbul ignore next */ []));
|
|
71
|
+
/** Names the vertical quantity beside the plot. */
|
|
72
|
+
yLabel = input(null, ...(ngDevMode ? [{ debugName: "yLabel" }] : /* istanbul ignore next */ []));
|
|
73
|
+
/** Which decimator thins a series past the budget. `'minMax'` by default, because it is the only
|
|
74
|
+
* one that promises each bucket's extremum survives. */
|
|
75
|
+
decimator = input('minMax', ...(ngDevMode ? [{ debugName: "decimator" }] : /* istanbul ignore next */ []));
|
|
76
|
+
/** A hint, not a count, and it applies to BOTH axes. Ticks snap to a round step. */
|
|
77
|
+
tickCount = input(SCATTER_DEFAULT_TICK_COUNT, { ...(ngDevMode ? { debugName: "tickCount" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
78
|
+
/** Printed above the plot as the visible title, and reused as the annex table's caption. */
|
|
79
|
+
caption = input(null, ...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
|
|
80
|
+
/** The accessible name. Generated when omitted, naming both axes' spans, how many readings
|
|
81
|
+
* were drawn and how many were thinned out. */
|
|
82
|
+
summary = input(null, ...(ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []));
|
|
83
|
+
/** Makes every mark a button and gives it a keyboard route. `pointClicked` fires whether or
|
|
84
|
+
* not this is set. */
|
|
85
|
+
interactive = input(false, { ...(ngDevMode ? { debugName: "interactive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
86
|
+
/** `'auto'` draws the bordered, padded box; `'none'` leaves it bare for a chart inside a card
|
|
87
|
+
* the page has already drawn. Unset falls back to `DS_CONFIG.chart.frame`. */
|
|
88
|
+
frame = input(null, ...(ngDevMode ? [{ debugName: "frame" }] : /* istanbul ignore next */ []));
|
|
89
|
+
/** The annex table under the plot. It lists EVERY reading, including the ones decimation left
|
|
90
|
+
* out of the drawing, which is what keeps a thinned chart honest. */
|
|
91
|
+
dataTable = input(null, ...(ngDevMode ? [{ debugName: "dataTable" }] : /* istanbul ignore next */ []));
|
|
92
|
+
/** A skeleton at the plot's own height, so the page does not resize when the data lands. */
|
|
93
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
94
|
+
/** Separate from empty data: "the request failed" and "there is nothing to show" read the same
|
|
95
|
+
* and mean opposite things. */
|
|
96
|
+
error = input(false, { ...(ngDevMode ? { debugName: "error" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
97
|
+
/** Shown when no series carries a reading. Unset falls back to `DS_CONFIG.chart.emptyText`. */
|
|
98
|
+
emptyText = input(null, ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
|
|
99
|
+
/** Shown in place of the plot while `error` is set. Unset falls back to
|
|
100
|
+
* `DS_CONFIG.chart.errorText`. */
|
|
101
|
+
errorText = input(null, ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
102
|
+
/** Formats every number the chart prints - both axes' ticks, the accessible name and the annex
|
|
103
|
+
* table. Unset falls back to `DS_CONFIG.chart.valueFormat`. */
|
|
104
|
+
valueFormat = input(null, ...(ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []));
|
|
105
|
+
/** Whether a hovered or focused mark opens a tooltip. A scatter prints no value beside its
|
|
106
|
+
* marks - there is no room - so this is where a reading is read without the annex table. */
|
|
107
|
+
tooltip = input('item', ...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
108
|
+
/** Fades every mark but the one under the pointer. Off by default: on a scatter the pile-up IS
|
|
109
|
+
* the reading, and dimming the neighbours takes exactly that away. */
|
|
110
|
+
dimOthers = input(false, { ...(ngDevMode ? { debugName: "dimOthers" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
111
|
+
/** The clicked reading, with the series it belongs to. Fires on click and on Enter or Space. */
|
|
112
|
+
pointClicked = output();
|
|
113
|
+
defaults = resolveChartDefaults(this);
|
|
114
|
+
frameResolved = this.defaults.frame;
|
|
115
|
+
dataTableResolved = this.defaults.dataTable;
|
|
116
|
+
emptyTextResolved = this.defaults.emptyText;
|
|
117
|
+
errorTextResolved = this.defaults.errorText;
|
|
118
|
+
valueFormatResolved = this.defaults.valueFormat;
|
|
119
|
+
activeMark = chartActiveMark(() => 0);
|
|
120
|
+
viewBox = `0 0 ${SCATTER_VIEW_WIDTH} ${SCATTER_VIEW_HEIGHT}`;
|
|
121
|
+
plot = {
|
|
122
|
+
left: AXIS_GUTTER,
|
|
123
|
+
top: EDGE_GUTTER,
|
|
124
|
+
width: SCATTER_VIEW_WIDTH - AXIS_GUTTER - EDGE_GUTTER,
|
|
125
|
+
height: SCATTER_VIEW_HEIGHT - CATEGORY_GUTTER - EDGE_GUTTER,
|
|
126
|
+
};
|
|
127
|
+
isEmpty = computed(() => this.data().every((series) => series.data.length === 0), ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
128
|
+
/** One mark per drawn unit of plot width is the ceiling: two marks sharing a pixel are two DOM
|
|
129
|
+
* nodes a reader cannot tell apart. The viewBox is one unit per pixel at a typical card width. */
|
|
130
|
+
budget = computed(() => decimationTarget(this.plot.width), ...(ngDevMode ? [{ debugName: "budget" }] : /* istanbul ignore next */ []));
|
|
131
|
+
drawnSeries = computed(() => {
|
|
132
|
+
const mode = this.decimator();
|
|
133
|
+
const budget = this.budget();
|
|
134
|
+
return this.data().map((series) => {
|
|
135
|
+
const thin = mode !== 'none' && needsDecimating(series.data.length, budget);
|
|
136
|
+
const data = !thin
|
|
137
|
+
? series.data
|
|
138
|
+
: mode === 'lttb'
|
|
139
|
+
? lttbDecimate(series.data, budget)
|
|
140
|
+
: minMaxDecimate(series.data, budget);
|
|
141
|
+
return { series, data, thinned: thin ? series.data.length : 0 };
|
|
142
|
+
});
|
|
143
|
+
}, ...(ngDevMode ? [{ debugName: "drawnSeries" }] : /* istanbul ignore next */ []));
|
|
144
|
+
/** How many readings were dropped, over every series. A decimated chart that does not SAY it is
|
|
145
|
+
* decimated leaves the reader counting points that were never drawn. */
|
|
146
|
+
droppedCount = computed(() => this.drawnSeries().reduce((total, entry) => total + (entry.thinned === 0 ? 0 : entry.thinned - entry.data.length), 0), ...(ngDevMode ? [{ debugName: "droppedCount" }] : /* istanbul ignore next */ []));
|
|
147
|
+
extent = computed(() => scatterExtent(this.drawnSeries().map((entry) => ({
|
|
148
|
+
...entry.series,
|
|
149
|
+
data: entry.data,
|
|
150
|
+
}))), ...(ngDevMode ? [{ debugName: "extent" }] : /* istanbul ignore next */ []));
|
|
151
|
+
domains = computed(() => {
|
|
152
|
+
const measured = this.extent();
|
|
153
|
+
const ticks = this.tickCount();
|
|
154
|
+
const x = niceDomain(measured.xMin, measured.xMax, ticks);
|
|
155
|
+
const y = niceDomain(measured.yMin, measured.yMax, ticks);
|
|
156
|
+
return {
|
|
157
|
+
xMin: x.min,
|
|
158
|
+
xMax: x.max || measured.xMax,
|
|
159
|
+
yMin: y.min,
|
|
160
|
+
yMax: y.max || measured.yMax,
|
|
161
|
+
};
|
|
162
|
+
}, ...(ngDevMode ? [{ debugName: "domains" }] : /* istanbul ignore next */ []));
|
|
163
|
+
series = computed(() => {
|
|
164
|
+
const extent = this.domains();
|
|
165
|
+
return this.drawnSeries().map((entry, index) => {
|
|
166
|
+
const slot = index % CHART_SERIES_COLORS.length;
|
|
167
|
+
return {
|
|
168
|
+
key: entry.series.id,
|
|
169
|
+
series: entry.series,
|
|
170
|
+
color: entry.series.color ?? CHART_SERIES_COLORS[slot],
|
|
171
|
+
points: entry.data
|
|
172
|
+
.filter((point) => Number.isFinite(point.x) && Number.isFinite(point.y))
|
|
173
|
+
.map((point, pointIndex) => ({
|
|
174
|
+
key: `${entry.series.id}-${pointIndex}`,
|
|
175
|
+
point,
|
|
176
|
+
...scatterPlacement(point, extent, this.plot),
|
|
177
|
+
})),
|
|
178
|
+
};
|
|
179
|
+
});
|
|
180
|
+
}, ...(ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []));
|
|
181
|
+
xTicks = computed(() => {
|
|
182
|
+
const { xMin, xMax } = this.domains();
|
|
183
|
+
const toX = linearScale(xMin, xMax, this.plot.width);
|
|
184
|
+
const format = this.valueFormatResolved();
|
|
185
|
+
return tickValues(xMin, xMax, this.tickCount()).map((value) => ({
|
|
186
|
+
value,
|
|
187
|
+
x: this.plot.left + toX(value),
|
|
188
|
+
label: format(value, 'tick'),
|
|
189
|
+
}));
|
|
190
|
+
}, ...(ngDevMode ? [{ debugName: "xTicks" }] : /* istanbul ignore next */ []));
|
|
191
|
+
yTicks = computed(() => {
|
|
192
|
+
const { yMin, yMax } = this.domains();
|
|
193
|
+
const toY = linearScale(yMin, yMax, this.plot.height);
|
|
194
|
+
const format = this.valueFormatResolved();
|
|
195
|
+
return tickValues(yMin, yMax, this.tickCount()).map((value) => ({
|
|
196
|
+
value,
|
|
197
|
+
y: this.plot.top + this.plot.height - toY(value),
|
|
198
|
+
label: format(value, 'tick'),
|
|
199
|
+
}));
|
|
200
|
+
}, ...(ngDevMode ? [{ debugName: "yTicks" }] : /* istanbul ignore next */ []));
|
|
201
|
+
plotBottom = this.plot.top + this.plot.height;
|
|
202
|
+
plotRight = this.plot.left + this.plot.width;
|
|
203
|
+
multiSeries = computed(() => this.data().length > 1, ...(ngDevMode ? [{ debugName: "multiSeries" }] : /* istanbul ignore next */ []));
|
|
204
|
+
/** The series named in the legend under the pointer, which fades the rest. */
|
|
205
|
+
highlightedSeries = signal(null, ...(ngDevMode ? [{ debugName: "highlightedSeries" }] : /* istanbul ignore next */ []));
|
|
206
|
+
legendItems = computed(() => this.series().map((entry) => ({
|
|
207
|
+
id: entry.series.id,
|
|
208
|
+
label: entry.series.label,
|
|
209
|
+
color: entry.color,
|
|
210
|
+
})), ...(ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []));
|
|
211
|
+
accessibleName = computed(() => {
|
|
212
|
+
const given = this.summary();
|
|
213
|
+
if (given) {
|
|
214
|
+
return given;
|
|
215
|
+
}
|
|
216
|
+
const format = this.valueFormatResolved();
|
|
217
|
+
const { xMin, xMax, yMin, yMax } = this.domains();
|
|
218
|
+
const counted = this.series().reduce((total, entry) => total + entry.points.length, 0);
|
|
219
|
+
const axes = `${this.xLabel() ?? 'x'} from ${format(xMin, 'tooltip')} to ${format(xMax, 'tooltip')}, ${this.yLabel() ?? 'y'} from ${format(yMin, 'tooltip')} to ${format(yMax, 'tooltip')}`;
|
|
220
|
+
const dropped = this.droppedCount();
|
|
221
|
+
return `${this.caption() ?? 'Scatter chart'}: ${counted} readings drawn, ${axes}.${dropped > 0 ? ` ${dropped} further readings were thinned out to keep the plot drawable; the data table lists every one.` : ''}`;
|
|
222
|
+
}, ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
|
|
223
|
+
dataTableColumns = computed(() => [
|
|
224
|
+
'Series',
|
|
225
|
+
this.xLabel() ?? 'x',
|
|
226
|
+
this.yLabel() ?? 'y',
|
|
227
|
+
], ...(ngDevMode ? [{ debugName: "dataTableColumns" }] : /* istanbul ignore next */ []));
|
|
228
|
+
/** Built only while the disclosure is open: a scatter carries thousands of readings, and every
|
|
229
|
+
* one of them as a table row is a cost nobody pays until they ask. */
|
|
230
|
+
dataTableRows = computed(() => this.tableIsOpen()
|
|
231
|
+
? this.tableRows().map((row) => ({
|
|
232
|
+
key: row.key,
|
|
233
|
+
cells: [row.series, row.x, row.y],
|
|
234
|
+
}))
|
|
235
|
+
: [], ...(ngDevMode ? [{ debugName: "dataTableRows" }] : /* istanbul ignore next */ []));
|
|
236
|
+
tableRows = computed(() => {
|
|
237
|
+
const format = this.valueFormatResolved();
|
|
238
|
+
return this.data().flatMap((series) => series.data.map((point, index) => ({
|
|
239
|
+
key: `${series.id}-${index}`,
|
|
240
|
+
series: series.label,
|
|
241
|
+
x: format(point.x, 'tooltip'),
|
|
242
|
+
y: format(point.y, 'tooltip'),
|
|
243
|
+
})));
|
|
244
|
+
}, ...(ngDevMode ? [{ debugName: "tableRows" }] : /* istanbul ignore next */ []));
|
|
245
|
+
/** `<details>` keeps its children in the DOM while it is shut, so a scatter of 12 000 readings
|
|
246
|
+
* parked 48 000 nodes on the page - three times what decimating the PLOT had just saved. The
|
|
247
|
+
* rows are built when the disclosure opens and dropped when it shuts; every reading is still
|
|
248
|
+
* one click away, which is what the table is for. */
|
|
249
|
+
tableOpen = signal(false, ...(ngDevMode ? [{ debugName: "tableOpen" }] : /* istanbul ignore next */ []));
|
|
250
|
+
tableIsOpen = computed(() => this.tableOpen() || this.dataTableResolved() === 'visible', ...(ngDevMode ? [{ debugName: "tableIsOpen" }] : /* istanbul ignore next */ []));
|
|
251
|
+
skeletonHeight = `${SCATTER_VIEW_HEIGHT}`;
|
|
252
|
+
/** Flattened so one index addresses a mark, which is what `chartActiveMark` counts. */
|
|
253
|
+
flatMarks = computed(() => this.series().flatMap((entry) => entry.points.map((mark) => ({ entry, mark }))), ...(ngDevMode ? [{ debugName: "flatMarks" }] : /* istanbul ignore next */ []));
|
|
254
|
+
/** Where each series starts in `flatMarks`, so a point carries its flat index without a search
|
|
255
|
+
* and the series' one listener reads it back. */
|
|
256
|
+
seriesStart = computed(() => {
|
|
257
|
+
const starts = new Map();
|
|
258
|
+
let next = 0;
|
|
259
|
+
for (const entry of this.series()) {
|
|
260
|
+
starts.set(entry.key, next);
|
|
261
|
+
next += entry.points.length;
|
|
262
|
+
}
|
|
263
|
+
return starts;
|
|
264
|
+
}, ...(ngDevMode ? [{ debugName: "seriesStart" }] : /* istanbul ignore next */ []));
|
|
265
|
+
onPointOver(event) {
|
|
266
|
+
const hit = markOf(event);
|
|
267
|
+
if (hit) {
|
|
268
|
+
this.activeMark.enter(hit.index, event, undefined, hit.element);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
onPointActivate(event) {
|
|
272
|
+
const held = this.flatMarks()[markOf(event)?.index ?? -1];
|
|
273
|
+
if (held) {
|
|
274
|
+
this.onPointClick(held.entry.series, held.mark.point);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
tooltipContext = computed(() => {
|
|
278
|
+
const held = this.flatMarks()[this.activeMark.index()];
|
|
279
|
+
if (this.tooltip() === 'none' || !held) {
|
|
280
|
+
return null;
|
|
281
|
+
}
|
|
282
|
+
const format = this.valueFormatResolved();
|
|
283
|
+
return {
|
|
284
|
+
category: `${this.xLabel() ?? 'x'} ${format(held.mark.point.x, 'tooltip')}`,
|
|
285
|
+
entries: [
|
|
286
|
+
{
|
|
287
|
+
label: held.entry.series.label,
|
|
288
|
+
value: held.mark.point.y,
|
|
289
|
+
formatted: format(held.mark.point.y, 'tooltip'),
|
|
290
|
+
color: held.entry.color,
|
|
291
|
+
},
|
|
292
|
+
],
|
|
293
|
+
};
|
|
294
|
+
}, ...(ngDevMode ? [{ debugName: "tooltipContext" }] : /* istanbul ignore next */ []));
|
|
295
|
+
onPointClick(series, point) {
|
|
296
|
+
this.pointClicked.emit({ series, point });
|
|
297
|
+
}
|
|
298
|
+
pointLabel(series, point) {
|
|
299
|
+
const format = this.valueFormatResolved();
|
|
300
|
+
return `${series.label}, ${this.xLabel() ?? 'x'} ${format(point.x, 'tooltip')}, ${this.yLabel() ?? 'y'} ${format(point.y, 'tooltip')}`;
|
|
301
|
+
}
|
|
302
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ScatterChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
303
|
+
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 }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, frame: { classPropertyName: "frame", publicName: "frame", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", 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"], ngImport: i0, template: "<figure class=\"scatter-chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <ds-skeleton\n class=\"skeleton\"\n width=\"100%\"\n [height]=\"skeletonHeight + 'px'\" />\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\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 [dsChartTooltipOrigin]=\"activeMark.origin()\">\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 (pointerover)=\"onPointOver($event)\"\n (focusin)=\"onPointOver($event)\"\n (click)=\"onPointActivate($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 [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 (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 <!-- On its face, not only in the accessible name: a decimated chart that stays quiet leaves the\n reader counting points that were never drawn. -->\n @if (droppedCount() > 0) {\n <p\n class=\"thinned\"\n role=\"status\">\n {{ droppedCount() }} readings thinned out to keep the plot drawable -\n every one is in the data table.\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 }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.point{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) backwards}.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);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}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}.empty.is-error,.empty-text.is-error{color:var(--error)}@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}.empty{display:grid;place-items:center;min-block-size:240px;margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.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{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.interactive:hover) .point.interactive:not(:hover),.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.interactive:focus-visible) .point.interactive:not(:focus-visible),.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))}.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)}\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", "dsChartTooltipPreferBelow", "dsChartTooltipPinned"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "component", type: ChartDataTableComponent, selector: "ds-chart-data-table", inputs: ["columns", "rows", "caption", "open", "rowHeader"], outputs: ["toggled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
304
|
+
}
|
|
305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ScatterChartComponent, decorators: [{
|
|
306
|
+
type: Component,
|
|
307
|
+
args: [{ selector: 'ds-scatter-chart', standalone: true, exportAs: 'dsScatterChart', imports: [
|
|
308
|
+
ChartLegendComponent,
|
|
309
|
+
ChartTooltipDirective,
|
|
310
|
+
SkeletonComponent,
|
|
311
|
+
ChartDataTableComponent,
|
|
312
|
+
], host: {
|
|
313
|
+
'[class.framed]': "frameResolved() === 'auto'",
|
|
314
|
+
}, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"scatter-chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <ds-skeleton\n class=\"skeleton\"\n width=\"100%\"\n [height]=\"skeletonHeight + 'px'\" />\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\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 [dsChartTooltipOrigin]=\"activeMark.origin()\">\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 (pointerover)=\"onPointOver($event)\"\n (focusin)=\"onPointOver($event)\"\n (click)=\"onPointActivate($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 [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 (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 <!-- On its face, not only in the accessible name: a decimated chart that stays quiet leaves the\n reader counting points that were never drawn. -->\n @if (droppedCount() > 0) {\n <p\n class=\"thinned\"\n role=\"status\">\n {{ droppedCount() }} readings thinned out to keep the plot drawable -\n every one is in the data table.\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 }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.point{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) backwards}.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);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}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}.empty.is-error,.empty-text.is-error{color:var(--error)}@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}.empty{display:grid;place-items:center;min-block-size:240px;margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.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{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.interactive:hover) .point.interactive:not(:hover),.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.interactive:focus-visible) .point.interactive:not(:focus-visible),.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))}.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)}\n"] }]
|
|
315
|
+
}], 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 }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], frame: [{ type: i0.Input, args: [{ isSignal: true, alias: "frame", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", 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"] }] } });
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Generated bundle index. Do not edit.
|
|
319
|
+
*/
|
|
320
|
+
|
|
321
|
+
export { ScatterChartComponent };
|
|
322
|
+
//# sourceMappingURL=ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-scatter-chart.mjs","sources":["../../../src/lib/components/scatter-chart/scatter-chart.math.ts","../../../src/lib/components/scatter-chart/scatter-chart.component.ts","../../../src/lib/components/scatter-chart/scatter-chart.component.html","../../../src/lib/components/scatter-chart/ids-group-ltd-ids-design-system-components-scatter-chart.ts"],"sourcesContent":["import type { ScatterChartSeries, ScatterPoint } from './scatter-chart.types';\n\nexport const SCATTER_VIEW_WIDTH = 640;\nexport const SCATTER_VIEW_HEIGHT = 360;\nexport const SCATTER_DEFAULT_TICK_COUNT = 5;\n\n/** The drawable rectangle, in the canvas's own units. */\nexport interface ScatterPlot {\n readonly left: number;\n readonly top: number;\n readonly width: number;\n readonly height: number;\n}\n\n/** What both axes have to hold. */\nexport interface ScatterExtent {\n readonly xMin: number;\n readonly xMax: number;\n readonly yMin: number;\n readonly yMax: number;\n}\n\n/** The span of every plotted reading on both scales. A non-finite coordinate is not a position, so\n * it neither widens the plot nor lands on an edge of it.\n *\n * @internal */\nexport function scatterExtent(\n series: readonly ScatterChartSeries[],\n): ScatterExtent {\n const points = series\n .flatMap((entry) => entry.data)\n .filter((point) => Number.isFinite(point.x) && Number.isFinite(point.y));\n\n if (points.length === 0) {\n return { xMin: 0, xMax: 0, yMin: 0, yMax: 0 };\n }\n\n return {\n xMin: Math.min(...points.map((point) => point.x)),\n xMax: Math.max(...points.map((point) => point.x)),\n yMin: Math.min(...points.map((point) => point.y)),\n yMax: Math.max(...points.map((point) => point.y)),\n };\n}\n\n/** Where one reading lands, clamped into the plot. A domain pinned narrower than the data would\n * otherwise put a mark over the axis labels rather than on an edge.\n *\n * @internal */\nexport function scatterPlacement(\n point: ScatterPoint,\n extent: ScatterExtent,\n plot: ScatterPlot,\n): { cx: number; cy: number } {\n const share = (value: number, min: number, max: number): number => {\n const span = max - min;\n if (!Number.isFinite(span) || span <= 0 || !Number.isFinite(value)) {\n return 0;\n }\n\n return Math.min(1, Math.max(0, (value - min) / span));\n };\n\n return {\n cx: plot.left + share(point.x, extent.xMin, extent.xMax) * plot.width,\n cy:\n plot.top +\n plot.height -\n share(point.y, extent.yMin, extent.yMax) * plot.height,\n };\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n decimationTarget,\n linearScale,\n lttbDecimate,\n markOf,\n minMaxDecimate,\n needsDecimating,\n niceDomain,\n tickValues,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { ChartLegendComponent } from '@ids-group-ltd/ids-design-system/components/chart-legend';\nimport type { ChartLegendItem } from '@ids-group-ltd/ids-design-system/components/chart-legend';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport {\n ChartTooltipDirective,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n SCATTER_DEFAULT_TICK_COUNT,\n SCATTER_VIEW_HEIGHT,\n SCATTER_VIEW_WIDTH,\n scatterExtent,\n scatterPlacement,\n} from './scatter-chart.math';\nimport type { ScatterPlot } from './scatter-chart.math';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport { resolveChartDefaults } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n ScatterChartDecimator,\n ScatterChartReading,\n ScatterChartSeries,\n ScatterPoint,\n} from './scatter-chart.types';\n\n/** Room for the axis labels outside the plot, in the canvas's own units. */\nconst AXIS_GUTTER = 52;\nconst CATEGORY_GUTTER = 34;\nconst EDGE_GUTTER = 12;\n\ninterface PlacedPoint {\n readonly key: string;\n readonly cx: number;\n readonly cy: number;\n readonly point: ScatterPoint;\n}\n\ninterface PlacedSeries {\n readonly key: string;\n readonly series: ScatterChartSeries;\n readonly color: string;\n readonly points: readonly PlacedPoint[];\n}\n\n/**\n * Two continuous quantities against each other: weight against carriage cost, distance against\n * time, volume against conversion. None of the other five charts draws this.\n *\n * It is the only chart in the family whose mark count the CALLER decides - an area has one node per\n * series, a waterfall one per step, a heat map one per cell, and all three are bounded by the\n * question itself. So it is also the only one that thins its own data before drawing: past four\n * times the plot's width in marks the series is decimated, and the chart says so on its face\n * rather than leaving the reader to count points that are not there.\n */\n@Component({\n selector: 'ds-scatter-chart',\n standalone: true,\n exportAs: 'dsScatterChart',\n imports: [\n ChartLegendComponent,\n ChartTooltipDirective,\n SkeletonComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './scatter-chart.component.html',\n styleUrl: './scatter-chart.component.scss',\n host: {\n '[class.framed]': \"frameResolved() === 'auto'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScatterChartComponent {\n /** One entry per series, each carrying its own readings. Both scales are continuous, so a\n * point holds its position on each rather than an index into a list of categories. */\n readonly data = input<readonly ScatterChartSeries[]>([]);\n\n /** Names the horizontal quantity under the plot. Without it the reader has two numbers and no\n * idea which is which - on a scatter that is the whole reading. */\n readonly xLabel = input<string | null>(null);\n\n /** Names the vertical quantity beside the plot. */\n readonly yLabel = input<string | null>(null);\n\n /** Which decimator thins a series past the budget. `'minMax'` by default, because it is the only\n * one that promises each bucket's extremum survives. */\n readonly decimator = input<ScatterChartDecimator>('minMax');\n\n /** A hint, not a count, and it applies to BOTH axes. Ticks snap to a round step. */\n readonly tickCount = input(SCATTER_DEFAULT_TICK_COUNT, {\n transform: numberAttribute,\n });\n\n /** Printed above the plot as the visible title, and reused as the annex table's caption. */\n readonly caption = input<string | null>(null);\n\n /** The accessible name. Generated when omitted, naming both axes' spans, how many readings\n * were drawn and how many were thinned out. */\n readonly summary = input<string | null>(null);\n\n /** Makes every mark a button and gives it a keyboard route. `pointClicked` fires whether or\n * not this is set. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** `'auto'` draws the bordered, padded box; `'none'` leaves it bare for a chart inside a card\n * the page has already drawn. Unset falls back to `DS_CONFIG.chart.frame`. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** The annex table under the plot. It lists EVERY reading, including the ones decimation left\n * out of the drawing, which is what keeps a thinned chart honest. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** A skeleton at the plot's own height, so the page does not resize when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n\n /** Separate from empty data: \"the request failed\" and \"there is nothing to show\" read the same\n * and mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** Shown when no series carries a reading. Unset falls back to `DS_CONFIG.chart.emptyText`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shown in place of the plot while `error` is set. Unset falls back to\n * `DS_CONFIG.chart.errorText`. */\n readonly errorText = input<string | null>(null);\n\n /** Formats every number the chart prints - both axes' ticks, the accessible name and the annex\n * table. Unset falls back to `DS_CONFIG.chart.valueFormat`. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n /** Whether a hovered or focused mark opens a tooltip. A scatter prints no value beside its\n * marks - there is no room - so this is where a reading is read without the annex table. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n /** Fades every mark but the one under the pointer. Off by default: on a scatter the pile-up IS\n * the reading, and dimming the neighbours takes exactly that away. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** The clicked reading, with the series it belongs to. Fires on click and on Enter or Space. */\n readonly pointClicked = output<ScatterChartReading>();\n\n private readonly defaults = resolveChartDefaults(this);\n readonly frameResolved = this.defaults.frame;\n readonly dataTableResolved = this.defaults.dataTable;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n\n protected readonly activeMark = chartActiveMark(() => 0);\n\n protected readonly viewBox = `0 0 ${SCATTER_VIEW_WIDTH} ${SCATTER_VIEW_HEIGHT}`;\n\n protected readonly plot: ScatterPlot = {\n left: AXIS_GUTTER,\n top: EDGE_GUTTER,\n width: SCATTER_VIEW_WIDTH - AXIS_GUTTER - EDGE_GUTTER,\n height: SCATTER_VIEW_HEIGHT - CATEGORY_GUTTER - EDGE_GUTTER,\n };\n\n protected readonly isEmpty = computed(() =>\n this.data().every((series) => series.data.length === 0),\n );\n\n /** One mark per drawn unit of plot width is the ceiling: two marks sharing a pixel are two DOM\n * nodes a reader cannot tell apart. The viewBox is one unit per pixel at a typical card width. */\n private readonly budget = computed(() => decimationTarget(this.plot.width));\n\n protected readonly drawnSeries = computed(() => {\n const mode = this.decimator();\n const budget = this.budget();\n\n return this.data().map((series) => {\n const thin =\n mode !== 'none' && needsDecimating(series.data.length, budget);\n const data = !thin\n ? series.data\n : mode === 'lttb'\n ? lttbDecimate(series.data, budget)\n : minMaxDecimate(series.data, budget);\n\n return { series, data, thinned: thin ? series.data.length : 0 };\n });\n });\n\n /** How many readings were dropped, over every series. A decimated chart that does not SAY it is\n * decimated leaves the reader counting points that were never drawn. */\n protected readonly droppedCount = computed(() =>\n this.drawnSeries().reduce(\n (total, entry) =>\n total + (entry.thinned === 0 ? 0 : entry.thinned - entry.data.length),\n 0,\n ),\n );\n\n private readonly extent = computed(() =>\n scatterExtent(\n this.drawnSeries().map((entry) => ({\n ...entry.series,\n data: entry.data,\n })),\n ),\n );\n\n private readonly domains = computed(() => {\n const measured = this.extent();\n const ticks = this.tickCount();\n const x = niceDomain(measured.xMin, measured.xMax, ticks);\n const y = niceDomain(measured.yMin, measured.yMax, ticks);\n\n return {\n xMin: x.min,\n xMax: x.max || measured.xMax,\n yMin: y.min,\n yMax: y.max || measured.yMax,\n };\n });\n\n protected readonly series = computed<readonly PlacedSeries[]>(() => {\n const extent = this.domains();\n\n return this.drawnSeries().map((entry, index) => {\n const slot = index % CHART_SERIES_COLORS.length;\n\n return {\n key: entry.series.id,\n series: entry.series,\n color: entry.series.color ?? CHART_SERIES_COLORS[slot],\n points: entry.data\n .filter(\n (point: ScatterPoint) =>\n Number.isFinite(point.x) && Number.isFinite(point.y),\n )\n .map((point: ScatterPoint, pointIndex: number) => ({\n key: `${entry.series.id}-${pointIndex}`,\n point,\n ...scatterPlacement(point, extent, this.plot),\n })),\n };\n });\n });\n\n protected readonly xTicks = computed(() => {\n const { xMin, xMax } = this.domains();\n const toX = linearScale(xMin, xMax, this.plot.width);\n const format = this.valueFormatResolved();\n\n return tickValues(xMin, xMax, this.tickCount()).map((value) => ({\n value,\n x: this.plot.left + toX(value),\n label: format(value, 'tick'),\n }));\n });\n\n protected readonly yTicks = computed(() => {\n const { yMin, yMax } = this.domains();\n const toY = linearScale(yMin, yMax, this.plot.height);\n const format = this.valueFormatResolved();\n\n return tickValues(yMin, yMax, this.tickCount()).map((value) => ({\n value,\n y: this.plot.top + this.plot.height - toY(value),\n label: format(value, 'tick'),\n }));\n });\n\n protected readonly plotBottom = this.plot.top + this.plot.height;\n protected readonly plotRight = this.plot.left + this.plot.width;\n\n protected readonly multiSeries = computed(() => this.data().length > 1);\n\n /** The series named in the legend under the pointer, which fades the rest. */\n protected readonly highlightedSeries = signal<string | null>(null);\n\n protected readonly legendItems = computed<readonly ChartLegendItem[]>(() =>\n this.series().map((entry) => ({\n id: entry.series.id,\n label: entry.series.label,\n color: entry.color,\n })),\n );\n\n protected readonly accessibleName = computed(() => {\n const given = this.summary();\n if (given) {\n return given;\n }\n const format = this.valueFormatResolved();\n const { xMin, xMax, yMin, yMax } = this.domains();\n const counted = this.series().reduce(\n (total, entry) => total + entry.points.length,\n 0,\n );\n const axes = `${this.xLabel() ?? 'x'} from ${format(xMin, 'tooltip')} to ${format(xMax, 'tooltip')}, ${this.yLabel() ?? 'y'} from ${format(yMin, 'tooltip')} to ${format(yMax, 'tooltip')}`;\n const dropped = this.droppedCount();\n\n return `${this.caption() ?? 'Scatter chart'}: ${counted} readings drawn, ${axes}.${dropped > 0 ? ` ${dropped} further readings were thinned out to keep the plot drawable; the data table lists every one.` : ''}`;\n });\n\n protected readonly dataTableColumns = computed<readonly string[]>(() => [\n 'Series',\n this.xLabel() ?? 'x',\n this.yLabel() ?? 'y',\n ]);\n\n /** Built only while the disclosure is open: a scatter carries thousands of readings, and every\n * one of them as a table row is a cost nobody pays until they ask. */\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.tableIsOpen()\n ? this.tableRows().map((row) => ({\n key: row.key,\n cells: [row.series, row.x, row.y],\n }))\n : [],\n );\n\n protected readonly tableRows = computed(() => {\n const format = this.valueFormatResolved();\n\n return this.data().flatMap((series) =>\n series.data.map((point, index) => ({\n key: `${series.id}-${index}`,\n series: series.label,\n x: format(point.x, 'tooltip'),\n y: format(point.y, 'tooltip'),\n })),\n );\n });\n\n /** `<details>` keeps its children in the DOM while it is shut, so a scatter of 12 000 readings\n * parked 48 000 nodes on the page - three times what decimating the PLOT had just saved. The\n * rows are built when the disclosure opens and dropped when it shuts; every reading is still\n * one click away, which is what the table is for. */\n protected readonly tableOpen = signal(false);\n\n protected readonly tableIsOpen = computed(\n () => this.tableOpen() || this.dataTableResolved() === 'visible',\n );\n\n protected readonly skeletonHeight = `${SCATTER_VIEW_HEIGHT}`;\n\n /** Flattened so one index addresses a mark, which is what `chartActiveMark` counts. */\n private readonly flatMarks = computed(() =>\n this.series().flatMap((entry) =>\n entry.points.map((mark) => ({ entry, mark })),\n ),\n );\n\n /** Where each series starts in `flatMarks`, so a point carries its flat index without a search\n * and the series' one listener reads it back. */\n protected readonly seriesStart = computed(() => {\n const starts = new Map<string, number>();\n let next = 0;\n for (const entry of this.series()) {\n starts.set(entry.key, next);\n next += entry.points.length;\n }\n\n return starts;\n });\n\n protected onPointOver(event: Event): void {\n const hit = markOf(event);\n if (hit) {\n this.activeMark.enter(hit.index, event, undefined, hit.element);\n }\n }\n\n protected onPointActivate(event: Event): void {\n const held = this.flatMarks()[markOf(event)?.index ?? -1];\n if (held) {\n this.onPointClick(held.entry.series, held.mark.point);\n }\n }\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const held = this.flatMarks()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !held) {\n return null;\n }\n const format = this.valueFormatResolved();\n\n return {\n category: `${this.xLabel() ?? 'x'} ${format(held.mark.point.x, 'tooltip')}`,\n entries: [\n {\n label: held.entry.series.label,\n value: held.mark.point.y,\n formatted: format(held.mark.point.y, 'tooltip'),\n color: held.entry.color,\n },\n ],\n };\n },\n );\n\n protected onPointClick(\n series: ScatterChartSeries,\n point: ScatterPoint,\n ): void {\n this.pointClicked.emit({ series, point });\n }\n\n protected pointLabel(\n series: ScatterChartSeries,\n point: ScatterPoint,\n ): string {\n const format = this.valueFormatResolved();\n\n return `${series.label}, ${this.xLabel() ?? 'x'} ${format(point.x, 'tooltip')}, ${this.yLabel() ?? 'y'} ${format(point.y, 'tooltip')}`;\n }\n}\n","<figure class=\"scatter-chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <ds-skeleton\n class=\"skeleton\"\n width=\"100%\"\n [height]=\"skeletonHeight + 'px'\" />\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\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 [dsChartTooltipOrigin]=\"activeMark.origin()\">\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 (pointerover)=\"onPointOver($event)\"\n (focusin)=\"onPointOver($event)\"\n (click)=\"onPointActivate($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 [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 (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 <!-- On its face, not only in the accessible name: a decimated chart that stays quiet leaves the\n reader counting points that were never drawn. -->\n @if (droppedCount() > 0) {\n <p\n class=\"thinned\"\n role=\"status\">\n {{ droppedCount() }} readings thinned out to keep the plot drawable -\n every one is in the data table.\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 }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEO,MAAM,kBAAkB,GAAG,GAAG;AAC9B,MAAM,mBAAmB,GAAG,GAAG;AAC/B,MAAM,0BAA0B,GAAG,CAAC;AAkB3C;;;AAGgB;AACV,SAAU,aAAa,CAC3B,MAAqC,EAAA;IAErC,MAAM,MAAM,GAA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EAAA,WAAA,EAAA,IAAA,EACjB,uBAAuB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,SAAA,EAAA,MAAA,EAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAUd,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAlBjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,UAAA,EAChB,IAAI,EAAA,QAAA,EACN,gBAAgB,EAAA,OAAA,EACjB;wBACP,oBAAoB;wBACpB,qBAAqB;wBACrB,iBAAiB;wBACjB,uBAAuB;qBACxB,EAAA,IAAA,EAGK;AACJ,wBAAA,gBAAgB,EAAE,4BAA4B;AAC/C,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,gsIAAA,EAAA,MAAA,EAAA,CAAA,g+MAAA,CAAA,EAAA;;;AErGjD;;AAEG;;;;"}
|
|
@@ -78,6 +78,10 @@ class SearchComponent {
|
|
|
78
78
|
focus(options) {
|
|
79
79
|
this.inputEl()?.nativeElement.focus(options);
|
|
80
80
|
}
|
|
81
|
+
/** Drops focus from the search input - the counterpart of `focus()`. */
|
|
82
|
+
blur() {
|
|
83
|
+
this.inputEl()?.nativeElement.blur();
|
|
84
|
+
}
|
|
81
85
|
onText(next) {
|
|
82
86
|
this.text.set(next);
|
|
83
87
|
if (this.debounce() > 0 && next !== '') {
|
|
@@ -149,7 +153,7 @@ class SearchComponent {
|
|
|
149
153
|
useExisting: forwardRef(() => SearchComponent),
|
|
150
154
|
multi: true,
|
|
151
155
|
},
|
|
152
|
-
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"sizeResolved()\">\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\">\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel() || placeholder() || null\"\n [ngModel]=\"text()\"\n [disabled]=\"isDisabled()\"\n (ngModelChange)=\"onText($event)\"\n (keydown.enter)=\"onSubmit()\"\n (blur)=\"markTouched()\" />\n\n @if (clearable() && text()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n aria-label=\"Clear search\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear()\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)));--_search-bg-color: var(--ds-search-bg-color, var(--surface-default));--_search-border: var(--ds-search-border, var(--border-default));--_search-radius: var(--ds-search-radius, var(--ds-radius-control));--_search-border-hover: var(--ds-search-border-hover, var(--border-default));--_search-bg-color-focus: var(--ds-search-bg-color-focus, var(--surface-default));--_search-border-focus: var(--ds-search-border-focus, var(--accent));--_search-focus-shadow: var(--ds-search-focus-shadow, var(--ds-field-focus-shadow));--_search-text-color: var(--ds-search-text-color, var(--text-primary));--_search-placeholder: var(--ds-search-placeholder, var(--text-tertiary));--_search-
|
|
156
|
+
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"sizeResolved()\">\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\">\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel() || placeholder() || null\"\n [ngModel]=\"text()\"\n [disabled]=\"isDisabled()\"\n (ngModelChange)=\"onText($event)\"\n (keydown.enter)=\"onSubmit()\"\n (blur)=\"markTouched()\" />\n\n @if (clearable() && text()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n aria-label=\"Clear search\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear()\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)));--_search-bg-color: var(--ds-search-bg-color, var(--surface-default));--_search-border: var(--ds-search-border, var(--border-default));--_search-radius: var(--ds-search-radius, var(--ds-radius-control));--_search-border-hover: var(--ds-search-border-hover, var(--border-default));--_search-bg-color-focus: var(--ds-search-bg-color-focus, var(--surface-default));--_search-border-focus: var(--ds-search-border-focus, var(--accent));--_search-focus-shadow: var(--ds-search-focus-shadow, var(--ds-field-focus-shadow));--_search-text-color: var(--ds-search-text-color, var(--text-primary));--_search-placeholder: var(--ds-search-placeholder, var(--text-tertiary));--_search-max-width: var(--ds-search-max-width, none);display:block}.search{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_search-bg-color);border:var(--border-width-default) solid var(--_search-border);border-radius:var(--_search-radius);padding:0 var(--space-3);height:var(--_search-height);width:100%;max-width:var(--_search-max-width);transition:border-color var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search:hover{border-color:var(--_search-border-hover)}@media not (forced-colors:active){.search .search-input:where(:focus-visible){outline:none}}.search:focus-within{background-color:var(--_search-bg-color-focus);border-color:var(--_search-border-focus);box-shadow:var(--_search-focus-shadow)}.search:has(.search-input:disabled){background-color:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.search:has(.search-input:disabled) .search-input,.search:has(.search-input:disabled) .icon{color:var(--text-disabled)}.search .icon{width:var(--icon-md);height:var(--icon-md);color:var(--icon-default)}.search .search-input{flex:1;min-width:0;border:0}@media not (forced-colors:active){.search .search-input{outline:none}}.search .search-input{background:transparent;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_search-text-color)}.search .search-input::placeholder{color:var(--_search-placeholder)}.search .search-clear{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-0-5);border:0;background:transparent;border-radius:var(--radius-pill, 999px);color:var(--icon-default);cursor:pointer;opacity:1;transition:opacity var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search .search-clear .icon{width:var(--icon-sm);height:var(--icon-sm)}.search .search-clear:hover{opacity:1;background:var(--surface-muted, rgba(0, 0, 0, .06))}.search .search-clear:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.search .kbd{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-flat) var(--font-mono);padding:var(--space-px) var(--space-1-5);background:var(--surface-default);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--ds-radius-inner);color:var(--text-tertiary)}.search.sm{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-sm)))}.search.md{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)))}.search.lg{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-lg)))}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .search{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .search:hover,:host(.in-group) .search:focus,:host(.in-group) .search:focus-visible,:host(.in-group) .search:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .search:hover,:host(.in-group) .search:focus,:host(.in-group) .search:focus-visible,:host(.in-group) .search:focus-within{outline:none}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: FieldClickFocusDirective, selector: "[dsFieldClickFocus]" }] });
|
|
153
157
|
}
|
|
154
158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SearchComponent, decorators: [{
|
|
155
159
|
type: Component,
|
|
@@ -162,7 +166,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
162
166
|
useExisting: forwardRef(() => SearchComponent),
|
|
163
167
|
multi: true,
|
|
164
168
|
},
|
|
165
|
-
], template: "<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"sizeResolved()\">\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\">\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel() || placeholder() || null\"\n [ngModel]=\"text()\"\n [disabled]=\"isDisabled()\"\n (ngModelChange)=\"onText($event)\"\n (keydown.enter)=\"onSubmit()\"\n (blur)=\"markTouched()\" />\n\n @if (clearable() && text()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n aria-label=\"Clear search\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear()\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)));--_search-bg-color: var(--ds-search-bg-color, var(--surface-default));--_search-border: var(--ds-search-border, var(--border-default));--_search-radius: var(--ds-search-radius, var(--ds-radius-control));--_search-border-hover: var(--ds-search-border-hover, var(--border-default));--_search-bg-color-focus: var(--ds-search-bg-color-focus, var(--surface-default));--_search-border-focus: var(--ds-search-border-focus, var(--accent));--_search-focus-shadow: var(--ds-search-focus-shadow, var(--ds-field-focus-shadow));--_search-text-color: var(--ds-search-text-color, var(--text-primary));--_search-placeholder: var(--ds-search-placeholder, var(--text-tertiary));--_search-
|
|
169
|
+
], template: "<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"sizeResolved()\">\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\">\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel() || placeholder() || null\"\n [ngModel]=\"text()\"\n [disabled]=\"isDisabled()\"\n (ngModelChange)=\"onText($event)\"\n (keydown.enter)=\"onSubmit()\"\n (blur)=\"markTouched()\" />\n\n @if (clearable() && text()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n aria-label=\"Clear search\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear()\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)));--_search-bg-color: var(--ds-search-bg-color, var(--surface-default));--_search-border: var(--ds-search-border, var(--border-default));--_search-radius: var(--ds-search-radius, var(--ds-radius-control));--_search-border-hover: var(--ds-search-border-hover, var(--border-default));--_search-bg-color-focus: var(--ds-search-bg-color-focus, var(--surface-default));--_search-border-focus: var(--ds-search-border-focus, var(--accent));--_search-focus-shadow: var(--ds-search-focus-shadow, var(--ds-field-focus-shadow));--_search-text-color: var(--ds-search-text-color, var(--text-primary));--_search-placeholder: var(--ds-search-placeholder, var(--text-tertiary));--_search-max-width: var(--ds-search-max-width, none);display:block}.search{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_search-bg-color);border:var(--border-width-default) solid var(--_search-border);border-radius:var(--_search-radius);padding:0 var(--space-3);height:var(--_search-height);width:100%;max-width:var(--_search-max-width);transition:border-color var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search:hover{border-color:var(--_search-border-hover)}@media not (forced-colors:active){.search .search-input:where(:focus-visible){outline:none}}.search:focus-within{background-color:var(--_search-bg-color-focus);border-color:var(--_search-border-focus);box-shadow:var(--_search-focus-shadow)}.search:has(.search-input:disabled){background-color:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.search:has(.search-input:disabled) .search-input,.search:has(.search-input:disabled) .icon{color:var(--text-disabled)}.search .icon{width:var(--icon-md);height:var(--icon-md);color:var(--icon-default)}.search .search-input{flex:1;min-width:0;border:0}@media not (forced-colors:active){.search .search-input{outline:none}}.search .search-input{background:transparent;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_search-text-color)}.search .search-input::placeholder{color:var(--_search-placeholder)}.search .search-clear{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-0-5);border:0;background:transparent;border-radius:var(--radius-pill, 999px);color:var(--icon-default);cursor:pointer;opacity:1;transition:opacity var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search .search-clear .icon{width:var(--icon-sm);height:var(--icon-sm)}.search .search-clear:hover{opacity:1;background:var(--surface-muted, rgba(0, 0, 0, .06))}.search .search-clear:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.search .kbd{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-flat) var(--font-mono);padding:var(--space-px) var(--space-1-5);background:var(--surface-default);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--ds-radius-inner);color:var(--text-tertiary)}.search.sm{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-sm)))}.search.md{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)))}.search.lg{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-lg)))}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .search{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .search:hover,:host(.in-group) .search:focus,:host(.in-group) .search:focus-visible,:host(.in-group) .search:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .search:hover,:host(.in-group) .search:focus,:host(.in-group) .search:focus-visible,:host(.in-group) .search:focus-within{outline:none}}\n"] }]
|
|
166
170
|
}], ctorParameters: () => [], propDecorators: { hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], shortcut: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcut", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], submitted: [{ type: i0.Output, args: ["submitted"] }], debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], inputEl: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }] } });
|
|
167
171
|
|
|
168
172
|
/**
|