@onsvisual/svelte-components 0.1.26 → 0.1.28

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.
@@ -5,11 +5,13 @@ export default class Checkbox extends SvelteComponentTyped<{
5
5
  id: string;
6
6
  label: string;
7
7
  compact?: boolean;
8
+ value?: any;
8
9
  description?: string;
10
+ name?: string;
9
11
  variant?: "default" | "ghost";
10
12
  disabled?: boolean;
11
13
  checked?: boolean;
12
- group?: boolean;
14
+ group?: any[];
13
15
  }, {
14
16
  change: CustomEvent<any>;
15
17
  } & {
@@ -25,11 +27,13 @@ declare const __propDef: {
25
27
  id: string;
26
28
  label: string;
27
29
  compact?: boolean;
30
+ value?: string | object;
28
31
  description?: string;
32
+ name?: string | null;
29
33
  variant?: "default" | "ghost";
30
34
  disabled?: boolean;
31
35
  checked?: boolean;
32
- group?: boolean;
36
+ group?: any[];
33
37
  };
34
38
  events: {
35
39
  change: CustomEvent<any>;
@@ -8,6 +8,16 @@
8
8
  * @type {string}
9
9
  */
10
10
  export let id;
11
+ /**
12
+ * Name of checkbox group (optional)
13
+ * @type {string|null}
14
+ */
15
+ export let name = null;
16
+ /**
17
+ * Value for input element (defaults to ID)
18
+ * @type {string|object}
19
+ */
20
+ export let value = id;
11
21
  /**
12
22
  * Label for input
13
23
  * @type {string}
@@ -20,9 +30,9 @@
20
30
  export let checked = false;
21
31
  /**
22
32
  * Binding for checked state of input
23
- * @type {boolean}
33
+ * @type {array}
24
34
  */
25
- export let group = null;
35
+ export let group = [];
26
36
  /**
27
37
  * (Optional) Extended description for element
28
38
  * @type {string}
@@ -55,7 +65,8 @@
55
65
  <input
56
66
  type="checkbox"
57
67
  id="{id}"
58
- value="{id}"
68
+ name="{name}"
69
+ value="{value}"
59
70
  bind:group="{group}"
60
71
  class="ons-checkbox__input ons-js-checkbox"
61
72
  disabled="{disabled}"
@@ -66,7 +77,8 @@
66
77
  <input
67
78
  type="checkbox"
68
79
  id="{id}"
69
- value="{id}"
80
+ name="{name}"
81
+ value="{value}"
70
82
  bind:checked="{checked}"
71
83
  class="ons-checkbox__input ons-js-checkbox"
72
84
  disabled="{disabled}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "homepage": "https://onsvisual.github.io/svelte-components",