@lyeve-labs/ui-kit 0.31.0 → 0.31.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.
|
@@ -77,8 +77,11 @@
|
|
|
77
77
|
// A disabled field hands over nothing, including a look at what it holds.
|
|
78
78
|
const showToggle = $derived(revealable && !disabled);
|
|
79
79
|
|
|
80
|
+
// bind:value rather than a one-way value: on hydration it adopts what the
|
|
81
|
+
// field already holds, so a password typed or autofilled before the page
|
|
82
|
+
// took over is kept. A one-way value set the field back to empty, and the
|
|
83
|
+
// form then refused to submit with the password still shown as required.
|
|
80
84
|
function handleInput(e: Event & { currentTarget: HTMLInputElement }) {
|
|
81
|
-
value = e.currentTarget.value;
|
|
82
85
|
oninput?.(e);
|
|
83
86
|
}
|
|
84
87
|
</script>
|
|
@@ -103,7 +106,7 @@
|
|
|
103
106
|
{disabled}
|
|
104
107
|
{readonly}
|
|
105
108
|
{autocomplete}
|
|
106
|
-
|
|
109
|
+
bind:value
|
|
107
110
|
oninput={handleInput}
|
|
108
111
|
{onchange}
|
|
109
112
|
aria-invalid={error ? 'true' : undefined}
|
|
@@ -26,9 +26,10 @@
|
|
|
26
26
|
|
|
27
27
|
const fieldId = $derived(id ?? (label ? label.toLowerCase().replace(/\s+/g, '-') : undefined));
|
|
28
28
|
|
|
29
|
+
// bind:value keeps what was typed before hydration; a one-way value
|
|
30
|
+
// cleared it. The binding has updated value by the time this runs.
|
|
29
31
|
function handleInput(e: Event & { currentTarget: HTMLInputElement }) {
|
|
30
|
-
|
|
31
|
-
oninput?.(value);
|
|
32
|
+
oninput?.(e.currentTarget.value);
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
function clear() {
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
{name}
|
|
65
66
|
{placeholder}
|
|
66
67
|
{disabled}
|
|
67
|
-
|
|
68
|
+
bind:value
|
|
68
69
|
oninput={handleInput}
|
|
69
70
|
class="{CONTROL_BASE} {controlBorder(false)} ps-9
|
|
70
71
|
[&::-webkit-search-cancel-button]:appearance-none
|
package/dist/index.d.ts
CHANGED
|
@@ -94,4 +94,4 @@ export { cn, type ClassValue } from './utils/cn.js';
|
|
|
94
94
|
export { getTheme, getThemePreference, nextThemePreference, resolveTheme, setTheme, setThemePreference, systemTheme, themeBootScript, watchThemePreference, toggleTheme, watchSystemTheme, THEME_PREFERENCES, type Theme, type ThemePreference, } from './utils/theme.js';
|
|
95
95
|
export * as motion from './motion.js';
|
|
96
96
|
export type { Rung as MotionRung, Curve as MotionCurve } from './motion.js';
|
|
97
|
-
export declare const VERSION = "0.31.
|
|
97
|
+
export declare const VERSION = "0.31.1";
|
package/dist/index.js
CHANGED
|
@@ -104,4 +104,4 @@ export * as motion from './motion.js';
|
|
|
104
104
|
// ── Version ────────────────────────────────────────────────────────────────
|
|
105
105
|
// Generated from package.json by `pnpm version:sync`. Bump package.json, never
|
|
106
106
|
// this line; the build and the test suite fail when the two disagree.
|
|
107
|
-
export const VERSION = '0.31.
|
|
107
|
+
export const VERSION = '0.31.1';
|
package/package.json
CHANGED