@shival99/z-ui 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/assets/css/animations.css +207 -0
  2. package/assets/css/base.css +76 -0
  3. package/assets/css/tailwind.css +53 -0
  4. package/assets/css/themes/gray.css +73 -0
  5. package/assets/css/themes/green.css +75 -0
  6. package/assets/css/themes/hospital.css +79 -0
  7. package/assets/css/themes/neutral.css +73 -0
  8. package/assets/css/themes/orange.css +73 -0
  9. package/assets/css/themes/slate.css +73 -0
  10. package/assets/css/themes/stone.css +73 -0
  11. package/assets/css/themes/violet.css +73 -0
  12. package/assets/css/themes/zinc.css +73 -0
  13. package/assets/images/avatar.svg +6 -0
  14. package/assets/images/logo.svg +6 -0
  15. package/fesm2022/shival99-z-ui-components-z-accordion.mjs +148 -0
  16. package/fesm2022/shival99-z-ui-components-z-accordion.mjs.map +1 -0
  17. package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs +74 -0
  18. package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs.map +1 -0
  19. package/fesm2022/shival99-z-ui-components-z-button.mjs +155 -0
  20. package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -0
  21. package/fesm2022/shival99-z-ui-components-z-calendar.mjs +2335 -0
  22. package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -0
  23. package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +240 -0
  24. package/fesm2022/shival99-z-ui-components-z-checkbox.mjs.map +1 -0
  25. package/fesm2022/shival99-z-ui-components-z-code.mjs +139 -0
  26. package/fesm2022/shival99-z-ui-components-z-code.mjs.map +1 -0
  27. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +664 -0
  28. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -0
  29. package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +55 -0
  30. package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +1 -0
  31. package/fesm2022/shival99-z-ui-components-z-editor.mjs +411 -0
  32. package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -0
  33. package/fesm2022/shival99-z-ui-components-z-filter.mjs +794 -0
  34. package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -0
  35. package/fesm2022/shival99-z-ui-components-z-icon.mjs +451 -0
  36. package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -0
  37. package/fesm2022/shival99-z-ui-components-z-input.mjs +804 -0
  38. package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -0
  39. package/fesm2022/shival99-z-ui-components-z-loading.mjs +105 -0
  40. package/fesm2022/shival99-z-ui-components-z-loading.mjs.map +1 -0
  41. package/fesm2022/shival99-z-ui-components-z-menu.mjs +351 -0
  42. package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -0
  43. package/fesm2022/shival99-z-ui-components-z-modal.mjs +722 -0
  44. package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -0
  45. package/fesm2022/shival99-z-ui-components-z-pagination.mjs +131 -0
  46. package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -0
  47. package/fesm2022/shival99-z-ui-components-z-popover.mjs +917 -0
  48. package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -0
  49. package/fesm2022/shival99-z-ui-components-z-radio.mjs +154 -0
  50. package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +1 -0
  51. package/fesm2022/shival99-z-ui-components-z-select.mjs +998 -0
  52. package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -0
  53. package/fesm2022/shival99-z-ui-components-z-skeleton.mjs +139 -0
  54. package/fesm2022/shival99-z-ui-components-z-skeleton.mjs.map +1 -0
  55. package/fesm2022/shival99-z-ui-components-z-switch.mjs +127 -0
  56. package/fesm2022/shival99-z-ui-components-z-switch.mjs.map +1 -0
  57. package/fesm2022/shival99-z-ui-components-z-table.mjs +2628 -0
  58. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -0
  59. package/fesm2022/shival99-z-ui-components-z-tabs.mjs +259 -0
  60. package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -0
  61. package/fesm2022/shival99-z-ui-components-z-timeline.mjs +335 -0
  62. package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -0
  63. package/fesm2022/shival99-z-ui-components-z-toast.mjs +93 -0
  64. package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -0
  65. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +660 -0
  66. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -0
  67. package/fesm2022/shival99-z-ui-components-z-upload.mjs +504 -0
  68. package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -0
  69. package/fesm2022/shival99-z-ui-i18n.mjs +258 -0
  70. package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -0
  71. package/fesm2022/shival99-z-ui-pipes.mjs +116 -0
  72. package/fesm2022/shival99-z-ui-pipes.mjs.map +1 -0
  73. package/fesm2022/shival99-z-ui-providers.mjs +203 -0
  74. package/fesm2022/shival99-z-ui-providers.mjs.map +1 -0
  75. package/fesm2022/shival99-z-ui-services.mjs +919 -0
  76. package/fesm2022/shival99-z-ui-services.mjs.map +1 -0
  77. package/fesm2022/shival99-z-ui-utils.mjs +591 -0
  78. package/fesm2022/shival99-z-ui-utils.mjs.map +1 -0
  79. package/fesm2022/z-ui.mjs +3 -19924
  80. package/fesm2022/z-ui.mjs.map +1 -1
  81. package/package.json +129 -1
  82. package/types/shival99-z-ui-components-z-accordion.d.ts +55 -0
  83. package/types/shival99-z-ui-components-z-breadcrumb.d.ts +36 -0
  84. package/types/shival99-z-ui-components-z-button.d.ts +41 -0
  85. package/types/shival99-z-ui-components-z-calendar.d.ts +300 -0
  86. package/types/shival99-z-ui-components-z-checkbox.d.ts +84 -0
  87. package/types/shival99-z-ui-components-z-code.d.ts +35 -0
  88. package/types/shival99-z-ui-components-z-drawer.d.ts +232 -0
  89. package/types/shival99-z-ui-components-z-dropdown-menu.d.ts +50 -0
  90. package/types/shival99-z-ui-components-z-editor.d.ts +115 -0
  91. package/types/shival99-z-ui-components-z-filter.d.ts +268 -0
  92. package/types/shival99-z-ui-components-z-icon.d.ts +291 -0
  93. package/types/shival99-z-ui-components-z-input.d.ts +188 -0
  94. package/types/shival99-z-ui-components-z-loading.d.ts +46 -0
  95. package/types/shival99-z-ui-components-z-menu.d.ts +116 -0
  96. package/types/shival99-z-ui-components-z-modal.d.ts +270 -0
  97. package/types/shival99-z-ui-components-z-pagination.d.ts +52 -0
  98. package/types/shival99-z-ui-components-z-popover.d.ts +134 -0
  99. package/types/shival99-z-ui-components-z-radio.d.ts +63 -0
  100. package/types/shival99-z-ui-components-z-select.d.ts +268 -0
  101. package/types/shival99-z-ui-components-z-skeleton.d.ts +55 -0
  102. package/types/shival99-z-ui-components-z-switch.d.ts +48 -0
  103. package/types/shival99-z-ui-components-z-table.d.ts +482 -0
  104. package/types/shival99-z-ui-components-z-tabs.d.ts +75 -0
  105. package/types/shival99-z-ui-components-z-timeline.d.ts +98 -0
  106. package/types/shival99-z-ui-components-z-toast.d.ts +61 -0
  107. package/types/shival99-z-ui-components-z-tooltip.d.ts +85 -0
  108. package/types/shival99-z-ui-components-z-upload.d.ts +136 -0
  109. package/types/shival99-z-ui-i18n.d.ts +50 -0
  110. package/types/shival99-z-ui-pipes.d.ts +36 -0
  111. package/types/shival99-z-ui-providers.d.ts +132 -0
  112. package/types/shival99-z-ui-services.d.ts +364 -0
  113. package/types/shival99-z-ui-utils.d.ts +145 -0
  114. package/types/z-ui.d.ts +3 -4977
@@ -0,0 +1,98 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { PipeTransform } from '@angular/core';
3
+ import { ClassValue } from 'clsx';
4
+ import { ZIcon } from '@shival99/z-ui/components/z-icon';
5
+ import * as class_variance_authority_types from 'class-variance-authority/types';
6
+ import { VariantProps } from 'class-variance-authority';
7
+
8
+ interface ZTimelineItem {
9
+ id?: string | number;
10
+ title: string;
11
+ description?: string;
12
+ time?: string;
13
+ icon?: ZIcon;
14
+ color?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
15
+ }
16
+ type ZTimelineSize = 'sm' | 'default' | 'lg';
17
+ type ZTimelineLayout = 'default' | 'reversed' | 'alternate';
18
+ type ZTimelineLineStyle = 'solid' | 'dashed';
19
+ type ZTimelineIconStyle = 'filled' | 'outline';
20
+ type ZTimelineContentStyle = 'simple' | 'card';
21
+ type ZTimelineClassType = 'item' | 'header' | 'icon' | 'iconCenter' | 'dot' | 'line' | 'dotCircle' | 'time' | 'side';
22
+ interface ZTimelineClassOptions {
23
+ item?: ZTimelineItem;
24
+ layout?: ZTimelineLayout;
25
+ lineStyle?: ZTimelineLineStyle;
26
+ iconStyle?: ZTimelineIconStyle;
27
+ timeVariant?: 'default' | 'secondary' | 'outline' | 'muted';
28
+ side?: 'left' | 'right';
29
+ }
30
+
31
+ declare class ZTimelineComponent {
32
+ readonly class: _angular_core.InputSignal<ClassValue>;
33
+ readonly zItems: _angular_core.InputSignal<ZTimelineItem[]>;
34
+ readonly zSize: _angular_core.InputSignal<ZTimelineSize>;
35
+ readonly zTimeVariant: _angular_core.InputSignal<"default" | "outline" | "secondary" | "muted">;
36
+ readonly zLineStyle: _angular_core.InputSignal<ZTimelineLineStyle>;
37
+ readonly zIconStyle: _angular_core.InputSignal<ZTimelineIconStyle>;
38
+ readonly zLayout: _angular_core.InputSignal<ZTimelineLayout>;
39
+ readonly zContentStyle: _angular_core.InputSignal<ZTimelineContentStyle>;
40
+ protected readonly hostClasses: _angular_core.Signal<string>;
41
+ protected readonly isAlternate: _angular_core.Signal<boolean>;
42
+ protected readonly itemClasses: _angular_core.Signal<string>;
43
+ protected readonly dotClasses: _angular_core.Signal<string>;
44
+ protected readonly lineClasses: _angular_core.Signal<string>;
45
+ protected readonly titleClasses: _angular_core.Signal<string>;
46
+ protected readonly descriptionClasses: _angular_core.Signal<string>;
47
+ protected readonly contentClasses: _angular_core.Signal<string>;
48
+ protected readonly iconSize: _angular_core.Signal<"18" | "14">;
49
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZTimelineComponent, never>;
50
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZTimelineComponent, "z-timeline", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zItems": { "alias": "zItems"; "required": false; "isSignal": true; }; "zSize": { "alias": "zSize"; "required": false; "isSignal": true; }; "zTimeVariant": { "alias": "zTimeVariant"; "required": false; "isSignal": true; }; "zLineStyle": { "alias": "zLineStyle"; "required": false; "isSignal": true; }; "zIconStyle": { "alias": "zIconStyle"; "required": false; "isSignal": true; }; "zLayout": { "alias": "zLayout"; "required": false; "isSignal": true; }; "zContentStyle": { "alias": "zContentStyle"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
51
+ }
52
+
53
+ declare class ZTimelineClassPipe implements PipeTransform {
54
+ transform(type: ZTimelineClassType, options?: ZTimelineClassOptions): string;
55
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZTimelineClassPipe, never>;
56
+ static ɵpipe: _angular_core.ɵɵPipeDeclaration<ZTimelineClassPipe, "zTimelineClass", true>;
57
+ }
58
+
59
+ declare const zTimelineVariants: (props?: ({
60
+ zSize?: "default" | "sm" | "lg" | null | undefined;
61
+ zLayout?: "default" | "reversed" | "alternate" | null | undefined;
62
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
63
+ declare const zTimelineItemVariants: (props?: ({
64
+ zLayout?: "default" | "reversed" | "alternate" | null | undefined;
65
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
66
+ declare const zTimelineHeaderVariants: (props?: ({
67
+ hasIcon?: boolean | null | undefined;
68
+ zColor?: "default" | "primary" | "success" | "warning" | "error" | "info" | null | undefined;
69
+ zLineStyle?: "solid" | "dashed" | null | undefined;
70
+ zLayout?: "default" | "reversed" | "alternate" | null | undefined;
71
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
72
+ declare const zTimelineIconVariants: (props?: ({
73
+ zColor?: "default" | "primary" | "success" | "warning" | "error" | "info" | null | undefined;
74
+ zIconStyle?: "filled" | "outline" | null | undefined;
75
+ zLayout?: "default" | "reversed" | "alternate" | null | undefined;
76
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
77
+ declare const zTimelineTitleVariants: (props?: ({
78
+ zSize?: "default" | "sm" | "lg" | null | undefined;
79
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
80
+ declare const zTimelineTimeVariants: (props?: ({
81
+ zVariant?: "default" | "outline" | "secondary" | "muted" | null | undefined;
82
+ zLayout?: "default" | "reversed" | "alternate" | null | undefined;
83
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
84
+ declare const zTimelineDescriptionVariants: (props?: ({
85
+ zSize?: "default" | "sm" | "lg" | null | undefined;
86
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
87
+ declare const zTimelineContentVariants: (props?: ({
88
+ zContentStyle?: "simple" | "card" | null | undefined;
89
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
90
+ type ZTimelineVariants = VariantProps<typeof zTimelineVariants>;
91
+ type ZTimelineItemVariants = VariantProps<typeof zTimelineItemVariants>;
92
+ type ZTimelineHeaderVariants = VariantProps<typeof zTimelineHeaderVariants>;
93
+ type ZTimelineIconVariants = VariantProps<typeof zTimelineIconVariants>;
94
+ type ZTimelineTimeVariants = VariantProps<typeof zTimelineTimeVariants>;
95
+ type ZTimelineContentVariants = VariantProps<typeof zTimelineContentVariants>;
96
+
97
+ export { ZTimelineClassPipe, ZTimelineComponent, zTimelineContentVariants, zTimelineDescriptionVariants, zTimelineHeaderVariants, zTimelineIconVariants, zTimelineItemVariants, zTimelineTimeVariants, zTimelineTitleVariants, zTimelineVariants };
98
+ export type { ZTimelineClassOptions, ZTimelineClassType, ZTimelineContentStyle, ZTimelineContentVariants, ZTimelineHeaderVariants, ZTimelineIconStyle, ZTimelineIconVariants, ZTimelineItem, ZTimelineItemVariants, ZTimelineLayout, ZTimelineLineStyle, ZTimelineSize, ZTimelineTimeVariants, ZTimelineVariants };
@@ -0,0 +1,61 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { ClassValue } from 'clsx';
3
+ import { ExternalToast } from 'ngx-sonner';
4
+ import * as class_variance_authority_types from 'class-variance-authority/types';
5
+ import { VariantProps } from 'class-variance-authority';
6
+
7
+ type ZToastTheme = 'light' | 'dark' | 'system';
8
+ type ZToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
9
+ type ZToastDir = 'ltr' | 'rtl' | 'auto';
10
+ type ZToastType = 'default' | 'success' | 'error' | 'warning' | 'info';
11
+ interface ZToastOptions extends ExternalToast {
12
+ description?: string;
13
+ duration?: number;
14
+ id?: string | number;
15
+ }
16
+ interface ZToastPromiseMessages<T> {
17
+ loading: string;
18
+ success: string | ((data: T) => string);
19
+ error: string | ((error: unknown) => string);
20
+ }
21
+
22
+ declare class ZToastComponent {
23
+ readonly class: _angular_core.InputSignal<ClassValue>;
24
+ readonly zVariant: _angular_core.InputSignal<"default" | "success" | "error" | "warning" | "info" | null | undefined>;
25
+ readonly zTheme: _angular_core.InputSignal<ZToastTheme>;
26
+ readonly zPosition: _angular_core.InputSignal<ZToastPosition>;
27
+ readonly zRichColors: _angular_core.InputSignal<boolean>;
28
+ readonly zExpand: _angular_core.InputSignal<boolean>;
29
+ readonly zDuration: _angular_core.InputSignal<number>;
30
+ readonly zVisibleToasts: _angular_core.InputSignal<number>;
31
+ readonly zCloseButton: _angular_core.InputSignal<boolean>;
32
+ readonly zToastOptions: _angular_core.InputSignal<ZToastOptions>;
33
+ readonly zDir: _angular_core.InputSignal<ZToastDir>;
34
+ protected readonly zClasses: _angular_core.Signal<string>;
35
+ protected readonly detectTheme: _angular_core.Signal<"light" | "dark">;
36
+ private readonly _themeService;
37
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZToastComponent, never>;
38
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZToastComponent, "z-toast, z-toaster", ["zToast"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zVariant": { "alias": "zVariant"; "required": false; "isSignal": true; }; "zTheme": { "alias": "zTheme"; "required": false; "isSignal": true; }; "zPosition": { "alias": "zPosition"; "required": false; "isSignal": true; }; "zRichColors": { "alias": "zRichColors"; "required": false; "isSignal": true; }; "zExpand": { "alias": "zExpand"; "required": false; "isSignal": true; }; "zDuration": { "alias": "zDuration"; "required": false; "isSignal": true; }; "zVisibleToasts": { "alias": "zVisibleToasts"; "required": false; "isSignal": true; }; "zCloseButton": { "alias": "zCloseButton"; "required": false; "isSignal": true; }; "zToastOptions": { "alias": "zToastOptions"; "required": false; "isSignal": true; }; "zDir": { "alias": "zDir"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
39
+ }
40
+
41
+ declare class ZToastService {
42
+ show(message: string, options?: ZToastOptions): string | number;
43
+ success(message: string, options?: ZToastOptions): string | number;
44
+ error(message: string, options?: ZToastOptions): string | number;
45
+ warning(message: string, options?: ZToastOptions): string | number;
46
+ info(message: string, options?: ZToastOptions): string | number;
47
+ loading(message: string, options?: ZToastOptions): string | number;
48
+ promise<T>(promise: Promise<T>, messages: ZToastPromiseMessages<T>): string | number | undefined;
49
+ dismiss(toastId?: string | number): void;
50
+ dismissAll(): void;
51
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZToastService, never>;
52
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ZToastService>;
53
+ }
54
+
55
+ declare const zToastVariants: (props?: ({
56
+ zVariant?: "default" | "success" | "error" | "warning" | "info" | null | undefined;
57
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
58
+ type ZToastVariants = VariantProps<typeof zToastVariants>;
59
+
60
+ export { ZToastComponent, ZToastService, zToastVariants };
61
+ export type { ZToastOptions, ZToastPosition, ZToastType, ZToastVariants };
@@ -0,0 +1,85 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef, OnInit, OnDestroy } from '@angular/core';
3
+ import * as class_variance_authority_types from 'class-variance-authority/types';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ type ZTooltipPosition = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'left-top' | 'left-bottom' | 'right' | 'right-top' | 'right-bottom';
7
+
8
+ declare const zTooltipVariants: (props?: ({
9
+ zType?: "default" | "dark" | "light" | "primary" | "success" | "warning" | "error" | "info" | null | undefined;
10
+ zSize?: "default" | "sm" | "lg" | null | undefined;
11
+ zPosition?: "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "left-top" | "left-bottom" | "right" | "right-top" | "right-bottom" | null | undefined;
12
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
13
+ type ZTooltipVariants = VariantProps<typeof zTooltipVariants>;
14
+
15
+ type ZTooltipTrigger = 'hover' | 'click';
16
+ type ZTooltipContent = string | TemplateRef<unknown>;
17
+ interface ZTooltipConfig {
18
+ content?: ZTooltipContent;
19
+ position?: ZTooltipPosition;
20
+ type?: ZTooltipVariants['zType'];
21
+ size?: ZTooltipVariants['zSize'];
22
+ class?: string;
23
+ showDelay?: number;
24
+ hideDelay?: number;
25
+ arrow?: boolean;
26
+ offset?: number;
27
+ autoDetect?: boolean;
28
+ alwaysShow?: boolean;
29
+ maxWidth?: string;
30
+ }
31
+
32
+ declare class ZTooltipDirective implements OnInit, OnDestroy {
33
+ readonly zContent: _angular_core.InputSignal<ZTooltipContent>;
34
+ readonly zPosition: _angular_core.InputSignal<ZTooltipPosition>;
35
+ readonly zTrigger: _angular_core.InputSignal<ZTooltipTrigger>;
36
+ readonly zType: _angular_core.InputSignal<"default" | "dark" | "light" | "primary" | "success" | "warning" | "error" | "info" | null | undefined>;
37
+ readonly zSize: _angular_core.InputSignal<"default" | "sm" | "lg" | null | undefined>;
38
+ readonly zClass: _angular_core.InputSignal<string>;
39
+ readonly zShowDelay: _angular_core.InputSignal<number>;
40
+ readonly zHideDelay: _angular_core.InputSignal<number>;
41
+ readonly zArrow: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
42
+ readonly zDisabled: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
43
+ readonly zOffset: _angular_core.InputSignal<number>;
44
+ readonly zAutoDetect: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
45
+ readonly zTriggerElement: _angular_core.InputSignal<HTMLElement | null>;
46
+ readonly zAlwaysShow: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
47
+ readonly zMaxWidth: _angular_core.InputSignal<string>;
48
+ readonly zShow: _angular_core.OutputEmitterRef<void>;
49
+ readonly zHide: _angular_core.OutputEmitterRef<void>;
50
+ private readonly _overlay;
51
+ private readonly _overlayPositionBuilder;
52
+ private readonly _elementRef;
53
+ private readonly _renderer;
54
+ private readonly _destroyRef;
55
+ private readonly _platformId;
56
+ private readonly _document;
57
+ private _overlayRef;
58
+ private _componentRef;
59
+ private _delaySubject;
60
+ private _listenerCleanups;
61
+ private _positionSubscription;
62
+ private readonly _isVisible;
63
+ ngOnInit(): void;
64
+ ngOnDestroy(): void;
65
+ show(): void;
66
+ private _isTextTruncated;
67
+ hide(): void;
68
+ toggle(): void;
69
+ private _createOverlay;
70
+ private _disposeOverlay;
71
+ private _setupDelayMechanism;
72
+ private _setupTriggers;
73
+ private _setupOutsideClick;
74
+ private _delay;
75
+ private _showTooltip;
76
+ private _setupTooltipHover;
77
+ private _hideTooltip;
78
+ private _cleanupListeners;
79
+ private _calculateArrowOffset;
80
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZTooltipDirective, never>;
81
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ZTooltipDirective, "[z-tooltip], [zTooltip]", ["zTooltip"], { "zContent": { "alias": "zContent"; "required": false; "isSignal": true; }; "zPosition": { "alias": "zPosition"; "required": false; "isSignal": true; }; "zTrigger": { "alias": "zTrigger"; "required": false; "isSignal": true; }; "zType": { "alias": "zTooltipType"; "required": false; "isSignal": true; }; "zSize": { "alias": "zTooltipSize"; "required": false; "isSignal": true; }; "zClass": { "alias": "zClass"; "required": false; "isSignal": true; }; "zShowDelay": { "alias": "zShowDelay"; "required": false; "isSignal": true; }; "zHideDelay": { "alias": "zHideDelay"; "required": false; "isSignal": true; }; "zArrow": { "alias": "zArrow"; "required": false; "isSignal": true; }; "zDisabled": { "alias": "zDisabled"; "required": false; "isSignal": true; }; "zOffset": { "alias": "zOffset"; "required": false; "isSignal": true; }; "zAutoDetect": { "alias": "zAutoDetect"; "required": false; "isSignal": true; }; "zTriggerElement": { "alias": "zTriggerElement"; "required": false; "isSignal": true; }; "zAlwaysShow": { "alias": "zAlwaysShow"; "required": false; "isSignal": true; }; "zMaxWidth": { "alias": "zMaxWidth"; "required": false; "isSignal": true; }; }, { "zShow": "zShow"; "zHide": "zHide"; }, never, never, true, never>;
82
+ }
83
+
84
+ export { ZTooltipDirective, zTooltipVariants };
85
+ export type { ZTooltipConfig, ZTooltipContent, ZTooltipTrigger, ZTooltipVariants };
@@ -0,0 +1,136 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal, OnInit, ElementRef } from '@angular/core';
3
+ import { ControlValueAccessor } from '@angular/forms';
4
+ import { ClassValue } from 'clsx';
5
+ import * as class_variance_authority_types from 'class-variance-authority/types';
6
+ import { VariantProps } from 'class-variance-authority';
7
+
8
+ type ZUploadSize = 'sm' | 'default' | 'lg';
9
+ type ZUploadStatus = 'pending' | 'uploading' | 'success' | 'error';
10
+ interface ZUploadFile {
11
+ id: string;
12
+ name: string;
13
+ size: number;
14
+ type: string;
15
+ file?: File;
16
+ url?: string;
17
+ progress: number;
18
+ status: ZUploadStatus;
19
+ }
20
+ interface ZUploadError {
21
+ file: File;
22
+ error: string;
23
+ }
24
+ interface ZUploadValidator {
25
+ error: string;
26
+ message: string;
27
+ validate?: (files: ZUploadFile[]) => boolean;
28
+ }
29
+ interface ZUploadControl {
30
+ validate: () => void;
31
+ reset: () => void;
32
+ clearFiles: () => void;
33
+ openFileDialog: () => void;
34
+ markAsTouched: () => void;
35
+ markAsUntouched: () => void;
36
+ markAsDirty: () => void;
37
+ markAsPristine: () => void;
38
+ hasError: Signal<boolean>;
39
+ files: Signal<ZUploadFile[]>;
40
+ errorMessage: Signal<string>;
41
+ }
42
+ declare const formatFileSize: (bytes: number) => string;
43
+
44
+ declare class ZUploadComponent implements OnInit, ControlValueAccessor {
45
+ readonly class: _angular_core.InputSignal<ClassValue>;
46
+ readonly zLabel: _angular_core.InputSignal<string>;
47
+ readonly zLabelClass: _angular_core.InputSignal<string>;
48
+ readonly zNote: _angular_core.InputSignal<string>;
49
+ readonly zSize: _angular_core.InputSignal<ZUploadSize>;
50
+ readonly zAcceptFile: _angular_core.InputSignal<string>;
51
+ readonly zMultipleFile: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
52
+ readonly zMaxSize: _angular_core.InputSignal<number>;
53
+ readonly zMaxFiles: _angular_core.InputSignal<number>;
54
+ readonly zRequired: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
55
+ readonly zDisabled: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
56
+ readonly zReadonly: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
57
+ readonly zLoading: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
58
+ readonly zShowProgress: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
59
+ readonly zValidators: _angular_core.InputSignal<ZUploadValidator[]>;
60
+ readonly zOnUpload: _angular_core.OutputEmitterRef<ZUploadFile[]>;
61
+ readonly zOnRemove: _angular_core.OutputEmitterRef<ZUploadFile>;
62
+ readonly zOnDownload: _angular_core.OutputEmitterRef<ZUploadFile>;
63
+ readonly zOnError: _angular_core.OutputEmitterRef<ZUploadError>;
64
+ readonly zOnFileChange: _angular_core.OutputEmitterRef<File[]>;
65
+ readonly zControl: _angular_core.OutputEmitterRef<ZUploadControl>;
66
+ protected readonly fileInputRef: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
67
+ readonly files: _angular_core.WritableSignal<ZUploadFile[]>;
68
+ protected readonly inputId: string;
69
+ protected readonly isDragOver: _angular_core.WritableSignal<boolean>;
70
+ protected readonly isTouched: _angular_core.WritableSignal<boolean>;
71
+ private readonly _dirty;
72
+ private readonly _fileError;
73
+ private readonly _disabled;
74
+ private readonly _formControl;
75
+ private readonly _formStateVersion;
76
+ private readonly _isNgModel;
77
+ private readonly _injector;
78
+ private readonly _destroyRef;
79
+ private _onChange;
80
+ private _onTouched;
81
+ private _ngControl;
82
+ protected readonly isDisabled: _angular_core.Signal<boolean>;
83
+ protected readonly isBlocked: _angular_core.Signal<boolean>;
84
+ private readonly _shouldShowValidation;
85
+ protected readonly hasError: _angular_core.Signal<boolean>;
86
+ protected readonly showError: _angular_core.Signal<boolean>;
87
+ protected readonly errorMessage: _angular_core.Signal<string>;
88
+ protected readonly currentStatus: _angular_core.Signal<"default" | "error" | "disabled" | "readonly" | "active">;
89
+ protected readonly dropzoneClasses: _angular_core.Signal<string>;
90
+ protected readonly acceptTypes: _angular_core.Signal<string>;
91
+ protected readonly formatFileSize: (bytes: number) => string;
92
+ protected readonly getFileItemClasses: (file: ZUploadFile) => string;
93
+ ngOnInit(): void;
94
+ writeValue(value: ZUploadFile[] | null): void;
95
+ registerOnChange(fn: (value: ZUploadFile[]) => void): void;
96
+ registerOnTouched(fn: () => void): void;
97
+ setDisabledState(isDisabled: boolean): void;
98
+ updateProgress(fileId: string, progress: number): void;
99
+ setFileStatus(fileId: string, status: ZUploadFile['status']): void;
100
+ clearFiles(): void;
101
+ validate(): void;
102
+ reset(): void;
103
+ markAsTouched(): void;
104
+ markAsUntouched(): void;
105
+ markAsDirty(): void;
106
+ markAsPristine(): void;
107
+ private _emitControl;
108
+ getFiles(): File[];
109
+ protected openFileDialog(): void;
110
+ protected onFileSelected(event: Event): void;
111
+ protected onDragOver(event: DragEvent): void;
112
+ protected onDragLeave(event: DragEvent): void;
113
+ protected onDrop(event: DragEvent): void;
114
+ protected removeFile(file: ZUploadFile): void;
115
+ protected downloadFile(file: ZUploadFile): void;
116
+ private _getValidationErrors;
117
+ private _processFiles;
118
+ private _emitFileChange;
119
+ private _isValidFileType;
120
+ private _notifyChange;
121
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZUploadComponent, never>;
122
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZUploadComponent, "z-upload", ["zUpload"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zLabel": { "alias": "zLabel"; "required": false; "isSignal": true; }; "zLabelClass": { "alias": "zLabelClass"; "required": false; "isSignal": true; }; "zNote": { "alias": "zNote"; "required": false; "isSignal": true; }; "zSize": { "alias": "zSize"; "required": false; "isSignal": true; }; "zAcceptFile": { "alias": "zAcceptFile"; "required": false; "isSignal": true; }; "zMultipleFile": { "alias": "zMultipleFile"; "required": false; "isSignal": true; }; "zMaxSize": { "alias": "zMaxSize"; "required": false; "isSignal": true; }; "zMaxFiles": { "alias": "zMaxFiles"; "required": false; "isSignal": true; }; "zRequired": { "alias": "zRequired"; "required": false; "isSignal": true; }; "zDisabled": { "alias": "zDisabled"; "required": false; "isSignal": true; }; "zReadonly": { "alias": "zReadonly"; "required": false; "isSignal": true; }; "zLoading": { "alias": "zLoading"; "required": false; "isSignal": true; }; "zShowProgress": { "alias": "zShowProgress"; "required": false; "isSignal": true; }; "zValidators": { "alias": "zValidators"; "required": false; "isSignal": true; }; }, { "zOnUpload": "zOnUpload"; "zOnRemove": "zOnRemove"; "zOnDownload": "zOnDownload"; "zOnError": "zOnError"; "zOnFileChange": "zOnFileChange"; "zControl": "zControl"; }, never, never, true, never>;
123
+ }
124
+
125
+ declare const zUploadDropzoneVariants: (props?: ({
126
+ zSize?: "sm" | "default" | "lg" | null | undefined;
127
+ zStatus?: "default" | "error" | "active" | "disabled" | "readonly" | null | undefined;
128
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
129
+ type ZUploadDropzoneVariants = VariantProps<typeof zUploadDropzoneVariants>;
130
+ declare const zUploadFileItemVariants: (props?: ({
131
+ zStatus?: "pending" | "uploading" | "success" | "error" | null | undefined;
132
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
133
+ type ZUploadFileItemVariants = VariantProps<typeof zUploadFileItemVariants>;
134
+
135
+ export { ZUploadComponent, formatFileSize, zUploadDropzoneVariants, zUploadFileItemVariants };
136
+ export type { ZUploadControl, ZUploadDropzoneVariants, ZUploadError, ZUploadFile, ZUploadFileItemVariants, ZUploadSize, ZUploadStatus, ZUploadValidator };
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Z-UI English translations
3
+ */
4
+ declare const Z_UI_EN_TRANSLATIONS: Record<string, string>;
5
+
6
+ /**
7
+ * Z-UI Vietnamese translations
8
+ */
9
+ declare const Z_UI_VI_TRANSLATIONS: Record<string, string>;
10
+
11
+ /**
12
+ * Z-UI Internationalization
13
+ *
14
+ * This module provides default translations for all Z-UI components.
15
+ * Users can override any translation by providing their own values.
16
+ *
17
+ * Key format: i18n_z_ui_{component}_{key}
18
+ * Example: i18n_z_ui_table_noData
19
+ */
20
+ type ZUILanguage = 'en' | 'vi' | string;
21
+ interface ZUITranslations {
22
+ [key: string]: string;
23
+ }
24
+ interface ZUITranslationSet {
25
+ en: ZUITranslations;
26
+ vi: ZUITranslations;
27
+ [lang: string]: ZUITranslations;
28
+ }
29
+ /**
30
+ * Default translations for Z-UI components
31
+ */
32
+ declare const Z_UI_TRANSLATIONS: ZUITranslationSet;
33
+ /**
34
+ * Get translations for a specific language
35
+ * Falls back to English if language not found
36
+ */
37
+ declare function getZUITranslations(lang: ZUILanguage): ZUITranslations;
38
+ /**
39
+ * Merge custom translations with Z-UI defaults
40
+ * Custom translations take precedence
41
+ */
42
+ declare function mergeTranslations(lang: ZUILanguage, customTranslations?: ZUITranslations): ZUITranslations;
43
+ /**
44
+ * Get all Z-UI translation keys
45
+ * Useful for documentation or tooling
46
+ */
47
+ declare function getZUITranslationKeys(): string[];
48
+
49
+ export { Z_UI_EN_TRANSLATIONS, Z_UI_TRANSLATIONS, Z_UI_VI_TRANSLATIONS, getZUITranslationKeys, getZUITranslations, mergeTranslations };
50
+ export type { ZUILanguage, ZUITranslationSet, ZUITranslations };
@@ -0,0 +1,36 @@
1
+ import * as i0 from '@angular/core';
2
+ import { PipeTransform, TemplateRef } from '@angular/core';
3
+ import { SafeHtml } from '@angular/platform-browser';
4
+
5
+ type ZCapitalizeType = 'all' | 'first' | 'sentence';
6
+
7
+ declare class ZCapitalizePipe implements PipeTransform {
8
+ transform(value: string | null | undefined, type?: ZCapitalizeType): string;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZCapitalizePipe, never>;
10
+ static ɵpipe: i0.ɵɵPipeDeclaration<ZCapitalizePipe, "zCapitalize", true>;
11
+ }
12
+
13
+ type Z_CONTENT_TYPE = 'string' | 'html' | 'template';
14
+
15
+ declare class ZContentTypePipe implements PipeTransform {
16
+ transform(value: string | TemplateRef<unknown> | null | undefined): Z_CONTENT_TYPE;
17
+ private _containsHtml;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZContentTypePipe, never>;
19
+ static ɵpipe: i0.ɵɵPipeDeclaration<ZContentTypePipe, "zContentType", true>;
20
+ }
21
+
22
+ declare class ZHighlightPipe implements PipeTransform {
23
+ transform(value: string, searchText: string, klass?: string): string;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZHighlightPipe, never>;
25
+ static ɵpipe: i0.ɵɵPipeDeclaration<ZHighlightPipe, "zHighlight", true>;
26
+ }
27
+
28
+ declare class ZSafeHtmlPipe implements PipeTransform {
29
+ private _sanitizer;
30
+ transform(value: string | null | undefined): SafeHtml;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZSafeHtmlPipe, never>;
32
+ static ɵpipe: i0.ɵɵPipeDeclaration<ZSafeHtmlPipe, "zSafeHtml", true>;
33
+ }
34
+
35
+ export { ZCapitalizePipe, ZContentTypePipe, ZHighlightPipe, ZSafeHtmlPipe };
36
+ export type { ZCapitalizeType, Z_CONTENT_TYPE };
@@ -0,0 +1,132 @@
1
+ import { EnvironmentProviders, InjectionToken } from '@angular/core';
2
+ import { ZIndexDbConfig, ZIndexDbService } from '@shival99/z-ui/services';
3
+ import { HttpClient } from '@angular/common/http';
4
+ import { TranslateLoader } from '@ngx-translate/core';
5
+ import { ZUITranslations } from '@shival99/z-ui/i18n';
6
+
7
+ /**
8
+ * Z-IndexDB Provider
9
+ * Provides IndexDB service with multi-store configuration
10
+ */
11
+
12
+ /** Injection token for ZIndexDbService */
13
+ declare const Z_INDEXDB_SERVICE: InjectionToken<ZIndexDbService>;
14
+ /**
15
+ * Provide Z-IndexDB service with configuration
16
+ * @param config - IndexDB configuration with multi-store support
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * // In app.config.ts
21
+ * export const appConfig: ApplicationConfig = {
22
+ * providers: [
23
+ * provideZIndexDb({
24
+ * dbName: 'MyApp',
25
+ * version: 1,
26
+ * stores: [
27
+ * { name: 'cache', encrypt: true },
28
+ * { name: 'userData', encrypt: true, protectedKeys: ['profile'] },
29
+ * { name: 'settings', encrypt: false },
30
+ * ],
31
+ * defaultStore: 'cache',
32
+ * protectedKeys: ['token'],
33
+ * }),
34
+ * ],
35
+ * };
36
+ * ```
37
+ */
38
+ declare function provideZIndexDb(config?: ZIndexDbConfig): EnvironmentProviders;
39
+
40
+ /**
41
+ * Z-NgxMask Provider Types
42
+ */
43
+ interface ZNgxMaskConfig {
44
+ /** Language code (vi, en, etc.) */
45
+ lang?: string;
46
+ /** Allow negative numbers */
47
+ allowNegativeNumbers?: boolean;
48
+ /** Enable validation */
49
+ validation?: boolean;
50
+ }
51
+
52
+ /**
53
+ * Z-NgxMask Provider
54
+ * Provides ngx-mask configuration based on locale
55
+ */
56
+
57
+ /**
58
+ * Provide Z-NgxMask with locale-aware configuration
59
+ * @param config - Mask configuration
60
+ *
61
+ * @example
62
+ * ```typescript
63
+ * // In app.config.ts
64
+ * export const appConfig: ApplicationConfig = {
65
+ * providers: [
66
+ * provideZNgxMask({ lang: 'vi' }),
67
+ * ],
68
+ * };
69
+ * ```
70
+ */
71
+ declare function provideZNgxMask(config?: ZNgxMaskConfig): EnvironmentProviders;
72
+
73
+ /**
74
+ * Provides global scrollbar options for ngx-scrollbar
75
+ * Use this in app.config.ts: providers: [provideZScrollbar()]
76
+ */
77
+ declare function provideZScrollbar(): EnvironmentProviders;
78
+
79
+ /**
80
+ * Z-Translate Provider Types
81
+ */
82
+
83
+ interface ZTranslateProviderConfig {
84
+ /** Default language (default: 'vi') */
85
+ defaultLang?: string;
86
+ /** Path to user translation files (default: './assets/i18n/') */
87
+ translationPath?: string;
88
+ /** File extension for translation files (default: '.json') */
89
+ fileExtension?: string;
90
+ /**
91
+ * Whether to include Z-UI default translations (default: true)
92
+ * Z-UI translations are merged with user translations,
93
+ * user translations take precedence
94
+ */
95
+ includeZUITranslations?: boolean;
96
+ /**
97
+ * Path to Z-UI translation override files (optional)
98
+ * If set, will load translations from this path to override Z-UI defaults
99
+ * Example: './assets/i18n/z-ui/' will load './assets/i18n/z-ui/vi.json'
100
+ *
101
+ * File format:
102
+ * ```json
103
+ * {
104
+ * "i18n_z_ui_table_noData": "Bảng trống"
105
+ * }
106
+ * ```
107
+ */
108
+ zuiOverridePath?: string;
109
+ /**
110
+ * Inline custom translations to override Z-UI defaults (optional)
111
+ * Use this for simple overrides without creating separate files
112
+ *
113
+ * @example
114
+ * ```typescript
115
+ * customZUITranslations: {
116
+ * vi: { i18n_z_ui_table_noData: 'Bảng trống' },
117
+ * en: { i18n_z_ui_table_noData: 'Empty table' },
118
+ * }
119
+ * ```
120
+ */
121
+ customZUITranslations?: Partial<Record<string, ZUITranslations>>;
122
+ }
123
+
124
+ declare function zCreateTranslateLoader(http: HttpClient, path?: string, extension?: string, includeZUI?: boolean, zuiOverridePath?: string, customZUI?: Partial<Record<string, ZUITranslations>>): TranslateLoader;
125
+ /**
126
+ * Provide Z-Translate service
127
+ * Z-UI translations are auto-included by default
128
+ */
129
+ declare function provideZTranslate(config?: ZTranslateProviderConfig): EnvironmentProviders;
130
+
131
+ export { Z_INDEXDB_SERVICE, provideZIndexDb, provideZNgxMask, provideZScrollbar, provideZTranslate, zCreateTranslateLoader };
132
+ export type { ZNgxMaskConfig, ZTranslateProviderConfig };