tailjng 0.1.6 → 0.1.7

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 (176) hide show
  1. package/README.md +12 -4
  2. package/cli/execute/init-app.js +5 -2
  3. package/cli/execute/sync-app.js +14 -2
  4. package/cli/settings/colors-config-utils.js +43 -8
  5. package/cli/settings/icons-config-utils.js +62 -0
  6. package/cli/settings/path-utils.js +32 -2
  7. package/cli/settings/project-utils.js +7 -1
  8. package/cli/templates/app.generator.js +2 -2
  9. package/fesm2022/tailjng.mjs +247 -80
  10. package/fesm2022/tailjng.mjs.map +1 -1
  11. package/lib/services/static/theme.service.d.ts +39 -1
  12. package/lib/utils/theme/theme-variables.util.d.ts +31 -0
  13. package/package.json +1 -1
  14. package/public-api.d.ts +2 -1
  15. package/registry/components.json +41 -18
  16. package/src/colors.safelist.css +2 -2
  17. package/src/lib/components/.config/README.md +11 -0
  18. package/src/lib/components/.config/colors/README.md +38 -0
  19. package/src/lib/components/{colors-config → .config/colors}/colors.config.ts +5 -5
  20. package/src/lib/components/{colors-config → .config/colors}/colors.safelist.css +2 -2
  21. package/src/lib/components/.config/icons/README.md +26 -0
  22. package/src/lib/components/.config/icons/icons.lucide.ts +134 -0
  23. package/src/lib/components/.config/input/README.md +24 -0
  24. package/src/lib/components/.config/input/input.classes.ts +119 -0
  25. package/src/lib/components/alert/alert-dialog/dialog-alert.component.css +244 -2
  26. package/src/lib/components/alert/alert-dialog/dialog-alert.component.html +25 -38
  27. package/src/lib/components/alert/alert-dialog/dialog-alert.component.ts +66 -56
  28. package/src/lib/components/alert/alert-dialog/dialog-alert.types.ts +19 -0
  29. package/src/lib/components/alert/alert-toast/toast-alert.component.css +630 -12
  30. package/src/lib/components/alert/alert-toast/toast-alert.component.html +103 -102
  31. package/src/lib/components/alert/alert-toast/toast-alert.component.ts +485 -128
  32. package/src/lib/components/alert/alert-toast/toast-alert.types.ts +25 -0
  33. package/src/lib/components/badge/badge.component.html +34 -21
  34. package/src/lib/components/badge/badge.component.ts +140 -31
  35. package/src/lib/components/button/button.component.html +16 -10
  36. package/src/lib/components/button/button.component.ts +162 -22
  37. package/src/lib/components/card/card-complete/complete-card.component.html +2 -2
  38. package/src/lib/components/card/card-complete/complete-card.component.ts +26 -16
  39. package/src/lib/components/card/card-crud-complete/complete-crud-card.component.html +2 -2
  40. package/src/lib/components/card/card-crud-complete/complete-crud-card.component.ts +26 -16
  41. package/src/lib/components/checkbox/checkbox-input/input-checkbox.component.css +97 -0
  42. package/src/lib/components/checkbox/checkbox-input/input-checkbox.component.html +54 -46
  43. package/src/lib/components/checkbox/checkbox-input/input-checkbox.component.ts +135 -64
  44. package/src/lib/components/checkbox/checkbox-input/input-checkbox.types.ts +3 -0
  45. package/src/lib/components/checkbox/checkbox-switch/switch-checkbox.component.css +112 -0
  46. package/src/lib/components/checkbox/checkbox-switch/switch-checkbox.component.html +28 -25
  47. package/src/lib/components/checkbox/checkbox-switch/switch-checkbox.component.ts +67 -15
  48. package/src/lib/components/checkbox/checkbox-switch/switch-checkbox.types.ts +1 -0
  49. package/src/lib/components/coach-mark/coach-mark.component.html +4 -22
  50. package/src/lib/components/coach-mark/coach-mark.component.scss +1 -1
  51. package/src/lib/components/coach-mark/coach-mark.component.ts +51 -18
  52. package/src/lib/components/coach-mark/coach-mark.directive.ts +133 -78
  53. package/src/lib/components/coach-mark/coach-mark.types.ts +12 -0
  54. package/src/lib/components/dialog/dialog.component.css +103 -1
  55. package/src/lib/components/dialog/dialog.component.html +46 -66
  56. package/src/lib/components/dialog/dialog.component.ts +136 -110
  57. package/src/lib/components/dialog/dialog.types.ts +19 -0
  58. package/src/lib/components/filter/filter-complete/complete-filter.component.html +16 -19
  59. package/src/lib/components/filter/filter-complete/complete-filter.component.scss +35 -0
  60. package/src/lib/components/filter/filter-complete/complete-filter.component.ts +58 -34
  61. package/src/lib/components/filter/filter-complete/complete-filter.types.ts +7 -0
  62. package/src/lib/components/filter/filter-complete/complete-filter.util.ts +16 -0
  63. package/src/lib/components/form/form-container/container-form.component.css +4 -0
  64. package/src/lib/components/form/form-container/container-form.component.html +2 -2
  65. package/src/lib/components/form/form-container/container-form.component.ts +72 -16
  66. package/src/lib/components/form/form-container/container-form.types.ts +42 -0
  67. package/src/lib/components/form/form-container/form-col-span.directive.ts +25 -0
  68. package/src/lib/components/form/form-sidebar/sidebar-form.component.css +276 -0
  69. package/src/lib/components/form/form-sidebar/sidebar-form.component.html +117 -125
  70. package/src/lib/components/form/form-sidebar/sidebar-form.component.ts +109 -34
  71. package/src/lib/components/form/form-sidebar/sidebar-form.types.ts +3 -0
  72. package/src/lib/components/{toggle-radio/toggle-radio.component.css → form/form-validation/validation-form.component.css} +0 -1
  73. package/src/lib/components/form/form-validation/validation-form.component.html +10 -6
  74. package/src/lib/components/form/form-validation/validation-form.component.ts +99 -12
  75. package/src/lib/components/form/form-validation/validation-form.types.ts +33 -0
  76. package/src/lib/components/icon/icon.component.html +8 -5
  77. package/src/lib/components/icon/icon.component.ts +111 -9
  78. package/src/lib/components/input/input/input.component.html +19 -16
  79. package/src/lib/components/input/input/input.component.ts +130 -53
  80. package/src/lib/components/input/input/input.types.ts +8 -0
  81. package/src/lib/components/input/input-file/file-input.component.html +65 -56
  82. package/src/lib/components/input/input-file/file-input.component.ts +276 -173
  83. package/src/lib/components/input/input-file/file-input.types.ts +2 -0
  84. package/src/lib/components/input/input-range/range-input.component.css +67 -0
  85. package/src/lib/components/input/input-range/range-input.component.html +50 -58
  86. package/src/lib/components/input/input-range/range-input.component.ts +148 -60
  87. package/src/lib/components/input/input-range/range-input.types.ts +7 -0
  88. package/src/lib/components/input/input-textarea/textarea-input.component.html +16 -7
  89. package/src/lib/components/input/input-textarea/textarea-input.component.ts +140 -50
  90. package/src/lib/components/input/input-textarea/textarea-input.types.ts +2 -0
  91. package/src/lib/components/label/label.component.html +17 -16
  92. package/src/lib/components/label/label.component.ts +70 -16
  93. package/src/lib/components/label/label.types.ts +2 -0
  94. package/src/lib/components/menu/menu-options-table/menu-options-defaults.ts +34 -0
  95. package/src/lib/components/menu/menu-options-table/options-table-menu.component.html +34 -20
  96. package/src/lib/components/menu/menu-options-table/options-table-menu.component.ts +211 -58
  97. package/src/lib/components/menu/menu-options-table/options-table-menu.types.ts +38 -0
  98. package/src/lib/components/menu/options-coach-menu/options-coach-menu.component.html +49 -52
  99. package/src/lib/components/menu/options-coach-menu/options-coach-menu.component.ts +112 -24
  100. package/src/lib/components/menu/options-coach-menu/options-coach-menu.types.ts +9 -0
  101. package/src/lib/components/mode-toggle/mode-toggle.component.html +11 -16
  102. package/src/lib/components/mode-toggle/mode-toggle.component.ts +69 -33
  103. package/src/lib/components/paginator/paginator-complete/complete-paginator.component.html +4 -4
  104. package/src/lib/components/paginator/paginator-complete/complete-paginator.component.ts +31 -7
  105. package/src/lib/components/paginator/paginator-complete/complete-paginator.types.ts +12 -0
  106. package/src/lib/components/paginator/paginator-complete/complete-paginator.util.ts +36 -0
  107. package/src/lib/components/progress-bar/progress-bar.component.css +11 -0
  108. package/src/lib/components/progress-bar/progress-bar.component.html +41 -40
  109. package/src/lib/components/progress-bar/progress-bar.component.ts +95 -11
  110. package/src/lib/components/progress-bar/progress-bar.types.ts +2 -0
  111. package/src/lib/components/select/select-dropdown/dropdown-select.component.css +6 -0
  112. package/src/lib/components/select/select-dropdown/dropdown-select.component.html +54 -44
  113. package/src/lib/components/select/select-dropdown/dropdown-select.component.ts +450 -509
  114. package/src/lib/components/select/select-dropdown/dropdown-select.types.ts +43 -0
  115. package/src/lib/components/select/select-dropdown/dropdown-select.util.ts +179 -0
  116. package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.component.css +6 -0
  117. package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.component.html +131 -42
  118. package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.component.ts +491 -475
  119. package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.types.ts +22 -0
  120. package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.util.ts +20 -0
  121. package/src/lib/components/select/select-multi-table/multi-table-select.component.css +10 -0
  122. package/src/lib/components/select/select-multi-table/multi-table-select.component.html +76 -60
  123. package/src/lib/components/select/select-multi-table/multi-table-select.component.ts +250 -313
  124. package/src/lib/components/select/select-multi-table/multi-table-select.types.ts +10 -0
  125. package/src/lib/components/select/select-multi-table/multi-table-select.util.ts +5 -0
  126. package/src/lib/components/sidebar/sidebar-static/static-sidebar.component.css +212 -0
  127. package/src/lib/components/sidebar/sidebar-static/static-sidebar.component.html +62 -53
  128. package/src/lib/components/sidebar/sidebar-static/static-sidebar.component.ts +84 -27
  129. package/src/lib/components/sidebar/sidebar-static/static-sidebar.types.ts +2 -0
  130. package/src/lib/components/table/table-complete/complete-table.component.html +15 -17
  131. package/src/lib/components/table/table-complete/complete-table.component.ts +190 -338
  132. package/src/lib/components/table/table-complete/complete-table.types.ts +28 -0
  133. package/src/lib/components/table/table-complete/complete-table.util.ts +236 -0
  134. package/src/lib/components/table/table-complete/index.ts +2 -0
  135. package/src/lib/components/table/table-crud-complete/complete-crud-table.animations.ts +34 -0
  136. package/src/lib/components/table/table-crud-complete/complete-crud-table.component.html +73 -128
  137. package/src/lib/components/table/table-crud-complete/complete-crud-table.component.ts +542 -829
  138. package/src/lib/components/table/table-crud-complete/complete-crud-table.types.ts +57 -0
  139. package/src/lib/components/table/table-crud-complete/complete-crud-table.util.ts +723 -0
  140. package/src/lib/components/table/table-crud-complete/index.ts +3 -0
  141. package/src/lib/components/theme-generator/theme-generator.component.css +21 -0
  142. package/src/lib/components/theme-generator/theme-generator.component.html +146 -116
  143. package/src/lib/components/theme-generator/theme-generator.component.ts +44 -24
  144. package/src/lib/components/toggle-radio/shared/toggle-options.types.ts +8 -0
  145. package/src/lib/components/toggle-radio/shared/toggle-options.util.ts +44 -0
  146. package/src/lib/components/toggle-radio/toggle-radio/toggle-radio.component.css +135 -0
  147. package/src/lib/components/toggle-radio/toggle-radio/toggle-radio.component.html +52 -0
  148. package/src/lib/components/toggle-radio/toggle-radio/toggle-radio.component.ts +198 -0
  149. package/src/lib/components/toggle-radio/toggle-radio/toggle-radio.types.ts +1 -0
  150. package/src/lib/components/toggle-radio/toggle-segment/segment-toggle.component.css +108 -0
  151. package/src/lib/components/toggle-radio/toggle-segment/segment-toggle.component.html +37 -0
  152. package/src/lib/components/toggle-radio/toggle-segment/segment-toggle.component.ts +193 -0
  153. package/src/lib/components/toggle-radio/toggle-segment/segment-toggle.types.ts +1 -0
  154. package/src/lib/components/tooltip/tooltip.directive.ts +12 -9
  155. package/src/lib/components/tooltip/tooltip.service.ts +331 -133
  156. package/src/lib/components/tooltip/tooltip.types.ts +9 -0
  157. package/src/lib/components/viewer/viewer-image/image-viewer.component.css +90 -4
  158. package/src/lib/components/viewer/viewer-image/image-viewer.component.html +52 -103
  159. package/src/lib/components/viewer/viewer-image/image-viewer.component.ts +182 -177
  160. package/src/lib/components/viewer/viewer-image/image-viewer.types.ts +3 -0
  161. package/src/lib/components/viewer/viewer-pdf/pdf-viewer.component.css +177 -0
  162. package/src/lib/components/viewer/viewer-pdf/pdf-viewer.component.html +74 -24
  163. package/src/lib/components/viewer/viewer-pdf/pdf-viewer.component.ts +168 -15
  164. package/src/lib/components/viewer/viewer-pdf/pdf-viewer.types.ts +1 -0
  165. package/src/styles.css +2 -2
  166. package/lib/services/static/icons.service.d.ts +0 -65
  167. package/src/lib/components/colors-config/README.md +0 -38
  168. package/src/lib/components/form/form-sidebar/sidebar-form.component.scss +0 -0
  169. package/src/lib/components/form/form-validation/validation-form.component.scss +0 -0
  170. package/src/lib/components/menu/menu-options-table/options-table-menu.component.scss +0 -0
  171. package/src/lib/components/menu/options-coach-menu/options-coach-menu.component.scss +0 -12
  172. package/src/lib/components/sidebar/sidebar-static/static-sidebar.component.scss +0 -0
  173. package/src/lib/components/toggle-radio/toggle-radio.component.html +0 -51
  174. package/src/lib/components/toggle-radio/toggle-radio.component.ts +0 -222
  175. package/src/lib/components/viewer/viewer-pdf/pdf-viewer.component.scss +0 -0
  176. package/tailjng-0.1.6.tgz +0 -0
@@ -1,183 +1,132 @@
1
- <div class="relative w-full h-full" #container>
1
+ <div class="j-image-viewer" [ngClass]="ngClasses" #container>
2
2
  @if (hasAnyControlVisible) {
3
- <div
4
- class="absolute z-20 flex flex-wrap justify-end items-center gap-1 max-w-[calc(100%-16px)]"
5
- [ngClass]="{
6
- 'top-3 right-3': isFullscreen,
7
- 'top-2 right-2': !isFullscreen,
8
- }"
9
- >
3
+ <div class="j-image-viewer__toolbar" [ngClass]="controlsPositionClasses">
10
4
  @if (isControlVisible(showRotateLeft)) {
11
5
  <JButton
12
6
  jTooltip="Girar a la izquierda"
13
- [icon]="iconsService.icons.rotateLeft"
7
+ [icon]="Icons.RotateCcw"
14
8
  [iconSize]="buttonIconSize"
15
- (clicked)="rotateLeftImg()"
16
- [classes]="
17
- 'secondary rounded-lg shrink-0 opacity-30 hover:opacity-100 transition-opacity duration-200 ' +
18
- buttonSizeClass
19
- "
9
+ (clicked)="rotateLeft()"
10
+ [classes]="controlButtonClasses"
20
11
  />
21
12
  }
22
13
 
23
14
  @if (isControlVisible(showRotateRight)) {
24
15
  <JButton
25
16
  jTooltip="Girar a la derecha"
26
- [icon]="iconsService.icons.rotateRight"
17
+ [icon]="Icons.RotateCw"
27
18
  [iconSize]="buttonIconSize"
28
- (clicked)="rotateRightImg()"
29
- [classes]="
30
- 'secondary rounded-lg shrink-0 opacity-30 hover:opacity-100 transition-opacity duration-200 ' +
31
- buttonSizeClass
32
- "
19
+ (clicked)="rotateRight()"
20
+ [classes]="controlButtonClasses"
33
21
  />
34
22
  }
35
23
 
36
24
  @if (isControlVisible(showReset)) {
37
25
  <JButton
38
26
  jTooltip="Restablecer"
39
- [icon]="iconsService.icons.reset"
27
+ [icon]="Icons.RefreshCcw"
40
28
  [iconSize]="buttonIconSize"
41
- (clicked)="reset()"
42
- [classes]="
43
- 'secondary rounded-lg shrink-0 opacity-30 hover:opacity-100 transition-opacity duration-200 ' +
44
- buttonSizeClass
45
- "
29
+ (clicked)="resetView()"
30
+ [classes]="controlButtonClasses"
46
31
  />
47
32
  }
48
33
 
49
34
  @if (isControlVisible(showZoomOut)) {
50
35
  <JButton
51
36
  jTooltip="Alejar"
52
- [icon]="iconsService.icons.zoomOut"
37
+ [icon]="Icons.ZoomOut"
53
38
  [iconSize]="buttonIconSize"
54
- [disabled]="zoom === 0.5"
39
+ [disabled]="isZoomMin"
55
40
  (clicked)="zoomOut()"
56
- [classes]="
57
- 'secondary rounded-lg shrink-0 opacity-30 hover:opacity-100 transition-opacity duration-200 ' +
58
- buttonSizeClass
59
- "
41
+ [classes]="controlButtonClasses"
60
42
  />
61
43
  }
62
44
 
63
45
  @if (isControlVisible(showZoomIn)) {
64
46
  <JButton
65
47
  jTooltip="Acercar"
66
- [icon]="iconsService.icons.zoomIn"
48
+ [icon]="Icons.ZoomIn"
67
49
  [iconSize]="buttonIconSize"
68
- [disabled]="zoom === 3"
50
+ [disabled]="isZoomMax"
69
51
  (clicked)="zoomIn()"
70
- [classes]="
71
- 'secondary rounded-lg shrink-0 opacity-30 hover:opacity-100 transition-opacity duration-200 ' +
72
- buttonSizeClass
73
- "
52
+ [classes]="controlButtonClasses"
74
53
  />
75
54
  }
76
55
 
77
56
  @if (isControlVisible(showDownload)) {
78
57
  <JButton
79
58
  jTooltip="Descargar"
80
- [icon]="iconsService.icons.download"
59
+ [icon]="Icons.Download"
81
60
  [iconSize]="buttonIconSize"
82
61
  (clicked)="download()"
83
62
  [isLoading]="isDownloading"
84
- [classes]="
85
- 'secondary rounded-lg shrink-0 opacity-30 hover:opacity-100 transition-opacity duration-200 ' +
86
- buttonSizeClass
87
- "
63
+ [classes]="controlButtonClasses"
88
64
  />
89
65
  }
90
66
 
91
67
  @if (isControlVisible(showFullscreen)) {
92
68
  <JButton
93
69
  jTooltip="Pantalla completa"
94
- [icon]="
95
- isFullscreen
96
- ? iconsService.icons.exitFullscreen
97
- : iconsService.icons.fullscreen
98
- "
70
+ [icon]="fullscreenIcon"
99
71
  [iconSize]="buttonIconSize"
100
72
  (clicked)="toggleFullscreen(container)"
101
- [classes]="
102
- 'secondary rounded-lg shrink-0 opacity-30 hover:opacity-100 transition-opacity duration-200 ' +
103
- buttonSizeClass
104
- "
73
+ [classes]="controlButtonClasses"
105
74
  />
106
75
  }
107
76
  </div>
108
77
  }
109
78
 
110
- <div
111
- class="flex justify-center items-center w-full h-full select-none"
112
- [class.fullscreen]="isFullscreen"
113
- >
114
- <div class="relative w-full h-full overflow-hidden">
79
+ <div class="j-image-viewer__stage" [class.j-image-viewer__stage--fullscreen]="isFullscreen">
80
+ <div class="j-image-viewer__canvas">
115
81
  @if (hasImage && !hasError) {
116
82
  <img
117
83
  [src]="src"
118
84
  [alt]="alt"
119
- (load)="handleLoad()"
120
- (error)="handleError()"
85
+ (load)="onImageLoad()"
86
+ (error)="onImageError()"
121
87
  (mousedown)="startDrag($event)"
122
- [style.transform]="
123
- 'scale(' +
124
- zoom +
125
- ') rotate(' +
126
- rotate +
127
- 'deg) translate(' +
128
- posX +
129
- 'px,' +
130
- posY +
131
- 'px)'
132
- "
133
- [style.objectFit]="objectFit"
88
+ [style.transform]="imageTransform"
89
+ [style.object-fit]="objectFit"
134
90
  [style.cursor]="zoom > 1 ? 'grab' : 'default'"
135
- [class.invisible]="loading"
136
- [class.transition-transform]="animateTransform"
137
- [class.duration-200]="animateTransform"
138
- [class.ease-in-out]="animateTransform"
139
- class="w-full h-full object-contain pointer-events-auto select-none"
91
+ [ngClass]="imageClasses"
140
92
  />
141
93
  }
142
94
 
143
95
  @if (hasImage && loading && !hasError) {
144
- <div
145
- class="absolute flex flex-col gap-3 inset-0 items-center justify-center bg-white/70 dark:bg-black/40"
146
- >
147
- <lucide-icon
148
- [name]="iconsService.icons.loading"
149
- size="30"
150
- class="text-primary animate-spin"
151
- ></lucide-icon>
152
- <span class="text-sm text-gray-500">Cargando imagen...</span>
96
+ <div class="j-image-viewer__overlay j-image-viewer__overlay--loading">
97
+ <JIcon
98
+ [icon]="Icons.Loader2"
99
+ [size]="30"
100
+ iconClass="animate-spin text-primary dark:text-dark-primary"
101
+ [ariaHidden]="true"
102
+ />
103
+ <span class="j-image-viewer__message">Cargando imagen...</span>
153
104
  </div>
154
105
  }
155
106
 
156
107
  @if (!hasImage) {
157
- <div
158
- class="absolute flex flex-col gap-3 inset-0 items-center justify-center"
159
- >
160
- <lucide-icon
161
- [name]="iconsService.icons.imageOff"
162
- size="30"
163
- class="text-gray-400"
108
+ <div class="j-image-viewer__overlay">
109
+ <JIcon
110
+ [icon]="Icons.ImageOff"
111
+ [size]="30"
112
+ iconClass="text-muted-foreground"
113
+ [ariaHidden]="true"
164
114
  />
165
- <span class="text-sm text-gray-500 dark:text-gray-400">
166
- {{ emptyMessage }}
167
- </span>
115
+ <span class="j-image-viewer__message">{{ emptyMessage }}</span>
168
116
  </div>
169
117
  }
170
118
 
171
119
  @if (hasImage && hasError) {
172
- <div
173
- class="absolute flex flex-col gap-3 inset-0 items-center justify-center"
174
- >
175
- <lucide-icon
176
- [name]="iconsService.icons.imageOff"
177
- size="30"
178
- class="text-red-500"
120
+ <div class="j-image-viewer__overlay">
121
+ <JIcon
122
+ [icon]="Icons.ImageOff"
123
+ [size]="30"
124
+ iconClass="text-destructive"
125
+ [ariaHidden]="true"
179
126
  />
180
- <span class="text-sm text-red-500">No se pudo cargar la imagen</span>
127
+ <span class="j-image-viewer__message j-image-viewer__message--error">
128
+ No se pudo cargar la imagen
129
+ </span>
181
130
  </div>
182
131
  }
183
132
  </div>