@kubex/zinc 1.1.106 → 1.1.107

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubex/zinc",
3
- "version": "1.1.106",
3
+ "version": "1.1.107",
4
4
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
5
5
  "keywords": [
6
6
  "web components",
@@ -9,6 +9,7 @@ import {
9
9
  usStateDataProvider,
10
10
  } from "./providers/provider";
11
11
  import {type CSSResultGroup, html, nothing, type PropertyValues, unsafeCSS} from 'lit';
12
+ import {defaultValue} from "../../internal/default-value";
12
13
  import {FormControlController} from "../../internal/form";
13
14
  import {MutationController} from '@lit-labs/observers/mutation-controller.js';
14
15
  import {property, query} from 'lit/decorators.js';
@@ -72,6 +73,9 @@ export default class ZnDataSelect extends ZincElement implements ZincFormControl
72
73
  }
73
74
  }) value: string | string[] = '';
74
75
 
76
+ /** The default value of the form control. Primarily used for resetting the form control. */
77
+ @defaultValue() defaultValue: string | string[] = '';
78
+
75
79
  /** The provider of the select. */
76
80
  @property() provider: 'color' | 'currency' | 'country' | 'phone' | 'us-state';
77
81
 
@@ -1,4 +1,5 @@
1
1
  import {type CSSResultGroup, html, type PropertyValues, unsafeCSS} from 'lit';
2
+ import {defaultValue} from "../../internal/default-value";
2
3
  import {FormControlController} from "../../internal/form";
3
4
  import {property, query} from 'lit/decorators.js';
4
5
  import ZincElement from '../../internal/zinc-element';
@@ -40,6 +41,9 @@ export default class ZnLinkedSelect extends ZincElement implements ZincFormContr
40
41
  @property() name: string = "";
41
42
  @property() value: string;
42
43
 
44
+ /** The default value of the form control. Primarily used for resetting the form control. */
45
+ @defaultValue() defaultValue: string = '';
46
+
43
47
  @property({type: Boolean, reflect: true}) checked = false;
44
48
  @property({type: Array}) options: linkedSelectOptions;
45
49
  @property({attribute: 'linked-select'}) linkedSelect: string = "";
@@ -1,5 +1,6 @@
1
1
  import {classMap} from "lit/directives/class-map.js";
2
2
  import {type CSSResultGroup, html, unsafeCSS} from 'lit';
3
+ import {defaultValue} from "../../internal/default-value";
3
4
  import {FormControlController, validValidityState} from "../../internal/form";
4
5
  import {HasSlotController} from "../../internal/slot";
5
6
  import {property, query, state} from 'lit/decorators.js';
@@ -61,6 +62,9 @@ export default class ZnRating extends ZincElement implements ZincFormControl {
61
62
 
62
63
  @property({type: Number}) value: number = 0;
63
64
 
65
+ /** The default value of the form control. Primarily used for resetting the form control. */
66
+ @defaultValue() defaultValue: number = 0;
67
+
64
68
  @property({type: Number}) max: number = 5;
65
69
 
66
70
  @property({type: Number}) precision: number = 1;