@proximus/lavender-input 2.0.0-alpha.192 → 2.0.0-alpha.194
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/dist/AbstractInput.d.ts +2 -0
- package/dist/CodeInput.d.ts +46 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +240 -21
- package/package.json +1 -1
- package/dist/codeInput.d.ts +0 -17
package/dist/AbstractInput.d.ts
CHANGED
|
@@ -14,11 +14,13 @@ export declare abstract class AbstractInputElement<INPUT_ELEMENT extends HTMLInp
|
|
|
14
14
|
formData(): FormData;
|
|
15
15
|
connectedCallback(): void;
|
|
16
16
|
disconnectedCallback(): void;
|
|
17
|
+
protected onNativeChange: () => void;
|
|
17
18
|
private onHelperSlotChange;
|
|
18
19
|
private onStatusTextSlotChange;
|
|
19
20
|
static get formAssociated(): boolean;
|
|
20
21
|
formResetCallback(): void;
|
|
21
22
|
formStateRestoreCallback(state: string): void;
|
|
23
|
+
private instanceId?;
|
|
22
24
|
setupForId(): void;
|
|
23
25
|
setupAriaDescribedBy(slotElements: NodeListOf<Element>, targetElement: Element, descriptor: string): void;
|
|
24
26
|
private ariaDescribedByRank;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AbstractInputElement, InputState } from './AbstractInput.ts';
|
|
2
|
+
export declare class CodeInput extends AbstractInputElement<HTMLInputElement> {
|
|
3
|
+
static styles: CSSStyleSheet;
|
|
4
|
+
static nativeName: string;
|
|
5
|
+
static accessorExclusions: string[];
|
|
6
|
+
template(): string;
|
|
7
|
+
constructor();
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
static get observedAttributes(): string[];
|
|
11
|
+
private static readonly forwardedAttributes;
|
|
12
|
+
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
13
|
+
stateChangeCallback(oldValue: InputState, newValue: InputState): void;
|
|
14
|
+
formData(): FormData;
|
|
15
|
+
formResetCallback(): void;
|
|
16
|
+
formStateRestoreCallback(state: string): void;
|
|
17
|
+
setupInputs(): void;
|
|
18
|
+
private syncCellAttributes;
|
|
19
|
+
private get isCollapsed();
|
|
20
|
+
private createSingleInput;
|
|
21
|
+
private restoreLabelAssociation;
|
|
22
|
+
private syncGroupAria;
|
|
23
|
+
private createCell;
|
|
24
|
+
private cellIndexOf;
|
|
25
|
+
private onContainerInput;
|
|
26
|
+
private onContainerKeydown;
|
|
27
|
+
private onContainerPaste;
|
|
28
|
+
private onCellInput;
|
|
29
|
+
private onCellKeydown;
|
|
30
|
+
private onCellPaste;
|
|
31
|
+
private distributeFrom;
|
|
32
|
+
private getValue;
|
|
33
|
+
private setValue;
|
|
34
|
+
private syncFormValue;
|
|
35
|
+
get $cells(): HTMLInputElement[];
|
|
36
|
+
get $single(): HTMLInputElement | null;
|
|
37
|
+
get $inputs(): HTMLInputElement[];
|
|
38
|
+
get $el(): HTMLInputElement;
|
|
39
|
+
get $container(): HTMLElement | null;
|
|
40
|
+
get value(): string;
|
|
41
|
+
set value(value: string);
|
|
42
|
+
get readOnly(): boolean;
|
|
43
|
+
set readOnly(value: boolean);
|
|
44
|
+
get disabled(): boolean;
|
|
45
|
+
set disabled(value: boolean);
|
|
46
|
+
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -2,7 +2,9 @@ import { PxElement as e, transferAccessibilityAttributes as t } from "@proximus/
|
|
|
2
2
|
//#region src/input.css?inline
|
|
3
3
|
var n = ":host{--icon-error:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 17' width='17' height='17'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23B30000;%7D%3C/style%3E%3C/defs%3E%3Cg id='forms-error'%3E%3Cpath id='Error' class='cls-1' d='M8.5,0A8.5,8.5,0,1,0,17,8.5,8.51,8.51,0,0,0,8.5,0ZM7.42,4.65a1.08,1.08,0,1,1,2.16,0V8.79a1.08,1.08,0,0,1-2.16,0Zm1.93,8.44a1.2,1.2,0,0,1-1.7-1.69,1.15,1.15,0,0,1,.85-.35,1.11,1.11,0,0,1,.84.35h0A1.21,1.21,0,0,1,9.35,13.09Z'/%3E%3C/g%3E%3C/svg%3E\");--icon-success:url(\"data:image/svg+xml,%3Csvg id='forms-success' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 17' width='17' height='17'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23008000;%7D%3C/style%3E%3C/defs%3E%3Cpath id='Success' class='cls-1' d='M8.5,0A8.5,8.5,0,1,0,17,8.5,8.51,8.51,0,0,0,8.5,0Zm3.69,7.08-4.29,4a.81.81,0,0,1-.56.22.84.84,0,0,1-.59-.24L4.67,9A.81.81,0,0,1,5.81,7.85L7.35,9.4,11.1,5.91a.8.8,0,0,1,1.09,1.17Z'/%3E%3C/svg%3E\");--icon-search:url(data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M17.6451%2016.6649L12.5811%2011.7844C13.4371%2010.7503%2013.9122%209.46601%2013.9282%208.10498C13.9463%206.53112%2013.351%205.04391%2012.251%203.91824C11.1511%202.79211%209.67878%202.16202%208.10492%202.14352C8.081%202.14352%208.05753%202.14307%208.03406%202.14307C6.48637%202.14307%205.02715%202.7375%203.9182%203.82074C2.79208%204.92069%202.16199%206.393%202.14349%207.96687C2.12498%209.54118%202.72031%2011.0279%203.82026%2012.1536C4.97344%2013.3339%206.50442%2013.9261%208.03677%2013.9261C9.28408%2013.9261%2010.5303%2013.528%2011.5758%2012.7405L16.6828%2017.6633C16.8173%2017.7928%2016.9906%2017.8574%2017.164%2017.8574C17.3454%2017.8574%2017.5273%2017.7865%2017.6632%2017.6452C17.929%2017.3694%2017.9209%2016.9307%2017.6451%2016.6649ZM11.1849%2011.2595C10.3237%2012.1008%209.18546%2012.5707%207.98305%2012.5418C6.7793%2012.5278%205.65317%2012.0457%204.8123%2011.185C3.97101%2010.3238%203.5156%209.18687%203.53004%207.98312C3.54403%206.77981%204.02608%205.65369%204.88678%204.81282C5.73487%203.98413%206.85106%203.52962%208.03451%203.52962C8.05256%203.52962%208.07062%203.53007%208.08867%203.53007C9.29198%203.54406%2010.4181%204.02611%2011.2589%204.88684C12.1003%205.74802%2012.5557%206.88498%2012.5417%208.08873C12.5277%209.29249%2012.0456%2010.4186%2011.1849%2011.2595Z%22%20fill%3D%22%235C2D91%22%2F%3E%0A%3C%2Fsvg%3E);--icon-cancel:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 17 17' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.33333 0C12.9357 0 16.6667 3.73096 16.6667 8.33333C16.6667 12.9357 12.9357 16.6667 8.33333 16.6667C3.73096 16.6667 0 12.9357 0 8.33333C0 3.73096 3.73096 0 8.33333 0ZM12.3071 4.35954C12.0502 4.10263 11.6339 4.10262 11.377 4.35954L8.33333 7.40316L5.28971 4.35954C5.03279 4.10261 4.61646 4.10261 4.35954 4.35954C4.10261 4.61646 4.10261 5.03279 4.35954 5.28971L7.40316 8.33333L4.35954 11.377C4.10262 11.6339 4.10263 12.0502 4.35954 12.3071C4.61648 12.5639 5.03284 12.564 5.28971 12.3071L8.33333 9.26351L11.377 12.3071C11.6339 12.564 12.0502 12.564 12.3071 12.3071C12.564 12.0502 12.564 11.6339 12.3071 11.377L9.26351 8.33333L12.3071 5.28971C12.564 5.03284 12.5639 4.61648 12.3071 4.35954Z' fill='%235C2D91'/%3E%3C/svg%3E\");--icon-calendar:url(data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M14.7369%201.68408H12.779V0.42102C12.779%200.188549%2012.5904%200%2012.358%200C12.1255%200%2011.9369%200.188549%2011.9369%200.42102V1.68408H9.92439V0.42102C9.92439%200.188549%209.73584%200%209.50337%200C9.2709%200%209.08235%200.188549%209.08235%200.42102V1.68408H7.0698V0.42102C7.0698%200.188549%206.88126%200%206.64878%200C6.41631%200%206.22777%200.188549%206.22777%200.42102V1.68408H4.21082V0.42102C4.21051%200.188549%204.02196%200%203.78949%200C3.55702%200%203.36847%200.188549%203.36847%200.42102V1.68408H2.52643C1.13098%201.68408%200%202.81537%200%204.21051V14.7369C0%2015.4344%200.565647%2016%201.26306%2016H13.4736C14.8687%2016%2016%2014.869%2016%2013.4736V2.94745C16%202.24973%2015.4344%201.68408%2014.7369%201.68408ZM15.158%2013.4736C15.158%2014.4038%2014.4041%2015.1576%2013.4739%2015.1576H1.26306C1.03059%2015.1576%200.842039%2014.9691%200.842039%2014.7366V6.73663H15.158V13.4736ZM15.158%205.89459H0.842039V4.21051C0.842039%203.28031%201.59592%202.52643%202.52612%202.52643H3.36816V3.78949C3.36816%204.02196%203.55671%204.21051%203.78918%204.21051C4.02165%204.21051%204.2102%204.02196%204.2102%203.78949V2.52643H6.22714V3.78949C6.22714%204.02196%206.41569%204.21051%206.64816%204.21051C6.88063%204.21051%207.06918%204.02196%207.06918%203.78949V2.52643H9.08173V3.78949C9.08173%204.02196%209.27028%204.21051%209.50275%204.21051C9.73522%204.21051%209.92377%204.02196%209.92377%203.78949V2.52643H11.9363V3.78949C11.9363%204.02196%2012.1249%204.21051%2012.3573%204.21051C12.5898%204.21051%2012.7784%204.02196%2012.7784%203.78949V2.52643H14.7363C14.9688%202.52643%2015.1573%202.71498%2015.1573%202.94745V5.89459H15.158Z%22%20fill%3D%22%235C2D91%22%2F%3E%0A%3C%2Fsvg%3E);--icon-clock:url(data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M8%200C3.5818%200%200%203.5818%200%208C0%2012.4182%203.5818%2016%208%2016C12.4182%2016%2016%2012.4182%2016%208C16%203.5818%2012.4182%200%208%200ZM8%2015.158C4.04675%2015.158%200.842039%2011.9533%200.842039%208C0.842039%204.04675%204.04675%200.842039%208%200.842039C11.9533%200.842039%2015.158%204.04675%2015.158%208C15.158%2011.9533%2011.9533%2015.158%208%2015.158Z%22%20fill%3D%22%235C2D91%22%2F%3E%0A%3Cpath%20d%3D%22M7.99929%202.81256C7.76682%202.81256%207.57827%203.00111%207.57827%203.23358V7.76818C7.57607%207.89963%207.46972%208.00599%207.33827%208.00818H2.78235C2.54988%208.00818%202.36133%208.19673%202.36133%208.4292C2.36133%208.66167%202.54988%208.85022%202.78235%208.85022H7.32133C7.92117%208.85713%208.41309%208.3765%208.42031%207.77665C8.42031%207.77383%208.42031%207.771%208.42031%207.76818V3.23358C8.42031%203.00111%208.23176%202.81256%207.99929%202.81256Z%22%20fill%3D%22%235C2D91%22%2F%3E%0A%3C%2Fsvg%3E%0A);--icon-select:url(data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M4%206.6665L8%2010.6665L12%206.6665%22%20stroke%3D%22%235C2D91%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E);--icon-upload:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M18.7284%2020H6.54327C5.14071%2020%204%2018.816%204%2017.3603V16.102C4%2015.8589%204.18949%2015.6622%204.42374%2015.6622C4.65799%2015.6622%204.84748%2015.8589%204.84748%2016.102V17.3603C4.84748%2018.3311%205.60795%2019.1204%206.54327%2019.1204H18.7279C18.9618%2019.1204%2019.1517%2018.9233%2019.1517%2018.6806V16.0738C19.1517%2015.8307%2019.3412%2015.634%2019.5754%2015.634C19.8097%2015.634%2019.9992%2015.8307%2019.9992%2016.0738V18.6806C20%2019.4074%2019.4294%2020%2018.7284%2020Z%22%20fill%3D%22%235C2D91%22%2F%3E%0A%3Cpath%20d%3D%22M12.4435%204.29306C12.0671%203.90231%2011.4576%203.90231%2011.0811%204.29306L11.0774%204.29697L7.39173%208.122C7.01526%208.51275%207.01526%209.14534%207.39173%209.53609C7.7682%209.92684%208.37766%209.92684%208.75413%209.53609L10.7929%207.41951H10.7967V15.0414C10.7967%2015.4799%2011.1397%2015.8354%2011.5622%2015.8354H11.9579C12.3808%2015.8354%2012.7234%2015.4799%2012.7234%2015.0414V7.41821H12.7292L14.7659%209.53218C15.1424%209.92293%2015.7523%209.92293%2016.1284%209.53218C16.5048%209.14186%2016.5048%208.50884%2016.1284%208.11853L12.4435%204.29306Z%22%20fill%3D%22%235C2D91%22%2F%3E%0A%3C%2Fsvg%3E);--cancel-icon-width:1em;--cancel-icon-height:1em;--search-icon-datalist-width:2em;--search-icon-focus-width:var(--search-icon-datalist-width);display:block}:host *{box-sizing:border-box}label{all:unset;font-size:var(--px-font-size-base);line-height:var(--px-line-height-ratio-l)}input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container{vertical-align:baseline;align-items:center;gap:var(--px-spacing-default-mobile);padding:var(--px-padding-xs-mobile) calc(var(--px-padding-s-mobile) + var(--px-size-icon-s) + var(--px-spacing-s-mobile)) var(--px-padding-xs-mobile) var(--px-padding-s-mobile);background:var(--px-color-background-container-default-default) no-repeat;background-position:center right var(--px-padding-s-mobile);box-shadow:var(--px-color-border-neutral-default) 0 0 0px var(--px-size-border-m) inset;border-radius:var(--px-radius-main);color:var(--px-color-text-neutral-default);font-family:var(--px-font-family);font-weight:var(--px-font-weight-body);font-size:var(--px-text-size-label-l-mobile);line-height:var(--px-line-height-ratio-l);text-align:left;box-sizing:border-box;border:none;outline:0;margin:0;height:var(--px-size-l)!important}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container).extended{width:100%}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):hover,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container).error:hover,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container).success:hover{box-shadow:var(--px-color-border-state-hover-default) 0 0 0px var(--px-size-border-l) inset;background-color:var(--px-color-background-state-hover-bordered-default)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):focus-visible:not([disabled],[aria-disabled=true]):not([readonly],[aria-readonly=true]){outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):active{box-shadow:var(--px-color-border-state-active-default) 0 0 0px var(--px-size-border-m) inset;background-color:var(--px-color-background-container-default-default);outline:none}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):disabled,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):read-only:not(:is(select),#input-file-container){box-shadow:var(--px-color-border-neutral-default) 0 0 0px 0 inset;font-weight:var(--px-font-weight-title);text-align:left;background:0 0;padding:0}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container).error{box-shadow:var(--px-color-border-purpose-error-default) 0 0 0px var(--px-size-border-m) inset;background-repeat:no-repeat;background-image:var(--icon-error)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container).success{box-shadow:var(--px-color-border-purpose-success-default) 0 0 0px var(--px-size-border-m) inset;background-repeat:no-repeat;background-image:var(--icon-success)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search].success,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search].error,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):is(select).success,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):is(select).error,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)#input-file-container.success,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)#input-file-container.error{background-position:center right calc(var(--px-padding-s-mobile) + var(--px-size-icon-s) + var(--px-spacing-xs-mobile)), center right var(--px-padding-s-mobile)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=time].success{background-image:var(--icon-success)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=time].error{background-image:var(--icon-error)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=time]{min-width:8.5rem;padding-right:calc(var(--px-padding-s-mobile) + var(--px-size-icon-s) + var(--px-spacing-xs-mobile) + var(--px-size-icon-s) + var(--px-spacing-xs-mobile))}:is(:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=time])::-webkit-calendar-picker-indicator{margin-right:calc(( var(--px-size-icon-s) + var(--px-spacing-s-mobile) + var(--px-size-icon-s) ) * -1)}:is(:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=time]).error,:is(:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=time]).success{background-position:center right calc(var(--px-padding-s-mobile) + var(--px-size-icon-s) + var(--px-spacing-xs-mobile))}:is(:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=time]).success{background-image:var(--icon-success)}:is(:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=time]).error{background-image:var(--icon-error)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search]{background-image:var(--icon-search);padding-right:calc(var(--px-padding-s-mobile) + var(--px-size-icon-s) + var(--px-spacing-xs-mobile) + var(--px-size-icon-s) + var(--px-spacing-s-mobile))}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;background-image:var(--icon-cancel);height:var(--cancel-icon-height);width:var(--cancel-icon-width);margin-right:calc(( var(--px-spacing-xs-mobile) + var(--px-size-icon-s) + var(--px-spacing-xs-mobile) ) * -1);margin-left:var(--px-spacing-s-mobile);background-position:50%;background-repeat:no-repeat}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search]:focus::-webkit-search-cancel-button{opacity:1;pointer-events:auto;margin-right:calc((var(--px-size-icon-s) + var(--px-spacing-s-mobile)) * -1)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search]:hover::-webkit-search-cancel-button{opacity:1;pointer-events:auto;margin-right:calc((var(--px-size-icon-s) + var(--px-spacing-s-mobile)) * -1)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search][list=suggestions]:focus::-webkit-calendar-picker-indicator{margin-right:calc(( var(--px-size-icon-s) + var(--px-spacing-s-mobile) + var(--px-spacing-xs-mobile) ) * -1)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search][list=suggestions]:hover::-webkit-calendar-picker-indicator{margin-right:calc(( var(--px-size-icon-s) + var(--px-spacing-s-mobile) + var(--px-spacing-xs-mobile) ) * -1)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search][list=suggestions]:focus::-webkit-search-cancel-button{margin-right:var(--search-cancel-datalist-margin-right,calc((var(--px-size-icon-s) + var(--px-spacing-s-mobile)) * -1))}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search][list=suggestions]:hover::-webkit-search-cancel-button{margin-right:var(--search-cancel-datalist-margin-right,calc((var(--px-size-icon-s) + var(--px-spacing-s-mobile)) * -1))}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search].success:hover,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search].success:focus-visible,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search].error:hover,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search].error:focus-visible{background-position:center right var(--px-padding-s-mobile);background-image:var(--icon-search)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search].success{background-image:var(--icon-success), var(--icon-search)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)[type=search].error{background-image:var(--icon-error), var(--icon-search)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):is(select){text-overflow:ellipsis;background-image:var(--icon-select);-webkit-appearance:none;width:100%;padding-right:calc(var(--px-padding-s-mobile) + var(--px-size-icon-s))}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):is(select).success,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):is(select).error{padding-right:calc(var(--px-padding-s-mobile) + var(--px-size-icon-s) + var(--px-spacing-xs-mobile) + var(--px-size-icon-s) + var(--px-spacing-s-mobile))}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):is(select).success{background-image:var(--icon-success), var(--icon-select)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):is(select).error{background-image:var(--icon-error), var(--icon-select)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):is(textarea){flex-grow:0;height:auto!important}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):is(textarea).success,:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container):is(textarea).error{background-position:right 1rem top .5rem}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)#input-file-container{background-repeat:no-repeat;background-position:center right var(--px-padding-s-mobile);background-image:var(--icon-upload);align-items:center;max-width:100%;display:flex}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)#input-file-container span{text-overflow:ellipsis;white-space:nowrap;width:100%;overflow:hidden}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)#input-file-container.success{background-image:var(--icon-success), var(--icon-upload)}:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container)#input-file-container.error{background-image:var(--icon-error), var(--icon-upload)}:host([auto-complete]) input{--autocomplete-search-icon-width:calc(2 * var(--px-spacing-xs-mobile) + 2 * var(--px-padding-xs-mobile) + var(--px-size-icon-s));background-image:var(--icon-search);padding-right:var(--autocomplete-search-icon-width);background-position:right 1rem center}:host([auto-complete]) input.success{--autocomplete-search-icon-width:calc(2 * ( var(--px-spacing-xs-mobile) + var(--px-padding-xs-mobile) + var(--px-size-icon-s) ));background-position:center right calc(var(--px-padding-s-mobile) + var(--px-size-icon-s) + var(--px-spacing-xs-mobile)), center right var(--px-padding-s-mobile);background-image:var(--icon-success), var(--icon-search)!important}:host([auto-complete]) input.error{--autocomplete-search-icon-width:calc(2 * ( var(--px-spacing-xs-mobile) + var(--px-padding-xs-mobile) + var(--px-size-icon-s) ));background-position:center right calc(var(--px-padding-s-mobile) + var(--px-size-icon-s) + var(--px-spacing-xs-mobile)), center right var(--px-padding-s-mobile);background-image:var(--icon-error), var(--icon-search)!important}slot{font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);font-weight:var(--px-font-weight-body);line-height:var(--px-line-height-ratio-l);text-align:left;color:var(--px-color-text-neutral-default)}slot.error{color:var(--px-color-text-purpose-error-default)}slot.success{color:var(--px-color-text-purpose-success-default)}slot[name=helper]{color:#0000008f;font-size:var(--px-text-size-label-s-mobile)}#container{gap:var(--px-spacing-2xs-mobile);flex-direction:column;display:inline-flex}#container:has(#input-file-container){max-width:100%}:host([extended]) #container{width:100%}#label-helper{gap:var(--px-spacing-2xs-mobile);flex-direction:column;display:flex}input[type=file]{-webkit-appearance:none;opacity:0;width:0;height:0}@media screen and (width<=47.938rem){:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container).extended--mobile{width:100%}:host([extended--mobile]) #container{width:100%}}@media screen and (width>=48rem) and (width<=64rem){:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container).extended--tablet{width:100%}:host([extended--tablet]) #container{width:100%}}@media screen and (width>=48rem){:host([auto-complete]) input{--autocomplete-search-icon-width:calc(2 * var(--px-spacing-xs-tablet) + 2 * var(--px-padding-xs-tablet) + var(--px-size-icon-s))}:host([auto-complete]) input.success{--autocomplete-search-icon-width:calc(2 * ( var(--px-spacing-xs-tablet) + var(--px-padding-xs-tablet) + var(--px-size-icon-s) ));background-position:center right calc(var(--px-padding-s-tablet) + var(--px-size-icon-s) + var(--px-spacing-xs-tablet)), center right var(--px-padding-s-tablet);background-image:var(--icon-success), var(--icon-search)!important}:host([auto-complete]) input.error{--autocomplete-search-icon-width:calc(2 * ( var(--px-spacing-xs-tablet) + var(--px-padding-xs-tablet) + var(--px-size-icon-s) ));background-position:center right calc(var(--px-padding-s-tablet) + var(--px-size-icon-s) + var(--px-spacing-xs-tablet)), center right var(--px-padding-s-tablet);background-image:var(--icon-error), var(--icon-search)!important}input:not([type=file]),textarea,select,#input-file-container{gap:var(--px-spacing-default-tablet);padding:var(--px-padding-xs-tablet) calc(var(--px-padding-s-tablet) + var(--px-size-icon-s) + var(--px-spacing-s-tablet)) var(--px-padding-xs-tablet) var(--px-padding-s-tablet);font-size:var(--px-text-size-label-l-tablet);background-position:center right var(--px-padding-s-tablet);height:var(--px-size-l)!important}:is(input:not([type=file]),textarea,select,#input-file-container):focus-visible:not([disabled],[aria-disabled=true]):not([readonly],[aria-readonly=true]){outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].success,:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].error,:is(input:not([type=file]),textarea,select,#input-file-container):is(select).success,:is(input:not([type=file]),textarea,select,#input-file-container):is(select).error,:is(input:not([type=file]),textarea,select,#input-file-container)#input-file-container.success,:is(input:not([type=file]),textarea,select,#input-file-container)#input-file-container.error{background-position:center right calc(var(--px-padding-s-tablet) + var(--px-size-icon-s) + var(--px-spacing-xs-tablet)), center right var(--px-padding-s-tablet)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,#input-file-container)[type=time]{min-width:8.5rem;padding-right:calc(var(--px-padding-s-tablet) + var(--px-size-icon-s) + var(--px-spacing-xs-tablet) + var(--px-size-icon-s) + var(--px-spacing-xs-tablet))}:is(:is(input:not([type=file]),textarea,select,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,#input-file-container)[type=time])::-webkit-calendar-picker-indicator{margin-right:calc(( var(--px-size-icon-s) + var(--px-spacing-s-tablet) + var(--px-size-icon-s) ) * -1)}:is(:is(input:not([type=file]),textarea,select,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,#input-file-container)[type=time]).error,:is(:is(input:not([type=file]),textarea,select,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,#input-file-container)[type=time]).success{background-position:center right calc(var(--px-padding-s-tablet) + var(--px-size-icon-s) + var(--px-spacing-xs-tablet))}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search]{padding-right:calc(var(--px-padding-s-tablet) + var(--px-size-icon-s) + var(--px-spacing-xs-tablet) + var(--px-size-icon-s) + var(--px-spacing-s-tablet))}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search]::-webkit-search-cancel-button{margin-right:calc(( var(--px-spacing-xs-tablet) + var(--px-size-icon-s) + var(--px-spacing-xs-tablet) ) * -1);margin-left:var(--px-spacing-s-tablet)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search]:focus::-webkit-search-cancel-button{margin-right:calc((var(--px-size-icon-s) + var(--px-spacing-s-tablet)) * -1)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search]:hover::-webkit-search-cancel-button{margin-right:calc((var(--px-size-icon-s) + var(--px-spacing-s-tablet)) * -1)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search][list=suggestions]:focus::-webkit-calendar-picker-indicator{margin-right:calc(( var(--px-size-icon-s) + var(--px-spacing-s-tablet) + var(--px-spacing-xs-tablet) ) * -1)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search][list=suggestions]:hover::-webkit-calendar-picker-indicator{margin-right:calc(( var(--px-size-icon-s) + var(--px-spacing-s-tablet) + var(--px-spacing-xs-tablet) ) * -1)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search][list=suggestions]:focus::-webkit-search-cancel-button{margin-right:var(--search-cancel-datalist-margin-right,calc((var(--px-size-icon-s) + var(--px-spacing-s-tablet)) * -1))}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search][list=suggestions]:hover::-webkit-search-cancel-button{margin-right:var(--search-cancel-datalist-margin-right,calc((var(--px-size-icon-s) + var(--px-spacing-s-tablet)) * -1))}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].success:hover,:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].success:focus-visible,:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].error:hover,:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].error:focus-visible{background-position:center right var(--px-padding-s-tablet)}:is(input:not([type=file]),textarea,select,#input-file-container):is(select){padding-right:calc(var(--px-padding-s-tablet) + var(--px-size-icon-s))}:is(input:not([type=file]),textarea,select,#input-file-container):is(select).success,:is(input:not([type=file]),textarea,select,#input-file-container):is(select).error{padding-right:calc(var(--px-padding-s-tablet) + var(--px-size-icon-s) + var(--px-spacing-xs-tablet) + var(--px-size-icon-s) + var(--px-spacing-s-tablet))}:is(input:not([type=file]),textarea,select,#input-file-container)#input-file-container{background-position:center right var(--px-padding-s-tablet)}slot{font-size:var(--px-text-size-label-m-tablet)}slot[name=helper]{font-size:var(--px-text-size-label-s-tablet)}#container,#label-helper{gap:var(--px-spacing-2xs-tablet)}}@media screen and (width>=64.0625rem) and (width<=90rem){:is(input:not([type=file]),textarea,select,:host([auto-complete]) input,#input-file-container).extended--laptop{width:100%}:host([extended--laptop]) #container{width:100%}}@media screen and (width>=64.0625rem){:host([auto-complete]) input{--autocomplete-search-icon-width:calc(2 * var(--px-spacing-xs-laptop) + 2 * var(--px-padding-xs-laptop) + var(--px-size-icon-s))}:host([auto-complete]) input.success{--autocomplete-search-icon-width:calc(2 * ( var(--px-spacing-xs-laptop) + var(--px-padding-xs-laptop) + var(--px-size-icon-s) ));background-position:center right calc(var(--px-padding-s-laptop) + var(--px-size-icon-s) + var(--px-spacing-xs-laptop)), center right var(--px-padding-s-laptop);background-image:var(--icon-success), var(--icon-search)!important}:host([auto-complete]) input.error{--autocomplete-search-icon-width:calc(2 * ( var(--px-spacing-xs-laptop) + var(--px-padding-xs-laptop) + var(--px-size-icon-s) ));background-position:center right calc(var(--px-padding-s-laptop) + var(--px-size-icon-s) + var(--px-spacing-xs-laptop)), center right var(--px-padding-s-laptop);background-image:var(--icon-error), var(--icon-search)!important}input:not([type=file]),textarea,select,#input-file-container{gap:var(--px-spacing-default-laptop);padding:var(--px-padding-xs-laptop) calc(var(--px-padding-s-laptop) + var(--px-size-icon-s) + var(--px-spacing-s-laptop)) var(--px-padding-xs-laptop) var(--px-padding-s-laptop);font-size:var(--px-text-size-label-l-laptop);background-position:center right var(--px-padding-s-laptop)}:is(input:not([type=file]),textarea,select,#input-file-container):focus-visble:not([disabled],[aria-disabled=true]):not([readonly],[aria-readonly=true]){outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].success,:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].error,:is(input:not([type=file]),textarea,select,#input-file-container):is(select).success,:is(input:not([type=file]),textarea,select,#input-file-container):is(select).error,:is(input:not([type=file]),textarea,select,#input-file-container)#input-file-container.success,:is(input:not([type=file]),textarea,select,#input-file-container)#input-file-container.error{background-position:center right calc(var(--px-padding-s-laptop) + var(--px-size-icon-s) + var(--px-spacing-xs-laptop)), center right var(--px-padding-s-laptop)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,#input-file-container)[type=time]{min-width:8.5rem;padding-right:calc(var(--px-padding-s-laptop) + var(--px-size-icon-s) + var(--px-spacing-xs-laptop) + var(--px-size-icon-s) + var(--px-spacing-xs-laptop))}:is(:is(input:not([type=file]),textarea,select,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,#input-file-container)[type=time])::-webkit-calendar-picker-indicator{margin-right:calc(( var(--px-size-icon-s) + var(--px-spacing-s-laptop) + var(--px-size-icon-s) ) * -1)}:is(:is(input:not([type=file]),textarea,select,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,#input-file-container)[type=time]).error,:is(:is(input:not([type=file]),textarea,select,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,#input-file-container)[type=time]).success{background-position:center right calc(var(--px-padding-s-laptop) + var(--px-size-icon-s) + var(--px-spacing-xs-laptop))}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search]{padding-right:calc(var(--px-padding-s-laptop) + var(--px-size-icon-s) + var(--px-spacing-xs-laptop) + var(--px-size-icon-s) + var(--px-spacing-s-laptop))}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search]::-webkit-search-cancel-button{margin-right:calc(( var(--px-spacing-xs-laptop) + var(--px-size-icon-s) + var(--px-spacing-xs-laptop) ) * -1);margin-left:var(--px-spacing-s-laptop)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search]:focus::-webkit-search-cancel-button{margin-right:calc((var(--px-size-icon-s) + var(--px-spacing-s-laptop)) * -1)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search]:hover::-webkit-search-cancel-button{margin-right:calc((var(--px-size-icon-s) + var(--px-spacing-s-laptop)) * -1)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search][list=suggestions]:focus-visible::-webkit-calendar-picker-indicator{margin-right:calc(( var(--px-size-icon-s) + var(--px-spacing-s-laptop) + var(--px-spacing-xs-laptop) ) * -1)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search][list=suggestions]:hover::-webkit-calendar-picker-indicator{margin-right:calc(( var(--px-size-icon-s) + var(--px-spacing-s-laptop) + var(--px-spacing-xs-laptop) ) * -1)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search][list=suggestions]:focus::-webkit-search-cancel-button{margin-right:var(--search-cancel-datalist-margin-right,calc((var(--px-size-icon-s) + var(--px-spacing-s-laptop)) * -1))}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search][list=suggestions]:hover::-webkit-search-cancel-button{margin-right:var(--search-cancel-datalist-margin-right,calc((var(--px-size-icon-s) + var(--px-spacing-s-laptop)) * -1))}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].success:hover,:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].success:focus-visible,:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].error:hover,:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].error:focus-visible{background-position:center right var(--px-padding-s-laptop)}:is(input:not([type=file]),textarea,select,#input-file-container):is(select){padding-right:calc(var(--px-padding-s-laptop) + var(--px-size-icon-s))}:is(input:not([type=file]),textarea,select,#input-file-container):is(select).success,:is(input:not([type=file]),textarea,select,#input-file-container):is(select).error{padding-right:calc(var(--px-padding-s-laptop) + var(--px-size-icon-s) + var(--px-spacing-xs-laptop) + var(--px-size-icon-s) + var(--px-spacing-s-laptop))}:is(input:not([type=file]),textarea,select,#input-file-container)#input-file-container{background-position:center right var(--px-padding-s-laptop)}slot{font-size:var(--px-text-size-label-m-laptop)}slot[name=helper]{font-size:var(--px-text-size-label-s-laptop)}#container,#label-helper{gap:var(--px-spacing-2xs-laptop)}}@media screen and (width>=90.0625rem){:host([auto-complete]) input{--autocomplete-search-icon-width:calc(2 * var(--px-spacing-xs-desktop) + 2 * var(--px-padding-xs-desktop) + var(--px-size-icon-s))}:host([auto-complete]) input.success{--autocomplete-search-icon-width:calc(2 * ( var(--px-spacing-xs-laptop) + var(--px-padding-xs-laptop) + var(--px-size-icon-s) ));background-position:center right calc(var(--px-padding-s-laptop) + var(--px-size-icon-s) + var(--px-spacing-xs-laptop)), center right var(--px-padding-s-laptop);background-image:var(--icon-success), var(--icon-search)!important}:host([auto-complete]) input.error{--autocomplete-search-icon-width:calc(2 * ( var(--px-spacing-xs-laptop) + var(--px-padding-xs-laptop) + var(--px-size-icon-s) ));background-position:center right calc(var(--px-padding-s-laptop) + var(--px-size-icon-s) + var(--px-spacing-xs-laptop)), center right var(--px-padding-s-laptop);background-image:var(--icon-error), var(--icon-search)!important}input:not([type=file]),textarea,select,#input-file-container{gap:var(--px-spacing-default-desktop);padding:var(--px-padding-xs-desktop) calc(var(--px-padding-s-desktop) + var(--px-size-icon-s) + var(--px-spacing-s-desktop)) var(--px-padding-xs-desktop) var(--px-padding-s-desktop);font-size:var(--px-text-size-label-l-desktop);background-position:center right var(--px-padding-s-desktop)}:is(input:not([type=file]),textarea,select,#input-file-container):focus-visble:not([disabled],[aria-disabled=true]):not([readonly],[aria-readonly=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].success,:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].error,:is(input:not([type=file]),textarea,select,#input-file-container):is(select).success,:is(input:not([type=file]),textarea,select,#input-file-container):is(select).error,:is(input:not([type=file]),textarea,select,#input-file-container)#input-file-container.success,:is(input:not([type=file]),textarea,select,#input-file-container)#input-file-container.error{background-position:center right calc(var(--px-padding-s-desktop) + var(--px-size-icon-s) + var(--px-spacing-xs-desktop)), center right var(--px-padding-s-desktop)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,#input-file-container)[type=time]{min-width:8.5rem;padding-right:calc(var(--px-padding-s-desktop) + var(--px-size-icon-s) + var(--px-spacing-xs-desktop) + var(--px-size-icon-s) + var(--px-spacing-xs-desktop))}:is(:is(input:not([type=file]),textarea,select,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,#input-file-container)[type=time])::-webkit-calendar-picker-indicator{margin-right:calc(( var(--px-size-icon-s) + var(--px-spacing-s-desktop) + var(--px-size-icon-s) ) * -1)}:is(:is(input:not([type=file]),textarea,select,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,#input-file-container)[type=time]).error,:is(:is(input:not([type=file]),textarea,select,#input-file-container)[type=date],:is(input:not([type=file]),textarea,select,#input-file-container)[type=datetime-local],:is(input:not([type=file]),textarea,select,#input-file-container)[type=month],:is(input:not([type=file]),textarea,select,#input-file-container)[type=week],:is(input:not([type=file]),textarea,select,#input-file-container)[type=time]).success{background-position:center right calc(var(--px-padding-s-desktop) + var(--px-size-icon-s) + var(--px-spacing-xs-desktop))}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search]{padding-right:calc(var(--px-padding-s-desktop) + var(--px-size-icon-s) + var(--px-spacing-xs-desktop) + var(--px-size-icon-s) + var(--px-spacing-s-desktop))}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search]::-webkit-search-cancel-button{margin-right:calc(( var(--px-spacing-xs-desktop) + var(--px-size-icon-s) + var(--px-spacing-xs-desktop) ) * -1);margin-left:var(--px-spacing-s-desktop)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search]:focus::-webkit-search-cancel-button{margin-right:calc((var(--px-size-icon-s) + var(--px-spacing-s-desktop)) * -1)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search]:hover::-webkit-search-cancel-button{margin-right:calc((var(--px-size-icon-s) + var(--px-spacing-s-desktop)) * -1)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search][list=suggestions]:focus-visible::-webkit-calendar-picker-indicator{margin-right:calc(( var(--px-size-icon-s) + var(--px-spacing-s-desktop) + var(--px-spacing-xs-desktop) ) * -1)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search][list=suggestions]:hover::-webkit-calendar-picker-indicator{margin-right:calc(( var(--px-size-icon-s) + var(--px-spacing-s-desktop) + var(--px-spacing-xs-desktop) ) * -1)}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search][list=suggestions]:focus-visible::-webkit-search-cancel-button{margin-right:var(--search-cancel-datalist-margin-right,calc((var(--px-size-icon-s) + var(--px-spacing-s-desktop)) * -1))}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search][list=suggestions]:hover::-webkit-search-cancel-button{margin-right:var(--search-cancel-datalist-margin-right,calc((var(--px-size-icon-s) + var(--px-spacing-s-desktop)) * -1))}:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].success:hover,:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].success:focus-visible,:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].error:hover,:is(input:not([type=file]),textarea,select,#input-file-container)[type=search].error:focus-visible{background-position:center right var(--px-padding-s-desktop)}:is(input:not([type=file]),textarea,select,#input-file-container):is(select){padding-right:calc(var(--px-padding-s-desktop) + var(--px-size-icon-s))}:is(input:not([type=file]),textarea,select,#input-file-container):is(select).success,:is(input:not([type=file]),textarea,select,#input-file-container):is(select).error{padding-right:calc(var(--px-padding-s-desktop) + var(--px-size-icon-s) + var(--px-spacing-xs-desktop) + var(--px-size-icon-s) + var(--px-spacing-s-desktop))}:is(input:not([type=file]),textarea,select,#input-file-container)#input-file-container{background-position:center right var(--px-padding-s-desktop)}:is(input:not([type=file]),textarea,select,#input-file-container).extended--desktop{width:100%}:host([extended--desktop]) #container{width:100%}slot{font-size:var(--px-text-size-label-m-desktop)}slot[name=helper]{font-size:var(--px-text-size-label-s-desktop)}#container{gap:var(--px-spacing-2xs-laptop)}#label-helper{gap:var(--px-spacing-2xs-desktop)}}:host([hidden-label]) #label-helper{position:absolute}:host([hidden-label]) #container,:host([hidden-label]) #label-helper{gap:0}", r = new CSSStyleSheet();
|
|
4
4
|
r.replaceSync(n);
|
|
5
|
-
var i =
|
|
5
|
+
var i = /* @__PURE__ */ function(e) {
|
|
6
|
+
return e.ERROR = "error", e.SUCCESS = "success", e;
|
|
7
|
+
}({}), a = class extends e {
|
|
6
8
|
constructor() {
|
|
7
9
|
super(r), this.containerTemplate = () => `
|
|
8
10
|
<div id="container">
|
|
@@ -13,7 +15,12 @@ var i = class extends e {
|
|
|
13
15
|
</div>
|
|
14
16
|
${this.template()}
|
|
15
17
|
</div>
|
|
16
|
-
`, this.
|
|
18
|
+
`, this.onNativeChange = () => {
|
|
19
|
+
this.internals?.setFormValue(this.formData()), this.dispatchEvent(new CustomEvent("change", {
|
|
20
|
+
bubbles: !0,
|
|
21
|
+
composed: !0
|
|
22
|
+
}));
|
|
23
|
+
}, this.onHelperSlotChange = () => this.setupAriaDescribedBy(this.$slotHelper, this.$helperSlot, "helper"), this.onStatusTextSlotChange = () => this.setupAriaDescribedBy(this.$slotStatusText, this.$statusTextSlot, "status-text"), this.shadowRoot.innerHTML = this.containerTemplate(), this.internals = this.attachInternals?.();
|
|
17
24
|
}
|
|
18
25
|
static get observedAttributes() {
|
|
19
26
|
return [
|
|
@@ -38,17 +45,10 @@ var i = class extends e {
|
|
|
38
45
|
return this.$el.name && t && e.append(t, this.$el.value), e;
|
|
39
46
|
}
|
|
40
47
|
connectedCallback() {
|
|
41
|
-
|
|
42
|
-
this.$el.addEventListener(e, () => {
|
|
43
|
-
this.internals?.setFormValue(this.formData()), this.dispatchEvent(new CustomEvent(e, {
|
|
44
|
-
bubbles: !0,
|
|
45
|
-
composed: !0
|
|
46
|
-
}));
|
|
47
|
-
});
|
|
48
|
-
}), this.setupForId(), this.setupAriaDescribedBy(this.$slotHelper, this.$helperSlot, "helper"), this.setupAriaDescribedBy(this.$slotStatusText, this.$statusTextSlot, "status-text"), this.$helperSlot.addEventListener("slotchange", this.onHelperSlotChange), this.$statusTextSlot.addEventListener("slotchange", this.onStatusTextSlotChange);
|
|
48
|
+
this.$el?.addEventListener("change", this.onNativeChange), this.setupForId(), this.setupAriaDescribedBy(this.$slotHelper, this.$helperSlot, "helper"), this.setupAriaDescribedBy(this.$slotStatusText, this.$statusTextSlot, "status-text"), this.$helperSlot.addEventListener("slotchange", this.onHelperSlotChange), this.$statusTextSlot.addEventListener("slotchange", this.onStatusTextSlotChange);
|
|
49
49
|
}
|
|
50
50
|
disconnectedCallback() {
|
|
51
|
-
this.$helperSlot.removeEventListener("slotchange", this.onHelperSlotChange), this.$statusTextSlot.removeEventListener("slotchange", this.onStatusTextSlotChange);
|
|
51
|
+
this.$el?.removeEventListener("change", this.onNativeChange), this.$helperSlot.removeEventListener("slotchange", this.onHelperSlotChange), this.$statusTextSlot.removeEventListener("slotchange", this.onStatusTextSlotChange);
|
|
52
52
|
}
|
|
53
53
|
static get formAssociated() {
|
|
54
54
|
return !0;
|
|
@@ -60,7 +60,7 @@ var i = class extends e {
|
|
|
60
60
|
this.$el.value = e;
|
|
61
61
|
}
|
|
62
62
|
setupForId() {
|
|
63
|
-
let e = Math.random().toString(36).substr(2, 9);
|
|
63
|
+
let e = this.instanceId ??= Math.random().toString(36).substr(2, 9);
|
|
64
64
|
this.$el.setAttribute("id", e), this.$label && this.$label.setAttribute("for", e);
|
|
65
65
|
}
|
|
66
66
|
setupAriaDescribedBy(e, t, n) {
|
|
@@ -128,7 +128,7 @@ var i = class extends e {
|
|
|
128
128
|
get $slotStatusText() {
|
|
129
129
|
return this.querySelectorAll("[slot=\"status-text\"]");
|
|
130
130
|
}
|
|
131
|
-
},
|
|
131
|
+
}, o = class extends a {
|
|
132
132
|
static {
|
|
133
133
|
this.nativeName = "input";
|
|
134
134
|
}
|
|
@@ -169,10 +169,10 @@ var i = class extends e {
|
|
|
169
169
|
return this.shadowRoot.querySelector("div");
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
|
-
customElements.get("px-input") || customElements.define("px-input",
|
|
172
|
+
customElements.get("px-input") || customElements.define("px-input", o);
|
|
173
173
|
//#endregion
|
|
174
174
|
//#region src/TextArea.ts
|
|
175
|
-
var
|
|
175
|
+
var s = class extends a {
|
|
176
176
|
static {
|
|
177
177
|
this.nativeName = "textarea";
|
|
178
178
|
}
|
|
@@ -183,10 +183,10 @@ var o = class extends i {
|
|
|
183
183
|
return "<textarea></textarea>";
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
|
-
customElements.get("px-textarea") || customElements.define("px-textarea",
|
|
186
|
+
customElements.get("px-textarea") || customElements.define("px-textarea", s);
|
|
187
187
|
//#endregion
|
|
188
188
|
//#region src/Select.ts
|
|
189
|
-
var
|
|
189
|
+
var c = class extends a {
|
|
190
190
|
static {
|
|
191
191
|
this.nativeName = "select";
|
|
192
192
|
}
|
|
@@ -217,10 +217,10 @@ var s = class extends i {
|
|
|
217
217
|
super.disconnectedCallback(), this.observer?.disconnect();
|
|
218
218
|
}
|
|
219
219
|
};
|
|
220
|
-
customElements.get("px-select") || customElements.define("px-select",
|
|
220
|
+
customElements.get("px-select") || customElements.define("px-select", c);
|
|
221
221
|
//#endregion
|
|
222
222
|
//#region src/Upload.ts
|
|
223
|
-
var
|
|
223
|
+
var l = class extends a {
|
|
224
224
|
static {
|
|
225
225
|
this.nativeName = "input";
|
|
226
226
|
}
|
|
@@ -250,6 +250,225 @@ var c = class extends i {
|
|
|
250
250
|
return this.shadowRoot.querySelector("input[type=\"file\"]");
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
|
-
customElements.get("px-fileupload") || customElements.define("px-fileupload",
|
|
253
|
+
customElements.get("px-fileupload") || customElements.define("px-fileupload", l);
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/code-input.css?inline
|
|
256
|
+
var u = ":host{--code-box-width:2.813rem;--code-gap:var(--px-spacing-xs-mobile);display:block}:host *{box-sizing:border-box}.code-input{gap:var(--code-gap);display:flex}.code-input .code-input-cell{width:var(--code-box-width);text-align:center;cursor:text;padding:var(--px-padding-s-mobile)!important;background:var(--px-color-background-container-default-default)!important;height:2.75rem!important;box-shadow:var(--px-color-border-neutral-default) 0 0 0px var(--px-size-border-m) inset!important}.code-input .code-input-cell:hover:not(:disabled,:read-only){box-shadow:var(--px-color-border-state-hover-default) 0 0 0px var(--px-size-border-l) inset!important;background-color:var(--px-color-background-state-hover-bordered-default)!important}.code-input .code-input-cell.error{box-shadow:var(--px-color-border-purpose-error-default) 0 0 0px var(--px-size-border-m) inset!important;background-image:none!important}.code-input .code-input-cell.success{box-shadow:var(--px-color-border-purpose-success-default) 0 0 0px var(--px-size-border-m) inset!important;background-image:none!important}.code-input .code-input-cell:read-only,.code-input .code-input-cell:disabled{box-shadow:none!important;background:0 0!important}.code-input .code-input-single{width:calc(var(--code-cell-count) * var(--code-box-width) + (var(--code-cell-count) - 1) * var(--code-gap));text-align:left;caret-color:var(--px-color-text-neutral-default)}.code-input .code-input-single::selection{color:highlighttext;background-color:highlight}@media screen and (width>=48rem){:host{--code-gap:var(--px-spacing-xs-tablet)}}@media screen and (width>=64.0625rem){:host{--code-gap:var(--px-spacing-xs-laptop)}}@media screen and (width>=90.0625rem){:host{--code-gap:var(--px-spacing-xs-desktop)}}", d = new CSSStyleSheet();
|
|
257
|
+
d.replaceSync(u);
|
|
258
|
+
var f = class e extends a {
|
|
259
|
+
static {
|
|
260
|
+
this.styles = d;
|
|
261
|
+
}
|
|
262
|
+
static {
|
|
263
|
+
this.nativeName = "input";
|
|
264
|
+
}
|
|
265
|
+
static {
|
|
266
|
+
this.accessorExclusions = [
|
|
267
|
+
"value",
|
|
268
|
+
"readOnly",
|
|
269
|
+
"disabled"
|
|
270
|
+
];
|
|
271
|
+
}
|
|
272
|
+
template() {
|
|
273
|
+
return "<div class=\"code-input\"></div>";
|
|
274
|
+
}
|
|
275
|
+
constructor() {
|
|
276
|
+
super(), this.onContainerInput = (e) => {
|
|
277
|
+
let t = this.cellIndexOf(e.target);
|
|
278
|
+
t !== -1 && this.onCellInput(e.target, t);
|
|
279
|
+
}, this.onContainerKeydown = (e) => {
|
|
280
|
+
let t = this.cellIndexOf(e.target);
|
|
281
|
+
t !== -1 && this.onCellKeydown(e, e.target, t);
|
|
282
|
+
}, this.onContainerPaste = (e) => {
|
|
283
|
+
let t = this.cellIndexOf(e.target);
|
|
284
|
+
t !== -1 && this.onCellPaste(e, t);
|
|
285
|
+
}, this.onCellInput = (e, t) => {
|
|
286
|
+
if (e.value.length > 1) {
|
|
287
|
+
this.distributeFrom(t, e.value);
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
this.syncFormValue();
|
|
291
|
+
let n = this.$cells[t + 1];
|
|
292
|
+
e.value.length > 0 && n && (n.focus(), n.select());
|
|
293
|
+
}, this.onCellKeydown = (e, t, n) => {
|
|
294
|
+
if (e.key === "Backspace") {
|
|
295
|
+
let r = this.$cells[n - 1];
|
|
296
|
+
t.value === "" && r && (e.preventDefault(), r.value = "", r.focus(), this.syncFormValue());
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
if (e.key === "ArrowLeft" && t.selectionStart === 0 && t.selectionEnd === 0) {
|
|
300
|
+
let t = this.$cells[n - 1];
|
|
301
|
+
t && (e.preventDefault(), t.focus(), t.setSelectionRange(t.value.length, t.value.length));
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
if (e.key === "ArrowRight" && t.selectionStart === t.value.length && t.selectionEnd === t.value.length) {
|
|
305
|
+
let t = this.$cells[n + 1];
|
|
306
|
+
t && (e.preventDefault(), t.focus(), t.setSelectionRange(0, 0));
|
|
307
|
+
}
|
|
308
|
+
}, this.onCellPaste = (e, t) => {
|
|
309
|
+
let n = e.clipboardData?.getData("text") ?? "";
|
|
310
|
+
n && (e.preventDefault(), this.distributeFrom(t, n));
|
|
311
|
+
}, this.shadowRoot.adoptedStyleSheets = [...this.shadowRoot.adoptedStyleSheets ?? [], d], this.setupInputs();
|
|
312
|
+
}
|
|
313
|
+
connectedCallback() {
|
|
314
|
+
super.connectedCallback();
|
|
315
|
+
let e = this.$container;
|
|
316
|
+
e.addEventListener("input", this.onContainerInput), e.addEventListener("keydown", this.onContainerKeydown), e.addEventListener("paste", this.onContainerPaste), this.syncGroupAria();
|
|
317
|
+
}
|
|
318
|
+
disconnectedCallback() {
|
|
319
|
+
super.disconnectedCallback();
|
|
320
|
+
let e = this.$container;
|
|
321
|
+
e?.removeEventListener("input", this.onContainerInput), e?.removeEventListener("keydown", this.onContainerKeydown), e?.removeEventListener("paste", this.onContainerPaste), this.$inputs.forEach((e) => e.removeEventListener("change", this.onNativeChange));
|
|
322
|
+
}
|
|
323
|
+
static get observedAttributes() {
|
|
324
|
+
return [...super.observedAttributes, "inputmode"];
|
|
325
|
+
}
|
|
326
|
+
static {
|
|
327
|
+
this.forwardedAttributes = [
|
|
328
|
+
"type",
|
|
329
|
+
"inputmode",
|
|
330
|
+
"pattern",
|
|
331
|
+
"autocomplete"
|
|
332
|
+
];
|
|
333
|
+
}
|
|
334
|
+
attributeChangedCallback(t, n, r) {
|
|
335
|
+
if (n !== r) {
|
|
336
|
+
if (e.forwardedAttributes.includes(t)) {
|
|
337
|
+
this.syncCellAttributes();
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
switch (t) {
|
|
341
|
+
case "size":
|
|
342
|
+
case "readonly":
|
|
343
|
+
case "disabled":
|
|
344
|
+
this.setupInputs();
|
|
345
|
+
break;
|
|
346
|
+
case "value":
|
|
347
|
+
this.setValue(r ?? "");
|
|
348
|
+
break;
|
|
349
|
+
default: super.attributeChangedCallback(t, n, r);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
stateChangeCallback(e, t) {
|
|
354
|
+
this.$inputs.forEach((n) => {
|
|
355
|
+
n.classList.remove(e), n.classList.toggle(t), t === i.ERROR ? n.setAttribute("aria-invalid", "true") : n.removeAttribute("aria-invalid");
|
|
356
|
+
}), t === i.ERROR ? (this.$statusTextSlot.classList.toggle("error"), this.internals && (this.internals.ariaInvalid = "true"), this.$statusTextSlot.classList.remove("success")) : t === i.SUCCESS ? (this.$statusTextSlot.classList.remove("error"), this.$statusTextSlot.classList.toggle("success")) : (this.internals && (this.internals.ariaInvalid = null), this.$statusTextSlot.classList.remove("error", "success"), this.$labelSlot.classList.remove("error", "success")), this.setupAriaDescribedBy(this.$slotHelper, this.$helperSlot, "helper"), this.setupAriaDescribedBy(this.$slotStatusText, this.$statusTextSlot, "status-text"), this.syncGroupAria();
|
|
357
|
+
}
|
|
358
|
+
formData() {
|
|
359
|
+
let e = new FormData(), t = this.getAttribute("name");
|
|
360
|
+
return t && e.append(t, this.getValue()), e;
|
|
361
|
+
}
|
|
362
|
+
formResetCallback() {
|
|
363
|
+
this.setValue("");
|
|
364
|
+
}
|
|
365
|
+
formStateRestoreCallback(e) {
|
|
366
|
+
this.setValue(e ?? "");
|
|
367
|
+
}
|
|
368
|
+
setupInputs() {
|
|
369
|
+
let e = this.$container;
|
|
370
|
+
if (!e) return;
|
|
371
|
+
let t = this.getValue(), n = parseInt(this.getAttribute("size") || "6", 10);
|
|
372
|
+
if (e.innerHTML = "", e.style.setProperty("--code-cell-count", `${n}`), this.isCollapsed) e.appendChild(this.createSingleInput(n));
|
|
373
|
+
else for (let t = 0; t < n; t++) e.appendChild(this.createCell(t, n));
|
|
374
|
+
this.setValue(t || this.getAttribute("value") || ""), this.syncCellAttributes(), this.$inputs.forEach((e) => e.addEventListener("change", this.onNativeChange)), this.restoreLabelAssociation();
|
|
375
|
+
}
|
|
376
|
+
syncCellAttributes() {
|
|
377
|
+
e.forwardedAttributes.forEach((e) => {
|
|
378
|
+
let t = this.getAttribute(e);
|
|
379
|
+
this.$inputs.forEach((n) => {
|
|
380
|
+
t === null ? n.removeAttribute(e) : n.setAttribute(e, t);
|
|
381
|
+
});
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
get isCollapsed() {
|
|
385
|
+
return this.hasAttribute("readonly") || this.hasAttribute("disabled");
|
|
386
|
+
}
|
|
387
|
+
createSingleInput(e) {
|
|
388
|
+
let t = document.createElement("input");
|
|
389
|
+
return t.className = "code-input-single", t.size = e, t.maxLength = e, t.readOnly = this.hasAttribute("readonly"), t.disabled = this.hasAttribute("disabled"), t;
|
|
390
|
+
}
|
|
391
|
+
restoreLabelAssociation() {
|
|
392
|
+
!this.isConnected || !this.$el || (this.setupForId(), this.setupAriaDescribedBy(this.$slotHelper, this.$helperSlot, "helper"), this.setupAriaDescribedBy(this.$slotStatusText, this.$statusTextSlot, "status-text"), this.syncGroupAria());
|
|
393
|
+
}
|
|
394
|
+
syncGroupAria() {
|
|
395
|
+
let e = this.$container;
|
|
396
|
+
if (!e) return;
|
|
397
|
+
if (this.$single) {
|
|
398
|
+
e.removeAttribute("role"), e.removeAttribute("aria-labelledby");
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
e.setAttribute("role", "group");
|
|
402
|
+
let t = this.$label;
|
|
403
|
+
t && this.$el && (t.id ||= `${this.$el.id}-label`, e.setAttribute("aria-labelledby", t.id));
|
|
404
|
+
let n = this.$el?.getAttribute("aria-describedby");
|
|
405
|
+
this.$cells.forEach((e, t) => {
|
|
406
|
+
e !== this.$el && (e.id = `${this.$el.id}-cell-${t + 1}`, n ? e.setAttribute("aria-describedby", n) : e.removeAttribute("aria-describedby"));
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
createCell(e, t) {
|
|
410
|
+
let n = document.createElement("input");
|
|
411
|
+
return n.maxLength = 1, n.className = "code-input-cell", n.setAttribute("aria-label", `Digit ${e + 1} of ${t}`), n.readOnly = this.hasAttribute("readonly"), n.disabled = this.hasAttribute("disabled"), n;
|
|
412
|
+
}
|
|
413
|
+
cellIndexOf(e) {
|
|
414
|
+
return this.$cells.indexOf(e);
|
|
415
|
+
}
|
|
416
|
+
distributeFrom(e, t) {
|
|
417
|
+
let n = t.split(""), r = this.$cells, i = e - 1;
|
|
418
|
+
for (let t = e; t < r.length && n.length > 0; t++) r[t].value = n.shift() ?? "", i = t;
|
|
419
|
+
this.syncFormValue(), r[Math.min(i + 1, r.length - 1)]?.focus();
|
|
420
|
+
}
|
|
421
|
+
getValue() {
|
|
422
|
+
let e = this.$single;
|
|
423
|
+
return e ? e.value : this.$cells.map((e) => e.value).join("");
|
|
424
|
+
}
|
|
425
|
+
setValue(e) {
|
|
426
|
+
let t = this.$single;
|
|
427
|
+
t ? t.value = e : this.$cells.forEach((t, n) => {
|
|
428
|
+
t.value = e[n] ?? "";
|
|
429
|
+
}), this.syncFormValue();
|
|
430
|
+
}
|
|
431
|
+
syncFormValue() {
|
|
432
|
+
this.internals?.setFormValue(this.formData()), this.dispatchEvent(new Event("input", {
|
|
433
|
+
bubbles: !0,
|
|
434
|
+
composed: !0
|
|
435
|
+
}));
|
|
436
|
+
}
|
|
437
|
+
get $cells() {
|
|
438
|
+
return Array.from(this.shadowRoot.querySelectorAll(".code-input-cell"));
|
|
439
|
+
}
|
|
440
|
+
get $single() {
|
|
441
|
+
return this.shadowRoot.querySelector(".code-input-single");
|
|
442
|
+
}
|
|
443
|
+
get $inputs() {
|
|
444
|
+
let e = this.$single;
|
|
445
|
+
return e ? [e] : this.$cells;
|
|
446
|
+
}
|
|
447
|
+
get $el() {
|
|
448
|
+
return this.$inputs[0];
|
|
449
|
+
}
|
|
450
|
+
get $container() {
|
|
451
|
+
return this.shadowRoot.querySelector(".code-input");
|
|
452
|
+
}
|
|
453
|
+
get value() {
|
|
454
|
+
return this.getValue();
|
|
455
|
+
}
|
|
456
|
+
set value(e) {
|
|
457
|
+
this.setValue(e ?? "");
|
|
458
|
+
}
|
|
459
|
+
get readOnly() {
|
|
460
|
+
return this.hasAttribute("readonly");
|
|
461
|
+
}
|
|
462
|
+
set readOnly(e) {
|
|
463
|
+
this._updateBooleanAttribute("readonly", e);
|
|
464
|
+
}
|
|
465
|
+
get disabled() {
|
|
466
|
+
return this.hasAttribute("disabled");
|
|
467
|
+
}
|
|
468
|
+
set disabled(e) {
|
|
469
|
+
this._updateBooleanAttribute("disabled", e);
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
customElements.get("px-code-input") || customElements.define("px-code-input", f);
|
|
254
473
|
//#endregion
|
|
255
|
-
export {
|
|
474
|
+
export { f as CodeInput, o as Input, c as Select, s as TextArea, l as Upload };
|
package/package.json
CHANGED
package/dist/codeInput.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { AbstractInputElement } from './AbstractInput.ts';
|
|
2
|
-
export declare class CodeInput extends AbstractInputElement<HTMLInputElement> {
|
|
3
|
-
static styles: CSSStyleSheet;
|
|
4
|
-
static nativeName: string;
|
|
5
|
-
template(): string;
|
|
6
|
-
constructor();
|
|
7
|
-
connectedCallback(): void;
|
|
8
|
-
disconnectedCallback(): void;
|
|
9
|
-
static get observedAttributes(): string[];
|
|
10
|
-
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
11
|
-
setupSize(): void;
|
|
12
|
-
private focusBoxAt;
|
|
13
|
-
private renderBoxes;
|
|
14
|
-
get $input(): HTMLInputElement | null;
|
|
15
|
-
get $container(): Element | null;
|
|
16
|
-
get $boxesContainer(): HTMLElement | null;
|
|
17
|
-
}
|