@taiga-ui/legacy 4.52.0-canary.38dfc57 → 4.52.0-canary.3915ce7

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 (86) hide show
  1. package/components/index.d.ts +0 -7
  2. package/fesm2022/taiga-ui-legacy-components-combo-box.mjs +2 -3
  3. package/fesm2022/taiga-ui-legacy-components-combo-box.mjs.map +1 -1
  4. package/fesm2022/taiga-ui-legacy-components-input-number.mjs +2 -2
  5. package/fesm2022/taiga-ui-legacy-components-input-number.mjs.map +1 -1
  6. package/fesm2022/taiga-ui-legacy-components-input-range.mjs +6 -6
  7. package/fesm2022/taiga-ui-legacy-components-input-range.mjs.map +1 -1
  8. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs +3 -3
  9. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs.map +1 -1
  10. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs +2 -2
  11. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs.map +1 -1
  12. package/fesm2022/taiga-ui-legacy-components-input.mjs +2 -3
  13. package/fesm2022/taiga-ui-legacy-components-input.mjs.map +1 -1
  14. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs +2 -2
  15. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs +2 -2
  17. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs.map +1 -1
  18. package/fesm2022/taiga-ui-legacy-components-select.mjs +2 -3
  19. package/fesm2022/taiga-ui-legacy-components-select.mjs.map +1 -1
  20. package/fesm2022/taiga-ui-legacy-components-textarea.mjs +2 -2
  21. package/fesm2022/taiga-ui-legacy-components-textarea.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-legacy-components.mjs +0 -7
  23. package/fesm2022/taiga-ui-legacy-components.mjs.map +1 -1
  24. package/package.json +1 -29
  25. package/utils/icons-path-factory.d.ts +1 -1
  26. package/components/color-selector/color-edit/color-edit.component.d.ts +0 -18
  27. package/components/color-selector/color-edit/color-edit.module.d.ts +0 -21
  28. package/components/color-selector/color-picker/color-picker.component.d.ts +0 -22
  29. package/components/color-selector/color-picker/color-picker.module.d.ts +0 -14
  30. package/components/color-selector/color-selector.component.d.ts +0 -47
  31. package/components/color-selector/color-selector.module.d.ts +0 -23
  32. package/components/color-selector/color-selector.options.d.ts +0 -25
  33. package/components/color-selector/flat-picker/flat-picker.component.d.ts +0 -12
  34. package/components/color-selector/flat-picker/flat-picker.module.d.ts +0 -12
  35. package/components/color-selector/index.d.ts +0 -16
  36. package/components/color-selector/linear-multi-picker/linear-multi-picker.component.d.ts +0 -17
  37. package/components/color-selector/linear-multi-picker/linear-multi-picker.module.d.ts +0 -12
  38. package/components/color-selector/linear-picker/linear-picker.component.d.ts +0 -10
  39. package/components/color-selector/linear-picker/linear-picker.module.d.ts +0 -12
  40. package/components/color-selector/palette/palette.component.d.ts +0 -10
  41. package/components/color-selector/palette/palette.module.d.ts +0 -13
  42. package/components/color-selector/services/picker.service.d.ts +0 -15
  43. package/components/input-color/index.d.ts +0 -2
  44. package/components/input-color/input-color.component.d.ts +0 -30
  45. package/components/input-color/input-color.module.d.ts +0 -17
  46. package/components/input-date/index.d.ts +0 -3
  47. package/components/input-date/input-date.component.d.ts +0 -62
  48. package/components/input-date/input-date.directive.d.ts +0 -19
  49. package/components/input-date/input-date.module.d.ts +0 -24
  50. package/components/input-date/native-date/native-date.component.d.ts +0 -15
  51. package/components/input-phone/index.d.ts +0 -4
  52. package/components/input-phone/input-phone.component.d.ts +0 -52
  53. package/components/input-phone/input-phone.directive.d.ts +0 -16
  54. package/components/input-phone/input-phone.module.d.ts +0 -15
  55. package/components/input-phone/input-phone.options.d.ts +0 -22
  56. package/components/input-phone/utils/complete-phone-insertion-preprocessor.d.ts +0 -9
  57. package/components/input-phone/utils/create-phone-mask-expression.d.ts +0 -7
  58. package/components/input-phone/utils/index.d.ts +0 -2
  59. package/components/input-phone-international/index.d.ts +0 -3
  60. package/components/input-phone-international/input-phone-international.component.d.ts +0 -43
  61. package/components/input-phone-international/input-phone-international.options.d.ts +0 -25
  62. package/components/input-phone-international/utils/extract-value-from-event.d.ts +0 -4
  63. package/components/input-time/index.d.ts +0 -4
  64. package/components/input-time/input-time.component.d.ts +0 -62
  65. package/components/input-time/input-time.directive.d.ts +0 -17
  66. package/components/input-time/input-time.module.d.ts +0 -23
  67. package/components/input-time/input-time.options.d.ts +0 -42
  68. package/components/input-time/native-time/native-time.component.d.ts +0 -12
  69. package/components/input-year/index.d.ts +0 -3
  70. package/components/input-year/input-year.component.d.ts +0 -36
  71. package/components/input-year/input-year.directive.d.ts +0 -14
  72. package/components/input-year/input-year.module.d.ts +0 -18
  73. package/fesm2022/taiga-ui-legacy-components-color-selector.mjs +0 -726
  74. package/fesm2022/taiga-ui-legacy-components-color-selector.mjs.map +0 -1
  75. package/fesm2022/taiga-ui-legacy-components-input-color.mjs +0 -127
  76. package/fesm2022/taiga-ui-legacy-components-input-color.mjs.map +0 -1
  77. package/fesm2022/taiga-ui-legacy-components-input-date.mjs +0 -372
  78. package/fesm2022/taiga-ui-legacy-components-input-date.mjs.map +0 -1
  79. package/fesm2022/taiga-ui-legacy-components-input-phone-international.mjs +0 -215
  80. package/fesm2022/taiga-ui-legacy-components-input-phone-international.mjs.map +0 -1
  81. package/fesm2022/taiga-ui-legacy-components-input-phone.mjs +0 -373
  82. package/fesm2022/taiga-ui-legacy-components-input-phone.mjs.map +0 -1
  83. package/fesm2022/taiga-ui-legacy-components-input-time.mjs +0 -430
  84. package/fesm2022/taiga-ui-legacy-components-input-time.mjs.map +0 -1
  85. package/fesm2022/taiga-ui-legacy-components-input-year.mjs +0 -188
  86. package/fesm2022/taiga-ui-legacy-components-input-year.mjs.map +0 -1
@@ -1,726 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, Output, Input, ChangeDetectionStrategy, Component, NgModule, inject, Injectable, InjectionToken } from '@angular/core';
3
- import { tuiRgbToHex, tuiHexToRgb, tuiRgbToHsv, tuiHsvToRgb, tuiParseGradient, tuiGetGradientData, tuiParseColor } from '@taiga-ui/cdk/utils/color';
4
- import * as i1 from '@angular/forms';
5
- import { FormsModule } from '@angular/forms';
6
- import * as i2 from '@maskito/angular';
7
- import { MaskitoDirective } from '@maskito/angular';
8
- import * as i3 from '@taiga-ui/legacy/components/primitive-textfield';
9
- import { TuiPrimitiveTextfieldModule } from '@taiga-ui/legacy/components/primitive-textfield';
10
- import * as i4 from '@taiga-ui/legacy/directives/textfield-controller';
11
- import { TuiTextfieldControllerModule } from '@taiga-ui/legacy/directives/textfield-controller';
12
- import * as i5 from '@taiga-ui/legacy/components/input-number';
13
- import { TuiInputNumberModule } from '@taiga-ui/legacy/components/input-number';
14
- import * as i6 from '@taiga-ui/legacy/components/select';
15
- import { TuiSelectModule } from '@taiga-ui/legacy/components/select';
16
- import * as i1$1 from '@taiga-ui/core/directives/dropdown';
17
- import { TuiDropdown } from '@taiga-ui/core/directives/dropdown';
18
- import * as i2$1 from '@taiga-ui/core/components/data-list';
19
- import { TuiDataList } from '@taiga-ui/core/components/data-list';
20
- import * as i2$2 from '@angular/common';
21
- import { CommonModule, DOCUMENT } from '@angular/common';
22
- import * as i1$3 from '@taiga-ui/core/components/button';
23
- import { TuiButton } from '@taiga-ui/core/components/button';
24
- import { __decorate } from 'tslib';
25
- import { DomSanitizer } from '@angular/platform-browser';
26
- import { tuiRound } from '@taiga-ui/cdk/utils/math';
27
- import { tuiPure, tuiProvideOptions, tuiDefaultSort } from '@taiga-ui/cdk/utils/miscellaneous';
28
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
29
- import { tuiTypedFromEvent, tuiPreventDefault } from '@taiga-ui/cdk/observables';
30
- import { tuiInjectElement, tuiGetElementPoint } from '@taiga-ui/cdk/utils/dom';
31
- import { Observable, switchMap, map, takeUntil, startWith } from 'rxjs';
32
- import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
33
- import * as i7 from '@taiga-ui/core/directives/group';
34
- import { TuiGroup } from '@taiga-ui/core/directives/group';
35
- import * as i1$2 from '@taiga-ui/core/directives/hint';
36
- import { TuiHint } from '@taiga-ui/core/directives/hint';
37
- import * as i10 from '@taiga-ui/kit/directives/chevron';
38
- import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
39
- import * as i11 from '@taiga-ui/core/components/icon';
40
- import { TuiIcon } from '@taiga-ui/core/components/icon';
41
- import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
42
-
43
- const HEX_MODE_LENGTH = 6;
44
- class TuiColorEditComponent {
45
- constructor() {
46
- this.color = [0, 0, 0, 1];
47
- this.colorChange = new EventEmitter();
48
- this.hexMask = {
49
- mask: new RegExp(`^[A-F\\d]{0,${HEX_MODE_LENGTH}}$`, 'gi'),
50
- };
51
- this.modes = ['HEX', 'RGB'];
52
- this.mode = this.modes[0];
53
- }
54
- get isHex() {
55
- return this.mode === this.modes[0];
56
- }
57
- get hex() {
58
- return tuiRgbToHex(this.color[0], this.color[1], this.color[2]).replace('#', '');
59
- }
60
- get opacity() {
61
- return Math.round(this.color[3] * 100);
62
- }
63
- onHexChange(hex) {
64
- if (hex.length !== HEX_MODE_LENGTH) {
65
- return;
66
- }
67
- const rgb = tuiHexToRgb(hex);
68
- this.updateColor([rgb[0], rgb[1], rgb[2], this.color[3]]);
69
- }
70
- onRgbChange(...rgba) {
71
- this.updateColor(rgba);
72
- }
73
- updateColor(color) {
74
- this.color = color;
75
- this.colorChange.emit(color);
76
- }
77
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
78
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiColorEditComponent, isStandalone: false, selector: "tui-color-edit", inputs: { color: "color" }, outputs: { colorChange: "colorChange" }, ngImport: i0, template: "<tui-select\n tuiDropdownAlign=\"left\"\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n class=\"t-select\"\n [ngModelOptions]=\"{standalone: true}\"\n [style.flex]=\"'0 0 auto'\"\n [tuiTextfieldLabelOutside]=\"true\"\n [(ngModel)]=\"mode\"\n>\n <tui-data-list\n *tuiDataList\n size=\"s\"\n >\n @for (item of modes; track item) {\n <button\n tuiOption\n type=\"button\"\n [value]=\"item\"\n >\n {{ item }}\n </button>\n }\n </tui-data-list>\n</tui-select>\n@if (isHex) {\n <tui-primitive-textfield\n tuiTextfieldSize=\"m\"\n [maskito]=\"hexMask\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"hex\"\n (valueChange)=\"onHexChange($event)\"\n />\n} @else {\n <tui-input-number\n tuiTextfieldSize=\"m\"\n class=\"t-rgb\"\n [max]=\"255\"\n [min]=\"0\"\n [ngModel]=\"color[0]\"\n [ngModelOptions]=\"{standalone: true}\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange($event, color[1], color[2], color[3])\"\n />\n <tui-input-number\n tuiTextfieldSize=\"m\"\n class=\"t-rgb\"\n [max]=\"255\"\n [min]=\"0\"\n [ngModel]=\"color[1]\"\n [ngModelOptions]=\"{standalone: true}\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange(color[0], $event, color[2], color[3])\"\n />\n <tui-input-number\n tuiTextfieldSize=\"m\"\n class=\"t-rgb\"\n [max]=\"255\"\n [min]=\"0\"\n [ngModel]=\"color[2]\"\n [ngModelOptions]=\"{standalone: true}\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange(color[0], color[1], $event, color[3])\"\n />\n}\n<tui-input-number\n tuiTextfieldPostfix=\"%\"\n tuiTextfieldSize=\"m\"\n class=\"t-opacity\"\n [max]=\"100\"\n [min]=\"0\"\n [ngModel]=\"opacity\"\n [ngModelOptions]=\"{standalone: true}\"\n [style.flex]=\"'0 0 auto'\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange(color[0], color[1], color[2], $event / 100)\"\n/>\n", styles: [":host{display:flex}.t-select{inline-size:5.875rem}.t-opacity{inline-size:4.275rem}.t-rgb,.t-opacity{text-align:center}\n"], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "component", type: i3.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "iconCleaner", "readOnly", "invalid", "disabled", "value"], outputs: ["valueChange"] }, { kind: "directive", type: i3.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { kind: "directive", type: i4.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "directive", type: i4.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { kind: "directive", type: i4.TuiTextfieldPostfixDirective, selector: "[tuiTextfieldPostfix]", inputs: ["tuiTextfieldPostfix"] }, { kind: "component", type: i5.TuiInputNumberComponent, selector: "tui-input-number", inputs: ["min", "max", "step"] }, { kind: "directive", type: i5.TuiInputNumberDirective, selector: "tui-input-number" }, { kind: "component", type: i6.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i6.TuiSelectDirective, selector: "tui-select" }, { kind: "directive", type: i1$1.TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: ["tuiDropdownAlign", "tuiDropdownAppearance", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight", "tuiDropdownOffset"] }, { kind: "component", type: i2$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i2$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i2$1.TuiOption, selector: "button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])", inputs: ["disabled", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
79
- }
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorEditComponent, decorators: [{
81
- type: Component,
82
- args: [{ standalone: false, selector: 'tui-color-edit', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-select\n tuiDropdownAlign=\"left\"\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n class=\"t-select\"\n [ngModelOptions]=\"{standalone: true}\"\n [style.flex]=\"'0 0 auto'\"\n [tuiTextfieldLabelOutside]=\"true\"\n [(ngModel)]=\"mode\"\n>\n <tui-data-list\n *tuiDataList\n size=\"s\"\n >\n @for (item of modes; track item) {\n <button\n tuiOption\n type=\"button\"\n [value]=\"item\"\n >\n {{ item }}\n </button>\n }\n </tui-data-list>\n</tui-select>\n@if (isHex) {\n <tui-primitive-textfield\n tuiTextfieldSize=\"m\"\n [maskito]=\"hexMask\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"hex\"\n (valueChange)=\"onHexChange($event)\"\n />\n} @else {\n <tui-input-number\n tuiTextfieldSize=\"m\"\n class=\"t-rgb\"\n [max]=\"255\"\n [min]=\"0\"\n [ngModel]=\"color[0]\"\n [ngModelOptions]=\"{standalone: true}\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange($event, color[1], color[2], color[3])\"\n />\n <tui-input-number\n tuiTextfieldSize=\"m\"\n class=\"t-rgb\"\n [max]=\"255\"\n [min]=\"0\"\n [ngModel]=\"color[1]\"\n [ngModelOptions]=\"{standalone: true}\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange(color[0], $event, color[2], color[3])\"\n />\n <tui-input-number\n tuiTextfieldSize=\"m\"\n class=\"t-rgb\"\n [max]=\"255\"\n [min]=\"0\"\n [ngModel]=\"color[2]\"\n [ngModelOptions]=\"{standalone: true}\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange(color[0], color[1], $event, color[3])\"\n />\n}\n<tui-input-number\n tuiTextfieldPostfix=\"%\"\n tuiTextfieldSize=\"m\"\n class=\"t-opacity\"\n [max]=\"100\"\n [min]=\"0\"\n [ngModel]=\"opacity\"\n [ngModelOptions]=\"{standalone: true}\"\n [style.flex]=\"'0 0 auto'\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange(color[0], color[1], color[2], $event / 100)\"\n/>\n", styles: [":host{display:flex}.t-select{inline-size:5.875rem}.t-opacity{inline-size:4.275rem}.t-rgb,.t-opacity{text-align:center}\n"] }]
83
- }], propDecorators: { color: [{
84
- type: Input
85
- }], colorChange: [{
86
- type: Output
87
- }] } });
88
-
89
- /**
90
- * TODO(v5): delete it
91
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
92
- */
93
- class TuiColorEditModule {
94
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorEditModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
95
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiColorEditModule, declarations: [TuiColorEditComponent], imports: [CommonModule,
96
- FormsModule,
97
- MaskitoDirective,
98
- TuiPrimitiveTextfieldModule,
99
- TuiTextfieldControllerModule,
100
- TuiInputNumberModule,
101
- TuiSelectModule, i1$1.TuiDropdownOptionsDirective, i1$1.TuiDropdownDriverDirective, i1$1.TuiDropdownDirective, i1$1.TuiDropdownComponent, i1$1.TuiDropdownOpen, i1$1.TuiDropdownOpenLegacy, i1$1.TuiDropdownPortal, i1$1.TuiDropdownManual, i1$1.TuiDropdownHover, i1$1.TuiDropdownContext, i1$1.TuiDropdownPosition, i1$1.TuiDropdownPositionSided, i1$1.TuiDropdownSelection, i2$1.TuiDataListComponent, i2$1.TuiDataListDirective, i2$1.TuiOption, i2$1.TuiOptionNew, i2$1.TuiOptionWithValue, i2$1.TuiOptGroup, TuiButton], exports: [TuiColorEditComponent, i1$1.TuiDropdownOptionsDirective, i1$1.TuiDropdownDriverDirective, i1$1.TuiDropdownDirective, i1$1.TuiDropdownComponent, i1$1.TuiDropdownOpen, i1$1.TuiDropdownOpenLegacy, i1$1.TuiDropdownPortal, i1$1.TuiDropdownManual, i1$1.TuiDropdownHover, i1$1.TuiDropdownContext, i1$1.TuiDropdownPosition, i1$1.TuiDropdownPositionSided, i1$1.TuiDropdownSelection, i2$1.TuiDataListComponent, i2$1.TuiDataListDirective, i2$1.TuiOption, i2$1.TuiOptionNew, i2$1.TuiOptionWithValue, i2$1.TuiOptGroup] }); }
102
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorEditModule, imports: [CommonModule,
103
- FormsModule,
104
- TuiPrimitiveTextfieldModule,
105
- TuiTextfieldControllerModule,
106
- TuiInputNumberModule,
107
- TuiSelectModule, i1$1.TuiDropdownComponent, i2$1.TuiDataListComponent, i2$1.TuiOption] }); }
108
- }
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorEditModule, decorators: [{
110
- type: NgModule,
111
- args: [{
112
- imports: [
113
- CommonModule,
114
- FormsModule,
115
- MaskitoDirective,
116
- TuiPrimitiveTextfieldModule,
117
- TuiTextfieldControllerModule,
118
- TuiInputNumberModule,
119
- TuiSelectModule,
120
- ...TuiDropdown,
121
- ...TuiDataList,
122
- TuiButton,
123
- ],
124
- declarations: [TuiColorEditComponent],
125
- exports: [TuiColorEditComponent, ...TuiDropdown, ...TuiDataList],
126
- }]
127
- }] });
128
-
129
- /**
130
- * TODO(v5): delete it
131
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
132
- */
133
- class TuiPickerService extends Observable {
134
- constructor() {
135
- super((subscriber) => this.point$.subscribe(subscriber));
136
- this.el = tuiInjectElement();
137
- this.doc = inject(DOCUMENT);
138
- this.point$ = tuiTypedFromEvent(this.el, 'mousedown').pipe(tuiPreventDefault(), switchMap((event) => {
139
- const mouseMove$ = tuiTypedFromEvent(this.doc, 'mousemove').pipe(map(({ clientX, clientY }) => tuiGetElementPoint(clientX, clientY, this.el)), takeUntil(tuiTypedFromEvent(this.doc, 'mouseup')));
140
- return event.target === this.el
141
- ? mouseMove$.pipe(startWith(tuiGetElementPoint(event.clientX, event.clientY, this.el)))
142
- : mouseMove$;
143
- }), takeUntilDestroyed());
144
- }
145
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPickerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
146
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPickerService }); }
147
- }
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPickerService, decorators: [{
149
- type: Injectable
150
- }], ctorParameters: () => [] });
151
-
152
- class TuiFlatPickerComponent {
153
- constructor() {
154
- this.$ = inject(TuiPickerService)
155
- .pipe(takeUntilDestroyed())
156
- .subscribe((point) => {
157
- this.value = point;
158
- this.valueChange.emit([point[0], point[1]]);
159
- });
160
- this.value = [0, 0];
161
- this.valueChange = new EventEmitter();
162
- }
163
- get left() {
164
- return this.value[0] * 100;
165
- }
166
- get top() {
167
- return this.value[1] * 100;
168
- }
169
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFlatPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
170
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiFlatPickerComponent, isStandalone: false, selector: "tui-flat-picker", inputs: { value: "value" }, outputs: { valueChange: "valueChange" }, providers: [TuiPickerService], ngImport: i0, template: "<div\n class=\"t-circle\"\n [style.left.%]=\"left\"\n [style.top.%]=\"top\"\n></div>\n", styles: [":host{position:relative;display:block}.t-circle{position:absolute;inline-size:1rem;block-size:1rem;border-radius:100%;outline:1px solid var(--tui-background-base);margin:-.5rem 0 0 -.5rem;box-shadow:inset 0 0 0 1px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
171
- }
172
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFlatPickerComponent, decorators: [{
173
- type: Component,
174
- args: [{ standalone: false, selector: 'tui-flat-picker', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TuiPickerService], template: "<div\n class=\"t-circle\"\n [style.left.%]=\"left\"\n [style.top.%]=\"top\"\n></div>\n", styles: [":host{position:relative;display:block}.t-circle{position:absolute;inline-size:1rem;block-size:1rem;border-radius:100%;outline:1px solid var(--tui-background-base);margin:-.5rem 0 0 -.5rem;box-shadow:inset 0 0 0 1px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\n"] }]
175
- }], propDecorators: { value: [{
176
- type: Input
177
- }], valueChange: [{
178
- type: Output
179
- }] } });
180
-
181
- class TuiLinearPickerComponent {
182
- constructor() {
183
- this.$ = inject(TuiPickerService)
184
- .pipe(takeUntilDestroyed())
185
- .subscribe(([x]) => {
186
- this.value = x;
187
- this.valueChange.emit(x);
188
- });
189
- this.value = 0;
190
- this.valueChange = new EventEmitter();
191
- }
192
- get left() {
193
- return this.value * 100;
194
- }
195
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLinearPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
196
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiLinearPickerComponent, isStandalone: false, selector: "tui-linear-picker", inputs: { value: "value" }, outputs: { valueChange: "valueChange" }, providers: [TuiPickerService], ngImport: i0, template: "<div\n class=\"t-circle\"\n [style.left.%]=\"left\"\n></div>\n", styles: [":host{position:relative;display:block;block-size:1rem;box-sizing:border-box}.t-circle{position:absolute;inline-size:1rem;block-size:1rem;border-radius:100%;outline:1px solid var(--tui-background-base);margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
197
- }
198
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLinearPickerComponent, decorators: [{
199
- type: Component,
200
- args: [{ standalone: false, selector: 'tui-linear-picker', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TuiPickerService], template: "<div\n class=\"t-circle\"\n [style.left.%]=\"left\"\n></div>\n", styles: [":host{position:relative;display:block;block-size:1rem;box-sizing:border-box}.t-circle{position:absolute;inline-size:1rem;block-size:1rem;border-radius:100%;outline:1px solid var(--tui-background-base);margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\n"] }]
201
- }], propDecorators: { value: [{
202
- type: Input
203
- }], valueChange: [{
204
- type: Output
205
- }] } });
206
-
207
- class TuiColorPickerComponent {
208
- constructor() {
209
- this.sanitizer = inject(DomSanitizer);
210
- this.point = [0, 1];
211
- this.hue = 0;
212
- this.opacity = 1;
213
- this.colorChange = new EventEmitter();
214
- }
215
- set color(color) {
216
- if (this.currentColor.every((item, index) => item === color[index]) &&
217
- color[3] === this.opacity) {
218
- return;
219
- }
220
- const [h, s, v] = tuiRgbToHsv(color[0], color[1], color[2]);
221
- this.opacity = color[3];
222
- this.hue = h / 360;
223
- this.point = [s, 1 - v / 255];
224
- }
225
- get currentColor() {
226
- return this.getCurrentColor(this.hue, this.point);
227
- }
228
- get base() {
229
- return `rgb(${tuiHsvToRgb(this.hue * 360, 1, 255)})`;
230
- }
231
- get gradient() {
232
- return this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to right, rgba(${this.currentColor.join(',')}, 0), rgb(${this.currentColor.join(',')}))`);
233
- }
234
- onPointChange(point) {
235
- this.point = point;
236
- this.updateColor();
237
- }
238
- onHueChange(hue) {
239
- this.hue = hue;
240
- this.updateColor();
241
- }
242
- onOpacityChange(opacity) {
243
- this.opacity = tuiRound(opacity, 2);
244
- this.updateColor();
245
- }
246
- getCurrentColor(hue, point) {
247
- return tuiHsvToRgb(hue * 360, point[0], (1 - point[1]) * 255);
248
- }
249
- updateColor() {
250
- this.colorChange.emit([...this.currentColor, this.opacity]);
251
- }
252
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
253
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiColorPickerComponent, isStandalone: false, selector: "tui-color-picker", inputs: { color: "color" }, outputs: { colorChange: "colorChange" }, ngImport: i0, template: "<tui-flat-picker\n class=\"t-flat\"\n [style.backgroundColor]=\"base\"\n [value]=\"point\"\n (valueChange)=\"onPointChange($event)\"\n/>\n<div class=\"t-wrapper t-wrapper_hue\">\n <tui-linear-picker\n class=\"t-hue\"\n [value]=\"hue\"\n (valueChange)=\"onHueChange($event)\"\n />\n</div>\n<div\n class=\"t-wrapper t-wrapper_opacity\"\n [style.background]=\"gradient\"\n>\n <tui-linear-picker\n class=\"t-opacity\"\n [value]=\"opacity\"\n (valueChange)=\"onOpacityChange($event)\"\n />\n</div>\n", styles: [":host{position:relative;display:block;isolation:isolate}.t-flat{block-size:14rem;background:linear-gradient(#0000,#000),linear-gradient(to right,#fff,#fff0);margin-block-end:.25rem;overflow:hidden}.t-wrapper{position:relative;margin:1rem 1.25rem;border-radius:.5rem}.t-wrapper:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper_hue{background:red}.t-wrapper_opacity:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hue{background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red);border-radius:inherit;margin:0 .5rem}.t-opacity{border-radius:inherit;margin:0 .5rem}\n"], dependencies: [{ kind: "component", type: TuiFlatPickerComponent, selector: "tui-flat-picker", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: TuiLinearPickerComponent, selector: "tui-linear-picker", inputs: ["value"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
254
- }
255
- __decorate([
256
- tuiPure
257
- ], TuiColorPickerComponent.prototype, "getCurrentColor", null);
258
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorPickerComponent, decorators: [{
259
- type: Component,
260
- args: [{ standalone: false, selector: 'tui-color-picker', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-flat-picker\n class=\"t-flat\"\n [style.backgroundColor]=\"base\"\n [value]=\"point\"\n (valueChange)=\"onPointChange($event)\"\n/>\n<div class=\"t-wrapper t-wrapper_hue\">\n <tui-linear-picker\n class=\"t-hue\"\n [value]=\"hue\"\n (valueChange)=\"onHueChange($event)\"\n />\n</div>\n<div\n class=\"t-wrapper t-wrapper_opacity\"\n [style.background]=\"gradient\"\n>\n <tui-linear-picker\n class=\"t-opacity\"\n [value]=\"opacity\"\n (valueChange)=\"onOpacityChange($event)\"\n />\n</div>\n", styles: [":host{position:relative;display:block;isolation:isolate}.t-flat{block-size:14rem;background:linear-gradient(#0000,#000),linear-gradient(to right,#fff,#fff0);margin-block-end:.25rem;overflow:hidden}.t-wrapper{position:relative;margin:1rem 1.25rem;border-radius:.5rem}.t-wrapper:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper_hue{background:red}.t-wrapper_opacity:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hue{background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red);border-radius:inherit;margin:0 .5rem}.t-opacity{border-radius:inherit;margin:0 .5rem}\n"] }]
261
- }], propDecorators: { colorChange: [{
262
- type: Output
263
- }], color: [{
264
- type: Input
265
- }], getCurrentColor: [] } });
266
-
267
- /**
268
- * TODO(v5): delete it
269
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
270
- */
271
- class TuiFlatPickerModule {
272
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFlatPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
273
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiFlatPickerModule, declarations: [TuiFlatPickerComponent], imports: [CommonModule], exports: [TuiFlatPickerComponent] }); }
274
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFlatPickerModule, imports: [CommonModule] }); }
275
- }
276
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFlatPickerModule, decorators: [{
277
- type: NgModule,
278
- args: [{
279
- imports: [CommonModule],
280
- declarations: [TuiFlatPickerComponent],
281
- exports: [TuiFlatPickerComponent],
282
- }]
283
- }] });
284
-
285
- /**
286
- * TODO(v5): delete it
287
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
288
- */
289
- class TuiLinearPickerModule {
290
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLinearPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
291
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiLinearPickerModule, declarations: [TuiLinearPickerComponent], imports: [CommonModule], exports: [TuiLinearPickerComponent] }); }
292
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLinearPickerModule, imports: [CommonModule] }); }
293
- }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLinearPickerModule, decorators: [{
295
- type: NgModule,
296
- args: [{
297
- imports: [CommonModule],
298
- declarations: [TuiLinearPickerComponent],
299
- exports: [TuiLinearPickerComponent],
300
- }]
301
- }] });
302
-
303
- /**
304
- * TODO(v5): delete it
305
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
306
- */
307
- class TuiColorPickerModule {
308
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
309
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiColorPickerModule, declarations: [TuiColorPickerComponent], imports: [CommonModule, TuiFlatPickerModule, TuiLinearPickerModule], exports: [TuiColorPickerComponent] }); }
310
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorPickerModule, imports: [CommonModule, TuiFlatPickerModule, TuiLinearPickerModule] }); }
311
- }
312
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorPickerModule, decorators: [{
313
- type: NgModule,
314
- args: [{
315
- imports: [CommonModule, TuiFlatPickerModule, TuiLinearPickerModule],
316
- declarations: [TuiColorPickerComponent],
317
- exports: [TuiColorPickerComponent],
318
- }]
319
- }] });
320
-
321
- const TUI_COLOR_SELECTOR_MODE_NAMES = new InjectionToken(ngDevMode ? 'TUI_COLOR_SELECTOR_MODE_NAMES' : '', {
322
- factory: () => ['Solid color', 'Gradient'],
323
- });
324
- const TUI_DEFAULT_INPUT_COLORS = new Map([
325
- ['color-black-100', '#909090'],
326
- ['color-black-200', '#666666'],
327
- ['color-black-300', '#333333'],
328
- ['color-blue-100', '#1771e6'],
329
- ['color-blue-200', '#1464cc'],
330
- ['color-blue-300', '#0953b3'],
331
- ['color-gray-100', '#f5f5f6'],
332
- ['color-gray-200', '#e7e8ea'],
333
- ['color-gray-300', '#cbcfd3'],
334
- ['color-gray-400', '#959ba4'],
335
- ['color-gray-500', '#79818c'],
336
- ['color-gray-600', '#616871'],
337
- ['color-green-100', '#39b54a'],
338
- ['color-green-200', '#2ca53a'],
339
- ['color-green-300', '#168a21'],
340
- ['color-light-blue-100', '#ecf1f7'],
341
- ['color-light-blue-200', '#e4ebf3'],
342
- ['color-light-blue-300', '#dde4ed'],
343
- ['color-red-100', '#e01f19'],
344
- ['color-red-200', '#d3120e'],
345
- ['color-red-300', '#c40b08'],
346
- ['color-yellow-100', '#FFDD2C'],
347
- ['color-yellow-200', '#FCC521'],
348
- ['color-yellow-300', '#FAB618'],
349
- ['transparent', 'transparent'],
350
- ]);
351
- const TuiColorSelectorMode = {
352
- SolidColor: 0,
353
- Gradient: 1,
354
- };
355
- const TUI_COLOR_SELECTOR_DEFAULT_OPTIONS = {
356
- selectorMode: true,
357
- mode: TuiColorSelectorMode.SolidColor,
358
- color: [0, 0, 0, 1],
359
- colors: new Map(),
360
- gradient: {
361
- icons: {
362
- 'to top right': '@tui.move-up-right',
363
- 'to right': '@tui.move-right',
364
- 'to bottom right': '@tui.move-down-right',
365
- 'to bottom': '@tui.move-down',
366
- 'to bottom left': '@tui.move-down-left',
367
- 'to left': '@tui.move-left',
368
- 'to top left': '@tui.move-up-left',
369
- 'to top': '@tui.move-up',
370
- },
371
- steps: [
372
- [0, [0, 0, 0, 1]],
373
- [1, [255, 255, 255, 1]],
374
- ],
375
- stop: 0,
376
- direction: 'to bottom',
377
- emptyStop: [0, 0, 0, 0],
378
- buttons: [
379
- 'to top right',
380
- 'to right',
381
- 'to bottom right',
382
- 'to bottom',
383
- 'to bottom left',
384
- 'to left',
385
- 'to top left',
386
- 'to top',
387
- ],
388
- },
389
- };
390
- const TUI_COLOR_SELECTOR_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_COLOR_SELECTOR_OPTIONS' : '', {
391
- factory: () => TUI_COLOR_SELECTOR_DEFAULT_OPTIONS,
392
- });
393
- function tuiColorSelectorOptionsProvider(options) {
394
- return tuiProvideOptions(TUI_COLOR_SELECTOR_OPTIONS, options, TUI_COLOR_SELECTOR_DEFAULT_OPTIONS);
395
- }
396
-
397
- class TuiLinearMultiPickerComponent {
398
- constructor() {
399
- this.$ = inject(TuiPickerService)
400
- .pipe(takeUntilDestroyed())
401
- .subscribe(([x]) => this.onPicker(x));
402
- this.value = [0, 1];
403
- this.valueChange = new EventEmitter();
404
- this.indexChange = new EventEmitter();
405
- this.index = NaN;
406
- }
407
- onMouseUp() {
408
- this.index = NaN;
409
- }
410
- onMouseDown(index) {
411
- this.updateIndex(index);
412
- }
413
- onClick(index) {
414
- if (this.value.length > 2) {
415
- this.updateValue(this.value.filter((_, i) => i !== index));
416
- }
417
- }
418
- onPicker(x) {
419
- if (Number.isNaN(this.index)) {
420
- this.updateIndex(this.value.length);
421
- this.value = [...this.value, 0];
422
- }
423
- if (this.value.some((item, index) => item === x && index !== this.index)) {
424
- return;
425
- }
426
- this.updateValue(this.value.map((item, index) => (index === this.index ? x : item)));
427
- }
428
- updateIndex(index) {
429
- this.index = index;
430
- this.indexChange.emit(index);
431
- }
432
- updateValue(value) {
433
- this.value = value;
434
- this.valueChange.emit(value);
435
- }
436
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLinearMultiPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
437
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiLinearMultiPickerComponent, isStandalone: false, selector: "tui-linear-multi-picker", inputs: { value: "value" }, outputs: { valueChange: "valueChange", indexChange: "indexChange" }, host: { listeners: { "document:mouseup": "onMouseUp()" } }, providers: [TuiPickerService], ngImport: i0, template: "@for (item of value; track item; let index = $index) {\n <div\n class=\"t-circle\"\n [style.left.%]=\"item * 100\"\n (dblclick)=\"onClick(index)\"\n (mousedown)=\"onMouseDown(index)\"\n ></div>\n}\n", styles: [":host{position:relative;display:block;block-size:1rem;box-sizing:border-box}.t-circle{position:absolute;inline-size:1rem;block-size:1rem;border-radius:100%;outline:1px solid var(--tui-background-base);margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
438
- }
439
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLinearMultiPickerComponent, decorators: [{
440
- type: Component,
441
- args: [{ standalone: false, selector: 'tui-linear-multi-picker', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TuiPickerService], host: {
442
- '(document:mouseup)': 'onMouseUp()',
443
- }, template: "@for (item of value; track item; let index = $index) {\n <div\n class=\"t-circle\"\n [style.left.%]=\"item * 100\"\n (dblclick)=\"onClick(index)\"\n (mousedown)=\"onMouseDown(index)\"\n ></div>\n}\n", styles: [":host{position:relative;display:block;block-size:1rem;box-sizing:border-box}.t-circle{position:absolute;inline-size:1rem;block-size:1rem;border-radius:100%;outline:1px solid var(--tui-background-base);margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\n"] }]
444
- }], propDecorators: { value: [{
445
- type: Input
446
- }], valueChange: [{
447
- type: Output
448
- }], indexChange: [{
449
- type: Output
450
- }] } });
451
-
452
- class TuiPaletteComponent {
453
- constructor() {
454
- this.colors = new Map();
455
- this.selectedColor = new EventEmitter();
456
- this.originalOrder = (_a, _b) => 0;
457
- }
458
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPaletteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
459
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiPaletteComponent, isStandalone: false, selector: "tui-palette", inputs: { colors: "colors" }, outputs: { selectedColor: "selectedColor" }, ngImport: i0, template: "@for (color of colors | keyvalue: originalOrder; track color) {\n <button\n type=\"button\"\n class=\"t-button\"\n [id]=\"color.key\"\n [style.background]=\"color.value\"\n [tuiHint]=\"color.key\"\n [tuiHintDescribe]=\"color.key\"\n (click)=\"selectedColor.emit(color.value)\"\n ></button>\n}\n", styles: [":host{display:flex;flex-wrap:wrap;padding:.875rem}.t-button{-webkit-appearance:none;appearance:none;padding:0;background:none;font-size:inherit;line-height:inherit;inline-size:1.5625rem;block-size:1.5625rem;box-sizing:border-box;margin:.375rem;border-radius:var(--tui-radius-m);border:1px solid rgba(0,0,0,.08)}\n"], dependencies: [{ kind: "directive", type: i1$2.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintContext", "tuiHintAppearance", "tuiHint"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: i1$2.TuiHintDescribe, selector: "[tuiHintDescribe]", inputs: ["tuiHintDescribe"] }, { kind: "pipe", type: i2$2.KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
460
- }
461
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPaletteComponent, decorators: [{
462
- type: Component,
463
- args: [{ standalone: false, selector: 'tui-palette', changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (color of colors | keyvalue: originalOrder; track color) {\n <button\n type=\"button\"\n class=\"t-button\"\n [id]=\"color.key\"\n [style.background]=\"color.value\"\n [tuiHint]=\"color.key\"\n [tuiHintDescribe]=\"color.key\"\n (click)=\"selectedColor.emit(color.value)\"\n ></button>\n}\n", styles: [":host{display:flex;flex-wrap:wrap;padding:.875rem}.t-button{-webkit-appearance:none;appearance:none;padding:0;background:none;font-size:inherit;line-height:inherit;inline-size:1.5625rem;block-size:1.5625rem;box-sizing:border-box;margin:.375rem;border-radius:var(--tui-radius-m);border:1px solid rgba(0,0,0,.08)}\n"] }]
464
- }], propDecorators: { colors: [{
465
- type: Input
466
- }], selectedColor: [{
467
- type: Output
468
- }] } });
469
-
470
- class TuiColorSelectorComponent {
471
- constructor() {
472
- this.selectorOptions = inject(TUI_COLOR_SELECTOR_OPTIONS);
473
- this.stops = new Map(this.selectorOptions.gradient.steps);
474
- this.currentStop = this.selectorOptions.gradient.stop;
475
- this.direction = this.selectorOptions.gradient.direction;
476
- this.sanitizer = inject(DomSanitizer);
477
- this.icons = inject(TUI_COMMON_ICONS);
478
- this.open = false;
479
- this.colors = this.selectorOptions.colors;
480
- this.colorChange = new EventEmitter();
481
- this.color = this.selectorOptions.color;
482
- this.modes = inject(TUI_COLOR_SELECTOR_MODE_NAMES);
483
- this.currentMode = this.modes[this.selectorOptions.mode];
484
- this.buttons = this.selectorOptions.gradient.buttons;
485
- }
486
- set colorSetter(color) {
487
- if (color.startsWith('linear-gradient')) {
488
- this.parseGradient(color);
489
- }
490
- else {
491
- this.parseColor(color);
492
- }
493
- }
494
- get selectorMode() {
495
- return this.selectorOptions.selectorMode;
496
- }
497
- get palette() {
498
- return this.filterPalette(this.colors, this.isGradient);
499
- }
500
- get stopsKeys() {
501
- return this.getStopsKeys(this.stops);
502
- }
503
- get currentColor() {
504
- return this.isGradient ? this.getStop(this.currentStop) : this.color;
505
- }
506
- get gradient() {
507
- return this.sanitizer.bypassSecurityTrustStyle(this.getGradient('to right'));
508
- }
509
- get isGradient() {
510
- return this.currentMode === this.modes[TuiColorSelectorMode.Gradient];
511
- }
512
- getIcon(direction) {
513
- return this.selectorOptions.gradient.icons[direction];
514
- }
515
- isModeActive(mode) {
516
- return this.currentMode === mode;
517
- }
518
- isDirectionActive(direction) {
519
- return this.direction === direction;
520
- }
521
- onPalettePick(color) {
522
- this.updateColor(color);
523
- }
524
- onDirectionChange(direction) {
525
- this.direction = direction;
526
- this.updateColor(this.getGradient(direction));
527
- }
528
- onModeSelect(mode) {
529
- this.currentMode = mode;
530
- this.open = false;
531
- this.updateColor(mode === this.modes[TuiColorSelectorMode.SolidColor]
532
- ? `rgba(${this.color.join(', ')})`
533
- : this.getGradient(this.direction));
534
- }
535
- onIndexChange(index) {
536
- this.currentStop = this.stopsKeys[index] ?? 0;
537
- }
538
- onColorChange(color) {
539
- if (!this.isGradient) {
540
- this.updateColor(`rgba(${color.join(', ')})`);
541
- return;
542
- }
543
- this.stops.set(this.currentStop, color);
544
- this.updateColor(this.getGradient(this.direction));
545
- }
546
- onStopsChange(stopsKeys) {
547
- const removed = this.stopsKeys.find((item) => !stopsKeys.includes(item));
548
- const added = stopsKeys.find((item) => !this.stopsKeys.includes(item));
549
- if (removed === undefined && added !== undefined) {
550
- this.addStop(added);
551
- }
552
- if (removed !== undefined && added === undefined) {
553
- this.removeStop(removed);
554
- }
555
- if (removed !== undefined && added !== undefined) {
556
- this.replaceStop(removed, added);
557
- }
558
- this.updateColor(this.getGradient(this.direction));
559
- }
560
- getStopsKeys(stops) {
561
- return Array.from(stops.keys());
562
- }
563
- filterPalette(colors, isGradient) {
564
- const map = new Map(colors);
565
- map.forEach((value, key) => {
566
- if ((value.startsWith('linear-gradient') && !isGradient) ||
567
- (!value.startsWith('linear-gradient') && isGradient)) {
568
- map.delete(key);
569
- }
570
- });
571
- return map;
572
- }
573
- updateColor(color) {
574
- this.colorChange.emit(color);
575
- }
576
- getGradient(direction) {
577
- return `linear-gradient(${direction}, ${[...this.stopsKeys]
578
- .sort(tuiDefaultSort)
579
- .map((key) => `rgba(${this.getStop(key).join(', ')}) ${key * 100}%`)
580
- .join(', ')})`;
581
- }
582
- getStop(stop) {
583
- return this.stops.get(stop) || this.selectorOptions.gradient.emptyStop;
584
- }
585
- addStop(stop) {
586
- const closest = this.stopsKeys.reduce((prev, curr) => (Math.abs(curr - stop) < Math.abs(prev - stop) ? curr : prev), this.stopsKeys[0] ?? 0);
587
- this.stops.set(stop, this.getStop(closest));
588
- this.stops = new Map(this.stops);
589
- this.currentStop = stop;
590
- }
591
- removeStop(stop) {
592
- this.stops.delete(stop);
593
- this.stops = new Map(this.stops);
594
- this.currentStop = this.stopsKeys[0] ?? 0;
595
- }
596
- replaceStop(removed, added) {
597
- const value = this.getStop(removed);
598
- this.currentStop = added;
599
- this.stops = new Map(this.stopsKeys.map((key) => key === removed ? [added, value] : [key, this.getStop(key)]));
600
- }
601
- parseGradient(color) {
602
- if (color === this.getGradient(this.direction)) {
603
- return;
604
- }
605
- const gradient = tuiParseGradient(tuiGetGradientData(color));
606
- this.direction = gradient.side;
607
- this.currentStop = this.selectorOptions.gradient.stop;
608
- this.stops = new Map(gradient.stops.length
609
- ? gradient.stops.map(({ color, position }) => [
610
- parseFloat(position) / 100,
611
- tuiParseColor(color),
612
- ])
613
- : this.selectorOptions.gradient.steps);
614
- }
615
- parseColor(color) {
616
- this.currentStop = this.selectorOptions.gradient.stop;
617
- this.color = tuiParseColor(color);
618
- }
619
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
620
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiColorSelectorComponent, isStandalone: false, selector: "tui-color-selector", inputs: { colors: "colors", colorSetter: ["color", "colorSetter"] }, outputs: { colorChange: "colorChange" }, ngImport: i0, template: "@if (selectorMode) {\n <div\n class=\"t-select\"\n [tuiDropdown]=\"menu\"\n [(tuiDropdownOpen)]=\"open\"\n >\n <button\n appearance=\"\"\n size=\"s\"\n tuiButton\n tuiChevron\n type=\"button\"\n >\n {{ currentMode }}\n </button>\n <ng-template #menu>\n <tui-data-list\n role=\"menu\"\n size=\"s\"\n class=\"t-menu\"\n >\n @for (mode of modes; track mode) {\n <button\n role=\"menuitemradio\"\n tuiOption\n type=\"button\"\n [attr.aria-checked]=\"isModeActive(mode)\"\n (click)=\"onModeSelect(mode)\"\n (keydown.enter.prevent)=\"onModeSelect(mode)\"\n (keydown.space.prevent)=\"onModeSelect(mode)\"\n >\n {{ mode }}\n @if (isModeActive(mode)) {\n <tui-icon\n class=\"t-checkmark\"\n [icon]=\"icons.check\"\n />\n }\n </button>\n }\n </tui-data-list>\n </ng-template>\n </div>\n <hr class=\"t-hr\" />\n}\n\n@if (isGradient) {\n <div\n class=\"t-wrapper\"\n [style.background]=\"gradient\"\n >\n <tui-linear-multi-picker\n class=\"t-gradient\"\n [value]=\"stopsKeys\"\n (indexChange)=\"onIndexChange($event)\"\n (valueChange)=\"onStopsChange($event)\"\n />\n </div>\n <div class=\"t-buttons\">\n <!-- TODO: Change to `tuiHintDescribe` when figure tuiDriver order issue -->\n @for (button of buttons; track button) {\n <button\n appearance=\"\"\n size=\"xs\"\n tuiHintDescribe\n tuiIconButton\n type=\"button\"\n class=\"t-direction\"\n [class.t-direction_active]=\"isDirectionActive(button)\"\n [iconStart]=\"getIcon(button)\"\n [tuiHint]=\"button\"\n (click)=\"onDirectionChange(button)\"\n ></button>\n }\n </div>\n}\n<tui-color-picker\n [color]=\"currentColor\"\n (colorChange)=\"onColorChange($event)\"\n/>\n@if (!isGradient) {\n <tui-color-edit\n orientation=\"horizontal\"\n tuiGroup\n class=\"t-edit\"\n [color]=\"color\"\n (colorChange)=\"onColorChange($event)\"\n />\n}\n@if (palette.size) {\n <tui-palette\n class=\"t-palette\"\n [colors]=\"palette\"\n (selectedColor)=\"onPalettePick($event)\"\n />\n}\n", styles: [":host{position:relative;display:block;isolation:isolate;inline-size:22.6rem}:host :host-context(*:disabled){pointer-events:none}.t-wrapper{position:relative;margin:1.25rem;border-radius:.5rem}.t-wrapper:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hr{block-size:1px;margin:0 0 0 -1px;border:none;background:var(--tui-base-03)}.t-gradient{margin:0 .5rem;border-radius:inherit}.t-select{margin:.75rem .5rem 0}.t-arrow{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-arrow_rotated{transform:rotate(180deg)}.t-menu{inline-size:11.25rem}.t-checkmark{margin-inline-start:auto;inline-size:1rem;block-size:1rem}.t-buttons{display:flex;padding:0 .75rem 1.25rem;justify-content:space-between}.t-direction{color:var(--tui-text-02);margin:0 .375rem}.t-direction:hover,.t-direction_active{color:var(--tui-text-01);background:var(--tui-secondary-hover)}.t-edit{margin:1.25rem}.t-palette{box-sizing:border-box;box-shadow:inset 0 1px var(--tui-base-03)}\n"], dependencies: [{ kind: "directive", type: i1$3.TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiColorPickerComponent, selector: "tui-color-picker", inputs: ["color"], outputs: ["colorChange"] }, { kind: "component", type: TuiLinearMultiPickerComponent, selector: "tui-linear-multi-picker", inputs: ["value"], outputs: ["valueChange", "indexChange"] }, { kind: "component", type: TuiColorEditComponent, selector: "tui-color-edit", inputs: ["color"], outputs: ["colorChange"] }, { kind: "directive", type: i1$1.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container):not(ng-template)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { kind: "directive", type: i1$1.TuiDropdownOpen, selector: "[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]", inputs: ["tuiDropdownEnabled", "tuiDropdownOpen"], outputs: ["tuiDropdownOpenChange"] }, { kind: "component", type: i2$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "component", type: i2$1.TuiOption, selector: "button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])", inputs: ["disabled", "value"] }, { kind: "directive", type: i7.TuiGroup, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "collapsed", "rounded", "size"] }, { kind: "component", type: TuiPaletteComponent, selector: "tui-palette", inputs: ["colors"], outputs: ["selectedColor"] }, { kind: "directive", type: i1$2.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintContext", "tuiHintAppearance", "tuiHint"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: i1$2.TuiHintDescribe, selector: "[tuiHintDescribe]", inputs: ["tuiHintDescribe"] }, { kind: "directive", type: i10.TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i11.TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
621
- }
622
- __decorate([
623
- tuiPure
624
- ], TuiColorSelectorComponent.prototype, "getStopsKeys", null);
625
- __decorate([
626
- tuiPure
627
- ], TuiColorSelectorComponent.prototype, "filterPalette", null);
628
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorSelectorComponent, decorators: [{
629
- type: Component,
630
- args: [{ standalone: false, selector: 'tui-color-selector', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (selectorMode) {\n <div\n class=\"t-select\"\n [tuiDropdown]=\"menu\"\n [(tuiDropdownOpen)]=\"open\"\n >\n <button\n appearance=\"\"\n size=\"s\"\n tuiButton\n tuiChevron\n type=\"button\"\n >\n {{ currentMode }}\n </button>\n <ng-template #menu>\n <tui-data-list\n role=\"menu\"\n size=\"s\"\n class=\"t-menu\"\n >\n @for (mode of modes; track mode) {\n <button\n role=\"menuitemradio\"\n tuiOption\n type=\"button\"\n [attr.aria-checked]=\"isModeActive(mode)\"\n (click)=\"onModeSelect(mode)\"\n (keydown.enter.prevent)=\"onModeSelect(mode)\"\n (keydown.space.prevent)=\"onModeSelect(mode)\"\n >\n {{ mode }}\n @if (isModeActive(mode)) {\n <tui-icon\n class=\"t-checkmark\"\n [icon]=\"icons.check\"\n />\n }\n </button>\n }\n </tui-data-list>\n </ng-template>\n </div>\n <hr class=\"t-hr\" />\n}\n\n@if (isGradient) {\n <div\n class=\"t-wrapper\"\n [style.background]=\"gradient\"\n >\n <tui-linear-multi-picker\n class=\"t-gradient\"\n [value]=\"stopsKeys\"\n (indexChange)=\"onIndexChange($event)\"\n (valueChange)=\"onStopsChange($event)\"\n />\n </div>\n <div class=\"t-buttons\">\n <!-- TODO: Change to `tuiHintDescribe` when figure tuiDriver order issue -->\n @for (button of buttons; track button) {\n <button\n appearance=\"\"\n size=\"xs\"\n tuiHintDescribe\n tuiIconButton\n type=\"button\"\n class=\"t-direction\"\n [class.t-direction_active]=\"isDirectionActive(button)\"\n [iconStart]=\"getIcon(button)\"\n [tuiHint]=\"button\"\n (click)=\"onDirectionChange(button)\"\n ></button>\n }\n </div>\n}\n<tui-color-picker\n [color]=\"currentColor\"\n (colorChange)=\"onColorChange($event)\"\n/>\n@if (!isGradient) {\n <tui-color-edit\n orientation=\"horizontal\"\n tuiGroup\n class=\"t-edit\"\n [color]=\"color\"\n (colorChange)=\"onColorChange($event)\"\n />\n}\n@if (palette.size) {\n <tui-palette\n class=\"t-palette\"\n [colors]=\"palette\"\n (selectedColor)=\"onPalettePick($event)\"\n />\n}\n", styles: [":host{position:relative;display:block;isolation:isolate;inline-size:22.6rem}:host :host-context(*:disabled){pointer-events:none}.t-wrapper{position:relative;margin:1.25rem;border-radius:.5rem}.t-wrapper:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hr{block-size:1px;margin:0 0 0 -1px;border:none;background:var(--tui-base-03)}.t-gradient{margin:0 .5rem;border-radius:inherit}.t-select{margin:.75rem .5rem 0}.t-arrow{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-arrow_rotated{transform:rotate(180deg)}.t-menu{inline-size:11.25rem}.t-checkmark{margin-inline-start:auto;inline-size:1rem;block-size:1rem}.t-buttons{display:flex;padding:0 .75rem 1.25rem;justify-content:space-between}.t-direction{color:var(--tui-text-02);margin:0 .375rem}.t-direction:hover,.t-direction_active{color:var(--tui-text-01);background:var(--tui-secondary-hover)}.t-edit{margin:1.25rem}.t-palette{box-sizing:border-box;box-shadow:inset 0 1px var(--tui-base-03)}\n"] }]
631
- }], propDecorators: { colors: [{
632
- type: Input
633
- }], colorChange: [{
634
- type: Output
635
- }], colorSetter: [{
636
- type: Input,
637
- args: ['color']
638
- }], getStopsKeys: [], filterPalette: [] } });
639
-
640
- /**
641
- * TODO(v5): delete it
642
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
643
- */
644
- class TuiLinearMultiPickerModule {
645
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLinearMultiPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
646
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiLinearMultiPickerModule, declarations: [TuiLinearMultiPickerComponent], imports: [CommonModule], exports: [TuiLinearMultiPickerComponent] }); }
647
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLinearMultiPickerModule, imports: [CommonModule] }); }
648
- }
649
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLinearMultiPickerModule, decorators: [{
650
- type: NgModule,
651
- args: [{
652
- imports: [CommonModule],
653
- declarations: [TuiLinearMultiPickerComponent],
654
- exports: [TuiLinearMultiPickerComponent],
655
- }]
656
- }] });
657
-
658
- /**
659
- * TODO(v5): delete it
660
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
661
- */
662
- class TuiPaletteModule {
663
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPaletteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
664
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiPaletteModule, declarations: [TuiPaletteComponent], imports: [CommonModule, i1$2.TuiHintComponent, i1$2.TuiHintDirective, i1$2.TuiHintOptionsDirective, i1$2.TuiHintUnstyled, i1$2.TuiHintDriver, i1$2.TuiHintPosition, i1$2.TuiHintHover, i1$2.TuiHintOverflow, i1$2.TuiHintDescribe, i1$2.TuiHintHost, i1$2.TuiHintManual, i1$2.TuiHintPointer], exports: [TuiPaletteComponent, i1$2.TuiHintComponent, i1$2.TuiHintDirective, i1$2.TuiHintOptionsDirective, i1$2.TuiHintUnstyled, i1$2.TuiHintDriver, i1$2.TuiHintPosition, i1$2.TuiHintHover, i1$2.TuiHintOverflow, i1$2.TuiHintDescribe, i1$2.TuiHintHost, i1$2.TuiHintManual, i1$2.TuiHintPointer] }); }
665
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPaletteModule, imports: [CommonModule, i1$2.TuiHintComponent] }); }
666
- }
667
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPaletteModule, decorators: [{
668
- type: NgModule,
669
- args: [{
670
- imports: [CommonModule, ...TuiHint],
671
- declarations: [TuiPaletteComponent],
672
- exports: [TuiPaletteComponent, ...TuiHint],
673
- }]
674
- }] });
675
-
676
- /**
677
- * TODO(v5): delete it
678
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
679
- */
680
- class TuiColorSelectorModule {
681
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
682
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiColorSelectorModule, declarations: [TuiColorSelectorComponent], imports: [CommonModule,
683
- TuiButton,
684
- TuiColorPickerModule,
685
- TuiLinearMultiPickerModule,
686
- TuiActiveZone,
687
- TuiColorEditModule,
688
- TuiGroup,
689
- TuiPaletteModule,
690
- TuiChevron,
691
- TuiIcon, i1$2.TuiHintComponent, i1$2.TuiHintDirective, i1$2.TuiHintOptionsDirective, i1$2.TuiHintUnstyled, i1$2.TuiHintDriver, i1$2.TuiHintPosition, i1$2.TuiHintHover, i1$2.TuiHintOverflow, i1$2.TuiHintDescribe, i1$2.TuiHintHost, i1$2.TuiHintManual, i1$2.TuiHintPointer, i2$1.TuiDataListComponent, i2$1.TuiDataListDirective, i2$1.TuiOption, i2$1.TuiOptionNew, i2$1.TuiOptionWithValue, i2$1.TuiOptGroup], exports: [TuiColorSelectorComponent, i1$2.TuiHintComponent, i1$2.TuiHintDirective, i1$2.TuiHintOptionsDirective, i1$2.TuiHintUnstyled, i1$2.TuiHintDriver, i1$2.TuiHintPosition, i1$2.TuiHintHover, i1$2.TuiHintOverflow, i1$2.TuiHintDescribe, i1$2.TuiHintHost, i1$2.TuiHintManual, i1$2.TuiHintPointer, i2$1.TuiDataListComponent, i2$1.TuiDataListDirective, i2$1.TuiOption, i2$1.TuiOptionNew, i2$1.TuiOptionWithValue, i2$1.TuiOptGroup] }); }
692
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorSelectorModule, imports: [CommonModule,
693
- TuiColorPickerModule,
694
- TuiLinearMultiPickerModule,
695
- TuiColorEditModule,
696
- TuiPaletteModule,
697
- TuiIcon, i1$2.TuiHintComponent, i2$1.TuiDataListComponent, i2$1.TuiOption] }); }
698
- }
699
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiColorSelectorModule, decorators: [{
700
- type: NgModule,
701
- args: [{
702
- imports: [
703
- CommonModule,
704
- TuiButton,
705
- TuiColorPickerModule,
706
- TuiLinearMultiPickerModule,
707
- TuiActiveZone,
708
- TuiColorEditModule,
709
- TuiGroup,
710
- TuiPaletteModule,
711
- TuiChevron,
712
- TuiIcon,
713
- ...TuiHint,
714
- ...TuiDataList,
715
- ],
716
- declarations: [TuiColorSelectorComponent],
717
- exports: [TuiColorSelectorComponent, ...TuiHint, ...TuiDataList],
718
- }]
719
- }] });
720
-
721
- /**
722
- * Generated bundle index. Do not edit.
723
- */
724
-
725
- export { TUI_COLOR_SELECTOR_DEFAULT_OPTIONS, TUI_COLOR_SELECTOR_MODE_NAMES, TUI_COLOR_SELECTOR_OPTIONS, TUI_DEFAULT_INPUT_COLORS, TuiColorEditComponent, TuiColorEditModule, TuiColorPickerComponent, TuiColorPickerModule, TuiColorSelectorComponent, TuiColorSelectorMode, TuiColorSelectorModule, TuiFlatPickerComponent, TuiFlatPickerModule, TuiLinearMultiPickerComponent, TuiLinearMultiPickerModule, TuiLinearPickerComponent, TuiLinearPickerModule, TuiPaletteComponent, TuiPaletteModule, TuiPickerService, tuiColorSelectorOptionsProvider };
726
- //# sourceMappingURL=taiga-ui-legacy-components-color-selector.mjs.map