@aurodesignsystem-dev/auro-formkit 0.0.0-pr754.0 → 0.0.0-pr754.2

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 (56) hide show
  1. package/components/bibtemplate/dist/index.js +1 -1
  2. package/components/bibtemplate/dist/registered.js +1 -1
  3. package/components/checkbox/demo/api.min.js +9 -9
  4. package/components/checkbox/demo/index.min.js +9 -9
  5. package/components/checkbox/dist/index.js +9 -9
  6. package/components/checkbox/dist/registered.js +9 -9
  7. package/components/combobox/demo/api.md +12 -6
  8. package/components/combobox/demo/api.min.js +43 -84
  9. package/components/combobox/demo/index.min.js +43 -84
  10. package/components/combobox/dist/index.js +42 -84
  11. package/components/combobox/dist/registered.js +42 -84
  12. package/components/counter/demo/api.md +140 -7
  13. package/components/counter/demo/api.min.js +555 -385
  14. package/components/counter/demo/index.md +82 -0
  15. package/components/counter/demo/index.min.js +555 -385
  16. package/components/counter/dist/auro-counter-group.d.ts +71 -14
  17. package/components/counter/dist/auro-counter.d.ts +10 -0
  18. package/components/counter/dist/index.js +555 -385
  19. package/components/counter/dist/registered.js +555 -385
  20. package/components/datepicker/demo/api.min.js +42 -84
  21. package/components/datepicker/demo/index.min.js +42 -84
  22. package/components/datepicker/dist/index.js +42 -84
  23. package/components/datepicker/dist/registered.js +42 -84
  24. package/components/dropdown/demo/api.md +76 -268
  25. package/components/dropdown/demo/api.min.js +25 -67
  26. package/components/dropdown/demo/index.md +45 -363
  27. package/components/dropdown/demo/index.min.js +25 -67
  28. package/components/dropdown/dist/auro-dropdown.d.ts +21 -71
  29. package/components/dropdown/dist/index.js +25 -67
  30. package/components/dropdown/dist/registered.js +25 -67
  31. package/components/helptext/dist/index.js +1 -1
  32. package/components/helptext/dist/registered.js +1 -1
  33. package/components/input/demo/api.md +1 -1
  34. package/components/input/demo/api.min.js +10 -10
  35. package/components/input/demo/index.min.js +10 -10
  36. package/components/input/dist/base-input.d.ts +1 -1
  37. package/components/input/dist/index.js +10 -10
  38. package/components/input/dist/registered.js +10 -10
  39. package/components/menu/demo/api.md +14 -15
  40. package/components/menu/demo/api.min.js +1 -0
  41. package/components/menu/demo/index.min.js +1 -0
  42. package/components/menu/dist/auro-menu.d.ts +2 -1
  43. package/components/menu/dist/index.js +1 -0
  44. package/components/menu/dist/registered.js +1 -0
  45. package/components/radio/demo/api.min.js +9 -9
  46. package/components/radio/demo/index.min.js +9 -9
  47. package/components/radio/dist/index.js +9 -9
  48. package/components/radio/dist/registered.js +9 -9
  49. package/components/select/demo/api.md +41 -36
  50. package/components/select/demo/api.min.js +60 -102
  51. package/components/select/demo/index.md +1 -1
  52. package/components/select/demo/index.min.js +60 -102
  53. package/components/select/dist/auro-select.d.ts +9 -2
  54. package/components/select/dist/index.js +59 -102
  55. package/components/select/dist/registered.js +59 -102
  56. package/package.json +2 -2
@@ -25,6 +25,23 @@ export class AuroCounterGroup extends LitElement {
25
25
  type: BooleanConstructor;
26
26
  reflect: boolean;
27
27
  };
28
+ /**
29
+ * The current error message to display when the component is invalid.
30
+ */
31
+ error: {
32
+ type: StringConstructor;
33
+ reflect: boolean;
34
+ };
35
+ /**
36
+ * The current error message to display when the component is invalid.
37
+ * This is set by validation and is not available to consumers.
38
+ * @private
39
+ */
40
+ errorMessage: {
41
+ type: StringConstructor;
42
+ reflect: boolean;
43
+ attribute: boolean;
44
+ };
28
45
  /**
29
46
  * Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
30
47
  * at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
@@ -103,7 +120,7 @@ export class AuroCounterGroup extends LitElement {
103
120
  * "top" | "right" | "bottom" | "left" |
104
121
  * "bottom-start" | "top-start" | "top-end" |
105
122
  * "right-start" | "right-end" | "bottom-end" |
106
- * "left-start" | "left-end"
123
+ * "left-start" | "left-end".
107
124
  * @default bottom-start
108
125
  */
109
126
  placement: {
@@ -175,6 +192,21 @@ export class AuroCounterGroup extends LitElement {
175
192
  * @private
176
193
  */
177
194
  private validation;
195
+ /**
196
+ * Updates the aggregate value based on the values of contained auro-counter components.
197
+ * This method queries for all `auro-counter` elements, sums their values, and updates the component's `value` property.
198
+ * Additionally, it iterates through each counter and calls `manageDisabled()` on it.
199
+ * @private
200
+ */
201
+ private updateValue;
202
+ /**
203
+ * Updates the validity of the counter group based on the validity of its counters.
204
+ * This method checks all counters within the group, determines if any are invalid, and updates the group's validity state and error message accordingly.
205
+ * If any counter is invalid, it generates a combined error message from all invalid counters.
206
+ * @returns {void}
207
+ * @private
208
+ */
209
+ private updateValidity;
178
210
  /**
179
211
  * Dynamically generated dropdown tag.
180
212
  * @private
@@ -193,6 +225,10 @@ export class AuroCounterGroup extends LitElement {
193
225
  * @type {string}
194
226
  */
195
227
  private helpTextTag;
228
+ /**
229
+ * @private
230
+ */
231
+ private iconTag;
196
232
  /**
197
233
  * Dynamically disables increment/decrement buttons on a counter based on group value.
198
234
  * This method checks the total aggregated value against the group's min and max properties.
@@ -209,6 +245,28 @@ export class AuroCounterGroup extends LitElement {
209
245
  * @private
210
246
  */
211
247
  private configureCounters;
248
+ /**
249
+ * Renders help text error messages.
250
+ * @param {Array<string>} messages - The error messages to render.
251
+ * @returns {TemplateResult[]} - The rendered error messages rendered in a TemplateResult.
252
+ * @private
253
+ */
254
+ private renderHelpTextErrors;
255
+ /**
256
+ * Gets and returns an array of counters in an invalid state.
257
+ * @returns {Array<HTMLElement>} - Returns an array of invalid counters.
258
+ * @param {NodeList} counters - The NodeList of counter elements to check.
259
+ * @private
260
+ */
261
+ private getInvalidCounters;
262
+ /**
263
+ * Gets all valid error messages from errored counters.
264
+ * @param {NodeList} invalidCounters - The NodeList of counter elements to check.
265
+ * @returns {Array<string>} - Returns an array of error messages from invalid counters.
266
+ * @private
267
+ */
268
+ private getErrorMessages;
269
+ errorMessage: any;
212
270
  /**
213
271
  * Configures the dropdown counters by selecting all `auro-counter` elements,
214
272
  * appending them to the `auro-counter-wrapper` element within the shadow DOM,
@@ -235,13 +293,6 @@ export class AuroCounterGroup extends LitElement {
235
293
  * @returns {number} The converted number or 0 if invalid.
236
294
  */
237
295
  private safeNumberConversion;
238
- /**
239
- * Updates the aggregate value based on the values of contained auro-counter components.
240
- * This method queries for all `auro-counter` elements, sums their values, and updates the component's `value` property.
241
- * Additionally, it iterates through each counter and calls `manageDisabled()` on it.
242
- * @private
243
- */
244
- private updateValue;
245
296
  /**
246
297
  * Updates the value text in the dropdown trigger based on the counters in the counter group.
247
298
  * @private
@@ -255,6 +306,18 @@ export class AuroCounterGroup extends LitElement {
255
306
  validate(force?: boolean): void;
256
307
  updated(changedProperties: any): void;
257
308
  firstUpdated(): void;
309
+ /**
310
+ * Returns HTML for the help text and error message.
311
+ * @private
312
+ * @returns {html} - Returns HTML for the help text and error message.
313
+ */
314
+ private renderHelpText;
315
+ /**
316
+ * Returns HTML for the validation error icon.
317
+ * @private
318
+ * @returns {html} - Returns HTML for the validation error icon.
319
+ */
320
+ private renderValidationErrorIcon;
258
321
  /**
259
322
  * Render the dropdown structure for the counter group.
260
323
  * @returns {TemplateResult} The dropdown template.
@@ -267,12 +330,6 @@ export class AuroCounterGroup extends LitElement {
267
330
  * @private
268
331
  */
269
332
  private renderDropdownTrigger;
270
- /**
271
- * Render the help text for the counter group.
272
- * @returns {TemplateResult} The help text template.
273
- * @private
274
- */
275
- private renderHelpText;
276
333
  /**
277
334
  * Render the dropdown bib template for the dropdown.
278
335
  * @returns {TemplateResult} The bib template.
@@ -42,6 +42,10 @@ export class AuroCounter extends LitElement {
42
42
  * @type {string}
43
43
  */
44
44
  private iconTag;
45
+ /**
46
+ * @private
47
+ */
48
+ private helpTextTag;
45
49
  /**
46
50
  * Increments the counter value by 1. If a value is provided, it increments by that amount.
47
51
  * @method increment
@@ -98,6 +102,12 @@ export class AuroCounter extends LitElement {
98
102
  */
99
103
  private onDefaultSlotChange;
100
104
  updated(changedProperties: any): void;
105
+ /**
106
+ * Returns HTML for the help text and error message.
107
+ * @private
108
+ * @returns {html} - Returns HTML for the help text and error message.
109
+ */
110
+ private renderHelpText;
101
111
  render(): import("lit-html").TemplateResult;
102
112
  }
103
113
  import { LitElement } from "lit";