@esri/calcite-components 1.0.0-next.311 → 1.0.0-next.312
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calcite/assets/calcite-icon/checkSquareF16.json +1 -0
- package/dist/calcite/assets/calcite-icon/checkSquareF24.json +1 -0
- package/dist/calcite/assets/calcite-icon/checkSquareF32.json +1 -0
- package/dist/calcite/assets/calcite-icon/lineSolid4.json +1 -0
- package/dist/calcite/assets/calcite-icon/squareF16.json +1 -0
- package/dist/calcite/assets/calcite-icon/squareF24.json +1 -0
- package/dist/calcite/assets/calcite-icon/squareF32.json +1 -0
- package/dist/calcite/assets/calcite-icon/xHexagon16.json +1 -0
- package/dist/calcite/assets/calcite-icon/xHexagon24.json +1 -0
- package/dist/calcite/assets/calcite-icon/xHexagon32.json +1 -0
- package/dist/calcite/assets/calcite-icon/xHexagonF16.json +1 -0
- package/dist/calcite/assets/calcite-icon/xHexagonF24.json +1 -0
- package/dist/calcite/assets/calcite-icon/xHexagonF32.json +1 -0
- package/dist/calcite/assets/calcite-icon/xOctagonF16.json +1 -0
- package/dist/calcite/assets/calcite-icon/xOctagonF24.json +1 -0
- package/dist/calcite/assets/calcite-icon/xOctagonF32.json +1 -0
- package/dist/calcite/calcite.esm.js +1 -1
- package/dist/calcite/p-0229a408.js +5 -0
- package/dist/calcite/{p-54394dfe.system.entry.js → p-0d807182.system.entry.js} +1 -1
- package/dist/calcite/{p-b1351c3e.system.entry.js → p-21290fba.system.entry.js} +1 -1
- package/dist/calcite/{p-3a592bf3.system.entry.js → p-34038a94.system.entry.js} +1 -1
- package/dist/calcite/{p-d550ee4d.entry.js → p-34e89de8.entry.js} +1 -1
- package/dist/calcite/p-35a5c74c.system.js +5 -0
- package/dist/calcite/{p-688f06b9.entry.js → p-3b29e94a.entry.js} +1 -1
- package/dist/calcite/{p-fc643963.entry.js → p-45b4443f.entry.js} +1 -1
- package/dist/calcite/{p-dd464e44.system.entry.js → p-55a5535b.system.entry.js} +1 -1
- package/dist/calcite/p-8e252799.system.js +1 -1
- package/dist/calcite/{p-502ea583.entry.js → p-9a3bed69.entry.js} +1 -1
- package/dist/calcite/{p-109049e6.system.entry.js → p-aaec0d11.system.entry.js} +1 -1
- package/dist/calcite/{p-75264173.entry.js → p-bab99544.entry.js} +1 -1
- package/dist/calcite/{p-968ea270.entry.js → p-bdb92546.entry.js} +1 -1
- package/dist/calcite/{p-ca6025ab.system.entry.js → p-cbbfa133.system.entry.js} +1 -1
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/calcite-popover_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-shell_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tooltip_2.cjs.entry.js +1 -1
- package/dist/cjs/{popper-87bf13e6.js → popper-a7580aca.js} +90 -64
- package/dist/collection/components/calcite-icon/assets/calcite-icon/checkSquareF16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/checkSquareF24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/checkSquareF32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/lineSolid4.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/squareF16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/squareF24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/squareF32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/xHexagon16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/xHexagon24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/xHexagon32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/xHexagonF16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/xHexagonF24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/xHexagonF32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/xOctagonF16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/xOctagonF24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/xOctagonF32.json +1 -0
- package/dist/collection/components/calcite-label/interfaces.js +1 -0
- package/dist/collection/components/calcite-shell-panel/calcite-shell-panel.css +1 -0
- package/dist/collection/demos/_assets/demo-spacer.js +17 -0
- package/dist/collection/demos/_assets/demo-template.js +13 -0
- package/dist/collection/demos/_assets/head.js +45 -0
- package/dist/components/calcite-shell-panel.js +1 -1
- package/dist/components/popper.js +90 -64
- package/dist/custom-elements/index.js +91 -65
- package/dist/esm/calcite-combobox_3.entry.js +1 -1
- package/dist/esm/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm/calcite-input-date-picker.entry.js +1 -1
- package/dist/esm/calcite-popover_2.entry.js +1 -1
- package/dist/esm/calcite-shell_3.entry.js +1 -1
- package/dist/esm/calcite-tooltip_2.entry.js +1 -1
- package/dist/esm/{popper-dc4b45cf.js → popper-f5caedc4.js} +90 -64
- package/dist/esm-es5/calcite-combobox_3.entry.js +1 -1
- package/dist/esm-es5/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm-es5/calcite-input-date-picker.entry.js +1 -1
- package/dist/esm-es5/calcite-popover_2.entry.js +1 -1
- package/dist/esm-es5/calcite-shell_3.entry.js +1 -1
- package/dist/esm-es5/calcite-tooltip_2.entry.js +1 -1
- package/dist/esm-es5/popper-f5caedc4.js +5 -0
- package/dist/extras/docs-json.json +1 -1
- package/hydrate/index.js +91 -65
- package/package.json +7 -7
- package/readme.md +2 -2
- package/dist/calcite/p-b1f88d45.system.js +0 -5
- package/dist/calcite/p-d53cc958.js +0 -5
- package/dist/esm-es5/popper-dc4b45cf.js +0 -5
|
@@ -147,7 +147,7 @@ const TEXT = {
|
|
|
147
147
|
resize: "Resize"
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
const calciteShellPanelCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex:0 1 auto;flex:0 1 auto;--calcite-shell-panel-detached-max-height:unset}.container{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;background-color:transparent;-ms-flex:1 1 auto;flex:1 1 auto;pointer-events:none;color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}.container *{-webkit-box-sizing:border-box;box-sizing:border-box}:host(:hover) .separator:not(:hover):not(:focus),:host(:focus-within) .separator:not(:hover):not(:focus){opacity:1;background-color:var(--calcite-ui-border-3)}.separator{position:absolute;background-color:transparent;bottom:0;display:-ms-flexbox;display:flex;height:100%;opacity:0;pointer-events:auto;top:0;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;width:0.125rem;z-index:10;cursor:col-resize;outline:none}.separator:hover{opacity:1;background-color:var(--calcite-ui-border-2)}.separator:focus{background-color:var(--calcite-ui-brand);opacity:1}:host([position=start]) .separator{inset-inline-end:-2px}:host([position=end]) .separator{inset-inline-start:-2px}::slotted(calcite-panel),::slotted(calcite-flow){-ms-flex:1 1 auto;flex:1 1 auto;height:100%;width:100%;max-height:unset;max-width:unset}::slotted(.calcite-match-height){display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.content{-ms-flex-align:stretch;align-items:stretch;-ms-flex-item-align:stretch;align-self:stretch;background-color:var(--calcite-ui-background);display:-ms-flexbox;display:flex;padding:0;pointer-events:auto;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:var(--calcite-shell-panel-width);max-width:var(--calcite-shell-panel-max-width);min-width:var(--calcite-shell-panel-min-width);-webkit-transition:max-height 150ms ease-in-out, max-width 150ms ease-in-out;transition:max-height 150ms ease-in-out, max-width 150ms ease-in-out}.content__header{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:0 1 auto;flex:0 1 auto;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:stretch;align-items:stretch}.content__body{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;overflow:hidden}:host([width-scale=s]) .content{--calcite-shell-panel-width:calc(var(--calcite-panel-width-multiplier) * 12vw);--calcite-shell-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 300px);--calcite-shell-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 150px)}:host([width-scale=m]) .content{--calcite-shell-panel-width:calc(var(--calcite-panel-width-multiplier) * 20vw);--calcite-shell-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 420px);--calcite-shell-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 240px)}:host([width-scale=l]) .content{--calcite-shell-panel-width:calc(var(--calcite-panel-width-multiplier) * 45vw);--calcite-shell-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 680px);--calcite-shell-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 340px)}:host([detached-height-scale=s]) .content--detached{--calcite-shell-panel-detached-max-height:40vh}:host([detached-height-scale=m]) .content--detached{--calcite-shell-panel-detached-max-height:60vh}:host([detached-height-scale=l]) .content--detached{--calcite-shell-panel-detached-max-height:80vh}.content--detached{border-radius:0.25rem;-webkit-box-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);box-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);height:auto;overflow:hidden;margin-top:0.5rem;margin-bottom:auto;margin-left:0.5rem;margin-right:0.5rem;max-height:var(--calcite-shell-panel-detached-max-height)}.content--detached ::slotted(calcite-panel),.content--detached ::slotted(calcite-flow){max-height:unset}:host([position=start]) .content--detached ::slotted(calcite-panel),:host([position=start]) .content--detached ::slotted(calcite-flow),:host([position=end]) .content--detached ::slotted(calcite-panel),:host([position=end]) .content--detached ::slotted(calcite-flow){border-style:none}.content[hidden]{display:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel){border-width:1px;border-color:var(--calcite-ui-border-3);border-style:solid}:host([position=start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]) .content ::slotted(calcite-flow),:host([position=start]) .content ::slotted(calcite-panel){-webkit-border-start:none;border-inline-start:none}:host([position=end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]) .content ::slotted(calcite-flow),:host([position=end]) .content ::slotted(calcite-panel){-webkit-border-end:none;border-inline-end:none}";
|
|
150
|
+
const calciteShellPanelCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex:0 1 auto;flex:0 1 auto;pointer-events:none;--calcite-shell-panel-detached-max-height:unset}.container{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;background-color:transparent;-ms-flex:1 1 auto;flex:1 1 auto;pointer-events:none;color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}.container *{-webkit-box-sizing:border-box;box-sizing:border-box}:host(:hover) .separator:not(:hover):not(:focus),:host(:focus-within) .separator:not(:hover):not(:focus){opacity:1;background-color:var(--calcite-ui-border-3)}.separator{position:absolute;background-color:transparent;bottom:0;display:-ms-flexbox;display:flex;height:100%;opacity:0;pointer-events:auto;top:0;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;width:0.125rem;z-index:10;cursor:col-resize;outline:none}.separator:hover{opacity:1;background-color:var(--calcite-ui-border-2)}.separator:focus{background-color:var(--calcite-ui-brand);opacity:1}:host([position=start]) .separator{inset-inline-end:-2px}:host([position=end]) .separator{inset-inline-start:-2px}::slotted(calcite-panel),::slotted(calcite-flow){-ms-flex:1 1 auto;flex:1 1 auto;height:100%;width:100%;max-height:unset;max-width:unset}::slotted(.calcite-match-height){display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.content{-ms-flex-align:stretch;align-items:stretch;-ms-flex-item-align:stretch;align-self:stretch;background-color:var(--calcite-ui-background);display:-ms-flexbox;display:flex;padding:0;pointer-events:auto;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:var(--calcite-shell-panel-width);max-width:var(--calcite-shell-panel-max-width);min-width:var(--calcite-shell-panel-min-width);-webkit-transition:max-height 150ms ease-in-out, max-width 150ms ease-in-out;transition:max-height 150ms ease-in-out, max-width 150ms ease-in-out}.content__header{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:0 1 auto;flex:0 1 auto;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:stretch;align-items:stretch}.content__body{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;overflow:hidden}:host([width-scale=s]) .content{--calcite-shell-panel-width:calc(var(--calcite-panel-width-multiplier) * 12vw);--calcite-shell-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 300px);--calcite-shell-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 150px)}:host([width-scale=m]) .content{--calcite-shell-panel-width:calc(var(--calcite-panel-width-multiplier) * 20vw);--calcite-shell-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 420px);--calcite-shell-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 240px)}:host([width-scale=l]) .content{--calcite-shell-panel-width:calc(var(--calcite-panel-width-multiplier) * 45vw);--calcite-shell-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 680px);--calcite-shell-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 340px)}:host([detached-height-scale=s]) .content--detached{--calcite-shell-panel-detached-max-height:40vh}:host([detached-height-scale=m]) .content--detached{--calcite-shell-panel-detached-max-height:60vh}:host([detached-height-scale=l]) .content--detached{--calcite-shell-panel-detached-max-height:80vh}.content--detached{border-radius:0.25rem;-webkit-box-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);box-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);height:auto;overflow:hidden;margin-top:0.5rem;margin-bottom:auto;margin-left:0.5rem;margin-right:0.5rem;max-height:var(--calcite-shell-panel-detached-max-height)}.content--detached ::slotted(calcite-panel),.content--detached ::slotted(calcite-flow){max-height:unset}:host([position=start]) .content--detached ::slotted(calcite-panel),:host([position=start]) .content--detached ::slotted(calcite-flow),:host([position=end]) .content--detached ::slotted(calcite-panel),:host([position=end]) .content--detached ::slotted(calcite-flow){border-style:none}.content[hidden]{display:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel){border-width:1px;border-color:var(--calcite-ui-border-3);border-style:solid}:host([position=start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]) .content ::slotted(calcite-flow),:host([position=start]) .content ::slotted(calcite-panel){-webkit-border-start:none;border-inline-start:none}:host([position=end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]) .content ::slotted(calcite-flow),:host([position=end]) .content ::slotted(calcite-panel){-webkit-border-end:none;border-inline-end:none}";
|
|
151
151
|
|
|
152
152
|
let CalciteShellPanel = class {
|
|
153
153
|
constructor(hostRef) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-9de00868.js';
|
|
6
6
|
import { g as guid } from './guid-196bd5ea.js';
|
|
7
|
-
import { d as defaultOffsetDistance, u as updatePopper, c as createPopper, C as CSS$1 } from './popper-
|
|
7
|
+
import { d as defaultOffsetDistance, u as updatePopper, c as createPopper, C as CSS$1 } from './popper-f5caedc4.js';
|
|
8
8
|
import { q as queryElementRoots } from './dom-f24e866c.js';
|
|
9
9
|
import { g as getKey } from './key-69001a68.js';
|
|
10
10
|
|
|
@@ -160,29 +160,32 @@ function getBasePlacement(placement) {
|
|
|
160
160
|
return placement.split('-')[0];
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
var max = Math.max;
|
|
164
|
+
var min = Math.min;
|
|
165
|
+
var round = Math.round;
|
|
166
|
+
|
|
167
|
+
function getBoundingClientRect(element, includeScale) {
|
|
168
|
+
if (includeScale === void 0) {
|
|
169
|
+
includeScale = false;
|
|
170
|
+
}
|
|
166
171
|
|
|
167
172
|
var rect = element.getBoundingClientRect();
|
|
168
173
|
var scaleX = 1;
|
|
169
|
-
var scaleY = 1;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
// }
|
|
185
|
-
// }
|
|
174
|
+
var scaleY = 1;
|
|
175
|
+
|
|
176
|
+
if (isHTMLElement(element) && includeScale) {
|
|
177
|
+
var offsetHeight = element.offsetHeight;
|
|
178
|
+
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
179
|
+
// Fallback to 1 in case both values are `0`
|
|
180
|
+
|
|
181
|
+
if (offsetWidth > 0) {
|
|
182
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (offsetHeight > 0) {
|
|
186
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
186
189
|
|
|
187
190
|
return {
|
|
188
191
|
width: rect.width / scaleX,
|
|
@@ -337,13 +340,13 @@ function getMainAxisFromPlacement(placement) {
|
|
|
337
340
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
338
341
|
}
|
|
339
342
|
|
|
340
|
-
var max = Math.max;
|
|
341
|
-
var min = Math.min;
|
|
342
|
-
var round = Math.round;
|
|
343
|
-
|
|
344
343
|
function within(min$1, value, max$1) {
|
|
345
344
|
return max(min$1, min(value, max$1));
|
|
346
345
|
}
|
|
346
|
+
function withinMaxClamp(min, value, max) {
|
|
347
|
+
var v = within(min, value, max);
|
|
348
|
+
return v > max ? max : v;
|
|
349
|
+
}
|
|
347
350
|
|
|
348
351
|
function getFreshSideObject() {
|
|
349
352
|
return {
|
|
@@ -466,8 +469,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
466
469
|
var win = window;
|
|
467
470
|
var dpr = win.devicePixelRatio || 1;
|
|
468
471
|
return {
|
|
469
|
-
x: round(
|
|
470
|
-
y: round(
|
|
472
|
+
x: round(x * dpr) / dpr || 0,
|
|
473
|
+
y: round(y * dpr) / dpr || 0
|
|
471
474
|
};
|
|
472
475
|
}
|
|
473
476
|
|
|
@@ -482,7 +485,8 @@ function mapToStyles(_ref2) {
|
|
|
482
485
|
position = _ref2.position,
|
|
483
486
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
484
487
|
adaptive = _ref2.adaptive,
|
|
485
|
-
roundOffsets = _ref2.roundOffsets
|
|
488
|
+
roundOffsets = _ref2.roundOffsets,
|
|
489
|
+
isFixed = _ref2.isFixed;
|
|
486
490
|
|
|
487
491
|
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
|
|
488
492
|
_ref3$x = _ref3.x,
|
|
@@ -514,16 +518,18 @@ function mapToStyles(_ref2) {
|
|
|
514
518
|
offsetParent = offsetParent;
|
|
515
519
|
|
|
516
520
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
517
|
-
sideY = bottom;
|
|
518
|
-
|
|
519
|
-
|
|
521
|
+
sideY = bottom;
|
|
522
|
+
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
523
|
+
offsetParent[heightProp];
|
|
524
|
+
y -= offsetY - popperRect.height;
|
|
520
525
|
y *= gpuAcceleration ? 1 : -1;
|
|
521
526
|
}
|
|
522
527
|
|
|
523
528
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
524
|
-
sideX = right;
|
|
525
|
-
|
|
526
|
-
|
|
529
|
+
sideX = right;
|
|
530
|
+
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
531
|
+
offsetParent[widthProp];
|
|
532
|
+
x -= offsetX - popperRect.width;
|
|
527
533
|
x *= gpuAcceleration ? 1 : -1;
|
|
528
534
|
}
|
|
529
535
|
}
|
|
@@ -556,7 +562,8 @@ function computeStyles(_ref4) {
|
|
|
556
562
|
variation: getVariation(state.placement),
|
|
557
563
|
popper: state.elements.popper,
|
|
558
564
|
popperRect: state.rects.popper,
|
|
559
|
-
gpuAcceleration: gpuAcceleration
|
|
565
|
+
gpuAcceleration: gpuAcceleration,
|
|
566
|
+
isFixed: state.options.strategy === 'fixed'
|
|
560
567
|
};
|
|
561
568
|
|
|
562
569
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -814,7 +821,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
814
821
|
}
|
|
815
822
|
|
|
816
823
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
817
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
824
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
818
825
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
819
826
|
// clipping (or hiding) overflowing elements with a position different from
|
|
820
827
|
// `initial`
|
|
@@ -831,7 +838,7 @@ function getClippingParents(element) {
|
|
|
831
838
|
|
|
832
839
|
|
|
833
840
|
return clippingParents.filter(function (clippingParent) {
|
|
834
|
-
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
|
|
841
|
+
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle(clippingParent).position !== 'static' : true);
|
|
835
842
|
});
|
|
836
843
|
} // Gets the maximum area that the element is visible in due to any number of
|
|
837
844
|
// clipping parents
|
|
@@ -1327,6 +1334,14 @@ function preventOverflow(_ref) {
|
|
|
1327
1334
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
1328
1335
|
placement: state.placement
|
|
1329
1336
|
})) : tetherOffset;
|
|
1337
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
1338
|
+
mainAxis: tetherOffsetValue,
|
|
1339
|
+
altAxis: tetherOffsetValue
|
|
1340
|
+
} : Object.assign({
|
|
1341
|
+
mainAxis: 0,
|
|
1342
|
+
altAxis: 0
|
|
1343
|
+
}, tetherOffsetValue);
|
|
1344
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
1330
1345
|
var data = {
|
|
1331
1346
|
x: 0,
|
|
1332
1347
|
y: 0
|
|
@@ -1336,13 +1351,15 @@ function preventOverflow(_ref) {
|
|
|
1336
1351
|
return;
|
|
1337
1352
|
}
|
|
1338
1353
|
|
|
1339
|
-
if (checkMainAxis
|
|
1354
|
+
if (checkMainAxis) {
|
|
1355
|
+
var _offsetModifierState$;
|
|
1356
|
+
|
|
1340
1357
|
var mainSide = mainAxis === 'y' ? top : left;
|
|
1341
1358
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
1342
1359
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
1343
1360
|
var offset = popperOffsets[mainAxis];
|
|
1344
|
-
var min$1 =
|
|
1345
|
-
var max$1 =
|
|
1361
|
+
var min$1 = offset + overflow[mainSide];
|
|
1362
|
+
var max$1 = offset - overflow[altSide];
|
|
1346
1363
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
1347
1364
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
1348
1365
|
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
@@ -1362,36 +1379,45 @@ function preventOverflow(_ref) {
|
|
|
1362
1379
|
// width or height)
|
|
1363
1380
|
|
|
1364
1381
|
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
1365
|
-
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin -
|
|
1366
|
-
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax +
|
|
1382
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
1383
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
1367
1384
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
1368
1385
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
1369
|
-
var offsetModifierValue =
|
|
1370
|
-
var tetherMin =
|
|
1371
|
-
var tetherMax =
|
|
1386
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
1387
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
1388
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
1389
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
1390
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
1391
|
+
data[mainAxis] = preventedOffset - offset;
|
|
1392
|
+
}
|
|
1372
1393
|
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
1376
|
-
data[mainAxis] = preventedOffset - offset;
|
|
1377
|
-
}
|
|
1394
|
+
if (checkAltAxis) {
|
|
1395
|
+
var _offsetModifierState$2;
|
|
1378
1396
|
|
|
1379
|
-
|
|
1380
|
-
var _mainSide = mainAxis === 'x' ? top : left;
|
|
1397
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
1381
1398
|
|
|
1382
|
-
|
|
1399
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
1383
1400
|
|
|
1384
|
-
|
|
1401
|
+
var _offset = popperOffsets[altAxis];
|
|
1385
1402
|
|
|
1386
|
-
|
|
1403
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
1387
1404
|
|
|
1388
|
-
|
|
1405
|
+
var _min = _offset + overflow[_mainSide];
|
|
1389
1406
|
|
|
1390
|
-
|
|
1407
|
+
var _max = _offset - overflow[_altSide];
|
|
1391
1408
|
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1409
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
1410
|
+
|
|
1411
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
1412
|
+
|
|
1413
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
1414
|
+
|
|
1415
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
1416
|
+
|
|
1417
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
1418
|
+
|
|
1419
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
1420
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
1395
1421
|
}
|
|
1396
1422
|
|
|
1397
1423
|
state.modifiersData[name] = data;
|
|
@@ -1423,8 +1449,8 @@ function getNodeScroll(node) {
|
|
|
1423
1449
|
|
|
1424
1450
|
function isElementScaled(element) {
|
|
1425
1451
|
var rect = element.getBoundingClientRect();
|
|
1426
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
1427
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
1452
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
1453
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
1428
1454
|
return scaleX !== 1 || scaleY !== 1;
|
|
1429
1455
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
1430
1456
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -1436,9 +1462,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
1436
1462
|
}
|
|
1437
1463
|
|
|
1438
1464
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1439
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
1465
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
1440
1466
|
var documentElement = getDocumentElement(offsetParent);
|
|
1441
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
1467
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
1442
1468
|
var scroll = {
|
|
1443
1469
|
scrollLeft: 0,
|
|
1444
1470
|
scrollTop: 0
|
|
@@ -1455,7 +1481,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
1455
1481
|
}
|
|
1456
1482
|
|
|
1457
1483
|
if (isHTMLElement(offsetParent)) {
|
|
1458
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
1484
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
1459
1485
|
offsets.x += offsetParent.clientLeft;
|
|
1460
1486
|
offsets.y += offsetParent.clientTop;
|
|
1461
1487
|
} else if (documentElement) {
|
|
@@ -2,4 +2,4 @@ var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e ins
|
|
|
2
2
|
/*!
|
|
3
3
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
5
|
-
*/import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-9de00868.js";import{a as isSymbol,S as Symbol,d as debounce}from"./debounce-79648d42.js";import{i as isArray,f as forIn}from"./forIn-48d8fb84.js";import{n as nodeListToArray,a as getElementDir,d as getElementProp,C as CSS_UTILITY}from"./dom-f24e866c.js";import{g as getKey}from"./key-69001a68.js";import{u as updatePopper,c as createPopper,C as CSS$2}from"./popper-dc4b45cf.js";import{g as guid}from"./guid-196bd5ea.js";import{c as connectLabel,d as disconnectLabel,g as getLabelText}from"./label-5559055d.js";import{c as connectForm,a as afterConnectDefaultValueSet,d as disconnectForm,H as HiddenFormInputSlot}from"./form-160b0fb5.js";import{c as createObserver}from"./observers-8f0bc419.js";function arrayMap(e,t){var i=-1,n=e==null?0:e.length,o=Array(n);while(++i<n){o[i]=t(e[i],i,e)}return o}var INFINITY=1/0;var symbolProto=Symbol?Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function baseToString(e){if(typeof e=="string"){return e}if(isArray(e)){return arrayMap(e,baseToString)+""}if(isSymbol(e)){return symbolToString?symbolToString.call(e):""}var t=e+"";return t=="0"&&1/e==-INFINITY?"-0":t}function toString(e){return e==null?"":baseToString(e)}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source);function escapeRegExp(e){e=toString(e);return e&&reHasRegExpChar.test(e)?e.replace(reRegExpChar,"\\$&"):e}var filter=function(e,t){var i=escapeRegExp(t);var n=new RegExp(i,"i");if(e.length===0){console.warn("No data was passed to the filter function.\n The data argument should be an array of objects")}var o=function(e,t){var i;if((i=e)===null||i===void 0?void 0:i.constant){return true}var n=false;forIn(e,(function(e){if(typeof e==="function"){return}if(Array.isArray(e)||typeof e==="object"&&e!==null){if(o(e,t)){n=true}}else if(t.test(e)){n=true}}));return n};var a=e.filter((function(e){return o(e,n)}));return a};var ComboboxItem="CALCITE-COMBOBOX-ITEM";var ComboboxItemGroup="CALCITE-COMBOBOX-ITEM-GROUP";var ComboboxChildSelector=ComboboxItem+", "+ComboboxItemGroup;var ComboboxDefaultPlacement="bottom-leading";function getAncestors(e){var t,i;var n=(t=e.parentElement)===null||t===void 0?void 0:t.closest(ComboboxChildSelector);var o=(i=n===null||n===void 0?void 0:n.parentElement)===null||i===void 0?void 0:i.closest(ComboboxChildSelector);return[n,o].filter((function(e){return e}))}function getItemAncestors(e){var t;return((t=e.ancestors)===null||t===void 0?void 0:t.filter((function(e){return e.nodeName==="CALCITE-COMBOBOX-ITEM"})))||[]}function getItemChildren(e){return nodeListToArray(e.querySelectorAll("calcite-combobox-item"))}function hasActiveChildren(e){var t=nodeListToArray(e.querySelectorAll("calcite-combobox-item"));return t.filter((function(e){return e.selected})).length>0}function getDepth(e){var t=document.evaluate("ancestor::calcite-combobox-item | ancestor::calcite-combobox-item-group",e,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);return t.snapshotLength}var calciteComboboxCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block;position:relative}:host([disabled]){pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0.5}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}.wrapper{display:-ms-flexbox;display:flex;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);padding:0 var(--calcite-combobox-item-spacing-unit-l) 0 var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.wrapper--single{padding:0 var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.grid-input{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input{-ms-flex-positive:1;flex-grow:1;font-family:inherit;padding:0;background-color:transparent;border-style:none;color:var(--calcite-ui-text-1);-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:inherit;height:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-width:120px;margin-bottom:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-bottom:0;margin-top:0;padding:0}.wrapper--active .input-single{cursor:text}.input--hidden{width:0;min-width:0;opacity:0;pointer-events:none}.input--icon{padding:0 var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1}.input-wrap--single{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.label{padding:0;display:-ms-flexbox;display:flex;font-weight:var(--calcite-font-weight-normal);-ms-flex:1 1 auto;flex:1 1 auto;pointer-events:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;height:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--spaced{padding-top:0;padding-bottom:0;padding-left:var(--calcite-combobox-item-spacing-unit-l);padding-right:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:1rem}.icon-end{-ms-flex:none;flex:none}.popper-container{width:100%;display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0);visibility:hidden;pointer-events:none}.popper-container .calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}.popper-container[data-popper-placement^=bottom] .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.popper-container[data-popper-placement^=top] .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}.popper-container[data-popper-placement^=left] .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}.popper-container[data-popper-placement^=right] .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.popper-container[data-popper-placement] .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}.popper-container--active{pointer-events:initial;visibility:visible}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{overflow-y:auto;max-height:100vh;background-color:var(--calcite-ui-foreground-1);width:var(--calcite-dropdown-width)}.list{display:block;margin:0;padding:0}.list--hide{height:0;overflow:hidden}.chip{margin:calc(var(--calcite-combobox-item-spacing-unit-s) / 2) var(--calcite-combobox-item-spacing-unit-s) calc(var(--calcite-combobox-item-spacing-unit-s) / 2) 0;max-width:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.chip:last-child{margin-right:0}.chip--rtl{margin-right:unset;margin-left:var(--calcite-combobox-item-spacing-unit-l)}.chip--rtl:last-child{margin-left:0}.item{display:block}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";var isGroup=function(e){return e.tagName===ComboboxItemGroup};var CalciteCombobox=function(){function e(e){var t=this;registerInstance(this,e);this.calciteLookupChange=createEvent(this,"calciteLookupChange",7);this.calciteComboboxChange=createEvent(this,"calciteComboboxChange",7);this.calciteComboboxFilterChange=createEvent(this,"calciteComboboxFilterChange",7);this.calciteComboboxChipDismiss=createEvent(this,"calciteComboboxChipDismiss",7);this.calciteComboboxOpen=createEvent(this,"calciteComboboxOpen",7);this.calciteComboboxClose=createEvent(this,"calciteComboboxClose",7);this.active=false;this.disabled=false;this.maxItems=0;this.overlayPositioning="absolute";this.required=false;this.selectionMode="multi";this.scale="m";this.value=null;this.internalValueChangeFlag=false;this.items=[];this.groupItems=[];this.selectedItems=[];this.visibleItems=[];this.hideList=!this.active;this.activeItemIndex=-1;this.activeChipIndex=-1;this.activeDescendant="";this.text="";this.open=this.active;this.maxScrollerHeight=0;this.textInput=null;this.mutationObserver=createObserver("mutation",(function(){return t.updateItems()}));this.guid=guid();this.inputHeight=0;this.ignoreSelectedEventsFlag=false;this.activeTransitionProp="opacity";this.getValue=function(){var e=t.selectedItems.map((function(e){return e===null||e===void 0?void 0:e.value.toString()}));return(e===null||e===void 0?void 0:e.length)?e.length>1?e:e[0]:""};this.onLabelClick=function(){t.setFocus()};this.keydownHandler=function(e){var i=getKey(e.key,getElementDir(t.el));switch(i){case"Tab":t.activeChipIndex=-1;t.activeItemIndex=-1;if(t.allowCustomValues&&t.text){t.addCustomChip(t.text,true);e.preventDefault()}else{t.active=false}break;case"ArrowLeft":t.previousChip();break;case"ArrowRight":t.nextChip();break;case"ArrowUp":e.preventDefault();t.active=true;t.shiftActiveItemIndex(-1);break;case"ArrowDown":e.preventDefault();t.active=true;t.shiftActiveItemIndex(1);break;case"Home":t.active=true;t.updateActiveItemIndex(0);break;case"End":t.active=true;t.updateActiveItemIndex(t.visibleItems.length-1);break;case"Escape":t.active=false;break;case"Enter":if(t.activeItemIndex>-1){t.toggleSelection(t.visibleItems[t.activeItemIndex])}else if(t.activeChipIndex>-1){t.removeActiveChip()}else if(t.allowCustomValues&&t.text){t.addCustomChip(t.text,true)}break;case"Delete":case"Backspace":if(t.activeChipIndex>-1){t.removeActiveChip()}else if(!t.text&&t.isMulti()){t.removeLastChip()}break;default:if(!t.active){t.setFocus()}break}};this.toggleCloseEnd=function(){t.hideList=true;t.el.removeEventListener("calciteComboboxClose",t.toggleCloseEnd)};this.toggleOpenEnd=function(){t.hideList=false;t.el.removeEventListener("calciteComboboxOpen",t.toggleOpenEnd)};this.transitionEnd=function(e){if(e.propertyName===t.activeTransitionProp){t.active?t.calciteComboboxOpen.emit():t.calciteComboboxClose.emit()}};this.setMaxScrollerHeight=function(){if(t.active){t.maxScrollerHeight=t.getMaxScrollerHeight(t.getCombinedItems())}};this.calciteChipDismissHandler=function(e,i){t.active=false;var n=t.items.find((function(e){return e===i}));if(n){t.toggleSelection(n,false)}t.calciteComboboxChipDismiss.emit(e.detail)};this.setFocusClick=function(e){if(e.composedPath().some((function(e){return e.tagName==="CALCITE-CHIP"}))){return}t.setFocus()};this.setInactiveIfNotContained=function(e){var i=e.composedPath();if(!t.active||i.includes(t.el)||i.includes(t.referenceEl)){return}if(t.allowCustomValues&&t.text){t.addCustomChip(t.text)}if(t.selectionMode==="single"){if(t.textInput){t.textInput.value=""}t.text="";t.filterItems("");t.updateActiveItemIndex(-1)}t.active=false};this.setMenuEl=function(e){t.menuEl=e};this.setListContainerEl=function(e){t.listContainerEl=e};this.setReferenceEl=function(e){t.referenceEl=e};this.inputHandler=function(e){var i=e.target.value;t.text=i;t.filterItems(i);if(i){t.activeChipIndex=-1}};this.filterItems=function(){var e=function(e,t){return e&&t.some((function(t){var i=t.label,n=t.value;if(isGroup(e)){return n===e.label||n===e.label}return n===e.textLabel||n===e.value||i===e.textLabel||i===e.value}))};return debounce((function(i){var n=filter(t.data,i);var o=t.getCombinedItems();o.forEach((function(t){var i=!e(t,n);t.hidden=i;var o=t.ancestors,a=o[0],r=o[1];if(e(a,n)||e(r,n)){t.hidden=false}if(!i){t.ancestors.forEach((function(e){return e.hidden=false}))}}));t.visibleItems=t.getVisibleItems();t.calciteComboboxFilterChange.emit({visibleItems:__spreadArray([],t.visibleItems),text:i})}),100)}();this.internalCalciteLookupChangeEvent=function(){t.calciteLookupChange.emit(t.selectedItems)};this.emitCalciteLookupChange=debounce(this.internalCalciteLookupChangeEvent,0);this.internalComboboxChangeEvent=function(){var e=t.selectedItems;t.calciteComboboxChange.emit({selectedItems:e})};this.emitComboboxChange=debounce(this.internalComboboxChangeEvent,0);this.updateItems=function(){t.items=t.getItems();t.groupItems=t.getGroupItems();t.data=t.getData();t.selectedItems=t.getSelectedItems();t.visibleItems=t.getVisibleItems();t.needsIcon=t.getNeedsIcon();if(!t.allowCustomValues){t.setMaxScrollerHeight()}};this.comboboxFocusHandler=function(){var e;t.active=true;(e=t.textInput)===null||e===void 0?void 0:e.focus()};this.comboboxBlurHandler=function(e){t.setInactiveIfNotContained(e)}}e.prototype.activeHandler=function(e,t){var i=this;if(t&&!e){this.el.addEventListener("calciteComboboxClose",this.toggleCloseEnd);this.open=false}else if(!t&&e){this.el.addEventListener("calciteComboboxOpen",this.toggleOpenEnd);requestAnimationFrame((function(){i.reposition();i.setMaxScrollerHeight();i.open=true}))}this.reposition();this.setMaxScrollerHeight()};e.prototype.maxItemsHandler=function(){this.setMaxScrollerHeight()};e.prototype.valueHandler=function(e){if(!this.internalValueChangeFlag){var t=this.getItems();if(Array.isArray(e)){t.forEach((function(t){return t.selected=e.includes(t.value)}))}else if(e){t.forEach((function(t){return t.selected=e===t.value}))}else{t.forEach((function(e){return e.selected=false}))}this.updateItems()}};e.prototype.documentClickHandler=function(e){this.setInactiveIfNotContained(e)};e.prototype.calciteComboboxItemChangeHandler=function(e){if(this.ignoreSelectedEventsFlag){return}var t=e.target;this.toggleSelection(t,t.selected)};e.prototype.reposition=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o;return __generator(this,(function(a){switch(a.label){case 0:e=this,t=e.popper,i=e.menuEl;n=this.getModifiers();if(!t)return[3,2];return[4,updatePopper({el:i,modifiers:n,placement:ComboboxDefaultPlacement,popper:t})];case 1:o=a.sent();return[3,3];case 2:o=this.createPopper();a.label=3;case 3:o;return[2]}}))}))};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){this.active=true;(e=this.textInput)===null||e===void 0?void 0:e.focus();this.activeChipIndex=-1;this.activeItemIndex=-1;return[2]}))}))};e.prototype.connectedCallback=function(){var e;this.internalValueChangeFlag=true;this.value=this.getValue();this.internalValueChangeFlag=false;(e=this.mutationObserver)===null||e===void 0?void 0:e.observe(this.el,{childList:true,subtree:true});this.createPopper();connectLabel(this);connectForm(this)};e.prototype.componentWillLoad=function(){this.updateItems()};e.prototype.componentDidLoad=function(){afterConnectDefaultValueSet(this,this.getValue())};e.prototype.componentDidRender=function(){if(this.el.offsetHeight!==this.inputHeight){this.reposition();this.inputHeight=this.el.offsetHeight}};e.prototype.disconnectedCallback=function(){var e;(e=this.mutationObserver)===null||e===void 0?void 0:e.disconnect();this.destroyPopper();disconnectLabel(this);disconnectForm(this)};e.prototype.selectedItemsHandler=function(){this.internalValueChangeFlag=true;this.value=this.getValue();this.internalValueChangeFlag=false};e.prototype.textHandler=function(){this.updateActiveItemIndex(-1)};e.prototype.getModifiers=function(){var e={name:"flip",enabled:true};e.options={fallbackPlacements:["top-start","top","top-end","bottom-start","bottom","bottom-end"]};return[e]};e.prototype.createPopper=function(){this.destroyPopper();var e=this,t=e.menuEl,i=e.referenceEl,n=e.overlayPositioning;var o=this.getModifiers();this.popper=createPopper({el:t,modifiers:o,overlayPositioning:n,placement:ComboboxDefaultPlacement,referenceEl:i})};e.prototype.destroyPopper=function(){var e=this.popper;if(e){e.destroy()}this.popper=null};e.prototype.getMaxScrollerHeight=function(e){var t=this;var i=this.maxItems;var n=0;var o=0;e.forEach((function(e){if(n<i&&i>0){var a=t.calculateSingleItemHeight(e);if(a>0){o+=a;n++}}}));return o};e.prototype.calculateSingleItemHeight=function(e){var t=e.offsetHeight;var i=Array.from(e.querySelectorAll(ComboboxChildSelector));i.map((function(e){return e===null||e===void 0?void 0:e.offsetHeight})).forEach((function(e){t-=e}));return t};e.prototype.getCombinedItems=function(){return __spreadArray(__spreadArray([],this.groupItems),this.items)};e.prototype.toggleSelection=function(e,t){if(t===void 0){t=!e.selected}if(!e){return}if(this.isMulti()){e.selected=t;this.updateAncestors(e);this.selectedItems=this.getSelectedItems();this.emitCalciteLookupChange();this.emitComboboxChange();this.resetText();this.filterItems("")}else{this.ignoreSelectedEventsFlag=true;this.items.forEach((function(i){return i.selected=i===e?t:false}));this.ignoreSelectedEventsFlag=false;this.selectedItems=this.getSelectedItems();this.emitComboboxChange();if(this.textInput){this.textInput.value=e.textLabel}this.active=false;this.updateActiveItemIndex(-1);this.resetText();this.filterItems("")}};e.prototype.updateAncestors=function(e){if(this.selectionMode!=="ancestors"){return}var t=getItemAncestors(e);var i=getItemChildren(e);if(e.selected){t.forEach((function(e){e.selected=true}))}else{i.forEach((function(e){return e.selected=false}));__spreadArray([],t).forEach((function(e){if(!hasActiveChildren(e)){e.selected=false}}))}};e.prototype.getVisibleItems=function(){return this.items.filter((function(e){return!e.hidden}))};e.prototype.getSelectedItems=function(){var e=this;return!this.isMulti()?[this.items.find((function(e){return e.selected}))]:this.items.filter((function(t){return t.selected&&(e.selectionMode!=="ancestors"||!hasActiveChildren(t))})).sort((function(t,i){var n=e.selectedItems.indexOf(t);var o=e.selectedItems.indexOf(i);if(n>-1&&o>-1){return n-o}return o-n}))};e.prototype.getData=function(){return this.items.map((function(e){return{constant:e.constant,value:e.value,label:e.textLabel,guid:e.guid}}))};e.prototype.getNeedsIcon=function(){return this.selectionMode==="single"&&this.items.some((function(e){return e.icon}))};e.prototype.resetText=function(){if(this.textInput){this.textInput.value=""}this.text=""};e.prototype.getItems=function(){var e=Array.from(this.el.querySelectorAll(ComboboxItem));return e.filter((function(e){return!e.disabled}))};e.prototype.getGroupItems=function(){return Array.from(this.el.querySelectorAll(ComboboxItemGroup))};e.prototype.addCustomChip=function(e,t){var i=this.items.find((function(t){return t.textLabel===e}));if(i){this.toggleSelection(i,true)}else{var n=document.createElement(ComboboxItem);n.value=e;n.textLabel=e;n.guid=guid();n.selected=true;this.el.appendChild(n);this.resetText();if(t){this.setFocus()}this.updateItems();this.filterItems("");this.emitCalciteLookupChange();this.emitComboboxChange()}};e.prototype.removeActiveChip=function(){this.toggleSelection(this.selectedItems[this.activeChipIndex],false);this.setFocus()};e.prototype.removeLastChip=function(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],false);this.setFocus()};e.prototype.previousChip=function(){if(this.text){return}var e=this.selectedItems.length-1;var t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0);this.updateActiveItemIndex(-1);this.focusChip()};e.prototype.nextChip=function(){if(this.text||this.activeChipIndex===-1){return}var e=this.selectedItems.length-1;var t=this.activeChipIndex+1;if(t>e){this.activeChipIndex=-1;this.setFocus()}else{this.activeChipIndex=t;this.focusChip()}this.updateActiveItemIndex(-1)};e.prototype.focusChip=function(){var e;var t=(e=this.selectedItems[this.activeChipIndex])===null||e===void 0?void 0:e.guid;var i=this.referenceEl.querySelector("#chip-"+t);i===null||i===void 0?void 0:i.setFocus()};e.prototype.shiftActiveItemIndex=function(e){var t=this.visibleItems.length;var i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i);var n=this.visibleItems[this.activeItemIndex];var o=this.calculateSingleItemHeight(n);var a=this.listContainerEl,r=a.offsetHeight,s=a.scrollTop;if(r+s<n.offsetTop+o){this.listContainerEl.scrollTop=n.offsetTop-r+o}else if(n.offsetTop<s){this.listContainerEl.scrollTop=n.offsetTop}};e.prototype.updateActiveItemIndex=function(e){var t;this.activeItemIndex=e;var i=null;this.visibleItems.forEach((function(t,n){if(n===e){t.active=true;i=t.guid}else{t.active=false}}));this.activeDescendant=i;if(this.activeItemIndex>-1){this.activeChipIndex=-1;(t=this.textInput)===null||t===void 0?void 0:t.focus()}};e.prototype.isMulti=function(){return this.selectionMode!=="single"};e.prototype.renderChips=function(){var e=this;var t=this,i=t.activeChipIndex,n=t.scale,o=t.selectionMode,a=t.el;var r=getElementDir(a);return this.selectedItems.map((function(t,a){var s={chip:true,"chip--active":i===a,"chip--rtl":r==="rtl"};var c=__spreadArray([],getItemAncestors(t)).reverse();var l=__spreadArray(__spreadArray([],c),[t]).map((function(e){return e.textLabel}));var m=o!=="ancestors"?t.textLabel:l.join(" / ");return h("calcite-chip",{"aria-label":m,class:s,dismissLabel:"remove tag",dismissible:true,icon:t.icon,id:"chip-"+t.guid,key:t.textLabel,onCalciteChipDismiss:function(i){return e.calciteChipDismissHandler(i,t)},scale:n,title:m,value:t.value},m)}))};e.prototype.renderInput=function(){var e=this;var t=this,i=t.active,n=t.disabled,o=t.placeholder,a=t.selectionMode,r=t.needsIcon,s=t.selectedItems;var c=a==="single";var l=s[0];var m=!i&&c&&!!l;return h("span",{class:{"input-wrap":true,"input-wrap--single":c}},m&&h("span",{class:{label:true,"label--spaced":r},key:"label",onFocus:this.comboboxFocusHandler,tabindex:"0"},l.textLabel),h("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":guid,"aria-label":getLabelText(this),class:{input:true,"input--single":true,"input--transparent":this.activeChipIndex>-1,"input--hidden":m,"input--icon":c&&r},disabled:n,id:guid+"-input",key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:o,ref:function(t){return e.textInput=t},type:"text"}))};e.prototype.renderListBoxOptions=function(){return this.visibleItems.map((function(e){return h("li",{"aria-selected":(!!e.selected).toString(),id:e.guid,role:"option",tabindex:"-1"},e.textLabel)}))};e.prototype.renderPopperContainer=function(){var e;var t=this,i=t.active,n=t.maxScrollerHeight,o=t.setMenuEl,a=t.setListContainerEl,r=t.hideList,s=t.open;var c=(e={"list-container":true},e[CSS$2.animation]=true,e[CSS$2.animationActive]=i,e);var l={maxHeight:n>0?n+"px":""};return h("div",{"aria-hidden":"true",class:{"popper-container":true,"popper-container--active":s},ref:o},h("div",{class:c,onTransitionEnd:this.transitionEnd,ref:a,style:l},h("ul",{class:{list:true,"list--hide":r}},h("slot",null))))};e.prototype.renderIconStart=function(){var e=this,t=e.selectionMode,i=e.needsIcon,n=e.selectedItems;var o=n[0];return t==="single"&&i&&h("span",{class:"icon-start"},(o===null||o===void 0?void 0:o.icon)&&h("calcite-icon",{class:"selected-icon",icon:o.icon,scale:"s"}))};e.prototype.renderIconEnd=function(){return h("span",{class:"icon-end"},h("calcite-icon",{icon:"chevron-down",scale:"s"}))};e.prototype.render=function(){var e=this,t=e.guid,i=e.open,n=e.label;var o=this.selectionMode==="single";var a=t+"-label";return h(Host,{onKeyDown:this.keydownHandler},h("div",{"aria-autocomplete":"list","aria-expanded":i.toString(),"aria-haspopup":"listbox","aria-labelledby":a,"aria-owns":t,class:{wrapper:true,"wrapper--single":o||!this.selectedItems.length,"wrapper--active":i},onClick:this.setFocusClick,ref:this.setReferenceEl,role:"combobox"},h("div",{class:"grid-input"},this.renderIconStart(),!o&&this.renderChips(),h("label",{class:"screen-readers-only",htmlFor:t+"-input",id:a},n),this.renderInput()),this.renderIconEnd()),h("ul",{"aria-labelledby":a,"aria-multiselectable":"true",class:"screen-readers-only",id:t,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderPopperContainer(),h(HiddenFormInputSlot,{component:this}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{active:["activeHandler"],maxItems:["maxItemsHandler"],value:["valueHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"]}},enumerable:false,configurable:true});return e}();CalciteCombobox.style=calciteComboboxCss;var CSS$1={icon:"icon",iconActive:"icon--active",custom:"icon--custom",dot:"icon--dot",single:"label--single",label:"label",active:"label--active",selected:"label--selected",title:"title",textContainer:"text-container"};var calciteComboboxItemCss='@charset "UTF-8";@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent:1rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n );--calcite-combobox-item-indent-start:var(--calcite-combobox-item-indent-value);--calcite-combobox-item-indent-end:unset}.calcite--rtl{--calcite-combobox-item-indent-start:unset;--calcite-combobox-item-indent-end:var(--calcite-combobox-item-indent-value)}:host(:focus){-webkit-box-shadow:none;box-shadow:none}:host,ul{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:0;padding:0;outline:2px solid transparent;outline-offset:2px}.label{display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;min-width:100%;-ms-flex-align:center;align-items:center;color:var(--calcite-ui-text-3);cursor:pointer;position:relative;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;text-decoration:none;padding:var(--calcite-combobox-item-spacing-unit-s) var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{color:var(--calcite-ui-text-1);font-weight:var(--calcite-font-weight-medium)}.label--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover,.label:active{color:var(--calcite-ui-text-1);background-color:var(--calcite-ui-foreground-2);-webkit-box-shadow:none;box-shadow:none;text-decoration:none}.title{padding:0 var(--calcite-combobox-item-spacing-unit-l)}.icon{display:-ms-inline-flexbox;display:inline-flex;opacity:0;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{padding-left:var(--calcite-combobox-item-indent-start);padding-right:var(--calcite-combobox-item-indent-end)}.icon--custom{margin-top:-1px;color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;width:var(--calcite-combobox-item-spacing-unit-l)}.icon--dot:before{content:"•"}.calcite--rtl .icon--dot:before{text-align:right}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}';var CalciteComboboxItem=function(){function e(e){var t=this;registerInstance(this,e);this.calciteComboboxItemChange=createEvent(this,"calciteComboboxItemChange",7);this.disabled=false;this.selected=false;this.active=false;this.guid=guid();this.scale="m";this.itemClickHandler=function(e){e.preventDefault();if(t.disabled){return}t.selected=!t.selected}}e.prototype.selectedWatchHandler=function(){this.calciteComboboxItemChange.emit(this.el)};e.prototype.connectedCallback=function(){this.ancestors=getAncestors(this.el);this.scale=getElementProp(this.el,"scale",this.scale)};e.prototype.componentWillLoad=function(){this.hasDefaultSlot=this.el.querySelector(":not([slot])")!==null};e.prototype.toggleSelected=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.disabled){return[2]}this.selected=typeof e==="boolean"?e:!this.selected;return[2]}))}))};e.prototype.renderIcon=function(e){var t,i;var n=this,o=n.icon,a=n.disabled,r=n.selected;var s=CSS$1.icon+"--indent";var c=e?"dot":"check";var l=a?"circle-disallowed":c;var m=e&&!o&&!a;return m?h("span",{class:(t={},t[CSS$1.icon]=true,t[CSS$1.dot]=true,t[s]=true,t)}):h("calcite-icon",{class:(i={},i[CSS$1.icon]=!o,i[CSS$1.custom]=!!o,i[CSS$1.iconActive]=o&&r,i[s]=true,i),icon:o||l,scale:"s"})};e.prototype.renderChildren=function(){if(!this.hasDefaultSlot){return null}return h("ul",null,h("slot",null))};e.prototype.render=function(){var e;var t=getElementProp(this.el,"selection-mode","multi")==="single";var i=getElementDir(this.el);var n=(e={},e[CSS_UTILITY.rtl]=i==="rtl",e[CSS$1.label]=true,e[CSS$1.selected]=this.selected,e[CSS$1.active]=this.active,e[CSS$1.single]=t,e);var o=getDepth(this.el);return h(Host,{"aria-hidden":"true"},h("div",{class:"container scale--"+this.scale,style:{"--calcite-combobox-item-spacing-indent-multiplier":""+o}},h("li",{class:n,id:this.guid,onClick:this.itemClickHandler},this.renderIcon(t),h("span",{class:CSS$1.title},this.textLabel)),this.renderChildren()))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["selectedWatchHandler"]}},enumerable:false,configurable:true});return e}();CalciteComboboxItem.style=calciteComboboxItemCss;var CSS={list:"list",label:"label",title:"title"};var calciteComboboxItemGroupCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{--calcite-combobox-item-indent-start-1:var(--calcite-combobox-item-spacing-indent-1);--calcite-combobox-item-indent-end-1:unset;--calcite-combobox-item-indent-start-2:var(--calcite-combobox-item-spacing-indent-2);--calcite-combobox-item-indent-end-2:unset}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent-1:0.5rem;--calcite-combobox-item-spacing-indent-2:1rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent-1:0.75rem;--calcite-combobox-item-spacing-indent-2:1.5rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent-1:1rem;--calcite-combobox-item-spacing-indent-2:2rem}.calcite--rtl{--calcite-combobox-item-indent-start-1:unset;--calcite-combobox-item-indent-end-1:var(--calcite-combobox-item-spacing-indent-1);--calcite-combobox-item-indent-start-2:unset;--calcite-combobox-item-indent-end-2:var(--calcite-combobox-item-spacing-indent-2)}:host,.list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:0;padding:0;outline:2px solid transparent;outline-offset:2px}.label{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:100%;min-width:0;color:var(--calcite-ui-text-3);display:-ms-flexbox;display:flex}.label--indent-1{padding-left:var(--calcite-combobox-item-indent-start-1);padding-right:var(--calcite-combobox-item-indent-end-1)}.label--indent-2{padding-left:var(--calcite-combobox-item-indent-start-2);padding-right:var(--calcite-combobox-item-indent-end-2)}.title{border:0 solid;display:block;-ms-flex:1 1 0%;flex:1 1 0%;border-bottom-color:var(--calcite-ui-border-3);border-bottom-width:1px;color:var(--calcite-ui-text-2);font-weight:var(--calcite-font-weight-bold);word-wrap:break-word;word-break:break-word;padding:var(--calcite-combobox-item-spacing-unit-l) 0;margin-left:var(--calcite-combobox-item-spacing-unit-s);margin-right:var(--calcite-combobox-item-spacing-unit-s)}";var CalciteComboboxItemGroup=function(){function e(e){registerInstance(this,e);this.guid=guid();this.scale="m"}e.prototype.connectedCallback=function(){this.ancestors=getAncestors(this.el);this.scale=getElementProp(this.el,"scale",this.scale)};e.prototype.render=function(){var e,t;var i=this,n=i.el,o=i.scale;var a=getElementDir(n);var r=CSS.label+"--indent-"+getDepth(n);return h("ul",{"aria-labelledby":this.guid,class:(e={},e[CSS.list]=true,e[CSS_UTILITY.rtl]=a==="rtl",e["scale--"+o]=true,e),role:"group"},h("li",{class:(t={},t[CSS.label]=true,t[r]=true,t),id:this.guid,role:"presentation"},h("span",{class:CSS.title},this.label)),h("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();CalciteComboboxItemGroup.style=calciteComboboxItemGroupCss;export{CalciteCombobox as calcite_combobox,CalciteComboboxItem as calcite_combobox_item,CalciteComboboxItemGroup as calcite_combobox_item_group};
|
|
5
|
+
*/import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-9de00868.js";import{a as isSymbol,S as Symbol,d as debounce}from"./debounce-79648d42.js";import{i as isArray,f as forIn}from"./forIn-48d8fb84.js";import{n as nodeListToArray,a as getElementDir,d as getElementProp,C as CSS_UTILITY}from"./dom-f24e866c.js";import{g as getKey}from"./key-69001a68.js";import{u as updatePopper,c as createPopper,C as CSS$2}from"./popper-f5caedc4.js";import{g as guid}from"./guid-196bd5ea.js";import{c as connectLabel,d as disconnectLabel,g as getLabelText}from"./label-5559055d.js";import{c as connectForm,a as afterConnectDefaultValueSet,d as disconnectForm,H as HiddenFormInputSlot}from"./form-160b0fb5.js";import{c as createObserver}from"./observers-8f0bc419.js";function arrayMap(e,t){var i=-1,n=e==null?0:e.length,o=Array(n);while(++i<n){o[i]=t(e[i],i,e)}return o}var INFINITY=1/0;var symbolProto=Symbol?Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function baseToString(e){if(typeof e=="string"){return e}if(isArray(e)){return arrayMap(e,baseToString)+""}if(isSymbol(e)){return symbolToString?symbolToString.call(e):""}var t=e+"";return t=="0"&&1/e==-INFINITY?"-0":t}function toString(e){return e==null?"":baseToString(e)}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source);function escapeRegExp(e){e=toString(e);return e&&reHasRegExpChar.test(e)?e.replace(reRegExpChar,"\\$&"):e}var filter=function(e,t){var i=escapeRegExp(t);var n=new RegExp(i,"i");if(e.length===0){console.warn("No data was passed to the filter function.\n The data argument should be an array of objects")}var o=function(e,t){var i;if((i=e)===null||i===void 0?void 0:i.constant){return true}var n=false;forIn(e,(function(e){if(typeof e==="function"){return}if(Array.isArray(e)||typeof e==="object"&&e!==null){if(o(e,t)){n=true}}else if(t.test(e)){n=true}}));return n};var a=e.filter((function(e){return o(e,n)}));return a};var ComboboxItem="CALCITE-COMBOBOX-ITEM";var ComboboxItemGroup="CALCITE-COMBOBOX-ITEM-GROUP";var ComboboxChildSelector=ComboboxItem+", "+ComboboxItemGroup;var ComboboxDefaultPlacement="bottom-leading";function getAncestors(e){var t,i;var n=(t=e.parentElement)===null||t===void 0?void 0:t.closest(ComboboxChildSelector);var o=(i=n===null||n===void 0?void 0:n.parentElement)===null||i===void 0?void 0:i.closest(ComboboxChildSelector);return[n,o].filter((function(e){return e}))}function getItemAncestors(e){var t;return((t=e.ancestors)===null||t===void 0?void 0:t.filter((function(e){return e.nodeName==="CALCITE-COMBOBOX-ITEM"})))||[]}function getItemChildren(e){return nodeListToArray(e.querySelectorAll("calcite-combobox-item"))}function hasActiveChildren(e){var t=nodeListToArray(e.querySelectorAll("calcite-combobox-item"));return t.filter((function(e){return e.selected})).length>0}function getDepth(e){var t=document.evaluate("ancestor::calcite-combobox-item | ancestor::calcite-combobox-item-group",e,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);return t.snapshotLength}var calciteComboboxCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block;position:relative}:host([disabled]){pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0.5}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}.wrapper{display:-ms-flexbox;display:flex;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);padding:0 var(--calcite-combobox-item-spacing-unit-l) 0 var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.wrapper--single{padding:0 var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.grid-input{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input{-ms-flex-positive:1;flex-grow:1;font-family:inherit;padding:0;background-color:transparent;border-style:none;color:var(--calcite-ui-text-1);-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:inherit;height:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-width:120px;margin-bottom:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-bottom:0;margin-top:0;padding:0}.wrapper--active .input-single{cursor:text}.input--hidden{width:0;min-width:0;opacity:0;pointer-events:none}.input--icon{padding:0 var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1}.input-wrap--single{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.label{padding:0;display:-ms-flexbox;display:flex;font-weight:var(--calcite-font-weight-normal);-ms-flex:1 1 auto;flex:1 1 auto;pointer-events:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;height:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--spaced{padding-top:0;padding-bottom:0;padding-left:var(--calcite-combobox-item-spacing-unit-l);padding-right:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:1rem}.icon-end{-ms-flex:none;flex:none}.popper-container{width:100%;display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0);visibility:hidden;pointer-events:none}.popper-container .calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}.popper-container[data-popper-placement^=bottom] .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.popper-container[data-popper-placement^=top] .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}.popper-container[data-popper-placement^=left] .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}.popper-container[data-popper-placement^=right] .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.popper-container[data-popper-placement] .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}.popper-container--active{pointer-events:initial;visibility:visible}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{overflow-y:auto;max-height:100vh;background-color:var(--calcite-ui-foreground-1);width:var(--calcite-dropdown-width)}.list{display:block;margin:0;padding:0}.list--hide{height:0;overflow:hidden}.chip{margin:calc(var(--calcite-combobox-item-spacing-unit-s) / 2) var(--calcite-combobox-item-spacing-unit-s) calc(var(--calcite-combobox-item-spacing-unit-s) / 2) 0;max-width:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.chip:last-child{margin-right:0}.chip--rtl{margin-right:unset;margin-left:var(--calcite-combobox-item-spacing-unit-l)}.chip--rtl:last-child{margin-left:0}.item{display:block}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";var isGroup=function(e){return e.tagName===ComboboxItemGroup};var CalciteCombobox=function(){function e(e){var t=this;registerInstance(this,e);this.calciteLookupChange=createEvent(this,"calciteLookupChange",7);this.calciteComboboxChange=createEvent(this,"calciteComboboxChange",7);this.calciteComboboxFilterChange=createEvent(this,"calciteComboboxFilterChange",7);this.calciteComboboxChipDismiss=createEvent(this,"calciteComboboxChipDismiss",7);this.calciteComboboxOpen=createEvent(this,"calciteComboboxOpen",7);this.calciteComboboxClose=createEvent(this,"calciteComboboxClose",7);this.active=false;this.disabled=false;this.maxItems=0;this.overlayPositioning="absolute";this.required=false;this.selectionMode="multi";this.scale="m";this.value=null;this.internalValueChangeFlag=false;this.items=[];this.groupItems=[];this.selectedItems=[];this.visibleItems=[];this.hideList=!this.active;this.activeItemIndex=-1;this.activeChipIndex=-1;this.activeDescendant="";this.text="";this.open=this.active;this.maxScrollerHeight=0;this.textInput=null;this.mutationObserver=createObserver("mutation",(function(){return t.updateItems()}));this.guid=guid();this.inputHeight=0;this.ignoreSelectedEventsFlag=false;this.activeTransitionProp="opacity";this.getValue=function(){var e=t.selectedItems.map((function(e){return e===null||e===void 0?void 0:e.value.toString()}));return(e===null||e===void 0?void 0:e.length)?e.length>1?e:e[0]:""};this.onLabelClick=function(){t.setFocus()};this.keydownHandler=function(e){var i=getKey(e.key,getElementDir(t.el));switch(i){case"Tab":t.activeChipIndex=-1;t.activeItemIndex=-1;if(t.allowCustomValues&&t.text){t.addCustomChip(t.text,true);e.preventDefault()}else{t.active=false}break;case"ArrowLeft":t.previousChip();break;case"ArrowRight":t.nextChip();break;case"ArrowUp":e.preventDefault();t.active=true;t.shiftActiveItemIndex(-1);break;case"ArrowDown":e.preventDefault();t.active=true;t.shiftActiveItemIndex(1);break;case"Home":t.active=true;t.updateActiveItemIndex(0);break;case"End":t.active=true;t.updateActiveItemIndex(t.visibleItems.length-1);break;case"Escape":t.active=false;break;case"Enter":if(t.activeItemIndex>-1){t.toggleSelection(t.visibleItems[t.activeItemIndex])}else if(t.activeChipIndex>-1){t.removeActiveChip()}else if(t.allowCustomValues&&t.text){t.addCustomChip(t.text,true)}break;case"Delete":case"Backspace":if(t.activeChipIndex>-1){t.removeActiveChip()}else if(!t.text&&t.isMulti()){t.removeLastChip()}break;default:if(!t.active){t.setFocus()}break}};this.toggleCloseEnd=function(){t.hideList=true;t.el.removeEventListener("calciteComboboxClose",t.toggleCloseEnd)};this.toggleOpenEnd=function(){t.hideList=false;t.el.removeEventListener("calciteComboboxOpen",t.toggleOpenEnd)};this.transitionEnd=function(e){if(e.propertyName===t.activeTransitionProp){t.active?t.calciteComboboxOpen.emit():t.calciteComboboxClose.emit()}};this.setMaxScrollerHeight=function(){if(t.active){t.maxScrollerHeight=t.getMaxScrollerHeight(t.getCombinedItems())}};this.calciteChipDismissHandler=function(e,i){t.active=false;var n=t.items.find((function(e){return e===i}));if(n){t.toggleSelection(n,false)}t.calciteComboboxChipDismiss.emit(e.detail)};this.setFocusClick=function(e){if(e.composedPath().some((function(e){return e.tagName==="CALCITE-CHIP"}))){return}t.setFocus()};this.setInactiveIfNotContained=function(e){var i=e.composedPath();if(!t.active||i.includes(t.el)||i.includes(t.referenceEl)){return}if(t.allowCustomValues&&t.text){t.addCustomChip(t.text)}if(t.selectionMode==="single"){if(t.textInput){t.textInput.value=""}t.text="";t.filterItems("");t.updateActiveItemIndex(-1)}t.active=false};this.setMenuEl=function(e){t.menuEl=e};this.setListContainerEl=function(e){t.listContainerEl=e};this.setReferenceEl=function(e){t.referenceEl=e};this.inputHandler=function(e){var i=e.target.value;t.text=i;t.filterItems(i);if(i){t.activeChipIndex=-1}};this.filterItems=function(){var e=function(e,t){return e&&t.some((function(t){var i=t.label,n=t.value;if(isGroup(e)){return n===e.label||n===e.label}return n===e.textLabel||n===e.value||i===e.textLabel||i===e.value}))};return debounce((function(i){var n=filter(t.data,i);var o=t.getCombinedItems();o.forEach((function(t){var i=!e(t,n);t.hidden=i;var o=t.ancestors,a=o[0],r=o[1];if(e(a,n)||e(r,n)){t.hidden=false}if(!i){t.ancestors.forEach((function(e){return e.hidden=false}))}}));t.visibleItems=t.getVisibleItems();t.calciteComboboxFilterChange.emit({visibleItems:__spreadArray([],t.visibleItems),text:i})}),100)}();this.internalCalciteLookupChangeEvent=function(){t.calciteLookupChange.emit(t.selectedItems)};this.emitCalciteLookupChange=debounce(this.internalCalciteLookupChangeEvent,0);this.internalComboboxChangeEvent=function(){var e=t.selectedItems;t.calciteComboboxChange.emit({selectedItems:e})};this.emitComboboxChange=debounce(this.internalComboboxChangeEvent,0);this.updateItems=function(){t.items=t.getItems();t.groupItems=t.getGroupItems();t.data=t.getData();t.selectedItems=t.getSelectedItems();t.visibleItems=t.getVisibleItems();t.needsIcon=t.getNeedsIcon();if(!t.allowCustomValues){t.setMaxScrollerHeight()}};this.comboboxFocusHandler=function(){var e;t.active=true;(e=t.textInput)===null||e===void 0?void 0:e.focus()};this.comboboxBlurHandler=function(e){t.setInactiveIfNotContained(e)}}e.prototype.activeHandler=function(e,t){var i=this;if(t&&!e){this.el.addEventListener("calciteComboboxClose",this.toggleCloseEnd);this.open=false}else if(!t&&e){this.el.addEventListener("calciteComboboxOpen",this.toggleOpenEnd);requestAnimationFrame((function(){i.reposition();i.setMaxScrollerHeight();i.open=true}))}this.reposition();this.setMaxScrollerHeight()};e.prototype.maxItemsHandler=function(){this.setMaxScrollerHeight()};e.prototype.valueHandler=function(e){if(!this.internalValueChangeFlag){var t=this.getItems();if(Array.isArray(e)){t.forEach((function(t){return t.selected=e.includes(t.value)}))}else if(e){t.forEach((function(t){return t.selected=e===t.value}))}else{t.forEach((function(e){return e.selected=false}))}this.updateItems()}};e.prototype.documentClickHandler=function(e){this.setInactiveIfNotContained(e)};e.prototype.calciteComboboxItemChangeHandler=function(e){if(this.ignoreSelectedEventsFlag){return}var t=e.target;this.toggleSelection(t,t.selected)};e.prototype.reposition=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o;return __generator(this,(function(a){switch(a.label){case 0:e=this,t=e.popper,i=e.menuEl;n=this.getModifiers();if(!t)return[3,2];return[4,updatePopper({el:i,modifiers:n,placement:ComboboxDefaultPlacement,popper:t})];case 1:o=a.sent();return[3,3];case 2:o=this.createPopper();a.label=3;case 3:o;return[2]}}))}))};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){this.active=true;(e=this.textInput)===null||e===void 0?void 0:e.focus();this.activeChipIndex=-1;this.activeItemIndex=-1;return[2]}))}))};e.prototype.connectedCallback=function(){var e;this.internalValueChangeFlag=true;this.value=this.getValue();this.internalValueChangeFlag=false;(e=this.mutationObserver)===null||e===void 0?void 0:e.observe(this.el,{childList:true,subtree:true});this.createPopper();connectLabel(this);connectForm(this)};e.prototype.componentWillLoad=function(){this.updateItems()};e.prototype.componentDidLoad=function(){afterConnectDefaultValueSet(this,this.getValue())};e.prototype.componentDidRender=function(){if(this.el.offsetHeight!==this.inputHeight){this.reposition();this.inputHeight=this.el.offsetHeight}};e.prototype.disconnectedCallback=function(){var e;(e=this.mutationObserver)===null||e===void 0?void 0:e.disconnect();this.destroyPopper();disconnectLabel(this);disconnectForm(this)};e.prototype.selectedItemsHandler=function(){this.internalValueChangeFlag=true;this.value=this.getValue();this.internalValueChangeFlag=false};e.prototype.textHandler=function(){this.updateActiveItemIndex(-1)};e.prototype.getModifiers=function(){var e={name:"flip",enabled:true};e.options={fallbackPlacements:["top-start","top","top-end","bottom-start","bottom","bottom-end"]};return[e]};e.prototype.createPopper=function(){this.destroyPopper();var e=this,t=e.menuEl,i=e.referenceEl,n=e.overlayPositioning;var o=this.getModifiers();this.popper=createPopper({el:t,modifiers:o,overlayPositioning:n,placement:ComboboxDefaultPlacement,referenceEl:i})};e.prototype.destroyPopper=function(){var e=this.popper;if(e){e.destroy()}this.popper=null};e.prototype.getMaxScrollerHeight=function(e){var t=this;var i=this.maxItems;var n=0;var o=0;e.forEach((function(e){if(n<i&&i>0){var a=t.calculateSingleItemHeight(e);if(a>0){o+=a;n++}}}));return o};e.prototype.calculateSingleItemHeight=function(e){var t=e.offsetHeight;var i=Array.from(e.querySelectorAll(ComboboxChildSelector));i.map((function(e){return e===null||e===void 0?void 0:e.offsetHeight})).forEach((function(e){t-=e}));return t};e.prototype.getCombinedItems=function(){return __spreadArray(__spreadArray([],this.groupItems),this.items)};e.prototype.toggleSelection=function(e,t){if(t===void 0){t=!e.selected}if(!e){return}if(this.isMulti()){e.selected=t;this.updateAncestors(e);this.selectedItems=this.getSelectedItems();this.emitCalciteLookupChange();this.emitComboboxChange();this.resetText();this.filterItems("")}else{this.ignoreSelectedEventsFlag=true;this.items.forEach((function(i){return i.selected=i===e?t:false}));this.ignoreSelectedEventsFlag=false;this.selectedItems=this.getSelectedItems();this.emitComboboxChange();if(this.textInput){this.textInput.value=e.textLabel}this.active=false;this.updateActiveItemIndex(-1);this.resetText();this.filterItems("")}};e.prototype.updateAncestors=function(e){if(this.selectionMode!=="ancestors"){return}var t=getItemAncestors(e);var i=getItemChildren(e);if(e.selected){t.forEach((function(e){e.selected=true}))}else{i.forEach((function(e){return e.selected=false}));__spreadArray([],t).forEach((function(e){if(!hasActiveChildren(e)){e.selected=false}}))}};e.prototype.getVisibleItems=function(){return this.items.filter((function(e){return!e.hidden}))};e.prototype.getSelectedItems=function(){var e=this;return!this.isMulti()?[this.items.find((function(e){return e.selected}))]:this.items.filter((function(t){return t.selected&&(e.selectionMode!=="ancestors"||!hasActiveChildren(t))})).sort((function(t,i){var n=e.selectedItems.indexOf(t);var o=e.selectedItems.indexOf(i);if(n>-1&&o>-1){return n-o}return o-n}))};e.prototype.getData=function(){return this.items.map((function(e){return{constant:e.constant,value:e.value,label:e.textLabel,guid:e.guid}}))};e.prototype.getNeedsIcon=function(){return this.selectionMode==="single"&&this.items.some((function(e){return e.icon}))};e.prototype.resetText=function(){if(this.textInput){this.textInput.value=""}this.text=""};e.prototype.getItems=function(){var e=Array.from(this.el.querySelectorAll(ComboboxItem));return e.filter((function(e){return!e.disabled}))};e.prototype.getGroupItems=function(){return Array.from(this.el.querySelectorAll(ComboboxItemGroup))};e.prototype.addCustomChip=function(e,t){var i=this.items.find((function(t){return t.textLabel===e}));if(i){this.toggleSelection(i,true)}else{var n=document.createElement(ComboboxItem);n.value=e;n.textLabel=e;n.guid=guid();n.selected=true;this.el.appendChild(n);this.resetText();if(t){this.setFocus()}this.updateItems();this.filterItems("");this.emitCalciteLookupChange();this.emitComboboxChange()}};e.prototype.removeActiveChip=function(){this.toggleSelection(this.selectedItems[this.activeChipIndex],false);this.setFocus()};e.prototype.removeLastChip=function(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],false);this.setFocus()};e.prototype.previousChip=function(){if(this.text){return}var e=this.selectedItems.length-1;var t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0);this.updateActiveItemIndex(-1);this.focusChip()};e.prototype.nextChip=function(){if(this.text||this.activeChipIndex===-1){return}var e=this.selectedItems.length-1;var t=this.activeChipIndex+1;if(t>e){this.activeChipIndex=-1;this.setFocus()}else{this.activeChipIndex=t;this.focusChip()}this.updateActiveItemIndex(-1)};e.prototype.focusChip=function(){var e;var t=(e=this.selectedItems[this.activeChipIndex])===null||e===void 0?void 0:e.guid;var i=this.referenceEl.querySelector("#chip-"+t);i===null||i===void 0?void 0:i.setFocus()};e.prototype.shiftActiveItemIndex=function(e){var t=this.visibleItems.length;var i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i);var n=this.visibleItems[this.activeItemIndex];var o=this.calculateSingleItemHeight(n);var a=this.listContainerEl,r=a.offsetHeight,s=a.scrollTop;if(r+s<n.offsetTop+o){this.listContainerEl.scrollTop=n.offsetTop-r+o}else if(n.offsetTop<s){this.listContainerEl.scrollTop=n.offsetTop}};e.prototype.updateActiveItemIndex=function(e){var t;this.activeItemIndex=e;var i=null;this.visibleItems.forEach((function(t,n){if(n===e){t.active=true;i=t.guid}else{t.active=false}}));this.activeDescendant=i;if(this.activeItemIndex>-1){this.activeChipIndex=-1;(t=this.textInput)===null||t===void 0?void 0:t.focus()}};e.prototype.isMulti=function(){return this.selectionMode!=="single"};e.prototype.renderChips=function(){var e=this;var t=this,i=t.activeChipIndex,n=t.scale,o=t.selectionMode,a=t.el;var r=getElementDir(a);return this.selectedItems.map((function(t,a){var s={chip:true,"chip--active":i===a,"chip--rtl":r==="rtl"};var c=__spreadArray([],getItemAncestors(t)).reverse();var l=__spreadArray(__spreadArray([],c),[t]).map((function(e){return e.textLabel}));var m=o!=="ancestors"?t.textLabel:l.join(" / ");return h("calcite-chip",{"aria-label":m,class:s,dismissLabel:"remove tag",dismissible:true,icon:t.icon,id:"chip-"+t.guid,key:t.textLabel,onCalciteChipDismiss:function(i){return e.calciteChipDismissHandler(i,t)},scale:n,title:m,value:t.value},m)}))};e.prototype.renderInput=function(){var e=this;var t=this,i=t.active,n=t.disabled,o=t.placeholder,a=t.selectionMode,r=t.needsIcon,s=t.selectedItems;var c=a==="single";var l=s[0];var m=!i&&c&&!!l;return h("span",{class:{"input-wrap":true,"input-wrap--single":c}},m&&h("span",{class:{label:true,"label--spaced":r},key:"label",onFocus:this.comboboxFocusHandler,tabindex:"0"},l.textLabel),h("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":guid,"aria-label":getLabelText(this),class:{input:true,"input--single":true,"input--transparent":this.activeChipIndex>-1,"input--hidden":m,"input--icon":c&&r},disabled:n,id:guid+"-input",key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:o,ref:function(t){return e.textInput=t},type:"text"}))};e.prototype.renderListBoxOptions=function(){return this.visibleItems.map((function(e){return h("li",{"aria-selected":(!!e.selected).toString(),id:e.guid,role:"option",tabindex:"-1"},e.textLabel)}))};e.prototype.renderPopperContainer=function(){var e;var t=this,i=t.active,n=t.maxScrollerHeight,o=t.setMenuEl,a=t.setListContainerEl,r=t.hideList,s=t.open;var c=(e={"list-container":true},e[CSS$2.animation]=true,e[CSS$2.animationActive]=i,e);var l={maxHeight:n>0?n+"px":""};return h("div",{"aria-hidden":"true",class:{"popper-container":true,"popper-container--active":s},ref:o},h("div",{class:c,onTransitionEnd:this.transitionEnd,ref:a,style:l},h("ul",{class:{list:true,"list--hide":r}},h("slot",null))))};e.prototype.renderIconStart=function(){var e=this,t=e.selectionMode,i=e.needsIcon,n=e.selectedItems;var o=n[0];return t==="single"&&i&&h("span",{class:"icon-start"},(o===null||o===void 0?void 0:o.icon)&&h("calcite-icon",{class:"selected-icon",icon:o.icon,scale:"s"}))};e.prototype.renderIconEnd=function(){return h("span",{class:"icon-end"},h("calcite-icon",{icon:"chevron-down",scale:"s"}))};e.prototype.render=function(){var e=this,t=e.guid,i=e.open,n=e.label;var o=this.selectionMode==="single";var a=t+"-label";return h(Host,{onKeyDown:this.keydownHandler},h("div",{"aria-autocomplete":"list","aria-expanded":i.toString(),"aria-haspopup":"listbox","aria-labelledby":a,"aria-owns":t,class:{wrapper:true,"wrapper--single":o||!this.selectedItems.length,"wrapper--active":i},onClick:this.setFocusClick,ref:this.setReferenceEl,role:"combobox"},h("div",{class:"grid-input"},this.renderIconStart(),!o&&this.renderChips(),h("label",{class:"screen-readers-only",htmlFor:t+"-input",id:a},n),this.renderInput()),this.renderIconEnd()),h("ul",{"aria-labelledby":a,"aria-multiselectable":"true",class:"screen-readers-only",id:t,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderPopperContainer(),h(HiddenFormInputSlot,{component:this}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{active:["activeHandler"],maxItems:["maxItemsHandler"],value:["valueHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"]}},enumerable:false,configurable:true});return e}();CalciteCombobox.style=calciteComboboxCss;var CSS$1={icon:"icon",iconActive:"icon--active",custom:"icon--custom",dot:"icon--dot",single:"label--single",label:"label",active:"label--active",selected:"label--selected",title:"title",textContainer:"text-container"};var calciteComboboxItemCss='@charset "UTF-8";@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent:1rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n );--calcite-combobox-item-indent-start:var(--calcite-combobox-item-indent-value);--calcite-combobox-item-indent-end:unset}.calcite--rtl{--calcite-combobox-item-indent-start:unset;--calcite-combobox-item-indent-end:var(--calcite-combobox-item-indent-value)}:host(:focus){-webkit-box-shadow:none;box-shadow:none}:host,ul{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:0;padding:0;outline:2px solid transparent;outline-offset:2px}.label{display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;min-width:100%;-ms-flex-align:center;align-items:center;color:var(--calcite-ui-text-3);cursor:pointer;position:relative;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;text-decoration:none;padding:var(--calcite-combobox-item-spacing-unit-s) var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{color:var(--calcite-ui-text-1);font-weight:var(--calcite-font-weight-medium)}.label--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover,.label:active{color:var(--calcite-ui-text-1);background-color:var(--calcite-ui-foreground-2);-webkit-box-shadow:none;box-shadow:none;text-decoration:none}.title{padding:0 var(--calcite-combobox-item-spacing-unit-l)}.icon{display:-ms-inline-flexbox;display:inline-flex;opacity:0;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{padding-left:var(--calcite-combobox-item-indent-start);padding-right:var(--calcite-combobox-item-indent-end)}.icon--custom{margin-top:-1px;color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;width:var(--calcite-combobox-item-spacing-unit-l)}.icon--dot:before{content:"•"}.calcite--rtl .icon--dot:before{text-align:right}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}';var CalciteComboboxItem=function(){function e(e){var t=this;registerInstance(this,e);this.calciteComboboxItemChange=createEvent(this,"calciteComboboxItemChange",7);this.disabled=false;this.selected=false;this.active=false;this.guid=guid();this.scale="m";this.itemClickHandler=function(e){e.preventDefault();if(t.disabled){return}t.selected=!t.selected}}e.prototype.selectedWatchHandler=function(){this.calciteComboboxItemChange.emit(this.el)};e.prototype.connectedCallback=function(){this.ancestors=getAncestors(this.el);this.scale=getElementProp(this.el,"scale",this.scale)};e.prototype.componentWillLoad=function(){this.hasDefaultSlot=this.el.querySelector(":not([slot])")!==null};e.prototype.toggleSelected=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.disabled){return[2]}this.selected=typeof e==="boolean"?e:!this.selected;return[2]}))}))};e.prototype.renderIcon=function(e){var t,i;var n=this,o=n.icon,a=n.disabled,r=n.selected;var s=CSS$1.icon+"--indent";var c=e?"dot":"check";var l=a?"circle-disallowed":c;var m=e&&!o&&!a;return m?h("span",{class:(t={},t[CSS$1.icon]=true,t[CSS$1.dot]=true,t[s]=true,t)}):h("calcite-icon",{class:(i={},i[CSS$1.icon]=!o,i[CSS$1.custom]=!!o,i[CSS$1.iconActive]=o&&r,i[s]=true,i),icon:o||l,scale:"s"})};e.prototype.renderChildren=function(){if(!this.hasDefaultSlot){return null}return h("ul",null,h("slot",null))};e.prototype.render=function(){var e;var t=getElementProp(this.el,"selection-mode","multi")==="single";var i=getElementDir(this.el);var n=(e={},e[CSS_UTILITY.rtl]=i==="rtl",e[CSS$1.label]=true,e[CSS$1.selected]=this.selected,e[CSS$1.active]=this.active,e[CSS$1.single]=t,e);var o=getDepth(this.el);return h(Host,{"aria-hidden":"true"},h("div",{class:"container scale--"+this.scale,style:{"--calcite-combobox-item-spacing-indent-multiplier":""+o}},h("li",{class:n,id:this.guid,onClick:this.itemClickHandler},this.renderIcon(t),h("span",{class:CSS$1.title},this.textLabel)),this.renderChildren()))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["selectedWatchHandler"]}},enumerable:false,configurable:true});return e}();CalciteComboboxItem.style=calciteComboboxItemCss;var CSS={list:"list",label:"label",title:"title"};var calciteComboboxItemGroupCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{--calcite-combobox-item-indent-start-1:var(--calcite-combobox-item-spacing-indent-1);--calcite-combobox-item-indent-end-1:unset;--calcite-combobox-item-indent-start-2:var(--calcite-combobox-item-spacing-indent-2);--calcite-combobox-item-indent-end-2:unset}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent-1:0.5rem;--calcite-combobox-item-spacing-indent-2:1rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent-1:0.75rem;--calcite-combobox-item-spacing-indent-2:1.5rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent-1:1rem;--calcite-combobox-item-spacing-indent-2:2rem}.calcite--rtl{--calcite-combobox-item-indent-start-1:unset;--calcite-combobox-item-indent-end-1:var(--calcite-combobox-item-spacing-indent-1);--calcite-combobox-item-indent-start-2:unset;--calcite-combobox-item-indent-end-2:var(--calcite-combobox-item-spacing-indent-2)}:host,.list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:0;padding:0;outline:2px solid transparent;outline-offset:2px}.label{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:100%;min-width:0;color:var(--calcite-ui-text-3);display:-ms-flexbox;display:flex}.label--indent-1{padding-left:var(--calcite-combobox-item-indent-start-1);padding-right:var(--calcite-combobox-item-indent-end-1)}.label--indent-2{padding-left:var(--calcite-combobox-item-indent-start-2);padding-right:var(--calcite-combobox-item-indent-end-2)}.title{border:0 solid;display:block;-ms-flex:1 1 0%;flex:1 1 0%;border-bottom-color:var(--calcite-ui-border-3);border-bottom-width:1px;color:var(--calcite-ui-text-2);font-weight:var(--calcite-font-weight-bold);word-wrap:break-word;word-break:break-word;padding:var(--calcite-combobox-item-spacing-unit-l) 0;margin-left:var(--calcite-combobox-item-spacing-unit-s);margin-right:var(--calcite-combobox-item-spacing-unit-s)}";var CalciteComboboxItemGroup=function(){function e(e){registerInstance(this,e);this.guid=guid();this.scale="m"}e.prototype.connectedCallback=function(){this.ancestors=getAncestors(this.el);this.scale=getElementProp(this.el,"scale",this.scale)};e.prototype.render=function(){var e,t;var i=this,n=i.el,o=i.scale;var a=getElementDir(n);var r=CSS.label+"--indent-"+getDepth(n);return h("ul",{"aria-labelledby":this.guid,class:(e={},e[CSS.list]=true,e[CSS_UTILITY.rtl]=a==="rtl",e["scale--"+o]=true,e),role:"group"},h("li",{class:(t={},t[CSS.label]=true,t[r]=true,t),id:this.guid,role:"presentation"},h("span",{class:CSS.title},this.label)),h("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();CalciteComboboxItemGroup.style=calciteComboboxItemGroupCss;export{CalciteCombobox as calcite_combobox,CalciteComboboxItem as calcite_combobox_item,CalciteComboboxItemGroup as calcite_combobox_item_group};
|