@geoffcox/sterling-svelte 2.0.12 → 2.0.13

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.
Files changed (2) hide show
  1. package/dist/Radio.svelte +16 -1
  2. package/package.json +1 -1
package/dist/Radio.svelte CHANGED
@@ -13,6 +13,7 @@
13
13
  class: _class,
14
14
  disabled = false,
15
15
  group = $bindable(),
16
+ value,
16
17
  ...rest
17
18
  }: RadioProps = $props();
18
19
 
@@ -24,6 +25,11 @@
24
25
  }
25
26
  });
26
27
 
28
+ $effect(() => {
29
+ // checked isn't set by input type="radio"
30
+ checked = group === value;
31
+ });
32
+
27
33
  // ----- Methods ----- //
28
34
 
29
35
  export const blur = () => {
@@ -50,7 +56,16 @@
50
56
  class:using-keyboard={$usingKeyboard}
51
57
  >
52
58
  <div class="container">
53
- <input bind:this={inputRef} {checked} {disabled} bind:group {id} type="radio" {...rest} />
59
+ <input
60
+ bind:this={inputRef}
61
+ {checked}
62
+ {disabled}
63
+ bind:group
64
+ {id}
65
+ type="radio"
66
+ {value}
67
+ {...rest}
68
+ />
54
69
  <div class="indicator"></div>
55
70
  </div>
56
71
  {#if children}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geoffcox/sterling-svelte",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "author": "Geoff Cox",
5
5
  "description": "A modern, accessible, and lightweight component library for Svelte.",
6
6
  "license": "MIT",