@meistrari/tela-build 1.78.0 → 1.78.1
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/CHANGELOG.md +48 -0
- package/components/tela/confirmation-modal/confirmation-modal.vue +17 -19
- package/components/tela/modal/modal.mdx +298 -142
- package/components/tela/modal/modal.vue +209 -64
- package/components/tela/modal/switch-workspace/switch-workspace.vue +14 -41
- package/components/tela/preview/preview.mdx +8 -4
- package/components/tela/uploader/uploader-preview.vue +26 -26
- package/components/tela/uploader/uploader.mdx +29 -45
- package/css/animations.css +30 -0
- package/docs/interfaces.md +17 -39
- package/package.json +1 -1
package/css/animations.css
CHANGED
|
@@ -33,3 +33,33 @@
|
|
|
33
33
|
transform: scale(0.97);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
/*
|
|
38
|
+
* Backdrop fade for modal overlays (TelaModal). Pairs with `popover-enter-exit`
|
|
39
|
+
* on the dialog content, so both open and close on the same timing.
|
|
40
|
+
*/
|
|
41
|
+
.overlay-enter-exit[data-state='open'] {
|
|
42
|
+
animation: overlayFadeIn 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.overlay-enter-exit[data-state='closed'] {
|
|
46
|
+
animation: overlayFadeOut 0.16s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@keyframes overlayFadeIn {
|
|
50
|
+
from {
|
|
51
|
+
opacity: 0;
|
|
52
|
+
}
|
|
53
|
+
to {
|
|
54
|
+
opacity: 1;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes overlayFadeOut {
|
|
59
|
+
from {
|
|
60
|
+
opacity: 1;
|
|
61
|
+
}
|
|
62
|
+
to {
|
|
63
|
+
opacity: 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
package/docs/interfaces.md
CHANGED
|
@@ -289,51 +289,29 @@ Always use `TelaModal`. `TelaDialog` is deprecated — never use it.
|
|
|
289
289
|
```vue
|
|
290
290
|
<TelaModal
|
|
291
291
|
v-model="isOpen"
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
:is-close-icon="false"
|
|
292
|
+
size="md"
|
|
293
|
+
title="Dialog Title"
|
|
294
|
+
description="Dialog subtitle or description."
|
|
296
295
|
>
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
<!-- Close Button -->
|
|
306
|
-
<TelaIconButton
|
|
307
|
-
icon="i-ph-x"
|
|
308
|
-
size="md"
|
|
309
|
-
color="secondary"
|
|
310
|
-
outline-none
|
|
311
|
-
p-8px mt--12px mr--16px
|
|
312
|
-
@click="isOpen = false"
|
|
313
|
-
/>
|
|
314
|
-
</div>
|
|
315
|
-
|
|
316
|
-
<!-- Content -->
|
|
317
|
-
<div flex="~ col" gap-8px>
|
|
318
|
-
<!-- ... -->
|
|
319
|
-
</div>
|
|
320
|
-
|
|
321
|
-
<!-- Footer -->
|
|
322
|
-
<div flex gap-8px justify-end>
|
|
323
|
-
<TelaButton variant="secondary" @click="isOpen = false">Cancel</TelaButton>
|
|
324
|
-
<TelaButton>Submit</TelaButton>
|
|
325
|
-
</div>
|
|
326
|
-
</div>
|
|
296
|
+
<!-- Body -->
|
|
297
|
+
<TelaInput v-model="name" label="Name" w-full />
|
|
298
|
+
|
|
299
|
+
<!-- Footer -->
|
|
300
|
+
<template #footer="{ close }">
|
|
301
|
+
<TelaButton variant="secondary" @click="close">Cancel</TelaButton>
|
|
302
|
+
<TelaButton>Submit</TelaButton>
|
|
303
|
+
</template>
|
|
327
304
|
</TelaModal>
|
|
328
305
|
```
|
|
329
306
|
|
|
330
307
|
**Rules:**
|
|
331
308
|
|
|
332
|
-
-
|
|
333
|
-
- Always use
|
|
334
|
-
-
|
|
335
|
-
-
|
|
336
|
-
-
|
|
309
|
+
- Always pass `size` — `sm` (320px), `md` (480px) or `lg` (840px). Without it the legacy layout renders.
|
|
310
|
+
- Always use the `title` and `description` props (or slots) — never hand-build the header or close button
|
|
311
|
+
- Put footer buttons directly in the `footer` slot, secondary first, primary last
|
|
312
|
+
- Never pass `size="lg"`, `size="sm"` or a custom `class` to a `TelaButton` in the `footer` slot — footer buttons keep the default size and styling
|
|
313
|
+
- Use `prevent-close` while a request started from the modal is in flight
|
|
314
|
+
- Don't pass `compact`, `hide-dividers`, `is-close-icon-absolute`, `small-title` or `modal-width` — they only drive the legacy layout
|
|
337
315
|
|
|
338
316
|
**Width — all controls inside a modal must fill the modal:**
|
|
339
317
|
|