@aurodesignsystem/auro-formkit 3.5.0 → 4.0.0-rc-658.1.1

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 (54) hide show
  1. package/CHANGELOG.md +41 -1
  2. package/components/checkbox/README.md +1 -1
  3. package/components/checkbox/demo/api.min.js +1 -1
  4. package/components/checkbox/demo/index.min.js +1 -1
  5. package/components/checkbox/demo/readme.md +1 -1
  6. package/components/checkbox/dist/index.js +1 -1
  7. package/components/checkbox/dist/registered.js +1 -1
  8. package/components/combobox/README.md +1 -1
  9. package/components/combobox/demo/api.md +27 -27
  10. package/components/combobox/demo/api.min.js +63 -275
  11. package/components/combobox/demo/index.html +1 -0
  12. package/components/combobox/demo/index.min.js +61 -273
  13. package/components/combobox/demo/readme.md +1 -1
  14. package/components/combobox/dist/auro-combobox.d.ts +5 -10
  15. package/components/combobox/dist/index.js +22 -149
  16. package/components/combobox/dist/registered.js +22 -149
  17. package/components/counter/README.md +1 -1
  18. package/components/counter/demo/readme.md +1 -1
  19. package/components/datepicker/README.md +1 -1
  20. package/components/datepicker/demo/readme.md +1 -1
  21. package/components/dropdown/README.md +1 -1
  22. package/components/dropdown/demo/readme.md +1 -1
  23. package/components/form/README.md +1 -1
  24. package/components/form/demo/readme.md +1 -1
  25. package/components/input/README.md +1 -1
  26. package/components/input/demo/readme.md +1 -1
  27. package/components/menu/README.md +1 -1
  28. package/components/menu/demo/api.md +11 -11
  29. package/components/menu/demo/api.min.js +39 -124
  30. package/components/menu/demo/index.min.js +39 -124
  31. package/components/menu/demo/readme.md +1 -1
  32. package/components/menu/dist/auro-menu-utils.d.ts +0 -8
  33. package/components/menu/dist/auro-menu.d.ts +3 -8
  34. package/components/menu/dist/index.d.ts +1 -1
  35. package/components/menu/dist/index.js +40 -84
  36. package/components/menu/dist/registered.js +39 -124
  37. package/components/radio/README.md +1 -1
  38. package/components/radio/demo/api.md +8 -0
  39. package/components/radio/demo/api.min.js +13 -5
  40. package/components/radio/demo/index.min.js +13 -5
  41. package/components/radio/demo/readme.md +1 -1
  42. package/components/radio/dist/auro-radio.d.ts +4 -0
  43. package/components/radio/dist/index.js +13 -5
  44. package/components/radio/dist/registered.js +13 -5
  45. package/components/select/README.md +1 -1
  46. package/components/select/demo/api.js +2 -0
  47. package/components/select/demo/api.md +96 -38
  48. package/components/select/demo/api.min.js +127 -210
  49. package/components/select/demo/index.min.js +113 -208
  50. package/components/select/demo/readme.md +1 -1
  51. package/components/select/dist/auro-select.d.ts +14 -14
  52. package/components/select/dist/index.js +73 -83
  53. package/components/select/dist/registered.js +73 -83
  54. package/package.json +1 -1
@@ -5,7 +5,7 @@ import { unsafeStatic, literal, html as html$1 } from 'lit/static-html.js';
5
5
 
6
6
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t();}(0,function(){function e(e){var t=true,n=false,o=null,d={text:true,search:true,url:true,tel:true,email:true,password:true,number:true,date:true,month:true,week:true,time:true,datetime:true,"datetime-local":true};function i(e){return !!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""));}function u(e){t=false;}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c);}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=false,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c));}document.addEventListener("keydown",function(n){n.metaKey||n.altKey||n.ctrlKey||(i(e.activeElement)&&s(e.activeElement),t=true);},true),document.addEventListener("mousedown",u,true),document.addEventListener("pointerdown",u,true),document.addEventListener("touchstart",u,true),document.addEventListener("visibilitychange",function(e){"hidden"===document.visibilityState&&(n&&(t=true),a());},true),a(),e.addEventListener("focus",function(e){var n,o,u;i(e.target)&&(t||(n=e.target,o=n.type,"INPUT"===(u=n.tagName)&&d[o]&&!n.readOnly||"TEXTAREA"===u&&!n.readOnly||n.isContentEditable))&&s(e.target);},true),e.addEventListener("blur",function(e){var t;i(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=true,window.clearTimeout(o),o=window.setTimeout(function(){n=false;},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")));},true),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""));}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready");}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",false,false,{});}window.dispatchEvent(t);}"undefined"!=typeof document&&e(document);});
7
7
 
8
- var styleCss$2 = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;outline:unset}:host(.focus-visible) .displayFlex .inputGroup:focus-within{width:auto}:host(.focus-visible) .rdoGroup{display:block;padding-right:var(--ds-size-100, 0.5rem);outline:3px solid transparent}:host(.focus-visible) .rdoGroup .label:after{outline-width:1px;outline-style:solid}.rdoGroup{position:relative;padding-right:var(--ds-size-100, 0.5rem);padding-left:var(--ds-size-100, 0.5rem);line-height:var(--ds-size-400, 2rem)}.label{display:block;margin-left:var(--ds-size-300, 1.5rem)}.label:hover{cursor:pointer}.label:after{position:absolute;z-index:1;top:50%;left:var(--ds-size-50, 0.25rem);width:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));transform:translateY(-50%);content:"";border-radius:50%;border:1px solid}.slotContent{display:block;margin-left:var(--ds-size-400, 2rem);padding-left:var(--ds-size-100, 0.5rem)}`;
8
+ var styleCss$2 = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;outline:unset}:host(.focus-visible) .displayFlex .inputGroup:focus-within{width:auto}:host(.focus-visible) .rdoGroup{display:block;padding-right:var(--ds-size-100, 0.5rem);outline:3px solid transparent}:host(.focus-visible) .rdoGroup .label:after{outline-width:1px;outline-style:solid}.rdoGroup{position:relative;padding-right:var(--ds-size-100, 0.5rem);padding-left:var(--ds-size-100, 0.5rem);line-height:var(--ds-size-400, 2rem)}.label{display:block;margin-left:var(--ds-size-300, 1.5rem)}.label:hover{cursor:pointer}.label:after{position:absolute;z-index:1;top:var(--ds-size-200, 1rem);left:var(--ds-size-50, 0.25rem);width:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));transform:translateY(-50%);content:"";border-radius:50%;border:1px solid}.slotContent{display:block;margin-left:var(--ds-size-400, 2rem);padding-left:var(--ds-size-100, 0.5rem)}`;
9
9
 
10
10
  var colorCss$2 = css`.label{color:var(--ds-auro-radio-label-color)}.label:after{background-color:var(--ds-auro-radio-btn-fill-color);border-color:var(--ds-auro-radio-btn-border-color);box-shadow:inset 0 0 0 3px var(--ds-auro-radio-btn-inset-color);outline-color:var(--ds-auro-radio-btn-border-color);-webkit-tap-highlight-color:var(--ds-auro-radio-tap-color)}:host([checked]){--ds-auro-radio-btn-inset-color: var(--ds-advanced-color-boolean-indicator, #ffffff);--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-boolean-istrue, #01426a);--ds-auro-radio-btn-border-color: var(--ds-advanced-color-boolean-istrue, #01426a)}:host([error]){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-boolean-error, #e31f26)}:host([checked][error]){--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-boolean-error, #e31f26)}:host([disabled]){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-state-background-disabled, #dddddd);--ds-auro-radio-label-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([checked][disabled]){--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-state-background-disabled, #dddddd)}:host(.focus-visible){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([onDark]){--ds-auro-radio-label-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-radio-btn-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([onDark][checked]){--ds-auro-radio-btn-inset-color: var(--ds-advanced-color-boolean-indicator-inverse, #00274a);--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-boolean-istrue-inverse, #ffffff);--ds-auro-radio-btn-border-color: var(--ds-advanced-color-boolean-istrue-inverse, #ffffff)}:host([onDark][error]){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8)}:host([onDark][checked][error]){--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8)}:host([onDark][disabled]){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894);--ds-auro-radio-label-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][checked][disabled]){--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894)}:host([onDark].focus-visible){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
11
11
 
@@ -100,6 +100,10 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
100
100
  * @event auroRadio-blur - Notifies that the component has lost focus.
101
101
  * @event resetRadio - Notifies that the component has reset the checked/selected state.
102
102
  * @event auroRadio-selected - Notifies that the component has been marked as checked/selected.
103
+ *
104
+ * @csspart radio - apply css to a specific checkbox.
105
+ * @csspart radio-input - apply css to a specific checkbox's input.
106
+ * @csspart radio-label - apply css to a specific checkbox's label.
103
107
  */
104
108
 
105
109
  // build the component class
@@ -330,9 +334,10 @@ class AuroRadio extends LitElement {
330
334
  };
331
335
 
332
336
  return html`
333
- <div class="ods-inputGroup rdoGroup">
337
+ <div class="ods-inputGroup rdoGroup" part="radio">
334
338
  <input
335
339
  class="util_displayHiddenVisually ods-inputOption rdo--input"
340
+ part="radio-input"
336
341
  @focus="${this.handleFocus}"
337
342
  @input="${this.handleInput}"
338
343
  @change="${this.handleChange}"
@@ -344,13 +349,16 @@ class AuroRadio extends LitElement {
344
349
  name="${ifDefined(this.name)}"
345
350
  type="radio"
346
351
  .value="${this.value}"
347
- tabIndex="-1"
352
+ tabindex="-1"
348
353
  />
349
354
 
350
- <label for="${this.inputId}" class="${classMap(labelClasses)}">
355
+ <label
356
+ for="${this.inputId}"
357
+ class="${classMap(labelClasses)}"
358
+ part="radio-label"
359
+ >
351
360
  <slot>${this.label}</slot>
352
361
  </label>
353
-
354
362
  </div>
355
363
  <slot name="content" class="slotContent"></slot>
356
364
  `;
@@ -5,7 +5,7 @@ import { unsafeStatic, literal, html as html$1 } from 'lit/static-html.js';
5
5
 
6
6
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t();}(0,function(){function e(e){var t=true,n=false,o=null,d={text:true,search:true,url:true,tel:true,email:true,password:true,number:true,date:true,month:true,week:true,time:true,datetime:true,"datetime-local":true};function i(e){return !!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""));}function u(e){t=false;}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c);}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=false,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c));}document.addEventListener("keydown",function(n){n.metaKey||n.altKey||n.ctrlKey||(i(e.activeElement)&&s(e.activeElement),t=true);},true),document.addEventListener("mousedown",u,true),document.addEventListener("pointerdown",u,true),document.addEventListener("touchstart",u,true),document.addEventListener("visibilitychange",function(e){"hidden"===document.visibilityState&&(n&&(t=true),a());},true),a(),e.addEventListener("focus",function(e){var n,o,u;i(e.target)&&(t||(n=e.target,o=n.type,"INPUT"===(u=n.tagName)&&d[o]&&!n.readOnly||"TEXTAREA"===u&&!n.readOnly||n.isContentEditable))&&s(e.target);},true),e.addEventListener("blur",function(e){var t;i(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=true,window.clearTimeout(o),o=window.setTimeout(function(){n=false;},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")));},true),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""));}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready");}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",false,false,{});}window.dispatchEvent(t);}"undefined"!=typeof document&&e(document);});
7
7
 
8
- var styleCss$2 = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;outline:unset}:host(.focus-visible) .displayFlex .inputGroup:focus-within{width:auto}:host(.focus-visible) .rdoGroup{display:block;padding-right:var(--ds-size-100, 0.5rem);outline:3px solid transparent}:host(.focus-visible) .rdoGroup .label:after{outline-width:1px;outline-style:solid}.rdoGroup{position:relative;padding-right:var(--ds-size-100, 0.5rem);padding-left:var(--ds-size-100, 0.5rem);line-height:var(--ds-size-400, 2rem)}.label{display:block;margin-left:var(--ds-size-300, 1.5rem)}.label:hover{cursor:pointer}.label:after{position:absolute;z-index:1;top:50%;left:var(--ds-size-50, 0.25rem);width:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));transform:translateY(-50%);content:"";border-radius:50%;border:1px solid}.slotContent{display:block;margin-left:var(--ds-size-400, 2rem);padding-left:var(--ds-size-100, 0.5rem)}`;
8
+ var styleCss$2 = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;outline:unset}:host(.focus-visible) .displayFlex .inputGroup:focus-within{width:auto}:host(.focus-visible) .rdoGroup{display:block;padding-right:var(--ds-size-100, 0.5rem);outline:3px solid transparent}:host(.focus-visible) .rdoGroup .label:after{outline-width:1px;outline-style:solid}.rdoGroup{position:relative;padding-right:var(--ds-size-100, 0.5rem);padding-left:var(--ds-size-100, 0.5rem);line-height:var(--ds-size-400, 2rem)}.label{display:block;margin-left:var(--ds-size-300, 1.5rem)}.label:hover{cursor:pointer}.label:after{position:absolute;z-index:1;top:var(--ds-size-200, 1rem);left:var(--ds-size-50, 0.25rem);width:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));transform:translateY(-50%);content:"";border-radius:50%;border:1px solid}.slotContent{display:block;margin-left:var(--ds-size-400, 2rem);padding-left:var(--ds-size-100, 0.5rem)}`;
9
9
 
10
10
  var colorCss$2 = css`.label{color:var(--ds-auro-radio-label-color)}.label:after{background-color:var(--ds-auro-radio-btn-fill-color);border-color:var(--ds-auro-radio-btn-border-color);box-shadow:inset 0 0 0 3px var(--ds-auro-radio-btn-inset-color);outline-color:var(--ds-auro-radio-btn-border-color);-webkit-tap-highlight-color:var(--ds-auro-radio-tap-color)}:host([checked]){--ds-auro-radio-btn-inset-color: var(--ds-advanced-color-boolean-indicator, #ffffff);--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-boolean-istrue, #01426a);--ds-auro-radio-btn-border-color: var(--ds-advanced-color-boolean-istrue, #01426a)}:host([error]){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-boolean-error, #e31f26)}:host([checked][error]){--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-boolean-error, #e31f26)}:host([disabled]){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-state-background-disabled, #dddddd);--ds-auro-radio-label-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([checked][disabled]){--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-state-background-disabled, #dddddd)}:host(.focus-visible){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([onDark]){--ds-auro-radio-label-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-radio-btn-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([onDark][checked]){--ds-auro-radio-btn-inset-color: var(--ds-advanced-color-boolean-indicator-inverse, #00274a);--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-boolean-istrue-inverse, #ffffff);--ds-auro-radio-btn-border-color: var(--ds-advanced-color-boolean-istrue-inverse, #ffffff)}:host([onDark][error]){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8)}:host([onDark][checked][error]){--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8)}:host([onDark][disabled]){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894);--ds-auro-radio-label-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][checked][disabled]){--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894)}:host([onDark].focus-visible){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
11
11
 
@@ -100,6 +100,10 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
100
100
  * @event auroRadio-blur - Notifies that the component has lost focus.
101
101
  * @event resetRadio - Notifies that the component has reset the checked/selected state.
102
102
  * @event auroRadio-selected - Notifies that the component has been marked as checked/selected.
103
+ *
104
+ * @csspart radio - apply css to a specific checkbox.
105
+ * @csspart radio-input - apply css to a specific checkbox's input.
106
+ * @csspart radio-label - apply css to a specific checkbox's label.
103
107
  */
104
108
 
105
109
  // build the component class
@@ -330,9 +334,10 @@ class AuroRadio extends LitElement {
330
334
  };
331
335
 
332
336
  return html`
333
- <div class="ods-inputGroup rdoGroup">
337
+ <div class="ods-inputGroup rdoGroup" part="radio">
334
338
  <input
335
339
  class="util_displayHiddenVisually ods-inputOption rdo--input"
340
+ part="radio-input"
336
341
  @focus="${this.handleFocus}"
337
342
  @input="${this.handleInput}"
338
343
  @change="${this.handleChange}"
@@ -344,13 +349,16 @@ class AuroRadio extends LitElement {
344
349
  name="${ifDefined(this.name)}"
345
350
  type="radio"
346
351
  .value="${this.value}"
347
- tabIndex="-1"
352
+ tabindex="-1"
348
353
  />
349
354
 
350
- <label for="${this.inputId}" class="${classMap(labelClasses)}">
355
+ <label
356
+ for="${this.inputId}"
357
+ class="${classMap(labelClasses)}"
358
+ part="radio-label"
359
+ >
351
360
  <slot>${this.label}</slot>
352
361
  </label>
353
-
354
362
  </div>
355
363
  <slot name="content" class="slotContent"></slot>
356
364
  `;
@@ -111,7 +111,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
111
111
  In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
112
112
 
113
113
  ```html
114
- <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@0.0.0/auro-select/+esm"></script>
114
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-select/+esm"></script>
115
115
  ```
116
116
  <!-- AURO-GENERATED-CONTENT:END -->
117
117
 
@@ -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
@@ -14,30 +14,30 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
14
14
 
15
15
  ## Properties
16
16
 
17
- | Property | Attribute | Type | Default | Description |
18
- |---------------------------------|---------------------------------|-----------|----------------|--------------------------------------------------|
19
- | [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean` | "false" | If declared, bib's position will be automatically calculated where to appear. |
20
- | [autocomplete](#autocomplete) | `autocomplete` | `string` | | If declared, sets the autocomplete attribute for the select element. |
21
- | [disabled](#disabled) | `disabled` | `boolean` | | When attribute is present, element shows disabled state. |
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. |
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
- | [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600 |
26
- | [multiSelect](#multiSelect) | `multiselect` | `boolean` | | Sets multi-select mode, allowing multiple options to be selected at once. |
27
- | [name](#name) | `name` | `string` | | The name for the select element. |
28
- | [noCheckmark](#noCheckmark) | `noCheckmark` | `boolean` | | When true, checkmark on selected option will no longer be present. |
29
- | [noFlip](#noFlip) | `noFlip` | `boolean` | "false" | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
30
- | [noValidate](#noValidate) | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
31
- | [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
32
- | [onDark](#onDark) | `onDark` | `boolean` | | If declared, onDark styles will be applied to the trigger. |
33
- | [optionSelected](#optionSelected) | `optionSelected` | | | Specifies the current selected menuOption. |
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" |
35
- | [required](#required) | `required` | `boolean` | | Populates the `required` attribute on the element. Used for client-side validation. |
36
- | [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
37
- | [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
38
- | [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
39
- | [validity](#validity) | `validity` | `string` | | Specifies the `validityState` this element is in. |
40
- | [value](#value) | `value` | | | Value selected for the component. |
17
+ | Property | Attribute | Type | Default | Description |
18
+ |---------------------------------|---------------------------------|-----------------------------------|----------------|--------------------------------------------------|
19
+ | [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean` | "false" | If declared, bib's position will be automatically calculated where to appear. |
20
+ | [autocomplete](#autocomplete) | `autocomplete` | `string` | | If declared, sets the autocomplete attribute for the select element. |
21
+ | [disabled](#disabled) | `disabled` | `boolean` | | When attribute is present, element shows disabled state. |
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. |
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
+ | [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600. |
26
+ | [multiSelect](#multiSelect) | `multiselect` | `boolean` | | Sets multi-select mode, allowing multiple options to be selected at once. |
27
+ | [name](#name) | `name` | `string` | | The name for the select element. |
28
+ | [noCheckmark](#noCheckmark) | `noCheckmark` | `boolean` | | When true, checkmark on selected option will no longer be present. |
29
+ | [noFlip](#noFlip) | `noFlip` | `boolean` | "false" | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
30
+ | [noValidate](#noValidate) | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
31
+ | [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
32
+ | [onDark](#onDark) | `onDark` | `boolean` | | If declared, onDark styles will be applied to the trigger. |
33
+ | [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" |
35
+ | [required](#required) | `required` | `boolean` | | Populates the `required` attribute on the element. Used for client-side validation. |
36
+ | [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
37
+ | [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
38
+ | [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
39
+ | [validity](#validity) | `validity` | `string` | | Specifies the `validityState` this element is in. |
40
+ | [value](#value) | `value` | `String\|Array<String>` | | Value selected for the component. Default type is `String`, changing to `Array<String>` when `multiSelect` is true. |
41
41
 
42
42
  ## Methods
43
43
 
@@ -48,11 +48,11 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
48
48
 
49
49
  ## Events
50
50
 
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. |
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<{ 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
56
 
57
57
  ## Slots
58
58
 
@@ -62,7 +62,8 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
62
62
  | `bib.fullscreen.headline` | Defines the headline to display above menu-options |
63
63
  | [helpText](#helpText) | Defines the content of the helpText. |
64
64
  | [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 |
65
+ | [placeholder](#placeholder) | Defines the content of the placeholder to be shown when there is no value |
66
+ | [valueText](#valueText) | Dropdown value text display. |
66
67
 
67
68
  ## CSS Shadow Parts
68
69
 
@@ -161,7 +162,7 @@ To pre-set the value of auro-select on load, use the `value` property. The `sele
161
162
  <auro-button id="validValueExampleBtn">Set Value to Valid Option</auro-button>
162
163
  <auro-button id="invalidValueExampleBtn">Set Value to Invalid Option</auro-button>
163
164
  <br/><br/>
164
- <auro-select id="valueExample" value='["price"]'>
165
+ <auro-select id="valueExample" multiselect value='["price", "duration"]'>
165
166
  <span slot="bib.fullscreen.headline">Bib Headline</span>
166
167
  <span slot="label">Name</span>
167
168
  <auro-menu>
@@ -184,7 +185,7 @@ To pre-set the value of auro-select on load, use the `value` property. The `sele
184
185
  <auro-button id="validValueExampleBtn">Set Value to Valid Option</auro-button>
185
186
  <auro-button id="invalidValueExampleBtn">Set Value to Invalid Option</auro-button>
186
187
  <br/><br/>
187
- <auro-select id="valueExample" value='["price"]'>
188
+ <auro-select id="valueExample" multiselect value='["price", "duration"]'>
188
189
  <span slot="bib.fullscreen.headline">Bib Headline</span>
189
190
  <span slot="label">Name</span>
190
191
  <auro-menu>
@@ -206,11 +207,11 @@ export function valueExample() {
206
207
  const valueExample = document.querySelector('#valueExample');
207
208
 
208
209
  document.querySelector('#validValueExampleBtn').addEventListener('click', () => {
209
- valueExample.value = ['arrival'];
210
+ valueExample.value = '["arrival", "prefer alaska"]';
210
211
  });
211
212
 
212
213
  document.querySelector('#invalidValueExampleBtn').addEventListener('click', () => {
213
- valueExample.value = ['flight course'];
214
+ valueExample.value = '["flight course"]';
214
215
  });
215
216
  }
216
217
  ```
@@ -786,7 +787,7 @@ Use the `reset()` method to reset the `<auro-select>`'s `value` and `validity` s
786
787
  <!-- The below content is automatically added from ./../apiExamples/resetState.html -->
787
788
  <auro-button id="resetStateBtn">Reset</auro-button>
788
789
  <br/><br/>
789
- <auro-select id="resetStateExample" value='["price"]'>
790
+ <auro-select id="resetStateExample" value="price">
790
791
  <span slot="bib.fullscreen.headline">Bib Headline</span>
791
792
  <label slot="placeholder">Placeholder Text</label>
792
793
  <span slot="label">Name</span>
@@ -809,7 +810,7 @@ Use the `reset()` method to reset the `<auro-select>`'s `value` and `validity` s
809
810
  ```html
810
811
  <auro-button id="resetStateBtn">Reset</auro-button>
811
812
  <br/><br/>
812
- <auro-select id="resetStateExample" value='["price"]'>
813
+ <auro-select id="resetStateExample" value="price">
813
814
  <span slot="bib.fullscreen.headline">Bib Headline</span>
814
815
  <label slot="placeholder">Placeholder Text</label>
815
816
  <span slot="label">Name</span>
@@ -1033,6 +1034,63 @@ export function auroMenuLoadingExample() {
1033
1034
  <!-- AURO-GENERATED-CONTENT:END -->
1034
1035
  </auro-accordion>
1035
1036
 
1037
+ ### valueText <a name="valueText"></a>
1038
+ The label for selected option can be customized using `valueText` slot.
1039
+ This slot can be manipulated on the `input` event which delivers the new value and selected `auro-menuoption` element in the `detail` object.
1040
+
1041
+ <div class="exampleWrapper">
1042
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/valueText.html) -->
1043
+ <!-- The below content is automatically added from ./../apiExamples/valueText.html -->
1044
+ <auro-select id="valueTextExample" autocomplete="address-level1">
1045
+ <span slot="bib.fullscreen.headline">Select Your Gender</span>
1046
+ <span slot="label">Gender</span>
1047
+ <span slot="valueText"></span>
1048
+ <auro-menu>
1049
+ <auro-menuoption value="m" data-display="Male">M - Male</auro-menuoption>
1050
+ <auro-menuoption value="f" data-display="Female">F - Female</auro-menuoption>
1051
+ <auro-menuoption value="x" data-display="Unspecified">X - Unspecified</auro-menuoption>
1052
+ <auro-menuoption value="u" data-display="Undisclosed">U - Undisclosed</auro-menuoption>
1053
+ </auro-menu>
1054
+ </auro-select>
1055
+ <!-- AURO-GENERATED-CONTENT:END -->
1056
+ </div>
1057
+ <auro-accordion alignRight>
1058
+ <span slot="trigger">See code</span>
1059
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/valueText.js) -->
1060
+ <!-- The below code snippet is automatically added from ./../apiExamples/valueText.js -->
1061
+
1062
+ ```js
1063
+ export function valueTextExample() {
1064
+ const onValueTextSelectInput = (e) => {
1065
+ const valueText = e.target.querySelector("[slot=valueText]");
1066
+
1067
+ valueText.textContent = e.detail.optionSelected.dataset.display;
1068
+ };
1069
+
1070
+ const select = document.querySelector("#valueTextExample");
1071
+ select.addEventListener('input', onValueTextSelectInput);
1072
+ }
1073
+ ```
1074
+ <!-- AURO-GENERATED-CONTENT:END -->
1075
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/valueText.html) -->
1076
+ <!-- The below code snippet is automatically added from ./../apiExamples/valueText.html -->
1077
+
1078
+ ```html
1079
+ <auro-select id="valueTextExample" autocomplete="address-level1">
1080
+ <span slot="bib.fullscreen.headline">Select Your Gender</span>
1081
+ <span slot="label">Gender</span>
1082
+ <span slot="valueText"></span>
1083
+ <auro-menu>
1084
+ <auro-menuoption value="m" data-display="Male">M - Male</auro-menuoption>
1085
+ <auro-menuoption value="f" data-display="Female">F - Female</auro-menuoption>
1086
+ <auro-menuoption value="x" data-display="Unspecified">X - Unspecified</auro-menuoption>
1087
+ <auro-menuoption value="u" data-display="Undisclosed">U - Undisclosed</auro-menuoption>
1088
+ </auro-menu>
1089
+ </auro-select>
1090
+ ```
1091
+ <!-- AURO-GENERATED-CONTENT:END -->
1092
+ </auro-accordion>
1093
+
1036
1094
  ### Customized bib position
1037
1095
  The bib position can be customized with `placement`, `offset`, `flip`, `autoPlacement` attributes.
1038
1096
 
@@ -1193,7 +1251,7 @@ The component can be in a dialog.
1193
1251
  <auro-dialog id="select-dialog">
1194
1252
  <span slot="header">Select in Dialog</span>
1195
1253
  <div slot="content">
1196
- <auro-select id="valueExample" value='["price"]'>
1254
+ <auro-select id="valueExample" value="price">
1197
1255
  <span slot="bib.fullscreen.headline">Bib Headline</span>
1198
1256
  <span slot="label">Name</span>
1199
1257
  <auro-menu>
@@ -1221,7 +1279,7 @@ The component can be in a dialog.
1221
1279
  <auro-dialog id="select-dialog">
1222
1280
  <span slot="header">Select in Dialog</span>
1223
1281
  <div slot="content">
1224
- <auro-select id="valueExample" value='["price"]'>
1282
+ <auro-select id="valueExample" value="price">
1225
1283
  <span slot="bib.fullscreen.headline">Bib Headline</span>
1226
1284
  <span slot="label">Name</span>
1227
1285
  <auro-menu>