@meistrari/tela-build 1.79.2 → 1.79.3
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 +4 -0
- package/components/tela/input/input.vue +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,10 @@ Latest updates and announcements.
|
|
|
7
7
|
- [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
8
|
- [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
9
|
|
|
10
|
+
## October 3, 2026
|
|
11
|
+
|
|
12
|
+
- [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.
|
|
13
|
+
|
|
10
14
|
## September 30, 2026
|
|
11
15
|
|
|
12
16
|
- [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
|
-
|
|
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
|