@ngneers/controls 0.0.1-next.1 → 0.0.1-next.2

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.
Files changed (115) hide show
  1. package/fesm2022/ngneers-controls-api-ng.mjs +11 -18
  2. package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -1
  3. package/fesm2022/ngneers-controls-badge.mjs +160 -0
  4. package/fesm2022/ngneers-controls-badge.mjs.map +1 -0
  5. package/fesm2022/ngneers-controls-base.mjs +85 -8
  6. package/fesm2022/ngneers-controls-base.mjs.map +1 -1
  7. package/fesm2022/{ngneers-controls-calendar-time-CJT5AFlA.mjs → ngneers-controls-calendar-time-paM6WVpV.mjs} +2 -2
  8. package/fesm2022/{ngneers-controls-calendar-time-CJT5AFlA.mjs.map → ngneers-controls-calendar-time-paM6WVpV.mjs.map} +1 -1
  9. package/fesm2022/ngneers-controls-calendar.mjs +13 -6
  10. package/fesm2022/ngneers-controls-calendar.mjs.map +1 -1
  11. package/fesm2022/ngneers-controls-checkbox.mjs +3 -3
  12. package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -1
  13. package/fesm2022/ngneers-controls-color-picker.mjs +336 -0
  14. package/fesm2022/ngneers-controls-color-picker.mjs.map +1 -0
  15. package/fesm2022/ngneers-controls-default-icons.mjs +5 -0
  16. package/fesm2022/ngneers-controls-default-icons.mjs.map +1 -1
  17. package/fesm2022/ngneers-controls-directives.mjs +64 -7
  18. package/fesm2022/ngneers-controls-directives.mjs.map +1 -1
  19. package/fesm2022/ngneers-controls-edit-inplace.mjs +15 -5
  20. package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -1
  21. package/fesm2022/ngneers-controls-errors.mjs +203 -148
  22. package/fesm2022/ngneers-controls-errors.mjs.map +1 -1
  23. package/fesm2022/ngneers-controls-filter.mjs +2 -2
  24. package/fesm2022/ngneers-controls-filter.mjs.map +1 -1
  25. package/fesm2022/ngneers-controls-hint.mjs +18 -1
  26. package/fesm2022/ngneers-controls-hint.mjs.map +1 -1
  27. package/fesm2022/ngneers-controls-i18n-translations-de.mjs +14 -0
  28. package/fesm2022/ngneers-controls-i18n-translations-de.mjs.map +1 -1
  29. package/fesm2022/ngneers-controls-i18n-translations-en.mjs +16 -0
  30. package/fesm2022/ngneers-controls-i18n-translations-en.mjs.map +1 -1
  31. package/fesm2022/ngneers-controls-icon.mjs +23 -6
  32. package/fesm2022/ngneers-controls-icon.mjs.map +1 -1
  33. package/fesm2022/ngneers-controls-input-field.mjs +18 -2
  34. package/fesm2022/ngneers-controls-input-field.mjs.map +1 -1
  35. package/fesm2022/ngneers-controls-input.mjs +49 -9
  36. package/fesm2022/ngneers-controls-input.mjs.map +1 -1
  37. package/fesm2022/ngneers-controls-list-box.mjs +2 -2
  38. package/fesm2022/ngneers-controls-list-box.mjs.map +1 -1
  39. package/fesm2022/ngneers-controls-mask-input.mjs +4 -1
  40. package/fesm2022/ngneers-controls-mask-input.mjs.map +1 -1
  41. package/fesm2022/ngneers-controls-number-input.mjs +4 -4
  42. package/fesm2022/ngneers-controls-number-input.mjs.map +1 -1
  43. package/fesm2022/ngneers-controls-otp.mjs +16 -4
  44. package/fesm2022/ngneers-controls-otp.mjs.map +1 -1
  45. package/fesm2022/ngneers-controls-paginator.mjs +36 -9
  46. package/fesm2022/ngneers-controls-paginator.mjs.map +1 -1
  47. package/fesm2022/ngneers-controls-radio.mjs +4 -4
  48. package/fesm2022/ngneers-controls-radio.mjs.map +1 -1
  49. package/fesm2022/ngneers-controls-rating.mjs +180 -0
  50. package/fesm2022/ngneers-controls-rating.mjs.map +1 -0
  51. package/fesm2022/ngneers-controls-scroll-shadow.mjs +33 -7
  52. package/fesm2022/ngneers-controls-scroll-shadow.mjs.map +1 -1
  53. package/fesm2022/ngneers-controls-scroller.mjs +4 -2
  54. package/fesm2022/ngneers-controls-scroller.mjs.map +1 -1
  55. package/fesm2022/ngneers-controls-select-button.mjs +2 -1
  56. package/fesm2022/ngneers-controls-select-button.mjs.map +1 -1
  57. package/fesm2022/ngneers-controls-select.mjs +24 -4
  58. package/fesm2022/ngneers-controls-select.mjs.map +1 -1
  59. package/fesm2022/ngneers-controls-slider.mjs +3 -3
  60. package/fesm2022/ngneers-controls-slider.mjs.map +1 -1
  61. package/fesm2022/ngneers-controls-stepper.mjs +142 -0
  62. package/fesm2022/ngneers-controls-stepper.mjs.map +1 -0
  63. package/fesm2022/ngneers-controls-switch.mjs +3 -3
  64. package/fesm2022/ngneers-controls-switch.mjs.map +1 -1
  65. package/fesm2022/ngneers-controls-table.mjs +282 -15
  66. package/fesm2022/ngneers-controls-table.mjs.map +1 -1
  67. package/fesm2022/ngneers-controls-tabs.mjs +2 -2
  68. package/fesm2022/ngneers-controls-tabs.mjs.map +1 -1
  69. package/fesm2022/ngneers-controls-toggle-button.mjs +3 -3
  70. package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -1
  71. package/fesm2022/ngneers-controls-tooltip.mjs +16 -28
  72. package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -1
  73. package/fesm2022/ngneers-controls-tree.mjs +2 -2
  74. package/fesm2022/ngneers-controls-tree.mjs.map +1 -1
  75. package/fesm2022/ngneers-controls-utils.mjs +138 -1
  76. package/fesm2022/ngneers-controls-utils.mjs.map +1 -1
  77. package/package.json +18 -2
  78. package/types/ngneers-controls-api-ng.d.ts +12 -9
  79. package/types/ngneers-controls-badge.d.ts +67 -0
  80. package/types/ngneers-controls-base.d.ts +61 -4
  81. package/types/ngneers-controls-breadcrumb.d.ts +14 -0
  82. package/types/ngneers-controls-calendar.d.ts +21 -6
  83. package/types/ngneers-controls-chip.d.ts +14 -0
  84. package/types/ngneers-controls-color-picker.d.ts +119 -0
  85. package/types/ngneers-controls-dialog.d.ts +14 -0
  86. package/types/ngneers-controls-directives.d.ts +31 -2
  87. package/types/ngneers-controls-drawer.d.ts +14 -0
  88. package/types/ngneers-controls-edit-inplace.d.ts +20 -0
  89. package/types/ngneers-controls-errors.d.ts +105 -16
  90. package/types/ngneers-controls-filter.d.ts +27 -13
  91. package/types/ngneers-controls-hint.d.ts +8 -1
  92. package/types/ngneers-controls-i18n-translations-de.d.ts +14 -0
  93. package/types/ngneers-controls-i18n-translations-en.d.ts +14 -0
  94. package/types/ngneers-controls-i18n.d.ts +14 -0
  95. package/types/ngneers-controls-icon.d.ts +2 -2
  96. package/types/ngneers-controls-input-field.d.ts +25 -2
  97. package/types/ngneers-controls-input.d.ts +35 -3
  98. package/types/ngneers-controls-list-box.d.ts +14 -0
  99. package/types/ngneers-controls-mask-input.d.ts +14 -0
  100. package/types/ngneers-controls-otp.d.ts +19 -0
  101. package/types/ngneers-controls-paginator.d.ts +31 -3
  102. package/types/ngneers-controls-rating.d.ts +69 -0
  103. package/types/ngneers-controls-scroll-shadow.d.ts +11 -2
  104. package/types/ngneers-controls-scroller.d.ts +3 -1
  105. package/types/ngneers-controls-select.d.ts +27 -3
  106. package/types/ngneers-controls-snackbar.d.ts +14 -0
  107. package/types/ngneers-controls-splitter.d.ts +14 -0
  108. package/types/ngneers-controls-state.d.ts +2 -2
  109. package/types/ngneers-controls-stepper.d.ts +68 -0
  110. package/types/ngneers-controls-table.d.ts +273 -169
  111. package/types/ngneers-controls-toast.d.ts +14 -0
  112. package/types/ngneers-controls-tooltip.d.ts +0 -1
  113. package/types/ngneers-controls-tree.d.ts +14 -0
  114. package/types/ngneers-controls-upload.d.ts +14 -0
  115. package/types/ngneers-controls-utils.d.ts +27 -2
@@ -0,0 +1,336 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { viewChild, input, booleanAttribute, model, output, signal, computed, effect, Component } from '@angular/core';
4
+ import { ValueControlBase, NgnPt, provideSelf } from '@ngneers/controls/base';
5
+ import { NgnButton } from '@ngneers/controls/button';
6
+ import { NgnDrag } from '@ngneers/controls/directives';
7
+ import { NgnInput } from '@ngneers/controls/input';
8
+ import { NgnInputField } from '@ngneers/controls/input-field';
9
+ import { NgnNumberInput } from '@ngneers/controls/number-input';
10
+ import { NgnPopover } from '@ngneers/controls/popover';
11
+ import { hsvaToRgba, formatColor, parseColor, rgbaToHsva, NgnError } from '@ngneers/controls/utils';
12
+ import { colorPickerControlTemplate } from '@ngneers/controls-themes/templates/color-picker';
13
+
14
+ const DEFAULT_HSVA = { h: 0, s: 0, v: 0, a: 1 };
15
+ /**
16
+ * @category control
17
+ */
18
+ class NgnColorPicker extends ValueControlBase {
19
+ theme = this.injectThemeTemplate(colorPickerControlTemplate, {
20
+ root: true,
21
+ invalid: () => this.invalidState(),
22
+ disabled: () => this.disabled(),
23
+ inline: () => this.inline(),
24
+ });
25
+ _svArea = viewChild('svArea', /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "_svArea" }] : /* istanbul ignore next */ []));
27
+ _hueTrack = viewChild('hueTrack', /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "_hueTrack" }] : /* istanbul ignore next */ []));
29
+ _alphaTrack = viewChild('alphaTrack', /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "_alphaTrack" }] : /* istanbul ignore next */ []));
31
+ // Only rendered (non-`inline()`) behind the trigger — absent while inline.
32
+ _popover = viewChild(NgnPopover, /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "_popover" }] : /* istanbul ignore next */ []));
34
+ /** Output/display format. @default hex */
35
+ format = input('hex', /* @ts-ignore */
36
+ ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
37
+ /** Show the alpha channel. @default true */
38
+ alpha = input(true, { ...(ngDevMode ? { debugName: "alpha" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
39
+ /** Preset swatch colors. */
40
+ swatches = input(/* @ts-ignore */
41
+ ...(ngDevMode ? [undefined, { debugName: "swatches" }] : /* istanbul ignore next */ []));
42
+ /** Render the panel inline instead of behind a trigger. @default false */
43
+ inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
44
+ /**
45
+ * Headless mode: render no trigger of its own and open in a popover anchored to
46
+ * {@link anchor}, driven imperatively via {@link show}/{@link hide}/{@link toggle}
47
+ * (like `ngn-menu`). Requires {@link anchor}. @default false
48
+ */
49
+ popover = input(false, { ...(ngDevMode ? { debugName: "popover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
50
+ /** The external element the headless popover anchors to. Required when {@link popover} is set. */
51
+ anchor = input(/* @ts-ignore */
52
+ ...(ngDevMode ? [undefined, { debugName: "anchor" }] : /* istanbul ignore next */ []));
53
+ /** Open state of the popover (headless or built-in trigger); two-way bindable. @default false */
54
+ open = model(false, /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
56
+ /** Emits when the popover has fully closed (part of the `Openable` contract). */
57
+ closed = output();
58
+ /** Internal HSVA source of truth. */
59
+ hsva = signal(DEFAULT_HSVA, /* @ts-ignore */
60
+ ...(ngDevMode ? [{ debugName: "hsva" }] : /* istanbul ignore next */ []));
61
+ /** The format the text field/toggle currently displays; seeded from {@link format}. */
62
+ activeFormat = signal('hex', /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "activeFormat" }] : /* istanbul ignore next */ []));
64
+ /** Current color as a CSS string for previews. */
65
+ cssColor = computed(() => {
66
+ const rgba = hsvaToRgba(this.hsva());
67
+ return formatColor(rgba, 'rgb', true);
68
+ }, /* @ts-ignore */
69
+ ...(ngDevMode ? [{ debugName: "cssColor" }] : /* istanbul ignore next */ []));
70
+ /** The last value string this component itself wrote via {@link commit}. */
71
+ _lastCommitted = null;
72
+ /**
73
+ * The raw text the user is currently typing in the hex/value field, or `null`
74
+ * when not editing. While editing, the field shows this verbatim (so a short
75
+ * form like `#ff0` isn't reformatted mid-typing) even though the color updates
76
+ * live from it.
77
+ */
78
+ editText = signal(null, /* @ts-ignore */
79
+ ...(ngDevMode ? [{ debugName: "editText" }] : /* istanbul ignore next */ []));
80
+ constructor() {
81
+ super();
82
+ // Sync incoming value → hsva, but only for externally-set values. `commit()` quantizes to
83
+ // integer RGB, so re-deriving HSVA from our OWN writes at s=0/v=0 (achromatic) would recover
84
+ // h=0 and stomp the hue the user just dragged away from — skip re-parsing anything we set.
85
+ effect(() => {
86
+ const v = this.value();
87
+ if (v == null || v === this._lastCommitted) {
88
+ return;
89
+ }
90
+ const rgba = parseColor(v);
91
+ if (rgba) {
92
+ this.hsva.set(rgbaToHsva(rgba));
93
+ }
94
+ });
95
+ effect(() => this.activeFormat.set(this.format()));
96
+ // Headless popover requires an anchor (mirrors ngn-menu).
97
+ effect(() => {
98
+ if (this.popover() && !this.anchor()) {
99
+ throw new NgnError('NgnColorPicker', 'popover mode requires the anchor input to be set.');
100
+ }
101
+ });
102
+ // Two-way bridge between the `open` model and the actual popover state.
103
+ effect(() => {
104
+ const shouldOpen = this.open();
105
+ const pop = this._popover();
106
+ if (!pop)
107
+ return;
108
+ if (shouldOpen && !pop.open())
109
+ pop.show();
110
+ else if (!shouldOpen && pop.open())
111
+ pop.hide();
112
+ });
113
+ }
114
+ /** Open the popover (headless or built-in trigger). */
115
+ show() {
116
+ this._popover()?.show();
117
+ }
118
+ /** Close the popover. */
119
+ hide() {
120
+ this._popover()?.hide();
121
+ }
122
+ /** Toggle the popover. */
123
+ toggle() {
124
+ this._popover()?.toggle();
125
+ }
126
+ /** Commit the current HSVA to the model value, formatted in the currently active format. */
127
+ commit() {
128
+ const rgba = hsvaToRgba(this.hsva());
129
+ const formatted = formatColor(rgba, this.activeFormat(), this.alpha() && rgba.a < 1);
130
+ this._lastCommitted = formatted;
131
+ this.value.set(formatted);
132
+ }
133
+ /**
134
+ * Set the color from an RGBA and commit, preserving the current hue when the new color is
135
+ * achromatic (s=0 or v=0). Otherwise the RGB→HSV round-trip collapses hue to 0, so it would be
136
+ * lost the moment a channel/swatch edit lands on a grey/black — mirrors the SV-drag path, which
137
+ * keeps hue in the `hsva` signal. `alpha` defaults to the incoming rgba's alpha.
138
+ */
139
+ setFromRgba(rgba, alpha = rgba.a) {
140
+ const prev = this.hsva();
141
+ const next = rgbaToHsva(rgba);
142
+ const h = next.s === 0 || next.v === 0 ? prev.h : next.h;
143
+ this.hsva.set({ ...next, h, a: alpha });
144
+ this.commit();
145
+ }
146
+ onSvDrag(info) {
147
+ if (this.readonly() || this.disabled())
148
+ return;
149
+ const el = this._svArea()?.nativeElement;
150
+ if (!el)
151
+ return;
152
+ const rect = el.getBoundingClientRect();
153
+ const s = clamp01((info.absoluteX - rect.left) / rect.width);
154
+ const v = clamp01(1 - (info.absoluteY - rect.top) / rect.height);
155
+ this.hsva.update(c => ({ ...c, s, v }));
156
+ this.commit();
157
+ }
158
+ onHueDrag(info) {
159
+ if (this.readonly() || this.disabled())
160
+ return;
161
+ const el = this._hueTrack()?.nativeElement;
162
+ if (!el)
163
+ return;
164
+ const rect = el.getBoundingClientRect();
165
+ const h = clamp01((info.absoluteX - rect.left) / rect.width) * 360;
166
+ this.hsva.update(c => ({ ...c, h }));
167
+ this.commit();
168
+ }
169
+ onAlphaDrag(info) {
170
+ if (this.readonly() || this.disabled())
171
+ return;
172
+ const el = this._alphaTrack()?.nativeElement;
173
+ if (!el)
174
+ return;
175
+ const rect = el.getBoundingClientRect();
176
+ const a = clamp01((info.absoluteX - rect.left) / rect.width);
177
+ this.hsva.update(c => ({ ...c, a }));
178
+ this.commit();
179
+ }
180
+ selectSwatch(color) {
181
+ if (this.readonly() || this.disabled())
182
+ return;
183
+ const rgba = parseColor(color);
184
+ if (rgba) {
185
+ this.setFromRgba(rgba);
186
+ }
187
+ }
188
+ toggleOpen() {
189
+ if (this.disabled() || this.readonly())
190
+ return;
191
+ this._popover()?.toggle();
192
+ }
193
+ /** Popover `closed` handler: run the blur check and re-emit for consumers. */
194
+ onPopoverClosed() {
195
+ this.potentiallyBlurred();
196
+ this.closed.emit();
197
+ }
198
+ // Popover content lives outside the normal DOM focus flow, so a plain host `blur` can't tell a
199
+ // real blur from focus moving into the panel — mirror `select`'s popover-aware check instead.
200
+ potentiallyBlurred() {
201
+ setTimeout(() => {
202
+ if (this.element.nativeElement.contains(document.activeElement) || this._popover()?.open()) {
203
+ return;
204
+ }
205
+ this.markTouched();
206
+ });
207
+ }
208
+ cycleFormat() {
209
+ const order = ['hex', 'rgb', 'hsl'];
210
+ const i = order.indexOf(this.activeFormat());
211
+ this.activeFormat.set(order[(i + 1) % order.length]);
212
+ // Re-emit in the new format so the value isn't silently locked to the old one — but only
213
+ // once a value has actually been established, so cycling on an empty picker stays inert.
214
+ if (this.value() != null) {
215
+ this.commit();
216
+ }
217
+ }
218
+ textValue = computed(() => formatColor(hsvaToRgba(this.hsva()), this.activeFormat(), this.alpha() && this.hsva().a < 1), /* @ts-ignore */
219
+ ...(ngDevMode ? [{ debugName: "textValue" }] : /* istanbul ignore next */ []));
220
+ /**
221
+ * What the hex/value field displays: the user's in-progress text while editing,
222
+ * otherwise the canonical formatted value.
223
+ */
224
+ displayText = computed(() => this.editText() ?? this.textValue(), /* @ts-ignore */
225
+ ...(ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []));
226
+ /**
227
+ * Per-keystroke handler: keep the field showing the raw text, but update the color
228
+ * live from it when it parses. The field is NOT reformatted while typing.
229
+ */
230
+ onHexInput(text) {
231
+ if (this.readonly() || this.disabled())
232
+ return;
233
+ this.editText.set(text ?? '');
234
+ const rgba = parseColor(text ?? '');
235
+ if (rgba) {
236
+ this.hsva.set(rgbaToHsva(rgba));
237
+ this.commit();
238
+ }
239
+ }
240
+ /** Commit handler (change / Enter / blur): apply the final text and normalize the field. */
241
+ onHexCommit(text) {
242
+ if (!this.readonly() && !this.disabled()) {
243
+ const rgba = parseColor(text ?? '');
244
+ if (rgba) {
245
+ this.hsva.set(rgbaToHsva(rgba));
246
+ this.commit();
247
+ }
248
+ }
249
+ // Leave editing → the field re-syncs to the canonical `textValue()`.
250
+ this.editText.set(null);
251
+ }
252
+ // --- Per-channel inputs (Chrome-style RGB/HSL boxes) ---
253
+ /** RGBA channel values for the RGB boxes. r/g/b are 0–255. */
254
+ rgbaChannels = computed(() => {
255
+ const c = hsvaToRgba(this.hsva());
256
+ return { r: Math.round(c.r), g: Math.round(c.g), b: Math.round(c.b) };
257
+ }, /* @ts-ignore */
258
+ ...(ngDevMode ? [{ debugName: "rgbaChannels" }] : /* istanbul ignore next */ []));
259
+ /** HSL channel values for the HSL boxes. h 0–360, s/l 0–100 (%). */
260
+ hslChannels = computed(() => {
261
+ const { h, s, v } = this.hsva();
262
+ const l = v * (1 - s / 2);
263
+ const sl = l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l);
264
+ return { h: Math.round(h), s: Math.round(sl * 100), l: Math.round(l * 100) };
265
+ }, /* @ts-ignore */
266
+ ...(ngDevMode ? [{ debugName: "hslChannels" }] : /* istanbul ignore next */ []));
267
+ /** Alpha as an integer percentage (0–100) for the alpha box. */
268
+ alphaPercent = computed(() => Math.round(this.hsva().a * 100), /* @ts-ignore */
269
+ ...(ngDevMode ? [{ debugName: "alphaPercent" }] : /* istanbul ignore next */ []));
270
+ setRgbChannel(ch, value) {
271
+ if (this.readonly() || this.disabled() || value == null)
272
+ return;
273
+ const c = hsvaToRgba(this.hsva());
274
+ const patched = { ...c, [ch]: Math.min(255, Math.max(0, value)) };
275
+ this.setFromRgba(patched, c.a);
276
+ }
277
+ setHslChannel(ch, value) {
278
+ if (this.readonly() || this.disabled() || value == null)
279
+ return;
280
+ if (ch === 'h') {
281
+ this.hsva.update(c => ({ ...c, h: Math.min(360, Math.max(0, value)) }));
282
+ this.commit();
283
+ return;
284
+ }
285
+ const cur = this.hslChannels();
286
+ const s = ch === 's' ? Math.min(100, Math.max(0, value)) : cur.s;
287
+ const l = ch === 'l' ? Math.min(100, Math.max(0, value)) : cur.l;
288
+ const rgba = parseColor(`hsl(${this.hsva().h}, ${s}%, ${l}%)`);
289
+ if (rgba) {
290
+ this.setFromRgba(rgba, this.hsva().a);
291
+ }
292
+ }
293
+ setAlphaPercent(value) {
294
+ if (this.readonly() || this.disabled() || value == null)
295
+ return;
296
+ this.hsva.update(c => ({ ...c, a: Math.min(100, Math.max(0, value)) / 100 }));
297
+ this.commit();
298
+ }
299
+ // Thumb positions (0..100%) for the template.
300
+ svThumbLeft = computed(() => this.hsva().s * 100, /* @ts-ignore */
301
+ ...(ngDevMode ? [{ debugName: "svThumbLeft" }] : /* istanbul ignore next */ []));
302
+ svThumbTop = computed(() => (1 - this.hsva().v) * 100, /* @ts-ignore */
303
+ ...(ngDevMode ? [{ debugName: "svThumbTop" }] : /* istanbul ignore next */ []));
304
+ hueThumbLeft = computed(() => (this.hsva().h / 360) * 100, /* @ts-ignore */
305
+ ...(ngDevMode ? [{ debugName: "hueThumbLeft" }] : /* istanbul ignore next */ []));
306
+ alphaThumbLeft = computed(() => this.hsva().a * 100, /* @ts-ignore */
307
+ ...(ngDevMode ? [{ debugName: "alphaThumbLeft" }] : /* istanbul ignore next */ []));
308
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnColorPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
309
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: NgnColorPicker, isStandalone: true, selector: "ngn-color-picker", inputs: { format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, alpha: { classPropertyName: "alpha", publicName: "alpha", isSignal: true, isRequired: false, transformFunction: null }, swatches: { classPropertyName: "swatches", publicName: "swatches", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, popover: { classPropertyName: "popover", publicName: "popover", isSignal: true, isRequired: false, transformFunction: null }, anchor: { classPropertyName: "anchor", publicName: "anchor", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, host: { listeners: { "focusout": "potentiallyBlurred()" }, properties: { "style.--hue": "hsva().h" } }, providers: [provideSelf(NgnColorPicker)], viewQueries: [{ propertyName: "_svArea", first: true, predicate: ["svArea"], descendants: true, isSignal: true }, { propertyName: "_hueTrack", first: true, predicate: ["hueTrack"], descendants: true, isSignal: true }, { propertyName: "_alphaTrack", first: true, predicate: ["alphaTrack"], descendants: true, isSignal: true }, { propertyName: "_popover", first: true, predicate: NgnPopover, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"panel\" />\n} @else if (popover() && anchor(); as anchorEl) {\n <!-- Headless: no trigger of our own; opened via show()/toggle() from an external anchor. -->\n <ngn-popover\n #popover\n [ptInt]=\"this\"\n [ptDep]=\"'popover'\"\n [anchor]=\"anchorEl\"\n (openChange)=\"open.set($event)\"\n (closed)=\"onPopoverClosed()\"\n >\n <ng-template #lazy>\n <ng-container [ngTemplateOutlet]=\"panel\" />\n </ng-template>\n </ngn-popover>\n} @else {\n <button\n #triggerBtn\n type=\"button\"\n [ptInt]=\"this\"\n [ptClass]=\"'trigger'\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"popover.open()\"\n [attr.aria-label]=\"label() || 'Select color'\"\n (click)=\"toggleOpen()\"\n >\n <span [ptInt]=\"this\" [ptClass]=\"'preview'\" [style.background]=\"cssColor()\"></span>\n </button>\n <ngn-popover\n #popover\n [ptInt]=\"this\"\n [ptDep]=\"'popover'\"\n [anchor]=\"triggerBtn\"\n (openChange)=\"open.set($event)\"\n (closed)=\"onPopoverClosed()\"\n >\n <ng-template #lazy>\n <ng-container [ngTemplateOutlet]=\"panel\" />\n </ng-template>\n </ngn-popover>\n}\n\n<ng-template #panel>\n <div [ptInt]=\"this\" [ptClass]=\"'panel'\">\n <div\n #svArea\n [ptInt]=\"this\"\n [ptClass]=\"'sv-area'\"\n ngnDrag\n (dragged)=\"onSvDrag($event)\"\n (click)=\"\n onSvDrag({ absoluteX: $event.clientX, absoluteY: $event.clientY, deltaX: 0, deltaY: 0 })\n \"\n >\n <span\n [ptInt]=\"this\"\n [ptClass]=\"'sv-thumb'\"\n [style.left.%]=\"svThumbLeft()\"\n [style.top.%]=\"svThumbTop()\"\n ></span>\n </div>\n\n <div\n #hueTrack\n [ptInt]=\"this\"\n [ptClass]=\"'hue-track'\"\n ngnDrag\n (dragged)=\"onHueDrag($event)\"\n (click)=\"\n onHueDrag({ absoluteX: $event.clientX, absoluteY: $event.clientY, deltaX: 0, deltaY: 0 })\n \"\n >\n <span [ptInt]=\"this\" [ptClass]=\"'hue-thumb'\" [style.left.%]=\"hueThumbLeft()\"></span>\n </div>\n\n @if (alpha()) {\n <div\n #alphaTrack\n [ptInt]=\"this\"\n [ptClass]=\"'alpha-track'\"\n [style.background]=\"'linear-gradient(to right, transparent, ' + cssColor() + ')'\"\n ngnDrag\n (dragged)=\"onAlphaDrag($event)\"\n (click)=\"\n onAlphaDrag({\n absoluteX: $event.clientX,\n absoluteY: $event.clientY,\n deltaX: 0,\n deltaY: 0,\n })\n \"\n >\n <span [ptInt]=\"this\" [ptClass]=\"'alpha-thumb'\" [style.left.%]=\"alphaThumbLeft()\"></span>\n </div>\n }\n\n <!-- Chrome-style per-format input boxes with channel labels; the button cycles the format. -->\n <div [ptInt]=\"this\" [ptClass]=\"'fields'\">\n <div [ptInt]=\"this\" [ptClass]=\"'channels'\">\n @switch (activeFormat()) {\n @case ('hex') {\n <div [ptInt]=\"this\" [ptClass]=\"{ channel: true, 'channel-hex': true }\">\n <!-- Color updates live per keystroke (onHexInput); the text is left as typed until\n commit (change/Enter/blur), when it normalizes to the canonical form. -->\n <ngn-input-field>\n <input\n ngnInput\n class=\"text-center\"\n [value]=\"displayText()\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'Hex color'\"\n (valueChange)=\"onHexInput($event)\"\n (change)=\"onHexCommit($any($event.target).value)\"\n (keydown.enter)=\"onHexCommit($any($event.target).value)\"\n (blur)=\"onHexCommit($any($event.target).value)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">Hex</span>\n </div>\n }\n @case ('rgb') {\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"255\"\n [value]=\"rgbaChannels().r\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Red\"\n (valueChange)=\"setRgbChannel('r', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">R</span>\n </div>\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"255\"\n [value]=\"rgbaChannels().g\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Green\"\n (valueChange)=\"setRgbChannel('g', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">G</span>\n </div>\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"255\"\n [value]=\"rgbaChannels().b\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Blue\"\n (valueChange)=\"setRgbChannel('b', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">B</span>\n </div>\n @if (alpha()) {\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"100\"\n [value]=\"alphaPercent()\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Alpha percent\"\n (valueChange)=\"setAlphaPercent($event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">A</span>\n </div>\n }\n }\n @case ('hsl') {\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"360\"\n [value]=\"hslChannels().h\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Hue\"\n (valueChange)=\"setHslChannel('h', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">H</span>\n </div>\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"100\"\n [value]=\"hslChannels().s\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Saturation percent\"\n (valueChange)=\"setHslChannel('s', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">S</span>\n </div>\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"100\"\n [value]=\"hslChannels().l\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Lightness percent\"\n (valueChange)=\"setHslChannel('l', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">L</span>\n </div>\n @if (alpha()) {\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"100\"\n [value]=\"alphaPercent()\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Alpha percent\"\n (valueChange)=\"setAlphaPercent($event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">A</span>\n </div>\n }\n }\n }\n </div>\n <button\n ngnButton\n kind=\"secondary\"\n type=\"button\"\n [ptInt]=\"this\"\n [ptClass]=\"'format-toggle'\"\n [disabled]=\"disabled()\"\n aria-label=\"Color format\"\n (click)=\"cycleFormat()\"\n >\n {{ activeFormat() }}\n </button>\n </div>\n\n @if (swatches(); as sw) {\n <div [ptInt]=\"this\" [ptClass]=\"'swatches'\">\n @for (color of sw; track color) {\n <button\n type=\"button\"\n [ptInt]=\"this\"\n [ptClass]=\"'swatch'\"\n [style.background]=\"color\"\n (click)=\"selectSwatch(color)\"\n ></button>\n }\n </div>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgnPt, selector: "[ptInt]", inputs: ["ptInt", "ptClass", "ptDep"] }, { kind: "directive", type: NgnDrag, selector: "[ngnDrag]" }, { kind: "component", type: NgnPopover, selector: "ngn-popover", inputs: ["open", "anchor", "options", "hasShrinkableContent", "closeBy"], outputs: ["closed", "closing", "openChange"] }, { kind: "directive", type: NgnInput, selector: "input[ngnInput], textarea[ngnInput]", inputs: ["invalid", "invalidOn", "touched", "value"], outputs: ["touchedChange", "valueChange", "touch"], exportAs: ["ngnInput"] }, { kind: "directive", type: NgnButton, selector: "button[ngnButton], a[ngnButton]", inputs: ["ngnButtonInline"], exportAs: ["ngnButton"] }, { kind: "component", type: NgnInputField, selector: "ngn-input-field", inputs: ["label", "labelledBy", "labelKind", "inputId", "showClearButton", "iconClearButton", "tabindex", "invalid", "readonly", "disabled"] }, { kind: "directive", type: NgnNumberInput, selector: "input[ngnNumberInput]", inputs: ["min", "max", "step", "bigStep", "locale", "formatOptions"], exportAs: ["ngnNumberInput"] }] });
310
+ }
311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnColorPicker, decorators: [{
312
+ type: Component,
313
+ args: [{ selector: 'ngn-color-picker', imports: [
314
+ NgTemplateOutlet,
315
+ NgnPt,
316
+ NgnDrag,
317
+ NgnPopover,
318
+ NgnInput,
319
+ NgnButton,
320
+ NgnInputField,
321
+ NgnNumberInput,
322
+ ], providers: [provideSelf(NgnColorPicker)], host: {
323
+ '[style.--hue]': 'hsva().h',
324
+ '(focusout)': 'potentiallyBlurred()',
325
+ }, template: "<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"panel\" />\n} @else if (popover() && anchor(); as anchorEl) {\n <!-- Headless: no trigger of our own; opened via show()/toggle() from an external anchor. -->\n <ngn-popover\n #popover\n [ptInt]=\"this\"\n [ptDep]=\"'popover'\"\n [anchor]=\"anchorEl\"\n (openChange)=\"open.set($event)\"\n (closed)=\"onPopoverClosed()\"\n >\n <ng-template #lazy>\n <ng-container [ngTemplateOutlet]=\"panel\" />\n </ng-template>\n </ngn-popover>\n} @else {\n <button\n #triggerBtn\n type=\"button\"\n [ptInt]=\"this\"\n [ptClass]=\"'trigger'\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"popover.open()\"\n [attr.aria-label]=\"label() || 'Select color'\"\n (click)=\"toggleOpen()\"\n >\n <span [ptInt]=\"this\" [ptClass]=\"'preview'\" [style.background]=\"cssColor()\"></span>\n </button>\n <ngn-popover\n #popover\n [ptInt]=\"this\"\n [ptDep]=\"'popover'\"\n [anchor]=\"triggerBtn\"\n (openChange)=\"open.set($event)\"\n (closed)=\"onPopoverClosed()\"\n >\n <ng-template #lazy>\n <ng-container [ngTemplateOutlet]=\"panel\" />\n </ng-template>\n </ngn-popover>\n}\n\n<ng-template #panel>\n <div [ptInt]=\"this\" [ptClass]=\"'panel'\">\n <div\n #svArea\n [ptInt]=\"this\"\n [ptClass]=\"'sv-area'\"\n ngnDrag\n (dragged)=\"onSvDrag($event)\"\n (click)=\"\n onSvDrag({ absoluteX: $event.clientX, absoluteY: $event.clientY, deltaX: 0, deltaY: 0 })\n \"\n >\n <span\n [ptInt]=\"this\"\n [ptClass]=\"'sv-thumb'\"\n [style.left.%]=\"svThumbLeft()\"\n [style.top.%]=\"svThumbTop()\"\n ></span>\n </div>\n\n <div\n #hueTrack\n [ptInt]=\"this\"\n [ptClass]=\"'hue-track'\"\n ngnDrag\n (dragged)=\"onHueDrag($event)\"\n (click)=\"\n onHueDrag({ absoluteX: $event.clientX, absoluteY: $event.clientY, deltaX: 0, deltaY: 0 })\n \"\n >\n <span [ptInt]=\"this\" [ptClass]=\"'hue-thumb'\" [style.left.%]=\"hueThumbLeft()\"></span>\n </div>\n\n @if (alpha()) {\n <div\n #alphaTrack\n [ptInt]=\"this\"\n [ptClass]=\"'alpha-track'\"\n [style.background]=\"'linear-gradient(to right, transparent, ' + cssColor() + ')'\"\n ngnDrag\n (dragged)=\"onAlphaDrag($event)\"\n (click)=\"\n onAlphaDrag({\n absoluteX: $event.clientX,\n absoluteY: $event.clientY,\n deltaX: 0,\n deltaY: 0,\n })\n \"\n >\n <span [ptInt]=\"this\" [ptClass]=\"'alpha-thumb'\" [style.left.%]=\"alphaThumbLeft()\"></span>\n </div>\n }\n\n <!-- Chrome-style per-format input boxes with channel labels; the button cycles the format. -->\n <div [ptInt]=\"this\" [ptClass]=\"'fields'\">\n <div [ptInt]=\"this\" [ptClass]=\"'channels'\">\n @switch (activeFormat()) {\n @case ('hex') {\n <div [ptInt]=\"this\" [ptClass]=\"{ channel: true, 'channel-hex': true }\">\n <!-- Color updates live per keystroke (onHexInput); the text is left as typed until\n commit (change/Enter/blur), when it normalizes to the canonical form. -->\n <ngn-input-field>\n <input\n ngnInput\n class=\"text-center\"\n [value]=\"displayText()\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'Hex color'\"\n (valueChange)=\"onHexInput($event)\"\n (change)=\"onHexCommit($any($event.target).value)\"\n (keydown.enter)=\"onHexCommit($any($event.target).value)\"\n (blur)=\"onHexCommit($any($event.target).value)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">Hex</span>\n </div>\n }\n @case ('rgb') {\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"255\"\n [value]=\"rgbaChannels().r\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Red\"\n (valueChange)=\"setRgbChannel('r', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">R</span>\n </div>\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"255\"\n [value]=\"rgbaChannels().g\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Green\"\n (valueChange)=\"setRgbChannel('g', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">G</span>\n </div>\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"255\"\n [value]=\"rgbaChannels().b\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Blue\"\n (valueChange)=\"setRgbChannel('b', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">B</span>\n </div>\n @if (alpha()) {\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"100\"\n [value]=\"alphaPercent()\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Alpha percent\"\n (valueChange)=\"setAlphaPercent($event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">A</span>\n </div>\n }\n }\n @case ('hsl') {\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"360\"\n [value]=\"hslChannels().h\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Hue\"\n (valueChange)=\"setHslChannel('h', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">H</span>\n </div>\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"100\"\n [value]=\"hslChannels().s\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Saturation percent\"\n (valueChange)=\"setHslChannel('s', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">S</span>\n </div>\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"100\"\n [value]=\"hslChannels().l\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Lightness percent\"\n (valueChange)=\"setHslChannel('l', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">L</span>\n </div>\n @if (alpha()) {\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"100\"\n [value]=\"alphaPercent()\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Alpha percent\"\n (valueChange)=\"setAlphaPercent($event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">A</span>\n </div>\n }\n }\n }\n </div>\n <button\n ngnButton\n kind=\"secondary\"\n type=\"button\"\n [ptInt]=\"this\"\n [ptClass]=\"'format-toggle'\"\n [disabled]=\"disabled()\"\n aria-label=\"Color format\"\n (click)=\"cycleFormat()\"\n >\n {{ activeFormat() }}\n </button>\n </div>\n\n @if (swatches(); as sw) {\n <div [ptInt]=\"this\" [ptClass]=\"'swatches'\">\n @for (color of sw; track color) {\n <button\n type=\"button\"\n [ptInt]=\"this\"\n [ptClass]=\"'swatch'\"\n [style.background]=\"color\"\n (click)=\"selectSwatch(color)\"\n ></button>\n }\n </div>\n }\n </div>\n</ng-template>\n" }]
326
+ }], ctorParameters: () => [], propDecorators: { _svArea: [{ type: i0.ViewChild, args: ['svArea', { isSignal: true }] }], _hueTrack: [{ type: i0.ViewChild, args: ['hueTrack', { isSignal: true }] }], _alphaTrack: [{ type: i0.ViewChild, args: ['alphaTrack', { isSignal: true }] }], _popover: [{ type: i0.ViewChild, args: [i0.forwardRef(() => NgnPopover), { isSignal: true }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], alpha: [{ type: i0.Input, args: [{ isSignal: true, alias: "alpha", required: false }] }], swatches: [{ type: i0.Input, args: [{ isSignal: true, alias: "swatches", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], popover: [{ type: i0.Input, args: [{ isSignal: true, alias: "popover", required: false }] }], anchor: [{ type: i0.Input, args: [{ isSignal: true, alias: "anchor", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
327
+ function clamp01(n) {
328
+ return Math.min(1, Math.max(0, n));
329
+ }
330
+
331
+ /**
332
+ * Generated bundle index. Do not edit.
333
+ */
334
+
335
+ export { NgnColorPicker };
336
+ //# sourceMappingURL=ngneers-controls-color-picker.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngneers-controls-color-picker.mjs","sources":["../../src/color-picker/color-picker.ts","../../src/color-picker/color-picker.html","../../src/color-picker/ngneers-controls-color-picker.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport type { Anchor, Openable } from '@ngneers/controls/api/ng';\nimport { NgnPt, provideSelf, ValueControlBase } from '@ngneers/controls/base';\nimport { NgnButton } from '@ngneers/controls/button';\nimport { NgnDrag, type NgnDragInfo } from '@ngneers/controls/directives';\nimport { NgnInput } from '@ngneers/controls/input';\nimport { NgnInputField } from '@ngneers/controls/input-field';\nimport { NgnNumberInput } from '@ngneers/controls/number-input';\nimport { NgnPopover } from '@ngneers/controls/popover';\nimport {\n type ColorFormat,\n formatColor,\n hsvaToRgba,\n type HSVA,\n NgnError,\n parseColor,\n type RGBA,\n rgbaToHsva,\n} from '@ngneers/controls/utils';\nimport { colorPickerControlTemplate } from '@ngneers/controls-themes/templates/color-picker';\n\nconst DEFAULT_HSVA: HSVA = { h: 0, s: 0, v: 0, a: 1 };\n\n/**\n * @category control\n */\n@Component({\n selector: 'ngn-color-picker',\n templateUrl: './color-picker.html',\n imports: [\n NgTemplateOutlet,\n NgnPt,\n NgnDrag,\n NgnPopover,\n NgnInput,\n NgnButton,\n NgnInputField,\n NgnNumberInput,\n ],\n providers: [provideSelf(NgnColorPicker)],\n host: {\n '[style.--hue]': 'hsva().h',\n '(focusout)': 'potentiallyBlurred()',\n },\n})\nexport class NgnColorPicker extends ValueControlBase<'color-picker', string> implements Openable {\n protected readonly theme = this.injectThemeTemplate(colorPickerControlTemplate, {\n root: true,\n invalid: () => this.invalidState(),\n disabled: () => this.disabled(),\n inline: () => this.inline(),\n });\n\n private readonly _svArea = viewChild<ElementRef<HTMLElement>>('svArea');\n private readonly _hueTrack = viewChild<ElementRef<HTMLElement>>('hueTrack');\n private readonly _alphaTrack = viewChild<ElementRef<HTMLElement>>('alphaTrack');\n // Only rendered (non-`inline()`) behind the trigger — absent while inline.\n private readonly _popover = viewChild(NgnPopover);\n\n /** Output/display format. @default hex */\n public readonly format = input<ColorFormat>('hex');\n /** Show the alpha channel. @default true */\n public readonly alpha = input(true, { transform: booleanAttribute });\n /** Preset swatch colors. */\n public readonly swatches = input<string[]>();\n /** Render the panel inline instead of behind a trigger. @default false */\n public readonly inline = input(false, { transform: booleanAttribute });\n /**\n * Headless mode: render no trigger of its own and open in a popover anchored to\n * {@link anchor}, driven imperatively via {@link show}/{@link hide}/{@link toggle}\n * (like `ngn-menu`). Requires {@link anchor}. @default false\n */\n public readonly popover = input(false, { transform: booleanAttribute });\n /** The external element the headless popover anchors to. Required when {@link popover} is set. */\n public readonly anchor = input<Anchor>();\n /** Open state of the popover (headless or built-in trigger); two-way bindable. @default false */\n public readonly open = model(false);\n /** Emits when the popover has fully closed (part of the `Openable` contract). */\n public readonly closed = output<void>();\n\n /** Internal HSVA source of truth. */\n protected readonly hsva = signal<HSVA>(DEFAULT_HSVA);\n\n /** The format the text field/toggle currently displays; seeded from {@link format}. */\n protected readonly activeFormat = signal<ColorFormat>('hex');\n\n /** Current color as a CSS string for previews. */\n protected readonly cssColor = computed(() => {\n const rgba = hsvaToRgba(this.hsva());\n return formatColor(rgba, 'rgb', true);\n });\n\n /** The last value string this component itself wrote via {@link commit}. */\n private _lastCommitted: string | null = null;\n\n /**\n * The raw text the user is currently typing in the hex/value field, or `null`\n * when not editing. While editing, the field shows this verbatim (so a short\n * form like `#ff0` isn't reformatted mid-typing) even though the color updates\n * live from it.\n */\n protected readonly editText = signal<string | null>(null);\n\n constructor() {\n super();\n // Sync incoming value → hsva, but only for externally-set values. `commit()` quantizes to\n // integer RGB, so re-deriving HSVA from our OWN writes at s=0/v=0 (achromatic) would recover\n // h=0 and stomp the hue the user just dragged away from — skip re-parsing anything we set.\n effect(() => {\n const v = this.value();\n if (v == null || v === this._lastCommitted) {\n return;\n }\n const rgba = parseColor(v);\n if (rgba) {\n this.hsva.set(rgbaToHsva(rgba));\n }\n });\n effect(() => this.activeFormat.set(this.format()));\n\n // Headless popover requires an anchor (mirrors ngn-menu).\n effect(() => {\n if (this.popover() && !this.anchor()) {\n throw new NgnError('NgnColorPicker', 'popover mode requires the anchor input to be set.');\n }\n });\n // Two-way bridge between the `open` model and the actual popover state.\n effect(() => {\n const shouldOpen = this.open();\n const pop = this._popover();\n if (!pop) return;\n if (shouldOpen && !pop.open()) pop.show();\n else if (!shouldOpen && pop.open()) pop.hide();\n });\n }\n\n /** Open the popover (headless or built-in trigger). */\n public show(): void {\n this._popover()?.show();\n }\n /** Close the popover. */\n public hide(): void {\n this._popover()?.hide();\n }\n /** Toggle the popover. */\n public toggle(): void {\n this._popover()?.toggle();\n }\n\n /** Commit the current HSVA to the model value, formatted in the currently active format. */\n private commit(): void {\n const rgba = hsvaToRgba(this.hsva());\n const formatted = formatColor(rgba, this.activeFormat(), this.alpha() && rgba.a < 1);\n this._lastCommitted = formatted;\n this.value.set(formatted);\n }\n\n /**\n * Set the color from an RGBA and commit, preserving the current hue when the new color is\n * achromatic (s=0 or v=0). Otherwise the RGB→HSV round-trip collapses hue to 0, so it would be\n * lost the moment a channel/swatch edit lands on a grey/black — mirrors the SV-drag path, which\n * keeps hue in the `hsva` signal. `alpha` defaults to the incoming rgba's alpha.\n */\n private setFromRgba(rgba: RGBA, alpha = rgba.a): void {\n const prev = this.hsva();\n const next = rgbaToHsva(rgba);\n const h = next.s === 0 || next.v === 0 ? prev.h : next.h;\n this.hsva.set({ ...next, h, a: alpha });\n this.commit();\n }\n\n protected onSvDrag(info: NgnDragInfo): void {\n if (this.readonly() || this.disabled()) return;\n const el = this._svArea()?.nativeElement;\n if (!el) return;\n const rect = el.getBoundingClientRect();\n const s = clamp01((info.absoluteX - rect.left) / rect.width);\n const v = clamp01(1 - (info.absoluteY - rect.top) / rect.height);\n this.hsva.update(c => ({ ...c, s, v }));\n this.commit();\n }\n\n protected onHueDrag(info: NgnDragInfo): void {\n if (this.readonly() || this.disabled()) return;\n const el = this._hueTrack()?.nativeElement;\n if (!el) return;\n const rect = el.getBoundingClientRect();\n const h = clamp01((info.absoluteX - rect.left) / rect.width) * 360;\n this.hsva.update(c => ({ ...c, h }));\n this.commit();\n }\n\n protected onAlphaDrag(info: NgnDragInfo): void {\n if (this.readonly() || this.disabled()) return;\n const el = this._alphaTrack()?.nativeElement;\n if (!el) return;\n const rect = el.getBoundingClientRect();\n const a = clamp01((info.absoluteX - rect.left) / rect.width);\n this.hsva.update(c => ({ ...c, a }));\n this.commit();\n }\n\n protected selectSwatch(color: string): void {\n if (this.readonly() || this.disabled()) return;\n const rgba = parseColor(color);\n if (rgba) {\n this.setFromRgba(rgba);\n }\n }\n\n protected toggleOpen(): void {\n if (this.disabled() || this.readonly()) return;\n this._popover()?.toggle();\n }\n\n /** Popover `closed` handler: run the blur check and re-emit for consumers. */\n protected onPopoverClosed(): void {\n this.potentiallyBlurred();\n this.closed.emit();\n }\n\n // Popover content lives outside the normal DOM focus flow, so a plain host `blur` can't tell a\n // real blur from focus moving into the panel — mirror `select`'s popover-aware check instead.\n protected potentiallyBlurred(): void {\n setTimeout(() => {\n if (this.element.nativeElement.contains(document.activeElement) || this._popover()?.open()) {\n return;\n }\n this.markTouched();\n });\n }\n\n protected cycleFormat(): void {\n const order: ColorFormat[] = ['hex', 'rgb', 'hsl'];\n const i = order.indexOf(this.activeFormat());\n this.activeFormat.set(order[(i + 1) % order.length]!);\n // Re-emit in the new format so the value isn't silently locked to the old one — but only\n // once a value has actually been established, so cycling on an empty picker stays inert.\n if (this.value() != null) {\n this.commit();\n }\n }\n\n protected readonly textValue = computed(() =>\n formatColor(hsvaToRgba(this.hsva()), this.activeFormat(), this.alpha() && this.hsva().a < 1)\n );\n\n /**\n * What the hex/value field displays: the user's in-progress text while editing,\n * otherwise the canonical formatted value.\n */\n protected readonly displayText = computed(() => this.editText() ?? this.textValue());\n\n /**\n * Per-keystroke handler: keep the field showing the raw text, but update the color\n * live from it when it parses. The field is NOT reformatted while typing.\n */\n protected onHexInput(text: string | null): void {\n if (this.readonly() || this.disabled()) return;\n this.editText.set(text ?? '');\n const rgba = parseColor(text ?? '');\n if (rgba) {\n this.hsva.set(rgbaToHsva(rgba));\n this.commit();\n }\n }\n\n /** Commit handler (change / Enter / blur): apply the final text and normalize the field. */\n protected onHexCommit(text: string | null): void {\n if (!this.readonly() && !this.disabled()) {\n const rgba = parseColor(text ?? '');\n if (rgba) {\n this.hsva.set(rgbaToHsva(rgba));\n this.commit();\n }\n }\n // Leave editing → the field re-syncs to the canonical `textValue()`.\n this.editText.set(null);\n }\n\n // --- Per-channel inputs (Chrome-style RGB/HSL boxes) ---\n\n /** RGBA channel values for the RGB boxes. r/g/b are 0–255. */\n protected readonly rgbaChannels = computed(() => {\n const c = hsvaToRgba(this.hsva());\n return { r: Math.round(c.r), g: Math.round(c.g), b: Math.round(c.b) };\n });\n\n /** HSL channel values for the HSL boxes. h 0–360, s/l 0–100 (%). */\n protected readonly hslChannels = computed(() => {\n const { h, s, v } = this.hsva();\n const l = v * (1 - s / 2);\n const sl = l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l);\n return { h: Math.round(h), s: Math.round(sl * 100), l: Math.round(l * 100) };\n });\n\n /** Alpha as an integer percentage (0–100) for the alpha box. */\n protected readonly alphaPercent = computed(() => Math.round(this.hsva().a * 100));\n\n protected setRgbChannel(ch: 'r' | 'g' | 'b', value: number | null): void {\n if (this.readonly() || this.disabled() || value == null) return;\n const c = hsvaToRgba(this.hsva());\n const patched = { ...c, [ch]: Math.min(255, Math.max(0, value)) };\n this.setFromRgba(patched, c.a);\n }\n\n protected setHslChannel(ch: 'h' | 's' | 'l', value: number | null): void {\n if (this.readonly() || this.disabled() || value == null) return;\n if (ch === 'h') {\n this.hsva.update(c => ({ ...c, h: Math.min(360, Math.max(0, value)) }));\n this.commit();\n return;\n }\n const cur = this.hslChannels();\n const s = ch === 's' ? Math.min(100, Math.max(0, value)) : cur.s;\n const l = ch === 'l' ? Math.min(100, Math.max(0, value)) : cur.l;\n const rgba = parseColor(`hsl(${this.hsva().h}, ${s}%, ${l}%)`);\n if (rgba) {\n this.setFromRgba(rgba, this.hsva().a);\n }\n }\n\n protected setAlphaPercent(value: number | null): void {\n if (this.readonly() || this.disabled() || value == null) return;\n this.hsva.update(c => ({ ...c, a: Math.min(100, Math.max(0, value)) / 100 }));\n this.commit();\n }\n\n // Thumb positions (0..100%) for the template.\n protected readonly svThumbLeft = computed(() => this.hsva().s * 100);\n protected readonly svThumbTop = computed(() => (1 - this.hsva().v) * 100);\n protected readonly hueThumbLeft = computed(() => (this.hsva().h / 360) * 100);\n protected readonly alphaThumbLeft = computed(() => this.hsva().a * 100);\n}\n\nfunction clamp01(n: number): number {\n return Math.min(1, Math.max(0, n));\n}\n","<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"panel\" />\n} @else if (popover() && anchor(); as anchorEl) {\n <!-- Headless: no trigger of our own; opened via show()/toggle() from an external anchor. -->\n <ngn-popover\n #popover\n [ptInt]=\"this\"\n [ptDep]=\"'popover'\"\n [anchor]=\"anchorEl\"\n (openChange)=\"open.set($event)\"\n (closed)=\"onPopoverClosed()\"\n >\n <ng-template #lazy>\n <ng-container [ngTemplateOutlet]=\"panel\" />\n </ng-template>\n </ngn-popover>\n} @else {\n <button\n #triggerBtn\n type=\"button\"\n [ptInt]=\"this\"\n [ptClass]=\"'trigger'\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"popover.open()\"\n [attr.aria-label]=\"label() || 'Select color'\"\n (click)=\"toggleOpen()\"\n >\n <span [ptInt]=\"this\" [ptClass]=\"'preview'\" [style.background]=\"cssColor()\"></span>\n </button>\n <ngn-popover\n #popover\n [ptInt]=\"this\"\n [ptDep]=\"'popover'\"\n [anchor]=\"triggerBtn\"\n (openChange)=\"open.set($event)\"\n (closed)=\"onPopoverClosed()\"\n >\n <ng-template #lazy>\n <ng-container [ngTemplateOutlet]=\"panel\" />\n </ng-template>\n </ngn-popover>\n}\n\n<ng-template #panel>\n <div [ptInt]=\"this\" [ptClass]=\"'panel'\">\n <div\n #svArea\n [ptInt]=\"this\"\n [ptClass]=\"'sv-area'\"\n ngnDrag\n (dragged)=\"onSvDrag($event)\"\n (click)=\"\n onSvDrag({ absoluteX: $event.clientX, absoluteY: $event.clientY, deltaX: 0, deltaY: 0 })\n \"\n >\n <span\n [ptInt]=\"this\"\n [ptClass]=\"'sv-thumb'\"\n [style.left.%]=\"svThumbLeft()\"\n [style.top.%]=\"svThumbTop()\"\n ></span>\n </div>\n\n <div\n #hueTrack\n [ptInt]=\"this\"\n [ptClass]=\"'hue-track'\"\n ngnDrag\n (dragged)=\"onHueDrag($event)\"\n (click)=\"\n onHueDrag({ absoluteX: $event.clientX, absoluteY: $event.clientY, deltaX: 0, deltaY: 0 })\n \"\n >\n <span [ptInt]=\"this\" [ptClass]=\"'hue-thumb'\" [style.left.%]=\"hueThumbLeft()\"></span>\n </div>\n\n @if (alpha()) {\n <div\n #alphaTrack\n [ptInt]=\"this\"\n [ptClass]=\"'alpha-track'\"\n [style.background]=\"'linear-gradient(to right, transparent, ' + cssColor() + ')'\"\n ngnDrag\n (dragged)=\"onAlphaDrag($event)\"\n (click)=\"\n onAlphaDrag({\n absoluteX: $event.clientX,\n absoluteY: $event.clientY,\n deltaX: 0,\n deltaY: 0,\n })\n \"\n >\n <span [ptInt]=\"this\" [ptClass]=\"'alpha-thumb'\" [style.left.%]=\"alphaThumbLeft()\"></span>\n </div>\n }\n\n <!-- Chrome-style per-format input boxes with channel labels; the button cycles the format. -->\n <div [ptInt]=\"this\" [ptClass]=\"'fields'\">\n <div [ptInt]=\"this\" [ptClass]=\"'channels'\">\n @switch (activeFormat()) {\n @case ('hex') {\n <div [ptInt]=\"this\" [ptClass]=\"{ channel: true, 'channel-hex': true }\">\n <!-- Color updates live per keystroke (onHexInput); the text is left as typed until\n commit (change/Enter/blur), when it normalizes to the canonical form. -->\n <ngn-input-field>\n <input\n ngnInput\n class=\"text-center\"\n [value]=\"displayText()\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'Hex color'\"\n (valueChange)=\"onHexInput($event)\"\n (change)=\"onHexCommit($any($event.target).value)\"\n (keydown.enter)=\"onHexCommit($any($event.target).value)\"\n (blur)=\"onHexCommit($any($event.target).value)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">Hex</span>\n </div>\n }\n @case ('rgb') {\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"255\"\n [value]=\"rgbaChannels().r\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Red\"\n (valueChange)=\"setRgbChannel('r', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">R</span>\n </div>\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"255\"\n [value]=\"rgbaChannels().g\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Green\"\n (valueChange)=\"setRgbChannel('g', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">G</span>\n </div>\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"255\"\n [value]=\"rgbaChannels().b\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Blue\"\n (valueChange)=\"setRgbChannel('b', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">B</span>\n </div>\n @if (alpha()) {\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"100\"\n [value]=\"alphaPercent()\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Alpha percent\"\n (valueChange)=\"setAlphaPercent($event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">A</span>\n </div>\n }\n }\n @case ('hsl') {\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"360\"\n [value]=\"hslChannels().h\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Hue\"\n (valueChange)=\"setHslChannel('h', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">H</span>\n </div>\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"100\"\n [value]=\"hslChannels().s\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Saturation percent\"\n (valueChange)=\"setHslChannel('s', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">S</span>\n </div>\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"100\"\n [value]=\"hslChannels().l\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Lightness percent\"\n (valueChange)=\"setHslChannel('l', $event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">L</span>\n </div>\n @if (alpha()) {\n <div [ptInt]=\"this\" [ptClass]=\"'channel'\">\n <ngn-input-field>\n <input\n ngnNumberInput\n class=\"text-center\"\n [min]=\"0\"\n [max]=\"100\"\n [value]=\"alphaPercent()\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n aria-label=\"Alpha percent\"\n (valueChange)=\"setAlphaPercent($event)\"\n />\n </ngn-input-field>\n <span [ptInt]=\"this\" [ptClass]=\"'channel-label'\">A</span>\n </div>\n }\n }\n }\n </div>\n <button\n ngnButton\n kind=\"secondary\"\n type=\"button\"\n [ptInt]=\"this\"\n [ptClass]=\"'format-toggle'\"\n [disabled]=\"disabled()\"\n aria-label=\"Color format\"\n (click)=\"cycleFormat()\"\n >\n {{ activeFormat() }}\n </button>\n </div>\n\n @if (swatches(); as sw) {\n <div [ptInt]=\"this\" [ptClass]=\"'swatches'\">\n @for (color of sw; track color) {\n <button\n type=\"button\"\n [ptInt]=\"this\"\n [ptClass]=\"'swatch'\"\n [style.background]=\"color\"\n (click)=\"selectSwatch(color)\"\n ></button>\n }\n </div>\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAiCA,MAAM,YAAY,GAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAErD;;AAEG;AAoBG,MAAO,cAAe,SAAQ,gBAAwC,CAAA;AACvD,IAAA,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,0BAA0B,EAAE;AAC9E,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE;AAClC,QAAA,QAAQ,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE;AAC/B,QAAA,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE;AAC5B,KAAA,CAAC;IAEe,OAAO,GAAG,SAAS,C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,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;AAsRlD,SAAS,OAAO,CAAC,CAAS,EAAA;AACxB,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC;;AE7VA;;AAEG;;;;"}
@@ -17,6 +17,8 @@ import tablerRefresh from '@iconify/icons-tabler/refresh';
17
17
  import tablerSearch from '@iconify/icons-tabler/search';
18
18
  import tablerSortAscending from '@iconify/icons-tabler/sort-ascending';
19
19
  import tablerSortDescending from '@iconify/icons-tabler/sort-descending';
20
+ import tablerStar from '@iconify/icons-tabler/star';
21
+ import tablerStarFilled from '@iconify/icons-tabler/star-filled';
20
22
  import tablerUpload from '@iconify/icons-tabler/upload';
21
23
  import tablerX from '@iconify/icons-tabler/x';
22
24
  import { NGN_ICON_REGISTRY, NGN_CUSTOM_ICONS } from '@ngneers/controls/icon';
@@ -47,12 +49,15 @@ const NGN_DEFAULT_ICON_REGISTRY = {
47
49
  'menu-submenu': { icon: tablerChevronRight, scale: 1.71 },
48
50
  'paginator-previous': { icon: tablerChevronLeft, scale: 1.71 },
49
51
  'paginator-next': { icon: tablerChevronRight, scale: 1.71 },
52
+ 'rating-full': { icon: tablerStarFilled, scale: 1.14 },
53
+ 'rating-empty': { icon: tablerStar, scale: 1.14 },
50
54
  search: { icon: tablerSearch, scale: 1.2 },
51
55
  'sort-neutral': { icon: tablerArrowsSort, scale: 1.2 },
52
56
  'sort-ascending': { icon: tablerSortAscending, scale: 1.26 },
53
57
  'sort-descending': { icon: tablerSortDescending, scale: 1.26 },
54
58
  'spin-decrement': { icon: tablerChevronDown, scale: 1.71 },
55
59
  'spin-increment': { icon: tablerChevronUp, scale: 1.71 },
60
+ 'stepper-completed': { icon: tablerCheck, scale: 1.41 },
56
61
  'table-group-toggle': { icon: tablerChevronRight, scale: 1.71 },
57
62
  'tabs-scroll-left': { icon: tablerChevronLeft, scale: 1.71 },
58
63
  'tabs-scroll-right': { icon: tablerChevronRight, scale: 1.71 },
@@ -1 +1 @@
1
- {"version":3,"file":"ngneers-controls-default-icons.mjs","sources":["../../src/default-icons/provider.ts","../../src/default-icons/ngneers-controls-default-icons.ts"],"sourcesContent":["import tablerAlertCircle from '@iconify/icons-tabler/alert-circle';\nimport tablerAlertTriangle from '@iconify/icons-tabler/alert-triangle';\nimport tablerArrowsSort from '@iconify/icons-tabler/arrows-sort';\nimport tablerCalendar from '@iconify/icons-tabler/calendar';\nimport tablerCheck from '@iconify/icons-tabler/check';\nimport tablerChevronDown from '@iconify/icons-tabler/chevron-down';\nimport tablerChevronLeft from '@iconify/icons-tabler/chevron-left';\nimport tablerChevronRight from '@iconify/icons-tabler/chevron-right';\nimport tablerChevronUp from '@iconify/icons-tabler/chevron-up';\nimport tablerCircleCheck from '@iconify/icons-tabler/circle-check';\nimport tablerDots from '@iconify/icons-tabler/dots';\nimport tablerFilter from '@iconify/icons-tabler/filter';\nimport tablerFilterFilled from '@iconify/icons-tabler/filter-filled';\nimport tablerInfoCircle from '@iconify/icons-tabler/info-circle';\nimport tablerMinus from '@iconify/icons-tabler/minus';\nimport tablerRefresh from '@iconify/icons-tabler/refresh';\nimport tablerSearch from '@iconify/icons-tabler/search';\nimport tablerSortAscending from '@iconify/icons-tabler/sort-ascending';\nimport tablerSortDescending from '@iconify/icons-tabler/sort-descending';\nimport tablerUpload from '@iconify/icons-tabler/upload';\nimport tablerX from '@iconify/icons-tabler/x';\n\nimport { NGN_CUSTOM_ICONS, NGN_ICON_REGISTRY, type NgnIconRegistry } from '@ngneers/controls/icon';\n\nimport type { NgnFeature } from '@ngneers/controls/api/ng';\n\nconst NGN_DEFAULT_ICON_REGISTRY: NgnIconRegistry = {\n 'accordion-collapse': { icon: tablerChevronUp, scale: 1.71 },\n 'accordion-expand': { icon: tablerChevronDown, scale: 1.71 },\n 'breadcrumb-separator': { icon: tablerChevronRight, scale: 1.71 },\n 'breadcrumb-overflow': { icon: tablerDots, scale: 1.33 },\n 'calendar-trigger': { icon: tablerCalendar, scale: 1.14 },\n 'calendar-previous-month': { icon: tablerChevronLeft, scale: 1.71 },\n 'calendar-next-month': { icon: tablerChevronRight, scale: 1.71 },\n 'checkbox-checked': { icon: tablerCheck, scale: 1.41 },\n 'checkbox-indeterminate': { icon: tablerMinus, scale: 1.5 },\n 'chip-remove': { icon: tablerX, scale: 1.71 },\n 'dialog-close': { icon: tablerX, scale: 1.71 },\n 'drawer-close': { icon: tablerX, scale: 1.71 },\n 'dropdown-toggle': { icon: tablerChevronDown, scale: 1.71 },\n 'edit-confirm': { icon: tablerCheck, scale: 1.41 },\n 'filter-active': { icon: tablerFilterFilled, scale: 1 },\n 'filter-inactive': { icon: tablerFilter, scale: 1.12 },\n 'filter-remove': { icon: tablerX, scale: 1.71 },\n 'hint-info': { icon: tablerInfoCircle, scale: 1.14 },\n 'hint-success': { icon: tablerCircleCheck, scale: 1.14 },\n 'hint-warning': { icon: tablerAlertTriangle, scale: 1.14 },\n 'hint-error': { icon: tablerAlertCircle, scale: 1.14 },\n 'input-clear': { icon: tablerX, scale: 1.71 },\n 'menu-submenu': { icon: tablerChevronRight, scale: 1.71 },\n 'paginator-previous': { icon: tablerChevronLeft, scale: 1.71 },\n 'paginator-next': { icon: tablerChevronRight, scale: 1.71 },\n search: { icon: tablerSearch, scale: 1.2 },\n 'sort-neutral': { icon: tablerArrowsSort, scale: 1.2 },\n 'sort-ascending': { icon: tablerSortAscending, scale: 1.26 },\n 'sort-descending': { icon: tablerSortDescending, scale: 1.26 },\n 'spin-decrement': { icon: tablerChevronDown, scale: 1.71 },\n 'spin-increment': { icon: tablerChevronUp, scale: 1.71 },\n 'table-group-toggle': { icon: tablerChevronRight, scale: 1.71 },\n 'tabs-scroll-left': { icon: tablerChevronLeft, scale: 1.71 },\n 'tabs-scroll-right': { icon: tablerChevronRight, scale: 1.71 },\n 'toast-close': { icon: tablerX, scale: 1.71 },\n 'snackbar-close': { icon: tablerX, scale: 1.71 },\n 'upload-trigger': { icon: tablerUpload, scale: 1.14 },\n 'upload-done': { icon: tablerCircleCheck, scale: 1.14 },\n 'upload-failed': { icon: tablerAlertCircle, scale: 1.14 },\n 'upload-retry': { icon: tablerRefresh, scale: 1.33 },\n 'upload-cancel': { icon: tablerX, scale: 1.71 },\n 'upload-remove': { icon: tablerX, scale: 1.71 },\n};\n\nexport function withDefaultIcons(): NgnFeature {\n return {\n providers: [\n { provide: NGN_ICON_REGISTRY, useValue: NGN_DEFAULT_ICON_REGISTRY },\n { provide: NGN_CUSTOM_ICONS, useValue: false },\n ],\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAM,yBAAyB,GAAoB;IACjD,oBAAoB,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE;IAC5D,kBAAkB,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE;IAC5D,sBAAsB,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE;I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,KAAK,EAAE,IAAI,EAAE;IAChD,gBAAgB,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE;IACrD,aAAa,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE;IACvD,eAAe,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE;IACzD,cAAc,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE;IACpD,eAAe,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE;IAC/C,eAAe,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE;CAChD;SAEe,gBAAgB,GAAA;IAC9B,OAAO;AACL,QAAA,SAAS,EAAE;AACT,YAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,yBAAyB,EAAE;AACnE,YAAA,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE;AAC/C,SAAA;KACF;AACH;;AC9EA;;AAEG;;;;"}
1
+ {"version":3,"file":"ngneers-controls-default-icons.mjs","sources":["../../src/default-icons/provider.ts","../../src/default-icons/ngneers-controls-default-icons.ts"],"sourcesContent":["import tablerAlertCircle from '@iconify/icons-tabler/alert-circle';\nimport tablerAlertTriangle from '@iconify/icons-tabler/alert-triangle';\nimport tablerArrowsSort from '@iconify/icons-tabler/arrows-sort';\nimport tablerCalendar from '@iconify/icons-tabler/calendar';\nimport tablerCheck from '@iconify/icons-tabler/check';\nimport tablerChevronDown from '@iconify/icons-tabler/chevron-down';\nimport tablerChevronLeft from '@iconify/icons-tabler/chevron-left';\nimport tablerChevronRight from '@iconify/icons-tabler/chevron-right';\nimport tablerChevronUp from '@iconify/icons-tabler/chevron-up';\nimport tablerCircleCheck from '@iconify/icons-tabler/circle-check';\nimport tablerDots from '@iconify/icons-tabler/dots';\nimport tablerFilter from '@iconify/icons-tabler/filter';\nimport tablerFilterFilled from '@iconify/icons-tabler/filter-filled';\nimport tablerInfoCircle from '@iconify/icons-tabler/info-circle';\nimport tablerMinus from '@iconify/icons-tabler/minus';\nimport tablerRefresh from '@iconify/icons-tabler/refresh';\nimport tablerSearch from '@iconify/icons-tabler/search';\nimport tablerSortAscending from '@iconify/icons-tabler/sort-ascending';\nimport tablerSortDescending from '@iconify/icons-tabler/sort-descending';\nimport tablerStar from '@iconify/icons-tabler/star';\nimport tablerStarFilled from '@iconify/icons-tabler/star-filled';\nimport tablerUpload from '@iconify/icons-tabler/upload';\nimport tablerX from '@iconify/icons-tabler/x';\n\nimport { NGN_CUSTOM_ICONS, NGN_ICON_REGISTRY, type NgnIconRegistry } from '@ngneers/controls/icon';\n\nimport type { NgnFeature } from '@ngneers/controls/api/ng';\n\nconst NGN_DEFAULT_ICON_REGISTRY: NgnIconRegistry = {\n 'accordion-collapse': { icon: tablerChevronUp, scale: 1.71 },\n 'accordion-expand': { icon: tablerChevronDown, scale: 1.71 },\n 'breadcrumb-separator': { icon: tablerChevronRight, scale: 1.71 },\n 'breadcrumb-overflow': { icon: tablerDots, scale: 1.33 },\n 'calendar-trigger': { icon: tablerCalendar, scale: 1.14 },\n 'calendar-previous-month': { icon: tablerChevronLeft, scale: 1.71 },\n 'calendar-next-month': { icon: tablerChevronRight, scale: 1.71 },\n 'checkbox-checked': { icon: tablerCheck, scale: 1.41 },\n 'checkbox-indeterminate': { icon: tablerMinus, scale: 1.5 },\n 'chip-remove': { icon: tablerX, scale: 1.71 },\n 'dialog-close': { icon: tablerX, scale: 1.71 },\n 'drawer-close': { icon: tablerX, scale: 1.71 },\n 'dropdown-toggle': { icon: tablerChevronDown, scale: 1.71 },\n 'edit-confirm': { icon: tablerCheck, scale: 1.41 },\n 'filter-active': { icon: tablerFilterFilled, scale: 1 },\n 'filter-inactive': { icon: tablerFilter, scale: 1.12 },\n 'filter-remove': { icon: tablerX, scale: 1.71 },\n 'hint-info': { icon: tablerInfoCircle, scale: 1.14 },\n 'hint-success': { icon: tablerCircleCheck, scale: 1.14 },\n 'hint-warning': { icon: tablerAlertTriangle, scale: 1.14 },\n 'hint-error': { icon: tablerAlertCircle, scale: 1.14 },\n 'input-clear': { icon: tablerX, scale: 1.71 },\n 'menu-submenu': { icon: tablerChevronRight, scale: 1.71 },\n 'paginator-previous': { icon: tablerChevronLeft, scale: 1.71 },\n 'paginator-next': { icon: tablerChevronRight, scale: 1.71 },\n 'rating-full': { icon: tablerStarFilled, scale: 1.14 },\n 'rating-empty': { icon: tablerStar, scale: 1.14 },\n search: { icon: tablerSearch, scale: 1.2 },\n 'sort-neutral': { icon: tablerArrowsSort, scale: 1.2 },\n 'sort-ascending': { icon: tablerSortAscending, scale: 1.26 },\n 'sort-descending': { icon: tablerSortDescending, scale: 1.26 },\n 'spin-decrement': { icon: tablerChevronDown, scale: 1.71 },\n 'spin-increment': { icon: tablerChevronUp, scale: 1.71 },\n 'stepper-completed': { icon: tablerCheck, scale: 1.41 },\n 'table-group-toggle': { icon: tablerChevronRight, scale: 1.71 },\n 'tabs-scroll-left': { icon: tablerChevronLeft, scale: 1.71 },\n 'tabs-scroll-right': { icon: tablerChevronRight, scale: 1.71 },\n 'toast-close': { icon: tablerX, scale: 1.71 },\n 'snackbar-close': { icon: tablerX, scale: 1.71 },\n 'upload-trigger': { icon: tablerUpload, scale: 1.14 },\n 'upload-done': { icon: tablerCircleCheck, scale: 1.14 },\n 'upload-failed': { icon: tablerAlertCircle, scale: 1.14 },\n 'upload-retry': { icon: tablerRefresh, scale: 1.33 },\n 'upload-cancel': { icon: tablerX, scale: 1.71 },\n 'upload-remove': { icon: tablerX, scale: 1.71 },\n};\n\nexport function withDefaultIcons(): NgnFeature {\n return {\n providers: [\n { provide: NGN_ICON_REGISTRY, useValue: NGN_DEFAULT_ICON_REGISTRY },\n { provide: NGN_CUSTOM_ICONS, useValue: false },\n ],\n };\n}\n","/**\n * Generated bundle index. Do not edit.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