@meistrari/tela-build 1.79.2 → 1.80.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,11 +2,19 @@
2
2
 
3
3
  Latest updates and announcements.
4
4
 
5
+ ## October 6, 2026
6
+
7
+ - [Typography](/typography) `body-20-*` (and the `3xl` font size) is tighter: line height 32 → 24px and letter spacing -0.2 → -0.55px.
8
+
5
9
  ## October 5, 2026
6
10
 
7
11
  - [Floating chat](/templates/chat#floating) adds `position="left" | "right"` (default `right`) to place the launcher and panel in either bottom corner, with matching alignment and mirrored open/close animations.
8
12
  - [Kbd](/components/kbd) icon keys render a 12px icon inside the 16×16 key, and Enter is now `TelaKbd icon="i-ph-arrow-bend-down-left"`. `TelaKbdReturn` is deprecated and logs a warning in development.
9
13
 
14
+ ## October 3, 2026
15
+
16
+ - [Input](/components/input) with `autofocus` no longer throws `TypeError: Cannot read properties of null (reading 'querySelector')` when it unmounts within 100ms of mounting, as in a search popover that closes right away. Unmounting now cancels the pending focus.
17
+
10
18
  ## September 30, 2026
11
19
 
12
20
  - [Switch](/components/switch) thumb stretches iOS-style: pressing widens it toward the opposite side (16 → 18px on `sm`, 18 → 20px on `md`), and on release it slides over while settling back to a circle. The stretch is a `scaleX` on the thumb background, so it animates smoothly between pixels and leaves `#thumb` slot content undistorted. Respects `prefers-reduced-motion`. The `md` thumb is now 18px with a 3px inset on every side (was 20px, 2px inset).
@@ -64,12 +64,17 @@ function clearContent() {
64
64
  const container = ref<HTMLElement>()
65
65
  const { textarea: inputRef, input: textareaInput } = useTextareaAutosize({ styleProp: 'minHeight' })
66
66
 
67
+ let focusTimer: ReturnType<typeof setTimeout> | undefined
68
+
67
69
  function focusInput() {
68
70
  if (container.value) {
69
- setTimeout(() => container.value!.querySelector(isTextarea.value ? 'textarea' : 'input')?.focus(), 100)
71
+ clearTimeout(focusTimer)
72
+ focusTimer = setTimeout(() => container.value?.querySelector(isTextarea.value ? 'textarea' : 'input')?.focus(), 100)
70
73
  }
71
74
  }
72
75
 
76
+ onBeforeUnmount(() => clearTimeout(focusTimer))
77
+
73
78
  onMounted(() => {
74
79
  if (container.value && container.value.attributes.getNamedItem('data-testid')) {
75
80
  const testId = container.value.attributes.getNamedItem('data-testid')?.value as string
@@ -23,7 +23,7 @@ Each body size has `regular` and `medium` variants — regular for reading text,
23
23
 
24
24
  | Token | Size / Line height | Usage | Pairs with |
25
25
  | ------------------------------------ | ------------------ | ------------------------------ | -------------------- |
26
- | `body-20-regular` / `body-20-medium` | 20px / 32px | Long-form intros | `heading-h1` |
26
+ | `body-20-regular` / `body-20-medium` | 20px / 24px | Long-form intros | `heading-h1` |
27
27
  | `body-16-regular` / `body-16-medium` | 16px / 20px | Primary reading text | `heading-h2` |
28
28
  | `body-14-regular` / `body-14-medium` | 14px / 18px | Supporting text, descriptions | `heading-h3` / `h4` |
29
29
  | `body-12-regular` / `body-12-medium` | 12px / 16px | Captions, labels, metadata | `heading-h5` / `h6` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.79.2",
3
+ "version": "1.80.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",
@@ -416,8 +416,8 @@ const FONT_SIZES: Record<string, [string, FontSizeMetrics]> = {
416
416
  }],
417
417
  // body
418
418
  '3xl': ['20px', {
419
- 'line-height': '32px',
420
- 'letter-spacing': '-0.2px',
419
+ 'line-height': '24px',
420
+ 'letter-spacing': '-0.55px',
421
421
  }],
422
422
  '2xl': ['18px', {
423
423
  'line-height': '24px',