@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.
@@ -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
+ }
@@ -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
- modal-width="md"
293
- :compact="true"
294
- :hide-dividers="true"
295
- :is-close-icon="false"
292
+ size="md"
293
+ title="Dialog Title"
294
+ description="Dialog subtitle or description."
296
295
  >
297
- <div flex="~ col" w-full gap-16px>
298
- <!-- Header -->
299
- <div flex="~ row justify-between" items-start>
300
- <div flex="~ col" gap-4px>
301
- <h4 heading-h4-semibold text-primary>Dialog Title</h4>
302
- <p body-14-regular text-secondary>Dialog subtitle or description.</p>
303
- </div>
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
- - Never pass `title` to `TelaModal` — build the header yourself inside the slot
333
- - Always use `:compact="true"` and `:hide-dividers="true"`
334
- - Always use `:is-close-icon="false"` — build the close button manually
335
- - Close button negative margins = **half the modal padding** → `mt--{p/2} mr--{p/2}`
336
- - Footer: `flex justify-end gap-8px`
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.78.0",
3
+ "version": "1.78.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",