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.
- package/README.md +12 -4
- package/cli/execute/init-app.js +5 -2
- package/cli/execute/sync-app.js +14 -2
- package/cli/settings/colors-config-utils.js +43 -8
- package/cli/settings/icons-config-utils.js +62 -0
- package/cli/settings/path-utils.js +32 -2
- package/cli/settings/project-utils.js +7 -1
- package/cli/templates/app.generator.js +2 -2
- package/fesm2022/tailjng.mjs +247 -80
- package/fesm2022/tailjng.mjs.map +1 -1
- package/lib/services/static/theme.service.d.ts +39 -1
- package/lib/utils/theme/theme-variables.util.d.ts +31 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -1
- package/registry/components.json +41 -18
- package/src/colors.safelist.css +2 -2
- package/src/lib/components/.config/README.md +11 -0
- package/src/lib/components/.config/colors/README.md +38 -0
- package/src/lib/components/{colors-config → .config/colors}/colors.config.ts +5 -5
- package/src/lib/components/{colors-config → .config/colors}/colors.safelist.css +2 -2
- package/src/lib/components/.config/icons/README.md +26 -0
- package/src/lib/components/.config/icons/icons.lucide.ts +134 -0
- package/src/lib/components/.config/input/README.md +24 -0
- package/src/lib/components/.config/input/input.classes.ts +119 -0
- package/src/lib/components/alert/alert-dialog/dialog-alert.component.css +244 -2
- package/src/lib/components/alert/alert-dialog/dialog-alert.component.html +25 -38
- package/src/lib/components/alert/alert-dialog/dialog-alert.component.ts +66 -56
- package/src/lib/components/alert/alert-dialog/dialog-alert.types.ts +19 -0
- package/src/lib/components/alert/alert-toast/toast-alert.component.css +630 -12
- package/src/lib/components/alert/alert-toast/toast-alert.component.html +103 -102
- package/src/lib/components/alert/alert-toast/toast-alert.component.ts +485 -128
- package/src/lib/components/alert/alert-toast/toast-alert.types.ts +25 -0
- package/src/lib/components/badge/badge.component.html +34 -21
- package/src/lib/components/badge/badge.component.ts +140 -31
- package/src/lib/components/button/button.component.html +16 -10
- package/src/lib/components/button/button.component.ts +162 -22
- package/src/lib/components/card/card-complete/complete-card.component.html +2 -2
- package/src/lib/components/card/card-complete/complete-card.component.ts +26 -16
- package/src/lib/components/card/card-crud-complete/complete-crud-card.component.html +2 -2
- package/src/lib/components/card/card-crud-complete/complete-crud-card.component.ts +26 -16
- package/src/lib/components/checkbox/checkbox-input/input-checkbox.component.css +97 -0
- package/src/lib/components/checkbox/checkbox-input/input-checkbox.component.html +54 -46
- package/src/lib/components/checkbox/checkbox-input/input-checkbox.component.ts +135 -64
- package/src/lib/components/checkbox/checkbox-input/input-checkbox.types.ts +3 -0
- package/src/lib/components/checkbox/checkbox-switch/switch-checkbox.component.css +112 -0
- package/src/lib/components/checkbox/checkbox-switch/switch-checkbox.component.html +28 -25
- package/src/lib/components/checkbox/checkbox-switch/switch-checkbox.component.ts +67 -15
- package/src/lib/components/checkbox/checkbox-switch/switch-checkbox.types.ts +1 -0
- package/src/lib/components/coach-mark/coach-mark.component.html +4 -22
- package/src/lib/components/coach-mark/coach-mark.component.scss +1 -1
- package/src/lib/components/coach-mark/coach-mark.component.ts +51 -18
- package/src/lib/components/coach-mark/coach-mark.directive.ts +133 -78
- package/src/lib/components/coach-mark/coach-mark.types.ts +12 -0
- package/src/lib/components/dialog/dialog.component.css +103 -1
- package/src/lib/components/dialog/dialog.component.html +46 -66
- package/src/lib/components/dialog/dialog.component.ts +136 -110
- package/src/lib/components/dialog/dialog.types.ts +19 -0
- package/src/lib/components/filter/filter-complete/complete-filter.component.html +16 -19
- package/src/lib/components/filter/filter-complete/complete-filter.component.scss +35 -0
- package/src/lib/components/filter/filter-complete/complete-filter.component.ts +58 -34
- package/src/lib/components/filter/filter-complete/complete-filter.types.ts +7 -0
- package/src/lib/components/filter/filter-complete/complete-filter.util.ts +16 -0
- package/src/lib/components/form/form-container/container-form.component.css +4 -0
- package/src/lib/components/form/form-container/container-form.component.html +2 -2
- package/src/lib/components/form/form-container/container-form.component.ts +72 -16
- package/src/lib/components/form/form-container/container-form.types.ts +42 -0
- package/src/lib/components/form/form-container/form-col-span.directive.ts +25 -0
- package/src/lib/components/form/form-sidebar/sidebar-form.component.css +276 -0
- package/src/lib/components/form/form-sidebar/sidebar-form.component.html +117 -125
- package/src/lib/components/form/form-sidebar/sidebar-form.component.ts +109 -34
- package/src/lib/components/form/form-sidebar/sidebar-form.types.ts +3 -0
- package/src/lib/components/{toggle-radio/toggle-radio.component.css → form/form-validation/validation-form.component.css} +0 -1
- package/src/lib/components/form/form-validation/validation-form.component.html +10 -6
- package/src/lib/components/form/form-validation/validation-form.component.ts +99 -12
- package/src/lib/components/form/form-validation/validation-form.types.ts +33 -0
- package/src/lib/components/icon/icon.component.html +8 -5
- package/src/lib/components/icon/icon.component.ts +111 -9
- package/src/lib/components/input/input/input.component.html +19 -16
- package/src/lib/components/input/input/input.component.ts +130 -53
- package/src/lib/components/input/input/input.types.ts +8 -0
- package/src/lib/components/input/input-file/file-input.component.html +65 -56
- package/src/lib/components/input/input-file/file-input.component.ts +276 -173
- package/src/lib/components/input/input-file/file-input.types.ts +2 -0
- package/src/lib/components/input/input-range/range-input.component.css +67 -0
- package/src/lib/components/input/input-range/range-input.component.html +50 -58
- package/src/lib/components/input/input-range/range-input.component.ts +148 -60
- package/src/lib/components/input/input-range/range-input.types.ts +7 -0
- package/src/lib/components/input/input-textarea/textarea-input.component.html +16 -7
- package/src/lib/components/input/input-textarea/textarea-input.component.ts +140 -50
- package/src/lib/components/input/input-textarea/textarea-input.types.ts +2 -0
- package/src/lib/components/label/label.component.html +17 -16
- package/src/lib/components/label/label.component.ts +70 -16
- package/src/lib/components/label/label.types.ts +2 -0
- package/src/lib/components/menu/menu-options-table/menu-options-defaults.ts +34 -0
- package/src/lib/components/menu/menu-options-table/options-table-menu.component.html +34 -20
- package/src/lib/components/menu/menu-options-table/options-table-menu.component.ts +211 -58
- package/src/lib/components/menu/menu-options-table/options-table-menu.types.ts +38 -0
- package/src/lib/components/menu/options-coach-menu/options-coach-menu.component.html +49 -52
- package/src/lib/components/menu/options-coach-menu/options-coach-menu.component.ts +112 -24
- package/src/lib/components/menu/options-coach-menu/options-coach-menu.types.ts +9 -0
- package/src/lib/components/mode-toggle/mode-toggle.component.html +11 -16
- package/src/lib/components/mode-toggle/mode-toggle.component.ts +69 -33
- package/src/lib/components/paginator/paginator-complete/complete-paginator.component.html +4 -4
- package/src/lib/components/paginator/paginator-complete/complete-paginator.component.ts +31 -7
- package/src/lib/components/paginator/paginator-complete/complete-paginator.types.ts +12 -0
- package/src/lib/components/paginator/paginator-complete/complete-paginator.util.ts +36 -0
- package/src/lib/components/progress-bar/progress-bar.component.css +11 -0
- package/src/lib/components/progress-bar/progress-bar.component.html +41 -40
- package/src/lib/components/progress-bar/progress-bar.component.ts +95 -11
- package/src/lib/components/progress-bar/progress-bar.types.ts +2 -0
- package/src/lib/components/select/select-dropdown/dropdown-select.component.css +6 -0
- package/src/lib/components/select/select-dropdown/dropdown-select.component.html +54 -44
- package/src/lib/components/select/select-dropdown/dropdown-select.component.ts +450 -509
- package/src/lib/components/select/select-dropdown/dropdown-select.types.ts +43 -0
- package/src/lib/components/select/select-dropdown/dropdown-select.util.ts +179 -0
- package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.component.css +6 -0
- package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.component.html +131 -42
- package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.component.ts +491 -475
- package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.types.ts +22 -0
- package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.util.ts +20 -0
- package/src/lib/components/select/select-multi-table/multi-table-select.component.css +10 -0
- package/src/lib/components/select/select-multi-table/multi-table-select.component.html +76 -60
- package/src/lib/components/select/select-multi-table/multi-table-select.component.ts +250 -313
- package/src/lib/components/select/select-multi-table/multi-table-select.types.ts +10 -0
- package/src/lib/components/select/select-multi-table/multi-table-select.util.ts +5 -0
- package/src/lib/components/sidebar/sidebar-static/static-sidebar.component.css +212 -0
- package/src/lib/components/sidebar/sidebar-static/static-sidebar.component.html +62 -53
- package/src/lib/components/sidebar/sidebar-static/static-sidebar.component.ts +84 -27
- package/src/lib/components/sidebar/sidebar-static/static-sidebar.types.ts +2 -0
- package/src/lib/components/table/table-complete/complete-table.component.html +15 -17
- package/src/lib/components/table/table-complete/complete-table.component.ts +190 -338
- package/src/lib/components/table/table-complete/complete-table.types.ts +28 -0
- package/src/lib/components/table/table-complete/complete-table.util.ts +236 -0
- package/src/lib/components/table/table-complete/index.ts +2 -0
- package/src/lib/components/table/table-crud-complete/complete-crud-table.animations.ts +34 -0
- package/src/lib/components/table/table-crud-complete/complete-crud-table.component.html +73 -128
- package/src/lib/components/table/table-crud-complete/complete-crud-table.component.ts +542 -829
- package/src/lib/components/table/table-crud-complete/complete-crud-table.types.ts +57 -0
- package/src/lib/components/table/table-crud-complete/complete-crud-table.util.ts +723 -0
- package/src/lib/components/table/table-crud-complete/index.ts +3 -0
- package/src/lib/components/theme-generator/theme-generator.component.css +21 -0
- package/src/lib/components/theme-generator/theme-generator.component.html +146 -116
- package/src/lib/components/theme-generator/theme-generator.component.ts +44 -24
- package/src/lib/components/toggle-radio/shared/toggle-options.types.ts +8 -0
- package/src/lib/components/toggle-radio/shared/toggle-options.util.ts +44 -0
- package/src/lib/components/toggle-radio/toggle-radio/toggle-radio.component.css +135 -0
- package/src/lib/components/toggle-radio/toggle-radio/toggle-radio.component.html +52 -0
- package/src/lib/components/toggle-radio/toggle-radio/toggle-radio.component.ts +198 -0
- package/src/lib/components/toggle-radio/toggle-radio/toggle-radio.types.ts +1 -0
- package/src/lib/components/toggle-radio/toggle-segment/segment-toggle.component.css +108 -0
- package/src/lib/components/toggle-radio/toggle-segment/segment-toggle.component.html +37 -0
- package/src/lib/components/toggle-radio/toggle-segment/segment-toggle.component.ts +193 -0
- package/src/lib/components/toggle-radio/toggle-segment/segment-toggle.types.ts +1 -0
- package/src/lib/components/tooltip/tooltip.directive.ts +12 -9
- package/src/lib/components/tooltip/tooltip.service.ts +331 -133
- package/src/lib/components/tooltip/tooltip.types.ts +9 -0
- package/src/lib/components/viewer/viewer-image/image-viewer.component.css +90 -4
- package/src/lib/components/viewer/viewer-image/image-viewer.component.html +52 -103
- package/src/lib/components/viewer/viewer-image/image-viewer.component.ts +182 -177
- package/src/lib/components/viewer/viewer-image/image-viewer.types.ts +3 -0
- package/src/lib/components/viewer/viewer-pdf/pdf-viewer.component.css +177 -0
- package/src/lib/components/viewer/viewer-pdf/pdf-viewer.component.html +74 -24
- package/src/lib/components/viewer/viewer-pdf/pdf-viewer.component.ts +168 -15
- package/src/lib/components/viewer/viewer-pdf/pdf-viewer.types.ts +1 -0
- package/src/styles.css +2 -2
- package/lib/services/static/icons.service.d.ts +0 -65
- package/src/lib/components/colors-config/README.md +0 -38
- package/src/lib/components/form/form-sidebar/sidebar-form.component.scss +0 -0
- package/src/lib/components/form/form-validation/validation-form.component.scss +0 -0
- package/src/lib/components/menu/menu-options-table/options-table-menu.component.scss +0 -0
- package/src/lib/components/menu/options-coach-menu/options-coach-menu.component.scss +0 -12
- package/src/lib/components/sidebar/sidebar-static/static-sidebar.component.scss +0 -0
- package/src/lib/components/toggle-radio/toggle-radio.component.html +0 -51
- package/src/lib/components/toggle-radio/toggle-radio.component.ts +0 -222
- package/src/lib/components/viewer/viewer-pdf/pdf-viewer.component.scss +0 -0
- package/tailjng-0.1.6.tgz +0 -0
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
<div
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
[
|
|
14
|
-
[style.height.px]="height"
|
|
15
|
-
[style.opacity]="disabled ? 0.3 : 1"
|
|
1
|
+
<div
|
|
2
|
+
class="j-progress-bar relative mb-2 w-full select-none"
|
|
3
|
+
[style.height.px]="height"
|
|
4
|
+
>
|
|
5
|
+
<div
|
|
6
|
+
class="absolute inset-0 overflow-hidden border"
|
|
7
|
+
[ngClass]="trackClasses"
|
|
8
|
+
[style.border-radius.px]="borderRadius"
|
|
9
|
+
>
|
|
10
|
+
@if (showFilledLabel) {
|
|
11
|
+
<div
|
|
12
|
+
class="j-progress-bar__fill absolute inset-y-0 left-0 bg-primary transition-all duration-300 ease-in-out dark:bg-dark-primary"
|
|
13
|
+
[style.width.%]="fillPercent"
|
|
16
14
|
[style.border-radius.px]="borderRadius"
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
></div>
|
|
16
|
+
}
|
|
17
|
+
</div>
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
<div
|
|
20
|
+
class="j-progress-bar__label j-progress-bar__label--track pointer-events-none absolute inset-0 flex items-center justify-center overflow-hidden"
|
|
21
|
+
[style.border-radius.px]="borderRadius"
|
|
22
|
+
[style.opacity]="disabled ? 0.3 : 1"
|
|
23
|
+
>
|
|
24
|
+
<span
|
|
25
|
+
class="font-bold leading-none text-gray-500 dark:text-gray-400"
|
|
26
|
+
[style.font-size.px]="labelFontSize"
|
|
25
27
|
>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{{ simbol }}{{ value }}
|
|
30
|
-
} @else {
|
|
31
|
-
|
|
32
|
-
@if (value === max) {
|
|
33
|
-
{{ simbol }}{{ value }}
|
|
34
|
-
} @else {
|
|
35
|
-
{{ simbol }}{{ value }} / {{ simbol }}{{ max }}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
} @else {
|
|
40
|
-
SIN NOVEDAD
|
|
41
|
-
}
|
|
28
|
+
{{ labelText }}
|
|
29
|
+
</span>
|
|
30
|
+
</div>
|
|
42
31
|
|
|
32
|
+
@if (showFilledLabel) {
|
|
33
|
+
<div
|
|
34
|
+
class="j-progress-bar__label j-progress-bar__label--fill pointer-events-none absolute inset-0 flex items-center justify-center"
|
|
35
|
+
[style.clip-path]="fillClipPath"
|
|
36
|
+
[style.border-radius.px]="borderRadius"
|
|
37
|
+
>
|
|
38
|
+
<span
|
|
39
|
+
class="font-bold leading-none text-white dark:text-white"
|
|
40
|
+
[style.font-size.px]="labelFontSize"
|
|
41
|
+
>
|
|
42
|
+
{{ labelText }}
|
|
43
|
+
</span>
|
|
43
44
|
</div>
|
|
44
|
-
|
|
45
|
-
</div>
|
|
45
|
+
}
|
|
46
|
+
</div>
|
|
@@ -1,21 +1,105 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
1
|
import { NgClass } from '@angular/common';
|
|
2
|
+
import { Component, Input } from '@angular/core';
|
|
3
3
|
|
|
4
|
+
export type { ProgressBarState } from './progress-bar.types';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Progress bar with centered label that adapts contrast over fill and track.
|
|
8
|
+
*
|
|
9
|
+
* Install: `npx tailjng add progress-bar`
|
|
10
|
+
*/
|
|
4
11
|
@Component({
|
|
5
12
|
selector: 'JProgressBar',
|
|
6
13
|
imports: [NgClass],
|
|
7
14
|
templateUrl: './progress-bar.component.html',
|
|
8
|
-
styleUrl: './progress-bar.component.css'
|
|
15
|
+
styleUrl: './progress-bar.component.css',
|
|
9
16
|
})
|
|
10
17
|
export class JProgressBarComponent {
|
|
18
|
+
@Input() value = 0;
|
|
19
|
+
@Input() max = 100;
|
|
20
|
+
|
|
21
|
+
/** Unit prefix/suffix for values (e.g. "%"). Alias `simbol` kept for backward compatibility. */
|
|
22
|
+
@Input({ alias: 'simbol' }) symbol = '%';
|
|
23
|
+
|
|
24
|
+
@Input() disabled = false;
|
|
25
|
+
|
|
26
|
+
// Show "value / max" instead of value only (when value !== max)
|
|
27
|
+
@Input() showRange = false;
|
|
28
|
+
|
|
29
|
+
@Input() height = 30;
|
|
30
|
+
@Input() borderRadius = 50;
|
|
31
|
+
|
|
32
|
+
// Extra conditional classes on the track container
|
|
33
|
+
@Input() ngClasses: Record<string, boolean> = {};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Fill percentage clamped between 0 and 100.
|
|
37
|
+
* @returns Progress ratio as a percentage.
|
|
38
|
+
*/
|
|
39
|
+
get fillPercent(): number {
|
|
40
|
+
if (this.max <= 0) {
|
|
41
|
+
return 0;
|
|
42
|
+
}
|
|
43
|
+
return Math.min(100, Math.max(0, (this.value / this.max) * 100));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Label font size scaled to bar height so text stays inside thin bars.
|
|
48
|
+
* @returns Font size in pixels.
|
|
49
|
+
*/
|
|
50
|
+
get labelFontSize(): number {
|
|
51
|
+
return Math.max(8, Math.min(Math.round(this.height * 0.45), 16));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Clip path revealing only the filled portion for the contrast overlay label.
|
|
56
|
+
* @returns CSS `clip-path` inset value.
|
|
57
|
+
*/
|
|
58
|
+
get fillClipPath(): string {
|
|
59
|
+
const insetRight = 100 - this.fillPercent;
|
|
60
|
+
return `inset(0 ${insetRight}% 0 0 round ${this.borderRadius}px)`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Centered label text.
|
|
65
|
+
* @returns Formatted progress label.
|
|
66
|
+
*/
|
|
67
|
+
get labelText(): string {
|
|
68
|
+
if (this.disabled) {
|
|
69
|
+
return 'SIN NOVEDAD';
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (!this.showRange || this.value === this.max) {
|
|
73
|
+
return `${this.value}${this.symbol}`;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return `${this.value}${this.symbol} / ${this.max}${this.symbol}`;
|
|
77
|
+
}
|
|
11
78
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Whether the high-contrast overlay label should render.
|
|
81
|
+
* @returns `true` when enabled and the bar has visible fill.
|
|
82
|
+
*/
|
|
83
|
+
get showFilledLabel(): boolean {
|
|
84
|
+
return !this.disabled && this.fillPercent > 0;
|
|
85
|
+
}
|
|
17
86
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Class map for the track shell.
|
|
89
|
+
* @returns Track border, background, and transition utilities.
|
|
90
|
+
*/
|
|
91
|
+
get trackClasses(): Record<string, boolean> {
|
|
92
|
+
return {
|
|
93
|
+
'j-progress-bar__track': true,
|
|
94
|
+
'border-border': true,
|
|
95
|
+
'dark:border-dark-border': true,
|
|
96
|
+
'bg-background': true,
|
|
97
|
+
'dark:bg-dark-background': true,
|
|
98
|
+
'transition-all': true,
|
|
99
|
+
'duration-300': true,
|
|
100
|
+
'ease-in-out': true,
|
|
101
|
+
...this.ngClasses,
|
|
102
|
+
'opacity-30': this.disabled,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- Trigger -->
|
|
1
2
|
<div class="relative w-full">
|
|
2
3
|
<div #selectButton class="w-auto">
|
|
3
4
|
<button
|
|
@@ -27,43 +28,46 @@
|
|
|
27
28
|
(click)="clearSelection($event)"
|
|
28
29
|
class="pr-1 mr-1 text-gray-400 hover:text-gray-600 focus:outline-none cursor-pointer"
|
|
29
30
|
>
|
|
30
|
-
<
|
|
31
|
-
[
|
|
32
|
-
size="14"
|
|
33
|
-
|
|
31
|
+
<JIcon
|
|
32
|
+
[icon]="Icons.X"
|
|
33
|
+
[size]="14"
|
|
34
|
+
iconClass="text-gray-400"
|
|
35
|
+
[ariaHidden]="true"
|
|
36
|
+
/>
|
|
34
37
|
</button>
|
|
35
38
|
}
|
|
36
39
|
@if (!isLoading) {
|
|
37
|
-
<
|
|
38
|
-
[
|
|
39
|
-
size="16"
|
|
40
|
-
|
|
41
|
-
[
|
|
42
|
-
|
|
40
|
+
<JIcon
|
|
41
|
+
[icon]="Icons.ChevronDown"
|
|
42
|
+
[size]="16"
|
|
43
|
+
iconClass="transition duration-300 ease-in-out text-gray-400"
|
|
44
|
+
[ngClasses]="{ 'rotate-180': isColumnSelectorOpen }"
|
|
45
|
+
[ariaHidden]="true"
|
|
46
|
+
/>
|
|
43
47
|
} @else {
|
|
44
|
-
<
|
|
45
|
-
[
|
|
46
|
-
size="16"
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
<JIcon
|
|
49
|
+
[icon]="Icons.Loader2"
|
|
50
|
+
[size]="16"
|
|
51
|
+
iconClass="text-gray-400 animate-spin"
|
|
52
|
+
[ariaHidden]="true"
|
|
53
|
+
/>
|
|
49
54
|
}
|
|
50
55
|
</div>
|
|
51
56
|
</button>
|
|
52
57
|
</div>
|
|
53
58
|
</div>
|
|
54
59
|
|
|
55
|
-
<!--
|
|
60
|
+
<!-- Floating panel (position: fixed — see dropdown-select.util) -->
|
|
56
61
|
@if (isColumnSelectorOpen) {
|
|
57
62
|
<div
|
|
63
|
+
#dropdownPanel
|
|
58
64
|
@modalTransition
|
|
59
65
|
[class]="
|
|
60
|
-
'
|
|
66
|
+
'jdropdown-panel min-w-[250px] bg-background dark:bg-dark-background rounded-lg shadow-lg border border-border border-dark-border' +
|
|
61
67
|
' ' +
|
|
62
68
|
classes
|
|
63
69
|
"
|
|
64
70
|
[style.width.px]="dropdownWidth"
|
|
65
|
-
[style.top.px]="dropdownTop"
|
|
66
|
-
[style.left.px]="dropdownLeft"
|
|
67
71
|
[ngClass]="getButtonNgClass()"
|
|
68
72
|
>
|
|
69
73
|
<div class="pt-1 pl-3 pr-3 pb-3">
|
|
@@ -73,7 +77,7 @@
|
|
|
73
77
|
{{ title }}
|
|
74
78
|
</div>
|
|
75
79
|
|
|
76
|
-
<!--
|
|
80
|
+
<!-- Searchable API filter -->
|
|
77
81
|
@if (type === "searchable" && isSearch) {
|
|
78
82
|
<div class="mb-2 relative">
|
|
79
83
|
<input
|
|
@@ -91,34 +95,38 @@
|
|
|
91
95
|
(click)="clearSearchTerm()"
|
|
92
96
|
class="pr-1 mr-1 text-gray-400 hover:text-gray-600 focus:outline-none cursor-pointer"
|
|
93
97
|
>
|
|
94
|
-
<
|
|
95
|
-
[
|
|
96
|
-
size="16"
|
|
97
|
-
|
|
98
|
+
<JIcon
|
|
99
|
+
[icon]="Icons.X"
|
|
100
|
+
[size]="16"
|
|
101
|
+
iconClass="text-gray-400"
|
|
102
|
+
[ariaHidden]="true"
|
|
103
|
+
/>
|
|
98
104
|
</button>
|
|
99
105
|
}
|
|
100
|
-
<
|
|
101
|
-
[
|
|
102
|
-
size="16"
|
|
103
|
-
|
|
104
|
-
|
|
106
|
+
<JIcon
|
|
107
|
+
[icon]="Icons.Search"
|
|
108
|
+
[size]="16"
|
|
109
|
+
iconClass="text-gray-400"
|
|
110
|
+
[ariaHidden]="true"
|
|
111
|
+
/>
|
|
105
112
|
</div>
|
|
106
113
|
</div>
|
|
107
114
|
}
|
|
108
115
|
|
|
109
|
-
<!--
|
|
116
|
+
<!-- Option list -->
|
|
110
117
|
<div
|
|
111
|
-
class="max-h-45 max-[400px]:max-h-38 overflow-x-hidden overflow-y-auto flex flex-col gap-1 scroll-element"
|
|
118
|
+
class="jdropdown-options-list max-h-45 max-[400px]:max-h-38 overflow-x-hidden overflow-y-auto flex flex-col gap-1 scroll-element"
|
|
112
119
|
>
|
|
113
120
|
@if (isLoading) {
|
|
114
121
|
<div
|
|
115
122
|
class="flex gap-3 text-black/50 dark:text-white/50 items-center justify-center py-4"
|
|
116
123
|
>
|
|
117
|
-
<
|
|
118
|
-
[
|
|
119
|
-
size="20"
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
<JIcon
|
|
125
|
+
[icon]="Icons.Loader2"
|
|
126
|
+
[size]="20"
|
|
127
|
+
iconClass="animate-spin"
|
|
128
|
+
[ariaHidden]="true"
|
|
129
|
+
/>
|
|
122
130
|
Cargando...
|
|
123
131
|
</div>
|
|
124
132
|
} @else {
|
|
@@ -134,16 +142,18 @@
|
|
|
134
142
|
}"
|
|
135
143
|
>
|
|
136
144
|
@if (selectedValue === option.value) {
|
|
137
|
-
<
|
|
138
|
-
[
|
|
139
|
-
size="15"
|
|
140
|
-
|
|
145
|
+
<JIcon
|
|
146
|
+
[icon]="Icons.Check"
|
|
147
|
+
[size]="15"
|
|
148
|
+
iconClass="transition text-black dark:text-white"
|
|
149
|
+
[ariaHidden]="true"
|
|
141
150
|
/>
|
|
142
151
|
} @else {
|
|
143
|
-
<
|
|
144
|
-
[
|
|
145
|
-
size="15"
|
|
146
|
-
|
|
152
|
+
<JIcon
|
|
153
|
+
[icon]="Icons.SquareDashedMousePointer"
|
|
154
|
+
[size]="15"
|
|
155
|
+
iconClass="transition text-black dark:text-white opacity-40"
|
|
156
|
+
[ariaHidden]="true"
|
|
147
157
|
/>
|
|
148
158
|
}
|
|
149
159
|
|