@uni-design-system/uni-angular 2.0.2 → 2.0.4

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 (38) hide show
  1. package/README.md +57 -0
  2. package/fesm2022/uni-design-system-uni-angular.mjs +1944 -0
  3. package/fesm2022/uni-design-system-uni-angular.mjs.map +1 -0
  4. package/package.json +22 -34
  5. package/types/uni-design-system-uni-angular.d.ts +483 -0
  6. package/.storybook/main.ts +0 -41
  7. package/.storybook/manager.ts +0 -24
  8. package/.storybook/preview.ts +0 -21
  9. package/.storybook/tsconfig.json +0 -24
  10. package/.storybook/typings.d.ts +0 -4
  11. package/.storybook/vite.config.ts +0 -7
  12. package/.turbo/turbo-build.log +0 -25
  13. package/CHANGELOG.md +0 -35
  14. package/angular.json +0 -47
  15. package/dist/fesm2022/uni-design-system-uni-angular.mjs +0 -32
  16. package/dist/fesm2022/uni-design-system-uni-angular.mjs.map +0 -1
  17. package/dist/types/uni-design-system-uni-angular.d.ts +0 -11
  18. package/ng-package.json +0 -7
  19. package/src/lib/button.component.ts +0 -28
  20. package/src/lib/button.stories.ts +0 -20
  21. package/src/lib/cdk/datasource/base-datasource.ts +0 -113
  22. package/src/lib/cdk/datasource/datasource.types.ts +0 -10
  23. package/src/lib/cdk/datasource/record-datasource.ts +0 -115
  24. package/src/lib/cdk/datasource/server-side-datasource.ts +0 -172
  25. package/src/lib/cdk/helpers/memoize.helper.ts +0 -15
  26. package/src/lib/cdk/helpers/number.helper.ts +0 -2
  27. package/src/lib/cdk/index.ts +0 -3
  28. package/src/lib/cdk/local-storage/local-storage.service.ts +0 -124
  29. package/src/lib/cdk/option/option.model.ts +0 -6
  30. package/src/lib/cdk/timer/timer.ts +0 -66
  31. package/src/lib/components/text/text.component.ts +0 -57
  32. package/src/lib/components/text/text.mdx +0 -15
  33. package/src/lib/components/text/text.stories.ts +0 -39
  34. package/src/lib/theming/theme.service.ts +0 -270
  35. package/src/lib/theming/theme.token.ts +0 -7
  36. package/src/public-api.ts +0 -1
  37. package/src/stories/blocks/StoryUsage.tsx +0 -21
  38. package/tsconfig.json +0 -19
@@ -0,0 +1,1944 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, signal, inject, DestroyRef, computed, InjectionToken, linkedSignal, input, Component, HostBinding, Input, Renderer2, ElementRef, HostListener, Directive, EventEmitter, effect, Output, output, ViewChild, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';
3
+ import { css, keyframes } from '@emotion/css';
4
+ import { UniThemes, LightTheme, Z_INDEX, fadeIn, fadeOut } from '@uni-design-system/uni-core';
5
+ import { NgClass, CommonModule, NgTemplateOutlet } from '@angular/common';
6
+ import { autoUpdate, computePosition, offset, shift, flip, arrow } from '@floating-ui/dom';
7
+
8
+ function memoize(fn) {
9
+ const cache = new Map();
10
+ return ((...args) => {
11
+ const key = JSON.stringify(args);
12
+ if (cache.has(key)) {
13
+ return cache.get(key);
14
+ }
15
+ const result = fn(...args);
16
+ cache.set(key, result);
17
+ return result;
18
+ });
19
+ }
20
+
21
+ class LocalStorageService {
22
+ isLocalStorageAvailable = memoize(() => {
23
+ try {
24
+ const test = '__localStorage_test__';
25
+ localStorage.setItem(test, test);
26
+ localStorage.removeItem(test);
27
+ return true;
28
+ }
29
+ catch {
30
+ return false;
31
+ }
32
+ });
33
+ setItem(key, value) {
34
+ if (!this.isLocalStorageAvailable()) {
35
+ console.warn('LocalStorage is not available');
36
+ return false;
37
+ }
38
+ try {
39
+ const stringValue = typeof value === 'string' ? value : JSON.stringify(value);
40
+ localStorage.setItem(key, stringValue);
41
+ return true;
42
+ }
43
+ catch (error) {
44
+ console.error('Error saving to localStorage:', error);
45
+ return false;
46
+ }
47
+ }
48
+ getItem(key) {
49
+ if (!this.isLocalStorageAvailable()) {
50
+ return null;
51
+ }
52
+ try {
53
+ const item = localStorage.getItem(key);
54
+ if (item === null) {
55
+ return null;
56
+ }
57
+ try {
58
+ return JSON.parse(item);
59
+ }
60
+ catch {
61
+ return item;
62
+ }
63
+ }
64
+ catch (error) {
65
+ console.error('Error reading from localStorage:', error);
66
+ return null;
67
+ }
68
+ }
69
+ removeItem(key) {
70
+ if (!this.isLocalStorageAvailable()) {
71
+ return false;
72
+ }
73
+ try {
74
+ localStorage.removeItem(key);
75
+ return true;
76
+ }
77
+ catch (error) {
78
+ console.error('Error removing from localStorage:', error);
79
+ return false;
80
+ }
81
+ }
82
+ clear() {
83
+ if (!this.isLocalStorageAvailable()) {
84
+ return false;
85
+ }
86
+ try {
87
+ localStorage.clear();
88
+ return true;
89
+ }
90
+ catch (error) {
91
+ console.error('Error clearing localStorage:', error);
92
+ return false;
93
+ }
94
+ }
95
+ hasKey(key) {
96
+ if (!this.isLocalStorageAvailable()) {
97
+ return false;
98
+ }
99
+ return localStorage.getItem(key) !== null;
100
+ }
101
+ getAllKeys() {
102
+ if (!this.isLocalStorageAvailable()) {
103
+ return [];
104
+ }
105
+ try {
106
+ return Object.keys(localStorage);
107
+ }
108
+ catch (error) {
109
+ console.error('Error getting localStorage keys:', error);
110
+ return [];
111
+ }
112
+ }
113
+ getSize() {
114
+ if (!this.isLocalStorageAvailable()) {
115
+ return 0;
116
+ }
117
+ try {
118
+ let total = 0;
119
+ for (const key in localStorage) {
120
+ if (Object.prototype.hasOwnProperty.call(localStorage, key)) {
121
+ total += localStorage[key].length + key.length;
122
+ }
123
+ }
124
+ return total;
125
+ }
126
+ catch (error) {
127
+ console.error('Error calculating localStorage size:', error);
128
+ return 0;
129
+ }
130
+ }
131
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: LocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
132
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: LocalStorageService, providedIn: 'root' });
133
+ }
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: LocalStorageService, decorators: [{
135
+ type: Injectable,
136
+ args: [{
137
+ providedIn: 'root',
138
+ }]
139
+ }] });
140
+
141
+ class NotificationService {
142
+ /* Alert */
143
+ alert = signal(undefined, ...(ngDevMode ? [{ debugName: "alert" }] : /* istanbul ignore next */ []));
144
+ showAlert = (alert) => this.alert.set(alert);
145
+ hideAlert = () => this.alert.set(undefined);
146
+ /* Snackbar */
147
+ snackbar = signal(undefined, ...(ngDevMode ? [{ debugName: "snackbar" }] : /* istanbul ignore next */ []));
148
+ showSnackbar = (snackbar) => this.snackbar.set(snackbar);
149
+ hideSnackbar = () => this.snackbar.set(undefined);
150
+ /* Confirmation */
151
+ confirmation = signal(undefined, ...(ngDevMode ? [{ debugName: "confirmation" }] : /* istanbul ignore next */ []));
152
+ showConfirmation = (confirmation) => this.confirmation.set(confirmation);
153
+ hideConfirmation = () => this.confirmation.set(undefined);
154
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
155
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NotificationService, providedIn: 'root' });
156
+ }
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NotificationService, decorators: [{
158
+ type: Injectable,
159
+ args: [{
160
+ providedIn: 'root',
161
+ }]
162
+ }] });
163
+
164
+ function useTimer() {
165
+ const destroyRef = inject(DestroyRef);
166
+ const msRemaining = signal(0, ...(ngDevMode ? [{ debugName: "msRemaining" }] : /* istanbul ignore next */ []));
167
+ const isPaused = signal(false, ...(ngDevMode ? [{ debugName: "isPaused" }] : /* istanbul ignore next */ []));
168
+ const isActive = computed(() => msRemaining() > 0, ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
169
+ let intervalId = null;
170
+ let endTime = 0;
171
+ let onCompleteCallback;
172
+ const stop = () => {
173
+ if (intervalId)
174
+ clearInterval(intervalId);
175
+ intervalId = null;
176
+ };
177
+ const tick = () => {
178
+ const remaining = Math.max(0, endTime - Date.now());
179
+ msRemaining.set(remaining);
180
+ if (remaining <= 0) {
181
+ stop();
182
+ if (onCompleteCallback)
183
+ onCompleteCallback();
184
+ }
185
+ };
186
+ const start = (durationMs, onComplete) => {
187
+ stop();
188
+ onCompleteCallback = onComplete;
189
+ isPaused.set(false);
190
+ msRemaining.set(durationMs);
191
+ endTime = Date.now() + durationMs;
192
+ intervalId = setInterval(tick, 100);
193
+ };
194
+ const pause = () => {
195
+ if (!isActive() || isPaused())
196
+ return;
197
+ stop();
198
+ isPaused.set(true);
199
+ };
200
+ const resume = () => {
201
+ if (!isActive() || !isPaused())
202
+ return;
203
+ isPaused.set(false);
204
+ endTime = Date.now() + msRemaining();
205
+ intervalId = setInterval(tick, 100);
206
+ };
207
+ destroyRef.onDestroy(() => stop());
208
+ return {
209
+ start,
210
+ pause,
211
+ resume,
212
+ stop: () => {
213
+ stop();
214
+ msRemaining.set(0);
215
+ },
216
+ msRemaining,
217
+ isPaused,
218
+ isActive,
219
+ secondsRemaining: computed(() => Math.ceil(msRemaining() / 1000)),
220
+ };
221
+ }
222
+
223
+ const UNI_THEMES = new InjectionToken('', {
224
+ providedIn: 'root',
225
+ factory: () => UniThemes,
226
+ });
227
+
228
+ const safeParseInt = (n) => typeof n === 'number' ? n : parseInt(n);
229
+
230
+ // noinspection JSUnusedGlobalSymbols
231
+ class ThemeService {
232
+ themes = inject(UNI_THEMES);
233
+ localStorage = inject(LocalStorageService);
234
+ theme = signal(LightTheme, ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
235
+ themeOptions = signal([], ...(ngDevMode ? [{ debugName: "themeOptions" }] : /* istanbul ignore next */ []));
236
+ components = computed(() => this.theme().components, ...(ngDevMode ? [{ debugName: "components" }] : /* istanbul ignore next */ []));
237
+ component = (componentName) => computed(() => this.components()[componentName] || {});
238
+ colors = computed(() => this.theme().colors, ...(ngDevMode ? [{ debugName: "colors" }] : /* istanbul ignore next */ []));
239
+ typeFaces = computed(() => this.theme().typefaces, ...(ngDevMode ? [{ debugName: "typeFaces" }] : /* istanbul ignore next */ []));
240
+ spacing = computed(() => this.theme().spacing, ...(ngDevMode ? [{ debugName: "spacing" }] : /* istanbul ignore next */ []));
241
+ thicknesses = computed(() => this.theme().thicknesses, ...(ngDevMode ? [{ debugName: "thicknesses" }] : /* istanbul ignore next */ []));
242
+ radii = computed(() => this.theme().radii, ...(ngDevMode ? [{ debugName: "radii" }] : /* istanbul ignore next */ []));
243
+ borders = computed(() => this.theme().borders, ...(ngDevMode ? [{ debugName: "borders" }] : /* istanbul ignore next */ []));
244
+ shadows = computed(() => this.theme().shadows, ...(ngDevMode ? [{ debugName: "shadows" }] : /* istanbul ignore next */ []));
245
+ icons = computed(() => this.theme().icons, ...(ngDevMode ? [{ debugName: "icons" }] : /* istanbul ignore next */ []));
246
+ constructor() {
247
+ this.themeOptions.set(Object.keys(this.themes).map((key) => {
248
+ return { label: this.themes[key].name, value: key };
249
+ }));
250
+ this.selectTheme(this.localStorage.getItem('theme') || Object.keys(this.themes)[0] || 'base');
251
+ }
252
+ selectTheme(themeName) {
253
+ this.selectedThemeKey.set(themeName);
254
+ if (this.themes[themeName])
255
+ this.theme.set(this.themes[themeName]);
256
+ this.localStorage.setItem('theme', themeName);
257
+ }
258
+ selectedThemeName = computed(() => this.theme().name, ...(ngDevMode ? [{ debugName: "selectedThemeName" }] : /* istanbul ignore next */ []));
259
+ selectedThemeKey = signal('', ...(ngDevMode ? [{ debugName: "selectedThemeKey" }] : /* istanbul ignore next */ []));
260
+ textClass = (textRole, textColor) => {
261
+ return css([
262
+ {
263
+ ...this.typeFaces()[textRole],
264
+ },
265
+ textColor && {
266
+ color: this.colors()[textColor],
267
+ },
268
+ ]);
269
+ };
270
+ componentStyle = (componentName, variant, size) => computed(() => {
271
+ const component = this.component(componentName)();
272
+ const { fixed, colors, sizes } = component;
273
+ const colorStyle = colors && colors[variant];
274
+ const sizeStyle = sizes && sizes[size];
275
+ return { ...fixed, ...colorStyle, ...sizeStyle };
276
+ });
277
+ getSpacing = (size) => {
278
+ return size === 'none' ? 'none' : this.spacing()[size];
279
+ };
280
+ getThickness = (thickness) => this.theme().thicknesses[thickness];
281
+ getContentColor = (token, useVariant) => useVariant
282
+ ? this.colors()[`on-${token}-variant`]
283
+ : this.colors()[`on-${token}`];
284
+ colorPair = (token, colorVariant) => {
285
+ if (!token)
286
+ return;
287
+ const backgroundColor = this.colors()[token];
288
+ const color = this.getContentColor(token, colorVariant);
289
+ return { color, backgroundColor };
290
+ };
291
+ backgroundColor = (token) => {
292
+ return !token ? undefined : { backgroundColor: this.colors()[token] };
293
+ };
294
+ backgroundImage = (url) => {
295
+ return !url ? undefined : { backgroundImage: `url(${url})` };
296
+ };
297
+ getContainerColors = (color, useVariant) => {
298
+ const token = (color + '-container');
299
+ return this.colorPair(token, useVariant);
300
+ };
301
+ typeface = (typeface) => typeface && this.typeFaces()[typeface];
302
+ colorPalette = () => this.colors();
303
+ color(color) {
304
+ return !color ? undefined : { color: this.colors()[color] };
305
+ }
306
+ getDashedBorder(color, radius) {
307
+ if (!color)
308
+ return;
309
+ const r = radius && this.radii()[radius];
310
+ const borderRadius = r ? safeParseInt(r) : 0;
311
+ const colors = this.colors()[color];
312
+ const strokeColor = colors?.replace('#', '%23');
313
+ return {
314
+ backgroundImage: `url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='${borderRadius}' ry='${borderRadius}' stroke='${strokeColor}' stroke-width='4' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e")`,
315
+ borderRadius,
316
+ };
317
+ }
318
+ radius(size) {
319
+ return !size ? undefined : { borderRadius: this.radii()[size] };
320
+ }
321
+ getRadiusLeft(size) {
322
+ if (!size)
323
+ return;
324
+ return {
325
+ borderBottomLeftRadius: this.radii()[size],
326
+ borderTopLeftRadius: this.radii()[size],
327
+ };
328
+ }
329
+ getRadiusRight(size) {
330
+ if (!size)
331
+ return;
332
+ return {
333
+ borderBottomRightRadius: this.radii()[size],
334
+ borderTopRightRadius: this.radii()[size],
335
+ };
336
+ }
337
+ getRadiusTop(size) {
338
+ if (!size)
339
+ return;
340
+ return {
341
+ borderTopLeftRadius: this.radii()[size],
342
+ borderTopRightRadius: this.radii()[size],
343
+ };
344
+ }
345
+ getRadiusBottom(size) {
346
+ if (!size)
347
+ return;
348
+ return {
349
+ borderBottomLeftRadius: this.radii()[size],
350
+ borderBottomRightRadius: this.radii()[size],
351
+ };
352
+ }
353
+ padding(size) {
354
+ return !size ? undefined : { padding: this.spacing()[size] };
355
+ }
356
+ horizontalPadding(size) {
357
+ return !size ? undefined : { paddingInline: this.spacing()[size] };
358
+ }
359
+ verticalPadding(size) {
360
+ return !size ? undefined : { paddingBlock: this.spacing()[size] };
361
+ }
362
+ paddingLeft(size) {
363
+ return !size ? undefined : { paddingLeft: this.spacing()[size] };
364
+ }
365
+ paddingRight(size) {
366
+ return !size ? undefined : { paddingRight: this.spacing()[size] };
367
+ }
368
+ paddingTop(size) {
369
+ return !size ? undefined : { paddingTop: this.spacing()[size] };
370
+ }
371
+ paddingBottom(size) {
372
+ return !size ? undefined : { paddingBottom: this.spacing()[size] };
373
+ }
374
+ border(border) {
375
+ return !border ? undefined : { border: this.borders()[border] };
376
+ }
377
+ borderTop(border) {
378
+ return !border ? undefined : { borderTop: this.borders()[border] };
379
+ }
380
+ borderBottom(border) {
381
+ return !border ? undefined : { borderBottom: this.borders()[border] };
382
+ }
383
+ borderLeft(border) {
384
+ return !border ? undefined : { borderLeft: this.borders()[border] };
385
+ }
386
+ borderRight(border) {
387
+ return !border ? undefined : { borderRight: this.borders()[border] };
388
+ }
389
+ boxShadow(shadow) {
390
+ return !shadow ? undefined : { boxShadow: this.shadows()[shadow] };
391
+ }
392
+ gap(gap) {
393
+ return !gap || gap === 'none' ? undefined : { gap: this.spacing()[gap] };
394
+ }
395
+ zIndex(element) {
396
+ return !element ? undefined : { zIndex: Z_INDEX[element] };
397
+ }
398
+ borderColor(borderColor) {
399
+ return { borderColor: this.colors()[borderColor] };
400
+ }
401
+ getComponentTheme(componentName) {
402
+ return this.component(componentName);
403
+ }
404
+ // Used to get an "always-defined" options object from a component theme.
405
+ getComponentOptions = (componentName) => linkedSignal({
406
+ source: this.getComponentTheme(componentName),
407
+ computation: () => {
408
+ return this.getComponentTheme(componentName)().options || {};
409
+ },
410
+ });
411
+ componentOptions = (componentName) => computed(() => this.component(componentName)().options || {});
412
+ style(prop, value) {
413
+ return !value ? undefined : { [prop]: value };
414
+ }
415
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
416
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ThemeService, providedIn: 'root' });
417
+ }
418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ThemeService, decorators: [{
419
+ type: Injectable,
420
+ args: [{
421
+ providedIn: 'root',
422
+ }]
423
+ }], ctorParameters: () => [] });
424
+
425
+ const COMPONENT_NAME = new InjectionToken('');
426
+ class BaseComponent {
427
+ componentName = inject(COMPONENT_NAME);
428
+ theme = inject(ThemeService);
429
+ variant = input('primary', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ [])); // TODO: Make Variant support undefined
430
+ size = input('lg', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
431
+ componentTheme = computed(() => this.theme.getComponentTheme(this.componentName)(), ...(ngDevMode ? [{ debugName: "componentTheme" }] : /* istanbul ignore next */ []));
432
+ componentOptions = computed(() => this.theme.getComponentOptions(this.componentName)(), ...(ngDevMode ? [{ debugName: "componentOptions" }] : /* istanbul ignore next */ []));
433
+ style = computed(() => this.theme.componentStyle(this.componentName, this.variant(), this.size())(), ...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
434
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
435
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: BaseComponent, isStandalone: true, selector: "ng-component", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: ``, isInline: true });
436
+ }
437
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: BaseComponent, decorators: [{
438
+ type: Component,
439
+ args: [{
440
+ standalone: true,
441
+ imports: [],
442
+ template: ``,
443
+ }]
444
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
445
+
446
+ class UniBadgeComponent extends BaseComponent {
447
+ color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
448
+ useVariant = input(false, ...(ngDevMode ? [{ debugName: "useVariant" }] : /* istanbul ignore next */ []));
449
+ width;
450
+ get className() {
451
+ const color = this.color();
452
+ return css([
453
+ {
454
+ ...this.theme.getContainerColors(color || 'primary', this.useVariant()),
455
+ ...this.theme.typeface('badge'),
456
+ display: 'inline-block',
457
+ padding: '0 16px',
458
+ ...this.theme.radius(this.componentOptions().borderRadius),
459
+ textAlign: 'center',
460
+ letterSpacing: 1,
461
+ },
462
+ this.width && {
463
+ minWidth: this.width - 32,
464
+ },
465
+ ]);
466
+ }
467
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniBadgeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
468
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniBadgeComponent, isStandalone: true, selector: "div[uni-badge], Badge", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, useVariant: { classPropertyName: "useVariant", publicName: "useVariant", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.className" } }, providers: [{ provide: COMPONENT_NAME, useValue: 'badge' }], usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
469
+ }
470
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniBadgeComponent, decorators: [{
471
+ type: Component,
472
+ args: [{
473
+ selector: 'div[uni-badge], Badge',
474
+ standalone: true,
475
+ imports: [],
476
+ template: `<ng-content></ng-content>`,
477
+ providers: [{ provide: COMPONENT_NAME, useValue: 'badge' }],
478
+ }]
479
+ }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], useVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "useVariant", required: false }] }], width: [{
480
+ type: Input
481
+ }], className: [{
482
+ type: HostBinding,
483
+ args: ['class']
484
+ }] } });
485
+
486
+ class UniIconComponent {
487
+ themeService = inject(ThemeService);
488
+ color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
489
+ _path;
490
+ get className() {
491
+ return css([{ ...this.themeService.color(this.color()) }]);
492
+ }
493
+ set name(iconName) {
494
+ const theme = this.themeService.theme();
495
+ this._path = `url("${theme.icons[iconName]}")`;
496
+ }
497
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
498
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniIconComponent, isStandalone: true, selector: "uni-icon, Icon", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "style.-webkit-mask-image": "this._path", "class": "this.className" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;height:100%;width:100%;background-color:currentColor;-webkit-mask-size:contain;-webkit-mask-position:center;-webkit-mask-repeat:no-repeat}\n"] });
499
+ }
500
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniIconComponent, decorators: [{
501
+ type: Component,
502
+ args: [{ selector: 'uni-icon, Icon', standalone: true, imports: [], template: '', styles: [":host{display:block;height:100%;width:100%;background-color:currentColor;-webkit-mask-size:contain;-webkit-mask-position:center;-webkit-mask-repeat:no-repeat}\n"] }]
503
+ }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], _path: [{
504
+ type: HostBinding,
505
+ args: ['style.-webkit-mask-image']
506
+ }], className: [{
507
+ type: HostBinding,
508
+ args: ['class']
509
+ }], name: [{
510
+ type: Input
511
+ }] } });
512
+
513
+ class UniBoxComponent {
514
+ theme = inject(ThemeService);
515
+ color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
516
+ backgroundColor = input(...(ngDevMode ? [undefined, { debugName: "backgroundColor" }] : /* istanbul ignore next */ []));
517
+ borderRadius = input(...(ngDevMode ? [undefined, { debugName: "borderRadius" }] : /* istanbul ignore next */ []));
518
+ borderRadiusLeft = input(...(ngDevMode ? [undefined, { debugName: "borderRadiusLeft" }] : /* istanbul ignore next */ []));
519
+ borderRadiusRight = input(...(ngDevMode ? [undefined, { debugName: "borderRadiusRight" }] : /* istanbul ignore next */ []));
520
+ borderRadiusTop = input(...(ngDevMode ? [undefined, { debugName: "borderRadiusTop" }] : /* istanbul ignore next */ []));
521
+ borderRadiusBottom = input(...(ngDevMode ? [undefined, { debugName: "borderRadiusBottom" }] : /* istanbul ignore next */ []));
522
+ padding = input(...(ngDevMode ? [undefined, { debugName: "padding" }] : /* istanbul ignore next */ []));
523
+ paddingHorizontal = input(...(ngDevMode ? [undefined, { debugName: "paddingHorizontal" }] : /* istanbul ignore next */ []));
524
+ paddingVertical = input(...(ngDevMode ? [undefined, { debugName: "paddingVertical" }] : /* istanbul ignore next */ []));
525
+ paddingLeft = input(...(ngDevMode ? [undefined, { debugName: "paddingLeft" }] : /* istanbul ignore next */ []));
526
+ paddingRight = input(...(ngDevMode ? [undefined, { debugName: "paddingRight" }] : /* istanbul ignore next */ []));
527
+ paddingTop = input(...(ngDevMode ? [undefined, { debugName: "paddingTop" }] : /* istanbul ignore next */ []));
528
+ paddingBottom = input(...(ngDevMode ? [undefined, { debugName: "paddingBottom" }] : /* istanbul ignore next */ []));
529
+ border = input(...(ngDevMode ? [undefined, { debugName: "border" }] : /* istanbul ignore next */ []));
530
+ borderTop = input(...(ngDevMode ? [undefined, { debugName: "borderTop" }] : /* istanbul ignore next */ []));
531
+ borderBottom = input(...(ngDevMode ? [undefined, { debugName: "borderBottom" }] : /* istanbul ignore next */ []));
532
+ borderLeft = input(...(ngDevMode ? [undefined, { debugName: "borderLeft" }] : /* istanbul ignore next */ []));
533
+ borderRight = input(...(ngDevMode ? [undefined, { debugName: "borderRight" }] : /* istanbul ignore next */ []));
534
+ dashBorder = input(false, ...(ngDevMode ? [{ debugName: "dashBorder" }] : /* istanbul ignore next */ []));
535
+ alignSelf = input(...(ngDevMode ? [undefined, { debugName: "alignSelf" }] : /* istanbul ignore next */ []));
536
+ alignItems = input(...(ngDevMode ? [undefined, { debugName: "alignItems" }] : /* istanbul ignore next */ []));
537
+ alignContent = input(...(ngDevMode ? [undefined, { debugName: "alignContent" }] : /* istanbul ignore next */ []));
538
+ justifyContent = input(...(ngDevMode ? [undefined, { debugName: "justifyContent" }] : /* istanbul ignore next */ []));
539
+ grow = input(...(ngDevMode ? [undefined, { debugName: "grow" }] : /* istanbul ignore next */ []));
540
+ display = input(...(ngDevMode ? [undefined, { debugName: "display" }] : /* istanbul ignore next */ []));
541
+ position = input(...(ngDevMode ? [undefined, { debugName: "position" }] : /* istanbul ignore next */ []));
542
+ inset = input(...(ngDevMode ? [undefined, { debugName: "inset" }] : /* istanbul ignore next */ []));
543
+ height = input(...(ngDevMode ? [undefined, { debugName: "height" }] : /* istanbul ignore next */ []));
544
+ minHeight = input(...(ngDevMode ? [undefined, { debugName: "minHeight" }] : /* istanbul ignore next */ []));
545
+ maxHeight = input(...(ngDevMode ? [undefined, { debugName: "maxHeight" }] : /* istanbul ignore next */ []));
546
+ width = input(...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
547
+ minWidth = input(...(ngDevMode ? [undefined, { debugName: "minWidth" }] : /* istanbul ignore next */ []));
548
+ maxWidth = input(...(ngDevMode ? [undefined, { debugName: "maxWidth" }] : /* istanbul ignore next */ []));
549
+ ignoreDir = input(true, ...(ngDevMode ? [{ debugName: "ignoreDir" }] : /* istanbul ignore next */ []));
550
+ gridArea = input(...(ngDevMode ? [undefined, { debugName: "gridArea" }] : /* istanbul ignore next */ []));
551
+ gridColumn = input(...(ngDevMode ? [undefined, { debugName: "gridColumn" }] : /* istanbul ignore next */ []));
552
+ gridRow = input(...(ngDevMode ? [undefined, { debugName: "gridRow" }] : /* istanbul ignore next */ []));
553
+ overflow = input(...(ngDevMode ? [undefined, { debugName: "overflow" }] : /* istanbul ignore next */ []));
554
+ elevation = input(...(ngDevMode ? [undefined, { debugName: "elevation" }] : /* istanbul ignore next */ [])); // Deprecated, use shadow instead
555
+ shadow = input(...(ngDevMode ? [undefined, { debugName: "shadow" }] : /* istanbul ignore next */ []));
556
+ gap = input(...(ngDevMode ? [undefined, { debugName: "gap" }] : /* istanbul ignore next */ []));
557
+ fullWidth = input(...(ngDevMode ? [undefined, { debugName: "fullWidth" }] : /* istanbul ignore next */ []));
558
+ fullHeight = input(...(ngDevMode ? [undefined, { debugName: "fullHeight" }] : /* istanbul ignore next */ []));
559
+ flexDirection = input(...(ngDevMode ? [undefined, { debugName: "flexDirection" }] : /* istanbul ignore next */ []));
560
+ textAlign = input(...(ngDevMode ? [undefined, { debugName: "textAlign" }] : /* istanbul ignore next */ []));
561
+ wrapItems = input(undefined, ...(ngDevMode ? [{ debugName: "wrapItems" }] : /* istanbul ignore next */ []));
562
+ zIndex = input(...(ngDevMode ? [undefined, { debugName: "zIndex" }] : /* istanbul ignore next */ []));
563
+ get boxClassName() {
564
+ return css([
565
+ {
566
+ ...this.theme.colorPair(this.color()),
567
+ ...this.theme.backgroundColor(this.backgroundColor()),
568
+ display: this.alignSelf() ? 'flex' : 'block',
569
+ position: this.position(),
570
+ inset: this.inset(),
571
+ boxSizing: 'border-box',
572
+ height: this.height(),
573
+ minHeight: this.minHeight(),
574
+ maxHeight: this.maxHeight(),
575
+ width: this.width(),
576
+ minWidth: this.minWidth(),
577
+ maxWidth: this.maxWidth(),
578
+ flexWrap: this.wrapItems(),
579
+ overflow: this.overflow(),
580
+ ...this.theme.padding(this.padding()),
581
+ ...this.theme.horizontalPadding(this.paddingHorizontal()),
582
+ ...this.theme.verticalPadding(this.paddingVertical()),
583
+ ...this.theme.paddingLeft(this.paddingLeft()),
584
+ ...this.theme.paddingRight(this.paddingRight()),
585
+ ...this.theme.paddingTop(this.paddingTop()),
586
+ ...this.theme.paddingBottom(this.paddingBottom()),
587
+ ...this.theme.boxShadow(this.elevation()),
588
+ ...this.theme.boxShadow(this.shadow()),
589
+ ...this.theme.radius(this.borderRadius()),
590
+ ...this.theme.getRadiusLeft(this.borderRadiusLeft()),
591
+ ...this.theme.getRadiusRight(this.borderRadiusRight()),
592
+ ...this.theme.getRadiusTop(this.borderRadiusTop()),
593
+ ...this.theme.getRadiusBottom(this.borderRadiusBottom()),
594
+ ...this.theme.borderTop(this.borderTop()),
595
+ ...this.theme.borderBottom(this.borderBottom()),
596
+ ...this.theme.borderLeft(this.borderLeft()),
597
+ ...this.theme.borderRight(this.borderRight()),
598
+ ...this.theme.gap(this.gap()),
599
+ ...this.theme.style('display', this.display()),
600
+ ...this.theme.style('alignSelf', this.alignSelf()),
601
+ ...this.theme.style('alignItems', this.alignItems()),
602
+ ...this.theme.style('justifyContent', this.justifyContent()),
603
+ ...this.theme.style('alignContent', this.alignContent()),
604
+ ...this.theme.style('flexGrow', this.grow()),
605
+ ...this.theme.style('flexDirection', this.flexDirection()),
606
+ ...this.theme.style('gridArea', this.gridArea()),
607
+ ...this.theme.style('gridColumn', this.gridColumn()),
608
+ ...this.theme.style('gridRow', this.gridRow()),
609
+ ...this.theme.style('textAlign', this.textAlign()),
610
+ ...this.theme.zIndex(this.zIndex()),
611
+ },
612
+ this.border() &&
613
+ !this.dashBorder() && {
614
+ ...this.theme.border(this.border()),
615
+ },
616
+ this.border() &&
617
+ this.dashBorder() && {
618
+ ...this.theme.getDashedBorder(this.border(), this.borderRadius()),
619
+ },
620
+ this.fullWidth() && {
621
+ width: '100%',
622
+ },
623
+ this.fullHeight() && {
624
+ height: '100%',
625
+ },
626
+ this.ignoreDir() &&
627
+ (this.flexDirection() ?? 'row') === 'row' && {
628
+ '&:dir(rtl)': {
629
+ flexDirection: 'row-reverse',
630
+ },
631
+ },
632
+ this.ignoreDir() &&
633
+ (this.flexDirection() ?? 'row') === 'row-reverse' && {
634
+ '&:dir(rtl)': {
635
+ flexDirection: 'row',
636
+ },
637
+ },
638
+ ]);
639
+ }
640
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
641
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniBoxComponent, isStandalone: true, selector: "div[uni-box-layout], Box, div[box-layout]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, backgroundColor: { classPropertyName: "backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, borderRadiusLeft: { classPropertyName: "borderRadiusLeft", publicName: "borderRadiusLeft", isSignal: true, isRequired: false, transformFunction: null }, borderRadiusRight: { classPropertyName: "borderRadiusRight", publicName: "borderRadiusRight", isSignal: true, isRequired: false, transformFunction: null }, borderRadiusTop: { classPropertyName: "borderRadiusTop", publicName: "borderRadiusTop", isSignal: true, isRequired: false, transformFunction: null }, borderRadiusBottom: { classPropertyName: "borderRadiusBottom", publicName: "borderRadiusBottom", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, paddingHorizontal: { classPropertyName: "paddingHorizontal", publicName: "paddingHorizontal", isSignal: true, isRequired: false, transformFunction: null }, paddingVertical: { classPropertyName: "paddingVertical", publicName: "paddingVertical", isSignal: true, isRequired: false, transformFunction: null }, paddingLeft: { classPropertyName: "paddingLeft", publicName: "paddingLeft", isSignal: true, isRequired: false, transformFunction: null }, paddingRight: { classPropertyName: "paddingRight", publicName: "paddingRight", isSignal: true, isRequired: false, transformFunction: null }, paddingTop: { classPropertyName: "paddingTop", publicName: "paddingTop", isSignal: true, isRequired: false, transformFunction: null }, paddingBottom: { classPropertyName: "paddingBottom", publicName: "paddingBottom", isSignal: true, isRequired: false, transformFunction: null }, border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null }, borderTop: { classPropertyName: "borderTop", publicName: "borderTop", isSignal: true, isRequired: false, transformFunction: null }, borderBottom: { classPropertyName: "borderBottom", publicName: "borderBottom", isSignal: true, isRequired: false, transformFunction: null }, borderLeft: { classPropertyName: "borderLeft", publicName: "borderLeft", isSignal: true, isRequired: false, transformFunction: null }, borderRight: { classPropertyName: "borderRight", publicName: "borderRight", isSignal: true, isRequired: false, transformFunction: null }, dashBorder: { classPropertyName: "dashBorder", publicName: "dashBorder", isSignal: true, isRequired: false, transformFunction: null }, alignSelf: { classPropertyName: "alignSelf", publicName: "alignSelf", isSignal: true, isRequired: false, transformFunction: null }, alignItems: { classPropertyName: "alignItems", publicName: "alignItems", isSignal: true, isRequired: false, transformFunction: null }, alignContent: { classPropertyName: "alignContent", publicName: "alignContent", isSignal: true, isRequired: false, transformFunction: null }, justifyContent: { classPropertyName: "justifyContent", publicName: "justifyContent", isSignal: true, isRequired: false, transformFunction: null }, grow: { classPropertyName: "grow", publicName: "grow", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, ignoreDir: { classPropertyName: "ignoreDir", publicName: "ignoreDir", isSignal: true, isRequired: false, transformFunction: null }, gridArea: { classPropertyName: "gridArea", publicName: "gridArea", isSignal: true, isRequired: false, transformFunction: null }, gridColumn: { classPropertyName: "gridColumn", publicName: "gridColumn", isSignal: true, isRequired: false, transformFunction: null }, gridRow: { classPropertyName: "gridRow", publicName: "gridRow", isSignal: true, isRequired: false, transformFunction: null }, overflow: { classPropertyName: "overflow", publicName: "overflow", isSignal: true, isRequired: false, transformFunction: null }, elevation: { classPropertyName: "elevation", publicName: "elevation", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, fullHeight: { classPropertyName: "fullHeight", publicName: "fullHeight", isSignal: true, isRequired: false, transformFunction: null }, flexDirection: { classPropertyName: "flexDirection", publicName: "flexDirection", isSignal: true, isRequired: false, transformFunction: null }, textAlign: { classPropertyName: "textAlign", publicName: "textAlign", isSignal: true, isRequired: false, transformFunction: null }, wrapItems: { classPropertyName: "wrapItems", publicName: "wrapItems", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.boxClassName" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
642
+ }
643
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniBoxComponent, decorators: [{
644
+ type: Component,
645
+ args: [{
646
+ selector: 'div[uni-box-layout], Box, div[box-layout]',
647
+ standalone: true,
648
+ imports: [],
649
+ template: `<ng-content></ng-content>`,
650
+ }]
651
+ }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], backgroundColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "backgroundColor", required: false }] }], borderRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderRadius", required: false }] }], borderRadiusLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderRadiusLeft", required: false }] }], borderRadiusRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderRadiusRight", required: false }] }], borderRadiusTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderRadiusTop", required: false }] }], borderRadiusBottom: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderRadiusBottom", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], paddingHorizontal: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingHorizontal", required: false }] }], paddingVertical: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingVertical", required: false }] }], paddingLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingLeft", required: false }] }], paddingRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingRight", required: false }] }], paddingTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingTop", required: false }] }], paddingBottom: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingBottom", required: false }] }], border: [{ type: i0.Input, args: [{ isSignal: true, alias: "border", required: false }] }], borderTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderTop", required: false }] }], borderBottom: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderBottom", required: false }] }], borderLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderLeft", required: false }] }], borderRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderRight", required: false }] }], dashBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashBorder", required: false }] }], alignSelf: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignSelf", required: false }] }], alignItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignItems", required: false }] }], alignContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignContent", required: false }] }], justifyContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "justifyContent", required: false }] }], grow: [{ type: i0.Input, args: [{ isSignal: true, alias: "grow", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], ignoreDir: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreDir", required: false }] }], gridArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridArea", required: false }] }], gridColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridColumn", required: false }] }], gridRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridRow", required: false }] }], overflow: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflow", required: false }] }], elevation: [{ type: i0.Input, args: [{ isSignal: true, alias: "elevation", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], fullHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullHeight", required: false }] }], flexDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "flexDirection", required: false }] }], textAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "textAlign", required: false }] }], wrapItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapItems", required: false }] }], zIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "zIndex", required: false }] }], boxClassName: [{
652
+ type: HostBinding,
653
+ args: ['class']
654
+ }] } });
655
+
656
+ class UniCenterComponent extends UniBoxComponent {
657
+ display = input('flex', ...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
658
+ justifyContent = input('center', ...(ngDevMode ? [{ debugName: "justifyContent" }] : /* istanbul ignore next */ []));
659
+ alignItems = input('center', ...(ngDevMode ? [{ debugName: "alignItems" }] : /* istanbul ignore next */ []));
660
+ constructor() {
661
+ super();
662
+ }
663
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniCenterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
664
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniCenterComponent, isStandalone: true, selector: "div[uni-center-layout], div[center-layout]", inputs: { display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, justifyContent: { classPropertyName: "justifyContent", publicName: "justifyContent", isSignal: true, isRequired: false, transformFunction: null }, alignItems: { classPropertyName: "alignItems", publicName: "alignItems", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
665
+ }
666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniCenterComponent, decorators: [{
667
+ type: Component,
668
+ args: [{
669
+ selector: 'div[uni-center-layout], div[center-layout]',
670
+ standalone: true,
671
+ imports: [],
672
+ template: `<ng-content></ng-content>`,
673
+ }]
674
+ }], ctorParameters: () => [], propDecorators: { display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], justifyContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "justifyContent", required: false }] }], alignItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignItems", required: false }] }] } });
675
+
676
+ class UniGridAreaComponent {
677
+ area;
678
+ get className() {
679
+ return css([{ gridArea: this.area }]);
680
+ }
681
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniGridAreaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
682
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: UniGridAreaComponent, isStandalone: true, selector: "GridArea", inputs: { area: "area" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
683
+ }
684
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniGridAreaComponent, decorators: [{
685
+ type: Component,
686
+ args: [{
687
+ selector: 'GridArea',
688
+ standalone: true,
689
+ imports: [],
690
+ template: `<ng-content></ng-content>`,
691
+ }]
692
+ }], propDecorators: { area: [{
693
+ type: Input
694
+ }], className: [{
695
+ type: HostBinding,
696
+ args: ['class']
697
+ }] } });
698
+
699
+ class UniGridComponent extends UniBoxComponent {
700
+ display = input('grid', ...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
701
+ constructor() {
702
+ super();
703
+ }
704
+ templateAreas;
705
+ templateColumns;
706
+ templateRows;
707
+ outline;
708
+ outlineColor;
709
+ get className() {
710
+ return css([
711
+ this.templateAreas && {
712
+ gridTemplateAreas: this.templateAreas,
713
+ },
714
+ this.templateColumns && {
715
+ gridTemplateColumns: this.templateColumns,
716
+ },
717
+ this.templateRows && {
718
+ gridTemplateRows: this.templateRows,
719
+ },
720
+ this.outline && {
721
+ gap: this.theme.getThickness(this.outline),
722
+ },
723
+ this.outlineColor && {
724
+ backgroundColor: this.theme.colorPalette()[this.outlineColor],
725
+ },
726
+ ]);
727
+ }
728
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
729
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniGridComponent, isStandalone: true, selector: "div[uni-grid-layout], Grid, div[grid-layout]", inputs: { display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, templateAreas: { classPropertyName: "templateAreas", publicName: "templateAreas", isSignal: false, isRequired: false, transformFunction: null }, templateColumns: { classPropertyName: "templateColumns", publicName: "templateColumns", isSignal: false, isRequired: false, transformFunction: null }, templateRows: { classPropertyName: "templateRows", publicName: "templateRows", isSignal: false, isRequired: false, transformFunction: null }, outline: { classPropertyName: "outline", publicName: "outline", isSignal: false, isRequired: false, transformFunction: null }, outlineColor: { classPropertyName: "outlineColor", publicName: "outlineColor", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
730
+ }
731
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniGridComponent, decorators: [{
732
+ type: Component,
733
+ args: [{
734
+ selector: 'div[uni-grid-layout], Grid, div[grid-layout]',
735
+ standalone: true,
736
+ imports: [],
737
+ template: `<ng-content></ng-content>`,
738
+ }]
739
+ }], ctorParameters: () => [], propDecorators: { display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], templateAreas: [{
740
+ type: Input
741
+ }], templateColumns: [{
742
+ type: Input
743
+ }], templateRows: [{
744
+ type: Input
745
+ }], outline: [{
746
+ type: Input
747
+ }], outlineColor: [{
748
+ type: Input
749
+ }], className: [{
750
+ type: HostBinding,
751
+ args: ['class']
752
+ }] } });
753
+
754
+ class UniRowComponent extends UniBoxComponent {
755
+ display = input('flex', ...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
756
+ flexDirection = input('row', ...(ngDevMode ? [{ debugName: "flexDirection" }] : /* istanbul ignore next */ []));
757
+ minWidth = input('fit-content', ...(ngDevMode ? [{ debugName: "minWidth" }] : /* istanbul ignore next */ []));
758
+ constructor() {
759
+ super();
760
+ }
761
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
762
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniRowComponent, isStandalone: true, selector: "div[uni-row-layout], Row, div[row-layout]", inputs: { display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, flexDirection: { classPropertyName: "flexDirection", publicName: "flexDirection", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
763
+ }
764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniRowComponent, decorators: [{
765
+ type: Component,
766
+ args: [{
767
+ selector: 'div[uni-row-layout], Row, div[row-layout]',
768
+ standalone: true,
769
+ template: `<ng-content></ng-content>`,
770
+ }]
771
+ }], ctorParameters: () => [], propDecorators: { display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], flexDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "flexDirection", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }] } });
772
+
773
+ class UniStackComponent extends UniBoxComponent {
774
+ display = input('flex', ...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
775
+ flexDirection = input('column', ...(ngDevMode ? [{ debugName: "flexDirection" }] : /* istanbul ignore next */ []));
776
+ minHeight = input('fit-content', ...(ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []));
777
+ constructor() {
778
+ super();
779
+ }
780
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniStackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
781
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniStackComponent, isStandalone: true, selector: "div[uni-stack-layout], Stack, div[stack-layout]", inputs: { display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, flexDirection: { classPropertyName: "flexDirection", publicName: "flexDirection", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
782
+ }
783
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniStackComponent, decorators: [{
784
+ type: Component,
785
+ args: [{
786
+ selector: 'div[uni-stack-layout], Stack, div[stack-layout]',
787
+ standalone: true,
788
+ template: `<ng-content></ng-content>`,
789
+ }]
790
+ }], ctorParameters: () => [], propDecorators: { display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], flexDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "flexDirection", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }] } });
791
+
792
+ class UniWrapComponent extends UniBoxComponent {
793
+ display = input('flex', ...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
794
+ wrapItems = input('wrap', ...(ngDevMode ? [{ debugName: "wrapItems" }] : /* istanbul ignore next */ []));
795
+ constructor() {
796
+ super();
797
+ }
798
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniWrapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
799
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniWrapComponent, isStandalone: true, selector: "div[uni-wrap-layout], Wrap, div[wrap-layout]", inputs: { display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, wrapItems: { classPropertyName: "wrapItems", publicName: "wrapItems", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
800
+ }
801
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniWrapComponent, decorators: [{
802
+ type: Component,
803
+ args: [{
804
+ selector: 'div[uni-wrap-layout], Wrap, div[wrap-layout]',
805
+ imports: [],
806
+ template: `<ng-content></ng-content>`,
807
+ }]
808
+ }], ctorParameters: () => [], propDecorators: { display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], wrapItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapItems", required: false }] }] } });
809
+
810
+ class UniSymbolComponent {
811
+ name;
812
+ fill = 0;
813
+ weight = 400;
814
+ grade = 0;
815
+ opticalSize = 24;
816
+ get className() {
817
+ const settings = `'FILL' ${this.fill}, 'wght' ${this.weight}, 'GRAD' ${this.grade}, 'opsz' ${this.opticalSize}`;
818
+ return ('material-symbols-rounded ' +
819
+ css({
820
+ fontVariationSettings: settings,
821
+ fontSize: `${this.opticalSize}px`,
822
+ }));
823
+ }
824
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniSymbolComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
825
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: UniSymbolComponent, isStandalone: true, selector: "uni-symbol, Symbol", inputs: { name: "name", fill: "fill", weight: "weight", grade: "grade", opticalSize: "opticalSize" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: `{{ name }}`, isInline: true });
826
+ }
827
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniSymbolComponent, decorators: [{
828
+ type: Component,
829
+ args: [{
830
+ selector: 'uni-symbol, Symbol',
831
+ standalone: true,
832
+ imports: [],
833
+ template: `{{ name }}`,
834
+ }]
835
+ }], propDecorators: { name: [{
836
+ type: Input
837
+ }], fill: [{
838
+ type: Input
839
+ }], weight: [{
840
+ type: Input
841
+ }], grade: [{
842
+ type: Input
843
+ }], opticalSize: [{
844
+ type: Input
845
+ }], className: [{
846
+ type: HostBinding,
847
+ args: ['class']
848
+ }] } });
849
+
850
+ // https://css-tricks.com/how-to-recreate-the-ripple-effect-of-material-design-buttons/
851
+ class RippleDirective {
852
+ renderer = inject(Renderer2);
853
+ el = inject(ElementRef);
854
+ hostEl;
855
+ constructor() {
856
+ this.hostEl = this.el.nativeElement;
857
+ }
858
+ onClick(e) {
859
+ if (!e)
860
+ return;
861
+ let ripple, d;
862
+ if (this.hostEl.querySelector(`.${this.rippleClass}`) === null) {
863
+ ripple = this.renderer.createElement('span');
864
+ this.renderer.addClass(ripple, this.rippleClass);
865
+ this.renderer.appendChild(this.hostEl, ripple);
866
+ }
867
+ ripple = this.hostEl.querySelector(`.${this.rippleClass}`);
868
+ this.renderer.appendChild(this.hostEl, ripple);
869
+ this.renderer.removeClass(ripple, this.animateClass);
870
+ if (!ripple.offsetHeight && !ripple.offsetWidth) {
871
+ d = Math.max(this.hostEl.offsetWidth, this.hostEl.offsetHeight);
872
+ this.renderer.setStyle(ripple, 'width', d + 'px');
873
+ this.renderer.setStyle(ripple, 'height', d + 'px');
874
+ }
875
+ const x = e.pageX - this.hostEl.offsetLeft - ripple.offsetWidth / 2;
876
+ const y = e.pageY - this.hostEl.offsetTop - ripple.offsetHeight / 2;
877
+ this.renderer.setStyle(ripple, 'top', y + 'px');
878
+ this.renderer.setStyle(ripple, 'left', x + 'px');
879
+ this.renderer.addClass(ripple, this.animateClass);
880
+ }
881
+ rippleClass = css({
882
+ display: 'block',
883
+ position: 'absolute',
884
+ background: 'rgba(255, 255, 255, 0.3)',
885
+ borderRadius: '100%',
886
+ transform: 'scale(0)',
887
+ });
888
+ animateClass = css({
889
+ animation: 'ripple 0.65s linear',
890
+ '@keyframes ripple': {
891
+ '100%': {
892
+ opacity: 0,
893
+ transform: 'scale(2.5)',
894
+ },
895
+ },
896
+ });
897
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: RippleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
898
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.12", type: RippleDirective, isStandalone: true, selector: "[uniRipple]", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
899
+ }
900
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: RippleDirective, decorators: [{
901
+ type: Directive,
902
+ args: [{
903
+ selector: '[uniRipple]',
904
+ standalone: true,
905
+ }]
906
+ }], ctorParameters: () => [], propDecorators: { onClick: [{
907
+ type: HostListener,
908
+ args: ['click', ['$event']]
909
+ }] } });
910
+
911
+ class UniButtonComponent extends BaseComponent {
912
+ disable = input(false, ...(ngDevMode ? [{ debugName: "disable" }] : /* istanbul ignore next */ []));
913
+ loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
914
+ fullWidth = input(false, ...(ngDevMode ? [{ debugName: "fullWidth" }] : /* istanbul ignore next */ []));
915
+ symbolLeft;
916
+ symbolRight;
917
+ spinnerBox = css({
918
+ position: 'absolute',
919
+ left: 0,
920
+ width: '100%',
921
+ height: '100%',
922
+ paddingTop: '6%',
923
+ paddingBottom: '6%',
924
+ });
925
+ get className() {
926
+ return css([
927
+ this.style() && {
928
+ ...this.style(),
929
+ },
930
+ {
931
+ display: 'flex',
932
+ alignItems: 'center',
933
+ position: 'relative',
934
+ overflow: 'hidden',
935
+ outline: 0,
936
+ border: 0,
937
+ cursor: 'pointer',
938
+ fontFamily: 'Euphemia, sans-serif',
939
+ transition: 'all 0.28s ease',
940
+ '&:disabled': {
941
+ cursor: 'not-allowed !important',
942
+ },
943
+ '& .symbolLeft': {
944
+ marginLeft: -6,
945
+ marginRight: 4,
946
+ fontSize: this.symbolSize(),
947
+ },
948
+ '& span': {
949
+ alignContent: 'center',
950
+ flexGrow: 1,
951
+ whiteSpace: 'nowrap',
952
+ },
953
+ '& .symbolRight': {
954
+ marginRight: -6,
955
+ marginLeft: 4,
956
+ fontSize: this.symbolSize(),
957
+ },
958
+ },
959
+ this.variant() !== 'ghost' && {
960
+ '&:hover, &:focus': {
961
+ ...this.theme.boxShadow('raised'),
962
+ },
963
+ '&:focus-visible': {
964
+ outline: `2px solid ${this.theme.colors()[this.variant()]}`,
965
+ outlineOffset: '2px',
966
+ },
967
+ },
968
+ this.variant() === 'ghost' && {
969
+ '&:hover, &:focus': {
970
+ backgroundColor: 'rgba(0,0,0,0.1) !important',
971
+ },
972
+ '&:focus-visible': {
973
+ outline: `2px solid ${this.theme.colors()[this.variant()]}`,
974
+ outlineOffset: '2px',
975
+ },
976
+ },
977
+ this.fullWidth() && {
978
+ width: '100%',
979
+ },
980
+ !this.loading() && {
981
+ '&:disabled': {
982
+ ...this.componentTheme().colors?.disabled,
983
+ },
984
+ },
985
+ this.loading() && {
986
+ '&:disabled symbol': {
987
+ opacity: 0,
988
+ },
989
+ '&:disabled span': {
990
+ opacity: 0,
991
+ },
992
+ },
993
+ ]);
994
+ }
995
+ symbolSize = computed(() => {
996
+ const style = this.style();
997
+ const fontString = style['fontSize'];
998
+ const fontSize = parseFloat(fontString);
999
+ return fontSize + 4;
1000
+ }, ...(ngDevMode ? [{ debugName: "symbolSize" }] : /* istanbul ignore next */ []));
1001
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1002
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: UniButtonComponent, isStandalone: true, selector: "button[uni-text-button], Button, button[text-button]", inputs: { disable: { classPropertyName: "disable", publicName: "disable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, symbolLeft: { classPropertyName: "symbolLeft", publicName: "symbolLeft", isSignal: false, isRequired: false, transformFunction: null }, symbolRight: { classPropertyName: "symbolRight", publicName: "symbolRight", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "attr.disabled": "disable() || loading() || null", "class": "this.className" } }, providers: [{ provide: COMPONENT_NAME, useValue: 'button' }], usesInheritance: true, hostDirectives: [{ directive: RippleDirective }], ngImport: i0, template: `@if (loading()) {
1003
+ <Box [class]="spinnerBox"><uni-icon name="spinner" /></Box>
1004
+ }
1005
+ @if (symbolLeft) {
1006
+ <Symbol [name]="symbolLeft" class="symbolLeft" />
1007
+ }
1008
+ <span><ng-content></ng-content></span>
1009
+ @if (symbolRight) {
1010
+ <Symbol [name]="symbolRight" class="symbolRight" />
1011
+ } `, isInline: true, dependencies: [{ kind: "component", type: // Keep this import
1012
+ UniIconComponent, selector: "uni-icon, Icon", inputs: ["color", "name"] }, { kind: "component", type: UniBoxComponent, selector: "div[uni-box-layout], Box, div[box-layout]", inputs: ["color", "backgroundColor", "borderRadius", "borderRadiusLeft", "borderRadiusRight", "borderRadiusTop", "borderRadiusBottom", "padding", "paddingHorizontal", "paddingVertical", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "border", "borderTop", "borderBottom", "borderLeft", "borderRight", "dashBorder", "alignSelf", "alignItems", "alignContent", "justifyContent", "grow", "display", "position", "inset", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "ignoreDir", "gridArea", "gridColumn", "gridRow", "overflow", "elevation", "shadow", "gap", "fullWidth", "fullHeight", "flexDirection", "textAlign", "wrapItems", "zIndex"] }, { kind: "component", type: UniSymbolComponent, selector: "uni-symbol, Symbol", inputs: ["name", "fill", "weight", "grade", "opticalSize"] }] });
1013
+ }
1014
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniButtonComponent, decorators: [{
1015
+ type: Component,
1016
+ args: [{
1017
+ selector: 'button[uni-text-button], Button, button[text-button]',
1018
+ template: `@if (loading()) {
1019
+ <Box [class]="spinnerBox"><uni-icon name="spinner" /></Box>
1020
+ }
1021
+ @if (symbolLeft) {
1022
+ <Symbol [name]="symbolLeft" class="symbolLeft" />
1023
+ }
1024
+ <span><ng-content></ng-content></span>
1025
+ @if (symbolRight) {
1026
+ <Symbol [name]="symbolRight" class="symbolRight" />
1027
+ } `,
1028
+ providers: [{ provide: COMPONENT_NAME, useValue: 'button' }],
1029
+ imports: [
1030
+ RippleDirective, // Keep this import
1031
+ UniIconComponent,
1032
+ UniBoxComponent,
1033
+ UniSymbolComponent,
1034
+ ],
1035
+ host: {
1036
+ '[attr.disabled]': 'disable() || loading() || null',
1037
+ },
1038
+ hostDirectives: [{ directive: RippleDirective }],
1039
+ }]
1040
+ }], propDecorators: { disable: [{ type: i0.Input, args: [{ isSignal: true, alias: "disable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], symbolLeft: [{
1041
+ type: Input
1042
+ }], symbolRight: [{
1043
+ type: Input
1044
+ }], className: [{
1045
+ type: HostBinding,
1046
+ args: ['class']
1047
+ }] } });
1048
+
1049
+ class UniCardContentComponent extends BaseComponent {
1050
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniCardContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1051
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: UniCardContentComponent, isStandalone: true, selector: "uni-card-content, CardContent", providers: [{ provide: COMPONENT_NAME, useValue: 'cardContent' }], usesInheritance: true, ngImport: i0, template: "<div [style]=\"style()\">\n <ng-content></ng-content>\n</div>\n", styles: [""] });
1052
+ }
1053
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniCardContentComponent, decorators: [{
1054
+ type: Component,
1055
+ args: [{ selector: 'uni-card-content, CardContent', standalone: true, imports: [], providers: [{ provide: COMPONENT_NAME, useValue: 'cardContent' }], template: "<div [style]=\"style()\">\n <ng-content></ng-content>\n</div>\n" }]
1056
+ }] });
1057
+
1058
+ class UniTextComponent {
1059
+ theme = inject(ThemeService);
1060
+ typeface = input('title-small', ...(ngDevMode ? [{ debugName: "typeface" }] : /* istanbul ignore next */ []));
1061
+ color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
1062
+ display = input(...(ngDevMode ? [undefined, { debugName: "display" }] : /* istanbul ignore next */ []));
1063
+ align = input(...(ngDevMode ? [undefined, { debugName: "align" }] : /* istanbul ignore next */ []));
1064
+ nowrap = input(...(ngDevMode ? [undefined, { debugName: "nowrap" }] : /* istanbul ignore next */ []));
1065
+ maxWidth = input(...(ngDevMode ? [undefined, { debugName: "maxWidth" }] : /* istanbul ignore next */ []));
1066
+ ellipsis = input(false, ...(ngDevMode ? [{ debugName: "ellipsis" }] : /* istanbul ignore next */ []));
1067
+ get className() {
1068
+ return css([
1069
+ {
1070
+ ...this.theme.typeface(this.typeface()),
1071
+ ...this.theme.color(this.color()),
1072
+ display: this.display(),
1073
+ },
1074
+ this.align() && {
1075
+ textAlign: this.align(),
1076
+ },
1077
+ this.nowrap() && {
1078
+ whiteSpace: 'nowrap',
1079
+ },
1080
+ this.maxWidth() && {
1081
+ maxWidth: this.maxWidth(),
1082
+ overflow: 'hidden',
1083
+ whiteSpace: 'nowrap',
1084
+ textOverflow: 'ellipsis',
1085
+ display: 'inline-block',
1086
+ },
1087
+ this.ellipsis() && {
1088
+ whiteSpace: 'nowrap',
1089
+ overflow: 'hidden',
1090
+ textOverflow: 'ellipsis',
1091
+ minWidth: 0,
1092
+ },
1093
+ ]);
1094
+ }
1095
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1096
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniTextComponent, isStandalone: true, selector: "uni-text, Text", inputs: { typeface: { classPropertyName: "typeface", publicName: "typeface", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, nowrap: { classPropertyName: "nowrap", publicName: "nowrap", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, ellipsis: { classPropertyName: "ellipsis", publicName: "ellipsis", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
1097
+ }
1098
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniTextComponent, decorators: [{
1099
+ type: Component,
1100
+ args: [{
1101
+ selector: 'uni-text, Text',
1102
+ standalone: true,
1103
+ imports: [],
1104
+ template: '<ng-content></ng-content>',
1105
+ }]
1106
+ }], propDecorators: { typeface: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeface", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], nowrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "nowrap", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], ellipsis: [{ type: i0.Input, args: [{ isSignal: true, alias: "ellipsis", required: false }] }], className: [{
1107
+ type: HostBinding,
1108
+ args: ['class']
1109
+ }] } });
1110
+
1111
+ class UniCardComponent extends BaseComponent {
1112
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1113
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: UniCardComponent, isStandalone: true, selector: "uni-card, Card", providers: [{ provide: COMPONENT_NAME, useValue: 'card' }], usesInheritance: true, ngImport: i0, template: "<div [style]=\"style()\">\n <ng-content></ng-content>\n</div>\n" });
1114
+ }
1115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniCardComponent, decorators: [{
1116
+ type: Component,
1117
+ args: [{ selector: 'uni-card, Card', standalone: true, imports: [], providers: [{ provide: COMPONENT_NAME, useValue: 'card' }], template: "<div [style]=\"style()\">\n <ng-content></ng-content>\n</div>\n" }]
1118
+ }] });
1119
+
1120
+ class UniCardHeaderComponent extends BaseComponent {
1121
+ card = inject(UniCardComponent, {
1122
+ optional: true,
1123
+ host: true,
1124
+ skipSelf: true,
1125
+ });
1126
+ title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
1127
+ titleTextRole = input('title-large', ...(ngDevMode ? [{ debugName: "titleTextRole" }] : /* istanbul ignore next */ []));
1128
+ constructor() {
1129
+ super();
1130
+ // this.variant = this.card?.variant;
1131
+ }
1132
+ className = css({
1133
+ display: 'flex',
1134
+ justifyContent: 'space-between',
1135
+ alignItems: 'center',
1136
+ });
1137
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1138
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniCardHeaderComponent, isStandalone: true, selector: "uni-card-header, CardHeader", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, titleTextRole: { classPropertyName: "titleTextRole", publicName: "titleTextRole", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: COMPONENT_NAME, useValue: 'cardHeader' }], usesInheritance: true, ngImport: i0, template: "<div [style]=\"style()\" [ngClass]=\"className\">\n <Text [typeface]=\"titleTextRole()\">{{ title() }}</Text>\n <ng-content></ng-content>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: UniTextComponent, selector: "uni-text, Text", inputs: ["typeface", "color", "display", "align", "nowrap", "maxWidth", "ellipsis"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1139
+ }
1140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniCardHeaderComponent, decorators: [{
1141
+ type: Component,
1142
+ args: [{ selector: 'uni-card-header, CardHeader', standalone: true, imports: [UniTextComponent, NgClass], providers: [{ provide: COMPONENT_NAME, useValue: 'cardHeader' }], template: "<div [style]=\"style()\" [ngClass]=\"className\">\n <Text [typeface]=\"titleTextRole()\">{{ title() }}</Text>\n <ng-content></ng-content>\n</div>\n" }]
1143
+ }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], titleTextRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleTextRole", required: false }] }] } });
1144
+
1145
+ class UniIconButtonComponent {
1146
+ theme = inject(ThemeService);
1147
+ config = this.theme.component('iconButton');
1148
+ iconName;
1149
+ symbolName;
1150
+ variant = 'ghost';
1151
+ size = 'lg';
1152
+ disable;
1153
+ loading;
1154
+ opticalSize = 24;
1155
+ get className() {
1156
+ const { sizes, colors } = this.config();
1157
+ const sizeConfig = sizes && sizes[this.size];
1158
+ const colorConfig = colors && colors[this.variant];
1159
+ return css([
1160
+ {
1161
+ position: 'relative',
1162
+ overflow: 'hidden',
1163
+ outline: 0,
1164
+ border: 0,
1165
+ cursor: 'pointer',
1166
+ transition: 'all 0.28s ease',
1167
+ borderRadius: 999,
1168
+ display: 'block',
1169
+ '&:disabled': {
1170
+ cursor: 'not-allowed !important',
1171
+ },
1172
+ '& symbol': {
1173
+ fontSize: 'inherit',
1174
+ lineHeight: 'inherit',
1175
+ },
1176
+ },
1177
+ sizeConfig && {
1178
+ ...sizeConfig,
1179
+ },
1180
+ colorConfig && {
1181
+ ...colorConfig,
1182
+ },
1183
+ this.symbolName &&
1184
+ !this.loading && {
1185
+ padding: 0,
1186
+ },
1187
+ this.variant !== 'ghost' && {
1188
+ '&:hover': {
1189
+ ...this.theme.boxShadow('raised'),
1190
+ },
1191
+ },
1192
+ this.variant === 'ghost' && {
1193
+ '&:hover': {
1194
+ backgroundColor: 'rgba(0,0,0,0.1)',
1195
+ },
1196
+ },
1197
+ !this.loading && {
1198
+ '&:disabled': {
1199
+ ...this.config().colors?.disabled,
1200
+ },
1201
+ },
1202
+ ]);
1203
+ }
1204
+ ngOnChanges(changes) {
1205
+ const { sizes, colors } = this.config();
1206
+ const sizeConfig = sizes && sizes[this.size];
1207
+ if (this.loading)
1208
+ this.iconName = 'spinner';
1209
+ }
1210
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1211
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: UniIconButtonComponent, isStandalone: true, selector: "button[uni-icon-button], button[icon-button]", inputs: { iconName: "iconName", symbolName: "symbolName", variant: "variant", size: "size", disable: "disable", loading: "loading", opticalSize: "opticalSize" }, host: { properties: { "attr.disabled": "disable || loading || null", "class": "this.className" } }, usesOnChanges: true, hostDirectives: [{ directive: RippleDirective }], ngImport: i0, template: `
1212
+ @if (symbolName && !loading) {
1213
+ <Symbol [name]="symbolName" [opticalSize]="opticalSize" />
1214
+ } @else if (iconName && !loading) {
1215
+ <Icon [name]="iconName" />
1216
+ }
1217
+ `, isInline: true, dependencies: [{ kind: "component", type: UniSymbolComponent, selector: "uni-symbol, Symbol", inputs: ["name", "fill", "weight", "grade", "opticalSize"] }, { kind: "component", type: UniIconComponent, selector: "uni-icon, Icon", inputs: ["color", "name"] }] });
1218
+ }
1219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniIconButtonComponent, decorators: [{
1220
+ type: Component,
1221
+ args: [{
1222
+ selector: 'button[uni-icon-button], button[icon-button]',
1223
+ standalone: true,
1224
+ imports: [
1225
+ RippleDirective,
1226
+ UniSymbolComponent,
1227
+ UniIconComponent,
1228
+ // Keep this import
1229
+ ],
1230
+ template: `
1231
+ @if (symbolName && !loading) {
1232
+ <Symbol [name]="symbolName" [opticalSize]="opticalSize" />
1233
+ } @else if (iconName && !loading) {
1234
+ <Icon [name]="iconName" />
1235
+ }
1236
+ `,
1237
+ host: {
1238
+ '[attr.disabled]': 'disable || loading || null',
1239
+ },
1240
+ hostDirectives: [{ directive: RippleDirective }],
1241
+ }]
1242
+ }], propDecorators: { iconName: [{
1243
+ type: Input
1244
+ }], symbolName: [{
1245
+ type: Input
1246
+ }], variant: [{
1247
+ type: Input
1248
+ }], size: [{
1249
+ type: Input
1250
+ }], disable: [{
1251
+ type: Input
1252
+ }], loading: [{
1253
+ type: Input
1254
+ }], opticalSize: [{
1255
+ type: Input
1256
+ }], className: [{
1257
+ type: HostBinding,
1258
+ args: ['class']
1259
+ }] } });
1260
+
1261
+ class UniDialogComponent extends BaseComponent {
1262
+ elem = inject(ElementRef);
1263
+ show = input(false, ...(ngDevMode ? [{ debugName: "show" }] : /* istanbul ignore next */ []));
1264
+ _show = linkedSignal(() => this.show(), ...(ngDevMode ? [{ debugName: "_show" }] : /* istanbul ignore next */ []));
1265
+ defaultCloseButton;
1266
+ showing = new EventEmitter();
1267
+ constructor() {
1268
+ super();
1269
+ effect(() => (this._show() ? this.open() : this.close()));
1270
+ }
1271
+ get _dialog() {
1272
+ return this.elem.nativeElement;
1273
+ }
1274
+ get className() {
1275
+ return css([
1276
+ {
1277
+ ...this.theme.radius(this.componentOptions().borderRadius),
1278
+ ...this.theme.colorPair(this.componentOptions().color),
1279
+ ...this.theme.border(this.componentOptions().border),
1280
+ ...this.theme.boxShadow(this.componentOptions().elevation),
1281
+ ...this.theme.padding(this.componentOptions().padding || 'none'),
1282
+ '&::backdrop': {
1283
+ ...this.componentOptions().backdrop,
1284
+ },
1285
+ '&[open], &::backdrop': {
1286
+ animation: `${this.dialogFadeIn} ease-in 350ms`,
1287
+ },
1288
+ '&[closing], &[closing]::backdrop': {
1289
+ animation: `${this.dialogFadeOut} ease-in 350ms`,
1290
+ },
1291
+ },
1292
+ ]);
1293
+ }
1294
+ BackdropClick(event) {
1295
+ if (event.target.nodeName === 'DIALOG') {
1296
+ this.close();
1297
+ }
1298
+ }
1299
+ ClosingAnimation(e) {
1300
+ // Close the dialog if the animation is finished
1301
+ if (e.animationName.includes(this.dialogFadeOut)) {
1302
+ this._dialog.close();
1303
+ this._dialog.removeAttribute('closing');
1304
+ this.showing.emit(false);
1305
+ }
1306
+ }
1307
+ closeButton = css({
1308
+ position: 'absolute',
1309
+ right: 12,
1310
+ top: 12,
1311
+ });
1312
+ dialogFadeIn = keyframes({ ...fadeIn });
1313
+ dialogFadeOut = keyframes({ ...fadeOut });
1314
+ open() {
1315
+ this._dialog.removeAttribute('closing');
1316
+ this._dialog.showModal();
1317
+ this._show.set(true);
1318
+ this.showing.emit(true);
1319
+ }
1320
+ close() {
1321
+ this._dialog.setAttribute('closing', 'true');
1322
+ this._show.set(false);
1323
+ }
1324
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1325
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: UniDialogComponent, isStandalone: true, selector: "dialog[uni-dialog], Dialog", inputs: { show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null }, defaultCloseButton: { classPropertyName: "defaultCloseButton", publicName: "defaultCloseButton", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { showing: "showing" }, host: { listeners: { "click": "BackdropClick($event)", "animationend": "ClosingAnimation($event)" }, properties: { "class": "this.className" } }, providers: [{ provide: COMPONENT_NAME, useValue: 'dialog' }], usesInheritance: true, ngImport: i0, template: `
1326
+ @if (defaultCloseButton) {
1327
+ <button
1328
+ icon-button
1329
+ iconName="close"
1330
+ variant="ghost"
1331
+ (click)="close()"
1332
+ [class]="closeButton"
1333
+ size="md"
1334
+ >
1335
+ Close
1336
+ </button>
1337
+ }
1338
+ <ng-content></ng-content>
1339
+ `, isInline: true, dependencies: [{ kind: "component", type: UniIconButtonComponent, selector: "button[uni-icon-button], button[icon-button]", inputs: ["iconName", "symbolName", "variant", "size", "disable", "loading", "opticalSize"] }, { kind: "ngmodule", type: CommonModule }] });
1340
+ }
1341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniDialogComponent, decorators: [{
1342
+ type: Component,
1343
+ args: [{
1344
+ selector: 'dialog[uni-dialog], Dialog',
1345
+ standalone: true,
1346
+ imports: [UniIconButtonComponent, CommonModule],
1347
+ template: `
1348
+ @if (defaultCloseButton) {
1349
+ <button
1350
+ icon-button
1351
+ iconName="close"
1352
+ variant="ghost"
1353
+ (click)="close()"
1354
+ [class]="closeButton"
1355
+ size="md"
1356
+ >
1357
+ Close
1358
+ </button>
1359
+ }
1360
+ <ng-content></ng-content>
1361
+ `,
1362
+ providers: [{ provide: COMPONENT_NAME, useValue: 'dialog' }],
1363
+ }]
1364
+ }], ctorParameters: () => [], propDecorators: { show: [{ type: i0.Input, args: [{ isSignal: true, alias: "show", required: false }] }], defaultCloseButton: [{
1365
+ type: Input
1366
+ }], showing: [{
1367
+ type: Output
1368
+ }], className: [{
1369
+ type: HostBinding,
1370
+ args: ['class']
1371
+ }], BackdropClick: [{
1372
+ type: HostListener,
1373
+ args: ['click', ['$event']]
1374
+ }], ClosingAnimation: [{
1375
+ type: HostListener,
1376
+ args: ['animationend', ['$event']]
1377
+ }] } });
1378
+
1379
+ class UniDialogButtonsComponent {
1380
+ dialog = inject(UniDialogComponent, {
1381
+ optional: true,
1382
+ host: true,
1383
+ skipSelf: true,
1384
+ });
1385
+ confirmButtonText;
1386
+ confirmButtonVariant = 'primary';
1387
+ cancelButtonText;
1388
+ disableConfirm;
1389
+ padding = 'md';
1390
+ paddingBottom = 'lg';
1391
+ justifyContent = 'center';
1392
+ confirmed = new EventEmitter();
1393
+ closeDialog() {
1394
+ this.dialog?.close();
1395
+ }
1396
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniDialogButtonsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1397
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: UniDialogButtonsComponent, isStandalone: true, selector: "uni-dialog-buttons, DialogButtons, div[dialog-buttons]", inputs: { confirmButtonText: "confirmButtonText", confirmButtonVariant: "confirmButtonVariant", cancelButtonText: "cancelButtonText", disableConfirm: "disableConfirm", padding: "padding", paddingBottom: "paddingBottom", justifyContent: "justifyContent" }, outputs: { confirmed: "confirmed" }, ngImport: i0, template: "<div\n row-layout\n gap=\"md\"\n [padding]=\"padding\"\n [paddingBottom]=\"paddingBottom\"\n [justifyContent]=\"justifyContent\"\n>\n <button\n text-button\n [variant]=\"confirmButtonVariant\"\n (click)=\"confirmed.emit(); closeDialog()\"\n [disable]=\"disableConfirm\"\n >\n {{ confirmButtonText || 'Confirm' }}\n </button>\n <button text-button variant=\"warn\" (click)=\"closeDialog()\">\n {{ cancelButtonText || 'Cancel' }}\n </button>\n</div>\n", dependencies: [{ kind: "component", type: UniRowComponent, selector: "div[uni-row-layout], Row, div[row-layout]", inputs: ["display", "flexDirection", "minWidth"] }, { kind: "component", type: UniButtonComponent, selector: "button[uni-text-button], Button, button[text-button]", inputs: ["disable", "loading", "fullWidth", "symbolLeft", "symbolRight"] }] });
1398
+ }
1399
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniDialogButtonsComponent, decorators: [{
1400
+ type: Component,
1401
+ args: [{ selector: 'uni-dialog-buttons, DialogButtons, div[dialog-buttons]', standalone: true, imports: [UniRowComponent, UniButtonComponent], template: "<div\n row-layout\n gap=\"md\"\n [padding]=\"padding\"\n [paddingBottom]=\"paddingBottom\"\n [justifyContent]=\"justifyContent\"\n>\n <button\n text-button\n [variant]=\"confirmButtonVariant\"\n (click)=\"confirmed.emit(); closeDialog()\"\n [disable]=\"disableConfirm\"\n >\n {{ confirmButtonText || 'Confirm' }}\n </button>\n <button text-button variant=\"warn\" (click)=\"closeDialog()\">\n {{ cancelButtonText || 'Cancel' }}\n </button>\n</div>\n" }]
1402
+ }], propDecorators: { confirmButtonText: [{
1403
+ type: Input
1404
+ }], confirmButtonVariant: [{
1405
+ type: Input
1406
+ }], cancelButtonText: [{
1407
+ type: Input
1408
+ }], disableConfirm: [{
1409
+ type: Input
1410
+ }], padding: [{
1411
+ type: Input
1412
+ }], paddingBottom: [{
1413
+ type: Input
1414
+ }], justifyContent: [{
1415
+ type: Input
1416
+ }], confirmed: [{
1417
+ type: Output
1418
+ }] } });
1419
+
1420
+ class UniDialogHeaderComponent extends BaseComponent {
1421
+ dialog = inject(UniDialogComponent, {
1422
+ optional: true,
1423
+ host: true,
1424
+ skipSelf: true,
1425
+ });
1426
+ closeDialog() {
1427
+ this.dialog?.close();
1428
+ }
1429
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniDialogHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1430
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: UniDialogHeaderComponent, isStandalone: true, selector: "div[uni-dialog-header], DialogHeader", providers: [{ provide: COMPONENT_NAME, useValue: 'dialogHeader' }], usesInheritance: true, ngImport: i0, template: "<div\n row-layout\n [color]=\"componentOptions().color\"\n [borderRadius]=\"componentOptions().borderRadius\"\n [height]=\"componentOptions().height\"\n alignItems=\"center\"\n paddingHorizontal=\"sm\"\n>\n <Box [width]=\"26\"></Box>\n <Box [grow]=\"1\">\n <Text\n [typeface]=\"componentOptions().textRole\"\n [color]=\"componentOptions().textColor\"\n display=\"block\"\n [align]=\"componentOptions().textAlign || 'center'\"\n ><ng-content></ng-content\n ></Text>\n </Box>\n <button\n icon-button\n [iconName]=\"componentOptions().closeButtonIcon\"\n [symbolName]=\"componentOptions().closeButtonSymbol\"\n variant=\"ghost\"\n (click)=\"closeDialog()\"\n [size]=\"componentOptions().closeButtonSize || 'md'\"\n >\n Close\n </button>\n</div>\n", dependencies: [{ kind: "component", type: UniBoxComponent, selector: "div[uni-box-layout], Box, div[box-layout]", inputs: ["color", "backgroundColor", "borderRadius", "borderRadiusLeft", "borderRadiusRight", "borderRadiusTop", "borderRadiusBottom", "padding", "paddingHorizontal", "paddingVertical", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "border", "borderTop", "borderBottom", "borderLeft", "borderRight", "dashBorder", "alignSelf", "alignItems", "alignContent", "justifyContent", "grow", "display", "position", "inset", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "ignoreDir", "gridArea", "gridColumn", "gridRow", "overflow", "elevation", "shadow", "gap", "fullWidth", "fullHeight", "flexDirection", "textAlign", "wrapItems", "zIndex"] }, { kind: "component", type: UniIconButtonComponent, selector: "button[uni-icon-button], button[icon-button]", inputs: ["iconName", "symbolName", "variant", "size", "disable", "loading", "opticalSize"] }, { kind: "component", type: UniTextComponent, selector: "uni-text, Text", inputs: ["typeface", "color", "display", "align", "nowrap", "maxWidth", "ellipsis"] }, { kind: "component", type: UniRowComponent, selector: "div[uni-row-layout], Row, div[row-layout]", inputs: ["display", "flexDirection", "minWidth"] }] });
1431
+ }
1432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniDialogHeaderComponent, decorators: [{
1433
+ type: Component,
1434
+ args: [{ selector: 'div[uni-dialog-header], DialogHeader', standalone: true, imports: [UniBoxComponent, UniIconButtonComponent, UniTextComponent, UniRowComponent], providers: [{ provide: COMPONENT_NAME, useValue: 'dialogHeader' }], template: "<div\n row-layout\n [color]=\"componentOptions().color\"\n [borderRadius]=\"componentOptions().borderRadius\"\n [height]=\"componentOptions().height\"\n alignItems=\"center\"\n paddingHorizontal=\"sm\"\n>\n <Box [width]=\"26\"></Box>\n <Box [grow]=\"1\">\n <Text\n [typeface]=\"componentOptions().textRole\"\n [color]=\"componentOptions().textColor\"\n display=\"block\"\n [align]=\"componentOptions().textAlign || 'center'\"\n ><ng-content></ng-content\n ></Text>\n </Box>\n <button\n icon-button\n [iconName]=\"componentOptions().closeButtonIcon\"\n [symbolName]=\"componentOptions().closeButtonSymbol\"\n variant=\"ghost\"\n (click)=\"closeDialog()\"\n [size]=\"componentOptions().closeButtonSize || 'md'\"\n >\n Close\n </button>\n</div>\n" }]
1435
+ }] });
1436
+
1437
+ class UniDividerComponent {
1438
+ themeService = inject(ThemeService);
1439
+ orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
1440
+ border = input('primary', ...(ngDevMode ? [{ debugName: "border" }] : /* istanbul ignore next */ []));
1441
+ get className() {
1442
+ return css([
1443
+ {
1444
+ display: 'block',
1445
+ },
1446
+ this.orientation() === 'horizontal' && {
1447
+ ...this.themeService.borderBottom(this.border()),
1448
+ width: '100%',
1449
+ },
1450
+ this.orientation() === 'vertical' && {
1451
+ ...this.themeService.borderLeft(this.border()),
1452
+ height: '100%',
1453
+ },
1454
+ ]);
1455
+ }
1456
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1457
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniDividerComponent, isStandalone: true, selector: "uni-divider, Divider", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: ``, isInline: true });
1458
+ }
1459
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniDividerComponent, decorators: [{
1460
+ type: Component,
1461
+ args: [{
1462
+ selector: 'uni-divider, Divider',
1463
+ standalone: true,
1464
+ imports: [],
1465
+ template: ``,
1466
+ }]
1467
+ }], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], border: [{ type: i0.Input, args: [{ isSignal: true, alias: "border", required: false }] }], className: [{
1468
+ type: HostBinding,
1469
+ args: ['class']
1470
+ }] } });
1471
+
1472
+ class UniDropdownComponent extends BaseComponent {
1473
+ renderer = inject(Renderer2);
1474
+ cleanupAutoUpdate;
1475
+ delay = 100;
1476
+ // Reactively track visibility status using Signals
1477
+ showing = signal(false, ...(ngDevMode ? [{ debugName: "showing" }] : /* istanbul ignore next */ []));
1478
+ trigger = input.required(...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
1479
+ placement = input('bottom-start', ...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
1480
+ offset = input({ mainAxis: 4, alignmentAxis: 12 }, ...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
1481
+ paddingVertical = input(...(ngDevMode ? [undefined, { debugName: "paddingVertical" }] : /* istanbul ignore next */ []));
1482
+ paddingHorizontal = input(...(ngDevMode ? [undefined, { debugName: "paddingHorizontal" }] : /* istanbul ignore next */ []));
1483
+ dropdownShowing = output();
1484
+ dropdownHiding = output();
1485
+ dropdownRef;
1486
+ get _trigger() {
1487
+ return this.trigger();
1488
+ }
1489
+ get _dropdown() {
1490
+ return this.dropdownRef.nativeElement;
1491
+ }
1492
+ transformOriginMap = {
1493
+ top: 'bottom center',
1494
+ right: 'center left',
1495
+ bottom: 'top center',
1496
+ left: 'center right',
1497
+ 'top-start': 'bottom left',
1498
+ 'top-end': 'bottom right',
1499
+ 'right-start': 'top left',
1500
+ 'right-end': 'bottom left',
1501
+ 'bottom-start': 'top left',
1502
+ 'bottom-end': 'top right',
1503
+ 'left-start': 'top right',
1504
+ 'left-end': 'bottom right',
1505
+ };
1506
+ dropdownClass = computed(() => {
1507
+ const currentPlacement = this.placement();
1508
+ return css([
1509
+ {
1510
+ // Reset browser agent default popover styles
1511
+ border: 'none',
1512
+ background: 'transparent',
1513
+ margin: 0,
1514
+ padding: 0,
1515
+ overflow: 'visible',
1516
+ width: 'max-content',
1517
+ position: 'absolute',
1518
+ top: 0,
1519
+ left: 0,
1520
+ zIndex: 1,
1521
+ // 2. Animate discrete properties across top layer layout contexts
1522
+ transitionProperty: 'transform, opacity, display, overlay',
1523
+ transitionDuration: `${this.delay}ms`,
1524
+ transitionTimingFunction: 'linear',
1525
+ transitionBehavior: 'allow-discrete',
1526
+ // Hidden State (Closed)
1527
+ opacity: 0,
1528
+ transform: 'scale(0.8)',
1529
+ transformOrigin: this.transformOriginMap[currentPlacement],
1530
+ // 3. Active state styling controlled via the native browser pseudo-class
1531
+ ['&:popover-open']: {
1532
+ opacity: 1,
1533
+ transform: 'scale(1)',
1534
+ },
1535
+ // 4. Starting-style rules what properties animate *from* when transitioning in
1536
+ ['@starting-style']: {
1537
+ ['&:popover-open']: {
1538
+ opacity: 0,
1539
+ transform: 'scale(0.8)',
1540
+ },
1541
+ },
1542
+ },
1543
+ ]);
1544
+ }, ...(ngDevMode ? [{ debugName: "dropdownClass" }] : /* istanbul ignore next */ []));
1545
+ ngOnInit() {
1546
+ // Single native click binding to manage open/close commands
1547
+ this.renderer.listen(this._trigger, 'click', (e) => {
1548
+ e.stopPropagation();
1549
+ this.toggleDropdown();
1550
+ });
1551
+ // Sync state if user invokes light-dismiss via outside click or Escape key
1552
+ this.renderer.listen(this._dropdown, 'toggle', (event) => {
1553
+ const isOpened = event.newState === 'open';
1554
+ this.showing.set(isOpened);
1555
+ if (isOpened) {
1556
+ this.dropdownShowing.emit(true);
1557
+ this.cleanupAutoUpdate = autoUpdate(this._trigger, this._dropdown, () => this.updatePosition());
1558
+ }
1559
+ else {
1560
+ this.dropdownHiding.emit(true);
1561
+ if (this.cleanupAutoUpdate) {
1562
+ this.cleanupAutoUpdate();
1563
+ this.cleanupAutoUpdate = undefined;
1564
+ }
1565
+ }
1566
+ });
1567
+ }
1568
+ toggleDropdown() {
1569
+ if (this.showing()) {
1570
+ this._dropdown.hidePopover();
1571
+ }
1572
+ else {
1573
+ this._dropdown.showPopover();
1574
+ }
1575
+ }
1576
+ hideDropdown() {
1577
+ this._dropdown.hidePopover();
1578
+ }
1579
+ async updatePosition() {
1580
+ const { x, y } = await computePosition(this._trigger, this._dropdown, {
1581
+ placement: this.placement(),
1582
+ middleware: [offset(this.offset()), shift({ padding: 5 })],
1583
+ });
1584
+ this.renderer.setStyle(this._dropdown, 'left', `${x}px`);
1585
+ this.renderer.setStyle(this._dropdown, 'top', `${y}px`);
1586
+ }
1587
+ ngOnDestroy() {
1588
+ if (this.cleanupAutoUpdate)
1589
+ this.cleanupAutoUpdate();
1590
+ try {
1591
+ this._dropdown.hidePopover();
1592
+ }
1593
+ catch { }
1594
+ }
1595
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1596
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniDropdownComponent, isStandalone: true, selector: "uni-dropdown, Dropdown", inputs: { trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: true, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, paddingVertical: { classPropertyName: "paddingVertical", publicName: "paddingVertical", isSignal: true, isRequired: false, transformFunction: null }, paddingHorizontal: { classPropertyName: "paddingHorizontal", publicName: "paddingHorizontal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dropdownShowing: "dropdownShowing", dropdownHiding: "dropdownHiding" }, providers: [{ provide: COMPONENT_NAME, useValue: 'dropdown' }], viewQueries: [{ propertyName: "dropdownRef", first: true, predicate: ["dropdown"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
1597
+ <!-- 1. The native 'popover' attribute brings it to the top layer with native light-dismiss -->
1598
+ <div #dropdown popover="auto" [class]="dropdownClass()">
1599
+ <div
1600
+ box-layout
1601
+ [border]="componentOptions().border"
1602
+ [borderRadius]="componentOptions().borderRadius"
1603
+ [paddingVertical]="paddingVertical()"
1604
+ [paddingHorizontal]="paddingHorizontal()"
1605
+ [color]="componentOptions().color"
1606
+ [shadow]="componentOptions().shadow"
1607
+ >
1608
+ <ng-content></ng-content>
1609
+ </div>
1610
+ </div>
1611
+ `, isInline: true, dependencies: [{ kind: "component", type: UniBoxComponent, selector: "div[uni-box-layout], Box, div[box-layout]", inputs: ["color", "backgroundColor", "borderRadius", "borderRadiusLeft", "borderRadiusRight", "borderRadiusTop", "borderRadiusBottom", "padding", "paddingHorizontal", "paddingVertical", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "border", "borderTop", "borderBottom", "borderLeft", "borderRight", "dashBorder", "alignSelf", "alignItems", "alignContent", "justifyContent", "grow", "display", "position", "inset", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "ignoreDir", "gridArea", "gridColumn", "gridRow", "overflow", "elevation", "shadow", "gap", "fullWidth", "fullHeight", "flexDirection", "textAlign", "wrapItems", "zIndex"] }] });
1612
+ }
1613
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniDropdownComponent, decorators: [{
1614
+ type: Component,
1615
+ args: [{
1616
+ selector: 'uni-dropdown, Dropdown',
1617
+ standalone: true,
1618
+ imports: [UniBoxComponent],
1619
+ template: `
1620
+ <!-- 1. The native 'popover' attribute brings it to the top layer with native light-dismiss -->
1621
+ <div #dropdown popover="auto" [class]="dropdownClass()">
1622
+ <div
1623
+ box-layout
1624
+ [border]="componentOptions().border"
1625
+ [borderRadius]="componentOptions().borderRadius"
1626
+ [paddingVertical]="paddingVertical()"
1627
+ [paddingHorizontal]="paddingHorizontal()"
1628
+ [color]="componentOptions().color"
1629
+ [shadow]="componentOptions().shadow"
1630
+ >
1631
+ <ng-content></ng-content>
1632
+ </div>
1633
+ </div>
1634
+ `,
1635
+ providers: [{ provide: COMPONENT_NAME, useValue: 'dropdown' }],
1636
+ }]
1637
+ }], propDecorators: { trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: true }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], paddingVertical: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingVertical", required: false }] }], paddingHorizontal: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingHorizontal", required: false }] }], dropdownShowing: [{ type: i0.Output, args: ["dropdownShowing"] }], dropdownHiding: [{ type: i0.Output, args: ["dropdownHiding"] }], dropdownRef: [{
1638
+ type: ViewChild,
1639
+ args: ['dropdown', { static: true }]
1640
+ }] } });
1641
+
1642
+ class UniMenuItemComponent extends UniBoxComponent {
1643
+ _elementRef = inject(ElementRef);
1644
+ display = input('flex', ...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
1645
+ flexDirection = input('row', ...(ngDevMode ? [{ debugName: "flexDirection" }] : /* istanbul ignore next */ []));
1646
+ alignItems = input('center', ...(ngDevMode ? [{ debugName: "alignItems" }] : /* istanbul ignore next */ []));
1647
+ paddingHorizontal = input('md', ...(ngDevMode ? [{ debugName: "paddingHorizontal" }] : /* istanbul ignore next */ []));
1648
+ gap = input('md', ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
1649
+ label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
1650
+ template = input(...(ngDevMode ? [undefined, { debugName: "template" }] : /* istanbul ignore next */ []));
1651
+ context = input(...(ngDevMode ? [undefined, { debugName: "context" }] : /* istanbul ignore next */ []));
1652
+ symbolName = input(...(ngDevMode ? [undefined, { debugName: "symbolName" }] : /* istanbul ignore next */ []));
1653
+ active = input(...(ngDevMode ? [undefined, { debugName: "active" }] : /* istanbul ignore next */ []));
1654
+ hoverColor = input('primary-container', ...(ngDevMode ? [{ debugName: "hoverColor" }] : /* istanbul ignore next */ []));
1655
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
1656
+ get className() {
1657
+ return css([
1658
+ {
1659
+ cursor: 'pointer',
1660
+ transition: 'all 0.35s ease',
1661
+ height: 38,
1662
+ '&:hover': {
1663
+ ...this.theme.colorPair(this.hoverColor()),
1664
+ },
1665
+ },
1666
+ ]);
1667
+ }
1668
+ focus() {
1669
+ this._elementRef.nativeElement.focus();
1670
+ }
1671
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniMenuItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1672
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: UniMenuItemComponent, isStandalone: true, selector: "div[uni-menu-item], div[menu-item]", inputs: { display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, flexDirection: { classPropertyName: "flexDirection", publicName: "flexDirection", isSignal: true, isRequired: false, transformFunction: null }, alignItems: { classPropertyName: "alignItems", publicName: "alignItems", isSignal: true, isRequired: false, transformFunction: null }, paddingHorizontal: { classPropertyName: "paddingHorizontal", publicName: "paddingHorizontal", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, symbolName: { classPropertyName: "symbolName", publicName: "symbolName", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, hoverColor: { classPropertyName: "hoverColor", publicName: "hoverColor", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: "@let tpl = template();\n@let symbol = symbolName();\n@if (symbol) {\n <Symbol [name]=\"symbol\"></Symbol>\n}\n<div box-layout [grow]=\"1\">\n @if (tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"context()\"\n ></ng-container>\n } @else {\n <Text role=\"label\" display=\"block\" [nowrap]=\"true\">\n {{ label() }}\n </Text>\n }\n</div>\n@if (active()) {\n <Symbol name=\"check\"></Symbol>\n}\n", styles: [":host:focus{background:#ccc;color:#fff}:host.disabled{color:#ddd;pointer-events:none}\n"], dependencies: [{ kind: "component", type: UniTextComponent, selector: "uni-text, Text", inputs: ["typeface", "color", "display", "align", "nowrap", "maxWidth", "ellipsis"] }, { kind: "component", type: UniSymbolComponent, selector: "uni-symbol, Symbol", inputs: ["name", "fill", "weight", "grade", "opticalSize"] }, { kind: "component", type: UniBoxComponent, selector: "div[uni-box-layout], Box, div[box-layout]", inputs: ["color", "backgroundColor", "borderRadius", "borderRadiusLeft", "borderRadiusRight", "borderRadiusTop", "borderRadiusBottom", "padding", "paddingHorizontal", "paddingVertical", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "border", "borderTop", "borderBottom", "borderLeft", "borderRight", "dashBorder", "alignSelf", "alignItems", "alignContent", "justifyContent", "grow", "display", "position", "inset", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "ignoreDir", "gridArea", "gridColumn", "gridRow", "overflow", "elevation", "shadow", "gap", "fullWidth", "fullHeight", "flexDirection", "textAlign", "wrapItems", "zIndex"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1673
+ }
1674
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniMenuItemComponent, decorators: [{
1675
+ type: Component,
1676
+ args: [{ selector: 'div[uni-menu-item], div[menu-item]', standalone: true, imports: [UniTextComponent, UniSymbolComponent, UniBoxComponent, NgTemplateOutlet], template: "@let tpl = template();\n@let symbol = symbolName();\n@if (symbol) {\n <Symbol [name]=\"symbol\"></Symbol>\n}\n<div box-layout [grow]=\"1\">\n @if (tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"context()\"\n ></ng-container>\n } @else {\n <Text role=\"label\" display=\"block\" [nowrap]=\"true\">\n {{ label() }}\n </Text>\n }\n</div>\n@if (active()) {\n <Symbol name=\"check\"></Symbol>\n}\n", styles: [":host:focus{background:#ccc;color:#fff}:host.disabled{color:#ddd;pointer-events:none}\n"] }]
1677
+ }], propDecorators: { display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], flexDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "flexDirection", required: false }] }], alignItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignItems", required: false }] }], paddingHorizontal: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingHorizontal", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }], symbolName: [{ type: i0.Input, args: [{ isSignal: true, alias: "symbolName", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], hoverColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverColor", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], className: [{
1678
+ type: HostBinding,
1679
+ args: ['class']
1680
+ }] } });
1681
+
1682
+ class UniMenuComponent {
1683
+ cdr = inject(ChangeDetectorRef);
1684
+ // Modern Signal Inputs for perfect Zoneless tracking
1685
+ menuItems = input.required(...(ngDevMode ? [{ debugName: "menuItems" }] : /* istanbul ignore next */ []));
1686
+ activeItem = input(...(ngDevMode ? [undefined, { debugName: "activeItem" }] : /* istanbul ignore next */ []));
1687
+ placement = input('bottom-start', ...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
1688
+ // Modern Signal Output
1689
+ menuItemClicked = output();
1690
+ TriggerClassName = css({ display: 'inline-block' });
1691
+ get className() {
1692
+ return css({
1693
+ margin: 'unset',
1694
+ padding: 'unset',
1695
+ });
1696
+ }
1697
+ handleMenuItemClick(item, dropdown) {
1698
+ if (item.action) {
1699
+ item.action();
1700
+ }
1701
+ this.menuItemClicked.emit(item);
1702
+ dropdown.hideDropdown();
1703
+ // Explicitly request a render tick if item.action() updated any internal state
1704
+ this.cdr.markForCheck();
1705
+ }
1706
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1707
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: UniMenuComponent, isStandalone: true, selector: "Menu, uni-menu", inputs: { menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: true, transformFunction: null }, activeItem: { classPropertyName: "activeItem", publicName: "activeItem", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemClicked: "menuItemClicked" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: `
1708
+ <div #trigger [class]="TriggerClassName">
1709
+ <ng-content></ng-content>
1710
+ </div>
1711
+
1712
+ @if (menuItems()) {
1713
+ <Dropdown [trigger]="trigger" [placement]="placement()" paddingVertical="xs" #dropdown>
1714
+ @for (item of menuItems(); track item) {
1715
+ <div
1716
+ menu-item
1717
+ [label]="item.label"
1718
+ [symbolName]="item.symbolName"
1719
+ [active]="activeItem() === item"
1720
+ [template]="item.template"
1721
+ [context]="item.context"
1722
+ (click)="handleMenuItemClick(item, dropdown)"
1723
+ ></div>
1724
+ }
1725
+ </Dropdown>
1726
+ }
1727
+ `, isInline: true, dependencies: [{ kind: "component", type: UniMenuItemComponent, selector: "div[uni-menu-item], div[menu-item]", inputs: ["display", "flexDirection", "alignItems", "paddingHorizontal", "gap", "label", "template", "context", "symbolName", "active", "hoverColor", "disabled"] }, { kind: "component", type: UniDropdownComponent, selector: "uni-dropdown, Dropdown", inputs: ["trigger", "placement", "offset", "paddingVertical", "paddingHorizontal"], outputs: ["dropdownShowing", "dropdownHiding"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1728
+ }
1729
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniMenuComponent, decorators: [{
1730
+ type: Component,
1731
+ args: [{
1732
+ selector: 'Menu, uni-menu',
1733
+ standalone: true,
1734
+ imports: [UniMenuItemComponent, UniDropdownComponent],
1735
+ changeDetection: ChangeDetectionStrategy.OnPush, // Crucial for zoneless
1736
+ template: `
1737
+ <div #trigger [class]="TriggerClassName">
1738
+ <ng-content></ng-content>
1739
+ </div>
1740
+
1741
+ @if (menuItems()) {
1742
+ <Dropdown [trigger]="trigger" [placement]="placement()" paddingVertical="xs" #dropdown>
1743
+ @for (item of menuItems(); track item) {
1744
+ <div
1745
+ menu-item
1746
+ [label]="item.label"
1747
+ [symbolName]="item.symbolName"
1748
+ [active]="activeItem() === item"
1749
+ [template]="item.template"
1750
+ [context]="item.context"
1751
+ (click)="handleMenuItemClick(item, dropdown)"
1752
+ ></div>
1753
+ }
1754
+ </Dropdown>
1755
+ }
1756
+ `,
1757
+ }]
1758
+ }], propDecorators: { menuItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuItems", required: true }] }], activeItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeItem", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], menuItemClicked: [{ type: i0.Output, args: ["menuItemClicked"] }], className: [{
1759
+ type: HostBinding,
1760
+ args: ['class']
1761
+ }] } });
1762
+
1763
+ class UniTooltipComponent extends BaseComponent {
1764
+ elRef = inject(ElementRef);
1765
+ renderer = inject(Renderer2);
1766
+ timer = useTimer();
1767
+ hoverDelayMs = signal(500, ...(ngDevMode ? [{ debugName: "hoverDelayMs" }] : /* istanbul ignore next */ []));
1768
+ isMouseInside = signal(false, ...(ngDevMode ? [{ debugName: "isMouseInside" }] : /* istanbul ignore next */ []));
1769
+ tooltip;
1770
+ arrow;
1771
+ hoverDelay = input(500, ...(ngDevMode ? [{ debugName: "hoverDelay" }] : /* istanbul ignore next */ []));
1772
+ label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
1773
+ placement = input('top', ...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
1774
+ inlineText = input(false, ...(ngDevMode ? [{ debugName: "inlineText" }] : /* istanbul ignore next */ []));
1775
+ appendToBody;
1776
+ constructor() {
1777
+ super();
1778
+ effect(() => {
1779
+ const timerActive = this.timer.isActive();
1780
+ const mouseInside = this.isMouseInside();
1781
+ // If the timer finished and the mouse is still inside, show tooltip
1782
+ if (!timerActive && mouseInside) {
1783
+ this.showTooltip();
1784
+ }
1785
+ // If the mouse left and the timer is not running, hide tooltip
1786
+ else if (!mouseInside) {
1787
+ this.hideTooltip();
1788
+ }
1789
+ });
1790
+ }
1791
+ toggleTooltip() {
1792
+ if (this.tooltip) {
1793
+ this.hideTooltip();
1794
+ }
1795
+ else {
1796
+ this.showTooltip();
1797
+ }
1798
+ }
1799
+ mouseenter() {
1800
+ this.isMouseInside.set(true);
1801
+ this.timer.start(this.hoverDelayMs());
1802
+ }
1803
+ mouseleave() {
1804
+ this.isMouseInside.set(false);
1805
+ this.timer.stop();
1806
+ }
1807
+ showTooltip() {
1808
+ if (this.tooltip)
1809
+ return;
1810
+ this.initializeTooltip();
1811
+ this.renderer.setAttribute(this.tooltip, 'fade', 'in');
1812
+ }
1813
+ hideTooltip() {
1814
+ if (!this.tooltip)
1815
+ return;
1816
+ this.renderer.setAttribute(this.tooltip, 'fade', 'out');
1817
+ }
1818
+ get className() {
1819
+ return css({
1820
+ display: 'inline-flex',
1821
+ }, this.inlineText() && {
1822
+ cursor: 'help',
1823
+ textDecoration: 'underline',
1824
+ textDecorationStyle: 'dotted',
1825
+ });
1826
+ }
1827
+ tooltipFadeIn = keyframes({ ...fadeIn });
1828
+ tooltipFadeOut = keyframes({ ...fadeOut });
1829
+ tooltipClassName = css([
1830
+ {
1831
+ ...this.theme.colorPair(this.componentOptions().color),
1832
+ ...this.theme.radius(this.componentOptions().borderRadius),
1833
+ ...this.theme.boxShadow(this.componentOptions().shadow),
1834
+ ...this.theme.typeface(this.componentOptions().typeface),
1835
+ padding: 5,
1836
+ width: 'max-content',
1837
+ position: 'absolute',
1838
+ top: 0,
1839
+ left: 0,
1840
+ zIndex: Z_INDEX.tooltip,
1841
+ '&[fade="in"]': {
1842
+ animation: `${this.tooltipFadeIn} ease-in 350ms`,
1843
+ },
1844
+ '&[fade="out"]': {
1845
+ animation: `${this.tooltipFadeOut} ease-in 350ms`,
1846
+ },
1847
+ },
1848
+ ]);
1849
+ arrowClassName = css({
1850
+ position: 'absolute',
1851
+ ...this.theme.colorPair(this.componentOptions().color),
1852
+ width: 8,
1853
+ height: 8,
1854
+ transform: 'rotate(45deg)',
1855
+ });
1856
+ createTooltip() {
1857
+ this.tooltip = this.renderer.createElement('span');
1858
+ this.renderer.appendChild(this.tooltip, this.renderer.createText(this.label()) // textNode
1859
+ );
1860
+ this.renderer.appendChild(this.appendToBody ? document.body : this.elRef.nativeElement, this.tooltip);
1861
+ this.renderer.addClass(this.tooltip, this.tooltipClassName);
1862
+ this.renderer.listen(this.tooltip, 'animationend', (event) => {
1863
+ if (event.animationName.includes(this.tooltipFadeOut))
1864
+ this.destroyTooltip();
1865
+ });
1866
+ }
1867
+ createArrow() {
1868
+ this.arrow = this.renderer.createElement('div');
1869
+ this.renderer.appendChild(this.tooltip, this.arrow);
1870
+ this.renderer.addClass(this.arrow, this.arrowClassName);
1871
+ }
1872
+ setPosition() {
1873
+ if (!this.tooltip || !this.arrow)
1874
+ return;
1875
+ computePosition(this.elRef.nativeElement, this.tooltip, {
1876
+ placement: this.placement(),
1877
+ middleware: [offset(6), flip(), shift({ padding: 5 }), arrow({ element: this.arrow })],
1878
+ }).then(({ x, y, placement, middlewareData }) => {
1879
+ this.renderer.setStyle(this.tooltip, 'top', `${y}px`);
1880
+ this.renderer.setStyle(this.tooltip, 'left', `${x}px`);
1881
+ // Accessing the data
1882
+ const arrowX = middlewareData.arrow?.x;
1883
+ const arrowY = middlewareData.arrow?.y;
1884
+ const staticSide = {
1885
+ top: 'bottom',
1886
+ right: 'left',
1887
+ bottom: 'top',
1888
+ left: 'right',
1889
+ }[placement.split('-')[0]];
1890
+ this.renderer.setStyle(this.arrow, 'top', `${arrowY}px`);
1891
+ this.renderer.setStyle(this.arrow, 'left', `${arrowX}px`);
1892
+ this.renderer.setStyle(this.arrow, 'right', ``);
1893
+ this.renderer.setStyle(this.arrow, 'bottom', ``);
1894
+ if (staticSide) {
1895
+ this.renderer.setStyle(this.arrow, staticSide, `-4px`);
1896
+ }
1897
+ });
1898
+ }
1899
+ initializeTooltip() {
1900
+ this.createTooltip();
1901
+ this.createArrow();
1902
+ this.setPosition();
1903
+ }
1904
+ destroyTooltip() {
1905
+ this.renderer.removeChild(this.appendToBody ? document.body : this.elRef.nativeElement, this.tooltip);
1906
+ this.renderer.removeChild(this.appendToBody ? document.body : this.elRef.nativeElement, this.arrow);
1907
+ this.tooltip = null;
1908
+ this.arrow = null;
1909
+ }
1910
+ ngOnDestroy() {
1911
+ this.hideTooltip();
1912
+ }
1913
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1914
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: UniTooltipComponent, isStandalone: true, selector: "uni-tooltip, Tooltip", inputs: { hoverDelay: { classPropertyName: "hoverDelay", publicName: "hoverDelay", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, inlineText: { classPropertyName: "inlineText", publicName: "inlineText", isSignal: true, isRequired: false, transformFunction: null }, appendToBody: { classPropertyName: "appendToBody", publicName: "appendToBody", isSignal: false, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "toggleTooltip()", "mouseenter": "mouseenter()", "mouseleave": "mouseleave()" }, properties: { "class": "this.className" } }, providers: [{ provide: COMPONENT_NAME, useValue: 'tooltip' }], usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
1915
+ }
1916
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniTooltipComponent, decorators: [{
1917
+ type: Component,
1918
+ args: [{
1919
+ selector: 'uni-tooltip, Tooltip',
1920
+ standalone: true,
1921
+ imports: [],
1922
+ template: `<ng-content></ng-content>`,
1923
+ providers: [{ provide: COMPONENT_NAME, useValue: 'tooltip' }],
1924
+ host: {
1925
+ '(click)': 'toggleTooltip()',
1926
+ '(mouseenter)': 'mouseenter()',
1927
+ '(mouseleave)': 'mouseleave()',
1928
+ },
1929
+ }]
1930
+ }], ctorParameters: () => [], propDecorators: { hoverDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverDelay", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], inlineText: [{ type: i0.Input, args: [{ isSignal: true, alias: "inlineText", required: false }] }], appendToBody: [{
1931
+ type: Input
1932
+ }], className: [{
1933
+ type: HostBinding,
1934
+ args: ['class']
1935
+ }] } });
1936
+
1937
+ //export * from './background';
1938
+
1939
+ /**
1940
+ * Generated bundle index. Do not edit.
1941
+ */
1942
+
1943
+ export { RippleDirective, UniBadgeComponent, UniBoxComponent, UniButtonComponent, UniCardComponent, UniCardContentComponent, UniCardHeaderComponent, UniCenterComponent, UniDialogButtonsComponent, UniDialogComponent, UniDialogHeaderComponent, UniDividerComponent, UniDropdownComponent, UniGridAreaComponent, UniGridComponent, UniIconComponent, UniMenuComponent, UniRowComponent, UniStackComponent, UniSymbolComponent, UniTextComponent, UniTooltipComponent, UniWrapComponent };
1944
+ //# sourceMappingURL=uni-design-system-uni-angular.mjs.map