@trendyol/baklava 2.0.0-beta.84 → 2.0.0-beta.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/baklava.js +1 -1
  2. package/dist/chunk-2Y65CGCP.js +43 -0
  3. package/dist/chunk-2Y65CGCP.js.map +7 -0
  4. package/dist/chunk-AHEWP6LO.js +22 -0
  5. package/dist/chunk-AHEWP6LO.js.map +7 -0
  6. package/dist/chunk-C5UMBCON.js +5 -0
  7. package/dist/chunk-C5UMBCON.js.map +7 -0
  8. package/dist/{chunk-AYSPIQ23.js → chunk-N35VLT2U.js} +2 -2
  9. package/dist/chunk-N35VLT2U.js.map +7 -0
  10. package/dist/chunk-R6XFK3HN.js +15 -0
  11. package/dist/chunk-R6XFK3HN.js.map +7 -0
  12. package/dist/chunk-W3NQ6T5J.js +21 -0
  13. package/dist/chunk-W3NQ6T5J.js.map +7 -0
  14. package/dist/components/dialog/bl-dialog.js +1 -1
  15. package/dist/components/drawer/bl-drawer.js +1 -1
  16. package/dist/components/dropdown/bl-dropdown.js +1 -1
  17. package/dist/components/dropdown/item/bl-dropdown-item.js +1 -1
  18. package/dist/components/pagination/bl-pagination.js +1 -1
  19. package/dist/components/popover/bl-popover.js +1 -1
  20. package/dist/components/select/bl-select.js +1 -1
  21. package/dist/components/tooltip/bl-tooltip.js +1 -1
  22. package/dist/themes/default.css +1 -1
  23. package/dist/themes/default.css.map +2 -2
  24. package/package.json +1 -1
  25. package/dist/chunk-2J3IFWM5.js +0 -22
  26. package/dist/chunk-2J3IFWM5.js.map +0 -7
  27. package/dist/chunk-54ROO7JA.js +0 -5
  28. package/dist/chunk-54ROO7JA.js.map +0 -7
  29. package/dist/chunk-AYSPIQ23.js.map +0 -7
  30. package/dist/chunk-K5PH753D.js +0 -15
  31. package/dist/chunk-K5PH753D.js.map +0 -7
  32. package/dist/chunk-TJKKAO25.js +0 -43
  33. package/dist/chunk-TJKKAO25.js.map +0 -7
  34. package/dist/chunk-VB5RPJV3.js +0 -21
  35. package/dist/chunk-VB5RPJV3.js.map +0 -7
package/dist/baklava.js CHANGED
@@ -1,2 +1,2 @@
1
- import{b as S}from"./chunk-4IAGV6FP.js";import{a as b}from"./chunk-2R4IL3VH.js";import{a as I}from"./chunk-MIGVYPFB.js";import{a as P}from"./chunk-GX7AW5WB.js";import{a as g}from"./chunk-FHOMHSA6.js";import{a as h}from"./chunk-K5PH753D.js";import{b as T,d as G}from"./chunk-VB5RPJV3.js";import{b as D}from"./chunk-KQBXYF3J.js";import{a as B}from"./chunk-J774WKKH.js";import{a as m}from"./chunk-TJKKAO25.js";import{a as s}from"./chunk-THIPCHAK.js";import{a as x}from"./chunk-4NHYWXCW.js";import"./chunk-L3EQLCFT.js";import"./chunk-3B64VOWB.js";import{a as w}from"./chunk-54ROO7JA.js";import"./chunk-ANYJUR6Q.js";import{a as n}from"./chunk-6J4GSOJU.js";import{c,f as i}from"./chunk-BD5KXTYS.js";import{a as r}from"./chunk-C3X43Y7C.js";import{a}from"./chunk-TJ47AW2B.js";import{b as f,e as p}from"./chunk-DSM6T5MC.js";import"./chunk-EPJ347EQ.js";import"./chunk-DJOD4BTL.js";import{a as d}from"./chunk-2J3IFWM5.js";import{a as u}from"./chunk-AYSPIQ23.js";import{b as l}from"./chunk-SU6OEG6P.js";import"./chunk-OLPYXE2P.js";import"./chunk-KPAWUBRO.js";import{a as o,b as e,c as t}from"./chunk-F3ZH5IV7.js";import"./chunk-RLMJN536.js";import"./chunk-23UFIOHV.js";import"./chunk-57PTZNIL.js";import"./chunk-NZ3RGSR6.js";export{r as BlAlert,a as BlBadge,l as BlButton,f as BlCheckbox,p as BlCheckboxGroup,d as BlDialog,u as BlDrawer,G as BlDropdown,D as BlDropdownGroup,T as BlDropdownItem,t as BlIcon,x as BlInput,B as BlPagination,w as BlPopover,n as BlProgressIndicator,c as BlRadio,i as BlRadioGroup,m as BlSelect,s as BlSelectOption,S as BlSwitch,I as BlTab,b as BlTabGroup,P as BlTabPanel,g as BlTextarea,h as BlTooltip,e as getIconPath,o as setIconPath};
1
+ import{b as S}from"./chunk-4IAGV6FP.js";import{a as b}from"./chunk-2R4IL3VH.js";import{a as I}from"./chunk-MIGVYPFB.js";import{a as P}from"./chunk-GX7AW5WB.js";import{a as g}from"./chunk-FHOMHSA6.js";import{a as h}from"./chunk-R6XFK3HN.js";import{b as T,d as G}from"./chunk-W3NQ6T5J.js";import{b as D}from"./chunk-KQBXYF3J.js";import{a as B}from"./chunk-J774WKKH.js";import{a as m}from"./chunk-2Y65CGCP.js";import{a as s}from"./chunk-THIPCHAK.js";import{a as x}from"./chunk-4NHYWXCW.js";import"./chunk-L3EQLCFT.js";import"./chunk-3B64VOWB.js";import{a as w}from"./chunk-C5UMBCON.js";import"./chunk-ANYJUR6Q.js";import{a as n}from"./chunk-6J4GSOJU.js";import{c,f as i}from"./chunk-BD5KXTYS.js";import{a as r}from"./chunk-C3X43Y7C.js";import{a}from"./chunk-TJ47AW2B.js";import{b as f,e as p}from"./chunk-DSM6T5MC.js";import"./chunk-EPJ347EQ.js";import"./chunk-DJOD4BTL.js";import{a as d}from"./chunk-AHEWP6LO.js";import{a as u}from"./chunk-N35VLT2U.js";import{b as l}from"./chunk-SU6OEG6P.js";import"./chunk-OLPYXE2P.js";import"./chunk-KPAWUBRO.js";import{a as o,b as e,c as t}from"./chunk-F3ZH5IV7.js";import"./chunk-RLMJN536.js";import"./chunk-23UFIOHV.js";import"./chunk-57PTZNIL.js";import"./chunk-NZ3RGSR6.js";export{r as BlAlert,a as BlBadge,l as BlButton,f as BlCheckbox,p as BlCheckboxGroup,d as BlDialog,u as BlDrawer,G as BlDropdown,D as BlDropdownGroup,T as BlDropdownItem,t as BlIcon,x as BlInput,B as BlPagination,w as BlPopover,n as BlProgressIndicator,c as BlRadio,i as BlRadioGroup,m as BlSelect,s as BlSelectOption,S as BlSwitch,I as BlTab,b as BlTabGroup,P as BlTabPanel,g as BlTextarea,h as BlTooltip,e as getIconPath,o as setIconPath};
2
2
  //# sourceMappingURL=baklava.js.map
@@ -0,0 +1,43 @@
1
+ import{a as m}from"./chunk-3B64VOWB.js";import{b as y,d as g,f as x,g as _,h as O}from"./chunk-ANYJUR6Q.js";import{a as f}from"./chunk-DJOD4BTL.js";import{a as p}from"./chunk-OLPYXE2P.js";import{a as b}from"./chunk-KPAWUBRO.js";import{a as h}from"./chunk-23UFIOHV.js";import{a as d,b as n,f as c,g as u,h as l,i as r,j as a,k as v}from"./chunk-57PTZNIL.js";import{a as o}from"./chunk-NZ3RGSR6.js";var T=d`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;display:flex;flex-direction:column;gap:var(--bl-size-3xs);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--background-color:var(--bl-color-primary-background);--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--menu-height:250px;--popover-position:var(--bl-popover-position,fixed)}:host([size='large']) .select-wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size='small']) .select-wrapper{--height:var(--bl-size-xl);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-xs);--font-size:var(--bl-font-size-s)}:host([disabled]) .select-wrapper{--placeholder-color:var(--bl-color-content-passive)}.dirty.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-hover);--label-color:var(--bl-color-danger)}.select-input{display:flex;align-items:center;justify-content:space-between;cursor:pointer;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 var(--padding-horizontal);border-radius:var(--bl-border-radius-s);color:var(--text-color);-webkit-user-select:none;user-select:none}.placeholder{color:var(--placeholder-color);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.select-wrapper.selected .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}.remove-all{display:none}.remove-all::after{content:'';position:absolute;left:1.5rem;bottom:4px;height:1rem;border-left:1px solid var(--bl-color-border)}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-secondary)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-content-passive)}.select-open .select-input,.select-input:focus-visible{border:solid 1px var(--border-focus-color);outline:0}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{flex:1;padding:0;margin:0;list-style:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selected-options li{display:inline;font-size:var(--font-size);color:var(--text-color)}.selected-options li:not(:last-child)::after{content:', '}.select-input:not(.has-overflowed-options) .additional-selection-count{display:none}:host([disabled]) .selected-options li{color:var(--bl-color-content-passive)}.select-input .actions{display:flex;align-items:center;justify-content:center;gap:var(--bl-size-2xs);margin-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--bl-index-popover);width:100%;top:var(--top);left:var(--left)}.select-open .popover{display:flex;border:solid 1px var(--border-focus-color)}bl-icon{color:var(--icon-color)}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));max-width:max-content;transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial;right:var(--padding-horizontal)}:host([label-fixed]) label{position:static;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color)}.hint{display:none;font:var(--bl-font-body-text-3)}.hint p{padding:0;margin:0}.error-icon,.invalid-text{display:none}.dirty.invalid label,.invalid-text,.error-icon{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}:host([help-text]) .hint,.dirty.invalid .hint{display:block}.dirty.invalid .invalid-text{display:block}.dirty.invalid .help-text{display:none}`,w=T;var t=class extends f(c){constructor(){super(...arguments);this.size="medium";this.required=!1;this.disabled=!1;this.multiple=!1;this.autofocus=!1;this.labelFixed=!1;this._isPopoverOpen=!1;this._additionalSelectedOptionCount=0;this._connectedOptions=[];this._cleanUpPopover=null;this._selectedOptions=[];this.dirty=!1;this._interactOutsideHandler=e=>{var s;let i=e.composedPath();(s=i==null?void 0:i.find(z=>z.tagName==="BL-SELECT"))!=null&&s.contains(this)||this.close()};this.focusedOptionIndex=-1}static get styles(){return[w]}get value(){return this._value}set value(e){if(this._value=e,Array.isArray(e)){let i=new FormData;e.forEach(s=>i.append(this.name,`${s}`)),this.setValue(i)}else this.setValue(e);this.setOptionsSelected()}shouldFormValueUpdate(){return this.value!==null&&this.value!==""}setOptionsSelected(){this._connectedOptions.forEach(e=>e.selected=this.value===e.value||Array.isArray(this.value)&&this.value.includes(e.value)),this._selectedOptions=[...this.options.filter(e=>e.selected)]}get options(){return this._connectedOptions}get opened(){return this._isPopoverOpen}get selectedOptions(){return this._selectedOptions}get additionalSelectedOptionCount(){return this._additionalSelectedOptionCount}validityCallback(){if(this.customInvalidText)return this.customInvalidText;let e=document.createElement("select");return e.required=this.required,e.validationMessage}reportValidity(){return this.dirty=!0,this.checkValidity()}resetFormControl(){this.value=this._initialValue}open(){this._isPopoverOpen=!0,this._setupPopover(),document.addEventListener("click",this._interactOutsideHandler,!0),document.addEventListener("focus",this._interactOutsideHandler,!0)}close(){this._isPopoverOpen=!1,this.focusedOptionIndex=-1,this._cleanUpPopover&&this._cleanUpPopover(),document.removeEventListener("click",this._interactOutsideHandler,!0),document.removeEventListener("focus",this._interactOutsideHandler,!0)}_setupPopover(){this._cleanUpPopover=_(this._selectInput,this._popover,()=>{O(this._selectInput,this._popover,{placement:"bottom",strategy:"fixed",middleware:[y(),g(8),x({apply(e){Object.assign(e.elements.floating.style,{width:`${e.elements.reference.getBoundingClientRect().width}px`})}})]}).then(({x:e,y:i})=>{this._popover.style.setProperty("--left",`${e}px`),this._popover.style.setProperty("--top",`${i}px`)})})}connectedCallback(){var e;super.connectedCallback(),(e=this.form)==null||e.addEventListener("submit",i=>{this.reportValidity()||i.preventDefault()})}disconnectedCallback(){super.disconnectedCallback(),this._cleanUpPopover&&this._cleanUpPopover()}inputTemplate(){let e=n`<ul class="selected-options">
2
+ ${this._selectedOptions.map(s=>n`<li>${s.textContent}</li>`)}
3
+ </ul>`,i=n`<bl-button
4
+ class="remove-all"
5
+ size="small"
6
+ variant="tertiary"
7
+ kind="neutral"
8
+ icon="close"
9
+ @click=${this._onClickRemove}></bl-button>`;return n`<div
10
+ class=${p({"select-input":!0,"has-overflowed-options":this._additionalSelectedOptionCount>0})}
11
+ tabindex="${this.disabled?"-1":0}"
12
+ ?autofocus=${this.autofocus}
13
+ @click=${this.togglePopover}
14
+ >
15
+ <span class="placeholder">${this.placeholder}</span>
16
+ ${e}
17
+ <span class="additional-selection-count">+${this._additionalSelectedOptionCount}</span>
18
+ <div class="actions">
19
+ ${this.multiple?i:null}
20
+ <bl-icon
21
+ class="dropdown-icon open"
22
+ name="arrow_up"
23
+ ></bl-icon>
24
+
25
+ <bl-icon
26
+ class="dropdown-icon closed"
27
+ name="arrow_down"
28
+ ></bl-icon>
29
+ </div>
30
+ </div>`}render(){let e=this.checkValidity()?"":n`<p id="errorMessage" aria-live="polite" class="invalid-text">
31
+ ${this.validationMessage}
32
+ </p>`,i=this.helpText&&!e?n`<p class="help-text">${this.helpText}</p>`:"",s=this.label?n`<label>${this.label}</label>`:"";return n`<div
33
+ class=${p({"select-wrapper":!0,"select-open":this.opened,selected:this._selectedOptions.length>0,invalid:!this.validity.valid,dirty:this.dirty})}
34
+ @keydown=${this.handleKeydown}
35
+ >
36
+ ${s}
37
+ ${this.inputTemplate()}
38
+ <div class="popover" tabindex="${b(this._isPopoverOpen?void 0:"-1")}" @bl-select-option=${this._handleSelectOptionEvent}>
39
+ <slot></slot>
40
+ </div>
41
+ <div class="hint">${e} ${i}</div>
42
+ </div> `}handleKeydown(e){this.focusedOptionIndex===-1&&["Enter","Space"].includes(e.code)?(this.togglePopover(),e.preventDefault()):this._isPopoverOpen===!1&&["ArrowDown","ArrowUp"].includes(e.code)?(this.open(),e.preventDefault()):e.code==="Escape"?(this.close(),e.preventDefault()):this._isPopoverOpen&&["ArrowDown","ArrowUp"].includes(e.code)&&(e.code==="ArrowDown"&&this.focusedOptionIndex++,e.code==="ArrowUp"&&this.focusedOptionIndex--,this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,this.options.length-1)),this.options[this.focusedOptionIndex].focus(),e.preventDefault())}togglePopover(){this._isPopoverOpen?this.close():this.open()}_handleSelectEvent(){this._onBlSelect(this._selectedOptions.map(e=>({value:e.value,selected:e.selected,text:e.textContent})))}_handleSingleSelect(e){this.value=e.value,this._handleSelectEvent(),this._isPopoverOpen=!1}_handleMultipleSelect(){this.value=this._connectedOptions.filter(e=>e.selected).map(e=>e.value),this._handleSelectEvent()}_handleSelectOptionEvent(e){let i=e.target;this.dirty=!0,this.multiple?this._handleMultipleSelect():this._handleSingleSelect(i)}_onClickRemove(e){e.stopPropagation(),this._connectedOptions.filter(i=>i.selected).forEach(i=>{i.selected=!1}),this.value=null,this._additionalSelectedOptionCount=0,this._handleSelectEvent()}_checkAdditionalItemCount(){if(!this.multiple||!this.selectedOptionsItems||this.selectedOptionsItems.length<2){this._additionalSelectedOptionCount=0;return}let e=[...this.selectedOptionsItems].findIndex(i=>i.offsetLeft>this.selectedOptionsContainer.offsetWidth);e>-1?this._additionalSelectedOptionCount=this.selectedOptionsItems.length-e:this._additionalSelectedOptionCount=0}firstUpdated(){this.value===void 0&&(this.value=""),this._initialValue=this._value}updated(e){e.has("multiple")&&typeof e.get("multiple")=="boolean"&&(this.value=null),this._checkAdditionalItemCount()}registerOption(e){this._connectedOptions.push(e),e.selected&&(this.multiple?(Array.isArray(this.value)||(this.value=[]),this.value=[...this.value,e.value]):this.value=e.value),this.setOptionsSelected(),this.requestUpdate()}unregisterOption(e){this._connectedOptions.splice(this._connectedOptions.indexOf(e),1)}};t.formControlValidators=[m],o([l()],t.prototype,"name",2),o([l()],t.prototype,"value",1),o([l({reflect:!0})],t.prototype,"label",2),o([l({})],t.prototype,"placeholder",2),o([l({type:String,reflect:!0})],t.prototype,"size",2),o([l({type:Boolean,reflect:!0})],t.prototype,"required",2),o([l({type:Boolean,reflect:!0})],t.prototype,"disabled",2),o([l({type:Boolean})],t.prototype,"multiple",2),o([l({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),o([l({type:Boolean,attribute:"label-fixed",reflect:!0})],t.prototype,"labelFixed",2),o([l({type:String,attribute:"help-text"})],t.prototype,"helpText",2),o([l({type:String,attribute:"invalid-text"})],t.prototype,"customInvalidText",2),o([r()],t.prototype,"_isPopoverOpen",2),o([r()],t.prototype,"_additionalSelectedOptionCount",2),o([a(".selected-options")],t.prototype,"selectedOptionsContainer",2),o([v(".selected-options li")],t.prototype,"selectedOptionsItems",2),o([a(".popover")],t.prototype,"_popover",2),o([a(".select-input")],t.prototype,"_selectInput",2),o([h("bl-select")],t.prototype,"_onBlSelect",2),o([r()],t.prototype,"_selectedOptions",2),o([r()],t.prototype,"dirty",2),o([a(".select-input")],t.prototype,"validationTarget",2),t=o([u("bl-select")],t);export{t as a};
43
+ //# sourceMappingURL=chunk-2Y65CGCP.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/select/bl-select.css", "../src/components/select/bl-select.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;display:flex;flex-direction:column;gap:var(--bl-size-3xs);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--background-color:var(--bl-color-primary-background);--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--menu-height:250px;--popover-position:var(--bl-popover-position,fixed)}:host([size='large']) .select-wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size='small']) .select-wrapper{--height:var(--bl-size-xl);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-xs);--font-size:var(--bl-font-size-s)}:host([disabled]) .select-wrapper{--placeholder-color:var(--bl-color-content-passive)}.dirty.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-hover);--label-color:var(--bl-color-danger)}.select-input{display:flex;align-items:center;justify-content:space-between;cursor:pointer;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 var(--padding-horizontal);border-radius:var(--bl-border-radius-s);color:var(--text-color);-webkit-user-select:none;user-select:none}.placeholder{color:var(--placeholder-color);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.select-wrapper.selected .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}.remove-all{display:none}.remove-all::after{content:'';position:absolute;left:1.5rem;bottom:4px;height:1rem;border-left:1px solid var(--bl-color-border)}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-secondary)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-content-passive)}.select-open .select-input,.select-input:focus-visible{border:solid 1px var(--border-focus-color);outline:0}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{flex:1;padding:0;margin:0;list-style:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selected-options li{display:inline;font-size:var(--font-size);color:var(--text-color)}.selected-options li:not(:last-child)::after{content:', '}.select-input:not(.has-overflowed-options) .additional-selection-count{display:none}:host([disabled]) .selected-options li{color:var(--bl-color-content-passive)}.select-input .actions{display:flex;align-items:center;justify-content:center;gap:var(--bl-size-2xs);margin-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--bl-index-popover);width:100%;top:var(--top);left:var(--left)}.select-open .popover{display:flex;border:solid 1px var(--border-focus-color)}bl-icon{color:var(--icon-color)}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));max-width:max-content;transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial;right:var(--padding-horizontal)}:host([label-fixed]) label{position:static;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color)}.hint{display:none;font:var(--bl-font-body-text-3)}.hint p{padding:0;margin:0}.error-icon,.invalid-text{display:none}.dirty.invalid label,.invalid-text,.error-icon{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}:host([help-text]) .hint,.dirty.invalid .hint{display:block}.dirty.invalid .invalid-text{display:block}.dirty.invalid .help-text{display:none}`;\nexport default styles;\n", "import { autoUpdate, computePosition, flip, MiddlewareArguments, offset, size } from '@floating-ui/dom';\nimport { FormControlMixin, requiredValidator } from '@open-wc/form-control';\nimport { FormValue } from '@open-wc/form-helpers';\nimport 'element-internals-polyfill';\nimport { CSSResultGroup, html, LitElement, PropertyValues } from 'lit';\nimport { customElement, property, query, queryAll, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../icon/bl-icon';\nimport style from '../select/bl-select.css';\nimport '../select/option/bl-select-option';\nimport type BlSelectOption from './option/bl-select-option';\n\nexport interface ISelectOption<T> {\n value: T;\n text: string;\n selected: boolean;\n}\n\nexport type SelectSize = 'medium' | 'large' | 'small';\n\nexport type CleanUpFunction = () => void;\n\n\n/**\n * @tag bl-select\n * @summary Baklava Select component\n *\n * @cssproperty --bl-popover-position - Sets the positioning strategy of select popover. You can set it as `absolute` if you need to show popover relative to its trigger element. Default value is `fixed`\n */\n@customElement('bl-select')\nexport default class BlSelect<ValueType extends FormValue = string> extends FormControlMixin(LitElement) {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n static formControlValidators = [requiredValidator];\n\n /**\n * Sets name of the select field\n */\n @property()\n name: string;\n\n private _value: ValueType | ValueType[] | null;\n\n private _initialValue: ValueType | ValueType[] | null;\n\n /**\n * Sets the value of the select\n */\n @property()\n get value(): ValueType | ValueType[] | null {\n return this._value;\n }\n\n set value(val: ValueType | ValueType[] | null) {\n this._value = val;\n\n if (Array.isArray(val)) {\n const formData = new FormData();\n val.forEach((option) => formData.append(this.name, `${option}`));\n this.setValue(formData);\n } else {\n this.setValue(val);\n }\n\n this.setOptionsSelected();\n }\n\n shouldFormValueUpdate(): boolean {\n return this.value !== null && this.value !== '';\n }\n\n /* Declare reactive properties */\n /**\n * Sets the label value\n */\n @property({ reflect: true })\n label?: string;\n\n /**\n * Sets the placeholder value. If left blank, the label value (if specified) is set as placeholder.\n */\n @property({})\n placeholder?: string;\n\n /**\n * Sets the size value. Select component's height value will be changed accordingly\n */\n @property({ type: String, reflect: true })\n size: SelectSize = 'medium';\n\n /**\n * When option is not selected, shows component in error state\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * Shows the component in disabled state.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Allows multiple options to be selected\n */\n @property({ type: Boolean })\n multiple = false;\n\n /**\n * Sets input to get keyboard focus automatically\n */\n @property({ type: Boolean, reflect: true })\n autofocus = false;\n\n /**\n * Makes label as fixed positioned\n */\n @property({ type: Boolean, attribute: 'label-fixed', reflect: true })\n labelFixed = false;\n\n /**\n * Adds help text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText?: string;\n\n /**\n * Set custom error message\n */\n @property({ type: String, attribute: 'invalid-text' })\n customInvalidText?: string;\n\n /* Declare internal reactive properties */\n @state()\n private _isPopoverOpen = false;\n\n\n @state()\n private _additionalSelectedOptionCount = 0;\n\n @query('.selected-options')\n private selectedOptionsContainer!: HTMLElement;\n\n @queryAll('.selected-options li')\n private selectedOptionsItems!: NodeListOf<HTMLElement>;\n\n @query('.popover')\n private _popover: HTMLElement;\n\n @query('.select-input')\n private _selectInput: HTMLElement;\n\n /**\n * Fires when selection changes\n */\n @event('bl-select') private _onBlSelect: EventDispatcher<ISelectOption<ValueType>[]>;\n\n private _connectedOptions: BlSelectOption<ValueType>[] = [];\n\n private _cleanUpPopover: CleanUpFunction | null = null;\n\n private setOptionsSelected() {\n this._connectedOptions\n .forEach(\n (option) => option.selected = (\n this.value === option.value ||\n (Array.isArray(this.value) && this.value.includes(option.value))\n )\n );\n\n this._selectedOptions = [...this.options\n .filter(option => option.selected)\n ];\n }\n\n get options() {\n return this._connectedOptions;\n }\n\n get opened() {\n return this._isPopoverOpen;\n }\n\n @state()\n private _selectedOptions: BlSelectOption<ValueType>[] = [];\n\n @state()\n private dirty = false;\n\n get selectedOptions(): BlSelectOption<ValueType>[] {\n return this._selectedOptions;\n }\n\n get additionalSelectedOptionCount() {\n return this._additionalSelectedOptionCount;\n }\n\n validityCallback(): string | void {\n if (this.customInvalidText) {\n return this.customInvalidText;\n }\n const select = document.createElement('select');\n select.required = this.required;\n\n return select.validationMessage;\n }\n\n reportValidity() {\n this.dirty = true;\n return this.checkValidity();\n }\n\n resetFormControl(): void {\n this.value = this._initialValue;\n }\n\n @query('.select-input')\n validationTarget: HTMLElement;\n\n open() {\n this._isPopoverOpen = true;\n this._setupPopover();\n document.addEventListener('click', this._interactOutsideHandler, true);\n document.addEventListener('focus', this._interactOutsideHandler, true);\n }\n\n close() {\n this._isPopoverOpen = false;\n this.focusedOptionIndex = -1;\n this._cleanUpPopover && this._cleanUpPopover();\n document.removeEventListener('click', this._interactOutsideHandler, true);\n document.removeEventListener('focus', this._interactOutsideHandler, true);\n }\n\n private _interactOutsideHandler = (event: MouseEvent | FocusEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath?.find(el => el.tagName === 'BL-SELECT')?.contains(this)) {\n this.close();\n }\n };\n\n private _setupPopover() {\n this._cleanUpPopover = autoUpdate(this._selectInput, this._popover, () => {\n computePosition(this._selectInput, this._popover, {\n placement: 'bottom',\n strategy: 'fixed',\n middleware: [\n flip(),\n offset(8),\n size({\n apply(args: MiddlewareArguments) {\n Object.assign(args.elements.floating.style, {\n width: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n },\n }),\n ],\n }).then(({ x, y }) => {\n this._popover.style.setProperty('--left', `${x}px`);\n this._popover.style.setProperty('--top', `${y}px`);\n });\n });\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.form?.addEventListener('submit', (e: SubmitEvent) => {\n if (!this.reportValidity()) {\n e.preventDefault();\n }\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this._cleanUpPopover && this._cleanUpPopover();\n }\n\n private inputTemplate() {\n const inputSelectedOptions = html`<ul class=\"selected-options\">\n ${this._selectedOptions.map(item => html`<li>${item.textContent}</li>`)}\n </ul>`;\n const removeButton = html`<bl-button\n class=\"remove-all\"\n size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"close\"\n @click=${this._onClickRemove}></bl-button>`;\n\n return html`<div\n class=${classMap({\n 'select-input': true,\n 'has-overflowed-options': this._additionalSelectedOptionCount > 0\n })}\n tabindex=\"${this.disabled ? '-1' : 0}\"\n ?autofocus=${this.autofocus}\n @click=${this.togglePopover}\n >\n <span class=\"placeholder\">${this.placeholder}</span>\n ${inputSelectedOptions}\n <span class=\"additional-selection-count\">+${this._additionalSelectedOptionCount}</span>\n <div class=\"actions\">\n ${this.multiple ? removeButton : null}\n <bl-icon\n class=\"dropdown-icon open\"\n name=\"arrow_up\"\n ></bl-icon>\n\n <bl-icon\n class=\"dropdown-icon closed\"\n name=\"arrow_down\"\n ></bl-icon>\n </div>\n </div>`;\n }\n\n render() {\n const invalidMessage = !this.checkValidity()\n ? html`<p id=\"errorMessage\" aria-live=\"polite\" class=\"invalid-text\">\n ${this.validationMessage}\n </p>`: '';\n\n const helpMessage = this.helpText && !invalidMessage\n ? html`<p class=\"help-text\">${this.helpText}</p>` : '';\n\n const label = this.label\n ? html`<label>${this.label}</label>` : '';\n\n return html`<div\n class=${classMap({\n 'select-wrapper': true,\n 'select-open': this.opened,\n 'selected': this._selectedOptions.length > 0,\n 'invalid': !this.validity.valid,\n 'dirty': this.dirty\n })}\n @keydown=${this.handleKeydown}\n >\n ${label}\n ${this.inputTemplate()}\n <div class=\"popover\" tabindex=\"${ifDefined(this._isPopoverOpen ? undefined : '-1')}\" @bl-select-option=${this._handleSelectOptionEvent}>\n <slot></slot>\n </div>\n <div class=\"hint\">${invalidMessage} ${helpMessage}</div>\n </div> `;\n }\n\n private focusedOptionIndex = -1;\n\n private handleKeydown(event: KeyboardEvent) {\n if (this.focusedOptionIndex === -1 && ['Enter', 'Space'].includes(event.code)) {\n this.togglePopover();\n event.preventDefault();\n } else if (this._isPopoverOpen === false && ['ArrowDown', 'ArrowUp'].includes(event.code)) {\n this.open();\n event.preventDefault();\n } else if (event.code === 'Escape') {\n this.close();\n event.preventDefault();\n } else if (this._isPopoverOpen && ['ArrowDown', 'ArrowUp'].includes(event.code)) {\n event.code === 'ArrowDown' && this.focusedOptionIndex++;\n event.code === 'ArrowUp' && this.focusedOptionIndex--;\n\n // Don't exceed array indexes\n this.focusedOptionIndex = Math.max(\n 0,\n Math.min(this.focusedOptionIndex, this.options.length - 1)\n );\n\n this.options[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n }\n\n }\n\n private togglePopover() {\n this._isPopoverOpen ? this.close() : this.open();\n }\n\n private _handleSelectEvent() {\n this._onBlSelect(this._selectedOptions.map(option => ({\n value: option.value,\n selected: option.selected,\n text: option.textContent\n } as ISelectOption<ValueType>)));\n }\n\n private _handleSingleSelect(optionItem: BlSelectOption<ValueType>) {\n this.value = optionItem.value;\n\n this._handleSelectEvent();\n this._isPopoverOpen = false;\n }\n\n private _handleMultipleSelect() {\n this.value = this._connectedOptions.filter((option) => option.selected).map(option => option.value);\n\n this._handleSelectEvent();\n }\n\n private _handleSelectOptionEvent(e: CustomEvent) {\n const optionItem = e.target as BlSelectOption<ValueType>;\n this.dirty = true;\n\n if (this.multiple) {\n this._handleMultipleSelect();\n } else {\n this._handleSingleSelect(optionItem);\n }\n }\n\n private _onClickRemove(e: MouseEvent) {\n e.stopPropagation();\n\n this._connectedOptions\n .filter(option => option.selected)\n .forEach(option => {\n option.selected = false;\n });\n\n this.value = null;\n this._additionalSelectedOptionCount = 0;\n this._handleSelectEvent();\n }\n\n private _checkAdditionalItemCount() {\n if (!this.multiple || !this.selectedOptionsItems || this.selectedOptionsItems.length < 2) {\n this._additionalSelectedOptionCount = 0;\n return;\n }\n\n const firstNonVisibleItemIndex = [...this.selectedOptionsItems]\n .findIndex((item) => item.offsetLeft > this.selectedOptionsContainer.offsetWidth);\n\n if (firstNonVisibleItemIndex > -1) {\n this._additionalSelectedOptionCount = this.selectedOptionsItems.length - firstNonVisibleItemIndex;\n } else {\n this._additionalSelectedOptionCount = 0;\n }\n }\n\n protected firstUpdated(): void {\n if (this.value === undefined) {\n this.value = '' as ValueType;\n }\n\n this._initialValue = this._value;\n }\n\n protected updated(_changedProperties: PropertyValues) {\n if (\n _changedProperties.has('multiple') &&\n typeof _changedProperties.get('multiple') === 'boolean'\n ) {\n this.value = null;\n }\n\n this._checkAdditionalItemCount();\n }\n\n /**\n * This method is used by `bl-select-option` component to register itself to bl-select.\n * @param option BlSelectOption reference to be registered\n */\n registerOption(option: BlSelectOption<ValueType>) {\n this._connectedOptions.push(option);\n\n if (option.selected) {\n if (this.multiple) {\n if (!Array.isArray(this.value)) {\n this.value = [];\n }\n this.value = [...this.value, option.value];\n } else {\n this.value = option.value;\n }\n }\n\n this.setOptionsSelected();\n this.requestUpdate();\n }\n\n /**\n * This method is used by `bl-select-option` component to unregister itself from bl-select.\n * @param option BlSelectOption reference to be unregistered\n */\n unregisterOption(option: BlSelectOption<ValueType>) {\n this._connectedOptions.splice(this._connectedOptions.indexOf(option), 1);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-select': BlSelect;\n }\n}\n"],
5
+ "mappings": "6YACO,IAAMA,EAASC,6jKACfC,EAAQF,EC8Bf,IAAqBG,EAArB,cAA4EC,EAAiBC,CAAU,CAAE,CAAzG,kCA4DE,UAAmB,SAMnB,cAAW,GAMX,cAAW,GAMX,cAAW,GAMX,eAAY,GAMZ,gBAAa,GAgBb,KAAQ,eAAiB,GAIzB,KAAQ,+BAAiC,EAmBzC,KAAQ,kBAAiD,CAAC,EAE1D,KAAQ,gBAA0C,KAyBlD,KAAQ,iBAAgD,CAAC,EAGzD,KAAQ,MAAQ,GA+ChB,KAAQ,wBAA2BC,GAAmC,CA9OxE,IAAAC,EA+OI,IAAMC,EAAYF,EAAM,aAAa,GAEhCC,EAAAC,GAAA,YAAAA,EAAW,KAAKC,GAAMA,EAAG,UAAY,eAArC,MAAAF,EAAmD,SAAS,OAC/D,KAAK,MAAM,CAEf,EA+GA,KAAQ,mBAAqB,GAlU7B,WAAW,QAAyB,CAClC,MAAO,CAACG,CAAK,CACf,CAkBA,IAAI,OAAwC,CAC1C,OAAO,KAAK,MACd,CAEA,IAAI,MAAMC,EAAqC,CAG7C,GAFA,KAAK,OAASA,EAEV,MAAM,QAAQA,CAAG,EAAG,CACtB,IAAMC,EAAW,IAAI,SACrBD,EAAI,QAASE,GAAWD,EAAS,OAAO,KAAK,KAAM,GAAGC,GAAQ,CAAC,EAC/D,KAAK,SAASD,CAAQ,OAEtB,KAAK,SAASD,CAAG,EAGnB,KAAK,mBAAmB,CAC1B,CAEA,uBAAiC,CAC/B,OAAO,KAAK,QAAU,MAAQ,KAAK,QAAU,EAC/C,CA4FQ,oBAAqB,CAC3B,KAAK,kBACF,QACEE,GAAWA,EAAO,SACf,KAAK,QAAUA,EAAO,OACrB,MAAM,QAAQ,KAAK,KAAK,GAAK,KAAK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B,EAAM,WAAW,GA/HCH,EA+HS,2BA6BpBiC,EAAA,CADPC,EAAM,GA3JYlC,EA4JX,gCAGAiC,EAAA,CADPC,EAAM,GA9JYlC,EA+JX,qBA8BRiC,EAAA,CADCE,EAAM,eAAe,GA5LHnC,EA6LnB,gCA7LmBA,EAArBiC,EAAA,CADCb,EAAc,WAAW,GACLpB",
6
+ "names": ["styles", "i", "bl_select_default", "BlSelect", "FormControlMixin", "s", "event", "_a", "eventPath", "el", "bl_select_default", "val", "formData", "option", "select", "P", "z", "b", "O", "k", "args", "x", "y", "e", "inputSelectedOptions", "item", "removeButton", "o", "invalidMessage", "helpMessage", "label", "l", "optionItem", "firstNonVisibleItemIndex", "_changedProperties", "requiredValidator", "__decorateClass", "t", "i"]
7
+ }
@@ -0,0 +1,22 @@
1
+ import{a as c}from"./chunk-23UFIOHV.js";import{a as h,b as r,f as v,g,h as d,j as n}from"./chunk-57PTZNIL.js";import{a as o}from"./chunk-NZ3RGSR6.js";var b=h`.container{--background-color:var(--bl-color-primary-background);display:flex;flex-direction:column;background:var(--background-color);max-width:calc(100vw - var(--bl-size-4xl));max-height:calc(100vh - var(--bl-size-4xl));min-width:424px;padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog,.dialog-polyfill .container{padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog-polyfill .container{position:fixed;z-index:var(--bl-index-dialog)}.dialog::backdrop{background:#273142;opacity:.7}.dialog-polyfill{display:none;position:fixed;left:0;top:0;width:100vw;height:100vh;align-items:center;justify-content:center;z-index:var(--bl-index-dialog);background:#273142b3}:host([open]) .dialog-polyfill{display:flex}header{display:flex;justify-content:space-between;align-items:center;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl)}header bl-button{margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0}.content{padding:var(--bl-size-xl) var(--bl-size-xl) var(--bl-size-m) var(--bl-size-xl);overflow:auto}footer{padding:var(--bl-size-xl);display:flex;flex-flow:row-reverse wrap;gap:var(--bl-size-m)}footer.shadow{box-shadow:0 -4px 15px #27314226}@media only screen and (max-width:471px){.container{max-width:calc(100vw - var(--bl-size-2xl));max-height:calc(100vh - var(--bl-size-2xl));min-width:auto;min-height:auto}footer{flex-flow:column wrap}}`,m=b;var t=class extends v{constructor(){super(...arguments);this.open=!1;this.clickOutsideHandler=e=>{e.composedPath().includes(this.container)||this.closeDialog()};this.onKeydown=e=>{e.code==="Escape"&&this.open&&this.closeDialog()}}static get styles(){return[m]}updated(e){e.has("open")&&this.toggleDialogHandler()}get hasHtmlDialogSupport(){return!!window.HTMLDialogElement}get _hasFooter(){return[...this.childNodes].some(e=>e.nodeName==="BL-BUTTON")}toggleDialogHandler(){var e,a,i,l;this.open?((a=(e=this.dialog)==null?void 0:e.showModal)==null||a.call(e),this.onOpen({isOpen:!0}),document.body.style.overflow="hidden",this.toggleFooterShadow(),window==null||window.addEventListener("keydown",s=>this.onKeydown(s)),window==null||window.addEventListener("resize",()=>this.toggleFooterShadow())):((l=(i=this.dialog)==null?void 0:i.close)==null||l.call(i),this.onClose({isOpen:!1}),document.body.style.overflow="auto",window==null||window.removeEventListener("keydown",this.onKeydown),window==null||window.removeEventListener("resize",this.toggleFooterShadow))}closeDialog(){this.open=!1}toggleFooterShadow(){var e,a,i,l,s,p;((e=this.content)==null?void 0:e.scrollHeight)>((a=this.content)==null?void 0:a.offsetHeight)?(l=(i=this.footer)==null?void 0:i.classList)==null||l.add("shadow"):(p=(s=this.footer)==null?void 0:s.classList)==null||p.remove("shadow")}renderFooter(){return this._hasFooter?r`<footer>
2
+ <slot name="primary-action"></slot>
3
+ <slot name="secondary-action"></slot>
4
+ <slot name="tertiary-action"></slot>
5
+ </footer>`:""}renderContainer(){let e=this.caption?r`<h2 id="dialog-caption">${this.caption}</h2>`:"";return r` <div class="container">
6
+ <header>
7
+ ${e}
8
+ <bl-button
9
+ @click="${this.closeDialog}"
10
+ icon="close"
11
+ variant="tertiary"
12
+ kind="neutral"
13
+ ></bl-button>
14
+ </header>
15
+ <section class="content"><slot /></section>
16
+ ${this.renderFooter()}
17
+ </div>`}render(){return this.hasHtmlDialogSupport?r`
18
+ <dialog class="dialog" aria-labelledby="dialog-caption" @click=${this.clickOutsideHandler}>${this.renderContainer()}</dialog>
19
+ `:r`<div class="dialog-polyfill" role="dialog" aria-labelledby="dialog-caption" @click=${this.clickOutsideHandler}>
20
+ ${this.renderContainer()}
21
+ </div>`}};o([d({type:Boolean,reflect:!0})],t.prototype,"open",2),o([d({type:String})],t.prototype,"caption",2),o([n(".dialog")],t.prototype,"dialog",2),o([n("footer")],t.prototype,"footer",2),o([n(".container")],t.prototype,"container",2),o([n(".content")],t.prototype,"content",2),o([c("bl-dialog-open")],t.prototype,"onOpen",2),o([c("bl-dialog-close")],t.prototype,"onClose",2),t=o([g("bl-dialog")],t);export{t as a};
22
+ //# sourceMappingURL=chunk-AHEWP6LO.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/dialog/bl-dialog.css", "../src/components/dialog/bl-dialog.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.container{--background-color:var(--bl-color-primary-background);display:flex;flex-direction:column;background:var(--background-color);max-width:calc(100vw - var(--bl-size-4xl));max-height:calc(100vh - var(--bl-size-4xl));min-width:424px;padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog,.dialog-polyfill .container{padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog-polyfill .container{position:fixed;z-index:var(--bl-index-dialog)}.dialog::backdrop{background:#273142;opacity:.7}.dialog-polyfill{display:none;position:fixed;left:0;top:0;width:100vw;height:100vh;align-items:center;justify-content:center;z-index:var(--bl-index-dialog);background:#273142b3}:host([open]) .dialog-polyfill{display:flex}header{display:flex;justify-content:space-between;align-items:center;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl)}header bl-button{margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0}.content{padding:var(--bl-size-xl) var(--bl-size-xl) var(--bl-size-m) var(--bl-size-xl);overflow:auto}footer{padding:var(--bl-size-xl);display:flex;flex-flow:row-reverse wrap;gap:var(--bl-size-m)}footer.shadow{box-shadow:0 -4px 15px #27314226}@media only screen and (max-width:471px){.container{max-width:calc(100vw - var(--bl-size-2xl));max-height:calc(100vh - var(--bl-size-2xl));min-width:auto;min-height:auto}footer{flex-flow:column wrap}}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../button/bl-button';\nimport style from './bl-dialog.css';\n\ntype DialogElement = {\n showModal: () => void;\n close: () => void;\n};\n\n\n/**\n * @tag bl-dialog\n * @summary Baklava Dialog component\n */\n@customElement('bl-dialog')\nexport default class BlDialog extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets dialog open-close status\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Sets the dialog title\n */\n @property({ type: String })\n caption?: string;\n\n @query('.dialog')\n private dialog: HTMLDialogElement & DialogElement;\n\n @query('footer')\n private footer: HTMLElement;\n\n @query('.container')\n private container: HTMLElement;\n\n @query('.content')\n private content: HTMLElement;\n\n /**\n * Fires when the dialog is opened\n */\n @event('bl-dialog-open') private onOpen: EventDispatcher<object>;\n\n /**\n * Fires when the dialog is closed\n */\n @event('bl-dialog-close') private onClose: EventDispatcher<object>;\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('open')) {\n this.toggleDialogHandler();\n }\n }\n\n private get hasHtmlDialogSupport() {\n return !!window.HTMLDialogElement;\n }\n\n private get _hasFooter() {\n return [...this.childNodes].some(node => node.nodeName === 'BL-BUTTON');\n }\n\n private toggleDialogHandler() {\n if (this.open) {\n this.dialog?.showModal?.();\n this.onOpen({ isOpen: true });\n document.body.style.overflow = 'hidden';\n this.toggleFooterShadow();\n window?.addEventListener('keydown', event => this.onKeydown(event));\n window?.addEventListener('resize', () => this.toggleFooterShadow());\n } else {\n this.dialog?.close?.();\n this.onClose({ isOpen: false });\n document.body.style.overflow = 'auto';\n window?.removeEventListener('keydown', this.onKeydown);\n window?.removeEventListener('resize', this.toggleFooterShadow);\n }\n }\n\n private closeDialog() {\n this.open = false;\n }\n\n private clickOutsideHandler = (event: MouseEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath.includes(this.container)) {\n this.closeDialog();\n }\n };\n\n private onKeydown = (event: KeyboardEvent): void => {\n if (event.code === 'Escape' && this.open) {\n this.closeDialog();\n }\n };\n\n private toggleFooterShadow() {\n if (this.content?.scrollHeight > this.content?.offsetHeight) {\n this.footer?.classList?.add('shadow');\n } else {\n this.footer?.classList?.remove('shadow');\n }\n }\n\n private renderFooter() {\n return this._hasFooter\n ? html`<footer>\n <slot name=\"primary-action\"></slot>\n <slot name=\"secondary-action\"></slot>\n <slot name=\"tertiary-action\"></slot>\n </footer>`\n : '';\n }\n\n private renderContainer() {\n const title = this.caption ? html`<h2 id=\"dialog-caption\">${this.caption}</h2>` : '';\n\n return html` <div class=\"container\">\n <header>\n ${title}\n <bl-button\n @click=\"${this.closeDialog}\"\n icon=\"close\"\n variant=\"tertiary\"\n kind=\"neutral\"\n ></bl-button>\n </header>\n <section class=\"content\"><slot /></section>\n ${this.renderFooter()}\n </div>`;\n }\n\n render(): TemplateResult {\n return this.hasHtmlDialogSupport\n ? html`\n <dialog class=\"dialog\" aria-labelledby=\"dialog-caption\" @click=${this.clickOutsideHandler}>${this.renderContainer()}</dialog>\n `\n : html`<div class=\"dialog-polyfill\" role=\"dialog\" aria-labelledby=\"dialog-caption\" @click=${this.clickOutsideHandler}>\n ${this.ren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,EAAc,WAAW,GACLf",
6
+ "names": ["styles", "i", "bl_dialog_default", "BlDialog", "s", "event", "bl_dialog_default", "changedProperties", "node", "_a", "_b", "_c", "_d", "_e", "_f", "y", "title", "__decorateClass", "e", "i"]
7
+ }
@@ -0,0 +1,5 @@
1
+ import{a as m,b as u,c as g,d as f,e as w,f as y,g as E,h as x}from"./chunk-ANYJUR6Q.js";import{a as b}from"./chunk-OLPYXE2P.js";import{a as n}from"./chunk-23UFIOHV.js";import{a as d,b as h,f as v,g as c,h as i,i as s,j as a}from"./chunk-57PTZNIL.js";import{a as r}from"./chunk-NZ3RGSR6.js";var O=d`.popover{--arrow-display:var(--bl-popover-arrow-display,none);--background-color:var(--bl-popover-background-color,var(--bl-color-primary-background));--border-color:var(--bl-popover-border-color,var(--bl-color-primary-hover));--padding:var(--bl-popover-padding,var(--bl-size-m));--border-radius:var(--bl-popover-border-radius,var(--bl-size-3xs));--position:var(--bl-popover-position,fixed);position:var(--position);box-sizing:border-box;border:1px solid var(--border-color);padding:var(--padding);border-radius:var(--border-radius);z-index:var(--bl-index-popover);width:max-content;hyphens:auto;background-color:var(--background-color);font:var(--bl-font-title-3-regular);color:var(--bl-color-content-primary)}.popover:not(.visible){visibility:hidden}.arrow{--arrow-rotation:45deg;box-sizing:border-box;display:var(--arrow-display);position:absolute;background-color:var(--background-color);width:var(--bl-size-2xs);height:var(--bl-size-2xs);transform:rotate(var(--arrow-rotation));border:1px solid var(--border-color);border-bottom:0;border-right:0}`,_=O;var t=class extends v{constructor(){super(...arguments);this.placement="bottom";this.fitSize=!1;this.offset=8;this._visible=!1;this._handleClickOutside=e=>{let o=e.composedPath();!o.includes(this._target)&&!o.includes(this)&&this.hide()}}static get styles(){return[_]}connectedCallback(){super.connectedCallback(),this._handlePopoverShowEvent=this._handlePopoverShowEvent.bind(this),this._handleKeyupEvent=this._handleKeyupEvent.bind(this),this._handleClickOutside=this._handleClickOutside.bind(this)}disconnectedCallback(){super.disconnectedCallback(),this.popoverAutoUpdateCleanup&&this.popoverAutoUpdateCleanup()}getMiddleware(){let e=[];return e.push(f(this.offset),g(),u(),w({padding:4})),this.fitSize&&e.push(y({apply(o){o.elements.floating&&o.elements.reference&&Object.assign(o.elements.floating.style,{width:`${o.elements.reference.getBoundingClientRect().width}px`})}})),e.push(m({element:this.arrow,padding:5})),e}setPopover(){this.target&&(this.popoverAutoUpdateCleanup=E(this.target,this.popover,()=>{x(this.target,this.popover,{placement:this.placement,strategy:"fixed",middleware:this.getMiddleware()}).then(({x:e,y:o,placement:k,middlewareData:l})=>{if(Object.assign(this.popover.style,{left:`${e}px`,top:`${o}px`}),l.arrow){let{x:C,y:M}=l.arrow;Object.assign(this.arrow.style,{left:`${C}px`,top:`${M}px`});let S={top:"bottom",right:"left",bottom:"top",left:"right"},L={top:"225deg",right:"315deg",bottom:"45deg",left:"135deg"},p=k.split("-")[0],z=S[p];this.arrow.style.setProperty(z,"-5px"),this.arrow.style.setProperty("--arrow-rotation",L[p])}})}))}get target(){return this._target}set target(e){typeof e=="string"?this._target=document.getElementById(e):e instanceof Element?this._target=e:console.warn("BlPopover target only accepts an Element instance or a string id of a DOM element.")}show(){this._visible=!0,this.setPopover(),this.onBlPopoverShow(""),document.addEventListener("click",this._handleClickOutside),document.addEventListener("keyup",this._handleKeyupEvent),document.addEventListener("bl-popover-show",this._handlePopoverShowEvent)}hide(){this._visible=!1,document.removeEventListener("click",this._handleClickOutside),document.removeEventListener("keyup",this._handleKeyupEvent),document.removeEventListener("bl-popover-show",this._handlePopoverShowEvent),this.onBlPopoverHide("")}get visible(){return this._visible}_handlePopoverShowEvent(e){e.target!==this&&this.hide()}_handleKeyupEvent(e){e.key==="Escape"&&this.visible&&(this.hide(),e.preventDefault())}render(){let e=b({popover:!0,visible:this._visible});return h`<div class=${e}>
2
+ <slot id="popover" aria-live=${this._visible?"polite":"off"}></slot>
3
+ <div class="arrow" aria-hidden="true"></div>
4
+ </div>`}};r([a(".popover")],t.prototype,"popover",2),r([a(".arrow")],t.prototype,"arrow",2),r([i({type:String})],t.prototype,"placement",2),r([s()],t.prototype,"_target",2),r([i({type:Boolean,attribute:"fit-size"})],t.prototype,"fitSize",2),r([i({type:Number})],t.prototype,"offset",2),r([s()],t.prototype,"_visible",2),r([n("bl-popover-show")],t.prototype,"onBlPopoverShow",2),r([n("bl-popover-hide")],t.prototype,"onBlPopoverHide",2),r([i()],t.prototype,"target",1),t=r([c("bl-popover")],t);export{t as a};
5
+ //# sourceMappingURL=chunk-C5UMBCON.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/popover/bl-popover.css", "../src/components/popover/bl-popover.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.popover{--arrow-display:var(--bl-popover-arrow-display,none);--background-color:var(--bl-popover-background-color,var(--bl-color-primary-background));--border-color:var(--bl-popover-border-color,var(--bl-color-primary-hover));--padding:var(--bl-popover-padding,var(--bl-size-m));--border-radius:var(--bl-popover-border-radius,var(--bl-size-3xs));--position:var(--bl-popover-position,fixed);position:var(--position);box-sizing:border-box;border:1px solid var(--border-color);padding:var(--padding);border-radius:var(--border-radius);z-index:var(--bl-index-popover);width:max-content;hyphens:auto;background-color:var(--background-color);font:var(--bl-font-title-3-regular);color:var(--bl-color-content-primary)}.popover:not(.visible){visibility:hidden}.arrow{--arrow-rotation:45deg;box-sizing:border-box;display:var(--arrow-display);position:absolute;background-color:var(--background-color);width:var(--bl-size-2xs);height:var(--bl-size-2xs);transform:rotate(var(--arrow-rotation));border:1px solid var(--border-color);border-bottom:0;border-right:0}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport {\n computePosition,\n flip,\n shift,\n offset,\n arrow,\n inline,\n autoUpdate,\n size,\n Middleware,\n MiddlewareState,\n} from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport style from './bl-popover.css';\nimport { event, EventDispatcher } from '../../utilities/event';\n\nexport type Placement =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end'\n | 'left-start'\n | 'left'\n | 'left-end'\n | 'right-start'\n | 'right'\n | 'right-end';\n\n/**\n * @tag bl-popover\n * @summary Baklava Popover component\n *\n * @cssproperty [--bl-popover-arrow-display=none] - Sets the display of popovers arrow. Set as `block` to make arrow visible.\n * @cssproperty [--bl-popover-background-color=--bl-color-primary-background] - Sets the background color of popover.\n * @cssproperty [--bl-popover-border-color=--bl-color-primary-hover] - Sets the border color of popover.\n * @cssproperty [--bl-popover-padding=--bl-size-m] - Sets the padding of popover.\n * @cssproperty [--bl-popover-border-radius=--bl-size-3xs] - Sets the border radius of popover.\n * @cssproperty [--bl-popover-position=fixed] - Sets the position of popover. You can set it to `absolute` if parent element is a fixed positioned element like drawer or dialog.\n */\n@customElement('bl-popover')\nexport default class BlPopover extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @query('.popover') private popover: HTMLElement;\n @query('.arrow') private arrow: HTMLElement;\n\n /**\n * Sets placement of the popover\n */\n @property({ type: String })\n placement: Placement = 'bottom';\n\n /**\n * Target elements state\n */\n @state() _target: string | Element;\n\n\n /**\n * Sets size of popover same as trigger element\n */\n @property({ type: Boolean, attribute: 'fit-size' })\n fitSize = false;\n\n /**\n * Sets the distance between popover and target/trigger element\n */\n @property({ type: Number })\n offset = 8;\n\n /**\n * Visibility state\n */\n @state() private _visible = false;\n\n /**\n * Fires when the popover is shown\n */\n @event('bl-popover-show') private onBlPopoverShow: EventDispatcher<string>;\n\n /**\n * Fires when popover becomes hidden\n */\n @event('bl-popover-hide') private onBlPopoverHide: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n\n this._handlePopoverShowEvent = this._handlePopoverShowEvent.bind(this);\n this._handleKeyupEvent = this._handleKeyupEvent.bind(this);\n this._handleClickOutside = this._handleClickOutside.bind(this);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.popoverAutoUpdateCleanup && this.popoverAutoUpdateCleanup();\n }\n\n private getMiddleware(): Middleware[] {\n const middlewareParams: Middleware[] = [];\n middlewareParams.push(offset(this.offset), inline(), flip(),shift({ padding: 4 }));\n\n if (this.fitSize) {\n middlewareParams.push(\n size({\n apply(args: MiddlewareState) {\n if (args.elements.floating && args.elements.reference) {\n Object.assign(args.elements.floating.style, {\n width: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n }\n },\n })\n );\n }\n\n middlewareParams.push(arrow({ element: this.arrow, padding: 5 }));\n\n return middlewareParams;\n }\n\n private _handleClickOutside = (event: MouseEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n if (!eventPath.includes(this._target as HTMLElement) && !eventPath.includes(this)) {\n this.hide();\n }\n };\n\n private popoverAutoUpdateCleanup: () => void;\n\n private setPopover() {\n if (this.target) {\n this.popoverAutoUpdateCleanup = autoUpdate(this.target as Element, this.popover, () => {\n computePosition(this.target as Element, this.popover, {\n placement: this.placement,\n strategy: 'fixed',\n middleware: this.getMiddleware(),\n }).then(({ x, y, placement, middlewareData }) => {\n Object.assign(this.popover.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n\n if (middlewareData.arrow) {\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n\n Object.assign(this.arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`,\n });\n\n const arrowFlipDirections = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n };\n const arrowRotateDegrees = {\n top: '225deg',\n right: '315deg',\n bottom: '45deg',\n left: '135deg',\n };\n const popoverPlacement = placement.split('-')[0] as keyof typeof arrowFlipDirections;\n const arrowDirection = arrowFlipDirections[popoverPlacement];\n\n this.arrow.style.setProperty(arrowDirection, '-5px');\n this.arrow.style.setProperty('--arrow-rotation', arrowRotateDegrees[popoverPlacement]);\n }\n });\n });\n }\n }\n\n /**\n * Sets the target element of the popover to align and trigger.\n * It can be a string id of the target element or can be a direct Element reference of it.\n */\n @property()\n get target(): string | Element {\n return this._target;\n }\n\n set target(value: string | Element) {\n if (typeof value === 'string') {\n this._target = document.getElementById(value) as Element;\n } else if (value instanceof Element) {\n this._target = value;\n } else {\n console.warn(\n 'BlPopover target only accepts an Element instance or a string id of a DOM element.'\n );\n }\n }\n\n /**\n * Shows popover\n */\n show() {\n this._visible = true;\n this.setPopover();\n this.onBlPopoverShow('');\n document.addEventListener('click', this._handleClickOutside);\n document.addEventListener('keyup', this._handleKeyupEvent);\n document.addEventListener('bl-popover-show', this._handlePopoverShowEvent);\n }\n\n /**\n * Hides popover\n */\n hide() {\n this._visible = false;\n document.removeEventListener('click', this._handleClickOutside);\n document.removeEventListener('keyup', this._handleKeyupEvent);\n document.removeEventListener('bl-popover-show', this._handlePopoverShowEvent);\n this.onBlPopoverHide('');\n }\n\n /**\n * Gives the visibility status of the popover\n */\n get visible(): boolean {\n return this._visible;\n }\n\n private _handlePopoverShowEvent(event: Event) {\n if (event.target !== this) {\n this.hide();\n }\n }\n\n private _handleKeyupEvent(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.visible) {\n this.hide();\n event.preventDefault();\n }\n }\n\n render(): TemplateResult {\n const classes = classMap({\n popover: true,\n visible: this._visible,\n });\n\n return html`<div class=${classes}>\n <slot id=\"popover\" aria-live=${this._visible ? 'polite' : 'off'}></slot>\n <div class=\"arrow\" aria-hidden=\"true\"></div>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-popover': BlPopover;\n }\n}\n"],
5
+ "mappings": "mSACO,IAAMA,EAASC,+hCACfC,EAAQF,EC0Cf,IAAqBG,EAArB,cAAuCC,CAAW,CAAlD,kCAYE,eAAuB,SAYvB,aAAU,GAMV,YAAS,EAKA,KAAQ,SAAW,GAiD5B,KAAQ,oBAAuBC,GAAsB,CACnD,IAAMC,EAAYD,EAAM,aAAa,EACjC,CAACC,EAAU,SAAS,KAAK,OAAsB,GAAK,CAACA,EAAU,SAAS,IAAI,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VA,EAAM,eAAe,EAEzB,CAEA,QAAyB,CACvB,IAAMwB,EAAUC,EAAS,CACvB,QAAS,GACT,QAAS,KAAK,QAChB,CAAC,EAED,OAAOX,eAAkBU;AAAA,qCACQ,KAAK,SAAW,SAAW;AAAA;AAAA,WAG9D,CACF,EA/M6BE,EAAA,CAA1BC,EAAM,UAAU,GALE7B,EAKQ,uBACF4B,EAAA,CAAxBC,EAAM,QAAQ,GANI7B,EAMM,qBAMzB4B,EAAA,CADCE,EAAS,CAAE,KAAM,MAAO,CAAC,GAXP9B,EAYnB,yBAKS4B,EAAA,CAARG,EAAM,GAjBY/B,EAiBV,uBAOT4B,EAAA,CADCE,EAAS,CAAE,KAAM,QAAS,UAAW,UAAW,CAAC,GAvB/B9B,EAwBnB,uBAMA4B,EAAA,CADCE,EAAS,CAAE,KAAM,MAAO,CAAC,GA7BP9B,EA8BnB,sBAKiB4B,EAAA,CAAhBG,EAAM,GAnCY/B,EAmCF,wBAKiB4B,EAAA,CAAjC1B,EAAM,iBAAiB,GAxCLF,EAwCe,+BAKA4B,EAAA,CAAjC1B,EAAM,iBAAiB,GA7CLF,EA6Ce,+BAiG9B4B,EAAA,CADHE,EAAS,GA7IS9B,EA8If,sBA9IeA,EAArB4B,EAAA,CADCE,EAAc,YAAY,GACN9B",
6
+ "names": ["styles", "i", "bl_popover_default", "BlPopover", "s", "event", "eventPath", "bl_popover_default", "middlewareParams", "O", "T", "b", "D", "k", "args", "u", "P", "z", "x", "y", "placement", "middlewareData", "arrowX", "arrowY", "arrowFlipDirections", "arrowRotateDegrees", "popoverPlacement", "arrowDirection", "value", "classes", "o", "__decorateClass", "i", "e", "t"]
7
+ }
@@ -1,4 +1,4 @@
1
- import{a}from"./chunk-23UFIOHV.js";import{a as o,b as i,f as s,g as l,h as n,i as d}from"./chunk-57PTZNIL.js";import{a as t}from"./chunk-NZ3RGSR6.js";var h=o`.drawer{box-sizing:border-box;position:fixed;display:flex;top:0;right:-100%;bottom:0;width:424px;padding:var(--bl-size-xl);padding-top:max(env(safe-area-inset-top),var(--bl-size-xl));padding-right:max(env(safe-area-inset-right),var(--bl-size-xl));padding-bottom:max(env(safe-area-inset-bottom),var(--bl-size-xl));background:var(--bl-color-primary-background);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transition:right var(--bl-drawer-animation-duration,.25s);z-index:999}:host([open]) .drawer{right:0}iframe{height:100%;width:100%;border:0}.container{display:flex;flex-direction:column;gap:var(--bl-size-xl);flex:1}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);background-color:white}header .header-buttons{display:flex;gap:24px;margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);overflow:hidden;margin:0;padding:0}.content{flex:1;overflow-y:scroll}.iframe-content{flex:1}@media only screen and (max-width:424px){:host([open]) .drawer{width:calc(100vw - 24px)}}`,c=h;var e=class extends s{constructor(){super(...arguments);this.open=!1;this.domExistence=!1}static get styles(){return[c]}connectedCallback(){super.connectedCallback(),window==null||window.addEventListener("bl-drawer-open",r=>{r.target!==this&&this.closeDrawer()})}updated(r){r.has("open")&&this.toggleDialogHandler()}toggleDialogHandler(){this.open?(this.domExistenceSchedule&&clearTimeout(this.domExistenceSchedule),this.domExistence=!0,this.onOpen("")):(this.domExistenceSchedule=window.setTimeout(()=>{this.domExistence=!1},1e3),this.onClose(""))}closeDrawer(){this.open=!1}renderContent(){let r=this.embedUrl?i`<iframe src=${this.embedUrl}></iframe>`:i`<slot></slot>`;return i`<section class=${this.embedUrl?"iframe-content":"content"}>
1
+ import{a}from"./chunk-23UFIOHV.js";import{a as o,b as i,f as s,g as l,h as n,i as d}from"./chunk-57PTZNIL.js";import{a as t}from"./chunk-NZ3RGSR6.js";var h=o`.drawer{box-sizing:border-box;position:fixed;display:flex;top:0;right:-100%;bottom:0;width:424px;padding:var(--bl-size-xl);padding-top:max(env(safe-area-inset-top),var(--bl-size-xl));padding-right:max(env(safe-area-inset-right),var(--bl-size-xl));padding-bottom:max(env(safe-area-inset-bottom),var(--bl-size-xl));background:var(--bl-color-primary-background);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transition:right var(--bl-drawer-animation-duration,.25s);z-index:var(--bl-index-sticky)}:host([open]) .drawer{right:0}iframe{height:100%;width:100%;border:0}.container{display:flex;flex-direction:column;gap:var(--bl-size-xl);flex:1}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);background-color:white}header .header-buttons{display:flex;gap:24px;margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);overflow:hidden;margin:0;padding:0}.content{flex:1;overflow-y:scroll}.iframe-content{flex:1}@media only screen and (max-width:424px){:host([open]) .drawer{width:calc(100vw - 24px)}}`,c=h;var e=class extends s{constructor(){super(...arguments);this.open=!1;this.domExistence=!1}static get styles(){return[c]}connectedCallback(){super.connectedCallback(),window==null||window.addEventListener("bl-drawer-open",r=>{r.target!==this&&this.closeDrawer()})}updated(r){r.has("open")&&this.toggleDialogHandler()}toggleDialogHandler(){this.open?(this.domExistenceSchedule&&clearTimeout(this.domExistenceSchedule),this.domExistence=!0,this.onOpen("")):(this.domExistenceSchedule=window.setTimeout(()=>{this.domExistence=!1},1e3),this.onClose(""))}closeDrawer(){this.open=!1}renderContent(){let r=this.embedUrl?i`<iframe src=${this.embedUrl}></iframe>`:i`<slot></slot>`;return i`<section class=${this.embedUrl?"iframe-content":"content"}>
2
2
  ${r}
3
3
  </section>`}renderContainer(){let r=this.caption?i`<h2 id="drawer-caption">${this.caption}</h2>`:"",p=this.externalLink?i`<bl-button
4
4
  icon="external_link"
@@ -23,4 +23,4 @@ import{a}from"./chunk-23UFIOHV.js";import{a as o,b as i,f as s,g as l,h as n,i a
23
23
  </header>
24
24
  ${this.renderContent()}
25
25
  </div>`}render(){return this.domExistence?i`<div class="drawer">${this.renderContainer()}</div>`:i``}};t([n({type:Boolean,reflect:!0})],e.prototype,"open",2),t([n({type:String})],e.prototype,"caption",2),t([n({type:String,attribute:"embed-url"})],e.prototype,"embedUrl",2),t([n({type:String,attribute:"external-link"})],e.prototype,"externalLink",2),t([a("bl-drawer-open")],e.prototype,"onOpen",2),t([a("bl-drawer-close")],e.prototype,"onClose",2),t([d()],e.prototype,"domExistence",2),e=t([l("bl-drawer")],e);export{e as a};
26
- //# sourceMappingURL=chunk-AYSPIQ23.js.map
26
+ //# sourceMappingURL=chunk-N35VLT2U.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/drawer/bl-drawer.css", "../src/components/drawer/bl-drawer.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.drawer{box-sizing:border-box;position:fixed;display:flex;top:0;right:-100%;bottom:0;width:424px;padding:var(--bl-size-xl);padding-top:max(env(safe-area-inset-top),var(--bl-size-xl));padding-right:max(env(safe-area-inset-right),var(--bl-size-xl));padding-bottom:max(env(safe-area-inset-bottom),var(--bl-size-xl));background:var(--bl-color-primary-background);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transition:right var(--bl-drawer-animation-duration,.25s);z-index:var(--bl-index-sticky)}:host([open]) .drawer{right:0}iframe{height:100%;width:100%;border:0}.container{display:flex;flex-direction:column;gap:var(--bl-size-xl);flex:1}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);background-color:white}header .header-buttons{display:flex;gap:24px;margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);overflow:hidden;margin:0;padding:0}.content{flex:1;overflow-y:scroll}.iframe-content{flex:1}@media only screen and (max-width:424px){:host([open]) .drawer{width:calc(100vw - 24px)}}`;\nexport default styles;\n", "import { customElement, property, state } from 'lit/decorators.js';\nimport { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../button/bl-button';\nimport style from './bl-drawer.css';\nimport { PropertyValues } from 'lit';\n\n/**\n * @tag bl-drawer\n * @summary Baklava Drawer component\n *\n */\n\n@customElement('bl-drawer')\nexport default class BlDrawer extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets drawer open-close status\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Sets the drawer title\n */\n @property({ type: String })\n caption?: string;\n\n /**\n * Sets the drawer embed url for iframe\n */\n @property({ type: String, attribute: 'embed-url' })\n embedUrl?: string;\n\n /**\n * Sets the drawer external link\n */\n @property({ type: String, attribute: 'external-link' })\n externalLink?: string;\n\n /**\n * Fires when the drawer is opened\n */\n @event('bl-drawer-open') private onOpen: EventDispatcher<string>;\n\n /**\n * Fires when the drawer is closed\n */\n @event('bl-drawer-close') private onClose: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n window?.addEventListener('bl-drawer-open', event => {\n if (event.target !== this) this.closeDrawer();\n });\n }\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('open')) {\n this.toggleDialogHandler();\n }\n }\n\n private domExistenceSchedule: number;\n\n private toggleDialogHandler() {\n if (this.open) {\n if (this.domExistenceSchedule) {\n clearTimeout(this.domExistenceSchedule);\n }\n\n this.domExistence = true;\n // FIXME: Allow events without payload\n this.onOpen('');\n } else {\n // Give some time for exit animation\n this.domExistenceSchedule = window.setTimeout(() => {\n this.domExistence = false;\n }, 1000);\n\n // FIXME: Allow events without payload\n this.onClose('');\n }\n }\n\n @state() private domExistence = false;\n\n private closeDrawer() {\n this.open = false;\n }\n\n private renderContent() {\n const content = this.embedUrl ? html`<iframe src=${this.embedUrl}></iframe>` : html`<slot></slot>`;\n\n return html`<section class=${this.embedUrl ? 'iframe-content' : 'content'}>\n ${content}\n </section>`;\n }\n\n private renderContainer() {\n const title = this.caption ? html`<h2 id=\"drawer-caption\">${this.caption}</h2>` : '';\n const external_button = this.externalLink\n ? html`<bl-button\n icon=\"external_link\"\n variant=\"tertiary\"\n kind=\"neutral\"\n size=\"small\"\n href=\"${this.externalLink}\"\n target=\"_blank\"\n ></bl-button>`\n : '';\n\n return html`<div class=\"container\">\n <header>\n ${title}\n <div class=\"header-buttons\">\n ${external_button}\n <bl-button\n @click=\"${this.closeDrawer}\"\n icon=\"close\"\n size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\n ></bl-button>\n </div>\n </header>\n ${this.renderContent()}\n </div>`;\n }\n\n render(): TemplateResult {\n if (this.domExistence) {\n return html`<div class=\"drawer\">${this.renderContainer()}</div>`;\n } else {\n return html``;\n }\n }\n}\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-drawer': BlDrawer;\n }\n}\n"],
5
+ "mappings": "sJACO,IAAMA,EAASC,6kCACfC,EAAQF,ECYf,IAAqBG,EAArB,cAAsC,CAAW,CAAjD,kCASE,UAAO,GAiEE,KAAQ,aAAe,GAzEhC,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAoCA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,qBAAQ,iBAAiB,iBAAkBC,GAAS,CAC9CA,EAAM,SAAW,MAAM,KAAK,YAAY,CAC9C,EACF,CAEA,QAAQC,EAAyC,CAC3CA,EAAkB,IAAI,MAAM,GAC9B,KAAK,oBAAoB,CAE7B,CAIQ,qBAAsB,CACxB,KAAK,MACH,KAAK,sBACP,aAAa,KAAK,oBAAoB,EAGxC,KAAK,aAAe,GAEpB,KAAK,OAAO,EAAE,IAGd,KAAK,qBAAuB,OAAO,WAAW,IAAM,CAClD,KAAK,aAAe,EACtB,EAAG,GAAI,EAGP,KAAK,QAAQ,EAAE,EAEnB,CAIQ,aAAc,CACpB,KAAK,KAAO,EACd,CAEQ,eAAgB,CACtB,IAAMC,EAAU,KAAK,SAAWC,gBAAmB,KAAK,qBAAuBA,iBAE/E,OAAOA,mBAAsB,KAAK,SAAW,iBAAmB;AAAA,QAC5DD;AAAA,eAEN,CAEQ,iBAAkB,CACxB,IAAME,EAAQ,KAAK,QAAUD,4BAA+B,KAAK,eAAiB,GAC5EE,EAAkB,KAAK,aACzBF;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKU,KAAK;AAAA;AAAA,uBAGf,GAEJ,OAAOA;AAAA;AAAA,UAEDC;AAAA;AAAA,YAEEC;AAAA;AAAA,sBAEU,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAQnB,KAAK,cAAc;AAAA,WAEzB,CAEA,QAAyB,CACvB,OAAI,KAAK,aACAF,wBAA2B,KAAK,gBAAgB,UAEhDA,GAEX,CACF,EArHEG,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARvBT,EASnB,oBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAdPT,EAenB,uBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,GApB/BT,EAqBnB,wBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,GA1BnCT,EA2BnB,4BAKiCQ,EAAA,CAAhCN,EAAM,gBAAgB,GAhCJF,EAgCc,sBAKCQ,EAAA,CAAjCN,EAAM,iBAAiB,GArCLF,EAqCe,uBAqCjBQ,EAAA,CAAhBE,EAAM,GA1EYV,EA0EF,4BA1EEA,EAArBQ,EAAA,CADCC,EAAc,WAAW,GACLT",
6
+ "names": ["styles", "i", "bl_drawer_default", "BlDrawer", "bl_drawer_default", "event", "changedProperties", "content", "y", "title", "external_button", "__decorateClass", "e", "t"]
7
+ }
@@ -0,0 +1,15 @@
1
+ import{a as b,b as u,c as f,d as g,e as w,g as y,h as x}from"./chunk-ANYJUR6Q.js";import{a as m}from"./chunk-OLPYXE2P.js";import{a as r}from"./chunk-23UFIOHV.js";import{a as n,b as p,f as d,g as h,h as c,i as v,j as i}from"./chunk-57PTZNIL.js";import{a as e}from"./chunk-NZ3RGSR6.js";var z=n`.trigger{display:inline-block;cursor:pointer}.tooltip{position:fixed;box-sizing:border-box;border:0;background-color:var(--bl-color-secondary);color:var(--bl-color-content-primary-contrast);border-radius:var(--bl-size-3xs);pointer-events:none;font:var(--bl-font-title-3-regular);padding:var(--bl-size-m);z-index:var(--bl-index-tooltip);width:max-content;hyphens:auto;--max-viewport:calc(100vw - var(--bl-size-s));--tooltip-max-width:424px;max-width:min(var(--max-viewport),var(--tooltip-max-width))}.tooltip:not(.visible){visibility:hidden}.arrow{position:absolute;background-color:var(--bl-color-secondary);width:var(--bl-size-2xs);height:var(--bl-size-2xs);transform:rotate(45deg)}`,E=z;var t=class extends d{constructor(){super(...arguments);this.placement="top";this._visible=!1}static get styles(){return[E]}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.popoverAutoUpdateCleanup&&this.popoverAutoUpdateCleanup()}setTooltip(){this.popoverAutoUpdateCleanup=y(this.trigger,this.tooltip,()=>{x(this.trigger,this.tooltip,{placement:this.placement,strategy:"fixed",middleware:[g(8),w({padding:5}),u(),f(),b({element:this.arrow,padding:5})]}).then(({x:o,y:k,placement:C,middlewareData:s})=>{if(Object.assign(this.tooltip.style,{left:`${o}px`,top:`${k}px`}),s.arrow){let{x:a,y:l}=s.arrow;Object.assign(this.arrow.style,{left:a!=null?`${a}px`:"",top:l!=null?`${l}px`:""});let $={top:"bottom",right:"left",bottom:"top",left:"right"},D=C.split("-")[0],S=$[D];this.arrow.style.setProperty(S,"-4px")}})})}show(){this._visible=!0,this.setTooltip(),this.onShow("Show event fired!")}hide(){this._visible=!1,this.onHide("Hide event fired!")}get visible(){return this._visible}handleKeyDown(o){this._visible&&o.key==="Escape"&&(o.stopPropagation(),this.hide())}render(){let o=m({tooltip:!0,visible:this._visible});return p`<slot
2
+ class="trigger"
3
+ name="tooltip-trigger"
4
+ aria-describedby="tooltip"
5
+ @focus=${{handleEvent:()=>this.show(),capture:!0}}
6
+ @blur=${{handleEvent:()=>this.hide(),capture:!0}}
7
+ @mouseover=${()=>this.show()}
8
+ @mouseleave=${()=>this.hide()}
9
+ >
10
+ </slot>
11
+ <div class=${o}>
12
+ <slot id="tooltip" role="tooltip" aria-live=${this._visible?"polite":"off"}></slot>
13
+ <div class="arrow" aria-hidden="true"></div>
14
+ </div>`}};e([i(".tooltip")],t.prototype,"tooltip",2),e([i(".trigger")],t.prototype,"trigger",2),e([i(".arrow")],t.prototype,"arrow",2),e([c({type:String})],t.prototype,"placement",2),e([v()],t.prototype,"_visible",2),e([r("bl-tooltip-show")],t.prototype,"onShow",2),e([r("bl-tooltip-hide")],t.prototype,"onHide",2),t=e([h("bl-tooltip")],t);export{t as a};
15
+ //# sourceMappingURL=chunk-R6XFK3HN.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/tooltip/bl-tooltip.css", "../src/components/tooltip/bl-tooltip.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.trigger{display:inline-block;cursor:pointer}.tooltip{position:fixed;box-sizing:border-box;border:0;background-color:var(--bl-color-secondary);color:var(--bl-color-content-primary-contrast);border-radius:var(--bl-size-3xs);pointer-events:none;font:var(--bl-font-title-3-regular);padding:var(--bl-size-m);z-index:var(--bl-index-tooltip);width:max-content;hyphens:auto;--max-viewport:calc(100vw - var(--bl-size-s));--tooltip-max-width:424px;max-width:min(var(--max-viewport),var(--tooltip-max-width))}.tooltip:not(.visible){visibility:hidden}.arrow{position:absolute;background-color:var(--bl-color-secondary);width:var(--bl-size-2xs);height:var(--bl-size-2xs);transform:rotate(45deg)}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { computePosition, flip, shift, offset, arrow, inline, autoUpdate } from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ReferenceElement } from '@floating-ui/core';\nimport style from './bl-tooltip.css';\nimport { event, EventDispatcher } from '../../utilities/event';\n\nexport type Placement =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end'\n | 'left-start'\n | 'left'\n | 'left-end'\n | 'right-start'\n | 'right'\n | 'right-end';\n\n/**\n * @tag bl-tooltip\n * @summary Baklava Tooltip component\n *\n * @property {string} placement - Sets the tooltip placement\n */\n@customElement('bl-tooltip')\nexport default class BlTooltip extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @query('.tooltip') private tooltip: HTMLElement;\n @query('.trigger') private trigger: ReferenceElement;\n @query('.arrow') private arrow: HTMLElement;\n\n /**\n * Sets placement of the tooltip\n */\n @property({ type: String })\n placement: Placement = 'top';\n\n @state() private _visible = false;\n\n /**\n * Fires when hovering over a trigger\n */\n @event('bl-tooltip-show') private onShow: EventDispatcher<string>;\n\n /**\n * Fires when leaving over from trigger\n */\n @event('bl-tooltip-hide') private onHide: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener('keydown', this.handleKeyDown);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener('keydown', this.handleKeyDown);\n\n this.popoverAutoUpdateCleanup && this.popoverAutoUpdateCleanup();\n }\n\n private popoverAutoUpdateCleanup: () => void;\n\n private setTooltip() {\n this.popoverAutoUpdateCleanup = autoUpdate(this.trigger, this.tooltip, () => {\n computePosition(this.trigger, this.tooltip, {\n placement: this.placement,\n strategy: 'fixed',\n middleware: [\n offset(8),\n shift({ padding: 5 }),\n flip(),\n inline(),\n arrow({ element: this.arrow, padding: 5 }),\n ],\n }).then(({ x, y, placement, middlewareData }) => {\n Object.assign(this.tooltip.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n\n if (middlewareData.arrow) {\n const {x: arrowX, y: arrowY} = middlewareData.arrow;\n\n Object.assign(this.arrow.style, {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n });\n\n const arrowFlipDirections = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n };\n const tooltipPlacement = placement.split('-')[0] as keyof typeof arrowFlipDirections;\n const arrowDirection = arrowFlipDirections[tooltipPlacement];\n\n this.arrow.style.setProperty(arrowDirection, '-4px');\n }\n });\n });\n }\n\n /**\n * Shows tooltip\n */\n show() {\n this._visible = true;\n this.setTooltip();\n this.onShow('Show event fired!');\n }\n\n /**\n * Hides tooltip\n */\n hide() {\n this._visible = false;\n this.onHide('Hide event fired!');\n }\n\n /**\n * Gives the visibility status of the tooltip\n */\n get visible(): boolean {\n return this._visible;\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (this._visible && event.key === 'Escape') {\n event.stopPropagation();\n this.hide();\n }\n }\n\n render(): TemplateResult {\n const classes = classMap({\n tooltip: true,\n visible: this._visible,\n });\n\n return html`<slot\n class=\"trigger\"\n name=\"tooltip-trigger\"\n aria-describedby=\"tooltip\"\n @focus=${{ handleEvent: () => this.show(), capture: true }}\n @blur=${{ handleEvent: () => this.hide(), capture: true }}\n @mouseover=${() => this.show()}\n @mouseleave=${() => this.hide()}\n >\n </slot>\n <div class=${classes}>\n <slot id=\"tooltip\" role=\"tooltip\" aria-live=${this._visible ? 'polite' : 'off'}></slot>\n <div class=\"arrow\" aria-hidden=\"true\"></div>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-tooltip': BlTooltip;\n }\n}\n"],
5
+ "mappings": "4RACO,IAAMA,EAASC,+qBACfC,EAAQF,EC2Bf,IAAqBG,EAArB,cAAuCC,CAAW,CAAlD,kCAaE,eAAuB,MAEd,KAAQ,SAAW,GAd5B,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAwBA,mBAAoB,CAClB,MAAM,kBAAkB,EAExB,KAAK,iBAAiB,UAAW,KAAK,aAAa,CACrD,CAEA,sBAAuB,CACrB,MAAM,qBAAqB,EAE3B,KAAK,oBAAoB,UAAW,KAAK,aAAa,EAEtD,KAAK,0BA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,IAAMC,EAAUC,EAAS,CACvB,QAAS,GACT,QAAS,KAAK,QAChB,CAAC,EAED,OAAOV;AAAA;AAAA;AAAA;AAAA,iBAIM,CAAE,YAAa,IAAM,KAAK,KAAK,EAAG,QAAS,EAAK;AAAA,gBACjD,CAAE,YAAa,IAAM,KAAK,KAAK,EAAG,QAAS,EAAK;AAAA,qBAC3C,IAAM,KAAK,KAAK;AAAA,sBACf,IAAM,KAAK,KAAK;AAAA;AAAA;AAAA,mBAGnBS;AAAA,sDACmC,KAAK,SAAW,SAAW;AAAA;AAAA,aAG/E,CACF,EAnI6BE,EAAA,CAA1B,EAAM,UAAU,GALEtB,EAKQ,uBACAsB,EAAA,CAA1B,EAAM,UAAU,GANEtB,EAMQ,uBACFsB,EAAA,CAAxB,EAAM,QAAQ,GAPItB,EAOM,qBAMzBsB,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAZPvB,EAanB,yBAEiBsB,EAAA,CAAhBE,EAAM,GAfYxB,EAeF,wBAKiBsB,EAAA,CAAjCH,EAAM,iBAAiB,GApBLnB,EAoBe,sBAKAsB,EAAA,CAAjCH,EAAM,iBAAiB,GAzBLnB,EAyBe,sBAzBfA,EAArBsB,EAAA,CADCC,EAAc,YAAY,GACNvB",
6
+ "names": ["styles", "i", "bl_tooltip_default", "BlTooltip", "s", "bl_tooltip_default", "P", "z", "O", "D", "b", "T", "u", "x", "y", "placement", "middlewareData", "arrowX", "arrowY", "arrowFlipDirections", "tooltipPlacement", "arrowDirection", "event", "classes", "o", "__decorateClass", "e", "t"]
7
+ }
@@ -0,0 +1,21 @@
1
+ import{a as h}from"./chunk-KQBXYF3J.js";import{b as y,d as g,f as k,g as x,h as w}from"./chunk-ANYJUR6Q.js";import{a as f}from"./chunk-OLPYXE2P.js";import{a as l}from"./chunk-KPAWUBRO.js";import{a as s}from"./chunk-23UFIOHV.js";import{a,b as d,f as c,g as u,h as r,i as b,j as n}from"./chunk-57PTZNIL.js";import{a as e}from"./chunk-NZ3RGSR6.js";var O=a`:host{position:relative;display:inline-block}.popover{--left:0;--top:0;--border-color:var(--bl-color-primary);position:fixed;z-index:var(--bl-index-popover);display:none;flex-direction:column;align-items:flex-start;padding:var(--bl-size-m);gap:var(--bl-size-xs);overflow-y:auto;background:var(--bl-color-primary-background);border:1px solid var(--border-color);box-shadow:0 10px 15px -8px #27314226;border-radius:var(--bl-size-3xs);left:var(--left);top:var(--top);box-sizing:border-box}:host([kind='neutral']) .popover{--border-color:var(--bl-color-secondary)}:host([kind='success']) .popover{--border-color:var(--bl-color-success)}:host([kind='danger']) .popover{--border-color:var(--bl-color-danger)}.visible{display:flex}`,_=O;var m="bl-dropdown",t=class extends c{constructor(){super(...arguments);this._cleanUpPopover=null;this._isPopoverOpen=!1;this.label="Dropdown Button";this.variant="primary";this.kind="default";this.size="medium";this.disabled=!1;this._handleClickOutside=o=>{let p=o.composedPath();!p.includes(this._popover)&&!p.includes(this._dropdownButton)&&this.close()};this.focusedOptionIndex=-1}static get styles(){return[_]}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this._cleanUpPopover&&this._cleanUpPopover(),this.removeEventListener("keydown",this.handleKeyDown)}get opened(){return this._isPopoverOpen}_handleClick(){!this._isPopoverOpen&&!this.disabled?this.open():this.close()}_setupPopover(){this._cleanUpPopover=x(this._dropdownButton,this._popover,()=>{w(this._dropdownButton,this._popover,{placement:"bottom-start",strategy:"fixed",middleware:[y(),g(8),k({apply(o){Object.assign(o.elements.floating.style,{minWidth:`${o.elements.reference.getBoundingClientRect().width}px`})}})]}).then(({x:o,y:p})=>{this._popover.style.setProperty("--left",`${o}px`),this._popover.style.setProperty("--top",`${p}px`)})})}handleKeyDown(o){if(["ArrowDown","ArrowRight"].includes(o.key))this.focusedOptionIndex++;else if(["ArrowUp","ArrowLeft"].includes(o.key))this.focusedOptionIndex--;else if(o.key==="Escape"){this.focusedOptionIndex=-1,this.close();return}else return;this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,this.options.length-1)),this.options[this.focusedOptionIndex].focus(),o.preventDefault()}get options(){return[].slice.call(this.querySelectorAll(v))}open(){this._isPopoverOpen=!0,this._setupPopover(),this.onOpen("Dropdown opened!"),document.addEventListener("click",this._handleClickOutside)}close(){this._isPopoverOpen=!1,this.onClose("Dropdown closed!"),this._cleanUpPopover&&this._cleanUpPopover(),document.removeEventListener("click",this._handleClickOutside)}render(){let o=f({popover:!0,visible:this.opened});return d`<bl-button
2
+ dropdown
3
+ .active=${this.opened}
4
+ ?disabled=${l(this.disabled)}
5
+ variant="${this.variant}"
6
+ kind="${this.kind}"
7
+ size="${this.size}"
8
+ aria-label="${l(this.label)}"
9
+ @bl-click="${this._handleClick}"
10
+ >
11
+ ${this.label}
12
+ </bl-button>
13
+ <div class="${o}" role="menu" aria-expanded="${this.opened}"><slot></slot></div> `}};e([n("bl-button")],t.prototype,"_dropdownButton",2),e([n(".popover")],t.prototype,"_popover",2),e([b()],t.prototype,"_isPopoverOpen",2),e([r({type:String,reflect:!0})],t.prototype,"label",2),e([r({type:String,reflect:!0})],t.prototype,"variant",2),e([r({type:String,reflect:!0})],t.prototype,"kind",2),e([r({type:String,reflect:!0})],t.prototype,"size",2),e([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([s("bl-dropdown-open")],t.prototype,"onOpen",2),e([s("bl-dropdown-close")],t.prototype,"onClose",2),t=e([u(m)],t);var P=a`:host{width:100%;--bl-button-display:block;--bl-button-justify:start}`,C=P;var v="bl-dropdown-item",i=class extends c{static get styles(){return[C]}_handleClick(){this.onClick("Action clicked!")}focus(){this.menuElement.focus()}connectedCallback(){super.connectedCallback(),this.BlDropdownGroupField=this.closest(h),this.BlDropdownField=this.closest(m),!this.BlDropdownField&&!this.BlDropdownGroupField&&console.warn(`bl-dropdown-item is designed to be used inside a ${h} or ${m}`,this)}disconnectedCallback(){super.disconnectedCallback()}render(){return d`<bl-button
14
+ variant="tertiary"
15
+ kind="neutral"
16
+ icon="${l(this.icon)}"
17
+ role="menuitem"
18
+ @click="${this._handleClick}"
19
+ ><slot></slot>
20
+ </bl-button>`}};e([r({type:String})],i.prototype,"icon",2),e([s("bl-dropdown-item-click")],i.prototype,"onClick",2),e([n("[role=menuitem]")],i.prototype,"menuElement",2),i=e([u(v)],i);export{v as a,i as b,m as c,t as d};
21
+ //# sourceMappingURL=chunk-W3NQ6T5J.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/dropdown/bl-dropdown.css", "../src/components/dropdown/bl-dropdown.ts", "../src/components/dropdown/item/bl-dropdown-item.css", "../src/components/dropdown/item/bl-dropdown-item.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{position:relative;display:inline-block}.popover{--left:0;--top:0;--border-color:var(--bl-color-primary);position:fixed;z-index:var(--bl-index-popover);display:none;flex-direction:column;align-items:flex-start;padding:var(--bl-size-m);gap:var(--bl-size-xs);overflow-y:auto;background:var(--bl-color-primary-background);border:1px solid var(--border-color);box-shadow:0 10px 15px -8px #27314226;border-radius:var(--bl-size-3xs);left:var(--left);top:var(--top);box-sizing:border-box}:host([kind='neutral']) .popover{--border-color:var(--bl-color-secondary)}:host([kind='success']) .popover{--border-color:var(--bl-color-success)}:host([kind='danger']) .popover{--border-color:var(--bl-color-danger)}.visible{display:flex}`;\nexport default styles;\n", "import { LitElement, html, CSSResultGroup, TemplateResult } from 'lit';\nimport { customElement, property, state, query } from 'lit/decorators.js';\nimport {\n computePosition,\n flip,\n offset,\n autoUpdate,\n size,\n MiddlewareArguments,\n} from '@floating-ui/dom';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport style from './bl-dropdown.css';\n\nimport '../button/bl-button';\nimport { ButtonSize, ButtonVariant, ButtonKind } from '../button/bl-button';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\nimport BlDropdownItem, { blDropdownItemTag } from './item/bl-dropdown-item';\n\nexport type CleanUpFunction = () => void;\n\nexport const blDropdownTag = 'bl-dropdown';\n\n/**\n * @tag bl-dropdown\n * @summary Baklava Dropdown component\n */\n@customElement(blDropdownTag)\nexport default class BlDropdown extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @query('bl-button')\n private _dropdownButton: HTMLElement;\n\n @query('.popover')\n private _popover: HTMLElement;\n\n private _cleanUpPopover: CleanUpFunction | null = null;\n\n @state() private _isPopoverOpen = false;\n\n /**\n * Sets the dropdown button label\n */\n @property({ type: String, reflect: true })\n label = 'Dropdown Button';\n\n /**\n * Sets the dropdown button variant\n */\n @property({ type: String, reflect: true })\n variant: ButtonVariant = 'primary';\n\n /**\n * Sets the dropdown button kind\n */\n @property({ type: String, reflect: true })\n kind: ButtonKind = 'default';\n\n /**\n * Sets the dropdown button size\n */\n @property({ type: String, reflect: true })\n size: ButtonSize = 'medium';\n\n /**\n * Sets button as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Fires when dropdown opened\n */\n @event('bl-dropdown-open') private onOpen: EventDispatcher<string>;\n\n /**\n * Fires when dropdown closed\n */\n @event('bl-dropdown-close') private onClose: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('keydown', this.handleKeyDown);\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this._cleanUpPopover && this._cleanUpPopover();\n this.removeEventListener('keydown', this.handleKeyDown);\n }\n\n get opened() {\n return this._isPopoverOpen;\n }\n\n private _handleClick() {\n !this._isPopoverOpen && !this.disabled ? this.open() : this.close();\n }\n\n private _handleClickOutside = (event: MouseEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n if (!eventPath.includes(this._popover) && !eventPath.includes(this._dropdownButton)) {\n this.close();\n }\n };\n\n private _setupPopover() {\n this._cleanUpPopover = autoUpdate(this._dropdownButton, this._popover, () => {\n computePosition(this._dropdownButton, this._popover, {\n placement: 'bottom-start',\n strategy: 'fixed',\n middleware: [\n flip(),\n offset(8),\n size({\n apply(args: MiddlewareArguments) {\n Object.assign(args.elements.floating.style, {\n minWidth: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n },\n }),\n ],\n }).then(({ x, y }) => {\n this._popover.style.setProperty('--left', `${x}px`);\n this._popover.style.setProperty('--top', `${y}px`);\n });\n });\n }\n\n private focusedOptionIndex = -1;\n\n private handleKeyDown(event: KeyboardEvent) {\n // Next action\n if (['ArrowDown', 'ArrowRight'].includes(event.key)) {\n this.focusedOptionIndex++;\n\n // Previous action\n } else if (['ArrowUp', 'ArrowLeft'].includes(event.key)) {\n this.focusedOptionIndex--;\n // Select action\n } else if (event.key === 'Escape') {\n this.focusedOptionIndex = -1;\n this.close()\n return;\n } else {\n // Other keys are not our interest here\n return;\n }\n\n // Don't exceed array indexes\n this.focusedOptionIndex = Math.max(\n 0,\n Math.min(this.focusedOptionIndex, this.options.length - 1)\n );\n\n this.options[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n }\n\n get options(): BlDropdownItem[] {\n return [].slice.call(this.querySelectorAll(blDropdownItemTag));\n }\n\n open() {\n this._isPopoverOpen = true;\n this._setupPopover();\n this.onOpen('Dropdown opened!');\n document.addEventListener('click', this._handleClickOutside);\n }\n\n close() {\n this._isPopoverOpen = false;\n this.onClose('Dropdown closed!');\n this._cleanUpPopover && this._cleanUpPopover();\n document.removeEventListener('click', this._handleClickOutside);\n }\n\n render(): TemplateResult {\n const popoverClasses = classMap({\n popover: true,\n visible: this.opened,\n });\n\n return html`<bl-button\n dropdown\n .active=${this.opened}\n ?disabled=${ifDefined(this.disabled)}\n variant=\"${this.variant}\"\n kind=\"${this.kind}\"\n size=\"${this.size}\"\n aria-label=\"${ifDefined(this.label)}\"\n @bl-click=\"${this._handleClick}\"\n >\n ${this.label}\n </bl-button>\n <div class=\"${popoverClasses}\" role=\"menu\" aria-expanded=\"${this.opened}\"><slot></slot></div> `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blDropdownTag]: BlDropdown;\n }\n}\n", "import {css} from 'lit';\nexport const styles = css`:host{width:100%;--bl-button-display:block;--bl-button-justify:start}`;\nexport default styles;\n", "import { LitElement, html, CSSResultGroup, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { event, EventDispatcher } from '../../../utilities/event';\nimport type BlDropdownGroup from '../group/bl-dropdown-group';\nimport type BlDropdown from '../bl-dropdown';\n\nimport { blDropdownGroupTag } from '../group/bl-dropdown-group';\nimport { blDropdownTag } from '../bl-dropdown';\n\nimport style from './bl-dropdown-item.css';\n\nimport '../../button/bl-button';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport BlButton from '../../button/bl-button';\n\nexport const blDropdownItemTag = 'bl-dropdown-item';\n\n/**\n * @tag bl-dropdown-item\n * @summary Baklava Dropdown Item component\n */\n@customElement(blDropdownItemTag)\nexport default class BlDropdownItem extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the icon name. Shows icon with bl-icon component\n */\n\n @property({ type: String })\n icon?: string;\n\n @event('bl-dropdown-item-click') private onClick: EventDispatcher<string>;\n\n private _handleClick() {\n this.onClick('Action clicked!');\n }\n\n @query('[role=menuitem]') private menuElement: BlButton;\n\n /**\n * Focuses this action\n */\n focus() {\n this.menuElement.focus();\n }\n\n private BlDropdownGroupField: BlDropdownGroup | null;\n private BlDropdownField: BlDropdown | null;\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.BlDropdownGroupField = this.closest<BlDropdownGroup>(blDropdownGroupTag);\n this.BlDropdownField = this.closest<BlDropdown>(blDropdownTag);\n\n if (!this.BlDropdownField && !this.BlDropdownGroupField) {\n console.warn(`bl-dropdown-item is designed to be used inside a ${blDropdownGroupTag} or ${blDropdownTag}`, this);\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n }\n\n render(): TemplateResult {\n return html`<bl-button\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"${ifDefined(this.icon)}\"\n role=\"menuitem\"\n @click=\"${this._handleClick}\"\n ><slot></slot>\n </bl-button>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blDropdownItemTag]: BlDropdownItem;\n }\n}\n"],
5
+ "mappings": "yVACO,IAAMA,EAASC,wtBACfC,EAAQF,ECqBR,IAAMG,EAAgB,cAORC,EAArB,cAAwCC,CAAW,CAAnD,kCAWE,KAAQ,gBAA0C,KAEzC,KAAQ,eAAiB,GAMlC,WAAQ,kBAMR,aAAyB,UAMzB,UAAmB,UAMnB,UAAmB,SAMnB,cAAW,GA+BX,KAAQ,oBAAuBC,GAAsB,CACnD,IAAMC,EAAYD,EAAM,aAAa,EACjC,CAACC,EAAU,SAAS,KAAK,QAAQ,GAAK,CAACA,EAAU,SAAS,KAAK,eAAe,GAChF,KAAK,MAAM,CAEf,EAyBA,KAAQ,mBAAqB,GAvG7B,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAoDA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,KAAK,iBAAiB,UAAW,KAAK,aAAa,CACrD,CACA,sBAAuB,CACrB,MAAM,qBAAqB,EAE3B,KAAK,iBAAmB,KAAK,gBAAgB,EAC7C,KAAK,oBAAoB,UAAW,KAAK,aAAa,CACxD,CAEA,IAAI,QAAS,CACX,OAAO,KAAK,cACd,CAEQ,cAAe,CACrB,CAAC,KAAK,gBAAkB,CAAC,KAAK,SAAW,KAAK,KAAK,EAAI,KAAK,MAAM,CACpE,CASQ,eAAgB,CACtB,KAAK,gBAAkBC,EAAW,KAAK,gBAAiB,KAAK,SAAU,IAAM,CAC3EC,EAAgB,KAAK,gBAAiB,KAAK,SAAU,CACnD,UAAW,eACX,SAAU,QACV,WAAY,CACVC,EAAK,EACLC,EAAO,CAAC,EACR,EAAK,CACH,MAAMC,EAA2B,CAC/B,OAAO,OAAOA,EAAK,SAAS,SAAS,MAAO,CAC1C,SAAU,GAAGA,EAAK,SAAS,UAAU,sBAAsB,EAAE,S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BAA6B,CAC3B,MAAM,qBAAqB,CAC7B,CAEA,QAAyB,CACvB,OAAOC;AAAA;AAAA;AAAA,cAGG,EAAU,KAAK,IAAI;AAAA;AAAA,gBAEjB,KAAK;AAAA;AAAA,iBAGnB,CACF,EA7CEC,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GATPP,EAUnB,oBAEyCM,EAAA,CAAxCE,EAAM,wBAAwB,GAZZR,EAYsB,uBAMPM,EAAA,CAAjCG,EAAM,iBAAiB,GAlBLT,EAkBe,2BAlBfA,EAArBM,EAAA,CADCC,EAAcR,CAAiB,GACXC",
6
+ "names": ["styles", "i", "bl_dropdown_default", "blDropdownTag", "BlDropdown", "s", "event", "eventPath", "bl_dropdown_default", "P", "z", "b", "O", "args", "x", "y", "blDropdownItemTag", "popoverClasses", "o", "__decorateClass", "i", "t", "e", "styles", "i", "bl_dropdown_item_default", "blDropdownItemTag", "BlDropdownItem", "s", "bl_dropdown_item_default", "blDropdownGroupTag", "blDropdownTag", "y", "__decorateClass", "e", "event", "i"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-2J3IFWM5.js";import"../../chunk-SU6OEG6P.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
1
+ import{a}from"../../chunk-AHEWP6LO.js";import"../../chunk-SU6OEG6P.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
2
2
  //# sourceMappingURL=bl-dialog.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-AYSPIQ23.js";import"../../chunk-SU6OEG6P.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
1
+ import{a}from"../../chunk-N35VLT2U.js";import"../../chunk-SU6OEG6P.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
2
2
  //# sourceMappingURL=bl-drawer.js.map
@@ -1,2 +1,2 @@
1
- import{c as a,d as b}from"../../chunk-VB5RPJV3.js";import"../../chunk-KQBXYF3J.js";import"../../chunk-ANYJUR6Q.js";import"../../chunk-SU6OEG6P.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as blDropdownTag,b as default};
1
+ import{c as a,d as b}from"../../chunk-W3NQ6T5J.js";import"../../chunk-KQBXYF3J.js";import"../../chunk-ANYJUR6Q.js";import"../../chunk-SU6OEG6P.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as blDropdownTag,b as default};
2
2
  //# sourceMappingURL=bl-dropdown.js.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"../../../chunk-VB5RPJV3.js";import"../../../chunk-KQBXYF3J.js";import"../../../chunk-ANYJUR6Q.js";import"../../../chunk-SU6OEG6P.js";import"../../../chunk-OLPYXE2P.js";import"../../../chunk-KPAWUBRO.js";import"../../../chunk-F3ZH5IV7.js";import"../../../chunk-RLMJN536.js";import"../../../chunk-23UFIOHV.js";import"../../../chunk-57PTZNIL.js";import"../../../chunk-NZ3RGSR6.js";export{a as blDropdownItemTag,b as default};
1
+ import{a,b}from"../../../chunk-W3NQ6T5J.js";import"../../../chunk-KQBXYF3J.js";import"../../../chunk-ANYJUR6Q.js";import"../../../chunk-SU6OEG6P.js";import"../../../chunk-OLPYXE2P.js";import"../../../chunk-KPAWUBRO.js";import"../../../chunk-F3ZH5IV7.js";import"../../../chunk-RLMJN536.js";import"../../../chunk-23UFIOHV.js";import"../../../chunk-57PTZNIL.js";import"../../../chunk-NZ3RGSR6.js";export{a as blDropdownItemTag,b as default};
2
2
  //# sourceMappingURL=bl-dropdown-item.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-J774WKKH.js";import"../../chunk-TJKKAO25.js";import"../../chunk-THIPCHAK.js";import"../../chunk-4NHYWXCW.js";import"../../chunk-L3EQLCFT.js";import"../../chunk-3B64VOWB.js";import"../../chunk-ANYJUR6Q.js";import"../../chunk-EPJ347EQ.js";import"../../chunk-DJOD4BTL.js";import"../../chunk-SU6OEG6P.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
1
+ import{a}from"../../chunk-J774WKKH.js";import"../../chunk-2Y65CGCP.js";import"../../chunk-THIPCHAK.js";import"../../chunk-4NHYWXCW.js";import"../../chunk-L3EQLCFT.js";import"../../chunk-3B64VOWB.js";import"../../chunk-ANYJUR6Q.js";import"../../chunk-EPJ347EQ.js";import"../../chunk-DJOD4BTL.js";import"../../chunk-SU6OEG6P.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
2
2
  //# sourceMappingURL=bl-pagination.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-54ROO7JA.js";import"../../chunk-ANYJUR6Q.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
1
+ import{a}from"../../chunk-C5UMBCON.js";import"../../chunk-ANYJUR6Q.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
2
2
  //# sourceMappingURL=bl-popover.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-TJKKAO25.js";import"../../chunk-THIPCHAK.js";import"../../chunk-3B64VOWB.js";import"../../chunk-ANYJUR6Q.js";import"../../chunk-DJOD4BTL.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
1
+ import{a}from"../../chunk-2Y65CGCP.js";import"../../chunk-THIPCHAK.js";import"../../chunk-3B64VOWB.js";import"../../chunk-ANYJUR6Q.js";import"../../chunk-DJOD4BTL.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
2
2
  //# sourceMappingURL=bl-select.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-K5PH753D.js";import"../../chunk-ANYJUR6Q.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
1
+ import{a}from"../../chunk-R6XFK3HN.js";import"../../chunk-ANYJUR6Q.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
2
2
  //# sourceMappingURL=bl-tooltip.js.map
@@ -1,2 +1,2 @@
1
- @font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-cyrillic-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-cyrillic-ext-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-hebrew-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-latin-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-latin-ext-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}:root{--bl-color-primary: #f27a1a;--bl-color-primary-hover: #ef6114;--bl-color-secondary: #273142;--bl-color-secondary-hover: #0f131a;--bl-color-tertiary: #f1f2f7;--bl-color-tertiary-hover: #d5d9e1;--bl-color-success: #0bc15c;--bl-color-success-hover: #09a44e;--bl-color-danger: #ff5043;--bl-color-danger-hover: #ff3028;--bl-color-warning: #ffb600;--bl-color-warning-hover: #ff9800;--bl-color-alternative: #5794ff;--bl-color-alternative-hover: #457eff;--bl-color-featured: #8c4eff;--bl-color-featured-hover: #753eff;--bl-color-primary-background: #fff;--bl-color-accent-primary-background: #fef2e8;--bl-color-secondary-background: #f1f2f7;--bl-color-tertiary-background: #f7f7fa;--bl-color-success-background: #e7f9ef;--bl-color-danger-background: #ffeeec;--bl-color-warning-background: #fff8e6;--bl-color-alternative-background: #eef4ff;--bl-color-featured-background: #f4edff;--bl-color-content-primary: #273142;--bl-color-content-secondary: #6e7787;--bl-color-content-tertiary: #95a1b5;--bl-color-content-passive: #afbbca;--bl-color-content-primary-contrast: #fff;--bl-color-content-hover: #f27a1a;--bl-color-border: #d5d9e1;--bl-size-4xs: .125rem;--bl-size-3xs: .25rem;--bl-size-2xs: .5rem;--bl-size-xs: .75rem;--bl-size-s: .875rem;--bl-size-m: 1rem;--bl-size-l: 1.25rem;--bl-size-xl: 1.5rem;--bl-size-2xl: 2rem;--bl-size-3xl: 2.5rem;--bl-size-4xl: 3rem;--bl-size-5xl: 4rem;--bl-size-6xl: 5rem;--bl-font-family: "RubikVariable", sans-serif;--bl-font-weight-light: 300;--bl-font-weight-regular: 400;--bl-font-weight-medium: 500;--bl-font-weight-semibold: 600;--bl-font-weight-bold: 700;--bl-font-size-2xs: .5rem;--bl-font-size-xs: .625rem;--bl-font-size-s: .75rem;--bl-font-size-m: .875rem;--bl-font-size-l: 1rem;--bl-font-size-xl: 1.25rem;--bl-font-size-2xl: 1.5rem;--bl-font-size-3xl: 1.75rem;--bl-font-size-4xl: 2rem;--bl-font-size-5xl: 3rem;--bl-font-size-6xl: 4rem;--bl-border-radius-xs: .125rem;--bl-border-radius-s: .25rem;--bl-border-radius-m: .375rem;--bl-border-radius-l: .5rem;--bl-border-radius-pill: 62.438rem;--bl-border-radius-circle: 50%;--bl-font-display-font-size: var(--bl-font-size-5xl);--bl-font-display-line-height: calc(var(--bl-font-display-font-size) + var(--bl-size-2xs));--bl-font-display-size: var(--bl-font-display-font-size)/var(--bl-font-display-line-height);--bl-font-display: var(--bl-font-display-size) var(--bl-font-family);--bl-font-display-light: var(--bl-font-weight-light) var(--bl-font-display);--bl-font-display-regular: var(--bl-font-weight-regular) var(--bl-font-display);--bl-font-display-medium: var(--bl-font-weight-medium) var(--bl-font-display);--bl-font-display-semibold: var(--bl-font-weight-semibold) var(--bl-font-display);--bl-font-display-bold: var(--bl-font-weight-bold) var(--bl-font-display);--bl-font-heading-1-font-size: var(--bl-font-size-4xl);--bl-font-heading-1-line-height: calc(var(--bl-font-heading-1-font-size) + var(--bl-size-3xs));--bl-font-heading-1-size: var(--bl-font-heading-1-font-size)/var(--bl-font-heading-1-line-height);--bl-font-heading-1: var(--bl-font-weight-light) var(--bl-font-heading-1-size) var(--bl-font-family);--bl-font-heading-2-font-size: var(--bl-font-size-3xl);--bl-font-heading-2-line-height: calc(var(--bl-font-heading-2-font-size) + var(--bl-size-3xs));--bl-font-heading-2-size: var(--bl-font-heading-2-font-size)/var(--bl-font-heading-2-line-height);--bl-font-heading-2: var(--bl-font-weight-regular) var(--bl-font-heading-2-size) var(--bl-font-family);--bl-font-heading-3-font-size: var(--bl-font-size-2xl);--bl-font-heading-3-line-height: calc(var(--bl-font-heading-3-font-size) + var(--bl-size-3xs));--bl-font-heading-3-size: var(--bl-font-heading-3-font-size)/var(--bl-font-heading-3-line-height);--bl-font-heading-3: var(--bl-font-weight-regular) var(--bl-font-heading-3-size) var(--bl-font-family);--bl-font-title-1-font-size: var(--bl-font-size-xl);--bl-font-title-1-line-height: calc(var(--bl-font-title-1-font-size) + var(--bl-size-3xs));--bl-font-title-1-size: var(--bl-font-title-1-font-size)/var(--bl-font-title-1-line-height);--bl-font-title-1: var(--bl-font-title-1-size) var(--bl-font-family);--bl-font-title-1-regular: var(--bl-font-weight-regular) var(--bl-font-title-1);--bl-font-title-1-medium: var(--bl-font-weight-medium) var(--bl-font-title-1);--bl-font-title-1-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-1);--bl-font-title-1-bold: var(--bl-font-weight-bold) var(--bl-font-title-1);--bl-font-title-2-font-size: var(--bl-font-size-l);--bl-font-title-2-line-height: calc(var(--bl-font-title-2-font-size) + var(--bl-size-3xs));--bl-font-title-2-size: var(--bl-font-title-2-font-size)/var(--bl-font-title-2-line-height);--bl-font-title-2: var(--bl-font-title-2-size) var(--bl-font-family);--bl-font-title-2-regular: var(--bl-font-weight-regular) var(--bl-font-title-2);--bl-font-title-2-medium: var(--bl-font-weight-medium) var(--bl-font-title-2);--bl-font-title-2-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-2);--bl-font-title-2-bold: var(--bl-font-weight-bold) var(--bl-font-title-2);--bl-font-title-3-font-size: var(--bl-font-size-m);--bl-font-title-3-line-height: calc(var(--bl-font-title-3-font-size) + var(--bl-size-4xs));--bl-font-title-3-size: var(--bl-font-title-3-font-size)/var(--bl-font-title-3-line-height);--bl-font-title-3: var(--bl-font-title-3-size) var(--bl-font-family);--bl-font-title-3-regular: var(--bl-font-weight-regular) var(--bl-font-title-3);--bl-font-title-3-medium: var(--bl-font-weight-medium) var(--bl-font-title-3);--bl-font-title-3-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-3);--bl-font-title-3-bold: var(--bl-font-weight-bold) var(--bl-font-title-3);--bl-font-title-4-font-size: var(--bl-font-size-s);--bl-font-title-4-line-height: calc(var(--bl-font-title-4-font-size) + var(--bl-size-4xs));--bl-font-title-4-size: var(--bl-font-title-4-font-size)/var(--bl-font-title-4-line-height);--bl-font-title-4: var(--bl-font-title-4-size) var(--bl-font-family);--bl-font-title-4-regular: var(--bl-font-weight-regular) var(--bl-font-title-4);--bl-font-title-4-medium: var(--bl-font-weight-medium) var(--bl-font-title-4);--bl-font-title-4-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-4);--bl-font-title-4-bold: var(--bl-font-weight-bold) var(--bl-font-title-4);--bl-font-body-text-1-font-size: var(--bl-font-size-l);--bl-font-body-text-1-line-height: calc(var(--bl-font-body-text-1-font-size) + var(--bl-size-4xs));--bl-font-body-text-1-size: var(--bl-font-body-text-1-font-size)/var(--bl-font-body-text-1-line-height);--bl-font-body-text-1: var(--bl-font-weight-regular) var(--bl-font-body-text-1-size) var(--bl-font-family);--bl-font-body-text-2-font-size: var(--bl-font-size-m);--bl-font-body-text-2-line-height: calc(var(--bl-font-body-text-2-font-size) + var(--bl-size-4xs));--bl-font-body-text-2-size: var(--bl-font-body-text-2-font-size)/var(--bl-font-body-text-2-line-height);--bl-font-body-text-2: var(--bl-font-weight-regular) var(--bl-font-body-text-2-size) var(--bl-font-family);--bl-font-body-text-3-font-size: var(--bl-font-size-s);--bl-font-body-text-3-line-height: calc(var(--bl-font-body-text-3-font-size) + var(--bl-size-4xs));--bl-font-body-text-3-size: var(--bl-font-body-text-3-font-size)/var(--bl-font-body-text-3-line-height);--bl-font-body-text-3: var(--bl-font-weight-regular) var(--bl-font-body-text-3-size) var(--bl-font-family);--bl-font-caption-font-size: var(--bl-font-size-xs);--bl-font-caption-line-height: calc(var(--bl-font-caption-font-size) + var(--bl-size-4xs));--bl-font-caption-size: var(--bl-font-caption-font-size)/var(--bl-font-caption-line-height);--bl-font-caption: var(--bl-font-weight-medium) var(--bl-font-caption-size) var(--bl-font-family)}
1
+ @font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-cyrillic-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-cyrillic-ext-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-hebrew-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-latin-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-latin-ext-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}:root{--bl-color-primary: #f27a1a;--bl-color-primary-hover: #ef6114;--bl-color-secondary: #273142;--bl-color-secondary-hover: #0f131a;--bl-color-tertiary: #f1f2f7;--bl-color-tertiary-hover: #d5d9e1;--bl-color-success: #0bc15c;--bl-color-success-hover: #09a44e;--bl-color-danger: #ff5043;--bl-color-danger-hover: #ff3028;--bl-color-warning: #ffb600;--bl-color-warning-hover: #ff9800;--bl-color-alternative: #5794ff;--bl-color-alternative-hover: #457eff;--bl-color-featured: #8c4eff;--bl-color-featured-hover: #753eff;--bl-color-primary-background: #fff;--bl-color-accent-primary-background: #fef2e8;--bl-color-secondary-background: #f1f2f7;--bl-color-tertiary-background: #f7f7fa;--bl-color-success-background: #e7f9ef;--bl-color-danger-background: #ffeeec;--bl-color-warning-background: #fff8e6;--bl-color-alternative-background: #eef4ff;--bl-color-featured-background: #f4edff;--bl-color-content-primary: #273142;--bl-color-content-secondary: #6e7787;--bl-color-content-tertiary: #95a1b5;--bl-color-content-passive: #afbbca;--bl-color-content-primary-contrast: #fff;--bl-color-content-hover: #f27a1a;--bl-color-border: #d5d9e1;--bl-size-4xs: .125rem;--bl-size-3xs: .25rem;--bl-size-2xs: .5rem;--bl-size-xs: .75rem;--bl-size-s: .875rem;--bl-size-m: 1rem;--bl-size-l: 1.25rem;--bl-size-xl: 1.5rem;--bl-size-2xl: 2rem;--bl-size-3xl: 2.5rem;--bl-size-4xl: 3rem;--bl-size-5xl: 4rem;--bl-size-6xl: 5rem;--bl-index-deep: -1;--bl-index-base: 1;--bl-index-popover: 100;--bl-index-tooltip: 200;--bl-index-sticky: 300;--bl-index-overlay: 400;--bl-index-dialog: 500;--bl-index-notification: 600;--bl-font-family: "RubikVariable", sans-serif;--bl-font-weight-light: 300;--bl-font-weight-regular: 400;--bl-font-weight-medium: 500;--bl-font-weight-semibold: 600;--bl-font-weight-bold: 700;--bl-font-size-2xs: .5rem;--bl-font-size-xs: .625rem;--bl-font-size-s: .75rem;--bl-font-size-m: .875rem;--bl-font-size-l: 1rem;--bl-font-size-xl: 1.25rem;--bl-font-size-2xl: 1.5rem;--bl-font-size-3xl: 1.75rem;--bl-font-size-4xl: 2rem;--bl-font-size-5xl: 3rem;--bl-font-size-6xl: 4rem;--bl-border-radius-xs: .125rem;--bl-border-radius-s: .25rem;--bl-border-radius-m: .375rem;--bl-border-radius-l: .5rem;--bl-border-radius-pill: 62.438rem;--bl-border-radius-circle: 50%;--bl-font-display-font-size: var(--bl-font-size-5xl);--bl-font-display-line-height: calc(var(--bl-font-display-font-size) + var(--bl-size-2xs));--bl-font-display-size: var(--bl-font-display-font-size)/var(--bl-font-display-line-height);--bl-font-display: var(--bl-font-display-size) var(--bl-font-family);--bl-font-display-light: var(--bl-font-weight-light) var(--bl-font-display);--bl-font-display-regular: var(--bl-font-weight-regular) var(--bl-font-display);--bl-font-display-medium: var(--bl-font-weight-medium) var(--bl-font-display);--bl-font-display-semibold: var(--bl-font-weight-semibold) var(--bl-font-display);--bl-font-display-bold: var(--bl-font-weight-bold) var(--bl-font-display);--bl-font-heading-1-font-size: var(--bl-font-size-4xl);--bl-font-heading-1-line-height: calc(var(--bl-font-heading-1-font-size) + var(--bl-size-3xs));--bl-font-heading-1-size: var(--bl-font-heading-1-font-size)/var(--bl-font-heading-1-line-height);--bl-font-heading-1: var(--bl-font-weight-light) var(--bl-font-heading-1-size) var(--bl-font-family);--bl-font-heading-2-font-size: var(--bl-font-size-3xl);--bl-font-heading-2-line-height: calc(var(--bl-font-heading-2-font-size) + var(--bl-size-3xs));--bl-font-heading-2-size: var(--bl-font-heading-2-font-size)/var(--bl-font-heading-2-line-height);--bl-font-heading-2: var(--bl-font-weight-regular) var(--bl-font-heading-2-size) var(--bl-font-family);--bl-font-heading-3-font-size: var(--bl-font-size-2xl);--bl-font-heading-3-line-height: calc(var(--bl-font-heading-3-font-size) + var(--bl-size-3xs));--bl-font-heading-3-size: var(--bl-font-heading-3-font-size)/var(--bl-font-heading-3-line-height);--bl-font-heading-3: var(--bl-font-weight-regular) var(--bl-font-heading-3-size) var(--bl-font-family);--bl-font-title-1-font-size: var(--bl-font-size-xl);--bl-font-title-1-line-height: calc(var(--bl-font-title-1-font-size) + var(--bl-size-3xs));--bl-font-title-1-size: var(--bl-font-title-1-font-size)/var(--bl-font-title-1-line-height);--bl-font-title-1: var(--bl-font-title-1-size) var(--bl-font-family);--bl-font-title-1-regular: var(--bl-font-weight-regular) var(--bl-font-title-1);--bl-font-title-1-medium: var(--bl-font-weight-medium) var(--bl-font-title-1);--bl-font-title-1-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-1);--bl-font-title-1-bold: var(--bl-font-weight-bold) var(--bl-font-title-1);--bl-font-title-2-font-size: var(--bl-font-size-l);--bl-font-title-2-line-height: calc(var(--bl-font-title-2-font-size) + var(--bl-size-3xs));--bl-font-title-2-size: var(--bl-font-title-2-font-size)/var(--bl-font-title-2-line-height);--bl-font-title-2: var(--bl-font-title-2-size) var(--bl-font-family);--bl-font-title-2-regular: var(--bl-font-weight-regular) var(--bl-font-title-2);--bl-font-title-2-medium: var(--bl-font-weight-medium) var(--bl-font-title-2);--bl-font-title-2-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-2);--bl-font-title-2-bold: var(--bl-font-weight-bold) var(--bl-font-title-2);--bl-font-title-3-font-size: var(--bl-font-size-m);--bl-font-title-3-line-height: calc(var(--bl-font-title-3-font-size) + var(--bl-size-4xs));--bl-font-title-3-size: var(--bl-font-title-3-font-size)/var(--bl-font-title-3-line-height);--bl-font-title-3: var(--bl-font-title-3-size) var(--bl-font-family);--bl-font-title-3-regular: var(--bl-font-weight-regular) var(--bl-font-title-3);--bl-font-title-3-medium: var(--bl-font-weight-medium) var(--bl-font-title-3);--bl-font-title-3-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-3);--bl-font-title-3-bold: var(--bl-font-weight-bold) var(--bl-font-title-3);--bl-font-title-4-font-size: var(--bl-font-size-s);--bl-font-title-4-line-height: calc(var(--bl-font-title-4-font-size) + var(--bl-size-4xs));--bl-font-title-4-size: var(--bl-font-title-4-font-size)/var(--bl-font-title-4-line-height);--bl-font-title-4: var(--bl-font-title-4-size) var(--bl-font-family);--bl-font-title-4-regular: var(--bl-font-weight-regular) var(--bl-font-title-4);--bl-font-title-4-medium: var(--bl-font-weight-medium) var(--bl-font-title-4);--bl-font-title-4-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-4);--bl-font-title-4-bold: var(--bl-font-weight-bold) var(--bl-font-title-4);--bl-font-body-text-1-font-size: var(--bl-font-size-l);--bl-font-body-text-1-line-height: calc(var(--bl-font-body-text-1-font-size) + var(--bl-size-4xs));--bl-font-body-text-1-size: var(--bl-font-body-text-1-font-size)/var(--bl-font-body-text-1-line-height);--bl-font-body-text-1: var(--bl-font-weight-regular) var(--bl-font-body-text-1-size) var(--bl-font-family);--bl-font-body-text-2-font-size: var(--bl-font-size-m);--bl-font-body-text-2-line-height: calc(var(--bl-font-body-text-2-font-size) + var(--bl-size-4xs));--bl-font-body-text-2-size: var(--bl-font-body-text-2-font-size)/var(--bl-font-body-text-2-line-height);--bl-font-body-text-2: var(--bl-font-weight-regular) var(--bl-font-body-text-2-size) var(--bl-font-family);--bl-font-body-text-3-font-size: var(--bl-font-size-s);--bl-font-body-text-3-line-height: calc(var(--bl-font-body-text-3-font-size) + var(--bl-size-4xs));--bl-font-body-text-3-size: var(--bl-font-body-text-3-font-size)/var(--bl-font-body-text-3-line-height);--bl-font-body-text-3: var(--bl-font-weight-regular) var(--bl-font-body-text-3-size) var(--bl-font-family);--bl-font-caption-font-size: var(--bl-font-size-xs);--bl-font-caption-line-height: calc(var(--bl-font-caption-font-size) + var(--bl-size-4xs));--bl-font-caption-size: var(--bl-font-caption-font-size)/var(--bl-font-caption-line-height);--bl-font-caption: var(--bl-font-weight-medium) var(--bl-font-caption-size) var(--bl-font-family)}
2
2
  /*# sourceMappingURL=default.css.map */
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../node_modules/@fontsource/rubik/variable.css", "../../src/themes/default.css"],
4
- "sourcesContent": ["/* rubik-cyrillic-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-cyrillic-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n} \n/* rubik-cyrillic-ext-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-cyrillic-ext-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n} \n/* rubik-hebrew-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-hebrew-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;\n} \n/* rubik-latin-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-latin-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n} \n/* rubik-latin-ext-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-latin-ext-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n} \n", "@import '@fontsource/rubik/variable.css';\n\n:root {\n /* Colors */\n --bl-color-primary: #f27a1a;\n --bl-color-primary-hover: #ef6114;\n --bl-color-secondary: #273142;\n --bl-color-secondary-hover: #0f131a;\n --bl-color-tertiary: #f1f2f7;\n --bl-color-tertiary-hover: #d5d9e1;\n --bl-color-success: #0bc15c;\n --bl-color-success-hover: #09a44e;\n --bl-color-danger: #ff5043;\n --bl-color-danger-hover: #ff3028;\n --bl-color-warning: #ffb600;\n --bl-color-warning-hover: #ff9800;\n --bl-color-alternative: #5794ff;\n --bl-color-alternative-hover: #457eff;\n --bl-color-featured: #8c4eff;\n --bl-color-featured-hover: #753eff;\n\n /* Background Colors */\n --bl-color-primary-background: #fff;\n --bl-color-accent-primary-background: #fef2e8;\n --bl-color-secondary-background: #f1f2f7;\n --bl-color-tertiary-background: #f7f7fa;\n --bl-color-success-background: #e7f9ef;\n --bl-color-danger-background: #ffeeec;\n --bl-color-warning-background: #fff8e6;\n --bl-color-alternative-background: #eef4ff;\n --bl-color-featured-background: #f4edff;\n\n /* Content Colors */\n --bl-color-content-primary: #273142;\n --bl-color-content-secondary: #6e7787;\n --bl-color-content-tertiary: #95a1b5;\n --bl-color-content-passive: #afbbca;\n --bl-color-content-primary-contrast: #fff;\n --bl-color-content-hover: #f27a1a;\n --bl-color-border: #d5d9e1;\n\n /* Size and Spacing */\n --bl-size-4xs: 0.125rem; /* 2px */\n --bl-size-3xs: 0.25rem; /* 4px */\n --bl-size-2xs: 0.5rem; /* 8px */\n --bl-size-xs: 0.75rem; /* 12px */\n --bl-size-s: 0.875rem; /* 14px */\n --bl-size-m: 1rem; /* 16px */\n --bl-size-l: 1.25rem; /* 20px */\n --bl-size-xl: 1.5rem; /* 24px */\n --bl-size-2xl: 2rem; /* 32px */\n --bl-size-3xl: 2.5rem; /* 40px */\n --bl-size-4xl: 3rem; /* 48px */\n --bl-size-5xl: 4rem; /* 64px */\n --bl-size-6xl: 5rem; /* 80px */\n\n /* Typography */\n --bl-font-family: 'RubikVariable', sans-serif;\n\n /* Font weights */\n --bl-font-weight-light: 300;\n --bl-font-weight-regular: 400;\n --bl-font-weight-medium: 500;\n --bl-font-weight-semibold: 600;\n --bl-font-weight-bold: 700;\n\n /* Font sizes */\n --bl-font-size-2xs: 0.5rem; /* 8px */\n --bl-font-size-xs: 0.625rem; /* 10px */\n --bl-font-size-s: 0.75rem; /* 12px */\n --bl-font-size-m: 0.875rem; /* 14px */\n --bl-font-size-l: 1rem; /* 16px */\n --bl-font-size-xl: 1.25rem; /* 20px */\n --bl-font-size-2xl: 1.5rem; /* 24px */\n --bl-font-size-3xl: 1.75rem; /* 28px */\n --bl-font-size-4xl: 2rem; /* 32px */\n --bl-font-size-5xl: 3rem; /* 48px */\n --bl-font-size-6xl: 4rem; /* 64px */\n\n /* Border radius */\n --bl-border-radius-xs: 0.125rem; /* 2px */\n --bl-border-radius-s: 0.25rem; /* 4px */\n --bl-border-radius-m: 0.375rem; /* 6px */\n --bl-border-radius-l: 0.5rem; /* 8px */\n --bl-border-radius-pill: 62.438rem; /* 999px */\n --bl-border-radius-circle: 50%;\n\n /* Font Style: Display */\n --bl-font-display-font-size: var(--bl-font-size-5xl);\n --bl-font-display-line-height: calc(var(--bl-font-display-font-size) + var(--bl-size-2xs));\n --bl-font-display-size: var(--bl-font-display-font-size)/var(--bl-font-display-line-height);\n --bl-font-display: var(--bl-font-display-size) var(--bl-font-family);\n --bl-font-display-light: var(--bl-font-weight-light) var(--bl-font-display);\n --bl-font-display-regular: var(--bl-font-weight-regular) var(--bl-font-display);\n --bl-font-display-medium: var(--bl-font-weight-medium) var(--bl-font-display);\n --bl-font-display-semibold: var(--bl-font-weight-semibold) var(--bl-font-display);\n --bl-font-display-bold: var(--bl-font-weight-bold) var(--bl-font-display);\n\n /* Font Style: Heading 1 */\n --bl-font-heading-1-font-size: var(--bl-font-size-4xl);\n --bl-font-heading-1-line-height: calc(var(--bl-font-heading-1-font-size) + var(--bl-size-3xs));\n --bl-font-heading-1-size: var(--bl-font-heading-1-font-size)/var(--bl-font-heading-1-line-height);\n --bl-font-heading-1: var(--bl-font-weight-light) var(--bl-font-heading-1-size) var(--bl-font-family);\n\n /* Font Style: Heading 2 */\n --bl-font-heading-2-font-size: var(--bl-font-size-3xl);\n --bl-font-heading-2-line-height: calc(var(--bl-font-heading-2-font-size) + var(--bl-size-3xs));\n --bl-font-heading-2-size: var(--bl-font-heading-2-font-size)/var(--bl-font-heading-2-line-height);\n --bl-font-heading-2: var(--bl-font-weight-regular) var(--bl-font-heading-2-size) var(--bl-font-family);\n\n /* Font Style: Heading 3 */\n --bl-font-heading-3-font-size: var(--bl-font-size-2xl);\n --bl-font-heading-3-line-height: calc(var(--bl-font-heading-3-font-size) + var(--bl-size-3xs));\n --bl-font-heading-3-size: var(--bl-font-heading-3-font-size)/var(--bl-font-heading-3-line-height);\n --bl-font-heading-3: var(--bl-font-weight-regular) var(--bl-font-heading-3-size) var(--bl-font-family);\n\n /* Font Style: Title 1 */\n --bl-font-title-1-font-size: var(--bl-font-size-xl);\n --bl-font-title-1-line-height: calc(var(--bl-font-title-1-font-size) + var(--bl-size-3xs));\n --bl-font-title-1-size: var(--bl-font-title-1-font-size)/var(--bl-font-title-1-line-height);\n --bl-font-title-1: var(--bl-font-title-1-size) var(--bl-font-family);\n --bl-font-title-1-regular: var(--bl-font-weight-regular) var(--bl-font-title-1);\n --bl-font-title-1-medium: var(--bl-font-weight-medium) var(--bl-font-title-1);\n --bl-font-title-1-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-1);\n --bl-font-title-1-bold: var(--bl-font-weight-bold) var(--bl-font-title-1);\n\n /* Font Style: Title 2 */\n --bl-font-title-2-font-size: var(--bl-font-size-l);\n --bl-font-title-2-line-height: calc(var(--bl-font-title-2-font-size) + var(--bl-size-3xs));\n --bl-font-title-2-size: var(--bl-font-title-2-font-size)/var(--bl-font-title-2-line-height);\n --bl-font-title-2: var(--bl-font-title-2-size) var(--bl-font-family);\n --bl-font-title-2-regular: var(--bl-font-weight-regular) var(--bl-font-title-2);\n --bl-font-title-2-medium: var(--bl-font-weight-medium) var(--bl-font-title-2);\n --bl-font-title-2-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-2);\n --bl-font-title-2-bold: var(--bl-font-weight-bold) var(--bl-font-title-2);\n\n /* Font Style: Title 3 */\n --bl-font-title-3-font-size: var(--bl-font-size-m);\n --bl-font-title-3-line-height: calc(var(--bl-font-title-3-font-size) + var(--bl-size-4xs));\n --bl-font-title-3-size: var(--bl-font-title-3-font-size)/var(--bl-font-title-3-line-height);\n --bl-font-title-3: var(--bl-font-title-3-size) var(--bl-font-family);\n --bl-font-title-3-regular: var(--bl-font-weight-regular) var(--bl-font-title-3);\n --bl-font-title-3-medium: var(--bl-font-weight-medium) var(--bl-font-title-3);\n --bl-font-title-3-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-3);\n --bl-font-title-3-bold: var(--bl-font-weight-bold) var(--bl-font-title-3);\n\n /* Font Style: Title 4 */\n --bl-font-title-4-font-size: var(--bl-font-size-s);\n --bl-font-title-4-line-height: calc(var(--bl-font-title-4-font-size) + var(--bl-size-4xs));\n --bl-font-title-4-size: var(--bl-font-title-4-font-size)/var(--bl-font-title-4-line-height);\n --bl-font-title-4: var(--bl-font-title-4-size) var(--bl-font-family);\n --bl-font-title-4-regular: var(--bl-font-weight-regular) var(--bl-font-title-4);\n --bl-font-title-4-medium: var(--bl-font-weight-medium) var(--bl-font-title-4);\n --bl-font-title-4-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-4);\n --bl-font-title-4-bold: var(--bl-font-weight-bold) var(--bl-font-title-4);\n\n /* Font Style: Body Text 1 */\n --bl-font-body-text-1-font-size: var(--bl-font-size-l);\n --bl-font-body-text-1-line-height: calc(var(--bl-font-body-text-1-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-1-size: var(--bl-font-body-text-1-font-size)/var(--bl-font-body-text-1-line-height);\n --bl-font-body-text-1: var(--bl-font-weight-regular) var(--bl-font-body-text-1-size) var(--bl-font-family);\n\n /* Font Style: Body Text 2 */\n --bl-font-body-text-2-font-size: var(--bl-font-size-m);\n --bl-font-body-text-2-line-height: calc(var(--bl-font-body-text-2-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-2-size: var(--bl-font-body-text-2-font-size)/var(--bl-font-body-text-2-line-height);\n --bl-font-body-text-2: var(--bl-font-weight-regular) var(--bl-font-body-text-2-size) var(--bl-font-family);\n\n /* Font Style: Body Text 3 */\n --bl-font-body-text-3-font-size: var(--bl-font-size-s);\n --bl-font-body-text-3-line-height: calc(var(--bl-font-body-text-3-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-3-size: var(--bl-font-body-text-3-font-size)/var(--bl-font-body-text-3-line-height);\n --bl-font-body-text-3: var(--bl-font-weight-regular) var(--bl-font-body-text-3-size) var(--bl-font-family);\n\n /* Font Style: Caption */\n --bl-font-caption-font-size: var(--bl-font-size-xs);\n --bl-font-caption-line-height: calc(var(--bl-font-caption-font-size) + var(--bl-size-4xs));\n --bl-font-caption-size: var(--bl-font-caption-font-size)/var(--bl-font-caption-line-height);\n --bl-font-caption: var(--bl-font-weight-medium) var(--bl-font-caption-size) var(--bl-font-family);\n}\n"],
5
- "mappings": "AACA,WACE,0BACA,kBACA,kBACA,oBACA,iFACA,yDAGF,WACE,0BACA,kBACA,kBACA,oBACA,qFACA,iFAGF,WACE,0BACA,kBACA,kBACA,oBACA,+EACA,gEAGF,WACE,0BACA,kBACA,kBACA,oBACA,8EACA,yJAGF,WACE,0BACA,kBACA,kBACA,oBACA,kFACA,2GCzCF,MAEE,4BACA,kCACA,8BACA,oCACA,6BACA,mCACA,4BACA,kCACA,2BACA,iCACA,4BACA,kCACA,gCACA,sCACA,6BACA,mCAGA,oCACA,8CACA,yCACA,wCACA,uCACA,sCACA,uCACA,2CACA,wCAGA,oCACA,sCACA,qCACA,oCACA,0CACA,kCACA,2BAGA,uBACA,sBACA,qBACA,qBACA,qBACA,kBACA,qBACA,qBACA,oBACA,sBACA,oBACA,oBACA,oBAGA,8CAGA,4BACA,8BACA,6BACA,+BACA,2BAGA,0BACA,2BACA,yBACA,0BACA,uBACA,2BACA,2BACA,4BACA,yBACA,yBACA,yBAGA,+BACA,6BACA,8BACA,4BACA,mCACA,+BAGA,qDACA,2FACA,4FACA,qEACA,4EACA,gFACA,8EACA,kFACA,0EAGA,uDACA,+FACA,kGACA,qGAGC,uDACA,+FACA,kGACA,uGAGA,uDACA,+FACA,kGACA,uGAGD,oDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,uDACA,mGACA,wGACA,2GAGA,uDACA,mGACA,wGACA,2GAGA,uDACA,mGACA,wGACA,2GAGA,oDACA,2FACA,4FACA",
4
+ "sourcesContent": ["/* rubik-cyrillic-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-cyrillic-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n} \n/* rubik-cyrillic-ext-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-cyrillic-ext-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n} \n/* rubik-hebrew-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-hebrew-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;\n} \n/* rubik-latin-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-latin-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n} \n/* rubik-latin-ext-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-latin-ext-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n} \n", "@import '@fontsource/rubik/variable.css';\n\n:root {\n /* Colors */\n --bl-color-primary: #f27a1a;\n --bl-color-primary-hover: #ef6114;\n --bl-color-secondary: #273142;\n --bl-color-secondary-hover: #0f131a;\n --bl-color-tertiary: #f1f2f7;\n --bl-color-tertiary-hover: #d5d9e1;\n --bl-color-success: #0bc15c;\n --bl-color-success-hover: #09a44e;\n --bl-color-danger: #ff5043;\n --bl-color-danger-hover: #ff3028;\n --bl-color-warning: #ffb600;\n --bl-color-warning-hover: #ff9800;\n --bl-color-alternative: #5794ff;\n --bl-color-alternative-hover: #457eff;\n --bl-color-featured: #8c4eff;\n --bl-color-featured-hover: #753eff;\n\n /* Background Colors */\n --bl-color-primary-background: #fff;\n --bl-color-accent-primary-background: #fef2e8;\n --bl-color-secondary-background: #f1f2f7;\n --bl-color-tertiary-background: #f7f7fa;\n --bl-color-success-background: #e7f9ef;\n --bl-color-danger-background: #ffeeec;\n --bl-color-warning-background: #fff8e6;\n --bl-color-alternative-background: #eef4ff;\n --bl-color-featured-background: #f4edff;\n\n /* Content Colors */\n --bl-color-content-primary: #273142;\n --bl-color-content-secondary: #6e7787;\n --bl-color-content-tertiary: #95a1b5;\n --bl-color-content-passive: #afbbca;\n --bl-color-content-primary-contrast: #fff;\n --bl-color-content-hover: #f27a1a;\n --bl-color-border: #d5d9e1;\n\n /* Size and Spacing */\n --bl-size-4xs: 0.125rem; /* 2px */\n --bl-size-3xs: 0.25rem; /* 4px */\n --bl-size-2xs: 0.5rem; /* 8px */\n --bl-size-xs: 0.75rem; /* 12px */\n --bl-size-s: 0.875rem; /* 14px */\n --bl-size-m: 1rem; /* 16px */\n --bl-size-l: 1.25rem; /* 20px */\n --bl-size-xl: 1.5rem; /* 24px */\n --bl-size-2xl: 2rem; /* 32px */\n --bl-size-3xl: 2.5rem; /* 40px */\n --bl-size-4xl: 3rem; /* 48px */\n --bl-size-5xl: 4rem; /* 64px */\n --bl-size-6xl: 5rem; /* 80px */\n\n /* Z-indexes */\n --bl-index-deep: -1;\n --bl-index-base: 1;\n --bl-index-popover: 100;\n --bl-index-tooltip: 200;\n --bl-index-sticky: 300;\n --bl-index-overlay: 400;\n --bl-index-dialog: 500;\n --bl-index-notification: 600;\n\n /* Typography */\n --bl-font-family: 'RubikVariable', sans-serif;\n\n /* Font weights */\n --bl-font-weight-light: 300;\n --bl-font-weight-regular: 400;\n --bl-font-weight-medium: 500;\n --bl-font-weight-semibold: 600;\n --bl-font-weight-bold: 700;\n\n /* Font sizes */\n --bl-font-size-2xs: 0.5rem; /* 8px */\n --bl-font-size-xs: 0.625rem; /* 10px */\n --bl-font-size-s: 0.75rem; /* 12px */\n --bl-font-size-m: 0.875rem; /* 14px */\n --bl-font-size-l: 1rem; /* 16px */\n --bl-font-size-xl: 1.25rem; /* 20px */\n --bl-font-size-2xl: 1.5rem; /* 24px */\n --bl-font-size-3xl: 1.75rem; /* 28px */\n --bl-font-size-4xl: 2rem; /* 32px */\n --bl-font-size-5xl: 3rem; /* 48px */\n --bl-font-size-6xl: 4rem; /* 64px */\n\n /* Border radius */\n --bl-border-radius-xs: 0.125rem; /* 2px */\n --bl-border-radius-s: 0.25rem; /* 4px */\n --bl-border-radius-m: 0.375rem; /* 6px */\n --bl-border-radius-l: 0.5rem; /* 8px */\n --bl-border-radius-pill: 62.438rem; /* 999px */\n --bl-border-radius-circle: 50%;\n\n /* Font Style: Display */\n --bl-font-display-font-size: var(--bl-font-size-5xl);\n --bl-font-display-line-height: calc(var(--bl-font-display-font-size) + var(--bl-size-2xs));\n --bl-font-display-size: var(--bl-font-display-font-size)/var(--bl-font-display-line-height);\n --bl-font-display: var(--bl-font-display-size) var(--bl-font-family);\n --bl-font-display-light: var(--bl-font-weight-light) var(--bl-font-display);\n --bl-font-display-regular: var(--bl-font-weight-regular) var(--bl-font-display);\n --bl-font-display-medium: var(--bl-font-weight-medium) var(--bl-font-display);\n --bl-font-display-semibold: var(--bl-font-weight-semibold) var(--bl-font-display);\n --bl-font-display-bold: var(--bl-font-weight-bold) var(--bl-font-display);\n\n /* Font Style: Heading 1 */\n --bl-font-heading-1-font-size: var(--bl-font-size-4xl);\n --bl-font-heading-1-line-height: calc(var(--bl-font-heading-1-font-size) + var(--bl-size-3xs));\n --bl-font-heading-1-size: var(--bl-font-heading-1-font-size)/var(--bl-font-heading-1-line-height);\n --bl-font-heading-1: var(--bl-font-weight-light) var(--bl-font-heading-1-size) var(--bl-font-family);\n\n /* Font Style: Heading 2 */\n --bl-font-heading-2-font-size: var(--bl-font-size-3xl);\n --bl-font-heading-2-line-height: calc(var(--bl-font-heading-2-font-size) + var(--bl-size-3xs));\n --bl-font-heading-2-size: var(--bl-font-heading-2-font-size)/var(--bl-font-heading-2-line-height);\n --bl-font-heading-2: var(--bl-font-weight-regular) var(--bl-font-heading-2-size) var(--bl-font-family);\n\n /* Font Style: Heading 3 */\n --bl-font-heading-3-font-size: var(--bl-font-size-2xl);\n --bl-font-heading-3-line-height: calc(var(--bl-font-heading-3-font-size) + var(--bl-size-3xs));\n --bl-font-heading-3-size: var(--bl-font-heading-3-font-size)/var(--bl-font-heading-3-line-height);\n --bl-font-heading-3: var(--bl-font-weight-regular) var(--bl-font-heading-3-size) var(--bl-font-family);\n\n /* Font Style: Title 1 */\n --bl-font-title-1-font-size: var(--bl-font-size-xl);\n --bl-font-title-1-line-height: calc(var(--bl-font-title-1-font-size) + var(--bl-size-3xs));\n --bl-font-title-1-size: var(--bl-font-title-1-font-size)/var(--bl-font-title-1-line-height);\n --bl-font-title-1: var(--bl-font-title-1-size) var(--bl-font-family);\n --bl-font-title-1-regular: var(--bl-font-weight-regular) var(--bl-font-title-1);\n --bl-font-title-1-medium: var(--bl-font-weight-medium) var(--bl-font-title-1);\n --bl-font-title-1-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-1);\n --bl-font-title-1-bold: var(--bl-font-weight-bold) var(--bl-font-title-1);\n\n /* Font Style: Title 2 */\n --bl-font-title-2-font-size: var(--bl-font-size-l);\n --bl-font-title-2-line-height: calc(var(--bl-font-title-2-font-size) + var(--bl-size-3xs));\n --bl-font-title-2-size: var(--bl-font-title-2-font-size)/var(--bl-font-title-2-line-height);\n --bl-font-title-2: var(--bl-font-title-2-size) var(--bl-font-family);\n --bl-font-title-2-regular: var(--bl-font-weight-regular) var(--bl-font-title-2);\n --bl-font-title-2-medium: var(--bl-font-weight-medium) var(--bl-font-title-2);\n --bl-font-title-2-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-2);\n --bl-font-title-2-bold: var(--bl-font-weight-bold) var(--bl-font-title-2);\n\n /* Font Style: Title 3 */\n --bl-font-title-3-font-size: var(--bl-font-size-m);\n --bl-font-title-3-line-height: calc(var(--bl-font-title-3-font-size) + var(--bl-size-4xs));\n --bl-font-title-3-size: var(--bl-font-title-3-font-size)/var(--bl-font-title-3-line-height);\n --bl-font-title-3: var(--bl-font-title-3-size) var(--bl-font-family);\n --bl-font-title-3-regular: var(--bl-font-weight-regular) var(--bl-font-title-3);\n --bl-font-title-3-medium: var(--bl-font-weight-medium) var(--bl-font-title-3);\n --bl-font-title-3-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-3);\n --bl-font-title-3-bold: var(--bl-font-weight-bold) var(--bl-font-title-3);\n\n /* Font Style: Title 4 */\n --bl-font-title-4-font-size: var(--bl-font-size-s);\n --bl-font-title-4-line-height: calc(var(--bl-font-title-4-font-size) + var(--bl-size-4xs));\n --bl-font-title-4-size: var(--bl-font-title-4-font-size)/var(--bl-font-title-4-line-height);\n --bl-font-title-4: var(--bl-font-title-4-size) var(--bl-font-family);\n --bl-font-title-4-regular: var(--bl-font-weight-regular) var(--bl-font-title-4);\n --bl-font-title-4-medium: var(--bl-font-weight-medium) var(--bl-font-title-4);\n --bl-font-title-4-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-4);\n --bl-font-title-4-bold: var(--bl-font-weight-bold) var(--bl-font-title-4);\n\n /* Font Style: Body Text 1 */\n --bl-font-body-text-1-font-size: var(--bl-font-size-l);\n --bl-font-body-text-1-line-height: calc(var(--bl-font-body-text-1-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-1-size: var(--bl-font-body-text-1-font-size)/var(--bl-font-body-text-1-line-height);\n --bl-font-body-text-1: var(--bl-font-weight-regular) var(--bl-font-body-text-1-size) var(--bl-font-family);\n\n /* Font Style: Body Text 2 */\n --bl-font-body-text-2-font-size: var(--bl-font-size-m);\n --bl-font-body-text-2-line-height: calc(var(--bl-font-body-text-2-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-2-size: var(--bl-font-body-text-2-font-size)/var(--bl-font-body-text-2-line-height);\n --bl-font-body-text-2: var(--bl-font-weight-regular) var(--bl-font-body-text-2-size) var(--bl-font-family);\n\n /* Font Style: Body Text 3 */\n --bl-font-body-text-3-font-size: var(--bl-font-size-s);\n --bl-font-body-text-3-line-height: calc(var(--bl-font-body-text-3-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-3-size: var(--bl-font-body-text-3-font-size)/var(--bl-font-body-text-3-line-height);\n --bl-font-body-text-3: var(--bl-font-weight-regular) var(--bl-font-body-text-3-size) var(--bl-font-family);\n\n /* Font Style: Caption */\n --bl-font-caption-font-size: var(--bl-font-size-xs);\n --bl-font-caption-line-height: calc(var(--bl-font-caption-font-size) + var(--bl-size-4xs));\n --bl-font-caption-size: var(--bl-font-caption-font-size)/var(--bl-font-caption-line-height);\n --bl-font-caption: var(--bl-font-weight-medium) var(--bl-font-caption-size) var(--bl-font-family);\n}\n"],
5
+ "mappings": "AACA,WACE,0BACA,kBACA,kBACA,oBACA,iFACA,yDAGF,WACE,0BACA,kBACA,kBACA,oBACA,qFACA,iFAGF,WACE,0BACA,kBACA,kBACA,oBACA,+EACA,gEAGF,WACE,0BACA,kBACA,kBACA,oBACA,8EACA,yJAGF,WACE,0BACA,kBACA,kBACA,oBACA,kFACA,2GCzCF,MAEE,4BACA,kCACA,8BACA,oCACA,6BACA,mCACA,4BACA,kCACA,2BACA,iCACA,4BACA,kCACA,gCACA,sCACA,6BACA,mCAGA,oCACA,8CACA,yCACA,wCACA,uCACA,sCACA,uCACA,2CACA,wCAGA,oCACA,sCACA,qCACA,oCACA,0CACA,kCACA,2BAGA,uBACA,sBACA,qBACA,qBACA,qBACA,kBACA,qBACA,qBACA,oBACA,sBACA,oBACA,oBACA,oBAGA,oBACA,mBACA,wBACA,wBACA,uBACA,wBACA,uBACA,6BAGA,8CAGA,4BACA,8BACA,6BACA,+BACA,2BAGA,0BACA,2BACA,yBACA,0BACA,uBACA,2BACA,2BACA,4BACA,yBACA,yBACA,yBAGA,+BACA,6BACA,8BACA,4BACA,mCACA,+BAGA,qDACA,2FACA,4FACA,qEACA,4EACA,gFACA,8EACA,kFACA,0EAGA,uDACA,+FACA,kGACA,qGAGC,uDACA,+FACA,kGACA,uGAGA,uDACA,+FACA,kGACA,uGAGD,oDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,uDACA,mGACA,wGACA,2GAGA,uDACA,mGACA,wGACA,2GAGA,uDACA,mGACA,wGACA,2GAGA,oDACA,2FACA,4FACA",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trendyol/baklava",
3
- "version": "2.0.0-beta.84",
3
+ "version": "2.0.0-beta.85",
4
4
  "description": "Trendyol Baklava Design System",
5
5
  "main": "dist/baklava.js",
6
6
  "module": "dist/baklava.js",
@@ -1,22 +0,0 @@
1
- import{a as c}from"./chunk-23UFIOHV.js";import{a as h,b as r,f as v,g,h as d,j as n}from"./chunk-57PTZNIL.js";import{a as o}from"./chunk-NZ3RGSR6.js";var b=h`.container{--background-color:var(--bl-color-primary-background);display:flex;flex-direction:column;background:var(--background-color);max-width:calc(100vw - var(--bl-size-4xl));max-height:calc(100vh - var(--bl-size-4xl));min-width:424px;padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog,.dialog-polyfill .container{padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog-polyfill .container{position:fixed;z-index:999}.dialog::backdrop{background:#273142;opacity:.7}.dialog-polyfill{display:none;position:fixed;left:0;top:0;width:100vw;height:100vh;align-items:center;justify-content:center;background:#273142b3;z-index:999}:host([open]) .dialog-polyfill{display:flex}header{display:flex;justify-content:space-between;align-items:center;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl)}header bl-button{margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0}.content{padding:var(--bl-size-xl) var(--bl-size-xl) var(--bl-size-m) var(--bl-size-xl);overflow:auto}footer{padding:var(--bl-size-xl);display:flex;flex-flow:row-reverse wrap;gap:var(--bl-size-m)}footer.shadow{box-shadow:0 -4px 15px #27314226}@media only screen and (max-width:471px){.container{max-width:calc(100vw - var(--bl-size-2xl));max-height:calc(100vh - var(--bl-size-2xl));min-width:auto;min-height:auto}footer{flex-flow:column wrap}}`,m=b;var t=class extends v{constructor(){super(...arguments);this.open=!1;this.clickOutsideHandler=e=>{e.composedPath().includes(this.container)||this.closeDialog()};this.onKeydown=e=>{e.code==="Escape"&&this.open&&this.closeDialog()}}static get styles(){return[m]}updated(e){e.has("open")&&this.toggleDialogHandler()}get hasHtmlDialogSupport(){return!!window.HTMLDialogElement}get _hasFooter(){return[...this.childNodes].some(e=>e.nodeName==="BL-BUTTON")}toggleDialogHandler(){var e,a,i,l;this.open?((a=(e=this.dialog)==null?void 0:e.showModal)==null||a.call(e),this.onOpen({isOpen:!0}),document.body.style.overflow="hidden",this.toggleFooterShadow(),window==null||window.addEventListener("keydown",s=>this.onKeydown(s)),window==null||window.addEventListener("resize",()=>this.toggleFooterShadow())):((l=(i=this.dialog)==null?void 0:i.close)==null||l.call(i),this.onClose({isOpen:!1}),document.body.style.overflow="auto",window==null||window.removeEventListener("keydown",this.onKeydown),window==null||window.removeEventListener("resize",this.toggleFooterShadow))}closeDialog(){this.open=!1}toggleFooterShadow(){var e,a,i,l,s,p;((e=this.content)==null?void 0:e.scrollHeight)>((a=this.content)==null?void 0:a.offsetHeight)?(l=(i=this.footer)==null?void 0:i.classList)==null||l.add("shadow"):(p=(s=this.footer)==null?void 0:s.classList)==null||p.remove("shadow")}renderFooter(){return this._hasFooter?r`<footer>
2
- <slot name="primary-action"></slot>
3
- <slot name="secondary-action"></slot>
4
- <slot name="tertiary-action"></slot>
5
- </footer>`:""}renderContainer(){let e=this.caption?r`<h2 id="dialog-caption">${this.caption}</h2>`:"";return r` <div class="container">
6
- <header>
7
- ${e}
8
- <bl-button
9
- @click="${this.closeDialog}"
10
- icon="close"
11
- variant="tertiary"
12
- kind="neutral"
13
- ></bl-button>
14
- </header>
15
- <section class="content"><slot /></section>
16
- ${this.renderFooter()}
17
- </div>`}render(){return this.hasHtmlDialogSupport?r`
18
- <dialog class="dialog" aria-labelledby="dialog-caption" @click=${this.clickOutsideHandler}>${this.renderContainer()}</dialog>
19
- `:r`<div class="dialog-polyfill" role="dialog" aria-labelledby="dialog-caption" @click=${this.clickOutsideHandler}>
20
- ${this.renderContainer()}
21
- </div>`}};o([d({type:Boolean,reflect:!0})],t.prototype,"open",2),o([d({type:String})],t.prototype,"caption",2),o([n(".dialog")],t.prototype,"dialog",2),o([n("footer")],t.prototype,"footer",2),o([n(".container")],t.prototype,"container",2),o([n(".content")],t.prototype,"content",2),o([c("bl-dialog-open")],t.prototype,"onOpen",2),o([c("bl-dialog-close")],t.prototype,"onClose",2),t=o([g("bl-dialog")],t);export{t as a};
22
- //# sourceMappingURL=chunk-2J3IFWM5.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/components/dialog/bl-dialog.css", "../src/components/dialog/bl-dialog.ts"],
4
- "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.container{--background-color:var(--bl-color-primary-background);display:flex;flex-direction:column;background:var(--background-color);max-width:calc(100vw - var(--bl-size-4xl));max-height:calc(100vh - var(--bl-size-4xl));min-width:424px;padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog,.dialog-polyfill .container{padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog-polyfill .container{position:fixed;z-index:999}.dialog::backdrop{background:#273142;opacity:.7}.dialog-polyfill{display:none;position:fixed;left:0;top:0;width:100vw;height:100vh;align-items:center;justify-content:center;background:#273142b3;z-index:999}:host([open]) .dialog-polyfill{display:flex}header{display:flex;justify-content:space-between;align-items:center;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl)}header bl-button{margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0}.content{padding:var(--bl-size-xl) var(--bl-size-xl) var(--bl-size-m) var(--bl-size-xl);overflow:auto}footer{padding:var(--bl-size-xl);display:flex;flex-flow:row-reverse wrap;gap:var(--bl-size-m)}footer.shadow{box-shadow:0 -4px 15px #27314226}@media only screen and (max-width:471px){.container{max-width:calc(100vw - var(--bl-size-2xl));max-height:calc(100vh - var(--bl-size-2xl));min-width:auto;min-height:auto}footer{flex-flow:column wrap}}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../button/bl-button';\nimport style from './bl-dialog.css';\n\ntype DialogElement = {\n showModal: () => void;\n close: () => void;\n};\n\n\n/**\n * @tag bl-dialog\n * @summary Baklava Dialog component\n */\n@customElement('bl-dialog')\nexport default class BlDialog extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets dialog open-close status\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Sets the dialog title\n */\n @property({ type: String })\n caption?: string;\n\n @query('.dialog')\n private dialog: HTMLDialogElement & DialogElement;\n\n @query('footer')\n private footer: HTMLElement;\n\n @query('.container')\n private container: HTMLElement;\n\n @query('.content')\n private content: HTMLElement;\n\n /**\n * Fires when the dialog is opened\n */\n @event('bl-dialog-open') private onOpen: EventDispatcher<object>;\n\n /**\n * Fires when the dialog is closed\n */\n @event('bl-dialog-close') private onClose: EventDispatcher<object>;\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('open')) {\n this.toggleDialogHandler();\n }\n }\n\n private get hasHtmlDialogSupport() {\n return !!window.HTMLDialogElement;\n }\n\n private get _hasFooter() {\n return [...this.childNodes].some(node => node.nodeName === 'BL-BUTTON');\n }\n\n private toggleDialogHandler() {\n if (this.open) {\n this.dialog?.showModal?.();\n this.onOpen({ isOpen: true });\n document.body.style.overflow = 'hidden';\n this.toggleFooterShadow();\n window?.addEventListener('keydown', event => this.onKeydown(event));\n window?.addEventListener('resize', () => this.toggleFooterShadow());\n } else {\n this.dialog?.close?.();\n this.onClose({ isOpen: false });\n document.body.style.overflow = 'auto';\n window?.removeEventListener('keydown', this.onKeydown);\n window?.removeEventListener('resize', this.toggleFooterShadow);\n }\n }\n\n private closeDialog() {\n this.open = false;\n }\n\n private clickOutsideHandler = (event: MouseEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath.includes(this.container)) {\n this.closeDialog();\n }\n };\n\n private onKeydown = (event: KeyboardEvent): void => {\n if (event.code === 'Escape' && this.open) {\n this.closeDialog();\n }\n };\n\n private toggleFooterShadow() {\n if (this.content?.scrollHeight > this.content?.offsetHeight) {\n this.footer?.classList?.add('shadow');\n } else {\n this.footer?.classList?.remove('shadow');\n }\n }\n\n private renderFooter() {\n return this._hasFooter\n ? html`<footer>\n <slot name=\"primary-action\"></slot>\n <slot name=\"secondary-action\"></slot>\n <slot name=\"tertiary-action\"></slot>\n </footer>`\n : '';\n }\n\n private renderContainer() {\n const title = this.caption ? html`<h2 id=\"dialog-caption\">${this.caption}</h2>` : '';\n\n return html` <div class=\"container\">\n <header>\n ${title}\n <bl-button\n @click=\"${this.closeDialog}\"\n icon=\"close\"\n variant=\"tertiary\"\n kind=\"neutral\"\n ></bl-button>\n </header>\n <section class=\"content\"><slot /></section>\n ${this.renderFooter()}\n </div>`;\n }\n\n render(): TemplateResult {\n return this.hasHtmlDialogSupport\n ? html`\n <dialog class=\"dialog\" aria-labelledby=\"dialog-caption\" @click=${this.clickOutsideHandler}>${this.renderContainer()}</dialog>\n `\n : html`<div class=\"dialog-polyfill\" role=\"dialog\" aria-labelledby=\"dialog-caption\" @click=${this.clickOutsideHandler}>\n ${this.renderContainer()}\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-dialog': BlDialog;\n }\n}\n"],
5
- "mappings": "sJACO,IAAMA,EAASC,g9CACfC,EAAQF,ECef,IAAqBG,EAArB,cAAsCC,CAAW,CAAjD,kCASE,UAAO,GAiEP,KAAQ,oBAAuBC,GAAsB,CACjCA,EAAM,aAAa,EAEtB,SAAS,KAAK,SAAS,GACpC,KAAK,YAAY,CAErB,EAEA,KAAQ,UAAaA,GAA+B,CAC9CA,EAAM,OAAS,UAAY,KAAK,MAClC,KAAK,YAAY,CAErB,EArFA,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAoCA,QAAQC,EAAyC,CAC3CA,EAAkB,IAAI,MAAM,GAC9B,KAAK,oBAAoB,CAE7B,CAEA,IAAY,sBAAuB,CACjC,MAAO,CAAC,CAAC,OAAO,iBAClB,CAEA,IAAY,YAAa,CACvB,MAAO,CAAC,GAAG,KAAK,UAAU,EAAE,KAAKC,GAAQA,EAAK,WAAa,WAAW,CACxE,CAEQ,qBAAsB,CAtEhC,IAAAC,EAAAC,EAAAC,EAAAC,EAuEQ,KAAK,OACPF,GAAAD,EAAA,KAAK,SAAL,YAAAA,EAAa,YAAb,MAAAC,EAAA,KAAAD,GACA,KAAK,OAAO,CAAE,OAAQ,EAAK,CAAC,EAC5B,SAAS,KAAK,MAA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AS,CAAE,KAAM,MAAO,CAAC,GAdPf,EAenB,uBAGQc,EAAA,CADPE,EAAM,SAAS,GAjBGhB,EAkBX,sBAGAc,EAAA,CADPE,EAAM,QAAQ,GApBIhB,EAqBX,sBAGAc,EAAA,CADPE,EAAM,YAAY,GAvBAhB,EAwBX,yBAGAc,EAAA,CADPE,EAAM,UAAU,GA1BEhB,EA2BX,uBAKyBc,EAAA,CAAhCZ,EAAM,gBAAgB,GAhCJF,EAgCc,sBAKCc,EAAA,CAAjCZ,EAAM,iBAAiB,GArCLF,EAqCe,uBArCfA,EAArBc,EAAA,CADCC,EAAc,WAAW,GACLf",
6
- "names": ["styles", "i", "bl_dialog_default", "BlDialog", "s", "event", "bl_dialog_default", "changedProperties", "node", "_a", "_b", "_c", "_d", "_e", "_f", "y", "title", "__decorateClass", "e", "i"]
7
- }
@@ -1,5 +0,0 @@
1
- import{a as m,b as u,c as g,d as f,e as w,f as y,g as E,h as _}from"./chunk-ANYJUR6Q.js";import{a as b}from"./chunk-OLPYXE2P.js";import{a as n}from"./chunk-23UFIOHV.js";import{a as d,b as h,f as v,g as c,h as i,i as s,j as a}from"./chunk-57PTZNIL.js";import{a as r}from"./chunk-NZ3RGSR6.js";var O=d`.popover{--arrow-display:var(--bl-popover-arrow-display,none);--background-color:var(--bl-popover-background-color,var(--bl-color-primary-background));--border-color:var(--bl-popover-border-color,var(--bl-color-primary-hover));--padding:var(--bl-popover-padding,var(--bl-size-m));--border-radius:var(--bl-popover-border-radius,var(--bl-size-3xs));--position:var(--bl-popover-position,fixed);position:var(--position);box-sizing:border-box;border:1px solid var(--border-color);padding:var(--padding);border-radius:var(--border-radius);z-index:999;width:max-content;hyphens:auto;background-color:var(--background-color);font:var(--bl-font-title-3-regular);color:var(--bl-color-content-primary)}.popover:not(.visible){visibility:hidden}.arrow{--arrow-rotation:45deg;box-sizing:border-box;display:var(--arrow-display);position:absolute;background-color:var(--background-color);width:var(--bl-size-2xs);height:var(--bl-size-2xs);transform:rotate(var(--arrow-rotation));border:1px solid var(--border-color);border-bottom:0;border-right:0}`,x=O;var t=class extends v{constructor(){super(...arguments);this.placement="bottom";this.fitSize=!1;this.offset=8;this._visible=!1;this._handleClickOutside=e=>{let o=e.composedPath();!o.includes(this._target)&&!o.includes(this)&&this.hide()}}static get styles(){return[x]}connectedCallback(){super.connectedCallback(),this._handlePopoverShowEvent=this._handlePopoverShowEvent.bind(this),this._handleKeyupEvent=this._handleKeyupEvent.bind(this),this._handleClickOutside=this._handleClickOutside.bind(this)}disconnectedCallback(){super.disconnectedCallback(),this.popoverAutoUpdateCleanup&&this.popoverAutoUpdateCleanup()}getMiddleware(){let e=[];return e.push(f(this.offset),g(),u(),w({padding:4})),this.fitSize&&e.push(y({apply(o){o.elements.floating&&o.elements.reference&&Object.assign(o.elements.floating.style,{width:`${o.elements.reference.getBoundingClientRect().width}px`})}})),e.push(m({element:this.arrow,padding:5})),e}setPopover(){this.target&&(this.popoverAutoUpdateCleanup=E(this.target,this.popover,()=>{_(this.target,this.popover,{placement:this.placement,strategy:"fixed",middleware:this.getMiddleware()}).then(({x:e,y:o,placement:k,middlewareData:l})=>{if(Object.assign(this.popover.style,{left:`${e}px`,top:`${o}px`}),l.arrow){let{x:C,y:M}=l.arrow;Object.assign(this.arrow.style,{left:`${C}px`,top:`${M}px`});let S={top:"bottom",right:"left",bottom:"top",left:"right"},L={top:"225deg",right:"315deg",bottom:"45deg",left:"135deg"},p=k.split("-")[0],z=S[p];this.arrow.style.setProperty(z,"-5px"),this.arrow.style.setProperty("--arrow-rotation",L[p])}})}))}get target(){return this._target}set target(e){typeof e=="string"?this._target=document.getElementById(e):e instanceof Element?this._target=e:console.warn("BlPopover target only accepts an Element instance or a string id of a DOM element.")}show(){this._visible=!0,this.setPopover(),this.onBlPopoverShow(""),document.addEventListener("click",this._handleClickOutside),document.addEventListener("keyup",this._handleKeyupEvent),document.addEventListener("bl-popover-show",this._handlePopoverShowEvent)}hide(){this._visible=!1,document.removeEventListener("click",this._handleClickOutside),document.removeEventListener("keyup",this._handleKeyupEvent),document.removeEventListener("bl-popover-show",this._handlePopoverShowEvent),this.onBlPopoverHide("")}get visible(){return this._visible}_handlePopoverShowEvent(e){e.target!==this&&this.hide()}_handleKeyupEvent(e){e.key==="Escape"&&this.visible&&(this.hide(),e.preventDefault())}render(){let e=b({popover:!0,visible:this._visible});return h`<div class=${e}>
2
- <slot id="popover" aria-live=${this._visible?"polite":"off"}></slot>
3
- <div class="arrow" aria-hidden="true"></div>
4
- </div>`}};r([a(".popover")],t.prototype,"popover",2),r([a(".arrow")],t.prototype,"arrow",2),r([i({type:String})],t.prototype,"placement",2),r([s()],t.prototype,"_target",2),r([i({type:Boolean,attribute:"fit-size"})],t.prototype,"fitSize",2),r([i({type:Number})],t.prototype,"offset",2),r([s()],t.prototype,"_visible",2),r([n("bl-popover-show")],t.prototype,"onBlPopoverShow",2),r([n("bl-popover-hide")],t.prototype,"onBlPopoverHide",2),r([i()],t.prototype,"target",1),t=r([c("bl-popover")],t);export{t as a};
5
- //# sourceMappingURL=chunk-54ROO7JA.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/components/popover/bl-popover.css", "../src/components/popover/bl-popover.ts"],
4
- "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.popover{--arrow-display:var(--bl-popover-arrow-display,none);--background-color:var(--bl-popover-background-color,var(--bl-color-primary-background));--border-color:var(--bl-popover-border-color,var(--bl-color-primary-hover));--padding:var(--bl-popover-padding,var(--bl-size-m));--border-radius:var(--bl-popover-border-radius,var(--bl-size-3xs));--position:var(--bl-popover-position,fixed);position:var(--position);box-sizing:border-box;border:1px solid var(--border-color);padding:var(--padding);border-radius:var(--border-radius);z-index:999;width:max-content;hyphens:auto;background-color:var(--background-color);font:var(--bl-font-title-3-regular);color:var(--bl-color-content-primary)}.popover:not(.visible){visibility:hidden}.arrow{--arrow-rotation:45deg;box-sizing:border-box;display:var(--arrow-display);position:absolute;background-color:var(--background-color);width:var(--bl-size-2xs);height:var(--bl-size-2xs);transform:rotate(var(--arrow-rotation));border:1px solid var(--border-color);border-bottom:0;border-right:0}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport {\n computePosition,\n flip,\n shift,\n offset,\n arrow,\n inline,\n autoUpdate,\n size,\n Middleware,\n MiddlewareState,\n} from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport style from './bl-popover.css';\nimport { event, EventDispatcher } from '../../utilities/event';\n\nexport type Placement =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end'\n | 'left-start'\n | 'left'\n | 'left-end'\n | 'right-start'\n | 'right'\n | 'right-end';\n\n/**\n * @tag bl-popover\n * @summary Baklava Popover component\n *\n * @cssproperty [--bl-popover-arrow-display=none] - Sets the display of popovers arrow. Set as `block` to make arrow visible.\n * @cssproperty [--bl-popover-background-color=--bl-color-primary-background] - Sets the background color of popover.\n * @cssproperty [--bl-popover-border-color=--bl-color-primary-hover] - Sets the border color of popover.\n * @cssproperty [--bl-popover-padding=--bl-size-m] - Sets the padding of popover.\n * @cssproperty [--bl-popover-border-radius=--bl-size-3xs] - Sets the border radius of popover.\n * @cssproperty [--bl-popover-position=fixed] - Sets the position of popover. You can set it to `absolute` if parent element is a fixed positioned element like drawer or dialog.\n */\n@customElement('bl-popover')\nexport default class BlPopover extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @query('.popover') private popover: HTMLElement;\n @query('.arrow') private arrow: HTMLElement;\n\n /**\n * Sets placement of the popover\n */\n @property({ type: String })\n placement: Placement = 'bottom';\n\n /**\n * Target elements state\n */\n @state() _target: string | Element;\n\n\n /**\n * Sets size of popover same as trigger element\n */\n @property({ type: Boolean, attribute: 'fit-size' })\n fitSize = false;\n\n /**\n * Sets the distance between popover and target/trigger element\n */\n @property({ type: Number })\n offset = 8;\n\n /**\n * Visibility state\n */\n @state() private _visible = false;\n\n /**\n * Fires when the popover is shown\n */\n @event('bl-popover-show') private onBlPopoverShow: EventDispatcher<string>;\n\n /**\n * Fires when popover becomes hidden\n */\n @event('bl-popover-hide') private onBlPopoverHide: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n\n this._handlePopoverShowEvent = this._handlePopoverShowEvent.bind(this);\n this._handleKeyupEvent = this._handleKeyupEvent.bind(this);\n this._handleClickOutside = this._handleClickOutside.bind(this);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.popoverAutoUpdateCleanup && this.popoverAutoUpdateCleanup();\n }\n\n private getMiddleware(): Middleware[] {\n const middlewareParams: Middleware[] = [];\n middlewareParams.push(offset(this.offset), inline(), flip(),shift({ padding: 4 }));\n\n if (this.fitSize) {\n middlewareParams.push(\n size({\n apply(args: MiddlewareState) {\n if (args.elements.floating && args.elements.reference) {\n Object.assign(args.elements.floating.style, {\n width: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n }\n },\n })\n );\n }\n\n middlewareParams.push(arrow({ element: this.arrow, padding: 5 }));\n\n return middlewareParams;\n }\n\n private _handleClickOutside = (event: MouseEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n if (!eventPath.includes(this._target as HTMLElement) && !eventPath.includes(this)) {\n this.hide();\n }\n };\n\n private popoverAutoUpdateCleanup: () => void;\n\n private setPopover() {\n if (this.target) {\n this.popoverAutoUpdateCleanup = autoUpdate(this.target as Element, this.popover, () => {\n computePosition(this.target as Element, this.popover, {\n placement: this.placement,\n strategy: 'fixed',\n middleware: this.getMiddleware(),\n }).then(({ x, y, placement, middlewareData }) => {\n Object.assign(this.popover.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n\n if (middlewareData.arrow) {\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n\n Object.assign(this.arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`,\n });\n\n const arrowFlipDirections = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n };\n const arrowRotateDegrees = {\n top: '225deg',\n right: '315deg',\n bottom: '45deg',\n left: '135deg',\n };\n const popoverPlacement = placement.split('-')[0] as keyof typeof arrowFlipDirections;\n const arrowDirection = arrowFlipDirections[popoverPlacement];\n\n this.arrow.style.setProperty(arrowDirection, '-5px');\n this.arrow.style.setProperty('--arrow-rotation', arrowRotateDegrees[popoverPlacement]);\n }\n });\n });\n }\n }\n\n /**\n * Sets the target element of the popover to align and trigger.\n * It can be a string id of the target element or can be a direct Element reference of it.\n */\n @property()\n get target(): string | Element {\n return this._target;\n }\n\n set target(value: string | Element) {\n if (typeof value === 'string') {\n this._target = document.getElementById(value) as Element;\n } else if (value instanceof Element) {\n this._target = value;\n } else {\n console.warn(\n 'BlPopover target only accepts an Element instance or a string id of a DOM element.'\n );\n }\n }\n\n /**\n * Shows popover\n */\n show() {\n this._visible = true;\n this.setPopover();\n this.onBlPopoverShow('');\n document.addEventListener('click', this._handleClickOutside);\n document.addEventListener('keyup', this._handleKeyupEvent);\n document.addEventListener('bl-popover-show', this._handlePopoverShowEvent);\n }\n\n /**\n * Hides popover\n */\n hide() {\n this._visible = false;\n document.removeEventListener('click', this._handleClickOutside);\n document.removeEventListener('keyup', this._handleKeyupEvent);\n document.removeEventListener('bl-popover-show', this._handlePopoverShowEvent);\n this.onBlPopoverHide('');\n }\n\n /**\n * Gives the visibility status of the popover\n */\n get visible(): boolean {\n return this._visible;\n }\n\n private _handlePopoverShowEvent(event: Event) {\n if (event.target !== this) {\n this.hide();\n }\n }\n\n private _handleKeyupEvent(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.visible) {\n this.hide();\n event.preventDefault();\n }\n }\n\n render(): TemplateResult {\n const classes = classMap({\n popover: true,\n visible: this._visible,\n });\n\n return html`<div class=${classes}>\n <slot id=\"popover\" aria-live=${this._visible ? 'polite' : 'off'}></slot>\n <div class=\"arrow\" aria-hidden=\"true\"></div>\n </div>`;\n }\n}\n\ndeclare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oBAAoB,QAAS,KAAK,mBAAmB,EAC9D,SAAS,oBAAoB,QAAS,KAAK,iBAAiB,EAC5D,SAAS,oBAAoB,kBAAmB,KAAK,uBAAuB,EAC5E,KAAK,gBAAgB,EAAE,CACzB,CAKA,IAAI,SAAmB,CACrB,OAAO,KAAK,QACd,CAEQ,wBAAwBvB,EAAc,CACxCA,EAAM,SAAW,MACnB,KAAK,KAAK,CAEd,CAEQ,kBAAkBA,EAAsB,CAC1CA,EAAM,MAAQ,UAAY,KAAK,UACjC,KAAK,KAAK,EACVA,EAAM,eAAe,EAEzB,CAEA,QAAyB,CACvB,IAAMwB,EAAUC,EAAS,CACvB,QAAS,GACT,QAAS,KAAK,QAChB,CAAC,EAED,OAAOX,eAAkBU;AAAA,qCACQ,KAAK,SAAW,SAAW;AAAA;AAAA,WAG9D,CACF,EA/M6BE,EAAA,CAA1BC,EAAM,UAAU,GALE7B,EAKQ,uBACF4B,EAAA,CAAxBC,EAAM,QAAQ,GANI7B,EAMM,qBAMzB4B,EAAA,CADCE,EAAS,CAAE,KAAM,MAAO,CAAC,GAXP9B,EAYnB,yBAKS4B,EAAA,CAARG,EAAM,GAjBY/B,EAiBV,uBAOT4B,EAAA,CADCE,EAAS,CAAE,KAAM,QAAS,UAAW,UAAW,CAAC,GAvB/B9B,EAwBnB,uBAMA4B,EAAA,CADCE,EAAS,CAAE,KAAM,MAAO,CAAC,GA7BP9B,EA8BnB,sBAKiB4B,EAAA,CAAhBG,EAAM,GAnCY/B,EAmCF,wBAKiB4B,EAAA,CAAjC1B,EAAM,iBAAiB,GAxCLF,EAwCe,+BAKA4B,EAAA,CAAjC1B,EAAM,iBAAiB,GA7CLF,EA6Ce,+BAiG9B4B,EAAA,CADHE,EAAS,GA7IS9B,EA8If,sBA9IeA,EAArB4B,EAAA,CADCE,EAAc,YAAY,GACN9B",
6
- "names": ["styles", "i", "bl_popover_default", "BlPopover", "s", "event", "eventPath", "bl_popover_default", "middlewareParams", "O", "T", "b", "D", "k", "args", "u", "P", "z", "x", "y", "placement", "middlewareData", "arrowX", "arrowY", "arrowFlipDirections", "arrowRotateDegrees", "popoverPlacement", "arrowDirection", "value", "classes", "o", "__decorateClass", "i", "e", "t"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/components/drawer/bl-drawer.css", "../src/components/drawer/bl-drawer.ts"],
4
- "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.drawer{box-sizing:border-box;position:fixed;display:flex;top:0;right:-100%;bottom:0;width:424px;padding:var(--bl-size-xl);padding-top:max(env(safe-area-inset-top),var(--bl-size-xl));padding-right:max(env(safe-area-inset-right),var(--bl-size-xl));padding-bottom:max(env(safe-area-inset-bottom),var(--bl-size-xl));background:var(--bl-color-primary-background);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transition:right var(--bl-drawer-animation-duration,.25s);z-index:999}:host([open]) .drawer{right:0}iframe{height:100%;width:100%;border:0}.container{display:flex;flex-direction:column;gap:var(--bl-size-xl);flex:1}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);background-color:white}header .header-buttons{display:flex;gap:24px;margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);overflow:hidden;margin:0;padding:0}.content{flex:1;overflow-y:scroll}.iframe-content{flex:1}@media only screen and (max-width:424px){:host([open]) .drawer{width:calc(100vw - 24px)}}`;\nexport default styles;\n", "import { customElement, property, state } from 'lit/decorators.js';\nimport { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../button/bl-button';\nimport style from './bl-drawer.css';\nimport { PropertyValues } from 'lit';\n\n/**\n * @tag bl-drawer\n * @summary Baklava Drawer component\n *\n */\n\n@customElement('bl-drawer')\nexport default class BlDrawer extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets drawer open-close status\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Sets the drawer title\n */\n @property({ type: String })\n caption?: string;\n\n /**\n * Sets the drawer embed url for iframe\n */\n @property({ type: String, attribute: 'embed-url' })\n embedUrl?: string;\n\n /**\n * Sets the drawer external link\n */\n @property({ type: String, attribute: 'external-link' })\n externalLink?: string;\n\n /**\n * Fires when the drawer is opened\n */\n @event('bl-drawer-open') private onOpen: EventDispatcher<string>;\n\n /**\n * Fires when the drawer is closed\n */\n @event('bl-drawer-close') private onClose: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n window?.addEventListener('bl-drawer-open', event => {\n if (event.target !== this) this.closeDrawer();\n });\n }\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('open')) {\n this.toggleDialogHandler();\n }\n }\n\n private domExistenceSchedule: number;\n\n private toggleDialogHandler() {\n if (this.open) {\n if (this.domExistenceSchedule) {\n clearTimeout(this.domExistenceSchedule);\n }\n\n this.domExistence = true;\n // FIXME: Allow events without payload\n this.onOpen('');\n } else {\n // Give some time for exit animation\n this.domExistenceSchedule = window.setTimeout(() => {\n this.domExistence = false;\n }, 1000);\n\n // FIXME: Allow events without payload\n this.onClose('');\n }\n }\n\n @state() private domExistence = false;\n\n private closeDrawer() {\n this.open = false;\n }\n\n private renderContent() {\n const content = this.embedUrl ? html`<iframe src=${this.embedUrl}></iframe>` : html`<slot></slot>`;\n\n return html`<section class=${this.embedUrl ? 'iframe-content' : 'content'}>\n ${content}\n </section>`;\n }\n\n private renderContainer() {\n const title = this.caption ? html`<h2 id=\"drawer-caption\">${this.caption}</h2>` : '';\n const external_button = this.externalLink\n ? html`<bl-button\n icon=\"external_link\"\n variant=\"tertiary\"\n kind=\"neutral\"\n size=\"small\"\n href=\"${this.externalLink}\"\n target=\"_blank\"\n ></bl-button>`\n : '';\n\n return html`<div class=\"container\">\n <header>\n ${title}\n <div class=\"header-buttons\">\n ${external_button}\n <bl-button\n @click=\"${this.closeDrawer}\"\n icon=\"close\"\n size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\n ></bl-button>\n </div>\n </header>\n ${this.renderContent()}\n </div>`;\n }\n\n render(): TemplateResult {\n if (this.domExistence) {\n return html`<div class=\"drawer\">${this.renderContainer()}</div>`;\n } else {\n return html``;\n }\n }\n}\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-drawer': BlDrawer;\n }\n}\n"],
5
- "mappings": "sJACO,IAAMA,EAASC,0jCACfC,EAAQF,ECYf,IAAqBG,EAArB,cAAsC,CAAW,CAAjD,kCASE,UAAO,GAiEE,KAAQ,aAAe,GAzEhC,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAoCA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,qBAAQ,iBAAiB,iBAAkBC,GAAS,CAC9CA,EAAM,SAAW,MAAM,KAAK,YAAY,CAC9C,EACF,CAEA,QAAQC,EAAyC,CAC3CA,EAAkB,IAAI,MAAM,GAC9B,KAAK,oBAAoB,CAE7B,CAIQ,qBAAsB,CACxB,KAAK,MACH,KAAK,sBACP,aAAa,KAAK,oBAAoB,EAGxC,KAAK,aAAe,GAEpB,KAAK,OAAO,EAAE,IAGd,KAAK,qBAAuB,OAAO,WAAW,IAAM,CAClD,KAAK,aAAe,EACtB,EAAG,GAAI,EAGP,KAAK,QAAQ,EAAE,EAEnB,CAIQ,aAAc,CACpB,KAAK,KAAO,EACd,CAEQ,eAAgB,CACtB,IAAMC,EAAU,KAAK,SAAWC,gBAAmB,KAAK,qBAAuBA,iBAE/E,OAAOA,mBAAsB,KAAK,SAAW,iBAAmB;AAAA,QAC5DD;AAAA,eAEN,CAEQ,iBAAkB,CACxB,IAAME,EAAQ,KAAK,QAAUD,4BAA+B,KAAK,eAAiB,GAC5EE,EAAkB,KAAK,aACzBF;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKU,KAAK;AAAA;AAAA,uBAGf,GAEJ,OAAOA;AAAA;AAAA,UAEDC;AAAA;AAAA,YAEEC;AAAA;AAAA,sBAEU,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAQnB,KAAK,cAAc;AAAA,WAEzB,CAEA,QAAyB,CACvB,OAAI,KAAK,aACAF,wBAA2B,KAAK,gBAAgB,UAEhDA,GAEX,CACF,EArHEG,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARvBT,EASnB,oBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAdPT,EAenB,uBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,GApB/BT,EAqBnB,wBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,GA1BnCT,EA2BnB,4BAKiCQ,EAAA,CAAhCN,EAAM,gBAAgB,GAhCJF,EAgCc,sBAKCQ,EAAA,CAAjCN,EAAM,iBAAiB,GArCLF,EAqCe,uBAqCjBQ,EAAA,CAAhBE,EAAM,GA1EYV,EA0EF,4BA1EEA,EAArBQ,EAAA,CADCC,EAAc,WAAW,GACLT",
6
- "names": ["styles", "i", "bl_drawer_default", "BlDrawer", "bl_drawer_default", "event", "changedProperties", "content", "y", "title", "external_button", "__decorateClass", "e", "t"]
7
- }
@@ -1,15 +0,0 @@
1
- import{a as b,b as u,c as f,d as g,e as w,g as y,h as x}from"./chunk-ANYJUR6Q.js";import{a as m}from"./chunk-OLPYXE2P.js";import{a as r}from"./chunk-23UFIOHV.js";import{a as n,b as p,f as d,g as h,h as c,i as v,j as i}from"./chunk-57PTZNIL.js";import{a as e}from"./chunk-NZ3RGSR6.js";var z=n`.trigger{display:inline-block;cursor:pointer}.tooltip{position:fixed;box-sizing:border-box;border:0;background-color:var(--bl-color-secondary);color:var(--bl-color-content-primary-contrast);border-radius:var(--bl-size-3xs);pointer-events:none;font:var(--bl-font-title-3-regular);padding:var(--bl-size-m);z-index:999;width:max-content;hyphens:auto;--max-viewport:calc(100vw - var(--bl-size-s));--tooltip-max-width:424px;max-width:min(var(--max-viewport),var(--tooltip-max-width))}.tooltip:not(.visible){visibility:hidden}.arrow{position:absolute;background-color:var(--bl-color-secondary);width:var(--bl-size-2xs);height:var(--bl-size-2xs);transform:rotate(45deg)}`,E=z;var t=class extends d{constructor(){super(...arguments);this.placement="top";this._visible=!1}static get styles(){return[E]}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.popoverAutoUpdateCleanup&&this.popoverAutoUpdateCleanup()}setTooltip(){this.popoverAutoUpdateCleanup=y(this.trigger,this.tooltip,()=>{x(this.trigger,this.tooltip,{placement:this.placement,strategy:"fixed",middleware:[g(8),w({padding:5}),u(),f(),b({element:this.arrow,padding:5})]}).then(({x:o,y:k,placement:C,middlewareData:s})=>{if(Object.assign(this.tooltip.style,{left:`${o}px`,top:`${k}px`}),s.arrow){let{x:a,y:l}=s.arrow;Object.assign(this.arrow.style,{left:a!=null?`${a}px`:"",top:l!=null?`${l}px`:""});let $={top:"bottom",right:"left",bottom:"top",left:"right"},D=C.split("-")[0],S=$[D];this.arrow.style.setProperty(S,"-4px")}})})}show(){this._visible=!0,this.setTooltip(),this.onShow("Show event fired!")}hide(){this._visible=!1,this.onHide("Hide event fired!")}get visible(){return this._visible}handleKeyDown(o){this._visible&&o.key==="Escape"&&(o.stopPropagation(),this.hide())}render(){let o=m({tooltip:!0,visible:this._visible});return p`<slot
2
- class="trigger"
3
- name="tooltip-trigger"
4
- aria-describedby="tooltip"
5
- @focus=${{handleEvent:()=>this.show(),capture:!0}}
6
- @blur=${{handleEvent:()=>this.hide(),capture:!0}}
7
- @mouseover=${()=>this.show()}
8
- @mouseleave=${()=>this.hide()}
9
- >
10
- </slot>
11
- <div class=${o}>
12
- <slot id="tooltip" role="tooltip" aria-live=${this._visible?"polite":"off"}></slot>
13
- <div class="arrow" aria-hidden="true"></div>
14
- </div>`}};e([i(".tooltip")],t.prototype,"tooltip",2),e([i(".trigger")],t.prototype,"trigger",2),e([i(".arrow")],t.prototype,"arrow",2),e([c({type:String})],t.prototype,"placement",2),e([v()],t.prototype,"_visible",2),e([r("bl-tooltip-show")],t.prototype,"onShow",2),e([r("bl-tooltip-hide")],t.prototype,"onHide",2),t=e([h("bl-tooltip")],t);export{t as a};
15
- //# sourceMappingURL=chunk-K5PH753D.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/components/tooltip/bl-tooltip.css", "../src/components/tooltip/bl-tooltip.ts"],
4
- "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.trigger{display:inline-block;cursor:pointer}.tooltip{position:fixed;box-sizing:border-box;border:0;background-color:var(--bl-color-secondary);color:var(--bl-color-content-primary-contrast);border-radius:var(--bl-size-3xs);pointer-events:none;font:var(--bl-font-title-3-regular);padding:var(--bl-size-m);z-index:999;width:max-content;hyphens:auto;--max-viewport:calc(100vw - var(--bl-size-s));--tooltip-max-width:424px;max-width:min(var(--max-viewport),var(--tooltip-max-width))}.tooltip:not(.visible){visibility:hidden}.arrow{position:absolute;background-color:var(--bl-color-secondary);width:var(--bl-size-2xs);height:var(--bl-size-2xs);transform:rotate(45deg)}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { computePosition, flip, shift, offset, arrow, inline, autoUpdate } from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ReferenceElement } from '@floating-ui/core';\nimport style from './bl-tooltip.css';\nimport { event, EventDispatcher } from '../../utilities/event';\n\nexport type Placement =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end'\n | 'left-start'\n | 'left'\n | 'left-end'\n | 'right-start'\n | 'right'\n | 'right-end';\n\n/**\n * @tag bl-tooltip\n * @summary Baklava Tooltip component\n *\n * @property {string} placement - Sets the tooltip placement\n */\n@customElement('bl-tooltip')\nexport default class BlTooltip extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @query('.tooltip') private tooltip: HTMLElement;\n @query('.trigger') private trigger: ReferenceElement;\n @query('.arrow') private arrow: HTMLElement;\n\n /**\n * Sets placement of the tooltip\n */\n @property({ type: String })\n placement: Placement = 'top';\n\n @state() private _visible = false;\n\n /**\n * Fires when hovering over a trigger\n */\n @event('bl-tooltip-show') private onShow: EventDispatcher<string>;\n\n /**\n * Fires when leaving over from trigger\n */\n @event('bl-tooltip-hide') private onHide: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener('keydown', this.handleKeyDown);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener('keydown', this.handleKeyDown);\n\n this.popoverAutoUpdateCleanup && this.popoverAutoUpdateCleanup();\n }\n\n private popoverAutoUpdateCleanup: () => void;\n\n private setTooltip() {\n this.popoverAutoUpdateCleanup = autoUpdate(this.trigger, this.tooltip, () => {\n computePosition(this.trigger, this.tooltip, {\n placement: this.placement,\n strategy: 'fixed',\n middleware: [\n offset(8),\n shift({ padding: 5 }),\n flip(),\n inline(),\n arrow({ element: this.arrow, padding: 5 }),\n ],\n }).then(({ x, y, placement, middlewareData }) => {\n Object.assign(this.tooltip.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n\n if (middlewareData.arrow) {\n const {x: arrowX, y: arrowY} = middlewareData.arrow;\n\n Object.assign(this.arrow.style, {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n });\n\n const arrowFlipDirections = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n };\n const tooltipPlacement = placement.split('-')[0] as keyof typeof arrowFlipDirections;\n const arrowDirection = arrowFlipDirections[tooltipPlacement];\n\n this.arrow.style.setProperty(arrowDirection, '-4px');\n }\n });\n });\n }\n\n /**\n * Shows tooltip\n */\n show() {\n this._visible = true;\n this.setTooltip();\n this.onShow('Show event fired!');\n }\n\n /**\n * Hides tooltip\n */\n hide() {\n this._visible = false;\n this.onHide('Hide event fired!');\n }\n\n /**\n * Gives the visibility status of the tooltip\n */\n get visible(): boolean {\n return this._visible;\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (this._visible && event.key === 'Escape') {\n event.stopPropagation();\n this.hide();\n }\n }\n\n render(): TemplateResult {\n const classes = classMap({\n tooltip: true,\n visible: this._visible,\n });\n\n return html`<slot\n class=\"trigger\"\n name=\"tooltip-trigger\"\n aria-describedby=\"tooltip\"\n @focus=${{ handleEvent: () => this.show(), capture: true }}\n @blur=${{ handleEvent: () => this.hide(), capture: true }}\n @mouseover=${() => this.show()}\n @mouseleave=${() => this.hide()}\n >\n </slot>\n <div class=${classes}>\n <slot id=\"tooltip\" role=\"tooltip\" aria-live=${this._visible ? 'polite' : 'off'}></slot>\n <div class=\"arrow\" aria-hidden=\"true\"></div>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-tooltip': BlTooltip;\n }\n}\n"],
5
- "mappings": "4RACO,IAAMA,EAASC,2pBACfC,EAAQF,EC2Bf,IAAqBG,EAArB,cAAuCC,CAAW,CAAlD,kCAaE,eAAuB,MAEd,KAAQ,SAAW,GAd5B,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAwBA,mBAAoB,CAClB,MAAM,kBAAkB,EAExB,KAAK,iBAAiB,UAAW,KAAK,aAAa,CACrD,CAEA,sBAAuB,CACrB,MAAM,qBAAqB,EAE3B,KAAK,oBAAoB,UAAW,KAAK,aAAa,EAEtD,KAAK,0BAA4B,KAAK,yBAAyB,CACjE,CAIQ,YAAa,CACnB,KAAK,yBAA2BC,EAAW,KAAK,QAAS,KAAK,QAAS,IAAM,CAC3EC,EAAgB,KAAK,QAAS,KAAK,QAAS,CAC1C,UAAW,KAAK,UAChB,SAAU,QACV,WAAY,CACVC,EAAO,CAAC,EACRC,EAAM,CAAE,QAAS,CAAE,CAAC,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AM,KAAK,KAAK;AAAA,sBACf,IAAM,KAAK,KAAK;AAAA;AAAA;AAAA,mBAGnBS;AAAA,sDACmC,KAAK,SAAW,SAAW;AAAA;AAAA,aAG/E,CACF,EAnI6BE,EAAA,CAA1B,EAAM,UAAU,GALEtB,EAKQ,uBACAsB,EAAA,CAA1B,EAAM,UAAU,GANEtB,EAMQ,uBACFsB,EAAA,CAAxB,EAAM,QAAQ,GAPItB,EAOM,qBAMzBsB,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAZPvB,EAanB,yBAEiBsB,EAAA,CAAhBE,EAAM,GAfYxB,EAeF,wBAKiBsB,EAAA,CAAjCH,EAAM,iBAAiB,GApBLnB,EAoBe,sBAKAsB,EAAA,CAAjCH,EAAM,iBAAiB,GAzBLnB,EAyBe,sBAzBfA,EAArBsB,EAAA,CADCC,EAAc,YAAY,GACNvB",
6
- "names": ["styles", "i", "bl_tooltip_default", "BlTooltip", "s", "bl_tooltip_default", "P", "z", "O", "D", "b", "T", "u", "x", "y", "placement", "middlewareData", "arrowX", "arrowY", "arrowFlipDirections", "tooltipPlacement", "arrowDirection", "event", "classes", "o", "__decorateClass", "e", "t"]
7
- }
@@ -1,43 +0,0 @@
1
- import{a as m}from"./chunk-3B64VOWB.js";import{b as y,d as g,f as x,g as _,h as O}from"./chunk-ANYJUR6Q.js";import{a as b}from"./chunk-DJOD4BTL.js";import{a as p}from"./chunk-OLPYXE2P.js";import{a as f}from"./chunk-KPAWUBRO.js";import{a as h}from"./chunk-23UFIOHV.js";import{a as d,b as n,f as c,g as u,h as l,i as r,j as a,k as v}from"./chunk-57PTZNIL.js";import{a as o}from"./chunk-NZ3RGSR6.js";var T=d`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;display:flex;flex-direction:column;gap:var(--bl-size-3xs);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--background-color:var(--bl-color-primary-background);--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--z-index:100;--menu-height:250px;--popover-position:var(--bl-popover-position,fixed)}:host([size='large']) .select-wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size='small']) .select-wrapper{--height:var(--bl-size-xl);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-xs);--font-size:var(--bl-font-size-s)}:host([disabled]) .select-wrapper{--placeholder-color:var(--bl-color-content-passive)}.dirty.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-hover);--label-color:var(--bl-color-danger)}.select-input{display:flex;align-items:center;justify-content:space-between;cursor:pointer;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 var(--padding-horizontal);border-radius:var(--bl-border-radius-s);color:var(--text-color);-webkit-user-select:none;user-select:none}.placeholder{color:var(--placeholder-color);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.select-wrapper.selected .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}.remove-all{display:none}.remove-all::after{content:'';position:absolute;left:1.5rem;bottom:4px;height:1rem;border-left:1px solid var(--bl-color-border)}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-secondary)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-content-passive)}.select-open .select-input,.select-input:focus-visible{border:solid 1px var(--border-focus-color);outline:0}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{flex:1;padding:0;margin:0;list-style:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selected-options li{display:inline;font-size:var(--font-size);color:var(--text-color)}.selected-options li:not(:last-child)::after{content:', '}.select-input:not(.has-overflowed-options) .additional-selection-count{display:none}:host([disabled]) .selected-options li{color:var(--bl-color-content-passive)}.select-input .actions{display:flex;align-items:center;justify-content:center;gap:var(--bl-size-2xs);margin-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--z-index);width:100%;top:var(--top);left:var(--left)}.select-open .popover{display:flex;border:solid 1px var(--border-focus-color)}bl-icon{color:var(--icon-color)}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));max-width:max-content;transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial;right:var(--padding-horizontal)}:host([label-fixed]) label{position:static;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color)}.hint{display:none;font:var(--bl-font-body-text-3)}.hint p{padding:0;margin:0}.error-icon,.invalid-text{display:none}.dirty.invalid label,.invalid-text,.error-icon{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}:host([help-text]) .hint,.dirty.invalid .hint{display:block}.dirty.invalid .invalid-text{display:block}.dirty.invalid .help-text{display:none}`,w=T;var t=class extends b(c){constructor(){super(...arguments);this.size="medium";this.required=!1;this.disabled=!1;this.multiple=!1;this.autofocus=!1;this.labelFixed=!1;this._isPopoverOpen=!1;this._additionalSelectedOptionCount=0;this._connectedOptions=[];this._cleanUpPopover=null;this._selectedOptions=[];this.dirty=!1;this._interactOutsideHandler=e=>{var s;let i=e.composedPath();(s=i==null?void 0:i.find(z=>z.tagName==="BL-SELECT"))!=null&&s.contains(this)||this.close()};this.focusedOptionIndex=-1}static get styles(){return[w]}get value(){return this._value}set value(e){if(this._value=e,Array.isArray(e)){let i=new FormData;e.forEach(s=>i.append(this.name,`${s}`)),this.setValue(i)}else this.setValue(e);this.setOptionsSelected()}shouldFormValueUpdate(){return this.value!==null&&this.value!==""}setOptionsSelected(){this._connectedOptions.forEach(e=>e.selected=this.value===e.value||Array.isArray(this.value)&&this.value.includes(e.value)),this._selectedOptions=[...this.options.filter(e=>e.selected)]}get options(){return this._connectedOptions}get opened(){return this._isPopoverOpen}get selectedOptions(){return this._selectedOptions}get additionalSelectedOptionCount(){return this._additionalSelectedOptionCount}validityCallback(){if(this.customInvalidText)return this.customInvalidText;let e=document.createElement("select");return e.required=this.required,e.validationMessage}reportValidity(){return this.dirty=!0,this.checkValidity()}resetFormControl(){this.value=this._initialValue}open(){this._isPopoverOpen=!0,this._setupPopover(),document.addEventListener("click",this._interactOutsideHandler,!0),document.addEventListener("focus",this._interactOutsideHandler,!0)}close(){this._isPopoverOpen=!1,this.focusedOptionIndex=-1,this._cleanUpPopover&&this._cleanUpPopover(),document.removeEventListener("click",this._interactOutsideHandler,!0),document.removeEventListener("focus",this._interactOutsideHandler,!0)}_setupPopover(){this._cleanUpPopover=_(this._selectInput,this._popover,()=>{O(this._selectInput,this._popover,{placement:"bottom",strategy:"fixed",middleware:[y(),g(8),x({apply(e){Object.assign(e.elements.floating.style,{width:`${e.elements.reference.getBoundingClientRect().width}px`})}})]}).then(({x:e,y:i})=>{this._popover.style.setProperty("--left",`${e}px`),this._popover.style.setProperty("--top",`${i}px`)})})}connectedCallback(){var e;super.connectedCallback(),(e=this.form)==null||e.addEventListener("submit",i=>{this.reportValidity()||i.preventDefault()})}disconnectedCallback(){super.disconnectedCallback(),this._cleanUpPopover&&this._cleanUpPopover()}inputTemplate(){let e=n`<ul class="selected-options">
2
- ${this._selectedOptions.map(s=>n`<li>${s.textContent}</li>`)}
3
- </ul>`,i=n`<bl-button
4
- class="remove-all"
5
- size="small"
6
- variant="tertiary"
7
- kind="neutral"
8
- icon="close"
9
- @click=${this._onClickRemove}></bl-button>`;return n`<div
10
- class=${p({"select-input":!0,"has-overflowed-options":this._additionalSelectedOptionCount>0})}
11
- tabindex="${this.disabled?"-1":0}"
12
- ?autofocus=${this.autofocus}
13
- @click=${this.togglePopover}
14
- >
15
- <span class="placeholder">${this.placeholder}</span>
16
- ${e}
17
- <span class="additional-selection-count">+${this._additionalSelectedOptionCount}</span>
18
- <div class="actions">
19
- ${this.multiple?i:null}
20
- <bl-icon
21
- class="dropdown-icon open"
22
- name="arrow_up"
23
- ></bl-icon>
24
-
25
- <bl-icon
26
- class="dropdown-icon closed"
27
- name="arrow_down"
28
- ></bl-icon>
29
- </div>
30
- </div>`}render(){let e=this.checkValidity()?"":n`<p id="errorMessage" aria-live="polite" class="invalid-text">
31
- ${this.validationMessage}
32
- </p>`,i=this.helpText&&!e?n`<p class="help-text">${this.helpText}</p>`:"",s=this.label?n`<label>${this.label}</label>`:"";return n`<div
33
- class=${p({"select-wrapper":!0,"select-open":this.opened,selected:this._selectedOptions.length>0,invalid:!this.validity.valid,dirty:this.dirty})}
34
- @keydown=${this.handleKeydown}
35
- >
36
- ${s}
37
- ${this.inputTemplate()}
38
- <div class="popover" tabindex="${f(this._isPopoverOpen?void 0:"-1")}" @bl-select-option=${this._handleSelectOptionEvent}>
39
- <slot></slot>
40
- </div>
41
- <div class="hint">${e} ${i}</div>
42
- </div> `}handleKeydown(e){this.focusedOptionIndex===-1&&["Enter","Space"].includes(e.code)?(this.togglePopover(),e.preventDefault()):this._isPopoverOpen===!1&&["ArrowDown","ArrowUp"].includes(e.code)?(this.open(),e.preventDefault()):e.code==="Escape"?(this.close(),e.preventDefault()):this._isPopoverOpen&&["ArrowDown","ArrowUp"].includes(e.code)&&(e.code==="ArrowDown"&&this.focusedOptionIndex++,e.code==="ArrowUp"&&this.focusedOptionIndex--,this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,this.options.length-1)),this.options[this.focusedOptionIndex].focus(),e.preventDefault())}togglePopover(){this._isPopoverOpen?this.close():this.open()}_handleSelectEvent(){this._onBlSelect(this._selectedOptions.map(e=>({value:e.value,selected:e.selected,text:e.textContent})))}_handleSingleSelect(e){this.value=e.value,this._handleSelectEvent(),this._isPopoverOpen=!1}_handleMultipleSelect(){this.value=this._connectedOptions.filter(e=>e.selected).map(e=>e.value),this._handleSelectEvent()}_handleSelectOptionEvent(e){let i=e.target;this.dirty=!0,this.multiple?this._handleMultipleSelect():this._handleSingleSelect(i)}_onClickRemove(e){e.stopPropagation(),this._connectedOptions.filter(i=>i.selected).forEach(i=>{i.selected=!1}),this.value=null,this._additionalSelectedOptionCount=0,this._handleSelectEvent()}_checkAdditionalItemCount(){if(!this.multiple||!this.selectedOptionsItems||this.selectedOptionsItems.length<2){this._additionalSelectedOptionCount=0;return}let e=[...this.selectedOptionsItems].findIndex(i=>i.offsetLeft>this.selectedOptionsContainer.offsetWidth);e>-1?this._additionalSelectedOptionCount=this.selectedOptionsItems.length-e:this._additionalSelectedOptionCount=0}firstUpdated(){this.value===void 0&&(this.value=""),this._initialValue=this._value}updated(e){e.has("multiple")&&typeof e.get("multiple")=="boolean"&&(this.value=null),this._checkAdditionalItemCount()}registerOption(e){this._connectedOptions.push(e),e.selected&&(this.multiple?(Array.isArray(this.value)||(this.value=[]),this.value=[...this.value,e.value]):this.value=e.value),this.setOptionsSelected(),this.requestUpdate()}unregisterOption(e){this._connectedOptions.splice(this._connectedOptions.indexOf(e),1)}};t.formControlValidators=[m],o([l()],t.prototype,"name",2),o([l()],t.prototype,"value",1),o([l({reflect:!0})],t.prototype,"label",2),o([l({})],t.prototype,"placeholder",2),o([l({type:String,reflect:!0})],t.prototype,"size",2),o([l({type:Boolean,reflect:!0})],t.prototype,"required",2),o([l({type:Boolean,reflect:!0})],t.prototype,"disabled",2),o([l({type:Boolean})],t.prototype,"multiple",2),o([l({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),o([l({type:Boolean,attribute:"label-fixed",reflect:!0})],t.prototype,"labelFixed",2),o([l({type:String,attribute:"help-text"})],t.prototype,"helpText",2),o([l({type:String,attribute:"invalid-text"})],t.prototype,"customInvalidText",2),o([r()],t.prototype,"_isPopoverOpen",2),o([r()],t.prototype,"_additionalSelectedOptionCount",2),o([a(".selected-options")],t.prototype,"selectedOptionsContainer",2),o([v(".selected-options li")],t.prototype,"selectedOptionsItems",2),o([a(".popover")],t.prototype,"_popover",2),o([a(".select-input")],t.prototype,"_selectInput",2),o([h("bl-select")],t.prototype,"_onBlSelect",2),o([r()],t.prototype,"_selectedOptions",2),o([r()],t.prototype,"dirty",2),o([a(".select-input")],t.prototype,"validationTarget",2),t=o([u("bl-select")],t);export{t as a};
43
- //# sourceMappingURL=chunk-TJKKAO25.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/components/select/bl-select.css", "../src/components/select/bl-select.ts"],
4
- "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;display:flex;flex-direction:column;gap:var(--bl-size-3xs);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--background-color:var(--bl-color-primary-background);--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--z-index:100;--menu-height:250px;--popover-position:var(--bl-popover-position,fixed)}:host([size='large']) .select-wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size='small']) .select-wrapper{--height:var(--bl-size-xl);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-xs);--font-size:var(--bl-font-size-s)}:host([disabled]) .select-wrapper{--placeholder-color:var(--bl-color-content-passive)}.dirty.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-hover);--label-color:var(--bl-color-danger)}.select-input{display:flex;align-items:center;justify-content:space-between;cursor:pointer;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 var(--padding-horizontal);border-radius:var(--bl-border-radius-s);color:var(--text-color);-webkit-user-select:none;user-select:none}.placeholder{color:var(--placeholder-color);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.select-wrapper.selected .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}.remove-all{display:none}.remove-all::after{content:'';position:absolute;left:1.5rem;bottom:4px;height:1rem;border-left:1px solid var(--bl-color-border)}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-secondary)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-content-passive)}.select-open .select-input,.select-input:focus-visible{border:solid 1px var(--border-focus-color);outline:0}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{flex:1;padding:0;margin:0;list-style:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selected-options li{display:inline;font-size:var(--font-size);color:var(--text-color)}.selected-options li:not(:last-child)::after{content:', '}.select-input:not(.has-overflowed-options) .additional-selection-count{display:none}:host([disabled]) .selected-options li{color:var(--bl-color-content-passive)}.select-input .actions{display:flex;align-items:center;justify-content:center;gap:var(--bl-size-2xs);margin-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--z-index);width:100%;top:var(--top);left:var(--left)}.select-open .popover{display:flex;border:solid 1px var(--border-focus-color)}bl-icon{color:var(--icon-color)}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));max-width:max-content;transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial;right:var(--padding-horizontal)}:host([label-fixed]) label{position:static;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color)}.hint{display:none;font:var(--bl-font-body-text-3)}.hint p{padding:0;margin:0}.error-icon,.invalid-text{display:none}.dirty.invalid label,.invalid-text,.error-icon{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}:host([help-text]) .hint,.dirty.invalid .hint{display:block}.dirty.invalid .invalid-text{display:block}.dirty.invalid .help-text{display:none}`;\nexport default styles;\n", "import { autoUpdate, computePosition, flip, MiddlewareArguments, offset, size } from '@floating-ui/dom';\nimport { FormControlMixin, requiredValidator } from '@open-wc/form-control';\nimport { FormValue } from '@open-wc/form-helpers';\nimport 'element-internals-polyfill';\nimport { CSSResultGroup, html, LitElement, PropertyValues } from 'lit';\nimport { customElement, property, query, queryAll, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../icon/bl-icon';\nimport style from '../select/bl-select.css';\nimport '../select/option/bl-select-option';\nimport type BlSelectOption from './option/bl-select-option';\n\nexport interface ISelectOption<T> {\n value: T;\n text: string;\n selected: boolean;\n}\n\nexport type SelectSize = 'medium' | 'large' | 'small';\n\nexport type CleanUpFunction = () => void;\n\n\n/**\n * @tag bl-select\n * @summary Baklava Select component\n *\n * @cssproperty --bl-popover-position - Sets the positioning strategy of select popover. You can set it as `absolute` if you need to show popover relative to its trigger element. Default value is `fixed`\n */\n@customElement('bl-select')\nexport default class BlSelect<ValueType extends FormValue = string> extends FormControlMixin(LitElement) {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n static formControlValidators = [requiredValidator];\n\n /**\n * Sets name of the select field\n */\n @property()\n name: string;\n\n private _value: ValueType | ValueType[] | null;\n\n private _initialValue: ValueType | ValueType[] | null;\n\n /**\n * Sets the value of the select\n */\n @property()\n get value(): ValueType | ValueType[] | null {\n return this._value;\n }\n\n set value(val: ValueType | ValueType[] | null) {\n this._value = val;\n\n if (Array.isArray(val)) {\n const formData = new FormData();\n val.forEach((option) => formData.append(this.name, `${option}`));\n this.setValue(formData);\n } else {\n this.setValue(val);\n }\n\n this.setOptionsSelected();\n }\n\n shouldFormValueUpdate(): boolean {\n return this.value !== null && this.value !== '';\n }\n\n /* Declare reactive properties */\n /**\n * Sets the label value\n */\n @property({ reflect: true })\n label?: string;\n\n /**\n * Sets the placeholder value. If left blank, the label value (if specified) is set as placeholder.\n */\n @property({})\n placeholder?: string;\n\n /**\n * Sets the size value. Select component's height value will be changed accordingly\n */\n @property({ type: String, reflect: true })\n size: SelectSize = 'medium';\n\n /**\n * When option is not selected, shows component in error state\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * Shows the component in disabled state.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Allows multiple options to be selected\n */\n @property({ type: Boolean })\n multiple = false;\n\n /**\n * Sets input to get keyboard focus automatically\n */\n @property({ type: Boolean, reflect: true })\n autofocus = false;\n\n /**\n * Makes label as fixed positioned\n */\n @property({ type: Boolean, attribute: 'label-fixed', reflect: true })\n labelFixed = false;\n\n /**\n * Adds help text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText?: string;\n\n /**\n * Set custom error message\n */\n @property({ type: String, attribute: 'invalid-text' })\n customInvalidText?: string;\n\n /* Declare internal reactive properties */\n @state()\n private _isPopoverOpen = false;\n\n\n @state()\n private _additionalSelectedOptionCount = 0;\n\n @query('.selected-options')\n private selectedOptionsContainer!: HTMLElement;\n\n @queryAll('.selected-options li')\n private selectedOptionsItems!: NodeListOf<HTMLElement>;\n\n @query('.popover')\n private _popover: HTMLElement;\n\n @query('.select-input')\n private _selectInput: HTMLElement;\n\n /**\n * Fires when selection changes\n */\n @event('bl-select') private _onBlSelect: EventDispatcher<ISelectOption<ValueType>[]>;\n\n private _connectedOptions: BlSelectOption<ValueType>[] = [];\n\n private _cleanUpPopover: CleanUpFunction | null = null;\n\n private setOptionsSelected() {\n this._connectedOptions\n .forEach(\n (option) => option.selected = (\n this.value === option.value ||\n (Array.isArray(this.value) && this.value.includes(option.value))\n )\n );\n\n this._selectedOptions = [...this.options\n .filter(option => option.selected)\n ];\n }\n\n get options() {\n return this._connectedOptions;\n }\n\n get opened() {\n return this._isPopoverOpen;\n }\n\n @state()\n private _selectedOptions: BlSelectOption<ValueType>[] = [];\n\n @state()\n private dirty = false;\n\n get selectedOptions(): BlSelectOption<ValueType>[] {\n return this._selectedOptions;\n }\n\n get additionalSelectedOptionCount() {\n return this._additionalSelectedOptionCount;\n }\n\n validityCallback(): string | void {\n if (this.customInvalidText) {\n return this.customInvalidText;\n }\n const select = document.createElement('select');\n select.required = this.required;\n\n return select.validationMessage;\n }\n\n reportValidity() {\n this.dirty = true;\n return this.checkValidity();\n }\n\n resetFormControl(): void {\n this.value = this._initialValue;\n }\n\n @query('.select-input')\n validationTarget: HTMLElement;\n\n open() {\n this._isPopoverOpen = true;\n this._setupPopover();\n document.addEventListener('click', this._interactOutsideHandler, true);\n document.addEventListener('focus', this._interactOutsideHandler, true);\n }\n\n close() {\n this._isPopoverOpen = false;\n this.focusedOptionIndex = -1;\n this._cleanUpPopover && this._cleanUpPopover();\n document.removeEventListener('click', this._interactOutsideHandler, true);\n document.removeEventListener('focus', this._interactOutsideHandler, true);\n }\n\n private _interactOutsideHandler = (event: MouseEvent | FocusEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath?.find(el => el.tagName === 'BL-SELECT')?.contains(this)) {\n this.close();\n }\n };\n\n private _setupPopover() {\n this._cleanUpPopover = autoUpdate(this._selectInput, this._popover, () => {\n computePosition(this._selectInput, this._popover, {\n placement: 'bottom',\n strategy: 'fixed',\n middleware: [\n flip(),\n offset(8),\n size({\n apply(args: MiddlewareArguments) {\n Object.assign(args.elements.floating.style, {\n width: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n },\n }),\n ],\n }).then(({ x, y }) => {\n this._popover.style.setProperty('--left', `${x}px`);\n this._popover.style.setProperty('--top', `${y}px`);\n });\n });\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.form?.addEventListener('submit', (e: SubmitEvent) => {\n if (!this.reportValidity()) {\n e.preventDefault();\n }\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this._cleanUpPopover && this._cleanUpPopover();\n }\n\n private inputTemplate() {\n const inputSelectedOptions = html`<ul class=\"selected-options\">\n ${this._selectedOptions.map(item => html`<li>${item.textContent}</li>`)}\n </ul>`;\n const removeButton = html`<bl-button\n class=\"remove-all\"\n size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"close\"\n @click=${this._onClickRemove}></bl-button>`;\n\n return html`<div\n class=${classMap({\n 'select-input': true,\n 'has-overflowed-options': this._additionalSelectedOptionCount > 0\n })}\n tabindex=\"${this.disabled ? '-1' : 0}\"\n ?autofocus=${this.autofocus}\n @click=${this.togglePopover}\n >\n <span class=\"placeholder\">${this.placeholder}</span>\n ${inputSelectedOptions}\n <span class=\"additional-selection-count\">+${this._additionalSelectedOptionCount}</span>\n <div class=\"actions\">\n ${this.multiple ? removeButton : null}\n <bl-icon\n class=\"dropdown-icon open\"\n name=\"arrow_up\"\n ></bl-icon>\n\n <bl-icon\n class=\"dropdown-icon closed\"\n name=\"arrow_down\"\n ></bl-icon>\n </div>\n </div>`;\n }\n\n render() {\n const invalidMessage = !this.checkValidity()\n ? html`<p id=\"errorMessage\" aria-live=\"polite\" class=\"invalid-text\">\n ${this.validationMessage}\n </p>`: '';\n\n const helpMessage = this.helpText && !invalidMessage\n ? html`<p class=\"help-text\">${this.helpText}</p>` : '';\n\n const label = this.label\n ? html`<label>${this.label}</label>` : '';\n\n return html`<div\n class=${classMap({\n 'select-wrapper': true,\n 'select-open': this.opened,\n 'selected': this._selectedOptions.length > 0,\n 'invalid': !this.validity.valid,\n 'dirty': this.dirty\n })}\n @keydown=${this.handleKeydown}\n >\n ${label}\n ${this.inputTemplate()}\n <div class=\"popover\" tabindex=\"${ifDefined(this._isPopoverOpen ? undefined : '-1')}\" @bl-select-option=${this._handleSelectOptionEvent}>\n <slot></slot>\n </div>\n <div class=\"hint\">${invalidMessage} ${helpMessage}</div>\n </div> `;\n }\n\n private focusedOptionIndex = -1;\n\n private handleKeydown(event: KeyboardEvent) {\n if (this.focusedOptionIndex === -1 && ['Enter', 'Space'].includes(event.code)) {\n this.togglePopover();\n event.preventDefault();\n } else if (this._isPopoverOpen === false && ['ArrowDown', 'ArrowUp'].includes(event.code)) {\n this.open();\n event.preventDefault();\n } else if (event.code === 'Escape') {\n this.close();\n event.preventDefault();\n } else if (this._isPopoverOpen && ['ArrowDown', 'ArrowUp'].includes(event.code)) {\n event.code === 'ArrowDown' && this.focusedOptionIndex++;\n event.code === 'ArrowUp' && this.focusedOptionIndex--;\n\n // Don't exceed array indexes\n this.focusedOptionIndex = Math.max(\n 0,\n Math.min(this.focusedOptionIndex, this.options.length - 1)\n );\n\n this.options[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n }\n\n }\n\n private togglePopover() {\n this._isPopoverOpen ? this.close() : this.open();\n }\n\n private _handleSelectEvent() {\n this._onBlSelect(this._selectedOptions.map(option => ({\n value: option.value,\n selected: option.selected,\n text: option.textContent\n } as ISelectOption<ValueType>)));\n }\n\n private _handleSingleSelect(optionItem: BlSelectOption<ValueType>) {\n this.value = optionItem.value;\n\n this._handleSelectEvent();\n this._isPopoverOpen = false;\n }\n\n private _handleMultipleSelect() {\n this.value = this._connectedOptions.filter((option) => option.selected).map(option => option.value);\n\n this._handleSelectEvent();\n }\n\n private _handleSelectOptionEvent(e: CustomEvent) {\n const optionItem = e.target as BlSelectOption<ValueType>;\n this.dirty = true;\n\n if (this.multiple) {\n this._handleMultipleSelect();\n } else {\n this._handleSingleSelect(optionItem);\n }\n }\n\n private _onClickRemove(e: MouseEvent) {\n e.stopPropagation();\n\n this._connectedOptions\n .filter(option => option.selected)\n .forEach(option => {\n option.selected = false;\n });\n\n this.value = null;\n this._additionalSelectedOptionCount = 0;\n this._handleSelectEvent();\n }\n\n private _checkAdditionalItemCount() {\n if (!this.multiple || !this.selectedOptionsItems || this.selectedOptionsItems.length < 2) {\n this._additionalSelectedOptionCount = 0;\n return;\n }\n\n const firstNonVisibleItemIndex = [...this.selectedOptionsItems]\n .findIndex((item) => item.offsetLeft > this.selectedOptionsContainer.offsetWidth);\n\n if (firstNonVisibleItemIndex > -1) {\n this._additionalSelectedOptionCount = this.selectedOptionsItems.length - firstNonVisibleItemIndex;\n } else {\n this._additionalSelectedOptionCount = 0;\n }\n }\n\n protected firstUpdated(): void {\n if (this.value === undefined) {\n this.value = '' as ValueType;\n }\n\n this._initialValue = this._value;\n }\n\n protected updated(_changedProperties: PropertyValues) {\n if (\n _changedProperties.has('multiple') &&\n typeof _changedProperties.get('multiple') === 'boolean'\n ) {\n this.value = null;\n }\n\n this._checkAdditionalItemCount();\n }\n\n /**\n * This method is used by `bl-select-option` component to register itself to bl-select.\n * @param option BlSelectOption reference to be registered\n */\n registerOption(option: BlSelectOption<ValueType>) {\n this._connectedOptions.push(option);\n\n if (option.selected) {\n if (this.multiple) {\n if (!Array.isArray(this.value)) {\n this.value = [];\n }\n this.value = [...this.value, option.value];\n } else {\n this.value = option.value;\n }\n }\n\n this.setOptionsSelected();\n this.requestUpdate();\n }\n\n /**\n * This method is used by `bl-select-option` component to unregister itself from bl-select.\n * @param option BlSelectOption reference to be unregistered\n */\n unregisterOption(option: BlSelectOption<ValueType>) {\n this._connectedOptions.splice(this._connectedOptions.indexOf(option), 1);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-select': BlSelect;\n }\n}\n"],
5
- "mappings": "6YACO,IAAMA,EAASC,kkKACfC,EAAQF,EC8Bf,IAAqBG,EAArB,cAA4EC,EAAiBC,CAAU,CAAE,CAAzG,kCA4DE,UAAmB,SAMnB,cAAW,GAMX,cAAW,GAMX,cAAW,GAMX,eAAY,GAMZ,gBAAa,GAgBb,KAAQ,eAAiB,GAIzB,KAAQ,+BAAiC,EAmBzC,KAAQ,kBAAiD,CAAC,EAE1D,KAAQ,gBAA0C,KAyBlD,KAAQ,iBAAgD,CAAC,EAGzD,KAAQ,MAAQ,GA+ChB,KAAQ,wBAA2BC,GAAmC,CA9OxE,IAAAC,EA+OI,IAAMC,EAAYF,EAAM,aAAa,GAEhCC,EAAAC,GAAA,YAAAA,EAAW,KAAKC,GAAMA,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AM,QAAS,QAAS,EAAK,CAAC,GAnFvBpB,EAoFnB,yBAMAiC,EAAA,CADCb,EAAS,CAAE,KAAM,QAAS,UAAW,cAAe,QAAS,EAAK,CAAC,GAzFjDpB,EA0FnB,0BAMAiC,EAAA,CADCb,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,GA/F/BpB,EAgGnB,wBAMAiC,EAAA,CADCb,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,GArGlCpB,EAsGnB,iCAIQiC,EAAA,CADPC,EAAM,GAzGYlC,EA0GX,8BAIAiC,EAAA,CADPC,EAAM,GA7GYlC,EA8GX,8CAGAiC,EAAA,CADPE,EAAM,mBAAmB,GAhHPnC,EAiHX,wCAGAiC,EAAA,CADPb,EAAS,sBAAsB,GAnHbpB,EAoHX,oCAGAiC,EAAA,CADPE,EAAM,UAAU,GAtHEnC,EAuHX,wBAGAiC,EAAA,CADPE,EAAM,eAAe,GAzHHnC,EA0HX,4BAKoBiC,EAAA,CAA3B9B,EAAM,WAAW,GA/HCH,EA+HS,2BA6BpBiC,EAAA,CADPC,EAAM,GA3JYlC,EA4JX,gCAGAiC,EAAA,CADPC,EAAM,GA9JYlC,EA+JX,qBA8BRiC,EAAA,CADCE,EAAM,eAAe,GA5LHnC,EA6LnB,gCA7LmBA,EAArBiC,EAAA,CADCb,EAAc,WAAW,GACLpB",
6
- "names": ["styles", "i", "bl_select_default", "BlSelect", "FormControlMixin", "s", "event", "_a", "eventPath", "el", "bl_select_default", "val", "formData", "option", "select", "P", "z", "b", "O", "k", "args", "x", "y", "e", "inputSelectedOptions", "item", "removeButton", "o", "invalidMessage", "helpMessage", "label", "l", "optionItem", "firstNonVisibleItemIndex", "_changedProperties", "requiredValidator", "__decorateClass", "t", "i"]
7
- }
@@ -1,21 +0,0 @@
1
- import{a as h}from"./chunk-KQBXYF3J.js";import{b as y,d as g,f as k,g as w,h as x}from"./chunk-ANYJUR6Q.js";import{a as f}from"./chunk-OLPYXE2P.js";import{a as l}from"./chunk-KPAWUBRO.js";import{a as s}from"./chunk-23UFIOHV.js";import{a,b as d,f as c,g as u,h as r,i as b,j as n}from"./chunk-57PTZNIL.js";import{a as e}from"./chunk-NZ3RGSR6.js";var O=a`:host{position:relative;display:inline-block}.popover{--left:0;--top:0;--border-color:var(--bl-color-primary);position:fixed;z-index:1;display:none;flex-direction:column;align-items:flex-start;padding:var(--bl-size-m);gap:var(--bl-size-xs);overflow-y:auto;background:var(--bl-color-primary-background);border:1px solid var(--border-color);box-shadow:0 10px 15px -8px #27314226;border-radius:var(--bl-size-3xs);left:var(--left);top:var(--top);box-sizing:border-box}:host([kind='neutral']) .popover{--border-color:var(--bl-color-secondary)}:host([kind='success']) .popover{--border-color:var(--bl-color-success)}:host([kind='danger']) .popover{--border-color:var(--bl-color-danger)}.visible{display:flex}`,_=O;var m="bl-dropdown",t=class extends c{constructor(){super(...arguments);this._cleanUpPopover=null;this._isPopoverOpen=!1;this.label="Dropdown Button";this.variant="primary";this.kind="default";this.size="medium";this.disabled=!1;this._handleClickOutside=o=>{let p=o.composedPath();!p.includes(this._popover)&&!p.includes(this._dropdownButton)&&this.close()};this.focusedOptionIndex=-1}static get styles(){return[_]}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this._cleanUpPopover&&this._cleanUpPopover(),this.removeEventListener("keydown",this.handleKeyDown)}get opened(){return this._isPopoverOpen}_handleClick(){!this._isPopoverOpen&&!this.disabled?this.open():this.close()}_setupPopover(){this._cleanUpPopover=w(this._dropdownButton,this._popover,()=>{x(this._dropdownButton,this._popover,{placement:"bottom-start",strategy:"fixed",middleware:[y(),g(8),k({apply(o){Object.assign(o.elements.floating.style,{minWidth:`${o.elements.reference.getBoundingClientRect().width}px`})}})]}).then(({x:o,y:p})=>{this._popover.style.setProperty("--left",`${o}px`),this._popover.style.setProperty("--top",`${p}px`)})})}handleKeyDown(o){if(["ArrowDown","ArrowRight"].includes(o.key))this.focusedOptionIndex++;else if(["ArrowUp","ArrowLeft"].includes(o.key))this.focusedOptionIndex--;else if(o.key==="Escape"){this.focusedOptionIndex=-1,this.close();return}else return;this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,this.options.length-1)),this.options[this.focusedOptionIndex].focus(),o.preventDefault()}get options(){return[].slice.call(this.querySelectorAll(v))}open(){this._isPopoverOpen=!0,this._setupPopover(),this.onOpen("Dropdown opened!"),document.addEventListener("click",this._handleClickOutside)}close(){this._isPopoverOpen=!1,this.onClose("Dropdown closed!"),this._cleanUpPopover&&this._cleanUpPopover(),document.removeEventListener("click",this._handleClickOutside)}render(){let o=f({popover:!0,visible:this.opened});return d`<bl-button
2
- dropdown
3
- .active=${this.opened}
4
- ?disabled=${l(this.disabled)}
5
- variant="${this.variant}"
6
- kind="${this.kind}"
7
- size="${this.size}"
8
- aria-label="${l(this.label)}"
9
- @bl-click="${this._handleClick}"
10
- >
11
- ${this.label}
12
- </bl-button>
13
- <div class="${o}" role="menu" aria-expanded="${this.opened}"><slot></slot></div> `}};e([n("bl-button")],t.prototype,"_dropdownButton",2),e([n(".popover")],t.prototype,"_popover",2),e([b()],t.prototype,"_isPopoverOpen",2),e([r({type:String,reflect:!0})],t.prototype,"label",2),e([r({type:String,reflect:!0})],t.prototype,"variant",2),e([r({type:String,reflect:!0})],t.prototype,"kind",2),e([r({type:String,reflect:!0})],t.prototype,"size",2),e([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([s("bl-dropdown-open")],t.prototype,"onOpen",2),e([s("bl-dropdown-close")],t.prototype,"onClose",2),t=e([u(m)],t);var P=a`:host{width:100%;--bl-button-display:block;--bl-button-justify:start}`,C=P;var v="bl-dropdown-item",i=class extends c{static get styles(){return[C]}_handleClick(){this.onClick("Action clicked!")}focus(){this.menuElement.focus()}connectedCallback(){super.connectedCallback(),this.BlDropdownGroupField=this.closest(h),this.BlDropdownField=this.closest(m),!this.BlDropdownField&&!this.BlDropdownGroupField&&console.warn(`bl-dropdown-item is designed to be used inside a ${h} or ${m}`,this)}disconnectedCallback(){super.disconnectedCallback()}render(){return d`<bl-button
14
- variant="tertiary"
15
- kind="neutral"
16
- icon="${l(this.icon)}"
17
- role="menuitem"
18
- @click="${this._handleClick}"
19
- ><slot></slot>
20
- </bl-button>`}};e([r({type:String})],i.prototype,"icon",2),e([s("bl-dropdown-item-click")],i.prototype,"onClick",2),e([n("[role=menuitem]")],i.prototype,"menuElement",2),i=e([u(v)],i);export{v as a,i as b,m as c,t as d};
21
- //# sourceMappingURL=chunk-VB5RPJV3.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/components/dropdown/bl-dropdown.css", "../src/components/dropdown/bl-dropdown.ts", "../src/components/dropdown/item/bl-dropdown-item.css", "../src/components/dropdown/item/bl-dropdown-item.ts"],
4
- "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{position:relative;display:inline-block}.popover{--left:0;--top:0;--border-color:var(--bl-color-primary);position:fixed;z-index:1;display:none;flex-direction:column;align-items:flex-start;padding:var(--bl-size-m);gap:var(--bl-size-xs);overflow-y:auto;background:var(--bl-color-primary-background);border:1px solid var(--border-color);box-shadow:0 10px 15px -8px #27314226;border-radius:var(--bl-size-3xs);left:var(--left);top:var(--top);box-sizing:border-box}:host([kind='neutral']) .popover{--border-color:var(--bl-color-secondary)}:host([kind='success']) .popover{--border-color:var(--bl-color-success)}:host([kind='danger']) .popover{--border-color:var(--bl-color-danger)}.visible{display:flex}`;\nexport default styles;\n", "import { LitElement, html, CSSResultGroup, TemplateResult } from 'lit';\nimport { customElement, property, state, query } from 'lit/decorators.js';\nimport {\n computePosition,\n flip,\n offset,\n autoUpdate,\n size,\n MiddlewareArguments,\n} from '@floating-ui/dom';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport style from './bl-dropdown.css';\n\nimport '../button/bl-button';\nimport { ButtonSize, ButtonVariant, ButtonKind } from '../button/bl-button';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\nimport BlDropdownItem, { blDropdownItemTag } from './item/bl-dropdown-item';\n\nexport type CleanUpFunction = () => void;\n\nexport const blDropdownTag = 'bl-dropdown';\n\n/**\n * @tag bl-dropdown\n * @summary Baklava Dropdown component\n */\n@customElement(blDropdownTag)\nexport default class BlDropdown extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @query('bl-button')\n private _dropdownButton: HTMLElement;\n\n @query('.popover')\n private _popover: HTMLElement;\n\n private _cleanUpPopover: CleanUpFunction | null = null;\n\n @state() private _isPopoverOpen = false;\n\n /**\n * Sets the dropdown button label\n */\n @property({ type: String, reflect: true })\n label = 'Dropdown Button';\n\n /**\n * Sets the dropdown button variant\n */\n @property({ type: String, reflect: true })\n variant: ButtonVariant = 'primary';\n\n /**\n * Sets the dropdown button kind\n */\n @property({ type: String, reflect: true })\n kind: ButtonKind = 'default';\n\n /**\n * Sets the dropdown button size\n */\n @property({ type: String, reflect: true })\n size: ButtonSize = 'medium';\n\n /**\n * Sets button as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Fires when dropdown opened\n */\n @event('bl-dropdown-open') private onOpen: EventDispatcher<string>;\n\n /**\n * Fires when dropdown closed\n */\n @event('bl-dropdown-close') private onClose: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('keydown', this.handleKeyDown);\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this._cleanUpPopover && this._cleanUpPopover();\n this.removeEventListener('keydown', this.handleKeyDown);\n }\n\n get opened() {\n return this._isPopoverOpen;\n }\n\n private _handleClick() {\n !this._isPopoverOpen && !this.disabled ? this.open() : this.close();\n }\n\n private _handleClickOutside = (event: MouseEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n if (!eventPath.includes(this._popover) && !eventPath.includes(this._dropdownButton)) {\n this.close();\n }\n };\n\n private _setupPopover() {\n this._cleanUpPopover = autoUpdate(this._dropdownButton, this._popover, () => {\n computePosition(this._dropdownButton, this._popover, {\n placement: 'bottom-start',\n strategy: 'fixed',\n middleware: [\n flip(),\n offset(8),\n size({\n apply(args: MiddlewareArguments) {\n Object.assign(args.elements.floating.style, {\n minWidth: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n },\n }),\n ],\n }).then(({ x, y }) => {\n this._popover.style.setProperty('--left', `${x}px`);\n this._popover.style.setProperty('--top', `${y}px`);\n });\n });\n }\n\n private focusedOptionIndex = -1;\n\n private handleKeyDown(event: KeyboardEvent) {\n // Next action\n if (['ArrowDown', 'ArrowRight'].includes(event.key)) {\n this.focusedOptionIndex++;\n\n // Previous action\n } else if (['ArrowUp', 'ArrowLeft'].includes(event.key)) {\n this.focusedOptionIndex--;\n // Select action\n } else if (event.key === 'Escape') {\n this.focusedOptionIndex = -1;\n this.close()\n return;\n } else {\n // Other keys are not our interest here\n return;\n }\n\n // Don't exceed array indexes\n this.focusedOptionIndex = Math.max(\n 0,\n Math.min(this.focusedOptionIndex, this.options.length - 1)\n );\n\n this.options[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n }\n\n get options(): BlDropdownItem[] {\n return [].slice.call(this.querySelectorAll(blDropdownItemTag));\n }\n\n open() {\n this._isPopoverOpen = true;\n this._setupPopover();\n this.onOpen('Dropdown opened!');\n document.addEventListener('click', this._handleClickOutside);\n }\n\n close() {\n this._isPopoverOpen = false;\n this.onClose('Dropdown closed!');\n this._cleanUpPopover && this._cleanUpPopover();\n document.removeEventListener('click', this._handleClickOutside);\n }\n\n render(): TemplateResult {\n const popoverClasses = classMap({\n popover: true,\n visible: this.opened,\n });\n\n return html`<bl-button\n dropdown\n .active=${this.opened}\n ?disabled=${ifDefined(this.disabled)}\n variant=\"${this.variant}\"\n kind=\"${this.kind}\"\n size=\"${this.size}\"\n aria-label=\"${ifDefined(this.label)}\"\n @bl-click=\"${this._handleClick}\"\n >\n ${this.label}\n </bl-button>\n <div class=\"${popoverClasses}\" role=\"menu\" aria-expanded=\"${this.opened}\"><slot></slot></div> `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blDropdownTag]: BlDropdown;\n }\n}\n", "import {css} from 'lit';\nexport const styles = css`:host{width:100%;--bl-button-display:block;--bl-button-justify:start}`;\nexport default styles;\n", "import { LitElement, html, CSSResultGroup, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { event, EventDispatcher } from '../../../utilities/event';\nimport type BlDropdownGroup from '../group/bl-dropdown-group';\nimport type BlDropdown from '../bl-dropdown';\n\nimport { blDropdownGroupTag } from '../group/bl-dropdown-group';\nimport { blDropdownTag } from '../bl-dropdown';\n\nimport style from './bl-dropdown-item.css';\n\nimport '../../button/bl-button';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport BlButton from '../../button/bl-button';\n\nexport const blDropdownItemTag = 'bl-dropdown-item';\n\n/**\n * @tag bl-dropdown-item\n * @summary Baklava Dropdown Item component\n */\n@customElement(blDropdownItemTag)\nexport default class BlDropdownItem extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the icon name. Shows icon with bl-icon component\n */\n\n @property({ type: String })\n icon?: string;\n\n @event('bl-dropdown-item-click') private onClick: EventDispatcher<string>;\n\n private _handleClick() {\n this.onClick('Action clicked!');\n }\n\n @query('[role=menuitem]') private menuElement: BlButton;\n\n /**\n * Focuses this action\n */\n focus() {\n this.menuElement.focus();\n }\n\n private BlDropdownGroupField: BlDropdownGroup | null;\n private BlDropdownField: BlDropdown | null;\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.BlDropdownGroupField = this.closest<BlDropdownGroup>(blDropdownGroupTag);\n this.BlDropdownField = this.closest<BlDropdown>(blDropdownTag);\n\n if (!this.BlDropdownField && !this.BlDropdownGroupField) {\n console.warn(`bl-dropdown-item is designed to be used inside a ${blDropdownGroupTag} or ${blDropdownTag}`, this);\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n }\n\n render(): TemplateResult {\n return html`<bl-button\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"${ifDefined(this.icon)}\"\n role=\"menuitem\"\n @click=\"${this._handleClick}\"\n ><slot></slot>\n </bl-button>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blDropdownItemTag]: BlDropdownItem;\n }\n}\n"],
5
- "mappings": "yVACO,IAAMA,EAASC,ksBACfC,EAAQF,ECqBR,IAAMG,EAAgB,cAORC,EAArB,cAAwCC,CAAW,CAAnD,kCAWE,KAAQ,gBAA0C,KAEzC,KAAQ,eAAiB,GAMlC,WAAQ,kBAMR,aAAyB,UAMzB,UAAmB,UAMnB,UAAmB,SAMnB,cAAW,GA+BX,KAAQ,oBAAuBC,GAAsB,CACnD,IAAMC,EAAYD,EAAM,aAAa,EACjC,CAACC,EAAU,SAAS,KAAK,QAAQ,GAAK,CAACA,EAAU,SAAS,KAAK,eAAe,GAChF,KAAK,MAAM,CAEf,EAyBA,KAAQ,mBAAqB,GAvG7B,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAoDA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,KAAK,iBAAiB,UAAW,KAAK,aAAa,CACrD,CACA,sBAAuB,CACrB,MAAM,qBAAqB,EAE3B,KAAK,iBAAmB,KAAK,gBAAgB,EAC7C,KAAK,oBAAoB,UAAW,KAAK,aAAa,CACxD,CAEA,IAAI,QAAS,CACX,OAAO,KAAK,cACd,CAEQ,cAAe,CACrB,CAAC,KAAK,gBAAkB,CAAC,KAAK,SAAW,KAAK,KAAK,EAAI,KAAK,MAAM,CACpE,CASQ,eAAgB,CACtB,KAAK,gBAAkBC,EAAW,KAAK,gBAAiB,KAAK,SAAU,IAAM,CAC3EC,EAAgB,KAAK,gBAAiB,KAAK,SAAU,CACnD,UAAW,eACX,SAAU,QACV,WAAY,CACVC,EAAK,EACLC,EAAO,CAAC,EACR,EAAK,CACH,MAAMC,EAA2B,CAC/B,OAAO,OAAOA,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CAAC,KAAK,sBACjC,QAAQ,KAAK,oDAAoDD,QAAyBC,IAAiB,IAAI,CAEnH,CAEA,sBAA6B,CAC3B,MAAM,qBAAqB,CAC7B,CAEA,QAAyB,CACvB,OAAOC;AAAA;AAAA;AAAA,cAGG,EAAU,KAAK,IAAI;AAAA;AAAA,gBAEjB,KAAK;AAAA;AAAA,iBAGnB,CACF,EA7CEC,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GATPP,EAUnB,oBAEyCM,EAAA,CAAxCE,EAAM,wBAAwB,GAZZR,EAYsB,uBAMPM,EAAA,CAAjCG,EAAM,iBAAiB,GAlBLT,EAkBe,2BAlBfA,EAArBM,EAAA,CADCC,EAAcR,CAAiB,GACXC",
6
- "names": ["styles", "i", "bl_dropdown_default", "blDropdownTag", "BlDropdown", "s", "event", "eventPath", "bl_dropdown_default", "P", "z", "b", "O", "args", "x", "y", "blDropdownItemTag", "popoverClasses", "o", "__decorateClass", "i", "t", "e", "styles", "i", "bl_dropdown_item_default", "blDropdownItemTag", "BlDropdownItem", "s", "bl_dropdown_item_default", "blDropdownGroupTag", "blDropdownTag", "y", "__decorateClass", "e", "event", "i"]
7
- }