@onsvisual/svelte-components 1.1.22 → 1.1.24

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.
@@ -29,10 +29,10 @@
29
29
  */
30
30
  export let disabled = false;
31
31
  /**
32
- * Optional: Define the item as an object in the form {id, label, description?}
32
+ * Optional: Define the item as an object in the form {id, label, description?, checked?}
33
33
  * @type {object}
34
34
  */
35
- export let item = { id, label, description, checked, disabled };
35
+ export let item = { id, label, description, checked };
36
36
  /**
37
37
  * Optional: Name of checkbox group
38
38
  * @type {string|null}
@@ -122,8 +122,8 @@
122
122
  value={item}
123
123
  bind:checked={item.checked}
124
124
  class="ons-checkbox__input ons-js-checkbox"
125
- disabled={item.disabled}
126
- aria-disabled={item.disabled}
125
+ {disabled}
126
+ aria-disabled={disabled}
127
127
  on:change={doChange}
128
128
  bind:this={el}
129
129
  />
@@ -57,12 +57,12 @@
57
57
  <select
58
58
  {id}
59
59
  {name}
60
- class="ons-input ons-input--select {Number.isInteger(width)
61
- ? `ons-input--w-${width}`
62
- : ''}"
60
+ class="ons-input ons-input--select {Number.isInteger(width) ? `ons-input--w-${width}` : ''}"
63
61
  style:width={typeof width === "string" ? width : null}
64
62
  bind:value
65
- on:change={(e) => dispatch("change", e)}
63
+ on:change={(e) => dispatch("change", { value, e })}
64
+ on:input={(e) => dispatch("input", { value, e })}
65
+ on:blur={(e) => dispatch("blur", { value, e })}
66
66
  >
67
67
  {#if placeholder}
68
68
  <option value={null} selected disabled>{placeholder}</option>
@@ -77,4 +77,4 @@
77
77
  .ons-input--select {
78
78
  width: 100%;
79
79
  }
80
- </style>
80
+ </style>
@@ -13,6 +13,8 @@ export default class Dropdown extends SvelteComponentTyped<{
13
13
  options?: object[] | undefined;
14
14
  }, {
15
15
  change: CustomEvent<any>;
16
+ input: CustomEvent<any>;
17
+ blur: CustomEvent<any>;
16
18
  } & {
17
19
  [evt: string]: CustomEvent<any>;
18
20
  }, {}> {
@@ -35,6 +37,8 @@ declare const __propDef: {
35
37
  };
36
38
  events: {
37
39
  change: CustomEvent<any>;
40
+ input: CustomEvent<any>;
41
+ blur: CustomEvent<any>;
38
42
  } & {
39
43
  [evt: string]: CustomEvent<any>;
40
44
  };
@@ -121,7 +121,9 @@
121
121
  aria-labelledby="{id} {id}-unit"
122
122
  aria-describedby={description ? `${id}-description-hint` : null}
123
123
  {disabled}
124
- on:change={(e) => dispatch("change", e)}
124
+ on:change={(e) => dispatch("change", { value, e })}
125
+ on:input={(e) => dispatch("input", { value, e })}
126
+ on:blur={(e) => dispatch("blur", { value, e })}
125
127
  />
126
128
  <abbr
127
129
  id="{id}-unit"
@@ -147,7 +149,9 @@
147
149
  class:ons-input--error={error}
148
150
  aria-describedby={description ? `${id}-description-hint` : null}
149
151
  {disabled}
150
- on:change={(e) => dispatch("change", e)}
152
+ on:change={(e) => dispatch("change", { value, e })}
153
+ on:input={(e) => dispatch("input", { value, e })}
154
+ on:blur={(e) => dispatch("blur", { value, e })}
151
155
  />
152
156
  {/if}
153
157
  </div>
@@ -156,4 +160,4 @@
156
160
  .ons-input--text {
157
161
  width: 100%;
158
162
  }
159
- </style>
163
+ </style>
@@ -20,6 +20,8 @@ export default class Input extends SvelteComponentTyped<{
20
20
  unitLabel?: string | undefined;
21
21
  }, {
22
22
  change: CustomEvent<any>;
23
+ input: CustomEvent<any>;
24
+ blur: CustomEvent<any>;
23
25
  } & {
24
26
  [evt: string]: CustomEvent<any>;
25
27
  }, {}> {
@@ -49,6 +51,8 @@ declare const __propDef: {
49
51
  };
50
52
  events: {
51
53
  change: CustomEvent<any>;
54
+ input: CustomEvent<any>;
55
+ blur: CustomEvent<any>;
52
56
  } & {
53
57
  [evt: string]: CustomEvent<any>;
54
58
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "1.1.22",
3
+ "version": "1.1.24",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "npm run build:package && npm run build:docs",