@ids-group-ltd/ids-design-system 0.12.3 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +603 -6
- package/components.md +85 -2
- package/docs/agent/INDEX.md +11 -1
- package/docs/agent/charts/chart-colour-which-palette-a-chart-takes.md +9 -0
- package/docs/agent/charts/chart-frame-the-box-a-chart-draws-around-itself.md +12 -0
- package/docs/agent/charts/ds-bar-chart.md +15 -0
- package/docs/agent/charts/ds-column-chart.md +14 -0
- package/docs/agent/charts/ds-donut-chart.md +17 -0
- package/docs/agent/charts/ds-funnel-chart.md +16 -0
- package/docs/agent/charts/ds-line-chart.md +15 -0
- package/docs/agent/forms/ds-button.md +4 -2
- package/docs/agent/forms/ds-number-stepper.md +1 -0
- package/docs/agent/navigation/ds-sidenav-item.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-autocomplete.mjs +16 -14
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +161 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -0
- 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 +58 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +43 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +197 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +1 -0
- 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 +1 -0
- 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 +173 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +9 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +299 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +69 -17
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +366 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +10 -14
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +631 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +1 -1
- 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 +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.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-radio-group.mjs +2 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +1 -0
- 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 +9 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +18 -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 +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +4 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +30 -71
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +1 -0
- 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 +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +31 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +393 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +17 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +3 -0
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +10 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.13.0.json +530 -0
- package/package.json +57 -1
- package/styles/_chart-data-table.scss +95 -0
- package/styles/_chart-frame.scss +53 -0
- package/styles/_chart-interactive.scss +40 -0
- package/styles/_chart-motion.scss +45 -0
- package/styles/_focus.scss +1 -1
- package/styles/_tokens-charts.scss +149 -39
- package/styles/_tokens.scss +17 -4
- package/themes/dark/_theme.scss +37 -29
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +11 -9
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +104 -0
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +37 -4
- package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +34 -0
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +78 -0
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +105 -0
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +113 -0
- package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +52 -11
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +109 -0
- package/types/ids-group-ltd-ids-design-system-components-input.d.ts +5 -7
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +241 -0
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +5 -2
- package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +16 -4
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +13 -28
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +11 -1
- package/types/ids-group-ltd-ids-design-system-components.d.ts +154 -4
- package/types/ids-group-ltd-ids-design-system-core.d.ts +12 -1
- package/types/ids-group-ltd-ids-design-system.d.ts +9 -2
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, ChangeDetectionStrategy, ViewEncapsulation, Component, inject, ViewContainerRef, effect, DestroyRef, Directive, signal } from '@angular/core';
|
|
3
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
4
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
5
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
6
|
+
|
|
7
|
+
class ChartTooltipPanelComponent {
|
|
8
|
+
/** The category and the readings the panel prints. */
|
|
9
|
+
context = input.required(...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
10
|
+
/** The chart's projected `#dsChartTooltip` template. Null renders the built-in rows. */
|
|
11
|
+
template = input(null, ...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartTooltipPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChartTooltipPanelComponent, isStandalone: true, selector: "ds-chart-tooltip-panel", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: true, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" } }, ngImport: i0, template: "@if (template(); as projected) {\n <ng-container\n [ngTemplateOutlet]=\"projected\"\n [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n} @else {\n @if (context().category) {\n <p class=\"category\">\n {{ context().category }}\n </p>\n }\n\n <ul class=\"entries\">\n @for (entry of context().entries; track entry.label) {\n <li class=\"entry\">\n <span\n class=\"swatch\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"label\">\n {{ entry.label }}\n </span>\n\n <span class=\"value\">\n {{ entry.formatted }}\n </span>\n </li>\n }\n </ul>\n}\n", styles: [":host{--_chart-tooltip-bg-color: var(--ds-chart-tooltip-bg-color);--_chart-tooltip-text-color: var(--ds-chart-tooltip-text-color);--_chart-tooltip-border-color: var(--ds-chart-tooltip-border-color);display:block;background:var(--_chart-tooltip-bg-color);color:var(--_chart-tooltip-text-color);border:var(--border-width-default) solid var(--_chart-tooltip-border-color);border-radius:var(--ds-radius-control);box-shadow:var(--ds-elevation-overlay);padding:var(--space-2) var(--space-2-5);max-width:var(--tooltip-maxw);z-index:var(--layer-tooltip);font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);pointer-events:none}.category{margin:0 0 var(--space-1-5);font-weight:var(--font-weight-medium)}.entries{display:grid;gap:var(--space-1);margin:0;padding:0;list-style:none}.entry{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:var(--space-2)}.swatch{inline-size:var(--space-2);block-size:var(--space-2);border-radius:var(--radius-pill)}.value{font-variant-numeric:tabular-nums;font-weight:var(--font-weight-medium)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14
|
+
}
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartTooltipPanelComponent, decorators: [{
|
|
16
|
+
type: Component,
|
|
17
|
+
args: [{ selector: 'ds-chart-tooltip-panel', standalone: true, imports: [NgTemplateOutlet], host: {
|
|
18
|
+
// Hidden from assistive technology on purpose: every interactive mark already
|
|
19
|
+
// carries the same label and value in its `aria-label`, so exposing the panel
|
|
20
|
+
// makes a screen reader read each reading twice.
|
|
21
|
+
'aria-hidden': 'true',
|
|
22
|
+
}, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (template(); as projected) {\n <ng-container\n [ngTemplateOutlet]=\"projected\"\n [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n} @else {\n @if (context().category) {\n <p class=\"category\">\n {{ context().category }}\n </p>\n }\n\n <ul class=\"entries\">\n @for (entry of context().entries; track entry.label) {\n <li class=\"entry\">\n <span\n class=\"swatch\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"label\">\n {{ entry.label }}\n </span>\n\n <span class=\"value\">\n {{ entry.formatted }}\n </span>\n </li>\n }\n </ul>\n}\n", styles: [":host{--_chart-tooltip-bg-color: var(--ds-chart-tooltip-bg-color);--_chart-tooltip-text-color: var(--ds-chart-tooltip-text-color);--_chart-tooltip-border-color: var(--ds-chart-tooltip-border-color);display:block;background:var(--_chart-tooltip-bg-color);color:var(--_chart-tooltip-text-color);border:var(--border-width-default) solid var(--_chart-tooltip-border-color);border-radius:var(--ds-radius-control);box-shadow:var(--ds-elevation-overlay);padding:var(--space-2) var(--space-2-5);max-width:var(--tooltip-maxw);z-index:var(--layer-tooltip);font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);pointer-events:none}.category{margin:0 0 var(--space-1-5);font-weight:var(--font-weight-medium)}.entries{display:grid;gap:var(--space-1);margin:0;padding:0;list-style:none}.entry{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:var(--space-2)}.swatch{inline-size:var(--space-2);block-size:var(--space-2);border-radius:var(--radius-pill)}.value{font-variant-numeric:tabular-nums;font-weight:var(--font-weight-medium)}\n"] }]
|
|
23
|
+
}], propDecorators: { context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: true }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }] } });
|
|
24
|
+
|
|
25
|
+
const POINTER_GAP_PX = 12;
|
|
26
|
+
// A fingertip covers roughly 40 CSS px, so a touch-opened panel has to clear the tap
|
|
27
|
+
// point by more than a pointer-opened one does.
|
|
28
|
+
const TOUCH_GAP_PX = 48;
|
|
29
|
+
// Above first, then below, then either side: four fallbacks are what make the panel flip
|
|
30
|
+
// out of a small dashboard card rather than be clipped by it.
|
|
31
|
+
function positionsFor(gap) {
|
|
32
|
+
return [
|
|
33
|
+
{
|
|
34
|
+
originX: 'center',
|
|
35
|
+
originY: 'top',
|
|
36
|
+
overlayX: 'center',
|
|
37
|
+
overlayY: 'bottom',
|
|
38
|
+
offsetY: -gap,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
originX: 'center',
|
|
42
|
+
originY: 'bottom',
|
|
43
|
+
overlayX: 'center',
|
|
44
|
+
overlayY: 'top',
|
|
45
|
+
offsetY: gap,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
originX: 'end',
|
|
49
|
+
originY: 'center',
|
|
50
|
+
overlayX: 'start',
|
|
51
|
+
overlayY: 'center',
|
|
52
|
+
offsetX: gap,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
originX: 'start',
|
|
56
|
+
originY: 'center',
|
|
57
|
+
overlayX: 'end',
|
|
58
|
+
overlayY: 'center',
|
|
59
|
+
offsetX: -gap,
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The chart tooltip, driven entirely by the context a chart hands it: non-null opens the
|
|
65
|
+
* panel, null closes it. Pointer and keyboard therefore share one path — a chart that
|
|
66
|
+
* sets the context on `focus` gets the panel with no pointer involved.
|
|
67
|
+
*
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
class ChartTooltipDirective {
|
|
71
|
+
overlay = inject(Overlay);
|
|
72
|
+
viewContainerRef = inject(ViewContainerRef);
|
|
73
|
+
dsChartTooltip = input(null, ...(ngDevMode ? [{ debugName: "dsChartTooltip" }] : /* istanbul ignore next */ []));
|
|
74
|
+
dsChartTooltipOrigin = input(null, ...(ngDevMode ? [{ debugName: "dsChartTooltipOrigin" }] : /* istanbul ignore next */ []));
|
|
75
|
+
dsChartTooltipTemplate = input(null, ...(ngDevMode ? [{ debugName: "dsChartTooltipTemplate" }] : /* istanbul ignore next */ []));
|
|
76
|
+
overlayRef = null;
|
|
77
|
+
panelRef = null;
|
|
78
|
+
constructor() {
|
|
79
|
+
effect(() => {
|
|
80
|
+
const context = this.dsChartTooltip();
|
|
81
|
+
const origin = this.dsChartTooltipOrigin();
|
|
82
|
+
if (!context?.entries.length || !origin) {
|
|
83
|
+
this.close();
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
this.open(context, origin);
|
|
87
|
+
});
|
|
88
|
+
inject(DestroyRef).onDestroy(() => this.close());
|
|
89
|
+
}
|
|
90
|
+
open(context, origin) {
|
|
91
|
+
// Reposition rather than re-create while the pointer moves between marks: a fresh
|
|
92
|
+
// OverlayRef per mark restarts the enter transition on every band it crosses.
|
|
93
|
+
if (!this.overlayRef) {
|
|
94
|
+
this.overlayRef = this.overlay.create({
|
|
95
|
+
positionStrategy: this.strategyFor(origin),
|
|
96
|
+
panelClass: 'ds-overlay-pane',
|
|
97
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
98
|
+
});
|
|
99
|
+
this.panelRef = this.overlayRef.attach(new ComponentPortal(ChartTooltipPanelComponent, this.viewContainerRef));
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
this.overlayRef.updatePositionStrategy(this.strategyFor(origin));
|
|
103
|
+
}
|
|
104
|
+
this.panelRef?.setInput('context', context);
|
|
105
|
+
this.panelRef?.setInput('template', this.dsChartTooltipTemplate());
|
|
106
|
+
}
|
|
107
|
+
strategyFor(origin) {
|
|
108
|
+
const gap = coarsePointer() ? TOUCH_GAP_PX : POINTER_GAP_PX;
|
|
109
|
+
return this.overlay
|
|
110
|
+
.position()
|
|
111
|
+
.flexibleConnectedTo(origin)
|
|
112
|
+
.withFlexibleDimensions(false)
|
|
113
|
+
.withPush(true)
|
|
114
|
+
.withPositions(positionsFor(gap));
|
|
115
|
+
}
|
|
116
|
+
close() {
|
|
117
|
+
this.overlayRef?.dispose();
|
|
118
|
+
this.overlayRef = null;
|
|
119
|
+
this.panelRef = null;
|
|
120
|
+
}
|
|
121
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
122
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: ChartTooltipDirective, isStandalone: true, selector: "[dsChartTooltip]", inputs: { dsChartTooltip: { classPropertyName: "dsChartTooltip", publicName: "dsChartTooltip", isSignal: true, isRequired: false, transformFunction: null }, dsChartTooltipOrigin: { classPropertyName: "dsChartTooltipOrigin", publicName: "dsChartTooltipOrigin", isSignal: true, isRequired: false, transformFunction: null }, dsChartTooltipTemplate: { classPropertyName: "dsChartTooltipTemplate", publicName: "dsChartTooltipTemplate", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
123
|
+
}
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartTooltipDirective, decorators: [{
|
|
125
|
+
type: Directive,
|
|
126
|
+
args: [{
|
|
127
|
+
selector: '[dsChartTooltip]',
|
|
128
|
+
standalone: true,
|
|
129
|
+
}]
|
|
130
|
+
}], 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 }] }] } });
|
|
131
|
+
function coarsePointer() {
|
|
132
|
+
return (typeof window !== 'undefined' &&
|
|
133
|
+
window.matchMedia('(pointer: coarse)').matches);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The pointer-and-focus target the tooltip reads, for a chart whose marks are elements.
|
|
138
|
+
* Pointer and keyboard write the same pair, so a chart wires `pointerenter` and `focus` to
|
|
139
|
+
* `enter` and gets one code path rather than two.
|
|
140
|
+
*
|
|
141
|
+
* A TAP LATCHES. A touch fires `pointerleave` the moment the finger lifts, so without this the
|
|
142
|
+
* panel would flash and vanish; latched, it stays until the next tap lands outside the mark. Call
|
|
143
|
+
* from an injection context — the release listener is torn down with the component.
|
|
144
|
+
*
|
|
145
|
+
* @internal
|
|
146
|
+
*/
|
|
147
|
+
function chartActiveMark() {
|
|
148
|
+
const index = signal(-1, ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
|
|
149
|
+
const origin = signal(null, ...(ngDevMode ? [{ debugName: "origin" }] : /* istanbul ignore next */ []));
|
|
150
|
+
let latched = false;
|
|
151
|
+
const clear = () => {
|
|
152
|
+
latched = false;
|
|
153
|
+
index.set(-1);
|
|
154
|
+
origin.set(null);
|
|
155
|
+
document.removeEventListener('pointerdown', release, true);
|
|
156
|
+
};
|
|
157
|
+
const release = (event) => {
|
|
158
|
+
const mark = origin();
|
|
159
|
+
if (mark && event.target instanceof Node && mark.contains(event.target)) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
clear();
|
|
163
|
+
};
|
|
164
|
+
if (typeof document !== 'undefined') {
|
|
165
|
+
inject(DestroyRef).onDestroy(() => document.removeEventListener('pointerdown', release, true));
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
index: index.asReadonly(),
|
|
169
|
+
origin: origin.asReadonly(),
|
|
170
|
+
enter(at, event) {
|
|
171
|
+
if (event.currentTarget instanceof Element) {
|
|
172
|
+
origin.set(event.currentTarget);
|
|
173
|
+
}
|
|
174
|
+
index.set(at);
|
|
175
|
+
if (typeof document !== 'undefined' &&
|
|
176
|
+
event instanceof PointerEvent &&
|
|
177
|
+
event.pointerType === 'touch') {
|
|
178
|
+
latched = true;
|
|
179
|
+
document.addEventListener('pointerdown', release, true);
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
leave() {
|
|
183
|
+
if (latched) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
index.set(-1);
|
|
187
|
+
origin.set(null);
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Generated bundle index. Do not edit.
|
|
194
|
+
*/
|
|
195
|
+
|
|
196
|
+
export { ChartTooltipDirective, chartActiveMark };
|
|
197
|
+
//# sourceMappingURL=ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-chart-tooltip.mjs","sources":["../../../src/lib/components/chart-tooltip/chart-tooltip-panel.component.ts","../../../src/lib/components/chart-tooltip/chart-tooltip-panel.component.html","../../../src/lib/components/chart-tooltip/chart-tooltip.directive.ts","../../../src/lib/components/chart-tooltip/chart-active-mark.ts","../../../src/lib/components/chart-tooltip/ids-group-ltd-ids-design-system-components-chart-tooltip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n input,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport type { ChartTooltipContext } from './chart-tooltip.types';\n\n@Component({\n selector: 'ds-chart-tooltip-panel',\n standalone: true,\n imports: [NgTemplateOutlet],\n templateUrl: './chart-tooltip-panel.component.html',\n styleUrl: './chart-tooltip-panel.component.scss',\n host: {\n // Hidden from assistive technology on purpose: every interactive mark already\n // carries the same label and value in its `aria-label`, so exposing the panel\n // makes a screen reader read each reading twice.\n 'aria-hidden': 'true',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartTooltipPanelComponent {\n /** The category and the readings the panel prints. */\n readonly context = input.required<ChartTooltipContext>();\n /** The chart's projected `#dsChartTooltip` template. Null renders the built-in rows. */\n readonly template = input<TemplateRef<{\n $implicit: ChartTooltipContext;\n }> | null>(null);\n}\n","@if (template(); as projected) {\n <ng-container\n [ngTemplateOutlet]=\"projected\"\n [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n} @else {\n @if (context().category) {\n <p class=\"category\">\n {{ context().category }}\n </p>\n }\n\n <ul class=\"entries\">\n @for (entry of context().entries; track entry.label) {\n <li class=\"entry\">\n <span\n class=\"swatch\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"label\">\n {{ entry.label }}\n </span>\n\n <span class=\"value\">\n {{ entry.formatted }}\n </span>\n </li>\n }\n </ul>\n}\n","import {\n ComponentRef,\n DestroyRef,\n Directive,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n Overlay,\n OverlayRef,\n type FlexibleConnectedPositionStrategyOrigin,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ChartTooltipPanelComponent } from './chart-tooltip-panel.component';\nimport type {\n ChartTooltipContext,\n ChartTooltipOrigin,\n} from './chart-tooltip.types';\n\nconst POINTER_GAP_PX = 12;\n// A fingertip covers roughly 40 CSS px, so a touch-opened panel has to clear the tap\n// point by more than a pointer-opened one does.\nconst TOUCH_GAP_PX = 48;\n\n// Above first, then below, then either side: four fallbacks are what make the panel flip\n// out of a small dashboard card rather than be clipped by it.\nfunction positionsFor(gap: number): ConnectedPosition[] {\n return [\n {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -gap,\n },\n {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: gap,\n },\n {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: gap,\n },\n {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -gap,\n },\n ];\n}\n\n/**\n * The chart tooltip, driven entirely by the context a chart hands it: non-null opens the\n * panel, null closes it. Pointer and keyboard therefore share one path — a chart that\n * sets the context on `focus` gets the panel with no pointer involved.\n *\n * @internal\n */\n@Directive({\n selector: '[dsChartTooltip]',\n standalone: true,\n})\nexport class ChartTooltipDirective {\n private readonly overlay = inject(Overlay);\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n readonly dsChartTooltip = input<ChartTooltipContext | null>(null);\n readonly dsChartTooltipOrigin = input<ChartTooltipOrigin | null>(null);\n readonly dsChartTooltipTemplate = input<TemplateRef<{\n $implicit: ChartTooltipContext;\n }> | null>(null);\n\n private overlayRef: OverlayRef | null = null;\n private panelRef: ComponentRef<ChartTooltipPanelComponent> | null = null;\n\n constructor() {\n effect(() => {\n const context = this.dsChartTooltip();\n const origin = this.dsChartTooltipOrigin();\n if (!context?.entries.length || !origin) {\n this.close();\n\n return;\n }\n this.open(context, origin);\n });\n inject(DestroyRef).onDestroy(() => this.close());\n }\n\n private open(context: ChartTooltipContext, origin: ChartTooltipOrigin): void {\n // Reposition rather than re-create while the pointer moves between marks: a fresh\n // OverlayRef per mark restarts the enter transition on every band it crosses.\n if (!this.overlayRef) {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.strategyFor(origin),\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n });\n this.panelRef = this.overlayRef.attach(\n new ComponentPortal(ChartTooltipPanelComponent, this.viewContainerRef),\n );\n } else {\n this.overlayRef.updatePositionStrategy(this.strategyFor(origin));\n }\n this.panelRef?.setInput('context', context);\n this.panelRef?.setInput('template', this.dsChartTooltipTemplate());\n }\n\n private strategyFor(origin: ChartTooltipOrigin) {\n const gap = coarsePointer() ? TOUCH_GAP_PX : POINTER_GAP_PX;\n\n return this.overlay\n .position()\n .flexibleConnectedTo(origin as FlexibleConnectedPositionStrategyOrigin)\n .withFlexibleDimensions(false)\n .withPush(true)\n .withPositions(positionsFor(gap));\n }\n\n private close(): void {\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.panelRef = null;\n }\n}\n\nfunction coarsePointer(): boolean {\n return (\n typeof window !== 'undefined' &&\n window.matchMedia('(pointer: coarse)').matches\n );\n}\n","import { DestroyRef, Signal, inject, signal } from '@angular/core';\n\nexport interface ChartActiveMark {\n /** Index of the mark under the pointer or holding focus; `-1` when none is. */\n readonly index: Signal<number>;\n /** The mark's own element, which is what the tooltip anchors to. */\n readonly origin: Signal<Element | null>;\n enter(index: number, event: Event): void;\n leave(): void;\n}\n\n/**\n * The pointer-and-focus target the tooltip reads, for a chart whose marks are elements.\n * Pointer and keyboard write the same pair, so a chart wires `pointerenter` and `focus` to\n * `enter` and gets one code path rather than two.\n *\n * A TAP LATCHES. A touch fires `pointerleave` the moment the finger lifts, so without this the\n * panel would flash and vanish; latched, it stays until the next tap lands outside the mark. Call\n * from an injection context — the release listener is torn down with the component.\n *\n * @internal\n */\nexport function chartActiveMark(): ChartActiveMark {\n const index = signal(-1);\n const origin = signal<Element | null>(null);\n let latched = false;\n\n const clear = (): void => {\n latched = false;\n index.set(-1);\n origin.set(null);\n document.removeEventListener('pointerdown', release, true);\n };\n\n const release = (event: PointerEvent): void => {\n const mark = origin();\n if (mark && event.target instanceof Node && mark.contains(event.target)) {\n return;\n }\n clear();\n };\n\n if (typeof document !== 'undefined') {\n inject(DestroyRef).onDestroy(() =>\n document.removeEventListener('pointerdown', release, true),\n );\n }\n\n return {\n index: index.asReadonly(),\n origin: origin.asReadonly(),\n enter(at, event) {\n if (event.currentTarget instanceof Element) {\n origin.set(event.currentTarget);\n }\n index.set(at);\n if (\n typeof document !== 'undefined' &&\n event instanceof PointerEvent &&\n event.pointerType === 'touch'\n ) {\n latched = true;\n document.addEventListener('pointerdown', release, true);\n }\n },\n leave() {\n if (latched) {\n return;\n }\n index.set(-1);\n origin.set(null);\n },\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAyBa,0BAA0B,CAAA;;AAE5B,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAuB;;AAE/C,IAAA,QAAQ,GAAG,KAAK,CAEd,IAAI,+EAAC;wGANL,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,E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D;QACF,CAAC;QACD,KAAK,GAAA;YACH,IAAI,OAAO,EAAE;gBACX;YACF;AACA,YAAA,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACb,YAAA,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;QAClB,CAAC;KACF;AACH;;ACzEA;;AAEG;;;;"}
|
|
@@ -33,6 +33,7 @@ class CheckboxComponent extends DsBooleanControlValueAccessor {
|
|
|
33
33
|
controlId = computed(() => this.inputId() ?? this.uid, ...(ngDevMode ? [{ debugName: "controlId" }] : /* istanbul ignore next */ []));
|
|
34
34
|
hintId = computed(() => this.message().text ? `${this.uid}-hint` : null, ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
|
|
35
35
|
fieldMessage = resolveFieldMessage({
|
|
36
|
+
disabled: () => this.isDisabled(),
|
|
36
37
|
hint: this.hint,
|
|
37
38
|
warning: this.warning,
|
|
38
39
|
error: this.error,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-checkbox.mjs","sources":["../../../src/lib/components/checkbox/checkbox.component.ts","../../../src/lib/components/checkbox/checkbox.component.html","../../../src/lib/components/checkbox/ids-group-ltd-ids-design-system-components-checkbox.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DsBooleanControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-checkbox',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './checkbox.component.html',\n styleUrl: './checkbox.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: { '[attr.data-field-state]': 'controlState()' },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CheckboxComponent),\n multi: true,\n },\n ],\n})\nexport class CheckboxComponent extends DsBooleanControlValueAccessor {\n /** Checked state, two-way bound. */\n readonly checked = model<boolean>(false);\n /** Shows the partial/mixed visual state — independent of `checked`. */\n readonly indeterminate = input(false, { transform: booleanAttribute });\n /** Disables the checkbox and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Native `name` attribute. */\n readonly name = input<string | null>(null);\n /** Overrides the generated id used by the native `<input>` and its `<label for>`. */\n readonly inputId = input<string | null>(null);\n /** Checkbox size — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Marks the field required — shows an asterisk and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Inline label rendered beside the box and wired via for/id. Omit to\n * bring your own <label>. */\n readonly label = input<string>('');\n /** Accessible name for a control with no visible label — the row's `<label>` collapses when it\n * is empty, leaving nothing to name it. Set beside a label it OVERRIDES the label, per ARIA. */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly uid = nextControlId('ds-checkbox');\n protected readonly controlId = computed(() => this.inputId() ?? this.uid);\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n /** Only name via aria-label when there is no visible `<label for>` to do it. */\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || null,\n );\n protected readonly invalidResolved = this.fieldMessage.invalid;\n protected readonly controlState = this.fieldMessage.controlState;\n\n protected readonly fieldClass = computed(\n () => `checkbox-field size-${this.sizeResolved()}`,\n );\n\n protected onCheckedChange(event: Event): void {\n this.checked.set((event.target as HTMLInputElement).checked);\n }\n}\n","<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAiCM,MAAO,iBAAkB,SAAQ,6BAA6B,CAAA;;AAEzD,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;;IAE/B,aAAa,GAAG,KAAK,CAAC,KAAK,qFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAE7D,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;;AAEjC,IAAA,OAAO,GAAG,KAAK,CAAgB,IAAI,8EAAC;AAC7C;AACiE;AACxD,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;IACjC,YAAY,GAAG,iBAAiB,CACvC,IAAI,CAAC,IAAI,EACT,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,EAChC,IAAc,CACf;;IAEQ,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACjE;AAC8B;AACrB,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AAClC;AACiG;AACxF,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;AAE5B,IAAA,UAAU,GAAG,QAAQ,CACtC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,YAAY,EAAE,iFAC7C;AAEkB,IAAA,GAAG,GAAG,aAAa,CAAC,aAAa,CAAC;AAClC,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,GAAG,gFAAC;IACtD,MAAM,GAAG,QAAQ,CAAC,MACnC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,GAAG,CAAA,EAAG,IAAI,CAAC,GAAG,CAAA,KAAA,CAAO,GAAG,IAAI,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAChD;IACgB,YAAY,GAAG,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-checkbox.mjs","sources":["../../../src/lib/components/checkbox/checkbox.component.ts","../../../src/lib/components/checkbox/checkbox.component.html","../../../src/lib/components/checkbox/ids-group-ltd-ids-design-system-components-checkbox.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DsBooleanControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-checkbox',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './checkbox.component.html',\n styleUrl: './checkbox.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: { '[attr.data-field-state]': 'controlState()' },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CheckboxComponent),\n multi: true,\n },\n ],\n})\nexport class CheckboxComponent extends DsBooleanControlValueAccessor {\n /** Checked state, two-way bound. */\n readonly checked = model<boolean>(false);\n /** Shows the partial/mixed visual state — independent of `checked`. */\n readonly indeterminate = input(false, { transform: booleanAttribute });\n /** Disables the checkbox and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Native `name` attribute. */\n readonly name = input<string | null>(null);\n /** Overrides the generated id used by the native `<input>` and its `<label for>`. */\n readonly inputId = input<string | null>(null);\n /** Checkbox size — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Marks the field required — shows an asterisk and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Inline label rendered beside the box and wired via for/id. Omit to\n * bring your own <label>. */\n readonly label = input<string>('');\n /** Accessible name for a control with no visible label — the row's `<label>` collapses when it\n * is empty, leaving nothing to name it. Set beside a label it OVERRIDES the label, per ARIA. */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly uid = nextControlId('ds-checkbox');\n protected readonly controlId = computed(() => this.inputId() ?? this.uid);\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n /** Only name via aria-label when there is no visible `<label for>` to do it. */\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || null,\n );\n protected readonly invalidResolved = this.fieldMessage.invalid;\n protected readonly controlState = this.fieldMessage.controlState;\n\n protected readonly fieldClass = computed(\n () => `checkbox-field size-${this.sizeResolved()}`,\n );\n\n protected onCheckedChange(event: Event): void {\n this.checked.set((event.target as HTMLInputElement).checked);\n }\n}\n","<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n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@ -148,6 +148,7 @@ class ColorPickerComponent extends DsControlValueAccessor {
|
|
|
148
148
|
uid = nextControlId('ds-color-picker');
|
|
149
149
|
hintId = computed(() => this.message().text ? `${this.uid}-hint` : null, ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
|
|
150
150
|
fieldMessage = resolveFieldMessage({
|
|
151
|
+
disabled: () => this.isDisabled(),
|
|
151
152
|
hint: this.hint,
|
|
152
153
|
warning: this.warning,
|
|
153
154
|
error: this.error,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-color-picker.mjs","sources":["../../../src/lib/components/color-picker/color-picker.utils.ts","../../../src/lib/components/color-picker/color-picker.component.ts","../../../src/lib/components/color-picker/color-picker.component.html","../../../src/lib/components/color-picker/ids-group-ltd-ids-design-system-components-color-picker.ts"],"sourcesContent":["/** Hue 0–360, saturation/value 0–100 — the model the Photoshop-style picker\n * manipulates. Hex is the public value; these convert between the two. */\nexport interface Hsv {\n h: number;\n s: number;\n v: number;\n}\n\nexport function normalizeHex(hex: string): string | null {\n const match = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(hex.trim());\n if (!match) {\n return null;\n }\n const body = match[1];\n const full =\n body.length === 3\n ? `${body[0]}${body[0]}${body[1]}${body[1]}${body[2]}${body[2]}`\n : body;\n\n return `#${full.toLowerCase()}`;\n}\n\nexport function hexToHsv(hex: string): Hsv | null {\n const normalized = normalizeHex(hex);\n if (!normalized) {\n return null;\n }\n const red = parseInt(normalized.slice(1, 3), 16) / 255;\n const green = parseInt(normalized.slice(3, 5), 16) / 255;\n const blue = parseInt(normalized.slice(5, 7), 16) / 255;\n\n const max = Math.max(red, green, blue);\n const min = Math.min(red, green, blue);\n const delta = max - min;\n\n let hue = 0;\n if (delta !== 0) {\n if (max === red) {\n hue = ((green - blue) / delta) % 6;\n } else if (max === green) {\n hue = (blue - red) / delta + 2;\n } else {\n hue = (red - green) / delta + 4;\n }\n hue = Math.round(hue * 60);\n if (hue < 0) {\n hue += 360;\n }\n }\n const saturation = max === 0 ? 0 : delta / max;\n\n return {\n h: hue,\n s: Math.round(saturation * 100),\n v: Math.round(max * 100),\n };\n}\n\nexport function hsvToHex({ h, s, v }: Hsv): string {\n const saturation = s / 100;\n const value = v / 100;\n const chroma = value * saturation;\n const second = chroma * (1 - Math.abs(((h / 60) % 2) - 1));\n const matchLightness = value - chroma;\n\n let red = 0;\n let green = 0;\n let blue = 0;\n if (h < 60) {\n red = chroma;\n green = second;\n } else if (h < 120) {\n red = second;\n green = chroma;\n } else if (h < 180) {\n green = chroma;\n blue = second;\n } else if (h < 240) {\n green = second;\n blue = chroma;\n } else if (h < 300) {\n red = second;\n blue = chroma;\n } else {\n red = chroma;\n blue = second;\n }\n\n const toHex = (channel: number): string =>\n Math.round((channel + matchLightness) * 255)\n .toString(16)\n .padStart(2, '0');\n\n return `#${toHex(red)}${toHex(green)}${toHex(blue)}`;\n}\n","import {\n Component,\n ElementRef,\n type OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport {\n clearOnDetach,\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n focusIsInside,\n forwardOverlayTokens,\n dropdownOverlay,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n type Hsv,\n hexToHsv,\n hsvToHex,\n normalizeHex,\n} from './color-picker.utils';\n\nconst DEFAULT_PRESETS: readonly string[] = [\n '#2F54FF',\n '#0EA5E9',\n '#16A34A',\n '#EAB308',\n '#F97316',\n '#EF4444',\n '#EC4899',\n '#8B5CF6',\n '#6B7280',\n '#111827',\n '#FFFFFF',\n];\n\n@Component({\n selector: 'ds-color-picker',\n standalone: true,\n imports: [IconComponent, FieldMessageComponent],\n templateUrl: './color-picker.component.html',\n styleUrl: './color-picker.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ColorPickerComponent),\n multi: true,\n },\n {\n provide: DsOverlayCloseRef,\n useExisting: forwardRef(() => ColorPickerComponent),\n },\n ],\n host: {\n '[attr.data-field-state]': 'controlState()',\n '[class.open]': 'open()',\n '[class.disabled]': 'isDisabled()',\n },\n})\nexport class ColorPickerComponent\n extends DsControlValueAccessor<string>\n implements DsOverlayCloseRef, OnDestroy\n{\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n /** Public panel tokens forwarded onto the portaled overlay pane on open so\n * a consumer's `ds-color-picker { --ds-color-picker-panel-*: … }` reaches it. */\n private readonly panelTokens = [\n '--ds-color-picker-swatch',\n '--ds-color-picker-preview',\n '--ds-color-picker-panel-w',\n '--ds-color-picker-sv-h',\n '--ds-color-picker-hue-h',\n '--ds-color-picker-thumb',\n ];\n\n /** Selected colour as a hex string, two-way bound. */\n readonly value = model<string>('#2F54FF');\n /** Swatches shown in the panel — defaults to a built-in palette. */\n readonly presets = input<readonly string[]>(DEFAULT_PRESETS);\n /** Disables the trigger and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Accessible name for the trigger button and panel. */\n readonly ariaLabel = input<string>('Choose colour');\n /** Confirmation text, shown when there is no error or warning — and it paints\n * the field's success border. A string like `warning`: the text IS the state. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n\n protected readonly trigger =\n viewChild.required<ElementRef<HTMLButtonElement>>('trigger');\n protected readonly panelTpl =\n viewChild.required<TemplateRef<unknown>>('panel');\n protected readonly open = signal(false);\n\n // Working HSV state while the panel is open — the saturation/value plane and\n // the hue slider both manipulate this; the hex `value` is derived from it.\n protected readonly hsv = signal<Hsv>(\n hexToHsv('#2F54FF') ?? { h: 0, s: 0, v: 0 },\n );\n\n private overlayRef: OverlayRef | null = null;\n private svDragging = false;\n private hueDragging = false;\n\n ngOnDestroy(): void {\n // Host torn down while open → close() never runs. Dispose the overlay so\n // its pane and event subscriptions don't leak.\n this.overlayRef?.dispose();\n this.overlayRef = null;\n }\n\n protected readonly uid = nextControlId('ds-color-picker');\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n // Normalised hex for the trigger swatch + hex field.\n protected readonly displayHex = computed(\n () => normalizeHex(this.value()) ?? '#000000',\n );\n\n // Pure-hue fill behind the saturation/value plane.\n protected readonly hueColor = computed(() =>\n hsvToHex({ h: this.hsv().h, s: 100, v: 100 }),\n );\n\n protected readonly svThumb = computed(() => {\n const { s: saturation, v: value } = this.hsv();\n\n return { left: saturation, top: 100 - value };\n });\n\n protected readonly huePercent = computed(() => (this.hsv().h / 360) * 100);\n\n protected toggle(): void {\n if (this.isDisabled()) {\n return;\n }\n if (this.open()) {\n this.close();\n } else {\n this.openPanel();\n }\n }\n\n protected selectPreset(hex: string): void {\n this.commitHex(hex);\n this.close();\n }\n\n protected isSelected(hex: string): boolean {\n return normalizeHex(hex) === this.displayHex();\n }\n\n protected onHexInput(event: Event): void {\n const parsed = hexToHsv((event.target as HTMLInputElement).value);\n if (parsed) {\n this.hsv.set(parsed);\n this.value.set(hsvToHex(parsed));\n }\n }\n\n protected onSvPointerDown(event: PointerEvent): void {\n const plane = event.currentTarget as HTMLElement;\n plane.setPointerCapture(event.pointerId);\n this.svDragging = true;\n this.updateSv(event, plane);\n }\n\n protected onSvPointerMove(event: PointerEvent): void {\n if (this.svDragging) {\n this.updateSv(event, event.currentTarget as HTMLElement);\n }\n }\n\n protected onSvPointerUp(event: PointerEvent): void {\n if (!this.svDragging) {\n return;\n }\n const plane = event.currentTarget as HTMLElement;\n if (plane.hasPointerCapture(event.pointerId)) {\n plane.releasePointerCapture(event.pointerId);\n }\n this.svDragging = false;\n }\n\n protected onSvKeydown(event: KeyboardEvent): void {\n const { s: saturation, v: value } = this.hsv();\n const step = event.shiftKey ? 10 : 1;\n let nextSaturation = saturation;\n let nextValue = value;\n switch (event.key) {\n case 'ArrowRight':\n nextSaturation = saturation + step;\n break;\n case 'ArrowLeft':\n nextSaturation = saturation - step;\n break;\n case 'ArrowUp':\n nextValue = value + step;\n break;\n case 'ArrowDown':\n nextValue = value - step;\n break;\n default:\n return;\n }\n event.preventDefault();\n this.setHsv({\n s: this.clampPct(nextSaturation),\n v: this.clampPct(nextValue),\n });\n }\n\n protected onHuePointerDown(event: PointerEvent): void {\n const track = event.currentTarget as HTMLElement;\n track.setPointerCapture(event.pointerId);\n this.hueDragging = true;\n this.updateHue(event, track);\n }\n\n protected onHuePointerMove(event: PointerEvent): void {\n if (this.hueDragging) {\n this.updateHue(event, event.currentTarget as HTMLElement);\n }\n }\n\n protected onHuePointerUp(event: PointerEvent): void {\n if (!this.hueDragging) {\n return;\n }\n const track = event.currentTarget as HTMLElement;\n if (track.hasPointerCapture(event.pointerId)) {\n track.releasePointerCapture(event.pointerId);\n }\n this.hueDragging = false;\n }\n\n protected onHueKeydown(event: KeyboardEvent): void {\n const step = event.shiftKey ? 10 : 1;\n let next = this.hsv().h;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n next += step;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n next -= step;\n break;\n default:\n return;\n }\n event.preventDefault();\n this.setHsv({ h: (next + 360) % 360 });\n }\n\n private openPanel(): void {\n if (this.overlayRef) {\n return;\n }\n const parsed = hexToHsv(this.value());\n if (parsed) {\n this.hsv.set(parsed);\n }\n const { positionStrategy, config } = dropdownOverlay(\n this.overlay,\n this.host.nativeElement,\n );\n this.overlayRef = this.overlay.create(config);\n prepareOverlayEnter(\n this.overlayRef,\n this.host.nativeElement,\n positionStrategy,\n );\n forwardOverlayTokens(\n this.overlayRef,\n this.host.nativeElement,\n this.panelTokens,\n );\n closeOnOutsidePointer(\n this.overlayRef,\n (target) => this.trigger().nativeElement.contains(target),\n () => this.close('dismiss'),\n );\n // No backdrop catches a page scroll and CDK's scroll strategies miss a plain\n // overflow container, so close on any outside scroll ourselves.\n const removeScrollClose = closeOnScroll(this.overlayRef, () =>\n this.close('dismiss'),\n );\n clearOnDetach(this.overlayRef, {\n current: () => this.overlayRef,\n always: removeScrollClose,\n clear: () => {\n this.overlayRef = null;\n this.open.set(false);\n },\n });\n this.overlayRef.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close('dismiss');\n }\n });\n this.overlayRef.attach(new TemplatePortal(this.panelTpl(), this.vcr));\n this.open.set(true);\n }\n\n close(cause: DsOverlayCloseCause = 'select'): void {\n if (!this.overlayRef) {\n return;\n }\n const focusWasInPanel = focusIsInside(this.overlayRef);\n disposeWithLeave(this.overlayRef, cause);\n this.overlayRef = null;\n this.open.set(false);\n this.markTouched();\n if (focusWasInPanel) {\n this.trigger().nativeElement.focus({ preventScroll: true });\n }\n }\n\n private setHsv(partial: Partial<Hsv>): void {\n const next = { ...this.hsv(), ...partial };\n this.hsv.set(next);\n this.value.set(hsvToHex(next));\n }\n\n private commitHex(hex: string): void {\n const parsed = hexToHsv(hex);\n if (parsed) {\n this.hsv.set(parsed);\n this.value.set(hsvToHex(parsed));\n }\n }\n\n private updateSv(event: PointerEvent, plane: HTMLElement): void {\n const rect = plane.getBoundingClientRect();\n if (rect.width === 0 || rect.height === 0) {\n return;\n }\n const saturation = this.clampPct(\n ((event.clientX - rect.left) / rect.width) * 100,\n );\n const value = this.clampPct(\n 100 - ((event.clientY - rect.top) / rect.height) * 100,\n );\n this.setHsv({ s: Math.round(saturation), v: Math.round(value) });\n }\n\n private updateHue(event: PointerEvent, track: HTMLElement): void {\n const rect = track.getBoundingClientRect();\n if (rect.width === 0) {\n return;\n }\n const ratio = Math.min(\n 1,\n Math.max(0, (event.clientX - rect.left) / rect.width),\n );\n this.setHsv({ h: Math.round(ratio * 360) });\n }\n\n private clampPct(value: number): number {\n return Math.min(100, Math.max(0, value));\n }\n}\n","<button\n #trigger\n type=\"button\"\n class=\"trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\">\n <span\n class=\"swatch\"\n [style.background-color]=\"displayHex()\">\n </span>\n\n <span class=\"hex\">\n {{ displayHex() }}\n </span>\n\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"16\" />\n</button>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n\n<ng-template #panel>\n <div\n class=\"panel\"\n role=\"dialog\"\n [attr.aria-label]=\"ariaLabel()\">\n <div\n class=\"sv-plane\"\n tabindex=\"0\"\n aria-label=\"Saturation and brightness — use arrow keys to adjust\"\n [style.background-color]=\"hueColor()\"\n (pointerdown)=\"onSvPointerDown($event)\"\n (pointermove)=\"onSvPointerMove($event)\"\n (pointerup)=\"onSvPointerUp($event)\"\n (pointercancel)=\"onSvPointerUp($event)\"\n (keydown)=\"onSvKeydown($event)\">\n <span\n class=\"sv-thumb\"\n [style.left.%]=\"svThumb().left\"\n [style.top.%]=\"svThumb().top\">\n </span>\n </div>\n\n <div\n class=\"hue-track\"\n role=\"slider\"\n tabindex=\"0\"\n aria-label=\"Hue\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"360\"\n [attr.aria-valuenow]=\"hsv().h\"\n (pointerdown)=\"onHuePointerDown($event)\"\n (pointermove)=\"onHuePointerMove($event)\"\n (pointerup)=\"onHuePointerUp($event)\"\n (pointercancel)=\"onHuePointerUp($event)\"\n (keydown)=\"onHueKeydown($event)\">\n <span\n class=\"hue-thumb\"\n [style.left.%]=\"huePercent()\">\n </span>\n </div>\n\n <div class=\"fields\">\n <span\n class=\"preview\"\n [style.background-color]=\"displayHex()\">\n </span>\n\n <input\n type=\"text\"\n class=\"hex-input\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n aria-label=\"Hex colour value\"\n [value]=\"displayHex()\"\n (input)=\"onHexInput($event)\" />\n </div>\n\n <div\n class=\"presets\"\n role=\"group\"\n aria-label=\"Preset colours\">\n @for (preset of presets(); track preset) {\n <button\n type=\"button\"\n class=\"preset\"\n [class.selected]=\"isSelected(preset)\"\n [style.background-color]=\"preset\"\n [attr.aria-label]=\"preset\"\n [attr.aria-pressed]=\"isSelected(preset)\"\n (click)=\"selectPreset(preset)\">\n </button>\n }\n </div>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAQM,SAAU,YAAY,CAAC,GAAW,EAAA;IACtC,MAAM,KAAK,GAAG,gCAAgC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,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A,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,SAAS,kEAElB,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvHpD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-color-picker.mjs","sources":["../../../src/lib/components/color-picker/color-picker.utils.ts","../../../src/lib/components/color-picker/color-picker.component.ts","../../../src/lib/components/color-picker/color-picker.component.html","../../../src/lib/components/color-picker/ids-group-ltd-ids-design-system-components-color-picker.ts"],"sourcesContent":["/** Hue 0–360, saturation/value 0–100 — the model the Photoshop-style picker\n * manipulates. Hex is the public value; these convert between the two. */\nexport interface Hsv {\n h: number;\n s: number;\n v: number;\n}\n\nexport function normalizeHex(hex: string): string | null {\n const match = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(hex.trim());\n if (!match) {\n return null;\n }\n const body = match[1];\n const full =\n body.length === 3\n ? `${body[0]}${body[0]}${body[1]}${body[1]}${body[2]}${body[2]}`\n : body;\n\n return `#${full.toLowerCase()}`;\n}\n\nexport function hexToHsv(hex: string): Hsv | null {\n const normalized = normalizeHex(hex);\n if (!normalized) {\n return null;\n }\n const red = parseInt(normalized.slice(1, 3), 16) / 255;\n const green = parseInt(normalized.slice(3, 5), 16) / 255;\n const blue = parseInt(normalized.slice(5, 7), 16) / 255;\n\n const max = Math.max(red, green, blue);\n const min = Math.min(red, green, blue);\n const delta = max - min;\n\n let hue = 0;\n if (delta !== 0) {\n if (max === red) {\n hue = ((green - blue) / delta) % 6;\n } else if (max === green) {\n hue = (blue - red) / delta + 2;\n } else {\n hue = (red - green) / delta + 4;\n }\n hue = Math.round(hue * 60);\n if (hue < 0) {\n hue += 360;\n }\n }\n const saturation = max === 0 ? 0 : delta / max;\n\n return {\n h: hue,\n s: Math.round(saturation * 100),\n v: Math.round(max * 100),\n };\n}\n\nexport function hsvToHex({ h, s, v }: Hsv): string {\n const saturation = s / 100;\n const value = v / 100;\n const chroma = value * saturation;\n const second = chroma * (1 - Math.abs(((h / 60) % 2) - 1));\n const matchLightness = value - chroma;\n\n let red = 0;\n let green = 0;\n let blue = 0;\n if (h < 60) {\n red = chroma;\n green = second;\n } else if (h < 120) {\n red = second;\n green = chroma;\n } else if (h < 180) {\n green = chroma;\n blue = second;\n } else if (h < 240) {\n green = second;\n blue = chroma;\n } else if (h < 300) {\n red = second;\n blue = chroma;\n } else {\n red = chroma;\n blue = second;\n }\n\n const toHex = (channel: number): string =>\n Math.round((channel + matchLightness) * 255)\n .toString(16)\n .padStart(2, '0');\n\n return `#${toHex(red)}${toHex(green)}${toHex(blue)}`;\n}\n","import {\n Component,\n ElementRef,\n type OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport {\n clearOnDetach,\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n focusIsInside,\n forwardOverlayTokens,\n dropdownOverlay,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n type Hsv,\n hexToHsv,\n hsvToHex,\n normalizeHex,\n} from './color-picker.utils';\n\nconst DEFAULT_PRESETS: readonly string[] = [\n '#2F54FF',\n '#0EA5E9',\n '#16A34A',\n '#EAB308',\n '#F97316',\n '#EF4444',\n '#EC4899',\n '#8B5CF6',\n '#6B7280',\n '#111827',\n '#FFFFFF',\n];\n\n@Component({\n selector: 'ds-color-picker',\n standalone: true,\n imports: [IconComponent, FieldMessageComponent],\n templateUrl: './color-picker.component.html',\n styleUrl: './color-picker.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ColorPickerComponent),\n multi: true,\n },\n {\n provide: DsOverlayCloseRef,\n useExisting: forwardRef(() => ColorPickerComponent),\n },\n ],\n host: {\n '[attr.data-field-state]': 'controlState()',\n '[class.open]': 'open()',\n '[class.disabled]': 'isDisabled()',\n },\n})\nexport class ColorPickerComponent\n extends DsControlValueAccessor<string>\n implements DsOverlayCloseRef, OnDestroy\n{\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n /** Public panel tokens forwarded onto the portaled overlay pane on open so\n * a consumer's `ds-color-picker { --ds-color-picker-panel-*: … }` reaches it. */\n private readonly panelTokens = [\n '--ds-color-picker-swatch',\n '--ds-color-picker-preview',\n '--ds-color-picker-panel-w',\n '--ds-color-picker-sv-h',\n '--ds-color-picker-hue-h',\n '--ds-color-picker-thumb',\n ];\n\n /** Selected colour as a hex string, two-way bound. */\n readonly value = model<string>('#2F54FF');\n /** Swatches shown in the panel — defaults to a built-in palette. */\n readonly presets = input<readonly string[]>(DEFAULT_PRESETS);\n /** Disables the trigger and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Accessible name for the trigger button and panel. */\n readonly ariaLabel = input<string>('Choose colour');\n /** Confirmation text, shown when there is no error or warning — and it paints\n * the field's success border. A string like `warning`: the text IS the state. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n\n protected readonly trigger =\n viewChild.required<ElementRef<HTMLButtonElement>>('trigger');\n protected readonly panelTpl =\n viewChild.required<TemplateRef<unknown>>('panel');\n protected readonly open = signal(false);\n\n // Working HSV state while the panel is open — the saturation/value plane and\n // the hue slider both manipulate this; the hex `value` is derived from it.\n protected readonly hsv = signal<Hsv>(\n hexToHsv('#2F54FF') ?? { h: 0, s: 0, v: 0 },\n );\n\n private overlayRef: OverlayRef | null = null;\n private svDragging = false;\n private hueDragging = false;\n\n ngOnDestroy(): void {\n // Host torn down while open → close() never runs. Dispose the overlay so\n // its pane and event subscriptions don't leak.\n this.overlayRef?.dispose();\n this.overlayRef = null;\n }\n\n protected readonly uid = nextControlId('ds-color-picker');\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n // Normalised hex for the trigger swatch + hex field.\n protected readonly displayHex = computed(\n () => normalizeHex(this.value()) ?? '#000000',\n );\n\n // Pure-hue fill behind the saturation/value plane.\n protected readonly hueColor = computed(() =>\n hsvToHex({ h: this.hsv().h, s: 100, v: 100 }),\n );\n\n protected readonly svThumb = computed(() => {\n const { s: saturation, v: value } = this.hsv();\n\n return { left: saturation, top: 100 - value };\n });\n\n protected readonly huePercent = computed(() => (this.hsv().h / 360) * 100);\n\n protected toggle(): void {\n if (this.isDisabled()) {\n return;\n }\n if (this.open()) {\n this.close();\n } else {\n this.openPanel();\n }\n }\n\n protected selectPreset(hex: string): void {\n this.commitHex(hex);\n this.close();\n }\n\n protected isSelected(hex: string): boolean {\n return normalizeHex(hex) === this.displayHex();\n }\n\n protected onHexInput(event: Event): void {\n const parsed = hexToHsv((event.target as HTMLInputElement).value);\n if (parsed) {\n this.hsv.set(parsed);\n this.value.set(hsvToHex(parsed));\n }\n }\n\n protected onSvPointerDown(event: PointerEvent): void {\n const plane = event.currentTarget as HTMLElement;\n plane.setPointerCapture(event.pointerId);\n this.svDragging = true;\n this.updateSv(event, plane);\n }\n\n protected onSvPointerMove(event: PointerEvent): void {\n if (this.svDragging) {\n this.updateSv(event, event.currentTarget as HTMLElement);\n }\n }\n\n protected onSvPointerUp(event: PointerEvent): void {\n if (!this.svDragging) {\n return;\n }\n const plane = event.currentTarget as HTMLElement;\n if (plane.hasPointerCapture(event.pointerId)) {\n plane.releasePointerCapture(event.pointerId);\n }\n this.svDragging = false;\n }\n\n protected onSvKeydown(event: KeyboardEvent): void {\n const { s: saturation, v: value } = this.hsv();\n const step = event.shiftKey ? 10 : 1;\n let nextSaturation = saturation;\n let nextValue = value;\n switch (event.key) {\n case 'ArrowRight':\n nextSaturation = saturation + step;\n break;\n case 'ArrowLeft':\n nextSaturation = saturation - step;\n break;\n case 'ArrowUp':\n nextValue = value + step;\n break;\n case 'ArrowDown':\n nextValue = value - step;\n break;\n default:\n return;\n }\n event.preventDefault();\n this.setHsv({\n s: this.clampPct(nextSaturation),\n v: this.clampPct(nextValue),\n });\n }\n\n protected onHuePointerDown(event: PointerEvent): void {\n const track = event.currentTarget as HTMLElement;\n track.setPointerCapture(event.pointerId);\n this.hueDragging = true;\n this.updateHue(event, track);\n }\n\n protected onHuePointerMove(event: PointerEvent): void {\n if (this.hueDragging) {\n this.updateHue(event, event.currentTarget as HTMLElement);\n }\n }\n\n protected onHuePointerUp(event: PointerEvent): void {\n if (!this.hueDragging) {\n return;\n }\n const track = event.currentTarget as HTMLElement;\n if (track.hasPointerCapture(event.pointerId)) {\n track.releasePointerCapture(event.pointerId);\n }\n this.hueDragging = false;\n }\n\n protected onHueKeydown(event: KeyboardEvent): void {\n const step = event.shiftKey ? 10 : 1;\n let next = this.hsv().h;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n next += step;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n next -= step;\n break;\n default:\n return;\n }\n event.preventDefault();\n this.setHsv({ h: (next + 360) % 360 });\n }\n\n private openPanel(): void {\n if (this.overlayRef) {\n return;\n }\n const parsed = hexToHsv(this.value());\n if (parsed) {\n this.hsv.set(parsed);\n }\n const { positionStrategy, config } = dropdownOverlay(\n this.overlay,\n this.host.nativeElement,\n );\n this.overlayRef = this.overlay.create(config);\n prepareOverlayEnter(\n this.overlayRef,\n this.host.nativeElement,\n positionStrategy,\n );\n forwardOverlayTokens(\n this.overlayRef,\n this.host.nativeElement,\n this.panelTokens,\n );\n closeOnOutsidePointer(\n this.overlayRef,\n (target) => this.trigger().nativeElement.contains(target),\n () => this.close('dismiss'),\n );\n // No backdrop catches a page scroll and CDK's scroll strategies miss a plain\n // overflow container, so close on any outside scroll ourselves.\n const removeScrollClose = closeOnScroll(this.overlayRef, () =>\n this.close('dismiss'),\n );\n clearOnDetach(this.overlayRef, {\n current: () => this.overlayRef,\n always: removeScrollClose,\n clear: () => {\n this.overlayRef = null;\n this.open.set(false);\n },\n });\n this.overlayRef.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close('dismiss');\n }\n });\n this.overlayRef.attach(new TemplatePortal(this.panelTpl(), this.vcr));\n this.open.set(true);\n }\n\n close(cause: DsOverlayCloseCause = 'select'): void {\n if (!this.overlayRef) {\n return;\n }\n const focusWasInPanel = focusIsInside(this.overlayRef);\n disposeWithLeave(this.overlayRef, cause);\n this.overlayRef = null;\n this.open.set(false);\n this.markTouched();\n if (focusWasInPanel) {\n this.trigger().nativeElement.focus({ preventScroll: true });\n }\n }\n\n private setHsv(partial: Partial<Hsv>): void {\n const next = { ...this.hsv(), ...partial };\n this.hsv.set(next);\n this.value.set(hsvToHex(next));\n }\n\n private commitHex(hex: string): void {\n const parsed = hexToHsv(hex);\n if (parsed) {\n this.hsv.set(parsed);\n this.value.set(hsvToHex(parsed));\n }\n }\n\n private updateSv(event: PointerEvent, plane: HTMLElement): void {\n const rect = plane.getBoundingClientRect();\n if (rect.width === 0 || rect.height === 0) {\n return;\n }\n const saturation = this.clampPct(\n ((event.clientX - rect.left) / rect.width) * 100,\n );\n const value = this.clampPct(\n 100 - ((event.clientY - rect.top) / rect.height) * 100,\n );\n this.setHsv({ s: Math.round(saturation), v: Math.round(value) });\n }\n\n private updateHue(event: PointerEvent, track: HTMLElement): void {\n const rect = track.getBoundingClientRect();\n if (rect.width === 0) {\n return;\n }\n const ratio = Math.min(\n 1,\n Math.max(0, (event.clientX - rect.left) / rect.width),\n );\n this.setHsv({ h: Math.round(ratio * 360) });\n }\n\n private clampPct(value: number): number {\n return Math.min(100, Math.max(0, value));\n }\n}\n","<button\n #trigger\n type=\"button\"\n class=\"trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\">\n <span\n class=\"swatch\"\n [style.background-color]=\"displayHex()\">\n </span>\n\n <span class=\"hex\">\n {{ displayHex() }}\n </span>\n\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"16\" />\n</button>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n\n<ng-template #panel>\n <div\n class=\"panel\"\n role=\"dialog\"\n [attr.aria-label]=\"ariaLabel()\">\n <div\n class=\"sv-plane\"\n tabindex=\"0\"\n aria-label=\"Saturation and brightness — use arrow keys to adjust\"\n [style.background-color]=\"hueColor()\"\n (pointerdown)=\"onSvPointerDown($event)\"\n (pointermove)=\"onSvPointerMove($event)\"\n (pointerup)=\"onSvPointerUp($event)\"\n (pointercancel)=\"onSvPointerUp($event)\"\n (keydown)=\"onSvKeydown($event)\">\n <span\n class=\"sv-thumb\"\n [style.left.%]=\"svThumb().left\"\n [style.top.%]=\"svThumb().top\">\n </span>\n </div>\n\n <div\n class=\"hue-track\"\n role=\"slider\"\n tabindex=\"0\"\n aria-label=\"Hue\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"360\"\n [attr.aria-valuenow]=\"hsv().h\"\n (pointerdown)=\"onHuePointerDown($event)\"\n (pointermove)=\"onHuePointerMove($event)\"\n (pointerup)=\"onHuePointerUp($event)\"\n (pointercancel)=\"onHuePointerUp($event)\"\n (keydown)=\"onHueKeydown($event)\">\n <span\n class=\"hue-thumb\"\n [style.left.%]=\"huePercent()\">\n </span>\n </div>\n\n <div class=\"fields\">\n <span\n class=\"preview\"\n [style.background-color]=\"displayHex()\">\n </span>\n\n <input\n type=\"text\"\n class=\"hex-input\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n aria-label=\"Hex colour value\"\n [value]=\"displayHex()\"\n (input)=\"onHexInput($event)\" />\n </div>\n\n <div\n class=\"presets\"\n role=\"group\"\n aria-label=\"Preset colours\">\n @for (preset of presets(); track preset) {\n <button\n type=\"button\"\n class=\"preset\"\n [class.selected]=\"isSelected(preset)\"\n [style.background-color]=\"preset\"\n [attr.aria-label]=\"preset\"\n [attr.aria-pressed]=\"isSelected(preset)\"\n (click)=\"selectPreset(preset)\">\n </button>\n }\n </div>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAQM,SAAU,YAAY,CAAC,GAAW,EAAA;IACtC,MAAM,KAAK,GAAG,gCAAgC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IAC/D,IAAI,CAAC,KAAK,EAAE;AACV,QAAA,OAAO,IAAI;IACb;AACA,IAAA,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC;AACrB,IAAA,MAAM,IAAI,GACR,IAAI,CAAC,MAAM,KAAK;AACd,UAAE,CAAA,EAAG,IAAI,CAAC,CAAC,CAAC,CAAA,EAAG,IAAI,CAAC,CAAC,CAAC,CAAA,EAAG,IAAI,CAAC,CAAC,CAAC,CAAA,EAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA,EAAG,IAAI,CAAC,CAAC,CAAC,CAAA;UAC5D,IAAI;AAEV,IAAA,OAAO,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;AACjC;AAEM,SAAU,QAAQ,CAAC,GAAW,EAAA;AAClC,IAAA,MAAM,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC;IACpC,IAAI,CAAC,UAAU,EAAE;AACf,QAAA,OAAO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