@meistrari/tela-build 1.86.0 → 1.87.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
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Latest updates and announcements.
|
|
4
4
|
|
|
5
|
+
## October 15, 2026
|
|
6
|
+
|
|
7
|
+
- [Preview](/components/preview) wraps preformatted text within the document width, keeping long indented email paragraphs readable while preserving indentation and line breaks.
|
|
8
|
+
|
|
9
|
+
## October 14, 2026
|
|
10
|
+
|
|
11
|
+
- [Avatar](/components/avatar) corner radius now scales with `size` to match Figma instead of a flat 6px: `2xs` 6px, `xs` 8px, `sm` 10px, `md` (and the default) 12px, `lg` 20px, `xl` 22px. The radius is still a class, so a `class` like `rounded-full` overrides it. The switch-workspace modal drops its `!rounded-[10px]` avatar override, and its selection ring follows the 12px radius with a transparent 2px gap, so the hovered row background shows through instead of a white band.
|
|
12
|
+
|
|
5
13
|
## October 9, 2026
|
|
6
14
|
|
|
7
15
|
- [Typography](/typography) adds the styles that only existed in Figma: `display-{large|medium|small}-<weight>`, `paragraph-{20|16|14|quote}-<weight>`, `button-{16|14|12}-<weight>` (same `<family>-<size>-<weight>` pattern as `body-*` and `heading-*`), the 10px body size (`body-10-*`), and an `underline` weight (`body-14-underline`) that renders regular weight with an underline.
|
|
@@ -61,17 +61,6 @@ When an image fails to load, the component shows a broken image icon.
|
|
|
61
61
|
/>
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
### Avatar Group
|
|
65
|
-
|
|
66
|
-
```vue
|
|
67
|
-
<div class="flex -space-x-2">
|
|
68
|
-
<TelaAvatar image="..." alt="User 1" size="sm" />
|
|
69
|
-
<TelaAvatar image="..." alt="User 2" size="sm" />
|
|
70
|
-
<TelaAvatar image="..." alt="User 3" size="sm" />
|
|
71
|
-
<TelaAvatar image="..." alt="User 4" size="sm" />
|
|
72
|
-
</div>
|
|
73
|
-
```
|
|
74
|
-
|
|
75
64
|
## Props
|
|
76
65
|
|
|
77
66
|
<ArgTypes />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script setup lang=ts>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import { sanitizeAvatarImageUrl } from '../../../utils/avatar'
|
|
3
3
|
|
|
4
4
|
export type AvatarSize = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
@@ -41,11 +41,24 @@ const sizes = {
|
|
|
41
41
|
height: 40,
|
|
42
42
|
},
|
|
43
43
|
}
|
|
44
|
+
const radiusClasses: Record<AvatarSize | 'default', string> = {
|
|
45
|
+
'2xs': 'rounded-6px',
|
|
46
|
+
'xs': 'rounded-8px',
|
|
47
|
+
'sm': 'rounded-10px',
|
|
48
|
+
'md': 'rounded-12px',
|
|
49
|
+
'lg': 'rounded-20px',
|
|
50
|
+
'xl': 'rounded-22px',
|
|
51
|
+
'default': 'rounded-12px',
|
|
52
|
+
}
|
|
53
|
+
|
|
44
54
|
const resolvedSize = computed(() => props.size ?? 'default')
|
|
55
|
+
const radiusClass = computed(() => radiusClasses[resolvedSize.value])
|
|
56
|
+
|
|
45
57
|
const style = computed(() => ({
|
|
46
58
|
width: `${sizes[resolvedSize.value].width}px`,
|
|
47
59
|
height: `${sizes[resolvedSize.value].height}px`,
|
|
48
60
|
}))
|
|
61
|
+
|
|
49
62
|
const safeImage = computed(() => sanitizeAvatarImageUrl(props.image))
|
|
50
63
|
|
|
51
64
|
watch(() => props.image, () => {
|
|
@@ -55,7 +68,7 @@ watch(() => props.image, () => {
|
|
|
55
68
|
|
|
56
69
|
<template>
|
|
57
70
|
<div
|
|
58
|
-
class="
|
|
71
|
+
:class="[radiusClass, props.class]"
|
|
59
72
|
bg-cover
|
|
60
73
|
bg-center
|
|
61
74
|
overflow-hidden
|
|
@@ -69,7 +82,7 @@ watch(() => props.image, () => {
|
|
|
69
82
|
:width="sizes[resolvedSize].width"
|
|
70
83
|
:height="sizes[resolvedSize].height"
|
|
71
84
|
loading="lazy"
|
|
72
|
-
|
|
85
|
+
object-cover rounded-inherit
|
|
73
86
|
:style="style"
|
|
74
87
|
@error="() => errorLoadingImage = true"
|
|
75
88
|
>
|
|
@@ -77,7 +90,7 @@ watch(() => props.image, () => {
|
|
|
77
90
|
<TelaSkeleton :style="style" />
|
|
78
91
|
</template>
|
|
79
92
|
</ClientOnly>
|
|
80
|
-
<TelaIcon v-else-if="errorLoadingImage" name="i-ph-image-broken" text="
|
|
93
|
+
<TelaIcon v-else-if="errorLoadingImage" name="i-ph-image-broken" text="icon-tertiary" size="lg" />
|
|
81
94
|
<TelaInitials v-else-if="alt" :size="size" :word="alt" />
|
|
82
95
|
</div>
|
|
83
96
|
</template>
|
|
@@ -55,8 +55,8 @@ function formatStat(count: number | undefined, singular: string, plural: string)
|
|
|
55
55
|
data-testid="tela.switchWorkspace.workspaceButton"
|
|
56
56
|
@click="emit('select', workspace)"
|
|
57
57
|
>
|
|
58
|
-
<div mr-12px :class="activeWorkspaceId === workspace.id && '
|
|
59
|
-
<TelaAvatar size="md" :image="workspace.logo ?? undefined" :alt="workspace.name"
|
|
58
|
+
<div mr-12px :class="activeWorkspaceId === workspace.id && 'outline-solid outline-[1.5px] outline-offset-2px outline-border-accent rounded-12px'">
|
|
59
|
+
<TelaAvatar size="md" :image="workspace.logo ?? undefined" :alt="workspace.name" />
|
|
60
60
|
</div>
|
|
61
61
|
|
|
62
62
|
<div flex="~ col" gap-2px>
|
|
@@ -1358,6 +1358,11 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
|
|
|
1358
1358
|
flex-direction: column;
|
|
1359
1359
|
gap: 12px;
|
|
1360
1360
|
|
|
1361
|
+
pre {
|
|
1362
|
+
white-space: pre-wrap;
|
|
1363
|
+
overflow-wrap: anywhere;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1361
1366
|
p {
|
|
1362
1367
|
font-size: 14px;
|
|
1363
1368
|
line-height: 20px;
|