@meistrari/tela-build 1.107.0 → 2.0.0

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 (68) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/components/tela/avatar/avatar-fallback.vue +28 -0
  3. package/components/tela/avatar/avatar.mdx +12 -0
  4. package/components/tela/avatar/avatar.vue +4 -2
  5. package/components/tela/button/button.mdx +1 -1
  6. package/components/tela/card/card.mdx +15 -11
  7. package/components/tela/dropdown-menu/dropdown-menu.mdx +1 -1
  8. package/components/tela/file-upload/file-upload.mdx +1 -2
  9. package/components/tela/filter/filter-content.vue +27 -3
  10. package/components/tela/filter/filter-trigger.vue +6 -6
  11. package/components/tela/filter/filter.mdx +31 -4
  12. package/components/tela/filter/filter.vue +4 -0
  13. package/components/tela/modal/modal.mdx +8 -5
  14. package/components/tela/popover/popover.mdx +9 -3
  15. package/components/tela/side-sheet/side-sheet.mdx +4 -2
  16. package/components/tela/sidebar/sidebar-logo.vue +1 -3
  17. package/components/tela/sidebar/sidebar.mdx +3 -3
  18. package/docs/animations.md +58 -120
  19. package/docs/design-review.md +79 -0
  20. package/docs/index.md +258 -0
  21. package/docs/sounds.md +1 -1
  22. package/docs/spacing-and-surfaces.md +116 -0
  23. package/docs/tokens.md +64 -73
  24. package/docs/typography.md +63 -53
  25. package/lib/__tests__/doc-generator.test.ts +86 -6
  26. package/lib/doc-generator.ts +160 -72
  27. package/lib/extractors/volar-extract.ts +12 -1
  28. package/lib/tela-build-skill.ts +46 -1
  29. package/package.json +1 -1
  30. package/components/tela/collapsible-section/collapsible-section.mdx +0 -180
  31. package/components/tela/collapsible-section/collapsible-section.vue +0 -51
  32. package/components/tela/collapsible-section-with-actions.vue +0 -60
  33. package/components/tela/confirm-button/confirm-button.vue +0 -141
  34. package/components/tela/date-range-picker.vue +0 -223
  35. package/components/tela/dialog/dialog.mdx +0 -170
  36. package/components/tela/dialog/dialog.vue +0 -186
  37. package/components/tela/expandable-input.vue +0 -96
  38. package/components/tela/filter/filter-content.test.ts +0 -60
  39. package/components/tela/filters/checkbox-filter.vue +0 -165
  40. package/components/tela/filters/date-filter.vue +0 -209
  41. package/components/tela/filters/user-filter.vue +0 -271
  42. package/components/tela/initials.vue +0 -33
  43. package/components/tela/inline-input.vue +0 -77
  44. package/components/tela/live-label.vue +0 -48
  45. package/components/tela/long-press-button.vue +0 -98
  46. package/components/tela/multiple-select/multiple-select.mdx +0 -310
  47. package/components/tela/multiple-select/multiple-select.vue +0 -652
  48. package/components/tela/pane.vue +0 -118
  49. package/components/tela/popover-list/popover-list-nested.vue +0 -108
  50. package/components/tela/popover-list/popover-list.vue +0 -193
  51. package/components/tela/selector/selector.vue +0 -47
  52. package/components/tela/sheet/sheet-close.vue +0 -12
  53. package/components/tela/sheet/sheet-content.vue +0 -61
  54. package/components/tela/sheet/sheet-description.vue +0 -23
  55. package/components/tela/sheet/sheet-footer.vue +0 -18
  56. package/components/tela/sheet/sheet-header.vue +0 -15
  57. package/components/tela/sheet/sheet-root.vue +0 -18
  58. package/components/tela/sheet/sheet-title.vue +0 -23
  59. package/components/tela/sheet/sheet-trigger.vue +0 -12
  60. package/components/tela/sheet/sheet.client.vue +0 -154
  61. package/components/tela/sheet/sheet.mdx +0 -176
  62. package/components/tela/sheet/variants.ts +0 -22
  63. package/components/tela/skeleton-icon.vue +0 -24
  64. package/components/tela/span.vue +0 -24
  65. package/components/tela/variable-input.vue +0 -104
  66. package/components/tela/wide-button/wide-button.vue +0 -40
  67. package/docs/interfaces.md +0 -467
  68. package/docs/surfaces.md +0 -127
package/CHANGELOG.md CHANGED
@@ -14,6 +14,23 @@ Latest updates and announcements.
14
14
 
15
15
  ## November 17, 2026
16
16
 
17
+ - **Breaking (2.0.0):** removed 20 outdated components, so an app that still renders one of them gets an unresolved tag after upgrading to 2.0.0. Apps on a `^1.x` range stay on 1.x until they bump. Each has a replacement:
18
+ - `TelaDialog`: [Modal](/components/modal). For a yes-or-no question, use `TelaConfirmationModal`, which stays.
19
+ - `TelaSheet` and its parts (`TelaSheetRoot`, `TelaSheetContent`, `TelaSheetHeader`, `TelaSheetFooter`, `TelaSheetTitle`, `TelaSheetDescription`, `TelaSheetTrigger`, `TelaSheetClose`): [Side Sheet](/components/side-sheet) for a panel on the side, or [Modal](/components/modal) for content that needs the whole screen.
20
+ - `TelaCollapsibleSection` and `TelaCollapsibleSectionWithActions`: [Collapsible](/components/collapsible).
21
+ - `TelaMultipleSelect` and `TelaPopoverList`: [Dropdown Menu](/components/dropdown-menu) with `TelaDropdownMenuCheckboxItem`.
22
+ - `TelaInitials`: [Avatar](/components/avatar), which renders the initial of `alt` with the new `TelaAvatarFallback`. Override it through the avatar's `fallback` slot.
23
+ - `TelaFiltersCheckboxFilter`, `TelaFiltersDateFilter`, `TelaFiltersUserFilter` and `TelaDateRangePicker`: [Filter](/components/filter), with [Range Calendar](/components/range-calendar) in a filter's `#footer-{key}` slot for a custom date range.
24
+ - `TelaConfirmButton`, `TelaWideButton` and `TelaLongPressButton`: [Button](/components/button).
25
+ - `TelaInlineInput`, `TelaExpandableInput` and `TelaVariableInput`: [Input](/components/input) and [Textarea](/components/textarea).
26
+ - `TelaLiveLabel`: [Status](/components/status).
27
+ - `TelaSkeletonIcon`: [Skeleton](/components/skeleton).
28
+ - `TelaSpan`, `TelaPane` and `TelaSelector`: plain markup with the design tokens.
29
+ - [Filter](/components/filter#apply-button) The `header-{key}` and `footer-{key}` slots receive `close`, and `TelaFilter` emits `openChange` with the open filter's key (or `null` when it closes). Together they let a filter apply its selection from an Apply button instead of on every click.
30
+ - [Filter](/components/filter) The popover animates its size only when it opens or moves to another filter. Inside one filter its height follows the content in the same frame, so content that animates itself (a calendar revealed in a `TelaCollapsible`) no longer leaves the content and the popover out of step, and a list filtered by a search no longer animates on each keystroke.
31
+ - [Filter](/components/filter) Home and End in a search input inside a filter's header move the caret again, instead of jumping focus to the first or last option.
32
+ - [Filter](/components/filter#scrollable-options) A long option list still scrolls, but its scrollbar is now transparent.
33
+ - [Filter](/components/filter) The selected-count badge on a trigger is 12px tall and centered with the label. It was 20px: its 8px digit lost the badge's own line height and took the label's 18px. The digit now uses the badge's 9px text.
17
34
  - [Onboarding Card](/components/onboarding-card) is a new component for short, step-by-step feature introductions: a 280px card with an illustration from the `#thumb` slot, a title and a description per step, step dots that double as navigation, and "Skip" with a next arrow, or "Got it" on the last step. The current step is bound with `v-model:step`, and `skip` and `finish` leave dismissing to the host. All copy comes from `steps` and `labels`. The card has no entrance of its own, so the host animates it in (the docs show a `Motion` with `as-child`), and each step advances by itself after `duration` (default 5000ms, `0` turns it off) while the current dot fills like a progress bar. Hovering or keyboard focus pauses it, and the last step waits for the user. Between steps the illustration fades out and the next one remounts, so `#thumb` content can play its own entrance. Going to the last step, "Skip" fades out and the arrow widens into the finish button. Under `prefers-reduced-motion`, only the progress fill still moves.
18
35
  - [Chat → Model Selector](/templates/chat#model-selector) When `reasoning-options` changes and no longer includes the selected level, `v-model:reasoning` is cleared, so the menu and the parent agree.
19
36
  - [Combobox](/components/combobox) Table layout matches the design specs: group headings and the Cost / Input / Output headers are 10px semibold, provider icons are 15px inside their 20px box, and token limits are 11px uppercase on every row, in primary text on the selected and highlighted rows. The trigger drops the `Claude ` prefix (`Claude Opus 5` reads `Opus 5`).
@@ -0,0 +1,28 @@
1
+ <script setup lang="ts">
2
+ import type { AvatarSize } from './avatar.vue'
3
+
4
+ const props = defineProps<{
5
+ /** The word whose first letter is shown, usually the person's or workspace's name. */
6
+ word: string
7
+ size?: AvatarSize
8
+ class?: string
9
+ }>()
10
+
11
+ const initial = computed(() => props.word.charAt(0).toUpperCase())
12
+
13
+ const textSizes: Record<AvatarSize | 'default', string> = {
14
+ '2xs': 'text-11px',
15
+ 'xs': 'text-12px',
16
+ 'sm': 'text-16px',
17
+ 'md': 'text-20px',
18
+ 'lg': 'text-28px',
19
+ 'xl': 'text-32px',
20
+ 'default': 'text-18px',
21
+ }
22
+ </script>
23
+
24
+ <template>
25
+ <div :class="cn('flex size-full items-center justify-center bg-neutral-950', textSizes[props.size ?? 'default'], props.class)">
26
+ <TelaAnimatedValue :value="initial" class="text-center font-540 leading-18px text-inverse" />
27
+ </div>
28
+ </template>
@@ -38,6 +38,18 @@ A flexible avatar component that displays user images with fallback support. Aut
38
38
 
39
39
  The component automatically generates initials from the `alt` text when no image is provided.
40
40
 
41
+ ### Custom Fallback
42
+
43
+ The initial is `TelaAvatarFallback`. Override it through the `fallback` slot, for example to show the initial of a different word:
44
+
45
+ ```vue
46
+ <TelaAvatar size="sm">
47
+ <template #fallback>
48
+ <TelaAvatarFallback word="Workspace" size="sm" />
49
+ </template>
50
+ </TelaAvatar>
51
+ ```
52
+
41
53
  ### Different Sizes
42
54
 
43
55
  ```vue
@@ -71,7 +71,7 @@ watch(() => props.image, () => {
71
71
  :class="[radiusClass, props.class]"
72
72
  bg-cover
73
73
  bg-center
74
- overflow-hidden
74
+ overflow-hidden select-none
75
75
  flex items-center justify-center
76
76
  :style="style"
77
77
  >
@@ -91,6 +91,8 @@ watch(() => props.image, () => {
91
91
  </template>
92
92
  </ClientOnly>
93
93
  <TelaIcon v-else-if="errorLoadingImage" name="i-ph-image-broken" text="icon-tertiary" size="lg" />
94
- <TelaInitials v-else-if="alt" :size="size" :word="alt" />
94
+ <slot v-else-if="alt || $slots.fallback" name="fallback">
95
+ <TelaAvatarFallback :word="alt ?? ''" :size="size" />
96
+ </slot>
95
97
  </div>
96
98
  </template>
@@ -116,7 +116,7 @@ Three sizes, `md` by default. Each one sets its own text, padding, radius and ic
116
116
  Go to Home
117
117
  </TelaButton>
118
118
 
119
- <TelaButton to="https://example.com" target="_blank" variant="ghost">
119
+ <TelaButton to="https://example.com" target="_blank" variant="secondary">
120
120
  External Link
121
121
  </TelaButton>
122
122
  ```
@@ -8,7 +8,7 @@ A surface container component used to group related content with consistent visu
8
8
  - Attributify spacing/radius props (`p-*`, `px-*`, `py-*`, `rounded-*`) are intentionally ignored on `<TelaCard>` to keep `size` deterministic. If you need a forced override, use `class` with the important modifier (e.g. `class="!p-0"`).
9
9
  - Cards in grids must use `h-full` for consistent heights.
10
10
  - **Never** wrap `TelaTable` in `TelaCard` — tables are their own surface.
11
- - Small gaps look like accidents next to large typography. Use at least `gap-4px` when a card contains a large typographic element — prefer `gap-6px` when the large text is the primary content.
11
+ - A label and the large value it names are one unit: keep them tight (0–4px), and separate that unit from the rest of the card with a clearly larger gap. `TelaHomeMetricsCard` uses no gap inside the pair and 36px below it; use it for metric cards.
12
12
 
13
13
  ## Size Prop
14
14
 
@@ -63,22 +63,26 @@ Cards in grids must use `h-full` for consistent heights.
63
63
  </div>
64
64
  ```
65
65
 
66
- ### Gap with Large Text
66
+ ### Label and value
67
67
 
68
68
  ```vue
69
- <!-- Wrong — too tight -->
70
- <TelaCard size="sm">
71
- <div flex flex-col gap-1>
72
- <span body-12-medium text-secondary>Total Requests</span>
69
+ <!-- Wrong — one gap for everything, so the value floats between the label and the chart -->
70
+ <TelaCard size="xs" h-full>
71
+ <div flex flex-col gap-16px>
72
+ <span body-12-regular text-secondary>Total Requests</span>
73
73
  <span heading-h2-semibold text-primary>128,430</span>
74
+ <RequestsChart />
74
75
  </div>
75
76
  </TelaCard>
76
77
 
77
- <!-- Correct -->
78
- <TelaCard size="sm" h-full>
79
- <div flex flex-col gap-4px>
80
- <span body-12-medium text-secondary>Total Requests</span>
81
- <h1 heading-h1-semibold text-primary>128,430</h1>
78
+ <!-- Correct — the label and value are one unit, set apart from the rest -->
79
+ <TelaCard size="xs" h-full>
80
+ <div flex flex-col gap-36px>
81
+ <div flex flex-col>
82
+ <span body-12-regular text-secondary>Total Requests</span>
83
+ <h2 heading-h2-semibold text-primary>128,430</h2>
84
+ </div>
85
+ <RequestsChart />
82
86
  </div>
83
87
  </TelaCard>
84
88
  ```
@@ -199,7 +199,7 @@ const items = ref([
199
199
  }
200
200
  ]"
201
201
  >
202
- <TelaButton variant="ghost">⋮</TelaButton>
202
+ <TelaIconButton icon="i-ph-dots-three" color="secondary" label="More actions" />
203
203
  </TelaDropdownMenu>
204
204
  ```
205
205
 
@@ -109,8 +109,7 @@ const removeFile = (index) => {
109
109
  >
110
110
  <span>{{ file.name }} ({{ formatFileSize(file.size) }})</span>
111
111
  <TelaButton
112
- size="sm"
113
- variant="ghost"
112
+ variant="secondary"
114
113
  @click="removeFile(index)"
115
114
  >
116
115
  Remove
@@ -30,6 +30,20 @@ const fadeTransition = {
30
30
  const contentMeasure = useTemplateRef<HTMLElement>('contentMeasure')
31
31
  const { height: heightContent } = useElementSize(contentMeasure)
32
32
 
33
+ // The popover animates its size only while it opens or moves to another filter. Inside one filter its height is
34
+ // left to layout, so it follows its content in the same frame: content that animates itself (a calendar in a
35
+ // collapsible) drives the height without two animations fighting, and a list shrinking as the user types a search
36
+ // doesn't animate on keystrokes.
37
+ const isChangingFilter = ref(false)
38
+ const { start: startFilterChange } = useTimeoutFn(() => {
39
+ isChangingFilter.value = false
40
+ }, 300, { immediate: false })
41
+
42
+ watch(() => props.configs.map(config => config.key).join('|'), () => {
43
+ isChangingFilter.value = true
44
+ startFilterChange()
45
+ }, { immediate: true })
46
+
33
47
  const computedHeightContent = computed(() => {
34
48
  if (heightContent.value > 0) {
35
49
  return `${heightContent.value}px`
@@ -114,6 +128,13 @@ function onItemsKeydown(event: KeyboardEvent) {
114
128
  return
115
129
  }
116
130
 
131
+ // Home and End move the caret in a search input in the header; don't take them over for the list
132
+ const target = event.target as HTMLElement | null
133
+ const isEditing = Boolean(target?.closest('input, textarea, [contenteditable="true"]'))
134
+ if (isEditing && (event.key === 'Home' || event.key === 'End')) {
135
+ return
136
+ }
137
+
117
138
  const currentIndex = buttons.indexOf(document.activeElement as HTMLButtonElement)
118
139
 
119
140
  switch (event.key) {
@@ -201,8 +222,8 @@ function getSlideMotionVariants(index: number, closingState: boolean) {
201
222
  @pointer-down-outside="emit('pointerDownOutside', $event)"
202
223
  >
203
224
  <div
204
- class="[transition:height_0.25s_ease-out,width_0.25s_ease-out]"
205
- :style="{ width, ...(computedHeightContent ? { height: computedHeightContent } : {}) }"
225
+ :class="isChangingFilter ? '[transition:height_0.25s_ease-out,width_0.25s_ease-out]' : '[transition:width_0.25s_ease-out]'"
226
+ :style="{ width, ...(isChangingFilter && computedHeightContent ? { height: computedHeightContent } : {}) }"
206
227
  >
207
228
  <div ref="contentMeasure" @keydown="onItemsKeydown" @pointerover="onItemsPointerOver">
208
229
  <AnimatePresence mode="popLayout" :initial="false">
@@ -218,10 +239,12 @@ function getSlideMotionVariants(index: number, closingState: boolean) {
218
239
  :filter="cfg.config"
219
240
  :selected="props.modelValue[cfg.config.key] ?? []"
220
241
  :toggle="(value: string) => toggleOption(cfg.config.key, value, cfg.config.selectionMode)"
242
+ :close="() => emit('select')"
221
243
  />
222
244
 
223
245
  <div mx--4px>
224
- <TelaScrollArea :class="cn('flex flex-col', cfg.config.optionsClass)" tabindex="-1">
246
+ <!-- the list still scrolls; its scrollbar is transparent -->
247
+ <TelaScrollArea :class="cn('flex flex-col', cfg.config.optionsClass)" scroll-thumb-class="opacity-0" tabindex="-1">
225
248
  <div px-4px>
226
249
  <component
227
250
  :is="cfg.config.selectionMode === 'single' ? TelaRadioGroupRoot : 'div'"
@@ -272,6 +295,7 @@ function getSlideMotionVariants(index: number, closingState: boolean) {
272
295
  :filter="cfg.config"
273
296
  :selected="props.modelValue[cfg.config.key] ?? []"
274
297
  :toggle="(value: string) => toggleOption(cfg.config.key, value, cfg.config.selectionMode)"
298
+ :close="() => emit('select')"
275
299
  />
276
300
  </Motion>
277
301
  </AnimatePresence>
@@ -19,7 +19,7 @@ defineEmits<{
19
19
  type="button"
20
20
  :data-active="isActive || undefined"
21
21
  :class="cn(
22
- 'group inline-flex h-[32px] items-center gap-[7px] px-[12px] border-l-[0.5px] border-y-[0.5px] border-strong bg-background outline-none transition-all duration-150',
22
+ 'group inline-flex h-[32px] items-center gap-[7px] px-[12px] border-l-[0.5px] border-y-[0.5px] border-strong bg-background outline-none transition-colors duration-150',
23
23
  'text-[14px] leading-[18px] -tracking-[0.15px] font-540 text-primary',
24
24
  'focus-visible:ring-2 focus-visible:ring-border [&:not([data-active])]:hover:bg-subtle data-[active]:bg-muted first:rounded-l-[10px] last:rounded-r-[10px] last:border-r-[0.5px]',
25
25
  triggerClass,
@@ -27,19 +27,19 @@ defineEmits<{
27
27
  :aria-label="filter.showCount && count ? `${filter.label}, ${count} selected` : undefined"
28
28
  @click="$emit('click')"
29
29
  >
30
- <div inline-flex items-center>
31
- <span button-14-semibold text-primary>{{ filter.label }}</span>
30
+ <div class="inline-flex items-center">
31
+ <span class="button-14-semibold text-primary">{{ filter.label }}</span>
32
32
 
33
33
  <AnimatePresence>
34
34
  <Motion
35
35
  v-if="count && (filter.selectionMode === 'multiple' || filter.showCount)"
36
- mt--3px ml-5px
36
+ class="ml-[5px] flex items-center"
37
37
  :initial="{ width: 0, x: -20, scale: 0, opacity: 0 }"
38
38
  :animate="{ width: 'auto', x: 0, scale: 1, opacity: 1 }"
39
39
  :exit="{ width: 0, x: -20, scale: 0, opacity: 0 }"
40
40
  :transition="{ duration: 0.15, ease: 'easeOut' }"
41
41
  >
42
- <TelaBadge variant="filled" class="py-[1px] px-[4px] rounded-[4px]" text-class="tabular-nums text-[8px]">
42
+ <TelaBadge variant="filled" class="py-[2px] px-[4px] rounded-[4px]">
43
43
  <TelaAnimatedNumber :value="count || 0" />
44
44
  </TelaBadge>
45
45
  </Motion>
@@ -49,7 +49,7 @@ defineEmits<{
49
49
  name="i-ph-caret-down-bold"
50
50
  size="12px"
51
51
  color="icon-secondary"
52
- class="shrink-0 transition-all ease-out duration-150 group-data-[active]:rotate-180"
52
+ class="shrink-0 transition-transform ease-out duration-150 group-data-[active]:rotate-180"
53
53
  />
54
54
  </button>
55
55
  </template>
@@ -99,7 +99,7 @@ Each filter can declare its own `popoverWidth`. When the filter is active, the p
99
99
 
100
100
  ### Scrollable Options
101
101
 
102
- For long option lists, set `optionsClass` to cap the height. The options render inside a `TelaScrollArea`, so the custom Tela scrollbar appears automatically when content overflows — no need to set `overflow-y-auto` yourself.
102
+ For long option lists, set `optionsClass` to cap the height. The options render inside a `TelaScrollArea`, so the list scrolls when content overflows. Its scrollbar is transparent. No need to set `overflow-y-auto` yourself.
103
103
 
104
104
  ```vue
105
105
  const filters = [
@@ -129,7 +129,7 @@ Use the scoped `option-{label}` slot to override the default option button. The
129
129
  <template #option-users="{ option, checked, toggle }">
130
130
  <button @click="toggle" class="flex justify-between items-center w-full px-8px h-32px rounded-8px hover:bg-muted">
131
131
  <div class="flex items-center gap-6px min-w-0">
132
- <TelaInitials :word="option.label" size="2xs" />
132
+ <TelaAvatar :alt="option.label" size="2xs" />
133
133
  <span class="text-primary body-14-medium truncate">{{ option.label }}</span>
134
134
  </div>
135
135
  <TelaCheckbox :model-value="checked" @click.stop @update:model-value="toggle" />
@@ -201,6 +201,31 @@ Or use the footer for related toggles independent of the option list:
201
201
  </template>
202
202
  ```
203
203
 
204
+ ### Apply Button
205
+
206
+ By default every toggle updates `modelValue` at once. To apply a selection only when the user confirms it, bind `TelaFilter` to a draft, commit the draft from an Apply button in the footer, and reset the draft whenever the open filter changes, so a pick that wasn't applied is dropped.
207
+
208
+ ```vue
209
+ <script setup>
210
+ const applied = ref({ status: [] })
211
+ const draft = ref({ ...applied.value })
212
+
213
+ // runs when the popover opens, switches to another filter, or closes:
214
+ // unapplied picks never carry over to another filter
215
+ function onOpenChange() {
216
+ draft.value = { ...applied.value }
217
+ }
218
+ </script>
219
+
220
+ <template>
221
+ <TelaFilter v-model="draft" :filters="filters" @open-change="onOpenChange">
222
+ <template #footer-status="{ close }">
223
+ <TelaButton size="sm" class="w-full mt-4px" @click="applied = { ...draft }; close()">Apply</TelaButton>
224
+ </template>
225
+ </TelaFilter>
226
+ </template>
227
+ ```
228
+
204
229
  ### Custom Styling
205
230
 
206
231
  ```vue
@@ -260,9 +285,9 @@ The popover content is fully composable via three scoped slots per filter. The s
260
285
 
261
286
  | Name | Scope | Description |
262
287
  |------|-------|-------------|
263
- | `header-{filter.key}` | `{ filter, selected, toggle }` | Rendered above the options list. Use for search inputs, descriptions, dividers. |
288
+ | `header-{filter.key}` | `{ filter, selected, toggle, close }` | Rendered above the options list. Use for search inputs, descriptions, dividers. |
264
289
  | `option-{filter.key}` | `{ option, filter, checked, toggle, mode }` | Replaces the default option button. Falls back to the standard label + checkbox/radio when not provided. |
265
- | `footer-{filter.key}` | `{ filter, selected, toggle }` | Rendered below the options list. Use for calendars, secondary toggles, action rows. |
290
+ | `footer-{filter.key}` | `{ filter, selected, toggle, close }` | Rendered below the options list. Use for calendars, secondary toggles, action rows. |
266
291
 
267
292
  Scope props:
268
293
 
@@ -271,11 +296,13 @@ Scope props:
271
296
  - `selected` — the current selections for this filter (string array).
272
297
  - `checked` — boolean indicating whether `option` is selected (only on `option-*`).
273
298
  - `toggle` — function. On `option-*` it toggles the current option (no args). On `header-*` / `footer-*` it takes a `value: string` arg and toggles that value.
299
+ - `close` — function (only on `header-*` / `footer-*`). Closes the popover, e.g. after an Apply button commits the selection.
274
300
  - `mode` — the filter's `selectionMode` (only on `option-*`).
275
301
 
276
302
  ## Events
277
303
 
278
304
  - `update:modelValue` — emitted whenever an option is toggled, with the full updated `FilterSelections` record.
305
+ - `openChange` — emitted with the key of the filter whose popover opens (or that the popover switches to), and with `null` when it closes.
279
306
 
280
307
  ## Behavior
281
308
 
@@ -21,6 +21,8 @@ const props = withDefaults(defineProps<{
21
21
 
22
22
  const emit = defineEmits<{
23
23
  'update:modelValue': [value: FilterSelections]
24
+ /** The key of the filter whose popover is open, or `null` once it closes. */
25
+ 'openChange': [key: string | null]
24
26
  }>()
25
27
 
26
28
  const SPRING_CONFIG = {
@@ -100,6 +102,8 @@ function setTriggerRef(key: string, el: any) {
100
102
  }
101
103
  }
102
104
 
105
+ watch(() => (isOpen.value ? activeFilter.value : null), key => emit('openChange', key))
106
+
103
107
  function closeFilter() {
104
108
  phase.value = 'closing'
105
109
  }
@@ -6,7 +6,7 @@ import { Meta, ArgTypes } from '@storybook/blocks';
6
6
 
7
7
  A modal dialog that displays content in a centered overlay. Use it for confirmations, forms, and content that needs the user's full attention.
8
8
 
9
- Pass `size` to get the modal layout: a header with title, description and close button, a body that scrolls on its own, and a right-aligned footer. `TelaDialog` is deprecated — **always** use `TelaModal`.
9
+ Pass `size` to get the modal layout: a header with title, description and close button, a body that scrolls on its own, and a right-aligned footer.
10
10
 
11
11
  ```vue
12
12
  <script setup lang="ts">
@@ -107,7 +107,10 @@ const name = ref('')
107
107
  title="Create project"
108
108
  description="Projects group workflows, agents and their shared credentials."
109
109
  >
110
- <TelaInput v-model="name" label="Name" placeholder="Acme onboarding" w-full />
110
+ <div flex="~ col" gap-8px>
111
+ <TelaLabel for="project-name">Name</TelaLabel>
112
+ <TelaInput id="project-name" v-model="name" placeholder="Acme onboarding" w-full />
113
+ </div>
111
114
 
112
115
  <template #footer="{ close }">
113
116
  <TelaButton variant="secondary" @click="close">
@@ -313,7 +316,7 @@ To migrate a modal, replace `modal-width` with `size`, drop `compact`, `hide-div
313
316
  </div>
314
317
  <TelaIconButton icon="i-ph-x" size="md" color="secondary" p-8px mt--12px mr--16px @click="isOpen = false" />
315
318
  </div>
316
- <TelaInput v-model="name" label="Name" w-full />
319
+ <TelaInput v-model="name" placeholder="Name" w-full />
317
320
  <div flex gap-8px justify-end>
318
321
  <TelaButton variant="secondary" @click="isOpen = false">Cancel</TelaButton>
319
322
  <TelaButton>Submit</TelaButton>
@@ -323,7 +326,7 @@ To migrate a modal, replace `modal-width` with `size`, drop `compact`, `hide-div
323
326
 
324
327
  <!-- After -->
325
328
  <TelaModal v-model="isOpen" size="sm" title="Dialog Title" description="Dialog description.">
326
- <TelaInput v-model="name" label="Name" w-full />
329
+ <TelaInput v-model="name" placeholder="Name" w-full />
327
330
  <template #footer="{ close }">
328
331
  <TelaButton variant="secondary" @click="close">Cancel</TelaButton>
329
332
  <TelaButton>Submit</TelaButton>
@@ -342,7 +345,7 @@ To migrate a modal, replace `modal-width` with `size`, drop `compact`, `hide-div
342
345
 
343
346
  ```vue
344
347
  <!-- Correct -->
345
- <TelaInput v-model="val" label="Name" w-full />
348
+ <TelaInput v-model="val" w-full />
346
349
  <TelaTextarea v-model="val" w-full />
347
350
  <TelaToggleGroup v-model="val" :options="opts" w-full />
348
351
  <TelaSelectMenu v-model="val" :options="opts" trigger-class="w-full" />
@@ -166,9 +166,15 @@ const isOpen = ref(false)
166
166
  </TelaPopoverTrigger>
167
167
  <TelaPopoverContent>
168
168
  <form @submit.prevent="onSubmit" class="p-4 w-300px">
169
- <h3 class="text-lg font-medium mb-4">Add New Item</h3>
170
- <TelaInput label="Name" v-model="name" class="mb-3" />
171
- <TelaTextarea label="Description" v-model="description" class="mb-4" />
169
+ <h3 class="heading-h5-semibold text-primary mb-16px">Add New Item</h3>
170
+ <div class="flex flex-col gap-8px mb-16px">
171
+ <TelaLabel for="item-name">Name</TelaLabel>
172
+ <TelaInput id="item-name" v-model="name" />
173
+ </div>
174
+ <div class="flex flex-col gap-8px mb-16px">
175
+ <TelaLabel for="item-description">Description</TelaLabel>
176
+ <TelaTextarea id="item-description" v-model="description" />
177
+ </div>
172
178
  <div class="flex gap-2 justify-end">
173
179
  <TelaButton variant="secondary" @click="isOpen = false">
174
180
  Cancel
@@ -73,8 +73,10 @@ const isOpen = ref(false)
73
73
  <TelaSideSheet v-model="isOpen" title="Form">
74
74
  <div class="p-4">
75
75
  <form>
76
- <TelaInput label="Name" />
77
- <TelaTextarea label="Message" />
76
+ <TelaLabel for="form-name">Name</TelaLabel>
77
+ <TelaInput id="form-name" v-model="name" />
78
+ <TelaLabel for="form-message">Message</TelaLabel>
79
+ <TelaTextarea id="form-message" v-model="message" />
78
80
  <TelaButton type="submit">Submit</TelaButton>
79
81
  </form>
80
82
  </div>
@@ -20,9 +20,7 @@ defineProps<{
20
20
  )"
21
21
  >
22
22
  <div :class="cn('size-40px origin-top-left transition-transform group-data-[variant=minimized]/sidebar:scale-60', sidebarTransition)">
23
- <img v-if="src" :src="src" :alt="alt" class="size-40px object-cover">
24
- <TelaInitials v-else-if="alt" size="md" :word="alt" />
25
- <div v-else class="size-40px bg-black" />
23
+ <TelaAvatar size="md" :image="src ?? undefined" :alt="alt" />
26
24
  </div>
27
25
  </component>
28
26
  </template>
@@ -149,12 +149,12 @@ Top section of the sidebar. Stacks children vertically with 24px gap and vertica
149
149
 
150
150
  ### TelaSidebarLogo
151
151
 
152
- Displays a logo or fallback inside the header. When `src` is provided, renders an image. When only `alt` is provided, falls back to `TelaInitials`. If neither is set, renders a placeholder div.
152
+ Displays the workspace logo inside the header as a `TelaAvatar`: the `src` image, or the first letter of `alt` when there is no `src`. An image that fails to load shows `TelaAvatar`'s broken-image icon.
153
153
 
154
154
  ```typescript
155
155
  interface TelaSidebarLogoProps {
156
- src?: string // Image source URL or path — when provided, renders an <img>
157
- alt: string // Accessible alt text — used as the word for TelaInitials fallback
156
+ src?: string // Image source URL or path
157
+ alt: string // Accessible alt text — its first letter is the fallback
158
158
  to?: string // Optional link — wraps the content in a NuxtLink when provided
159
159
  }
160
160
  ```