@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, computed, signal, PLATFORM_ID, DestroyRef, untracked, afterRenderEffect, TemplateRef, Directive, Injector, afterNextRender, isDevMode, input, booleanAttribute, effect, ElementRef, DOCUMENT } from '@angular/core';
|
|
3
|
-
import { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';
|
|
3
|
+
import { DS_CONFIG, resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';
|
|
4
4
|
import { isPlatformBrowser } from '@angular/common';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { NgForm, FormGroupDirective, NgControl } from '@angular/forms';
|
|
@@ -45,6 +45,14 @@ const chartColors = {
|
|
|
45
45
|
ramp6: 'var(--ds-chart-ramp-6-color)',
|
|
46
46
|
ramp7: 'var(--ds-chart-ramp-7-color)',
|
|
47
47
|
ramp8: 'var(--ds-chart-ramp-8-color)',
|
|
48
|
+
heat1: 'var(--ds-chart-heat-1-color)',
|
|
49
|
+
heat2: 'var(--ds-chart-heat-2-color)',
|
|
50
|
+
heat3: 'var(--ds-chart-heat-3-color)',
|
|
51
|
+
heat4: 'var(--ds-chart-heat-4-color)',
|
|
52
|
+
heat5: 'var(--ds-chart-heat-5-color)',
|
|
53
|
+
heat6: 'var(--ds-chart-heat-6-color)',
|
|
54
|
+
heat7: 'var(--ds-chart-heat-7-color)',
|
|
55
|
+
heat8: 'var(--ds-chart-heat-8-color)',
|
|
48
56
|
};
|
|
49
57
|
/** @internal See chartColors. */
|
|
50
58
|
const CHART_SERIES_COLORS = [
|
|
@@ -68,6 +76,17 @@ const CHART_RAMP_COLORS = [
|
|
|
68
76
|
chartColors.ramp7,
|
|
69
77
|
chartColors.ramp8,
|
|
70
78
|
];
|
|
79
|
+
/** @internal See chartColors. */
|
|
80
|
+
const CHART_HEAT_COLORS = [
|
|
81
|
+
chartColors.heat1,
|
|
82
|
+
chartColors.heat2,
|
|
83
|
+
chartColors.heat3,
|
|
84
|
+
chartColors.heat4,
|
|
85
|
+
chartColors.heat5,
|
|
86
|
+
chartColors.heat6,
|
|
87
|
+
chartColors.heat7,
|
|
88
|
+
chartColors.heat8,
|
|
89
|
+
];
|
|
71
90
|
|
|
72
91
|
const numberFormatters = new Map();
|
|
73
92
|
function numberFormatter(locale) {
|
|
@@ -96,11 +115,16 @@ function defaultChartFormat(value, location) {
|
|
|
96
115
|
return '—';
|
|
97
116
|
}
|
|
98
117
|
return location === 'tick'
|
|
99
|
-
?
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
118
|
+
? compactFormatter().format(value)
|
|
119
|
+
: numberFormatter(undefined).format(value);
|
|
120
|
+
}
|
|
121
|
+
let cachedCompactFormatter = null;
|
|
122
|
+
function compactFormatter() {
|
|
123
|
+
cachedCompactFormatter ??= new Intl.NumberFormat(undefined, {
|
|
124
|
+
notation: 'compact',
|
|
125
|
+
maximumFractionDigits: 1,
|
|
126
|
+
});
|
|
127
|
+
return cachedCompactFormatter;
|
|
104
128
|
}
|
|
105
129
|
/** @internal */
|
|
106
130
|
function formatPercent(value, total) {
|
|
@@ -200,13 +224,159 @@ function elementWidth(host) {
|
|
|
200
224
|
if (!isPlatformBrowser(inject(PLATFORM_ID))) {
|
|
201
225
|
return width.asReadonly();
|
|
202
226
|
}
|
|
203
|
-
const
|
|
204
|
-
|
|
227
|
+
const element = host.nativeElement;
|
|
228
|
+
widths.set(element, width);
|
|
229
|
+
sharedObserver().observe(element);
|
|
230
|
+
inject(DestroyRef).onDestroy(() => {
|
|
231
|
+
sharedObserver().unobserve(element);
|
|
232
|
+
widths.delete(element);
|
|
205
233
|
});
|
|
206
|
-
observer.observe(host.nativeElement);
|
|
207
|
-
inject(DestroyRef).onDestroy(() => observer.disconnect());
|
|
208
234
|
return width.asReadonly();
|
|
209
235
|
}
|
|
236
|
+
const widths = new WeakMap();
|
|
237
|
+
let observer = null;
|
|
238
|
+
// One observer for every chart on the page, so a resize is one callback with every entry in it
|
|
239
|
+
// rather than one callback per chart.
|
|
240
|
+
function sharedObserver() {
|
|
241
|
+
observer ??= new ResizeObserver((entries) => {
|
|
242
|
+
for (const entry of entries) {
|
|
243
|
+
widths.get(entry.target)?.set(Math.round(entry.contentRect.width));
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
return observer;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/** A label turned 45 degrees takes this fraction of its width across the axis. 45 is where the
|
|
250
|
+
* policy stops: past it the eye has to tilt rather than glance. */
|
|
251
|
+
const ROTATED_FOOTPRINT = Math.sin(Math.PI / 4);
|
|
252
|
+
/** Two labels that merely fail to overlap still read as one run of text, so a label's footprint is
|
|
253
|
+
* its width PLUS this. 16 sits in the middle of the 12-36 band the probe's cases allow, so a later
|
|
254
|
+
* nudge does not flip an interval. */
|
|
255
|
+
const LABEL_GAP = 16;
|
|
256
|
+
/** The WIDEST label decides for all of them: an axis that thins on the average still collides on
|
|
257
|
+
* the one long month name, and a reader meets the collision rather than the average.
|
|
258
|
+
*
|
|
259
|
+
* @internal */
|
|
260
|
+
function labelInterval(labelWidths, step, rotated) {
|
|
261
|
+
const usable = labelWidths.filter((width) => Number.isFinite(width));
|
|
262
|
+
if (usable.length === 0 || !Number.isFinite(step) || step <= 0) {
|
|
263
|
+
return 1;
|
|
264
|
+
}
|
|
265
|
+
const widest = usable.reduce((max, width) => Math.max(max, width), 0);
|
|
266
|
+
const footprint = (rotated ? widest * ROTATED_FOOTPRINT : widest) + LABEL_GAP;
|
|
267
|
+
return Math.max(1, Math.ceil(footprint / step));
|
|
268
|
+
}
|
|
269
|
+
/** Asked before thinning, so the axis spends a tilt before it spends a reading.
|
|
270
|
+
*
|
|
271
|
+
* @internal */
|
|
272
|
+
function rotationWouldFit(labelWidths, step) {
|
|
273
|
+
return (labelInterval(labelWidths, step, false) > 1 &&
|
|
274
|
+
labelInterval(labelWidths, step, true) === 1);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/** A series only decimates past FOUR times the target, not two: at two the saving is invisible on
|
|
278
|
+
* any profile and the loss of detail is not, so the trade is the wrong way round. */
|
|
279
|
+
const DECIMATION_HEADROOM = 4;
|
|
280
|
+
/** How many marks the plot can carry: one per pixel of its own width. Drawing two marks where the
|
|
281
|
+
* screen has one pixel is two DOM nodes the reader cannot tell apart.
|
|
282
|
+
*
|
|
283
|
+
* @internal */
|
|
284
|
+
function decimationTarget(plotWidth) {
|
|
285
|
+
return Number.isFinite(plotWidth) && plotWidth > 0
|
|
286
|
+
? Math.floor(plotWidth)
|
|
287
|
+
: 0;
|
|
288
|
+
}
|
|
289
|
+
/** @internal */
|
|
290
|
+
function needsDecimating(count, target) {
|
|
291
|
+
return target > 0 && count > target * DECIMATION_HEADROOM;
|
|
292
|
+
}
|
|
293
|
+
/** Buckets the series by position and keeps each bucket's highest and lowest reading.
|
|
294
|
+
*
|
|
295
|
+
* The default, because it is the only one of the two that can PROMISE something: a bucket's
|
|
296
|
+
* extremum is in the output by construction, so a spike the reader is looking for cannot be the
|
|
297
|
+
* point that was dropped. It also parallelises and stays stable while the reader pans, since a
|
|
298
|
+
* bucket's answer does not depend on the buckets around it.
|
|
299
|
+
*
|
|
300
|
+
* @internal */
|
|
301
|
+
function minMaxDecimate(points, target) {
|
|
302
|
+
if (target <= 0 || points.length <= target) {
|
|
303
|
+
return points;
|
|
304
|
+
}
|
|
305
|
+
// Two points leave each bucket, so the bucket count is half the budget.
|
|
306
|
+
const buckets = Math.max(1, Math.floor(target / 2));
|
|
307
|
+
const size = points.length / buckets;
|
|
308
|
+
const kept = [];
|
|
309
|
+
for (let bucket = 0; bucket < buckets; bucket++) {
|
|
310
|
+
const from = Math.floor(bucket * size);
|
|
311
|
+
const to = Math.min(points.length, Math.floor((bucket + 1) * size));
|
|
312
|
+
if (from >= to) {
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
let lowest = points[from];
|
|
316
|
+
let highest = points[from];
|
|
317
|
+
for (let index = from + 1; index < to; index++) {
|
|
318
|
+
if (points[index].y < lowest.y) {
|
|
319
|
+
lowest = points[index];
|
|
320
|
+
}
|
|
321
|
+
if (points[index].y > highest.y) {
|
|
322
|
+
highest = points[index];
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
// In the order they occur, so the output still reads left to right.
|
|
326
|
+
const [first, second] = lowest.x <= highest.x ? [lowest, highest] : [highest, lowest];
|
|
327
|
+
kept.push(first);
|
|
328
|
+
if (second !== first) {
|
|
329
|
+
kept.push(second);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
return kept;
|
|
333
|
+
}
|
|
334
|
+
/** Largest Triangle Three Buckets: keeps the reading in each bucket that makes the biggest triangle
|
|
335
|
+
* with the point already kept and the next bucket's centre of mass.
|
|
336
|
+
*
|
|
337
|
+
* It draws a truer SHAPE than MinMax at the same budget, and it makes no promise about the
|
|
338
|
+
* extremum - a spike is dropped whenever a different point describes the silhouette better. Reach
|
|
339
|
+
* for it where the outline is the reading and an individual point is not.
|
|
340
|
+
*
|
|
341
|
+
* @internal */
|
|
342
|
+
function lttbDecimate(points, target) {
|
|
343
|
+
if (target <= 2 || points.length <= target) {
|
|
344
|
+
return points;
|
|
345
|
+
}
|
|
346
|
+
const kept = [points[0]];
|
|
347
|
+
// The first and the last are fixed, so the buckets divide what is between them.
|
|
348
|
+
const size = (points.length - 2) / (target - 2);
|
|
349
|
+
let previous = points[0];
|
|
350
|
+
for (let bucket = 0; bucket < target - 2; bucket++) {
|
|
351
|
+
const from = Math.floor(bucket * size) + 1;
|
|
352
|
+
const to = Math.min(points.length - 1, Math.floor((bucket + 1) * size) + 1);
|
|
353
|
+
const nextFrom = to;
|
|
354
|
+
const nextTo = Math.min(points.length - 1, Math.floor((bucket + 2) * size) + 1);
|
|
355
|
+
let averageX = 0;
|
|
356
|
+
let averageY = 0;
|
|
357
|
+
const span = Math.max(1, nextTo - nextFrom);
|
|
358
|
+
for (let index = nextFrom; index < nextTo; index++) {
|
|
359
|
+
averageX += points[index].x;
|
|
360
|
+
averageY += points[index].y;
|
|
361
|
+
}
|
|
362
|
+
averageX /= span;
|
|
363
|
+
averageY /= span;
|
|
364
|
+
let best = points[from];
|
|
365
|
+
let bestArea = -1;
|
|
366
|
+
for (let index = from; index < to; index++) {
|
|
367
|
+
const area = Math.abs((previous.x - averageX) * (points[index].y - previous.y) -
|
|
368
|
+
(previous.x - points[index].x) * (averageY - previous.y));
|
|
369
|
+
if (area > bestArea) {
|
|
370
|
+
bestArea = area;
|
|
371
|
+
best = points[index];
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
kept.push(best);
|
|
375
|
+
previous = best;
|
|
376
|
+
}
|
|
377
|
+
kept.push(points[points.length - 1]);
|
|
378
|
+
return kept;
|
|
379
|
+
}
|
|
210
380
|
|
|
211
381
|
const COORDINATE_DECIMALS = 2;
|
|
212
382
|
function roundTo(value, decimals) {
|
|
@@ -254,8 +424,105 @@ function polylinePoints(segment) {
|
|
|
254
424
|
}
|
|
255
425
|
return segment.map((point) => coordinatePair(point)).join(' ');
|
|
256
426
|
}
|
|
257
|
-
/**
|
|
258
|
-
|
|
427
|
+
/** Fritsch-Carlson tangents: the slope at each reading, clamped so no segment can turn back on
|
|
428
|
+
* itself. A zero slope on either side of a reading pins the tangent flat, which is what keeps a
|
|
429
|
+
* plateau flat instead of bulging through it. */
|
|
430
|
+
function monotoneTangents(segment) {
|
|
431
|
+
const count = segment.length;
|
|
432
|
+
const secants = [];
|
|
433
|
+
for (let index = 0; index < count - 1; index++) {
|
|
434
|
+
const run = segment[index + 1].x - segment[index].x;
|
|
435
|
+
secants.push(run === 0 ? 0 : (segment[index + 1].y - segment[index].y) / run);
|
|
436
|
+
}
|
|
437
|
+
const tangents = [secants[0]];
|
|
438
|
+
for (let index = 1; index < count - 1; index++) {
|
|
439
|
+
const before = secants[index - 1];
|
|
440
|
+
const after = secants[index];
|
|
441
|
+
tangents.push(before * after <= 0 ? 0 : (before + after) / 2);
|
|
442
|
+
}
|
|
443
|
+
tangents.push(secants[count - 2]);
|
|
444
|
+
for (let index = 0; index < count - 1; index++) {
|
|
445
|
+
const secant = secants[index];
|
|
446
|
+
if (secant === 0) {
|
|
447
|
+
tangents[index] = 0;
|
|
448
|
+
tangents[index + 1] = 0;
|
|
449
|
+
continue;
|
|
450
|
+
}
|
|
451
|
+
// Fritsch-Carlson's circle condition: keeping each tangent within three times the secant it
|
|
452
|
+
// sits on is what makes the cubic monotone on that span.
|
|
453
|
+
const alpha = tangents[index] / secant;
|
|
454
|
+
const beta = tangents[index + 1] / secant;
|
|
455
|
+
const magnitude = Math.hypot(alpha, beta);
|
|
456
|
+
if (magnitude > 3) {
|
|
457
|
+
tangents[index] = (3 / magnitude) * alpha * secant;
|
|
458
|
+
tangents[index + 1] = (3 / magnitude) * beta * secant;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
return tangents;
|
|
462
|
+
}
|
|
463
|
+
function smoothPath(segment) {
|
|
464
|
+
const tangents = monotoneTangents(segment);
|
|
465
|
+
let path = `M ${coordinatePair(segment[0])}`;
|
|
466
|
+
for (let index = 0; index < segment.length - 1; index++) {
|
|
467
|
+
const from = segment[index];
|
|
468
|
+
const to = segment[index + 1];
|
|
469
|
+
const third = (to.x - from.x) / 3;
|
|
470
|
+
const firstControl = {
|
|
471
|
+
x: from.x + third,
|
|
472
|
+
y: from.y + tangents[index] * third,
|
|
473
|
+
};
|
|
474
|
+
const secondControl = {
|
|
475
|
+
x: to.x - third,
|
|
476
|
+
y: to.y - tangents[index + 1] * third,
|
|
477
|
+
};
|
|
478
|
+
path +=
|
|
479
|
+
` C ${roundTo(firstControl.x, COORDINATE_DECIMALS)},${roundTo(firstControl.y, COORDINATE_DECIMALS)}` +
|
|
480
|
+
` ${roundTo(secondControl.x, COORDINATE_DECIMALS)},${roundTo(secondControl.y, COORDINATE_DECIMALS)}` +
|
|
481
|
+
` ${coordinatePair(to)}`;
|
|
482
|
+
}
|
|
483
|
+
return path;
|
|
484
|
+
}
|
|
485
|
+
/** One unbroken run as a path `d`. `''` rather than a partial path when a coordinate is
|
|
486
|
+
* unplottable: one `NaN` voids the whole attribute and the line vanishes with nothing logged.
|
|
487
|
+
*
|
|
488
|
+
* @internal */
|
|
489
|
+
function linePath(segment, curve = 'linear') {
|
|
490
|
+
if (segment.length === 0 || !segment.every(isPlottable)) {
|
|
491
|
+
return '';
|
|
492
|
+
}
|
|
493
|
+
if (segment.length === 1 || curve === 'linear') {
|
|
494
|
+
return `M ${segment.map((point) => coordinatePair(point)).join(' L ')}`;
|
|
495
|
+
}
|
|
496
|
+
if (curve === 'step') {
|
|
497
|
+
let path = `M ${coordinatePair(segment[0])}`;
|
|
498
|
+
for (const point of segment.slice(1)) {
|
|
499
|
+
path += ` H ${roundTo(point.x, COORDINATE_DECIMALS)} V ${roundTo(point.y, COORDINATE_DECIMALS)}`;
|
|
500
|
+
}
|
|
501
|
+
return path;
|
|
502
|
+
}
|
|
503
|
+
return smoothPath(segment);
|
|
504
|
+
}
|
|
505
|
+
/** The filled band between two edges - a stacked area sitting on the series below it, or a
|
|
506
|
+
* confidence band around a line. The lower edge is walked BACKWARDS, so its curve is rebuilt from
|
|
507
|
+
* the reversed points rather than reused: a monotone cubic is not symmetric, and closing the shape
|
|
508
|
+
* along the forward path would bend the bottom of the band the wrong way.
|
|
509
|
+
*
|
|
510
|
+
* @internal */
|
|
511
|
+
function bandPath(upper, lower, curve = 'linear') {
|
|
512
|
+
if (upper.length < 2 ||
|
|
513
|
+
upper.length !== lower.length ||
|
|
514
|
+
!upper.every(isPlottable) ||
|
|
515
|
+
!lower.every(isPlottable)) {
|
|
516
|
+
return '';
|
|
517
|
+
}
|
|
518
|
+
const back = linePath([...lower].reverse(), curve);
|
|
519
|
+
return `${linePath(upper, curve)} L ${back.slice('M '.length)} Z`;
|
|
520
|
+
}
|
|
521
|
+
/** The same run as `linePath`, closed down to the baseline. It takes the curve so a filled series
|
|
522
|
+
* and its own line share one edge - drawn apart, a smooth line floats off a straight-edged fill.
|
|
523
|
+
*
|
|
524
|
+
* @internal */
|
|
525
|
+
function areaPath(segment, baselineY, curve = 'linear') {
|
|
259
526
|
if (segment.length < 2 ||
|
|
260
527
|
!Number.isFinite(baselineY) ||
|
|
261
528
|
!segment.every(isPlottable)) {
|
|
@@ -263,9 +530,8 @@ function areaPath(segment, baselineY) {
|
|
|
263
530
|
}
|
|
264
531
|
const first = segment[0];
|
|
265
532
|
const last = segment[segment.length - 1];
|
|
266
|
-
const along = segment.map((point) => coordinatePair(point)).join(' L ');
|
|
267
533
|
const baseline = roundTo(baselineY, COORDINATE_DECIMALS);
|
|
268
|
-
return
|
|
534
|
+
return `${linePath(segment, curve)} L ${roundTo(last.x, COORDINATE_DECIMALS)},${baseline} L ${roundTo(first.x, COORDINATE_DECIMALS)},${baseline} Z`;
|
|
269
535
|
}
|
|
270
536
|
|
|
271
537
|
const E10 = Math.sqrt(50);
|
|
@@ -426,6 +692,15 @@ function staggerDelay(index, stepMs) {
|
|
|
426
692
|
}
|
|
427
693
|
return Math.min(index * stepMs, STAGGER_CAP_MS);
|
|
428
694
|
}
|
|
695
|
+
/** Starts a mark's exit, bound as `(animate.leave)="leaveMark($event)"`: `_chart-motion.scss`
|
|
696
|
+
* animates `.mark-leave`, and Angular removes the mark on its `animationend`. The function form,
|
|
697
|
+
* not `animate.leave="mark-leave"`: the class form calls `getAnimations()` once per leaving mark,
|
|
698
|
+
* and in Chrome that call costs more the more animations are running.
|
|
699
|
+
*
|
|
700
|
+
* @internal */
|
|
701
|
+
function leaveMark(event) {
|
|
702
|
+
event.target.classList.add('mark-leave');
|
|
703
|
+
}
|
|
429
704
|
|
|
430
705
|
/** Where a roving tabindex lands after `key`, or `null` when the key does not traverse.
|
|
431
706
|
*
|
|
@@ -469,6 +744,40 @@ function focusMark(scope, index, within = '') {
|
|
|
469
744
|
target.focus();
|
|
470
745
|
}
|
|
471
746
|
}
|
|
747
|
+
/** @internal */
|
|
748
|
+
function rovingMarks(count) {
|
|
749
|
+
const roving = signal(0, ...(ngDevMode ? [{ debugName: "roving" }] : /* istanbul ignore next */ []));
|
|
750
|
+
return {
|
|
751
|
+
tabStop: computed(() => Math.min(roving(), Math.max(0, count() - 1))),
|
|
752
|
+
focus: (index) => roving.set(index),
|
|
753
|
+
navigate(event, index, scope) {
|
|
754
|
+
const next = nextRovingIndex(event.key, index, count());
|
|
755
|
+
if (next === null) {
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
758
|
+
event.preventDefault();
|
|
759
|
+
roving.set(next);
|
|
760
|
+
focusMark(scope, next);
|
|
761
|
+
},
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
/** The mark an event on the marks' parent came from - the nearest `[data-mark-index]` inside that
|
|
765
|
+
* parent - for a chart that listens once per series rather than once per mark. `null` when the
|
|
766
|
+
* event did not start on a mark.
|
|
767
|
+
*
|
|
768
|
+
* @internal */
|
|
769
|
+
function markOf(event) {
|
|
770
|
+
const scope = event.currentTarget;
|
|
771
|
+
const target = event.target;
|
|
772
|
+
if (!(scope instanceof Element) || !(target instanceof Element)) {
|
|
773
|
+
return null;
|
|
774
|
+
}
|
|
775
|
+
const element = target.closest('[data-mark-index]');
|
|
776
|
+
if (!element || !scope.contains(element)) {
|
|
777
|
+
return null;
|
|
778
|
+
}
|
|
779
|
+
return { element, index: Number(element.getAttribute('data-mark-index')) };
|
|
780
|
+
}
|
|
472
781
|
|
|
473
782
|
function trendOf(values) {
|
|
474
783
|
const first = values[0];
|
|
@@ -1107,6 +1416,12 @@ function focusOwnControl(host, options) {
|
|
|
1107
1416
|
host.querySelector(TRIGGER_ELEMENTS);
|
|
1108
1417
|
target?.focus(options);
|
|
1109
1418
|
}
|
|
1419
|
+
function blurOwnControl(host) {
|
|
1420
|
+
const active = host.ownerDocument.activeElement;
|
|
1421
|
+
if (active instanceof HTMLElement && host.contains(active)) {
|
|
1422
|
+
active.blur();
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1110
1425
|
/**
|
|
1111
1426
|
* Shared `ControlValueAccessor` for DS form controls whose value is a signal
|
|
1112
1427
|
* `model()`. Bridges that model with Angular forms (reactive `formControl` /
|
|
@@ -1135,6 +1450,15 @@ class DsControlValueAccessor extends DsFieldBase {
|
|
|
1135
1450
|
focus(options) {
|
|
1136
1451
|
focusOwnControl(this.hostElement.nativeElement, options);
|
|
1137
1452
|
}
|
|
1453
|
+
/**
|
|
1454
|
+
* The counterpart of `focus()`: drops focus if it sits anywhere inside this
|
|
1455
|
+
* control - the input, a picker trigger, the OTP cell that has it - so no
|
|
1456
|
+
* subclass overrides it. A portaled panel is outside the host and is left alone.
|
|
1457
|
+
* For a host that navigates away after `clear()`, which keeps focus on purpose.
|
|
1458
|
+
*/
|
|
1459
|
+
blur() {
|
|
1460
|
+
blurOwnControl(this.hostElement.nativeElement);
|
|
1461
|
+
}
|
|
1138
1462
|
bridge = valueControlBridge(() => this.value);
|
|
1139
1463
|
/** Driven by the forms API via `setDisabledState`. */
|
|
1140
1464
|
formDisabled = this.bridge.formDisabled;
|
|
@@ -1187,6 +1511,10 @@ class DsBooleanControlValueAccessor extends DsFieldBase {
|
|
|
1187
1511
|
focus(options) {
|
|
1188
1512
|
focusOwnControl(this.hostElement.nativeElement, options);
|
|
1189
1513
|
}
|
|
1514
|
+
/** The counterpart of `focus()` - see `DsControlValueAccessor.blur`. */
|
|
1515
|
+
blur() {
|
|
1516
|
+
blurOwnControl(this.hostElement.nativeElement);
|
|
1517
|
+
}
|
|
1190
1518
|
/** Driven by the forms API via `setDisabledState`. */
|
|
1191
1519
|
formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
|
|
1192
1520
|
// Separate from the control's `touched`, which only exists once `NgControl`
|
|
@@ -1495,7 +1823,7 @@ const OVERLAY_MOTION_TOKENS = [
|
|
|
1495
1823
|
* every connected picker gets it whether or not it names panel tokens of its own. */
|
|
1496
1824
|
const DROPDOWN_PANEL_TOKENS = [
|
|
1497
1825
|
'--ds-dropdown-panel-radius',
|
|
1498
|
-
'--ds-dropdown-panel-
|
|
1826
|
+
'--ds-dropdown-panel-max-height',
|
|
1499
1827
|
'--ds-dropdown-panel-border-color',
|
|
1500
1828
|
'--ds-dropdown-panel-shadow',
|
|
1501
1829
|
'--ds-option-padding',
|
|
@@ -1503,7 +1831,7 @@ const DROPDOWN_PANEL_TOKENS = [
|
|
|
1503
1831
|
'--ds-option-radius',
|
|
1504
1832
|
'--ds-option-row-gap',
|
|
1505
1833
|
'--ds-option-bg-color-active',
|
|
1506
|
-
'--ds-option-weight',
|
|
1834
|
+
'--ds-option-font-weight',
|
|
1507
1835
|
'--ds-option-font-size',
|
|
1508
1836
|
'--ds-option-line-height',
|
|
1509
1837
|
'--ds-option-font-family',
|
|
@@ -2008,9 +2336,25 @@ function createTypeAhead() {
|
|
|
2008
2336
|
};
|
|
2009
2337
|
}
|
|
2010
2338
|
|
|
2339
|
+
const NO_DATA_TABLE = signal(null, ...(ngDevMode ? [{ debugName: "NO_DATA_TABLE" }] : /* istanbul ignore next */ []));
|
|
2340
|
+
const NO_LINGER = signal(null, ...(ngDevMode ? [{ debugName: "NO_LINGER" }] : /* istanbul ignore next */ []));
|
|
2341
|
+
/** Each resolved input → `DS_CONFIG.chart` → the built-in. Call from an injection context.
|
|
2342
|
+
*
|
|
2343
|
+
* @internal */
|
|
2344
|
+
function resolveChartDefaults(inputs) {
|
|
2345
|
+
return {
|
|
2346
|
+
frame: resolveWithConfig(inputs.frame, (config) => config.chart?.frame, 'auto'),
|
|
2347
|
+
dataTable: resolveWithConfig(inputs.dataTable ?? NO_DATA_TABLE, (config) => config.chart?.dataTable, 'none'),
|
|
2348
|
+
emptyText: resolveWithConfig(inputs.emptyText, (config) => config.chart?.emptyText, 'No data'),
|
|
2349
|
+
errorText: resolveWithConfig(inputs.errorText, (config) => config.chart?.errorText, 'Could not load the data'),
|
|
2350
|
+
valueFormat: resolveWithConfig(inputs.valueFormat, (config) => config.chart?.valueFormat, defaultChartFormat),
|
|
2351
|
+
tooltipLingerMs: resolveWithConfig(inputs.tooltipLingerMs ?? NO_LINGER, (config) => config.chart?.tooltipLingerMs, 0),
|
|
2352
|
+
};
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2011
2355
|
/**
|
|
2012
2356
|
* Generated bundle index. Do not edit.
|
|
2013
2357
|
*/
|
|
2014
2358
|
|
|
2015
|
-
export { CHART_RAMP_COLORS, CHART_SERIES_COLORS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandScale, chartColors, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, defaultChartFormat, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, forwardOverlayTokens, largestRemainder, lineSegments, linearScale, markAt, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, resolveBrandValue, resolveFieldMessage, roundStepAtLeast, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge };
|
|
2359
|
+
export { CHART_HEAT_COLORS, CHART_RAMP_COLORS, CHART_SERIES_COLORS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, defaultChartFormat, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, linePath, lineSegments, linearScale, lttbDecimate, markAt, markOf, minMaxDecimate, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge };
|
|
2016
2360
|
//# sourceMappingURL=ids-group-ltd-ids-design-system-components.mjs.map
|