@aurodesignsystem/auro-formkit 3.5.0-rc-627.2.1 → 4.0.0-rc-658.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.
- package/CHANGELOG.md +40 -1
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/api.md +27 -27
- package/components/combobox/demo/api.min.js +63 -275
- package/components/combobox/demo/index.html +1 -0
- package/components/combobox/demo/index.min.js +61 -273
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/auro-combobox.d.ts +5 -10
- package/components/combobox/dist/index.js +22 -149
- package/components/combobox/dist/registered.js +22 -149
- package/components/counter/README.md +1 -1
- package/components/counter/demo/readme.md +1 -1
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/readme.md +1 -1
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/readme.md +1 -1
- package/components/form/README.md +1 -1
- package/components/form/demo/readme.md +1 -1
- package/components/input/README.md +1 -1
- package/components/input/demo/readme.md +1 -1
- package/components/menu/README.md +1 -1
- package/components/menu/demo/api.md +11 -11
- package/components/menu/demo/api.min.js +39 -124
- package/components/menu/demo/index.min.js +39 -124
- package/components/menu/demo/readme.md +1 -1
- package/components/menu/dist/auro-menu-utils.d.ts +0 -8
- package/components/menu/dist/auro-menu.d.ts +3 -8
- package/components/menu/dist/index.d.ts +1 -1
- package/components/menu/dist/index.js +40 -84
- package/components/menu/dist/registered.js +39 -124
- package/components/radio/README.md +1 -1
- package/components/radio/demo/api.md +8 -0
- package/components/radio/demo/api.min.js +13 -5
- package/components/radio/demo/index.min.js +13 -5
- package/components/radio/demo/readme.md +1 -1
- package/components/radio/dist/auro-radio.d.ts +4 -0
- package/components/radio/dist/index.js +13 -5
- package/components/radio/dist/registered.js +13 -5
- package/components/select/README.md +35 -35
- package/components/select/demo/api.md +32 -32
- package/components/select/demo/api.min.js +99 -199
- package/components/select/demo/index.min.js +97 -197
- package/components/select/demo/readme.md +1 -1
- package/components/select/dist/auro-select.d.ts +12 -13
- package/components/select/dist/index.js +57 -72
- package/components/select/dist/registered.js +57 -72
- 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:
|
|
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
|
-
|
|
352
|
+
tabindex="-1"
|
|
348
353
|
/>
|
|
349
354
|
|
|
350
|
-
<label
|
|
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:
|
|
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
|
-
|
|
352
|
+
tabindex="-1"
|
|
348
353
|
/>
|
|
349
354
|
|
|
350
|
-
<label
|
|
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
|
`;
|
|
@@ -15,33 +15,33 @@ The following sections are editable by making changes to the following files:
|
|
|
15
15
|
| Use Cases | Examples for when to use this component | `./docs/partials/useCases.md` |
|
|
16
16
|
| Additional Information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
|
|
17
17
|
| Component Example Code | HTML sample code of the components use | `./apiExamples/basic.html` |
|
|
18
|
-
-->
|
|
19
|
-
|
|
18
|
+
-->
|
|
19
|
+
|
|
20
20
|
# Select
|
|
21
21
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
22
22
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
23
23
|
`<auro-select>` is a combination <auro-hyperlink href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements">HTML custom element</auro-hyperlink> that consists of a pre-defined trigger element, `<auro-menu>` for the panel content. The `<auro-select>` element presents a menu of options. The options within the menu are represented by `<auro-menu>` and `<auro-menuoption>` elements. You can pre-select options for the user with the `selected` attribute as part of the `<auro-menuoption>` API.
|
|
24
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
24
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
25
25
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
26
26
|
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
27
27
|
<!-- AURO-GENERATED-CONTENT This file is to be used for any additional content that should be included in the README.md which is specific to this component. -->
|
|
28
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
29
|
-
|
|
28
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
29
|
+
|
|
30
30
|
## Getting Started
|
|
31
31
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
32
|
-
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
33
|
-
|
|
32
|
+
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
33
|
+
|
|
34
34
|
#### NPM Installation
|
|
35
35
|
|
|
36
36
|
```shell
|
|
37
37
|
$ npm i @aurodesignsystem/auro-formkit
|
|
38
38
|
```
|
|
39
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
39
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
40
40
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
41
|
-
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
42
|
-
|
|
43
|
-
### Import Options
|
|
44
|
-
|
|
41
|
+
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
42
|
+
|
|
43
|
+
### Import Options
|
|
44
|
+
|
|
45
45
|
#### Automatic Registration
|
|
46
46
|
|
|
47
47
|
For automatic registration, simply import the component:
|
|
@@ -49,8 +49,8 @@ For automatic registration, simply import the component:
|
|
|
49
49
|
```javascript
|
|
50
50
|
// Registers <auro-select> automatically
|
|
51
51
|
import '@aurodesignsystem/auro-formkit/auro-select';
|
|
52
|
-
```
|
|
53
|
-
|
|
52
|
+
```
|
|
53
|
+
|
|
54
54
|
#### Custom Registration
|
|
55
55
|
|
|
56
56
|
To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our static `AuroSelect.register('custom-select')` method on the component class and pass in a unique name.
|
|
@@ -61,8 +61,8 @@ import { AuroSelect } from '@aurodesignsystem/auro-formkit/auro-select/class';
|
|
|
61
61
|
|
|
62
62
|
// Register with a custom name if desired
|
|
63
63
|
AuroSelect.register('custom-select');
|
|
64
|
-
```
|
|
65
|
-
|
|
64
|
+
```
|
|
65
|
+
|
|
66
66
|
#### TypeScript Module Resolution
|
|
67
67
|
|
|
68
68
|
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
@@ -76,12 +76,12 @@ When using TypeScript set `moduleResolution` to `bundler`, add the following to
|
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
This configuration enables proper module resolution for the component's TypeScript files.
|
|
79
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
79
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
80
80
|
**Reference component in HTML**
|
|
81
81
|
|
|
82
82
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
83
|
-
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
84
|
-
|
|
83
|
+
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
84
|
+
|
|
85
85
|
```html
|
|
86
86
|
<auro-select>
|
|
87
87
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
@@ -94,44 +94,44 @@ This configuration enables proper module resolution for the component's TypeScri
|
|
|
94
94
|
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
95
95
|
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
96
96
|
</auro-menu>
|
|
97
|
-
</auro-select>
|
|
98
|
-
```
|
|
99
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
100
|
-
|
|
97
|
+
</auro-select>
|
|
98
|
+
```
|
|
99
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
100
|
+
|
|
101
101
|
### Design Token CSS Custom Property dependency
|
|
102
102
|
|
|
103
103
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/designTokens.md) -->
|
|
104
104
|
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
105
105
|
|
|
106
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
107
|
-
|
|
106
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
107
|
+
|
|
108
108
|
## Install from CDN
|
|
109
109
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
|
|
110
110
|
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
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@
|
|
115
|
-
```
|
|
116
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
117
|
-
|
|
114
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-select/+esm"></script>
|
|
115
|
+
```
|
|
116
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
117
|
+
|
|
118
118
|
## UI development browser support
|
|
119
119
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/browserSupport.md) -->
|
|
120
120
|
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
|
|
121
121
|
|
|
122
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
123
|
-
|
|
122
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
123
|
+
|
|
124
124
|
## auro-select use cases
|
|
125
125
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
126
126
|
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
127
127
|
See description.
|
|
128
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
129
|
-
|
|
128
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
129
|
+
|
|
130
130
|
## Formkit development
|
|
131
131
|
|
|
132
132
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
|
|
133
|
-
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
134
|
-
|
|
133
|
+
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
134
|
+
|
|
135
135
|
### Filtering
|
|
136
136
|
|
|
137
137
|
Running the `dev` command will open a `localhost` development server for all components in the monorepo at once.
|
|
@@ -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
|
|
18
|
-
|
|
19
|
-
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean`
|
|
20
|
-
| [autocomplete](#autocomplete) | `autocomplete` | `string`
|
|
21
|
-
| [disabled](#disabled) | `disabled` | `boolean`
|
|
22
|
-
| [error](#error) | `error` | `string`
|
|
23
|
-
| [flexMenuWidth](#flexMenuWidth) | `flexMenuWidth` | `boolean`
|
|
24
|
-
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | `string`
|
|
25
|
-
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean`
|
|
26
|
-
| [multiSelect](#multiSelect) | `multiselect` | `boolean`
|
|
27
|
-
| [name](#name) | `name` | `string`
|
|
28
|
-
| [noCheckmark](#noCheckmark) | `noCheckmark` | `boolean`
|
|
29
|
-
| [noFlip](#noFlip) | `noFlip` | `boolean`
|
|
30
|
-
| [noValidate](#noValidate) | `noValidate` | `boolean`
|
|
31
|
-
| [offset](#offset) | `offset` | `number`
|
|
32
|
-
| [onDark](#onDark) | `onDark` | `boolean`
|
|
33
|
-
| [optionSelected](#optionSelected) | `optionSelected` |
|
|
34
|
-
| [placement](#placement) | `placement` | `string`
|
|
35
|
-
| [required](#required) | `required` | `boolean`
|
|
36
|
-
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string`
|
|
37
|
-
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string`
|
|
38
|
-
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string`
|
|
39
|
-
| [validity](#validity) | `validity` | `string`
|
|
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
|
|
|
@@ -161,7 +161,7 @@ To pre-set the value of auro-select on load, use the `value` property. The `sele
|
|
|
161
161
|
<auro-button id="validValueExampleBtn">Set Value to Valid Option</auro-button>
|
|
162
162
|
<auro-button id="invalidValueExampleBtn">Set Value to Invalid Option</auro-button>
|
|
163
163
|
<br/><br/>
|
|
164
|
-
<auro-select id="valueExample" value='["price"]'>
|
|
164
|
+
<auro-select id="valueExample" multiselect value='["price", "duration"]'>
|
|
165
165
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
166
166
|
<span slot="label">Name</span>
|
|
167
167
|
<auro-menu>
|
|
@@ -184,7 +184,7 @@ To pre-set the value of auro-select on load, use the `value` property. The `sele
|
|
|
184
184
|
<auro-button id="validValueExampleBtn">Set Value to Valid Option</auro-button>
|
|
185
185
|
<auro-button id="invalidValueExampleBtn">Set Value to Invalid Option</auro-button>
|
|
186
186
|
<br/><br/>
|
|
187
|
-
<auro-select id="valueExample" value='["price"]'>
|
|
187
|
+
<auro-select id="valueExample" multiselect value='["price", "duration"]'>
|
|
188
188
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
189
189
|
<span slot="label">Name</span>
|
|
190
190
|
<auro-menu>
|
|
@@ -206,11 +206,11 @@ export function valueExample() {
|
|
|
206
206
|
const valueExample = document.querySelector('#valueExample');
|
|
207
207
|
|
|
208
208
|
document.querySelector('#validValueExampleBtn').addEventListener('click', () => {
|
|
209
|
-
valueExample.value = [
|
|
209
|
+
valueExample.value = '["arrival", "prefer alaska"]';
|
|
210
210
|
});
|
|
211
211
|
|
|
212
212
|
document.querySelector('#invalidValueExampleBtn').addEventListener('click', () => {
|
|
213
|
-
valueExample.value = [
|
|
213
|
+
valueExample.value = '["flight course"]';
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
```
|
|
@@ -786,7 +786,7 @@ Use the `reset()` method to reset the `<auro-select>`'s `value` and `validity` s
|
|
|
786
786
|
<!-- The below content is automatically added from ./../apiExamples/resetState.html -->
|
|
787
787
|
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
788
788
|
<br/><br/>
|
|
789
|
-
<auro-select id="resetStateExample" value=
|
|
789
|
+
<auro-select id="resetStateExample" value="price">
|
|
790
790
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
791
791
|
<label slot="placeholder">Placeholder Text</label>
|
|
792
792
|
<span slot="label">Name</span>
|
|
@@ -809,7 +809,7 @@ Use the `reset()` method to reset the `<auro-select>`'s `value` and `validity` s
|
|
|
809
809
|
```html
|
|
810
810
|
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
811
811
|
<br/><br/>
|
|
812
|
-
<auro-select id="resetStateExample" value=
|
|
812
|
+
<auro-select id="resetStateExample" value="price">
|
|
813
813
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
814
814
|
<label slot="placeholder">Placeholder Text</label>
|
|
815
815
|
<span slot="label">Name</span>
|
|
@@ -1193,7 +1193,7 @@ The component can be in a dialog.
|
|
|
1193
1193
|
<auro-dialog id="select-dialog">
|
|
1194
1194
|
<span slot="header">Select in Dialog</span>
|
|
1195
1195
|
<div slot="content">
|
|
1196
|
-
<auro-select id="valueExample" value=
|
|
1196
|
+
<auro-select id="valueExample" value="price">
|
|
1197
1197
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
1198
1198
|
<span slot="label">Name</span>
|
|
1199
1199
|
<auro-menu>
|
|
@@ -1221,7 +1221,7 @@ The component can be in a dialog.
|
|
|
1221
1221
|
<auro-dialog id="select-dialog">
|
|
1222
1222
|
<span slot="header">Select in Dialog</span>
|
|
1223
1223
|
<div slot="content">
|
|
1224
|
-
<auro-select id="valueExample" value=
|
|
1224
|
+
<auro-select id="valueExample" value="price">
|
|
1225
1225
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
1226
1226
|
<span slot="label">Name</span>
|
|
1227
1227
|
<auro-menu>
|