@aurodesignsystem/auro-formkit 1.6.0-beta.10 → 1.6.0-beta.11

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 (217) hide show
  1. package/.turbo/cache/013a48308b893dac-meta.json +1 -1
  2. package/.turbo/cache/0593477832b1052b-meta.json +1 -0
  3. package/.turbo/cache/0593477832b1052b.tar.zst +0 -0
  4. package/.turbo/cache/07ca42419b9f050c-meta.json +1 -1
  5. package/.turbo/cache/0a2b0a4df8a0443f-meta.json +1 -0
  6. package/.turbo/cache/0a2b0a4df8a0443f.tar.zst +0 -0
  7. package/.turbo/cache/0cea4c1f34f3683b-meta.json +1 -1
  8. package/.turbo/cache/13cf37c850bd8cf4-meta.json +1 -1
  9. package/.turbo/cache/141bb7d9a95e288b-meta.json +1 -0
  10. package/.turbo/cache/141bb7d9a95e288b.tar.zst +0 -0
  11. package/.turbo/cache/17259cf94d8f8925-meta.json +1 -1
  12. package/.turbo/cache/1c99a949ec63ab35-meta.json +1 -1
  13. package/.turbo/cache/257a7a26ea72dbc5-meta.json +1 -1
  14. package/.turbo/cache/32c0b9995fb5f8dd-meta.json +1 -0
  15. package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
  16. package/.turbo/cache/3924bce8e51f0ffa-meta.json +1 -1
  17. package/.turbo/cache/3ba80396ea6d6457-meta.json +1 -0
  18. package/.turbo/cache/3ba80396ea6d6457.tar.zst +0 -0
  19. package/.turbo/cache/3bf45120d0cc9bd8-meta.json +1 -1
  20. package/.turbo/cache/45035bf5c4147ccd-meta.json +1 -1
  21. package/.turbo/cache/4567487084a055b7-meta.json +1 -1
  22. package/.turbo/cache/4763278a7d3dbc16-meta.json +1 -1
  23. package/.turbo/cache/4763278a7d3dbc16.tar.zst +0 -0
  24. package/.turbo/cache/4ceca20b1e98dbd7-meta.json +1 -0
  25. package/.turbo/cache/4ceca20b1e98dbd7.tar.zst +0 -0
  26. package/.turbo/cache/4e8c9ab436c836bc-meta.json +1 -0
  27. package/.turbo/cache/4e8c9ab436c836bc.tar.zst +0 -0
  28. package/.turbo/cache/5c16ce3cff5c9dff-meta.json +1 -1
  29. package/.turbo/cache/5f304c0f37ef25f3-meta.json +1 -1
  30. package/.turbo/cache/626afdc67e0cb540-meta.json +1 -0
  31. package/.turbo/cache/626afdc67e0cb540.tar.zst +0 -0
  32. package/.turbo/cache/64de7a53e02db647-meta.json +1 -1
  33. package/.turbo/cache/691a74627ec57993-meta.json +1 -1
  34. package/.turbo/cache/69aae513b7ec6c7d-meta.json +1 -1
  35. package/.turbo/cache/69f7eb632e38f934-meta.json +1 -0
  36. package/.turbo/cache/69f7eb632e38f934.tar.zst +0 -0
  37. package/.turbo/cache/6dd7058e6703cb35-meta.json +1 -1
  38. package/.turbo/cache/73e9073a5274616d-meta.json +1 -1
  39. package/.turbo/cache/773edc0f83c8c5a5-meta.json +1 -1
  40. package/.turbo/cache/786a822763403879-meta.json +1 -1
  41. package/.turbo/cache/80b5d974184a01df-meta.json +1 -1
  42. package/.turbo/cache/8954c6073396fadd-meta.json +1 -1
  43. package/.turbo/cache/8ca4e3f31520b797-meta.json +1 -0
  44. package/.turbo/cache/8ca4e3f31520b797.tar.zst +0 -0
  45. package/.turbo/cache/92daa6d7c389d548-meta.json +1 -1
  46. package/.turbo/cache/9a097d6576dadd64-meta.json +1 -1
  47. package/.turbo/cache/a77bc920ea508bb8-meta.json +1 -1
  48. package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
  49. package/.turbo/cache/ac45d828a2a1fb4a-meta.json +1 -0
  50. package/.turbo/cache/ac45d828a2a1fb4a.tar.zst +0 -0
  51. package/.turbo/cache/b057e863c1b9bd7b-meta.json +1 -0
  52. package/.turbo/cache/b057e863c1b9bd7b.tar.zst +0 -0
  53. package/.turbo/cache/b54fc4f664a7a5a0-meta.json +1 -1
  54. package/.turbo/cache/ba4418918621fbcd-meta.json +1 -1
  55. package/.turbo/cache/bb8b41cd0ade3986-meta.json +1 -0
  56. package/.turbo/cache/bb8b41cd0ade3986.tar.zst +0 -0
  57. package/.turbo/cache/bb8ec1d0fe0a761f-meta.json +1 -0
  58. package/.turbo/cache/bb8ec1d0fe0a761f.tar.zst +0 -0
  59. package/.turbo/cache/be7c23c37b8ec74b-meta.json +1 -1
  60. package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
  61. package/.turbo/cache/bf85bc040b7e64db-meta.json +1 -0
  62. package/.turbo/cache/bf85bc040b7e64db.tar.zst +0 -0
  63. package/.turbo/cache/c1b72a92dec4fe37-meta.json +1 -1
  64. package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +1 -1
  65. package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
  66. package/.turbo/cache/cc81de9c0b452a7c-meta.json +1 -1
  67. package/.turbo/cache/cd845bb6102c589a-meta.json +1 -0
  68. package/.turbo/cache/cd845bb6102c589a.tar.zst +0 -0
  69. package/.turbo/cache/d7a47b77deb3d9a4-meta.json +1 -0
  70. package/.turbo/cache/d7a47b77deb3d9a4.tar.zst +0 -0
  71. package/.turbo/cache/dad1301ac69bcb85-meta.json +1 -1
  72. package/.turbo/cache/e44f36589cdc0bbc-meta.json +1 -0
  73. package/.turbo/cache/e44f36589cdc0bbc.tar.zst +0 -0
  74. package/.turbo/cache/e86cee22dff5e281-meta.json +1 -1
  75. package/.turbo/cache/e992dab20aeefbaf-meta.json +1 -1
  76. package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
  77. package/.turbo/cache/f5db6f7110f4ae32-meta.json +1 -0
  78. package/.turbo/cache/f5db6f7110f4ae32.tar.zst +0 -0
  79. package/.turbo/cache/f680556a8e954eac-meta.json +1 -1
  80. package/.turbo/cache/f680556a8e954eac.tar.zst +0 -0
  81. package/.turbo/cache/fa132b5b5f0e75f8-meta.json +1 -1
  82. package/.turbo/cache/fbbe2704bf9cb90b-meta.json +1 -1
  83. package/.turbo/cache/ff58f630c9d69af4-meta.json +1 -0
  84. package/.turbo/cache/ff58f630c9d69af4.tar.zst +0 -0
  85. package/CHANGELOG.md +32 -0
  86. package/components/checkbox/.turbo/turbo-build.log +6 -3
  87. package/components/checkbox/.turbo/turbo-bundler.log +3 -3
  88. package/components/checkbox/demo/api.html +6 -1
  89. package/components/checkbox/demo/api.js +16 -0
  90. package/components/checkbox/demo/api.md +63 -4
  91. package/components/checkbox/demo/api.min.js +84 -13
  92. package/components/checkbox/demo/index.min.js +59 -13
  93. package/components/checkbox/dist/auro-checkbox-group.d.ts +6 -1
  94. package/components/checkbox/dist/auro-checkbox-group.d.ts.map +1 -1
  95. package/components/checkbox/dist/auro-checkbox.d.ts +5 -0
  96. package/components/checkbox/dist/auro-checkbox.d.ts.map +1 -1
  97. package/components/checkbox/dist/index.js +59 -13
  98. package/components/checkbox/src/auro-checkbox-group.js +18 -6
  99. package/components/checkbox/src/auro-checkbox.js +9 -0
  100. package/components/combobox/.turbo/turbo-build.log +6 -3
  101. package/components/combobox/demo/api.js +4 -2
  102. package/components/combobox/demo/api.md +60 -1
  103. package/components/combobox/demo/api.min.js +100 -30
  104. package/components/combobox/demo/index.min.js +91 -30
  105. package/components/combobox/dist/auro-combobox.d.ts +5 -1
  106. package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
  107. package/components/combobox/dist/index.js +90 -28
  108. package/components/combobox/src/auro-combobox.js +14 -3
  109. package/components/counter/.turbo/turbo-build.log +3 -3
  110. package/components/counter/.turbo/turbo-bundler.log +3 -3
  111. package/components/datepicker/.turbo/turbo-build.log +6 -3
  112. package/components/datepicker/demo/api.js +2 -0
  113. package/components/datepicker/demo/api.md +46 -1
  114. package/components/datepicker/demo/api.min.js +99 -29
  115. package/components/datepicker/demo/index.min.js +90 -29
  116. package/components/datepicker/dist/auro-datepicker.d.ts +5 -2
  117. package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
  118. package/components/datepicker/dist/index.js +90 -29
  119. package/components/datepicker/src/auro-datepicker.js +14 -4
  120. package/components/dropdown/.turbo/turbo-build.log +3 -3
  121. package/components/dropdown/.turbo/turbo-bundler.log +3 -3
  122. package/components/form/.turbo/turbo-build.log +3 -3
  123. package/components/form/.turbo/turbo-bundler.log +3 -3
  124. package/components/input/.turbo/turbo-build$colon$sass.log +2 -2
  125. package/components/input/.turbo/turbo-build.log +16 -13
  126. package/components/input/.turbo/turbo-bundler.log +3 -3
  127. package/components/input/demo/api.js +2 -0
  128. package/components/input/demo/api.md +148 -98
  129. package/components/input/demo/api.min.js +56 -21
  130. package/components/input/demo/index.min.js +44 -18
  131. package/components/input/dist/base-input.d.ts +7 -8
  132. package/components/input/dist/base-input.d.ts.map +1 -1
  133. package/components/input/dist/index.js +44 -18
  134. package/components/input/src/base-input.js +11 -10
  135. package/components/input/src/styles/input-css.js +1 -1
  136. package/components/input/src/styles/input.css +13 -0
  137. package/components/input/src/styles/input.scss +21 -0
  138. package/components/input/src/styles/label-css.js +1 -1
  139. package/components/input/src/styles/label.css +3 -3
  140. package/components/input/src/styles/label.scss +1 -2
  141. package/components/input/src/styles/notificationIcons-css.js +1 -1
  142. package/components/input/src/styles/notificationIcons.css +7 -0
  143. package/components/input/src/styles/notificationIcons.scss +14 -0
  144. package/components/input/src/styles/style-css.js +1 -1
  145. package/components/input/src/styles/style.css +23 -3
  146. package/components/menu/.turbo/turbo-build.log +3 -3
  147. package/components/menu/.turbo/turbo-bundler.log +3 -3
  148. package/components/menu/demo/api.min.js +1 -2
  149. package/components/menu/demo/index.min.js +1 -2
  150. package/components/menu/dist/auro-menuoption.d.ts +0 -1
  151. package/components/menu/dist/auro-menuoption.d.ts.map +1 -1
  152. package/components/menu/dist/index.js +1 -2
  153. package/components/menu/src/auro-menuoption.js +1 -2
  154. package/components/radio/.turbo/turbo-build.log +6 -3
  155. package/components/radio/.turbo/turbo-bundler.log +3 -3
  156. package/components/radio/demo/api.html +1 -0
  157. package/components/radio/demo/api.js +2 -0
  158. package/components/radio/demo/api.md +57 -3
  159. package/components/radio/demo/api.min.js +55 -12
  160. package/components/radio/demo/index.min.js +46 -12
  161. package/components/radio/dist/auro-radio-group.d.ts +1 -1
  162. package/components/radio/dist/auro-radio.d.ts +5 -0
  163. package/components/radio/dist/auro-radio.d.ts.map +1 -1
  164. package/components/radio/dist/index.js +46 -12
  165. package/components/radio/src/auro-radio-group.js +5 -5
  166. package/components/radio/src/auro-radio.js +9 -0
  167. package/components/select/.turbo/turbo-build.log +7 -4
  168. package/components/select/demo/api.js +4 -2
  169. package/components/select/demo/api.md +81 -17
  170. package/components/select/demo/api.min.js +51 -11
  171. package/components/select/demo/index.min.js +42 -11
  172. package/components/select/dist/auro-select.d.ts +5 -1
  173. package/components/select/dist/auro-select.d.ts.map +1 -1
  174. package/components/select/dist/index.js +41 -9
  175. package/components/select/src/auro-select.js +9 -2
  176. package/package.json +1 -1
  177. package/packages/form-validation/src/validation.js +32 -7
  178. package/.turbo/cache/049b9083252d38be-meta.json +0 -1
  179. package/.turbo/cache/049b9083252d38be.tar.zst +0 -0
  180. package/.turbo/cache/0a1dd4481355cb0b-meta.json +0 -1
  181. package/.turbo/cache/0a1dd4481355cb0b.tar.zst +0 -0
  182. package/.turbo/cache/3323eb841acb9c4e-meta.json +0 -1
  183. package/.turbo/cache/3323eb841acb9c4e.tar.zst +0 -0
  184. package/.turbo/cache/34ba23e2e2d652ad-meta.json +0 -1
  185. package/.turbo/cache/34ba23e2e2d652ad.tar.zst +0 -0
  186. package/.turbo/cache/368cd6fed7975ad2-meta.json +0 -1
  187. package/.turbo/cache/368cd6fed7975ad2.tar.zst +0 -0
  188. package/.turbo/cache/549e6ef9f9ffd9a8-meta.json +0 -1
  189. package/.turbo/cache/549e6ef9f9ffd9a8.tar.zst +0 -0
  190. package/.turbo/cache/59ccd8430174883c-meta.json +0 -1
  191. package/.turbo/cache/59ccd8430174883c.tar.zst +0 -0
  192. package/.turbo/cache/683d4c0e20c077a9-meta.json +0 -1
  193. package/.turbo/cache/683d4c0e20c077a9.tar.zst +0 -0
  194. package/.turbo/cache/8f8ffe35cc79d1a9-meta.json +0 -1
  195. package/.turbo/cache/8f8ffe35cc79d1a9.tar.zst +0 -0
  196. package/.turbo/cache/926d632729ca6536-meta.json +0 -1
  197. package/.turbo/cache/926d632729ca6536.tar.zst +0 -0
  198. package/.turbo/cache/9e7be41cc3a7ef43-meta.json +0 -1
  199. package/.turbo/cache/9e7be41cc3a7ef43.tar.zst +0 -0
  200. package/.turbo/cache/9ee793063ea89126-meta.json +0 -1
  201. package/.turbo/cache/9ee793063ea89126.tar.zst +0 -0
  202. package/.turbo/cache/a1558cef51c034da-meta.json +0 -1
  203. package/.turbo/cache/a1558cef51c034da.tar.zst +0 -0
  204. package/.turbo/cache/a24f2ff8e94e56e8-meta.json +0 -1
  205. package/.turbo/cache/a24f2ff8e94e56e8.tar.zst +0 -0
  206. package/.turbo/cache/a2705cf095a2ceb0-meta.json +0 -1
  207. package/.turbo/cache/a2705cf095a2ceb0.tar.zst +0 -0
  208. package/.turbo/cache/a33c0749886a41b5-meta.json +0 -1
  209. package/.turbo/cache/a33c0749886a41b5.tar.zst +0 -0
  210. package/.turbo/cache/a66b465385a30a2b-meta.json +0 -1
  211. package/.turbo/cache/a66b465385a30a2b.tar.zst +0 -0
  212. package/.turbo/cache/e25ac25a8a0ad126-meta.json +0 -1
  213. package/.turbo/cache/e25ac25a8a0ad126.tar.zst +0 -0
  214. package/.turbo/cache/e671573e4ef02c47-meta.json +0 -1
  215. package/.turbo/cache/e671573e4ef02c47.tar.zst +0 -0
  216. package/.turbo/cache/ffec4500b911b85a-meta.json +0 -1
  217. package/.turbo/cache/ffec4500b911b85a.tar.zst +0 -0
@@ -99,6 +99,13 @@
99
99
  .clearBtn {
100
100
  width: calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));
101
101
  height: calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));
102
+ opacity: 0;
103
+ pointer-events: none;
104
+ }
105
+
106
+ :host .wrapper:hover .clearBtn, :host .wrapper:focus-within .clearBtn {
107
+ opacity: 1;
108
+ pointer-events: auto;
102
109
  }
103
110
 
104
111
  .passwordBtn {
@@ -212,18 +219,18 @@ label {
212
219
  }
213
220
 
214
221
  :host .wrapper:focus-within label {
215
- top: var(--ds-size-25, 0.125rem);
222
+ top: var(--ds-size-100, 0.5rem);
216
223
  font-size: var(--ds-text-body-size-xs, 0.75rem);
217
224
  transform: unset;
218
225
  }
219
226
  :host label.withValue {
220
- top: var(--ds-size-25, 0.125rem);
227
+ top: var(--ds-size-100, 0.5rem);
221
228
  font-size: var(--ds-text-body-size-xs, 0.75rem);
222
229
  transform: unset;
223
230
  }
224
231
 
225
232
  :host([activeLabel]) .wrapper label {
226
- top: var(--ds-size-25, 0.125rem);
233
+ top: var(--ds-size-100, 0.5rem);
227
234
  font-size: var(--ds-text-body-size-xs, 0.75rem);
228
235
  transform: unset;
229
236
  }
@@ -248,6 +255,7 @@ label {
248
255
  flex: 1;
249
256
  }
250
257
 
258
+ /* stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type */
251
259
  input {
252
260
  position: relative;
253
261
  overflow: hidden;
@@ -266,7 +274,19 @@ input {
266
274
  input::-ms-reveal, input::-ms-clear {
267
275
  display: none;
268
276
  }
277
+ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
278
+ margin: 0;
279
+ -webkit-appearance: none;
280
+ }
281
+ input[type=number] {
282
+ -moz-appearance: textfield; /* For older versions of Firefox */
283
+ appearance: textfield; /* Standard property */
284
+ }
269
285
  input:disabled {
270
286
  background: none;
271
287
  pointer-events: none;
272
288
  }
289
+
290
+ :host([bordered]) input {
291
+ padding: var(--ds-size-400, 2rem) 0 var(--ds-size-100, 0.5rem);
292
+ }
@@ -101,13 +101,13 @@ More info and automated migrator: https://sass-lang.com/d/import
101
101
 
102
102
  
103
103
  ./src/index.js → dist...
104
- created dist in 700ms
104
+ created dist in 763ms
105
105
  
106
106
  ./demo/index.js → ./demo/...
107
- created ./demo/ in 615ms
107
+ created ./demo/ in 721ms
108
108
  
109
109
  ./demo/api.js → ./demo/...
110
- created ./demo/ in 420ms
110
+ created ./demo/ in 594ms
111
111
 
112
112
  > @auro-formkit/auro-menu@4.1.4 build:docs
113
113
  > wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component menu
@@ -4,10 +4,10 @@
4
4
 
5
5
  
6
6
  ./src/index.js → dist...
7
- created dist in 721ms
7
+ created dist in 763ms
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 439ms
10
+ created ./demo/ in 537ms
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 372ms
13
+ created ./demo/ in 509ms
@@ -1187,8 +1187,7 @@ class AuroMenuOption extends r {
1187
1187
  reflect: true
1188
1188
  },
1189
1189
  value: {
1190
- type: String,
1191
- reflect: true
1190
+ type: String
1192
1191
  },
1193
1192
  tabIndex: {
1194
1193
  type: Number,
@@ -1147,8 +1147,7 @@ class AuroMenuOption extends r {
1147
1147
  reflect: true
1148
1148
  },
1149
1149
  value: {
1150
- type: String,
1151
- reflect: true
1150
+ type: String
1152
1151
  },
1153
1152
  tabIndex: {
1154
1153
  type: Number,
@@ -24,7 +24,6 @@ export class AuroMenuOption extends LitElement {
24
24
  };
25
25
  value: {
26
26
  type: StringConstructor;
27
- reflect: boolean;
28
27
  };
29
28
  tabIndex: {
30
29
  type: NumberConstructor;
@@ -1 +1 @@
1
- {"version":3,"file":"auro-menuoption.d.ts","sourceRoot":"","sources":["../src/auro-menuoption.js"],"names":[],"mappings":"AAqBA;;;;;;;;;GASG;AACH;IAyBE;;;;;;;;;;;;;;;;;;;;;MAuBC;IAED,+CAMC;IAED;;;;;;;OAOG;IACH,uBANW,MAAM,QAQhB;IA5DC,aAAyE;IAEzE,kBAAqB;IACrB,qBAAwB;IACxB,kBAAqB;IAOrB;;OAEG;IACH,qBAAiD;IAgDnD,qBAeC;IAGD,sCAIC;IAED;;;;;;OAMG;IACH,yBAOC;IAED,4CAKC;CACF;2BA7I0B,KAAK"}
1
+ {"version":3,"file":"auro-menuoption.d.ts","sourceRoot":"","sources":["../src/auro-menuoption.js"],"names":[],"mappings":"AAqBA;;;;;;;;;GASG;AACH;IAyBE;;;;;;;;;;;;;;;;;;;;MAsBC;IAED,+CAMC;IAED;;;;;;;OAOG;IACH,uBANW,MAAM,QAQhB;IA3DC,aAAyE;IAEzE,kBAAqB;IACrB,qBAAwB;IACxB,kBAAqB;IAOrB;;OAEG;IACH,qBAAiD;IA+CnD,qBAeC;IAGD,sCAIC;IAED;;;;;;OAMG;IACH,yBAOC;IAED,4CAKC;CACF;2BA5I0B,KAAK"}
@@ -1147,8 +1147,7 @@ class AuroMenuOption extends r {
1147
1147
  reflect: true
1148
1148
  },
1149
1149
  value: {
1150
- type: String,
1151
- reflect: true
1150
+ type: String
1152
1151
  },
1153
1152
  tabIndex: {
1154
1153
  type: Number,
@@ -69,8 +69,7 @@ export class AuroMenuOption extends LitElement {
69
69
  reflect: true
70
70
  },
71
71
  value: {
72
- type: String,
73
- reflect: true
72
+ type: String
74
73
  },
75
74
  tabIndex: {
76
75
  type: Number,
@@ -138,13 +138,13 @@ Run in verbose mode to see all warnings.
138
138
 
139
139
  
140
140
  ./src/index.js → dist...
141
- created dist in 546ms
141
+ created dist in 742ms
142
142
  
143
143
  ./demo/index.js → ./demo/...
144
- created ./demo/ in 521ms
144
+ created ./demo/ in 510ms
145
145
  
146
146
  ./demo/api.js → ./demo/...
147
- created ./demo/ in 530ms
147
+ created ./demo/ in 576ms
148
148
 
149
149
  > @auro-formkit/auro-radio@4.1.1 build:docs
150
150
  > wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component radio
@@ -193,6 +193,7 @@ Retrieving latest "/home/runner/work/auro-formkit/auro-formkit/components/radio/
193
193
  ⁕ FILE:src=./../apiExamples/horizontal.html
194
194
  ⁕ FILE:src=./../apiExamples/required.html
195
195
  ⁕ FILE:src=./../apiExamples/optionalLabel.html
196
+ ⁕ FILE:src=./../apiExamples/resetState.html
196
197
  ⁕ FILE:src=./../apiExamples/dynamic.html
197
198
  ⁕ CODE:src=./../apiExamples/basic.html
198
199
  ⁕ CODE:src=./../apiExamples/basicGroup.html
@@ -202,6 +203,8 @@ Retrieving latest "/home/runner/work/auro-formkit/auro-formkit/components/radio/
202
203
  ⁕ CODE:src=./../apiExamples/horizontal.html
203
204
  ⁕ CODE:src=./../apiExamples/required.html
204
205
  ⁕ CODE:src=./../apiExamples/optionalLabel.html
206
+ ⁕ CODE:src=./../apiExamples/resetState.html
207
+ ⁕ CODE:src=./../apiExamples/resetState.js
205
208
  ⁕ CODE:src=./../apiExamples/dynamic.html
206
209
  ⁕ CODE:src=./../apiExamples/dynamic.js
207
210
  ⁕ CODE:src=./../src/styles/tokens.scss
@@ -4,10 +4,10 @@
4
4
 
5
5
  
6
6
  ./src/index.js → dist...
7
- created dist in 867ms
7
+ created dist in 989ms
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 512ms
10
+ created ./demo/ in 496ms
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 614ms
13
+ created ./demo/ in 389ms
@@ -46,5 +46,6 @@
46
46
 
47
47
  <!-- If additional elements are needed for the demo, add them here. -->
48
48
  <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/dist/auro-accordion__bundled.js" type="module"></script>
49
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@latest/dist/auro-button__bundled.js" type="module"></script>
49
50
  </body>
50
51
  </html>
@@ -1,4 +1,5 @@
1
1
  import { dynamicExample } from "../apiExamples/dynamic";
2
+ import { resetStateExample } from "../apiExamples/resetState";
2
3
  import './index.js';
3
4
 
4
5
  export function initExamples(initCount) {
@@ -6,6 +7,7 @@ export function initExamples(initCount) {
6
7
 
7
8
  try {
8
9
  dynamicExample();
10
+ resetStateExample();
9
11
  } catch (error) {
10
12
  if (initCount <= 20) {
11
13
  // setTimeout handles issue where content is sometimes loaded after the functions get called
@@ -21,9 +21,9 @@
21
21
 
22
22
  ## Methods
23
23
 
24
- | Method | Type | Description |
25
- |---------|------------|------------------------------------------------|
26
- | [reset](#reset) | `(): void` | Method for a total reset of the radio element. |
24
+ | Method | Type | Description |
25
+ |---------|------------|------------------------------------|
26
+ | [reset](#reset) | `(): void` | Resets component to initial state. |
27
27
 
28
28
  ## Events
29
29
 
@@ -61,6 +61,12 @@
61
61
  | [tabIndex](#tabIndex) | `tabIndex` | `number` | -1 | |
62
62
  | [value](#value) | `value` | `string` | | |
63
63
 
64
+ ## Methods
65
+
66
+ | Method | Type | Description |
67
+ |---------|------------|------------------------------------|
68
+ | [reset](#reset) | `(): void` | Resets component to initial state. |
69
+
64
70
  ## Events
65
71
 
66
72
  | Event | Type | Description |
@@ -328,6 +334,54 @@ The `<auro-radio-group>` supports an `optionalLabel` slot, where users can can o
328
334
  <!-- AURO-GENERATED-CONTENT:END -->
329
335
  </auro-accordion>
330
336
 
337
+ ### Reset State
338
+
339
+ Use the `reset()` method to reset the `<auro-radio-group>`'s `value` and `validity` state. Doing so will preserve all other attributes and properties.
340
+
341
+ <div class="exampleWrapper">
342
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/resetState.html) -->
343
+ <!-- The below content is automatically added from ./../apiExamples/resetState.html -->
344
+ <auro-button id="resetStateBtn">Reset</auro-button>
345
+ <br/><br/>
346
+ <auro-radio-group id="resetStateExample" required setCustomValidityValueMissing="Please select an option">
347
+ <span slot="legend">Form label goes here</span>
348
+ <auro-radio id="resetGroupRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
349
+ <auro-radio id="resetGroupRadio2" label="No" name="radioDemo" value="no"></auro-radio>
350
+ <auro-radio id="resetGroupRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
351
+ </auro-radio-group>
352
+ <!-- AURO-GENERATED-CONTENT:END -->
353
+ </div>
354
+ <auro-accordion alignRight>
355
+ <span slot="trigger">See code</span>
356
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/resetState.html) -->
357
+ <!-- The below code snippet is automatically added from ./../apiExamples/resetState.html -->
358
+
359
+ ```html
360
+ <auro-button id="resetStateBtn">Reset</auro-button>
361
+ <br/><br/>
362
+ <auro-radio-group id="resetStateExample" required setCustomValidityValueMissing="Please select an option">
363
+ <span slot="legend">Form label goes here</span>
364
+ <auro-radio id="resetGroupRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
365
+ <auro-radio id="resetGroupRadio2" label="No" name="radioDemo" value="no"></auro-radio>
366
+ <auro-radio id="resetGroupRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
367
+ </auro-radio-group>
368
+ ```
369
+ <!-- AURO-GENERATED-CONTENT:END -->
370
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/resetState.js) -->
371
+ <!-- The below code snippet is automatically added from ./../apiExamples/resetState.js -->
372
+
373
+ ```js
374
+ export function resetStateExample() {
375
+ const elem = document.querySelector('#resetStateExample');
376
+
377
+ document.querySelector('#resetStateBtn').addEventListener('click', () => {
378
+ elem.reset();
379
+ });
380
+ }
381
+ ```
382
+ <!-- AURO-GENERATED-CONTENT:END -->
383
+ </auro-accordion>
384
+
331
385
  ### Dynamic Example
332
386
 
333
387
  This example demonstrates a data drive approach to rendering `<auro-radio>` buttons.
@@ -15,6 +15,14 @@ function dynamicExample() {
15
15
  }
16
16
  }
17
17
 
18
+ function resetStateExample() {
19
+ const elem = document.querySelector('#resetStateExample');
20
+
21
+ document.querySelector('#resetStateBtn').addEventListener('click', () => {
22
+ elem.reset();
23
+ });
24
+ }
25
+
18
26
  /**
19
27
  * @license
20
28
  * Copyright 2019 Google LLC
@@ -276,6 +284,15 @@ class AuroRadio extends r {
276
284
  }));
277
285
  }
278
286
 
287
+ /**
288
+ * Resets component to initial state.
289
+ * @returns {void}
290
+ */
291
+ reset() {
292
+ this.checked = false;
293
+ this.error = false;
294
+ }
295
+
279
296
  updated(changedProperties) {
280
297
  if (changedProperties.has('checked')) {
281
298
  this.dispatchEvent(new CustomEvent('resetRadio', {
@@ -384,6 +401,30 @@ class AuroFormValidation {
384
401
  this.runtimeUtils = new AuroLibraryRuntimeUtils();
385
402
  }
386
403
 
404
+ /**
405
+ * Resets the element to its initial state.
406
+ * @private
407
+ * @param {object} elem - HTML element to reset.
408
+ * @returns {void}
409
+ */
410
+ reset(elem) {
411
+ elem.validity = undefined;
412
+ elem.value = undefined;
413
+
414
+ // Resets the second value of the datepicker in range state
415
+ if (elem.valueEnd) {
416
+ elem.valueEnd = undefined;
417
+ }
418
+
419
+ // Resets selected option of element
420
+ if (elem.optionSelected) {
421
+ elem.optionSelected = undefined;
422
+ }
423
+
424
+ // Runs validation to handle error attribute
425
+ this.validate(elem);
426
+ }
427
+
387
428
  /**
388
429
  * Determines the validity state of the element based on the common attribute restrictions (pattern).
389
430
  * @private
@@ -398,10 +439,15 @@ class AuroFormValidation {
398
439
  elem.validity = 'badInput';
399
440
  elem.setCustomValidity = elem.setCustomValidityBadInput || '';
400
441
  }
401
- } else if (elem.value && elem.value.length > 0 && elem.value.length < elem.minLength) {
442
+ }
443
+
444
+ // Length > 0 is required to prevent the error message from showing when the input is empty
445
+ if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
402
446
  elem.validity = 'tooShort';
403
447
  elem.setCustomValidity = elem.setCustomValidityTooShort || '';
404
- } else if (elem.value && elem.value.length > elem.maxLength) {
448
+ }
449
+
450
+ if (elem.value?.length > elem.maxLength) {
405
451
  elem.validity = 'tooLong';
406
452
  elem.setCustomValidity = elem.setCustomValidityTooLong || '';
407
453
  }
@@ -427,7 +473,7 @@ class AuroFormValidation {
427
473
  elem.validity = 'tooShort';
428
474
  elem.setCustomValidity = elem.setCustomValidityForType || '';
429
475
  }
430
- } else if (elem.type === 'number' || elem.type === 'numeric') { // 'numeric` is a deprecated alias for number'
476
+ } else if (elem.type === 'number') {
431
477
  if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
432
478
  elem.validity = 'rangeOverflow';
433
479
  elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
@@ -532,14 +578,10 @@ class AuroFormValidation {
532
578
 
533
579
  if (validationShouldRun || elem.hasAttribute('error')) {
534
580
  if (elem.validity && elem.validity !== 'valid') {
535
- elem.isValid = false;
536
-
537
581
  // Use the validity message override if it is declared
538
582
  if (elem.ValidityMessageOverride) {
539
583
  elem.setCustomValidity = elem.ValidityMessageOverride;
540
584
  }
541
- } else {
542
- elem.isValid = true;
543
585
  }
544
586
 
545
587
  this.getErrorMessage(elem);
@@ -812,20 +854,20 @@ class AuroRadioGroup extends r {
812
854
  }
813
855
 
814
856
  /**
815
- * Method for a total reset of the radio element.
857
+ * Resets component to initial state.
816
858
  * @returns {void}
817
859
  */
818
860
  reset() {
819
- this.value = undefined;
861
+ // Sets first radio button to receive focus during keyboard navigation
820
862
  this.index = 0;
821
- this.optionSelected = undefined;
863
+
822
864
  const buttons = this.querySelectorAll('auro-radio, [auro-radio]');
823
865
 
824
866
  buttons.forEach((button) => {
825
- button.checked = false;
867
+ button.reset();
826
868
  });
827
869
 
828
- this.validation.validate(this);
870
+ this.validation.reset(this);
829
871
  }
830
872
 
831
873
  /**
@@ -1037,6 +1079,7 @@ function initExamples(initCount) {
1037
1079
 
1038
1080
  try {
1039
1081
  dynamicExample();
1082
+ resetStateExample();
1040
1083
  } catch (error) {
1041
1084
  if (initCount <= 20) {
1042
1085
  // setTimeout handles issue where content is sometimes loaded after the functions get called
@@ -259,6 +259,15 @@ class AuroRadio extends r {
259
259
  }));
260
260
  }
261
261
 
262
+ /**
263
+ * Resets component to initial state.
264
+ * @returns {void}
265
+ */
266
+ reset() {
267
+ this.checked = false;
268
+ this.error = false;
269
+ }
270
+
262
271
  updated(changedProperties) {
263
272
  if (changedProperties.has('checked')) {
264
273
  this.dispatchEvent(new CustomEvent('resetRadio', {
@@ -367,6 +376,30 @@ class AuroFormValidation {
367
376
  this.runtimeUtils = new AuroLibraryRuntimeUtils();
368
377
  }
369
378
 
379
+ /**
380
+ * Resets the element to its initial state.
381
+ * @private
382
+ * @param {object} elem - HTML element to reset.
383
+ * @returns {void}
384
+ */
385
+ reset(elem) {
386
+ elem.validity = undefined;
387
+ elem.value = undefined;
388
+
389
+ // Resets the second value of the datepicker in range state
390
+ if (elem.valueEnd) {
391
+ elem.valueEnd = undefined;
392
+ }
393
+
394
+ // Resets selected option of element
395
+ if (elem.optionSelected) {
396
+ elem.optionSelected = undefined;
397
+ }
398
+
399
+ // Runs validation to handle error attribute
400
+ this.validate(elem);
401
+ }
402
+
370
403
  /**
371
404
  * Determines the validity state of the element based on the common attribute restrictions (pattern).
372
405
  * @private
@@ -381,10 +414,15 @@ class AuroFormValidation {
381
414
  elem.validity = 'badInput';
382
415
  elem.setCustomValidity = elem.setCustomValidityBadInput || '';
383
416
  }
384
- } else if (elem.value && elem.value.length > 0 && elem.value.length < elem.minLength) {
417
+ }
418
+
419
+ // Length > 0 is required to prevent the error message from showing when the input is empty
420
+ if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
385
421
  elem.validity = 'tooShort';
386
422
  elem.setCustomValidity = elem.setCustomValidityTooShort || '';
387
- } else if (elem.value && elem.value.length > elem.maxLength) {
423
+ }
424
+
425
+ if (elem.value?.length > elem.maxLength) {
388
426
  elem.validity = 'tooLong';
389
427
  elem.setCustomValidity = elem.setCustomValidityTooLong || '';
390
428
  }
@@ -410,7 +448,7 @@ class AuroFormValidation {
410
448
  elem.validity = 'tooShort';
411
449
  elem.setCustomValidity = elem.setCustomValidityForType || '';
412
450
  }
413
- } else if (elem.type === 'number' || elem.type === 'numeric') { // 'numeric` is a deprecated alias for number'
451
+ } else if (elem.type === 'number') {
414
452
  if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
415
453
  elem.validity = 'rangeOverflow';
416
454
  elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
@@ -515,14 +553,10 @@ class AuroFormValidation {
515
553
 
516
554
  if (validationShouldRun || elem.hasAttribute('error')) {
517
555
  if (elem.validity && elem.validity !== 'valid') {
518
- elem.isValid = false;
519
-
520
556
  // Use the validity message override if it is declared
521
557
  if (elem.ValidityMessageOverride) {
522
558
  elem.setCustomValidity = elem.ValidityMessageOverride;
523
559
  }
524
- } else {
525
- elem.isValid = true;
526
560
  }
527
561
 
528
562
  this.getErrorMessage(elem);
@@ -795,20 +829,20 @@ class AuroRadioGroup extends r {
795
829
  }
796
830
 
797
831
  /**
798
- * Method for a total reset of the radio element.
832
+ * Resets component to initial state.
799
833
  * @returns {void}
800
834
  */
801
835
  reset() {
802
- this.value = undefined;
836
+ // Sets first radio button to receive focus during keyboard navigation
803
837
  this.index = 0;
804
- this.optionSelected = undefined;
838
+
805
839
  const buttons = this.querySelectorAll('auro-radio, [auro-radio]');
806
840
 
807
841
  buttons.forEach((button) => {
808
- button.checked = false;
842
+ button.reset();
809
843
  });
810
844
 
811
- this.validation.validate(this);
845
+ this.validation.reset(this);
812
846
  }
813
847
 
814
848
  /**
@@ -107,7 +107,7 @@ export class AuroRadioGroup extends LitElement {
107
107
  */
108
108
  updated(changedProperties: Map<string, any>): void;
109
109
  /**
110
- * Method for a total reset of the radio element.
110
+ * Resets component to initial state.
111
111
  * @returns {void}
112
112
  */
113
113
  reset(): void;
@@ -90,6 +90,11 @@ export class AuroRadio extends LitElement {
90
90
  * @returns {void}
91
91
  */
92
92
  private handleBlur;
93
+ /**
94
+ * Resets component to initial state.
95
+ * @returns {void}
96
+ */
97
+ reset(): void;
93
98
  updated(changedProperties: any): void;
94
99
  /**
95
100
  * Method for handling content when it is invalid accessibility wise.
@@ -1 +1 @@
1
- {"version":3,"file":"auro-radio.d.ts","sourceRoot":"","sources":["../src/auro-radio.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;GAUG;AAGH;IAeE,+CAMC;IAGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2BC;IAED;;;;;;;OAOG;IACH,uBANW,MAAM,QAQhB;IA5DC,iBAAoB;IACpB,kBAAqB;IACrB,kBAAqB;IACrB,eAAkB;IAGlB;;OAEG;IACH,qBAAiD;IAqDnD;;;;;OAKG;IACH,qBAKC;IAED;;;;;OAKG;IACH,oBAOC;IAED;;;;;OAKG;IACH,oBAMC;IAED;;;;;OAKG;IACH,mBAMC;IAED,sCAcC;IAED;;;;;OAKG;IACH,gBAMC;IAED;;;;;OAKG;IACH,mBAMC;IAED,qBAWC;IALC,wBAAmD;IAQrD,+CAkCC;CACF;2BAjPgC,KAAK"}
1
+ {"version":3,"file":"auro-radio.d.ts","sourceRoot":"","sources":["../src/auro-radio.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;GAUG;AAGH;IAeE,+CAMC;IAGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2BC;IAED;;;;;;;OAOG;IACH,uBANW,MAAM,QAQhB;IA5DC,iBAAoB;IACpB,kBAAqB;IACrB,kBAAqB;IACrB,eAAkB;IAGlB;;OAEG;IACH,qBAAiD;IAqDnD;;;;;OAKG;IACH,qBAKC;IAED;;;;;OAKG;IACH,oBAOC;IAED;;;;;OAKG;IACH,oBAMC;IAED;;;;;OAKG;IACH,mBAMC;IAED;;;OAGG;IACH,SAFa,IAAI,CAKhB;IAED,sCAcC;IAED;;;;;OAKG;IACH,gBAMC;IAED;;;;;OAKG;IACH,mBAMC;IAED,qBAWC;IALC,wBAAmD;IAQrD,+CAkCC;CACF;2BA1PgC,KAAK"}