@kws3/ui 2.1.2 → 2.1.3

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.
package/CHANGELOG.mdx CHANGED
@@ -1,3 +1,7 @@
1
+ # 2.1.3
2
+ - `PasswordInput` - add support for field `autocomplete` and `required`
3
+ - `PasswordValidator` - fix `valid` field binding
4
+
1
5
  # 2.1.2
2
6
  - `PasswordInput` - add support for field `name`
3
7
  - `PasswordInput` - fix spacing when icons are turned off
@@ -26,6 +26,8 @@ This property can be bound to, to fetch the current value, Default: ``
26
26
  @param {ColorOptions} [color=] - Colour of the PasswordInput, Default: ``
27
27
  @param {string} [style=""] - Inline CSS for the PasswordInput, Default: `""`
28
28
  @param {boolean} [disabled=false] - Disables the PasswordInput, Default: `false`
29
+ @param {boolean} [required=false] - Whether Input is required or not, Default: `false`
30
+ @param {string} [autocomplete="on"] - Whether autocompletion turned off or on, Default: `"on"`
29
31
  @param {string} [placeholder=""] - Input placeholder, Default: `""`
30
32
  @param {string} [name="password"] - Input HTML name, Default: `"password"`
31
33
  @param {string} [class=""] - CSS classes of the PasswordInput, Default: `""`
@@ -52,6 +54,8 @@ This property can be bound to, to fetch the current value, Default: ``
52
54
  bind:this={PASSWORD_INPUT}
53
55
  {style}
54
56
  bind:value
57
+ {autocomplete}
58
+ {required}
55
59
  class="input is-{size} is-{color} {klass} {style}"
56
60
  on:focus
57
61
  on:blur
@@ -198,6 +202,16 @@ This property can be bound to, to fetch the current value, Default: ``
198
202
  * @type {boolean}
199
203
  */
200
204
  export let disabled = false;
205
+ /**
206
+ * Whether Input is required or not
207
+ * @type {boolean}
208
+ */
209
+ export let required = false;
210
+ /**
211
+ * Whether autocompletion turned off or on
212
+ * @type {string}
213
+ */
214
+ export let autocomplete = "on";
201
215
  /**
202
216
  * Input placeholder
203
217
  * @type {string}
@@ -210,11 +210,7 @@ Should be used with `bind` from parent component, Default: `false`
210
210
 
211
211
  $: result = validate(password, sanitizedOptions);
212
212
 
213
- $: {
214
- if (result.overall) {
215
- valid = true;
216
- }
217
- }
213
+ $: valid = result && result.overall;
218
214
 
219
215
  function getSanitizedCustomRules(cr) {
220
216
  return cr.map((el) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kws3/ui",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "UI components for use with Svelte v3 applications.",
5
5
  "main": "index.js",
6
6
  "svelte": "index.js",
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "typescript": "^5.0.4"
37
37
  },
38
- "gitHead": "6e176377097da881f3ee68c763f007020b35cb2a"
38
+ "gitHead": "021ed6b77f9600a544b6fe567104887a0a3f0358"
39
39
  }