@meistrari/tela-build 1.85.0 → 1.87.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 CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  Latest updates and announcements.
4
4
 
5
+ ## October 14, 2026
6
+
7
+ - [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.
8
+
9
+ ## October 9, 2026
10
+
11
+ - [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.
12
+ - `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.
13
+ - [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.
14
+
5
15
  ## October 8, 2026
6
16
 
7
17
  - [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.
@@ -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="rounded-6px" :class="props.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
- rounded-6px object-cover
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="black/560" size="lg" />
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>
@@ -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] text-[12px] leading-[16px] tracking-normal py-[4px] rounded-[9px]',
39
- md: '[--padding-x:12px] text-[14px] leading-[18px] -tracking-[0.15px] py-[7px] rounded-[11px]',
40
- lg: '[--padding-x:16px] text-[16px] leading-[20px] -tracking-[0.15px] py-[8px] rounded-[12px]',
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 font-540 select-none flex items-center justify-center gap-4px ease-out duration-40',
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-caption-9-bold text-gray-600>
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 }} <TelaLinkDecoration class="body-14-regular ml-1px text-gray-700">{{ labels.orBrowse }}</TelaLinkDecoration>
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
- <TelaLinkDecoration class="text-inherit underline-offset-2px">
206
+ <span class="body-12-underline underline-offset-2px">
207
207
  {{ fileTypesDisplay.moreCount }} {{ labels.more }}
208
- </TelaLinkDecoration>
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,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 && 'ring-1.5px ring-offset-2px ring-gray-400 rounded-10px'">
59
- <TelaAvatar size="md" :image="workspace.logo ?? undefined" :alt="workspace.name" class="!rounded-[10px]" />
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>
@@ -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 }} <TelaLinkDecoration class="body-14-regular ml-1px">
58
+ {{ dragAndDropYourFilesLabel }} <span class="body-14-underline ml-1px text-gray-900">
59
59
  {{ orBrowseLabel }}
60
- </TelaLinkDecoration>
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
- <TelaLinkDecoration class="text-inherit underline-offset-2px">
65
+ <span class="body-12-underline underline-offset-2px">
66
66
  {{ fileTypesDisplay.moreCount }} {{ moreLabel }}
67
- </TelaLinkDecoration>
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>
@@ -2,7 +2,7 @@
2
2
 
3
3
  Typography tweaks for a more polished UI.
4
4
 
5
- Tokens follow the pattern `heading-<level>-<weight>` and `body-<size>-<weight>`, grouped below by category.
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 `medium` variants — regular for reading text, medium for labels and emphasis.
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
- ## Caption
65
+ ## Button
32
66
 
33
- | Token | Size / Line height | Usage |
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
- Caption tokens render uppercase automatically.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.85.0",
3
+ "version": "1.87.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",
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)(-caption)?-(h[1-6]|\d+)-(thin|regular|medium|semibold|bold)/i, ([_, tag, type, size, weight]) => {
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
- if (tag === 'body' && !sizeKey.includes('h'))
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-${weight} ${type === '-caption' ? 'uppercase' : ''}`
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 = tag?.toLowerCase() === 'heading' && weight?.toLowerCase() === 'semibold'
89
- ? DT.fontWeight.headingSemibold
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} ${isCaption ? 'uppercase tracking-0.05em!' : ''}`
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}`],
@@ -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>