@ids-group-ltd/ids-design-system 0.14.6-beta.0 → 0.14.7
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 +236 -4
- package/components.md +25 -22
- package/design-system.md +1 -1
- package/docs/agent/charts/ds-bar-chart.md +1 -0
- package/docs/agent/charts/ds-column-chart.md +1 -0
- package/docs/agent/charts/ds-line-chart.md +1 -1
- package/docs/agent/forms/ds-autocomplete.md +1 -1
- package/docs/agent/forms/ds-button.md +2 -2
- package/docs/agent/forms/ds-input.md +1 -1
- package/docs/agent/forms/ds-multi-select.md +1 -1
- package/docs/agent/forms/ds-select.md +1 -1
- package/docs/agent/forms/ds-textarea.md +1 -1
- package/docs/agent/forms/filter-item-directive.md +1 -1
- package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +1 -1
- package/docs/agent/foundations/global-helper-classes.md +2 -2
- package/docs/agent/foundations/grid.md +8 -8
- package/docs/agent/overlays/ds-drawer.md +1 -1
- package/docs/agent/overlays/ds-modal-card.md +1 -1
- package/docs/agent/overlays/ds-modal.md +1 -1
- package/docs/agent/platform/toast-service.md +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +10 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +16 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +18 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +4 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-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 +170 -4
- 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 +327 -24
- 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 +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +16 -13
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +15 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +5 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.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 +4 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +4 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-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 +22 -19
- 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-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 +65 -13
- 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 +2 -3
- 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 +9 -11
- 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 +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +98 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-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 +4 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
- 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 +7 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-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-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +4 -4
- 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 +7 -7
- 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 +16 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +16 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +31 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +128 -9
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +17 -6
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +5 -2
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.14.6.json +176 -0
- package/migrations/0.14.7.json +140 -0
- package/migrations/0.4.0.json +3 -1
- package/package.json +1 -1
- package/schematics/check-overrides/surface.json +34 -25
- package/styles/_chart-frame.scss +1 -50
- package/styles/_field-state.scss +13 -1
- package/styles/_focus.scss +45 -33
- package/styles/_link.scss +12 -0
- package/styles/_press.scss +1 -1
- package/styles/_tokens-charts.scss +1 -1
- package/styles/_tokens.scss +2 -0
- package/styles/ds.scss +2 -0
- package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +4 -2
- package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +4 -2
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -1
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +65 -4
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +54 -6
- package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +2 -3
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +2 -1
- package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +4 -4
- package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +21 -4
- package/types/ids-group-ltd-ids-design-system-components-page-header.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +21 -2
- package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +2 -1
- package/types/ids-group-ltd-ids-design-system-components.d.ts +12 -2
- package/types/ids-group-ltd-ids-design-system-core.d.ts +35 -3
- package/types/ids-group-ltd-ids-design-system-icons.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-theme.d.ts +4 -2
- package/types/ids-group-ltd-ids-design-system.d.ts +2 -2
- package/migrations/0.14.6-beta.0.json +0 -9
|
@@ -68,11 +68,11 @@ class ChartLegendComponent {
|
|
|
68
68
|
this.hidden.set(this.items().map((item) => item.id));
|
|
69
69
|
}
|
|
70
70
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartLegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
71
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChartLegendComponent, isStandalone: true, selector: "ds-chart-legend", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, toggleable: { classPropertyName: "toggleable", publicName: "toggleable", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, highlighted: { classPropertyName: "highlighted", publicName: "highlighted", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hidden: "hiddenChange", highlighted: "highlightedChange" }, ngImport: i0, template: "<ul class=\"legend\">\n @if (toggleable() && mode() === 'isolate') {\n <li class=\"legend-item\">\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === 'all'\"\n (change)=\"showAll()\"\n (focus)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ intl().chart.legendAll }}\n </span>\n </label>\n </li>\n }\n\n @for (item of items(); track item.id) {\n <li\n class=\"legend-item\"\n [class.is-hidden]=\"isHidden(item.id)\"\n (pointerenter)=\"onItemEnter(item.id, $event)\"\n (pointerleave)=\"onItemLeave()\">\n @if (toggleable() && mode() === 'isolate') {\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === item.id\"\n [style.--ds-checkbox-selected-bg-color]=\"item.color\"\n [style.--ds-checkbox-selected-border-color]=\"item.color\"\n (change)=\"isolate(item.id)\"\n (focus)=\"highlighted.set(item.id)\"\n (blur)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n </label>\n } @else if (toggleable()) {\n <label class=\"legend-toggle\">\n <input\n type=\"checkbox\"\n class=\"legend-check\"\n [checked]=\"!isHidden(item.id)\"\n [style.--ds-checkbox-selected-bg-color]=\"item.color\"\n [style.--ds-checkbox-selected-border-color]=\"item.color\"\n (change)=\"toggle(item.id)\"\n (focus)=\"highlighted.set(item.id)\"\n (blur)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n </label>\n } @else {\n <span\n class=\"legend-swatch\"\n aria-hidden=\"true\"\n [style.background]=\"item.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n }\n </li>\n }\n\n @if (toggleable() && mode() === 'isolate') {\n <li class=\"legend-item\">\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === 'none'\"\n (change)=\"hideAll()\"\n (focus)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ intl().chart.legendNone }}\n </span>\n </label>\n </li>\n }\n</ul>\n", styles: ["@keyframes ds-chart-mark-grow-y{0%{transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-rise{0%{opacity:0;transform:translateY(var(--_chart-rise-distance, 4px))}}@keyframes ds-chart-mark-settle{0%{opacity:0;transform:scale(.96)}}@keyframes ds-chart-ring-sweep{0%{opacity:0;transform:rotate(-30deg) scale(.96)}}@keyframes ds-chart-line-draw{0%{stroke-dashoffset:1}}@keyframes ds-chart-mark-exit{to{opacity:0}}.legend-swatch{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.legend-swatch{animation-delay:0ms}}.legend-swatch.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.legend-check{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.legend-check{animation-delay:0ms}}.legend-check.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.legend-radio{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.legend-radio{animation-delay:0ms}}.legend-radio.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{--_chart-legend-swatch-size: var(--ds-chart-legend-swatch-size, var(--space-2-5));--_chart-legend-hover-bg-color: var(--ds-chart-legend-hover-bg-color, var(--surface-secondary));--_chart-legend-hover-text-color: var(--ds-chart-legend-hover-text-color, var(--text-primary));display:block}.legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin:var(--space-3) 0 0;padding:0;list-style:none}.legend-item{display:inline-flex;gap:var(--space-2);align-items:center;color:var(--text-secondary);font-size:var(--font-size-xs)}.legend-item{margin:calc(-1 * var(--space-0-5)) calc(-1 * var(--space-1-5));padding:var(--space-0-5) var(--space-1-5);border-radius:var(--radius-sm);transition:background-color var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),color var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.legend-item:hover,.legend-item:focus-visible,.legend-item:has(:focus-visible){background-color:var(--_chart-legend-hover-bg-color);color:var(--_chart-legend-hover-text-color)}.legend-toggle{display:inline-flex;gap:var(--space-2);align-items:center;cursor:pointer}.legend-check{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border-color, var(--ds-checkbox-border-color, var(--border-strong)));background:var(--_checkbox-bg-color, var(--ds-checkbox-bg-color, var(--surface-default)));cursor:pointer;display:inline-grid;place-items:center;vertical-align:middle;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.legend-check:hover:not(:disabled){border-color:var(--_checkbox-hover-border-color, var(--ds-checkbox-hover-border-color, var(--accent)))}.legend-check:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.legend-check:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.legend-check{color:var(--icon-on-primary)}.legend-check:after{content:\"\";--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));width:var(--check-tick-size);height:var(--check-tick-size);transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);background-color:currentcolor}@media(forced-colors:active){.legend-check:after{background-color:CanvasText}}.legend-check:after{-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat}.legend-check:checked{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-check:checked:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing)}.legend-check:indeterminate{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-check:indeterminate:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--ds-radius-inner);-webkit-mask:none;mask:none}.legend-radio{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border-color, var(--ds-checkbox-border-color, var(--border-strong)));background:var(--_checkbox-bg-color, var(--ds-checkbox-bg-color, var(--surface-default)));cursor:pointer;display:inline-grid;place-items:center;vertical-align:middle;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.legend-radio:hover:not(:disabled){border-color:var(--_checkbox-hover-border-color, var(--ds-checkbox-hover-border-color, var(--accent)))}.legend-radio:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.legend-radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.legend-radio{color:var(--icon-on-primary)}.legend-radio:after{content:\"\";--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));width:var(--check-tick-size);height:var(--check-tick-size);transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);background-color:currentcolor}@media(forced-colors:active){.legend-radio:after{background-color:CanvasText}}.legend-radio:after{-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat}.legend-radio:checked{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-radio:checked:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing)}.legend-radio:indeterminate{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-radio:indeterminate:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--ds-radius-inner);-webkit-mask:none;mask:none}.legend-radio{border-radius:var(--radius-pill)}.legend-swatch{flex:none;inline-size:var(--_chart-legend-swatch-size);block-size:var(--_chart-legend-swatch-size);border-radius:var(--radius-pill)}.legend-label{transition:color var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.legend-item.is-hidden .legend-label{color:var(--text-disabled)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
71
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChartLegendComponent, isStandalone: true, selector: "ds-chart-legend", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, toggleable: { classPropertyName: "toggleable", publicName: "toggleable", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, highlighted: { classPropertyName: "highlighted", publicName: "highlighted", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hidden: "hiddenChange", highlighted: "highlightedChange" }, ngImport: i0, template: "<ul class=\"legend\">\n @if (toggleable() && mode() === 'isolate') {\n <li class=\"legend-item\">\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === 'all'\"\n (change)=\"showAll()\"\n (focus)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ intl().chart.legendAll }}\n </span>\n </label>\n </li>\n }\n\n @for (item of items(); track item.id) {\n <li\n class=\"legend-item\"\n [class.is-hidden]=\"isHidden(item.id)\"\n (pointerenter)=\"onItemEnter(item.id, $event)\"\n (pointerleave)=\"onItemLeave()\">\n @if (toggleable() && mode() === 'isolate') {\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === item.id\"\n [style.--ds-checkbox-selected-bg-color]=\"item.color\"\n [style.--ds-checkbox-selected-border-color]=\"item.color\"\n (change)=\"isolate(item.id)\"\n (focus)=\"highlighted.set(item.id)\"\n (blur)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n </label>\n } @else if (toggleable()) {\n <label class=\"legend-toggle\">\n <input\n type=\"checkbox\"\n class=\"legend-check\"\n [checked]=\"!isHidden(item.id)\"\n [style.--ds-checkbox-selected-bg-color]=\"item.color\"\n [style.--ds-checkbox-selected-border-color]=\"item.color\"\n (change)=\"toggle(item.id)\"\n (focus)=\"highlighted.set(item.id)\"\n (blur)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n </label>\n } @else {\n <span\n class=\"legend-swatch\"\n aria-hidden=\"true\"\n [style.background]=\"item.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n }\n </li>\n }\n\n @if (toggleable() && mode() === 'isolate') {\n <li class=\"legend-item\">\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === 'none'\"\n (change)=\"hideAll()\"\n (focus)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ intl().chart.legendNone }}\n </span>\n </label>\n </li>\n }\n</ul>\n", styles: ["@keyframes ds-chart-mark-grow-y{0%{transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-rise{0%{opacity:0;transform:translateY(var(--_chart-rise-distance, 4px))}}@keyframes ds-chart-mark-settle{0%{opacity:0;transform:scale(.96)}}@keyframes ds-chart-ring-sweep{0%{opacity:0;transform:rotate(-30deg) scale(.96)}}@keyframes ds-chart-line-draw{0%{stroke-dashoffset:1}}@keyframes ds-chart-mark-exit{to{opacity:0}}.legend-swatch{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.legend-swatch{animation-delay:0ms}}.legend-swatch.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.legend-check{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.legend-check{animation-delay:0ms}}.legend-check.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.legend-radio{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.legend-radio{animation-delay:0ms}}.legend-radio.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{--_chart-legend-swatch-size: var(--ds-chart-legend-swatch-size, var(--space-2-5));--_chart-legend-hover-bg-color: var(--ds-chart-legend-hover-bg-color, var(--surface-secondary));--_chart-legend-hover-text-color: var(--ds-chart-legend-hover-text-color, var(--text-primary));display:block}.legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin:var(--space-3) 0 0;padding:0;list-style:none}.legend-item{display:inline-flex;gap:var(--space-2);align-items:center;color:var(--text-secondary);font-size:var(--font-size-xs)}.legend-item{margin:calc(-1 * var(--space-0-5)) calc(-1 * var(--space-1-5));padding:var(--space-0-5) var(--space-1-5);border-radius:var(--radius-sm);transition:background-color var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),color var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.legend-item:hover,.legend-item:focus-visible,.legend-item:has(:focus-visible){background-color:var(--_chart-legend-hover-bg-color);color:var(--_chart-legend-hover-text-color)}.legend-toggle{display:inline-flex;gap:var(--space-2);align-items:center;cursor:pointer}.legend-check{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border-color, var(--ds-checkbox-border-color, var(--border-strong)));background:var(--_checkbox-bg-color, var(--ds-checkbox-bg-color, var(--surface-default)));cursor:pointer;display:inline-grid;place-items:center;vertical-align:middle;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.legend-check:hover:not(:disabled){border-color:var(--_checkbox-hover-border-color, var(--ds-checkbox-hover-border-color, var(--accent)))}.legend-check:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.legend-check:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.legend-check{color:var(--icon-on-primary)}.legend-check:after{content:\"\";--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));width:var(--check-tick-size);height:var(--check-tick-size);transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);background-color:currentcolor}@media(forced-colors:active){.legend-check:after{background-color:CanvasText}}.legend-check:after{-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat}.legend-check:checked{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-check:checked:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing)}.legend-check:indeterminate{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-check:indeterminate:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--ds-radius-inner);-webkit-mask:none;mask:none}.legend-radio{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border-color, var(--ds-checkbox-border-color, var(--border-strong)));background:var(--_checkbox-bg-color, var(--ds-checkbox-bg-color, var(--surface-default)));cursor:pointer;display:inline-grid;place-items:center;vertical-align:middle;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.legend-radio:hover:not(:disabled){border-color:var(--_checkbox-hover-border-color, var(--ds-checkbox-hover-border-color, var(--accent)))}.legend-radio:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.legend-radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.legend-radio{color:var(--icon-on-primary)}.legend-radio:after{content:\"\";--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));width:var(--check-tick-size);height:var(--check-tick-size);transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);background-color:currentcolor}@media(forced-colors:active){.legend-radio:after{background-color:CanvasText}}.legend-radio:after{-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat}.legend-radio:checked{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-radio:checked:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing)}.legend-radio:indeterminate{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-radio:indeterminate:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--ds-radius-inner);-webkit-mask:none;mask:none}.legend-radio{border-radius:var(--radius-pill)}.legend-swatch{flex:none;inline-size:var(--_chart-legend-swatch-size);block-size:var(--_chart-legend-swatch-size);border-radius:var(--radius-pill)}.legend-label{transition:color var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.legend-item.is-hidden .legend-label{color:var(--text-disabled)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
72
72
|
}
|
|
73
73
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartLegendComponent, decorators: [{
|
|
74
74
|
type: Component,
|
|
75
|
-
args: [{ selector: 'ds-chart-legend', standalone: true, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"legend\">\n @if (toggleable() && mode() === 'isolate') {\n <li class=\"legend-item\">\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === 'all'\"\n (change)=\"showAll()\"\n (focus)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ intl().chart.legendAll }}\n </span>\n </label>\n </li>\n }\n\n @for (item of items(); track item.id) {\n <li\n class=\"legend-item\"\n [class.is-hidden]=\"isHidden(item.id)\"\n (pointerenter)=\"onItemEnter(item.id, $event)\"\n (pointerleave)=\"onItemLeave()\">\n @if (toggleable() && mode() === 'isolate') {\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === item.id\"\n [style.--ds-checkbox-selected-bg-color]=\"item.color\"\n [style.--ds-checkbox-selected-border-color]=\"item.color\"\n (change)=\"isolate(item.id)\"\n (focus)=\"highlighted.set(item.id)\"\n (blur)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n </label>\n } @else if (toggleable()) {\n <label class=\"legend-toggle\">\n <input\n type=\"checkbox\"\n class=\"legend-check\"\n [checked]=\"!isHidden(item.id)\"\n [style.--ds-checkbox-selected-bg-color]=\"item.color\"\n [style.--ds-checkbox-selected-border-color]=\"item.color\"\n (change)=\"toggle(item.id)\"\n (focus)=\"highlighted.set(item.id)\"\n (blur)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n </label>\n } @else {\n <span\n class=\"legend-swatch\"\n aria-hidden=\"true\"\n [style.background]=\"item.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n }\n </li>\n }\n\n @if (toggleable() && mode() === 'isolate') {\n <li class=\"legend-item\">\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === 'none'\"\n (change)=\"hideAll()\"\n (focus)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ intl().chart.legendNone }}\n </span>\n </label>\n </li>\n }\n</ul>\n", styles: ["@keyframes ds-chart-mark-grow-y{0%{transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-rise{0%{opacity:0;transform:translateY(var(--_chart-rise-distance, 4px))}}@keyframes ds-chart-mark-settle{0%{opacity:0;transform:scale(.96)}}@keyframes ds-chart-ring-sweep{0%{opacity:0;transform:rotate(-30deg) scale(.96)}}@keyframes ds-chart-line-draw{0%{stroke-dashoffset:1}}@keyframes ds-chart-mark-exit{to{opacity:0}}.legend-swatch{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.legend-swatch{animation-delay:0ms}}.legend-swatch.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.legend-check{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.legend-check{animation-delay:0ms}}.legend-check.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.legend-radio{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.legend-radio{animation-delay:0ms}}.legend-radio.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{--_chart-legend-swatch-size: var(--ds-chart-legend-swatch-size, var(--space-2-5));--_chart-legend-hover-bg-color: var(--ds-chart-legend-hover-bg-color, var(--surface-secondary));--_chart-legend-hover-text-color: var(--ds-chart-legend-hover-text-color, var(--text-primary));display:block}.legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin:var(--space-3) 0 0;padding:0;list-style:none}.legend-item{display:inline-flex;gap:var(--space-2);align-items:center;color:var(--text-secondary);font-size:var(--font-size-xs)}.legend-item{margin:calc(-1 * var(--space-0-5)) calc(-1 * var(--space-1-5));padding:var(--space-0-5) var(--space-1-5);border-radius:var(--radius-sm);transition:background-color var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),color var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.legend-item:hover,.legend-item:focus-visible,.legend-item:has(:focus-visible){background-color:var(--_chart-legend-hover-bg-color);color:var(--_chart-legend-hover-text-color)}.legend-toggle{display:inline-flex;gap:var(--space-2);align-items:center;cursor:pointer}.legend-check{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border-color, var(--ds-checkbox-border-color, var(--border-strong)));background:var(--_checkbox-bg-color, var(--ds-checkbox-bg-color, var(--surface-default)));cursor:pointer;display:inline-grid;place-items:center;vertical-align:middle;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.legend-check:hover:not(:disabled){border-color:var(--_checkbox-hover-border-color, var(--ds-checkbox-hover-border-color, var(--accent)))}.legend-check:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.legend-check:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.legend-check{color:var(--icon-on-primary)}.legend-check:after{content:\"\";--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));width:var(--check-tick-size);height:var(--check-tick-size);transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);background-color:currentcolor}@media(forced-colors:active){.legend-check:after{background-color:CanvasText}}.legend-check:after{-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat}.legend-check:checked{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-check:checked:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing)}.legend-check:indeterminate{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-check:indeterminate:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--ds-radius-inner);-webkit-mask:none;mask:none}.legend-radio{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border-color, var(--ds-checkbox-border-color, var(--border-strong)));background:var(--_checkbox-bg-color, var(--ds-checkbox-bg-color, var(--surface-default)));cursor:pointer;display:inline-grid;place-items:center;vertical-align:middle;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.legend-radio:hover:not(:disabled){border-color:var(--_checkbox-hover-border-color, var(--ds-checkbox-hover-border-color, var(--accent)))}.legend-radio:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.legend-radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.legend-radio{color:var(--icon-on-primary)}.legend-radio:after{content:\"\";--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));width:var(--check-tick-size);height:var(--check-tick-size);transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);background-color:currentcolor}@media(forced-colors:active){.legend-radio:after{background-color:CanvasText}}.legend-radio:after{-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat}.legend-radio:checked{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-radio:checked:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing)}.legend-radio:indeterminate{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-radio:indeterminate:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--ds-radius-inner);-webkit-mask:none;mask:none}.legend-radio{border-radius:var(--radius-pill)}.legend-swatch{flex:none;inline-size:var(--_chart-legend-swatch-size);block-size:var(--_chart-legend-swatch-size);border-radius:var(--radius-pill)}.legend-label{transition:color var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.legend-item.is-hidden .legend-label{color:var(--text-disabled)}\n"] }]
|
|
75
|
+
args: [{ selector: 'ds-chart-legend', standalone: true, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"legend\">\n @if (toggleable() && mode() === 'isolate') {\n <li class=\"legend-item\">\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === 'all'\"\n (change)=\"showAll()\"\n (focus)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ intl().chart.legendAll }}\n </span>\n </label>\n </li>\n }\n\n @for (item of items(); track item.id) {\n <li\n class=\"legend-item\"\n [class.is-hidden]=\"isHidden(item.id)\"\n (pointerenter)=\"onItemEnter(item.id, $event)\"\n (pointerleave)=\"onItemLeave()\">\n @if (toggleable() && mode() === 'isolate') {\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === item.id\"\n [style.--ds-checkbox-selected-bg-color]=\"item.color\"\n [style.--ds-checkbox-selected-border-color]=\"item.color\"\n (change)=\"isolate(item.id)\"\n (focus)=\"highlighted.set(item.id)\"\n (blur)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n </label>\n } @else if (toggleable()) {\n <label class=\"legend-toggle\">\n <input\n type=\"checkbox\"\n class=\"legend-check\"\n [checked]=\"!isHidden(item.id)\"\n [style.--ds-checkbox-selected-bg-color]=\"item.color\"\n [style.--ds-checkbox-selected-border-color]=\"item.color\"\n (change)=\"toggle(item.id)\"\n (focus)=\"highlighted.set(item.id)\"\n (blur)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n </label>\n } @else {\n <span\n class=\"legend-swatch\"\n aria-hidden=\"true\"\n [style.background]=\"item.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n }\n </li>\n }\n\n @if (toggleable() && mode() === 'isolate') {\n <li class=\"legend-item\">\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === 'none'\"\n (change)=\"hideAll()\"\n (focus)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ intl().chart.legendNone }}\n </span>\n </label>\n </li>\n }\n</ul>\n", styles: ["@keyframes ds-chart-mark-grow-y{0%{transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-rise{0%{opacity:0;transform:translateY(var(--_chart-rise-distance, 4px))}}@keyframes ds-chart-mark-settle{0%{opacity:0;transform:scale(.96)}}@keyframes ds-chart-ring-sweep{0%{opacity:0;transform:rotate(-30deg) scale(.96)}}@keyframes ds-chart-line-draw{0%{stroke-dashoffset:1}}@keyframes ds-chart-mark-exit{to{opacity:0}}.legend-swatch{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.legend-swatch{animation-delay:0ms}}.legend-swatch.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.legend-check{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.legend-check{animation-delay:0ms}}.legend-check.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.legend-radio{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + 0ms + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.legend-radio{animation-delay:0ms}}.legend-radio.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{--_chart-legend-swatch-size: var(--ds-chart-legend-swatch-size, var(--space-2-5));--_chart-legend-hover-bg-color: var(--ds-chart-legend-hover-bg-color, var(--surface-secondary));--_chart-legend-hover-text-color: var(--ds-chart-legend-hover-text-color, var(--text-primary));display:block}.legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin:var(--space-3) 0 0;padding:0;list-style:none}.legend-item{display:inline-flex;gap:var(--space-2);align-items:center;color:var(--text-secondary);font-size:var(--font-size-xs)}.legend-item{margin:calc(-1 * var(--space-0-5)) calc(-1 * var(--space-1-5));padding:var(--space-0-5) var(--space-1-5);border-radius:var(--radius-sm);transition:background-color var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),color var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.legend-item:hover,.legend-item:focus-visible,.legend-item:has(:focus-visible){background-color:var(--_chart-legend-hover-bg-color);color:var(--_chart-legend-hover-text-color)}.legend-toggle{display:inline-flex;gap:var(--space-2);align-items:center;cursor:pointer}.legend-check{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border-color, var(--ds-checkbox-border-color, var(--border-strong)));background:var(--_checkbox-bg-color, var(--ds-checkbox-bg-color, var(--surface-default)));cursor:pointer;display:inline-grid;place-items:center;vertical-align:middle;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.legend-check:hover:not(:disabled){border-color:var(--_checkbox-hover-border-color, var(--ds-checkbox-hover-border-color, var(--accent)))}.legend-check:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.legend-check:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.legend-check{color:var(--icon-on-primary)}.legend-check:after{content:\"\";--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));width:var(--check-tick-size);height:var(--check-tick-size);transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);background-color:currentcolor}@media(forced-colors:active){.legend-check:after{background-color:CanvasText}}.legend-check:after{-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat}.legend-check:checked{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-check:checked:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing)}.legend-check:indeterminate{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-check:indeterminate:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--ds-radius-inner);-webkit-mask:none;mask:none}.legend-radio{appearance:none;width:var(--_checkbox-glyph, var(--check-size));height:var(--_checkbox-glyph, var(--check-size));border:var(--check-bw) solid var(--_checkbox-border-color, var(--ds-checkbox-border-color, var(--border-strong)));background:var(--_checkbox-bg-color, var(--ds-checkbox-bg-color, var(--surface-default)));cursor:pointer;display:inline-grid;place-items:center;vertical-align:middle;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.legend-radio:hover:not(:disabled){border-color:var(--_checkbox-hover-border-color, var(--ds-checkbox-hover-border-color, var(--accent)))}.legend-radio:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.legend-radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.legend-radio{color:var(--icon-on-primary)}.legend-radio:after{content:\"\";--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));width:var(--check-tick-size);height:var(--check-tick-size);transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);background-color:currentcolor}@media(forced-colors:active){.legend-radio:after{background-color:CanvasText}}.legend-radio:after{-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat}.legend-radio:checked{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-radio:checked:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing)}.legend-radio:indeterminate{background:var(--_checkbox-selected-bg-color, var(--ds-checkbox-selected-bg-color, var(--accent)));border-color:var(--_checkbox-selected-border-color, var(--ds-checkbox-selected-border-color, var(--accent)))}.legend-radio:indeterminate:after{transform:scale(1);opacity:1;transition:transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--ds-radius-inner);-webkit-mask:none;mask:none}.legend-radio{border-radius:var(--radius-pill)}.legend-swatch{flex:none;inline-size:var(--_chart-legend-swatch-size);block-size:var(--_chart-legend-swatch-size);border-radius:var(--radius-pill)}.legend-label{transition:color var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.legend-item.is-hidden .legend-label{color:var(--text-disabled)}\n"] }]
|
|
76
76
|
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }, { type: i0.Output, args: ["hiddenChange"] }], toggleable: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleable", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], highlighted: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlighted", required: false }] }, { type: i0.Output, args: ["highlightedChange"] }] } });
|
|
77
77
|
|
|
78
78
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-chart-legend.mjs","sources":["../../../src/lib/components/chart-legend/chart-legend.component.ts","../../../src/lib/components/chart-legend/chart-legend.component.html","../../../src/lib/components/chart-legend/ids-group-ltd-ids-design-system-components-chart-legend.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n computed,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n input,\n model,\n signal,\n} from '@angular/core';\nimport {\n CHART_HOVER_DELAY_MS,\n chartDwell,\n nextControlId,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n DS_INTL,\n resolveWithConfig,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type { ChartLegendItem } from './chart-legend.types';\n\n/**\n * The key beside a chart, and, when `toggleable`, the control that hides a series.\n * Real inputs in ordinary DOM, never inside the `<svg>`.\n *\n * @internal\n */\n@Component({\n selector: 'ds-chart-legend',\n standalone: true,\n templateUrl: './chart-legend.component.html',\n styleUrl: './chart-legend.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartLegendComponent {\n protected readonly intl = inject(DS_INTL);\n\n readonly items = input.required<readonly ChartLegendItem[]>();\n\n /** Ids of the hidden items. Two-way, so a page can drive it from a URL parameter. */\n readonly hidden = model<readonly string[]>([]);\n\n /** Makes each item hide its series; off leaves a plain key. */\n readonly toggleable = input(false, { transform: booleanAttribute });\n\n /** `'isolate'` shows one series and hides the rest (a radio group with an \"All\" option);\n * `'toggle'` hides one and leaves the rest (checkboxes). */\n readonly mode = input<'toggle' | 'isolate'>('isolate');\n\n /** The item under the pointer or holding focus, which the chart dims from; a pointer waits\n * `DS_CONFIG.chart.hoverDelayMs`. */\n readonly highlighted = model<string | null>(null);\n\n private readonly dwell = chartDwell(\n resolveWithConfig(\n signal<number | null>(null),\n (config) => config.chart?.hoverDelayMs,\n CHART_HOVER_DELAY_MS,\n ),\n );\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.dwell.cancel());\n }\n\n protected onItemEnter(id: string, event: PointerEvent): void {\n this.dwell.schedule(id, () => this.highlighted.set(id), event);\n }\n\n protected onItemLeave(): void {\n this.dwell.cancel();\n this.highlighted.set(null);\n }\n\n protected isHidden(id: string): boolean {\n return this.hidden().includes(id);\n }\n\n protected toggle(id: string): void {\n const hidden = this.hidden();\n\n this.hidden.set(\n hidden.includes(id)\n ? hidden.filter((entry) => entry !== id)\n : [...hidden, id],\n );\n }\n\n /** Radio group name; unique per legend. */\n protected readonly groupName = nextControlId('ds-chart-legend');\n\n /** The radio that is on: an item id, `'all'`, or `'none'`. */\n protected readonly isolated = computed(() => {\n const items = this.items();\n const visible = items.filter((item) => !this.isHidden(item.id));\n if (visible.length === 0 && items.length > 0) {\n return 'none';\n }\n if (visible.length === 1) {\n return visible[0].id;\n }\n\n return 'all';\n });\n\n protected isolate(id: string): void {\n this.hidden.set(\n this.items()\n .filter((item) => item.id !== id)\n .map((item) => item.id),\n );\n }\n\n protected showAll(): void {\n this.hidden.set([]);\n }\n\n protected hideAll(): void {\n this.hidden.set(this.items().map((item) => item.id));\n }\n}\n","<ul class=\"legend\">\n @if (toggleable() && mode() === 'isolate') {\n <li class=\"legend-item\">\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === 'all'\"\n (change)=\"showAll()\"\n (focus)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ intl().chart.legendAll }}\n </span>\n </label>\n </li>\n }\n\n @for (item of items(); track item.id) {\n <li\n class=\"legend-item\"\n [class.is-hidden]=\"isHidden(item.id)\"\n (pointerenter)=\"onItemEnter(item.id, $event)\"\n (pointerleave)=\"onItemLeave()\">\n @if (toggleable() && mode() === 'isolate') {\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === item.id\"\n [style.--ds-checkbox-selected-bg-color]=\"item.color\"\n [style.--ds-checkbox-selected-border-color]=\"item.color\"\n (change)=\"isolate(item.id)\"\n (focus)=\"highlighted.set(item.id)\"\n (blur)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n </label>\n } @else if (toggleable()) {\n <label class=\"legend-toggle\">\n <input\n type=\"checkbox\"\n class=\"legend-check\"\n [checked]=\"!isHidden(item.id)\"\n [style.--ds-checkbox-selected-bg-color]=\"item.color\"\n [style.--ds-checkbox-selected-border-color]=\"item.color\"\n (change)=\"toggle(item.id)\"\n (focus)=\"highlighted.set(item.id)\"\n (blur)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n </label>\n } @else {\n <span\n class=\"legend-swatch\"\n aria-hidden=\"true\"\n [style.background]=\"item.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n }\n </li>\n }\n\n @if (toggleable() && mode() === 'isolate') {\n <li class=\"legend-item\">\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === 'none'\"\n (change)=\"hideAll()\"\n (focus)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ intl().chart.legendNone }}\n </span>\n </label>\n </li>\n }\n</ul>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-chart-legend.mjs","sources":["../../../src/lib/components/chart-legend/chart-legend.component.ts","../../../src/lib/components/chart-legend/chart-legend.component.html","../../../src/lib/components/chart-legend/ids-group-ltd-ids-design-system-components-chart-legend.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n computed,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n input,\n model,\n signal,\n} from '@angular/core';\nimport {\n CHART_HOVER_DELAY_MS,\n chartDwell,\n nextControlId,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n DS_INTL,\n resolveWithConfig,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type { ChartLegendItem } from './chart-legend.types';\n\n/**\n * The key beside a chart, and, when `toggleable`, the control that hides a series.\n * Real inputs in ordinary DOM, never inside the `<svg>`.\n *\n * @internal\n */\n@Component({\n selector: 'ds-chart-legend',\n standalone: true,\n templateUrl: './chart-legend.component.html',\n styleUrl: './chart-legend.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartLegendComponent {\n protected readonly intl = inject(DS_INTL);\n\n readonly items = input.required<readonly ChartLegendItem[]>();\n\n /** Ids of the hidden items. Two-way, so a page can drive it from a URL parameter. */\n readonly hidden = model<readonly string[]>([]);\n\n /** Makes each item hide its series; off leaves a plain key. */\n readonly toggleable = input(false, { transform: booleanAttribute });\n\n /** `'isolate'` shows one series and hides the rest (a radio group with an \"All\" option);\n * `'toggle'` hides one and leaves the rest (checkboxes). */\n readonly mode = input<'toggle' | 'isolate'>('isolate');\n\n /** The item under the pointer or holding focus, which the chart dims from; a pointer waits\n * `DS_CONFIG.chart.hoverDelayMs`. */\n readonly highlighted = model<string | null>(null);\n\n private readonly dwell = chartDwell(\n resolveWithConfig(\n signal<number | null>(null),\n (config) => config.chart?.hoverDelayMs,\n CHART_HOVER_DELAY_MS,\n ),\n );\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.dwell.cancel());\n }\n\n protected onItemEnter(id: string, event: PointerEvent): void {\n this.dwell.schedule(id, () => this.highlighted.set(id), event);\n }\n\n protected onItemLeave(): void {\n this.dwell.cancel();\n this.highlighted.set(null);\n }\n\n protected isHidden(id: string): boolean {\n return this.hidden().includes(id);\n }\n\n protected toggle(id: string): void {\n const hidden = this.hidden();\n\n this.hidden.set(\n hidden.includes(id)\n ? hidden.filter((entry) => entry !== id)\n : [...hidden, id],\n );\n }\n\n /** Radio group name; unique per legend. */\n protected readonly groupName = nextControlId('ds-chart-legend');\n\n /** The radio that is on: an item id, `'all'`, or `'none'`. */\n protected readonly isolated = computed(() => {\n const items = this.items();\n const visible = items.filter((item) => !this.isHidden(item.id));\n if (visible.length === 0 && items.length > 0) {\n return 'none';\n }\n if (visible.length === 1) {\n return visible[0].id;\n }\n\n return 'all';\n });\n\n protected isolate(id: string): void {\n this.hidden.set(\n this.items()\n .filter((item) => item.id !== id)\n .map((item) => item.id),\n );\n }\n\n protected showAll(): void {\n this.hidden.set([]);\n }\n\n protected hideAll(): void {\n this.hidden.set(this.items().map((item) => item.id));\n }\n}\n","<ul class=\"legend\">\n @if (toggleable() && mode() === 'isolate') {\n <li class=\"legend-item\">\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === 'all'\"\n (change)=\"showAll()\"\n (focus)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ intl().chart.legendAll }}\n </span>\n </label>\n </li>\n }\n\n @for (item of items(); track item.id) {\n <li\n class=\"legend-item\"\n [class.is-hidden]=\"isHidden(item.id)\"\n (pointerenter)=\"onItemEnter(item.id, $event)\"\n (pointerleave)=\"onItemLeave()\">\n @if (toggleable() && mode() === 'isolate') {\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === item.id\"\n [style.--ds-checkbox-selected-bg-color]=\"item.color\"\n [style.--ds-checkbox-selected-border-color]=\"item.color\"\n (change)=\"isolate(item.id)\"\n (focus)=\"highlighted.set(item.id)\"\n (blur)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n </label>\n } @else if (toggleable()) {\n <label class=\"legend-toggle\">\n <input\n type=\"checkbox\"\n class=\"legend-check\"\n [checked]=\"!isHidden(item.id)\"\n [style.--ds-checkbox-selected-bg-color]=\"item.color\"\n [style.--ds-checkbox-selected-border-color]=\"item.color\"\n (change)=\"toggle(item.id)\"\n (focus)=\"highlighted.set(item.id)\"\n (blur)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n </label>\n } @else {\n <span\n class=\"legend-swatch\"\n aria-hidden=\"true\"\n [style.background]=\"item.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ item.label }}\n </span>\n }\n </li>\n }\n\n @if (toggleable() && mode() === 'isolate') {\n <li class=\"legend-item\">\n <label class=\"legend-toggle\">\n <input\n type=\"radio\"\n class=\"legend-radio\"\n [attr.name]=\"groupName\"\n [checked]=\"isolated() === 'none'\"\n (change)=\"hideAll()\"\n (focus)=\"highlighted.set(null)\" />\n\n <span class=\"legend-label\">\n {{ intl().chart.legendNone }}\n </span>\n </label>\n </li>\n }\n</ul>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, inject, ElementRef, afterRenderEffect, ChangeDetectionStrategy, ViewEncapsulation, Component, ViewContainerRef, effect, DestroyRef, Directive, signal } from '@angular/core';
|
|
2
|
+
import { input, computed, inject, ElementRef, afterRenderEffect, ChangeDetectionStrategy, ViewEncapsulation, Component, ViewContainerRef, effect, DestroyRef, Directive, signal, InjectionToken, output, booleanAttribute } from '@angular/core';
|
|
3
3
|
import { Overlay } from '@angular/cdk/overlay';
|
|
4
4
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
5
5
|
import { forwardOverlayTokens, closeOnScroll, disposeWithLeave, chartDwell } from '@ids-group-ltd/ids-design-system/components';
|
|
6
6
|
import { NgTemplateOutlet } from '@angular/common';
|
|
7
7
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
8
|
-
import { ICONS } from '@ids-group-ltd/ids-design-system/core';
|
|
8
|
+
import { ICONS, DS_INTL } from '@ids-group-ltd/ids-design-system/core';
|
|
9
9
|
|
|
10
10
|
// Below this the dot reads as the panel itself, as the palest heat step does on a light panel (1.14:1).
|
|
11
11
|
// A merely low-contrast hue still reads as a colour next to its label and takes no ring.
|
|
@@ -160,6 +160,7 @@ class ChartTooltipDirective {
|
|
|
160
160
|
panelRef = null;
|
|
161
161
|
detachScrollReposition = null;
|
|
162
162
|
detachEscape = null;
|
|
163
|
+
detachOffscreen = null;
|
|
163
164
|
glide = null;
|
|
164
165
|
constructor() {
|
|
165
166
|
effect(() => {
|
|
@@ -193,6 +194,7 @@ class ChartTooltipDirective {
|
|
|
193
194
|
? this.overlayRef?.updatePosition()
|
|
194
195
|
: this.close());
|
|
195
196
|
this.detachEscape = this.closeOnEscape();
|
|
197
|
+
this.detachOffscreen = hideWhileOffscreen(this.overlayRef.overlayElement, this.host.nativeElement);
|
|
196
198
|
}
|
|
197
199
|
else {
|
|
198
200
|
this.overlayRef.updatePositionStrategy(this.strategyFor(origin));
|
|
@@ -258,6 +260,8 @@ class ChartTooltipDirective {
|
|
|
258
260
|
this.detachEscape = null;
|
|
259
261
|
this.detachScrollReposition?.();
|
|
260
262
|
this.detachScrollReposition = null;
|
|
263
|
+
this.detachOffscreen?.();
|
|
264
|
+
this.detachOffscreen = null;
|
|
261
265
|
disposeWithLeave(this.overlayRef, 'dismiss');
|
|
262
266
|
this.glide = null;
|
|
263
267
|
this.overlayRef = null;
|
|
@@ -273,6 +277,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
273
277
|
standalone: true,
|
|
274
278
|
}]
|
|
275
279
|
}], ctorParameters: () => [], propDecorators: { dsChartTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsChartTooltip", required: false }] }], dsChartTooltipOrigin: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsChartTooltipOrigin", required: false }] }], dsChartTooltipTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsChartTooltipTemplate", required: false }] }], dsChartTooltipExtraGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsChartTooltipExtraGap", required: false }] }], dsChartTooltipPinned: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsChartTooltipPinned", required: false }] }], dsChartTooltipSwatches: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsChartTooltipSwatches", required: false }] }] } });
|
|
280
|
+
// A pinned panel survives a scroll, and the position strategy's push would hold it inside the
|
|
281
|
+
// viewport after its chart has gone; it hides while the chart is out of sight instead.
|
|
282
|
+
function hideWhileOffscreen(pane, chart) {
|
|
283
|
+
if (typeof IntersectionObserver === 'undefined') {
|
|
284
|
+
return () => undefined;
|
|
285
|
+
}
|
|
286
|
+
const observer = new IntersectionObserver(([entry]) => {
|
|
287
|
+
pane.style.visibility = entry?.isIntersecting ? '' : 'hidden';
|
|
288
|
+
});
|
|
289
|
+
observer.observe(chart);
|
|
290
|
+
return () => observer.disconnect();
|
|
291
|
+
}
|
|
276
292
|
function milliseconds(duration) {
|
|
277
293
|
const value = parseFloat(duration);
|
|
278
294
|
if (!Number.isFinite(value)) {
|
|
@@ -478,7 +494,7 @@ const CHART_PIN_RADIUS = 11;
|
|
|
478
494
|
/** Gap between a disc and the top edge of what it holds.
|
|
479
495
|
*
|
|
480
496
|
* @internal */
|
|
481
|
-
const CHART_PIN_GAP =
|
|
497
|
+
const CHART_PIN_GAP = 8;
|
|
482
498
|
const GLYPH_SIZE = 14;
|
|
483
499
|
/**
|
|
484
500
|
* The disc an SVG chart draws on the mark or category it holds. Drawn, not composed:
|
|
@@ -535,9 +551,159 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
535
551
|
}, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{pointer-events:none}.pin-disc{fill:var(--surface-default);stroke:var(--border-divider);stroke-width:var(--border-width-default)}.pin-glyph{color:var(--text-primary)}\n"] }]
|
|
536
552
|
}] });
|
|
537
553
|
|
|
554
|
+
/**
|
|
555
|
+
* Provided by a chart that wraps `ds-chart` and draws the Unpin control for its cursor itself,
|
|
556
|
+
* on its own caption line; the wrapped `ds-chart` then draws none.
|
|
557
|
+
*
|
|
558
|
+
* @internal
|
|
559
|
+
*/
|
|
560
|
+
const CHART_UNPIN_DRAWN_BY_HOST = new InjectionToken('CHART_UNPIN_DRAWN_BY_HOST');
|
|
561
|
+
/**
|
|
562
|
+
* The control that releases a held mark or category, at the top end of the chart. Every chart
|
|
563
|
+
* draws this one; the chart's own stylesheet makes room for it through `chart-frame.pin-reset`.
|
|
564
|
+
*
|
|
565
|
+
* @internal
|
|
566
|
+
*/
|
|
567
|
+
class ChartUnpinComponent {
|
|
568
|
+
pinned = input.required(...(ngDevMode ? [{ debugName: "pinned" }] : /* istanbul ignore next */ []));
|
|
569
|
+
release = output();
|
|
570
|
+
intl = inject(DS_INTL);
|
|
571
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartUnpinComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
572
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChartUnpinComponent, isStandalone: true, selector: "ds-chart-unpin", inputs: { pinned: { classPropertyName: "pinned", publicName: "pinned", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { release: "release" }, host: { properties: { "class.is-pinned": "pinned()" } }, ngImport: i0, template: `
|
|
573
|
+
@if (pinned()) {
|
|
574
|
+
<button class="pin-reset" type="button" (click)="release.emit()">
|
|
575
|
+
{{ intl().chart.unpin }}
|
|
576
|
+
</button>
|
|
577
|
+
}
|
|
578
|
+
`, isInline: true, styles: [":host{display:contents}.pin-reset{position:absolute;inset-block-start:var(--_chart-pin-reset-inset, 0);inset-inline-end:var(--_chart-pin-reset-inset, 0);z-index:1;display:inline-flex;align-items:center;gap:var(--space-1);block-size:var(--space-6);padding:0 var(--space-2-5);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:before{position:absolute;inset:50% auto auto 50%;inline-size:max(100%,var(--hit-comfy));block-size:var(--hit-comfy);transform:translate(-50%,-50%);content:\"\"}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
579
|
+
}
|
|
580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartUnpinComponent, decorators: [{
|
|
581
|
+
type: Component,
|
|
582
|
+
args: [{ selector: 'ds-chart-unpin', standalone: true, template: `
|
|
583
|
+
@if (pinned()) {
|
|
584
|
+
<button class="pin-reset" type="button" (click)="release.emit()">
|
|
585
|
+
{{ intl().chart.unpin }}
|
|
586
|
+
</button>
|
|
587
|
+
}
|
|
588
|
+
`, host: {
|
|
589
|
+
'[class.is-pinned]': 'pinned()',
|
|
590
|
+
}, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}.pin-reset{position:absolute;inset-block-start:var(--_chart-pin-reset-inset, 0);inset-inline-end:var(--_chart-pin-reset-inset, 0);z-index:1;display:inline-flex;align-items:center;gap:var(--space-1);block-size:var(--space-6);padding:0 var(--space-2-5);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:before{position:absolute;inset:50% auto auto 50%;inline-size:max(100%,var(--hit-comfy));block-size:var(--hit-comfy);transform:translate(-50%,-50%);content:\"\"}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}\n"] }]
|
|
591
|
+
}], propDecorators: { pinned: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinned", required: true }] }], release: [{ type: i0.Output, args: ["release"] }] } });
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* The Unpin control, caption and error / loading / empty states every chart draws, then `body`.
|
|
595
|
+
* It sits on the chart's own `<figure>` so the caption stays the figure's direct child, which is
|
|
596
|
+
* what names the figure. `skeleton`, `body` and `message` are declared in the chart's template
|
|
597
|
+
* and keep its styles; the message box takes its height from an inherited
|
|
598
|
+
* `--_chart-message-height`.
|
|
599
|
+
*
|
|
600
|
+
* @internal
|
|
601
|
+
*/
|
|
602
|
+
class ChartStatesComponent {
|
|
603
|
+
unpin = input(true, { ...(ngDevMode ? { debugName: "unpin" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
604
|
+
pinned = input(false, ...(ngDevMode ? [{ debugName: "pinned" }] : /* istanbul ignore next */ []));
|
|
605
|
+
release = output();
|
|
606
|
+
caption = input(null, ...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
|
|
607
|
+
error = input(false, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
608
|
+
errorText = input('', ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
609
|
+
pending = input(false, ...(ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []));
|
|
610
|
+
empty = input(false, ...(ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []));
|
|
611
|
+
emptyText = input('', ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
|
|
612
|
+
/** Draws the axis L along the message box's start and bottom edges. */
|
|
613
|
+
messageAxes = input(false, { ...(ngDevMode ? { debugName: "messageAxes" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
614
|
+
skeleton = input.required(...(ngDevMode ? [{ debugName: "skeleton" }] : /* istanbul ignore next */ []));
|
|
615
|
+
body = input.required(...(ngDevMode ? [{ debugName: "body" }] : /* istanbul ignore next */ []));
|
|
616
|
+
/** Replaces the default error and empty paragraph. */
|
|
617
|
+
message = input(null, ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
618
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartStatesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
619
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChartStatesComponent, isStandalone: true, selector: "figure[dsChartStates]", inputs: { unpin: { classPropertyName: "unpin", publicName: "unpin", isSignal: true, isRequired: false, transformFunction: null }, pinned: { classPropertyName: "pinned", publicName: "pinned", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, pending: { classPropertyName: "pending", publicName: "pending", isSignal: true, isRequired: false, transformFunction: null }, empty: { classPropertyName: "empty", publicName: "empty", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, messageAxes: { classPropertyName: "messageAxes", publicName: "messageAxes", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: true, transformFunction: null }, body: { classPropertyName: "body", publicName: "body", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { release: "release" }, host: { properties: { "class.message-axes": "messageAxes()" } }, ngImport: i0, template: `
|
|
620
|
+
@if (unpin()) {
|
|
621
|
+
<ds-chart-unpin [pinned]="pinned()" (release)="release.emit()" />
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
@if (caption()) {
|
|
625
|
+
<figcaption>
|
|
626
|
+
{{ caption() }}
|
|
627
|
+
</figcaption>
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
@if (error()) {
|
|
631
|
+
@if (message(); as messageTemplate) {
|
|
632
|
+
<ng-container
|
|
633
|
+
[ngTemplateOutlet]="messageTemplate"
|
|
634
|
+
[ngTemplateOutletContext]="{ $implicit: errorText(), error: true }" />
|
|
635
|
+
} @else {
|
|
636
|
+
<p class="empty is-error" role="status">
|
|
637
|
+
{{ errorText() }}
|
|
638
|
+
</p>
|
|
639
|
+
}
|
|
640
|
+
} @else if (pending()) {
|
|
641
|
+
<ng-container [ngTemplateOutlet]="skeleton()" />
|
|
642
|
+
} @else if (empty()) {
|
|
643
|
+
@if (message(); as messageTemplate) {
|
|
644
|
+
<ng-container
|
|
645
|
+
[ngTemplateOutlet]="messageTemplate"
|
|
646
|
+
[ngTemplateOutletContext]="{
|
|
647
|
+
$implicit: emptyText(),
|
|
648
|
+
error: false,
|
|
649
|
+
}" />
|
|
650
|
+
} @else {
|
|
651
|
+
<p class="empty">
|
|
652
|
+
{{ emptyText() }}
|
|
653
|
+
</p>
|
|
654
|
+
}
|
|
655
|
+
} @else {
|
|
656
|
+
<ng-container [ngTemplateOutlet]="body()" />
|
|
657
|
+
}
|
|
658
|
+
`, isInline: true, styles: ["figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}:host:has(>ds-chart-unpin.is-pinned)>figcaption{padding-inline-end:calc(5rem + var(--space-2))}.empty{display:grid;place-items:center;min-block-size:var(--_chart-message-height);margin:0;color:var(--text-secondary);text-align:center}.empty.is-error{color:var(--error)}:host(.message-axes) .empty{border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}\n"], dependencies: [{ kind: "component", type: ChartUnpinComponent, selector: "ds-chart-unpin", inputs: ["pinned"], outputs: ["release"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
659
|
+
}
|
|
660
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartStatesComponent, decorators: [{
|
|
661
|
+
type: Component,
|
|
662
|
+
args: [{ selector: 'figure[dsChartStates]', standalone: true, imports: [ChartUnpinComponent, NgTemplateOutlet], template: `
|
|
663
|
+
@if (unpin()) {
|
|
664
|
+
<ds-chart-unpin [pinned]="pinned()" (release)="release.emit()" />
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
@if (caption()) {
|
|
668
|
+
<figcaption>
|
|
669
|
+
{{ caption() }}
|
|
670
|
+
</figcaption>
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
@if (error()) {
|
|
674
|
+
@if (message(); as messageTemplate) {
|
|
675
|
+
<ng-container
|
|
676
|
+
[ngTemplateOutlet]="messageTemplate"
|
|
677
|
+
[ngTemplateOutletContext]="{ $implicit: errorText(), error: true }" />
|
|
678
|
+
} @else {
|
|
679
|
+
<p class="empty is-error" role="status">
|
|
680
|
+
{{ errorText() }}
|
|
681
|
+
</p>
|
|
682
|
+
}
|
|
683
|
+
} @else if (pending()) {
|
|
684
|
+
<ng-container [ngTemplateOutlet]="skeleton()" />
|
|
685
|
+
} @else if (empty()) {
|
|
686
|
+
@if (message(); as messageTemplate) {
|
|
687
|
+
<ng-container
|
|
688
|
+
[ngTemplateOutlet]="messageTemplate"
|
|
689
|
+
[ngTemplateOutletContext]="{
|
|
690
|
+
$implicit: emptyText(),
|
|
691
|
+
error: false,
|
|
692
|
+
}" />
|
|
693
|
+
} @else {
|
|
694
|
+
<p class="empty">
|
|
695
|
+
{{ emptyText() }}
|
|
696
|
+
</p>
|
|
697
|
+
}
|
|
698
|
+
} @else {
|
|
699
|
+
<ng-container [ngTemplateOutlet]="body()" />
|
|
700
|
+
}
|
|
701
|
+
`, host: { '[class.message-axes]': 'messageAxes()' }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}:host:has(>ds-chart-unpin.is-pinned)>figcaption{padding-inline-end:calc(5rem + var(--space-2))}.empty{display:grid;place-items:center;min-block-size:var(--_chart-message-height);margin:0;color:var(--text-secondary);text-align:center}.empty.is-error{color:var(--error)}:host(.message-axes) .empty{border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}\n"] }]
|
|
702
|
+
}], propDecorators: { unpin: [{ type: i0.Input, args: [{ isSignal: true, alias: "unpin", required: false }] }], pinned: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinned", required: false }] }], release: [{ type: i0.Output, args: ["release"] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], pending: [{ type: i0.Input, args: [{ isSignal: true, alias: "pending", required: false }] }], empty: [{ type: i0.Input, args: [{ isSignal: true, alias: "empty", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], messageAxes: [{ type: i0.Input, args: [{ isSignal: true, alias: "messageAxes", required: false }] }], skeleton: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeleton", required: true }] }], body: [{ type: i0.Input, args: [{ isSignal: true, alias: "body", required: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }] } });
|
|
703
|
+
|
|
538
704
|
/**
|
|
539
705
|
* Generated bundle index. Do not edit.
|
|
540
706
|
*/
|
|
541
707
|
|
|
542
|
-
export { CHART_PIN_GAP, CHART_PIN_RADIUS, ChartPinMarkerComponent, ChartTooltipDirective, chartActiveMark };
|
|
708
|
+
export { CHART_PIN_GAP, CHART_PIN_RADIUS, CHART_UNPIN_DRAWN_BY_HOST, ChartPinMarkerComponent, ChartStatesComponent, ChartTooltipDirective, ChartUnpinComponent, chartActiveMark };
|
|
543
709
|
//# sourceMappingURL=ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map
|