@aquera/nile-elements 0.1.73-beta-1.9 → 0.1.74-beta-1.0
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/README.md +5 -0
- package/demo/index.html +24 -21
- package/dist/index.js +21 -10
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +10 -0
- package/dist/nile-filter-chip/nile-filter-chip.esm.js +1 -1
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +2 -2
- package/dist/nile-option-group/nile-option-group.cjs.js +1 -1
- package/dist/nile-option-group/nile-option-group.cjs.js.map +1 -1
- package/dist/nile-option-group/nile-option-group.esm.js +1 -1
- package/dist/nile-radio/nile-radio.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.cjs.js.map +1 -1
- package/dist/nile-radio/nile-radio.esm.js +2 -2
- package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
- package/dist/nile-radio-group/nile-radio-group.esm.js +2 -2
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +3 -2
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js +10 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.js +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.js.map +1 -1
- package/dist/src/nile-input/nile-input.d.ts +1 -0
- package/dist/src/nile-input/nile-input.js +4 -1
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-option-group/nile-option-group.js +1 -1
- package/dist/src/nile-option-group/nile-option-group.js.map +1 -1
- package/dist/src/nile-radio/nile-radio.d.ts +1 -0
- package/dist/src/nile-radio/nile-radio.js +8 -1
- package/dist/src/nile-radio/nile-radio.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.d.ts +4 -1
- package/dist/src/nile-radio-group/nile-radio-group.js +25 -2
- package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
- package/dist/src/nile-select/nile-select.d.ts +4 -1
- package/dist/src/nile-select/nile-select.js +13 -1
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-filter-chip/nile-filter-chip.css.ts +10 -0
- package/src/nile-filter-chip/nile-filter-chip.ts +1 -1
- package/src/nile-input/nile-input.ts +5 -1
- package/src/nile-option-group/nile-option-group.ts +1 -1
- package/src/nile-radio/nile-radio.ts +7 -1
- package/src/nile-radio-group/nile-radio-group.ts +26 -4
- package/src/nile-select/nile-select.ts +13 -3
- package/vscode-html-custom-data.json +18 -3
package/README.md
CHANGED
@@ -79,6 +79,11 @@ To run a local development server that serves the basic demo located in `demo/in
|
|
79
79
|
|
80
80
|
In this section, you can find the updates for each release of `nile-elements`. It's a good practice to maintain detailed release notes to help users and developers understand what changes have been made from one version to another and how these changes might affect their projects.
|
81
81
|
|
82
|
+
#### Version 0.1.73
|
83
|
+
- Technical Changes: Nile Select search, scroll events exposed [UIF-972]
|
84
|
+
- Technical Changes: New property allowUncheck added to Nile Radio [UIF-972]
|
85
|
+
- Technical Changes: Nile Select autoFocusSearch property added [UIF-972]
|
86
|
+
|
82
87
|
#### Version 0.1.72
|
83
88
|
- Technical Changes: Exposed virtual select parts, loader parts, tabel cell item variable & fixed Option checkbox issue [UIF-970]
|
84
89
|
|
package/demo/index.html
CHANGED
@@ -3,37 +3,40 @@
|
|
3
3
|
|
4
4
|
<head>
|
5
5
|
<meta charset="utf-8" />
|
6
|
-
<link rel="stylesheet" href="
|
6
|
+
<link rel="stylesheet" href="variables.css" id="stylesheet" />
|
7
7
|
<link rel="stylesheet" href="index.css" />
|
8
8
|
<script type="module" src="index.js"></script>
|
9
9
|
</head>
|
10
10
|
<style>
|
11
|
-
|
12
|
-
|
13
|
-
flex-wrap: wrap;
|
14
|
-
gap: 30px;
|
15
|
-
padding: 0;
|
16
|
-
margin: 0;
|
17
|
-
border: 1px solid silver;
|
18
|
-
height: 900px;
|
11
|
+
body {
|
12
|
+
padding: 100px;
|
19
13
|
}
|
20
14
|
|
21
|
-
nile-
|
22
|
-
|
23
|
-
|
15
|
+
/* nile-badge::part(content) {
|
16
|
+
font-size: 10px;
|
17
|
+
} */
|
18
|
+
|
19
|
+
nile-filter-chip::part(content) {
|
20
|
+
font-size: 8px;
|
21
|
+
}
|
22
|
+
|
23
|
+
nile-filter-chip::part(badge) {
|
24
|
+
display: inline-flex;
|
25
|
+
align-items: center;
|
26
|
+
height: 20px;
|
24
27
|
}
|
28
|
+
|
29
|
+
/* nile-badge {
|
30
|
+
display: inline-flex;
|
31
|
+
align-items: center;
|
32
|
+
height: 20px;
|
33
|
+
} */
|
25
34
|
</style>
|
26
35
|
|
27
36
|
<body>
|
28
|
-
|
29
|
-
|
30
|
-
</
|
31
|
-
<div style="padding: 30px;">
|
32
|
-
<nile-circular-progressbar content="text"></nile-circular-progressbar>
|
33
|
-
<nile-circular-progressbar value="80" size="60"></nile-circular-progressbar>
|
34
|
-
<nile-circular-progressbar></nile-circular-progressbar>
|
35
|
-
<nile-circular-progressbar value="30" content=" "></nile-circular-progressbar>
|
36
|
-
</div>
|
37
|
+
<!-- <nile-badge rounded variant="info">Info</nile-badge> -->
|
38
|
+
<nile-filter-chip label="Filter Name" value="This is a filter chip" viewMoreCount="5" closable active>
|
39
|
+
</nile-filter-chip>
|
37
40
|
</body>
|
38
41
|
|
39
42
|
</html>
|
package/dist/index.js
CHANGED
@@ -1398,7 +1398,7 @@ const Ze=e=>e??_;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
1398
1398
|
* @license
|
1399
1399
|
* Copyright 2020 Google LLC
|
1400
1400
|
* SPDX-License-Identifier: BSD-3-Clause
|
1401
|
-
*/,{I:Je}=oe,Xe=e=>void 0===e.strings,He=()=>document.createComment(""),qe=(e,t,M)=>{const i=e._$AA.parentNode,N=void 0===t?e._$AB:t._$AA;if(void 0===M){const t=i.insertBefore(He(),N),o=i.insertBefore(He(),N);M=new Je(t,o,e,e.options)}else{const t=M._$AB.nextSibling,o=M._$AM,s=o!==e;if(s){let t;M._$AQ?.(e),M._$AM=e,void 0!==M._$AP&&(t=e._$AU)!==o._$AU&&M._$AP(t)}if(t!==N||s){let e=M._$AA;for(;e!==t;){const t=e.nextSibling;i.insertBefore(e,N),e=t}}}return M},Ke=(e,t,M=e)=>(e._$AI(t,M),e),et={},tt=(e,t=et)=>e._$AH=t,Mt=e=>{e._$AP?.(!1,!0);let t=e._$AA;const M=e._$AB.nextSibling;for(;t!==M;){const e=t.nextSibling;t.remove(),t=e}},it=he(class extends Ae{constructor(e){if(super(e),e.type!==Oe&&e.type!==Te&&e.type!==ye)throw Error("The `live` directive is not allowed on child or event bindings");if(!Xe(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===G||t===_)return t;const M=e.element,i=e.name;if(e.type===Oe){if(t===M[i])return G}else if(e.type===ye){if(!!t===M.hasAttribute(i))return G}else if(e.type===Te&&M.getAttribute(i)===t+"")return G;return tt(e),t}});let Nt=class extends Pe{constructor(){super(...arguments),this.formControlController=new be(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new ve(this,"help-text","label"),this.hasFocus=!1,this.title="",this.type="text",this.name="",this.value="",this.checkNonPrintableChar=!1,this.defaultValue="",this.size="medium",this.filled=!1,this.warning=!1,this.error=!1,this.success=!1,this.destructive=!1,this.pill=!1,this.label="",this.helpText="",this.errorMessage="",this.clearable=!1,this.disabled=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.required=!1,this.autocomplete="off",this.spellcheck=!0,this.canSavePassword=!1,this.hasPrintableCharacters=!1}connectedCallback(){super.connectedCallback(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}get valueAsDate(){const e=document.createElement("input");return e.type="date",e.value=this.value,e.valueAsDate}set valueAsDate(e){const t=document.createElement("input");t.type="date",t.valueAsDate=e,this.value=t.value}get valueAsNumber(){const e=document.createElement("input");return e.type="number",e.value=this.value,e.valueAsNumber}set valueAsNumber(e){const t=document.createElement("input");t.type="number",t.valueAsNumber=e,this.value=t.value}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.emit("nile-after-init"),this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value})}handleChange(){this.value=this.input.value,this.emit("nile-change",{value:this.value})}handleClearClick(e){this.value="",this.emit("nile-clear",{value:this.value}),this.emit("nile-input",{value:this.value}),this.emit("nile-change",{value:this.value}),this.input.focus(),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("nile-focus",{value:this.value}),this.checkNonPrintableChar&&this.markNonPrintableCharacters()}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("nile-input",{value:this.value})}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||setTimeout((()=>{e.defaultPrevented||e.isComposing||this.formControlController.submit()}))}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step)}async handleValueChange(){await this.updateComplete,this.checkNonPrintableChar&&this.markNonPrintableCharacters()}markNonPrintableCharacters(){let e="";if(this.hasPrintableCharacters=!1,this.value)for(let t=0,M=this.value.length;t<M;t++){this.value.charCodeAt(t)>127?(e+=`<span class="input__srtiked-text">${this.value.charAt(t)}</span>`,this.hasPrintableCharacters=!0):e+=this.value.charAt(t)}this.markedValue=e,this.emit("nile-value-marked",{value:this.markedValue,hasNonPrintableCharacters:this.hasPrintableCharacters})}removeAllNonPrintableCharacters(){let e="";if(this.value)for(let t=0,M=this.value.length;t<M;t++){this.value.charCodeAt(t)<128&&(e+=this.value.charAt(t))}this.value=e,this.emit("nile-npchar-removed",{value:this.value})}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,t,M="none"){this.input.setSelectionRange(e,t,M)}setRangeText(e,t,M,i){this.input.setRangeText(e,t,M,i),this.value!==this.input.value&&(this.value=this.input.value)}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const t=!!this.label||!!e,M=this.hasSlotController.test("label-suffix"),i=!!this.helpText,N=!!this.errorMessage,o=this.clearable&&!this.disabled&&!this.readonly&&("number"==typeof this.value||this.value.length>0);return R`
|
1401
|
+
*/,{I:Je}=oe,Xe=e=>void 0===e.strings,He=()=>document.createComment(""),qe=(e,t,M)=>{const i=e._$AA.parentNode,N=void 0===t?e._$AB:t._$AA;if(void 0===M){const t=i.insertBefore(He(),N),o=i.insertBefore(He(),N);M=new Je(t,o,e,e.options)}else{const t=M._$AB.nextSibling,o=M._$AM,s=o!==e;if(s){let t;M._$AQ?.(e),M._$AM=e,void 0!==M._$AP&&(t=e._$AU)!==o._$AU&&M._$AP(t)}if(t!==N||s){let e=M._$AA;for(;e!==t;){const t=e.nextSibling;i.insertBefore(e,N),e=t}}}return M},Ke=(e,t,M=e)=>(e._$AI(t,M),e),et={},tt=(e,t=et)=>e._$AH=t,Mt=e=>{e._$AP?.(!1,!0);let t=e._$AA;const M=e._$AB.nextSibling;for(;t!==M;){const e=t.nextSibling;t.remove(),t=e}},it=he(class extends Ae{constructor(e){if(super(e),e.type!==Oe&&e.type!==Te&&e.type!==ye)throw Error("The `live` directive is not allowed on child or event bindings");if(!Xe(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===G||t===_)return t;const M=e.element,i=e.name;if(e.type===Oe){if(t===M[i])return G}else if(e.type===ye){if(!!t===M.hasAttribute(i))return G}else if(e.type===Te&&M.getAttribute(i)===t+"")return G;return tt(e),t}});let Nt=class extends Pe{constructor(){super(...arguments),this.formControlController=new be(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new ve(this,"help-text","label"),this.hasFocus=!1,this.title="",this.type="text",this.name="",this.value="",this.checkNonPrintableChar=!1,this.defaultValue="",this.size="medium",this.filled=!1,this.warning=!1,this.error=!1,this.success=!1,this.destructive=!1,this.pill=!1,this.label="",this.helpText="",this.errorMessage="",this.clearable=!1,this.disabled=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.required=!1,this.autocomplete="off",this.spellcheck=!0,this.canSavePassword=!1,this.hasPrintableCharacters=!1}connectedCallback(){super.connectedCallback(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}get valueAsDate(){const e=document.createElement("input");return e.type="date",e.value=this.value,e.valueAsDate}set valueAsDate(e){const t=document.createElement("input");t.type="date",t.valueAsDate=e,this.value=t.value}get valueAsNumber(){const e=document.createElement("input");return e.type="number",e.value=this.value,e.valueAsNumber}set valueAsNumber(e){const t=document.createElement("input");t.type="number",t.valueAsNumber=e,this.value=t.value}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.emit("nile-after-init"),this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value})}handleChange(){this.value=this.input.value,this.emit("nile-change",{value:this.value})}handleClearClick(e){this.value="",this.emit("nile-clear",{value:this.value}),this.emit("nile-input",{value:this.value}),this.emit("nile-change",{value:this.value}),this.input.focus(),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("nile-focus",{value:this.value}),this.checkNonPrintableChar&&this.markNonPrintableCharacters()}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("nile-input",{value:this.value})}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||setTimeout((()=>{e.defaultPrevented||e.isComposing||this.formControlController.submit()}))}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step)}async handleValueChange(){await this.updateComplete,this.checkNonPrintableChar&&this.markNonPrintableCharacters()}markNonPrintableCharacters(){let e="";if(this.hasPrintableCharacters=!1,this.value)for(let t=0,M=this.value.length;t<M;t++){this.value.charCodeAt(t)>127?(e+=`<span class="input__srtiked-text">${this.value.charAt(t)}</span>`,this.hasPrintableCharacters=!0):e+=this.value.charAt(t)}this.markedValue=e,this.emit("nile-value-marked",{value:this.markedValue,hasNonPrintableCharacters:this.hasPrintableCharacters})}removeAllNonPrintableCharacters(){let e="";if(this.value)for(let t=0,M=this.value.length;t<M;t++){this.value.charCodeAt(t)<128&&(e+=this.value.charAt(t))}this.value=e,this.emit("nile-npchar-removed",{value:this.value})}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,t,M="none"){this.input.setSelectionRange(e,t,M)}setRangeText(e,t,M,i){this.input.setRangeText(e,t,M,i),this.value!==this.input.value&&(this.value=this.input.value)}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}inputFocus(){this.input.focus()}render(){const e=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const t=!!this.label||!!e,M=this.hasSlotController.test("label-suffix"),i=!!this.helpText,N=!!this.errorMessage,o=this.clearable&&!this.disabled&&!this.readonly&&("number"==typeof this.value||this.value.length>0);return R`
|
1402
1402
|
<div
|
1403
1403
|
part="form-control"
|
1404
1404
|
class=${Le({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":t,"form-control--has-help-text":i})}
|
@@ -1528,7 +1528,7 @@ const Ze=e=>e??_;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
1528
1528
|
`:""}
|
1529
1529
|
</div>
|
1530
1530
|
</div>
|
1531
|
-
`}};Nt.styles=Fe,e([ze(".input__control")],Nt.prototype,"input",void 0),e([je()],Nt.prototype,"hasFocus",void 0),e([ge()],Nt.prototype,"title",void 0),e([ge({reflect:!0})],Nt.prototype,"type",void 0),e([ge()],Nt.prototype,"name",void 0),e([ge()],Nt.prototype,"value",void 0),e([ge({type:Boolean})],Nt.prototype,"checkNonPrintableChar",void 0),e([$e()],Nt.prototype,"defaultValue",void 0),e([ge({reflect:!0})],Nt.prototype,"size",void 0),e([ge({type:Boolean,reflect:!0})],Nt.prototype,"filled",void 0),e([ge({type:Boolean})],Nt.prototype,"warning",void 0),e([ge({type:Boolean})],Nt.prototype,"error",void 0),e([ge({type:Boolean})],Nt.prototype,"success",void 0),e([ge({type:Boolean})],Nt.prototype,"destructive",void 0),e([ge({type:Boolean,reflect:!0})],Nt.prototype,"pill",void 0),e([ge()],Nt.prototype,"label",void 0),e([ge({attribute:"help-text",reflect:!0})],Nt.prototype,"helpText",void 0),e([ge({attribute:"error-message",reflect:!0})],Nt.prototype,"errorMessage",void 0),e([ge({type:Boolean})],Nt.prototype,"clearable",void 0),e([ge({type:Boolean,reflect:!0})],Nt.prototype,"disabled",void 0),e([ge()],Nt.prototype,"placeholder",void 0),e([ge({type:Boolean,reflect:!0})],Nt.prototype,"readonly",void 0),e([ge({attribute:"password-toggle",type:Boolean})],Nt.prototype,"passwordToggle",void 0),e([ge({attribute:"password-visible",type:Boolean})],Nt.prototype,"passwordVisible",void 0),e([ge({attribute:"no-spin-buttons",type:Boolean})],Nt.prototype,"noSpinButtons",void 0),e([ge({reflect:!0})],Nt.prototype,"form",void 0),e([ge({type:Boolean,reflect:!0})],Nt.prototype,"required",void 0),e([ge()],Nt.prototype,"pattern",void 0),e([ge({type:Number})],Nt.prototype,"minlength",void 0),e([ge({type:Number})],Nt.prototype,"maxlength",void 0),e([ge()],Nt.prototype,"min",void 0),e([ge()],Nt.prototype,"max",void 0),e([ge()],Nt.prototype,"step",void 0),e([ge()],Nt.prototype,"autocapitalize",void 0),e([ge()],Nt.prototype,"autocorrect",void 0),e([ge()],Nt.prototype,"autocomplete",void 0),e([ge({type:Boolean})],Nt.prototype,"autofocus",void 0),e([ge()],Nt.prototype,"enterkeyhint",void 0),e([ge({type:Boolean,converter:{fromAttribute:e=>!(!e||"false"===e),toAttribute:e=>e?"true":"false"}})],Nt.prototype,"spellcheck",void 0),e([ge({type:Boolean,reflect:!0})],Nt.prototype,"canSavePassword",void 0),e([ge()],Nt.prototype,"inputmode",void 0),e([je()],Nt.prototype,"hasPrintableCharacters",void 0),e([je()],Nt.prototype,"markedValue",void 0),e([Ve("disabled",{waitUntilFirstUpdate:!0})],Nt.prototype,"handleDisabledChange",null),e([Ve("step",{waitUntilFirstUpdate:!0})],Nt.prototype,"handleStepChange",null),e([Ve("value",{waitUntilFirstUpdate:!0})],Nt.prototype,"handleValueChange",null),Nt=e([le("nile-input")],Nt);let ot=class extends re{constructor(){super(...arguments),this.title="",this.showSidebar=!1}get buttonClassMap(){return{"nds-menu--active":this.showSidebar}}render(){return R`
|
1531
|
+
`}};Nt.styles=Fe,e([ze(".input__control")],Nt.prototype,"input",void 0),e([je()],Nt.prototype,"hasFocus",void 0),e([ge()],Nt.prototype,"title",void 0),e([ge({reflect:!0})],Nt.prototype,"type",void 0),e([ge()],Nt.prototype,"name",void 0),e([ge()],Nt.prototype,"value",void 0),e([ge({type:Boolean})],Nt.prototype,"checkNonPrintableChar",void 0),e([$e()],Nt.prototype,"defaultValue",void 0),e([ge({reflect:!0})],Nt.prototype,"size",void 0),e([ge({type:Boolean,reflect:!0})],Nt.prototype,"filled",void 0),e([ge({type:Boolean})],Nt.prototype,"warning",void 0),e([ge({type:Boolean})],Nt.prototype,"error",void 0),e([ge({type:Boolean})],Nt.prototype,"success",void 0),e([ge({type:Boolean})],Nt.prototype,"destructive",void 0),e([ge({type:Boolean,reflect:!0})],Nt.prototype,"pill",void 0),e([ge()],Nt.prototype,"label",void 0),e([ge({attribute:"help-text",reflect:!0})],Nt.prototype,"helpText",void 0),e([ge({attribute:"error-message",reflect:!0})],Nt.prototype,"errorMessage",void 0),e([ge({type:Boolean})],Nt.prototype,"clearable",void 0),e([ge({type:Boolean,reflect:!0})],Nt.prototype,"disabled",void 0),e([ge()],Nt.prototype,"placeholder",void 0),e([ge({type:Boolean,reflect:!0})],Nt.prototype,"readonly",void 0),e([ge({attribute:"password-toggle",type:Boolean})],Nt.prototype,"passwordToggle",void 0),e([ge({attribute:"password-visible",type:Boolean})],Nt.prototype,"passwordVisible",void 0),e([ge({attribute:"no-spin-buttons",type:Boolean})],Nt.prototype,"noSpinButtons",void 0),e([ge({reflect:!0})],Nt.prototype,"form",void 0),e([ge({type:Boolean,reflect:!0})],Nt.prototype,"required",void 0),e([ge()],Nt.prototype,"pattern",void 0),e([ge({type:Number})],Nt.prototype,"minlength",void 0),e([ge({type:Number})],Nt.prototype,"maxlength",void 0),e([ge()],Nt.prototype,"min",void 0),e([ge()],Nt.prototype,"max",void 0),e([ge()],Nt.prototype,"step",void 0),e([ge()],Nt.prototype,"autocapitalize",void 0),e([ge()],Nt.prototype,"autocorrect",void 0),e([ge()],Nt.prototype,"autocomplete",void 0),e([ge({type:Boolean,attribute:!0,reflect:!0})],Nt.prototype,"autofocus",void 0),e([ge()],Nt.prototype,"enterkeyhint",void 0),e([ge({type:Boolean,converter:{fromAttribute:e=>!(!e||"false"===e),toAttribute:e=>e?"true":"false"}})],Nt.prototype,"spellcheck",void 0),e([ge({type:Boolean,reflect:!0})],Nt.prototype,"canSavePassword",void 0),e([ge()],Nt.prototype,"inputmode",void 0),e([je()],Nt.prototype,"hasPrintableCharacters",void 0),e([je()],Nt.prototype,"markedValue",void 0),e([Ve("disabled",{waitUntilFirstUpdate:!0})],Nt.prototype,"handleDisabledChange",null),e([Ve("step",{waitUntilFirstUpdate:!0})],Nt.prototype,"handleStepChange",null),e([Ve("value",{waitUntilFirstUpdate:!0})],Nt.prototype,"handleValueChange",null),Nt=e([le("nile-input")],Nt);let ot=class extends re{constructor(){super(...arguments),this.title="",this.showSidebar=!1}get buttonClassMap(){return{"nds-menu--active":this.showSidebar}}render(){return R`
|
1532
1532
|
<div class="nile-menu--wrapper ${Le(this.buttonClassMap)}" >
|
1533
1533
|
<div class="nile-menu-group">
|
1534
1534
|
<a class="nile-logo" href="/">
|
@@ -2511,7 +2511,7 @@ const Ze=e=>e??_;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
2511
2511
|
border-radius: 4px;
|
2512
2512
|
border: 1px solid var(--Neutral-Normal, var(--nile-colors-neutral-400));
|
2513
2513
|
}
|
2514
|
-
`;let Yt=class extends Pe{constructor(){super(...arguments),this.checked=!1,this.hasFocus=!1,this.value="",this.size="medium",this.disabled=!1,this.islabelborder=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners(),this.emit("nile-init")}disconnectedCallback(){this.removeEventListeners(),this.emit("nile-destroy")}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return R`
|
2514
|
+
`;let Yt=class extends Pe{constructor(){super(...arguments),this.checked=!1,this.hasFocus=!1,this.value="",this.size="medium",this.disabled=!1,this.islabelborder=!1,this.allowUncheck=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners(),this.emit("nile-init")}disconnectedCallback(){this.removeEventListeners(),this.emit("nile-destroy")}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}handleClick(){this.allowUncheck&&!this.disabled?this.checked=!this.checked:this.disabled||(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return R`
|
2515
2515
|
<span
|
2516
2516
|
part="base"
|
2517
2517
|
class=${Le({radio:!0,"radio--checked":this.checked,"radio--disabled":this.disabled,"radio--focused":this.hasFocus,"radio--medium":"medium"===this.size,radio__label_border:this.islabelborder})}
|
@@ -2522,7 +2522,7 @@ const Ze=e=>e??_;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
2522
2522
|
|
2523
2523
|
<slot part="label" class="radio__label"></slot>
|
2524
2524
|
</span>
|
2525
|
-
`}};Yt.styles=bt,e([ge({type:Boolean})],Yt.prototype,"checked",void 0),e([je()],Yt.prototype,"hasFocus",void 0),e([ge()],Yt.prototype,"value",void 0),e([ge({reflect:!0})],Yt.prototype,"size",void 0),e([ge({type:Boolean,reflect:!0})],Yt.prototype,"disabled",void 0),e([ge({type:Boolean,reflect:!0})],Yt.prototype,"islabelborder",void 0),e([Ve("checked")],Yt.prototype,"handleCheckedChange",null),e([Ve("disabled",{waitUntilFirstUpdate:!0})],Yt.prototype,"handleDisabledChange",null),Yt=e([le("nile-radio")],Yt);var vt=s`
|
2525
|
+
`}};Yt.styles=bt,e([ge({type:Boolean})],Yt.prototype,"checked",void 0),e([je()],Yt.prototype,"hasFocus",void 0),e([ge()],Yt.prototype,"value",void 0),e([ge({reflect:!0})],Yt.prototype,"size",void 0),e([ge({type:Boolean,reflect:!0})],Yt.prototype,"disabled",void 0),e([ge({type:Boolean,reflect:!0})],Yt.prototype,"islabelborder",void 0),e([ge({type:Boolean,reflect:!0})],Yt.prototype,"allowUncheck",void 0),e([Ve("checked")],Yt.prototype,"handleCheckedChange",null),e([Ve("disabled",{waitUntilFirstUpdate:!0})],Yt.prototype,"handleDisabledChange",null),Yt=e([le("nile-radio")],Yt);var vt=s`
|
2526
2526
|
|
2527
2527
|
:host {
|
2528
2528
|
display: block;
|
@@ -2567,7 +2567,7 @@ const Ze=e=>e??_;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
2567
2567
|
white-space: nowrap;
|
2568
2568
|
border: 0;
|
2569
2569
|
}
|
2570
|
-
`;let Zt=class extends Pe{constructor(){super(...arguments),this.hasSlotController=new ve(this,"help-text","label"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.label="",this.name="option",this.value="",this.form="",this.required=!1,this.labelInline=!1,this.disabled=!1,this.helpText="",this.errorMessage="",this.islabelborder=!1}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.handleInitialDisabledState(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}getAllRadios(){return[...this.querySelectorAll("nile-radio")]}handleRadioClick(e){const t=e.target.closest("nile-radio"),M=this.getAllRadios(),i=this.value;t.disabled||this.disabled||(this.value=t.value,M.forEach((e=>e.checked=e===t)),this.value
|
2570
|
+
`;let Zt=class extends Pe{constructor(){super(...arguments),this.hasSlotController=new ve(this,"help-text","label"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.label="",this.name="option",this.value="",this.form="",this.required=!1,this.labelInline=!1,this.disabled=!1,this.helpText="",this.errorMessage="",this.islabelborder=!1,this.allowUncheckGroup=!1}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.handleInitialDisabledState(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}getAllRadios(){return[...this.querySelectorAll("nile-radio")]}handleRadioClick(e){const t=e.target.closest("nile-radio"),M=this.getAllRadios(),i=this.value;t.disabled||this.disabled||(this.value=t.value,this.allowUncheckGroup||M.forEach((e=>{e.checked=e===t})),this.allowUncheckGroup||this.value===i?this.allowUncheckGroup&&(this.emit("change",{value:this.value,checked:t.checked}),this.emit("input")):(this.emit("change",{value:this.value}),this.emit("input")))}updated(e){super.updated(e),e.has("allowUncheckGroup")&&this.allowUncheckGroup&&this.getAllRadios().forEach((e=>{e.allowUncheck=!0}))}handleDisabledChange(){this.getAllRadios().forEach((e=>{e.disabled=this.disabled}))}handleInitialDisabledState(){this.getAllRadios().forEach((e=>{e.disabled=e.hasAttribute("disabled")?e.disabled:this.disabled}))}handleKeyDown(e){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;const t=this.getAllRadios().filter((e=>!e.disabled)),M=t.find((e=>e.checked))??t[0],i=" "===e.key?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1,N=this.value;let o=t.indexOf(M)+i;o<0&&(o=t.length-1),o>t.length-1&&(o=0),this.getAllRadios().forEach((e=>{e.checked=!1,this.hasButtonGroup||(e.tabIndex=-1)})),this.value=t[o].value,t[o].checked=!0,this.hasButtonGroup?t[o].shadowRoot.querySelector("button").focus():(t[o].tabIndex=0,t[o].focus()),this.value!==N&&(this.emit("change"),this.emit("input")),e.preventDefault()}handleLabelClick(){const e=this.getAllRadios(),t=e.find((e=>e.checked)),M=t||e[0];M&&M.focus()}handleSlotChange(){const e=this.getAllRadios();e.forEach((e=>{e.checked=e.value===this.value,this.islabelborder&&(e.islabelborder=!0)}));if(this.hasButtonGroup=e.some((e=>"nile-radio-button"===e.tagName.toLowerCase())),!e.some((e=>e.checked)))if(this.hasButtonGroup){e[0].shadowRoot.querySelector("button").tabIndex=0}else e[0].tabIndex=0;this.hasButtonGroup&&this.shadowRoot?.querySelector("nile-button-group")}updateCheckedRadio(){this.getAllRadios().forEach((e=>e.checked=e.value===this.value))}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}render(){const e=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const t=this.hasSlotController.test("label-suffix"),M=!!this.label||!!e,i=!!this.helpText,N=!!this.errorMessage,o=R`
|
2571
2571
|
<slot
|
2572
2572
|
@click=${this.handleRadioClick}
|
2573
2573
|
@keydown=${this.handleKeyDown}
|
@@ -2625,7 +2625,7 @@ const Ze=e=>e??_;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
2625
2625
|
`:""}
|
2626
2626
|
|
2627
2627
|
</fieldset>
|
2628
|
-
`}};Zt.styles=vt,e([ze("slot:not([name])")],Zt.prototype,"defaultSlot",void 0),e([je()],Zt.prototype,"hasButtonGroup",void 0),e([je()],Zt.prototype,"defaultValue",void 0),e([ge()],Zt.prototype,"label",void 0),e([ge()],Zt.prototype,"name",void 0),e([ge({reflect:!0})],Zt.prototype,"value",void 0),e([ge({reflect:!0})],Zt.prototype,"form",void 0),e([ge({type:Boolean,reflect:!0})],Zt.prototype,"required",void 0),e([ge({type:Boolean,reflect:!0})],Zt.prototype,"labelInline",void 0),e([ge({type:Boolean,reflect:!0})],Zt.prototype,"disabled",void 0),e([ge({attribute:"help-text",reflect:!0})],Zt.prototype,"helpText",void 0),e([ge({attribute:"error-message",reflect:!0})],Zt.prototype,"errorMessage",void 0),e([ge({type:Boolean,reflect:!0})],Zt.prototype,"islabelborder",void 0),e([Ve("disabled",{waitUntilFirstUpdate:!0})],Zt.prototype,"handleDisabledChange",null),e([Ve("value")],Zt.prototype,"handleValueChange",null),Zt=e([le("nile-radio-group")],Zt);const Vt=Math.min,Wt=Math.max,Pt=Math.round,Rt=Math.floor,Gt=e=>({x:e,y:e}),_t={left:"right",right:"left",bottom:"top",top:"bottom"},Bt={start:"end",end:"start"};function Ft(e,t,M){return Wt(e,Vt(t,M))}function $t(e,t){return"function"==typeof e?e(t):e}function Jt(e){return e.split("-")[0]}function Xt(e){return e.split("-")[1]}function Ht(e){return"x"===e?"y":"x"}function qt(e){return"y"===e?"height":"width"}function Kt(e){return["top","bottom"].includes(Jt(e))?"y":"x"}function eM(e){return Ht(Kt(e))}function tM(e){return e.replace(/start|end/g,(e=>Bt[e]))}function MM(e){return e.replace(/left|right|bottom|top/g,(e=>_t[e]))}function iM(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function NM(e){const{x:t,y:M,width:i,height:N}=e;return{width:i,height:N,top:M,left:t,right:t+i,bottom:M+N,x:t,y:M}}function oM(e,t,M){let{reference:i,floating:N}=e;const o=Kt(t),s=eM(t),n=qt(s),r=Jt(t),a="y"===o,l=i.x+i.width/2-N.width/2,D=i.y+i.height/2-N.height/2,u=i[n]/2-N[n]/2;let g;switch(r){case"top":g={x:l,y:i.y-N.height};break;case"bottom":g={x:l,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:D};break;case"left":g={x:i.x-N.width,y:D};break;default:g={x:i.x,y:i.y}}switch(Xt(t)){case"start":g[s]-=u*(M&&a?-1:1);break;case"end":g[s]+=u*(M&&a?-1:1)}return g}async function sM(e,t){var M;void 0===t&&(t={});const{x:i,y:N,platform:o,rects:s,elements:n,strategy:r}=e,{boundary:a="clippingAncestors",rootBoundary:l="viewport",elementContext:D="floating",altBoundary:u=!1,padding:g=0}=$t(t,e),j=iM(g),c=n[u?"floating"===D?"reference":"floating":D],z=NM(await o.getClippingRect({element:null==(M=await(null==o.isElement?void 0:o.isElement(c)))||M?c:c.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(n.floating)),boundary:a,rootBoundary:l,strategy:r})),I="floating"===D?{x:i,y:N,width:s.floating.width,height:s.floating.height}:s.reference,T=await(null==o.getOffsetParent?void 0:o.getOffsetParent(n.floating)),d=await(null==o.isElement?void 0:o.isElement(T))&&await(null==o.getScale?void 0:o.getScale(T))||{x:1,y:1},O=NM(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:I,offsetParent:T,strategy:r}):I);return{top:(z.top-O.top+j.top)/d.y,bottom:(O.bottom-z.bottom+j.bottom)/d.y,left:(z.left-O.left+j.left)/d.x,right:(O.right-z.right+j.right)/d.x}}function nM(){return"undefined"!=typeof window}function rM(e){return DM(e)?(e.nodeName||"").toLowerCase():"#document"}function aM(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function lM(e){var t;return null==(t=(DM(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function DM(e){return!!nM()&&(e instanceof Node||e instanceof aM(e).Node)}function uM(e){return!!nM()&&(e instanceof Element||e instanceof aM(e).Element)}function gM(e){return!!nM()&&(e instanceof HTMLElement||e instanceof aM(e).HTMLElement)}function jM(e){return!(!nM()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof aM(e).ShadowRoot)}function cM(e){const{overflow:t,overflowX:M,overflowY:i,display:N}=yM(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+M)&&!["inline","contents"].includes(N)}function zM(e){return["table","td","th"].includes(rM(e))}function IM(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function TM(e){const t=dM(),M=uM(e)?yM(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!M[e]&&"none"!==M[e]))||!!M.containerType&&"normal"!==M.containerType||!t&&!!M.backdropFilter&&"none"!==M.backdropFilter||!t&&!!M.filter&&"none"!==M.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(M.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(M.contain||"").includes(e)))}function dM(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function OM(e){return["html","body","#document"].includes(rM(e))}function yM(e){return aM(e).getComputedStyle(e)}function hM(e){return uM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function AM(e){if("html"===rM(e))return e;const t=e.assignedSlot||e.parentNode||jM(e)&&e.host||lM(e);return jM(t)?t.host:t}function LM(e){const t=AM(e);return OM(t)?e.ownerDocument?e.ownerDocument.body:e.body:gM(t)&&cM(t)?t:LM(t)}function xM(e,t,M){var i;void 0===t&&(t=[]),void 0===M&&(M=!0);const N=LM(e),o=N===(null==(i=e.ownerDocument)?void 0:i.body),s=aM(N);if(o){const e=pM(s);return t.concat(s,s.visualViewport||[],cM(N)?N:[],e&&M?xM(e):[])}return t.concat(N,xM(N,[],M))}function pM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function SM(e){const t=yM(e);let M=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const N=gM(e),o=N?e.offsetWidth:M,s=N?e.offsetHeight:i,n=Pt(M)!==o||Pt(i)!==s;return n&&(M=o,i=s),{width:M,height:i,$:n}}function QM(e){return uM(e)?e:e.contextElement}function EM(e){const t=QM(e);if(!gM(t))return Gt(1);const M=t.getBoundingClientRect(),{width:i,height:N,$:o}=SM(t);let s=(o?Pt(M.width):M.width)/i,n=(o?Pt(M.height):M.height)/N;return s&&Number.isFinite(s)||(s=1),n&&Number.isFinite(n)||(n=1),{x:s,y:n}}const wM=Gt(0);function kM(e){const t=aM(e);return dM()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wM}function mM(e,t,M,i){void 0===t&&(t=!1),void 0===M&&(M=!1);const N=e.getBoundingClientRect(),o=QM(e);let s=Gt(1);t&&(i?uM(i)&&(s=EM(i)):s=EM(e));const n=function(e,t,M){return void 0===t&&(t=!1),!(!M||t&&M!==aM(e))&&t}(o,M,i)?kM(o):Gt(0);let r=(N.left+n.x)/s.x,a=(N.top+n.y)/s.y,l=N.width/s.x,D=N.height/s.y;if(o){const e=aM(o),t=i&&uM(i)?aM(i):i;let M=e,N=pM(M);for(;N&&i&&t!==M;){const e=EM(N),t=N.getBoundingClientRect(),i=yM(N),o=t.left+(N.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(N.clientTop+parseFloat(i.paddingTop))*e.y;r*=e.x,a*=e.y,l*=e.x,D*=e.y,r+=o,a+=s,M=aM(N),N=pM(M)}}return NM({width:l,height:D,x:r,y:a})}function UM(e,t){const M=hM(e).scrollLeft;return t?t.left+M:mM(lM(e)).left+M}function CM(e,t,M){void 0===M&&(M=!1);const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-(M?0:UM(e,i)),y:i.top+t.scrollTop}}function fM(e,t,M){let i;if("viewport"===t)i=function(e,t){const M=aM(e),i=lM(e),N=M.visualViewport;let o=i.clientWidth,s=i.clientHeight,n=0,r=0;if(N){o=N.width,s=N.height;const e=dM();(!e||e&&"fixed"===t)&&(n=N.offsetLeft,r=N.offsetTop)}return{width:o,height:s,x:n,y:r}}(e,M);else if("document"===t)i=function(e){const t=lM(e),M=hM(e),i=e.ownerDocument.body,N=Wt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Wt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-M.scrollLeft+UM(e);const n=-M.scrollTop;return"rtl"===yM(i).direction&&(s+=Wt(t.clientWidth,i.clientWidth)-N),{width:N,height:o,x:s,y:n}}(lM(e));else if(uM(t))i=function(e,t){const M=mM(e,!0,"fixed"===t),i=M.top+e.clientTop,N=M.left+e.clientLeft,o=gM(e)?EM(e):Gt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:N*o.x,y:i*o.y}}(t,M);else{const M=kM(e);i={x:t.x-M.x,y:t.y-M.y,width:t.width,height:t.height}}return NM(i)}function bM(e,t){const M=AM(e);return!(M===t||!uM(M)||OM(M))&&("fixed"===yM(M).position||bM(M,t))}function YM(e,t,M){const i=gM(t),N=lM(t),o="fixed"===M,s=mM(e,!0,o,t);let n={scrollLeft:0,scrollTop:0};const r=Gt(0);if(i||!i&&!o)if(("body"!==rM(t)||cM(N))&&(n=hM(t)),i){const e=mM(t,!0,o,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else N&&(r.x=UM(N));const a=!N||i||o?Gt(0):CM(N,n);return{x:s.left+n.scrollLeft-r.x-a.x,y:s.top+n.scrollTop-r.y-a.y,width:s.width,height:s.height}}function vM(e){return"static"===yM(e).position}function ZM(e,t){if(!gM(e)||"fixed"===yM(e).position)return null;if(t)return t(e);let M=e.offsetParent;return lM(e)===M&&(M=M.ownerDocument.body),M}function VM(e,t){const M=aM(e);if(IM(e))return M;if(!gM(e)){let t=AM(e);for(;t&&!OM(t);){if(uM(t)&&!vM(t))return t;t=AM(t)}return M}let i=ZM(e,t);for(;i&&zM(i)&&vM(i);)i=ZM(i,t);return i&&OM(i)&&vM(i)&&!TM(i)?M:i||function(e){let t=AM(e);for(;gM(t)&&!OM(t);){if(TM(t))return t;if(IM(t))return null;t=AM(t)}return null}(e)||M}const WM={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:M,offsetParent:i,strategy:N}=e;const o="fixed"===N,s=lM(i),n=!!t&&IM(t.floating);if(i===s||n&&o)return M;let r={scrollLeft:0,scrollTop:0},a=Gt(1);const l=Gt(0),D=gM(i);if((D||!D&&!o)&&(("body"!==rM(i)||cM(s))&&(r=hM(i)),gM(i))){const e=mM(i);a=EM(i),l.x=e.x+i.clientLeft,l.y=e.y+i.clientTop}const u=!s||D||o?Gt(0):CM(s,r,!0);return{width:M.width*a.x,height:M.height*a.y,x:M.x*a.x-r.scrollLeft*a.x+l.x+u.x,y:M.y*a.y-r.scrollTop*a.y+l.y+u.y}},getDocumentElement:lM,getClippingRect:function(e){let{element:t,boundary:M,rootBoundary:i,strategy:N}=e;const o="clippingAncestors"===M?IM(t)?[]:function(e,t){const M=t.get(e);if(M)return M;let i=xM(e,[],!1).filter((e=>uM(e)&&"body"!==rM(e))),N=null;const o="fixed"===yM(e).position;let s=o?AM(e):e;for(;uM(s)&&!OM(s);){const t=yM(s),M=TM(s);M||"fixed"!==t.position||(N=null),(o?!M&&!N:!M&&"static"===t.position&&N&&["absolute","fixed"].includes(N.position)||cM(s)&&!M&&bM(e,s))?i=i.filter((e=>e!==s)):N=t,s=AM(s)}return t.set(e,i),i}(t,this._c):[].concat(M),s=[...o,i],n=s[0],r=s.reduce(((e,M)=>{const i=fM(t,M,N);return e.top=Wt(i.top,e.top),e.right=Vt(i.right,e.right),e.bottom=Vt(i.bottom,e.bottom),e.left=Wt(i.left,e.left),e}),fM(t,n,N));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:VM,getElementRects:async function(e){const t=this.getOffsetParent||VM,M=this.getDimensions,i=await M(e.floating);return{reference:YM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:M}=SM(e);return{width:t,height:M}},getScale:EM,isElement:uM,isRTL:function(e){return"rtl"===yM(e).direction}};function PM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function RM(e,t,M,i){void 0===i&&(i={});const{ancestorScroll:N=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:r=!1}=i,a=QM(e),l=N||o?[...a?xM(a):[],...xM(t)]:[];l.forEach((e=>{N&&e.addEventListener("scroll",M,{passive:!0}),o&&e.addEventListener("resize",M)}));const D=a&&n?function(e,t){let M,i=null;const N=lM(e);function o(){var e;clearTimeout(M),null==(e=i)||e.disconnect(),i=null}return function s(n,r){void 0===n&&(n=!1),void 0===r&&(r=1),o();const a=e.getBoundingClientRect(),{left:l,top:D,width:u,height:g}=a;if(n||t(),!u||!g)return;const j={rootMargin:-Rt(D)+"px "+-Rt(N.clientWidth-(l+u))+"px "+-Rt(N.clientHeight-(D+g))+"px "+-Rt(l)+"px",threshold:Wt(0,Vt(1,r))||1};let c=!0;function z(t){const i=t[0].intersectionRatio;if(i!==r){if(!c)return s();i?s(!1,i):M=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==i||PM(a,e.getBoundingClientRect())||s(),c=!1}try{i=new IntersectionObserver(z,{...j,root:N.ownerDocument})}catch(e){i=new IntersectionObserver(z,j)}i.observe(e)}(!0),o}(a,M):null;let u,g=-1,j=null;s&&(j=new ResizeObserver((e=>{let[i]=e;i&&i.target===a&&j&&(j.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame((()=>{var e;null==(e=j)||e.observe(t)}))),M()})),a&&!r&&j.observe(a),j.observe(t));let c=r?mM(e):null;return r&&function t(){const i=mM(e);c&&!PM(c,i)&&M();c=i,u=requestAnimationFrame(t)}(),M(),()=>{var e;l.forEach((e=>{N&&e.removeEventListener("scroll",M),o&&e.removeEventListener("resize",M)})),null==D||D(),null==(e=j)||e.disconnect(),j=null,r&&cancelAnimationFrame(u)}}const GM=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var M,i;const{x:N,y:o,placement:s,middlewareData:n}=t,r=await async function(e,t){const{placement:M,platform:i,elements:N}=e,o=await(null==i.isRTL?void 0:i.isRTL(N.floating)),s=Jt(M),n=Xt(M),r="y"===Kt(M),a=["left","top"].includes(s)?-1:1,l=o&&r?-1:1,D=$t(t,e);let{mainAxis:u,crossAxis:g,alignmentAxis:j}="number"==typeof D?{mainAxis:D,crossAxis:0,alignmentAxis:null}:{mainAxis:D.mainAxis||0,crossAxis:D.crossAxis||0,alignmentAxis:D.alignmentAxis};return n&&"number"==typeof j&&(g="end"===n?-1*j:j),r?{x:g*l,y:u*a}:{x:u*a,y:g*l}}(t,e);return s===(null==(M=n.offset)?void 0:M.placement)&&null!=(i=n.arrow)&&i.alignmentOffset?{}:{x:N+r.x,y:o+r.y,data:{...r,placement:s}}}}},_M=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:M,y:i,placement:N}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:n={fn:e=>{let{x:t,y:M}=e;return{x:t,y:M}}},...r}=$t(e,t),a={x:M,y:i},l=await sM(t,r),D=Kt(Jt(N)),u=Ht(D);let g=a[u],j=a[D];if(o){const e="y"===u?"bottom":"right";g=Ft(g+l["y"===u?"top":"left"],g,g-l[e])}if(s){const e="y"===D?"bottom":"right";j=Ft(j+l["y"===D?"top":"left"],j,j-l[e])}const c=n.fn({...t,[u]:g,[D]:j});return{...c,data:{x:c.x-M,y:c.y-i,enabled:{[u]:o,[D]:s}}}}}},BM=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var M,i;const{placement:N,middlewareData:o,rects:s,initialPlacement:n,platform:r,elements:a}=t,{mainAxis:l=!0,crossAxis:D=!0,fallbackPlacements:u,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:c=!0,...z}=$t(e,t);if(null!=(M=o.arrow)&&M.alignmentOffset)return{};const I=Jt(N),T=Kt(n),d=Jt(n)===n,O=await(null==r.isRTL?void 0:r.isRTL(a.floating)),y=u||(d||!c?[MM(n)]:function(e){const t=MM(e);return[tM(e),t,tM(t)]}(n)),h="none"!==j;!u&&h&&y.push(...function(e,t,M,i){const N=Xt(e);let o=function(e,t,M){const i=["left","right"],N=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return M?t?N:i:t?i:N;case"left":case"right":return t?o:s;default:return[]}}(Jt(e),"start"===M,i);return N&&(o=o.map((e=>e+"-"+N)),t&&(o=o.concat(o.map(tM)))),o}(n,c,j,O));const A=[n,...y],L=await sM(t,z),x=[];let p=(null==(i=o.flip)?void 0:i.overflows)||[];if(l&&x.push(L[I]),D){const e=function(e,t,M){void 0===M&&(M=!1);const i=Xt(e),N=eM(e),o=qt(N);let s="x"===N?i===(M?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=MM(s)),[s,MM(s)]}(N,s,O);x.push(L[e[0]],L[e[1]])}if(p=[...p,{placement:N,overflows:x}],!x.every((e=>e<=0))){var S,Q;const e=((null==(S=o.flip)?void 0:S.index)||0)+1,t=A[e];if(t)return{data:{index:e,overflows:p},reset:{placement:t}};let M=null==(Q=p.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:Q.placement;if(!M)switch(g){case"bestFit":{var E;const e=null==(E=p.filter((e=>{if(h){const t=Kt(e.placement);return t===T||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0];e&&(M=e);break}case"initialPlacement":M=n}if(N!==M)return{reset:{placement:M}}}return{}}}},FM=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var M,i;const{placement:N,rects:o,platform:s,elements:n}=t,{apply:r=()=>{},...a}=$t(e,t),l=await sM(t,a),D=Jt(N),u=Xt(N),g="y"===Kt(N),{width:j,height:c}=o.floating;let z,I;"top"===D||"bottom"===D?(z=D,I=u===(await(null==s.isRTL?void 0:s.isRTL(n.floating))?"start":"end")?"left":"right"):(I=D,z="end"===u?"top":"bottom");const T=c-l.top-l.bottom,d=j-l.left-l.right,O=Vt(c-l[z],T),y=Vt(j-l[I],d),h=!t.middlewareData.shift;let A=O,L=y;if(null!=(M=t.middlewareData.shift)&&M.enabled.x&&(L=d),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(A=T),h&&!u){const e=Wt(l.left,0),t=Wt(l.right,0),M=Wt(l.top,0),i=Wt(l.bottom,0);g?L=j-2*(0!==e||0!==t?e+t:Wt(l.left,l.right)):A=c-2*(0!==M||0!==i?M+i:Wt(l.top,l.bottom))}await r({...t,availableWidth:L,availableHeight:A});const x=await s.getDimensions(n.floating);return j!==x.width||c!==x.height?{reset:{rects:!0}}:{}}}},$M=e=>({name:"arrow",options:e,async fn(t){const{x:M,y:i,placement:N,rects:o,platform:s,elements:n,middlewareData:r}=t,{element:a,padding:l=0}=$t(e,t)||{};if(null==a)return{};const D=iM(l),u={x:M,y:i},g=eM(N),j=qt(g),c=await s.getDimensions(a),z="y"===g,I=z?"top":"left",T=z?"bottom":"right",d=z?"clientHeight":"clientWidth",O=o.reference[j]+o.reference[g]-u[g]-o.floating[j],y=u[g]-o.reference[g],h=await(null==s.getOffsetParent?void 0:s.getOffsetParent(a));let A=h?h[d]:0;A&&await(null==s.isElement?void 0:s.isElement(h))||(A=n.floating[d]||o.floating[j]);const L=O/2-y/2,x=A/2-c[j]/2-1,p=Vt(D[I],x),S=Vt(D[T],x),Q=p,E=A-c[j]-S,w=A/2-c[j]/2+L,k=Ft(Q,w,E),m=!r.arrow&&null!=Xt(N)&&w!==k&&o.reference[j]/2-(w<Q?p:S)-c[j]/2<0,U=m?w<Q?w-Q:w-E:0;return{[g]:u[g]+U,data:{[g]:k,centerOffset:w-k-U,...m&&{alignmentOffset:U}},reset:m}}}),JM=(e,t,M)=>{const i=new Map,N={platform:WM,...M},o={...N.platform,_c:i};return(async(e,t,M)=>{const{placement:i="bottom",strategy:N="absolute",middleware:o=[],platform:s}=M,n=o.filter(Boolean),r=await(null==s.isRTL?void 0:s.isRTL(t));let a=await s.getElementRects({reference:e,floating:t,strategy:N}),{x:l,y:D}=oM(a,i,r),u=i,g={},j=0;for(let M=0;M<n.length;M++){const{name:o,fn:c}=n[M],{x:z,y:I,data:T,reset:d}=await c({x:l,y:D,initialPlacement:i,placement:u,strategy:N,middlewareData:g,rects:a,platform:s,elements:{reference:e,floating:t}});l=null!=z?z:l,D=null!=I?I:D,g={...g,[o]:{...g[o],...T}},d&&j<=50&&(j++,"object"==typeof d&&(d.placement&&(u=d.placement),d.rects&&(a=!0===d.rects?await s.getElementRects({reference:e,floating:t,strategy:N}):d.rects),({x:l,y:D}=oM(a,u,r))),M=-1)}return{x:l,y:D,placement:u,strategy:N,middlewareData:g}})(e,t,{...N,platform:o})};function XM(e){return function(e){for(let t=e;t;t=HM(t))if(t instanceof Element&&"none"===getComputedStyle(t).display)return null;for(let t=HM(e);t;t=HM(t)){if(!(t instanceof Element))continue;const e=getComputedStyle(t);if("contents"!==e.display){if("static"!==e.position||"none"!==e.filter)return t;if("BODY"===t.tagName)return t}}return null}(e)}function HM(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}const qM=s`
|
2628
|
+
`}};Zt.styles=vt,e([ze("slot:not([name])")],Zt.prototype,"defaultSlot",void 0),e([je()],Zt.prototype,"hasButtonGroup",void 0),e([je()],Zt.prototype,"defaultValue",void 0),e([ge()],Zt.prototype,"label",void 0),e([ge()],Zt.prototype,"name",void 0),e([ge({reflect:!0})],Zt.prototype,"value",void 0),e([ge({reflect:!0})],Zt.prototype,"form",void 0),e([ge({type:Boolean,reflect:!0})],Zt.prototype,"required",void 0),e([ge({type:Boolean,reflect:!0})],Zt.prototype,"labelInline",void 0),e([ge({type:Boolean,reflect:!0})],Zt.prototype,"disabled",void 0),e([ge({attribute:"help-text",reflect:!0})],Zt.prototype,"helpText",void 0),e([ge({attribute:"error-message",reflect:!0})],Zt.prototype,"errorMessage",void 0),e([ge({type:Boolean,reflect:!0})],Zt.prototype,"islabelborder",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],Zt.prototype,"allowUncheckGroup",void 0),e([Ve("disabled",{waitUntilFirstUpdate:!0})],Zt.prototype,"handleDisabledChange",null),e([Ve("value")],Zt.prototype,"handleValueChange",null),Zt=e([le("nile-radio-group")],Zt);const Vt=Math.min,Wt=Math.max,Pt=Math.round,Rt=Math.floor,Gt=e=>({x:e,y:e}),_t={left:"right",right:"left",bottom:"top",top:"bottom"},Bt={start:"end",end:"start"};function Ft(e,t,M){return Wt(e,Vt(t,M))}function $t(e,t){return"function"==typeof e?e(t):e}function Jt(e){return e.split("-")[0]}function Xt(e){return e.split("-")[1]}function Ht(e){return"x"===e?"y":"x"}function qt(e){return"y"===e?"height":"width"}function Kt(e){return["top","bottom"].includes(Jt(e))?"y":"x"}function eM(e){return Ht(Kt(e))}function tM(e){return e.replace(/start|end/g,(e=>Bt[e]))}function MM(e){return e.replace(/left|right|bottom|top/g,(e=>_t[e]))}function iM(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function NM(e){const{x:t,y:M,width:i,height:N}=e;return{width:i,height:N,top:M,left:t,right:t+i,bottom:M+N,x:t,y:M}}function oM(e,t,M){let{reference:i,floating:N}=e;const o=Kt(t),s=eM(t),n=qt(s),r=Jt(t),a="y"===o,l=i.x+i.width/2-N.width/2,D=i.y+i.height/2-N.height/2,u=i[n]/2-N[n]/2;let g;switch(r){case"top":g={x:l,y:i.y-N.height};break;case"bottom":g={x:l,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:D};break;case"left":g={x:i.x-N.width,y:D};break;default:g={x:i.x,y:i.y}}switch(Xt(t)){case"start":g[s]-=u*(M&&a?-1:1);break;case"end":g[s]+=u*(M&&a?-1:1)}return g}async function sM(e,t){var M;void 0===t&&(t={});const{x:i,y:N,platform:o,rects:s,elements:n,strategy:r}=e,{boundary:a="clippingAncestors",rootBoundary:l="viewport",elementContext:D="floating",altBoundary:u=!1,padding:g=0}=$t(t,e),j=iM(g),c=n[u?"floating"===D?"reference":"floating":D],z=NM(await o.getClippingRect({element:null==(M=await(null==o.isElement?void 0:o.isElement(c)))||M?c:c.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(n.floating)),boundary:a,rootBoundary:l,strategy:r})),I="floating"===D?{x:i,y:N,width:s.floating.width,height:s.floating.height}:s.reference,T=await(null==o.getOffsetParent?void 0:o.getOffsetParent(n.floating)),d=await(null==o.isElement?void 0:o.isElement(T))&&await(null==o.getScale?void 0:o.getScale(T))||{x:1,y:1},O=NM(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:I,offsetParent:T,strategy:r}):I);return{top:(z.top-O.top+j.top)/d.y,bottom:(O.bottom-z.bottom+j.bottom)/d.y,left:(z.left-O.left+j.left)/d.x,right:(O.right-z.right+j.right)/d.x}}function nM(){return"undefined"!=typeof window}function rM(e){return DM(e)?(e.nodeName||"").toLowerCase():"#document"}function aM(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function lM(e){var t;return null==(t=(DM(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function DM(e){return!!nM()&&(e instanceof Node||e instanceof aM(e).Node)}function uM(e){return!!nM()&&(e instanceof Element||e instanceof aM(e).Element)}function gM(e){return!!nM()&&(e instanceof HTMLElement||e instanceof aM(e).HTMLElement)}function jM(e){return!(!nM()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof aM(e).ShadowRoot)}function cM(e){const{overflow:t,overflowX:M,overflowY:i,display:N}=yM(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+M)&&!["inline","contents"].includes(N)}function zM(e){return["table","td","th"].includes(rM(e))}function IM(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function TM(e){const t=dM(),M=uM(e)?yM(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!M[e]&&"none"!==M[e]))||!!M.containerType&&"normal"!==M.containerType||!t&&!!M.backdropFilter&&"none"!==M.backdropFilter||!t&&!!M.filter&&"none"!==M.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(M.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(M.contain||"").includes(e)))}function dM(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function OM(e){return["html","body","#document"].includes(rM(e))}function yM(e){return aM(e).getComputedStyle(e)}function hM(e){return uM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function AM(e){if("html"===rM(e))return e;const t=e.assignedSlot||e.parentNode||jM(e)&&e.host||lM(e);return jM(t)?t.host:t}function LM(e){const t=AM(e);return OM(t)?e.ownerDocument?e.ownerDocument.body:e.body:gM(t)&&cM(t)?t:LM(t)}function xM(e,t,M){var i;void 0===t&&(t=[]),void 0===M&&(M=!0);const N=LM(e),o=N===(null==(i=e.ownerDocument)?void 0:i.body),s=aM(N);if(o){const e=pM(s);return t.concat(s,s.visualViewport||[],cM(N)?N:[],e&&M?xM(e):[])}return t.concat(N,xM(N,[],M))}function pM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function SM(e){const t=yM(e);let M=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const N=gM(e),o=N?e.offsetWidth:M,s=N?e.offsetHeight:i,n=Pt(M)!==o||Pt(i)!==s;return n&&(M=o,i=s),{width:M,height:i,$:n}}function QM(e){return uM(e)?e:e.contextElement}function EM(e){const t=QM(e);if(!gM(t))return Gt(1);const M=t.getBoundingClientRect(),{width:i,height:N,$:o}=SM(t);let s=(o?Pt(M.width):M.width)/i,n=(o?Pt(M.height):M.height)/N;return s&&Number.isFinite(s)||(s=1),n&&Number.isFinite(n)||(n=1),{x:s,y:n}}const wM=Gt(0);function kM(e){const t=aM(e);return dM()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wM}function mM(e,t,M,i){void 0===t&&(t=!1),void 0===M&&(M=!1);const N=e.getBoundingClientRect(),o=QM(e);let s=Gt(1);t&&(i?uM(i)&&(s=EM(i)):s=EM(e));const n=function(e,t,M){return void 0===t&&(t=!1),!(!M||t&&M!==aM(e))&&t}(o,M,i)?kM(o):Gt(0);let r=(N.left+n.x)/s.x,a=(N.top+n.y)/s.y,l=N.width/s.x,D=N.height/s.y;if(o){const e=aM(o),t=i&&uM(i)?aM(i):i;let M=e,N=pM(M);for(;N&&i&&t!==M;){const e=EM(N),t=N.getBoundingClientRect(),i=yM(N),o=t.left+(N.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(N.clientTop+parseFloat(i.paddingTop))*e.y;r*=e.x,a*=e.y,l*=e.x,D*=e.y,r+=o,a+=s,M=aM(N),N=pM(M)}}return NM({width:l,height:D,x:r,y:a})}function UM(e,t){const M=hM(e).scrollLeft;return t?t.left+M:mM(lM(e)).left+M}function CM(e,t,M){void 0===M&&(M=!1);const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-(M?0:UM(e,i)),y:i.top+t.scrollTop}}function fM(e,t,M){let i;if("viewport"===t)i=function(e,t){const M=aM(e),i=lM(e),N=M.visualViewport;let o=i.clientWidth,s=i.clientHeight,n=0,r=0;if(N){o=N.width,s=N.height;const e=dM();(!e||e&&"fixed"===t)&&(n=N.offsetLeft,r=N.offsetTop)}return{width:o,height:s,x:n,y:r}}(e,M);else if("document"===t)i=function(e){const t=lM(e),M=hM(e),i=e.ownerDocument.body,N=Wt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Wt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-M.scrollLeft+UM(e);const n=-M.scrollTop;return"rtl"===yM(i).direction&&(s+=Wt(t.clientWidth,i.clientWidth)-N),{width:N,height:o,x:s,y:n}}(lM(e));else if(uM(t))i=function(e,t){const M=mM(e,!0,"fixed"===t),i=M.top+e.clientTop,N=M.left+e.clientLeft,o=gM(e)?EM(e):Gt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:N*o.x,y:i*o.y}}(t,M);else{const M=kM(e);i={x:t.x-M.x,y:t.y-M.y,width:t.width,height:t.height}}return NM(i)}function bM(e,t){const M=AM(e);return!(M===t||!uM(M)||OM(M))&&("fixed"===yM(M).position||bM(M,t))}function YM(e,t,M){const i=gM(t),N=lM(t),o="fixed"===M,s=mM(e,!0,o,t);let n={scrollLeft:0,scrollTop:0};const r=Gt(0);if(i||!i&&!o)if(("body"!==rM(t)||cM(N))&&(n=hM(t)),i){const e=mM(t,!0,o,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else N&&(r.x=UM(N));const a=!N||i||o?Gt(0):CM(N,n);return{x:s.left+n.scrollLeft-r.x-a.x,y:s.top+n.scrollTop-r.y-a.y,width:s.width,height:s.height}}function vM(e){return"static"===yM(e).position}function ZM(e,t){if(!gM(e)||"fixed"===yM(e).position)return null;if(t)return t(e);let M=e.offsetParent;return lM(e)===M&&(M=M.ownerDocument.body),M}function VM(e,t){const M=aM(e);if(IM(e))return M;if(!gM(e)){let t=AM(e);for(;t&&!OM(t);){if(uM(t)&&!vM(t))return t;t=AM(t)}return M}let i=ZM(e,t);for(;i&&zM(i)&&vM(i);)i=ZM(i,t);return i&&OM(i)&&vM(i)&&!TM(i)?M:i||function(e){let t=AM(e);for(;gM(t)&&!OM(t);){if(TM(t))return t;if(IM(t))return null;t=AM(t)}return null}(e)||M}const WM={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:M,offsetParent:i,strategy:N}=e;const o="fixed"===N,s=lM(i),n=!!t&&IM(t.floating);if(i===s||n&&o)return M;let r={scrollLeft:0,scrollTop:0},a=Gt(1);const l=Gt(0),D=gM(i);if((D||!D&&!o)&&(("body"!==rM(i)||cM(s))&&(r=hM(i)),gM(i))){const e=mM(i);a=EM(i),l.x=e.x+i.clientLeft,l.y=e.y+i.clientTop}const u=!s||D||o?Gt(0):CM(s,r,!0);return{width:M.width*a.x,height:M.height*a.y,x:M.x*a.x-r.scrollLeft*a.x+l.x+u.x,y:M.y*a.y-r.scrollTop*a.y+l.y+u.y}},getDocumentElement:lM,getClippingRect:function(e){let{element:t,boundary:M,rootBoundary:i,strategy:N}=e;const o="clippingAncestors"===M?IM(t)?[]:function(e,t){const M=t.get(e);if(M)return M;let i=xM(e,[],!1).filter((e=>uM(e)&&"body"!==rM(e))),N=null;const o="fixed"===yM(e).position;let s=o?AM(e):e;for(;uM(s)&&!OM(s);){const t=yM(s),M=TM(s);M||"fixed"!==t.position||(N=null),(o?!M&&!N:!M&&"static"===t.position&&N&&["absolute","fixed"].includes(N.position)||cM(s)&&!M&&bM(e,s))?i=i.filter((e=>e!==s)):N=t,s=AM(s)}return t.set(e,i),i}(t,this._c):[].concat(M),s=[...o,i],n=s[0],r=s.reduce(((e,M)=>{const i=fM(t,M,N);return e.top=Wt(i.top,e.top),e.right=Vt(i.right,e.right),e.bottom=Vt(i.bottom,e.bottom),e.left=Wt(i.left,e.left),e}),fM(t,n,N));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:VM,getElementRects:async function(e){const t=this.getOffsetParent||VM,M=this.getDimensions,i=await M(e.floating);return{reference:YM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:M}=SM(e);return{width:t,height:M}},getScale:EM,isElement:uM,isRTL:function(e){return"rtl"===yM(e).direction}};function PM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function RM(e,t,M,i){void 0===i&&(i={});const{ancestorScroll:N=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:r=!1}=i,a=QM(e),l=N||o?[...a?xM(a):[],...xM(t)]:[];l.forEach((e=>{N&&e.addEventListener("scroll",M,{passive:!0}),o&&e.addEventListener("resize",M)}));const D=a&&n?function(e,t){let M,i=null;const N=lM(e);function o(){var e;clearTimeout(M),null==(e=i)||e.disconnect(),i=null}return function s(n,r){void 0===n&&(n=!1),void 0===r&&(r=1),o();const a=e.getBoundingClientRect(),{left:l,top:D,width:u,height:g}=a;if(n||t(),!u||!g)return;const j={rootMargin:-Rt(D)+"px "+-Rt(N.clientWidth-(l+u))+"px "+-Rt(N.clientHeight-(D+g))+"px "+-Rt(l)+"px",threshold:Wt(0,Vt(1,r))||1};let c=!0;function z(t){const i=t[0].intersectionRatio;if(i!==r){if(!c)return s();i?s(!1,i):M=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==i||PM(a,e.getBoundingClientRect())||s(),c=!1}try{i=new IntersectionObserver(z,{...j,root:N.ownerDocument})}catch(e){i=new IntersectionObserver(z,j)}i.observe(e)}(!0),o}(a,M):null;let u,g=-1,j=null;s&&(j=new ResizeObserver((e=>{let[i]=e;i&&i.target===a&&j&&(j.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame((()=>{var e;null==(e=j)||e.observe(t)}))),M()})),a&&!r&&j.observe(a),j.observe(t));let c=r?mM(e):null;return r&&function t(){const i=mM(e);c&&!PM(c,i)&&M();c=i,u=requestAnimationFrame(t)}(),M(),()=>{var e;l.forEach((e=>{N&&e.removeEventListener("scroll",M),o&&e.removeEventListener("resize",M)})),null==D||D(),null==(e=j)||e.disconnect(),j=null,r&&cancelAnimationFrame(u)}}const GM=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var M,i;const{x:N,y:o,placement:s,middlewareData:n}=t,r=await async function(e,t){const{placement:M,platform:i,elements:N}=e,o=await(null==i.isRTL?void 0:i.isRTL(N.floating)),s=Jt(M),n=Xt(M),r="y"===Kt(M),a=["left","top"].includes(s)?-1:1,l=o&&r?-1:1,D=$t(t,e);let{mainAxis:u,crossAxis:g,alignmentAxis:j}="number"==typeof D?{mainAxis:D,crossAxis:0,alignmentAxis:null}:{mainAxis:D.mainAxis||0,crossAxis:D.crossAxis||0,alignmentAxis:D.alignmentAxis};return n&&"number"==typeof j&&(g="end"===n?-1*j:j),r?{x:g*l,y:u*a}:{x:u*a,y:g*l}}(t,e);return s===(null==(M=n.offset)?void 0:M.placement)&&null!=(i=n.arrow)&&i.alignmentOffset?{}:{x:N+r.x,y:o+r.y,data:{...r,placement:s}}}}},_M=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:M,y:i,placement:N}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:n={fn:e=>{let{x:t,y:M}=e;return{x:t,y:M}}},...r}=$t(e,t),a={x:M,y:i},l=await sM(t,r),D=Kt(Jt(N)),u=Ht(D);let g=a[u],j=a[D];if(o){const e="y"===u?"bottom":"right";g=Ft(g+l["y"===u?"top":"left"],g,g-l[e])}if(s){const e="y"===D?"bottom":"right";j=Ft(j+l["y"===D?"top":"left"],j,j-l[e])}const c=n.fn({...t,[u]:g,[D]:j});return{...c,data:{x:c.x-M,y:c.y-i,enabled:{[u]:o,[D]:s}}}}}},BM=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var M,i;const{placement:N,middlewareData:o,rects:s,initialPlacement:n,platform:r,elements:a}=t,{mainAxis:l=!0,crossAxis:D=!0,fallbackPlacements:u,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:c=!0,...z}=$t(e,t);if(null!=(M=o.arrow)&&M.alignmentOffset)return{};const I=Jt(N),T=Kt(n),d=Jt(n)===n,O=await(null==r.isRTL?void 0:r.isRTL(a.floating)),y=u||(d||!c?[MM(n)]:function(e){const t=MM(e);return[tM(e),t,tM(t)]}(n)),h="none"!==j;!u&&h&&y.push(...function(e,t,M,i){const N=Xt(e);let o=function(e,t,M){const i=["left","right"],N=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return M?t?N:i:t?i:N;case"left":case"right":return t?o:s;default:return[]}}(Jt(e),"start"===M,i);return N&&(o=o.map((e=>e+"-"+N)),t&&(o=o.concat(o.map(tM)))),o}(n,c,j,O));const A=[n,...y],L=await sM(t,z),x=[];let p=(null==(i=o.flip)?void 0:i.overflows)||[];if(l&&x.push(L[I]),D){const e=function(e,t,M){void 0===M&&(M=!1);const i=Xt(e),N=eM(e),o=qt(N);let s="x"===N?i===(M?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=MM(s)),[s,MM(s)]}(N,s,O);x.push(L[e[0]],L[e[1]])}if(p=[...p,{placement:N,overflows:x}],!x.every((e=>e<=0))){var S,Q;const e=((null==(S=o.flip)?void 0:S.index)||0)+1,t=A[e];if(t)return{data:{index:e,overflows:p},reset:{placement:t}};let M=null==(Q=p.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:Q.placement;if(!M)switch(g){case"bestFit":{var E;const e=null==(E=p.filter((e=>{if(h){const t=Kt(e.placement);return t===T||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0];e&&(M=e);break}case"initialPlacement":M=n}if(N!==M)return{reset:{placement:M}}}return{}}}},FM=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var M,i;const{placement:N,rects:o,platform:s,elements:n}=t,{apply:r=()=>{},...a}=$t(e,t),l=await sM(t,a),D=Jt(N),u=Xt(N),g="y"===Kt(N),{width:j,height:c}=o.floating;let z,I;"top"===D||"bottom"===D?(z=D,I=u===(await(null==s.isRTL?void 0:s.isRTL(n.floating))?"start":"end")?"left":"right"):(I=D,z="end"===u?"top":"bottom");const T=c-l.top-l.bottom,d=j-l.left-l.right,O=Vt(c-l[z],T),y=Vt(j-l[I],d),h=!t.middlewareData.shift;let A=O,L=y;if(null!=(M=t.middlewareData.shift)&&M.enabled.x&&(L=d),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(A=T),h&&!u){const e=Wt(l.left,0),t=Wt(l.right,0),M=Wt(l.top,0),i=Wt(l.bottom,0);g?L=j-2*(0!==e||0!==t?e+t:Wt(l.left,l.right)):A=c-2*(0!==M||0!==i?M+i:Wt(l.top,l.bottom))}await r({...t,availableWidth:L,availableHeight:A});const x=await s.getDimensions(n.floating);return j!==x.width||c!==x.height?{reset:{rects:!0}}:{}}}},$M=e=>({name:"arrow",options:e,async fn(t){const{x:M,y:i,placement:N,rects:o,platform:s,elements:n,middlewareData:r}=t,{element:a,padding:l=0}=$t(e,t)||{};if(null==a)return{};const D=iM(l),u={x:M,y:i},g=eM(N),j=qt(g),c=await s.getDimensions(a),z="y"===g,I=z?"top":"left",T=z?"bottom":"right",d=z?"clientHeight":"clientWidth",O=o.reference[j]+o.reference[g]-u[g]-o.floating[j],y=u[g]-o.reference[g],h=await(null==s.getOffsetParent?void 0:s.getOffsetParent(a));let A=h?h[d]:0;A&&await(null==s.isElement?void 0:s.isElement(h))||(A=n.floating[d]||o.floating[j]);const L=O/2-y/2,x=A/2-c[j]/2-1,p=Vt(D[I],x),S=Vt(D[T],x),Q=p,E=A-c[j]-S,w=A/2-c[j]/2+L,k=Ft(Q,w,E),m=!r.arrow&&null!=Xt(N)&&w!==k&&o.reference[j]/2-(w<Q?p:S)-c[j]/2<0,U=m?w<Q?w-Q:w-E:0;return{[g]:u[g]+U,data:{[g]:k,centerOffset:w-k-U,...m&&{alignmentOffset:U}},reset:m}}}),JM=(e,t,M)=>{const i=new Map,N={platform:WM,...M},o={...N.platform,_c:i};return(async(e,t,M)=>{const{placement:i="bottom",strategy:N="absolute",middleware:o=[],platform:s}=M,n=o.filter(Boolean),r=await(null==s.isRTL?void 0:s.isRTL(t));let a=await s.getElementRects({reference:e,floating:t,strategy:N}),{x:l,y:D}=oM(a,i,r),u=i,g={},j=0;for(let M=0;M<n.length;M++){const{name:o,fn:c}=n[M],{x:z,y:I,data:T,reset:d}=await c({x:l,y:D,initialPlacement:i,placement:u,strategy:N,middlewareData:g,rects:a,platform:s,elements:{reference:e,floating:t}});l=null!=z?z:l,D=null!=I?I:D,g={...g,[o]:{...g[o],...T}},d&&j<=50&&(j++,"object"==typeof d&&(d.placement&&(u=d.placement),d.rects&&(a=!0===d.rects?await s.getElementRects({reference:e,floating:t,strategy:N}):d.rects),({x:l,y:D}=oM(a,u,r))),M=-1)}return{x:l,y:D,placement:u,strategy:N,middlewareData:g}})(e,t,{...N,platform:o})};function XM(e){return function(e){for(let t=e;t;t=HM(t))if(t instanceof Element&&"none"===getComputedStyle(t).display)return null;for(let t=HM(e);t;t=HM(t)){if(!(t instanceof Element))continue;const e=getComputedStyle(t);if("contents"!==e.display){if("static"!==e.position||"none"!==e.filter)return t;if("BODY"===t.tagName)return t}}return null}(e)}function HM(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}const qM=s`
|
2629
2629
|
:host {
|
2630
2630
|
--arrow-color: hsl(240 4.8% 95.9%);
|
2631
2631
|
--arrow-size: 6px;
|
@@ -4633,7 +4633,7 @@ class Hi{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
4633
4633
|
<slot name="prefix" slot="prefix"></slot>
|
4634
4634
|
</nile-virtual-select>
|
4635
4635
|
</div>
|
4636
|
-
`}}let lN=class extends Pe{get validity(){return this.valueInput?.validity}get validationMessage(){return this.valueInput?.validationMessage}constructor(){super(),this.hasSlotController=new ve(this,"help-text","label"),this.typeToSelectString="",this.scrolling=!1,this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.oldValue="",this.name="",this.value="",this.defaultValue="",this.size="medium",this.placeholder="Select...",this.searchValue="",this.searchEnabled=!1,this.internalSearchPlaceHolder="Search...",this.blockValueChange=!1,this.disableLocalSearch=!1,this.optionsLoading=!1,this.noWidthSync=!1,this.multiple=!1,this.helpText="",this.errorMessage="",this.warning=!1,this.error=!1,this.success=!1,this.maxOptionsVisible=3,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.form="",this.required=!1,this.showSelected=!1,this.oldMaxOptionsVisible=1,this.showNoResults=!1,this.noResultsMessage="No results found",this.data=[],this.enableVirtualScroll=!1,this.enableGroupHeader=!1,this.options=[]}connectedCallback(){super.connectedCallback(),this.enableVirtualScroll||(this.formControlController=new be(this,{assumeInteractionOn:["nile-blur","nile-input"]})),this.virtualScrollHelper=new aN(this),this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.open=!1,this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=void 0),this.emit("nile-destroy")}updated(e){e.has("multiple")&&this.setCheckBoxInOption(this.multiple)}firstUpdated(e){this.enableGroupHeader&&this.handleGroupSearchChange(),e.has("multiple")&&this.setCheckBoxInOption(this.multiple)}setCheckBoxInOption(e){this.options.length||(this.options=this.getAllOptions()),this.options.forEach((t=>{t.showCheckbox=e}))}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("nile-focus",{value:this.value,name:this.name})}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value,name:this.name})}handleDocumentFocusIn(e){const t=e.composedPath();this&&!t.includes(this)&&this.hide()}handleFooterClick(e){e.stopPropagation(),e.preventDefault()}toggleShowSelected(e){if(e.stopPropagation(),e.preventDefault(),0===this.selectedOptions?.length)return;this.showSelected=!this.showSelected;this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.enableGroupHeader&&this.handleGroupShowSelected()}unSlectAll(){this.showSelected=!1;this.getAllOptions().forEach((e=>{e.selected=!1,e.hidden=!1})),this.enableGroupHeader&&this.handleGroupShowSelected(),this.value="",this.selectionChanged(),this.emit("nile-change",{value:this.value,name:this.name}),this.emit("nile-clear",{value:this.multiple?this.value:"",name:this.name})}handleDocumentKeyDown(e){const t=e.target,M=null!==t.closest(".select__clear"),i=null!==t.closest("nile-icon-button");if(!M&&!i){if("Escape"===e.key&&this.open&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),"Enter"===e.key||" "===e.key&&""===this.typeToSelectString)return e.preventDefault(),e.stopImmediatePropagation(),this.open?void(this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))):void this.show();if(1===e.key.length||"Backspace"===e.key){const t=this.getAllOptions();if(e.metaKey||e.ctrlKey||e.altKey)return;if(!this.open){if("Backspace"===e.key)return;this.show()}e.stopPropagation(),e.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>this.typeToSelectString=""),1e3),"Backspace"===e.key?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=e.key.toLowerCase();for(const e of t){if(e.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(e);break}}}}}handleDocumentMouseDown(e){const t=e.composedPath();this&&!t.includes(this)&&this.hide()}handleLabelClick(){this.displayInput.focus(),this.hide()}handleComboboxMouseDown(e){const t=e.composedPath().some((e=>e instanceof Element&&"nile-icon-button"===e.tagName.toLowerCase()));this.disabled||t||(e.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(e){e.stopPropagation(),this.handleDocumentKeyDown(e)}handleClearClick(e){e.stopPropagation(),""!==this.value&&(this.setSelectedOptions([]),this.showSelected=!1,this.value="",this.displayInput.focus({preventScroll:!0}),this.enableGroupHeader&&this.handleGroupShowSelected(),this.updateComplete.then((()=>{const e={value:this.multiple?this.value:"",name:this.name};this.emit("nile-clear",e),this.nileInput(e),this.nileChange(e)})))}handleClearMouseDown(e){e.stopPropagation(),e.preventDefault()}handleOptionClick(e){const t=e.target.closest("nile-option");if(this.blockValueChange&&t)return this.emit("nile-block-change",{value:t?.value,name:this.name}),void this.hide();const M=this.value;if(this.oldValue=M,t&&!t.disabled&&(this.multiple?this.toggleOptionSelection(t):this.setSelectedOptions(t),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==M&&this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}))),this.showSelected){this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.enableGroupHeader&&this.handleGroupShowSelected(),this.requestUpdate()}}handleDefaultSlotChange(){const e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value],M=[];customElements.get("nile-option")?(e.forEach((e=>M.push(e.value))),this.setSelectedOptions(e.filter((e=>t.map(String).includes(e.value))))):customElements.whenDefined("nile-option").then((()=>this.handleDefaultSlotChange()))}handleTagRemove(e,t){if(e.stopPropagation(),!this.disabled){this.toggleOptionSelection(t,!1);this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.enableGroupHeader&&this.handleGroupShowSelected(),this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name}),this.emit("nile-tag-remove",{value:this.value,name:this.name,removedtagvalue:t.value})}))}}getAllOptions(){const e=[...this.querySelectorAll("nile-option")];return this.multiple&&this.oldValue?.length>0&&e.sort(((e,t)=>{let M=this.oldValue.indexOf(e.value),i=this.oldValue.indexOf(t.value);return-1===M&&(M=1/0),-1===i&&(i=1/0),M<i?-1:M>i?1:0})),e}getOptionPrefix(e){const t=e.shadowRoot?.querySelector('slot[name="prefix"]');if(!t)return"";const M=t.assignedNodes(),i=[];return M.forEach((e=>{e instanceof HTMLElement?i.push(e.outerHTML):e.nodeType===Node.TEXT_NODE&&i.push(e.textContent||"")})),i.join("")}getFirstOption(){return this.querySelector("nile-option")}setCurrentOption(e){this.getAllOptions().forEach((e=>{e.current=!1,e.tabIndex=-1})),e&&(this.currentOption=e,e.current=!0,e.tabIndex=0,e.focus())}setSelectedOptions(e){const t=this.getAllOptions(),M=Array.isArray(e)?e:[e];t.forEach((e=>e.selected=!1)),M.length&&M.forEach((e=>e.selected=!0)),this.selectionChanged()}toggleOptionSelection(e,t){e.selected=!0===t||!1===t?t:!e.selected,this.selectionChanged()}selectionChanged(){if(this.selectedOptions=this.getAllOptions().filter((e=>e.selected)),this.multiple){if(this.value=this.selectedOptions.map((e=>e.value)),this.placeholder&&0===this.value.length?this.displayLabel="":this.displayLabel=this.selectedOptions.length+" selected",0===this.selectedOptions.length){this.showSelected=!1;this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.requestUpdate()}}else this.value=this.selectedOptions[0]?.value??this.value,this.displayLabel=this.selectedOptions[0]?.getTextLabel()?this.selectedOptions[0].getTextLabel():this.value??"";this.updateComplete.then((()=>{this.formControlController?.updateValidity()})),this.calculateTotalWidthOfTags()}handleSearchFocus(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleSearchBlur(){document.addEventListener("keydown",this.handleDocumentKeyDown)}handleSearchChange(e){if(this.searchValue=e.detail.value,this.emit("nile-search",{query:this.searchValue,name:this.name}),this.enableGroupHeader&&this.handleGroupSearchChange(),!this.disableLocalSearch){0===this.filterOptions(this.searchValue).length?this.showNoResults=!0:this.showNoResults=!1}}handleScroll(e){const t=e.target;this.emit("nile-scroll",{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,name:this.name}),this.scrolling||(this.scrolling=!0,this.emit("nile-scroll-start",{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,name:this.name})),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout((()=>{this.scrolling&&(this.scrolling=!1)}),300);Math.ceil(t.scrollTop)>=Math.floor(t.scrollHeight-t.offsetHeight)&&this.emit("nile-scroll-end",{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,name:this.name,isAtBottom:!0})}filterOptions(e){const t=this.getAllOptions(),M=e.toLowerCase();let i=[];return t.forEach((e=>{const t=e.getTextLabel().toLowerCase(),N=(e.value||"").toLowerCase();t.includes(M)||N.includes(M)?(e.hidden=!1,i.push(e)):e.hidden=!0})),i}handleInvalid(e){this.formControlController?.setValidity(!1),this.formControlController?.emitInvalidEvent(e)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){const e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(e.filter((e=>t.includes(e.value))))}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("nile-show",{value:this.value,name:this.name}),this.enableGroupHeader&&this.getAllGroupAttributes().forEach((e=>{e.element.classList.remove("nile-group-hidden")})),this.addOpenListeners(),this.showNoResults=!this.getAllOptions()?.length,await ct(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:e,options:t}=yt(this,"select.show",{dir:"ltr"});await ut(this.popup.popup,e,t),this.currentOption&&xt(this.currentOption,this.listbox,"vertical","auto"),this.searchValue="",this.filterOptions(this.searchValue),this.emit("nile-after-show",{value:this.value,name:this.name})}else{this.emit("nile-hide",{value:this.value,name:this.name}),this.showSelected=!1,this.removeOpenListeners(),await ct(this);const{keyframes:e,options:t}=yt(this,"select.hide",{dir:"ltr"});await ut(this.popup.popup,e,t),this.listbox.hidden=!0,this.popup.active=!1,this.searchValue="",this.emit("nile-after-hide",{value:this.value,name:this.name})}}getAllGroupAttributes(){return Array.from(this.querySelectorAll("nile-option-group[name]")).map((e=>({name:e?.getAttribute("name")||"",data:e?.getAttribute("data"),element:e})))}getUniqueGroupNames(e){return Array.from(new Set(e.map((e=>e?.groupName))))}handleGroupSearchChange(){const e=new Set(this.getUniqueGroupNames(this.filterOptions(this.searchValue)));this.getAllGroupAttributes().forEach((({name:t,element:M})=>{M?.classList.toggle("nile-group-hidden",!e.has(t))}))}handleGroupShowSelected(){const e=new Set;this.showSelected&&this.getAllOptions().forEach((t=>{t.hidden||e.add(t.groupName)})),this.getAllGroupAttributes().forEach((({name:t,element:M})=>{M?.classList.toggle("nile-group-hidden",this.showSelected&&!e.has(t))}))}async show(){if(!this.open&&!this.disabled)return this.open=!0,St(this,"nile-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,St(this,"nile-after-hide");this.open=!1}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController?.getForm()||null}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(e){this.valueInput.setCustomValidity(e),this.formControlController?.updateValidity()}focus(e){this.displayInput.focus(e)}blur(){this.displayInput.blur()}onInputChange(e){e.stopPropagation()}calculateWidthOfSelectTagsDiv(){if(this.shadowRoot){const e=this.shadowRoot.querySelector("div.select__tags");if(e instanceof HTMLElement){return e.offsetWidth-70}}}calculateTotalWidthOfTags(){this.maxOptionsVisible!==1/0&&(this.oldMaxOptionsVisible=this.maxOptionsVisible),this.maxOptionsVisible=1/0,setTimeout((()=>{let e=[];if(this.shadowRoot){this.shadowRoot.querySelectorAll("nile-tag").forEach((t=>{t instanceof HTMLElement&&e.push(t.offsetWidth)}))}if(this.value.length!==e.length)return;const t=this.calculateWidthOfSelectTagsDiv();if(!t)return;let M=0,i=0;for(let N=0;N<e.length;N++)if(M+=e[N],M>t){i=N;break}this.maxOptionsVisible=i}),1)}render(){if(this.enableVirtualScroll)return this.virtualScrollHelper.renderVirtualizedContent();const e=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const t=this.hasSlotController.test("label-suffix"),M=this.hasSlotController.test("custom-select"),i=!!this.label||!!e,N=this.clearable&&!this.disabled&&this.value.length>0,o=this.placeholder&&0===this.value.length,s=!!this.helpText,n=!!this.errorMessage,r=this.selectedOptions[0]?this.getOptionPrefix(this.selectedOptions[0]):"";return R`
|
4636
|
+
`}}let lN=class extends Pe{get validity(){return this.valueInput?.validity}get validationMessage(){return this.valueInput?.validationMessage}constructor(){super(),this.hasSlotController=new ve(this,"help-text","label"),this.typeToSelectString="",this.scrolling=!1,this.options=[],this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.oldValue="",this.name="",this.value="",this.defaultValue="",this.size="medium",this.placeholder="Select...",this.searchValue="",this.searchEnabled=!1,this.internalSearchPlaceHolder="Search...",this.blockValueChange=!1,this.disableLocalSearch=!1,this.optionsLoading=!1,this.noWidthSync=!1,this.multiple=!1,this.helpText="",this.errorMessage="",this.warning=!1,this.error=!1,this.success=!1,this.maxOptionsVisible=3,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.form="",this.required=!1,this.showSelected=!1,this.oldMaxOptionsVisible=1,this.showNoResults=!1,this.noResultsMessage="No results found",this.data=[],this.enableVirtualScroll=!1,this.enableGroupHeader=!1,this.autoFocusSearch=!1}connectedCallback(){super.connectedCallback(),this.enableVirtualScroll||(this.formControlController=new be(this,{assumeInteractionOn:["nile-blur","nile-input"]})),this.virtualScrollHelper=new aN(this),this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.open=!1,this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=void 0),this.emit("nile-destroy")}updated(e){e.has("multiple")&&this.setCheckBoxInOption(this.multiple)}firstUpdated(e){this.enableGroupHeader&&this.handleGroupSearchChange(),e.has("multiple")&&this.setCheckBoxInOption(this.multiple)}setCheckBoxInOption(e){this.options.length||(this.options=this.getAllOptions()),this.options.forEach((t=>{t.showCheckbox=e}))}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("nile-focus",{value:this.value,name:this.name})}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value,name:this.name})}handleDocumentFocusIn(e){const t=e.composedPath();this&&!t.includes(this)&&this.hide()}handleFooterClick(e){e.stopPropagation(),e.preventDefault()}toggleShowSelected(e){if(e.stopPropagation(),e.preventDefault(),0===this.selectedOptions?.length)return;this.showSelected=!this.showSelected;this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.enableGroupHeader&&this.handleGroupShowSelected()}unSlectAll(){this.showSelected=!1;this.getAllOptions().forEach((e=>{e.selected=!1,e.hidden=!1})),this.enableGroupHeader&&this.handleGroupShowSelected(),this.value="",this.selectionChanged(),this.emit("nile-change",{value:this.value,name:this.name}),this.emit("nile-clear",{value:this.multiple?this.value:"",name:this.name})}handleDocumentKeyDown(e){const t=e.target,M=null!==t.closest(".select__clear"),i=null!==t.closest("nile-icon-button");if(!M&&!i){if("Escape"===e.key&&this.open&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),"Enter"===e.key||" "===e.key&&""===this.typeToSelectString)return e.preventDefault(),e.stopImmediatePropagation(),this.open?void(this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))):void this.show();if(1===e.key.length||"Backspace"===e.key){const t=this.getAllOptions();if(e.metaKey||e.ctrlKey||e.altKey)return;if(!this.open){if("Backspace"===e.key)return;this.show()}e.stopPropagation(),e.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>this.typeToSelectString=""),1e3),"Backspace"===e.key?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=e.key.toLowerCase();for(const e of t){if(e.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(e);break}}}}}handleDocumentMouseDown(e){const t=e.composedPath();this&&!t.includes(this)&&this.hide()}handleLabelClick(){this.displayInput.focus(),this.hide()}handleComboboxMouseDown(e){const t=e.composedPath().some((e=>e instanceof Element&&"nile-icon-button"===e.tagName.toLowerCase()));this.disabled||t||(e.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(e){e.stopPropagation(),this.handleDocumentKeyDown(e)}handleClearClick(e){e.stopPropagation(),""!==this.value&&(this.setSelectedOptions([]),this.showSelected=!1,this.value="",this.displayInput.focus({preventScroll:!0}),this.enableGroupHeader&&this.handleGroupShowSelected(),this.updateComplete.then((()=>{const e={value:this.multiple?this.value:"",name:this.name};this.emit("nile-clear",e),this.nileInput(e),this.nileChange(e)})))}handleClearMouseDown(e){e.stopPropagation(),e.preventDefault()}handleOptionClick(e){const t=e.target.closest("nile-option");if(this.blockValueChange&&t)return this.emit("nile-block-change",{value:t?.value,name:this.name}),void this.hide();const M=this.value;if(this.oldValue=M,t&&!t.disabled&&(this.multiple?this.toggleOptionSelection(t):this.setSelectedOptions(t),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==M&&this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}))),this.showSelected){this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.enableGroupHeader&&this.handleGroupShowSelected(),this.requestUpdate()}}handleDefaultSlotChange(){const e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value],M=[];customElements.get("nile-option")?(e.forEach((e=>M.push(e.value))),this.setSelectedOptions(e.filter((e=>t.map(String).includes(e.value))))):customElements.whenDefined("nile-option").then((()=>this.handleDefaultSlotChange()))}handleTagRemove(e,t){if(e.stopPropagation(),!this.disabled){this.toggleOptionSelection(t,!1);this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.enableGroupHeader&&this.handleGroupShowSelected(),this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name}),this.emit("nile-tag-remove",{value:this.value,name:this.name,removedtagvalue:t.value})}))}}getAllOptions(){const e=[...this.querySelectorAll("nile-option")];return this.multiple&&this.oldValue?.length>0&&e.sort(((e,t)=>{let M=this.oldValue.indexOf(e.value),i=this.oldValue.indexOf(t.value);return-1===M&&(M=1/0),-1===i&&(i=1/0),M<i?-1:M>i?1:0})),e}getOptionPrefix(e){const t=e.shadowRoot?.querySelector('slot[name="prefix"]');if(!t)return"";const M=t.assignedNodes(),i=[];return M.forEach((e=>{e instanceof HTMLElement?i.push(e.outerHTML):e.nodeType===Node.TEXT_NODE&&i.push(e.textContent||"")})),i.join("")}getFirstOption(){return this.querySelector("nile-option")}setCurrentOption(e){this.getAllOptions().forEach((e=>{e.current=!1,e.tabIndex=-1})),e&&(this.currentOption=e,e.current=!0,e.tabIndex=0,e.focus())}setSelectedOptions(e){const t=this.getAllOptions(),M=Array.isArray(e)?e:[e];t.forEach((e=>e.selected=!1)),M.length&&M.forEach((e=>e.selected=!0)),this.selectionChanged()}toggleOptionSelection(e,t){e.selected=!0===t||!1===t?t:!e.selected,this.selectionChanged()}selectionChanged(){if(this.selectedOptions=this.getAllOptions().filter((e=>e.selected)),this.multiple){if(this.value=this.selectedOptions.map((e=>e.value)),this.placeholder&&0===this.value.length?this.displayLabel="":this.displayLabel=this.selectedOptions.length+" selected",0===this.selectedOptions.length){this.showSelected=!1;this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.requestUpdate()}}else this.value=this.selectedOptions[0]?.value??this.value,this.displayLabel=this.selectedOptions[0]?.getTextLabel()?this.selectedOptions[0].getTextLabel():this.value??"";this.updateComplete.then((()=>{this.formControlController?.updateValidity()})),this.calculateTotalWidthOfTags()}handleSearchFocus(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleSearchBlur(){document.addEventListener("keydown",this.handleDocumentKeyDown)}handleSearchChange(e){if(this.searchValue=e.detail.value,this.emit("nile-search",{query:this.searchValue,name:this.name}),this.enableGroupHeader&&this.handleGroupSearchChange(),!this.disableLocalSearch){0===this.filterOptions(this.searchValue).length?this.showNoResults=!0:this.showNoResults=!1}}handleScroll(e){const t=e.target;this.emit("nile-scroll",{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,name:this.name}),this.scrolling||(this.scrolling=!0,this.emit("nile-scroll-start",{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,name:this.name})),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout((()=>{this.scrolling&&(this.scrolling=!1)}),300);Math.ceil(t.scrollTop)>=Math.floor(t.scrollHeight-t.offsetHeight)&&this.emit("nile-scroll-end",{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,name:this.name,isAtBottom:!0})}filterOptions(e){const t=this.getAllOptions(),M=e.toLowerCase();let i=[];return t.forEach((e=>{const t=e.getTextLabel().toLowerCase(),N=(e.value||"").toLowerCase();t.includes(M)||N.includes(M)?(e.hidden=!1,i.push(e)):e.hidden=!0})),i}handleInvalid(e){this.formControlController?.setValidity(!1),this.formControlController?.emitInvalidEvent(e)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){const e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(e.filter((e=>t.includes(e.value))))}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("nile-show",{value:this.value,name:this.name}),this.enableGroupHeader&&this.getAllGroupAttributes().forEach((e=>{e.element.classList.remove("nile-group-hidden")})),this.addOpenListeners(),this.showNoResults=!this.getAllOptions()?.length,await ct(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:e,options:t}=yt(this,"select.show",{dir:"ltr"});await ut(this.popup.popup,e,t),this.currentOption&&xt(this.currentOption,this.listbox,"vertical","auto"),this.searchValue="",this.filterOptions(this.searchValue),this.emit("nile-after-show",{value:this.value,name:this.name}),this.autoFocusSearch&&this.handleInputAfterInit()}else{this.emit("nile-hide",{value:this.value,name:this.name}),this.showSelected=!1,this.removeOpenListeners(),await ct(this);const{keyframes:e,options:t}=yt(this,"select.hide",{dir:"ltr"});await ut(this.popup.popup,e,t),this.listbox.hidden=!0,this.popup.active=!1,this.searchValue="",this.emit("nile-after-hide",{value:this.value,name:this.name})}}getAllGroupAttributes(){return Array.from(this.querySelectorAll("nile-option-group[name]")).map((e=>({name:e?.getAttribute("name")||"",data:e?.getAttribute("data"),element:e})))}getUniqueGroupNames(e){return Array.from(new Set(e.map((e=>e?.groupName))))}handleGroupSearchChange(){const e=new Set(this.getUniqueGroupNames(this.filterOptions(this.searchValue)));this.getAllGroupAttributes().forEach((({name:t,element:M})=>{M?.classList.toggle("nile-group-hidden",!e.has(t))}))}handleGroupShowSelected(){const e=new Set;this.showSelected&&this.getAllOptions().forEach((t=>{t.hidden||e.add(t.groupName)})),this.getAllGroupAttributes().forEach((({name:t,element:M})=>{M?.classList.toggle("nile-group-hidden",this.showSelected&&!e.has(t))}))}async show(){if(!this.open&&!this.disabled)return this.open=!0,St(this,"nile-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,St(this,"nile-after-hide");this.open=!1}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController?.getForm()||null}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(e){this.valueInput.setCustomValidity(e),this.formControlController?.updateValidity()}focus(e){this.displayInput.focus(e)}blur(){this.displayInput.blur()}onInputChange(e){e.stopPropagation()}calculateWidthOfSelectTagsDiv(){if(this.shadowRoot){const e=this.shadowRoot.querySelector("div.select__tags");if(e instanceof HTMLElement){return e.offsetWidth-70}}}calculateTotalWidthOfTags(){this.maxOptionsVisible!==1/0&&(this.oldMaxOptionsVisible=this.maxOptionsVisible),this.maxOptionsVisible=1/0,setTimeout((()=>{let e=[];if(this.shadowRoot){this.shadowRoot.querySelectorAll("nile-tag").forEach((t=>{t instanceof HTMLElement&&e.push(t.offsetWidth)}))}if(this.value.length!==e.length)return;const t=this.calculateWidthOfSelectTagsDiv();if(!t)return;let M=0,i=0;for(let N=0;N<e.length;N++)if(M+=e[N],M>t){i=N;break}this.maxOptionsVisible=i}),1)}handleInputAfterInit(){this.shadowRoot?.querySelector("nile-input")?.inputFocus()}render(){if(this.enableVirtualScroll)return this.virtualScrollHelper.renderVirtualizedContent();const e=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const t=this.hasSlotController.test("label-suffix"),M=this.hasSlotController.test("custom-select"),i=!!this.label||!!e,N=this.clearable&&!this.disabled&&this.value.length>0,o=this.placeholder&&0===this.value.length,s=!!this.helpText,n=!!this.errorMessage,r=this.selectedOptions[0]?this.getOptionPrefix(this.selectedOptions[0]):"";return R`
|
4637
4637
|
<div
|
4638
4638
|
part="form-control"
|
4639
4639
|
class=${Le({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":i,"form-control--has-help-text":s})}
|
@@ -4802,6 +4802,7 @@ class Hi{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
4802
4802
|
@nile-input=${this.handleSearchChange}
|
4803
4803
|
@nile-focus=${this.handleSearchFocus}
|
4804
4804
|
@nile-change="${this.onInputChange}"
|
4805
|
+
@nile-after-init=${this.handleInputAfterInit}
|
4805
4806
|
>
|
4806
4807
|
<nile-icon name="search" slot="suffix"> </nile-icon>
|
4807
4808
|
</nile-input>
|
@@ -4859,7 +4860,7 @@ class Hi{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
4859
4860
|
>
|
4860
4861
|
`:""}
|
4861
4862
|
</div>
|
4862
|
-
`}nileInput(e){this.emit("nile-input",e)}nileChange(e){this.emit("nile-change",e)}};lN.styles=li,e([ze(".select")],lN.prototype,"popup",void 0),e([ze(".select__combobox")],lN.prototype,"combobox",void 0),e([ze(".select__display-input")],lN.prototype,"displayInput",void 0),e([ze(".select__value-input")],lN.prototype,"valueInput",void 0),e([ze(".select__listbox")],lN.prototype,"listbox",void 0),e([je()],lN.prototype,"hasFocus",void 0),e([je()],lN.prototype,"displayLabel",void 0),e([je()],lN.prototype,"currentOption",void 0),e([je()],lN.prototype,"selectedOptions",void 0),e([je()],lN.prototype,"oldValue",void 0),e([ge()],lN.prototype,"name",void 0),e([ge({converter:{fromAttribute:e=>e.split(" "),toAttribute:e=>e.join(" ")}})],lN.prototype,"value",void 0),e([$e()],lN.prototype,"defaultValue",void 0),e([ge()],lN.prototype,"size",void 0),e([ge()],lN.prototype,"placeholder",void 0),e([je()],lN.prototype,"searchValue",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"searchEnabled",void 0),e([ge({attribute:"internal-search-placeholder"})],lN.prototype,"internalSearchPlaceHolder",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"blockValueChange",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"disableLocalSearch",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"optionsLoading",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"noWidthSync",void 0),e([ge({reflect:!0,converter:{fromAttribute:e=>""===e||"true"===e||"false"!==e&&e,toAttribute:e=>"boolean"==typeof e?String(e):e}})],lN.prototype,"multiple",void 0),e([ge({attribute:"help-text",reflect:!0})],lN.prototype,"helpText",void 0),e([ge({attribute:"error-message",reflect:!0})],lN.prototype,"errorMessage",void 0),e([ge({type:Boolean})],lN.prototype,"warning",void 0),e([ge({type:Boolean})],lN.prototype,"error",void 0),e([ge({type:Boolean})],lN.prototype,"success",void 0),e([ge({attribute:"max-options-visible",type:Number})],lN.prototype,"maxOptionsVisible",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"disabled",void 0),e([ge({type:Boolean})],lN.prototype,"clearable",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"open",void 0),e([ge({type:Boolean})],lN.prototype,"hoist",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"filled",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"pill",void 0),e([ge()],lN.prototype,"label",void 0),e([ge({reflect:!0})],lN.prototype,"placement",void 0),e([ge({reflect:!0})],lN.prototype,"form",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"required",void 0),e([ge({type:Boolean})],lN.prototype,"showSelected",void 0),e([je()],lN.prototype,"oldMaxOptionsVisible",void 0),e([ge({type:Boolean})],lN.prototype,"showNoResults",void 0),e([ge({type:String})],lN.prototype,"noResultsMessage",void 0),e([ge({attribute:!1})],lN.prototype,"renderItemConfig",void 0),e([ge({type:Array})],lN.prototype,"data",void 0),e([ge({type:Boolean})],lN.prototype,"enableVirtualScroll",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],lN.prototype,"enableGroupHeader",void 0),e([Ve("disabled",{waitUntilFirstUpdate:!0})],lN.prototype,"handleDisabledChange",null),e([Ve("value",{waitUntilFirstUpdate:!0})],lN.prototype,"handleValueChange",null),e([Ve("open",{waitUntilFirstUpdate:!0})],lN.prototype,"handleOpenChange",null),lN=e([le("nile-select")],lN),Ot("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),Ot("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const DN=s`
|
4863
|
+
`}nileInput(e){this.emit("nile-input",e)}nileChange(e){this.emit("nile-change",e)}};lN.styles=li,e([ze(".select")],lN.prototype,"popup",void 0),e([ze(".select__combobox")],lN.prototype,"combobox",void 0),e([ze(".select__display-input")],lN.prototype,"displayInput",void 0),e([ze(".select__value-input")],lN.prototype,"valueInput",void 0),e([ze(".select__listbox")],lN.prototype,"listbox",void 0),e([je()],lN.prototype,"hasFocus",void 0),e([je()],lN.prototype,"displayLabel",void 0),e([je()],lN.prototype,"currentOption",void 0),e([je()],lN.prototype,"selectedOptions",void 0),e([je()],lN.prototype,"oldValue",void 0),e([ge()],lN.prototype,"name",void 0),e([ge({converter:{fromAttribute:e=>e.split(" "),toAttribute:e=>e.join(" ")}})],lN.prototype,"value",void 0),e([$e()],lN.prototype,"defaultValue",void 0),e([ge()],lN.prototype,"size",void 0),e([ge()],lN.prototype,"placeholder",void 0),e([je()],lN.prototype,"searchValue",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"searchEnabled",void 0),e([ge({attribute:"internal-search-placeholder"})],lN.prototype,"internalSearchPlaceHolder",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"blockValueChange",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"disableLocalSearch",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"optionsLoading",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"noWidthSync",void 0),e([ge({reflect:!0,converter:{fromAttribute:e=>""===e||"true"===e||"false"!==e&&e,toAttribute:e=>"boolean"==typeof e?String(e):e}})],lN.prototype,"multiple",void 0),e([ge({attribute:"help-text",reflect:!0})],lN.prototype,"helpText",void 0),e([ge({attribute:"error-message",reflect:!0})],lN.prototype,"errorMessage",void 0),e([ge({type:Boolean})],lN.prototype,"warning",void 0),e([ge({type:Boolean})],lN.prototype,"error",void 0),e([ge({type:Boolean})],lN.prototype,"success",void 0),e([ge({attribute:"max-options-visible",type:Number})],lN.prototype,"maxOptionsVisible",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"disabled",void 0),e([ge({type:Boolean})],lN.prototype,"clearable",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"open",void 0),e([ge({type:Boolean})],lN.prototype,"hoist",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"filled",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"pill",void 0),e([ge()],lN.prototype,"label",void 0),e([ge({reflect:!0})],lN.prototype,"placement",void 0),e([ge({reflect:!0})],lN.prototype,"form",void 0),e([ge({type:Boolean,reflect:!0})],lN.prototype,"required",void 0),e([ge({type:Boolean})],lN.prototype,"showSelected",void 0),e([je()],lN.prototype,"oldMaxOptionsVisible",void 0),e([ge({type:Boolean})],lN.prototype,"showNoResults",void 0),e([ge({type:String})],lN.prototype,"noResultsMessage",void 0),e([ge({attribute:!1})],lN.prototype,"renderItemConfig",void 0),e([ge({type:Array})],lN.prototype,"data",void 0),e([ge({type:Boolean})],lN.prototype,"enableVirtualScroll",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],lN.prototype,"enableGroupHeader",void 0),e([ge({type:Boolean,reflect:!0,attribute:!0})],lN.prototype,"autoFocusSearch",void 0),e([Ve("disabled",{waitUntilFirstUpdate:!0})],lN.prototype,"handleDisabledChange",null),e([Ve("value",{waitUntilFirstUpdate:!0})],lN.prototype,"handleValueChange",null),e([Ve("open",{waitUntilFirstUpdate:!0})],lN.prototype,"handleOpenChange",null),lN=e([le("nile-select")],lN),Ot("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),Ot("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const DN=s`
|
4863
4864
|
:host {
|
4864
4865
|
display: block;
|
4865
4866
|
user-select: none;
|
@@ -10771,6 +10772,16 @@ class Hi{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
10771
10772
|
margin-right: 12px;
|
10772
10773
|
}
|
10773
10774
|
|
10775
|
+
.badge{
|
10776
|
+
display: inline-flex;
|
10777
|
+
align-items: center;
|
10778
|
+
height: 20px;
|
10779
|
+
}
|
10780
|
+
|
10781
|
+
nile-badge::part(content) {
|
10782
|
+
line-height: 20px;
|
10783
|
+
}
|
10784
|
+
|
10774
10785
|
`;var Px;let Rx=Px=class extends Pe{constructor(){super(...arguments),this.label="",this.value="",this.viewMoreCount=0,this.editable=!1,this.closable=!1,this.icon="",this.removeIcon="",this.active=!1}static get styles(){return[Wx]}connectedCallback(){super.connectedCallback(),this.registerChip()}disconnectedCallback(){super.disconnectedCallback(),this.unregisterChip()}registerChip(){Px.activeChips.push(this)}unregisterChip(){Px.activeChips=Px.activeChips.filter((e=>e!==this))}handleClose(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("nile-close",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}})),this.remove()}handleClick(){this.dispatchEvent(new CustomEvent("nile-click",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}}))}getLabelSlot(){return R`
|
10775
10786
|
<span class="label-wrapper">
|
10776
10787
|
<slot name="label">
|
@@ -10789,7 +10800,7 @@ class Hi{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
10789
10800
|
<slot name="suffix">
|
10790
10801
|
${this.viewMoreCount?R`
|
10791
10802
|
<span class="badge-wrapper">
|
10792
|
-
<nile-badge variant="primary" pilltype="pill-color">
|
10803
|
+
<nile-badge class="badge" part="badge" variant="primary" pilltype="pill-color" exportparts="content, base">
|
10793
10804
|
+${this.viewMoreCount}
|
10794
10805
|
</nile-badge>
|
10795
10806
|
</span>
|
@@ -12932,7 +12943,7 @@ class Hi{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
12932
12943
|
<!-- suffix content -->
|
12933
12944
|
${this.data?.suffix?.icon?.name?R`<nile-icon part="suffix-icon" name="${this.data?.suffix?.icon?.name}" size="${this.data?.suffix?.icon?.size||"16"}" color="${this.data?.suffix?.icon?.color||"var(--nile-colors-dark-500)"}" method="${this.data?.suffix?.icon?.method||"fill"}"></nile-icon>`:this.data?.suffix?.suffixText?R`<span part="suffix-text">${this.data?.suffix?.suffixText}</span>`:this.data?.suffix?.image?.src?R`<img part="suffix-image" src="${this.data?.prefix?.image?.src}" width="${this.normalizeImageDimension(this.data?.suffix?.image?.width)}" height="${this.normalizeImageDimension(this.data?.suffix?.image?.height)}">`:R`<slot part="suffix" name="suffix" class="option-group-suffix"></slot>`}
|
12934
12945
|
</div>
|
12935
|
-
`}};e([ge({type:String,reflect:!0,attribute:!0})],Zp.prototype,"name",void 0),e([ge({type:Object,attribute:!0})],Zp.prototype,"data",void 0),Zp=e([le("nile-option-group")],Zp);
|
12946
|
+
`}};e([ge({type:String,reflect:!0,attribute:!0})],Zp.prototype,"name",void 0),e([ge({type:Object,reflect:!0,attribute:!0})],Zp.prototype,"data",void 0),Zp=e([le("nile-option-group")],Zp);
|
12936
12947
|
/**
|
12937
12948
|
* @license
|
12938
12949
|
* Copyright 2021 Google LLC
|
@@ -1,2 +1,2 @@
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","../internal/nile-element.cjs.js","./nile-filter-chip.css.cjs.js"],function(_export,_context){"use strict";var e,t,s,i,l,a,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_n,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;i=_litDecoratorsJs.customElement;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_nileFilterChipCssCjsJs){a=_nileFilterChipCssCjsJs.s;}],execute:function execute(){_export("N",o=_n=/*#__PURE__*/function(_l){function n(){var _this;_classCallCheck(this,n);_this=_callSuper(this,n,arguments),_this.label="",_this.value="",_this.viewMoreCount=0,_this.editable=!1,_this.closable=!1,_this.icon="",_this.removeIcon="",_this.active=!1;return _this;}_inherits(n,_l);return _createClass(n,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(n,"connectedCallback",this,3)([]),this.registerChip();}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(n,"disconnectedCallback",this,3)([]),this.unregisterChip();}},{key:"registerChip",value:function registerChip(){_n.activeChips.push(this);}},{key:"unregisterChip",value:function unregisterChip(){var _this2=this;_n.activeChips=_n.activeChips.filter(function(e){return e!==_this2;});}},{key:"handleClose",value:function handleClose(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("nile-close",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}})),this.remove();}},{key:"handleClick",value:function handleClick(){this.dispatchEvent(new CustomEvent("nile-click",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}}));}},{key:"getLabelSlot",value:function getLabelSlot(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\" part=\"label\">",":</span>\n </slot>\n </span>\n\n "])),this.label);}},{key:"getValueSlot",value:function getValueSlot(){return t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\" part=\"value\">","</span>\n </slot>\n </span>\n\n "])),this.value);}},{key:"getviewMoreCountSlot",value:function getviewMoreCountSlot(){return t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <slot name=\"suffix\">\n ","\n </slot>\n "])),this.viewMoreCount?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <span class=\"badge-wrapper\">\n <nile-badge variant=\"primary\" pilltype=\"pill-color\">\n +","\n </nile-badge>\n </span>\n\n "])),this.viewMoreCount):t(_templateObject5||(_templateObject5=_taggedTemplateLiteral([""]))));}},{key:"getCloseIconSlot",value:function getCloseIconSlot(){return t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n ","\n "])),this.closable?t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <span class=\"close-icon\" @click=\"","\">\n <nile-icon name=\"","\" size=\"12\"></nile-icon>\n </span>\n "])),this.handleClose,this.removeIcon||"close"):t(_templateObject8||(_templateObject8=_taggedTemplateLiteral([""]))));}},{key:"render",value:function render(){return t(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <div class=\"chip\" @click=\"","\">\n <slot name=\"icon\">\n ","\n </slot>\n ","\n <slot name=\"content\"></slot>\n ","\n ","\n ","\n </div>\n "])),this.handleClick,this.icon?t(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<span class=\"icon\">","</span>"])),this.icon):t(_templateObject11||(_templateObject11=_taggedTemplateLiteral([""]))),this.getLabelSlot(),this.getValueSlot(),this.getviewMoreCountSlot(),this.getCloseIconSlot());}}],[{key:"styles",get:function get(){return[a];}}]);}(l));o.activeChips=[],e([s({type:String})],o.prototype,"label",void 0),e([s({type:String})],o.prototype,"value",void 0),e([s({type:Number})],o.prototype,"viewMoreCount",void 0),e([s({type:Boolean})],o.prototype,"editable",void 0),e([s({type:Boolean})],o.prototype,"closable",void 0),e([s({type:String})],o.prototype,"icon",void 0),e([s({type:String})],o.prototype,"removeIcon",void 0),e([s({type:Boolean,reflect:!0})],o.prototype,"active",void 0),_export("N",o=_n=e([i("nile-filter-chip")],o));}};});
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","../internal/nile-element.cjs.js","./nile-filter-chip.css.cjs.js"],function(_export,_context){"use strict";var e,t,s,i,l,a,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_n,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;i=_litDecoratorsJs.customElement;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_nileFilterChipCssCjsJs){a=_nileFilterChipCssCjsJs.s;}],execute:function execute(){_export("N",o=_n=/*#__PURE__*/function(_l){function n(){var _this;_classCallCheck(this,n);_this=_callSuper(this,n,arguments),_this.label="",_this.value="",_this.viewMoreCount=0,_this.editable=!1,_this.closable=!1,_this.icon="",_this.removeIcon="",_this.active=!1;return _this;}_inherits(n,_l);return _createClass(n,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(n,"connectedCallback",this,3)([]),this.registerChip();}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(n,"disconnectedCallback",this,3)([]),this.unregisterChip();}},{key:"registerChip",value:function registerChip(){_n.activeChips.push(this);}},{key:"unregisterChip",value:function unregisterChip(){var _this2=this;_n.activeChips=_n.activeChips.filter(function(e){return e!==_this2;});}},{key:"handleClose",value:function handleClose(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("nile-close",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}})),this.remove();}},{key:"handleClick",value:function handleClick(){this.dispatchEvent(new CustomEvent("nile-click",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}}));}},{key:"getLabelSlot",value:function getLabelSlot(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\" part=\"label\">",":</span>\n </slot>\n </span>\n\n "])),this.label);}},{key:"getValueSlot",value:function getValueSlot(){return t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\" part=\"value\">","</span>\n </slot>\n </span>\n\n "])),this.value);}},{key:"getviewMoreCountSlot",value:function getviewMoreCountSlot(){return t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <slot name=\"suffix\">\n ","\n </slot>\n "])),this.viewMoreCount?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <span class=\"badge-wrapper\">\n <nile-badge class=\"badge\" part=\"badge\" variant=\"primary\" pilltype=\"pill-color\" exportparts=\"content, base\">\n +","\n </nile-badge>\n </span>\n\n "])),this.viewMoreCount):t(_templateObject5||(_templateObject5=_taggedTemplateLiteral([""]))));}},{key:"getCloseIconSlot",value:function getCloseIconSlot(){return t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n ","\n "])),this.closable?t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <span class=\"close-icon\" @click=\"","\">\n <nile-icon name=\"","\" size=\"12\"></nile-icon>\n </span>\n "])),this.handleClose,this.removeIcon||"close"):t(_templateObject8||(_templateObject8=_taggedTemplateLiteral([""]))));}},{key:"render",value:function render(){return t(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <div class=\"chip\" @click=\"","\">\n <slot name=\"icon\">\n ","\n </slot>\n ","\n <slot name=\"content\"></slot>\n ","\n ","\n ","\n </div>\n "])),this.handleClick,this.icon?t(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<span class=\"icon\">","</span>"])),this.icon):t(_templateObject11||(_templateObject11=_taggedTemplateLiteral([""]))),this.getLabelSlot(),this.getValueSlot(),this.getviewMoreCountSlot(),this.getCloseIconSlot());}}],[{key:"styles",get:function get(){return[a];}}]);}(l));o.activeChips=[],e([s({type:String})],o.prototype,"label",void 0),e([s({type:String})],o.prototype,"value",void 0),e([s({type:Number})],o.prototype,"viewMoreCount",void 0),e([s({type:Boolean})],o.prototype,"editable",void 0),e([s({type:Boolean})],o.prototype,"closable",void 0),e([s({type:String})],o.prototype,"icon",void 0),e([s({type:String})],o.prototype,"removeIcon",void 0),e([s({type:Boolean,reflect:!0})],o.prototype,"active",void 0),_export("N",o=_n=e([i("nile-filter-chip")],o));}};});
|
2
2
|
//# sourceMappingURL=nile-filter-chip.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-filter-chip.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.ts"],"sourcesContent":["import { LitElement, html, css, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\nimport { styles } from './nile-filter-chip.css';\n\n/**\n * Nile filter-chip component.\n *\n * @tag nile-filter-chip\n */\n@customElement('nile-filter-chip')\nexport class NileFilterChip extends NileElement {\n @property({ type: String }) label = '';\n @property({ type: String }) value = '';\n @property({ type: Number }) viewMoreCount: number = 0;\n @property({ type: Boolean }) editable = false;\n @property({ type: Boolean }) closable = false;\n @property({ type: String }) icon = '';\n @property({ type: String }) removeIcon = '';\n @property({ type: Boolean, reflect: true }) active = false;\n\n\n private static activeChips: NileFilterChip[] = [];\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.registerChip();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.unregisterChip();\n }\n\n private registerChip() {\n NileFilterChip.activeChips.push(this);\n }\n\n private unregisterChip() {\n NileFilterChip.activeChips = NileFilterChip.activeChips.filter(\n (chip) => chip !== this\n );\n }\n\n private handleClose(event: Event) {\n event.stopPropagation();\n this.dispatchEvent(\n new CustomEvent('nile-close', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n this.remove();\n }\n\n private handleClick() {\n this.dispatchEvent(\n new CustomEvent('nile-click', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n }\n\n private getLabelSlot(): TemplateResult {\n return html`\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\" part=\"label\">${this.label}:</span>\n </slot>\n </span>\n\n `;\n }\n\n private getValueSlot(): TemplateResult {\n return html`\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\" part=\"value\">${this.value}</span>\n </slot>\n </span>\n\n `;\n }\n\n private getviewMoreCountSlot(): TemplateResult {\n return html`\n <slot name=\"suffix\">\n ${this.viewMoreCount\n ? html`\n <span class=\"badge-wrapper\">\n <nile-badge variant=\"primary\" pilltype=\"pill-color\">\n +${this.viewMoreCount}\n </nile-badge>\n </span>\n\n `\n : html``}\n </slot>\n `;\n }\n\n private getCloseIconSlot(): TemplateResult {\n return html`\n ${this.closable\n ? html`\n <span class=\"close-icon\" @click=\"${this.handleClose}\">\n <nile-icon name=\"${this.removeIcon || 'close'}\" size=\"12\"></nile-icon>\n </span>\n `\n : html``}\n `;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"chip\" @click=\"${this.handleClick}\">\n <slot name=\"icon\">\n ${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : html``}\n </slot>\n ${this.getLabelSlot()}\n <slot name=\"content\"></slot>\n ${this.getValueSlot()}\n ${this.getviewMoreCountSlot()}\n ${this.getCloseIconSlot()}\n </div>\n `;\n }\n}\n\nexport default NileFilterChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-filter-chip': NileFilterChip;\n }\n}\n"],"names":["NileFilterChip","NileFilterChip_1","_l","n","this","label","value","viewMoreCount","editable","closable","icon","removeIcon","active","_this","_inherits","_createClass","key","connectedCallback","super","registerChip","disconnectedCallback","unregisterChip","activeChips","push","filter","chip","handleClose","event","stopPropagation","dispatchEvent","CustomEvent","detail","remove","handleClick","getLabelSlot","html","_templateObject","_taggedTemplateLiteral","getValueSlot","_templateObject2","getviewMoreCountSlot","_templateObject3","_templateObject4","_templateObject5","getCloseIconSlot","_templateObject6","_templateObject7","_templateObject8","render","_templateObject9","_templateObject10","_templateObject11","get","styles","NileElement","__decorate","property","type","String","prototype","Number","Boolean","reflect","customElement"],"mappings":"o0HAWaA,CAAAA,CAAcC,EAApB,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEACuBC,EAAAA,KAAAA,CAAKC,KAAG,CAAA,EAAA,CACRD,KAAAA,CAAKE,KAAAA,CAAG,EACRF,CAAAA,KAAAA,CAAaG,aAAW,CAAA,CAAA,CACvBH,KAAAA,CAAQI,QAAAA,CAAAA,CAAG,CACXJ,CAAAA,KAAAA,CAAQK,QAAG,CAAA,CAAA,CAAA,CACZL,KAAAA,CAAIM,IAAAA,CAAG,EACPN,CAAAA,KAAAA,CAAUO,UAAG,CAAA,EAAA,CACGP,KAAAA,CAAMQ,MAAAA,CAAAA,CAAG,CA4GtD,QAAAC,KAAA,EAvGQC,SAAA,CAAAX,CAAA,CAAAD,EAAA,SAAAa,YAAA,CAAAZ,CAAA,GAAAa,GAAA,qBAAAV,KAAA,CAIP,SAAAW,iBAAAA,CAAAA,CAAAA,CACEC,aAAAA,CAAAA,CAAAA,iCACAd,IAAKe,CAAAA,YAAAA,CAAAA,CACN,EAED,GAAAH,GAAA,wBAAAV,KAAA,UAAAc,oBAAAA,CAAAA,EACEF,aAAAA,CAAAA,CAAAA,oCACAd,IAAKiB,CAAAA,cAAAA,CAAAA,CACN,EAEO,GAAAL,GAAA,gBAAAV,KAAA,UAAAa,YAAAA,CAAAA,CACNlB,CAAAA,EAAAA,CAAeqB,WAAYC,CAAAA,IAAAA,CAAKnB,IACjC,CAAA,EAEO,GAAAY,GAAA,kBAAAV,KAAA,UAAAe,cAAAA,CAAAA,CAAAA,KAAAA,MAAAA,MACNpB,EAAeqB,CAAAA,WAAAA,CAAcrB,EAAeqB,CAAAA,WAAAA,CAAYE,MACrDC,CAAAA,SAAAA,CAAAA,QAASA,CAAAA,CAASrB,GAAAA,MAAAA,EAAAA,CAEtB,EAEO,GAAAY,GAAA,eAAAV,KAAA,UAAAoB,WAAAA,CAAYC,CAAAA,CAAAA,CAClBA,CAAMC,CAAAA,eAAAA,CAAAA,CAAAA,CACNxB,IAAKyB,CAAAA,aAAAA,CACH,GAAIC,CAAAA,WAAAA,CAAY,YAAc,CAAA,CAAEC,MAAQ,CAAA,CAAEzB,KAAOF,CAAAA,IAAAA,CAAKE,KAAOC,CAAAA,aAAAA,CAAeH,IAAKG,CAAAA,aAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAEnFH,IAAK4B,CAAAA,MAAAA,CAAAA,CACN,EAEO,GAAAhB,GAAA,eAAAV,KAAA,UAAA2B,WAAAA,CAAAA,CACN7B,CAAAA,IAAAA,CAAKyB,aACH,CAAA,GAAIC,CAAAA,WAAY,CAAA,YAAA,CAAc,CAAEC,MAAAA,CAAQ,CAAEzB,KAAAA,CAAOF,IAAKE,CAAAA,KAAAA,CAAOC,aAAeH,CAAAA,IAAAA,CAAKG,aAEpF,CAAA,CAAA,CAAA,CAAA,EAEO,GAAAS,GAAA,gBAAAV,KAAA,UAAA4B,YAAAA,CAAAA,CAAAA,CACN,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,uKAG4BjC,IAAKC,CAAAA,KAAAA,EAK7C,CAEO,GAAAW,GAAA,gBAAAV,KAAA,UAAAgC,YAAAA,CAAAA,CACN,CAAA,MAAOH,CAAAA,CAAI,CAAAI,gBAAA,GAAAA,gBAAA,CAAAF,sBAAA,sKAG4BjC,IAAKE,CAAAA,KAAAA,EAK7C,CAEO,GAAAU,GAAA,wBAAAV,KAAA,UAAAkC,oBAAAA,CAAAA,CACN,CAAA,MAAOL,CAAAA,CAAI,CAAAM,gBAAA,GAAAA,gBAAA,CAAAJ,sBAAA,wEAELjC,IAAAA,CAAKG,cACH4B,CAAI,CAAAO,gBAAA,GAAAA,gBAAA,CAAAL,sBAAA,
|
1
|
+
{"version":3,"file":"nile-filter-chip.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.ts"],"sourcesContent":["import { LitElement, html, css, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\nimport { styles } from './nile-filter-chip.css';\n\n/**\n * Nile filter-chip component.\n *\n * @tag nile-filter-chip\n */\n@customElement('nile-filter-chip')\nexport class NileFilterChip extends NileElement {\n @property({ type: String }) label = '';\n @property({ type: String }) value = '';\n @property({ type: Number }) viewMoreCount: number = 0;\n @property({ type: Boolean }) editable = false;\n @property({ type: Boolean }) closable = false;\n @property({ type: String }) icon = '';\n @property({ type: String }) removeIcon = '';\n @property({ type: Boolean, reflect: true }) active = false;\n\n\n private static activeChips: NileFilterChip[] = [];\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.registerChip();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.unregisterChip();\n }\n\n private registerChip() {\n NileFilterChip.activeChips.push(this);\n }\n\n private unregisterChip() {\n NileFilterChip.activeChips = NileFilterChip.activeChips.filter(\n (chip) => chip !== this\n );\n }\n\n private handleClose(event: Event) {\n event.stopPropagation();\n this.dispatchEvent(\n new CustomEvent('nile-close', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n this.remove();\n }\n\n private handleClick() {\n this.dispatchEvent(\n new CustomEvent('nile-click', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n }\n\n private getLabelSlot(): TemplateResult {\n return html`\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\" part=\"label\">${this.label}:</span>\n </slot>\n </span>\n\n `;\n }\n\n private getValueSlot(): TemplateResult {\n return html`\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\" part=\"value\">${this.value}</span>\n </slot>\n </span>\n\n `;\n }\n\n private getviewMoreCountSlot(): TemplateResult {\n return html`\n <slot name=\"suffix\">\n ${this.viewMoreCount\n ? html`\n <span class=\"badge-wrapper\">\n <nile-badge class=\"badge\" part=\"badge\" variant=\"primary\" pilltype=\"pill-color\" exportparts=\"content, base\">\n +${this.viewMoreCount}\n </nile-badge>\n </span>\n\n `\n : html``}\n </slot>\n `;\n }\n\n private getCloseIconSlot(): TemplateResult {\n return html`\n ${this.closable\n ? html`\n <span class=\"close-icon\" @click=\"${this.handleClose}\">\n <nile-icon name=\"${this.removeIcon || 'close'}\" size=\"12\"></nile-icon>\n </span>\n `\n : html``}\n `;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"chip\" @click=\"${this.handleClick}\">\n <slot name=\"icon\">\n ${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : html``}\n </slot>\n ${this.getLabelSlot()}\n <slot name=\"content\"></slot>\n ${this.getValueSlot()}\n ${this.getviewMoreCountSlot()}\n ${this.getCloseIconSlot()}\n </div>\n `;\n }\n}\n\nexport default NileFilterChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-filter-chip': NileFilterChip;\n }\n}\n"],"names":["NileFilterChip","NileFilterChip_1","_l","n","this","label","value","viewMoreCount","editable","closable","icon","removeIcon","active","_this","_inherits","_createClass","key","connectedCallback","super","registerChip","disconnectedCallback","unregisterChip","activeChips","push","filter","chip","handleClose","event","stopPropagation","dispatchEvent","CustomEvent","detail","remove","handleClick","getLabelSlot","html","_templateObject","_taggedTemplateLiteral","getValueSlot","_templateObject2","getviewMoreCountSlot","_templateObject3","_templateObject4","_templateObject5","getCloseIconSlot","_templateObject6","_templateObject7","_templateObject8","render","_templateObject9","_templateObject10","_templateObject11","get","styles","NileElement","__decorate","property","type","String","prototype","Number","Boolean","reflect","customElement"],"mappings":"o0HAWaA,CAAAA,CAAcC,EAApB,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEACuBC,EAAAA,KAAAA,CAAKC,KAAG,CAAA,EAAA,CACRD,KAAAA,CAAKE,KAAAA,CAAG,EACRF,CAAAA,KAAAA,CAAaG,aAAW,CAAA,CAAA,CACvBH,KAAAA,CAAQI,QAAAA,CAAAA,CAAG,CACXJ,CAAAA,KAAAA,CAAQK,QAAG,CAAA,CAAA,CAAA,CACZL,KAAAA,CAAIM,IAAAA,CAAG,EACPN,CAAAA,KAAAA,CAAUO,UAAG,CAAA,EAAA,CACGP,KAAAA,CAAMQ,MAAAA,CAAAA,CAAG,CA4GtD,QAAAC,KAAA,EAvGQC,SAAA,CAAAX,CAAA,CAAAD,EAAA,SAAAa,YAAA,CAAAZ,CAAA,GAAAa,GAAA,qBAAAV,KAAA,CAIP,SAAAW,iBAAAA,CAAAA,CAAAA,CACEC,aAAAA,CAAAA,CAAAA,iCACAd,IAAKe,CAAAA,YAAAA,CAAAA,CACN,EAED,GAAAH,GAAA,wBAAAV,KAAA,UAAAc,oBAAAA,CAAAA,EACEF,aAAAA,CAAAA,CAAAA,oCACAd,IAAKiB,CAAAA,cAAAA,CAAAA,CACN,EAEO,GAAAL,GAAA,gBAAAV,KAAA,UAAAa,YAAAA,CAAAA,CACNlB,CAAAA,EAAAA,CAAeqB,WAAYC,CAAAA,IAAAA,CAAKnB,IACjC,CAAA,EAEO,GAAAY,GAAA,kBAAAV,KAAA,UAAAe,cAAAA,CAAAA,CAAAA,KAAAA,MAAAA,MACNpB,EAAeqB,CAAAA,WAAAA,CAAcrB,EAAeqB,CAAAA,WAAAA,CAAYE,MACrDC,CAAAA,SAAAA,CAAAA,QAASA,CAAAA,CAASrB,GAAAA,MAAAA,EAAAA,CAEtB,EAEO,GAAAY,GAAA,eAAAV,KAAA,UAAAoB,WAAAA,CAAYC,CAAAA,CAAAA,CAClBA,CAAMC,CAAAA,eAAAA,CAAAA,CAAAA,CACNxB,IAAKyB,CAAAA,aAAAA,CACH,GAAIC,CAAAA,WAAAA,CAAY,YAAc,CAAA,CAAEC,MAAQ,CAAA,CAAEzB,KAAOF,CAAAA,IAAAA,CAAKE,KAAOC,CAAAA,aAAAA,CAAeH,IAAKG,CAAAA,aAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAEnFH,IAAK4B,CAAAA,MAAAA,CAAAA,CACN,EAEO,GAAAhB,GAAA,eAAAV,KAAA,UAAA2B,WAAAA,CAAAA,CACN7B,CAAAA,IAAAA,CAAKyB,aACH,CAAA,GAAIC,CAAAA,WAAY,CAAA,YAAA,CAAc,CAAEC,MAAAA,CAAQ,CAAEzB,KAAAA,CAAOF,IAAKE,CAAAA,KAAAA,CAAOC,aAAeH,CAAAA,IAAAA,CAAKG,aAEpF,CAAA,CAAA,CAAA,CAAA,EAEO,GAAAS,GAAA,gBAAAV,KAAA,UAAA4B,YAAAA,CAAAA,CAAAA,CACN,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,uKAG4BjC,IAAKC,CAAAA,KAAAA,EAK7C,CAEO,GAAAW,GAAA,gBAAAV,KAAA,UAAAgC,YAAAA,CAAAA,CACN,CAAA,MAAOH,CAAAA,CAAI,CAAAI,gBAAA,GAAAA,gBAAA,CAAAF,sBAAA,sKAG4BjC,IAAKE,CAAAA,KAAAA,EAK7C,CAEO,GAAAU,GAAA,wBAAAV,KAAA,UAAAkC,oBAAAA,CAAAA,CACN,CAAA,MAAOL,CAAAA,CAAI,CAAAM,gBAAA,GAAAA,gBAAA,CAAAJ,sBAAA,wEAELjC,IAAAA,CAAKG,cACH4B,CAAI,CAAAO,gBAAA,GAAAA,gBAAA,CAAAL,sBAAA,6QAGGjC,IAAKG,CAAAA,aAAAA,EAKZ4B,CAAI,CAAAQ,gBAAA,GAAAA,gBAAA,CAAAN,sBAAA,QAAA,EAGb,CAEO,GAAArB,GAAA,oBAAAV,KAAA,UAAAsC,gBAAAA,CAAAA,CACN,CAAA,MAAOT,CAAAA,CAAI,CAAAU,gBAAA,GAAAA,gBAAA,CAAAR,sBAAA,yBACPjC,IAAAA,CAAKK,SACH0B,CAAI,CAAAW,gBAAA,GAAAA,gBAAA,CAAAT,sBAAA,iKACiCjC,IAAKsB,CAAAA,WAAAA,CACnBtB,IAAAA,CAAKO,UAAc,EAAA,OAAA,EAG1CwB,CAAI,CAAAY,gBAAA,GAAAA,gBAAA,CAAAV,sBAAA,QAAA,EAEX,CAEM,GAAArB,GAAA,UAAAV,KAAA,UAAA0C,MAAAA,CAAAA,CACL,CAAA,MAAOb,CAAAA,CAAI,CAAAc,gBAAA,GAAAA,gBAAA,CAAAZ,sBAAA,iOACmBjC,IAAK6B,CAAAA,WAAAA,CAE3B7B,IAAAA,CAAKM,IAAOyB,CAAAA,CAAI,CAAAe,iBAAA,GAAAA,iBAAA,CAAAb,sBAAA,uCAAsBjC,IAAAA,CAAKM,MAAgByB,CAAI,CAAAgB,iBAAA,GAAAA,iBAAA,CAAAd,sBAAA,QAAA,CAEjEjC,IAAK8B,CAAAA,YAAAA,CAAAA,CAAAA,CAEL9B,IAAKkC,CAAAA,YAAAA,CAAAA,CAAAA,CACLlC,IAAKoC,CAAAA,oBAAAA,CAAAA,CAAAA,CACLpC,IAAKwC,CAAAA,gBAAAA,CAAAA,CAAAA,EAGZ,CAAA,KAAA5B,GAAA,UAAAoC,GAAA,CAtGM,SAAAA,IAAA,CAAWC,CAChB,MAAO,CAACA,CACT,CAAA,EAED,MAjBkCC,CAA7B,CAmHJ,EAxGctD,EAAWsB,WAAqB,CAAA,EAAA,CAVnBiC,EAAA,CAA3BC,CAAAA,CAAS,CAAEC,IAAMC,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAqB1D,EAAA2D,SAAA,CAAA,OAAA,CAAA,IAAA,IACXJ,CAAA,CAAA,CAA3BC,EAAS,CAAEC,IAAAA,CAAMC,UAAqB1D,CAAA2D,CAAAA,SAAAA,CAAA,YAAA,EACXJ,CAAAA,CAAAA,CAAAA,CAAA,CAA3BC,CAAS,CAAA,CAAEC,KAAMG,MAAoC5D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA2D,UAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CACzBJ,EAAA,CAA5BC,CAAAA,CAAS,CAAEC,IAAMI,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAA4B7D,EAAA2D,SAAA,CAAA,UAAA,CAAA,IAAA,IACjBJ,CAAA,CAAA,CAA5BC,EAAS,CAAEC,IAAAA,CAAMI,WAA4B7D,CAAA2D,CAAAA,SAAAA,CAAA,eAAA,EAClBJ,CAAAA,CAAAA,CAAAA,CAAA,CAA3BC,CAAS,CAAA,CAAEC,KAAMC,MAAoB1D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA2D,UAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CACVJ,EAAA,CAA3BC,CAAAA,CAAS,CAAEC,IAAMC,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA0B1D,EAAA2D,SAAA,CAAA,YAAA,CAAA,IAAA,IACAJ,CAAA,CAAA,CAA3CC,EAAS,CAAEC,IAAAA,CAAMI,QAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuB9D,EAAA2D,SAAA,CAAA,QAAA,CAAA,IAAA,gBARhD3D,CAAcC,CAAAA,EAAAA,CAAAsD,EAAA,CAD1BQ,CAAAA,CAAc,qBACF/D"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,i;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",i=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\n\n .filter-chips {\n display: flex;\n align-items: center;\n }\n\n\n .chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: 4px;\n font-size: 14px;\n background-color: var(--nile-filter-chip-background-default);\n color: var(--nile-filter-chip-text-default);\n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n box-sizing: border-box;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\n .chip:active {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n:host([active]) .chip {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n\n\n .icon {\n color: var(--nile-filter-chip-icon-color-default);\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n top: 12px;\n }\n\n .label {\n font-weight: 500;\n color: var(--nile-filter-chip-label-color-default);\n }\n\n nile-badge::part(base) {\n width: auto;\n height: 14px;\n border-radius: 100px;\n padding: 6px;\n gap: 10px;\n font-size: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n\n .chip-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .clear-all-container {\n margin-left: 18px;\n white-space: nowrap;\n cursor: pointer;\n }\n\n\n .value {\n color: var(--nile-filter-chip-values-color-default);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\n vertical-align: bottom;\n}\n\n\n .close-icon {\n color: var(--nile-filter-chip-close-icon-color-default);\n cursor: pointer;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: background-color 0.2s;\n }\n\n .close-icon:hover {\n background-color: var(--nile-filter-chip-close-icon-hover-background);\n color: var(--nile-filter-chip-close-icon-hover-color);\n }\n\n.label-wrapper {\n margin-right: 4px;\n}\n\n::slotted([slot=\"icon\"]) {\n margin-right: 6px;\n}\n\n.value-wrapper {\n margin-right: 4px; \n}\n\n.badge-wrapper {\n margin-right: 12px; \n}\n\n"]))));}};});
|
1
|
+
System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,i;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",i=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\n\n .filter-chips {\n display: flex;\n align-items: center;\n }\n\n\n .chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: 4px;\n font-size: 14px;\n background-color: var(--nile-filter-chip-background-default);\n color: var(--nile-filter-chip-text-default);\n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n box-sizing: border-box;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\n .chip:active {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n:host([active]) .chip {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n\n\n .icon {\n color: var(--nile-filter-chip-icon-color-default);\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n top: 12px;\n }\n\n .label {\n font-weight: 500;\n color: var(--nile-filter-chip-label-color-default);\n }\n\n nile-badge::part(base) {\n width: auto;\n height: 14px;\n border-radius: 100px;\n padding: 6px;\n gap: 10px;\n font-size: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n\n .chip-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .clear-all-container {\n margin-left: 18px;\n white-space: nowrap;\n cursor: pointer;\n }\n\n\n .value {\n color: var(--nile-filter-chip-values-color-default);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\n vertical-align: bottom;\n}\n\n\n .close-icon {\n color: var(--nile-filter-chip-close-icon-color-default);\n cursor: pointer;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: background-color 0.2s;\n }\n\n .close-icon:hover {\n background-color: var(--nile-filter-chip-close-icon-hover-background);\n color: var(--nile-filter-chip-close-icon-hover-color);\n }\n\n.label-wrapper {\n margin-right: 4px;\n}\n\n::slotted([slot=\"icon\"]) {\n margin-right: 6px;\n}\n\n.value-wrapper {\n margin-right: 4px; \n}\n\n.badge-wrapper {\n margin-right: 12px; \n}\n\n.badge{\n display: inline-flex;\n align-items: center;\n height: 20px; \n}\n\nnile-badge::part(content) {\n line-height: 20px;\n}\n\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-filter-chip.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-filter-chip.css.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.css.ts"],"sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit';\n\n/**\n * FilterChip CSS\n */\n\nexport const styles = css`\n\n\n .filter-chips {\n display: flex;\n align-items: center;\n }\n\n\n .chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: 4px;\n font-size: 14px;\n background-color: var(--nile-filter-chip-background-default);\n color: var(--nile-filter-chip-text-default);\n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n box-sizing: border-box;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\n .chip:active {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n:host([active]) .chip {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n\n\n .icon {\n color: var(--nile-filter-chip-icon-color-default);\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n top: 12px;\n }\n\n .label {\n font-weight: 500;\n color: var(--nile-filter-chip-label-color-default);\n }\n\n nile-badge::part(base) {\n width: auto;\n height: 14px;\n border-radius: 100px;\n padding: 6px;\n gap: 10px;\n font-size: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n\n .chip-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .clear-all-container {\n margin-left: 18px;\n white-space: nowrap;\n cursor: pointer;\n }\n\n\n .value {\n color: var(--nile-filter-chip-values-color-default);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\n vertical-align: bottom;\n}\n\n\n .close-icon {\n color: var(--nile-filter-chip-close-icon-color-default);\n cursor: pointer;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: background-color 0.2s;\n }\n\n .close-icon:hover {\n background-color: var(--nile-filter-chip-close-icon-hover-background);\n color: var(--nile-filter-chip-close-icon-hover-color);\n }\n\n.label-wrapper {\n margin-right: 4px;\n}\n\n::slotted([slot=\"icon\"]) {\n margin-right: 6px;\n}\n\n.value-wrapper {\n margin-right: 4px; \n}\n\n.badge-wrapper {\n margin-right: 12px; \n}\n\n`;\n\nexport default [styles];\n\n "],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAaaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
1
|
+
{"version":3,"file":"nile-filter-chip.css.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.css.ts"],"sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit';\n\n/**\n * FilterChip CSS\n */\n\nexport const styles = css`\n\n\n .filter-chips {\n display: flex;\n align-items: center;\n }\n\n\n .chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: 4px;\n font-size: 14px;\n background-color: var(--nile-filter-chip-background-default);\n color: var(--nile-filter-chip-text-default);\n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n box-sizing: border-box;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\n .chip:active {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n:host([active]) .chip {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n\n\n .icon {\n color: var(--nile-filter-chip-icon-color-default);\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n top: 12px;\n }\n\n .label {\n font-weight: 500;\n color: var(--nile-filter-chip-label-color-default);\n }\n\n nile-badge::part(base) {\n width: auto;\n height: 14px;\n border-radius: 100px;\n padding: 6px;\n gap: 10px;\n font-size: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n\n .chip-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .clear-all-container {\n margin-left: 18px;\n white-space: nowrap;\n cursor: pointer;\n }\n\n\n .value {\n color: var(--nile-filter-chip-values-color-default);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\n vertical-align: bottom;\n}\n\n\n .close-icon {\n color: var(--nile-filter-chip-close-icon-color-default);\n cursor: pointer;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: background-color 0.2s;\n }\n\n .close-icon:hover {\n background-color: var(--nile-filter-chip-close-icon-hover-background);\n color: var(--nile-filter-chip-close-icon-hover-color);\n }\n\n.label-wrapper {\n margin-right: 4px;\n}\n\n::slotted([slot=\"icon\"]) {\n margin-right: 6px;\n}\n\n.value-wrapper {\n margin-right: 4px; \n}\n\n.badge-wrapper {\n margin-right: 12px; \n}\n\n.badge{\n display: inline-flex;\n align-items: center;\n height: 20px; \n}\n\nnile-badge::part(content) {\n line-height: 20px;\n}\n\n`;\n\nexport default [styles];\n\n "],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAaaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -118,4 +118,14 @@ import{css as e}from"lit";const i=e`
|
|
118
118
|
margin-right: 12px;
|
119
119
|
}
|
120
120
|
|
121
|
+
.badge{
|
122
|
+
display: inline-flex;
|
123
|
+
align-items: center;
|
124
|
+
height: 20px;
|
125
|
+
}
|
126
|
+
|
127
|
+
nile-badge::part(content) {
|
128
|
+
line-height: 20px;
|
129
|
+
}
|
130
|
+
|
121
131
|
`;export{i as s};
|
@@ -16,7 +16,7 @@ import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as
|
|
16
16
|
<slot name="suffix">
|
17
17
|
${this.viewMoreCount?t`
|
18
18
|
<span class="badge-wrapper">
|
19
|
-
<nile-badge variant="primary" pilltype="pill-color">
|
19
|
+
<nile-badge class="badge" part="badge" variant="primary" pilltype="pill-color" exportparts="content, base">
|
20
20
|
+${this.viewMoreCount}
|
21
21
|
</nile-badge>
|
22
22
|
</span>
|