tailjng 0.1.7 → 0.1.9
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 +15 -1
- package/cli/settings/colors-config-utils.js +26 -3
- package/cli/templates/app.generator.js +6 -3
- package/package.json +1 -1
- package/src/colors.safelist.css +1 -1
- package/src/lib/components/.config/colors/README.md +2 -0
- package/src/lib/components/.config/colors/colors.safelist.css +1 -1
- package/src/lib/components/alert/alert-dialog/dialog-alert.component.css +0 -71
- package/src/lib/components/alert/alert-dialog/dialog-alert.component.html +7 -7
- package/src/lib/components/alert/alert-toast/toast-alert.component.css +0 -138
- package/src/lib/components/alert/alert-toast/toast-alert.component.html +12 -9
- package/src/lib/components/checkbox/checkbox-input/input-checkbox.component.css +0 -67
- package/src/lib/components/checkbox/checkbox-input/input-checkbox.component.html +11 -7
- package/src/lib/components/checkbox/checkbox-switch/switch-checkbox.component.css +3 -53
- package/src/lib/components/checkbox/checkbox-switch/switch-checkbox.component.html +17 -6
- package/src/lib/components/checkbox/checkbox-switch/switch-checkbox.component.ts +7 -0
- package/src/lib/components/coach-mark/coach-mark.component.html +2 -2
- package/src/lib/components/coach-mark/coach-mark.component.scss +1 -7
- package/src/lib/components/dialog/dialog.component.css +0 -102
- package/src/lib/components/dialog/dialog.component.html +17 -6
- package/src/lib/components/filter/filter-complete/complete-filter.component.html +5 -5
- package/src/lib/components/filter/filter-complete/complete-filter.component.scss +0 -10
- package/src/lib/components/form/form-sidebar/sidebar-form.component.css +23 -254
- package/src/lib/components/form/form-sidebar/sidebar-form.component.html +22 -10
- package/src/lib/components/form/form-sidebar/sidebar-form.component.ts +13 -8
- package/src/lib/components/input/input/input.component.css +0 -14
- package/src/lib/components/input/input/input.component.html +1 -1
- package/src/lib/components/input/input-file/file-input.component.ts +1 -1
- package/src/lib/components/label/label.component.ts +24 -0
- package/src/lib/components/menu/options-coach-menu/options-coach-menu.component.html +2 -2
- package/src/lib/components/menu/options-coach-menu/options-coach-menu.component.ts +2 -2
- package/src/lib/components/progress-bar/progress-bar.component.css +0 -11
- package/src/lib/components/progress-bar/progress-bar.component.html +3 -3
- package/src/lib/components/select/select-dropdown/dropdown-select.component.css +0 -6
- package/src/lib/components/select/select-dropdown/dropdown-select.component.html +3 -3
- package/src/lib/components/select/select-dropdown/dropdown-select.component.ts +1 -1
- package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.component.css +0 -6
- package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.component.html +3 -3
- package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.component.ts +1 -1
- package/src/lib/components/select/select-multi-table/multi-table-select.component.css +0 -6
- package/src/lib/components/select/select-multi-table/multi-table-select.component.html +2 -2
- package/src/lib/components/sidebar/sidebar-static/static-sidebar.component.css +5 -62
- package/src/lib/components/sidebar/sidebar-static/static-sidebar.component.html +16 -6
- package/src/lib/components/table/table-complete/complete-table.component.html +6 -6
- package/src/lib/components/table/table-crud-complete/complete-crud-table.component.html +14 -14
- package/src/lib/components/table/table-crud-complete/complete-crud-table.component.scss +0 -63
- package/src/lib/components/table/table-crud-complete/complete-crud-table.component.ts +2 -2
- package/src/lib/components/theme-generator/theme-generator.component.html +5 -10
- package/src/lib/components/toggle-radio/shared/toggle-options.util.ts +19 -1
- package/src/lib/components/toggle-radio/toggle-radio/toggle-radio.component.css +0 -113
- package/src/lib/components/toggle-radio/toggle-radio/toggle-radio.component.html +22 -9
- package/src/lib/components/toggle-radio/toggle-radio/toggle-radio.component.ts +3 -9
- package/src/lib/components/toggle-radio/toggle-segment/segment-toggle.component.css +0 -74
- package/src/lib/components/toggle-radio/toggle-segment/segment-toggle.component.html +14 -4
- package/src/lib/components/toggle-radio/toggle-segment/segment-toggle.component.ts +3 -9
- package/src/lib/components/viewer/viewer-image/image-viewer.component.css +0 -76
- package/src/lib/components/viewer/viewer-image/image-viewer.component.html +27 -10
- package/src/lib/components/viewer/viewer-pdf/pdf-viewer.component.css +0 -152
- package/src/lib/components/viewer/viewer-pdf/pdf-viewer.component.html +33 -12
package/README.md
CHANGED
|
@@ -151,7 +151,21 @@ Las variantes (`primary`, `success_soft`, …) las resuelve **`JColorsService`**
|
|
|
151
151
|
| `colors.config.ts` | Lista de variantes (incluye las 77 por defecto) + las tuyas (`brand`, etc.) |
|
|
152
152
|
| `colors.safelist.css` | Clases Tailwind que el build debe generar (`@apply`) |
|
|
153
153
|
|
|
154
|
-
**`init:app`** y **`sync:app`** crean esa carpeta (sin sobrescribir si ya existe), importan `colors.safelist.css` en
|
|
154
|
+
**`init:app`** y **`sync:app`** crean esa carpeta (sin sobrescribir si ya existe), importan `colors.safelist.css` en tus estilos globales y registran `tailjngColorsProvider`.
|
|
155
|
+
|
|
156
|
+
Import del safelist según el lenguaje de estilos del proyecto:
|
|
157
|
+
|
|
158
|
+
```css
|
|
159
|
+
/* styles.css */
|
|
160
|
+
@import "tailwindcss";
|
|
161
|
+
@import "./app/tailjng/.config/colors/colors.safelist.css";
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
```scss
|
|
165
|
+
/* styles.scss — todos los @use van antes de otras reglas */
|
|
166
|
+
@use "tailwindcss";
|
|
167
|
+
@use "./app/tailjng/.config/colors/colors.safelist.css";
|
|
168
|
+
```
|
|
155
169
|
|
|
156
170
|
Si falta la carpeta en un proyecto existente:
|
|
157
171
|
|
|
@@ -39,6 +39,14 @@ function migrateLegacyColorsPaths(content) {
|
|
|
39
39
|
.replaceAll('tailjng/colors/colors.safelist.css', COLORS_SAFELIST_SEGMENT);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
function isScssStyleEntry(styleEntry) {
|
|
43
|
+
return /\.(scss|sass)$/i.test(styleEntry);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function getSafelistDirective(styleEntry) {
|
|
47
|
+
return isScssStyleEntry(styleEntry) ? '@use' : '@import';
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
function getColorsSafelistImportLine(workspaceRoot, styleEntry, appProject) {
|
|
43
51
|
const appRoot = path.join(workspaceRoot, appProject.root || '');
|
|
44
52
|
const colorsSafelist = path.join(getProjectColorsDir(appRoot), 'colors.safelist.css');
|
|
@@ -58,7 +66,7 @@ function getColorsSafelistImportLine(workspaceRoot, styleEntry, appProject) {
|
|
|
58
66
|
|
|
59
67
|
let rel = path.relative(path.dirname(stylePath), targetSafelist).split(path.sep).join('/');
|
|
60
68
|
if (!rel.startsWith('.')) rel = `./${rel}`;
|
|
61
|
-
return
|
|
69
|
+
return `${getSafelistDirective(styleEntry)} "${rel}";`;
|
|
62
70
|
}
|
|
63
71
|
|
|
64
72
|
function ensureProjectColorsConfig(workspaceRoot, appRoot, overwrite = false) {
|
|
@@ -102,11 +110,26 @@ function ensureColorsSafelistImport(styleFilePath, importLine) {
|
|
|
102
110
|
return { changed: true, migrated: true };
|
|
103
111
|
}
|
|
104
112
|
|
|
113
|
+
const isScss = /\.(scss|sass)$/i.test(styleFilePath);
|
|
114
|
+
const expectedDirective = isScss ? '@use' : '@import';
|
|
105
115
|
const projectImport = new RegExp(COLORS_SAFELIST_SEGMENT.replace(/\./g, '\\.'));
|
|
106
116
|
const npmImport = /node_modules\/tailjng\/src\/colors\.safelist\.css/;
|
|
107
|
-
const anySafelistImport = /@import\s+"[^"]*colors\.safelist\.css";?/;
|
|
117
|
+
const anySafelistImport = /@(?:import|use)\s+"[^"]*colors\.safelist\.css";?/;
|
|
118
|
+
|
|
119
|
+
const wrongDirectivePattern = isScss
|
|
120
|
+
? /@import\s+"([^"]*colors\.safelist\.css)";?/
|
|
121
|
+
: /@use\s+"([^"]*colors\.safelist\.css)";?/;
|
|
122
|
+
|
|
123
|
+
if (wrongDirectivePattern.test(content)) {
|
|
124
|
+
content = content.replace(
|
|
125
|
+
wrongDirectivePattern,
|
|
126
|
+
(_, safelistPath) => `${expectedDirective} "${safelistPath}";`,
|
|
127
|
+
);
|
|
128
|
+
fs.writeFileSync(styleFilePath, content, 'utf8');
|
|
129
|
+
return { changed: true, migrated: true };
|
|
130
|
+
}
|
|
108
131
|
|
|
109
|
-
if (projectImport.test(content)) {
|
|
132
|
+
if (projectImport.test(content) && anySafelistImport.test(content)) {
|
|
110
133
|
return { changed: false };
|
|
111
134
|
}
|
|
112
135
|
|
|
@@ -70,16 +70,19 @@ ${buildDefaultThemeBlock()}
|
|
|
70
70
|
|
|
71
71
|
.dark {
|
|
72
72
|
--tw-bg-opacity: 1;
|
|
73
|
-
color: var(--
|
|
73
|
+
color: var(--color-dark-foreground);
|
|
74
74
|
}
|
|
75
75
|
`;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
function buildStylesScss(safelistImport = '') {
|
|
79
|
+
const safelistUse = safelistImport
|
|
80
|
+
? safelistImport.replace(/^@import\s+/, '@use ')
|
|
81
|
+
: '';
|
|
79
82
|
return `@use "tailwindcss";
|
|
80
|
-
${safelistImport ? `${safelistImport}\n` : ''}
|
|
81
83
|
@use "./scss/scroll";
|
|
82
84
|
@use "./scss/input";
|
|
85
|
+
${safelistUse ? `${safelistUse}\n` : ''}
|
|
83
86
|
|
|
84
87
|
html,
|
|
85
88
|
body {
|
|
@@ -104,7 +107,7 @@ ${buildDefaultThemeBlock()}
|
|
|
104
107
|
|
|
105
108
|
.dark {
|
|
106
109
|
--tw-bg-opacity: 1;
|
|
107
|
-
color: var(--
|
|
110
|
+
color: var(--color-dark-foreground);
|
|
108
111
|
}
|
|
109
112
|
`;
|
|
110
113
|
}
|
package/package.json
CHANGED
package/src/colors.safelist.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* AUTO-GENERATED — do not edit blocks 1-N. Run: node scripts/generate-colors-safelist.mjs */
|
|
2
|
-
/*
|
|
2
|
+
/* CSS: @import after @import "tailwindcss" · SCSS: @use after @use "tailwindcss". */
|
|
3
3
|
|
|
4
4
|
@layer utilities {
|
|
5
5
|
.__tailjng_colors_safelist_1__ {
|
|
@@ -9,6 +9,8 @@ Folder generated at `src/app/tailjng/.config/colors/` by `init:app`, `sync:app`,
|
|
|
9
9
|
| `colors.config.ts` | Variants (`primary`, `success_soft`, …) plus your own (`brand`, etc.) |
|
|
10
10
|
| `colors.safelist.css` | Tailwind classes the build must generate (`@apply`) |
|
|
11
11
|
|
|
12
|
+
Import in global styles after Tailwind: **`@import`** in `.css`, **`@use`** in `.scss`.
|
|
13
|
+
|
|
12
14
|
## Add a custom color
|
|
13
15
|
|
|
14
16
|
**1.** In `colors.config.ts`:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* AUTO-GENERATED — do not edit blocks 1-N. Run: node scripts/generate-colors-safelist.mjs */
|
|
2
|
-
/*
|
|
2
|
+
/* CSS: @import after @import "tailwindcss" · SCSS: @use after @use "tailwindcss". */
|
|
3
3
|
|
|
4
4
|
@layer utilities {
|
|
5
5
|
.__tailjng_colors_safelist_1__ {
|
|
@@ -2,29 +2,10 @@
|
|
|
2
2
|
display: contents;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.j-alert-dialog {
|
|
6
|
-
position: fixed;
|
|
7
|
-
inset: 0;
|
|
8
|
-
z-index: 999999;
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
padding: 1rem;
|
|
13
|
-
background-color: rgb(0 0 0 / 0.45);
|
|
14
|
-
backdrop-filter: blur(2px);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
5
|
.j-alert-dialog-card {
|
|
18
|
-
position: relative;
|
|
19
|
-
width: 100%;
|
|
20
|
-
max-width: 28rem;
|
|
21
|
-
min-height: 5.5rem;
|
|
22
|
-
overflow: hidden;
|
|
23
6
|
border: 1px solid color-mix(in srgb, var(--color-border) 65%, transparent);
|
|
24
|
-
border-radius: 0.75rem;
|
|
25
7
|
background-color: color-mix(in srgb, var(--color-background) 92%, transparent);
|
|
26
8
|
box-shadow: 0 20px 48px rgb(0 0 0 / 0.14);
|
|
27
|
-
backdrop-filter: blur(16px);
|
|
28
9
|
}
|
|
29
10
|
|
|
30
11
|
:host-context(.dark) .j-alert-dialog-card,
|
|
@@ -196,64 +177,12 @@
|
|
|
196
177
|
}
|
|
197
178
|
}
|
|
198
179
|
|
|
199
|
-
.j-alert-dialog-body {
|
|
200
|
-
position: relative;
|
|
201
|
-
z-index: 10;
|
|
202
|
-
padding: 1rem 1rem 1rem 1.25rem;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.j-alert-dialog-body--with-actions {
|
|
206
|
-
padding-bottom: 0.5rem;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.j-alert-dialog-title {
|
|
210
|
-
margin: 0;
|
|
211
|
-
font-size: 0.875rem;
|
|
212
|
-
font-weight: 600;
|
|
213
|
-
line-height: 1.3;
|
|
214
|
-
letter-spacing: -0.01em;
|
|
215
|
-
color: var(--color-foreground);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
:host-context(.dark) .j-alert-dialog-title,
|
|
219
|
-
:host-context(html.dark) .j-alert-dialog-title {
|
|
220
|
-
color: var(--color-dark-foreground);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.j-alert-dialog-description {
|
|
224
|
-
margin: 0.375rem 0 0;
|
|
225
|
-
font-size: 0.75rem;
|
|
226
|
-
line-height: 1.55;
|
|
227
|
-
color: var(--color-muted-foreground);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
180
|
.j-alert-dialog-description :is(b, strong) {
|
|
231
181
|
font-weight: 600;
|
|
232
182
|
color: var(--color-foreground);
|
|
233
183
|
}
|
|
234
184
|
|
|
235
|
-
:host-context(.dark) .j-alert-dialog-description,
|
|
236
|
-
:host-context(html.dark) .j-alert-dialog-description {
|
|
237
|
-
color: var(--color-dark-muted-foreground);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
185
|
:host-context(.dark) .j-alert-dialog-description :is(b, strong),
|
|
241
186
|
:host-context(html.dark) .j-alert-dialog-description :is(b, strong) {
|
|
242
187
|
color: var(--color-dark-foreground);
|
|
243
188
|
}
|
|
244
|
-
|
|
245
|
-
.j-alert-dialog-actions {
|
|
246
|
-
position: relative;
|
|
247
|
-
z-index: 10;
|
|
248
|
-
display: flex;
|
|
249
|
-
flex-wrap: wrap;
|
|
250
|
-
justify-content: flex-end;
|
|
251
|
-
gap: 0.375rem;
|
|
252
|
-
padding: 0 1rem 1rem 1.25rem;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
@media (max-width: 450px) {
|
|
256
|
-
.j-alert-dialog-card {
|
|
257
|
-
max-width: 100%;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
@for (dialog of dialogs(); track dialog.config.title) {
|
|
2
2
|
<div
|
|
3
|
-
class="
|
|
3
|
+
class="fixed inset-0 z-[999999] flex items-center justify-center p-4 bg-black/45 backdrop-blur-[2px]"
|
|
4
4
|
role="dialog"
|
|
5
5
|
aria-modal="true"
|
|
6
6
|
[attr.aria-label]="dialog.config.title"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
9
|
@modalTransition
|
|
10
|
-
class="j-alert-dialog-card"
|
|
10
|
+
class="j-alert-dialog-card relative w-full max-w-md min-h-[5.5rem] overflow-hidden rounded-xl backdrop-blur-[16px] max-[450px]:max-w-full"
|
|
11
11
|
[ngClass]="cardClasses(dialog.config.type)"
|
|
12
12
|
>
|
|
13
13
|
<div [ngClass]="accentClasses(dialog.config.type)"></div>
|
|
@@ -31,21 +31,21 @@
|
|
|
31
31
|
</div>
|
|
32
32
|
|
|
33
33
|
<div
|
|
34
|
-
class="
|
|
35
|
-
[class.
|
|
34
|
+
class="relative z-10 p-4 pl-5"
|
|
35
|
+
[class.pb-2]="hasActions(dialog)"
|
|
36
36
|
>
|
|
37
|
-
<h3 class="
|
|
37
|
+
<h3 class="m-0 text-sm font-semibold leading-[1.3] tracking-[-0.01em] text-foreground dark:text-dark-foreground">{{ dialog.config.title }}</h3>
|
|
38
38
|
|
|
39
39
|
@if (dialog.config.description) {
|
|
40
40
|
<p
|
|
41
|
-
class="j-alert-dialog-description"
|
|
41
|
+
class="j-alert-dialog-description mt-1.5 mb-0 text-xs leading-[1.55] text-muted-foreground dark:text-dark-muted-foreground"
|
|
42
42
|
[innerHTML]="dialog.config.description"
|
|
43
43
|
></p>
|
|
44
44
|
}
|
|
45
45
|
</div>
|
|
46
46
|
|
|
47
47
|
@if (hasActions(dialog)) {
|
|
48
|
-
<div class="
|
|
48
|
+
<div class="relative z-10 flex flex-wrap justify-end gap-1.5 py-0 pr-4 pb-4 pl-5">
|
|
49
49
|
@if (showRetryButton(dialog.config)) {
|
|
50
50
|
<JButton
|
|
51
51
|
size="sm"
|
|
@@ -74,12 +74,6 @@
|
|
|
74
74
|
overflow-y 0s linear 0.32s;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.j-alert-toast-scroll-shell {
|
|
78
|
-
position: relative;
|
|
79
|
-
width: 100%;
|
|
80
|
-
transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
77
|
.j-alert-toast-scroll-shell--expanded {
|
|
84
78
|
max-height: min(70vh, 28rem);
|
|
85
79
|
}
|
|
@@ -210,32 +204,6 @@
|
|
|
210
204
|
opacity 0.24s ease;
|
|
211
205
|
}
|
|
212
206
|
|
|
213
|
-
.j-alert-toast-stack-hint {
|
|
214
|
-
position: absolute;
|
|
215
|
-
top: -0.35rem;
|
|
216
|
-
right: -0.35rem;
|
|
217
|
-
z-index: 50;
|
|
218
|
-
display: inline-flex;
|
|
219
|
-
align-items: center;
|
|
220
|
-
justify-content: center;
|
|
221
|
-
min-width: 1.25rem;
|
|
222
|
-
height: 1.25rem;
|
|
223
|
-
padding: 0 0.3rem;
|
|
224
|
-
border-radius: 999px;
|
|
225
|
-
background-color: var(--color-primary);
|
|
226
|
-
color: var(--color-primary-foreground, #fff);
|
|
227
|
-
font-size: 0.625rem;
|
|
228
|
-
font-weight: 700;
|
|
229
|
-
line-height: 1;
|
|
230
|
-
box-shadow: 0 2px 8px rgb(0 0 0 / 0.18);
|
|
231
|
-
pointer-events: none;
|
|
232
|
-
opacity: 0;
|
|
233
|
-
transform: scale(0.85);
|
|
234
|
-
transition:
|
|
235
|
-
opacity 0.2s ease,
|
|
236
|
-
transform 0.2s ease;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
207
|
.j-alert-toast-stack--bottom-left .j-alert-toast-stack-hint,
|
|
240
208
|
.j-alert-toast-stack--top-left .j-alert-toast-stack-hint {
|
|
241
209
|
right: auto;
|
|
@@ -273,17 +241,9 @@
|
|
|
273
241
|
}
|
|
274
242
|
|
|
275
243
|
.j-alert-toast-card {
|
|
276
|
-
position: relative;
|
|
277
|
-
width: 100%;
|
|
278
|
-
min-height: 4.5rem;
|
|
279
|
-
margin-left: auto;
|
|
280
|
-
overflow: hidden;
|
|
281
244
|
border: 1px solid color-mix(in srgb, var(--color-border) 65%, transparent);
|
|
282
|
-
border-radius: 0.75rem;
|
|
283
245
|
background-color: color-mix(in srgb, var(--color-background) 92%, transparent);
|
|
284
246
|
box-shadow: 0 12px 32px rgb(0 0 0 / 0.1);
|
|
285
|
-
backdrop-filter: blur(16px);
|
|
286
|
-
pointer-events: auto;
|
|
287
247
|
}
|
|
288
248
|
|
|
289
249
|
:host-context(.dark) .j-alert-toast-card,
|
|
@@ -485,116 +445,21 @@
|
|
|
485
445
|
padding-bottom: calc(0.5rem + var(--j-toast-timeline-height));
|
|
486
446
|
}
|
|
487
447
|
|
|
488
|
-
.j-alert-toast-title {
|
|
489
|
-
margin: 0;
|
|
490
|
-
font-size: 0.875rem;
|
|
491
|
-
font-weight: 600;
|
|
492
|
-
line-height: 1.3;
|
|
493
|
-
letter-spacing: -0.01em;
|
|
494
|
-
color: var(--color-foreground);
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
:host-context(.dark) .j-alert-toast-title,
|
|
498
|
-
:host-context(html.dark) .j-alert-toast-title {
|
|
499
|
-
color: var(--color-dark-foreground);
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
.j-alert-toast-description {
|
|
503
|
-
margin: 0.25rem 0 0;
|
|
504
|
-
font-size: 0.75rem;
|
|
505
|
-
line-height: 1.55;
|
|
506
|
-
color: var(--color-muted-foreground);
|
|
507
|
-
}
|
|
508
|
-
|
|
509
448
|
.j-alert-toast-description :is(b, strong) {
|
|
510
449
|
font-weight: 600;
|
|
511
450
|
color: var(--color-foreground);
|
|
512
451
|
}
|
|
513
452
|
|
|
514
|
-
:host-context(.dark) .j-alert-toast-description,
|
|
515
|
-
:host-context(html.dark) .j-alert-toast-description {
|
|
516
|
-
color: var(--color-dark-muted-foreground);
|
|
517
|
-
}
|
|
518
|
-
|
|
519
453
|
:host-context(.dark) .j-alert-toast-description :is(b, strong),
|
|
520
454
|
:host-context(html.dark) .j-alert-toast-description :is(b, strong) {
|
|
521
455
|
color: var(--color-dark-foreground);
|
|
522
456
|
}
|
|
523
457
|
|
|
524
|
-
.j-alert-toast-close {
|
|
525
|
-
position: absolute;
|
|
526
|
-
top: 0.625rem;
|
|
527
|
-
right: 0.625rem;
|
|
528
|
-
z-index: 20;
|
|
529
|
-
display: inline-flex;
|
|
530
|
-
align-items: center;
|
|
531
|
-
justify-content: center;
|
|
532
|
-
width: 1.75rem;
|
|
533
|
-
height: 1.75rem;
|
|
534
|
-
margin: 0;
|
|
535
|
-
padding: 0;
|
|
536
|
-
border: 0;
|
|
537
|
-
border-radius: 0.5rem;
|
|
538
|
-
background-color: transparent;
|
|
539
|
-
color: var(--color-muted-foreground);
|
|
540
|
-
line-height: 0;
|
|
541
|
-
cursor: pointer;
|
|
542
|
-
transition:
|
|
543
|
-
color 0.15s ease,
|
|
544
|
-
background-color 0.15s ease,
|
|
545
|
-
transform 0.15s ease;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
.j-alert-toast-close:hover {
|
|
549
|
-
color: var(--color-foreground);
|
|
550
|
-
background-color: color-mix(in srgb, var(--color-muted) 45%, transparent);
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
.j-alert-toast-close:active {
|
|
554
|
-
transform: scale(0.94);
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
.j-alert-toast-close:focus-visible {
|
|
558
|
-
outline: 2px solid var(--color-ring);
|
|
559
|
-
outline-offset: 2px;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
:host-context(.dark) .j-alert-toast-close,
|
|
563
|
-
:host-context(html.dark) .j-alert-toast-close {
|
|
564
|
-
color: var(--color-dark-muted-foreground);
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
:host-context(.dark) .j-alert-toast-close:hover,
|
|
568
|
-
:host-context(html.dark) .j-alert-toast-close:hover {
|
|
569
|
-
color: var(--color-dark-foreground);
|
|
570
|
-
background-color: color-mix(in srgb, var(--color-dark-muted) 45%, transparent);
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
.j-alert-toast-actions {
|
|
574
|
-
position: relative;
|
|
575
|
-
z-index: 10;
|
|
576
|
-
display: flex;
|
|
577
|
-
flex-wrap: wrap;
|
|
578
|
-
justify-content: flex-end;
|
|
579
|
-
gap: 0.375rem;
|
|
580
|
-
padding: 0 1rem 0.875rem 1.25rem;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
458
|
.j-alert-toast-actions--with-timeline {
|
|
584
459
|
padding-bottom: calc(0.875rem + var(--j-toast-timeline-height));
|
|
585
460
|
}
|
|
586
461
|
|
|
587
462
|
.j-alert-toast-timeline {
|
|
588
|
-
position: absolute;
|
|
589
|
-
left: 0;
|
|
590
|
-
right: 0;
|
|
591
|
-
bottom: 0;
|
|
592
|
-
z-index: 30;
|
|
593
|
-
height: var(--j-toast-timeline-height);
|
|
594
|
-
margin: 0;
|
|
595
|
-
overflow: hidden;
|
|
596
|
-
border-bottom-left-radius: inherit;
|
|
597
|
-
border-bottom-right-radius: inherit;
|
|
598
463
|
background-color: color-mix(in srgb, var(--color-muted) 35%, transparent);
|
|
599
464
|
}
|
|
600
465
|
|
|
@@ -604,9 +469,6 @@
|
|
|
604
469
|
}
|
|
605
470
|
|
|
606
471
|
.j-alert-toast-progress {
|
|
607
|
-
width: 100%;
|
|
608
|
-
height: 100%;
|
|
609
|
-
transform-origin: left center;
|
|
610
472
|
animation-name: j-alert-toast-progress-shrink;
|
|
611
473
|
animation-timing-function: linear;
|
|
612
474
|
animation-fill-mode: forwards;
|
|
@@ -5,13 +5,16 @@
|
|
|
5
5
|
(mouseleave)="onStackLeave()"
|
|
6
6
|
>
|
|
7
7
|
@if (stackable && toasts().length > 1 && !expanded) {
|
|
8
|
-
<span
|
|
8
|
+
<span
|
|
9
|
+
class="j-alert-toast-stack-hint absolute -top-[0.35rem] -right-[0.35rem] z-50 inline-flex items-center justify-center min-w-5 h-5 px-[0.3rem] rounded-full bg-primary text-primary-foreground text-[0.625rem] font-bold leading-none shadow-[0_2px_8px_rgb(0_0_0/0.18)] pointer-events-none opacity-0 scale-[0.85] transition-[opacity,transform] duration-200 ease-in-out"
|
|
10
|
+
aria-hidden="true"
|
|
11
|
+
>
|
|
9
12
|
{{ toasts().length }}
|
|
10
13
|
</span>
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
<div
|
|
14
|
-
class="j-alert-toast-scroll-shell"
|
|
17
|
+
class="j-alert-toast-scroll-shell relative w-full transition-[max-height] duration-[320ms] ease-[cubic-bezier(0.16,1,0.3,1)]"
|
|
15
18
|
[class.j-alert-toast-scroll-shell--expanded]="stackable && toasts().length > 1 && expanded"
|
|
16
19
|
>
|
|
17
20
|
<div
|
|
@@ -24,7 +27,7 @@
|
|
|
24
27
|
@for (toast of displayToasts(); track toast.id) {
|
|
25
28
|
<div
|
|
26
29
|
@toastTransition
|
|
27
|
-
class="j-alert-toast-card"
|
|
30
|
+
class="j-alert-toast-card relative w-full min-h-[4.5rem] ml-auto overflow-hidden rounded-xl backdrop-blur-[16px] pointer-events-auto"
|
|
28
31
|
[ngClass]="cardClasses(toast.config.type, toastIndex(toast), toasts().length)"
|
|
29
32
|
[ngStyle]="cardAnchorStyle(toastIndex(toast), toasts().length)"
|
|
30
33
|
[style.z-index]="cardZIndex(toastIndex(toast), toasts().length)"
|
|
@@ -52,11 +55,11 @@
|
|
|
52
55
|
</div>
|
|
53
56
|
|
|
54
57
|
<div [ngClass]="bodyClasses(toast)">
|
|
55
|
-
<h3 class="
|
|
58
|
+
<h3 class="m-0 text-sm font-semibold leading-[1.3] tracking-[-0.01em] text-foreground dark:text-dark-foreground">{{ toast.config.title }}</h3>
|
|
56
59
|
|
|
57
60
|
@if (toast.config.description) {
|
|
58
61
|
<p
|
|
59
|
-
class="j-alert-toast-description"
|
|
62
|
+
class="j-alert-toast-description mt-1 mb-0 text-xs leading-[1.55] text-muted-foreground dark:text-dark-muted-foreground"
|
|
60
63
|
[innerHTML]="toast.config.description"
|
|
61
64
|
></p>
|
|
62
65
|
}
|
|
@@ -64,7 +67,7 @@
|
|
|
64
67
|
@if (toast.btnClose) {
|
|
65
68
|
<button
|
|
66
69
|
type="button"
|
|
67
|
-
class="
|
|
70
|
+
class="absolute top-2.5 right-2.5 z-20 inline-flex items-center justify-center w-7 h-7 m-0 p-0 border-0 rounded-lg bg-transparent text-muted-foreground dark:text-dark-muted-foreground leading-none cursor-pointer transition-[color,background-color,transform] duration-150 ease-in-out hover:text-foreground hover:bg-muted/45 dark:hover:text-dark-foreground dark:hover:bg-dark-muted/45 active:scale-[0.94] focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-2"
|
|
68
71
|
aria-label="Cerrar notificación"
|
|
69
72
|
(click)="closeToast(toast.id)"
|
|
70
73
|
>
|
|
@@ -75,7 +78,7 @@
|
|
|
75
78
|
|
|
76
79
|
@if (hasActions(toast)) {
|
|
77
80
|
<div
|
|
78
|
-
class="j-alert-toast-actions"
|
|
81
|
+
class="j-alert-toast-actions relative z-10 flex flex-wrap justify-end gap-1.5 py-0 pr-4 pb-3.5 pl-5"
|
|
79
82
|
[class.j-alert-toast-actions--with-timeline]="hasAutoClose(toast)"
|
|
80
83
|
>
|
|
81
84
|
@if (toast.config.type !== 'success' && toast.onCancelCallback) {
|
|
@@ -105,9 +108,9 @@
|
|
|
105
108
|
}
|
|
106
109
|
|
|
107
110
|
@if (hasAutoClose(toast)) {
|
|
108
|
-
<div class="j-alert-toast-timeline">
|
|
111
|
+
<div class="j-alert-toast-timeline absolute inset-x-0 bottom-0 z-30 h-[var(--j-toast-timeline-height)] m-0 overflow-hidden rounded-b-[inherit]">
|
|
109
112
|
<div
|
|
110
|
-
class="j-alert-toast-progress"
|
|
113
|
+
class="j-alert-toast-progress w-full h-full origin-left"
|
|
111
114
|
[ngClass]="progressClasses(toast.config.type)"
|
|
112
115
|
[ngStyle]="progressStyle(toast)"
|
|
113
116
|
></div>
|
|
@@ -1,63 +1,8 @@
|
|
|
1
|
-
.j-checkbox-root {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.j-checkbox-label {
|
|
9
|
-
display: inline-flex;
|
|
10
|
-
gap: 0.5rem;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
user-select: none;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.j-checkbox-control {
|
|
16
|
-
position: relative;
|
|
17
|
-
display: inline-flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.j-checkbox-input {
|
|
23
|
-
position: absolute;
|
|
24
|
-
inset: 0;
|
|
25
|
-
z-index: 1;
|
|
26
|
-
margin: 0;
|
|
27
|
-
opacity: 0;
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.j-checkbox-input:disabled {
|
|
32
|
-
cursor: not-allowed;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
1
|
.j-checkbox-input:focus-visible + .j-checkbox-box {
|
|
36
2
|
outline: 2px solid var(--color-ring);
|
|
37
3
|
outline-offset: 2px;
|
|
38
4
|
}
|
|
39
5
|
|
|
40
|
-
.j-checkbox-box {
|
|
41
|
-
display: inline-flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
width: 1.375rem;
|
|
45
|
-
height: 1.375rem;
|
|
46
|
-
border: 1.5px solid var(--color-border);
|
|
47
|
-
border-radius: 0.375rem;
|
|
48
|
-
background-color: var(--color-background);
|
|
49
|
-
transition:
|
|
50
|
-
background-color 0.15s ease,
|
|
51
|
-
border-color 0.15s ease,
|
|
52
|
-
box-shadow 0.15s ease;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
:host-context(.dark) .j-checkbox-box,
|
|
56
|
-
:host-context(html.dark) .j-checkbox-box {
|
|
57
|
-
border-color: var(--color-dark-border);
|
|
58
|
-
background-color: var(--color-dark-background);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
6
|
.j-checkbox-box--checked {
|
|
62
7
|
border-color: var(--color-primary);
|
|
63
8
|
background-color: var(--color-primary);
|
|
@@ -76,18 +21,6 @@
|
|
|
76
21
|
cursor: not-allowed;
|
|
77
22
|
}
|
|
78
23
|
|
|
79
|
-
.j-checkbox-title {
|
|
80
|
-
font-size: 0.75rem;
|
|
81
|
-
line-height: 1.25;
|
|
82
|
-
color: var(--color-foreground);
|
|
83
|
-
opacity: 0.85;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
:host-context(.dark) .j-checkbox-title,
|
|
87
|
-
:host-context(html.dark) .j-checkbox-title {
|
|
88
|
-
color: var(--color-dark-foreground);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
24
|
.j-checkbox-title--disabled {
|
|
92
25
|
opacity: 0.45;
|
|
93
26
|
}
|
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
<div
|
|
2
|
-
class="
|
|
2
|
+
class="inline-flex flex-col items-center justify-center"
|
|
3
3
|
[jTooltip]="tooltip"
|
|
4
4
|
[jTooltipPosition]="tooltipPosition"
|
|
5
5
|
>
|
|
6
|
-
<label class="j-checkbox-label" [ngClass]="layoutClasses">
|
|
6
|
+
<label class="j-checkbox-label inline-flex gap-2 cursor-pointer select-none" [ngClass]="layoutClasses">
|
|
7
7
|
@if (showTitleBefore) {
|
|
8
8
|
<span
|
|
9
|
-
class="j-checkbox-title"
|
|
10
9
|
[ngClass]="titleClasses"
|
|
10
|
+
class="text-xs leading-tight text-foreground/85 dark:text-dark-foreground"
|
|
11
11
|
[style.font-size]="titleSize"
|
|
12
12
|
>
|
|
13
13
|
{{ title }}
|
|
14
14
|
</span>
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
<span class="
|
|
17
|
+
<span class="relative inline-flex items-center justify-center" [class]="classes">
|
|
18
18
|
<input
|
|
19
19
|
type="checkbox"
|
|
20
|
-
class="j-checkbox-input"
|
|
20
|
+
class="j-checkbox-input absolute inset-0 z-[1] m-0 opacity-0 cursor-pointer disabled:cursor-not-allowed"
|
|
21
21
|
[checked]="checked"
|
|
22
22
|
[disabled]="isDisabled"
|
|
23
23
|
(change)="onCheckboxChangeHandler($event)"
|
|
24
24
|
/>
|
|
25
25
|
|
|
26
|
-
<span
|
|
26
|
+
<span
|
|
27
|
+
[ngClass]="boxClasses"
|
|
28
|
+
class="inline-flex items-center justify-center w-[1.375rem] h-[1.375rem] border-[1.5px] border-border dark:border-dark-border rounded-md bg-background dark:bg-dark-background transition-[background-color,border-color,box-shadow] duration-150 ease-in-out"
|
|
29
|
+
aria-hidden="true"
|
|
30
|
+
>
|
|
27
31
|
@if (isLoading) {
|
|
28
32
|
<JIcon
|
|
29
33
|
[icon]="Icons.Loader2"
|
|
@@ -49,8 +53,8 @@
|
|
|
49
53
|
|
|
50
54
|
@if (showTitleAfter) {
|
|
51
55
|
<span
|
|
52
|
-
class="j-checkbox-title"
|
|
53
56
|
[ngClass]="titleClasses"
|
|
57
|
+
class="text-xs leading-tight text-foreground/85 dark:text-dark-foreground"
|
|
54
58
|
[style.font-size]="titleSize"
|
|
55
59
|
>
|
|
56
60
|
{{ title }}
|