@aurodesignsystem-dev/auro-formkit 0.0.0-pr755.0 → 0.0.0-pr756.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.
- package/components/checkbox/demo/api.html +10 -16
- package/components/checkbox/demo/api.min.js +2 -2
- package/components/checkbox/demo/index.html +10 -16
- package/components/checkbox/demo/index.min.js +2 -2
- package/components/checkbox/demo/readme.html +9 -16
- package/components/checkbox/dist/index.js +2 -2
- package/components/checkbox/dist/registered.js +2 -2
- package/components/combobox/demo/api.html +10 -16
- package/components/combobox/demo/index.html +10 -16
- package/components/combobox/demo/readme.html +9 -16
- package/components/counter/demo/api.html +10 -16
- package/components/counter/demo/api.md +127 -0
- package/components/counter/demo/api.min.js +530 -312
- package/components/counter/demo/index.html +10 -16
- package/components/counter/demo/index.md +82 -0
- package/components/counter/demo/index.min.js +530 -312
- package/components/counter/demo/readme.html +9 -16
- package/components/counter/dist/auro-counter-group.d.ts +70 -13
- package/components/counter/dist/auro-counter.d.ts +10 -0
- package/components/counter/dist/index.js +530 -312
- package/components/counter/dist/registered.js +530 -312
- package/components/datepicker/demo/api.html +10 -16
- package/components/datepicker/demo/index.html +10 -16
- package/components/datepicker/demo/readme.html +9 -16
- package/components/dropdown/demo/api.html +10 -16
- package/components/dropdown/demo/index.html +10 -16
- package/components/dropdown/demo/readme.html +9 -16
- package/components/form/demo/api.html +9 -16
- package/components/form/demo/autocomplete.html +3 -19
- package/components/form/demo/index.html +9 -16
- package/components/form/demo/readme.html +9 -16
- package/components/form/demo/working.html +13 -19
- package/components/input/demo/api.html +10 -16
- package/components/input/demo/index.html +10 -16
- package/components/input/demo/readme.html +9 -16
- package/components/menu/demo/api.html +32 -16
- package/components/menu/demo/index.html +10 -16
- package/components/menu/demo/readme.html +9 -16
- package/components/radio/demo/api.html +10 -16
- package/components/radio/demo/index.html +10 -16
- package/components/radio/demo/readme.html +9 -16
- package/components/select/demo/api.html +10 -16
- package/components/select/demo/index.html +11 -16
- package/components/select/demo/readme.html +9 -16
- package/package.json +4 -4
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
| Property | Attribute | Type | Default | Description |
|
|
9
9
|
|------------|------------|-----------|-------------|--------------------------------------------------|
|
|
10
10
|
| [disabled](#disabled) | `disabled` | `boolean` | false | Indicates if the counter is disabled. |
|
|
11
|
+
| [error](#error) | `error` | `string` | | Error state and message.<br />True if set, value is the error message. |
|
|
11
12
|
| [max](#max) | `max` | `number` | 9 | The maximum value for the counter. |
|
|
12
13
|
| [min](#min) | `min` | `number` | 0 | The minimum value for the counter. |
|
|
13
14
|
| [onDark](#onDark) | `onDark` | `boolean` | false | If declared, the counter will be rendered with onDark styles. |
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
| Property | Attribute | Type | Default | Description |
|
|
43
44
|
|---------------------------|---------------------------|--------------------------|----------------|--------------------------------------------------|
|
|
44
45
|
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean` | "false" | If declared, bib's position will be automatically calculated where to appear. |
|
|
46
|
+
| [error](#error) | `error` | `string` | | The current error message to display when the component is invalid. |
|
|
45
47
|
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | `string` | "sm" | Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)<br />at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.<br /><br />When expanded, the dropdown will automatically display in fullscreen mode<br />if the screen size is equal to or smaller than the selected breakpoint. |
|
|
46
48
|
| [isDropdown](#isDropdown) | `isDropdown` | `boolean` | false | Indicates if the counter group is displayed as a dropdown. |
|
|
47
49
|
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | false | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600. |
|
|
@@ -340,6 +342,131 @@ counter.addEventListener('input', (event) => {
|
|
|
340
342
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
341
343
|
</auro-accordion>
|
|
342
344
|
|
|
345
|
+
### Counter with Custom Error
|
|
346
|
+
|
|
347
|
+
A custom error can be set on the counter by adding the `error` attribute the desired message.
|
|
348
|
+
|
|
349
|
+
<div class="exampleWrapper">
|
|
350
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/counter-error.html) -->
|
|
351
|
+
<!-- The below content is automatically added from ./../apiExamples/counter-error.html -->
|
|
352
|
+
<auro-counter error="There is an error with the counter">
|
|
353
|
+
Adults
|
|
354
|
+
</auro-counter>
|
|
355
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
356
|
+
</div>
|
|
357
|
+
<div class="exampleWrapper--ondark" aria-hidden>
|
|
358
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/ondark-counter-error.html) -->
|
|
359
|
+
<!-- The below content is automatically added from ./../apiExamples/ondark-counter-error.html -->
|
|
360
|
+
<auro-counter ondark error="There is an error with the counter">
|
|
361
|
+
Adults
|
|
362
|
+
</auro-counter>
|
|
363
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
364
|
+
</div>
|
|
365
|
+
<auro-accordion alignRight>
|
|
366
|
+
<span slot="trigger">See code</span>
|
|
367
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/counter-error.html) -->
|
|
368
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/counter-error.html -->
|
|
369
|
+
|
|
370
|
+
```html
|
|
371
|
+
<auro-counter error="There is an error with the counter">
|
|
372
|
+
Adults
|
|
373
|
+
</auro-counter>
|
|
374
|
+
```
|
|
375
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
376
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/ondark-counter-error.html) -->
|
|
377
|
+
<!-- The below content is automatically added from ./../apiExamples/ondark-counter-error.html -->
|
|
378
|
+
<auro-counter ondark error="There is an error with the counter">
|
|
379
|
+
Adults
|
|
380
|
+
</auro-counter>
|
|
381
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
382
|
+
</auro-accordion>
|
|
383
|
+
|
|
384
|
+
### Counter Dropdown with Errored Counters
|
|
385
|
+
|
|
386
|
+
A counter dropdown with counters in an errored state will display the errors for each errored counter by default
|
|
387
|
+
|
|
388
|
+
<div class="exampleWrapper">
|
|
389
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dropdown-error-basic.html) -->
|
|
390
|
+
<!-- The below content is automatically added from ./../apiExamples/dropdown-error-basic.html -->
|
|
391
|
+
<auro-counter-group isDropdown>
|
|
392
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
393
|
+
<div slot="label">Passengers</div>
|
|
394
|
+
<auro-counter error="Cannot have less than 1 adult passenger">
|
|
395
|
+
Adults
|
|
396
|
+
<span slot="description">18 years or older</span>
|
|
397
|
+
</auro-counter>
|
|
398
|
+
<auro-counter error="Cannot have more than 2 child passengers">
|
|
399
|
+
Children
|
|
400
|
+
<span slot="description">2-17 years</span>
|
|
401
|
+
</auro-counter>
|
|
402
|
+
</auro-counter-group>
|
|
403
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
404
|
+
</div>
|
|
405
|
+
<auro-accordion alignRight>
|
|
406
|
+
<span slot="trigger">See code</span>
|
|
407
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dropdown-error-basic.html) -->
|
|
408
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/dropdown-error-basic.html -->
|
|
409
|
+
|
|
410
|
+
```html
|
|
411
|
+
<auro-counter-group isDropdown>
|
|
412
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
413
|
+
<div slot="label">Passengers</div>
|
|
414
|
+
<auro-counter error="Cannot have less than 1 adult passenger">
|
|
415
|
+
Adults
|
|
416
|
+
<span slot="description">18 years or older</span>
|
|
417
|
+
</auro-counter>
|
|
418
|
+
<auro-counter error="Cannot have more than 2 child passengers">
|
|
419
|
+
Children
|
|
420
|
+
<span slot="description">2-17 years</span>
|
|
421
|
+
</auro-counter>
|
|
422
|
+
</auro-counter-group>
|
|
423
|
+
```
|
|
424
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
425
|
+
</auro-accordion>
|
|
426
|
+
|
|
427
|
+
### Counter Dropdown with Custom Error
|
|
428
|
+
|
|
429
|
+
The error message for a dropdown counter with errored counters can also be overridden with the `error` attribute.
|
|
430
|
+
|
|
431
|
+
<div class="exampleWrapper">
|
|
432
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dropdown-error-custom.html) -->
|
|
433
|
+
<!-- The below content is automatically added from ./../apiExamples/dropdown-error-custom.html -->
|
|
434
|
+
<auro-counter-group error="Please select the appropriate number of passengers" isDropdown>
|
|
435
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
436
|
+
<div slot="label">Passengers</div>
|
|
437
|
+
<auro-counter error="Cannot have less than 1 adult passenger">
|
|
438
|
+
Adults
|
|
439
|
+
<span slot="description">18 years or older</span>
|
|
440
|
+
</auro-counter>
|
|
441
|
+
<auro-counter error="Cannot have more than 2 child passengers">
|
|
442
|
+
Children
|
|
443
|
+
<span slot="description">2-17 years</span>
|
|
444
|
+
</auro-counter>
|
|
445
|
+
</auro-counter-group>
|
|
446
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
447
|
+
</div>
|
|
448
|
+
<auro-accordion alignRight>
|
|
449
|
+
<span slot="trigger">See code</span>
|
|
450
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dropdown-error-custom.html) -->
|
|
451
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/dropdown-error-custom.html -->
|
|
452
|
+
|
|
453
|
+
```html
|
|
454
|
+
<auro-counter-group error="Please select the appropriate number of passengers" isDropdown>
|
|
455
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
456
|
+
<div slot="label">Passengers</div>
|
|
457
|
+
<auro-counter error="Cannot have less than 1 adult passenger">
|
|
458
|
+
Adults
|
|
459
|
+
<span slot="description">18 years or older</span>
|
|
460
|
+
</auro-counter>
|
|
461
|
+
<auro-counter error="Cannot have more than 2 child passengers">
|
|
462
|
+
Children
|
|
463
|
+
<span slot="description">2-17 years</span>
|
|
464
|
+
</auro-counter>
|
|
465
|
+
</auro-counter-group>
|
|
466
|
+
```
|
|
467
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
468
|
+
</auro-accordion>
|
|
469
|
+
|
|
343
470
|
### Group Max/Min
|
|
344
471
|
|
|
345
472
|
The group counter max or min property sets the value for all counters in the group. If a counter has a max value set, the group max attribute will override it. All increment buttons as a result will be disabled to prevent the group of counters from exceeding the group max.
|