@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.23 → 0.0.0-pr624.25

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 (36) hide show
  1. package/components/checkbox/demo/api.md +39 -5
  2. package/components/checkbox/demo/api.min.js +5 -5
  3. package/components/checkbox/demo/index.min.js +5 -5
  4. package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
  5. package/components/checkbox/dist/index.js +5 -5
  6. package/components/checkbox/dist/registered.js +5 -5
  7. package/components/combobox/demo/api.md +46 -1
  8. package/components/combobox/demo/api.min.js +7 -0
  9. package/components/combobox/demo/index.md +1 -31
  10. package/components/combobox/demo/index.min.js +7 -0
  11. package/components/combobox/dist/auro-combobox.d.ts +1 -0
  12. package/components/combobox/dist/index.js +7 -0
  13. package/components/combobox/dist/registered.js +7 -0
  14. package/components/datepicker/demo/api.min.js +2 -0
  15. package/components/datepicker/demo/index.min.js +2 -0
  16. package/components/datepicker/dist/index.js +2 -0
  17. package/components/datepicker/dist/registered.js +2 -0
  18. package/components/input/demo/api.md +34 -5
  19. package/components/input/demo/api.min.js +2 -0
  20. package/components/input/demo/index.min.js +2 -0
  21. package/components/input/dist/base-input.d.ts +1 -0
  22. package/components/input/dist/index.js +2 -0
  23. package/components/input/dist/registered.js +2 -0
  24. package/components/radio/demo/api.md +5 -5
  25. package/components/radio/demo/api.min.js +5 -5
  26. package/components/radio/demo/index.min.js +5 -5
  27. package/components/radio/dist/auro-radio-group.d.ts +1 -1
  28. package/components/radio/dist/index.js +5 -5
  29. package/components/radio/dist/registered.js +5 -5
  30. package/components/select/demo/api.md +45 -0
  31. package/components/select/demo/api.min.js +5 -0
  32. package/components/select/demo/index.min.js +5 -0
  33. package/components/select/dist/auro-select.d.ts +1 -0
  34. package/components/select/dist/index.js +5 -0
  35. package/components/select/dist/registered.js +5 -0
  36. package/package.json +1 -1
@@ -36,11 +36,11 @@ The auro-checkbox-group element is a wrapper for auro-checkbox element.
36
36
 
37
37
  ## Slots
38
38
 
39
- | Name | Description |
40
- |-----------------|-------------------------------------------------|
41
- | [helpText](#helpText) | Allows for the helper text to be overridden. |
42
- | [legend](#legend) | Allows for the legend to be overridden. |
43
- | [optionalLabel](#optionalLabel) | Allows for the optional label to be overridden. |
39
+ | Name | Description |
40
+ |-----------------|--------------------------------------------------|
41
+ | [helpText](#helpText) | Allows for the helper text to be overridden. |
42
+ | [legend](#legend) | Allows for the legend to be overridden. |
43
+ | [optionalLabel](#optionalLabel) | Allows overriding the optional display text "(optional)", which appears next to the label. |
44
44
 
45
45
  # auro-checkbox
46
46
 
@@ -326,6 +326,40 @@ When present, the `required` attribute specifies that at least one or more `<aur
326
326
  <!-- AURO-GENERATED-CONTENT:END -->
327
327
  </auro-accordion>
328
328
 
329
+ ### Custom optional label <a name="optionalLabel"></a>
330
+ The `<auro-checkbox-group>` supports an `optionalLabel` slot, where users can can override the default `(optional)` notification text.
331
+
332
+ <div class="exampleWrapper">
333
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optionalLabel.html) -->
334
+ <!-- The below content is automatically added from ./../apiExamples/optionalLabel.html -->
335
+ <auro-checkbox-group>
336
+ <span slot="legend">Form label goes here</span>
337
+ <span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
338
+ <auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
339
+ <auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
340
+ <auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option that has some extra text that should wrap when rendered in a narrow container</auro-checkbox>
341
+ <auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
342
+ </auro-checkbox-group>
343
+ <!-- AURO-GENERATED-CONTENT:END -->
344
+ </div>
345
+ <auro-accordion alignRight>
346
+ <span slot="trigger">See code</span>
347
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/optionalLabel.html) -->
348
+ <!-- The below code snippet is automatically added from ./../apiExamples/optionalLabel.html -->
349
+
350
+ ```html
351
+ <auro-checkbox-group>
352
+ <span slot="legend">Form label goes here</span>
353
+ <span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
354
+ <auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
355
+ <auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
356
+ <auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option that has some extra text that should wrap when rendered in a narrow container</auro-checkbox>
357
+ <auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
358
+ </auro-checkbox-group>
359
+ ```
360
+ <!-- AURO-GENERATED-CONTENT:END -->
361
+ </auro-accordion>
362
+
329
363
  ### Functional Examples
330
364
 
331
365
  #### Reset State
@@ -1437,7 +1437,7 @@ var helpTextVersion = '1.0.0';
1437
1437
  * The auro-checkbox-group element is a wrapper for auro-checkbox element.
1438
1438
  *
1439
1439
  * @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
1440
- * @slot {HTMLSlotElement} optionalLabel - Allows for the optional label to be overridden.
1440
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
1441
1441
  * @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
1442
1442
  * @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
1443
1443
  */
@@ -1805,10 +1805,10 @@ class AuroCheckboxGroup extends i$2 {
1805
1805
 
1806
1806
  return u`
1807
1807
  <fieldset class="${e(groupClasses)}">
1808
- ${this.required
1809
- ? u`<legend><slot name="legend"></slot></legend>`
1810
- : u`<legend><slot name="legend"></slot> (optional)</legend>`
1811
- }
1808
+ <legend>
1809
+ <slot name="legend"></slot>
1810
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
1811
+ </legend>
1812
1812
  <slot @slotchange=${this.handleItems}></slot>
1813
1813
  </fieldset>
1814
1814
 
@@ -1429,7 +1429,7 @@ var helpTextVersion = '1.0.0';
1429
1429
  * The auro-checkbox-group element is a wrapper for auro-checkbox element.
1430
1430
  *
1431
1431
  * @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
1432
- * @slot {HTMLSlotElement} optionalLabel - Allows for the optional label to be overridden.
1432
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
1433
1433
  * @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
1434
1434
  * @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
1435
1435
  */
@@ -1797,10 +1797,10 @@ class AuroCheckboxGroup extends i$2 {
1797
1797
 
1798
1798
  return u`
1799
1799
  <fieldset class="${e(groupClasses)}">
1800
- ${this.required
1801
- ? u`<legend><slot name="legend"></slot></legend>`
1802
- : u`<legend><slot name="legend"></slot> (optional)</legend>`
1803
- }
1800
+ <legend>
1801
+ <slot name="legend"></slot>
1802
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
1803
+ </legend>
1804
1804
  <slot @slotchange=${this.handleItems}></slot>
1805
1805
  </fieldset>
1806
1806
 
@@ -2,7 +2,7 @@
2
2
  * The auro-checkbox-group element is a wrapper for auro-checkbox element.
3
3
  *
4
4
  * @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
5
- * @slot {HTMLSlotElement} optionalLabel - Allows for the optional label to be overridden.
5
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
6
6
  * @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
7
7
  * @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
8
8
  */
@@ -1382,7 +1382,7 @@ var helpTextVersion = '1.0.0';
1382
1382
  * The auro-checkbox-group element is a wrapper for auro-checkbox element.
1383
1383
  *
1384
1384
  * @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
1385
- * @slot {HTMLSlotElement} optionalLabel - Allows for the optional label to be overridden.
1385
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
1386
1386
  * @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
1387
1387
  * @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
1388
1388
  */
@@ -1750,10 +1750,10 @@ class AuroCheckboxGroup extends LitElement {
1750
1750
 
1751
1751
  return html$1`
1752
1752
  <fieldset class="${classMap(groupClasses)}">
1753
- ${this.required
1754
- ? html$1`<legend><slot name="legend"></slot></legend>`
1755
- : html$1`<legend><slot name="legend"></slot> (optional)</legend>`
1756
- }
1753
+ <legend>
1754
+ <slot name="legend"></slot>
1755
+ ${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
1756
+ </legend>
1757
1757
  <slot @slotchange=${this.handleItems}></slot>
1758
1758
  </fieldset>
1759
1759
 
@@ -1382,7 +1382,7 @@ var helpTextVersion = '1.0.0';
1382
1382
  * The auro-checkbox-group element is a wrapper for auro-checkbox element.
1383
1383
  *
1384
1384
  * @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
1385
- * @slot {HTMLSlotElement} optionalLabel - Allows for the optional label to be overridden.
1385
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
1386
1386
  * @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
1387
1387
  * @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
1388
1388
  */
@@ -1750,10 +1750,10 @@ class AuroCheckboxGroup extends LitElement {
1750
1750
 
1751
1751
  return html$1`
1752
1752
  <fieldset class="${classMap(groupClasses)}">
1753
- ${this.required
1754
- ? html$1`<legend><slot name="legend"></slot></legend>`
1755
- : html$1`<legend><slot name="legend"></slot> (optional)</legend>`
1756
- }
1753
+ <legend>
1754
+ <slot name="legend"></slot>
1755
+ ${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
1756
+ </legend>
1757
1757
  <slot @slotchange=${this.handleItems}></slot>
1758
1758
  </fieldset>
1759
1759
 
@@ -59,7 +59,8 @@
59
59
  | `bib.fullscreen.headline` | Defines the headline to display above menu-options |
60
60
  | [displayValue](#displayValue) | Allows custom HTML content to display the selected value when the combobox is not focused. Only works with `snowflake` and `emphasized` layouts. |
61
61
  | [helpText](#helpText) | Defines the content of the helpText. |
62
- | [label](#label) | Defines the content of the label. |
62
+ | [label](#label) | Defines the content of the label. |
63
+ | [optionalLabel](#optionalLabel) | Allows overriding the optional display text "(optional)", which appears next to the label. |
63
64
  <!-- AURO-GENERATED-CONTENT:END -->
64
65
 
65
66
  ## API Examples
@@ -579,6 +580,50 @@ Populates the `required` attribute on the input. Used for client-side validation
579
580
  <!-- AURO-GENERATED-CONTENT:END -->
580
581
  </auro-accordion>
581
582
 
583
+ ### Custom optional label <a name="optionalLabel"></a>
584
+ The `<auro-combobox>` supports an `optionalLabel` slot, where users can can override the default `(optional)` notification text.
585
+
586
+ <div class="exampleWrapper">
587
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optionalLabel.html) -->
588
+ <!-- The below content is automatically added from ./../apiExamples/optionalLabel.html -->
589
+ <auro-combobox>
590
+ <span slot="bib.fullscreen.headline">Bib Header</span>
591
+ <span slot="label">Name</span>
592
+ <span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
593
+ <auro-menu>
594
+ <auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
595
+ <auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
596
+ <auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
597
+ <auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
598
+ <auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
599
+ <auro-menuoption static nomatch>No matching option</auro-menuoption>
600
+ </auro-menu>
601
+ </auro-combobox>
602
+ <!-- AURO-GENERATED-CONTENT:END -->
603
+ </div>
604
+ <auro-accordion alignRight>
605
+ <span slot="trigger">See code</span>
606
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/optionalLabel.html) -->
607
+ <!-- The below code snippet is automatically added from ./../apiExamples/optionalLabel.html -->
608
+
609
+ ```html
610
+ <auro-combobox>
611
+ <span slot="bib.fullscreen.headline">Bib Header</span>
612
+ <span slot="label">Name</span>
613
+ <span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
614
+ <auro-menu>
615
+ <auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
616
+ <auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
617
+ <auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
618
+ <auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
619
+ <auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
620
+ <auro-menuoption static nomatch>No matching option</auro-menuoption>
621
+ </auro-menu>
622
+ </auro-combobox>
623
+ ```
624
+ <!-- AURO-GENERATED-CONTENT:END -->
625
+ </auro-accordion>
626
+
582
627
  #### value
583
628
 
584
629
  Use the `value` attribute to programmatically set the value of the combobox.
@@ -10171,6 +10171,7 @@ let AuroElement$2$1 = class AuroElement extends i$2 {
10171
10171
  *
10172
10172
  * @slot helptext - Sets the help text displayed below the input.
10173
10173
  * @slot label - Sets the label text for the input.
10174
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
10174
10175
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
10175
10176
  *
10176
10177
  * @csspart wrapper - Use for customizing the style of the root element
@@ -13152,6 +13153,7 @@ class AuroInput extends BaseInput {
13152
13153
  <slot name="label">
13153
13154
  ${this.label}
13154
13155
  </slot>
13156
+ ${this.required ? undefined : u$2`<slot name="optionalLabel"> (optional)</slot>`}
13155
13157
  </label>
13156
13158
 
13157
13159
  <!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
@@ -15686,6 +15688,7 @@ class AuroHelpText extends i$2 {
15686
15688
  // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
15687
15689
  /**
15688
15690
  * @slot - Default slot for the menu content.
15691
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
15689
15692
  * @slot bib.fullscreen.headline - Defines the headline to display above menu-options
15690
15693
  * @slot label - Defines the content of the label.
15691
15694
  * @slot helpText - Defines the content of the helpText.
@@ -16641,6 +16644,9 @@ class AuroCombobox extends AuroElement$1 {
16641
16644
  // It's because the bib is/will be separated from dropdown to body.
16642
16645
  this.transportAssignedNodes(event.target, this.inputInBib, "label");
16643
16646
  break;
16647
+ case 'optionalLabel':
16648
+ this.transportAssignedNodes(event.target, this.inputInBib, "optionalLabel");
16649
+ break;
16644
16650
  case 'bib.fullscreen.headline':
16645
16651
  this.transportAssignedNodes(event.target, this.bibtemplate, 'header');
16646
16652
  break;
@@ -16711,6 +16717,7 @@ class AuroCombobox extends AuroElement$1 {
16711
16717
  size="${this.size}"
16712
16718
  slot="trigger">
16713
16719
  <slot name="label" slot="label" @slotchange="${this.handleSlotChange}"></slot>
16720
+ <slot name="optionalLabel" slot="optionalLabel" @slotchange="${this.handleSlotChange}"> (optional)</slot>
16714
16721
  <slot name="displayValue" slot="displayValue"></slot>
16715
16722
  </${this.inputTag}>
16716
16723
 
@@ -70,7 +70,7 @@ The `<auro-combobox>` element should be used in situations where users may:
70
70
  <div class="exampleWrapper--ondark">
71
71
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/emphasized/basic.html) -->
72
72
  <!-- The below content is automatically added from ./../apiExamples/emphasized/basic.html -->
73
- <auro-combobox layout="emphasized" shape="pill" size="xl" placeholder="Placeholder content" required ondark style="width: 249px;">
73
+ <auro-combobox layout="emphasized" value="Oranges" shape="pill" size="xl" placeholder="Placeholder content" required ondark style="width: 249px;">
74
74
  <span slot="bib.fullscreen.headline">Bib Header</span>
75
75
  <span slot="label">Name</span>
76
76
  <auro-menu>
@@ -90,36 +90,6 @@ The `<auro-combobox>` element should be used in situations where users may:
90
90
  <div class="subText">Fruit</div>
91
91
  </div>
92
92
  </span>
93
- </auro-combobox>
94
- <auro-combobox layout="emphasized" shape="pill-left" size="xl" placeholder="Placeholder content" required ondark style="width: 249px;">
95
- <span slot="bib.fullscreen.headline">Bib Header</span>
96
- <span slot="label">Name</span>
97
- <auro-menu>
98
- <auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
99
- <auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
100
- <auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
101
- <auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
102
- <auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
103
- <auro-menuoption static nomatch>No matching option</auro-menuoption>
104
- </auro-menu>
105
- <span slot="helpText">
106
- Help text - Lorem ipsum solar lorem ipsum solar
107
- </span>
108
- </auro-combobox>
109
- <auro-combobox layout="emphasized" shape="pill-right" size="xl" placeholder="Placeholder content" required ondark style="width: 249px;">
110
- <span slot="bib.fullscreen.headline">Bib Header</span>
111
- <span slot="label">Name</span>
112
- <auro-menu>
113
- <auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
114
- <auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
115
- <auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
116
- <auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
117
- <auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
118
- <auro-menuoption static nomatch>No matching option</auro-menuoption>
119
- </auro-menu>
120
- <span slot="helpText">
121
- Help text - Lorem ipsum solar lorem ipsum solar
122
- </span>
123
93
  </auro-combobox>
124
94
  <!-- AURO-GENERATED-CONTENT:END -->
125
95
  </div>
@@ -10029,6 +10029,7 @@ let AuroElement$2$1 = class AuroElement extends i$2 {
10029
10029
  *
10030
10030
  * @slot helptext - Sets the help text displayed below the input.
10031
10031
  * @slot label - Sets the label text for the input.
10032
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
10032
10033
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
10033
10034
  *
10034
10035
  * @csspart wrapper - Use for customizing the style of the root element
@@ -13010,6 +13011,7 @@ class AuroInput extends BaseInput {
13010
13011
  <slot name="label">
13011
13012
  ${this.label}
13012
13013
  </slot>
13014
+ ${this.required ? undefined : u$2`<slot name="optionalLabel"> (optional)</slot>`}
13013
13015
  </label>
13014
13016
 
13015
13017
  <!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
@@ -15544,6 +15546,7 @@ class AuroHelpText extends i$2 {
15544
15546
  // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
15545
15547
  /**
15546
15548
  * @slot - Default slot for the menu content.
15549
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
15547
15550
  * @slot bib.fullscreen.headline - Defines the headline to display above menu-options
15548
15551
  * @slot label - Defines the content of the label.
15549
15552
  * @slot helpText - Defines the content of the helpText.
@@ -16499,6 +16502,9 @@ class AuroCombobox extends AuroElement$1 {
16499
16502
  // It's because the bib is/will be separated from dropdown to body.
16500
16503
  this.transportAssignedNodes(event.target, this.inputInBib, "label");
16501
16504
  break;
16505
+ case 'optionalLabel':
16506
+ this.transportAssignedNodes(event.target, this.inputInBib, "optionalLabel");
16507
+ break;
16502
16508
  case 'bib.fullscreen.headline':
16503
16509
  this.transportAssignedNodes(event.target, this.bibtemplate, 'header');
16504
16510
  break;
@@ -16569,6 +16575,7 @@ class AuroCombobox extends AuroElement$1 {
16569
16575
  size="${this.size}"
16570
16576
  slot="trigger">
16571
16577
  <slot name="label" slot="label" @slotchange="${this.handleSlotChange}"></slot>
16578
+ <slot name="optionalLabel" slot="optionalLabel" @slotchange="${this.handleSlotChange}"> (optional)</slot>
16572
16579
  <slot name="displayValue" slot="displayValue"></slot>
16573
16580
  </${this.inputTag}>
16574
16581
 
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * @slot - Default slot for the menu content.
3
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
3
4
  * @slot bib.fullscreen.headline - Defines the headline to display above menu-options
4
5
  * @slot label - Defines the content of the label.
5
6
  * @slot helpText - Defines the content of the helpText.
@@ -9947,6 +9947,7 @@ let AuroElement$2$1 = class AuroElement extends LitElement {
9947
9947
  *
9948
9948
  * @slot helptext - Sets the help text displayed below the input.
9949
9949
  * @slot label - Sets the label text for the input.
9950
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
9950
9951
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
9951
9952
  *
9952
9953
  * @csspart wrapper - Use for customizing the style of the root element
@@ -12928,6 +12929,7 @@ class AuroInput extends BaseInput {
12928
12929
  <slot name="label">
12929
12930
  ${this.label}
12930
12931
  </slot>
12932
+ ${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
12931
12933
  </label>
12932
12934
 
12933
12935
  <!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
@@ -15462,6 +15464,7 @@ class AuroHelpText extends LitElement {
15462
15464
  // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
15463
15465
  /**
15464
15466
  * @slot - Default slot for the menu content.
15467
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
15465
15468
  * @slot bib.fullscreen.headline - Defines the headline to display above menu-options
15466
15469
  * @slot label - Defines the content of the label.
15467
15470
  * @slot helpText - Defines the content of the helpText.
@@ -16417,6 +16420,9 @@ class AuroCombobox extends AuroElement {
16417
16420
  // It's because the bib is/will be separated from dropdown to body.
16418
16421
  this.transportAssignedNodes(event.target, this.inputInBib, "label");
16419
16422
  break;
16423
+ case 'optionalLabel':
16424
+ this.transportAssignedNodes(event.target, this.inputInBib, "optionalLabel");
16425
+ break;
16420
16426
  case 'bib.fullscreen.headline':
16421
16427
  this.transportAssignedNodes(event.target, this.bibtemplate, 'header');
16422
16428
  break;
@@ -16487,6 +16493,7 @@ class AuroCombobox extends AuroElement {
16487
16493
  size="${this.size}"
16488
16494
  slot="trigger">
16489
16495
  <slot name="label" slot="label" @slotchange="${this.handleSlotChange}"></slot>
16496
+ <slot name="optionalLabel" slot="optionalLabel" @slotchange="${this.handleSlotChange}"> (optional)</slot>
16490
16497
  <slot name="displayValue" slot="displayValue"></slot>
16491
16498
  </${this.inputTag}>
16492
16499
 
@@ -9947,6 +9947,7 @@ let AuroElement$2$1 = class AuroElement extends LitElement {
9947
9947
  *
9948
9948
  * @slot helptext - Sets the help text displayed below the input.
9949
9949
  * @slot label - Sets the label text for the input.
9950
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
9950
9951
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
9951
9952
  *
9952
9953
  * @csspart wrapper - Use for customizing the style of the root element
@@ -12928,6 +12929,7 @@ class AuroInput extends BaseInput {
12928
12929
  <slot name="label">
12929
12930
  ${this.label}
12930
12931
  </slot>
12932
+ ${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
12931
12933
  </label>
12932
12934
 
12933
12935
  <!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
@@ -15462,6 +15464,7 @@ class AuroHelpText extends LitElement {
15462
15464
  // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
15463
15465
  /**
15464
15466
  * @slot - Default slot for the menu content.
15467
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
15465
15468
  * @slot bib.fullscreen.headline - Defines the headline to display above menu-options
15466
15469
  * @slot label - Defines the content of the label.
15467
15470
  * @slot helpText - Defines the content of the helpText.
@@ -16417,6 +16420,9 @@ class AuroCombobox extends AuroElement {
16417
16420
  // It's because the bib is/will be separated from dropdown to body.
16418
16421
  this.transportAssignedNodes(event.target, this.inputInBib, "label");
16419
16422
  break;
16423
+ case 'optionalLabel':
16424
+ this.transportAssignedNodes(event.target, this.inputInBib, "optionalLabel");
16425
+ break;
16420
16426
  case 'bib.fullscreen.headline':
16421
16427
  this.transportAssignedNodes(event.target, this.bibtemplate, 'header');
16422
16428
  break;
@@ -16487,6 +16493,7 @@ class AuroCombobox extends AuroElement {
16487
16493
  size="${this.size}"
16488
16494
  slot="trigger">
16489
16495
  <slot name="label" slot="label" @slotchange="${this.handleSlotChange}"></slot>
16496
+ <slot name="optionalLabel" slot="optionalLabel" @slotchange="${this.handleSlotChange}"> (optional)</slot>
16490
16497
  <slot name="displayValue" slot="displayValue"></slot>
16491
16498
  </${this.inputTag}>
16492
16499
 
@@ -23488,6 +23488,7 @@ let AuroElement$2 = class AuroElement extends i {
23488
23488
  *
23489
23489
  * @slot helptext - Sets the help text displayed below the input.
23490
23490
  * @slot label - Sets the label text for the input.
23491
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
23491
23492
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
23492
23493
  *
23493
23494
  * @csspart wrapper - Use for customizing the style of the root element
@@ -26469,6 +26470,7 @@ class AuroInput extends BaseInput {
26469
26470
  <slot name="label">
26470
26471
  ${this.label}
26471
26472
  </slot>
26473
+ ${this.required ? undefined : u$3`<slot name="optionalLabel"> (optional)</slot>`}
26472
26474
  </label>
26473
26475
 
26474
26476
  <!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
@@ -23229,6 +23229,7 @@ let AuroElement$2 = class AuroElement extends i {
23229
23229
  *
23230
23230
  * @slot helptext - Sets the help text displayed below the input.
23231
23231
  * @slot label - Sets the label text for the input.
23232
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
23232
23233
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
23233
23234
  *
23234
23235
  * @csspart wrapper - Use for customizing the style of the root element
@@ -26210,6 +26211,7 @@ class AuroInput extends BaseInput {
26210
26211
  <slot name="label">
26211
26212
  ${this.label}
26212
26213
  </slot>
26214
+ ${this.required ? undefined : u$3`<slot name="optionalLabel"> (optional)</slot>`}
26213
26215
  </label>
26214
26216
 
26215
26217
  <!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
@@ -23165,6 +23165,7 @@ let AuroElement$2 = class AuroElement extends LitElement {
23165
23165
  *
23166
23166
  * @slot helptext - Sets the help text displayed below the input.
23167
23167
  * @slot label - Sets the label text for the input.
23168
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
23168
23169
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
23169
23170
  *
23170
23171
  * @csspart wrapper - Use for customizing the style of the root element
@@ -26146,6 +26147,7 @@ class AuroInput extends BaseInput {
26146
26147
  <slot name="label">
26147
26148
  ${this.label}
26148
26149
  </slot>
26150
+ ${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
26149
26151
  </label>
26150
26152
 
26151
26153
  <!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
@@ -23165,6 +23165,7 @@ let AuroElement$2 = class AuroElement extends LitElement {
23165
23165
  *
23166
23166
  * @slot helptext - Sets the help text displayed below the input.
23167
23167
  * @slot label - Sets the label text for the input.
23168
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
23168
23169
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
23169
23170
  *
23170
23171
  * @csspart wrapper - Use for customizing the style of the root element
@@ -26146,6 +26147,7 @@ class AuroInput extends BaseInput {
26146
26147
  <slot name="label">
26147
26148
  ${this.label}
26148
26149
  </slot>
26150
+ ${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
26149
26151
  </label>
26150
26152
 
26151
26153
  <!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
@@ -75,11 +75,12 @@ Generate unique names for dependency components.
75
75
 
76
76
  ## Slots
77
77
 
78
- | Name | Description |
79
- |----------------|--------------------------------------------------|
80
- | [displayValue](#displayValue) | Allows custom HTML content to display in place of the value when the input is not focused. |
81
- | [helptext](#helptext) | Sets the help text displayed below the input. |
82
- | [label](#label) | Sets the label text for the input. |
78
+ | Name | Description |
79
+ |-----------------|--------------------------------------------------|
80
+ | [displayValue](#displayValue) | Allows custom HTML content to display in place of the value when the input is not focused. |
81
+ | [helptext](#helptext) | Sets the help text displayed below the input. |
82
+ | [label](#label) | Sets the label text for the input. |
83
+ | [optionalLabel](#optionalLabel) | Allows overriding the optional display text "(optional)", which appears next to the label. |
83
84
 
84
85
  ## CSS Shadow Parts
85
86
 
@@ -664,6 +665,34 @@ When the validity check fails, the validityState equals `valueMissing`. The erro
664
665
  <!-- AURO-GENERATED-CONTENT:END -->
665
666
  </auro-accordion>
666
667
 
668
+ ### Custom optional label <a name="optionalLabel"></a>
669
+ The `<auro-input>` supports an `optionalLabel` slot, where users can can override the default `(optional)` notification text.
670
+
671
+ <div class="exampleWrapper">
672
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optionalLabel.html) -->
673
+ <!-- The below content is automatically added from ./../apiExamples/optionalLabel.html -->
674
+ <auro-input placeholder="John Doe" bordered>
675
+ <span slot="label">Full name</span>
676
+ <span slot="optionalLabel" style="color: grey; font-size: small"> - optional</span>
677
+ <span slot="helptext">Please enter your full name.</span>
678
+ </auro-input>
679
+ <!-- AURO-GENERATED-CONTENT:END -->
680
+ </div>
681
+ <auro-accordion alignRight>
682
+ <span slot="trigger">See code</span>
683
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/optionalLabel.html) -->
684
+ <!-- The below code snippet is automatically added from ./../apiExamples/optionalLabel.html -->
685
+
686
+ ```html
687
+ <auro-input placeholder="John Doe" bordered>
688
+ <span slot="label">Full name</span>
689
+ <span slot="optionalLabel" style="color: grey; font-size: small"> - optional</span>
690
+ <span slot="helptext">Please enter your full name.</span>
691
+ </auro-input>
692
+ ```
693
+ <!-- AURO-GENERATED-CONTENT:END -->
694
+ </auro-accordion>
695
+
667
696
  ### Validation on input <a name="validateOnInput"></a>
668
697
  Use the `validateOnInput` attribute to enable live validation on the `input` event. Recommended use is with setting a custom `pattern` and validation is required prior to a `blur` event.
669
698
 
@@ -5096,6 +5096,7 @@ let AuroElement$2 = class AuroElement extends i$2 {
5096
5096
  *
5097
5097
  * @slot helptext - Sets the help text displayed below the input.
5098
5098
  * @slot label - Sets the label text for the input.
5099
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
5099
5100
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
5100
5101
  *
5101
5102
  * @csspart wrapper - Use for customizing the style of the root element
@@ -8077,6 +8078,7 @@ class AuroInput extends BaseInput {
8077
8078
  <slot name="label">
8078
8079
  ${this.label}
8079
8080
  </slot>
8081
+ ${this.required ? undefined : u$2`<slot name="optionalLabel"> (optional)</slot>`}
8080
8082
  </label>
8081
8083
 
8082
8084
  <!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
@@ -5021,6 +5021,7 @@ let AuroElement$2 = class AuroElement extends i$2 {
5021
5021
  *
5022
5022
  * @slot helptext - Sets the help text displayed below the input.
5023
5023
  * @slot label - Sets the label text for the input.
5024
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
5024
5025
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
5025
5026
  *
5026
5027
  * @csspart wrapper - Use for customizing the style of the root element
@@ -8002,6 +8003,7 @@ class AuroInput extends BaseInput {
8002
8003
  <slot name="label">
8003
8004
  ${this.label}
8004
8005
  </slot>
8006
+ ${this.required ? undefined : u$2`<slot name="optionalLabel"> (optional)</slot>`}
8005
8007
  </label>
8006
8008
 
8007
8009
  <!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
@@ -6,6 +6,7 @@
6
6
  *
7
7
  * @slot helptext - Sets the help text displayed below the input.
8
8
  * @slot label - Sets the label text for the input.
9
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
9
10
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
10
11
  *
11
12
  * @csspart wrapper - Use for customizing the style of the root element
@@ -4945,6 +4945,7 @@ let AuroElement$2 = class AuroElement extends LitElement {
4945
4945
  *
4946
4946
  * @slot helptext - Sets the help text displayed below the input.
4947
4947
  * @slot label - Sets the label text for the input.
4948
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
4948
4949
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
4949
4950
  *
4950
4951
  * @csspart wrapper - Use for customizing the style of the root element
@@ -7926,6 +7927,7 @@ class AuroInput extends BaseInput {
7926
7927
  <slot name="label">
7927
7928
  ${this.label}
7928
7929
  </slot>
7930
+ ${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
7929
7931
  </label>
7930
7932
 
7931
7933
  <!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
@@ -4945,6 +4945,7 @@ let AuroElement$2 = class AuroElement extends LitElement {
4945
4945
  *
4946
4946
  * @slot helptext - Sets the help text displayed below the input.
4947
4947
  * @slot label - Sets the label text for the input.
4948
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
4948
4949
  * @slot displayValue - Allows custom HTML content to display in place of the value when the input is not focused.
4949
4950
  *
4950
4951
  * @csspart wrapper - Use for customizing the style of the root element
@@ -7926,6 +7927,7 @@ class AuroInput extends BaseInput {
7926
7927
  <slot name="label">
7927
7928
  ${this.label}
7928
7929
  </slot>
7930
+ ${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
7929
7931
  </label>
7930
7932
 
7931
7933
  <!-- Attributes are grouped into: basic attributes, event handlers, ARIA attributes, and input-specific attributes -->
@@ -36,11 +36,11 @@
36
36
 
37
37
  ## Slots
38
38
 
39
- | Name | Description |
40
- |-----------------|-------------------------------------------------|
41
- | [helpText](#helpText) | Allows for the helper text to be overridden. |
42
- | [legend](#legend) | Allows for the legend to be overridden. |
43
- | [optionalLabel](#optionalLabel) | Allows for the optional label to be overridden. |
39
+ | Name | Description |
40
+ |-----------------|--------------------------------------------------|
41
+ | [helpText](#helpText) | Allows for the helper text to be overridden. |
42
+ | [legend](#legend) | Allows for the legend to be overridden. |
43
+ | [optionalLabel](#optionalLabel) | Allows overriding the optional display text "(optional)", which appears next to the label. |
44
44
 
45
45
  ## CSS Shadow Parts
46
46
 
@@ -1486,7 +1486,7 @@ var helpTextVersion = '1.0.0';
1486
1486
  * @attr {Object} optionSelected - Specifies the current selected radio button.
1487
1487
  * @csspart radio-group - Apply css to the fieldset element in the shadow DOM
1488
1488
  * @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
1489
- * @slot {HTMLSlotElement} optionalLabel - Allows for the optional label to be overridden.
1489
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
1490
1490
  * @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
1491
1491
  * @event auroFormElement-validated - Notifies that the element has been validated.
1492
1492
  * @event input - Notifies every time the value prop of the element is changed.
@@ -1909,10 +1909,10 @@ class AuroRadioGroup extends i$2 {
1909
1909
 
1910
1910
  return u`
1911
1911
  <fieldset class="${e(groupClasses)}" part="radio-group">
1912
- ${this.required
1913
- ? u`<legend><slot name="legend"></slot></legend>`
1914
- : u`<legend><slot name="legend"></slot> <slot name="optionalLabel">(optional)</slot></legend>`
1915
- }
1912
+ <legend>
1913
+ <slot name="legend"></slot>
1914
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
1915
+ </legend>
1916
1916
  <slot @slotchange=${this.handleSlotChange}></slot>
1917
1917
  </fieldset>
1918
1918
 
@@ -1461,7 +1461,7 @@ var helpTextVersion = '1.0.0';
1461
1461
  * @attr {Object} optionSelected - Specifies the current selected radio button.
1462
1462
  * @csspart radio-group - Apply css to the fieldset element in the shadow DOM
1463
1463
  * @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
1464
- * @slot {HTMLSlotElement} optionalLabel - Allows for the optional label to be overridden.
1464
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
1465
1465
  * @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
1466
1466
  * @event auroFormElement-validated - Notifies that the element has been validated.
1467
1467
  * @event input - Notifies every time the value prop of the element is changed.
@@ -1884,10 +1884,10 @@ class AuroRadioGroup extends i$2 {
1884
1884
 
1885
1885
  return u`
1886
1886
  <fieldset class="${e(groupClasses)}" part="radio-group">
1887
- ${this.required
1888
- ? u`<legend><slot name="legend"></slot></legend>`
1889
- : u`<legend><slot name="legend"></slot> <slot name="optionalLabel">(optional)</slot></legend>`
1890
- }
1887
+ <legend>
1888
+ <slot name="legend"></slot>
1889
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
1890
+ </legend>
1891
1891
  <slot @slotchange=${this.handleSlotChange}></slot>
1892
1892
  </fieldset>
1893
1893
 
@@ -10,7 +10,7 @@
10
10
  * @attr {Object} optionSelected - Specifies the current selected radio button.
11
11
  * @csspart radio-group - Apply css to the fieldset element in the shadow DOM
12
12
  * @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
13
- * @slot {HTMLSlotElement} optionalLabel - Allows for the optional label to be overridden.
13
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
14
14
  * @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
15
15
  * @event auroFormElement-validated - Notifies that the element has been validated.
16
16
  * @event input - Notifies every time the value prop of the element is changed.
@@ -1414,7 +1414,7 @@ var helpTextVersion = '1.0.0';
1414
1414
  * @attr {Object} optionSelected - Specifies the current selected radio button.
1415
1415
  * @csspart radio-group - Apply css to the fieldset element in the shadow DOM
1416
1416
  * @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
1417
- * @slot {HTMLSlotElement} optionalLabel - Allows for the optional label to be overridden.
1417
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
1418
1418
  * @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
1419
1419
  * @event auroFormElement-validated - Notifies that the element has been validated.
1420
1420
  * @event input - Notifies every time the value prop of the element is changed.
@@ -1837,10 +1837,10 @@ class AuroRadioGroup extends LitElement {
1837
1837
 
1838
1838
  return html$1`
1839
1839
  <fieldset class="${classMap(groupClasses)}" part="radio-group">
1840
- ${this.required
1841
- ? html$1`<legend><slot name="legend"></slot></legend>`
1842
- : html$1`<legend><slot name="legend"></slot> <slot name="optionalLabel">(optional)</slot></legend>`
1843
- }
1840
+ <legend>
1841
+ <slot name="legend"></slot>
1842
+ ${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
1843
+ </legend>
1844
1844
  <slot @slotchange=${this.handleSlotChange}></slot>
1845
1845
  </fieldset>
1846
1846
 
@@ -1414,7 +1414,7 @@ var helpTextVersion = '1.0.0';
1414
1414
  * @attr {Object} optionSelected - Specifies the current selected radio button.
1415
1415
  * @csspart radio-group - Apply css to the fieldset element in the shadow DOM
1416
1416
  * @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
1417
- * @slot {HTMLSlotElement} optionalLabel - Allows for the optional label to be overridden.
1417
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
1418
1418
  * @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
1419
1419
  * @event auroFormElement-validated - Notifies that the element has been validated.
1420
1420
  * @event input - Notifies every time the value prop of the element is changed.
@@ -1837,10 +1837,10 @@ class AuroRadioGroup extends LitElement {
1837
1837
 
1838
1838
  return html$1`
1839
1839
  <fieldset class="${classMap(groupClasses)}" part="radio-group">
1840
- ${this.required
1841
- ? html$1`<legend><slot name="legend"></slot></legend>`
1842
- : html$1`<legend><slot name="legend"></slot> <slot name="optionalLabel">(optional)</slot></legend>`
1843
- }
1840
+ <legend>
1841
+ <slot name="legend"></slot>
1842
+ ${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
1843
+ </legend>
1844
1844
  <slot @slotchange=${this.handleSlotChange}></slot>
1845
1845
  </fieldset>
1846
1846
 
@@ -70,6 +70,7 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
70
70
  | [displayValue](#displayValue) | Allows custom HTML content to display the selected value when select is not focused. |
71
71
  | [helpText](#helpText) | Defines the content of the helpText. |
72
72
  | [label](#label) | Defines the content of the label. |
73
+ | [optionalLabel](#optionalLabel) | Allows overriding the optional display text "(optional)", which appears next to the label. |
73
74
  | [placeholder](#placeholder) | Defines the content of the placeholder to be shown when there is no value |
74
75
  | [valueText](#valueText) | Dropdown value text display. |
75
76
 
@@ -448,6 +449,50 @@ When the validity check fails the validityState, equals `valueMissing`. The erro
448
449
  <!-- AURO-GENERATED-CONTENT:END -->
449
450
  </auro-accordion>
450
451
 
452
+ ### Custom optional label <a name="optionalLabel"></a>
453
+ The `<auro-select>` supports an `optionalLabel` slot, where users can can override the default `(optional)` notification text.
454
+
455
+ <div class="exampleWrapper">
456
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optionalLabel.html) -->
457
+ <!-- The below content is automatically added from ./../apiExamples/optionalLabel.html -->
458
+ <auro-select>
459
+ <span slot="bib.fullscreen.headline">Bib Headline</span>
460
+ <span slot="label">Please select a preference</span>
461
+ <span slot="optionalLabel" style="color: grey; font-size: small"> - optional</span>
462
+ <auro-menu>
463
+ <auro-menuoption value="stops">Stops</auro-menuoption>
464
+ <auro-menuoption value="price">Price</auro-menuoption>
465
+ <auro-menuoption value="duration">Duration</auro-menuoption>
466
+ <auro-menuoption value="departure">Departure</auro-menuoption>
467
+ <auro-menuoption value="arrival">Arrival</auro-menuoption>
468
+ <auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
469
+ </auro-menu>
470
+ </auro-select>
471
+ <!-- AURO-GENERATED-CONTENT:END -->
472
+ </div>
473
+ <auro-accordion alignRight>
474
+ <span slot="trigger">See code</span>
475
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/optionalLabel.html) -->
476
+ <!-- The below code snippet is automatically added from ./../apiExamples/optionalLabel.html -->
477
+
478
+ ```html
479
+ <auro-select>
480
+ <span slot="bib.fullscreen.headline">Bib Headline</span>
481
+ <span slot="label">Please select a preference</span>
482
+ <span slot="optionalLabel" style="color: grey; font-size: small"> - optional</span>
483
+ <auro-menu>
484
+ <auro-menuoption value="stops">Stops</auro-menuoption>
485
+ <auro-menuoption value="price">Price</auro-menuoption>
486
+ <auro-menuoption value="duration">Duration</auro-menuoption>
487
+ <auro-menuoption value="departure">Departure</auro-menuoption>
488
+ <auro-menuoption value="arrival">Arrival</auro-menuoption>
489
+ <auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
490
+ </auro-menu>
491
+ </auro-select>
492
+ ```
493
+ <!-- AURO-GENERATED-CONTENT:END -->
494
+ </auro-accordion>
495
+
451
496
  #### error <a name="error"></a>
452
497
  Use the `error` boolean attribute to toggle the error UI.
453
498
 
@@ -7454,6 +7454,7 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
7454
7454
  * @slot - Default slot for the menu content.
7455
7455
  * @slot bib.fullscreen.headline - Defines the headline to display above menu-options
7456
7456
  * @slot label - Defines the content of the label.
7457
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
7457
7458
  * @slot helpText - Defines the content of the helpText.
7458
7459
  * @slot placeholder - Defines the content of the placeholder to be shown when there is no value
7459
7460
  * @slot valueText - Dropdown value text display.
@@ -8498,6 +8499,7 @@ class AuroSelect extends AuroElement$4 {
8498
8499
  <div class="${e(valueContainerClasses)}">
8499
8500
  <label class="${e(this.commonLabelClasses)}">
8500
8501
  <slot name="label"></slot>
8502
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
8501
8503
  </label>
8502
8504
  <div class="value" id="value"></div>
8503
8505
  ${this.value ? undefined : u`
@@ -8578,6 +8580,7 @@ class AuroSelect extends AuroElement$4 {
8578
8580
  <div class="${e(valueContainerClasses)}">
8579
8581
  <label class="${e(this.commonLabelClasses)}">
8580
8582
  <slot name="label"></slot>
8583
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
8581
8584
  </label>
8582
8585
  <div class="value" id="value"></div>
8583
8586
  ${this.value ? undefined : u`
@@ -8659,6 +8662,7 @@ class AuroSelect extends AuroElement$4 {
8659
8662
  <div class="${e(valueContainerClasses)}">
8660
8663
  <label class="${e(this.commonLabelClasses)}">
8661
8664
  <slot name="label"></slot>
8665
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
8662
8666
  </label>
8663
8667
  <div class="value" id="value"></div>
8664
8668
  ${this.value ? undefined : u`
@@ -8773,6 +8777,7 @@ class AuroSelect extends AuroElement$4 {
8773
8777
  <slot></slot>
8774
8778
  </${this.bibtemplateTag}>
8775
8779
  <slot name="label" slot="label"></slot>
8780
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
8776
8781
  <p slot="helpText">
8777
8782
  ${!this.validity || this.validity === undefined || this.validity === 'valid'
8778
8783
  ? u`
@@ -7351,6 +7351,7 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
7351
7351
  * @slot - Default slot for the menu content.
7352
7352
  * @slot bib.fullscreen.headline - Defines the headline to display above menu-options
7353
7353
  * @slot label - Defines the content of the label.
7354
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
7354
7355
  * @slot helpText - Defines the content of the helpText.
7355
7356
  * @slot placeholder - Defines the content of the placeholder to be shown when there is no value
7356
7357
  * @slot valueText - Dropdown value text display.
@@ -8395,6 +8396,7 @@ class AuroSelect extends AuroElement$4 {
8395
8396
  <div class="${e(valueContainerClasses)}">
8396
8397
  <label class="${e(this.commonLabelClasses)}">
8397
8398
  <slot name="label"></slot>
8399
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
8398
8400
  </label>
8399
8401
  <div class="value" id="value"></div>
8400
8402
  ${this.value ? undefined : u`
@@ -8475,6 +8477,7 @@ class AuroSelect extends AuroElement$4 {
8475
8477
  <div class="${e(valueContainerClasses)}">
8476
8478
  <label class="${e(this.commonLabelClasses)}">
8477
8479
  <slot name="label"></slot>
8480
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
8478
8481
  </label>
8479
8482
  <div class="value" id="value"></div>
8480
8483
  ${this.value ? undefined : u`
@@ -8556,6 +8559,7 @@ class AuroSelect extends AuroElement$4 {
8556
8559
  <div class="${e(valueContainerClasses)}">
8557
8560
  <label class="${e(this.commonLabelClasses)}">
8558
8561
  <slot name="label"></slot>
8562
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
8559
8563
  </label>
8560
8564
  <div class="value" id="value"></div>
8561
8565
  ${this.value ? undefined : u`
@@ -8670,6 +8674,7 @@ class AuroSelect extends AuroElement$4 {
8670
8674
  <slot></slot>
8671
8675
  </${this.bibtemplateTag}>
8672
8676
  <slot name="label" slot="label"></slot>
8677
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
8673
8678
  <p slot="helpText">
8674
8679
  ${!this.validity || this.validity === undefined || this.validity === 'valid'
8675
8680
  ? u`
@@ -4,6 +4,7 @@
4
4
  * @slot - Default slot for the menu content.
5
5
  * @slot bib.fullscreen.headline - Defines the headline to display above menu-options
6
6
  * @slot label - Defines the content of the label.
7
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
7
8
  * @slot helpText - Defines the content of the helpText.
8
9
  * @slot placeholder - Defines the content of the placeholder to be shown when there is no value
9
10
  * @slot valueText - Dropdown value text display.
@@ -7305,6 +7305,7 @@ var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{d
7305
7305
  * @slot - Default slot for the menu content.
7306
7306
  * @slot bib.fullscreen.headline - Defines the headline to display above menu-options
7307
7307
  * @slot label - Defines the content of the label.
7308
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
7308
7309
  * @slot helpText - Defines the content of the helpText.
7309
7310
  * @slot placeholder - Defines the content of the placeholder to be shown when there is no value
7310
7311
  * @slot valueText - Dropdown value text display.
@@ -8349,6 +8350,7 @@ class AuroSelect extends AuroElement$3 {
8349
8350
  <div class="${classMap(valueContainerClasses)}">
8350
8351
  <label class="${classMap(this.commonLabelClasses)}">
8351
8352
  <slot name="label"></slot>
8353
+ ${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
8352
8354
  </label>
8353
8355
  <div class="value" id="value"></div>
8354
8356
  ${this.value ? undefined : html`
@@ -8429,6 +8431,7 @@ class AuroSelect extends AuroElement$3 {
8429
8431
  <div class="${classMap(valueContainerClasses)}">
8430
8432
  <label class="${classMap(this.commonLabelClasses)}">
8431
8433
  <slot name="label"></slot>
8434
+ ${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
8432
8435
  </label>
8433
8436
  <div class="value" id="value"></div>
8434
8437
  ${this.value ? undefined : html`
@@ -8510,6 +8513,7 @@ class AuroSelect extends AuroElement$3 {
8510
8513
  <div class="${classMap(valueContainerClasses)}">
8511
8514
  <label class="${classMap(this.commonLabelClasses)}">
8512
8515
  <slot name="label"></slot>
8516
+ ${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
8513
8517
  </label>
8514
8518
  <div class="value" id="value"></div>
8515
8519
  ${this.value ? undefined : html`
@@ -8624,6 +8628,7 @@ class AuroSelect extends AuroElement$3 {
8624
8628
  <slot></slot>
8625
8629
  </${this.bibtemplateTag}>
8626
8630
  <slot name="label" slot="label"></slot>
8631
+ ${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
8627
8632
  <p slot="helpText">
8628
8633
  ${!this.validity || this.validity === undefined || this.validity === 'valid'
8629
8634
  ? html`
@@ -7305,6 +7305,7 @@ var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{d
7305
7305
  * @slot - Default slot for the menu content.
7306
7306
  * @slot bib.fullscreen.headline - Defines the headline to display above menu-options
7307
7307
  * @slot label - Defines the content of the label.
7308
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
7308
7309
  * @slot helpText - Defines the content of the helpText.
7309
7310
  * @slot placeholder - Defines the content of the placeholder to be shown when there is no value
7310
7311
  * @slot valueText - Dropdown value text display.
@@ -8349,6 +8350,7 @@ class AuroSelect extends AuroElement$3 {
8349
8350
  <div class="${classMap(valueContainerClasses)}">
8350
8351
  <label class="${classMap(this.commonLabelClasses)}">
8351
8352
  <slot name="label"></slot>
8353
+ ${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
8352
8354
  </label>
8353
8355
  <div class="value" id="value"></div>
8354
8356
  ${this.value ? undefined : html`
@@ -8429,6 +8431,7 @@ class AuroSelect extends AuroElement$3 {
8429
8431
  <div class="${classMap(valueContainerClasses)}">
8430
8432
  <label class="${classMap(this.commonLabelClasses)}">
8431
8433
  <slot name="label"></slot>
8434
+ ${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
8432
8435
  </label>
8433
8436
  <div class="value" id="value"></div>
8434
8437
  ${this.value ? undefined : html`
@@ -8510,6 +8513,7 @@ class AuroSelect extends AuroElement$3 {
8510
8513
  <div class="${classMap(valueContainerClasses)}">
8511
8514
  <label class="${classMap(this.commonLabelClasses)}">
8512
8515
  <slot name="label"></slot>
8516
+ ${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
8513
8517
  </label>
8514
8518
  <div class="value" id="value"></div>
8515
8519
  ${this.value ? undefined : html`
@@ -8624,6 +8628,7 @@ class AuroSelect extends AuroElement$3 {
8624
8628
  <slot></slot>
8625
8629
  </${this.bibtemplateTag}>
8626
8630
  <slot name="label" slot="label"></slot>
8631
+ ${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
8627
8632
  <p slot="helpText">
8628
8633
  ${!this.validity || this.validity === undefined || this.validity === 'valid'
8629
8634
  ? html`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem-dev/auro-formkit",
3
- "version": "0.0.0-pr624.23",
3
+ "version": "0.0.0-pr624.25",
4
4
  "description": "A collection of web components used to build forms.",
5
5
  "homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
6
6
  "bugs": {