@trendyol/baklava 3.4.0-beta.9 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/baklava-react.d.ts +262 -307
  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-svelte.d.ts +807 -0
  6. package/dist/baklava-vue.d.ts +26 -24
  7. package/dist/baklava.d.ts +22 -19
  8. package/dist/baklava.d.ts.map +1 -1
  9. package/dist/baklava.js +1 -1
  10. package/dist/chunk-3IZAFXL6.js +59 -0
  11. package/dist/chunk-3IZAFXL6.js.map +7 -0
  12. package/dist/chunk-5NSAJ3SX.js +23 -0
  13. package/dist/chunk-5NSAJ3SX.js.map +7 -0
  14. package/dist/{chunk-YLNOOPBO.js → chunk-5QGKDF4O.js} +2 -2
  15. package/dist/chunk-7N7YHRPA.js +22 -0
  16. package/dist/chunk-7N7YHRPA.js.map +7 -0
  17. package/dist/chunk-BDTCJ2JC.js +16 -0
  18. package/dist/chunk-BDTCJ2JC.js.map +7 -0
  19. package/dist/{chunk-4BO66Y63.js → chunk-C2UDBDKV.js} +7 -6
  20. package/dist/chunk-C2UDBDKV.js.map +7 -0
  21. package/dist/chunk-HCSEQTUP.js +37 -0
  22. package/dist/chunk-HCSEQTUP.js.map +7 -0
  23. package/dist/chunk-IEFQ6PGY.js +80 -0
  24. package/dist/chunk-IEFQ6PGY.js.map +7 -0
  25. package/dist/chunk-IR2QY2VG.js +24 -0
  26. package/dist/chunk-IR2QY2VG.js.map +7 -0
  27. package/dist/chunk-JN5BKKQZ.js +14 -0
  28. package/dist/chunk-JN5BKKQZ.js.map +7 -0
  29. package/dist/{chunk-KIQZ3N7J.js → chunk-JTNWYMYZ.js} +2 -2
  30. package/dist/{chunk-2Q566BEQ.js → chunk-KYLWO3YR.js} +14 -14
  31. package/dist/chunk-KYLWO3YR.js.map +7 -0
  32. package/dist/{chunk-6PSDYX3J.js → chunk-LZ6VDMPM.js} +2 -2
  33. package/dist/chunk-M4E4CVZ4.js +18 -0
  34. package/dist/{chunk-M54AQSC3.js.map → chunk-M4E4CVZ4.js.map} +2 -2
  35. package/dist/components/accordion-group/accordion/bl-accordion.d.ts +1 -0
  36. package/dist/components/accordion-group/accordion/bl-accordion.d.ts.map +1 -1
  37. package/dist/components/accordion-group/accordion/bl-accordion.js +1 -1
  38. package/dist/components/accordion-group/bl-accordion-group.test.d.ts.map +1 -1
  39. package/dist/components/calendar/bl-calendar.d.ts.map +1 -1
  40. package/dist/components/calendar/bl-calendar.js +1 -1
  41. package/dist/components/calendar/bl-calendar.test.d.ts.map +1 -1
  42. package/dist/components/datepicker/bl-datepicker.d.ts.map +1 -1
  43. package/dist/components/datepicker/bl-datepicker.js +1 -1
  44. package/dist/components/dialog/bl-dialog.stories.js +1 -1
  45. package/dist/components/input/bl-input.js +1 -1
  46. package/dist/components/link/bl-link.d.ts +77 -0
  47. package/dist/components/link/bl-link.d.ts.map +1 -0
  48. package/dist/components/link/bl-link.js +2 -0
  49. package/dist/components/link/bl-link.js.map +7 -0
  50. package/dist/components/link/bl-link.stories.d.ts +31 -0
  51. package/dist/components/link/bl-link.stories.d.ts.map +1 -0
  52. package/dist/components/link/bl-link.stories.js +63 -0
  53. package/dist/components/link/bl-link.stories.js.map +7 -0
  54. package/dist/components/link/bl-link.test.d.ts +2 -0
  55. package/dist/components/link/bl-link.test.d.ts.map +1 -0
  56. package/dist/components/notification/bl-notification.stories.js +1 -1
  57. package/dist/components/pagination/bl-pagination.js +1 -1
  58. package/dist/components/select/bl-select.d.ts.map +1 -1
  59. package/dist/components/select/bl-select.js +1 -1
  60. package/dist/components/select/option/bl-select-option.d.ts +5 -0
  61. package/dist/components/select/option/bl-select-option.d.ts.map +1 -1
  62. package/dist/components/select/option/bl-select-option.js +1 -1
  63. package/dist/components/stepper/bl-stepper-item.d.ts +107 -0
  64. package/dist/components/stepper/bl-stepper-item.d.ts.map +1 -0
  65. package/dist/components/stepper/bl-stepper-item.js +2 -0
  66. package/dist/components/stepper/bl-stepper-item.js.map +7 -0
  67. package/dist/components/stepper/bl-stepper-item.test.d.ts +2 -0
  68. package/dist/components/stepper/bl-stepper-item.test.d.ts.map +1 -0
  69. package/dist/components/stepper/bl-stepper.d.ts +46 -0
  70. package/dist/components/stepper/bl-stepper.d.ts.map +1 -0
  71. package/dist/components/stepper/bl-stepper.js +2 -0
  72. package/dist/components/stepper/bl-stepper.js.map +7 -0
  73. package/dist/components/stepper/bl-stepper.stories.d.ts +23 -0
  74. package/dist/components/stepper/bl-stepper.stories.d.ts.map +1 -0
  75. package/dist/components/stepper/bl-stepper.stories.js +100 -0
  76. package/dist/components/stepper/bl-stepper.stories.js.map +7 -0
  77. package/dist/components/stepper/bl-stepper.test.d.ts +2 -0
  78. package/dist/components/stepper/bl-stepper.test.d.ts.map +1 -0
  79. package/dist/components/table/table-body/bl-table-body.d.ts +5 -1
  80. package/dist/components/table/table-body/bl-table-body.d.ts.map +1 -1
  81. package/dist/components/table/table-body/bl-table-body.js +1 -1
  82. package/dist/components/table/table-cell/bl-table-cell.js +1 -1
  83. package/dist/components/table/table-header-cell/bl-table-header-cell.js +1 -1
  84. package/dist/components/table/table-row/bl-table-row.js +1 -1
  85. package/dist/custom-elements.json +10157 -2901
  86. package/dist/generated/locales/ar.d.ts +2 -0
  87. package/dist/generated/locales/ar.d.ts.map +1 -1
  88. package/dist/generated/locales/ar.js +1 -1
  89. package/dist/generated/locales/ar.js.map +2 -2
  90. package/dist/generated/locales/ro.d.ts +2 -0
  91. package/dist/generated/locales/ro.d.ts.map +1 -1
  92. package/dist/generated/locales/ro.js +1 -1
  93. package/dist/generated/locales/ro.js.map +2 -2
  94. package/dist/generated/locales/tr.d.ts +2 -0
  95. package/dist/generated/locales/tr.d.ts.map +1 -1
  96. package/dist/generated/locales/tr.js +1 -1
  97. package/dist/generated/locales/tr.js.map +2 -2
  98. package/dist/mixins/datepicker-calendar-mixin/datepicker-calendar-mixin.d.ts +4 -0
  99. package/dist/mixins/datepicker-calendar-mixin/datepicker-calendar-mixin.d.ts.map +1 -1
  100. package/dist/utilities/format-to-date-array.d.ts +1 -1
  101. package/dist/utilities/format-to-date-array.d.ts.map +1 -1
  102. package/package.json +3 -5
  103. package/dist/chunk-2P3LD4HV.js +0 -80
  104. package/dist/chunk-2P3LD4HV.js.map +0 -7
  105. package/dist/chunk-2Q566BEQ.js.map +0 -7
  106. package/dist/chunk-4BO66Y63.js.map +0 -7
  107. package/dist/chunk-7KND5OUR.js +0 -59
  108. package/dist/chunk-7KND5OUR.js.map +0 -7
  109. package/dist/chunk-EXUCTLBU.js +0 -24
  110. package/dist/chunk-EXUCTLBU.js.map +0 -7
  111. package/dist/chunk-H6EUN6QV.js +0 -22
  112. package/dist/chunk-H6EUN6QV.js.map +0 -7
  113. package/dist/chunk-HEB5ZFIH.js +0 -2
  114. package/dist/chunk-HEB5ZFIH.js.map +0 -7
  115. package/dist/chunk-M54AQSC3.js +0 -7
  116. /package/dist/{chunk-YLNOOPBO.js.map → chunk-5QGKDF4O.js.map} +0 -0
  117. /package/dist/{chunk-KIQZ3N7J.js.map → chunk-JTNWYMYZ.js.map} +0 -0
  118. /package/dist/{chunk-6PSDYX3J.js.map → chunk-LZ6VDMPM.js.map} +0 -0
@@ -1,17 +1,17 @@
1
- import{a as y}from"./chunk-ECPWEUBG.js";import{b as C,d as E,f as I,g as V,h as L}from"./chunk-EZSEQHRH.js";import{a as $}from"./chunk-EG7U7PM3.js";import{a as k}from"./chunk-XDUIVR6I.js";import{a as f}from"./chunk-6LT7O7T2.js";import{a as x}from"./chunk-DINNT5P2.js";import{a as m}from"./chunk-GRL4DWKG.js";import{a as z,c as h}from"./chunk-HBPBDC7T.js";import{a as T,b as a,c as u,e as b,f as S}from"./chunk-5MOOXA2X.js";import{a as w,b as d,f as g}from"./chunk-4OT5AMS5.js";import{d as o}from"./chunk-BWWXE4SL.js";var R=w`: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);-webkit-user-select:none;user-select:none;margin:0;width:auto;min-width:100%}.label,.placeholder{color:var(--placeholder-color);padding-inline-start:var(--label-padding);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.select-wrapper.selected .placeholder,:host(:not([placeholder])) .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}:host(:not([label])) .label,:host([label-fixed]) .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-input:focus-visible,.select-open .select-input{border:solid 1px var(--border-focus-color);outline:0}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;padding-inline-start:var(--label-padding);margin:0;list-style:none;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([disabled]) .select-input .selected-options{color:var(--bl-color-neutral-light)}.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]) .additional-selection-count{color:var(--bl-color-neutral-light)}: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-inline-start:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--bl-index-popover);width:100%;top:var(--top);left:var(--left)}:host(:empty) .popover{display:none}.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)}label,legend{padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);inset-inline-end:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));transition:.1s ease-in;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(:not([placeholder])) .selected .label,:host([placeholder]) :where(.select-open,.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,.error-icon,.invalid-text{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-neutral-dark)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}.dirty.invalid .hint,:host([help-text]) .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);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:0;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:0}.search-spinner{padding-inline-end:var(--bl-font-size-2xs)}.action-divider{display:none}.select-wrapper .action-divider{display:block;height:1rem;width:1px;background-color:var(--bl-color-neutral-lighter)}.actions bl-icon{padding:4px}`,P=R;var A,i=class extends k(g){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.searchBar=!1;this.searchBarLoadingState=!1;this._isPopoverOpen=!1;this._additionalSelectedOptionCount=0;this._searchText="";this.userLang=((A=document.querySelector("html"))==null?void 0:A.getAttribute("lang"))||navigator.language;this._connectedOptions=[];this._cleanUpPopover=null;this._selectedOptions=[];this.dirty=!1;this._interactOutsideHandler=e=>{var l;let t=e.composedPath();(l=t==null?void 0:t.find(s=>s.tagName==="BL-SELECT"))!=null&&l.contains(this)||this.close()};this.focusedOptionIndex=-1;this.lastKeyPressedTime=0;this.typedCharacters="";this.keyPressThreshold=500}static get styles(){return[P]}get value(){return this._value}set value(e){if(this._value=e,Array.isArray(e)){let t=new FormData;e.forEach(l=>t.append(this.name,`${l}`)),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,l;(l=(t=(e=document.activeElement)==null?void 0:e.shadowRoot)==null?void 0:t.querySelector("input"))==null||l.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=V(this._selectInput,this._popover,()=>{L(this._selectInput,this._popover,{placement:"bottom",strategy:"fixed",middleware:[C(),E(8),I({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`)})})}_handleToggleButtonClick(e){e.stopPropagation(),this._togglePopover()}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(){var O;let e=d`<ul class="selected-options">
2
- ${this._selectedOptions.map(p=>d`<li>${p.getAttribute("label")||p.textContent}</li>`)}
3
- </ul>`,l=!(this._selectedOptions.length>0&&this._selectedOptions.every(p=>p.disabled))&&(this.clearable||this.multiple),s=l?d`<bl-button
1
+ import{a as y}from"./chunk-ECPWEUBG.js";import{b as C,d as E,f as I,g as V,h as L}from"./chunk-EZSEQHRH.js";import{a as z}from"./chunk-EG7U7PM3.js";import{a as $}from"./chunk-XDUIVR6I.js";import{a as f}from"./chunk-6LT7O7T2.js";import{a as x}from"./chunk-DINNT5P2.js";import{a as m}from"./chunk-GRL4DWKG.js";import{a as k,c as h}from"./chunk-HBPBDC7T.js";import{a as T,b as a,c as u,e as b,f as S}from"./chunk-5MOOXA2X.js";import{a as w,b as r,f as g}from"./chunk-4OT5AMS5.js";import{d as o}from"./chunk-BWWXE4SL.js";var q=w`: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);-webkit-user-select:none;user-select:none;margin:0;width:auto;min-width:100%}.label,.placeholder{color:var(--placeholder-color);padding-inline-start:var(--label-padding);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.select-wrapper.selected .placeholder,:host(:not([placeholder])) .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}:host(:not([label])) .label,:host([label-fixed]) .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-input:focus-visible,.select-open .select-input{border:solid 1px var(--border-focus-color);outline:0}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;padding-inline-start:var(--label-padding);margin:0;list-style:none;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([disabled]) .select-input .selected-options{color:var(--bl-color-neutral-light)}.selected-options li{display:inline;font-size:var(--font-size);color:var(--text-color)}:host(:not([multiple])) .selected-options li{display:inline-flex;align-items:center;gap:var(--bl-size-2xs)}.selected-options li:not(:last-child)::after{content:", "}.select-input:not(.has-overflowed-options) .additional-selection-count{display:none}:host([disabled]) .additional-selection-count{color:var(--bl-color-neutral-light)}: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-inline-start:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--bl-index-popover);width:100%;top:var(--top);left:var(--left)}:host(:empty) .popover{display:none}.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)}label,legend{padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);inset-inline-end:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));transition:.1s ease-in;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(:not([placeholder])) .selected .label,:host([placeholder]) :where(.select-open,.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,.error-icon,.invalid-text{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-neutral-dark)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}.dirty.invalid .hint,:host([help-text]) .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);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:0;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:0}.search-spinner{padding-inline-end:var(--bl-font-size-2xs)}.action-divider{display:none}.select-wrapper .action-divider{display:block;height:1rem;width:1px;background-color:var(--bl-color-neutral-lighter)}.actions bl-icon{padding:4px}`,P=q;var A,i=class extends $(g){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.searchBar=!1;this.searchBarLoadingState=!1;this._isPopoverOpen=!1;this._additionalSelectedOptionCount=0;this._searchText="";this.userLang=((A=document.querySelector("html"))==null?void 0:A.getAttribute("lang"))||navigator.language;this._connectedOptions=[];this._cleanUpPopover=null;this._selectedOptions=[];this.dirty=!1;this._interactOutsideHandler=e=>{var l;let t=e.composedPath();(l=t==null?void 0:t.find(s=>s.tagName==="BL-SELECT"))!=null&&l.contains(this)||this.close()};this.focusedOptionIndex=-1;this.lastKeyPressedTime=0;this.typedCharacters="";this.keyPressThreshold=500}static get styles(){return[P]}get value(){return this._value}set value(e){if(this._value=e,Array.isArray(e)){let t=new FormData;e.forEach(l=>t.append(this.name,`${l}`)),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,l;(l=(t=(e=document.activeElement)==null?void 0:e.shadowRoot)==null?void 0:t.querySelector("input"))==null||l.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=V(this._selectInput,this._popover,()=>{L(this._selectInput,this._popover,{placement:"bottom",strategy:"fixed",middleware:[C(),E(8),I({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`)})})}_handleToggleButtonClick(e){e.stopPropagation(),this._togglePopover()}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(){var O;let e=r`<ul class="selected-options">
2
+ ${this._selectedOptions.map(p=>{let R=p.icon?r`<bl-icon name=${p.icon}></bl-icon>`:Array.from(p.querySelectorAll("[slot=icon]")).map(U=>U.cloneNode(!0));return r`<li>${R}${p.getAttribute("label")||p.textContent}</li>`})}
3
+ </ul>`,l=!(this._selectedOptions.length>0&&this._selectedOptions.every(p=>p.disabled))&&(this.clearable||this.multiple),s=l?r`<bl-button
4
4
  class="remove-all"
5
5
  size="small"
6
6
  variant="tertiary"
7
7
  kind="neutral"
8
8
  icon="close"
9
9
  @click=${this._onClickRemove}
10
- ></bl-button>`:"",n=this.searchBar&&this.opened,c=this._selectedOptions.length>0,r=n||c&&l,v=(O=this.searchBarPlaceholder)!=null?O:h("Search",{desc:"bl-select: search placeholder text"}),M=d`<bl-icon
10
+ ></bl-button>`:"",n=this.searchBar&&this.opened,c=this._selectedOptions.length>0,d=n||c&&l,v=(O=this.searchBarPlaceholder)!=null?O:h("Search",{desc:"bl-select: search placeholder text"}),M=r`<bl-icon
11
11
  class="search-mag-icon"
12
12
  name="search"
13
13
  style="color: var(--bl-color-primary);font-size: var(--bl-font-size-s)"
14
- ></bl-icon>`,D=d`<bl-spinner class="search-spinner"></bl-spinner>`,_=r?d`<div class="action-divider"></div>`:"",F=d`<fieldset
14
+ ></bl-icon>`,D=r`<bl-spinner class="search-spinner"></bl-spinner>`,_=d?r`<div class="action-divider"></div>`:"",F=r`<fieldset
15
15
  class=${f({"select-input":!0,"has-overflowed-options":this._additionalSelectedOptionCount>0})}
16
16
  tabindex="${this.disabled?"-1":0}"
17
17
  .autofocus=${this.autofocus}
@@ -23,7 +23,7 @@ import{a as y}from"./chunk-ECPWEUBG.js";import{b as C,d as E,f as I,g as V,h as
23
23
  >
24
24
  <legend><span>${this.label}</span></legend>
25
25
 
26
- ${this._selectedOptions.length>0&&!this.opened?e:d`
26
+ ${this._selectedOptions.length>0&&!this.opened?e:r`
27
27
  <input
28
28
  class="search-bar-input"
29
29
  placeholder=${this.opened||this.labelFixed?v:this.label||v}
@@ -32,7 +32,7 @@ import{a as y}from"./chunk-ECPWEUBG.js";import{b as C,d as E,f as I,g as V,h as
32
32
  .value=${this._searchText}
33
33
  />
34
34
  `}
35
- ${this.opened?"":d`<span class="additional-selection-count"
35
+ ${this.opened?"":r`<span class="additional-selection-count"
36
36
  >+${this._additionalSelectedOptionCount}</span
37
37
  >`}
38
38
 
@@ -58,7 +58,7 @@ import{a as y}from"./chunk-ECPWEUBG.js";import{b as C,d as E,f as I,g as V,h as
58
58
  aria-label="${h("Open dropdown",{desc:"bl-select: open dropdown button"})}"
59
59
  ></bl-button>
60
60
  </div>
61
- </fieldset>`;return this.searchBar?F:d`<fieldset
61
+ </fieldset>`;return this.searchBar?F:r`<fieldset
62
62
  class=${f({"select-input":!0,"has-overflowed-options":this._additionalSelectedOptionCount>0})}
63
63
  tabindex="${x(this.disabled?void 0:0)}"
64
64
  ?autofocus=${this.autofocus}
@@ -79,7 +79,7 @@ import{a as y}from"./chunk-ECPWEUBG.js";import{b as C,d as E,f as I,g as V,h as
79
79
 
80
80
  <bl-icon class="dropdown-icon closed" name="arrow_down"></bl-icon>
81
81
  </div>
82
- </fieldset>`}selectAllTemplate(){var s;if(!this.multiple||!this.viewSelectAll||this.noResultFound)return null;let e=this._connectedOptions.filter(n=>!n.hidden).every(n=>n.selected),t=this._selectedOptions.filter(n=>!n.hidden).length>0,l=(s=this.selectAllText)!=null?s:h("Select All",{desc:"bl-select: select all text"});return d`<bl-checkbox
82
+ </fieldset>`}selectAllTemplate(){var s;if(!this.multiple||!this.viewSelectAll||this.noResultFound)return null;let e=this._connectedOptions.filter(n=>!n.hidden).every(n=>n.selected),t=this._selectedOptions.filter(n=>!n.hidden).length>0,l=(s=this.selectAllText)!=null?s:h("Select All",{desc:"bl-select: select all text"});return r`<bl-checkbox
83
83
  class="select-all"
84
84
  .checked="${e}"
85
85
  .indeterminate="${t&&!e}"
@@ -88,9 +88,9 @@ import{a as y}from"./chunk-ECPWEUBG.js";import{b as C,d as E,f as I,g as V,h as
88
88
  @bl-checkbox-change="${this._handleSelectAll}"
89
89
  >
90
90
  ${l}
91
- </bl-checkbox>`}render(){var c,r;let e=this.checkValidity()?"":d`<p id="errorMessage" aria-live="polite" class="invalid-text">
91
+ </bl-checkbox>`}render(){var c,d;let e=this.checkValidity()?"":r`<p id="errorMessage" aria-live="polite" class="invalid-text">
92
92
  ${this.validationMessage}
93
- </p>`,t=this.helpText?d`<p class="help-text">${this.helpText}</p>`:"",l=this.label?d`<label id="label">${this.label}</label>`:"",s=(c=this.searchNotFoundText)!=null?c:h("No Data Found",{desc:"bl-select: search no data text"}),n=(r=this.popoverClearSearchText)!=null?r:h("Clear Search",{desc:"bl-select: clear search button text"});return d`<div
93
+ </p>`,t=this.helpText?r`<p class="help-text">${this.helpText}</p>`:"",l=this.label?r`<label id="label">${this.label}</label>`:"",s=(c=this.searchNotFoundText)!=null?c:h("No Data Found",{desc:"bl-select: search no data text"}),n=(d=this.popoverClearSearchText)!=null?d:h("Clear Search",{desc:"bl-select: clear search button text"});return r`<div
94
94
  class=${f({"select-wrapper":!0,"select-open":this.opened,selected:this._selectedOptions.length>0,invalid:!this.validity.valid,dirty:this.dirty})}
95
95
  @keydown=${this.handleKeydown}
96
96
  >
@@ -105,7 +105,7 @@ import{a as y}from"./chunk-ECPWEUBG.js";import{b as C,d as E,f as I,g as V,h as
105
105
  >
106
106
  ${this.selectAllTemplate()}
107
107
  <slot></slot>
108
- ${this.searchBar&&this.noResultFound?d`<div name="popover-clear-search-text" class="popover-no-result">
108
+ ${this.searchBar&&this.noResultFound?r`<div name="popover-clear-search-text" class="popover-no-result">
109
109
  <span>${s}</span>
110
110
  <bl-button
111
111
  variant="tertiary"
@@ -115,5 +115,5 @@ import{a as y}from"./chunk-ECPWEUBG.js";import{b as C,d as E,f as I,g as V,h as
115
115
  </div>`:""}
116
116
  </div>
117
117
  <div class="hint">${e} ${t}</div>
118
- </div> `}handleFocusOptionByKey(e){let t=Date.now();t-this.lastKeyPressedTime>this.keyPressThreshold&&(this.typedCharacters=""),this.lastKeyPressedTime=t,this.typedCharacters+=e.toLowerCase();let s=this.options.findIndex(n=>n.disabled?!1:n.innerText.trim().toLowerCase().startsWith(this.typedCharacters));s!==-1&&(this.focusedOptionIndex=s,this.options[s].focus())}handleKeydown(e){if(this.focusedOptionIndex===-1&&["Enter","Space"].includes(e.code))this._togglePopover(),e.preventDefault();else if(this._isPopoverOpen===!1&&["ArrowDown","ArrowUp"].includes(e.code))this.open(),e.preventDefault();else if(e.code==="Escape")this.close(),e.preventDefault();else if(this._isPopoverOpen&&["ArrowDown","ArrowUp"].includes(e.code)){let t=this.options.filter(l=>!l.disabled);e.code==="ArrowDown"&&this.focusedOptionIndex++,e.code==="ArrowUp"&&this.focusedOptionIndex--,this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,t.length-1)),t[this.focusedOptionIndex].focus(),e.preventDefault()}else this._isPopoverOpen&&!this.searchBar&&this.handleFocusOptionByKey(e.key)}_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=>{let l=this._searchText.toLowerCase(),s="";if(t.textContent)try{s=t.textContent.toLocaleLowerCase(this.userLang)}catch{s=t.textContent.toLowerCase()}let n=s.includes(l);t.hidden=!n}),this._selectedOptions=this.options.filter(t=>t.selected),this._handleLastVisibleSearchedOption(),this.requestUpdate())}_handleLastVisibleSearchedOption(){var t,l;let e=[...this.options].reverse().find(s=>!s.hidden);e&&((l=(t=e==null?void 0:e.shadowRoot)==null?void 0:t.querySelector("div"))==null||l.classList.add("no-border-bottom")),this.options.map(s=>{var n,c;!s.hidden&&s!==e&&((c=(n=s.shadowRoot)==null?void 0:n.querySelector("div"))==null||c.classList.remove("no-border-bottom"))})}_handleSingleSelect(e){this.value=e.value,this._searchText="",this._handleSelectEvent(),this.close()}_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 c;let t=(c=this.shadowRoot)==null?void 0:c.querySelector(".select-all"),l=e.detail,n=this._connectedOptions.filter(r=>!r.selected&&!r.hidden).every(r=>r.disabled);if(l&&n){setTimeout(()=>{var v;let r=(v=t==null?void 0:t.shadowRoot)==null?void 0:v.querySelector("input");r==null||r.click()},0);return}this._connectedOptions.forEach(r=>{r.disabled||r.hidden||(r.selected=l)}),this._handleMultipleSelect()}_onClickRemove(e){e.stopPropagation(),this._searchText="";let t=this._selectedOptions.filter(l=>l.disabled);this._connectedOptions.filter(l=>!l.disabled&&l.selected).forEach(l=>{l.selected=!1}),this.value=t.length?t.map(l=>l.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.multiple?this.value=[]:this.value=null),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={...g.shadowRootOptions,delegatesFocus:!0},i.formControlValidators=[$],o([a()],i.prototype,"name",2),o([a()],i.prototype,"value",1),o([a({reflect:!0})],i.prototype,"label",2),o([a({reflect:!0})],i.prototype,"placeholder",2),o([a({type:String,reflect:!0})],i.prototype,"size",2),o([a({type:Boolean,reflect:!0})],i.prototype,"required",2),o([a({type:Boolean,reflect:!0})],i.prototype,"disabled",2),o([a({type:Boolean,reflect:!0})],i.prototype,"clearable",2),o([a({type:Boolean,reflect:!0})],i.prototype,"multiple",2),o([a({type:Boolean,reflect:!0})],i.prototype,"autofocus",2),o([a({type:Boolean,attribute:"label-fixed",reflect:!0})],i.prototype,"labelFixed",2),o([a({type:String,attribute:"help-text",reflect:!0})],i.prototype,"helpText",2),o([a({type:String,attribute:"invalid-text",reflect:!0})],i.prototype,"customInvalidText",2),o([a({type:Boolean,attribute:"view-select-all",converter:y()})],i.prototype,"viewSelectAll",2),o([a({type:String,attribute:"select-all-text"})],i.prototype,"selectAllText",2),o([a({type:Boolean,attribute:"search-bar",reflect:!0})],i.prototype,"searchBar",2),o([a({type:String,attribute:"search-bar-placeholder",reflect:!0})],i.prototype,"searchBarPlaceholder",2),o([a({type:Boolean,attribute:"search-bar-loading-state",converter:y()})],i.prototype,"searchBarLoadingState",2),o([a({type:String,attribute:"search-not-found-text",reflect:!0})],i.prototype,"searchNotFoundText",2),o([a({type:String,attribute:"popover-clear-search-text",reflect:!0})],i.prototype,"popoverClearSearchText",2),o([u()],i.prototype,"_isPopoverOpen",2),o([u()],i.prototype,"_additionalSelectedOptionCount",2),o([u()],i.prototype,"_searchText",2),o([b(".selected-options")],i.prototype,"selectedOptionsContainer",2),o([S(".selected-options li")],i.prototype,"selectedOptionsItems",2),o([b(".popover")],i.prototype,"_popover",2),o([b(".select-input")],i.prototype,"_selectInput",2),o([m("bl-select")],i.prototype,"_onBlSelect",2),o([m("bl-search")],i.prototype,"_onBlSearch",2),o([u()],i.prototype,"_selectedOptions",2),o([u()],i.prototype,"dirty",2),o([b(".select-input")],i.prototype,"validationTarget",2),i=o([T("bl-select"),z()],i);export{i as a};
119
- //# sourceMappingURL=chunk-2Q566BEQ.js.map
118
+ </div> `}handleFocusOptionByKey(e){let t=Date.now();t-this.lastKeyPressedTime>this.keyPressThreshold&&(this.typedCharacters=""),this.lastKeyPressedTime=t,this.typedCharacters+=e.toLowerCase();let s=this.options.findIndex(n=>n.disabled?!1:n.innerText.trim().toLowerCase().startsWith(this.typedCharacters));s!==-1&&(this.focusedOptionIndex=s,this.options[s].focus())}handleKeydown(e){if(this.focusedOptionIndex===-1&&["Enter","Space"].includes(e.code))this._togglePopover(),e.preventDefault();else if(this._isPopoverOpen===!1&&["ArrowDown","ArrowUp"].includes(e.code))this.open(),e.preventDefault();else if(e.code==="Escape")this.close(),e.preventDefault();else if(this._isPopoverOpen&&["ArrowDown","ArrowUp"].includes(e.code)){let t=this.options.filter(l=>!l.disabled);e.code==="ArrowDown"&&this.focusedOptionIndex++,e.code==="ArrowUp"&&this.focusedOptionIndex--,this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,t.length-1)),t[this.focusedOptionIndex].focus(),e.preventDefault()}else this._isPopoverOpen&&!this.searchBar&&this.handleFocusOptionByKey(e.key)}_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=>{let l=this._searchText.toLowerCase(),s="";if(t.textContent)try{s=t.textContent.toLocaleLowerCase(this.userLang)}catch{s=t.textContent.toLowerCase()}let n=s.includes(l);t.hidden=!n}),this._selectedOptions=this.options.filter(t=>t.selected),this._handleLastVisibleSearchedOption(),this.requestUpdate())}_handleLastVisibleSearchedOption(){var t,l;let e=[...this.options].reverse().find(s=>!s.hidden);e&&((l=(t=e==null?void 0:e.shadowRoot)==null?void 0:t.querySelector("div"))==null||l.classList.add("no-border-bottom")),this.options.map(s=>{var n,c;!s.hidden&&s!==e&&((c=(n=s.shadowRoot)==null?void 0:n.querySelector("div"))==null||c.classList.remove("no-border-bottom"))})}_handleSingleSelect(e){this.value=e.value,this._searchText="",this._handleSelectEvent(),this.close()}_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 c;let t=(c=this.shadowRoot)==null?void 0:c.querySelector(".select-all"),l=e.detail,n=this._connectedOptions.filter(d=>!d.selected&&!d.hidden).every(d=>d.disabled);if(l&&n){setTimeout(()=>{var v;let d=(v=t==null?void 0:t.shadowRoot)==null?void 0:v.querySelector("input");d==null||d.click()},0);return}this._connectedOptions.forEach(d=>{d.disabled||d.hidden||(d.selected=l)}),this._handleMultipleSelect()}_onClickRemove(e){e.stopPropagation(),this._searchText="";let t=this._selectedOptions.filter(l=>l.disabled);this._connectedOptions.filter(l=>!l.disabled&&l.selected).forEach(l=>{l.selected=!1}),this.value=t.length?t.map(l=>l.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.multiple?this.value=[]:this.value=null),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={...g.shadowRootOptions,delegatesFocus:!0},i.formControlValidators=[z],o([a()],i.prototype,"name",2),o([a()],i.prototype,"value",1),o([a({reflect:!0})],i.prototype,"label",2),o([a({reflect:!0})],i.prototype,"placeholder",2),o([a({type:String,reflect:!0})],i.prototype,"size",2),o([a({type:Boolean,reflect:!0})],i.prototype,"required",2),o([a({type:Boolean,reflect:!0})],i.prototype,"disabled",2),o([a({type:Boolean,reflect:!0})],i.prototype,"clearable",2),o([a({type:Boolean,reflect:!0})],i.prototype,"multiple",2),o([a({type:Boolean,reflect:!0})],i.prototype,"autofocus",2),o([a({type:Boolean,attribute:"label-fixed",reflect:!0})],i.prototype,"labelFixed",2),o([a({type:String,attribute:"help-text",reflect:!0})],i.prototype,"helpText",2),o([a({type:String,attribute:"invalid-text",reflect:!0})],i.prototype,"customInvalidText",2),o([a({type:Boolean,attribute:"view-select-all",converter:y()})],i.prototype,"viewSelectAll",2),o([a({type:String,attribute:"select-all-text"})],i.prototype,"selectAllText",2),o([a({type:Boolean,attribute:"search-bar",reflect:!0})],i.prototype,"searchBar",2),o([a({type:String,attribute:"search-bar-placeholder",reflect:!0})],i.prototype,"searchBarPlaceholder",2),o([a({type:Boolean,attribute:"search-bar-loading-state",converter:y()})],i.prototype,"searchBarLoadingState",2),o([a({type:String,attribute:"search-not-found-text",reflect:!0})],i.prototype,"searchNotFoundText",2),o([a({type:String,attribute:"popover-clear-search-text",reflect:!0})],i.prototype,"popoverClearSearchText",2),o([u()],i.prototype,"_isPopoverOpen",2),o([u()],i.prototype,"_additionalSelectedOptionCount",2),o([u()],i.prototype,"_searchText",2),o([b(".selected-options")],i.prototype,"selectedOptionsContainer",2),o([S(".selected-options li")],i.prototype,"selectedOptionsItems",2),o([b(".popover")],i.prototype,"_popover",2),o([b(".select-input")],i.prototype,"_selectInput",2),o([m("bl-select")],i.prototype,"_onBlSelect",2),o([m("bl-search")],i.prototype,"_onBlSearch",2),o([u()],i.prototype,"_selectedOptions",2),o([u()],i.prototype,"dirty",2),o([b(".select-input")],i.prototype,"validationTarget",2),i=o([T("bl-select"),k()],i);export{i as a};
119
+ //# sourceMappingURL=chunk-KYLWO3YR.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);-webkit-user-select:none;user-select:none;margin:0;width:auto;min-width:100%}.label,.placeholder{color:var(--placeholder-color);padding-inline-start:var(--label-padding);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.select-wrapper.selected .placeholder,:host(:not([placeholder])) .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}:host(:not([label])) .label,:host([label-fixed]) .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-input:focus-visible,.select-open .select-input{border:solid 1px var(--border-focus-color);outline:0}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;padding-inline-start:var(--label-padding);margin:0;list-style:none;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([disabled]) .select-input .selected-options{color:var(--bl-color-neutral-light)}.selected-options li{display:inline;font-size:var(--font-size);color:var(--text-color)}:host(:not([multiple])) .selected-options li{display:inline-flex;align-items:center;gap:var(--bl-size-2xs)}.selected-options li:not(:last-child)::after{content:\", \"}.select-input:not(.has-overflowed-options) .additional-selection-count{display:none}:host([disabled]) .additional-selection-count{color:var(--bl-color-neutral-light)}: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-inline-start:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--bl-index-popover);width:100%;top:var(--top);left:var(--left)}:host(:empty) .popover{display:none}.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)}label,legend{padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);inset-inline-end:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));transition:.1s ease-in;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(:not([placeholder])) .selected .label,:host([placeholder]) :where(.select-open,.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,.error-icon,.invalid-text{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-neutral-dark)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}.dirty.invalid .hint,:host([help-text]) .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);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:0;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:0}.search-spinner{padding-inline-end:var(--bl-font-size-2xs)}.action-divider{display:none}.select-wrapper .action-divider{display:block;height:1rem;width:1px;background-color:var(--bl-color-neutral-lighter)}.actions bl-icon{padding:4px}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } 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 { localized, msg } from \"@lit/localize\";\nimport { FormControlMixin, requiredValidator } from \"@open-wc/form-control\";\nimport { FormValue } from \"@open-wc/form-helpers\";\nimport \"element-internals-polyfill\";\nimport { LangKey } from \"../../localization\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport { stringBooleanConverter } from \"../../utilities/string-boolean.converter\";\nimport \"../button/bl-button\";\nimport \"../checkbox-group/checkbox/bl-checkbox\";\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\")\n@localized()\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\", converter: stringBooleanConverter() })\n viewSelectAll = false;\n\n /**\n * Sets select all text in multiple select\n */\n @property({ type: String, attribute: \"select-all-text\" })\n selectAllText?: string;\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({\n type: Boolean,\n attribute: \"search-bar-loading-state\",\n converter: stringBooleanConverter(),\n })\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?: string;\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?: string;\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 userLang =\n (document.querySelector(\"html\")?.getAttribute(\"lang\") as LangKey | null) || navigator.language;\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 private _handleToggleButtonClick(e: MouseEvent) {\n e.stopPropagation();\n this._togglePopover();\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 => {\n const icon = item.icon\n ? html`<bl-icon name=${item.icon}></bl-icon>`\n : Array.from(item.querySelectorAll(\"[slot=icon]\")).map(el => el.cloneNode(true));\n\n return html`<li>${icon}${item.getAttribute(\"label\") || item.textContent}</li>`;\n })}\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 hasSelectedOptions = this._selectedOptions.length > 0;\n\n const isDividerShown = isSearchBarVisible || (hasSelectedOptions && isRemoveButtonShown);\n\n const searchbarPlaceholderText =\n this.searchBarPlaceholder ?? msg(\"Search\", { desc: \"bl-select: search placeholder text\" });\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 searchSpinner = html`<bl-spinner class=\"search-spinner\"></bl-spinner>`;\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 .autofocus=${this.autofocus}\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=${this.opened || this.labelFixed\n ? searchbarPlaceholderText\n : this.label || searchbarPlaceholderText}\n @input=${this._handleSearchOptions}\n @keydown=${(e: KeyboardEvent) => {\n if (e.code === \"Space\") {\n e.stopPropagation();\n }\n }}\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\">\n ${this.opened ? (this.searchBarLoadingState ? searchSpinner : searchMagIcon) : \"\"}\n ${!this.opened ? removeButton : \"\"} ${actionDivider}\n <bl-button\n class=\"dropdown-icon open\"\n variant=\"tertiary\"\n kind=\"neutral\"\n size=\"small\"\n icon=\"arrow_up\"\n @click=${this._handleToggleButtonClick}\n aria-label=\"${msg(\"Close dropdown\", { desc: \"bl-select: close dropdown button\" })}\"\n ></bl-button>\n <bl-button\n class=\"closed dropdown-icon\"\n variant=\"tertiary\"\n kind=\"neutral\"\n size=\"small\"\n icon=\"arrow_down\"\n @click=${this._handleToggleButtonClick}\n aria-label=\"${msg(\"Open dropdown\", { desc: \"bl-select: open dropdown button\" })}\"\n ></bl-button>\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=\"${ifDefined(this.disabled ? undefined : 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\n const isAnySelected = this._selectedOptions.filter(option => !option.hidden).length > 0;\n const selectAllText =\n this.selectAllText ?? msg(\"Select All\", { desc: \"bl-select: select all text\" });\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 ${selectAllText}\n </bl-checkbox>`;\n }\n\n render(): TemplateResult {\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 const noDataText =\n this.searchNotFoundText ?? msg(\"No Data Found\", { desc: \"bl-select: search no data text\" });\n\n const clearSearchText =\n this.popoverClearSearchText ??\n msg(\"Clear Search\", { desc: \"bl-select: clear search button text\" });\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>${noDataText}</span>\n <bl-button\n variant=\"tertiary\"\n @click=${() => {\n this._handleSearchOptions({ target: { value: \"\" } } as InputEvent & {\n target: HTMLInputElement;\n });\n }}\n >${clearSearchText}</bl-button\n >\n </div>`\n : \"\"}\n </div>\n <div class=\"hint\">${invalidMessage} ${helpMessage}</div>\n </div> `;\n }\n\n private focusedOptionIndex = -1;\n private lastKeyPressedTime = 0;\n private typedCharacters = \"\";\n private keyPressThreshold = 500;\n\n private handleFocusOptionByKey(key: string) {\n const currentTime = Date.now();\n const elapsedTimeSinceLastKeyPress = currentTime - this.lastKeyPressedTime;\n\n if (elapsedTimeSinceLastKeyPress > this.keyPressThreshold) {\n this.typedCharacters = \"\";\n }\n\n this.lastKeyPressedTime = currentTime;\n this.typedCharacters += key.toLowerCase();\n\n const matchingOptionIndex = this.options.findIndex(option => {\n if (option.disabled) {\n return false;\n }\n const optionText = option.innerText.trim().toLowerCase();\n\n return optionText.startsWith(this.typedCharacters);\n });\n\n if (matchingOptionIndex !== -1) {\n this.focusedOptionIndex = matchingOptionIndex;\n this.options[matchingOptionIndex].focus();\n }\n }\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 const activeOptions = this.options.filter(option => !option.disabled);\n\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, activeOptions.length - 1)\n );\n\n activeOptions[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n } else if (this._isPopoverOpen && !this.searchBar) {\n this.handleFocusOptionByKey(event.key);\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 searchText = this._searchText.toLowerCase();\n let optionText = \"\";\n\n if (option.textContent) {\n try {\n // Try locale-specific comparison first\n optionText = option.textContent.toLocaleLowerCase(this.userLang);\n } catch {\n // Fallback to basic toLowerCase if locale is not supported\n optionText = option.textContent.toLowerCase();\n }\n }\n\n const isVisible = optionText.includes(searchText);\n\n option.hidden = !isVisible;\n });\n\n this._selectedOptions = this.options.filter(option => option.selected);\n this._handleLastVisibleSearchedOption();\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._searchText = \"\";\n this._handleSelectEvent();\n this.close();\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 this._searchText = \"\";\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 if (this.multiple) {\n this.value = [];\n } else {\n this.value = null;\n }\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": "qgBACO,IAAMA,EAASC,4iOACfC,EAAQF,ECFf,IAAAG,EAsCqBC,EAArB,cAA4EC,EAC1EC,CACF,CAAE,CAFF,kCAgEE,UAAmB,SAMnB,cAAW,GAMX,cAAW,GAMX,eAAY,GAMZ,cAAW,GAMX,eAAY,GAMZ,gBAAa,GAkBb,mBAAgB,GAYhB,eAAY,GAgBZ,2BAAwB,GAgBxB,KAAQ,eAAiB,GAGzB,KAAQ,+BAAiC,EAGzC,KAAQ,YAAc,GA0BtB,KAAQ,WACLH,EAAA,SAAS,cAAc,MAAM,IAA7B,YAAAA,EAAgC,aAAa,UAA8B,UAAU,SAExF,KAAQ,kBAAiD,CAAC,EAE1D,KAAQ,gBAA0C,KA0BlD,KAAQ,iBAAgD,CAAC,EAGzD,KAAQ,MAAQ,GA0DhB,KAAQ,wBAA2BI,GAAmC,CApUxE,IAAAJ,EAqUI,IAAMK,EAAYD,EAAM,aAAa,GAEhCJ,EAAAK,GAAA,YAAAA,EAAW,KAAKC,GAAMA,EAAG,UAAY,eAArC,MAAAN,EAAmD,SAAS,OAC/D,KAAK,MAAM,CAEf,EAuQA,KAAQ,mBAAqB,GAC7B,KAAQ,mBA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BAMAgE,EAAA,CADC3C,EAAS,CAAE,KAAM,OAAQ,UAAW,yBAA0B,QAAS,EAAK,CAAC,GAvI3DrB,EAwInB,oCAUAgE,EAAA,CALC3C,EAAS,CACR,KAAM,QACN,UAAW,2BACX,UAAW4C,EAAuB,CACpC,CAAC,GAjJkBjE,EAkJnB,qCAMAgE,EAAA,CADC3C,EAAS,CAAE,KAAM,OAAQ,UAAW,wBAAyB,QAAS,EAAK,CAAC,GAvJ1DrB,EAwJnB,kCAMAgE,EAAA,CADC3C,EAAS,CAAE,KAAM,OAAQ,UAAW,4BAA6B,QAAS,EAAK,CAAC,GA7J9DrB,EA8JnB,sCAIQgE,EAAA,CADPE,EAAM,GAjKYlE,EAkKX,8BAGAgE,EAAA,CADPE,EAAM,GApKYlE,EAqKX,8CAGAgE,EAAA,CADPE,EAAM,GAvKYlE,EAwKX,2BAGAgE,EAAA,CADPG,EAAM,mBAAmB,GA1KPnE,EA2KX,wCAGAgE,EAAA,CADP3C,EAAS,sBAAsB,GA7KbrB,EA8KX,oCAGAgE,EAAA,CADPG,EAAM,UAAU,GAhLEnE,EAiLX,wBAGAgE,EAAA,CADPG,EAAM,eAAe,GAnLHnE,EAoLX,4BAKoBgE,EAAA,CAA3B7D,EAAM,WAAW,GAzLCH,EAyLS,2BAOAgE,EAAA,CAA3B7D,EAAM,WAAW,GAhMCH,EAgMS,2BAiCpBgE,EAAA,CADPE,EAAM,GAhOYlE,EAiOX,gCAGAgE,EAAA,CADPE,EAAM,GAnOYlE,EAoOX,qBA+BRgE,EAAA,CADCG,EAAM,eAAe,GAlQHnE,EAmQnB,gCAnQmBA,EAArBgE,EAAA,CAFC3C,EAAc,WAAW,EACzB+C,EAAU,GACUpE",
6
+ "names": ["styles", "i", "bl_select_default", "_a", "BlSelect", "FormControlMixin", "s", "event", "eventPath", "el", "bl_select_default", "val", "formData", "option", "select", "_b", "_c", "autoUpdate", "computePosition", "flip", "offset", "size", "args", "x", "y", "e", "inputSelectedOptions", "item", "icon", "isRemoveButtonShown", "removeButton", "isSearchBarVisible", "hasSelectedOptions", "isDividerShown", "searchbarPlaceholderText", "msg", "searchMagIcon", "searchSpinner", "actionDivider", "search", "o", "l", "isAllRenderedOptionsSelected", "isAnySelected", "selectAllText", "invalidMessage", "helpMessage", "label", "noDataText", "clearSearchText", "key", "currentTime", "matchingOptionIndex", "activeOptions", "options", "searchText", "optionText", "isVisible", "lastVisibleOption", "optionItem", "selectAllEl", "checked", "isAllUnselectedDisabled", "checkbox", "selectedDisabledOptions", "firstNonVisibleItemIndex", "_changedProperties", "requiredValidator", "__decorateClass", "stringBooleanConverter", "t", "i", "localized"]
7
+ }
@@ -1,4 +1,4 @@
1
- import{a as b}from"./chunk-YLNOOPBO.js";import{a as s,b as n}from"./chunk-5MOOXA2X.js";import{a as i,b as o,f as a}from"./chunk-4OT5AMS5.js";import{d as l}from"./chunk-BWWXE4SL.js";var d=i`:host{display:table-cell;border:1px solid var(--bl-color-neutral-lighter);padding:var(--bl-size-m);font:var(--bl-font-title-3-regular);color:var(--bl-color-neutral-darker);box-sizing:border-box;vertical-align:middle;word-break:break-word;background-color:var(--bl-color-neutral-full);background-clip:padding-box;border-top:none;border-inline-end:none}.table-cell{display:flex;align-items:center}.table-cell.shadow-right::before{content:"";position:absolute;inset-inline-end:-1px;top:0;width:16px;height:100%;z-index:-1;border-inline-end:1px solid var(--bl-color-neutral-lighter);box-shadow:calc(8px * var(--bl-text-x-direction)) 0 16px 0 rgb(39 49 66 / 10%)}.table-cell.shadow-left::before{content:"";position:absolute;inset-inline-start:-1px;top:0;width:16px;height:100%;z-index:-1;border-inline-start:1px solid var(--bl-color-neutral-lighter);box-shadow:calc(-8px * var(--bl-text-x-direction)) 0 16px 0 rgb(39 49 66 / 10%)}bl-checkbox{margin-inline-end:var(--bl-size-m)}`,c=d;var h="bl-table-cell",t=class extends a{constructor(){super(...arguments);this.disableSelection=!1}static get styles(){return[c]}get _table(){return this.closest("bl-table")}get _tableRow(){return this.closest("bl-table-row")}get disabled(){return this.disableSelection}get selectable(){var e;return this.index===0&&!!((e=this._table)!=null&&e.isSelectable(!1))&&this.selectionKey}get index(){let e=this.parentNode;return e?[...e.children].indexOf(this):-1}get selectionKey(){return this._tableRow?this._tableRow.selectionKey:""}get checked(){var e;return!!((e=this._tableRow)!=null&&e.checked)}get shadowRight(){var e;return!!((e=this._tableRow)!=null&&e.stickyFirstColumn)&&this.index===0}get shadowLeft(){var e;return!!((e=this._tableRow)!=null&&e.stickyLastColumn)&&this.nextElementSibling===null}connectedCallback(){super.connectedCallback(),this.closest(b)||console.warn("bl-table-cell is designed to be used inside a bl-table-row",this)}onChange(e){var r;(r=this._table)==null||r.onSelectionChange(!1,e.detail,this.selectionKey)}_renderCheckbox(){return this.selectable?o`<bl-checkbox
1
+ import{a as b}from"./chunk-5QGKDF4O.js";import{a as s,b as n}from"./chunk-5MOOXA2X.js";import{a as i,b as o,f as a}from"./chunk-4OT5AMS5.js";import{d as l}from"./chunk-BWWXE4SL.js";var d=i`:host{display:table-cell;border:1px solid var(--bl-color-neutral-lighter);padding:var(--bl-size-m);font:var(--bl-font-title-3-regular);color:var(--bl-color-neutral-darker);box-sizing:border-box;vertical-align:middle;word-break:break-word;background-color:var(--bl-color-neutral-full);background-clip:padding-box;border-top:none;border-inline-end:none}.table-cell{display:flex;align-items:center}.table-cell.shadow-right::before{content:"";position:absolute;inset-inline-end:-1px;top:0;width:16px;height:100%;z-index:-1;border-inline-end:1px solid var(--bl-color-neutral-lighter);box-shadow:calc(8px * var(--bl-text-x-direction)) 0 16px 0 rgb(39 49 66 / 10%)}.table-cell.shadow-left::before{content:"";position:absolute;inset-inline-start:-1px;top:0;width:16px;height:100%;z-index:-1;border-inline-start:1px solid var(--bl-color-neutral-lighter);box-shadow:calc(-8px * var(--bl-text-x-direction)) 0 16px 0 rgb(39 49 66 / 10%)}bl-checkbox{margin-inline-end:var(--bl-size-m)}`,c=d;var h="bl-table-cell",t=class extends a{constructor(){super(...arguments);this.disableSelection=!1}static get styles(){return[c]}get _table(){return this.closest("bl-table")}get _tableRow(){return this.closest("bl-table-row")}get disabled(){return this.disableSelection}get selectable(){var e;return this.index===0&&!!((e=this._table)!=null&&e.isSelectable(!1))&&this.selectionKey}get index(){let e=this.parentNode;return e?[...e.children].indexOf(this):-1}get selectionKey(){return this._tableRow?this._tableRow.selectionKey:""}get checked(){var e;return!!((e=this._tableRow)!=null&&e.checked)}get shadowRight(){var e;return!!((e=this._tableRow)!=null&&e.stickyFirstColumn)&&this.index===0}get shadowLeft(){var e;return!!((e=this._tableRow)!=null&&e.stickyLastColumn)&&this.nextElementSibling===null}connectedCallback(){super.connectedCallback(),this.closest(b)||console.warn("bl-table-cell is designed to be used inside a bl-table-row",this)}onChange(e){var r;(r=this._table)==null||r.onSelectionChange(!1,e.detail,this.selectionKey)}_renderCheckbox(){return this.selectable?o`<bl-checkbox
2
2
  ?checked=${this.checked}
3
3
  ?disabled=${this.disabled}
4
4
  value="row"
@@ -8,4 +8,4 @@ import{a as b}from"./chunk-YLNOOPBO.js";import{a as s,b as n}from"./chunk-5MOOXA
8
8
  ${this._renderCheckbox()}
9
9
  <slot></slot>
10
10
  </div>`}};l([n({type:Boolean,reflect:!0,attribute:"disabled"})],t.prototype,"disableSelection",2),t=l([s(h)],t);export{h as a,t as b};
11
- //# sourceMappingURL=chunk-6PSDYX3J.js.map
11
+ //# sourceMappingURL=chunk-LZ6VDMPM.js.map
@@ -0,0 +1,18 @@
1
+ import{b as r}from"./chunk-4OT5AMS5.js";import{b as l,c as p}from"./chunk-BWWXE4SL.js";var a=l((s,i)=>{i.exports=function(o){let e=o||typeof window<"u"&&window;return!!(e&&(e.navigator.userAgent.match(/Chromatic/)||e.location.href.match(/chromatic=true/)))}});var n=p(a(),1),c=(t,o)=>(0,n.default)()?r`${o}
2
+ <div class="chromatic-wrapper">${t()}</div>`:r`${t()}`;var y=t=>c(t,r`<style>
3
+ #root-inner {
4
+ width: 1000px;
5
+ height: 400px;
6
+ display: flex;
7
+ justify-content: center;
8
+ align-items: center;
9
+ }
10
+ .chromatic-wrapper {
11
+ display: flex;
12
+ }
13
+ </style>`),d=t=>c(t,r`<style>
14
+ #root-inner {
15
+ height: 600px;
16
+ }
17
+ </style>`);export{y as a,d as b};
18
+ //# sourceMappingURL=chunk-M4E4CVZ4.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../node_modules/chromatic/isChromatic.js", "../src/utilities/chromatic-decorators.ts"],
4
4
  "sourcesContent": ["/* eslint-env browser */\n\nmodule.exports = function isChromatic(windowArg) {\n const windowToCheck = windowArg || (typeof window !== 'undefined' && window);\n return !!(\n windowToCheck &&\n (windowToCheck.navigator.userAgent.match(/Chromatic/) ||\n windowToCheck.location.href.match(/chromatic=true/))\n );\n};\n", "import { html, TemplateResult } from \"lit\";\nimport { PartialStoryFn } from \"@storybook/types\";\nimport isChromatic from \"chromatic/isChromatic\";\n\nconst chromaticDecorator = (story: PartialStoryFn, addition: TemplateResult) =>\n isChromatic()\n ? html`${addition}\n <div class=\"chromatic-wrapper\">${story()}</div>`\n : html`${story()}`;\n\nexport const withNoAnimation = (story: PartialStoryFn) =>\n chromaticDecorator(\n story,\n html`<style>\n .chromatic-wrapper {\n --bl-drawer-animation-duration: 0;\n }\n </style>`\n );\n\nexport const extraPadding = (story: PartialStoryFn) =>\n chromaticDecorator(\n story,\n html`<style>\n .chromatic-wrapper {\n display: inline-block;\n padding: 25px;\n }\n </style>`\n );\n\nexport const centeredLayout = (story: PartialStoryFn) =>\n chromaticDecorator(\n story,\n html`<style>\n #root-inner {\n width: 1000px;\n height: 400px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .chromatic-wrapper {\n display: flex;\n }\n </style>`\n );\n\nexport const fullscreenLayout = (story: PartialStoryFn) =>\n chromaticDecorator(\n story,\n html`<style>\n #root-inner {\n height: 600px;\n }\n </style>`\n );\n"],
5
- "mappings": "uFAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,CAEAA,EAAO,QAAU,SAAqBC,EAAW,CAC/C,IAAMC,EAAgBD,GAAc,OAAO,OAAW,KAAe,OACrE,MAAO,CAAC,EACNC,IACCA,EAAc,UAAU,UAAU,MAAM,WAAW,GAClDA,EAAc,SAAS,KAAK,MAAM,gBAAgB,GAExD,ICPA,IAAAC,EAAwB,SAElBC,EAAqB,CAACC,EAAuBC,OACjD,EAAAC,SAAY,EACRC,IAAOF;AAAA,yCAC4BD,EAAM,UACzCG,IAAOH,EAAM,IAwCZ,IAAMI,EAAoBC,GAC/BC,EACED,EACAE;AAAA;AAAA;AAAA;AAAA,aAKF",
6
- "names": ["require_isChromatic", "__commonJSMin", "exports", "module", "windowArg", "windowToCheck", "import_isChromatic", "chromaticDecorator", "story", "addition", "isChromatic", "x", "fullscreenLayout", "story", "chromaticDecorator", "x"]
5
+ "mappings": "uFAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,CAEAA,EAAO,QAAU,SAAqBC,EAAW,CAC/C,IAAMC,EAAgBD,GAAc,OAAO,OAAW,KAAe,OACrE,MAAO,CAAC,EACNC,IACCA,EAAc,UAAU,UAAU,MAAM,WAAW,GAClDA,EAAc,SAAS,KAAK,MAAM,gBAAgB,GAExD,ICPA,IAAAC,EAAwB,SAElBC,EAAqB,CAACC,EAAuBC,OACjD,EAAAC,SAAY,EACRC,IAAOF;AAAA,yCAC4BD,EAAM,UACzCG,IAAOH,EAAM,IAuBZ,IAAMI,EAAkBC,GAC7BC,EACED,EACAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAYF,EAEWC,EAAoBH,GAC/BC,EACED,EACAE;AAAA;AAAA;AAAA;AAAA,aAKF",
6
+ "names": ["require_isChromatic", "__commonJSMin", "exports", "module", "windowArg", "windowToCheck", "import_isChromatic", "chromaticDecorator", "story", "addition", "isChromatic", "x", "centeredLayout", "story", "chromaticDecorator", "x", "fullscreenLayout"]
7
7
  }
@@ -30,6 +30,7 @@ export default class BlAccordion extends LitElement {
30
30
  summaryEl: HTMLElement;
31
31
  contentEl: HTMLElement;
32
32
  static get styles(): CSSResultGroup;
33
+ private _cleanupStyles;
33
34
  _animate(isExpanding: boolean): void;
34
35
  private _onAnimationFinish;
35
36
  expand(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"bl-accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion-group/accordion/bl-accordion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASnD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU;IACjD;;OAEG;IAEH,IAAI,UAAS;IAEb;;OAEG;IAEH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IAEH,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAE7B;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IACiB,OAAO,CAAC,SAAS,CAA2B;IAGhE,iBAAiB,SAAO;IAExB,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,gBAAgB,CAAgC;IAGxD,SAAS,EAAE,kBAAkB,CAAC;IAG9B,SAAS,EAAE,WAAW,CAAC;IAGvB,SAAS,EAAE,WAAW,CAAC;IAEvB,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED,QAAQ,CAAC,WAAW,EAAE,OAAO;IA0B7B,OAAO,CAAC,kBAAkB;IAO1B,MAAM;IAON,QAAQ;IAIR,OAAO,CAAC,aAAa;IAYrB,SAAS,CAAC,OAAO,CAAC,kBAAkB,EAAE,cAAc;IAWpD,MAAM,IAAI,cAAc;CAgCzB"}
1
+ {"version":3,"file":"bl-accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion-group/accordion/bl-accordion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASnD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU;IACjD;;OAEG;IAEH,IAAI,UAAS;IAEb;;OAEG;IAEH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IAEH,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAE7B;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IACiB,OAAO,CAAC,SAAS,CAA2B;IAGhE,iBAAiB,SAAO;IAExB,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,gBAAgB,CAAgC;IAGxD,SAAS,EAAE,kBAAkB,CAAC;IAG9B,SAAS,EAAE,WAAW,CAAC;IAGvB,SAAS,EAAE,WAAW,CAAC;IAEvB,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED,OAAO,CAAC,cAAc;IAOtB,QAAQ,CAAC,WAAW,EAAE,OAAO;IAsD7B,OAAO,CAAC,kBAAkB;IAW1B,MAAM;IAIN,QAAQ;IAIR,OAAO,CAAC,aAAa;IAcrB,SAAS,CAAC,OAAO,CAAC,kBAAkB,EAAE,cAAc;IAWpD,MAAM,IAAI,cAAc;CAgCzB"}
@@ -1,2 +1,2 @@
1
- import{a}from"../../../chunk-EXUCTLBU.js";import"../../../chunk-ECPWEUBG.js";import"../../../chunk-6LT7O7T2.js";import"../../../chunk-3OQA4BKQ.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-BWWXE4SL.js";export{a as default};
1
+ import{a}from"../../../chunk-IR2QY2VG.js";import"../../../chunk-ECPWEUBG.js";import"../../../chunk-6LT7O7T2.js";import"../../../chunk-3OQA4BKQ.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-BWWXE4SL.js";export{a as default};
2
2
  //# sourceMappingURL=bl-accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bl-accordion-group.test.d.ts","sourceRoot":"","sources":["../../../src/components/accordion-group/bl-accordion-group.test.ts"],"names":[],"mappings":"AAEA,OAAO,0BAA0B,CAAC"}
1
+ {"version":3,"file":"bl-accordion-group.test.d.ts","sourceRoot":"","sources":["../../../src/components/accordion-group/bl-accordion-group.test.ts"],"names":[],"mappings":"AACA,OAAO,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bl-calendar.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/bl-calendar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAI3E,OAAO,uBAAuB,MAAM,kEAAkE,CAAC;AAEvG,OAAO,EAAS,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,qBAAqB,CAAC;AAC7B,OAAO,iBAAiB,CAAC;AAQzB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE1E;;;IAGI;AAGJ,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,uBAAuB;IAE7D,KAAK,OAAc;IAEnB,cAAc,EAAE,MAAM,CAAyB;IAE/C,aAAa,EAAE,MAAM,CAA4B;IAEjD,aAAa,EAAE,YAAY,CAAuB;IAElD,cAAc,EAAE,MAAM,EAAE,CAAM;IAE9B,aAAa,EAAE,WA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EAAE,IAAI;IAW/C,yBAAyB,CAAC,YAAY,EAAE,IAAI;IAmB5C,mBAAmB,CAAC,YAAY,EAAE,IAAI;IAStC,kBAAkB,CAAC,YAAY,EAAE,IAAI;IAUrC,qBAAqB,CAAC,YAAY,EAAE,IAAI;IAmBxC,aAAa;IAmCb,kBAAkB;IA0ElB,OAAO,CAAC,iBAAiB,EAAE,cAAc;IAczC,oBAAoB;IAyCpB,kBAAkB;IA+ClB,oBAAoB;IAkBpB,mBAAmB;IAkBnB,MAAM;CAcP"}
@@ -1,2 +1,2 @@
1
- import{b as a}from"../../chunk-2P3LD4HV.js";import"../../chunk-IPYZIIRV.js";import"../../chunk-NM74WWXQ.js";import"../../chunk-OYHUG47P.js";import"../../chunk-WEEGH2F4.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-3OQA4BKQ.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-HBPBDC7T.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-BWWXE4SL.js";export{a as default};
1
+ import{b as a}from"../../chunk-IEFQ6PGY.js";import"../../chunk-IPYZIIRV.js";import"../../chunk-NM74WWXQ.js";import"../../chunk-OYHUG47P.js";import"../../chunk-WEEGH2F4.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-3OQA4BKQ.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-HBPBDC7T.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-BWWXE4SL.js";export{a as default};
2
2
  //# sourceMappingURL=bl-calendar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bl-calendar.test.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/bl-calendar.test.ts"],"names":[],"mappings":"AACA,OAAO,eAAe,CAAC"}
1
+ {"version":3,"file":"bl-calendar.test.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/bl-calendar.test.ts"],"names":[],"mappings":"AAGA,OAAO,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bl-datepicker.d.ts","sourceRoot":"","sources":["../../../src/components/datepicker/bl-datepicker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,uBAAuB,MAAM,kEAAkE,CAAC;AAEvG,OAAO,yBAAyB,CAAC;AAEjC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,uBAAuB,CAAC;AAG/B;;;;;IAKI;AAEJ,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,uBAAuB;IAC/D;;OAEG;IAEH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IAEH,IAAI,CAAC,EAAE,SAAS,CAAY;IAE5B;;OAEG;IAEH,UAAU,UAAS;IACnB;;OAEG;IAEH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IAEH,cAAc,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,MAAM,CAAC,GAAG,IAAI,CAAQ;IAC1D;;OAEG;IAEH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IAEH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IAEH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,cAAc,CAAC;IAG7C,WAAW,SAAM;IAGjB,kBAAkB,EAAE,MAAM,CAAK;IAG/B,iBAAiB,EAAE,MAAM,CAAK;IAG9B,WAAW,EAAE,UAAU,CAAC;IAGxB,UAAU,EAAE,SAAS,CAAC;IAGtB,QAAQ,EAAG,OAAO,CAAC;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AC;IAClB;;OAEG;IAEH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IAEH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,cAAc,CAAC;IAG7C,WAAW,SAAM;IAGjB,kBAAkB,EAAE,MAAM,CAAK;IAG/B,iBAAiB,EAAE,MAAM,CAAK;IAG9B,WAAW,EAAE,UAAU,CAAC;IAGxB,UAAU,EAAE,SAAS,CAAC;IAGtB,QAAQ,EAAG,OAAO,CAAC;IAEnB,OAAO,CAAC,oBAAoB,CAA+B;IAC3D,OAAO,CAAC,iBAAiB,CAA+B;IAExD;;OAEG;IAC4B,OAAO,CAAC,qBAAqB,CAA0B;IAEtF,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED,0BAA0B;IAqB1B,uBAAuB;IAOvB,gBAAgB;IAUhB,kBAAkB;IAYlB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAU9B,eAAe;IAMf,WAAW;IAKX,YAAY;IAIZ,cAAc;IAId,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,EAAE;IAY9C,YAAY;IAmBlB,gBAAgB;IAKhB,oBAAoB;IAMpB,MAAM;CA2EP"}
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-4BO66Y63.js";import"../../chunk-BCRV6HG6.js";import"../../chunk-RCHKJINV.js";import"../../chunk-EZSEQHRH.js";import"../../chunk-7KND5OUR.js";import"../../chunk-23PSWIUF.js";import"../../chunk-2P3LD4HV.js";import"../../chunk-IPYZIIRV.js";import"../../chunk-NM74WWXQ.js";import"../../chunk-OYHUG47P.js";import"../../chunk-WEEGH2F4.js";import"../../chunk-EG7U7PM3.js";import"../../chunk-AYJMIZZ3.js";import"../../chunk-XDUIVR6I.js";import"../../chunk-HZ6A5QFC.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-3OQA4BKQ.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-HBPBDC7T.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-BWWXE4SL.js";export{a as default};
1
+ import{a}from"../../chunk-C2UDBDKV.js";import"../../chunk-BCRV6HG6.js";import"../../chunk-RCHKJINV.js";import"../../chunk-EZSEQHRH.js";import"../../chunk-3IZAFXL6.js";import"../../chunk-23PSWIUF.js";import"../../chunk-IEFQ6PGY.js";import"../../chunk-IPYZIIRV.js";import"../../chunk-NM74WWXQ.js";import"../../chunk-OYHUG47P.js";import"../../chunk-WEEGH2F4.js";import"../../chunk-EG7U7PM3.js";import"../../chunk-AYJMIZZ3.js";import"../../chunk-XDUIVR6I.js";import"../../chunk-HZ6A5QFC.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-3OQA4BKQ.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-HBPBDC7T.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-BWWXE4SL.js";export{a as default};
2
2
  //# sourceMappingURL=bl-datepicker.js.map
@@ -1,4 +1,4 @@
1
- import{a as c}from"../../chunk-M54AQSC3.js";import{a as n}from"../../chunk-DINNT5P2.js";import{b as s}from"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import{b as e}from"../../chunk-4OT5AMS5.js";import"../../chunk-BWWXE4SL.js";var d={title:"Components/Dialog",component:"bl-dialog",parameters:{chromatic:{viewports:[1e3]},controls:{exclude:["id"]}},decorators:[c],argTypes:{open:{control:"boolean"},polyfilled:{control:"boolean"},caption:{control:"text"},content:{control:"text"}}},q=d,t=i=>async()=>{let a=document.getElementById(i);a.open=!0},o=i=>e`
1
+ import{b as c}from"../../chunk-M4E4CVZ4.js";import{a as n}from"../../chunk-DINNT5P2.js";import{b as s}from"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import{b as e}from"../../chunk-4OT5AMS5.js";import"../../chunk-BWWXE4SL.js";var d={title:"Components/Dialog",component:"bl-dialog",parameters:{chromatic:{viewports:[1e3]},controls:{exclude:["id"]}},decorators:[c],argTypes:{open:{control:"boolean"},polyfilled:{control:"boolean"},caption:{control:"text"},content:{control:"text"}}},q=d,t=i=>async()=>{let a=document.getElementById(i);a.open=!0},o=i=>e`
2
2
  <bl-button @bl-click="${t(i.id)}" variant="secondary">Open Dialog</bl-button>
3
3
 
4
4
  <bl-dialog
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-7KND5OUR.js";import"../../chunk-23PSWIUF.js";import"../../chunk-NM74WWXQ.js";import"../../chunk-OYHUG47P.js";import"../../chunk-EG7U7PM3.js";import"../../chunk-AYJMIZZ3.js";import"../../chunk-XDUIVR6I.js";import"../../chunk-HZ6A5QFC.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-3OQA4BKQ.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-HBPBDC7T.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-BWWXE4SL.js";export{a as default};
1
+ import{a}from"../../chunk-3IZAFXL6.js";import"../../chunk-23PSWIUF.js";import"../../chunk-NM74WWXQ.js";import"../../chunk-OYHUG47P.js";import"../../chunk-EG7U7PM3.js";import"../../chunk-AYJMIZZ3.js";import"../../chunk-XDUIVR6I.js";import"../../chunk-HZ6A5QFC.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-3OQA4BKQ.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-HBPBDC7T.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-BWWXE4SL.js";export{a as default};
2
2
  //# sourceMappingURL=bl-input.js.map
@@ -0,0 +1,77 @@
1
+ import { CSSResultGroup, LitElement, TemplateResult } from "lit";
2
+ export type LinkVariant = "inline" | "standalone";
3
+ export type LinkSize = "large" | "medium" | "small";
4
+ export type LinkKind = "primary" | "neutral";
5
+ /**
6
+ * @tag bl-link
7
+ * @summary Baklava Link component for navigation
8
+ *
9
+ * @slot icon - Custom icon slot for non-standalone variants
10
+ *
11
+ * @cssproperty [--bl-link-color=--bl-color-primary] Sets the color of link
12
+ * @cssproperty [--bl-link-hover-color=--bl-color-primary-hover] Sets the hover color of link
13
+ * @cssproperty [--bl-link-active-color=--bl-color-primary-active] Sets the active color of link
14
+ */
15
+ export default class BlLink extends LitElement {
16
+ static get styles(): CSSResultGroup;
17
+ /**
18
+ * URL that the hyperlink points to
19
+ */
20
+ href: HTMLAnchorElement["href"];
21
+ /**
22
+ * Link variant - inline or standalone
23
+ */
24
+ variant: LinkVariant;
25
+ /**
26
+ * Link size - only applies to standalone variant
27
+ */
28
+ size: LinkSize;
29
+ /**
30
+ * Link kind - only applies to standalone variant
31
+ */
32
+ kind: LinkKind;
33
+ /**
34
+ * Aria label for the link
35
+ */
36
+ ariaLabel: string;
37
+ /**
38
+ * Where to display the linked URL
39
+ */
40
+ target: HTMLAnchorElement["target"];
41
+ /**
42
+ * Relationship between the current document and the linked document.
43
+ * Multiple rel values can be specified by separating them with spaces.
44
+ * Example: "noopener noreferrer"
45
+ */
46
+ rel?: HTMLAnchorElement["rel"];
47
+ /**
48
+ * Language of the linked document
49
+ */
50
+ hreflang?: HTMLAnchorElement["hreflang"];
51
+ /**
52
+ * MIME type of the linked document
53
+ */
54
+ type?: HTMLAnchorElement["type"];
55
+ /**
56
+ * Referrer policy for the link
57
+ */
58
+ referrerPolicy?: HTMLAnchorElement["referrerPolicy"];
59
+ /**
60
+ * Whether to download the resource instead of navigating to it
61
+ */
62
+ download?: HTMLAnchorElement["download"];
63
+ /**
64
+ * Ping URLs to be notified when following the link
65
+ */
66
+ ping?: HTMLAnchorElement["ping"];
67
+ private get isStandalone();
68
+ private renderIcon;
69
+ connectedCallback(): void;
70
+ render(): TemplateResult;
71
+ }
72
+ declare global {
73
+ interface HTMLElementTagNameMap {
74
+ "bl-link": BlLink;
75
+ }
76
+ }
77
+ //# sourceMappingURL=bl-link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bl-link.d.ts","sourceRoot":"","sources":["../../../src/components/link/bl-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAMvE,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,YAAY,CAAC;AAClD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAE7C;;;;;;;;;GASG;AAGH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,UAAU;IAC5C,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED;;OAEG;IAEH,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAM;IAErC;;OAEG;IAEH,OAAO,EAAE,WAAW,CAAY;IAEhC;;OAEG;IAEH,IAAI,EAAE,QAAQ,CAAY;IAE1B;;OAEG;IAEH,IAAI,EAAE,QAAQ,CAAa;IAE3B;;OAEG;IAEH,SAAS,SAAM;IAEf;;OAEG;IAEH,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAW;IAE9C;;;;OAIG;IAEH,GAAG,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAE/B;;OAEG;IAEH,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAEzC;;OAEG;IAEH,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAEjC;;OAEG;IAEH,cAAc,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAErD;;OAEG;IAEH,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAEzC;;OAEG;IAEH,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAEjC,OAAO,KAAK,YAAY,GAEvB;IAED,OAAO,CAAC,UAAU;IAOlB,iBAAiB;IAiBjB,MAAM,IAAI,cAAc;CAgCzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
@@ -0,0 +1,2 @@
1
+ import{a}from"../../chunk-7N7YHRPA.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-DINNT5P2.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-BWWXE4SL.js";export{a as default};
2
+ //# sourceMappingURL=bl-link.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,31 @@
1
+ import type { Meta, StoryObj } from "@storybook/web-components";
2
+ interface LinkArgs {
3
+ href?: string;
4
+ variant?: "inline" | "standalone";
5
+ size?: "small" | "medium" | "large";
6
+ kind?: "primary" | "neutral";
7
+ target?: HTMLAnchorElement["target"];
8
+ rel?: HTMLAnchorElement["rel"];
9
+ hreflang?: HTMLAnchorElement["hreflang"];
10
+ type?: HTMLAnchorElement["type"];
11
+ referrerPolicy?: HTMLAnchorElement["referrerPolicy"];
12
+ download?: HTMLAnchorElement["download"];
13
+ ping?: HTMLAnchorElement["ping"];
14
+ "aria-label"?: string;
15
+ content?: string;
16
+ customStyles?: string;
17
+ icon?: string;
18
+ }
19
+ declare const meta: Meta<LinkArgs>;
20
+ export default meta;
21
+ type Story = StoryObj<LinkArgs>;
22
+ export declare const Default: Story;
23
+ export declare const InlineLink: Story;
24
+ export declare const StandaloneLink: Story;
25
+ export declare const CustomIconLink: Story;
26
+ export declare const SizeVariants: Story;
27
+ export declare const KindVariants: Story;
28
+ export declare const NativeAnchorAttributes: Story;
29
+ export declare const AccessibleLink: Story;
30
+ export declare const CustomInlineColors: Story;
31
+ //# sourceMappingURL=bl-link.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bl-link.stories.d.ts","sourceRoot":"","sources":["../../../src/components/link/bl-link.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAMhE,UAAU,QAAQ;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,QAAQ,GAAG,YAAY,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACrC,GAAG,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAKD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,QAAQ,CAkJxB,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAA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