@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.2 → 0.0.0-pr624.21

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 (108) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +13 -2
  2. package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
  3. package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
  4. package/components/bibtemplate/dist/index.js +1292 -79
  5. package/components/bibtemplate/dist/registered.js +1292 -79
  6. package/components/checkbox/README.md +1 -1
  7. package/components/checkbox/demo/api.md +8 -9
  8. package/components/checkbox/demo/api.min.js +30 -24
  9. package/components/checkbox/demo/index.md +2 -2
  10. package/components/checkbox/demo/index.min.js +30 -24
  11. package/components/checkbox/demo/readme.md +1 -1
  12. package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
  13. package/components/checkbox/dist/index.js +30 -24
  14. package/components/checkbox/dist/registered.js +30 -24
  15. package/components/combobox/demo/api.md +53 -0
  16. package/components/combobox/demo/api.min.js +2898 -753
  17. package/components/combobox/demo/index.md +6 -0
  18. package/components/combobox/demo/index.min.js +2898 -753
  19. package/components/combobox/dist/auro-combobox.d.ts +12 -12
  20. package/components/combobox/dist/index.js +2646 -642
  21. package/components/combobox/dist/registered.js +2646 -642
  22. package/components/counter/demo/api.md +21 -19
  23. package/components/counter/demo/api.min.js +3648 -929
  24. package/components/counter/demo/index.md +99 -34
  25. package/components/counter/demo/index.min.js +3648 -929
  26. package/components/counter/dist/auro-counter-button.d.ts +2 -0
  27. package/components/counter/dist/auro-counter-group.d.ts +105 -6
  28. package/components/counter/dist/auro-counter.d.ts +6 -0
  29. package/components/counter/dist/helptextVersion.d.ts +2 -0
  30. package/components/counter/dist/iconVersion.d.ts +1 -1
  31. package/components/counter/dist/index.js +3648 -929
  32. package/components/counter/dist/registered.js +3648 -929
  33. package/components/datepicker/demo/api.md +36 -19
  34. package/components/datepicker/demo/api.min.js +11437 -7744
  35. package/components/datepicker/demo/index.md +80 -0
  36. package/components/datepicker/demo/index.min.js +11437 -7744
  37. package/components/datepicker/dist/auro-datepicker.d.ts +71 -3
  38. package/components/datepicker/dist/buttonVersion.d.ts +1 -1
  39. package/components/datepicker/dist/iconVersion.d.ts +2 -0
  40. package/components/datepicker/dist/index.js +13847 -10154
  41. package/components/datepicker/dist/popoverVersion.d.ts +1 -1
  42. package/components/datepicker/dist/registered.js +13847 -10154
  43. package/components/dropdown/demo/api.md +6 -7
  44. package/components/dropdown/demo/api.min.js +238 -144
  45. package/components/dropdown/demo/index.md +57 -9
  46. package/components/dropdown/demo/index.min.js +238 -144
  47. package/components/dropdown/dist/auro-dropdown.d.ts +10 -9
  48. package/components/dropdown/dist/auro-dropdownBib.d.ts +22 -0
  49. package/components/dropdown/dist/index.js +238 -144
  50. package/components/dropdown/dist/registered.js +238 -144
  51. package/components/form/demo/api.min.js +1 -1
  52. package/components/form/demo/index.min.js +1 -1
  53. package/components/form/dist/index.js +1 -1
  54. package/components/form/dist/registered.js +1 -1
  55. package/components/helptext/dist/index.js +2 -2
  56. package/components/helptext/dist/registered.js +2 -2
  57. package/components/input/demo/api.md +63 -56
  58. package/components/input/demo/api.min.js +983 -269
  59. package/components/input/demo/index.min.js +982 -268
  60. package/components/input/dist/auro-input.d.ts +202 -14
  61. package/components/input/dist/base-input.d.ts +30 -7
  62. package/components/input/dist/buttonVersion.d.ts +1 -1
  63. package/components/input/dist/iconVersion.d.ts +1 -1
  64. package/components/input/dist/index.js +982 -268
  65. package/components/input/dist/registered.js +982 -268
  66. package/components/layoutElement/dist/index.js +13 -10
  67. package/components/menu/demo/api.html +38 -0
  68. package/components/menu/demo/api.md +68 -7
  69. package/components/menu/demo/api.min.js +278 -42
  70. package/components/menu/demo/index.min.js +278 -42
  71. package/components/menu/dist/auro-menu.d.ts +28 -5
  72. package/components/menu/dist/auro-menuoption.d.ts +15 -3
  73. package/components/menu/dist/iconVersion.d.ts +1 -1
  74. package/components/menu/dist/index.js +278 -42
  75. package/components/menu/dist/registered.js +278 -42
  76. package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
  77. package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
  78. package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
  79. package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
  80. package/components/radio/demo/api.md +2 -2
  81. package/components/radio/demo/api.min.js +10 -7
  82. package/components/radio/demo/index.min.js +10 -7
  83. package/components/radio/dist/auro-radio.d.ts +1 -1
  84. package/components/radio/dist/index.js +10 -7
  85. package/components/radio/dist/registered.js +10 -7
  86. package/components/select/demo/api.js +2 -0
  87. package/components/select/demo/api.md +78 -12
  88. package/components/select/demo/api.min.js +2797 -538
  89. package/components/select/demo/index.html +1 -0
  90. package/components/select/demo/index.md +325 -763
  91. package/components/select/demo/index.min.js +2790 -543
  92. package/components/select/dist/auro-select.d.ts +111 -11
  93. package/components/select/dist/helptextVersion.d.ts +2 -0
  94. package/components/select/dist/index.js +2533 -427
  95. package/components/select/dist/registered.js +2533 -427
  96. package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
  97. package/components/select/dist/styles/tokens-css.d.ts +2 -0
  98. package/package.json +6 -4
  99. /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
  100. /package/components/{dropdown → datepicker}/dist/styles/default/color-css.d.ts +0 -0
  101. /package/components/{dropdown/dist/styles/default/bibStyles-css.d.ts → datepicker/dist/styles/shapeSize-css.d.ts} +0 -0
  102. /package/components/{dropdown/dist/styles/default/style-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
  103. /package/components/{dropdown/dist/styles → datepicker/dist/styles/snowflake}/style-css.d.ts +0 -0
  104. /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/classic/bibColors-css.d.ts} +0 -0
  105. /package/components/{menu/dist/styles/color-menuoption-css.d.ts → dropdown/dist/styles/classic/bibStyles-css.d.ts} +0 -0
  106. /package/components/{menu/dist/styles/style-menu-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
  107. /package/components/{menu/dist/styles/style-menuoption-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
  108. /package/components/menu/dist/styles/{tokens-css.d.ts → default/color-menu-css.d.ts} +0 -0
@@ -174,8 +174,8 @@ class AuroRadio extends LitElement {
174
174
  },
175
175
 
176
176
  /**
177
+ * ID for input node.
177
178
  * @private
178
- * id for input node
179
179
  */
180
180
  inputId: {
181
181
  type: String,
@@ -425,9 +425,10 @@ class DateFormatter {
425
425
  /**
426
426
  * Convert a date object to string format.
427
427
  * @param {Object} date - Date to convert to string.
428
- * @returns {Object} Returns the date as a string.
428
+ * @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
429
+ * @returns {String} Returns the date as a string.
429
430
  */
430
- this.getDateAsString = (date) => date.toLocaleDateString(undefined, {
431
+ this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
431
432
  year: "numeric",
432
433
  month: "2-digit",
433
434
  day: "2-digit",
@@ -619,7 +620,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
619
620
  const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
620
621
 
621
622
  // Get the date string of the date object we created from the string date
622
- const actualDateStr = dateFormatter.getDateAsString(dateObj);
623
+ const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
623
624
 
624
625
  // Guard Clause: Generated date matches date string input
625
626
  if (expectedDateStr !== actualDateStr) {
@@ -1063,7 +1064,9 @@ class AuroFormValidation {
1063
1064
  elem.validity = this.auroInputElements[0].validity;
1064
1065
  elem.errorMessage = this.auroInputElements[0].errorMessage;
1065
1066
 
1066
- if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
1067
+ // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1068
+ // combobox's 2nd input will have noValidate set true.
1069
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
1067
1070
  elem.validity = this.auroInputElements[1].validity;
1068
1071
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1069
1072
  }
@@ -1183,9 +1186,9 @@ class AuroDependencyVersioning {
1183
1186
  }
1184
1187
  }
1185
1188
 
1186
- var colorCss = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
1189
+ var colorCss = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
1187
1190
 
1188
- var styleCss = css`.helptext-wrapper{display:none;font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px)}:host([large]) .helptext-wrapper{font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight, 450);letter-spacing:var(--ds-basic-text-body-default-letter-spacing, 0);line-height:var(--ds-basic-text-body-default-line-height, 24px)}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
1191
+ var styleCss = css`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
1189
1192
 
1190
1193
  var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
1191
1194
 
@@ -174,8 +174,8 @@ class AuroRadio extends LitElement {
174
174
  },
175
175
 
176
176
  /**
177
+ * ID for input node.
177
178
  * @private
178
- * id for input node
179
179
  */
180
180
  inputId: {
181
181
  type: String,
@@ -425,9 +425,10 @@ class DateFormatter {
425
425
  /**
426
426
  * Convert a date object to string format.
427
427
  * @param {Object} date - Date to convert to string.
428
- * @returns {Object} Returns the date as a string.
428
+ * @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
429
+ * @returns {String} Returns the date as a string.
429
430
  */
430
- this.getDateAsString = (date) => date.toLocaleDateString(undefined, {
431
+ this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
431
432
  year: "numeric",
432
433
  month: "2-digit",
433
434
  day: "2-digit",
@@ -619,7 +620,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
619
620
  const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
620
621
 
621
622
  // Get the date string of the date object we created from the string date
622
- const actualDateStr = dateFormatter.getDateAsString(dateObj);
623
+ const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
623
624
 
624
625
  // Guard Clause: Generated date matches date string input
625
626
  if (expectedDateStr !== actualDateStr) {
@@ -1063,7 +1064,9 @@ class AuroFormValidation {
1063
1064
  elem.validity = this.auroInputElements[0].validity;
1064
1065
  elem.errorMessage = this.auroInputElements[0].errorMessage;
1065
1066
 
1066
- if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
1067
+ // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1068
+ // combobox's 2nd input will have noValidate set true.
1069
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
1067
1070
  elem.validity = this.auroInputElements[1].validity;
1068
1071
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1069
1072
  }
@@ -1183,9 +1186,9 @@ class AuroDependencyVersioning {
1183
1186
  }
1184
1187
  }
1185
1188
 
1186
- var colorCss = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
1189
+ var colorCss = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
1187
1190
 
1188
- var styleCss = css`.helptext-wrapper{display:none;font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px)}:host([large]) .helptext-wrapper{font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight, 450);letter-spacing:var(--ds-basic-text-body-default-letter-spacing, 0);line-height:var(--ds-basic-text-body-default-line-height, 24px)}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
1191
+ var styleCss = css`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
1189
1192
 
1190
1193
  var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
1191
1194
 
@@ -5,6 +5,7 @@ import { valueAlertExample } from "../apiExamples/valueAlert.js";
5
5
  import { inDialogExample } from '../apiExamples/inDialog';
6
6
  import { resetStateExample } from "../apiExamples/resetState";
7
7
  import { auroMenuLoadingExample } from "../apiExamples/loading";
8
+ import { valueTextExample } from '../apiExamples/valueText.js';
8
9
 
9
10
  /* eslint-disable jsdoc/require-jsdoc, no-magic-numbers, no-param-reassign */
10
11
  import { AuroSelect } from '../src/auro-select.js';
@@ -24,6 +25,7 @@ export function initExamples(initCount) {
24
25
  inDialogExample();
25
26
  resetStateExample();
26
27
  auroMenuLoadingExample();
28
+ valueTextExample();
27
29
  } catch (err) {
28
30
  if (initCount <= 20) {
29
31
  // setTimeout handles issue where content is sometimes loaded after the functions get called
@@ -20,9 +20,11 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
20
20
  | [autocomplete](#autocomplete) | `autocomplete` | `string` | | If declared, sets the autocomplete attribute for the select element. |
21
21
  | [disabled](#disabled) | `disabled` | `boolean` | | When attribute is present, element shows disabled state. |
22
22
  | [error](#error) | `error` | `string` | | When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value. |
23
- | [flexMenuWidth](#flexMenuWidth) | `flexMenuWidth` | `boolean` | | If set, makes dropdown width match the size of the content, rather than the width of the trigger. |
23
+ | [forceDisplayValue](#forceDisplayValue) | `forceDisplayValue` | `boolean` | false | If declared, the label and value will be visually hidden and the displayValue will render 100% of the time. |
24
24
  | [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. |
25
25
  | [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600. |
26
+ | [layout](#layout) | | `string` | "snowflake" | |
27
+ | [matchWidth](#matchWidth) | `matchWidth` | `boolean` | false | If declared, the popover and trigger will be set to the same width. |
26
28
  | [multiSelect](#multiSelect) | `multiselect` | `boolean` | | Sets multi-select mode, allowing multiple options to be selected at once. |
27
29
  | [name](#name) | `name` | `string` | | The name for the select element. |
28
30
  | [noCheckmark](#noCheckmark) | `noCheckmark` | `boolean` | | When true, checkmark on selected option will no longer be present. |
@@ -31,28 +33,33 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
31
33
  | [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
32
34
  | [onDark](#onDark) | `onDark` | `boolean` | | If declared, onDark styles will be applied to the trigger. |
33
35
  | [optionSelected](#optionSelected) | `optionSelected` | `HTMLElement\|Array<HTMLElement>` | | Specifies the current selected menuOption. Default type is `HTMLElement`, changing to `Array<HTMLElement>` when `multiSelect` is true. |
34
- | [placement](#placement) | `placement` | `string` | "bottom-start" | Position where the bib should appear relative to the trigger.<br />Accepted values:<br />"top" \| "right" \| "bottom" \| "left" \|<br />"bottom-start" \| "top-start" \| "top-end" \|<br />"right-start" \| "right-end" \| "bottom-end" \|<br />"left-start" \| "left-end" |
36
+ | [placement](#placement) | `placement` | `string` | "bottom-start" | Position where the bib should appear relative to the trigger.<br />Accepted values:<br />"top" \| "right" \| "bottom" \| "left" \|<br />"bottom-start" \| "top-start" \| "top-end" \|<br />"right-start" \| "right-end" \| "bottom-end" \|<br />"left-start" \| "left-end". |
35
37
  | [required](#required) | `required` | `boolean` | | Populates the `required` attribute on the element. Used for client-side validation. |
36
38
  | [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
37
39
  | [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
38
40
  | [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
41
+ | [shape](#shape) | | `string` | "snowflake" | |
42
+ | [size](#size) | | `string` | "xl" | |
39
43
  | [validity](#validity) | `validity` | `string` | | Specifies the `validityState` this element is in. |
40
44
  | [value](#value) | `value` | `String\|Array<String>` | | Value selected for the component. Default type is `String`, changing to `Array<String>` when `multiSelect` is true. |
41
45
 
42
46
  ## Methods
43
47
 
44
- | Method | Type | Description |
45
- |------------|----------------------------------------|--------------------------------------------------|
46
- | [reset](#reset) | `(): void` | Resets component to initial state. |
47
- | [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
48
+ | Method | Type | Description |
49
+ |----------------------|----------------------------------------|--------------------------------------------------|
50
+ | [renderAriaHtml](#renderAriaHtml) | `(): TemplateResult` | |
51
+ | [renderBACKUP](#renderBACKUP) | `(): TemplateResult` | |
52
+ | [renderNativeSelect](#renderNativeSelect) | `(): TemplateResult` | |
53
+ | [reset](#reset) | `(): void` | Resets component to initial state. |
54
+ | [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
48
55
 
49
56
  ## Events
50
57
 
51
- | Event | Type | Description |
52
- |-----------------------------|--------------------|--------------------------------------------------|
53
- | `auroFormElement-validated` | | Notifies that the `validity` and `errorMessage` values have changed. |
54
- | `auroSelect-valueSet` | `CustomEvent<any>` | Notifies that the component has a new value set. |
55
- | [input](#input) | `CustomEvent<any>` | Notifies every time the value prop of the element is changed. |
58
+ | Event | Type | Description |
59
+ |-----------------------------|--------------------------------------------------|--------------------------------------------------|
60
+ | `auroFormElement-validated` | | Notifies that the `validity` and `errorMessage` values have changed. |
61
+ | `auroSelect-valueSet` | `CustomEvent<any>` | Notifies that the component has a new value set. |
62
+ | [input](#input) | `CustomEvent<{ optionSelected: any; value: any; }>` | Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object. |
56
63
 
57
64
  ## Slots
58
65
 
@@ -60,9 +67,11 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
60
67
  |---------------------------|--------------------------------------------------|
61
68
  | | Default slot for the menu content. |
62
69
  | `bib.fullscreen.headline` | Defines the headline to display above menu-options |
70
+ | [displayValue](#displayValue) | Allows custom HTML content to display the selected value when select is not focused. |
63
71
  | [helpText](#helpText) | Defines the content of the helpText. |
64
72
  | [label](#label) | Defines the content of the label. |
65
- | [placeholder](#placeholder) | Defines the content of the placeholder to be shown when there is no value |
73
+ | [placeholder](#placeholder) | Defines the content of the placeholder to be shown when there is no value |
74
+ | [valueText](#valueText) | Dropdown value text display. |
66
75
 
67
76
  ## CSS Shadow Parts
68
77
 
@@ -1033,6 +1042,63 @@ export function auroMenuLoadingExample() {
1033
1042
  <!-- AURO-GENERATED-CONTENT:END -->
1034
1043
  </auro-accordion>
1035
1044
 
1045
+ ### valueText <a name="valueText"></a>
1046
+ The label for selected option can be customized using `valueText` slot.
1047
+ This slot can be manipulated on the `input` event which delivers the new value and selected `auro-menuoption` element in the `detail` object.
1048
+
1049
+ <div class="exampleWrapper">
1050
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/valueText.html) -->
1051
+ <!-- The below content is automatically added from ./../apiExamples/valueText.html -->
1052
+ <auro-select id="valueTextExample" autocomplete="address-level1">
1053
+ <span slot="bib.fullscreen.headline">Select Your Gender</span>
1054
+ <span slot="label">Gender</span>
1055
+ <span slot="valueText"></span>
1056
+ <auro-menu>
1057
+ <auro-menuoption value="m" data-display="Male">M - Male</auro-menuoption>
1058
+ <auro-menuoption value="f" data-display="Female">F - Female</auro-menuoption>
1059
+ <auro-menuoption value="x" data-display="Unspecified">X - Unspecified</auro-menuoption>
1060
+ <auro-menuoption value="u" data-display="Undisclosed">U - Undisclosed</auro-menuoption>
1061
+ </auro-menu>
1062
+ </auro-select>
1063
+ <!-- AURO-GENERATED-CONTENT:END -->
1064
+ </div>
1065
+ <auro-accordion alignRight>
1066
+ <span slot="trigger">See code</span>
1067
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/valueText.js) -->
1068
+ <!-- The below code snippet is automatically added from ./../apiExamples/valueText.js -->
1069
+
1070
+ ```js
1071
+ export function valueTextExample() {
1072
+ const onValueTextSelectInput = (e) => {
1073
+ const valueText = e.target.querySelector("[slot=valueText]");
1074
+
1075
+ valueText.textContent = e.detail.optionSelected.dataset.display;
1076
+ };
1077
+
1078
+ const select = document.querySelector("#valueTextExample");
1079
+ select.addEventListener('input', onValueTextSelectInput);
1080
+ }
1081
+ ```
1082
+ <!-- AURO-GENERATED-CONTENT:END -->
1083
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/valueText.html) -->
1084
+ <!-- The below code snippet is automatically added from ./../apiExamples/valueText.html -->
1085
+
1086
+ ```html
1087
+ <auro-select id="valueTextExample" autocomplete="address-level1">
1088
+ <span slot="bib.fullscreen.headline">Select Your Gender</span>
1089
+ <span slot="label">Gender</span>
1090
+ <span slot="valueText"></span>
1091
+ <auro-menu>
1092
+ <auro-menuoption value="m" data-display="Male">M - Male</auro-menuoption>
1093
+ <auro-menuoption value="f" data-display="Female">F - Female</auro-menuoption>
1094
+ <auro-menuoption value="x" data-display="Unspecified">X - Unspecified</auro-menuoption>
1095
+ <auro-menuoption value="u" data-display="Undisclosed">U - Undisclosed</auro-menuoption>
1096
+ </auro-menu>
1097
+ </auro-select>
1098
+ ```
1099
+ <!-- AURO-GENERATED-CONTENT:END -->
1100
+ </auro-accordion>
1101
+
1036
1102
  ### Customized bib position
1037
1103
  The bib position can be customized with `placement`, `offset`, `flip`, `autoPlacement` attributes.
1038
1104