@meistrari/tela-build 1.85.0 → 1.86.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.
- package/CHANGELOG.md +6 -0
- package/components/tela/button/button.vue +4 -4
- package/components/tela/chat/text-message/index.vue +1 -1
- package/components/tela/file-upload/file-upload.vue +3 -3
- package/components/tela/uploader/uploader-drop-zone.vue +4 -4
- package/docs/typography.md +43 -7
- package/package.json +1 -1
- package/unocss.config.ts +17 -9
- package/utils/design-tokens.ts +47 -0
- package/components/tela/link-decoration/link-decoration.vue +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Latest updates and announcements.
|
|
4
4
|
|
|
5
|
+
## October 9, 2026
|
|
6
|
+
|
|
7
|
+
- [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.
|
|
8
|
+
- `TelaLinkDecoration` is removed. Use a plain `<a>` (or `<span>`) with a `body-<size>-underline` token instead: `<TelaLinkDecoration :href="url">Docs</TelaLinkDecoration>` → `<a :href="url" body-12-underline text-gray-900>Docs</a>`. The underline keeps the same 3px offset.
|
|
9
|
+
- [Typography](/typography) `body-caption-<size>-<weight>` is replaced by `body-<size>-<weight>-uppercase` (`body-caption-9-medium` → `body-9-medium-uppercase`). Rendering is unchanged: uppercase with 0.05em tracking.
|
|
10
|
+
|
|
5
11
|
## October 8, 2026
|
|
6
12
|
|
|
7
13
|
- [Tooltip](/components/tooltip#multiline-tooltip) multiline is more compact: the title is `body-12-semibold` (was `body-14-semibold`), the description is `neutral-300` (was white at 90%), and the 2px gap between them is gone.
|
|
@@ -35,9 +35,9 @@ const hasLeadingIcon = computed(() => !!((props.loading && props.leading) || slo
|
|
|
35
35
|
const hasTrailingIcon = computed(() => !!((props.loading && !props.leading) || slots.trailing || (props.icon && !props.leading)))
|
|
36
36
|
|
|
37
37
|
const sizeStyle = computed(() => (({
|
|
38
|
-
sm: '[--padding-x:10px]
|
|
39
|
-
md: '[--padding-x:12px]
|
|
40
|
-
lg: '[--padding-x:16px]
|
|
38
|
+
sm: '[--padding-x:10px] button-12-semibold py-[4px] rounded-[9px]',
|
|
39
|
+
md: '[--padding-x:12px] button-14-semibold py-[7px] rounded-[11px]',
|
|
40
|
+
lg: '[--padding-x:16px] button-16-semibold py-[8px] rounded-[12px]',
|
|
41
41
|
}) as Record<ButtonSize, string>)[resolvedSize.value] ?? '')
|
|
42
42
|
|
|
43
43
|
const paddingStyle = computed(() => [
|
|
@@ -76,7 +76,7 @@ const iconSize = computed(() => (({
|
|
|
76
76
|
:is="tag"
|
|
77
77
|
:to="to"
|
|
78
78
|
:class="cn(
|
|
79
|
-
'box-border
|
|
79
|
+
'box-border select-none flex items-center justify-center gap-4px ease-out duration-40',
|
|
80
80
|
disabled ? 'cursor-not-allowed' : 'cursor-pointer',
|
|
81
81
|
resolvedStyle,
|
|
82
82
|
)"
|
|
@@ -221,7 +221,7 @@ const labels = useTelaLabels()
|
|
|
221
221
|
<span class="body-12-regular text-gray-600">{{ timestampString }}</span>
|
|
222
222
|
<TelaIcon v-if="version" name="i-ph-dot" color="gray-300" />
|
|
223
223
|
<div v-if="version" py-2px px-4px rounded-5px bg-gray-200 h-16px>
|
|
224
|
-
<p body-
|
|
224
|
+
<p body-9-bold-uppercase text-gray-600>
|
|
225
225
|
{{ version }}
|
|
226
226
|
</p>
|
|
227
227
|
</div>
|
|
@@ -196,16 +196,16 @@ const telaLabels = useTelaLabels()
|
|
|
196
196
|
<TelaIcon name="i-ph-upload-simple-bold" size="16px" color="gray-400" />
|
|
197
197
|
<div class="flex flex-col items-center justify-center gap-1">
|
|
198
198
|
<h5 heading-h5-semibold text-primary>
|
|
199
|
-
{{ labels.dragAndDrop }} <
|
|
199
|
+
{{ labels.dragAndDrop }} <span class="body-14-underline ml-1px text-gray-700">{{ labels.orBrowse }}</span>
|
|
200
200
|
</h5>
|
|
201
201
|
<div flex="~ col" gap-1px items-center>
|
|
202
202
|
<p flex items-center gap-4px body-12-regular text-tertiary>
|
|
203
203
|
{{ labels.supportedFormats }}: {{ fileTypesDisplay.text }}
|
|
204
204
|
<template v-if="fileTypesDisplay.hasMore">
|
|
205
205
|
{{ labels.and }}
|
|
206
|
-
<
|
|
206
|
+
<span class="body-12-underline underline-offset-2px">
|
|
207
207
|
{{ fileTypesDisplay.moreCount }} {{ labels.more }}
|
|
208
|
-
</
|
|
208
|
+
</span>
|
|
209
209
|
<TelaTooltip variant="multiline" content-class="w-fit min-w-100px max-w-100px" :description="fileTypesDisplay.moreTooltip" side="right">
|
|
210
210
|
<TelaIcon name="i-ph-info-bold" size="14px" color="gray-400" />
|
|
211
211
|
</TelaTooltip>
|
|
@@ -55,16 +55,16 @@ const emit = defineEmits<{
|
|
|
55
55
|
<TelaIcon v-else name="i-ph-upload-simple-bold" size="16px" color="gray-400" />
|
|
56
56
|
<div flex="~ col" items-center gap-5px justify-center>
|
|
57
57
|
<h5 heading-h5-semibold text-primary>
|
|
58
|
-
{{ dragAndDropYourFilesLabel }} <
|
|
58
|
+
{{ dragAndDropYourFilesLabel }} <span class="body-14-underline ml-1px text-gray-900">
|
|
59
59
|
{{ orBrowseLabel }}
|
|
60
|
-
</
|
|
60
|
+
</span>
|
|
61
61
|
</h5>
|
|
62
62
|
<p flex items-center gap-4px body-12-regular text-tertiary>
|
|
63
63
|
{{ supportedFormatsLabel }} {{ fileTypesDisplay.text }} {{ andLabel }}
|
|
64
64
|
<template v-if="fileTypesDisplay.hasMore">
|
|
65
|
-
<
|
|
65
|
+
<span class="body-12-underline underline-offset-2px">
|
|
66
66
|
{{ fileTypesDisplay.moreCount }} {{ moreLabel }}
|
|
67
|
-
</
|
|
67
|
+
</span>
|
|
68
68
|
<TelaTooltip variant="multiline" content-class="w-fit min-w-100px max-w-100px" :description="fileTypesDisplay.moreTooltip" side="right">
|
|
69
69
|
<TelaIcon name="i-ph-info-bold" size="14px" color="gray-400" />
|
|
70
70
|
</TelaTooltip>
|
package/docs/typography.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Typography tweaks for a more polished UI.
|
|
4
4
|
|
|
5
|
-
Tokens follow the pattern
|
|
5
|
+
Tokens follow the pattern `<family>-<size>-<weight>`: `heading-h2-semibold`, `body-14-medium`, `display-large-semibold`, `paragraph-16-regular`, `button-14-semibold`. Grouped below by category.
|
|
6
6
|
|
|
7
7
|
## Headings
|
|
8
8
|
|
|
@@ -17,9 +17,19 @@ Each heading level has three weight variants (`regular`, `medium`, `semibold`).
|
|
|
17
17
|
| `heading-h5-semibold` | 14px / 16px | Card titles, small headings | `body-12` |
|
|
18
18
|
| `heading-h6-semibold` | 12px / 14px | Smallest heading | `body-12` |
|
|
19
19
|
|
|
20
|
+
## Display
|
|
21
|
+
|
|
22
|
+
Marketing-scale titles for hero sections and empty states. Like headings, `semibold` resolves to 520.
|
|
23
|
+
|
|
24
|
+
| Token | Size / Line height | Letter spacing |
|
|
25
|
+
| ------------------------- | ------------------ | -------------- |
|
|
26
|
+
| `display-large-semibold` | 80px / 80px | -4.5px |
|
|
27
|
+
| `display-medium-semibold` | 48px / 48px | -2.2px |
|
|
28
|
+
| `display-small-semibold` | 40px / 40px | -2px |
|
|
29
|
+
|
|
20
30
|
## Body
|
|
21
31
|
|
|
22
|
-
Each body size has `regular` and `
|
|
32
|
+
Each body size has `regular`, `medium` and `semibold` variants — regular for reading text, medium for labels and emphasis.
|
|
23
33
|
|
|
24
34
|
| Token | Size / Line height | Usage | Pairs with |
|
|
25
35
|
| ------------------------------------ | ------------------ | ------------------------------ | -------------------- |
|
|
@@ -27,14 +37,40 @@ Each body size has `regular` and `medium` variants — regular for reading text,
|
|
|
27
37
|
| `body-16-regular` / `body-16-medium` | 16px / 20px | Primary reading text | `heading-h2` |
|
|
28
38
|
| `body-14-regular` / `body-14-medium` | 14px / 18px | Supporting text, descriptions | `heading-h3` / `h4` |
|
|
29
39
|
| `body-12-regular` / `body-12-medium` | 12px / 16px | Captions, labels, metadata | `heading-h5` / `h6` |
|
|
40
|
+
| `body-10-regular` / `body-10-semibold` | 10px / 12px | Dense metadata, tiny labels | — |
|
|
41
|
+
|
|
42
|
+
Swap the weight for `underline` (`body-14-underline`) to get the regular weight with a 3px-offset underline. Use it on a plain `<a>` for inline links, paired with a text color (`text-gray-900`).
|
|
43
|
+
|
|
44
|
+
## Uppercase
|
|
45
|
+
|
|
46
|
+
Append `-uppercase` to any body token (`body-<size>-<weight>-uppercase`) to render it uppercase with 0.05em tracking.
|
|
47
|
+
|
|
48
|
+
| Token | Size / Line height | Usage |
|
|
49
|
+
| ------------------------------------------------------ | ------------------ | --------------------------------------------------- |
|
|
50
|
+
| `body-12-semibold-uppercase` | 12px / 16px | Section eyebrows, group labels |
|
|
51
|
+
| `body-10-medium-uppercase` / `body-10-semibold-uppercase` | 10px / 12px | Column headers, compact labels |
|
|
52
|
+
| `body-9-medium-uppercase` | 9px / 16px | Uppercase micro-labels — timestamps, badges |
|
|
53
|
+
|
|
54
|
+
## Paragraph
|
|
55
|
+
|
|
56
|
+
Long-form reading with taller line height than `body-*`. Use `regular`.
|
|
57
|
+
|
|
58
|
+
| Token | Size / Line height | Usage |
|
|
59
|
+
| ------------------------- | ------------------ | ----------------------- |
|
|
60
|
+
| `paragraph-20-regular` | 20px / 32px | Lead paragraphs |
|
|
61
|
+
| `paragraph-16-regular` | 16px / 28px | Articles, documentation |
|
|
62
|
+
| `paragraph-14-regular` | 14px / 24px | Dense long-form text |
|
|
63
|
+
| `paragraph-quote-regular` | 20px / 28px | Pull quotes |
|
|
30
64
|
|
|
31
|
-
##
|
|
65
|
+
## Button
|
|
32
66
|
|
|
33
|
-
|
|
34
|
-
| ------------------------ | ------------------ | ----------------------------------------------------- |
|
|
35
|
-
| `body-caption-9-medium` | 9px / 16px | Uppercase micro-labels — timestamps, column headers |
|
|
67
|
+
Button labels: body sizes with button tracking, set in `semibold`. Use them for custom button-like controls; `TelaButton` handles its own label.
|
|
36
68
|
|
|
37
|
-
|
|
69
|
+
| Token | Size / Line height | Letter spacing |
|
|
70
|
+
| -------------------- | ------------------ | -------------- |
|
|
71
|
+
| `button-16-semibold` | 16px / 20px | -0.15px |
|
|
72
|
+
| `button-14-semibold` | 14px / 18px | -0.15px |
|
|
73
|
+
| `button-12-semibold` | 12px / 16px | 0px |
|
|
38
74
|
|
|
39
75
|
## Weights
|
|
40
76
|
|
package/package.json
CHANGED
package/unocss.config.ts
CHANGED
|
@@ -64,11 +64,18 @@ export default defineConfig({
|
|
|
64
64
|
['touch-hitbox', 'relative before:absolute before:left-1/2 before:top-1/2 before:block before:h-full before:min-h-44px before:w-full before:min-w-44px before:content-empty before:translate-x--50% before:translate-y--50%'],
|
|
65
65
|
[/u-ring-([\d.]+)/, ([_, v]) => `ring-${v}`],
|
|
66
66
|
// typography
|
|
67
|
-
[/(body|heading)
|
|
67
|
+
[/(body|heading|display|paragraph|button)-(h[1-6]|large|medium|small|quote|\d+)-(thin|regular|medium|semibold|bold|underline)(-uppercase)?/i, ([_, tag, size, weight, type]) => {
|
|
68
|
+
const isUppercase = type === '-uppercase'
|
|
69
|
+
const isUnderline = weight?.toLowerCase() === 'underline'
|
|
70
|
+
const decoration = `${isUppercase ? 'uppercase tracking-0.05em!' : ''} ${isUnderline ? 'underline underline-offset-3px' : ''}`
|
|
71
|
+
|
|
68
72
|
const [sizeFromToken] = Object
|
|
69
73
|
.entries(DT.fontSize)
|
|
70
74
|
.find(([sizeKey, [sizeValue]]) => {
|
|
71
|
-
|
|
75
|
+
// display, paragraph and button sizes are keyed by name (`display-large`, `paragraph-16`)
|
|
76
|
+
if (sizeKey.includes('-'))
|
|
77
|
+
return sizeKey === `${tag}-${size}`
|
|
78
|
+
else if (tag === 'body' && !sizeKey.includes('h'))
|
|
72
79
|
return sizeValue === `${size}px`
|
|
73
80
|
else if (tag === 'heading' && sizeKey.includes('h'))
|
|
74
81
|
return sizeValue === `${size}px` || sizeKey === size
|
|
@@ -77,19 +84,20 @@ export default defineConfig({
|
|
|
77
84
|
}) ?? []
|
|
78
85
|
|
|
79
86
|
if (!sizeFromToken) {
|
|
80
|
-
return `text-${size}px leading-1em font-${
|
|
87
|
+
return `text-${size}px leading-1em font-${isUnderline ? 'regular' : weight} ${decoration}`
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
const sizeFontSpecs = (DT.fontSize as any)[sizeFromToken] as [string, { 'line-height': string, 'letter-spacing': string }]
|
|
84
91
|
const sizeStyle = `text-size-[${sizeFontSpecs[0]}] leading-${sizeFontSpecs[1]['line-height']} tracking-[${sizeFontSpecs[1]['letter-spacing']}]`
|
|
85
|
-
const isCaption = type === '-caption'
|
|
86
92
|
|
|
87
|
-
// Headings use a lighter semibold than body text
|
|
88
|
-
const fontWeight =
|
|
89
|
-
? DT.fontWeight.
|
|
90
|
-
: weight
|
|
93
|
+
// Headings and display use a lighter semibold than body text
|
|
94
|
+
const fontWeight = isUnderline
|
|
95
|
+
? DT.fontWeight.regular
|
|
96
|
+
: ['heading', 'display'].includes(tag!.toLowerCase()) && weight?.toLowerCase() === 'semibold'
|
|
97
|
+
? DT.fontWeight.headingSemibold
|
|
98
|
+
: weight
|
|
91
99
|
|
|
92
|
-
return `${sizeStyle} font-${fontWeight} ${
|
|
100
|
+
return `${sizeStyle} font-${fontWeight} ${decoration}`
|
|
93
101
|
}],
|
|
94
102
|
// Catch for `text-(primary|secondary|tertiary|subtle|contrast|inverse|success|error|warning|pending)`
|
|
95
103
|
[/text-(primary|secondary|tertiary|subtle|contrast|inverse|success|error|warning|pending)/, ([_, v]) => `text-text-${v}`],
|
package/utils/design-tokens.ts
CHANGED
|
@@ -443,10 +443,57 @@ const FONT_SIZES: Record<string, [string, FontSizeMetrics]> = {
|
|
|
443
443
|
'line-height': '16px',
|
|
444
444
|
'letter-spacing': '0px',
|
|
445
445
|
}],
|
|
446
|
+
'2xs': ['10px', {
|
|
447
|
+
'line-height': '12px',
|
|
448
|
+
'letter-spacing': '0px',
|
|
449
|
+
}],
|
|
446
450
|
'xxs': ['9px', {
|
|
447
451
|
'line-height': '16px',
|
|
448
452
|
'letter-spacing': '1px',
|
|
449
453
|
}],
|
|
454
|
+
// display
|
|
455
|
+
'display-large': ['80px', {
|
|
456
|
+
'line-height': '80px',
|
|
457
|
+
'letter-spacing': '-4.5px',
|
|
458
|
+
}],
|
|
459
|
+
'display-medium': ['48px', {
|
|
460
|
+
'line-height': '48px',
|
|
461
|
+
'letter-spacing': '-2.2px',
|
|
462
|
+
}],
|
|
463
|
+
'display-small': ['40px', {
|
|
464
|
+
'line-height': '40px',
|
|
465
|
+
'letter-spacing': '-2px',
|
|
466
|
+
}],
|
|
467
|
+
// paragraph (long-form reading, taller line height than body)
|
|
468
|
+
'paragraph-20': ['20px', {
|
|
469
|
+
'line-height': '32px',
|
|
470
|
+
'letter-spacing': '-0.2px',
|
|
471
|
+
}],
|
|
472
|
+
'paragraph-16': ['16px', {
|
|
473
|
+
'line-height': '28px',
|
|
474
|
+
'letter-spacing': '-0.18px',
|
|
475
|
+
}],
|
|
476
|
+
'paragraph-14': ['14px', {
|
|
477
|
+
'line-height': '24px',
|
|
478
|
+
'letter-spacing': '-0.15px',
|
|
479
|
+
}],
|
|
480
|
+
'paragraph-quote': ['20px', {
|
|
481
|
+
'line-height': '28px',
|
|
482
|
+
'letter-spacing': '-0.2px',
|
|
483
|
+
}],
|
|
484
|
+
// button
|
|
485
|
+
'button-16': ['16px', {
|
|
486
|
+
'line-height': '20px',
|
|
487
|
+
'letter-spacing': '-0.15px',
|
|
488
|
+
}],
|
|
489
|
+
'button-14': ['14px', {
|
|
490
|
+
'line-height': '18px',
|
|
491
|
+
'letter-spacing': '-0.15px',
|
|
492
|
+
}],
|
|
493
|
+
'button-12': ['12px', {
|
|
494
|
+
'line-height': '16px',
|
|
495
|
+
'letter-spacing': '0px',
|
|
496
|
+
}],
|
|
450
497
|
}
|
|
451
498
|
|
|
452
499
|
export const DT = {
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
const props = defineProps<{
|
|
3
|
-
class?: string
|
|
4
|
-
href?: string
|
|
5
|
-
}>()
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<template>
|
|
9
|
-
<component
|
|
10
|
-
:is="props.href ? 'a' : 'span'"
|
|
11
|
-
:href="props.href"
|
|
12
|
-
:class="cn('text-gray-900 underline underline-offset-3px', props.class)"
|
|
13
|
-
>
|
|
14
|
-
<slot />
|
|
15
|
-
</component>
|
|
16
|
-
</template>
|