@refinitiv-ui/elements 5.7.0 → 5.8.0

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 (161) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/lib/autosuggest/custom-elements.json +14 -4
  3. package/lib/autosuggest/custom-elements.md +21 -14
  4. package/lib/autosuggest/index.d.ts +4 -0
  5. package/lib/autosuggest/index.js +4 -0
  6. package/lib/calendar/custom-elements.json +4 -2
  7. package/lib/calendar/custom-elements.md +2 -2
  8. package/lib/calendar/index.d.ts +2 -0
  9. package/lib/calendar/index.js +2 -0
  10. package/lib/canvas/custom-elements.json +7 -5
  11. package/lib/canvas/custom-elements.md +8 -8
  12. package/lib/canvas/index.d.ts +1 -0
  13. package/lib/canvas/index.js +1 -0
  14. package/lib/card/custom-elements.json +3 -1
  15. package/lib/card/custom-elements.md +5 -5
  16. package/lib/card/index.d.ts +2 -0
  17. package/lib/card/index.js +2 -0
  18. package/lib/chart/custom-elements.json +1 -1
  19. package/lib/chart/custom-elements.md +4 -4
  20. package/lib/checkbox/custom-elements.json +8 -4
  21. package/lib/checkbox/custom-elements.md +2 -2
  22. package/lib/checkbox/index.d.ts +3 -1
  23. package/lib/checkbox/index.js +2 -0
  24. package/lib/clock/custom-elements.json +8 -4
  25. package/lib/clock/custom-elements.md +9 -9
  26. package/lib/clock/index.d.ts +2 -0
  27. package/lib/clock/index.js +2 -0
  28. package/lib/clock/themes/halo/dark/index.js +1 -1
  29. package/lib/clock/themes/halo/light/index.js +1 -1
  30. package/lib/clock/themes/solar/charcoal/index.js +1 -1
  31. package/lib/clock/themes/solar/pearl/index.js +1 -1
  32. package/lib/color-dialog/custom-elements.json +21 -8
  33. package/lib/color-dialog/custom-elements.md +22 -22
  34. package/lib/color-dialog/index.d.ts +8 -8
  35. package/lib/color-dialog/index.js +8 -8
  36. package/lib/combo-box/custom-elements.json +19 -10
  37. package/lib/combo-box/custom-elements.md +20 -20
  38. package/lib/combo-box/index.d.ts +10 -2
  39. package/lib/combo-box/index.js +10 -1
  40. package/lib/combo-box/themes/halo/dark/index.js +1 -1
  41. package/lib/combo-box/themes/halo/light/index.js +1 -1
  42. package/lib/combo-box/themes/solar/charcoal/index.js +1 -1
  43. package/lib/combo-box/themes/solar/pearl/index.js +1 -1
  44. package/lib/counter/custom-elements.json +8 -4
  45. package/lib/counter/custom-elements.md +4 -4
  46. package/lib/counter/index.d.ts +2 -0
  47. package/lib/counter/index.js +2 -0
  48. package/lib/datetime-picker/custom-elements.json +48 -19
  49. package/lib/datetime-picker/custom-elements.md +36 -28
  50. package/lib/datetime-picker/index.d.ts +15 -4
  51. package/lib/datetime-picker/index.js +15 -4
  52. package/lib/dialog/custom-elements.json +30 -8
  53. package/lib/dialog/custom-elements.md +16 -16
  54. package/lib/dialog/index.d.ts +7 -10
  55. package/lib/dialog/index.js +7 -10
  56. package/lib/email-field/custom-elements.json +80 -93
  57. package/lib/email-field/custom-elements.md +22 -20
  58. package/lib/email-field/index.d.ts +43 -115
  59. package/lib/email-field/index.js +44 -244
  60. package/lib/flag/custom-elements.md +4 -4
  61. package/lib/flag/index.d.ts +2 -0
  62. package/lib/flag/index.js +2 -0
  63. package/lib/icon/custom-elements.md +4 -4
  64. package/lib/icon/index.d.ts +2 -0
  65. package/lib/icon/index.js +2 -0
  66. package/lib/interactive-chart/custom-elements.json +6 -10
  67. package/lib/interactive-chart/custom-elements.md +6 -7
  68. package/lib/interactive-chart/index.d.ts +5 -2
  69. package/lib/interactive-chart/index.js +5 -2
  70. package/lib/item/custom-elements.json +8 -6
  71. package/lib/item/custom-elements.md +14 -14
  72. package/lib/item/index.d.ts +2 -1
  73. package/lib/item/index.js +2 -1
  74. package/lib/led-gauge/custom-elements.json +4 -4
  75. package/lib/led-gauge/custom-elements.md +2 -2
  76. package/lib/led-gauge/index.d.ts +1 -0
  77. package/lib/led-gauge/index.js +1 -0
  78. package/lib/list/custom-elements.json +18 -5
  79. package/lib/list/custom-elements.md +12 -10
  80. package/lib/list/helpers/list-renderer.js +2 -0
  81. package/lib/list/index.d.ts +19 -2
  82. package/lib/list/index.js +34 -1
  83. package/lib/multi-input/custom-elements.json +3 -2
  84. package/lib/multi-input/custom-elements.md +16 -16
  85. package/lib/multi-input/index.d.ts +4 -0
  86. package/lib/multi-input/index.js +4 -0
  87. package/lib/number-field/custom-elements.json +97 -52
  88. package/lib/number-field/custom-elements.md +27 -22
  89. package/lib/number-field/index.d.ts +92 -47
  90. package/lib/number-field/index.js +113 -80
  91. package/lib/overlay/custom-elements.json +23 -13
  92. package/lib/overlay/custom-elements.md +29 -29
  93. package/lib/overlay/elements/overlay.d.ts +5 -0
  94. package/lib/overlay-menu/custom-elements.json +66 -14
  95. package/lib/overlay-menu/custom-elements.md +19 -19
  96. package/lib/overlay-menu/index.d.ts +13 -11
  97. package/lib/overlay-menu/index.js +13 -11
  98. package/lib/password-field/custom-elements.json +62 -67
  99. package/lib/password-field/custom-elements.md +19 -11
  100. package/lib/password-field/index.d.ts +42 -94
  101. package/lib/password-field/index.js +48 -194
  102. package/lib/pill/custom-elements.json +4 -2
  103. package/lib/pill/custom-elements.md +1 -1
  104. package/lib/pill/index.d.ts +1 -1
  105. package/lib/pill/index.js +1 -1
  106. package/lib/radio-button/custom-elements.json +8 -6
  107. package/lib/radio-button/custom-elements.md +3 -3
  108. package/lib/radio-button/index.d.ts +6 -5
  109. package/lib/radio-button/index.js +5 -4
  110. package/lib/search-field/custom-elements.json +70 -74
  111. package/lib/search-field/custom-elements.md +24 -16
  112. package/lib/search-field/index.d.ts +43 -100
  113. package/lib/search-field/index.js +46 -215
  114. package/lib/select/custom-elements.json +3 -2
  115. package/lib/select/custom-elements.md +10 -10
  116. package/lib/select/index.d.ts +11 -3
  117. package/lib/select/index.js +65 -26
  118. package/lib/sidebar-layout/custom-elements.json +2 -6
  119. package/lib/sidebar-layout/custom-elements.md +5 -6
  120. package/lib/sidebar-layout/index.d.ts +2 -1
  121. package/lib/slider/custom-elements.json +2 -2
  122. package/lib/slider/custom-elements.md +1 -1
  123. package/lib/slider/index.d.ts +1 -1
  124. package/lib/slider/index.js +1 -1
  125. package/lib/sparkline/custom-elements.json +4 -4
  126. package/lib/sparkline/custom-elements.md +2 -2
  127. package/lib/sparkline/index.d.ts +3 -1
  128. package/lib/sparkline/index.js +2 -0
  129. package/lib/swing-gauge/custom-elements.json +5 -3
  130. package/lib/swing-gauge/custom-elements.md +11 -11
  131. package/lib/swing-gauge/index.d.ts +3 -1
  132. package/lib/swing-gauge/index.js +3 -1
  133. package/lib/text-field/custom-elements.json +76 -87
  134. package/lib/text-field/custom-elements.md +24 -26
  135. package/lib/text-field/index.d.ts +50 -92
  136. package/lib/text-field/index.js +81 -230
  137. package/lib/time-picker/custom-elements.md +3 -3
  138. package/lib/time-picker/index.d.ts +3 -0
  139. package/lib/time-picker/index.js +3 -0
  140. package/lib/toggle/custom-elements.json +4 -2
  141. package/lib/toggle/custom-elements.md +1 -1
  142. package/lib/toggle/index.d.ts +2 -1
  143. package/lib/toggle/index.js +1 -0
  144. package/lib/tree/custom-elements.json +2 -1
  145. package/lib/tree/custom-elements.md +1 -1
  146. package/lib/tree/elements/tree.d.ts +1 -0
  147. package/lib/tree/elements/tree.js +1 -0
  148. package/lib/tree/themes/halo/dark/index.js +1 -1
  149. package/lib/tree/themes/halo/light/index.js +1 -1
  150. package/lib/tree/themes/solar/charcoal/index.js +1 -1
  151. package/lib/tree/themes/solar/pearl/index.js +1 -1
  152. package/lib/tree-select/custom-elements.json +8 -4
  153. package/lib/tree-select/custom-elements.md +3 -3
  154. package/lib/tree-select/index.d.ts +5 -3
  155. package/lib/tree-select/index.js +3 -2
  156. package/lib/tree-select/themes/halo/dark/index.js +1 -1
  157. package/lib/tree-select/themes/halo/light/index.js +1 -1
  158. package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
  159. package/lib/tree-select/themes/solar/pearl/index.js +1 -1
  160. package/lib/version.js +1 -1
  161. package/package.json +10 -10
@@ -1,146 +1,56 @@
1
1
  import { __decorate } from "tslib";
2
- import { ControlElement, css, html } from '@refinitiv-ui/core';
2
+ import { html } from '@refinitiv-ui/core';
3
3
  import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
4
- import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
5
- import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
6
- import { ifDefined } from '@refinitiv-ui/core/lib/directives/if-defined.js';
7
- import { VERSION } from '../version.js';
8
- import { isIE } from '@refinitiv-ui/utils/lib/browser.js';
4
+ import { state } from '@refinitiv-ui/core/lib/decorators/state.js';
9
5
  import { preload } from '../icon/index.js';
6
+ import { TextField } from '../text-field/index.js';
10
7
  import '../icon/index.js';
11
- const hasChanged = (newVal, oldVal) => oldVal === undefined ? false : newVal !== oldVal;
8
+ import '@refinitiv-ui/phrasebook/lib/locale/en/password-field.js';
9
+ import { translate } from '@refinitiv-ui/translate';
12
10
  let isEyeOffPreloadRequested = false;
13
11
  /**
14
- * A form control element for password
12
+ * A form control element for password.
15
13
  *
16
14
  * @fires value-changed - Dispatched when value changes
17
15
  * @fires error-changed - Dispatched when error state changes
16
+ * @fires icon-click - Dispatched when icon is clicked
18
17
  *
19
- * @attr {string} value - Input's value
20
- * @prop {string} [value=] - Input's value
18
+ * @attr {boolean} disabled - Set disabled state
19
+ * @prop {boolean} [disabled=false] - Set disabled state
20
+ *
21
+ * @attr {boolean} error - Set error state
22
+ * @prop {boolean} [error=false] - Set error state
23
+ *
24
+ * @attr {number} maxlength - Set character max limit
25
+ * @prop {number | null} [maxLength=null] - Set character max limit
26
+ *
27
+ * @attr {number} minlength - Set character min limit
28
+ * @prop {number | null} [minLength=null] - Set character min limit
29
+ *
30
+ * @prop {string} [pattern=""] - Set regular expression for input validation
31
+ *
32
+ * @attr {string} placeholder - Set placeholder text
33
+ * @prop {string} [placeholder=""] - Set placeholder text
21
34
  *
22
35
  * @attr {boolean} readonly - Set readonly state
23
36
  * @prop {boolean} [readonly=false] - Set readonly state
24
37
  *
25
- * @attr {boolean} disabled - Set disabled state
26
- * @prop {boolean} [disabled=false] - Set disabled state
38
+ * @attr {boolean} transparent - Disables all other states and border/background styles.
39
+ * @prop {boolean} [transparent=false] - Disables all other states and border/background styles.
40
+ *
41
+ * @attr {boolean} warning - Set warning state
42
+ * @prop {boolean} [warning=false] - Set warning state
43
+ *
44
+ * @attr {string} value - Input's value
45
+ * @prop {string} [value=""] - Input's value
27
46
  */
28
- let PasswordField = class PasswordField extends ControlElement {
47
+ let PasswordField = class PasswordField extends TextField {
29
48
  constructor() {
30
49
  super(...arguments);
31
- /**
32
- * Set regular expression for input validation
33
- */
34
- this.pattern = '';
35
- /**
36
- * Set placeholder text
37
- */
38
- this.placeholder = '';
39
- /**
40
- * Set state to error
41
- */
42
- this.error = false;
43
- /**
44
- * Set state to warning
45
- */
46
- this.warning = false;
47
- /**
48
- * Disables all other states and border/background styles.
49
- * Use with advanced composite elements requiring e.g. multi selection in
50
- * combo-box when parent container handles element states.
51
- */
52
- this.transparent = false;
53
- /**
54
- * Set character minimum limit
55
- */
56
- this.minLength = null;
57
- /**
58
- * Set character maximum limit
59
- */
60
- this.maxLength = null;
61
50
  /**
62
51
  * Defines whether password is visible or not
63
52
  */
64
53
  this.isPasswordVisible = false;
65
- /**
66
- * check if value is changed and fire event
67
- * @return {void}
68
- */
69
- this.onPossibleValueChange = () => {
70
- const value = this.inputElement.value;
71
- this.setValueAndNotify(value);
72
- };
73
- /**
74
- * validate input according `pattern`, `min` and `max` properties
75
- * change state of `error` property according pattern validation
76
- * @return void
77
- */
78
- this.validateInput = () => {
79
- let error = !this.inputElement.checkValidity();
80
- if (this.shouldValidateForMinLength(error)) {
81
- error = !!this.minLength && (this.minLength > this.value.length);
82
- }
83
- if (this.error !== error) {
84
- this.error = error;
85
- this.notifyPropertyChange('error', this.error);
86
- }
87
- };
88
- /**
89
- * Detect `enter` and `space` keydown and fire
90
- * @param event keydown event
91
- * @returns {void}
92
- */
93
- this.handleKeyDown = (event) => {
94
- if (event.key === 'Spacebar' || event.key === ' ' || event.key === 'Enter') {
95
- this.togglePasswordVisibility();
96
- }
97
- };
98
- }
99
- /**
100
- * Element version number
101
- * @returns version number
102
- */
103
- static get version() {
104
- return VERSION;
105
- }
106
- /**
107
- * A `CSSResultGroup` that will be used to style the host,
108
- * slotted children and the internal template of the element.
109
- * @return CSS template
110
- */
111
- static get styles() {
112
- return css `
113
- :host {
114
- display: inline-block;
115
- }
116
- :host(:focus), :host input:focus {
117
- outline: none;
118
- }
119
- [part=input] {
120
- font: inherit;
121
- background: none;
122
- color: currentColor;
123
- border: none;
124
- text-align: inherit;
125
- }
126
- :host [part=icon]{
127
- display: flex;
128
- outline: none;
129
- }
130
- :host([transparent]) {
131
- background: none !important;
132
- border: none !important;
133
- }
134
- `;
135
- }
136
- /**
137
- * Select the contents of input
138
- * @return void
139
- */
140
- select() {
141
- if (!this.disabled && !this.readonly) {
142
- this.inputElement.select();
143
- }
144
54
  }
145
55
  /**
146
56
  * Called when the element’s DOM has been updated and rendered for the first time
@@ -155,101 +65,45 @@ let PasswordField = class PasswordField extends ControlElement {
155
65
  }
156
66
  }
157
67
  /**
158
- * Called when the element’s DOM has been updated and rendered
159
- * @param changedProperties Properties that has changed
160
- * @return shouldUpdate
68
+ * Decorate `<input>` element with common properties extended from text-field:
69
+ * type="text|password" - text if password is visible
70
+ * @returns template map
161
71
  */
162
- updated(changedProperties) {
163
- super.updated(changedProperties);
164
- if (this.inputElement.value !== this.value) {
165
- this.inputElement.value = this.value;
166
- }
167
- if (this.shouldValidateInput(changedProperties)) {
168
- this.validateInput();
169
- }
72
+ get decorateInputMap() {
73
+ return Object.assign(Object.assign({}, super.decorateInputMap), { 'type': this.isPasswordVisible ? 'text' : 'password' });
170
74
  }
171
75
  /**
172
- * A `TemplateResult` that will be used
173
- * to render the updated internal template.
174
- * @return Render template
76
+ * Renders icon element
77
+ * @returns {void}
175
78
  */
176
- render() {
79
+ renderIcon() {
177
80
  return html `
178
- <input
179
- type=${this.isPasswordVisible ? 'text' : 'password'}
180
- part="input"
181
- ?readonly="${this.readonly}"
182
- ?disabled="${this.disabled}"
183
- placeholder="${ifDefined(this.placeholder || undefined)}"
184
- minlength="${ifDefined(this.minLength || undefined)}"
185
- maxlength="${ifDefined(this.maxLength || undefined)}"
186
- pattern="${ifDefined(this.pattern || undefined)}"
187
- @input="${this.onPossibleValueChange}"
188
- @change="${this.onPossibleValueChange}"
189
- autocomplete="off"
190
- />
191
81
  <ef-icon
82
+ part="icon"
83
+ role="button"
84
+ tabindex="0"
85
+ aria-label="${this.isPasswordVisible ? this.t('HIDE_PASSWORD') : this.t('SHOW_PASSWORD')}"
192
86
  icon=${this.isPasswordVisible ? 'eye-off' : 'eye'}
193
87
  ?readonly="${this.readonly}"
194
88
  ?disabled="${this.disabled}"
195
89
  @tap="${this.togglePasswordVisibility}"
196
- @keydown="${this.handleKeyDown}"
197
- part="icon"
198
- tabindex="0"
199
90
  ></ef-icon>
200
91
  `;
201
92
  }
202
- /**
203
- * Check if input should be re-validated
204
- * True if value changed and pattern or minlength is present
205
- * True if pattern or minlength changed
206
- * @param changedProperties Properties that has changed
207
- * @return True if input should be re-validated
208
- */
209
- shouldValidateInput(changedProperties) {
210
- return (changedProperties.has('pattern') || !!(this.pattern && changedProperties.has('value')))
211
- || (changedProperties.has('minLength') || !!(this.minLength && changedProperties.has('value')));
212
- }
213
- /**
214
- * @param error existing state of error
215
- * @returns true if there is no error and browser is IE11 and minLength more than 0 and value exists
216
- */
217
- shouldValidateForMinLength(error) {
218
- return !!(!error && isIE && this.minLength && !!this.value);
219
- }
220
93
  /**
221
94
  * Toggles password visibility state
222
95
  * @return void
223
96
  */
224
97
  togglePasswordVisibility() {
225
98
  this.isPasswordVisible = !this.isPasswordVisible;
226
- this.requestUpdate();
227
99
  }
228
100
  };
229
101
  __decorate([
230
- property({ type: String, hasChanged })
231
- ], PasswordField.prototype, "pattern", void 0);
232
- __decorate([
233
- property({ type: String })
234
- ], PasswordField.prototype, "placeholder", void 0);
235
- __decorate([
236
- property({ type: Boolean, reflect: true })
237
- ], PasswordField.prototype, "error", void 0);
238
- __decorate([
239
- property({ type: Boolean, reflect: true })
240
- ], PasswordField.prototype, "warning", void 0);
241
- __decorate([
242
- property({ type: Boolean, reflect: true })
243
- ], PasswordField.prototype, "transparent", void 0);
244
- __decorate([
245
- property({ type: Number, attribute: 'minlength', reflect: true, hasChanged })
246
- ], PasswordField.prototype, "minLength", void 0);
247
- __decorate([
248
- property({ type: Number, attribute: 'maxlength', reflect: true })
249
- ], PasswordField.prototype, "maxLength", void 0);
102
+ translate({ scope: 'ef-password-field' })
103
+ ], PasswordField.prototype, "t", void 0);
250
104
  __decorate([
251
- query('[part="input"]')
252
- ], PasswordField.prototype, "inputElement", void 0);
105
+ state()
106
+ ], PasswordField.prototype, "isPasswordVisible", void 0);
253
107
  PasswordField = __decorate([
254
108
  customElement('ef-password-field', {
255
109
  alias: 'coral-password-field'
@@ -26,7 +26,8 @@
26
26
  {
27
27
  "name": "value",
28
28
  "description": "Value of pill",
29
- "type": "string"
29
+ "type": "string",
30
+ "default": "\"\""
30
31
  },
31
32
  {
32
33
  "name": "readonly",
@@ -67,7 +68,8 @@
67
68
  "name": "value",
68
69
  "attribute": "value",
69
70
  "description": "Value of pill",
70
- "type": "string"
71
+ "type": "string",
72
+ "default": "\"\""
71
73
  },
72
74
  {
73
75
  "name": "readonly",
@@ -13,7 +13,7 @@ It is rarely used in the UI but inside other components to visualize multiple it
13
13
  | `disabled` | `disabled` | `boolean` | false | Set disabled state |
14
14
  | `readonly` | `readonly` | `boolean` | false | Set readonly state |
15
15
  | `toggles` | `toggles` | `boolean` | false | Set pill to toggle mode |
16
- | `value` | `value` | `string` | | Value of pill |
16
+ | `value` | `value` | `string` | "" | Value of pill |
17
17
 
18
18
  ## Events
19
19
 
@@ -6,7 +6,7 @@ import '../icon/index.js';
6
6
  * which is used to show one or multiple selected item.
7
7
  * It is rarely used in the UI but inside other components to visualize multiple item selection item.
8
8
  * @attr {string} value - Value of pill
9
- * @prop {string} value - Value of pill
9
+ * @prop {string} [value=""] - Value of pill
10
10
  *
11
11
  * @attr {boolean} readonly - Set readonly state
12
12
  * @prop {boolean} [readonly=false] - Set readonly state
package/lib/pill/index.js CHANGED
@@ -10,7 +10,7 @@ import '../icon/index.js';
10
10
  * which is used to show one or multiple selected item.
11
11
  * It is rarely used in the UI but inside other components to visualize multiple item selection item.
12
12
  * @attr {string} value - Value of pill
13
- * @prop {string} value - Value of pill
13
+ * @prop {string} [value=""] - Value of pill
14
14
  *
15
15
  * @attr {boolean} readonly - Set readonly state
16
16
  * @prop {boolean} [readonly=false] - Set readonly state
@@ -8,19 +8,20 @@
8
8
  {
9
9
  "name": "checked",
10
10
  "description": "Radio button checked state",
11
- "type": "boolean"
11
+ "type": "boolean",
12
+ "default": "false"
12
13
  },
13
14
  {
14
15
  "name": "value",
15
16
  "description": "Value of the radio button",
16
17
  "type": "string",
17
- "default": "0"
18
+ "default": "\"\""
18
19
  },
19
20
  {
20
21
  "name": "name",
21
22
  "description": "Group multiple radio buttons by assigning the same name",
22
23
  "type": "string",
23
- "default": "0"
24
+ "default": "\"\""
24
25
  },
25
26
  {
26
27
  "name": "readonly",
@@ -40,21 +41,22 @@
40
41
  "name": "checked",
41
42
  "attribute": "checked",
42
43
  "description": "Radio button checked state",
43
- "type": "boolean"
44
+ "type": "boolean",
45
+ "default": "false"
44
46
  },
45
47
  {
46
48
  "name": "value",
47
49
  "attribute": "value",
48
50
  "description": "Value of the radio button",
49
51
  "type": "string",
50
- "default": "0"
52
+ "default": "\"\""
51
53
  },
52
54
  {
53
55
  "name": "name",
54
56
  "attribute": "name",
55
57
  "description": "Group multiple radio buttons by assigning the same name",
56
58
  "type": "string",
57
- "default": "0"
59
+ "default": "\"\""
58
60
  },
59
61
  {
60
62
  "name": "readonly",
@@ -6,11 +6,11 @@ Basic radio button
6
6
 
7
7
  | Property | Attribute | Type | Default | Description |
8
8
  |------------|------------|-----------|---------|--------------------------------------------------|
9
- | `checked` | `checked` | `boolean` | | Radio button checked state |
9
+ | `checked` | `checked` | `boolean` | false | Radio button checked state |
10
10
  | `disabled` | `disabled` | `boolean` | false | Set disabled state |
11
- | `name` | `name` | `string` | 0 | Group multiple radio buttons by assigning the same name |
11
+ | `name` | `name` | `string` | "" | Group multiple radio buttons by assigning the same name |
12
12
  | `readonly` | `readonly` | `boolean` | false | Set readonly state |
13
- | `value` | `value` | `string` | 0 | Value of the radio button |
13
+ | `value` | `value` | `string` | "" | Value of the radio button |
14
14
 
15
15
  ## Events
16
16
 
@@ -5,11 +5,11 @@ import { CSSResultGroup, ControlElement, TemplateResult, PropertyValues } from '
5
5
  *
6
6
  * @fires checked-changed - Fired when the `checked` property changes.
7
7
  *
8
- * @attr {string} [value=] - Value of the radio button
9
- * @prop {string} [value=] - Value of the radio button
8
+ * @attr {string} value - Value of the radio button
9
+ * @prop {string} [value=""] - Value of the radio button
10
10
  *
11
- * @attr {string} [name=] - Group multiple radio buttons by assigning the same name
12
- * @prop {string} [name=] - Group multiple radio buttons by assigning the same name
11
+ * @attr {string} name - Group multiple radio buttons by assigning the same name
12
+ * @prop {string} [name=""] - Group multiple radio buttons by assigning the same name
13
13
  *
14
14
  * @attr {boolean} readonly - Set readonly state
15
15
  * @prop {boolean} [readonly=false] - Set readonly state
@@ -23,7 +23,7 @@ export declare class RadioButton extends ControlElement {
23
23
  * @returns version number
24
24
  */
25
25
  static get version(): string;
26
- protected readonly defaultRole = "radio";
26
+ protected readonly defaultRole: string | null;
27
27
  /**
28
28
  * A `CSSResultGroup` that will be used
29
29
  * to style the host, slotted children
@@ -35,6 +35,7 @@ export declare class RadioButton extends ControlElement {
35
35
  /**
36
36
  * Radio button checked state
37
37
  * @param value checked state
38
+ * @default false
38
39
  * @returns {void}
39
40
  */
40
41
  set checked(value: boolean);
@@ -11,11 +11,11 @@ import { applyRegistry, removeFromRegistry, getRadioGroup } from './radio-button
11
11
  *
12
12
  * @fires checked-changed - Fired when the `checked` property changes.
13
13
  *
14
- * @attr {string} [value=] - Value of the radio button
15
- * @prop {string} [value=] - Value of the radio button
14
+ * @attr {string} value - Value of the radio button
15
+ * @prop {string} [value=""] - Value of the radio button
16
16
  *
17
- * @attr {string} [name=] - Group multiple radio buttons by assigning the same name
18
- * @prop {string} [name=] - Group multiple radio buttons by assigning the same name
17
+ * @attr {string} name - Group multiple radio buttons by assigning the same name
18
+ * @prop {string} [name=""] - Group multiple radio buttons by assigning the same name
19
19
  *
20
20
  * @attr {boolean} readonly - Set readonly state
21
21
  * @prop {boolean} [readonly=false] - Set readonly state
@@ -74,6 +74,7 @@ let RadioButton = class RadioButton extends ControlElement {
74
74
  /**
75
75
  * Radio button checked state
76
76
  * @param value checked state
77
+ * @default false
77
78
  * @returns {void}
78
79
  */
79
80
  set checked(value) {