@shival99/z-ui 2.1.32 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/shival99-z-ui-components-z-accordion.mjs +41 -25
- package/fesm2022/shival99-z-ui-components-z-accordion.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +176 -97
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-avatar.mjs +71 -40
- package/fesm2022/shival99-z-ui-components-z-avatar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs +26 -15
- package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-button-group.mjs +33 -21
- package/fesm2022/shival99-z-ui-components-z-button-group.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-button.mjs +32 -19
- package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +289 -172
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-card.mjs +34 -24
- package/fesm2022/shival99-z-ui-components-z-card.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-chat.mjs +85 -47
- package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +56 -31
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-code.mjs +29 -16
- package/fesm2022/shival99-z-ui-components-z-code.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-command.mjs +34 -19
- package/fesm2022/shival99-z-ui-components-z-command.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs +310 -88
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +32 -18
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +118 -62
- package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-empty.mjs +31 -17
- package/fesm2022/shival99-z-ui-components-z-empty.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-filter.mjs +81 -54
- package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs +240 -132
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-icon.mjs +39 -21
- package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs +173 -95
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs +88 -47
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-loading.mjs +31 -19
- package/fesm2022/shival99-z-ui-components-z-loading.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-marquee.mjs +42 -23
- package/fesm2022/shival99-z-ui-components-z-marquee.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs +87 -45
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-menu.mjs +126 -67
- package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-metric-card.mjs +42 -23
- package/fesm2022/shival99-z-ui-components-z-metric-card.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-modal.mjs +144 -80
- package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs +45 -24
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-popover.mjs +90 -57
- package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +51 -29
- package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-radio.mjs +36 -20
- package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +27 -15
- package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-select.mjs +239 -138
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-show-more.mjs +38 -21
- package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs +42 -23
- package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs +35 -19
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-steps.mjs +55 -31
- package/fesm2022/shival99-z-ui-components-z-steps.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-switch.mjs +60 -33
- package/fesm2022/shival99-z-ui-components-z-switch.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs +10875 -0
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs +534 -0
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-tags.mjs +72 -46
- package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs +254 -0
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-toast.mjs +53 -31
- package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +133 -56
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-upload.mjs +63 -36
- package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-i18n.mjs +2 -0
- package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-pipes.mjs +18 -18
- package/fesm2022/shival99-z-ui-services.mjs +35 -31
- package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
- package/package.json +16 -16
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +2 -2
- package/types/shival99-z-ui-components-z-card.d.ts +1 -2
- package/types/shival99-z-ui-components-z-drawer.d.ts +20 -2
- package/types/shival99-z-ui-components-z-gallery.d.ts +1 -2
- package/types/shival99-z-ui-components-z-select.d.ts +2 -2
- package/types/shival99-z-ui-components-z-table.d.ts +2293 -0
- package/types/shival99-z-ui-components-z-tabs.d.ts +92 -0
- package/types/shival99-z-ui-components-z-timeline.d.ts +71 -0
|
@@ -81,8 +81,10 @@ class ZInputComponent {
|
|
|
81
81
|
_toastService = inject(ZToastService);
|
|
82
82
|
_zTranslate = inject(ZTranslateService);
|
|
83
83
|
_maskConfig = inject(Z_NGX_MASK_CONFIG, { optional: true });
|
|
84
|
-
inputRef = viewChild('inputEl',
|
|
85
|
-
|
|
84
|
+
inputRef = viewChild('inputEl', /* @ts-ignore */
|
|
85
|
+
...(ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []));
|
|
86
|
+
nativeColorInputRef = viewChild('nativeColorInputEl', /* @ts-ignore */
|
|
87
|
+
...(ngDevMode ? [{ debugName: "nativeColorInputRef" }] : /* istanbul ignore next */ []));
|
|
86
88
|
zOnSearch = output();
|
|
87
89
|
zOnChange = output();
|
|
88
90
|
zOnBlur = output();
|
|
@@ -92,69 +94,113 @@ class ZInputComponent {
|
|
|
92
94
|
zOnColorCollapse = output();
|
|
93
95
|
zControl = output();
|
|
94
96
|
zEvent = output();
|
|
95
|
-
class = input('',
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
97
|
+
class = input('', /* @ts-ignore */
|
|
98
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
99
|
+
zType = input('text', /* @ts-ignore */
|
|
100
|
+
...(ngDevMode ? [{ debugName: "zType" }] : /* istanbul ignore next */ []));
|
|
101
|
+
zSize = input('default', /* @ts-ignore */
|
|
102
|
+
...(ngDevMode ? [{ debugName: "zSize" }] : /* istanbul ignore next */ []));
|
|
103
|
+
zAlign = input('left', /* @ts-ignore */
|
|
104
|
+
...(ngDevMode ? [{ debugName: "zAlign" }] : /* istanbul ignore next */ []));
|
|
105
|
+
zLabel = input('', /* @ts-ignore */
|
|
106
|
+
...(ngDevMode ? [{ debugName: "zLabel" }] : /* istanbul ignore next */ []));
|
|
107
|
+
zLabelClass = input('', /* @ts-ignore */
|
|
108
|
+
...(ngDevMode ? [{ debugName: "zLabelClass" }] : /* istanbul ignore next */ []));
|
|
109
|
+
zPlaceholder = input('', /* @ts-ignore */
|
|
110
|
+
...(ngDevMode ? [{ debugName: "zPlaceholder" }] : /* istanbul ignore next */ []));
|
|
111
|
+
zRequired = input(false, { ...(ngDevMode ? { debugName: "zRequired" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
112
|
+
zDisabled = input(false, { ...(ngDevMode ? { debugName: "zDisabled" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
113
|
+
zReadonly = input(false, { ...(ngDevMode ? { debugName: "zReadonly" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
114
|
+
zLoading = input(false, { ...(ngDevMode ? { debugName: "zLoading" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
115
|
+
zLoadingOutline = input(false, { ...(ngDevMode ? { debugName: "zLoadingOutline" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
116
|
+
zPrefix = input('', /* @ts-ignore */
|
|
117
|
+
...(ngDevMode ? [{ debugName: "zPrefix" }] : /* istanbul ignore next */ []));
|
|
118
|
+
zSuffix = input('', /* @ts-ignore */
|
|
119
|
+
...(ngDevMode ? [{ debugName: "zSuffix" }] : /* istanbul ignore next */ []));
|
|
120
|
+
zMin = input(undefined, /* @ts-ignore */
|
|
121
|
+
...(ngDevMode ? [{ debugName: "zMin" }] : /* istanbul ignore next */ []));
|
|
122
|
+
zMax = input(undefined, /* @ts-ignore */
|
|
123
|
+
...(ngDevMode ? [{ debugName: "zMax" }] : /* istanbul ignore next */ []));
|
|
124
|
+
zStep = input(1, /* @ts-ignore */
|
|
125
|
+
...(ngDevMode ? [{ debugName: "zStep" }] : /* istanbul ignore next */ []));
|
|
126
|
+
zShowArrows = input(true, { ...(ngDevMode ? { debugName: "zShowArrows" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
127
|
+
zMask = input('', /* @ts-ignore */
|
|
128
|
+
...(ngDevMode ? [{ debugName: "zMask" }] : /* istanbul ignore next */ []));
|
|
129
|
+
zDecimalPlaces = input(undefined, /* @ts-ignore */
|
|
130
|
+
...(ngDevMode ? [{ debugName: "zDecimalPlaces" }] : /* istanbul ignore next */ []));
|
|
131
|
+
zAllowNegative = input(false, { ...(ngDevMode ? { debugName: "zAllowNegative" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
132
|
+
zThousandSeparator = input(undefined, /* @ts-ignore */
|
|
133
|
+
...(ngDevMode ? [{ debugName: "zThousandSeparator" }] : /* istanbul ignore next */ []));
|
|
134
|
+
zDecimalMarker = input(undefined, /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "zDecimalMarker" }] : /* istanbul ignore next */ []));
|
|
136
|
+
zValidators = input([], /* @ts-ignore */
|
|
137
|
+
...(ngDevMode ? [{ debugName: "zValidators" }] : /* istanbul ignore next */ []));
|
|
138
|
+
zAsyncValidators = input([], /* @ts-ignore */
|
|
139
|
+
...(ngDevMode ? [{ debugName: "zAsyncValidators" }] : /* istanbul ignore next */ []));
|
|
140
|
+
zAsyncDebounce = input(300, /* @ts-ignore */
|
|
141
|
+
...(ngDevMode ? [{ debugName: "zAsyncDebounce" }] : /* istanbul ignore next */ []));
|
|
142
|
+
zAsyncValidateOn = input('change', /* @ts-ignore */
|
|
143
|
+
...(ngDevMode ? [{ debugName: "zAsyncValidateOn" }] : /* istanbul ignore next */ []));
|
|
144
|
+
zShowPasswordToggle = input(true, { ...(ngDevMode ? { debugName: "zShowPasswordToggle" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
145
|
+
zSearch = input(false, { ...(ngDevMode ? { debugName: "zSearch" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
146
|
+
zDebounce = input(300, /* @ts-ignore */
|
|
147
|
+
...(ngDevMode ? [{ debugName: "zDebounce" }] : /* istanbul ignore next */ []));
|
|
148
|
+
zAutofocus = input(false, { ...(ngDevMode ? { debugName: "zAutofocus" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
149
|
+
zAutoComplete = input('off', /* @ts-ignore */
|
|
150
|
+
...(ngDevMode ? [{ debugName: "zAutoComplete" }] : /* istanbul ignore next */ []));
|
|
151
|
+
zAllowClear = input(false, { ...(ngDevMode ? { debugName: "zAllowClear" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
152
|
+
zAutoSizeContent = input(false, { ...(ngDevMode ? { debugName: "zAutoSizeContent" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
153
|
+
zRows = input(3, /* @ts-ignore */
|
|
154
|
+
...(ngDevMode ? [{ debugName: "zRows" }] : /* istanbul ignore next */ []));
|
|
155
|
+
zResize = input(true, { ...(ngDevMode ? { debugName: "zResize" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
156
|
+
zMaxLength = input(undefined, /* @ts-ignore */
|
|
157
|
+
...(ngDevMode ? [{ debugName: "zMaxLength" }] : /* istanbul ignore next */ []));
|
|
158
|
+
zAutoSuggest = input(undefined, /* @ts-ignore */
|
|
159
|
+
...(ngDevMode ? [{ debugName: "zAutoSuggest" }] : /* istanbul ignore next */ []));
|
|
160
|
+
zColorConfig = input({}, /* @ts-ignore */
|
|
161
|
+
...(ngDevMode ? [{ debugName: "zColorConfig" }] : /* istanbul ignore next */ []));
|
|
162
|
+
_value = signal(null, /* @ts-ignore */
|
|
163
|
+
...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
|
|
164
|
+
_disabled = signal(false, /* @ts-ignore */
|
|
165
|
+
...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
166
|
+
_formControl = signal(null, /* @ts-ignore */
|
|
167
|
+
...(ngDevMode ? [{ debugName: "_formControl" }] : /* istanbul ignore next */ []));
|
|
168
|
+
_formStateVersion = signal(0, /* @ts-ignore */
|
|
169
|
+
...(ngDevMode ? [{ debugName: "_formStateVersion" }] : /* istanbul ignore next */ []));
|
|
170
|
+
_isNgModel = signal(false, /* @ts-ignore */
|
|
171
|
+
...(ngDevMode ? [{ debugName: "_isNgModel" }] : /* istanbul ignore next */ []));
|
|
172
|
+
_asyncErrors = signal(new Map(), /* @ts-ignore */
|
|
173
|
+
...(ngDevMode ? [{ debugName: "_asyncErrors" }] : /* istanbul ignore next */ []));
|
|
174
|
+
_customError = signal(null, /* @ts-ignore */
|
|
175
|
+
...(ngDevMode ? [{ debugName: "_customError" }] : /* istanbul ignore next */ []));
|
|
176
|
+
isLoading = computed(() => this.zLoading() || this.isValidating(), /* @ts-ignore */
|
|
177
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
142
178
|
_blossomColor = signal({
|
|
143
179
|
hue: 330,
|
|
144
180
|
saturation: 70,
|
|
145
181
|
alpha: 100,
|
|
146
182
|
layer: 'outer',
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
183
|
+
}, /* @ts-ignore */
|
|
184
|
+
...(ngDevMode ? [{ debugName: "_blossomColor" }] : /* istanbul ignore next */ []));
|
|
185
|
+
_colorPickerHsv = signal({ hue: 258, saturation: 65, value: 85 }, /* @ts-ignore */
|
|
186
|
+
...(ngDevMode ? [{ debugName: "_colorPickerHsv" }] : /* istanbul ignore next */ []));
|
|
187
|
+
_colorPickerRgb = signal({ red: 79, green: 70, blue: 229 }, /* @ts-ignore */
|
|
188
|
+
...(ngDevMode ? [{ debugName: "_colorPickerRgb" }] : /* istanbul ignore next */ []));
|
|
189
|
+
_colorPickerHsl = signal({ hue: 243, saturation: 75, lightness: 59 }, /* @ts-ignore */
|
|
190
|
+
...(ngDevMode ? [{ debugName: "_colorPickerHsl" }] : /* istanbul ignore next */ []));
|
|
191
|
+
_colorPickerAlpha = signal(100, /* @ts-ignore */
|
|
192
|
+
...(ngDevMode ? [{ debugName: "_colorPickerAlpha" }] : /* istanbul ignore next */ []));
|
|
193
|
+
_colorPickerFormat = signal('hex', /* @ts-ignore */
|
|
194
|
+
...(ngDevMode ? [{ debugName: "_colorPickerFormat" }] : /* istanbul ignore next */ []));
|
|
195
|
+
_colorPickerSavedColors = signal([], /* @ts-ignore */
|
|
196
|
+
...(ngDevMode ? [{ debugName: "_colorPickerSavedColors" }] : /* istanbul ignore next */ []));
|
|
154
197
|
inputId = zUuid('z-input');
|
|
155
|
-
suggestHistory = signal([],
|
|
156
|
-
|
|
157
|
-
|
|
198
|
+
suggestHistory = signal([], /* @ts-ignore */
|
|
199
|
+
...(ngDevMode ? [{ debugName: "suggestHistory" }] : /* istanbul ignore next */ []));
|
|
200
|
+
suggestActiveIndex = signal(-1, /* @ts-ignore */
|
|
201
|
+
...(ngDevMode ? [{ debugName: "suggestActiveIndex" }] : /* istanbul ignore next */ []));
|
|
202
|
+
isValidating = signal(false, /* @ts-ignore */
|
|
203
|
+
...(ngDevMode ? [{ debugName: "isValidating" }] : /* istanbul ignore next */ []));
|
|
158
204
|
uiState = signal({
|
|
159
205
|
passwordVisible: false,
|
|
160
206
|
isFocused: false,
|
|
@@ -162,7 +208,8 @@ class ZInputComponent {
|
|
|
162
208
|
dirty: false,
|
|
163
209
|
showSuggestPopover: false,
|
|
164
210
|
colorCopied: false,
|
|
165
|
-
},
|
|
211
|
+
}, /* @ts-ignore */
|
|
212
|
+
...(ngDevMode ? [{ debugName: "uiState" }] : /* istanbul ignore next */ []));
|
|
166
213
|
typeConfig = computed(() => {
|
|
167
214
|
const type = this.zType();
|
|
168
215
|
return {
|
|
@@ -171,7 +218,8 @@ class ZInputComponent {
|
|
|
171
218
|
isTextarea: type === 'textarea',
|
|
172
219
|
isNumber: type === 'number',
|
|
173
220
|
};
|
|
174
|
-
},
|
|
221
|
+
}, /* @ts-ignore */
|
|
222
|
+
...(ngDevMode ? [{ debugName: "typeConfig" }] : /* istanbul ignore next */ []));
|
|
175
223
|
slotConfig = computed(() => {
|
|
176
224
|
const prefix = this.zPrefix();
|
|
177
225
|
const suffix = this.zSuffix();
|
|
@@ -181,28 +229,35 @@ class ZInputComponent {
|
|
|
181
229
|
hasPrefix: this.zSearch() || !!prefix,
|
|
182
230
|
hasSuffix: !!suffix,
|
|
183
231
|
};
|
|
184
|
-
},
|
|
232
|
+
}, /* @ts-ignore */
|
|
233
|
+
...(ngDevMode ? [{ debugName: "slotConfig" }] : /* istanbul ignore next */ []));
|
|
185
234
|
maskConfig = computed(() => {
|
|
186
235
|
const effectiveMask = this._getEffectiveMask();
|
|
187
236
|
const effectiveType = this._getEffectiveType(effectiveMask);
|
|
188
237
|
const effectiveThousandSeparator = this._getEffectiveThousandSeparator();
|
|
189
238
|
const effectiveDecimalMarker = this._getEffectiveDecimalMarker();
|
|
190
239
|
return { effectiveMask, effectiveType, effectiveThousandSeparator, effectiveDecimalMarker };
|
|
191
|
-
},
|
|
240
|
+
}, /* @ts-ignore */
|
|
241
|
+
...(ngDevMode ? [{ debugName: "maskConfig" }] : /* istanbul ignore next */ []));
|
|
192
242
|
displayValue = computed(() => {
|
|
193
243
|
const val = this._value();
|
|
194
244
|
return val === null || val === undefined ? '' : String(val);
|
|
195
|
-
},
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
245
|
+
}, /* @ts-ignore */
|
|
246
|
+
...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
|
|
247
|
+
normalizedColorValue = computed(() => this._normalizeHexColor(this._value()), /* @ts-ignore */
|
|
248
|
+
...(ngDevMode ? [{ debugName: "normalizedColorValue" }] : /* istanbul ignore next */ []));
|
|
249
|
+
colorMode = computed(() => this.zColorConfig().mode ?? 'blossom', /* @ts-ignore */
|
|
250
|
+
...(ngDevMode ? [{ debugName: "colorMode" }] : /* istanbul ignore next */ []));
|
|
251
|
+
isBlossomColorMode = computed(() => this.colorMode() === 'blossom', /* @ts-ignore */
|
|
252
|
+
...(ngDevMode ? [{ debugName: "isBlossomColorMode" }] : /* istanbul ignore next */ []));
|
|
199
253
|
blossomCoreBorderColor = computed(() => {
|
|
200
254
|
const color = this.normalizedColorValue();
|
|
201
255
|
if (color === '#FFFFFF' || color === '#000000') {
|
|
202
256
|
return 'var(--border)';
|
|
203
257
|
}
|
|
204
258
|
return color;
|
|
205
|
-
},
|
|
259
|
+
}, /* @ts-ignore */
|
|
260
|
+
...(ngDevMode ? [{ debugName: "blossomCoreBorderColor" }] : /* istanbul ignore next */ []));
|
|
206
261
|
blossomColor = this._blossomColor.asReadonly();
|
|
207
262
|
colorPickerHsv = this._colorPickerHsv.asReadonly();
|
|
208
263
|
colorPickerRgbValue = this._colorPickerRgb.asReadonly();
|
|
@@ -215,17 +270,20 @@ class ZInputComponent {
|
|
|
215
270
|
{ label: 'HSL', value: 'hsl' },
|
|
216
271
|
{ label: 'HSV', value: 'hsv' },
|
|
217
272
|
];
|
|
218
|
-
colorPickerHueColor = computed(() => `hsl(${this.colorPickerHsv().hue} 100% 50%)`,
|
|
273
|
+
colorPickerHueColor = computed(() => `hsl(${this.colorPickerHsv().hue} 100% 50%)`, /* @ts-ignore */
|
|
274
|
+
...(ngDevMode ? [{ debugName: "colorPickerHueColor" }] : /* istanbul ignore next */ []));
|
|
219
275
|
colorPickerSvStyle = computed(() => ({
|
|
220
276
|
background: `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, ${this.colorPickerHueColor()})`,
|
|
221
|
-
}),
|
|
277
|
+
}), /* @ts-ignore */
|
|
278
|
+
...(ngDevMode ? [{ debugName: "colorPickerSvStyle" }] : /* istanbul ignore next */ []));
|
|
222
279
|
colorPickerCursorStyle = computed(() => {
|
|
223
280
|
const hsv = this.colorPickerHsv();
|
|
224
281
|
return {
|
|
225
282
|
left: `${hsv.saturation}%`,
|
|
226
283
|
top: `${100 - hsv.value}%`,
|
|
227
284
|
};
|
|
228
|
-
},
|
|
285
|
+
}, /* @ts-ignore */
|
|
286
|
+
...(ngDevMode ? [{ debugName: "colorPickerCursorStyle" }] : /* istanbul ignore next */ []));
|
|
229
287
|
defaultColorPickerSavedColors = computed(() => {
|
|
230
288
|
const { savedColors } = this.zColorConfig();
|
|
231
289
|
if (savedColors) {
|
|
@@ -249,16 +307,19 @@ class ZInputComponent {
|
|
|
249
307
|
'#E11D48',
|
|
250
308
|
'#22C55E',
|
|
251
309
|
]);
|
|
252
|
-
},
|
|
310
|
+
}, /* @ts-ignore */
|
|
311
|
+
...(ngDevMode ? [{ debugName: "defaultColorPickerSavedColors" }] : /* istanbul ignore next */ []));
|
|
253
312
|
colorPickerSavedColors = computed(() => {
|
|
254
313
|
const cachedColors = this._colorPickerSavedColors();
|
|
255
314
|
const fallbackColors = this.defaultColorPickerSavedColors();
|
|
256
315
|
return this._normalizeColorList([...cachedColors, ...fallbackColors]).slice(0, 8);
|
|
257
|
-
},
|
|
316
|
+
}, /* @ts-ignore */
|
|
317
|
+
...(ngDevMode ? [{ debugName: "colorPickerSavedColors" }] : /* istanbul ignore next */ []));
|
|
258
318
|
colorPickerSavedSwatches = computed(() => this.colorPickerSavedColors().map(color => ({
|
|
259
319
|
color,
|
|
260
320
|
isLight: this._isLightHexColor(color),
|
|
261
|
-
})),
|
|
321
|
+
})), /* @ts-ignore */
|
|
322
|
+
...(ngDevMode ? [{ debugName: "colorPickerSavedSwatches" }] : /* istanbul ignore next */ []));
|
|
262
323
|
blossomCoreSize = computed(() => {
|
|
263
324
|
const size = this.zSize();
|
|
264
325
|
if (size === 'sm') {
|
|
@@ -268,7 +329,8 @@ class ZInputComponent {
|
|
|
268
329
|
return 30;
|
|
269
330
|
}
|
|
270
331
|
return 26;
|
|
271
|
-
},
|
|
332
|
+
}, /* @ts-ignore */
|
|
333
|
+
...(ngDevMode ? [{ debugName: "blossomCoreSize" }] : /* istanbul ignore next */ []));
|
|
272
334
|
blossomOptions = computed(() => {
|
|
273
335
|
const config = this.zColorConfig();
|
|
274
336
|
return {
|
|
@@ -283,7 +345,8 @@ class ZInputComponent {
|
|
|
283
345
|
coreSize: config.coreSize ?? this.blossomCoreSize(),
|
|
284
346
|
petalSize: config.petalSize ?? 32,
|
|
285
347
|
};
|
|
286
|
-
},
|
|
348
|
+
}, /* @ts-ignore */
|
|
349
|
+
...(ngDevMode ? [{ debugName: "blossomOptions" }] : /* istanbul ignore next */ []));
|
|
287
350
|
blossomColors = computed(() => {
|
|
288
351
|
const customColors = this.zColorConfig().colors ?? [];
|
|
289
352
|
if (customColors.length > 0) {
|
|
@@ -294,18 +357,24 @@ class ZInputComponent {
|
|
|
294
357
|
return undefined;
|
|
295
358
|
}
|
|
296
359
|
return this._generateColorPalette(count);
|
|
297
|
-
},
|
|
360
|
+
}, /* @ts-ignore */
|
|
361
|
+
...(ngDevMode ? [{ debugName: "blossomColors" }] : /* istanbul ignore next */ []));
|
|
298
362
|
hasValue = computed(() => {
|
|
299
363
|
const value = this._value();
|
|
300
364
|
return value !== null && value !== undefined && value !== '';
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
|
|
365
|
+
}, /* @ts-ignore */
|
|
366
|
+
...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
367
|
+
isDisabled = computed(() => this._disabled() || this.zDisabled(), /* @ts-ignore */
|
|
368
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
369
|
+
showArrows = computed(() => this.typeConfig().isNumber && this.zShowArrows(), /* @ts-ignore */
|
|
370
|
+
...(ngDevMode ? [{ debugName: "showArrows" }] : /* istanbul ignore next */ []));
|
|
304
371
|
hasAutoSuggest = computed(() => {
|
|
305
372
|
const key = this.zAutoSuggest();
|
|
306
373
|
return key !== undefined && key.length > 0;
|
|
307
|
-
},
|
|
308
|
-
|
|
374
|
+
}, /* @ts-ignore */
|
|
375
|
+
...(ngDevMode ? [{ debugName: "hasAutoSuggest" }] : /* istanbul ignore next */ []));
|
|
376
|
+
showClearButton = computed(() => this.zAllowClear() && this.hasValue() && !this.isDisabled() && !this.zReadonly(), /* @ts-ignore */
|
|
377
|
+
...(ngDevMode ? [{ debugName: "showClearButton" }] : /* istanbul ignore next */ []));
|
|
309
378
|
currentStatus = computed(() => {
|
|
310
379
|
if (this.isDisabled()) {
|
|
311
380
|
return 'disabled';
|
|
@@ -317,7 +386,8 @@ class ZInputComponent {
|
|
|
317
386
|
return 'error';
|
|
318
387
|
}
|
|
319
388
|
return 'default';
|
|
320
|
-
},
|
|
389
|
+
}, /* @ts-ignore */
|
|
390
|
+
...(ngDevMode ? [{ debugName: "currentStatus" }] : /* istanbul ignore next */ []));
|
|
321
391
|
alignClass = computed(() => {
|
|
322
392
|
const align = this.zAlign();
|
|
323
393
|
return align === 'center'
|
|
@@ -325,10 +395,14 @@ class ZInputComponent {
|
|
|
325
395
|
: align === 'right'
|
|
326
396
|
? '[&_.z-input-native]:text-right'
|
|
327
397
|
: '';
|
|
328
|
-
},
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
398
|
+
}, /* @ts-ignore */
|
|
399
|
+
...(ngDevMode ? [{ debugName: "alignClass" }] : /* istanbul ignore next */ []));
|
|
400
|
+
inputClasses = computed(() => zMergeClasses(zInputVariants({ zSize: this.zSize(), zStatus: this.currentStatus() }), this.loadingOutlineClass(), this.alignClass(), this.class()), /* @ts-ignore */
|
|
401
|
+
...(ngDevMode ? [{ debugName: "inputClasses" }] : /* istanbul ignore next */ []));
|
|
402
|
+
textareaClasses = computed(() => zMergeClasses(zTextareaVariants({ zStatus: this.currentStatus() }), this.loadingOutlineClass(), this.alignClass(), this.class()), /* @ts-ignore */
|
|
403
|
+
...(ngDevMode ? [{ debugName: "textareaClasses" }] : /* istanbul ignore next */ []));
|
|
404
|
+
loadingOutlineClass = computed(() => this.zLoading() && this.zLoadingOutline() ? 'z-loading-outline-active !ring-ring/50 !ring-[3px]' : '', /* @ts-ignore */
|
|
405
|
+
...(ngDevMode ? [{ debugName: "loadingOutlineClass" }] : /* istanbul ignore next */ []));
|
|
332
406
|
filteredSuggestHistory = computed(() => {
|
|
333
407
|
const history = this.suggestHistory();
|
|
334
408
|
const currentValue = String(this._value() ?? '')
|
|
@@ -344,7 +418,8 @@ class ZInputComponent {
|
|
|
344
418
|
target.push(item);
|
|
345
419
|
}
|
|
346
420
|
return [...matching, ...nonMatching];
|
|
347
|
-
},
|
|
421
|
+
}, /* @ts-ignore */
|
|
422
|
+
...(ngDevMode ? [{ debugName: "filteredSuggestHistory" }] : /* istanbul ignore next */ []));
|
|
348
423
|
_shouldShowValidation = computed(() => {
|
|
349
424
|
const control = this._formControl();
|
|
350
425
|
this._formStateVersion();
|
|
@@ -355,7 +430,8 @@ class ZInputComponent {
|
|
|
355
430
|
return control.dirty;
|
|
356
431
|
}
|
|
357
432
|
return this.uiState().dirty || this.uiState().touched;
|
|
358
|
-
},
|
|
433
|
+
}, /* @ts-ignore */
|
|
434
|
+
...(ngDevMode ? [{ debugName: "_shouldShowValidation" }] : /* istanbul ignore next */ []));
|
|
359
435
|
hasError = computed(() => {
|
|
360
436
|
if (this._customError()) {
|
|
361
437
|
return true;
|
|
@@ -374,7 +450,8 @@ class ZInputComponent {
|
|
|
374
450
|
return false;
|
|
375
451
|
}
|
|
376
452
|
return control.invalid && this._shouldShowValidation();
|
|
377
|
-
},
|
|
453
|
+
}, /* @ts-ignore */
|
|
454
|
+
...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
378
455
|
errorMessage = computed(() => {
|
|
379
456
|
const customError = this._customError();
|
|
380
457
|
if (customError) {
|
|
@@ -402,7 +479,8 @@ class ZInputComponent {
|
|
|
402
479
|
this._zTranslate.currentLang();
|
|
403
480
|
const errorInfo = getDefaultErrorInfo(errors);
|
|
404
481
|
return this._zTranslate.instant(errorInfo.key, errorInfo.params);
|
|
405
|
-
},
|
|
482
|
+
}, /* @ts-ignore */
|
|
483
|
+
...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
406
484
|
_translateValidationMessage(message) {
|
|
407
485
|
this._zTranslate.currentLang();
|
|
408
486
|
return this._zTranslate.instant(message);
|
|
@@ -1381,17 +1459,17 @@ class ZInputComponent {
|
|
|
1381
1459
|
}
|
|
1382
1460
|
return generated.slice(0, safeCount);
|
|
1383
1461
|
}
|
|
1384
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1385
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1462
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1463
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: ZInputComponent, isStandalone: true, selector: "z-input", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zAlign: { classPropertyName: "zAlign", publicName: "zAlign", isSignal: true, isRequired: false, transformFunction: null }, zLabel: { classPropertyName: "zLabel", publicName: "zLabel", isSignal: true, isRequired: false, transformFunction: null }, zLabelClass: { classPropertyName: "zLabelClass", publicName: "zLabelClass", isSignal: true, isRequired: false, transformFunction: null }, zPlaceholder: { classPropertyName: "zPlaceholder", publicName: "zPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, zRequired: { classPropertyName: "zRequired", publicName: "zRequired", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null }, zReadonly: { classPropertyName: "zReadonly", publicName: "zReadonly", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null }, zLoadingOutline: { classPropertyName: "zLoadingOutline", publicName: "zLoadingOutline", isSignal: true, isRequired: false, transformFunction: null }, zPrefix: { classPropertyName: "zPrefix", publicName: "zPrefix", isSignal: true, isRequired: false, transformFunction: null }, zSuffix: { classPropertyName: "zSuffix", publicName: "zSuffix", isSignal: true, isRequired: false, transformFunction: null }, zMin: { classPropertyName: "zMin", publicName: "zMin", isSignal: true, isRequired: false, transformFunction: null }, zMax: { classPropertyName: "zMax", publicName: "zMax", isSignal: true, isRequired: false, transformFunction: null }, zStep: { classPropertyName: "zStep", publicName: "zStep", isSignal: true, isRequired: false, transformFunction: null }, zShowArrows: { classPropertyName: "zShowArrows", publicName: "zShowArrows", isSignal: true, isRequired: false, transformFunction: null }, zMask: { classPropertyName: "zMask", publicName: "zMask", isSignal: true, isRequired: false, transformFunction: null }, zDecimalPlaces: { classPropertyName: "zDecimalPlaces", publicName: "zDecimalPlaces", isSignal: true, isRequired: false, transformFunction: null }, zAllowNegative: { classPropertyName: "zAllowNegative", publicName: "zAllowNegative", isSignal: true, isRequired: false, transformFunction: null }, zThousandSeparator: { classPropertyName: "zThousandSeparator", publicName: "zThousandSeparator", isSignal: true, isRequired: false, transformFunction: null }, zDecimalMarker: { classPropertyName: "zDecimalMarker", publicName: "zDecimalMarker", isSignal: true, isRequired: false, transformFunction: null }, zValidators: { classPropertyName: "zValidators", publicName: "zValidators", isSignal: true, isRequired: false, transformFunction: null }, zAsyncValidators: { classPropertyName: "zAsyncValidators", publicName: "zAsyncValidators", isSignal: true, isRequired: false, transformFunction: null }, zAsyncDebounce: { classPropertyName: "zAsyncDebounce", publicName: "zAsyncDebounce", isSignal: true, isRequired: false, transformFunction: null }, zAsyncValidateOn: { classPropertyName: "zAsyncValidateOn", publicName: "zAsyncValidateOn", isSignal: true, isRequired: false, transformFunction: null }, zShowPasswordToggle: { classPropertyName: "zShowPasswordToggle", publicName: "zShowPasswordToggle", isSignal: true, isRequired: false, transformFunction: null }, zSearch: { classPropertyName: "zSearch", publicName: "zSearch", isSignal: true, isRequired: false, transformFunction: null }, zDebounce: { classPropertyName: "zDebounce", publicName: "zDebounce", isSignal: true, isRequired: false, transformFunction: null }, zAutofocus: { classPropertyName: "zAutofocus", publicName: "zAutofocus", isSignal: true, isRequired: false, transformFunction: null }, zAutoComplete: { classPropertyName: "zAutoComplete", publicName: "zAutoComplete", isSignal: true, isRequired: false, transformFunction: null }, zAllowClear: { classPropertyName: "zAllowClear", publicName: "zAllowClear", isSignal: true, isRequired: false, transformFunction: null }, zAutoSizeContent: { classPropertyName: "zAutoSizeContent", publicName: "zAutoSizeContent", isSignal: true, isRequired: false, transformFunction: null }, zRows: { classPropertyName: "zRows", publicName: "zRows", isSignal: true, isRequired: false, transformFunction: null }, zResize: { classPropertyName: "zResize", publicName: "zResize", isSignal: true, isRequired: false, transformFunction: null }, zMaxLength: { classPropertyName: "zMaxLength", publicName: "zMaxLength", isSignal: true, isRequired: false, transformFunction: null }, zAutoSuggest: { classPropertyName: "zAutoSuggest", publicName: "zAutoSuggest", isSignal: true, isRequired: false, transformFunction: null }, zColorConfig: { classPropertyName: "zColorConfig", publicName: "zColorConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnSearch: "zOnSearch", zOnChange: "zOnChange", zOnBlur: "zOnBlur", zOnFocus: "zOnFocus", zOnKeydown: "zOnKeydown", zOnEnter: "zOnEnter", zOnColorCollapse: "zOnColorCollapse", zControl: "zControl", zEvent: "zEvent" }, providers: [
|
|
1386
1464
|
provideNgxMask(),
|
|
1387
1465
|
{
|
|
1388
1466
|
provide: NG_VALUE_ACCESSOR,
|
|
1389
1467
|
useExisting: forwardRef(() => ZInputComponent),
|
|
1390
1468
|
multi: true,
|
|
1391
1469
|
},
|
|
1392
|
-
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "nativeColorInputRef", first: true, predicate: ["nativeColorInputEl"], descendants: true, isSignal: true }], exportAs: ["zInput"], ngImport: i0, template: "<div class=\"z-input-wrapper flex w-full flex-col gap-2\">\n @if (zLabel()) {\n <label [for]=\"inputId\" class=\"text-xs leading-none font-medium\" [class]=\"zLabelClass()\">\n {{ zLabel() | translate }}\n @if (zRequired()) {\n <span class=\"text-destructive! ml-0.5\">*</span>\n }\n </label>\n }\n\n @if (typeConfig().isTextarea) {\n <div class=\"relative w-full\" [class]=\"textareaClasses()\" [class.overflow-auto]=\"zAutoSizeContent()\">\n <textarea\n #inputEl\n [id]=\"inputId\"\n [placeholder]=\"zPlaceholder() | translate\"\n class=\"z-input-native placeholder:text-muted-foreground m-0 block min-h-14 w-full resize-none bg-transparent p-2 text-sm outline-none\"\n [class.resize-y]=\"zResize() && !isDisabled() && !zReadonly()\"\n [class.field-sizing-content]=\"zAutoSizeContent()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"zReadonly()\"\n [autocomplete]=\"zAutoComplete()\"\n [rows]=\"zRows()\"\n [attr.maxlength]=\"zMaxLength()\"\n [ngModel]=\"displayValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event)\"></textarea>\n @if (zMaxLength()) {\n <div class=\"flex justify-end pr-1 pb-1\">\n <span class=\"text-muted-foreground text-xs\">{{ displayValue().length }} / {{ zMaxLength() }}</span>\n </div>\n }\n @if (zResize() && !isDisabled() && !zReadonly() && !zMaxLength()) {\n <svg\n class=\"text-muted-foreground pointer-events-none absolute right-0.5 bottom-0.5 opacity-40\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\">\n <path d=\"M10 2L2 10\" />\n <path d=\"M10 6L6 10\" />\n </svg>\n }\n </div>\n } @else {\n <div class=\"relative w-full\">\n <div\n class=\"z-input-container flex w-full items-center\"\n [class]=\"inputClasses()\"\n z-tooltip\n [zContent]=\"displayValue()\"\n [zTooltipDisabled]=\"typeConfig().isColor || uiState().isFocused || uiState().showSuggestPopover || !hasValue()\"\n [zTriggerElement]=\"inputEl\">\n <!-- Color picker square (prefix for color type) -->\n @if (typeConfig().isColor) {\n <div class=\"z-[10] shrink-0\">\n @if (isBlossomColorMode()) {\n <blossom-color-picker\n class=\"z-input-blossom flex items-center justify-center [&>div:first-child]:flex\"\n [style.--z-bcp-core-size.px]=\"blossomOptions().coreSize\"\n [style.--z-bcp-core-border-color]=\"blossomCoreBorderColor()\"\n [value]=\"blossomColor()\"\n [defaultValue]=\"blossomOptions().defaultValue\"\n [colors]=\"blossomColors()\"\n [disabled]=\"isDisabled() || zReadonly()\"\n [openOnHover]=\"blossomOptions().openOnHover\"\n [initialExpanded]=\"blossomOptions().initialExpanded\"\n [animationDuration]=\"blossomOptions().animationDuration\"\n [showAlphaSlider]=\"blossomOptions().showAlphaSlider\"\n [coreSize]=\"blossomOptions().coreSize\"\n [petalSize]=\"blossomOptions().petalSize\"\n [showCoreColor]=\"blossomOptions().showCoreColor\"\n [sliderPosition]=\"blossomOptions().sliderPosition\"\n [adaptivePositioning]=\"blossomOptions().adaptivePositioning\"\n (colorChange)=\"onBlossomColorChange($event)\"\n (colorCollapse)=\"onBlossomColorCollapse($event)\" />\n } @else {\n <button\n type=\"button\"\n class=\"z-input-color-trigger\"\n z-popover\n [zPopoverContent]=\"colorPickerPopover\"\n zTrigger=\"click\"\n zPosition=\"bottom-left\"\n zClass=\"z-input-color-picker-popover\"\n [zOffset]=\"8\"\n [zPopoverWidth]=\"330\"\n [zDisabled]=\"isDisabled() || zReadonly()\"\n [style.--z-bcp-core-size.px]=\"blossomOptions().coreSize\"\n [style.background]=\"normalizedColorValue()\"\n (zControl)=\"onColorPickerControl($event)\"\n (zShow)=\"onColorPickerOpen()\"\n (mousedown)=\"$event.preventDefault()\"\n [attr.aria-label]=\"'Color picker'\"></button>\n }\n </div>\n }\n\n @if (slotConfig().hasPrefix && !typeConfig().isColor) {\n <div class=\"text-muted-foreground left-3 flex items-center justify-center\">\n @if (zSearch()) {\n <z-icon zType=\"lucideSearch\" zSize=\"16\" />\n } @else if (slotConfig().isPrefixTemplate) {\n <ng-container *ngTemplateOutlet=\"$any(zPrefix())\" />\n } @else {\n {{ zPrefix() }}\n }\n </div>\n }\n\n <input\n #inputEl\n [id]=\"inputId\"\n [type]=\"typeConfig().isColor ? 'text' : maskConfig().effectiveType\"\n [placeholder]=\"zPlaceholder() | translate\"\n class=\"z-input-native placeholder:text-muted-foreground h-full min-w-0 flex-1 bg-transparent text-sm outline-none\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"typeConfig().isColor ? true : zReadonly()\"\n [attr.min]=\"zMin()\"\n [attr.max]=\"zMax()\"\n [attr.step]=\"zStep()\"\n [autocomplete]=\"zAutoComplete()\"\n [ngModel]=\"typeConfig().isColor ? normalizedColorValue() : displayValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event); onSuggestKeydown($event)\"\n [mask]=\"maskConfig().effectiveMask\"\n [thousandSeparator]=\"maskConfig().effectiveThousandSeparator\"\n [decimalMarker]=\"maskConfig().effectiveDecimalMarker\"\n [allowNegativeNumbers]=\"zAllowNegative()\"\n [dropSpecialCharacters]=\"false\" />\n\n @if (slotConfig().hasSuffix && !typeConfig().isColor) {\n <div class=\"text-muted-foreground flex items-center justify-center text-sm\">\n @if (slotConfig().isSuffixTemplate) {\n <ng-container *ngTemplateOutlet=\"$any(zSuffix())\" />\n } @else {\n {{ zSuffix() }}\n }\n </div>\n }\n\n @if (isLoading()) {\n <div class=\"text-muted-foreground flex items-center justify-center\">\n <z-icon zType=\"lucideLoader2\" zSize=\"16\" class=\"animate-spin\" />\n </div>\n }\n\n <!-- Clear button -->\n @if (showClearButton()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm transition-colors\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clearValue($event)\">\n <z-icon zType=\"lucideX\" zSize=\"14\" />\n </button>\n }\n\n <!-- Copy button for color type -->\n @if (typeConfig().isColor) {\n <input\n #nativeColorInputEl\n type=\"color\"\n class=\"z-input-native-color\"\n [ngModel]=\"normalizedColorValue()\"\n (ngModelChange)=\"onColorPickerHexChange($event)\"\n tabindex=\"-1\"\n aria-hidden=\"true\" />\n\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground hover:bg-accent flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-sm transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"copyColorToClipboard()\">\n <span class=\"relative flex size-4 items-center justify-center\">\n <z-icon\n zType=\"lucideCopy\"\n [class]=\"uiState().colorCopied ? 'scale-0 rotate-90 opacity-0' : 'scale-100 rotate-0 opacity-100'\"\n class=\"absolute transition-all duration-200 ease-out\"\n zSize=\"14\" />\n <z-icon\n zType=\"lucideCheck\"\n [class]=\"\n uiState().colorCopied ? 'text-success scale-100 rotate-0 opacity-100' : 'scale-0 -rotate-90 opacity-0'\n \"\n class=\"absolute transition-all duration-200 ease-out\"\n zSize=\"14\" />\n </span>\n </button>\n }\n\n @if (showArrows() && !isDisabled()) {\n <div class=\"-mr-1 flex h-[calc(100%-0.25rem)] shrink-0 flex-col\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:bg-accent hover:text-foreground flex w-5 flex-1 cursor-pointer items-center justify-center rounded-sm transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onArrowClick($event, 'up')\">\n <z-icon zType=\"lucideChevronUp\" zSize=\"12\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:bg-accent hover:text-foreground flex w-5 flex-1 cursor-pointer items-center justify-center rounded-sm transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onArrowClick($event, 'down')\">\n <z-icon zType=\"lucideChevronDown\" zSize=\"12\" />\n </button>\n </div>\n }\n\n @if (typeConfig().isPassword && zShowPasswordToggle()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-sm transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"togglePasswordVisibility()\">\n @if (uiState().passwordVisible) {\n <z-icon zType=\"lucideEyeOff\" zSize=\"16\" />\n } @else {\n <z-icon zType=\"lucideEye\" zSize=\"16\" />\n }\n </button>\n }\n </div>\n\n @if (hasAutoSuggest() && uiState().showSuggestPopover && suggestHistory().length > 0) {\n <div\n class=\"bg-popover text-popover-foreground border-border z-animate-in z-fade-in z-duration-200 z-slide-in-from-top-4 absolute top-full left-0 z-50 mt-1 flex w-full flex-col gap-[0.1875rem] rounded-sm border p-1 shadow-md\">\n @for (item of filteredSuggestHistory(); track item; let i = $index) {\n <button\n type=\"button\"\n class=\"hover:bg-primary/10 hover:text-foreground flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm transition-colors\"\n [class.bg-primary/15]=\"suggestActiveIndex() === i\"\n [class.text-primary]=\"suggestActiveIndex() === i\"\n (mousedown)=\"selectSuggestItem(item)\">\n <z-icon zType=\"lucideClock\" zSize=\"14\" class=\"text-muted-foreground shrink-0\" />\n <span class=\"truncate\">{{ item }}</span>\n </button>\n }\n </div>\n }\n </div>\n }\n\n <ng-template #colorPickerPopover>\n <div class=\"z-input-color-picker\" [style.--z-input-color-picker-current]=\"normalizedColorValue()\">\n <div\n class=\"z-input-color-picker-plane\"\n [style]=\"colorPickerSvStyle()\"\n (pointerdown)=\"onColorPickerSvPointerDown($event)\"\n (pointermove)=\"onColorPickerSvPointerMove($event)\">\n <span class=\"z-input-color-picker-cursor\" [style]=\"colorPickerCursorStyle()\"></span>\n </div>\n\n <div class=\"z-input-color-picker-controls\">\n <button\n type=\"button\"\n z-button\n zType=\"outline\"\n zSize=\"sm\"\n aria-label=\"Pick color\"\n zTypeIcon=\"lucidePencil\"\n (click)=\"openNativeColorPicker()\"></button>\n <div class=\"z-input-color-picker-sliders\">\n <input\n type=\"range\"\n min=\"0\"\n max=\"360\"\n [ngModel]=\"colorPickerHsv().hue\"\n class=\"z-input-color-picker-hue\"\n (input)=\"onColorPickerHueInput($event)\" />\n <input\n type=\"range\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"colorPickerAlpha()\"\n class=\"z-input-color-picker-alpha\"\n (input)=\"onColorPickerAlphaInput($event)\" />\n </div>\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <div class=\"z-input-color-picker-fields\">\n <z-select\n zSize=\"sm\"\n class=\"z-input-color-picker-format\"\n [zOptions]=\"colorPickerFormatOptions\"\n [zShowSearch]=\"false\"\n [zTranslateLabels]=\"false\"\n [ngModel]=\"colorPickerFormat()\"\n (ngModelChange)=\"onColorPickerFormatChange($event)\" />\n <div class=\"z-input-color-picker-value-group\">\n @switch (colorPickerFormat()) {\n @case ('rgb') {\n <div class=\"z-input-color-picker-channel-group\">\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"R\"\n [zMin]=\"0\"\n [zMax]=\"255\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerRgbValue().red\"\n (ngModelChange)=\"onColorPickerRgbChange('red', $event)\" />\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"G\"\n [zMin]=\"0\"\n [zMax]=\"255\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerRgbValue().green\"\n (ngModelChange)=\"onColorPickerRgbChange('green', $event)\" />\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"B\"\n [zMin]=\"0\"\n [zMax]=\"255\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerRgbValue().blue\"\n (ngModelChange)=\"onColorPickerRgbChange('blue', $event)\" />\n </div>\n }\n @case ('hsl') {\n <div class=\"z-input-color-picker-channel-group\">\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"H\"\n [zMin]=\"0\"\n [zMax]=\"360\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerHslValue().hue\"\n (ngModelChange)=\"onColorPickerHslChange('hue', $event)\" />\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"S\"\n [zMin]=\"0\"\n [zMax]=\"100\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerHslValue().saturation\"\n (ngModelChange)=\"onColorPickerHslChange('saturation', $event)\" />\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"L\"\n [zMin]=\"0\"\n [zMax]=\"100\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerHslValue().lightness\"\n (ngModelChange)=\"onColorPickerHslChange('lightness', $event)\" />\n </div>\n }\n @case ('hsv') {\n <div class=\"z-input-color-picker-channel-group\">\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"H\"\n [zMin]=\"0\"\n [zMax]=\"360\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerHsv().hue\"\n (ngModelChange)=\"onColorPickerHsvValueChange('hue', $event)\" />\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"S\"\n [zMin]=\"0\"\n [zMax]=\"100\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerHsv().saturation\"\n (ngModelChange)=\"onColorPickerHsvValueChange('saturation', $event)\" />\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"V\"\n [zMin]=\"0\"\n [zMax]=\"100\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerHsv().value\"\n (ngModelChange)=\"onColorPickerHsvValueChange('value', $event)\" />\n </div>\n }\n @default {\n <z-input\n zSize=\"sm\"\n class=\"z-input-color-picker-hex-input\"\n [ngModel]=\"normalizedColorValue()\"\n (ngModelChange)=\"onColorPickerHexChange($event)\" />\n }\n }\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n class=\"z-input-color-picker-alpha-input\"\n [zMin]=\"0\"\n [zMax]=\"100\"\n zSuffix=\"%\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerAlpha()\"\n (ngModelChange)=\"onColorPickerAlphaValueChange($event)\" />\n </div>\n </div>\n\n <div class=\"z-input-color-picker-saved-head\">\n <span>{{ 'i18n_z_ui_input_saved_colors' | translate }}</span>\n <button type=\"button\" z-button zType=\"ghost\" zSize=\"sm\" (click)=\"addCurrentColorToSaved()\">\n {{ 'i18n_z_ui_input_add_color' | translate }}\n </button>\n </div>\n <div class=\"z-input-color-picker-swatches\">\n @for (swatch of colorPickerSavedSwatches(); track swatch.color) {\n <button\n type=\"button\"\n class=\"z-input-color-picker-swatch rounded-[3px]!\"\n [class.z-input-color-picker-swatch-active]=\"swatch.color === normalizedColorValue()\"\n [class.z-input-color-picker-swatch-light]=\"swatch.isLight\"\n [style.--z-input-color-picker-swatch-color]=\"swatch.color\"\n [attr.aria-label]=\"swatch.color\"\n (click)=\"selectSavedColor(swatch.color)\"></button>\n }\n </div>\n </div>\n </div>\n </ng-template>\n\n @if (hasError()) {\n <p class=\"text-destructive animate-in fade-in slide-in-from-top-1 m-0 text-xs duration-200\">\n {{ errorMessage() }}\n </p>\n }\n</div>\n", styles: [".z-input-native{text-overflow:ellipsis;overflow:hidden}.z-input-native:-webkit-autofill,.z-input-native:-webkit-autofill:hover,.z-input-native:-webkit-autofill:focus,.z-input-native:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px white inset!important;-webkit-text-fill-color:var(--color-foreground)!important;transition:background-color 9999s ease-in-out 0s!important;caret-color:var(--color-foreground)}:is(.dark,.dark *) .z-input-native:-webkit-autofill,:is(.dark,.dark *) .z-input-native:-webkit-autofill:hover,:is(.dark,.dark *) .z-input-native:-webkit-autofill:focus,:is(.dark,.dark *) .z-input-native:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px var(--input-autofill) inset!important;transition:background-color 9999s ease-in-out 0s!important}textarea.z-input-native::-webkit-resizer{display:none}input[type=number].z-input-native::-webkit-inner-spin-button,input[type=number].z-input-native::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number].z-input-native{-moz-appearance:textfield;appearance:textfield}input[type=color]{cursor:pointer}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:var(--radius-sm)}input[type=color]::-moz-color-swatch{border:none;border-radius:var(--radius-sm)}.z-input-container{position:relative;overflow:visible}.z-input-container:has(.z-input-blossom .bcp-core[aria-expanded=true]){z-index:40}.z-input-blossom,.z-input-blossom .bcp-root{position:relative;z-index:41;overflow:visible}.z-input-blossom .bcp-container{z-index:42!important}.z-input-blossom .bcp-core{width:var(--z-bcp-core-size, 1.125rem)!important;height:var(--z-bcp-core-size, 1.125rem)!important;min-width:var(--z-bcp-core-size, 1.125rem)!important;min-height:var(--z-bcp-core-size, 1.125rem)!important;border-radius:var(--radius-xs, .125rem)!important;border:1px solid var(--z-bcp-core-border-color, rgba(0, 0, 0, .14))!important;box-shadow:none!important;transition:border-radius .18s cubic-bezier(.22,1,.36,1),border-color .16s ease,transform .18s cubic-bezier(.22,1,.36,1)!important}.z-input-blossom .bcp-core[aria-expanded=true]{border-radius:624.9375rem!important;border-color:transparent!important;box-shadow:0 3px 10px #00000029!important;transform:scale(1.03)!important}.z-input-blossom .bcp-core[aria-expanded=false]{transform:scale(1)!important}.z-input-color-trigger{display:block;width:var(--z-bcp-core-size, 1.625rem);height:var(--z-bcp-core-size, 1.625rem);align-self:center;cursor:pointer;border:1px solid var(--border);border-radius:var(--radius-xs, .125rem);box-shadow:none}.z-input-native-color{position:absolute;width:0;height:0;opacity:0;pointer-events:none}.z-input-color-picker-popover{padding:.75rem;border-radius:.5rem}.z-input-color-picker{display:flex;flex-direction:column;width:18.75rem;gap:.875rem}.z-input-color-picker-plane{position:relative;height:11.5rem;cursor:crosshair;border-radius:.375rem;overflow:hidden}.z-input-color-picker-cursor{position:absolute;width:1.25rem;height:1.25rem;border:3px solid white;border-radius:999px;box-shadow:0 0 0 1px #0003;translate:-50% -50%;pointer-events:none}.z-input-color-picker-controls{display:grid;grid-template-columns:2.25rem minmax(0,1fr);align-items:center;gap:.5rem}.z-input-color-picker-sliders{display:flex;min-width:0;flex-direction:column;gap:.375rem}.z-input-color-picker-hue,.z-input-color-picker-alpha{width:100%;height:.625rem;cursor:pointer;appearance:none;border-radius:999px}.z-input-color-picker-hue{background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.z-input-color-picker-alpha{background:linear-gradient(to right,transparent,var(--z-input-color-picker-current, var(--primary))),conic-gradient(#d1d5db 25%,#fff 0 50%,#d1d5db 0 75%,#fff 0);background-position:0 0,0 0;background-size:auto,.5rem .5rem}.z-input-color-picker-hue::-webkit-slider-thumb,.z-input-color-picker-alpha::-webkit-slider-thumb{width:1rem;height:1rem;appearance:none;border:3px solid white;border-radius:999px;background:var(--primary);box-shadow:0 1px 4px #0000004d}.z-input-color-picker-fields{display:grid;grid-template-columns:5.2rem minmax(0,1fr);gap:.5rem}.z-input-color-picker-format .z-select-trigger{min-height:2rem}.z-input-color-picker-value-group{display:grid;grid-template-columns:minmax(0,1fr) 3.85rem;min-width:0}.z-input-color-picker-value-group .z-input-wrapper{gap:0}.z-input-color-picker-value-group .z-input-container{min-height:2rem;border-radius:0}.z-input-color-picker-value-group>z-input:first-child .z-input-container,.z-input-color-picker-value-group>.z-input-color-picker-channel-group:first-child z-input:first-child .z-input-container{border-top-left-radius:var(--radius-sm, .25rem);border-bottom-left-radius:var(--radius-sm, .25rem)}.z-input-color-picker-value-group>z-input:last-child .z-input-container{border-left-width:0;border-top-right-radius:var(--radius-sm, .25rem);border-bottom-right-radius:var(--radius-sm, .25rem)}.z-input-color-picker-value-group .z-input-container:focus-within{position:relative;z-index:1;border-left-width:1px}.z-input-color-picker-hex-input .z-input-native{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.z-input-color-picker-channel-group{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));min-width:0}.z-input-color-picker-channel-group z-input:not(:first-child) .z-input-container{border-left-width:0}.z-input-color-picker-channel-group .z-input-native,.z-input-color-picker-alpha-input .z-input-native{text-align:center}.z-input-color-picker-saved-head{display:flex;align-items:center;justify-content:space-between;font-size:.875rem;font-weight:400}.z-input-color-picker-saved-head .z-button{height:1.75rem;padding-inline:.25rem;font-weight:400}.z-input-color-picker-swatches{display:flex;justify-content:space-between;gap:.375rem}.z-input-color-picker-swatch{width:1.75rem;height:1.75rem;cursor:pointer;border:0;border-radius:var(--radius-sm);background:var(--z-input-color-picker-swatch-color)}.z-input-color-picker-swatch-light{background:linear-gradient(var(--z-input-color-picker-swatch-color),var(--z-input-color-picker-swatch-color)),conic-gradient(#d1d5db 25%,#fff 0 50%,#d1d5db 0 75%,#fff 0);background-size:auto,.5rem .5rem;box-shadow:inset 0 0 0 1px #00000029}.z-input-color-picker-swatch-active{box-shadow:0 0 0 2px var(--background),0 0 0 4px var(--primary)}.z-input-color-picker-swatch-light.z-input-color-picker-swatch-active{box-shadow:inset 0 0 0 1px #00000029,0 0 0 2px var(--background),0 0 0 4px var(--primary)}\n"], dependencies: [{ kind: "component", type: i0.forwardRef(() => ZInputComponent), selector: "z-input", inputs: ["class", "zType", "zSize", "zAlign", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zLoading", "zLoadingOutline", "zPrefix", "zSuffix", "zMin", "zMax", "zStep", "zShowArrows", "zMask", "zDecimalPlaces", "zAllowNegative", "zThousandSeparator", "zDecimalMarker", "zValidators", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zShowPasswordToggle", "zSearch", "zDebounce", "zAutofocus", "zAutoComplete", "zAllowClear", "zAutoSizeContent", "zRows", "zResize", "zMaxLength", "zAutoSuggest", "zColorConfig"], outputs: ["zOnSearch", "zOnChange", "zOnBlur", "zOnFocus", "zOnKeydown", "zOnEnter", "zOnColorCollapse", "zControl", "zEvent"], exportAs: ["zInput"] }, { kind: "component", type: i0.forwardRef(() => BlossomColorPickerComponent), selector: "blossom-color-picker", inputs: ["value", "defaultValue", "colors", "disabled", "openOnHover", "initialExpanded", "animationDuration", "showAlphaSlider", "coreSize", "petalSize", "showCoreColor", "sliderPosition", "adaptivePositioning", "circularBarWidth", "sliderWidth", "sliderOffset", "collapsible"], outputs: ["colorChange", "colorCollapse"] }, { kind: "ngmodule", type: i0.forwardRef(() => FormsModule) }, { kind: "directive", type: i0.forwardRef(() => i1.DefaultValueAccessor), selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i0.forwardRef(() => i1.RangeValueAccessor), selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i0.forwardRef(() => i1.NgControlStatus), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(() => i1.NgModel), selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => NgxMaskDirective), selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: i0.forwardRef(() => ZButtonComponent), selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zAnimatedTypeIcon", "zAnimateIcon", "zAnimationTriggerIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "component", type: i0.forwardRef(() => ZIconComponent), selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "directive", type: i0.forwardRef(() => ZPopoverDirective), selector: "[z-popover]", inputs: ["zPopoverContent", "zPosition", "zTrigger", "zPopoverTrigger", "zClass", "zShowDelay", "zHideDelay", "zDisabled", "zOffset", "zPopoverWidth", "zTriggerRef", "zManualClose", "zOutsideClickClose", "zScrollClose", "zSticky", "zShowArrow", "zKeyboardSafe"], outputs: ["zShow", "zHide", "zHideStart", "zControl", "zPositionChange", "zOutsideClick"], exportAs: ["zPopover"] }, { kind: "component", type: i0.forwardRef(() => ZSelectComponent), selector: "z-select", inputs: ["class", "zClassSelect", "zMode", "zSize", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zLoading", "zLoadingOutline", "zPrefix", "zAllowClear", "zShowCheck", "zWrap", "zShowSearch", "zPlaceholderSearch", "zDebounce", "zNotFoundText", "zEmptyText", "zEmptyIcon", "zMaxTagCount", "zDropdownMaxHeight", "zOptionHeight", "zVirtualScroll", "zDynamicSize", "zShowAction", "zOptions", "zConfig", "zTranslateLabels", "zKey", "zSearchServer", "zLoadingMore", "zEnableLoadMore", "zScrollDistance", "zMaxVisible", "zScrollClose", "zSticky", "zPosition", "zSelectedTemplate", "zOptionTemplate", "zActionTemplate", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zValidators"], outputs: ["zOnSearch", "zOnLoadMore", "zOnBlur", "zOnFocus", "zControl", "zEvent"], exportAs: ["zSelect"] }, { kind: "directive", type: i0.forwardRef(() => ZTooltipDirective), selector: "[z-tooltip], [zTooltip]", inputs: ["zContent", "zPosition", "zTooltipPosition", "zTrigger", "zTooltipTrigger", "zTooltipType", "zTooltipSize", "zClass", "zTooltipClass", "zShowDelay", "zTooltipShowDelay", "zHideDelay", "zTooltipHideDelay", "zArrow", "zTooltipArrow", "zDisabled", "zTooltipDisabled", "zOffset", "zTooltipOffset", "zAutoDetect", "zTriggerElement", "zAlwaysShow", "zMaxWidth"], outputs: ["zShow", "zHide"], exportAs: ["zTooltip"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i0.forwardRef(() => TranslatePipe), name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1470
|
+
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "nativeColorInputRef", first: true, predicate: ["nativeColorInputEl"], descendants: true, isSignal: true }], exportAs: ["zInput"], ngImport: i0, template: "<div class=\"z-input-wrapper flex w-full flex-col gap-2\">\n @if (zLabel()) {\n <label [for]=\"inputId\" class=\"text-xs leading-none font-medium\" [class]=\"zLabelClass()\">\n {{ zLabel() | translate }}\n @if (zRequired()) {\n <span class=\"text-destructive! ml-0.5\">*</span>\n }\n </label>\n }\n\n @if (typeConfig().isTextarea) {\n <div class=\"relative w-full\" [class]=\"textareaClasses()\" [class.overflow-auto]=\"zAutoSizeContent()\">\n <textarea\n #inputEl\n [id]=\"inputId\"\n [placeholder]=\"zPlaceholder() | translate\"\n class=\"z-input-native placeholder:text-muted-foreground m-0 block min-h-14 w-full resize-none bg-transparent p-2 text-sm outline-none\"\n [class.resize-y]=\"zResize() && !isDisabled() && !zReadonly()\"\n [class.field-sizing-content]=\"zAutoSizeContent()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"zReadonly()\"\n [autocomplete]=\"zAutoComplete()\"\n [rows]=\"zRows()\"\n [attr.maxlength]=\"zMaxLength()\"\n [ngModel]=\"displayValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event)\"></textarea>\n @if (zMaxLength()) {\n <div class=\"flex justify-end pr-1 pb-1\">\n <span class=\"text-muted-foreground text-xs\">{{ displayValue().length }} / {{ zMaxLength() }}</span>\n </div>\n }\n @if (zResize() && !isDisabled() && !zReadonly() && !zMaxLength()) {\n <svg\n class=\"text-muted-foreground pointer-events-none absolute right-0.5 bottom-0.5 opacity-40\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\">\n <path d=\"M10 2L2 10\" />\n <path d=\"M10 6L6 10\" />\n </svg>\n }\n </div>\n } @else {\n <div class=\"relative w-full\">\n <div\n class=\"z-input-container flex w-full items-center\"\n [class]=\"inputClasses()\"\n z-tooltip\n [zContent]=\"displayValue()\"\n [zTooltipDisabled]=\"typeConfig().isColor || uiState().isFocused || uiState().showSuggestPopover || !hasValue()\"\n [zTriggerElement]=\"inputEl\">\n <!-- Color picker square (prefix for color type) -->\n @if (typeConfig().isColor) {\n <div class=\"z-[10] shrink-0\">\n @if (isBlossomColorMode()) {\n <blossom-color-picker\n class=\"z-input-blossom flex items-center justify-center [&>div:first-child]:flex\"\n [style.--z-bcp-core-size.px]=\"blossomOptions().coreSize\"\n [style.--z-bcp-core-border-color]=\"blossomCoreBorderColor()\"\n [value]=\"blossomColor()\"\n [defaultValue]=\"blossomOptions().defaultValue\"\n [colors]=\"blossomColors()\"\n [disabled]=\"isDisabled() || zReadonly()\"\n [openOnHover]=\"blossomOptions().openOnHover\"\n [initialExpanded]=\"blossomOptions().initialExpanded\"\n [animationDuration]=\"blossomOptions().animationDuration\"\n [showAlphaSlider]=\"blossomOptions().showAlphaSlider\"\n [coreSize]=\"blossomOptions().coreSize\"\n [petalSize]=\"blossomOptions().petalSize\"\n [showCoreColor]=\"blossomOptions().showCoreColor\"\n [sliderPosition]=\"blossomOptions().sliderPosition\"\n [adaptivePositioning]=\"blossomOptions().adaptivePositioning\"\n (colorChange)=\"onBlossomColorChange($event)\"\n (colorCollapse)=\"onBlossomColorCollapse($event)\" />\n } @else {\n <button\n type=\"button\"\n class=\"z-input-color-trigger\"\n z-popover\n [zPopoverContent]=\"colorPickerPopover\"\n zTrigger=\"click\"\n zPosition=\"bottom-left\"\n zClass=\"z-input-color-picker-popover\"\n [zOffset]=\"8\"\n [zPopoverWidth]=\"330\"\n [zDisabled]=\"isDisabled() || zReadonly()\"\n [style.--z-bcp-core-size.px]=\"blossomOptions().coreSize\"\n [style.background]=\"normalizedColorValue()\"\n (zControl)=\"onColorPickerControl($event)\"\n (zShow)=\"onColorPickerOpen()\"\n (mousedown)=\"$event.preventDefault()\"\n [attr.aria-label]=\"'Color picker'\"></button>\n }\n </div>\n }\n\n @if (slotConfig().hasPrefix && !typeConfig().isColor) {\n <div class=\"text-muted-foreground left-3 flex items-center justify-center\">\n @if (zSearch()) {\n <z-icon zType=\"lucideSearch\" zSize=\"16\" />\n } @else if (slotConfig().isPrefixTemplate) {\n <ng-container *ngTemplateOutlet=\"$any(zPrefix())\" />\n } @else {\n {{ zPrefix() }}\n }\n </div>\n }\n\n <input\n #inputEl\n [id]=\"inputId\"\n [type]=\"typeConfig().isColor ? 'text' : maskConfig().effectiveType\"\n [placeholder]=\"zPlaceholder() | translate\"\n class=\"z-input-native placeholder:text-muted-foreground h-full min-w-0 flex-1 bg-transparent text-sm outline-none\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"typeConfig().isColor ? true : zReadonly()\"\n [attr.min]=\"zMin()\"\n [attr.max]=\"zMax()\"\n [attr.step]=\"zStep()\"\n [autocomplete]=\"zAutoComplete()\"\n [ngModel]=\"typeConfig().isColor ? normalizedColorValue() : displayValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event); onSuggestKeydown($event)\"\n [mask]=\"maskConfig().effectiveMask\"\n [thousandSeparator]=\"maskConfig().effectiveThousandSeparator\"\n [decimalMarker]=\"maskConfig().effectiveDecimalMarker\"\n [allowNegativeNumbers]=\"zAllowNegative()\"\n [dropSpecialCharacters]=\"false\" />\n\n @if (slotConfig().hasSuffix && !typeConfig().isColor) {\n <div class=\"text-muted-foreground flex items-center justify-center text-sm\">\n @if (slotConfig().isSuffixTemplate) {\n <ng-container *ngTemplateOutlet=\"$any(zSuffix())\" />\n } @else {\n {{ zSuffix() }}\n }\n </div>\n }\n\n @if (isLoading()) {\n <div class=\"text-muted-foreground flex items-center justify-center\">\n <z-icon zType=\"lucideLoader2\" zSize=\"16\" class=\"animate-spin\" />\n </div>\n }\n\n <!-- Clear button -->\n @if (showClearButton()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm transition-colors\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clearValue($event)\">\n <z-icon zType=\"lucideX\" zSize=\"14\" />\n </button>\n }\n\n <!-- Copy button for color type -->\n @if (typeConfig().isColor) {\n <input\n #nativeColorInputEl\n type=\"color\"\n class=\"z-input-native-color\"\n [ngModel]=\"normalizedColorValue()\"\n (ngModelChange)=\"onColorPickerHexChange($event)\"\n tabindex=\"-1\"\n aria-hidden=\"true\" />\n\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground hover:bg-accent flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-sm transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"copyColorToClipboard()\">\n <span class=\"relative flex size-4 items-center justify-center\">\n <z-icon\n zType=\"lucideCopy\"\n [class]=\"uiState().colorCopied ? 'scale-0 rotate-90 opacity-0' : 'scale-100 rotate-0 opacity-100'\"\n class=\"absolute transition-all duration-200 ease-out\"\n zSize=\"14\" />\n <z-icon\n zType=\"lucideCheck\"\n [class]=\"\n uiState().colorCopied ? 'text-success scale-100 rotate-0 opacity-100' : 'scale-0 -rotate-90 opacity-0'\n \"\n class=\"absolute transition-all duration-200 ease-out\"\n zSize=\"14\" />\n </span>\n </button>\n }\n\n @if (showArrows() && !isDisabled()) {\n <div class=\"-mr-1 flex h-[calc(100%-0.25rem)] shrink-0 flex-col\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:bg-accent hover:text-foreground flex w-5 flex-1 cursor-pointer items-center justify-center rounded-sm transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onArrowClick($event, 'up')\">\n <z-icon zType=\"lucideChevronUp\" zSize=\"12\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:bg-accent hover:text-foreground flex w-5 flex-1 cursor-pointer items-center justify-center rounded-sm transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onArrowClick($event, 'down')\">\n <z-icon zType=\"lucideChevronDown\" zSize=\"12\" />\n </button>\n </div>\n }\n\n @if (typeConfig().isPassword && zShowPasswordToggle()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-sm transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"togglePasswordVisibility()\">\n @if (uiState().passwordVisible) {\n <z-icon zType=\"lucideEyeOff\" zSize=\"16\" />\n } @else {\n <z-icon zType=\"lucideEye\" zSize=\"16\" />\n }\n </button>\n }\n </div>\n\n @if (hasAutoSuggest() && uiState().showSuggestPopover && suggestHistory().length > 0) {\n <div\n class=\"bg-popover text-popover-foreground border-border z-animate-in z-fade-in z-duration-200 z-slide-in-from-top-4 absolute top-full left-0 z-50 mt-1 flex w-full flex-col gap-[0.1875rem] rounded-sm border p-1 shadow-md\">\n @for (item of filteredSuggestHistory(); track item; let i = $index) {\n <button\n type=\"button\"\n class=\"hover:bg-primary/10 hover:text-foreground flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm transition-colors\"\n [class.bg-primary/15]=\"suggestActiveIndex() === i\"\n [class.text-primary]=\"suggestActiveIndex() === i\"\n (mousedown)=\"selectSuggestItem(item)\">\n <z-icon zType=\"lucideClock\" zSize=\"14\" class=\"text-muted-foreground shrink-0\" />\n <span class=\"truncate\">{{ item }}</span>\n </button>\n }\n </div>\n }\n </div>\n }\n\n <ng-template #colorPickerPopover>\n <div class=\"z-input-color-picker\" [style.--z-input-color-picker-current]=\"normalizedColorValue()\">\n <div\n class=\"z-input-color-picker-plane\"\n [style]=\"colorPickerSvStyle()\"\n (pointerdown)=\"onColorPickerSvPointerDown($event)\"\n (pointermove)=\"onColorPickerSvPointerMove($event)\">\n <span class=\"z-input-color-picker-cursor\" [style]=\"colorPickerCursorStyle()\"></span>\n </div>\n\n <div class=\"z-input-color-picker-controls\">\n <button\n type=\"button\"\n z-button\n zType=\"outline\"\n zSize=\"sm\"\n aria-label=\"Pick color\"\n zTypeIcon=\"lucidePencil\"\n (click)=\"openNativeColorPicker()\"></button>\n <div class=\"z-input-color-picker-sliders\">\n <input\n type=\"range\"\n min=\"0\"\n max=\"360\"\n [ngModel]=\"colorPickerHsv().hue\"\n class=\"z-input-color-picker-hue\"\n (input)=\"onColorPickerHueInput($event)\" />\n <input\n type=\"range\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"colorPickerAlpha()\"\n class=\"z-input-color-picker-alpha\"\n (input)=\"onColorPickerAlphaInput($event)\" />\n </div>\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <div class=\"z-input-color-picker-fields\">\n <z-select\n zSize=\"sm\"\n class=\"z-input-color-picker-format\"\n [zOptions]=\"colorPickerFormatOptions\"\n [zShowSearch]=\"false\"\n [zTranslateLabels]=\"false\"\n [ngModel]=\"colorPickerFormat()\"\n (ngModelChange)=\"onColorPickerFormatChange($event)\" />\n <div class=\"z-input-color-picker-value-group\">\n @switch (colorPickerFormat()) {\n @case ('rgb') {\n <div class=\"z-input-color-picker-channel-group\">\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"R\"\n [zMin]=\"0\"\n [zMax]=\"255\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerRgbValue().red\"\n (ngModelChange)=\"onColorPickerRgbChange('red', $event)\" />\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"G\"\n [zMin]=\"0\"\n [zMax]=\"255\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerRgbValue().green\"\n (ngModelChange)=\"onColorPickerRgbChange('green', $event)\" />\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"B\"\n [zMin]=\"0\"\n [zMax]=\"255\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerRgbValue().blue\"\n (ngModelChange)=\"onColorPickerRgbChange('blue', $event)\" />\n </div>\n }\n @case ('hsl') {\n <div class=\"z-input-color-picker-channel-group\">\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"H\"\n [zMin]=\"0\"\n [zMax]=\"360\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerHslValue().hue\"\n (ngModelChange)=\"onColorPickerHslChange('hue', $event)\" />\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"S\"\n [zMin]=\"0\"\n [zMax]=\"100\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerHslValue().saturation\"\n (ngModelChange)=\"onColorPickerHslChange('saturation', $event)\" />\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"L\"\n [zMin]=\"0\"\n [zMax]=\"100\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerHslValue().lightness\"\n (ngModelChange)=\"onColorPickerHslChange('lightness', $event)\" />\n </div>\n }\n @case ('hsv') {\n <div class=\"z-input-color-picker-channel-group\">\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"H\"\n [zMin]=\"0\"\n [zMax]=\"360\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerHsv().hue\"\n (ngModelChange)=\"onColorPickerHsvValueChange('hue', $event)\" />\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"S\"\n [zMin]=\"0\"\n [zMax]=\"100\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerHsv().saturation\"\n (ngModelChange)=\"onColorPickerHsvValueChange('saturation', $event)\" />\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n zPlaceholder=\"V\"\n [zMin]=\"0\"\n [zMax]=\"100\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerHsv().value\"\n (ngModelChange)=\"onColorPickerHsvValueChange('value', $event)\" />\n </div>\n }\n @default {\n <z-input\n zSize=\"sm\"\n class=\"z-input-color-picker-hex-input\"\n [ngModel]=\"normalizedColorValue()\"\n (ngModelChange)=\"onColorPickerHexChange($event)\" />\n }\n }\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n class=\"z-input-color-picker-alpha-input\"\n [zMin]=\"0\"\n [zMax]=\"100\"\n zSuffix=\"%\"\n [zShowArrows]=\"false\"\n [ngModel]=\"colorPickerAlpha()\"\n (ngModelChange)=\"onColorPickerAlphaValueChange($event)\" />\n </div>\n </div>\n\n <div class=\"z-input-color-picker-saved-head\">\n <span>{{ 'i18n_z_ui_input_saved_colors' | translate }}</span>\n <button type=\"button\" z-button zType=\"ghost\" zSize=\"sm\" (click)=\"addCurrentColorToSaved()\">\n {{ 'i18n_z_ui_input_add_color' | translate }}\n </button>\n </div>\n <div class=\"z-input-color-picker-swatches\">\n @for (swatch of colorPickerSavedSwatches(); track swatch.color) {\n <button\n type=\"button\"\n class=\"z-input-color-picker-swatch rounded-[3px]!\"\n [class.z-input-color-picker-swatch-active]=\"swatch.color === normalizedColorValue()\"\n [class.z-input-color-picker-swatch-light]=\"swatch.isLight\"\n [style.--z-input-color-picker-swatch-color]=\"swatch.color\"\n [attr.aria-label]=\"swatch.color\"\n (click)=\"selectSavedColor(swatch.color)\"></button>\n }\n </div>\n </div>\n </div>\n </ng-template>\n\n @if (hasError()) {\n <p class=\"text-destructive animate-in fade-in slide-in-from-top-1 m-0 text-xs duration-200\">\n {{ errorMessage() }}\n </p>\n }\n</div>\n", styles: [".z-input-native{text-overflow:ellipsis;overflow:hidden}.z-input-native:-webkit-autofill,.z-input-native:-webkit-autofill:hover,.z-input-native:-webkit-autofill:focus,.z-input-native:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px white inset!important;-webkit-text-fill-color:var(--color-foreground)!important;transition:background-color 9999s ease-in-out 0s!important;caret-color:var(--color-foreground)}:is(.dark,.dark *) .z-input-native:-webkit-autofill,:is(.dark,.dark *) .z-input-native:-webkit-autofill:hover,:is(.dark,.dark *) .z-input-native:-webkit-autofill:focus,:is(.dark,.dark *) .z-input-native:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px var(--input-autofill) inset!important;transition:background-color 9999s ease-in-out 0s!important}textarea.z-input-native::-webkit-resizer{display:none}input[type=number].z-input-native::-webkit-inner-spin-button,input[type=number].z-input-native::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number].z-input-native{-moz-appearance:textfield;appearance:textfield}input[type=color]{cursor:pointer}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:var(--radius-sm)}input[type=color]::-moz-color-swatch{border:none;border-radius:var(--radius-sm)}.z-input-container{position:relative;overflow:visible}.z-input-container:has(.z-input-blossom .bcp-core[aria-expanded=true]){z-index:40}.z-input-blossom,.z-input-blossom .bcp-root{position:relative;z-index:41;overflow:visible}.z-input-blossom .bcp-container{z-index:42!important}.z-input-blossom .bcp-core{width:var(--z-bcp-core-size, 1.125rem)!important;height:var(--z-bcp-core-size, 1.125rem)!important;min-width:var(--z-bcp-core-size, 1.125rem)!important;min-height:var(--z-bcp-core-size, 1.125rem)!important;border-radius:var(--radius-xs, .125rem)!important;border:1px solid var(--z-bcp-core-border-color, rgba(0, 0, 0, .14))!important;box-shadow:none!important;transition:border-radius .18s cubic-bezier(.22,1,.36,1),border-color .16s ease,transform .18s cubic-bezier(.22,1,.36,1)!important}.z-input-blossom .bcp-core[aria-expanded=true]{border-radius:624.9375rem!important;border-color:transparent!important;box-shadow:0 3px 10px #00000029!important;transform:scale(1.03)!important}.z-input-blossom .bcp-core[aria-expanded=false]{transform:scale(1)!important}.z-input-color-trigger{display:block;width:var(--z-bcp-core-size, 1.625rem);height:var(--z-bcp-core-size, 1.625rem);align-self:center;cursor:pointer;border:1px solid var(--border);border-radius:var(--radius-xs, .125rem);box-shadow:none}.z-input-native-color{position:absolute;width:0;height:0;opacity:0;pointer-events:none}.z-input-color-picker-popover{padding:.75rem;border-radius:.5rem}.z-input-color-picker{display:flex;flex-direction:column;width:18.75rem;gap:.875rem}.z-input-color-picker-plane{position:relative;height:11.5rem;cursor:crosshair;border-radius:.375rem;overflow:hidden}.z-input-color-picker-cursor{position:absolute;width:1.25rem;height:1.25rem;border:3px solid white;border-radius:999px;box-shadow:0 0 0 1px #0003;translate:-50% -50%;pointer-events:none}.z-input-color-picker-controls{display:grid;grid-template-columns:2.25rem minmax(0,1fr);align-items:center;gap:.5rem}.z-input-color-picker-sliders{display:flex;min-width:0;flex-direction:column;gap:.375rem}.z-input-color-picker-hue,.z-input-color-picker-alpha{width:100%;height:.625rem;cursor:pointer;appearance:none;border-radius:999px}.z-input-color-picker-hue{background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.z-input-color-picker-alpha{background:linear-gradient(to right,transparent,var(--z-input-color-picker-current, var(--primary))),conic-gradient(#d1d5db 25%,#fff 0 50%,#d1d5db 0 75%,#fff 0);background-position:0 0,0 0;background-size:auto,.5rem .5rem}.z-input-color-picker-hue::-webkit-slider-thumb,.z-input-color-picker-alpha::-webkit-slider-thumb{width:1rem;height:1rem;appearance:none;border:3px solid white;border-radius:999px;background:var(--primary);box-shadow:0 1px 4px #0000004d}.z-input-color-picker-fields{display:grid;grid-template-columns:5.2rem minmax(0,1fr);gap:.5rem}.z-input-color-picker-format .z-select-trigger{min-height:2rem}.z-input-color-picker-value-group{display:grid;grid-template-columns:minmax(0,1fr) 3.85rem;min-width:0}.z-input-color-picker-value-group .z-input-wrapper{gap:0}.z-input-color-picker-value-group .z-input-container{min-height:2rem;border-radius:0}.z-input-color-picker-value-group>z-input:first-child .z-input-container,.z-input-color-picker-value-group>.z-input-color-picker-channel-group:first-child z-input:first-child .z-input-container{border-top-left-radius:var(--radius-sm, .25rem);border-bottom-left-radius:var(--radius-sm, .25rem)}.z-input-color-picker-value-group>z-input:last-child .z-input-container{border-left-width:0;border-top-right-radius:var(--radius-sm, .25rem);border-bottom-right-radius:var(--radius-sm, .25rem)}.z-input-color-picker-value-group .z-input-container:focus-within{position:relative;z-index:1;border-left-width:1px}.z-input-color-picker-hex-input .z-input-native{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.z-input-color-picker-channel-group{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));min-width:0}.z-input-color-picker-channel-group z-input:not(:first-child) .z-input-container{border-left-width:0}.z-input-color-picker-channel-group .z-input-native,.z-input-color-picker-alpha-input .z-input-native{text-align:center}.z-input-color-picker-saved-head{display:flex;align-items:center;justify-content:space-between;font-size:.875rem;font-weight:400}.z-input-color-picker-saved-head .z-button{height:1.75rem;padding-inline:.25rem;font-weight:400}.z-input-color-picker-swatches{display:flex;justify-content:space-between;gap:.375rem}.z-input-color-picker-swatch{width:1.75rem;height:1.75rem;cursor:pointer;border:0;border-radius:var(--radius-sm);background:var(--z-input-color-picker-swatch-color)}.z-input-color-picker-swatch-light{background:linear-gradient(var(--z-input-color-picker-swatch-color),var(--z-input-color-picker-swatch-color)),conic-gradient(#d1d5db 25%,#fff 0 50%,#d1d5db 0 75%,#fff 0);background-size:auto,.5rem .5rem;box-shadow:inset 0 0 0 1px #00000029}.z-input-color-picker-swatch-active{box-shadow:0 0 0 2px var(--background),0 0 0 4px var(--primary)}.z-input-color-picker-swatch-light.z-input-color-picker-swatch-active{box-shadow:inset 0 0 0 1px #00000029,0 0 0 2px var(--background),0 0 0 4px var(--primary)}\n"], dependencies: [{ kind: "component", type: i0.forwardRef(() => ZInputComponent), selector: "z-input", inputs: ["class", "zType", "zSize", "zAlign", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zLoading", "zLoadingOutline", "zPrefix", "zSuffix", "zMin", "zMax", "zStep", "zShowArrows", "zMask", "zDecimalPlaces", "zAllowNegative", "zThousandSeparator", "zDecimalMarker", "zValidators", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zShowPasswordToggle", "zSearch", "zDebounce", "zAutofocus", "zAutoComplete", "zAllowClear", "zAutoSizeContent", "zRows", "zResize", "zMaxLength", "zAutoSuggest", "zColorConfig"], outputs: ["zOnSearch", "zOnChange", "zOnBlur", "zOnFocus", "zOnKeydown", "zOnEnter", "zOnColorCollapse", "zControl", "zEvent"], exportAs: ["zInput"] }, { kind: "component", type: i0.forwardRef(() => BlossomColorPickerComponent), selector: "blossom-color-picker", inputs: ["value", "defaultValue", "colors", "disabled", "openOnHover", "initialExpanded", "animationDuration", "showAlphaSlider", "coreSize", "petalSize", "showCoreColor", "sliderPosition", "adaptivePositioning", "circularBarWidth", "sliderWidth", "sliderOffset", "collapsible"], outputs: ["colorChange", "colorCollapse"] }, { kind: "ngmodule", type: i0.forwardRef(() => FormsModule) }, { kind: "directive", type: i0.forwardRef(() => i1.DefaultValueAccessor), selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i0.forwardRef(() => i1.RangeValueAccessor), selector: "input[type=range]:not([ngNoCva])[formControlName],input[type=range]:not([ngNoCva])[formControl],input[type=range]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i0.forwardRef(() => i1.NgControlStatus), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(() => i1.NgModel), selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => NgxMaskDirective), selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "typeFromDecimals", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix", "defaultValueOnBlur", "value", "disabled", "touched"], outputs: ["valueChange", "touchedChange", "maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: i0.forwardRef(() => ZButtonComponent), selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zAnimatedTypeIcon", "zAnimateIcon", "zAnimationTriggerIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "component", type: i0.forwardRef(() => ZIconComponent), selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "directive", type: i0.forwardRef(() => ZPopoverDirective), selector: "[z-popover]", inputs: ["zPopoverContent", "zPosition", "zTrigger", "zPopoverTrigger", "zClass", "zShowDelay", "zHideDelay", "zDisabled", "zOffset", "zPopoverWidth", "zTriggerRef", "zManualClose", "zOutsideClickClose", "zScrollClose", "zSticky", "zShowArrow", "zKeyboardSafe"], outputs: ["zShow", "zHide", "zHideStart", "zControl", "zPositionChange", "zOutsideClick"], exportAs: ["zPopover"] }, { kind: "component", type: i0.forwardRef(() => ZSelectComponent), selector: "z-select", inputs: ["class", "zClassSelect", "zMode", "zSize", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zLoading", "zLoadingOutline", "zPrefix", "zAllowClear", "zShowCheck", "zWrap", "zShowSearch", "zPlaceholderSearch", "zDebounce", "zNotFoundText", "zEmptyText", "zEmptyIcon", "zMaxTagCount", "zDropdownMaxHeight", "zOptionHeight", "zVirtualScroll", "zDynamicSize", "zShowAction", "zOptions", "zConfig", "zTranslateLabels", "zKey", "zSearchServer", "zLoadingMore", "zEnableLoadMore", "zScrollDistance", "zMaxVisible", "zScrollClose", "zSticky", "zPosition", "zSelectedTemplate", "zOptionTemplate", "zActionTemplate", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zValidators"], outputs: ["zOnSearch", "zOnLoadMore", "zOnBlur", "zOnFocus", "zControl", "zEvent"], exportAs: ["zSelect"] }, { kind: "directive", type: i0.forwardRef(() => ZTooltipDirective), selector: "[z-tooltip], [zTooltip]", inputs: ["zContent", "zPosition", "zTooltipPosition", "zTrigger", "zTooltipTrigger", "zTooltipType", "zTooltipSize", "zClass", "zTooltipClass", "zShowDelay", "zTooltipShowDelay", "zHideDelay", "zTooltipHideDelay", "zArrow", "zTooltipArrow", "zDisabled", "zTooltipDisabled", "zOffset", "zTooltipOffset", "zAutoDetect", "zTriggerElement", "zAlwaysShow", "zMaxWidth"], outputs: ["zShow", "zHide"], exportAs: ["zTooltip"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i0.forwardRef(() => TranslatePipe), name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1393
1471
|
}
|
|
1394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZInputComponent, decorators: [{
|
|
1395
1473
|
type: Component,
|
|
1396
1474
|
args: [{ selector: 'z-input', imports: [
|
|
1397
1475
|
BlossomColorPickerComponent,
|