@lyeve-labs/ui-kit 0.35.0 → 0.35.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.
@@ -93,7 +93,13 @@
93
93
  // is what stops a real click, and it is the only thing that does, so a
94
94
  // change arriving any other way (a synthetic event, a script driving the
95
95
  // node) would still move the bound value with nothing on screen to say so.
96
- if (disabled) return;
96
+ // bind:checked has already taken the input's new state, so a disabled box
97
+ // puts the input and the value back.
98
+ if (disabled) {
99
+ e.currentTarget.checked = !e.currentTarget.checked;
100
+ checked = e.currentTarget.checked;
101
+ return;
102
+ }
97
103
  // The DOM clears indeterminate on the first click. Leaving the prop set
98
104
  // would repaint the mixed bar over a box the user has just ticked.
99
105
  indeterminate = false;
@@ -102,6 +108,10 @@
102
108
  }
103
109
  </script>
104
110
 
111
+ <!-- bind:checked and not {checked}: a visitor can tick the box before the
112
+ page hydrates. A one-way prop is written over the input when the page
113
+ hydrates and clears that tick. The binding reads the input's live state
114
+ instead, the same way the browser kept it. -->
105
115
  {#snippet control()}
106
116
  <input
107
117
  type="checkbox"
@@ -110,7 +120,7 @@
110
120
  {value}
111
121
  {required}
112
122
  {disabled}
113
- {checked}
123
+ bind:checked
114
124
  {indeterminate}
115
125
  aria-checked={indeterminate ? 'mixed' : undefined}
116
126
  aria-invalid={error ? 'true' : undefined}
package/dist/index.d.ts CHANGED
@@ -100,4 +100,4 @@ export { cn, type ClassValue } from './utils/cn.js';
100
100
  export { getTheme, getThemePreference, nextThemePreference, resolveTheme, setTheme, setThemePreference, systemTheme, themeBootScript, watchThemePreference, toggleTheme, watchSystemTheme, THEME_PREFERENCES, type Theme, type ThemePreference, } from './utils/theme.js';
101
101
  export * as motion from './motion.js';
102
102
  export type { Rung as MotionRung, Curve as MotionCurve } from './motion.js';
103
- export declare const VERSION = "0.35.0";
103
+ export declare const VERSION = "0.35.1";
package/dist/index.js CHANGED
@@ -108,4 +108,4 @@ export * as motion from './motion.js';
108
108
  // ── Version ────────────────────────────────────────────────────────────────
109
109
  // Generated from package.json by `pnpm version:sync`. Bump package.json, never
110
110
  // this line. The build and the test suite fail when the two disagree.
111
- export const VERSION = '0.35.0';
111
+ export const VERSION = '0.35.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyeve-labs/ui-kit",
3
- "version": "0.35.0",
3
+ "version": "0.35.1",
4
4
  "description": "A clean, accessible, palette-aware Svelte 5 component library. The design system behind LyEve.",
5
5
  "license": "MIT",
6
6
  "author": "LyEve Labs <hello@lyeve.com>",