@trendyol/baklava 2.4.0-beta.1 → 2.4.0-beta.11

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 (142) hide show
  1. package/dist/baklava-react.d.ts +24 -1
  2. package/dist/baklava-react.d.ts.map +1 -1
  3. package/dist/baklava-react.js +1 -1
  4. package/dist/baklava-react.js.map +3 -3
  5. package/dist/baklava-vue.d.ts +2 -0
  6. package/dist/baklava.d.ts +2 -0
  7. package/dist/baklava.d.ts.map +1 -1
  8. package/dist/baklava.js +1 -1
  9. package/dist/{chunk-SX5PCXCH.js → chunk-5EFPA3CA.js} +2 -2
  10. package/dist/chunk-5EFPA3CA.js.map +7 -0
  11. package/dist/{chunk-RD3RUK2N.js → chunk-6UTBN2XX.js} +2 -2
  12. package/dist/chunk-7QGSFS64.js +16 -0
  13. package/dist/chunk-7QGSFS64.js.map +7 -0
  14. package/dist/chunk-AAGDUS7G.js +11 -0
  15. package/dist/chunk-AAGDUS7G.js.map +7 -0
  16. package/dist/chunk-AMAOGVPQ.js +106 -0
  17. package/dist/chunk-AMAOGVPQ.js.map +7 -0
  18. package/dist/{chunk-6F253HWQ.js → chunk-AVMAZXZT.js} +2 -2
  19. package/dist/chunk-AYJMIZZ3.js +11 -0
  20. package/dist/{chunk-YOV2DMM7.js.map → chunk-AYJMIZZ3.js.map} +4 -4
  21. package/dist/chunk-BEGAFK2I.js +18 -0
  22. package/dist/chunk-BEGAFK2I.js.map +7 -0
  23. package/dist/chunk-CYCIT2TG.js +2 -0
  24. package/dist/chunk-ECPWEUBG.js +2 -0
  25. package/dist/chunk-ECPWEUBG.js.map +7 -0
  26. package/dist/{chunk-VGRVU3IL.js → chunk-EPFBV6RC.js} +2 -2
  27. package/dist/chunk-EPFBV6RC.js.map +7 -0
  28. package/dist/{chunk-OQ22A5U6.js → chunk-FJTTJ5ZT.js} +2 -2
  29. package/dist/{chunk-2HHDYA7P.js → chunk-FSFO7DCO.js} +2 -2
  30. package/dist/{chunk-LDNUCSUE.js → chunk-JI2OEPG2.js} +2 -2
  31. package/dist/{chunk-RMYPWPMS.js → chunk-KR6AUZ77.js} +2 -2
  32. package/dist/{chunk-4CK6AU4F.js → chunk-KXWP6EDU.js} +2 -2
  33. package/dist/{chunk-5PMB453Q.js → chunk-L4XYDFNG.js} +2 -2
  34. package/dist/{chunk-GYWKNHAH.js → chunk-LWG2UXQG.js} +2 -2
  35. package/dist/{chunk-FAMBVSX3.js → chunk-MNNOI75G.js} +2 -2
  36. package/dist/chunk-MPKYBU46.js +33 -0
  37. package/dist/chunk-MPKYBU46.js.map +7 -0
  38. package/dist/chunk-PCREGBBF.js +7 -0
  39. package/dist/chunk-PCREGBBF.js.map +7 -0
  40. package/dist/chunk-RFUZBNM4.js +34 -0
  41. package/dist/chunk-RFUZBNM4.js.map +7 -0
  42. package/dist/{chunk-AIIJINAR.js → chunk-RQG2GHCK.js} +2 -2
  43. package/dist/{chunk-7RZ45QDQ.js → chunk-SLY6IY2R.js} +2 -2
  44. package/dist/chunk-V5OMCBVZ.js +23 -0
  45. package/dist/chunk-V5OMCBVZ.js.map +7 -0
  46. package/dist/{chunk-5F2BYHAE.js → chunk-VOYAVKU3.js} +2 -2
  47. package/dist/{chunk-R5GCM62W.js → chunk-WA7DDIST.js} +2 -2
  48. package/dist/{chunk-IRDH7CN2.js → chunk-X2KXJYXQ.js} +5 -5
  49. package/dist/{chunk-IRDH7CN2.js.map → chunk-X2KXJYXQ.js.map} +4 -4
  50. package/dist/chunk-X5MXYPRD.js +31 -0
  51. package/dist/chunk-X5MXYPRD.js.map +7 -0
  52. package/dist/chunk-XQUQIQBO.js +21 -0
  53. package/dist/chunk-XQUQIQBO.js.map +7 -0
  54. package/dist/components/alert/bl-alert.js +1 -1
  55. package/dist/components/badge/bl-badge.js +1 -1
  56. package/dist/components/button/bl-button.js +1 -1
  57. package/dist/components/checkbox-group/bl-checkbox-group.js +1 -1
  58. package/dist/components/checkbox-group/checkbox/bl-checkbox.js +1 -1
  59. package/dist/components/dialog/bl-dialog.d.ts +8 -0
  60. package/dist/components/dialog/bl-dialog.d.ts.map +1 -1
  61. package/dist/components/dialog/bl-dialog.js +1 -1
  62. package/dist/components/dialog/bl-dialog.stories.js +8 -13
  63. package/dist/components/dialog/bl-dialog.stories.js.map +4 -4
  64. package/dist/components/drawer/bl-drawer.js +1 -1
  65. package/dist/components/dropdown/bl-dropdown.d.ts.map +1 -1
  66. package/dist/components/dropdown/bl-dropdown.js +1 -1
  67. package/dist/components/dropdown/group/bl-dropdown-group.js +1 -1
  68. package/dist/components/dropdown/item/bl-dropdown-item.js +1 -1
  69. package/dist/components/icon/bl-icon.js +1 -1
  70. package/dist/components/icon/icon-list.js +1 -1
  71. package/dist/components/input/bl-input.js +1 -1
  72. package/dist/components/notification/bl-notification.d.ts +70 -0
  73. package/dist/components/notification/bl-notification.d.ts.map +1 -0
  74. package/dist/components/notification/bl-notification.js +2 -0
  75. package/dist/components/notification/bl-notification.js.map +7 -0
  76. package/dist/components/notification/bl-notification.stories.d.ts +18 -0
  77. package/dist/components/notification/bl-notification.stories.d.ts.map +1 -0
  78. package/dist/components/notification/bl-notification.stories.js +149 -0
  79. package/dist/components/notification/bl-notification.stories.js.map +7 -0
  80. package/dist/components/notification/bl-notification.test.d.ts +2 -0
  81. package/dist/components/notification/bl-notification.test.d.ts.map +1 -0
  82. package/dist/components/notification/card/bl-notification-card.d.ts +83 -0
  83. package/dist/components/notification/card/bl-notification-card.d.ts.map +1 -0
  84. package/dist/components/notification/card/bl-notification-card.js +2 -0
  85. package/dist/components/notification/card/bl-notification-card.js.map +7 -0
  86. package/dist/components/notification/card/bl-notification-card.test.d.ts +2 -0
  87. package/dist/components/notification/card/bl-notification-card.test.d.ts.map +1 -0
  88. package/dist/components/pagination/bl-pagination.js +1 -1
  89. package/dist/components/popover/bl-popover.js +1 -1
  90. package/dist/components/progress-indicator/bl-progress-indicator.js +1 -1
  91. package/dist/components/radio-group/bl-radio-group.js +1 -1
  92. package/dist/components/radio-group/radio/bl-radio.js +1 -1
  93. package/dist/components/select/bl-select.d.ts +39 -0
  94. package/dist/components/select/bl-select.d.ts.map +1 -1
  95. package/dist/components/select/bl-select.js +1 -1
  96. package/dist/components/select/bl-select.test.d.ts +1 -1
  97. package/dist/components/select/bl-select.test.d.ts.map +1 -1
  98. package/dist/components/select/option/bl-select-option.js +1 -1
  99. package/dist/components/switch/bl-switch.d.ts.map +1 -1
  100. package/dist/components/switch/bl-switch.js +1 -1
  101. package/dist/components/tab-group/bl-tab-group.js +1 -1
  102. package/dist/components/tab-group/tab/bl-tab.js +1 -1
  103. package/dist/components/tab-group/tab-panel/bl-tab-panel.js +1 -1
  104. package/dist/components/textarea/bl-textarea.js +1 -1
  105. package/dist/components/tooltip/bl-tooltip.js +1 -1
  106. package/dist/custom-elements.json +280 -4
  107. package/dist/themes/default.css +1 -1
  108. package/dist/themes/default.css.map +2 -2
  109. package/dist/utilities/elements.d.ts +5 -0
  110. package/dist/utilities/elements.d.ts.map +1 -0
  111. package/package.json +2 -2
  112. package/dist/chunk-4HHOA5GY.js +0 -23
  113. package/dist/chunk-4HHOA5GY.js.map +0 -7
  114. package/dist/chunk-5HXMVHTD.js +0 -5
  115. package/dist/chunk-5HXMVHTD.js.map +0 -7
  116. package/dist/chunk-DOUEBILK.js +0 -16
  117. package/dist/chunk-DOUEBILK.js.map +0 -7
  118. package/dist/chunk-FJQ4VEP3.js +0 -31
  119. package/dist/chunk-FJQ4VEP3.js.map +0 -7
  120. package/dist/chunk-IRY7JHJ4.js +0 -50
  121. package/dist/chunk-IRY7JHJ4.js.map +0 -7
  122. package/dist/chunk-M4N2NT5C.js +0 -33
  123. package/dist/chunk-M4N2NT5C.js.map +0 -7
  124. package/dist/chunk-SX5PCXCH.js.map +0 -7
  125. package/dist/chunk-VGRVU3IL.js.map +0 -7
  126. package/dist/chunk-VO7C5OZC.js +0 -2
  127. package/dist/chunk-YOV2DMM7.js +0 -18
  128. /package/dist/{chunk-RD3RUK2N.js.map → chunk-6UTBN2XX.js.map} +0 -0
  129. /package/dist/{chunk-6F253HWQ.js.map → chunk-AVMAZXZT.js.map} +0 -0
  130. /package/dist/{chunk-VO7C5OZC.js.map → chunk-CYCIT2TG.js.map} +0 -0
  131. /package/dist/{chunk-OQ22A5U6.js.map → chunk-FJTTJ5ZT.js.map} +0 -0
  132. /package/dist/{chunk-2HHDYA7P.js.map → chunk-FSFO7DCO.js.map} +0 -0
  133. /package/dist/{chunk-LDNUCSUE.js.map → chunk-JI2OEPG2.js.map} +0 -0
  134. /package/dist/{chunk-RMYPWPMS.js.map → chunk-KR6AUZ77.js.map} +0 -0
  135. /package/dist/{chunk-4CK6AU4F.js.map → chunk-KXWP6EDU.js.map} +0 -0
  136. /package/dist/{chunk-5PMB453Q.js.map → chunk-L4XYDFNG.js.map} +0 -0
  137. /package/dist/{chunk-GYWKNHAH.js.map → chunk-LWG2UXQG.js.map} +0 -0
  138. /package/dist/{chunk-FAMBVSX3.js.map → chunk-MNNOI75G.js.map} +0 -0
  139. /package/dist/{chunk-AIIJINAR.js.map → chunk-RQG2GHCK.js.map} +0 -0
  140. /package/dist/{chunk-7RZ45QDQ.js.map → chunk-SLY6IY2R.js.map} +0 -0
  141. /package/dist/{chunk-5F2BYHAE.js.map → chunk-VOYAVKU3.js.map} +0 -0
  142. /package/dist/{chunk-R5GCM62W.js.map → chunk-WA7DDIST.js.map} +0 -0
@@ -0,0 +1,106 @@
1
+ import{b as T,d as k,f as z,g as $,h as E}from"./chunk-EZSEQHRH.js";import{a as S}from"./chunk-3B64VOWB.js";import{a as w}from"./chunk-DJOD4BTL.js";import{a as v}from"./chunk-6LT7O7T2.js";import{a as m}from"./chunk-GRL4DWKG.js";import{a as _,b as s,c as p,e as h,f as O}from"./chunk-X2KXJYXQ.js";import{a as g}from"./chunk-DINNT5P2.js";import{a as x,b as a,f}from"./chunk-4OT5AMS5.js";import{c as l}from"./chunk-CYCIT2TG.js";var M=x`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;display:grid;gap:var(--bl-size-3xs);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--label-padding:var(--bl-size-3xs);--border-size:1px;--background-color:var(--bl-color-neutral-full);--border-color:var(--bl-color-neutral-lighter);--border-focus-color:var(--bl-color-primary-highlight);--icon-color:var(--bl-color-neutral-light);--text-color:var(--bl-color-neutral-darker);--label-color:var(--bl-color-neutral-dark);--placeholder-color:var(--bl-color-neutral-light);--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-neutral-lightest);--menu-height:250px;--popover-position:var(--bl-popover-position, fixed)}:host([multiple][view-select-all]) .select-wrapper{--menu-height:290px}: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-neutral-light)}.dirty.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-highlight);--label-color:var(--bl-color-danger)}.select-input{display:grid;align-items:center;justify-content:space-between;grid-template-columns:1fr max-content max-content;cursor:pointer;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 calc(var(--padding-horizontal) - var(--label-padding) - var(--border-size));border-radius:var(--bl-border-radius-s);color:var(--text-color);background-color:var(--background-color);/* stylelint-disable-next-line property-no-vendor-prefix */-webkit-user-select:none;user-select:none;margin:0;width:auto;min-width:100%}.label,.placeholder{color:var(--placeholder-color);padding-left:var(--label-padding);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}:host(:not([placeholder])) .placeholder,.select-wrapper.selected .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}:host([label-fixed]) .label,:host(:not([label])) .label{display:none}.remove-all{display:none}.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-neutral-darker)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-neutral-light)}.select-open .select-input,.select-input:focus-visible{border:solid 1px var(--border-focus-color);outline:none}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;padding-left:var(--label-padding);margin:0;list-style:none;flex:1;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-neutral-light)}.select-input .actions{display:flex;align-items:center;justify-content:center;gap:var(--bl-size-4xs);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:none;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)}.popover-no-result{display:flex;flex-direction:column;gap:var(--bl-size-2xs);align-items:center;justify-content:center;height:80px}.select-open .popover{display:flex;border:solid 1px var(--border-focus-color)}bl-icon{color:var(--icon-color)}legend,label{padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}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));transition:all ease-in 0.1s;pointer-events:none;opacity:0;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color)}legend{height:0;visibility:hidden;display:none}legend span{padding:0 var(--label-padding);display:inline-block;opacity:0;visibility:visible}:host([placeholder]) :where(.select-open, .selected) .label,:host(:not([placeholder])) .selected .label{display:none}:where(.select-open, .selected) label{top:0;transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);pointer-events:initial;right:var(--padding-horizontal);opacity:1}:host([label]) :where(.select-open, .selected) legend{max-width:100%;font:var(--bl-font-caption);display:block}:host([label-fixed]) label{position:static;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color);opacity:1}:host([label-fixed]) legend{display:none}.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-neutral-dark)}.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}.select-all{position:sticky;top:0;padding:var(--bl-size-xs) 0;background:var(--background-color);z-index:1;font:var(--bl-font-title-3-regular);/* Make sure option focus doesn't overflow */box-shadow:10px 0 0 var(--background-color),-10px 0 0 var(--background-color)}.select-all::after{position:absolute;content:"";width:100%;bottom:0;border-bottom:1px solid var(--bl-color-neutral-lighter)}.search-bar-input{font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--text-color);border:none;outline:none;background-color:transparent;width:100%;height:100%;padding:0;margin:0;box-sizing:border-box}.search-bar-input::placeholder{color:var(--placeholder-color)}.search-bar-input:focus-visible{outline:none}.search-loading-icon{animation:spin 1s linear infinite}.action-divider{display:none}.select-wrapper .action-divider{display:block;height:1rem;width:1px;background-color:var(--bl-color-neutral-lighter)}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.actions bl-icon{padding:4px}`,C=M;var i=class extends w(f){constructor(){super(...arguments);this.size="medium";this.required=!1;this.disabled=!1;this.clearable=!1;this.multiple=!1;this.autofocus=!1;this.labelFixed=!1;this.viewSelectAll=!1;this.selectAllText="Select All";this.searchBar=!1;this.searchBarLoadingState=!1;this.searchNotFoundText="No Data Found";this.popoverClearSearchText="Clear Search";this._isPopoverOpen=!1;this._additionalSelectedOptionCount=0;this._searchText="";this._connectedOptions=[];this._cleanUpPopover=null;this._selectedOptions=[];this.dirty=!1;this._interactOutsideHandler=e=>{var o;let t=e.composedPath();(o=t==null?void 0:t.find(n=>n.tagName==="BL-SELECT"))!=null&&o.contains(this)||this.close()};this.focusedOptionIndex=-1}static get styles(){return[C]}get value(){return this._value}set value(e){if(this._value=e,Array.isArray(e)){let t=new FormData;e.forEach(o=>t.append(this.name,`${o}`)),this.setValue(t)}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 noResultFound(){return this._searchText!==""&&this._connectedOptions.every(e=>e.hidden)}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.searchBar&&setTimeout(()=>{var e,t,o;(o=(t=(e=document.activeElement)==null?void 0:e.shadowRoot)==null?void 0:t.querySelector("input"))==null||o.focus()},100),this._isPopoverOpen=!0,this._setupPopover(),document.addEventListener("click",this._interactOutsideHandler,!0),document.addEventListener("focus",this._interactOutsideHandler,!0)}close(){this._handleSearchOptions({target:{value:""}}),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,()=>{E(this._selectInput,this._popover,{placement:"bottom",strategy:"fixed",middleware:[T(),k(8),z({apply(e){Object.assign(e.elements.floating.style,{width:`${e.elements.reference.getBoundingClientRect().width}px`})}})]}).then(({x:e,y:t})=>{this._popover.style.setProperty("--left",`${e}px`),this._popover.style.setProperty("--top",`${t}px`)})})}connectedCallback(){var e;super.connectedCallback(),(e=this.form)==null||e.addEventListener("submit",t=>{this.reportValidity()||t.preventDefault()})}disconnectedCallback(){super.disconnectedCallback(),this._cleanUpPopover&&this._cleanUpPopover()}inputTemplate(){let e=a`<ul class="selected-options">
2
+ ${this._selectedOptions.map(b=>a`<li>${b.textContent}</li>`)}
3
+ </ul>`,n=!(this._selectedOptions.length>0&&this._selectedOptions.every(b=>b.disabled))&&(this.clearable||this.multiple)?a`<bl-button
4
+ class="remove-all"
5
+ size="small"
6
+ variant="tertiary"
7
+ kind="neutral"
8
+ icon="close"
9
+ @click=${this._onClickRemove}
10
+ ></bl-button>`:"",c=this.searchBar&&this.opened,d=this.multiple&&this._selectedOptions.length>0,r=c||d,u=a`<bl-icon
11
+ class="search-mag-icon"
12
+ name="search"
13
+ style="color: var(--bl-color-primary);font-size: var(--bl-font-size-s)"
14
+ ></bl-icon>`,V=a`<bl-icon
15
+ class="search-loading-icon"
16
+ name="loading"
17
+ style="color: var(--bl-color-primary);font-size: var(--bl-font-size-s)"
18
+ ></bl-icon>`,y=r?a`<div class="action-divider"></div>`:"",I=a`<fieldset
19
+ class=${v({"select-input":!0,"has-overflowed-options":this._additionalSelectedOptionCount>0})}
20
+ tabindex="${this.disabled?"-1":0}"
21
+ role="button"
22
+ aria-haspopup="listbox"
23
+ aria-expanded="${this.opened}"
24
+ aria-labelledby="label"
25
+ @click=${this.open}
26
+ >
27
+ <legend><span>${this.label}</span></legend>
28
+
29
+ ${this._selectedOptions.length>0&&!this.opened?e:a`
30
+ <input
31
+ class="search-bar-input"
32
+ placeholder="${g(this.searchBarPlaceholder||this.label)}"
33
+ @input=${this._handleSearchOptions}
34
+ .value=${this._searchText}
35
+ />
36
+ `}
37
+ ${this.opened?"":a`<span class="additional-selection-count"
38
+ >+${this._additionalSelectedOptionCount}</span
39
+ >`}
40
+
41
+ <div class="actions" @click=${this.togglePopover}>
42
+ ${this.opened?this.searchBarLoadingState?V:u:""}
43
+ ${this.opened?"":n} ${y}
44
+ <bl-icon class="dropdown-icon open" name="arrow_up"></bl-icon>
45
+
46
+ <bl-icon class="dropdown-icon closed" name="arrow_down"></bl-icon>
47
+ </div>
48
+ </fieldset>`;return this.searchBar?I:a`<fieldset
49
+ class=${v({"select-input":!0,"has-overflowed-options":this._additionalSelectedOptionCount>0})}
50
+ tabindex="${this.disabled?"-1":0}"
51
+ ?autofocus=${this.autofocus}
52
+ @click=${this.togglePopover}
53
+ role="button"
54
+ aria-haspopup="listbox"
55
+ aria-expanded="${this.opened}"
56
+ aria-labelledby="label"
57
+ >
58
+ <legend><span>${this.label}</span></legend>
59
+ <span class="placeholder">${this.placeholder}</span>
60
+ <span class="label">${this.label}</span>
61
+ ${e}
62
+ <span class="additional-selection-count">+${this._additionalSelectedOptionCount}</span>
63
+ <div class="actions">
64
+ ${n} ${y}
65
+ <bl-icon class="dropdown-icon open" name="arrow_up"></bl-icon>
66
+
67
+ <bl-icon class="dropdown-icon closed" name="arrow_down"></bl-icon>
68
+ </div>
69
+ </fieldset>`}selectAllTemplate(){if(!this.multiple||!this.viewSelectAll||this.noResultFound)return null;let e=this._connectedOptions.filter(o=>!o.hidden).every(o=>o.selected),t=this._selectedOptions.filter(o=>!o.hidden).length>0;return a`<bl-checkbox
70
+ class="select-all"
71
+ .checked="${e}"
72
+ .indeterminate="${t&&!e}"
73
+ role="option"
74
+ aria-selected="${e}"
75
+ @bl-checkbox-change="${this._handleSelectAll}"
76
+ >
77
+ ${this.selectAllText}
78
+ </bl-checkbox>`}render(){let e=this.checkValidity()?"":a`<p id="errorMessage" aria-live="polite" class="invalid-text">
79
+ ${this.validationMessage}
80
+ </p>`,t=this.helpText?a`<p class="help-text">${this.helpText}</p>`:"",o=this.label?a`<label id="label">${this.label}</label>`:"";return a`<div
81
+ class=${v({"select-wrapper":!0,"select-open":this.opened,selected:this._selectedOptions.length>0,invalid:!this.validity.valid,dirty:this.dirty})}
82
+ @keydown=${this.handleKeydown}
83
+ >
84
+ ${o} ${this.inputTemplate()}
85
+ <div
86
+ class="popover"
87
+ tabindex="${g(this._isPopoverOpen?void 0:"-1")}"
88
+ @bl-select-option=${this._handleSelectOptionEvent}
89
+ role="listbox"
90
+ aria-multiselectable="${this.multiple}"
91
+ aria-labelledby="label"
92
+ >
93
+ ${this.selectAllTemplate()}
94
+ <slot></slot>
95
+ ${this.searchBar&&this.noResultFound?a`<div name="popover-clear-search-text" class="popover-no-result">
96
+ <span>${this.searchNotFoundText}</span>
97
+ <bl-button
98
+ variant="tertiary"
99
+ @click=${()=>{this._handleSearchOptions({target:{value:""}})}}
100
+ >${this.popoverClearSearchText}</bl-button
101
+ >
102
+ </div>`:""}
103
+ </div>
104
+ <div class="hint">${e} ${t}</div>
105
+ </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(){let e=this._selectedOptions.map(t=>({value:t.value,selected:t.selected,text:t.textContent}));this.multiple?this._onBlSelect(e):this._onBlSelect(e[0])}_handleSearchEvent(){this._onBlSearch(this._searchText)}_handleSearchOptions(e){this.searchBar&&(this._searchText=e.target.value,this._handleSearchEvent(),this._connectedOptions.forEach(t=>{var n;let o=(n=t.textContent)==null?void 0:n.toLowerCase().includes(this._searchText.toLowerCase());t.hidden=!o}),this._selectedOptions=this.options.filter(t=>t.selected),this._handleLastVisibleSearchedOption(),this.requestUpdate())}_handleLastVisibleSearchedOption(){var t,o;let e=[...this.options].reverse().find(n=>!n.hidden);e&&((o=(t=e==null?void 0:e.shadowRoot)==null?void 0:t.querySelector("div"))==null||o.classList.add("no-border-bottom")),this.options.map(n=>{var c,d;!n.hidden&&n!==e&&((d=(c=n.shadowRoot)==null?void 0:c.querySelector("div"))==null||d.classList.remove("no-border-bottom"))})}_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 t=e.target;this.dirty=!0,this.multiple?this._handleMultipleSelect():this._handleSingleSelect(t)}_handleSelectAll(e){var d;let t=(d=this.shadowRoot)==null?void 0:d.querySelector(".select-all"),o=e.detail,c=this._connectedOptions.filter(r=>!r.selected&&!r.hidden).every(r=>r.disabled);if(o&&c){setTimeout(()=>{var u;let r=(u=t==null?void 0:t.shadowRoot)==null?void 0:u.querySelector("input");r==null||r.click()},0);return}this._connectedOptions.forEach(r=>{r.disabled||r.hidden||(r.selected=o)}),this._handleMultipleSelect()}_onClickRemove(e){e.stopPropagation();let t=this._selectedOptions.filter(o=>o.disabled);this._connectedOptions.filter(o=>!o.disabled&&o.selected).forEach(o=>{o.selected=!1}),this.value=t.length?t.map(o=>o.value):null,this._handleSelectEvent()}_checkAdditionalItemCount(){if(!this.multiple||!this.selectedOptionsItems||this.selectedOptionsItems.length<2){this._additionalSelectedOptionCount=0;return}let e=[...this.selectedOptionsItems].findIndex(t=>t.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),e.has("_selectedOptions")&&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)}};i.shadowRootOptions={...f.shadowRootOptions,delegatesFocus:!0},i.formControlValidators=[S],l([s()],i.prototype,"name",2),l([s()],i.prototype,"value",1),l([s({reflect:!0})],i.prototype,"label",2),l([s({reflect:!0})],i.prototype,"placeholder",2),l([s({type:String,reflect:!0})],i.prototype,"size",2),l([s({type:Boolean,reflect:!0})],i.prototype,"required",2),l([s({type:Boolean,reflect:!0})],i.prototype,"disabled",2),l([s({type:Boolean,reflect:!0})],i.prototype,"clearable",2),l([s({type:Boolean,reflect:!0})],i.prototype,"multiple",2),l([s({type:Boolean,reflect:!0})],i.prototype,"autofocus",2),l([s({type:Boolean,attribute:"label-fixed",reflect:!0})],i.prototype,"labelFixed",2),l([s({type:String,attribute:"help-text",reflect:!0})],i.prototype,"helpText",2),l([s({type:String,attribute:"invalid-text",reflect:!0})],i.prototype,"customInvalidText",2),l([s({type:Boolean,attribute:"view-select-all"})],i.prototype,"viewSelectAll",2),l([s({type:String,attribute:"select-all-text"})],i.prototype,"selectAllText",2),l([s({type:Boolean,attribute:"search-bar",reflect:!0})],i.prototype,"searchBar",2),l([s({type:String,attribute:"search-bar-placeholder",reflect:!0})],i.prototype,"searchBarPlaceholder",2),l([s({type:Boolean,attribute:"search-bar-loading-state",reflect:!0})],i.prototype,"searchBarLoadingState",2),l([s({type:String,attribute:"search-not-found-text",reflect:!0})],i.prototype,"searchNotFoundText",2),l([s({type:String,attribute:"popover-clear-search-text",reflect:!0})],i.prototype,"popoverClearSearchText",2),l([p()],i.prototype,"_isPopoverOpen",2),l([p()],i.prototype,"_additionalSelectedOptionCount",2),l([p()],i.prototype,"_searchText",2),l([h(".selected-options")],i.prototype,"selectedOptionsContainer",2),l([O(".selected-options li")],i.prototype,"selectedOptionsItems",2),l([h(".popover")],i.prototype,"_popover",2),l([h(".select-input")],i.prototype,"_selectInput",2),l([m("bl-select")],i.prototype,"_onBlSelect",2),l([m("bl-search")],i.prototype,"_onBlSearch",2),l([p()],i.prototype,"_selectedOptions",2),l([p()],i.prototype,"dirty",2),l([h(".select-input")],i.prototype,"validationTarget",2),i=l([_("bl-select")],i);export{i as a};
106
+ //# sourceMappingURL=chunk-AMAOGVPQ.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:grid;gap:var(--bl-size-3xs);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--label-padding:var(--bl-size-3xs);--border-size:1px;--background-color:var(--bl-color-neutral-full);--border-color:var(--bl-color-neutral-lighter);--border-focus-color:var(--bl-color-primary-highlight);--icon-color:var(--bl-color-neutral-light);--text-color:var(--bl-color-neutral-darker);--label-color:var(--bl-color-neutral-dark);--placeholder-color:var(--bl-color-neutral-light);--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-neutral-lightest);--menu-height:250px;--popover-position:var(--bl-popover-position, fixed)}:host([multiple][view-select-all]) .select-wrapper{--menu-height:290px}: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-neutral-light)}.dirty.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-highlight);--label-color:var(--bl-color-danger)}.select-input{display:grid;align-items:center;justify-content:space-between;grid-template-columns:1fr max-content max-content;cursor:pointer;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 calc(var(--padding-horizontal) - var(--label-padding) - var(--border-size));border-radius:var(--bl-border-radius-s);color:var(--text-color);background-color:var(--background-color);/* stylelint-disable-next-line property-no-vendor-prefix */-webkit-user-select:none;user-select:none;margin:0;width:auto;min-width:100%}.label,.placeholder{color:var(--placeholder-color);padding-left:var(--label-padding);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}:host(:not([placeholder])) .placeholder,.select-wrapper.selected .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}:host([label-fixed]) .label,:host(:not([label])) .label{display:none}.remove-all{display:none}.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-neutral-darker)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-neutral-light)}.select-open .select-input,.select-input:focus-visible{border:solid 1px var(--border-focus-color);outline:none}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;padding-left:var(--label-padding);margin:0;list-style:none;flex:1;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-neutral-light)}.select-input .actions{display:flex;align-items:center;justify-content:center;gap:var(--bl-size-4xs);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:none;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)}.popover-no-result{display:flex;flex-direction:column;gap:var(--bl-size-2xs);align-items:center;justify-content:center;height:80px}.select-open .popover{display:flex;border:solid 1px var(--border-focus-color)}bl-icon{color:var(--icon-color)}legend,label{padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}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));transition:all ease-in 0.1s;pointer-events:none;opacity:0;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color)}legend{height:0;visibility:hidden;display:none}legend span{padding:0 var(--label-padding);display:inline-block;opacity:0;visibility:visible}:host([placeholder]) :where(.select-open, .selected) .label,:host(:not([placeholder])) .selected .label{display:none}:where(.select-open, .selected) label{top:0;transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);pointer-events:initial;right:var(--padding-horizontal);opacity:1}:host([label]) :where(.select-open, .selected) legend{max-width:100%;font:var(--bl-font-caption);display:block}:host([label-fixed]) label{position:static;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color);opacity:1}:host([label-fixed]) legend{display:none}.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-neutral-dark)}.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}.select-all{position:sticky;top:0;padding:var(--bl-size-xs) 0;background:var(--background-color);z-index:1;font:var(--bl-font-title-3-regular);/* Make sure option focus doesn't overflow */box-shadow:10px 0 0 var(--background-color),-10px 0 0 var(--background-color)}.select-all::after{position:absolute;content:\"\";width:100%;bottom:0;border-bottom:1px solid var(--bl-color-neutral-lighter)}.search-bar-input{font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--text-color);border:none;outline:none;background-color:transparent;width:100%;height:100%;padding:0;margin:0;box-sizing:border-box}.search-bar-input::placeholder{color:var(--placeholder-color)}.search-bar-input:focus-visible{outline:none}.search-loading-icon{animation:spin 1s linear infinite}.action-divider{display:none}.select-wrapper .action-divider{display:block;height:1rem;width:1px;background-color:var(--bl-color-neutral-lighter)}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.actions bl-icon{padding:4px}`;\nexport default styles;\n", "import { 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 { autoUpdate, computePosition, flip, MiddlewareState, 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 { event, EventDispatcher } from \"../../utilities/event\";\nimport BlCheckbox from \"../checkbox-group/checkbox/bl-checkbox\";\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 = string> {\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 * @tag bl-select\n * @summary Baklava Select component\n *\n * @cssproperty [--bl-popover-position=fixed] Sets the positioning strategy of select popover. You can set it as `absolute` if you need to show popover relative to its trigger element.\n */\n@customElement(\"bl-select\")\nexport default class BlSelect<ValueType extends FormValue = string> extends FormControlMixin(\n LitElement\n) {\n static get styles(): CSSResultGroup {\n return [style];\n }\n static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true };\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\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({ reflect: true })\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 * Sets whether the selected option is clearable\n */\n @property({ type: Boolean, reflect: true })\n clearable = false;\n\n /**\n * Allows multiple options to be selected\n */\n @property({ type: Boolean, reflect: true })\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\", reflect: true })\n helpText?: string;\n\n /**\n * Set custom error message\n */\n @property({ type: String, attribute: \"invalid-text\", reflect: true })\n customInvalidText?: string;\n\n /**\n * Views select all option in multiple select\n */\n @property({ type: Boolean, attribute: \"view-select-all\" })\n viewSelectAll = false;\n\n /**\n * Sets select all text in multiple select\n */\n @property({ type: String, attribute: \"select-all-text\" })\n selectAllText = \"Select All\";\n\n /**\n * Enable search functionality for the options within the list\n */\n @property({ type: Boolean, attribute: \"search-bar\", reflect: true })\n searchBar = false;\n\n /**\n * Search for text variations such as \"search,\" \"searching,\" \"search by country,\" and so on\n */\n @property({ type: String, attribute: \"search-bar-placeholder\", reflect: true })\n searchBarPlaceholder?: string;\n\n /**\n * Display a loading icon in place of the search icon.\n */\n @property({ type: Boolean, attribute: \"search-bar-loading-state\", reflect: true })\n searchBarLoadingState = false;\n\n /**\n * Text to display when no search results are found.\n */\n @property({ type: String, attribute: \"search-not-found-text\", reflect: true })\n searchNotFoundText = \"No Data Found\";\n\n /**\n * Text to display on the clear search button.\n */\n @property({ type: String, attribute: \"popover-clear-search-text\", reflect: true })\n popoverClearSearchText = \"Clear Search\";\n\n /* Declare internal reactive properties */\n @state()\n private _isPopoverOpen = false;\n\n @state()\n private _additionalSelectedOptionCount = 0;\n\n @state()\n private _searchText = \"\";\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<\n ISelectOption<ValueType>[] | ISelectOption<ValueType>\n >;\n\n /**\n * Fires when search text changes\n */\n @event(\"bl-search\") private _onBlSearch: EventDispatcher<string>;\n\n private _connectedOptions: BlSelectOption<ValueType>[] = [];\n\n private _cleanUpPopover: CleanUpFunction | null = null;\n\n private setOptionsSelected() {\n this._connectedOptions.forEach(\n option =>\n (option.selected =\n this.value === option.value ||\n (Array.isArray(this.value) && this.value.includes(option.value)))\n );\n\n this._selectedOptions = [...this.options.filter(option => option.selected)];\n }\n\n get options() {\n return this._connectedOptions;\n }\n\n get opened() {\n return this._isPopoverOpen;\n }\n\n get noResultFound() {\n return this._searchText !== \"\" && this._connectedOptions.every(option => option.hidden);\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\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 if (this.searchBar) {\n setTimeout(() => {\n document.activeElement?.shadowRoot?.querySelector(\"input\")?.focus();\n }, 100);\n }\n\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._handleSearchOptions({ target: { value: \"\" } } as InputEvent & {\n target: HTMLInputElement;\n });\n\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: MiddlewareState) {\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\n const isAllSelectedDisabled =\n this._selectedOptions.length > 0 && this._selectedOptions.every(option => option.disabled);\n const isRemoveButtonShown = !isAllSelectedDisabled && (this.clearable || this.multiple);\n const removeButton = isRemoveButtonShown\n ? html`<bl-button\n class=\"remove-all\"\n size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"close\"\n @click=${this._onClickRemove}\n ></bl-button>`\n : \"\";\n\n const isSearchBarVisible = this.searchBar && this.opened;\n const isMultipleWithSelection = this.multiple && this._selectedOptions.length > 0;\n\n const isDividerShown = isSearchBarVisible || isMultipleWithSelection;\n\n const searchMagIcon = html`<bl-icon\n class=\"search-mag-icon\"\n name=\"search\"\n style=\"color: var(--bl-color-primary);font-size: var(--bl-font-size-s)\"\n ></bl-icon>`;\n\n const searchLoadingIcon = html`<bl-icon\n class=\"search-loading-icon\"\n name=\"loading\"\n style=\"color: var(--bl-color-primary);font-size: var(--bl-font-size-s)\"\n ></bl-icon>`;\n\n const actionDivider = isDividerShown ? html`<div class=\"action-divider\"></div>` : \"\";\n\n const search = html`<fieldset\n class=${classMap({\n \"select-input\": true,\n \"has-overflowed-options\": this._additionalSelectedOptionCount > 0,\n })}\n tabindex=\"${this.disabled ? \"-1\" : 0}\"\n role=\"button\"\n aria-haspopup=\"listbox\"\n aria-expanded=\"${this.opened}\"\n aria-labelledby=\"label\"\n @click=${this.open}\n >\n <legend><span>${this.label}</span></legend>\n\n ${this._selectedOptions.length > 0 && !this.opened\n ? inputSelectedOptions\n : html`\n <input\n class=\"search-bar-input\"\n placeholder=\"${ifDefined(this.searchBarPlaceholder || this.label)}\"\n @input=${this._handleSearchOptions}\n .value=${this._searchText}\n />\n `}\n ${!this.opened\n ? html`<span class=\"additional-selection-count\"\n >+${this._additionalSelectedOptionCount}</span\n >`\n : \"\"}\n\n <div class=\"actions\" @click=${this.togglePopover}>\n ${this.opened ? (this.searchBarLoadingState ? searchLoadingIcon : searchMagIcon) : \"\"}\n ${!this.opened ? removeButton : \"\"} ${actionDivider}\n <bl-icon class=\"dropdown-icon open\" name=\"arrow_up\"></bl-icon>\n\n <bl-icon class=\"dropdown-icon closed\" name=\"arrow_down\"></bl-icon>\n </div>\n </fieldset>`;\n\n return this.searchBar\n ? search\n : html`<fieldset\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 role=\"button\"\n aria-haspopup=\"listbox\"\n aria-expanded=\"${this.opened}\"\n aria-labelledby=\"label\"\n >\n <legend><span>${this.label}</span></legend>\n <span class=\"placeholder\">${this.placeholder}</span>\n <span class=\"label\">${this.label}</span>\n ${inputSelectedOptions}\n <span class=\"additional-selection-count\">+${this._additionalSelectedOptionCount}</span>\n <div class=\"actions\">\n ${removeButton} ${actionDivider}\n <bl-icon class=\"dropdown-icon open\" name=\"arrow_up\"></bl-icon>\n\n <bl-icon class=\"dropdown-icon closed\" name=\"arrow_down\"></bl-icon>\n </div>\n </fieldset>`;\n }\n\n selectAllTemplate() {\n if (!this.multiple || !this.viewSelectAll || this.noResultFound) {\n return null;\n }\n\n const isAllRenderedOptionsSelected = this._connectedOptions\n .filter(option => !option.hidden)\n .every(option => option.selected);\n const isAnySelected = this._selectedOptions.filter(option => !option.hidden).length > 0;\n\n return html`<bl-checkbox\n class=\"select-all\"\n .checked=\"${isAllRenderedOptionsSelected}\"\n .indeterminate=\"${isAnySelected && !isAllRenderedOptionsSelected}\"\n role=\"option\"\n aria-selected=\"${isAllRenderedOptionsSelected}\"\n @bl-checkbox-change=\"${this._handleSelectAll}\"\n >\n ${this.selectAllText}\n </bl-checkbox>`;\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\n const helpMessage = this.helpText ? html`<p class=\"help-text\">${this.helpText}</p>` : \"\";\n\n const label = this.label ? html`<label id=\"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} ${this.inputTemplate()}\n <div\n class=\"popover\"\n tabindex=\"${ifDefined(this._isPopoverOpen ? undefined : \"-1\")}\"\n @bl-select-option=${this._handleSelectOptionEvent}\n role=\"listbox\"\n aria-multiselectable=\"${this.multiple}\"\n aria-labelledby=\"label\"\n >\n ${this.selectAllTemplate()}\n <slot></slot>\n ${this.searchBar && this.noResultFound\n ? html`<div name=\"popover-clear-search-text\" class=\"popover-no-result\">\n <span>${this.searchNotFoundText}</span>\n <bl-button\n variant=\"tertiary\"\n @click=${() => {\n this._handleSearchOptions({ target: { value: \"\" } } as InputEvent & {\n target: HTMLInputElement;\n });\n }}\n >${this.popoverClearSearchText}</bl-button\n >\n </div>`\n : \"\"}\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 private togglePopover() {\n this._isPopoverOpen ? this.close() : this.open();\n }\n\n private _handleSelectEvent() {\n const options = this._selectedOptions.map(\n option =>\n ({\n value: option.value,\n selected: option.selected,\n text: option.textContent,\n } as ISelectOption<ValueType>)\n );\n\n if (!this.multiple) this._onBlSelect(options[0]);\n else this._onBlSelect(options);\n }\n\n private _handleSearchEvent() {\n this._onBlSearch(this._searchText);\n }\n\n private _handleSearchOptions(e: InputEvent): void {\n if (!this.searchBar) return;\n\n this._searchText = (e.target as HTMLInputElement).value;\n\n this._handleSearchEvent();\n\n this._connectedOptions.forEach(option => {\n const isVisible = option.textContent?.toLowerCase().includes(this._searchText.toLowerCase());\n\n option.hidden = !isVisible;\n });\n\n this._selectedOptions = this.options.filter(option => option.selected);\n\n this._handleLastVisibleSearchedOption();\n\n this.requestUpdate();\n }\n\n private _handleLastVisibleSearchedOption() {\n const lastVisibleOption = [...this.options].reverse().find(option => !option.hidden);\n\n if (lastVisibleOption) {\n lastVisibleOption?.shadowRoot?.querySelector(\"div\")?.classList.add(\"no-border-bottom\");\n }\n\n this.options.map(option => {\n if (!option.hidden && option !== lastVisibleOption) {\n option.shadowRoot?.querySelector(\"div\")?.classList.remove(\"no-border-bottom\");\n }\n });\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\n .filter(option => option.selected)\n .map(option => option.value);\n\n this._handleSelectEvent();\n }\n\n private _handleSelectOptionEvent(e: CustomEvent) {\n const optionItem = e.target as BlSelectOption<ValueType>;\n\n this.dirty = true;\n\n if (this.multiple) {\n this._handleMultipleSelect();\n } else {\n this._handleSingleSelect(optionItem);\n }\n }\n\n private _handleSelectAll(e: CustomEvent) {\n const selectAllEl = this.shadowRoot?.querySelector(\".select-all\") as BlCheckbox;\n\n const checked = e.detail;\n const unselectedOptions = this._connectedOptions.filter(\n option => !option.selected && !option.hidden\n );\n const isAllUnselectedDisabled = unselectedOptions.every(option => option.disabled);\n\n // If all available options are selected, instead of checking, uncheck all options\n if (checked && isAllUnselectedDisabled) {\n setTimeout(() => {\n const checkbox = selectAllEl?.shadowRoot?.querySelector(\"input\");\n\n checkbox?.click();\n }, 0);\n return;\n }\n\n this._connectedOptions.forEach(option => {\n if (option.disabled || option.hidden) {\n return;\n }\n\n option.selected = checked;\n });\n\n this._handleMultipleSelect();\n }\n\n private _onClickRemove(e: MouseEvent) {\n e.stopPropagation();\n\n const selectedDisabledOptions = this._selectedOptions.filter(option => option.disabled);\n\n this._connectedOptions\n .filter(option => !option.disabled && option.selected)\n .forEach(option => {\n option.selected = false;\n });\n\n this.value = selectedDisabledOptions.length\n ? selectedDisabledOptions.map(option => option.value)\n : null;\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].findIndex(\n item => item.offsetLeft > this.selectedOptionsContainer.offsetWidth\n );\n\n if (firstNonVisibleItemIndex > -1) {\n this._additionalSelectedOptionCount =\n 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 if (_changedProperties.has(\"_selectedOptions\")) {\n this._checkAdditionalItemCount();\n }\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": "yaACO,IAAMA,EAASC,u5NACfC,EAAQF,EC8Bf,IAAqBG,EAArB,cAA4EC,EAC1EC,CACF,CAAE,CAFF,kCAgEE,UAAmB,SAMnB,cAAW,GAMX,cAAW,GAMX,eAAY,GAMZ,cAAW,GAMX,eAAY,GAMZ,gBAAa,GAkBb,mBAAgB,GAMhB,mBAAgB,aAMhB,eAAY,GAYZ,2BAAwB,GAMxB,wBAAqB,gBAMrB,4BAAyB,eAIzB,KAAQ,eA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A7I9DtB,EA8InB,qCAMAoD,EAAA,CADC9B,EAAS,CAAE,KAAM,OAAQ,UAAW,wBAAyB,QAAS,EAAK,CAAC,GAnJ1DtB,EAoJnB,kCAMAoD,EAAA,CADC9B,EAAS,CAAE,KAAM,OAAQ,UAAW,4BAA6B,QAAS,EAAK,CAAC,GAzJ9DtB,EA0JnB,sCAIQoD,EAAA,CADPC,EAAM,GA7JYrD,EA8JX,8BAGAoD,EAAA,CADPC,EAAM,GAhKYrD,EAiKX,8CAGAoD,EAAA,CADPC,EAAM,GAnKYrD,EAoKX,2BAGAoD,EAAA,CADPE,EAAM,mBAAmB,GAtKPtD,EAuKX,wCAGAoD,EAAA,CADP9B,EAAS,sBAAsB,GAzKbtB,EA0KX,oCAGAoD,EAAA,CADPE,EAAM,UAAU,GA5KEtD,EA6KX,wBAGAoD,EAAA,CADPE,EAAM,eAAe,GA/KHtD,EAgLX,4BAKoBoD,EAAA,CAA3BjD,EAAM,WAAW,GArLCH,EAqLS,2BAOAoD,EAAA,CAA3BjD,EAAM,WAAW,GA5LCH,EA4LS,2BA8BpBoD,EAAA,CADPC,EAAM,GAzNYrD,EA0NX,gCAGAoD,EAAA,CADPC,EAAM,GA5NYrD,EA6NX,qBA+BRoD,EAAA,CADCE,EAAM,eAAe,GA3PHtD,EA4PnB,gCA5PmBA,EAArBoD,EAAA,CADC9B,EAAc,WAAW,GACLtB",
6
+ "names": ["styles", "i", "bl_select_default", "BlSelect", "FormControlMixin", "s", "event", "_a", "eventPath", "el", "bl_select_default", "val", "formData", "option", "select", "_b", "_c", "autoUpdate", "computePosition", "flip", "offset", "size", "args", "x", "y", "e", "inputSelectedOptions", "item", "removeButton", "isSearchBarVisible", "isMultipleWithSelection", "isDividerShown", "searchMagIcon", "searchLoadingIcon", "actionDivider", "search", "o", "l", "isAllRenderedOptionsSelected", "isAnySelected", "invalidMessage", "helpMessage", "label", "options", "isVisible", "lastVisibleOption", "optionItem", "selectAllEl", "checked", "isAllUnselectedDisabled", "checkbox", "selectedDisabledOptions", "firstNonVisibleItemIndex", "_changedProperties", "requiredValidator", "__decorateClass", "t", "i"]
7
+ }
@@ -1,4 +1,4 @@
1
- import{a as g}from"./chunk-DJOD4BTL.js";import{a as v}from"./chunk-6LT7O7T2.js";import{a as i}from"./chunk-GRL4DWKG.js";import{a as c,b as a,c as u,d as m}from"./chunk-IRDH7CN2.js";import{a as s,b as n,f as d}from"./chunk-4OT5AMS5.js";import{c as t}from"./chunk-VO7C5OZC.js";var y=s`:host{display:block}fieldset{border:none;padding:0}legend{font:var(--bl-font-title-3-medium);color:var(--bl-color-neutral-darker)}.options{display:flex;flex-flow:var(--bl-radio-direction, column) wrap;align-items:var(--bl-radio-group-cross-axis-item-alignment, normal);align-content:var(--bl-radio-group-cross-axis-content-alignment, normal);justify-content:var(--bl-radio-group-main-axis-content-alignment, normal);gap:var(--bl-size-m);margin-block:var(--bl-size-xs)}`,f=y;var h="bl-radio-group",p="bl-radio-change",r=class extends g(d){constructor(){super(...arguments);this.value="";this.required=!1;this.focusedOptionIndex=0}static get styles(){return[f]}get options(){return[...this.querySelectorAll(b)]}get availableOptions(){return this.options.filter(e=>!e.disabled)}updated(e){e.has("value")&&(this.setValue(this.value),this.onChange(this.value))}handleOptionChecked(e){let o=e.target;this.setValue(o.value),this.onChange(o.value)}handleKeyDown(e){if(["ArrowDown","ArrowRight"].includes(e.key))this.focusedOptionIndex++;else if(["ArrowUp","ArrowLeft"].includes(e.key))this.focusedOptionIndex--;else if([" "].includes(e.key)){this.availableOptions[this.focusedOptionIndex].select();return}else return;this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,this.availableOptions.length-1)),this.availableOptions[this.focusedOptionIndex].focus(),e.preventDefault()}connectedCallback(){super.connectedCallback(),this.tabIndex=0,this.addEventListener("focus",this.handleFocus),this.addEventListener("keydown",this.handleKeyDown)}handleFocus(){this.availableOptions[this.focusedOptionIndex].focus()}render(){return n`<fieldset role="radiogroup" aria-labelledby="label" aria-required=${this.required}>
1
+ import{a as g}from"./chunk-DJOD4BTL.js";import{a as v}from"./chunk-6LT7O7T2.js";import{a as i}from"./chunk-GRL4DWKG.js";import{a as c,b as a,c as u,e as m}from"./chunk-X2KXJYXQ.js";import{a as s,b as n,f as d}from"./chunk-4OT5AMS5.js";import{c as t}from"./chunk-CYCIT2TG.js";var y=s`:host{display:block}fieldset{border:none;padding:0}legend{font:var(--bl-font-title-3-medium);color:var(--bl-color-neutral-darker)}.options{display:flex;flex-flow:var(--bl-radio-direction, column) wrap;align-items:var(--bl-radio-group-cross-axis-item-alignment, normal);align-content:var(--bl-radio-group-cross-axis-content-alignment, normal);justify-content:var(--bl-radio-group-main-axis-content-alignment, normal);gap:var(--bl-size-m);margin-block:var(--bl-size-xs)}`,f=y;var h="bl-radio-group",p="bl-radio-change",r=class extends g(d){constructor(){super(...arguments);this.value="";this.required=!1;this.focusedOptionIndex=0}static get styles(){return[f]}get options(){return[...this.querySelectorAll(b)]}get availableOptions(){return this.options.filter(e=>!e.disabled)}updated(e){e.has("value")&&(this.setValue(this.value),this.onChange(this.value))}handleOptionChecked(e){let o=e.target;this.setValue(o.value),this.onChange(o.value)}handleKeyDown(e){if(["ArrowDown","ArrowRight"].includes(e.key))this.focusedOptionIndex++;else if(["ArrowUp","ArrowLeft"].includes(e.key))this.focusedOptionIndex--;else if([" "].includes(e.key)){this.availableOptions[this.focusedOptionIndex].select();return}else return;this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,this.availableOptions.length-1)),this.availableOptions[this.focusedOptionIndex].focus(),e.preventDefault()}connectedCallback(){super.connectedCallback(),this.tabIndex=0,this.addEventListener("focus",this.handleFocus),this.addEventListener("keydown",this.handleKeyDown)}handleFocus(){this.availableOptions[this.focusedOptionIndex].focus()}render(){return n`<fieldset role="radiogroup" aria-labelledby="label" aria-required=${this.required}>
2
2
  <legend id="label">${this.label}</legend>
3
3
  <div class="options" @bl-checked=${this.handleOptionChecked}>
4
4
  <slot></slot>
@@ -14,4 +14,4 @@ import{a as g}from"./chunk-DJOD4BTL.js";import{a as v}from"./chunk-6LT7O7T2.js";
14
14
  >
15
15
  <p id="label"><slot></slot></p>
16
16
  </div>`}};t([a()],l.prototype,"name",2),t([a()],l.prototype,"value",2),t([a({type:Boolean,reflect:!0})],l.prototype,"disabled",2),t([u()],l.prototype,"selected",2),t([i("bl-checked")],l.prototype,"onChecked",2),t([i("bl-focus")],l.prototype,"onFocus",2),t([i("bl-blur")],l.prototype,"onBlur",2),t([m("[role=radio]")],l.prototype,"radioElement",2),l=t([c(b)],l);export{b as a,W as b,l as c,h as d,p as e,r as f};
17
- //# sourceMappingURL=chunk-6F253HWQ.js.map
17
+ //# sourceMappingURL=chunk-AVMAZXZT.js.map
@@ -0,0 +1,11 @@
1
+ import{e as v}from"./chunk-4OT5AMS5.js";var{I:u}=v;var m=e=>e.strings===void 0,_=()=>document.createComment(""),p=(e,t,i)=>{var s;let r=e._$AA.parentNode,a=t===void 0?e._$AB:t._$AA;if(i===void 0){let n=r.insertBefore(_(),a),$=r.insertBefore(_(),a);i=new u(n,$,e,e.options)}else{let n=i._$AB.nextSibling,$=i._$AM,o=$!==e;if(o){let l;(s=i._$AQ)===null||s===void 0||s.call(i,e),i._$AM=e,i._$AP!==void 0&&(l=e._$AU)!==$._$AU&&i._$AP(l)}if(n!==a||o){let l=i._$AA;for(;l!==n;){let d=l.nextSibling;r.insertBefore(l,a),l=d}}}return i},f=(e,t,i=e)=>(e._$AI(t,i),e),A={},g=(e,t=A)=>e._$AH=t,P=e=>e._$AH,T=e=>{var t;(t=e._$AP)===null||t===void 0||t.call(e,!1,!0);let i=e._$AA,s=e._$AB.nextSibling;for(;i!==s;){let r=i.nextSibling;i.remove(),i=r}};export{m as a,p as b,f as c,g as d,P as e,T as f};
2
+ /*! Bundled license information:
3
+
4
+ lit-html/directive-helpers.js:
5
+ (**
6
+ * @license
7
+ * Copyright 2020 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ *)
10
+ */
11
+ //# sourceMappingURL=chunk-AYJMIZZ3.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../node_modules/lit-html/src/directive-helpers.ts", "../node_modules/lit-html/src/directives/live.ts"],
4
- "sourcesContent": ["/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {\n _$LH,\n Part,\n DirectiveParent,\n TemplateResult,\n CompiledTemplateResult,\n} from './lit-html.js';\nimport {\n DirectiveResult,\n DirectiveClass,\n PartInfo,\n AttributePartInfo,\n} from './directive.js';\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\n\nconst {_ChildPart: ChildPart} = _$LH;\n\ntype ChildPart = InstanceType<typeof ChildPart>;\n\nconst ENABLE_SHADYDOM_NOPATCH = true;\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n window.ShadyDOM?.inUse &&\n window.ShadyDOM?.noPatch === true\n ? window.ShadyDOM!.wrap\n : (node: Node) => node;\n\n/**\n * Tests if a value is a primitive value.\n *\n * See https://tc39.github.io/ecma262/#sec-typeof-operator\n */\nexport const isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\n\nexport const TemplateResultType = {\n HTML: 1,\n SVG: 2,\n} as const;\n\nexport type TemplateResultType =\n (typeof TemplateResultType)[keyof typeof TemplateResultType];\n\ntype IsTemplateResult = {\n (val: unknown): val is TemplateResult | CompiledTemplateResult;\n <T extends TemplateResultType>(\n val: unknown,\n type: T\n ): val is TemplateResult<T>;\n};\n\n/**\n * Tests if a value is a TemplateResult or a CompiledTemplateResult.\n */\nexport const isTemplateResult: IsTemplateResult = (\n value: unknown,\n type?: TemplateResultType\n): value is TemplateResult =>\n type === undefined\n ? // This property needs to remain unminified.\n (value as TemplateResult)?.['_$litType$'] !== undefined\n : (value as TemplateResult)?.['_$litType$'] === type;\n\n/**\n * Tests if a value is a CompiledTemplateResult.\n */\nexport const isCompiledTemplateResult = (\n value: unknown\n): value is CompiledTemplateResult => {\n return (value as CompiledTemplateResult)?.['_$litType$']?.h != null;\n};\n\n/**\n * Tests if a value is a DirectiveResult.\n */\nexport const isDirectiveResult = (value: unknown): value is DirectiveResult =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'] !== undefined;\n\n/**\n * Retrieves the Directive class for a DirectiveResult\n */\nexport const getDirectiveClass = (value: unknown): DirectiveClass | undefined =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'];\n\n/**\n * Tests whether a part has only a single-expression with no strings to\n * interpolate between.\n *\n * Only AttributePart and PropertyPart can have multiple expressions.\n * Multi-expression parts have a `strings` property and single-expression\n * parts do not.\n */\nexport const isSingleExpression = (part: PartInfo) =>\n (part as AttributePartInfo).strings === undefined;\n\nconst createMarker = () => document.createComment('');\n\n/**\n * Inserts a ChildPart into the given container ChildPart's DOM, either at the\n * end of the container ChildPart, or before the optional `refPart`.\n *\n * This does not add the part to the containerPart's committed value. That must\n * be done by callers.\n *\n * @param containerPart Part within which to add the new ChildPart\n * @param refPart Part before which to add the new ChildPart; when omitted the\n * part added to the end of the `containerPart`\n * @param part Part to insert, or undefined to create a new part\n */\nexport const insertPart = (\n containerPart: ChildPart,\n refPart?: ChildPart,\n part?: ChildPart\n): ChildPart => {\n const container = wrap(containerPart._$startNode).parentNode!;\n\n const refNode =\n refPart === undefined ? containerPart._$endNode : refPart._$startNode;\n\n if (part === undefined) {\n const startNode = wrap(container).insertBefore(createMarker(), refNode);\n const endNode = wrap(container).insertBefore(createMarker(), refNode);\n part = new ChildPart(\n startNode,\n endNode,\n containerPart,\n containerPart.options\n );\n } else {\n const endNode = wrap(part._$endNode!).nextSibling;\n const oldParent = part._$parent;\n const parentChanged = oldParent !== containerPart;\n if (parentChanged) {\n part._$reparentDisconnectables?.(containerPart);\n // Note that although `_$reparentDisconnectables` updates the part's\n // `_$parent` reference after unlinking from its current parent, that\n // method only exists if Disconnectables are present, so we need to\n // unconditionally set it here\n part._$parent = containerPart;\n // Since the _$isConnected getter is somewhat costly, only\n // read it once we know the subtree has directives that need\n // to be notified\n let newConnectionState;\n if (\n part._$notifyConnectionChanged !== undefined &&\n (newConnectionState = containerPart._$isConnected) !==\n oldParent!._$isConnected\n ) {\n part._$notifyConnectionChanged(newConnectionState);\n }\n }\n if (endNode !== refNode || parentChanged) {\n let start: Node | null = part._$startNode;\n while (start !== endNode) {\n const n: Node | null = wrap(start!).nextSibling;\n wrap(container).insertBefore(start!, refNode);\n start = n;\n }\n }\n }\n\n return part;\n};\n\n/**\n * Sets the value of a Part.\n *\n * Note that this should only be used to set/update the value of user-created\n * parts (i.e. those created using `insertPart`); it should not be used\n * by directives to set the value of the directive's container part. Directives\n * should return a value from `update`/`render` to update their part state.\n *\n * For directives that require setting their part value asynchronously, they\n * should extend `AsyncDirective` and call `this.setValue()`.\n *\n * @param part Part to set\n * @param value Value to set\n * @param index For `AttributePart`s, the index to set\n * @param directiveParent Used internally; should not be set by user\n */\nexport const setChildPartValue = <T extends ChildPart>(\n part: T,\n value: unknown,\n directiveParent: DirectiveParent = part\n): T => {\n part._$setValue(value, directiveParent);\n return part;\n};\n\n// A sentinel value that can never appear as a part value except when set by\n// live(). Used to force a dirty-check to fail and cause a re-render.\nconst RESET_VALUE = {};\n\n/**\n * Sets the committed value of a ChildPart directly without triggering the\n * commit stage of the part.\n *\n * This is useful in cases where a directive needs to update the part such\n * that the next update detects a value change or not. When value is omitted,\n * the next update will be guaranteed to be detected as a change.\n *\n * @param part\n * @param value\n */\nexport const setCommittedValue = (part: Part, value: unknown = RESET_VALUE) =>\n (part._$committedValue = value);\n\n/**\n * Returns the committed value of a ChildPart.\n *\n * The committed value is used for change detection and efficient updates of\n * the part. It can differ from the value set by the template or directive in\n * cases where the template value is transformed before being committed.\n *\n * - `TemplateResult`s are committed as a `TemplateInstance`\n * - Iterables are committed as `Array<ChildPart>`\n * - All other types are committed as the template value or value returned or\n * set by a directive.\n *\n * @param part\n */\nexport const getCommittedValue = (part: ChildPart) => part._$committedValue;\n\n/**\n * Removes a ChildPart from the DOM, including any of its content.\n *\n * @param part The Part to remove\n */\nexport const removePart = (part: ChildPart) => {\n part._$notifyConnectionChanged?.(false, true);\n let start: ChildNode | null = part._$startNode;\n const end: ChildNode | null = wrap(part._$endNode!).nextSibling;\n while (start !== end) {\n const n: ChildNode | null = wrap(start!).nextSibling;\n (wrap(start!) as ChildNode).remove();\n start = n;\n }\n};\n\nexport const clearPart = (part: ChildPart) => {\n part._$clear();\n};\n", "/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange, nothing} from '../lit-html.js';\nimport {\n directive,\n Directive,\n DirectiveParameters,\n PartInfo,\n PartType,\n} from '../directive.js';\nimport {isSingleExpression, setCommittedValue} from '../directive-helpers.js';\n\nclass LiveDirective extends Directive {\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (\n !(\n partInfo.type === PartType.PROPERTY ||\n partInfo.type === PartType.ATTRIBUTE ||\n partInfo.type === PartType.BOOLEAN_ATTRIBUTE\n )\n ) {\n throw new Error(\n 'The `live` directive is not allowed on child or event bindings'\n );\n }\n if (!isSingleExpression(partInfo)) {\n throw new Error('`live` bindings can only contain a single expression');\n }\n }\n\n render(value: unknown) {\n return value;\n }\n\n override update(part: AttributePart, [value]: DirectiveParameters<this>) {\n if (value === noChange || value === nothing) {\n return value;\n }\n const element = part.element;\n const name = part.name;\n\n if (part.type === PartType.PROPERTY) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (value === (element as any)[name]) {\n return noChange;\n }\n } else if (part.type === PartType.BOOLEAN_ATTRIBUTE) {\n if (!!value === element.hasAttribute(name)) {\n return noChange;\n }\n } else if (part.type === PartType.ATTRIBUTE) {\n if (element.getAttribute(name) === String(value)) {\n return noChange;\n }\n }\n // Resets the part's value, causing its dirty-check to fail so that it\n // always sets the value.\n setCommittedValue(part);\n return value;\n }\n}\n\n/**\n * Checks binding values against live DOM values, instead of previously bound\n * values, when determining whether to update the value.\n *\n * This is useful for cases where the DOM value may change from outside of\n * lit-html, such as with a binding to an `<input>` element's `value` property,\n * a content editable elements text, or to a custom element that changes it's\n * own properties or attributes.\n *\n * In these cases if the DOM value changes, but the value set through lit-html\n * bindings hasn't, lit-html won't know to update the DOM value and will leave\n * it alone. If this is not what you want--if you want to overwrite the DOM\n * value with the bound value no matter what--use the `live()` directive:\n *\n * ```js\n * html`<input .value=${live(x)}>`\n * ```\n *\n * `live()` performs a strict equality check against the live DOM value, and if\n * the new value is equal to the live value, does nothing. This means that\n * `live()` should not be used when the binding will cause a type conversion. If\n * you use `live()` with an attribute binding, make sure that only strings are\n * passed in, or the binding will update every render.\n */\nexport const live = directive(LiveDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {LiveDirective};\n"],
5
- "mappings": "4GAqBA,GAAA,CAAOA,EAAYC,CAAAA,EAAaC,EAAhC,IAgFaC,EAAsBC,GAChCA,EAA2BC,UADKD,OAhFnC,IAmLME,EAAc,CAAA,EAaPC,EAAoB,CAACC,EAAYC,EAAiBH,IAC5DE,EAAKE,KAAmBD,MC3HdE,EAAOC,EA3EpB,cAA4BC,CAAAA,CAC1BC,YAAYC,EAAAA,CAEV,GADAC,MAAMD,CAAAA,EAGFA,EAASE,OAASC,EAASC,UAC3BJ,EAASE,OAASC,EAASE,WAC3BL,EAASE,OAASC,EAASG,kBAG7B,MAAUC,MACR,gEAAA,EAGJ,GAAA,CAAKC,EAAmBR,CAAAA,EACtB,MAAUO,MAAM,sDAAA,CAEnB,CAEDE,OAAOC,EAAAA,CACL,OAAOA,CACR,CAEQC,OAAOC,EAAAA,CAAsBF,CAAAA,EAAAA,CACpC,GAAIA,IAAUG,GAAYH,IAAUI,EAClC,OAAOJ,EAET,IAAMK,EAAUH,EAAKG,QACfC,EAAOJ,EAAKI,KAElB,GAAIJ,EAAKV,OAASC,EAASC,UAEzB,GAAIM,IAAWK,EAAgBC,CAAAA,EAC7B,OAAOH,UAEAD,EAAKV,OAASC,EAASG,mBAChC,GAAA,CAAA,CAAMI,IAAUK,EAAQE,aAAaD,CAAAA,EACnC,OAAOH,UAEAD,EAAKV,OAASC,EAASE,WAC5BU,EAAQG,aAAaF,CAAAA,IAAiBN,EAAPS,GACjC,OAAON,EAMX,OADAO,EAAkBR,CAAAA,EACXF,CACR,CAAA,CAAA",
6
- "names": ["_ChildPart", "ChildPart", "_$LH", "isSingleExpression", "part", "strings", "RESET_VALUE", "setCommittedValue", "part", "value", "_$committedValue", "live", "directive", "Directive", "constructor", "partInfo", "super", "type", "PartType", "PROPERTY", "ATTRIBUTE", "BOOLEAN_ATTRIBUTE", "Error", "isSingleExpression", "render", "value", "update", "part", "noChange", "nothing", "element", "name", "hasAttribute", "getAttribute", "String", "setCommittedValue"]
3
+ "sources": ["../node_modules/lit-html/src/directive-helpers.ts"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {\n _$LH,\n Part,\n DirectiveParent,\n TemplateResult,\n CompiledTemplateResult,\n} from './lit-html.js';\nimport {\n DirectiveResult,\n DirectiveClass,\n PartInfo,\n AttributePartInfo,\n} from './directive.js';\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\n\nconst {_ChildPart: ChildPart} = _$LH;\n\ntype ChildPart = InstanceType<typeof ChildPart>;\n\nconst ENABLE_SHADYDOM_NOPATCH = true;\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n window.ShadyDOM?.inUse &&\n window.ShadyDOM?.noPatch === true\n ? window.ShadyDOM!.wrap\n : (node: Node) => node;\n\n/**\n * Tests if a value is a primitive value.\n *\n * See https://tc39.github.io/ecma262/#sec-typeof-operator\n */\nexport const isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\n\nexport const TemplateResultType = {\n HTML: 1,\n SVG: 2,\n} as const;\n\nexport type TemplateResultType =\n (typeof TemplateResultType)[keyof typeof TemplateResultType];\n\ntype IsTemplateResult = {\n (val: unknown): val is TemplateResult | CompiledTemplateResult;\n <T extends TemplateResultType>(\n val: unknown,\n type: T\n ): val is TemplateResult<T>;\n};\n\n/**\n * Tests if a value is a TemplateResult or a CompiledTemplateResult.\n */\nexport const isTemplateResult: IsTemplateResult = (\n value: unknown,\n type?: TemplateResultType\n): value is TemplateResult =>\n type === undefined\n ? // This property needs to remain unminified.\n (value as TemplateResult)?.['_$litType$'] !== undefined\n : (value as TemplateResult)?.['_$litType$'] === type;\n\n/**\n * Tests if a value is a CompiledTemplateResult.\n */\nexport const isCompiledTemplateResult = (\n value: unknown\n): value is CompiledTemplateResult => {\n return (value as CompiledTemplateResult)?.['_$litType$']?.h != null;\n};\n\n/**\n * Tests if a value is a DirectiveResult.\n */\nexport const isDirectiveResult = (value: unknown): value is DirectiveResult =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'] !== undefined;\n\n/**\n * Retrieves the Directive class for a DirectiveResult\n */\nexport const getDirectiveClass = (value: unknown): DirectiveClass | undefined =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'];\n\n/**\n * Tests whether a part has only a single-expression with no strings to\n * interpolate between.\n *\n * Only AttributePart and PropertyPart can have multiple expressions.\n * Multi-expression parts have a `strings` property and single-expression\n * parts do not.\n */\nexport const isSingleExpression = (part: PartInfo) =>\n (part as AttributePartInfo).strings === undefined;\n\nconst createMarker = () => document.createComment('');\n\n/**\n * Inserts a ChildPart into the given container ChildPart's DOM, either at the\n * end of the container ChildPart, or before the optional `refPart`.\n *\n * This does not add the part to the containerPart's committed value. That must\n * be done by callers.\n *\n * @param containerPart Part within which to add the new ChildPart\n * @param refPart Part before which to add the new ChildPart; when omitted the\n * part added to the end of the `containerPart`\n * @param part Part to insert, or undefined to create a new part\n */\nexport const insertPart = (\n containerPart: ChildPart,\n refPart?: ChildPart,\n part?: ChildPart\n): ChildPart => {\n const container = wrap(containerPart._$startNode).parentNode!;\n\n const refNode =\n refPart === undefined ? containerPart._$endNode : refPart._$startNode;\n\n if (part === undefined) {\n const startNode = wrap(container).insertBefore(createMarker(), refNode);\n const endNode = wrap(container).insertBefore(createMarker(), refNode);\n part = new ChildPart(\n startNode,\n endNode,\n containerPart,\n containerPart.options\n );\n } else {\n const endNode = wrap(part._$endNode!).nextSibling;\n const oldParent = part._$parent;\n const parentChanged = oldParent !== containerPart;\n if (parentChanged) {\n part._$reparentDisconnectables?.(containerPart);\n // Note that although `_$reparentDisconnectables` updates the part's\n // `_$parent` reference after unlinking from its current parent, that\n // method only exists if Disconnectables are present, so we need to\n // unconditionally set it here\n part._$parent = containerPart;\n // Since the _$isConnected getter is somewhat costly, only\n // read it once we know the subtree has directives that need\n // to be notified\n let newConnectionState;\n if (\n part._$notifyConnectionChanged !== undefined &&\n (newConnectionState = containerPart._$isConnected) !==\n oldParent!._$isConnected\n ) {\n part._$notifyConnectionChanged(newConnectionState);\n }\n }\n if (endNode !== refNode || parentChanged) {\n let start: Node | null = part._$startNode;\n while (start !== endNode) {\n const n: Node | null = wrap(start!).nextSibling;\n wrap(container).insertBefore(start!, refNode);\n start = n;\n }\n }\n }\n\n return part;\n};\n\n/**\n * Sets the value of a Part.\n *\n * Note that this should only be used to set/update the value of user-created\n * parts (i.e. those created using `insertPart`); it should not be used\n * by directives to set the value of the directive's container part. Directives\n * should return a value from `update`/`render` to update their part state.\n *\n * For directives that require setting their part value asynchronously, they\n * should extend `AsyncDirective` and call `this.setValue()`.\n *\n * @param part Part to set\n * @param value Value to set\n * @param index For `AttributePart`s, the index to set\n * @param directiveParent Used internally; should not be set by user\n */\nexport const setChildPartValue = <T extends ChildPart>(\n part: T,\n value: unknown,\n directiveParent: DirectiveParent = part\n): T => {\n part._$setValue(value, directiveParent);\n return part;\n};\n\n// A sentinel value that can never appear as a part value except when set by\n// live(). Used to force a dirty-check to fail and cause a re-render.\nconst RESET_VALUE = {};\n\n/**\n * Sets the committed value of a ChildPart directly without triggering the\n * commit stage of the part.\n *\n * This is useful in cases where a directive needs to update the part such\n * that the next update detects a value change or not. When value is omitted,\n * the next update will be guaranteed to be detected as a change.\n *\n * @param part\n * @param value\n */\nexport const setCommittedValue = (part: Part, value: unknown = RESET_VALUE) =>\n (part._$committedValue = value);\n\n/**\n * Returns the committed value of a ChildPart.\n *\n * The committed value is used for change detection and efficient updates of\n * the part. It can differ from the value set by the template or directive in\n * cases where the template value is transformed before being committed.\n *\n * - `TemplateResult`s are committed as a `TemplateInstance`\n * - Iterables are committed as `Array<ChildPart>`\n * - All other types are committed as the template value or value returned or\n * set by a directive.\n *\n * @param part\n */\nexport const getCommittedValue = (part: ChildPart) => part._$committedValue;\n\n/**\n * Removes a ChildPart from the DOM, including any of its content.\n *\n * @param part The Part to remove\n */\nexport const removePart = (part: ChildPart) => {\n part._$notifyConnectionChanged?.(false, true);\n let start: ChildNode | null = part._$startNode;\n const end: ChildNode | null = wrap(part._$endNode!).nextSibling;\n while (start !== end) {\n const n: ChildNode | null = wrap(start!).nextSibling;\n (wrap(start!) as ChildNode).remove();\n start = n;\n }\n};\n\nexport const clearPart = (part: ChildPart) => {\n part._$clear();\n};\n"],
5
+ "mappings": "wCAqBA,GAAA,CAAOA,EAAYC,CAAAA,EAAaC,EAAhC,IAgFaC,EAAsBC,GAChCA,EAA2BC,UADKD,OAG7BE,EAAe,IAAMC,SAASC,cAAc,EAAA,EAcrCC,EAAa,CACxBC,EACAC,EACAP,IAAAA,CAAAA,IAAAA,EAEA,IAAMQ,EAAiBF,EAAcG,KAAaC,WAE5CC,EACJJ,IADII,OACoBL,EAAcM,KAAYL,EAAQE,KAE5D,GAAIT,IAAJ,OAAwB,CACtB,IAAMa,EAAiBL,EAAWM,aAAaZ,EAAAA,EAAgBS,CAAAA,EACzDI,EAAeP,EAAWM,aAAaZ,EAAAA,EAAgBS,CAAAA,EAC7DX,EAAO,IAAIgB,EACTH,EACAE,EACAT,EACAA,EAAcW,OAAAA,MAEX,CACL,IAAMF,EAAef,EAAKY,KAAYM,YAChCC,EAAYnB,EAAKoB,KACjBC,EAAgBF,IAAcb,EACpC,GAAIe,EAAe,CAUjB,IAAIC,GATJC,EAAAvB,EAAKwB,QAA4B,MAAAD,IAA5BC,QAA4BD,EAAAE,KAAAzB,EAAAM,CAAAA,EAKjCN,EAAKoB,KAAWd,EAMdN,EAAK0B,OANSpB,SAObgB,EAAqBhB,EAAcqB,QAClCR,EAAWQ,MAEb3B,EAAK0B,KAA0BJ,CAAAA,EAGnC,GAAIP,IAAYJ,GAAWU,EAAe,CACxC,IAAIO,EAAqB5B,EAAKS,KAC9B,KAAOmB,IAAUb,GAAS,CACxB,IAAMc,EAAsBD,EAAQV,YAC/BV,EAAWM,aAAac,EAAQjB,CAAAA,EACrCiB,EAAQC,IAKd,OAAO7B,CAAI,EAmBA8B,EAAoB,CAC/B9B,EACA+B,EACAC,EAAmChC,KAEnCA,EAAKiC,KAAWF,EAAOC,CAAAA,EAChBhC,GAKHkC,EAAc,CAAA,EAaPC,EAAoB,CAACnC,EAAY+B,EAAiBG,IAC5DlC,EAAKoC,KAAmBL,EAgBdM,EAAqBrC,GAAoBA,EAAKoC,KAO9CE,EAActC,GAAAA,CAAAA,IAAAA,GACzBuB,EAAAvB,EAAK0B,QAAyB,MAAAH,IAAzBG,QAAyBH,EAAAE,KAAAzB,EAAAA,GAAG,EAAO,EACxC,IAAI4B,EAA0B5B,EAAKS,KAC7B8B,EAA6BvC,EAAKY,KAAYM,YACpD,KAAOU,IAAUW,GAAK,CACpB,IAAMV,EAA2BD,EAAQV,YACnCU,EAAsBY,OAAAA,EAC5BZ,EAAQC,EACT",
6
+ "names": ["_ChildPart", "ChildPart", "_$LH", "isSingleExpression", "part", "strings", "createMarker", "document", "createComment", "insertPart", "containerPart", "refPart", "container", "_$startNode", "parentNode", "refNode", "_$endNode", "startNode", "insertBefore", "endNode", "ChildPart", "options", "nextSibling", "oldParent", "_$parent", "parentChanged", "newConnectionState", "_a", "_$reparentDisconnectables", "call", "_$notifyConnectionChanged", "_$isConnected", "start", "n", "setChildPartValue", "value", "directiveParent", "_$setValue", "RESET_VALUE", "setCommittedValue", "_$committedValue", "getCommittedValue", "removePart", "end", "remove"]
7
7
  }
@@ -0,0 +1,18 @@
1
+ import{a as b}from"./chunk-GRL4DWKG.js";import{a as h,b as a}from"./chunk-X2KXJYXQ.js";import{a as d}from"./chunk-DINNT5P2.js";import{a as s,b as c,f as n}from"./chunk-4OT5AMS5.js";import{c as r}from"./chunk-CYCIT2TG.js";var p=s`:host{display:inline-block;cursor:pointer;vertical-align:middle}span{display:inline-block}.switch{--track-height:var(--bl-size-xl);--track-width:var(--bl-size-4xl);--thumb-offset:var(--bl-size-4xs);--thumb-height:calc(var(--track-height) - calc(2 * var(--thumb-offset)));--thumb-width:var(--thumb-height);/* TODO: use predefined animation duration once it is ready */--animation-duration:var(--bl-switch-animation-duration, 300ms);--switch-color:var(--bl-switch-color-off, var(--bl-color-neutral-lighter));background-color:var(--switch-color);border-radius:var(--bl-border-radius-pill);height:var(--track-height);transition-property:background-color;transition-duration:var(--animation-duration);width:var(--track-width)}.switch::before{content:"";display:inline-block;background-color:white;border-radius:var(--bl-border-radius-circle);height:var(--thumb-height);left:var(--thumb-offset);position:relative;top:var(--thumb-offset);transition:transform;transition-duration:var(--animation-duration);width:var(--thumb-width)}label{display:flex;gap:var(--bl-size-2xs);color:var(--bl-color-neutral-darker);font:var(--bl-font-title-3);cursor:pointer;user-select:none;line-height:normal;align-items:center;margin-block:0}.label{overflow-wrap:anywhere}:host([disabled]) .label{color:var(--bl-color-neutral-light);border:1px solid var(--bl-color-neutral-lighter)}:host([checked]) .label,:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .label,:host(:hover) .label{color:var(--bl-color-primary)}:host([checked]) .switch{--switch-color:var(--bl-switch-color-on, var(--bl-switch-color, var(--bl-color-primary)))}:host([checked]) .switch::before{transform:translateX(
2
+ calc(var(--track-width) - var(--thumb-width) - calc(2 * var(--thumb-offset)))
3
+ )}:host([disabled]) .switch{opacity:0.5}:host([disabled]){cursor:not-allowed}.switch:focus-visible{position:relative;outline:none}.switch:focus-visible::after{border:2px solid var(--switch-color);border-radius:var(--bl-border-radius-pill);content:"";position:absolute;inset:-3px}`,u=p;var m="bl-switch",e=class extends n{constructor(){super(...arguments);this.checked=!1;this.disabled=!1}static get styles(){return[u]}toggle(){this.disabled||(this.checked=!this.checked,this.onToggle(this.checked))}handleKeyDown(t){(t.code==="Enter"||t.code==="Space")&&(this.toggle(),t.preventDefault())}render(){var o,i,l;let t=(l=(i=this.ariaLabel)!=null?i:(o=this.attributes.getNamedItem("aria-label"))==null?void 0:o.value)!=null?l:void 0;return c`
4
+ <label @click=${this.toggle}>
5
+ <slot class="label"></slot>
6
+ <span
7
+ class="switch"
8
+ role="switch"
9
+ aria-checked=${this.checked}
10
+ aria-readonly=${!!this.disabled}
11
+ @keydown=${this.handleKeyDown}
12
+ aria-label=${d(t)}
13
+ tabindex="0"
14
+ >
15
+ </span>
16
+ </label>
17
+ `}};r([a({type:Boolean,reflect:!0})],e.prototype,"checked",2),r([a({type:Boolean,reflect:!0})],e.prototype,"disabled",2),r([b("bl-switch-toggle")],e.prototype,"onToggle",2),e=r([h(m)],e);export{m as a,e as b};
18
+ //# sourceMappingURL=chunk-BEGAFK2I.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/switch/bl-switch.css", "../src/components/switch/bl-switch.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:inline-block;cursor:pointer;vertical-align:middle}span{display:inline-block}.switch{--track-height:var(--bl-size-xl);--track-width:var(--bl-size-4xl);--thumb-offset:var(--bl-size-4xs);--thumb-height:calc(var(--track-height) - calc(2 * var(--thumb-offset)));--thumb-width:var(--thumb-height);/* TODO: use predefined animation duration once it is ready */--animation-duration:var(--bl-switch-animation-duration, 300ms);--switch-color:var(--bl-switch-color-off, var(--bl-color-neutral-lighter));background-color:var(--switch-color);border-radius:var(--bl-border-radius-pill);height:var(--track-height);transition-property:background-color;transition-duration:var(--animation-duration);width:var(--track-width)}.switch::before{content:\"\";display:inline-block;background-color:white;border-radius:var(--bl-border-radius-circle);height:var(--thumb-height);left:var(--thumb-offset);position:relative;top:var(--thumb-offset);transition:transform;transition-duration:var(--animation-duration);width:var(--thumb-width)}label{display:flex;gap:var(--bl-size-2xs);color:var(--bl-color-neutral-darker);font:var(--bl-font-title-3);cursor:pointer;user-select:none;line-height:normal;align-items:center;margin-block:0}.label{overflow-wrap:anywhere}:host([disabled]) .label{color:var(--bl-color-neutral-light);border:1px solid var(--bl-color-neutral-lighter)}:host([checked]) .label,:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .label,:host(:hover) .label{color:var(--bl-color-primary)}:host([checked]) .switch{--switch-color:var(--bl-switch-color-on, var(--bl-switch-color, var(--bl-color-primary)))}:host([checked]) .switch::before{transform:translateX(\n calc(var(--track-width) - var(--thumb-width) - calc(2 * var(--thumb-offset)))\n )}:host([disabled]) .switch{opacity:0.5}:host([disabled]){cursor:not-allowed}.switch:focus-visible{position:relative;outline:none}.switch:focus-visible::after{border:2px solid var(--switch-color);border-radius:var(--bl-border-radius-pill);content:\"\";position:absolute;inset:-3px}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport style from \"./bl-switch.css\";\n\nexport const blSwitchTag = \"bl-switch\";\n\n/**\n * @tag bl-switch\n * @summary Baklava Switch component\n *\n * @cssproperty [--bl-switch-color-on=--bl-color-primary] Set the checked color\n * @cssproperty [--bl-switch-color-off=--bl-color-neutral-lighter] Set the unchecked color\n * @cssproperty [--bl-switch-animation-duration=300ms] Set the animation duration of switch toggle\n */\n@customElement(blSwitchTag)\nexport default class BlSwitch extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the checked state for switch\n */\n @property({ type: Boolean, reflect: true })\n checked = false;\n\n /**\n * Sets the disabled state for switch\n */\n @property({ type: Boolean, reflect: true })\n disabled? = false;\n\n /**\n * Fires whenever user toggles the switch\n */\n @event(\"bl-switch-toggle\") private onToggle: EventDispatcher<boolean>;\n\n toggle() {\n if (this.disabled) return;\n\n this.checked = !this.checked;\n this.onToggle(this.checked);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (event.code === \"Enter\" || event.code === \"Space\") {\n this.toggle();\n event.preventDefault();\n }\n }\n\n render(): TemplateResult {\n const ariaLabel =\n this.ariaLabel ?? this.attributes.getNamedItem(\"aria-label\")?.value ?? undefined;\n\n return html`\n <label @click=${this.toggle}>\n <slot class=\"label\"></slot>\n <span\n class=\"switch\"\n role=\"switch\"\n aria-checked=${this.checked}\n aria-readonly=${!!this.disabled}\n @keydown=${this.handleKeyDown}\n aria-label=${ifDefined(ariaLabel)}\n tabindex=\"0\"\n >\n </span>\n </label>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blSwitchTag]: BlSwitch;\n }\n}\n"],
5
+ "mappings": "6NACO,IAAMA,EAASC;AAAA;AAAA,2RAGfC,EAAQF,ECER,IAAMG,EAAc,YAWNC,EAArB,cAAsCC,CAAW,CAAjD,kCASE,aAAU,GAMV,cAAY,GAdZ,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAmBA,QAAS,CACH,KAAK,WAET,KAAK,QAAU,CAAC,KAAK,QACrB,KAAK,SAAS,KAAK,OAAO,EAC5B,CAEQ,cAAcC,EAAsB,EACtCA,EAAM,OAAS,SAAWA,EAAM,OAAS,WAC3C,KAAK,OAAO,EACZA,EAAM,eAAe,EAEzB,CAEA,QAAyB,CArD3B,IAAAC,EAAAC,EAAAC,EAsDI,IAAMC,GACJD,GAAAD,EAAA,KAAK,YAAL,KAAAA,GAAkBD,EAAA,KAAK,WAAW,aAAa,YAAY,IAAzC,YAAAA,EAA4C,QAA9D,KAAAE,EAAuE,OAEzE,OAAOE;AAAA,sBACW,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,yBAKF,KAAK;AAAA,0BACJ,CAAC,CAAC,KAAK;AAAA,qBACZ,KAAK;AAAA,uBACHC,EAAUF,CAAS;AAAA;AAAA;AAAA;AAAA;AAAA,KAMxC,CACF,EA/CEG,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARvBX,EASnB,uBAMAU,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAdvBX,EAenB,wBAKmCU,EAAA,CAAlCP,EAAM,kBAAkB,GApBNH,EAoBgB,wBApBhBA,EAArBU,EAAA,CADCC,EAAcZ,CAAW,GACLC",
6
+ "names": ["styles", "i", "bl_switch_default", "blSwitchTag", "BlSwitch", "s", "bl_switch_default", "event", "_a", "_b", "_c", "ariaLabel", "x", "l", "__decorateClass", "e"]
7
+ }
@@ -0,0 +1,2 @@
1
+ var k=Object.create,i=Object.freeze,f=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,n=Object.prototype.hasOwnProperty;var p=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports);var o=(b,a,d,e)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of l(a))!n.call(b,c)&&c!==d&&f(b,c,{get:()=>a[c],enumerable:!(e=j(a,c))||e.enumerable});return b};var q=(b,a,d)=>(d=b!=null?k(m(b)):{},o(a||!b||!b.__esModule?f(d,"default",{value:b,enumerable:!0}):d,b));var r=(b,a,d,e)=>{for(var c=e>1?void 0:e?j(a,d):a,g=b.length-1,h;g>=0;g--)(h=b[g])&&(c=(e?h(a,d,c):h(c))||c);return e&&c&&f(a,d,c),c};var s=(b,a)=>i(f(b,"raw",{value:i(a||b.slice())}));export{p as a,q as b,r as c,s as d};
2
+ //# sourceMappingURL=chunk-CYCIT2TG.js.map
@@ -0,0 +1,2 @@
1
+ var t=()=>({fromAttribute:r=>!r||r==="true"?!0:r==="false"?!1:r});export{t as a};
2
+ //# sourceMappingURL=chunk-ECPWEUBG.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/utilities/string-boolean.converter.ts"],
4
+ "sourcesContent": ["import type { ComplexAttributeConverter } from \"lit\";\n\nexport const stringBooleanConverter = (): ComplexAttributeConverter<string | boolean> => {\n return {\n fromAttribute: (value: string): string | boolean => {\n if (!value || value === \"true\") return true;\n if (value === \"false\") return false;\n return value;\n },\n };\n};\n"],
5
+ "mappings": "AAEO,IAAMA,EAAyB,KAC7B,CACL,cAAgBC,GACV,CAACA,GAASA,IAAU,OAAe,GACnCA,IAAU,QAAgB,GACvBA,CAEX",
6
+ "names": ["stringBooleanConverter", "value"]
7
+ }
@@ -1,4 +1,4 @@
1
- import{a as p}from"./chunk-GRL4DWKG.js";import{a as s,b as a,d as o}from"./chunk-IRDH7CN2.js";import{a as n}from"./chunk-DINNT5P2.js";import{a as i,b as r,f as l}from"./chunk-4OT5AMS5.js";import{c as t}from"./chunk-VO7C5OZC.js";var h=i`:host{display:contents}.trigger{display:var(--bl-tooltip-trigger-display, inline-flex);cursor:pointer}bl-popover{--bl-popover-background-color:var(--bl-color-neutral-darker);--bl-popover-arrow-display:block;--bl-popover-border-size:0px;--bl-popover-max-width:424px}.content{color:var(--bl-color-neutral-full)}`,m=h;var e=class extends l{constructor(){super(...arguments);this.placement="top"}static get styles(){return[m]}show(){this.popover.target=this.trigger,this.popover.show(),this.onShow("")}hide(){this.popover.hide(),this.onHide("")}get visible(){return this.popover.visible}triggerTemplate(){return r`<slot
1
+ import{a as p}from"./chunk-GRL4DWKG.js";import{a as s,b as a,e as o}from"./chunk-X2KXJYXQ.js";import{a as n}from"./chunk-DINNT5P2.js";import{a as i,b as r,f as l}from"./chunk-4OT5AMS5.js";import{c as t}from"./chunk-CYCIT2TG.js";var h=i`:host{display:contents}.trigger{display:var(--bl-tooltip-trigger-display, inline-flex);cursor:pointer}bl-popover{--bl-popover-background-color:var(--bl-color-info);--bl-popover-arrow-display:block;--bl-popover-border-size:0px;--bl-popover-max-width:424px}.content{color:var(--bl-color-neutral-full)}`,m=h;var e=class extends l{constructor(){super(...arguments);this.placement="top"}static get styles(){return[m]}show(){this.popover.target=this.trigger,this.popover.show(),this.onShow("")}hide(){this.popover.hide(),this.onHide("")}get visible(){return this.popover.visible}triggerTemplate(){return r`<slot
2
2
  class="trigger"
3
3
  name="tooltip-trigger"
4
4
  aria-describedby="tooltip"
@@ -17,4 +17,4 @@ import{a as p}from"./chunk-GRL4DWKG.js";import{a as s,b as a,d as o}from"./chunk
17
17
  <slot class="content" id="tooltip" role="tooltip"></slot>
18
18
  </bl-popover>
19
19
  `}};t([o(".trigger")],e.prototype,"trigger",2),t([o("bl-popover")],e.prototype,"popover",2),t([a({type:String})],e.prototype,"placement",2),t([p("bl-tooltip-show")],e.prototype,"onShow",2),t([p("bl-tooltip-hide")],e.prototype,"onHide",2),e=t([s("bl-tooltip")],e);export{e as a};
20
- //# sourceMappingURL=chunk-VGRVU3IL.js.map
20
+ //# sourceMappingURL=chunk-EPFBV6RC.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`:host{display:contents}.trigger{display:var(--bl-tooltip-trigger-display, inline-flex);cursor:pointer}bl-popover{--bl-popover-background-color:var(--bl-color-info);--bl-popover-arrow-display:block;--bl-popover-border-size:0px;--bl-popover-max-width:424px}.content{color:var(--bl-color-neutral-full)}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property, query } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { ReferenceElement } from \"@floating-ui/core\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport \"../popover/bl-popover\";\nimport type BlPopover from \"../popover/bl-popover\";\nimport { Placement } from \"../popover/bl-popover\";\nimport style from \"./bl-tooltip.css\";\n\n/**\n * @tag bl-tooltip\n * @summary Baklava Tooltip component\n * @dependency bl-popover\n *\n * @cssproperty [--bl-tooltip-trigger-display=inline-flex] Set the display of the tooltip trigger.\n */\n@customElement(\"bl-tooltip\")\nexport default class BlTooltip extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @query(\".trigger\") private trigger: ReferenceElement;\n @query(\"bl-popover\") private popover: BlPopover;\n\n /**\n * Sets placement of the tooltip\n */\n @property({ type: String })\n placement: Placement = \"top\";\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 /**\n * Shows tooltip\n */\n show() {\n this.popover.target = this.trigger;\n this.popover.show();\n this.onShow(\"\");\n }\n\n /**\n * Hides tooltip\n */\n hide() {\n this.popover.hide();\n this.onHide(\"\");\n }\n\n /**\n * Gives the visibility status of the tooltip\n */\n get visible(): boolean {\n return this.popover.visible;\n }\n\n private triggerTemplate() {\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 }\n\n render(): TemplateResult {\n return html`\n ${this.triggerTemplate()}\n <bl-popover\n .target=\"${this.trigger}\"\n placement=\"${ifDefined(this.placement)}\"\n @bl-popover-hide=\"${() => this.onHide(\"\")}\"\n >\n <slot class=\"content\" id=\"tooltip\" role=\"tooltip\"></slot>\n </bl-popover>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bl-tooltip\": BlTooltip;\n }\n}\n"],
5
+ "mappings": "oOACO,IAAMA,EAAS,+SACfC,EAAQD,ECgBf,IAAqBE,EAArB,cAAuCC,CAAW,CAAlD,kCAYE,eAAuB,MAXvB,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAwBA,MAAO,CACL,KAAK,QAAQ,OAAS,KAAK,QAC3B,KAAK,QAAQ,KAAK,EAClB,KAAK,OAAO,EAAE,CAChB,CAKA,MAAO,CACL,KAAK,QAAQ,KAAK,EAClB,KAAK,OAAO,EAAE,CAChB,CAKA,IAAI,SAAmB,CACrB,OAAO,KAAK,QAAQ,OACtB,CAEQ,iBAAkB,CACxB,OAAOC;AAAA;AAAA;AAAA;AAAA,eAII,CAAE,YAAa,IAAM,KAAK,KAAK,EAAG,QAAS,EAAK;AAAA,cACjD,CAAE,YAAa,IAAM,KAAK,KAAK,EAAG,QAAS,EAAK;AAAA,mBAC3C,IAAM,KAAK,KAAK;AAAA,oBACf,IAAM,KAAK,KAAK;AAAA;AAAA,YAGlC,CAEA,QAAyB,CACvB,OAAOA;AAAA,QACH,KAAK,gBAAgB;AAAA;AAAA,mBAEV,KAAK;AAAA,qBACHC,EAAU,KAAK,SAAS;AAAA,4BACjB,IAAM,KAAK,OAAO,EAAE;AAAA;AAAA;AAAA;AAAA,KAK9C,CACF,EApE6BC,EAAA,CAA1BC,EAAM,UAAU,GALEN,EAKQ,uBACEK,EAAA,CAA5BC,EAAM,YAAY,GANAN,EAMU,uBAM7BK,EAAA,CADCE,EAAS,CAAE,KAAM,MAAO,CAAC,GAXPP,EAYnB,yBAKkCK,EAAA,CAAjCG,EAAM,iBAAiB,GAjBLR,EAiBe,sBAKAK,EAAA,CAAjCG,EAAM,iBAAiB,GAtBLR,EAsBe,sBAtBfA,EAArBK,EAAA,CADCE,EAAc,YAAY,GACNP",
6
+ "names": ["styles", "bl_tooltip_default", "BlTooltip", "s", "bl_tooltip_default", "x", "l", "__decorateClass", "i", "e", "event"]
7
+ }
@@ -1,4 +1,4 @@
1
- import{a as f}from"./chunk-OSNB4BPE.js";import{a as m}from"./chunk-YOV2DMM7.js";import{a as g}from"./chunk-DJOD4BTL.js";import{a as u}from"./chunk-R5GCM62W.js";import{a as p}from"./chunk-6LT7O7T2.js";import{a as n}from"./chunk-GRL4DWKG.js";import{a as v,b as i,c,d as b}from"./chunk-IRDH7CN2.js";import{a as r}from"./chunk-DINNT5P2.js";import{a as h,b as l,f as d}from"./chunk-4OT5AMS5.js";import{c as t}from"./chunk-VO7C5OZC.js";var S=h`:host{display:inline-block;width:200px;position:relative}.wrapper{--border-color:var(--bl-color-neutral-lighter);--icon-color:var(--bl-color-neutral-light);--text-color:var(--bl-color-neutral-darker);--height:var(--bl-size-2xl);--input-font:var(--bl-font-body-text-2);--line-height:var(--bl-font-body-text-2-line-height);--icon-size:var(--line-height);--icon-gap:var(--bl-size-xs);--padding-vertical:calc((var(--height) - var(--line-height)) / 2);--padding-horizontal:var(--bl-size-xs);--autofill-bg-color:var(--bl-color-primary-contrast);--label-padding:var(--bl-size-3xs);--background-color:var(--bl-color-neutral-full);display:grid;position:relative;gap:var(--bl-size-3xs)}.wrapper:focus-within{--border-color:var(--bl-color-primary);--icon-color:var(--bl-color-primary)}.wrapper.dirty.invalid{--border-color:var(--bl-color-danger);--icon-color:var(--bl-color-danger)}:host([size="large"]) .wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m);--icon-gap:var(--bl-size-m)}:host([size="small"]) .wrapper{--height:var(--bl-size-xl);--input-font:var(--bl-font-body-text-3);--padding-vertical:var(--bl-size-3xs);--icon-size:var(--bl-font-body-text-3-line-height);--icon-gap:var(--bl-size-2xs)}.input-wrapper{--border-size:1px;outline:none;display:flex;box-sizing:border-box;gap:var(--padding-vertical);height:var(--height);border:solid var(--border-size) var(--border-color);padding:0 calc(
1
+ import{a as f}from"./chunk-OSNB4BPE.js";import{a as m}from"./chunk-AAGDUS7G.js";import{a as g}from"./chunk-DJOD4BTL.js";import{a as u}from"./chunk-WA7DDIST.js";import{a as p}from"./chunk-6LT7O7T2.js";import{a as n}from"./chunk-GRL4DWKG.js";import{a as v,b as i,c,e as b}from"./chunk-X2KXJYXQ.js";import{a as r}from"./chunk-DINNT5P2.js";import{a as h,b as l,f as d}from"./chunk-4OT5AMS5.js";import{c as t}from"./chunk-CYCIT2TG.js";var S=h`:host{display:inline-block;width:200px;position:relative}.wrapper{--border-color:var(--bl-color-neutral-lighter);--icon-color:var(--bl-color-neutral-light);--text-color:var(--bl-color-neutral-darker);--height:var(--bl-size-2xl);--input-font:var(--bl-font-body-text-2);--line-height:var(--bl-font-body-text-2-line-height);--icon-size:var(--line-height);--icon-gap:var(--bl-size-xs);--padding-vertical:calc((var(--height) - var(--line-height)) / 2);--padding-horizontal:var(--bl-size-xs);--autofill-bg-color:var(--bl-color-primary-contrast);--label-padding:var(--bl-size-3xs);--background-color:var(--bl-color-neutral-full);display:grid;position:relative;gap:var(--bl-size-3xs)}.wrapper:focus-within{--border-color:var(--bl-color-primary);--icon-color:var(--bl-color-primary)}.wrapper.dirty.invalid{--border-color:var(--bl-color-danger);--icon-color:var(--bl-color-danger)}:host([size="large"]) .wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m);--icon-gap:var(--bl-size-m)}:host([size="small"]) .wrapper{--height:var(--bl-size-xl);--input-font:var(--bl-font-body-text-3);--padding-vertical:var(--bl-size-3xs);--icon-size:var(--bl-font-body-text-3-line-height);--icon-gap:var(--bl-size-2xs)}.input-wrapper{--border-size:1px;outline:none;display:flex;box-sizing:border-box;gap:var(--padding-vertical);height:var(--height);border:solid var(--border-size) var(--border-color);padding:0 calc(
2
2
  var(--bl-input-padding-end, var(--padding-horizontal)) - var(--label-padding) -
3
3
  var(--border-size)
4
4
  ) 0 calc(
@@ -60,4 +60,4 @@ import{a as f}from"./chunk-OSNB4BPE.js";import{a as m}from"./chunk-YOV2DMM7.js";
60
60
  </fieldset>
61
61
  <div class="hint">${a} ${o}</div>
62
62
  </div>`}};e.shadowRootOptions={...d.shadowRootOptions,delegatesFocus:!0},e.formControlValidators=f,t([b("input")],e.prototype,"validationTarget",2),t([i({reflect:!0})],e.prototype,"name",2),t([i({reflect:!0})],e.prototype,"type",2),t([i({reflect:!0})],e.prototype,"label",2),t([i({reflect:!0})],e.prototype,"placeholder",2),t([i({reflect:!0})],e.prototype,"value",2),t([i({type:Boolean,reflect:!0})],e.prototype,"required",2),t([i({type:Number,reflect:!0})],e.prototype,"minlength",2),t([i({type:Number,reflect:!0})],e.prototype,"maxlength",2),t([i({reflect:!0})],e.prototype,"min",2),t([i({reflect:!0})],e.prototype,"max",2),t([i({type:String,reflect:!0})],e.prototype,"pattern",2),t([i({type:Number,reflect:!0})],e.prototype,"step",2),t([i({type:String,reflect:!0})],e.prototype,"autocomplete",2),t([i({type:String,reflect:!0})],e.prototype,"inputmode",2),t([i({type:Boolean,reflect:!0})],e.prototype,"autofocus",2),t([i({type:String,reflect:!0})],e.prototype,"icon",2),t([i({type:String,reflect:!0})],e.prototype,"size",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"readonly",2),t([i({type:Boolean,attribute:"label-fixed",reflect:!0})],e.prototype,"labelFixed",2),t([i({type:String,attribute:"invalid-text",reflect:!0})],e.prototype,"customInvalidText",1),t([i({type:String,attribute:"help-text",reflect:!0})],e.prototype,"helpText",2),t([n("bl-change")],e.prototype,"onChange",2),t([n("bl-input")],e.prototype,"onInput",2),t([n("bl-invalid")],e.prototype,"onInvalid",2),t([c()],e.prototype,"dirty",2),t([c()],e.prototype,"passwordVisible",2),e=t([v("bl-input")],e);export{e as a};
63
- //# sourceMappingURL=chunk-OQ22A5U6.js.map
63
+ //# sourceMappingURL=chunk-FJTTJ5ZT.js.map
@@ -1,4 +1,4 @@
1
- import{a as h}from"./chunk-GRL4DWKG.js";import{a as c,b as i,c as g}from"./chunk-IRDH7CN2.js";import{a as o}from"./chunk-DINNT5P2.js";import{a as u,b as s,f as p}from"./chunk-4OT5AMS5.js";import{c as r}from"./chunk-VO7C5OZC.js";var b=u`.pagination{display:flex;flex-wrap:wrap;justify-content:center;max-width:max-content;gap:var(--bl-size-s)}.pagination *{margin:0;padding:0;box-sizing:border-box}.page-container{display:flex;align-items:center}.page-list{display:flex;align-items:center;list-style:none;user-select:none;gap:var(--bl-size-3xs)}.dots{margin:0 var(--bl-size-2xs)}.dots::before{content:" \\B7 \\B7 \\B7";color:var(--bl-color-neutral-darker)}.pagination-helpers{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:var(--bl-size-m);color:var(--bl-color-neutral-darker)}.jumper,.select{display:flex;align-items:center;gap:var(--bl-size-2xs)}label{font:var(--bl-font-title-3-medium);font-size:var(--bl-font-size-m);font-weight:var(--bl-font-weight-medium);line-height:var(--bl-font-size-m);letter-spacing:0;user-select:none}bl-input{width:62px}bl-select{width:auto}@media only screen and (max-width: 768px){label{display:none}}`,m=b;var t=class extends p{constructor(){super(...arguments);this.currentPage=1;this.totalItems=0;this.itemsPerPage=10;this.hasJumper=!1;this.jumperLabel="Go To";this.hasSelect=!1;this.selectLabel="Show";this.itemsPerPageOptions=[{text:"10 Items",value:10},{text:"25 Items",value:25},{text:"50 Items",value:50},{text:"100 Items",value:100}];this.pages=[]}static get styles(){return[m]}connectedCallback(){super.connectedCallback(),setTimeout(()=>{window==null||window.addEventListener("resize",()=>this._paginate())})}disconnectedCallback(){super.disconnectedCallback(),window==null||window.removeEventListener("resize",this._paginate)}updated(e){(e.has("currentPage")||e.has("itemsPerPage")||e.has("totalItems"))&&this._paginate()}_paginate(){this.pages=[];let e=Math.ceil(Math.abs(this.totalItems/this.itemsPerPage))||1;if(e<=8){this.pages=Array.from(Array(e),(a,l)=>l+1);return}this.pages.push(1),this.currentPage<5?this.pages.push(2,3,4,5,"..."):this.currentPage>=5&&this.currentPage<=e-4?this.pages.push("...",this.currentPage-1,this.currentPage,this.currentPage+1,"..."):this.pages.push("...",e-4,e-3,e-2,e-1),this.pages.push(e)}_changePage(e){let a=this.currentPage;this.currentPage=e,this.onChange({selectedPage:e,prevPage:a,itemsPerPage:this.itemsPerPage})}_pageBack(){this.currentPage!==1&&this._changePage(this.currentPage-1)}_pageForward(){this.currentPage!==this._getLastPage()&&this._changePage(this.currentPage+1)}_getLastPage(){return+this.pages[this.pages.length-1]}_inputHandler(e){e.stopPropagation();let a=+e.target.value,l=a>0?Math.min(this._getLastPage(),a):1;this._changePage(l)}_selectHandler(e){var a;this.itemsPerPage=+((a=e==null?void 0:e.detail[0])==null?void 0:a.value)||100,this._changePage(1)}_renderSinglePage(e){if(typeof e=="string")return s`<li class="dots"></li>`;let a=this.currentPage===e?"page":void 0;return s` <li>
1
+ import{a as h}from"./chunk-GRL4DWKG.js";import{a as c,b as i,c as g}from"./chunk-X2KXJYXQ.js";import{a as o}from"./chunk-DINNT5P2.js";import{a as u,b as s,f as p}from"./chunk-4OT5AMS5.js";import{c as r}from"./chunk-CYCIT2TG.js";var b=u`.pagination{display:flex;flex-wrap:wrap;justify-content:center;max-width:max-content;gap:var(--bl-size-s)}.pagination *{margin:0;padding:0;box-sizing:border-box}.page-container{display:flex;align-items:center}.page-list{display:flex;align-items:center;list-style:none;user-select:none;gap:var(--bl-size-3xs)}.dots{margin:0 var(--bl-size-2xs)}.dots::before{content:" \\B7 \\B7 \\B7";color:var(--bl-color-neutral-darker)}.pagination-helpers{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:var(--bl-size-m);color:var(--bl-color-neutral-darker)}.jumper,.select{display:flex;align-items:center;gap:var(--bl-size-2xs)}label{font:var(--bl-font-title-3-medium);font-size:var(--bl-font-size-m);font-weight:var(--bl-font-weight-medium);line-height:var(--bl-font-size-m);letter-spacing:0;user-select:none}bl-input{width:62px}bl-select{width:auto}@media only screen and (max-width: 768px){label{display:none}}`,m=b;var t=class extends p{constructor(){super(...arguments);this.currentPage=1;this.totalItems=0;this.itemsPerPage=10;this.hasJumper=!1;this.jumperLabel="Go To";this.hasSelect=!1;this.selectLabel="Show";this.itemsPerPageOptions=[{text:"10 Items",value:10},{text:"25 Items",value:25},{text:"50 Items",value:50},{text:"100 Items",value:100}];this.pages=[]}static get styles(){return[m]}connectedCallback(){super.connectedCallback(),setTimeout(()=>{window==null||window.addEventListener("resize",()=>this._paginate())})}disconnectedCallback(){super.disconnectedCallback(),window==null||window.removeEventListener("resize",this._paginate)}updated(e){(e.has("currentPage")||e.has("itemsPerPage")||e.has("totalItems"))&&this._paginate()}_paginate(){this.pages=[];let e=Math.ceil(Math.abs(this.totalItems/this.itemsPerPage))||1;if(e<=8){this.pages=Array.from(Array(e),(a,l)=>l+1);return}this.pages.push(1),this.currentPage<5?this.pages.push(2,3,4,5,"..."):this.currentPage>=5&&this.currentPage<=e-4?this.pages.push("...",this.currentPage-1,this.currentPage,this.currentPage+1,"..."):this.pages.push("...",e-4,e-3,e-2,e-1),this.pages.push(e)}_changePage(e){let a=this.currentPage;this.currentPage=e,this.onChange({selectedPage:e,prevPage:a,itemsPerPage:this.itemsPerPage})}_pageBack(){this.currentPage!==1&&this._changePage(this.currentPage-1)}_pageForward(){this.currentPage!==this._getLastPage()&&this._changePage(this.currentPage+1)}_getLastPage(){return+this.pages[this.pages.length-1]}_inputHandler(e){e.stopPropagation();let a=+e.target.value,l=a>0?Math.min(this._getLastPage(),a):1;this._changePage(l)}_selectHandler(e){var a;this.itemsPerPage=+((a=e==null?void 0:e.detail[0])==null?void 0:a.value)||100,this._changePage(1)}_renderSinglePage(e){if(typeof e=="string")return s`<li class="dots"></li>`;let a=this.currentPage===e?"page":void 0;return s` <li>
2
2
  <bl-button
3
3
  @click="${()=>this._changePage(e)}"
4
4
  variant=${this.currentPage===e?"primary":"tertiary"}
@@ -47,4 +47,4 @@ import{a as h}from"./chunk-GRL4DWKG.js";import{a as c,b as i,c as g}from"./chunk
47
47
  </div>`:null;return s` <nav class="pagination" aria-label="Pagination">
48
48
  ${(()=>{if(!(!this.hasSelect&&!this.hasJumper))return s` <div class="pagination-helpers">${e} ${a}</div> `})()} ${this.renderPages()}
49
49
  </nav>`}};r([i({attribute:"current-page",type:Number,reflect:!0})],t.prototype,"currentPage",2),r([i({attribute:"total-items",type:Number})],t.prototype,"totalItems",2),r([i({attribute:"items-per-page",type:Number,reflect:!0})],t.prototype,"itemsPerPage",2),r([i({attribute:"has-jumper",type:Boolean})],t.prototype,"hasJumper",2),r([i({attribute:"jumper-label",type:String})],t.prototype,"jumperLabel",2),r([i({attribute:"has-select",type:Boolean})],t.prototype,"hasSelect",2),r([i({attribute:"select-label",type:String})],t.prototype,"selectLabel",2),r([i({type:Array,attribute:!1})],t.prototype,"itemsPerPageOptions",2),r([g()],t.prototype,"pages",2),r([h("bl-change")],t.prototype,"onChange",2),t=r([c("bl-pagination")],t);export{t as a};
50
- //# sourceMappingURL=chunk-2HHDYA7P.js.map
50
+ //# sourceMappingURL=chunk-FSFO7DCO.js.map
@@ -1,4 +1,4 @@
1
- import{a as m}from"./chunk-GRL4DWKG.js";import{a as f,b as v,c as g}from"./chunk-IRDH7CN2.js";import{a as x}from"./chunk-3USCFSFQ.js";import{b as u}from"./chunk-7GK5LKBV.js";import{a as c,b as p,f as d}from"./chunk-4OT5AMS5.js";import{c as e}from"./chunk-VO7C5OZC.js";var o=class extends x{};o.directiveName="unsafeSVG",o.resultType=2;var y=u(o);var l="./assets";function S(s){l=s}function w(){return l}var E=import.meta.url;E&&S(new URL(l,E).toString());var $=c`:host{display:inline-block}:host div{display:flex;align-items:stretch;width:1em;height:1em;min-width:1em;min-height:1em;overflow:hidden;transform:translateZ(0)}:host svg{width:1em;height:1em}`,P=$;var h=new Map,t=class extends d{static get styles(){return[P]}get name(){return this._iconName}set name(n){n!==this._iconName&&(this._iconName=n,this.load())}async load(){let r=`${w()}/${this.name}.svg`;h.has(r)||h.set(r,fetch(r));try{let i=await h.get(r),a=i==null?void 0:i.clone();a!=null&&a.ok?(this.svg=await a.text(),this.onLoad(`${this.name} icon loaded`),this.requestUpdate()):this.onError(`${this.name} icon failed to load`)}catch(i){this.onError(`${this.name} icon failed to load [${i}]`)}}render(){return p`<div aria-hidden="true">${y(this.svg)}</div>`}};e([v()],t.prototype,"name",1),e([m("bl-load")],t.prototype,"onLoad",2),e([m("bl-error")],t.prototype,"onError",2),e([g()],t.prototype,"svg",2),t=e([f("bl-icon")],t);export{S as a,w as b,t as c};
1
+ import{a as m}from"./chunk-GRL4DWKG.js";import{a as f,b as v,c as g}from"./chunk-X2KXJYXQ.js";import{a as x}from"./chunk-3USCFSFQ.js";import{b as u}from"./chunk-7GK5LKBV.js";import{a as c,b as p,f as d}from"./chunk-4OT5AMS5.js";import{c as e}from"./chunk-CYCIT2TG.js";var o=class extends x{};o.directiveName="unsafeSVG",o.resultType=2;var y=u(o);var l="./assets";function S(s){l=s}function w(){return l}var E=import.meta.url;E&&S(new URL(l,E).toString());var $=c`:host{display:inline-block}:host div{display:flex;align-items:stretch;width:1em;height:1em;min-width:1em;min-height:1em;overflow:hidden;transform:translateZ(0)}:host svg{width:1em;height:1em}`,P=$;var h=new Map,t=class extends d{static get styles(){return[P]}get name(){return this._iconName}set name(n){n!==this._iconName&&(this._iconName=n,this.load())}async load(){let r=`${w()}/${this.name}.svg`;h.has(r)||h.set(r,fetch(r));try{let i=await h.get(r),a=i==null?void 0:i.clone();a!=null&&a.ok?(this.svg=await a.text(),this.onLoad(`${this.name} icon loaded`),this.requestUpdate()):this.onError(`${this.name} icon failed to load`)}catch(i){this.onError(`${this.name} icon failed to load [${i}]`)}}render(){return p`<div aria-hidden="true">${y(this.svg)}</div>`}};e([v()],t.prototype,"name",1),e([m("bl-load")],t.prototype,"onLoad",2),e([m("bl-error")],t.prototype,"onError",2),e([g()],t.prototype,"svg",2),t=e([f("bl-icon")],t);export{S as a,w as b,t as c};
2
2
  /*! Bundled license information:
3
3
 
4
4
  lit-html/directives/unsafe-svg.js:
@@ -8,4 +8,4 @@ lit-html/directives/unsafe-svg.js:
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
9
  *)
10
10
  */
11
- //# sourceMappingURL=chunk-LDNUCSUE.js.map
11
+ //# sourceMappingURL=chunk-JI2OEPG2.js.map
@@ -1,7 +1,7 @@
1
- import{a as u,b as a,c as s,d as p}from"./chunk-IRDH7CN2.js";import{a as i,b as l,f as o}from"./chunk-4OT5AMS5.js";import{c as r}from"./chunk-VO7C5OZC.js";var m=i`.progress-indicator{--max:100;--value:0;--value-color:var(--bl-color-success);--height:var(--bl-size-2xs);--radius:var(--bl-border-radius-s);position:relative;background-color:var(--bl-color-neutral-lightest);height:var(--height);border-radius:var(--radius);width:100%}.progress-indicator::before{content:"";position:absolute;height:100%;width:calc(100% / var(--max) * var(--value));background-color:var(--value-color);border-radius:var(--radius);transition:width ease var(--bl-progress-indicator-transition-duration, 0.2s)}:host([size="small"]) .progress-indicator{--height:var(--bl-size-3xs);--radius:var(--bl-border-radius-xs)}:host([size="large"]) .progress-indicator{--height:var(--bl-size-xs);--radius:var(--bl-border-radius-m)}:host([failed]) .progress-indicator{--value-color:var(--bl-color-danger)}`,d=m;var e=class extends o{constructor(){super(...arguments);this.size="medium";this.failed=!1;this._max=100;this._value=0}static get styles(){return d}get max(){return this._max}set max(t){this._max=t,this.updateCssVariable()}get value(){return this._value}set value(t){this._value=t,this.updateCssVariable()}async updateCssVariable(){await this.updateComplete,this.wrapper.style.setProperty("--value",`${this.value}`),this.wrapper.style.setProperty("--max",`${this.max}`)}render(){return l`<div
1
+ import{a as u,b as a,c as s,e as p}from"./chunk-X2KXJYXQ.js";import{a as i,b as l,f as o}from"./chunk-4OT5AMS5.js";import{c as r}from"./chunk-CYCIT2TG.js";var m=i`.progress-indicator{--max:100;--value:0;--value-color:var(--bl-color-success);--height:var(--bl-size-2xs);--radius:var(--bl-border-radius-s);position:relative;background-color:var(--bl-color-neutral-lightest);height:var(--height);border-radius:var(--radius);width:100%}.progress-indicator::before{content:"";position:absolute;height:100%;width:calc(100% / var(--max) * var(--value));background-color:var(--value-color);border-radius:var(--radius);transition:width ease var(--bl-progress-indicator-transition-duration, 0.2s)}:host([size="small"]) .progress-indicator{--height:var(--bl-size-3xs);--radius:var(--bl-border-radius-xs)}:host([size="large"]) .progress-indicator{--height:var(--bl-size-xs);--radius:var(--bl-border-radius-m)}:host([failed]) .progress-indicator{--value-color:var(--bl-color-danger)}`,d=m;var e=class extends o{constructor(){super(...arguments);this.size="medium";this.failed=!1;this._max=100;this._value=0}static get styles(){return d}get max(){return this._max}set max(t){this._max=t,this.updateCssVariable()}get value(){return this._value}set value(t){this._value=t,this.updateCssVariable()}async updateCssVariable(){await this.updateComplete,this.wrapper.style.setProperty("--value",`${this.value}`),this.wrapper.style.setProperty("--max",`${this.max}`)}render(){return l`<div
2
2
  class="progress-indicator"
3
3
  role="progressbar"
4
4
  aria-valuemax="${this._max}"
5
5
  aria-valuenow="${this._value}"
6
6
  ></div>`}};r([p(".progress-indicator")],e.prototype,"wrapper",2),r([a({type:String,reflect:!0})],e.prototype,"size",2),r([a({type:Boolean,reflect:!0})],e.prototype,"failed",2),r([a({type:Number})],e.prototype,"max",1),r([a({type:Number})],e.prototype,"value",1),r([s()],e.prototype,"_max",2),r([s()],e.prototype,"_value",2),e=r([u("bl-progress-indicator")],e);export{e as a};
7
- //# sourceMappingURL=chunk-RMYPWPMS.js.map
7
+ //# sourceMappingURL=chunk-KR6AUZ77.js.map
@@ -1,4 +1,4 @@
1
- import{a}from"./chunk-GRL4DWKG.js";import{a as l,b as n,c as d}from"./chunk-IRDH7CN2.js";import{a as o,b as i,f as s}from"./chunk-4OT5AMS5.js";import{c as t}from"./chunk-VO7C5OZC.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-neutral-full);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transition:right var(--bl-drawer-animation-duration, 0.25s);z-index:var(--bl-index-sticky)}:host([open]) .drawer{right:0}iframe{height:100%;width:100%;border:none}.container{display:flex;flex-direction:column;gap:var(--bl-size-xl);flex:1;width:100%}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);background-color:white}header .header-buttons{display:flex;gap:var(--bl-size-xl);margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-neutral-darker);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-GRL4DWKG.js";import{a as l,b as n,c as d}from"./chunk-X2KXJYXQ.js";import{a as o,b as i,f as s}from"./chunk-4OT5AMS5.js";import{c as t}from"./chunk-CYCIT2TG.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-neutral-full);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transition:right var(--bl-drawer-animation-duration, 0.25s);z-index:var(--bl-index-sticky)}:host([open]) .drawer{right:0}iframe{height:100%;width:100%;border:none}.container{display:flex;flex-direction:column;gap:var(--bl-size-xl);flex:1;width:100%}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);background-color:white}header .header-buttons{display:flex;gap:var(--bl-size-xl);margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-neutral-darker);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-GRL4DWKG.js";import{a as l,b as n,c as d}from"./chunk-IRDH
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-4CK6AU4F.js.map
26
+ //# sourceMappingURL=chunk-KXWP6EDU.js.map