@colletdev/core 0.1.6 → 0.1.7

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.
@@ -23,7 +23,7 @@
23
23
  import { initWasm, loadSharedStyles, loadInlineSharedStyles, loadMotionStyles, loadInlineMotionStyles, injectTokensToHead, injectFoucPrevention, CxElement, CxFormElement } from '../src/runtime.js';
24
24
 
25
25
  // Package version — used for CDN fallback URL
26
- const PKG_VERSION = '0.1.5';
26
+ const PKG_VERSION = '0.1.6';
27
27
 
28
28
  // ─── Lazy WASM + CSS ───
29
29
  // WASM glue and CSS strings are NOT imported at module level.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colletdev/core",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Rust/WASM Custom Elements — 48 production-grade UI components",
5
5
  "type": "module",
6
6
  "main": "generated/index.js",
package/src/runtime.js CHANGED
@@ -785,9 +785,11 @@ export class CxFormElement extends CxElement {
785
785
  get value() { return this.getAttribute?.('value') ?? ''; }
786
786
  set value(v) { if (v == null) this.removeAttribute('value'); else this.setAttribute('value', String(v)); }
787
787
  get disabled() { return this.hasAttribute('disabled'); }
788
- set disabled(v) { if (v) this.setAttribute('disabled', ''); else this.removeAttribute('disabled'); }
788
+ // React 19 sets boolean DOM properties directly (element.disabled = "").
789
+ // Empty string "" is falsy — must check explicitly for false/null/undefined.
790
+ set disabled(v) { if (v === false || v == null) this.removeAttribute('disabled'); else this.setAttribute('disabled', ''); }
789
791
  get required() { return this.hasAttribute('required'); }
790
- set required(v) { if (v) this.setAttribute('required', ''); else this.removeAttribute('required'); }
792
+ set required(v) { if (v === false || v == null) this.removeAttribute('required'); else this.setAttribute('required', ''); }
791
793
  get validity() { return this.#internals?.validity ?? null; }
792
794
  get validationMessage() { return this.#internals?.validationMessage ?? ''; }
793
795
  get willValidate() { return this.#internals?.willValidate ?? false; }