@trendyol/baklava 3.0.0-beta.16 → 3.0.0-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/assets/credit_card.svg +4 -0
- package/dist/assets/door_open.svg +3 -0
- package/dist/baklava.js +1 -1
- package/dist/{chunk-D5MPTIGC.js → chunk-LPHOBDYM.js} +2 -2
- package/dist/{chunk-X2XFV2S3.js → chunk-P4FHU5BE.js} +2 -2
- package/dist/chunk-XDJ3G3LW.js +111 -0
- package/dist/{chunk-ITD4T4IW.js.map → chunk-XDJ3G3LW.js.map} +3 -3
- package/dist/{chunk-5HU4KWMX.js → chunk-Y3PONRYW.js} +2 -2
- package/dist/components/icon/icon-list.d.ts +1 -1
- package/dist/components/icon/icon-list.d.ts.map +1 -1
- package/dist/components/icon/icon-list.js +1 -1
- package/dist/components/icon/icon-list.js.map +2 -2
- package/dist/components/pagination/bl-pagination.js +1 -1
- package/dist/components/select/bl-select.d.ts +4 -0
- package/dist/components/select/bl-select.d.ts.map +1 -1
- package/dist/components/select/bl-select.js +1 -1
- package/dist/components/tab-group/bl-tab-group.js +1 -1
- package/dist/components/table/table-cell/bl-table-cell.js +1 -1
- package/dist/components/table/table-header-cell/bl-table-header-cell.js +1 -1
- package/dist/components/table/table-row/bl-table-row.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-ITD4T4IW.js +0 -111
- /package/dist/{chunk-D5MPTIGC.js.map → chunk-LPHOBDYM.js.map} +0 -0
- /package/dist/{chunk-X2XFV2S3.js.map → chunk-P4FHU5BE.js.map} +0 -0
- /package/dist/{chunk-5HU4KWMX.js.map → chunk-Y3PONRYW.js.map} +0 -0
package/README.md
CHANGED
|
@@ -29,8 +29,8 @@ Web implementation of the design system is created as native web components so i
|
|
|
29
29
|
Preferred way of using Baklava is using it via CDN. Just import library JS and CSS files to your main document like below:
|
|
30
30
|
|
|
31
31
|
```html
|
|
32
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@trendyol/baklava@3.
|
|
33
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@trendyol/baklava@3.
|
|
32
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@trendyol/baklava@3.1.0/dist/themes/default.css" />
|
|
33
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@trendyol/baklava@3.1.0/dist/baklava.js"></script>
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
This way library will be served from a very high performant CDN and all of the Baklava web components will be ready to use inside your web project.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M0 6.00002C0 4.1144 0 3.17159 0.585786 2.5858C1.17157 2.00002 2.11438 2.00002 4 2.00002H20C21.8856 2.00002 22.8284 2.00002 23.4142 2.5858C24 3.17159 24 4.1144 24 6.00002V7.00002H0V6.00002Z" fill="currentColor"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 10H24V18C24 19.8856 24 20.8284 23.4142 21.4142C22.8284 22 21.8856 22 20 22H4C2.11438 22 1.17157 22 0.585786 21.4142C0 20.8284 0 19.8856 0 18V10ZM17.5 16C16.6716 16 16 16.6716 16 17.5C16 18.3284 16.6716 19 17.5 19H19.5C20.3284 19 21 18.3284 21 17.5C21 16.6716 20.3284 16 19.5 16H17.5Z" fill="currentColor"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8356 0.0138454C15.4451 -0.0876836 16 0.382083 16 0.99966V2H19C19.5523 2 20 2.44772 20 3V21C20 21.5523 19.5523 22 19 22H16V23.0002C16 23.6177 15.4451 24.0875 14.8356 23.986L4.8356 22.2424C4.35341 22.1621 4 21.7452 4 21.2566V2.96162C4 2.47307 4.35341 2.05612 4.8356 1.9758L14.8356 0.0138454ZM16 20H18V4H16V20ZM10.5714 12.1091C10.5714 11.1629 11.3389 10.3958 12.2857 10.3958C13.2325 10.3958 14 11.1629 14 12.1091C14 13.0553 13.2325 13.8224 12.2857 13.8224C11.3389 13.8224 10.5714 13.0553 10.5714 12.1091Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
package/dist/baklava.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as
|
|
1
|
+
import{b as j}from"./chunk-P4FHU5BE.js";import{b as q}from"./chunk-LPHOBDYM.js";import{b as O}from"./chunk-Y3PONRYW.js";import{b as v}from"./chunk-LIW32ZGE.js";import{b as y}from"./chunk-73GEFGEG.js";import{b as H}from"./chunk-WQTBAXMP.js";import{b as R}from"./chunk-FQBDGFMR.js";import{a as P}from"./chunk-5TPDRTCU.js";import{a as I}from"./chunk-QF4LGACD.js";import{a as w}from"./chunk-Q6MAW2EF.js";import{d as N}from"./chunk-ASB5S6J4.js";import{a as g}from"./chunk-IZTTP5LH.js";import{a as C}from"./chunk-HAE5XKSY.js";import{a as r}from"./chunk-7QNX2GPS.js";import{b as k}from"./chunk-4T26H7PC.js";import{a as n}from"./chunk-X67Z2G2H.js";import{a as s}from"./chunk-LXYK2N4C.js";import"./chunk-MND5TXTF.js";import{a as h}from"./chunk-MPS76EJL.js";import{a as c}from"./chunk-2GQCCDR3.js";import{c as b,f as T}from"./chunk-FVBGMXMC.js";import{a as i}from"./chunk-XDJ3G3LW.js";import{a as m}from"./chunk-WXWKIQAK.js";import"./chunk-EZSEQHRH.js";import{b as d,e as u}from"./chunk-IWBCUOHE.js";import"./chunk-EG7U7PM3.js";import"./chunk-AYJMIZZ3.js";import"./chunk-XDUIVR6I.js";import"./chunk-HZ6A5QFC.js";import{a as x}from"./chunk-4DWODYIT.js";import{a as B}from"./chunk-PACDVPAB.js";import{b as D,d as S,f as A}from"./chunk-WH6MQCKK.js";import{b as G}from"./chunk-73RGV4UX.js";import{b as p}from"./chunk-N6FMS7MM.js";import"./chunk-6LT7O7T2.js";import"./chunk-HBPBDC7T.js";import{a as o}from"./chunk-NGJM4NWA.js";import{a as l}from"./chunk-RQEU3SZQ.js";import"./chunk-ECPWEUBG.js";import"./chunk-DINNT5P2.js";import{a as f}from"./chunk-4BZSILLM.js";import{a as e,b as a,c as t}from"./chunk-U752J5IG.js";import"./chunk-GRL4DWKG.js";import"./chunk-3USCFSFQ.js";import"./chunk-7GK5LKBV.js";import"./chunk-5MOOXA2X.js";import"./chunk-4OT5AMS5.js";import"./chunk-IZ2LK5GK.js";export{r as BlAccordion,o as BlAccordionGroup,l as BlAlert,f as BlBadge,p as BlButton,d as BlCheckbox,u as BlCheckboxGroup,x as BlDialog,B as BlDrawer,A as BlDropdown,G as BlDropdownGroup,S as BlDropdownItem,t as BlIcon,s as BlInput,k as BlNotification,H as BlNotificationCard,n as BlPagination,h as BlPopover,c as BlProgressIndicator,b as BlRadio,T as BlRadioGroup,i as BlSelect,m as BlSelectOption,D as BlSplitButton,R as BlSwitch,w as BlTab,P as BlTabGroup,I as BlTabPanel,N as BlTable,y as BlTableBody,q as BlTableCell,v as BlTableHeader,j as BlTableHeaderCell,O as BlTableRow,g as BlTextarea,C as BlTooltip,a as getIconPath,e as setIconPath};
|
|
2
2
|
//# sourceMappingURL=baklava.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-Y3PONRYW.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-IZ2LK5GK.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-right:none}.table-cell{display:flex;align-items:center}.table-cell.shadow-right::before{content:"";position:absolute;right:-1px;top:0;width:16px;height:100%;z-index:-1;border-right:1px solid var(--bl-color-neutral-lighter);box-shadow:8px 0 16px 0 rgb(39 49 66 / 10%)}.table-cell.shadow-left::before{content:"";position:absolute;left:-1px;top:0;width:16px;height:100%;z-index:-1;border-left:1px solid var(--bl-color-neutral-lighter);box-shadow:-8px 0 16px 0 rgb(39 49 66 / 10%)}bl-checkbox{margin-right: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-5HU4KWMX.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-
|
|
11
|
+
//# sourceMappingURL=chunk-LPHOBDYM.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-Y3PONRYW.js";import{a as u}from"./chunk-DINNT5P2.js";import{a as b,b as p}from"./chunk-5MOOXA2X.js";import{a as d,b as i,f as h}from"./chunk-4OT5AMS5.js";import{d as a}from"./chunk-IZ2LK5GK.js";var f=d`:host{--header-cell-width:var(--bl-table-header-cell-width, auto);--header-cell-min-width:var(--bl-table-header-cell-min-width, auto);display:table-cell;border:1px solid var(--bl-color-neutral-lighter);background-color:var(--bl-color-neutral-lightest);padding:var(--bl-size-m);font:var(--bl-font-title-3-medium);color:var(--bl-color-neutral-darker);box-sizing:border-box;vertical-align:middle;white-space:normal;width:var(--header-cell-width);min-width:var(--header-cell-min-width);background-clip:padding-box}.table-header-cell{display:flex;align-items:center}.table-header-cell.shadow-right::before{content:"";position:absolute;right:-1px;top:0;width:16px;height:100%;z-index:-1;border-right:1px solid var(--bl-color-neutral-lighter);box-shadow:8px 0 16px 0 rgb(39 49 66 / 10%)}.table-header-cell.shadow-left::before{content:"";position:absolute;left:-1px;top:0;width:16px;height:100%;z-index:-1;border-left:1px solid var(--bl-color-neutral-lighter);box-shadow:-8px 0 16px 0 rgb(39 49 66 / 10%)}bl-checkbox{margin-right:var(--bl-size-m)}.sort-icons-wrapper{all:unset;width:100%;display:flex;align-items:center;justify-content:space-between;gap:var(--bl-size-4xs);cursor:pointer}.sort-icons-wrapper:focus-visible{outline:2px solid var(--bl-color-primary);outline-offset:2px;border-radius:var(--bl-border-radius-xs)}.sort-icons-wrapper bl-icon{font-size:var(--bl-font-size-m);color:var(--bl-color-neutral-darker)}`,g=f;var x="bl-table-header-cell",r=class extends h{constructor(){super(...arguments);this.sortKey=""}static get styles(){return[g]}get _table(){return this.closest("bl-table")}get _tableRow(){return this.closest("bl-table-row")}get selectable(){var e;return this.index===0&&!!((e=this._table)!=null&&e.isSelectable(!0))}get sortable(){var e;return!!((e=this._table)!=null&&e.sortable)&&!!this.sortKey}get index(){let e=this.parentNode;return e?[...e.children].indexOf(this):-1}get checked(){var e;return!!((e=this._table)!=null&&e.isAllSelected())}get indeterminate(){var e;return!!((e=this._table)!=null&&e.isAnySelected())}get isAllUnselectedDisabled(){var e;return!!((e=this._table)!=null&&e.isAllUnselectedDisabled())}get sortDirection(){var e,t;return((e=this._table)==null?void 0:e.sortKey)===this.sortKey&&((t=this._table)==null?void 0:t.sortDirection)||""}get sortIconName(){return this.sortDirection==="asc"?"sorting_asc":this.sortDirection==="desc"?"sorting_desc":"sorting"}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(m)||console.warn("bl-table-header-cell is designed to be used inside a bl-table-row",this)}onChange(e){var o,l;let t=(o=this.shadowRoot)==null?void 0:o.querySelector(".select-all");if(e.detail&&this.isAllUnselectedDisabled){setTimeout(()=>{var c;let s=(c=t==null?void 0:t.shadowRoot)==null?void 0:c.querySelector("input");s==null||s.click()},0);return}(l=this._table)==null||l.onSelectionChange(!0,e.detail,""),setTimeout(()=>{t.checked=this.checked,t.indeterminate=this.indeterminate})}onSort(){var t;let e="asc";this.sortDirection==="asc"?e="desc":this.sortDirection==="desc"&&(e=""),(t=this._table)==null||t.onSortChange(this.sortKey,e)}_renderCheckbox(){return this.selectable?i`<bl-checkbox
|
|
2
2
|
class="select-all"
|
|
3
3
|
value="all"
|
|
4
4
|
.indeterminate="${this.indeterminate}"
|
|
@@ -13,4 +13,4 @@ import{a as m}from"./chunk-5HU4KWMX.js";import{a as u}from"./chunk-DINNT5P2.js";
|
|
|
13
13
|
</button>`:i` <slot></slot>`;return i`<div class="table-header-cell ${o}" aria-sort=${u(n)}>
|
|
14
14
|
${this._renderCheckbox()} ${l}
|
|
15
15
|
</div> `}};a([p({type:String,reflect:!0,attribute:"sort-key"})],r.prototype,"sortKey",2),r=a([b(x)],r);export{x as a,r as b};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-P4FHU5BE.js.map
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import{b as C,d as E,f as I,g as V,h as P}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 z,c as b}from"./chunk-HBPBDC7T.js";import{a as y}from"./chunk-ECPWEUBG.js";import{a as x}from"./chunk-DINNT5P2.js";import{a as g}from"./chunk-GRL4DWKG.js";import{a as T,b as a,c as h,e as v,f as S}from"./chunk-5MOOXA2X.js";import{a as w,b as d,f as m}from"./chunk-4OT5AMS5.js";import{d as o}from"./chunk-IZ2LK5GK.js";var F=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);/* stylelint-disable-next-line property-no-vendor-prefix */-webkit-user-select:none;user-select:none;margin:0;width:auto;min-width:100%}.label,.placeholder{color:var(--placeholder-color);padding-left:var(--label-padding);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}:host(:not([placeholder])) .placeholder,.select-wrapper.selected .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}:host([label-fixed]) .label,:host(:not([label])) .label{display:none}.remove-all{display:none}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-neutral-darker)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-neutral-light)}.select-open .select-input,.select-input:focus-visible{border:solid 1px var(--border-focus-color);outline:none}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;padding-left:var(--label-padding);margin:0;list-style:none;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}: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-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:none;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--bl-index-popover);width:100%;top:var(--top);left:var(--left)}: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)}legend,label{padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));transition:all ease-in 0.1s;pointer-events:none;opacity:0;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color)}legend{height:0;visibility:hidden;display:none}legend span{padding:0 var(--label-padding);display:inline-block;opacity:0;visibility:visible}:host([placeholder]) :where(.select-open, .selected) .label,:host(:not([placeholder])) .selected .label{display:none}:where(.select-open, .selected) label{top:0;transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);pointer-events:initial;right:var(--padding-horizontal);opacity:1}:host([label]) :where(.select-open, .selected) legend{max-width:100%;font:var(--bl-font-caption);display:block}:host([label-fixed]) label{position:static;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color);opacity:1}:host([label-fixed]) legend{display:none}.hint{display:none;font:var(--bl-font-body-text-3)}.hint p{padding:0;margin:0}.error-icon,.invalid-text{display:none}.dirty.invalid label,.invalid-text,.error-icon{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-neutral-dark)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}:host([help-text]) .hint,.dirty.invalid .hint{display:block}.dirty.invalid .invalid-text{display:block}.dirty.invalid .help-text{display:none}.select-all{position:sticky;top:0;padding:var(--bl-size-xs) 0;background:var(--background-color);z-index:1;font:var(--bl-font-title-3-regular);/* Make sure option focus doesn't overflow */box-shadow:10px 0 0 var(--background-color),-10px 0 0 var(--background-color)}.select-all::after{position:absolute;content:"";width:100%;bottom:0;border-bottom:1px solid var(--bl-color-neutral-lighter)}.search-bar-input{font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--text-color);border:none;outline:none;background-color:transparent;width:100%;height:100%;padding:0;margin:0;box-sizing:border-box}.search-bar-input::placeholder{color:var(--placeholder-color)}.search-bar-input:focus-visible{outline:none}.search-loading-icon{animation:spin 1s linear infinite}.action-divider{display:none}.select-wrapper .action-divider{display:block;height:1rem;width:1px;background-color:var(--bl-color-neutral-lighter)}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.actions bl-icon{padding:4px}`,L=F;var i=class extends k(m){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._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[L]}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,()=>{P(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`)})})}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
|
|
4
|
+
class="remove-all"
|
|
5
|
+
size="small"
|
|
6
|
+
variant="tertiary"
|
|
7
|
+
kind="neutral"
|
|
8
|
+
icon="close"
|
|
9
|
+
@click=${this._onClickRemove}
|
|
10
|
+
></bl-button>`:"",n=this.searchBar&&this.opened,c=this._selectedOptions.length>0,r=n||c&&l,u=(O=this.searchBarPlaceholder)!=null?O:b("Search",{desc:"bl-select: search placeholder text"}),A=d`<bl-icon
|
|
11
|
+
class="search-mag-icon"
|
|
12
|
+
name="search"
|
|
13
|
+
style="color: var(--bl-color-primary);font-size: var(--bl-font-size-s)"
|
|
14
|
+
></bl-icon>`,M=d`<bl-icon
|
|
15
|
+
class="search-loading-icon"
|
|
16
|
+
name="loading"
|
|
17
|
+
style="color: var(--bl-color-primary);font-size: var(--bl-font-size-s)"
|
|
18
|
+
></bl-icon>`,_=r?d`<div class="action-divider"></div>`:"",D=d`<fieldset
|
|
19
|
+
class=${f({"select-input":!0,"has-overflowed-options":this._additionalSelectedOptionCount>0})}
|
|
20
|
+
tabindex="${this.disabled?"-1":0}"
|
|
21
|
+
.autofocus=${this.autofocus}
|
|
22
|
+
role="button"
|
|
23
|
+
aria-haspopup="listbox"
|
|
24
|
+
aria-expanded="${this.opened}"
|
|
25
|
+
aria-labelledby="label"
|
|
26
|
+
@click=${this.open}
|
|
27
|
+
>
|
|
28
|
+
<legend><span>${this.label}</span></legend>
|
|
29
|
+
|
|
30
|
+
${this._selectedOptions.length>0&&!this.opened?e:d`
|
|
31
|
+
<input
|
|
32
|
+
class="search-bar-input"
|
|
33
|
+
placeholder=${this.opened||this.labelFixed?u:this.label||u}
|
|
34
|
+
@input=${this._handleSearchOptions}
|
|
35
|
+
@keydown=${p=>{p.code==="Space"&&p.stopPropagation()}}
|
|
36
|
+
.value=${this._searchText}
|
|
37
|
+
/>
|
|
38
|
+
`}
|
|
39
|
+
${this.opened?"":d`<span class="additional-selection-count"
|
|
40
|
+
>+${this._additionalSelectedOptionCount}</span
|
|
41
|
+
>`}
|
|
42
|
+
|
|
43
|
+
<div class="actions">
|
|
44
|
+
${this.opened?this.searchBarLoadingState?M:A:""}
|
|
45
|
+
${this.opened?"":s} ${_}
|
|
46
|
+
|
|
47
|
+
<div @click=${this._togglePopover}>
|
|
48
|
+
<bl-icon class="dropdown-icon open" name="arrow_up"></bl-icon>
|
|
49
|
+
|
|
50
|
+
<bl-icon class="dropdown-icon closed" name="arrow_down"></bl-icon>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</fieldset>`;return this.searchBar?D:d`<fieldset
|
|
54
|
+
class=${f({"select-input":!0,"has-overflowed-options":this._additionalSelectedOptionCount>0})}
|
|
55
|
+
tabindex="${x(this.disabled?void 0:0)}"
|
|
56
|
+
?autofocus=${this.autofocus}
|
|
57
|
+
@click=${this._togglePopover}
|
|
58
|
+
role="button"
|
|
59
|
+
aria-haspopup="listbox"
|
|
60
|
+
aria-expanded="${this.opened}"
|
|
61
|
+
aria-labelledby="label"
|
|
62
|
+
>
|
|
63
|
+
<legend><span>${this.label}</span></legend>
|
|
64
|
+
<span class="placeholder">${this.placeholder}</span>
|
|
65
|
+
<span class="label">${this.label}</span>
|
|
66
|
+
${e}
|
|
67
|
+
<span class="additional-selection-count">+${this._additionalSelectedOptionCount}</span>
|
|
68
|
+
<div class="actions">
|
|
69
|
+
${s} ${_}
|
|
70
|
+
<bl-icon class="dropdown-icon open" name="arrow_up"></bl-icon>
|
|
71
|
+
|
|
72
|
+
<bl-icon class="dropdown-icon closed" name="arrow_down"></bl-icon>
|
|
73
|
+
</div>
|
|
74
|
+
</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:b("Select All",{desc:"bl-select: select all text"});return d`<bl-checkbox
|
|
75
|
+
class="select-all"
|
|
76
|
+
.checked="${e}"
|
|
77
|
+
.indeterminate="${t&&!e}"
|
|
78
|
+
role="option"
|
|
79
|
+
aria-selected="${e}"
|
|
80
|
+
@bl-checkbox-change="${this._handleSelectAll}"
|
|
81
|
+
>
|
|
82
|
+
${l}
|
|
83
|
+
</bl-checkbox>`}render(){var c,r;let e=this.checkValidity()?"":d`<p id="errorMessage" aria-live="polite" class="invalid-text">
|
|
84
|
+
${this.validationMessage}
|
|
85
|
+
</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:b("No Data Found",{desc:"bl-select: search no data text"}),n=(r=this.popoverClearSearchText)!=null?r:b("Clear Search",{desc:"bl-select: clear search button text"});return d`<div
|
|
86
|
+
class=${f({"select-wrapper":!0,"select-open":this.opened,selected:this._selectedOptions.length>0,invalid:!this.validity.valid,dirty:this.dirty})}
|
|
87
|
+
@keydown=${this.handleKeydown}
|
|
88
|
+
>
|
|
89
|
+
${l} ${this.inputTemplate()}
|
|
90
|
+
<div
|
|
91
|
+
class="popover"
|
|
92
|
+
tabindex="${x(this._isPopoverOpen?void 0:"-1")}"
|
|
93
|
+
@bl-select-option=${this._handleSelectOptionEvent}
|
|
94
|
+
role="listbox"
|
|
95
|
+
aria-multiselectable="${this.multiple}"
|
|
96
|
+
aria-labelledby="label"
|
|
97
|
+
>
|
|
98
|
+
${this.selectAllTemplate()}
|
|
99
|
+
<slot></slot>
|
|
100
|
+
${this.searchBar&&this.noResultFound?d`<div name="popover-clear-search-text" class="popover-no-result">
|
|
101
|
+
<span>${s}</span>
|
|
102
|
+
<bl-button
|
|
103
|
+
variant="tertiary"
|
|
104
|
+
@click=${()=>{this._handleSearchOptions({target:{value:""}})}}
|
|
105
|
+
>${n}</bl-button
|
|
106
|
+
>
|
|
107
|
+
</div>`:""}
|
|
108
|
+
</div>
|
|
109
|
+
<div class="hint">${e} ${t}</div>
|
|
110
|
+
</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){this.focusedOptionIndex===-1&&["Enter","Space"].includes(e.code)?(this._togglePopover(),e.preventDefault()):this._isPopoverOpen===!1&&["ArrowDown","ArrowUp"].includes(e.code)?(this.open(),e.preventDefault()):e.code==="Escape"?(this.close(),e.preventDefault()):this._isPopoverOpen&&["ArrowDown","ArrowUp"].includes(e.code)?(e.code==="ArrowDown"&&this.focusedOptionIndex++,e.code==="ArrowUp"&&this.focusedOptionIndex--,this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,this.options.length-1)),this.options[this.focusedOptionIndex].focus(),e.preventDefault()):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=>{var s;let l=(s=t.textContent)==null?void 0:s.toLowerCase().includes(this._searchText.toLowerCase());t.hidden=!l}),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._handleSelectEvent(),this._isPopoverOpen=!1}_handleMultipleSelect(){this.value=this._connectedOptions.filter(e=>e.selected).map(e=>e.value),this._handleSelectEvent()}_handleSelectOptionEvent(e){let t=e.target;this.dirty=!0,this.multiple?this._handleMultipleSelect():this._handleSingleSelect(t)}_handleSelectAll(e){var 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 u;let r=(u=t==null?void 0:t.shadowRoot)==null?void 0:u.querySelector("input");r==null||r.click()},0);return}this._connectedOptions.forEach(r=>{r.disabled||r.hidden||(r.selected=l)}),this._handleMultipleSelect()}_onClickRemove(e){e.stopPropagation();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={...m.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([h()],i.prototype,"_isPopoverOpen",2),o([h()],i.prototype,"_additionalSelectedOptionCount",2),o([h()],i.prototype,"_searchText",2),o([v(".selected-options")],i.prototype,"selectedOptionsContainer",2),o([S(".selected-options li")],i.prototype,"selectedOptionsItems",2),o([v(".popover")],i.prototype,"_popover",2),o([v(".select-input")],i.prototype,"_selectInput",2),o([g("bl-select")],i.prototype,"_onBlSelect",2),o([g("bl-search")],i.prototype,"_onBlSearch",2),o([h()],i.prototype,"_selectedOptions",2),o([h()],i.prototype,"dirty",2),o([v(".select-input")],i.prototype,"validationTarget",2),i=o([T("bl-select"),z()],i);export{i as a};
|
|
111
|
+
//# sourceMappingURL=chunk-XDJ3G3LW.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/components/select/bl-select.css", "../src/components/select/bl-select.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;display:grid;gap:var(--bl-size-3xs);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--label-padding:var(--bl-size-3xs);--border-size:1px;--background-color:var(--bl-color-neutral-full);--border-color:var(--bl-color-neutral-lighter);--border-focus-color:var(--bl-color-primary-highlight);--icon-color:var(--bl-color-neutral-light);--text-color:var(--bl-color-neutral-darker);--label-color:var(--bl-color-neutral-dark);--placeholder-color:var(--bl-color-neutral-light);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-neutral-lightest);--menu-height:250px;--popover-position:var(--bl-popover-position, fixed)}:host([multiple][view-select-all]) .select-wrapper{--menu-height:290px}:host([size=\"large\"]) .select-wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size=\"small\"]) .select-wrapper{--height:var(--bl-size-xl);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-xs);--font-size:var(--bl-font-size-s)}:host([disabled]) .select-wrapper{--placeholder-color:var(--bl-color-neutral-light)}.dirty.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-highlight);--label-color:var(--bl-color-danger)}.select-input{display:grid;align-items:center;justify-content:space-between;grid-template-columns:1fr max-content max-content;cursor:pointer;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 calc(var(--padding-horizontal) - var(--label-padding) - var(--border-size));border-radius:var(--bl-border-radius-s);color:var(--text-color);background-color:var(--background-color);/* stylelint-disable-next-line property-no-vendor-prefix */-webkit-user-select:none;user-select:none;margin:0;width:auto;min-width:100%}.label,.placeholder{color:var(--placeholder-color);padding-left:var(--label-padding);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}:host(:not([placeholder])) .placeholder,.select-wrapper.selected .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}:host([label-fixed]) .label,:host(:not([label])) .label{display:none}.remove-all{display:none}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-neutral-darker)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-neutral-light)}.select-open .select-input,.select-input:focus-visible{border:solid 1px var(--border-focus-color);outline:none}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;padding-left:var(--label-padding);margin:0;list-style:none;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}: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-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:none;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--bl-index-popover);width:100%;top:var(--top);left:var(--left)}: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)}legend,label{padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));transition:all ease-in 0.1s;pointer-events:none;opacity:0;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color)}legend{height:0;visibility:hidden;display:none}legend span{padding:0 var(--label-padding);display:inline-block;opacity:0;visibility:visible}:host([placeholder]) :where(.select-open, .selected) .label,:host(:not([placeholder])) .selected .label{display:none}:where(.select-open, .selected) label{top:0;transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);pointer-events:initial;right:var(--padding-horizontal);opacity:1}:host([label]) :where(.select-open, .selected) legend{max-width:100%;font:var(--bl-font-caption);display:block}:host([label-fixed]) label{position:static;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color);opacity:1}:host([label-fixed]) legend{display:none}.hint{display:none;font:var(--bl-font-body-text-3)}.hint p{padding:0;margin:0}.error-icon,.invalid-text{display:none}.dirty.invalid label,.invalid-text,.error-icon{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-neutral-dark)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}:host([help-text]) .hint,.dirty.invalid .hint{display:block}.dirty.invalid .invalid-text{display:block}.dirty.invalid .help-text{display:none}.select-all{position:sticky;top:0;padding:var(--bl-size-xs) 0;background:var(--background-color);z-index:1;font:var(--bl-font-title-3-regular);/* Make sure option focus doesn't overflow */box-shadow:10px 0 0 var(--background-color),-10px 0 0 var(--background-color)}.select-all::after{position:absolute;content:\"\";width:100%;bottom:0;border-bottom:1px solid var(--bl-color-neutral-lighter)}.search-bar-input{font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--text-color);border:none;outline:none;background-color:transparent;width:100%;height:100%;padding:0;margin:0;box-sizing:border-box}.search-bar-input::placeholder{color:var(--placeholder-color)}.search-bar-input:focus-visible{outline:none}.search-loading-icon{animation:spin 1s linear infinite}.action-divider{display:none}.select-wrapper .action-divider{display:block;height:1rem;width:1px;background-color:var(--bl-color-neutral-lighter)}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.actions bl-icon{padding:4px}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, 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 { msg, localized } from \"@lit/localize\";\nimport { FormControlMixin, requiredValidator } from \"@open-wc/form-control\";\nimport { FormValue } from \"@open-wc/form-helpers\";\nimport \"element-internals-polyfill\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport { stringBooleanConverter } from \"../../utilities/string-boolean.converter\";\nimport \"../button/bl-button\";\nimport BlCheckbox from \"../checkbox-group/checkbox/bl-checkbox\";\nimport \"../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 _connectedOptions: BlSelectOption<ValueType>[] = [];\n\n private _cleanUpPopover: CleanUpFunction | null = null;\n\n private setOptionsSelected() {\n this._connectedOptions.forEach(\n option =>\n (option.selected =\n this.value === option.value ||\n (Array.isArray(this.value) && this.value.includes(option.value)))\n );\n\n this._selectedOptions = [...this.options.filter(option => option.selected)];\n }\n\n get options() {\n return this._connectedOptions;\n }\n\n get opened() {\n return this._isPopoverOpen;\n }\n\n get noResultFound() {\n return this._searchText !== \"\" && this._connectedOptions.every(option => option.hidden);\n }\n\n @state()\n private _selectedOptions: BlSelectOption<ValueType>[] = [];\n\n @state()\n private dirty = false;\n\n get selectedOptions(): BlSelectOption<ValueType>[] {\n return this._selectedOptions;\n }\n\n get additionalSelectedOptionCount() {\n return this._additionalSelectedOptionCount;\n }\n\n validityCallback(): string | void {\n if (this.customInvalidText) {\n return this.customInvalidText;\n }\n const select = document.createElement(\"select\");\n\n select.required = this.required;\n\n return select.validationMessage;\n }\n\n reportValidity() {\n this.dirty = true;\n return this.checkValidity();\n }\n\n resetFormControl(): void {\n this.value = this._initialValue;\n }\n\n @query(\".select-input\")\n validationTarget: HTMLElement;\n\n open() {\n if (this.searchBar) {\n setTimeout(() => {\n document.activeElement?.shadowRoot?.querySelector(\"input\")?.focus();\n }, 100);\n }\n\n this._isPopoverOpen = true;\n this._setupPopover();\n document.addEventListener(\"click\", this._interactOutsideHandler, true);\n document.addEventListener(\"focus\", this._interactOutsideHandler, true);\n }\n\n close() {\n this._handleSearchOptions({ target: { value: \"\" } } as InputEvent & {\n target: HTMLInputElement;\n });\n\n this._isPopoverOpen = false;\n this.focusedOptionIndex = -1;\n this._cleanUpPopover && this._cleanUpPopover();\n document.removeEventListener(\"click\", this._interactOutsideHandler, true);\n document.removeEventListener(\"focus\", this._interactOutsideHandler, true);\n }\n\n private _interactOutsideHandler = (event: MouseEvent | FocusEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath?.find(el => el.tagName === \"BL-SELECT\")?.contains(this)) {\n this.close();\n }\n };\n\n private _setupPopover() {\n this._cleanUpPopover = autoUpdate(this._selectInput, this._popover, () => {\n computePosition(this._selectInput, this._popover, {\n placement: \"bottom\",\n strategy: \"fixed\",\n middleware: [\n flip(),\n offset(8),\n size({\n apply(args: MiddlewareState) {\n Object.assign(args.elements.floating.style, {\n width: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n },\n }),\n ],\n }).then(({ x, y }) => {\n this._popover.style.setProperty(\"--left\", `${x}px`);\n this._popover.style.setProperty(\"--top\", `${y}px`);\n });\n });\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.form?.addEventListener(\"submit\", (e: SubmitEvent) => {\n if (!this.reportValidity()) {\n e.preventDefault();\n }\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this._cleanUpPopover && this._cleanUpPopover();\n }\n\n private inputTemplate() {\n const inputSelectedOptions = html`<ul class=\"selected-options\">\n ${this._selectedOptions.map(\n item => html`<li>${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 searchLoadingIcon = html`<bl-icon\n class=\"search-loading-icon\"\n name=\"loading\"\n style=\"color: var(--bl-color-primary);font-size: var(--bl-font-size-s)\"\n ></bl-icon>`;\n\n const actionDivider = isDividerShown ? html`<div class=\"action-divider\"></div>` : \"\";\n\n const search = html`<fieldset\n class=${classMap({\n \"select-input\": true,\n \"has-overflowed-options\": this._additionalSelectedOptionCount > 0,\n })}\n tabindex=\"${this.disabled ? \"-1\" : 0}\"\n .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 ? searchLoadingIcon : searchMagIcon) : \"\"}\n ${!this.opened ? removeButton : \"\"} ${actionDivider}\n\n <div @click=${this._togglePopover}>\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 </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\n private handleKeydown(event: KeyboardEvent) {\n if (this.focusedOptionIndex === -1 && [\"Enter\", \"Space\"].includes(event.code)) {\n this._togglePopover();\n event.preventDefault();\n } else if (this._isPopoverOpen === false && [\"ArrowDown\", \"ArrowUp\"].includes(event.code)) {\n this.open();\n event.preventDefault();\n } else if (event.code === \"Escape\") {\n this.close();\n event.preventDefault();\n } else if (this._isPopoverOpen && [\"ArrowDown\", \"ArrowUp\"].includes(event.code)) {\n event.code === \"ArrowDown\" && this.focusedOptionIndex++;\n event.code === \"ArrowUp\" && this.focusedOptionIndex--;\n\n // Don't exceed array indexes\n this.focusedOptionIndex = Math.max(\n 0,\n Math.min(this.focusedOptionIndex, this.options.length - 1)\n );\n\n this.options[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n }\n }\n\n private _togglePopover() {\n this._isPopoverOpen ? this.close() : this.open();\n }\n\n private _handleSelectEvent() {\n const options = this._selectedOptions.map(\n option =>\n ({\n value: option.value,\n selected: option.selected,\n text: option.textContent,\n } as ISelectOption<ValueType>)\n );\n\n if (!this.multiple) this._onBlSelect(options[0]);\n else this._onBlSelect(options);\n }\n\n private _handleSearchEvent() {\n this._onBlSearch(this._searchText);\n }\n\n private _handleSearchOptions(e: InputEvent): void {\n if (!this.searchBar) return;\n\n this._searchText = (e.target as HTMLInputElement).value;\n\n this._handleSearchEvent();\n\n this._connectedOptions.forEach(option => {\n const isVisible = option.textContent?.toLowerCase().includes(this._searchText.toLowerCase());\n\n option.hidden = !isVisible;\n });\n\n this._selectedOptions = this.options.filter(option => option.selected);\n\n this._handleLastVisibleSearchedOption();\n\n this.requestUpdate();\n }\n\n private _handleLastVisibleSearchedOption() {\n const lastVisibleOption = [...this.options].reverse().find(option => !option.hidden);\n\n if (lastVisibleOption) {\n lastVisibleOption?.shadowRoot?.querySelector(\"div\")?.classList.add(\"no-border-bottom\");\n }\n\n this.options.map(option => {\n if (!option.hidden && option !== lastVisibleOption) {\n option.shadowRoot?.querySelector(\"div\")?.classList.remove(\"no-border-bottom\");\n }\n });\n }\n\n private _handleSingleSelect(optionItem: BlSelectOption<ValueType>) {\n this.value = optionItem.value;\n\n this._handleSelectEvent();\n this._isPopoverOpen = false;\n }\n\n private _handleMultipleSelect() {\n this.value = this._connectedOptions\n .filter(option => option.selected)\n .map(option => option.value);\n\n this._handleSelectEvent();\n }\n\n private _handleSelectOptionEvent(e: CustomEvent) {\n const optionItem = e.target as BlSelectOption<ValueType>;\n\n this.dirty = true;\n\n if (this.multiple) {\n this._handleMultipleSelect();\n } else {\n this._handleSingleSelect(optionItem);\n }\n }\n\n private _handleSelectAll(e: CustomEvent) {\n const selectAllEl = this.shadowRoot?.querySelector(\".select-all\") as BlCheckbox;\n\n const checked = e.detail;\n const unselectedOptions = this._connectedOptions.filter(\n option => !option.selected && !option.hidden\n );\n const isAllUnselectedDisabled = unselectedOptions.every(option => option.disabled);\n\n // If all available options are selected, instead of checking, uncheck all options\n if (checked && isAllUnselectedDisabled) {\n setTimeout(() => {\n const checkbox = selectAllEl?.shadowRoot?.querySelector(\"input\");\n\n checkbox?.click();\n }, 0);\n return;\n }\n\n this._connectedOptions.forEach(option => {\n if (option.disabled || option.hidden) {\n return;\n }\n\n option.selected = checked;\n });\n\n this._handleMultipleSelect();\n }\n\n private _onClickRemove(e: MouseEvent) {\n e.stopPropagation();\n\n const selectedDisabledOptions = this._selectedOptions.filter(option => option.disabled);\n\n this._connectedOptions\n .filter(option => !option.disabled && option.selected)\n .forEach(option => {\n option.selected = false;\n });\n\n this.value = selectedDisabledOptions.length\n ? selectedDisabledOptions.map(option => option.value)\n : null;\n this._handleSelectEvent();\n }\n\n private _checkAdditionalItemCount() {\n if (!this.multiple || !this.selectedOptionsItems || this.selectedOptionsItems.length < 2) {\n this._additionalSelectedOptionCount = 0;\n return;\n }\n\n const firstNonVisibleItemIndex = [...this.selectedOptionsItems].findIndex(\n item => item.offsetLeft > this.selectedOptionsContainer.offsetWidth\n );\n\n if (firstNonVisibleItemIndex > -1) {\n this._additionalSelectedOptionCount =\n this.selectedOptionsItems.length - firstNonVisibleItemIndex;\n } else {\n this._additionalSelectedOptionCount = 0;\n }\n }\n\n protected firstUpdated(): void {\n if (this.value === undefined) {\n 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 HTMLElementTagName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AAA,CADPE,EAAM,GApKY5D,EAqKX,8CAGA0D,EAAA,CADPE,EAAM,GAvKY5D,EAwKX,2BAGA0D,EAAA,CADPG,EAAM,mBAAmB,GA1KP7D,EA2KX,wCAGA0D,EAAA,CADPpC,EAAS,sBAAsB,GA7KbtB,EA8KX,oCAGA0D,EAAA,CADPG,EAAM,UAAU,GAhLE7D,EAiLX,wBAGA0D,EAAA,CADPG,EAAM,eAAe,GAnLH7D,EAoLX,4BAKoB0D,EAAA,CAA3BvD,EAAM,WAAW,GAzLCH,EAyLS,2BAOA0D,EAAA,CAA3BvD,EAAM,WAAW,GAhMCH,EAgMS,2BA8BpB0D,EAAA,CADPE,EAAM,GA7NY5D,EA8NX,gCAGA0D,EAAA,CADPE,EAAM,GAhOY5D,EAiOX,qBA+BR0D,EAAA,CADCG,EAAM,eAAe,GA/PH7D,EAgQnB,gCAhQmBA,EAArB0D,EAAA,CAFCpC,EAAc,WAAW,EACzBwC,EAAU,GACU9D",
|
|
6
|
-
"names": ["styles", "i", "bl_select_default", "BlSelect", "FormControlMixin", "s", "event", "_a", "eventPath", "el", "bl_select_default", "val", "formData", "option", "select", "_b", "_c", "autoUpdate", "computePosition", "flip", "offset", "size", "args", "x", "y", "e", "inputSelectedOptions", "item", "isRemoveButtonShown", "removeButton", "isSearchBarVisible", "hasSelectedOptions", "isDividerShown", "searchbarPlaceholderText", "msg", "searchMagIcon", "searchLoadingIcon", "actionDivider", "search", "o", "l", "isAllRenderedOptionsSelected", "isAnySelected", "selectAllText", "invalidMessage", "helpMessage", "label", "noDataText", "clearSearchText", "options", "isVisible", "lastVisibleOption", "optionItem", "selectAllEl", "checked", "isAllUnselectedDisabled", "checkbox", "selectedDisabledOptions", "firstNonVisibleItemIndex", "_changedProperties", "requiredValidator", "__decorateClass", "stringBooleanConverter", "t", "i", "localized"]
|
|
4
|
+
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;display:grid;gap:var(--bl-size-3xs);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--label-padding:var(--bl-size-3xs);--border-size:1px;--background-color:var(--bl-color-neutral-full);--border-color:var(--bl-color-neutral-lighter);--border-focus-color:var(--bl-color-primary-highlight);--icon-color:var(--bl-color-neutral-light);--text-color:var(--bl-color-neutral-darker);--label-color:var(--bl-color-neutral-dark);--placeholder-color:var(--bl-color-neutral-light);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-neutral-lightest);--menu-height:250px;--popover-position:var(--bl-popover-position, fixed)}:host([multiple][view-select-all]) .select-wrapper{--menu-height:290px}:host([size=\"large\"]) .select-wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size=\"small\"]) .select-wrapper{--height:var(--bl-size-xl);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-xs);--font-size:var(--bl-font-size-s)}:host([disabled]) .select-wrapper{--placeholder-color:var(--bl-color-neutral-light)}.dirty.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-highlight);--label-color:var(--bl-color-danger)}.select-input{display:grid;align-items:center;justify-content:space-between;grid-template-columns:1fr max-content max-content;cursor:pointer;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 calc(var(--padding-horizontal) - var(--label-padding) - var(--border-size));border-radius:var(--bl-border-radius-s);color:var(--text-color);background-color:var(--background-color);/* stylelint-disable-next-line property-no-vendor-prefix */-webkit-user-select:none;user-select:none;margin:0;width:auto;min-width:100%}.label,.placeholder{color:var(--placeholder-color);padding-left:var(--label-padding);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}:host(:not([placeholder])) .placeholder,.select-wrapper.selected .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}:host([label-fixed]) .label,:host(:not([label])) .label{display:none}.remove-all{display:none}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-neutral-darker)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-neutral-light)}.select-open .select-input,.select-input:focus-visible{border:solid 1px var(--border-focus-color);outline:none}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;padding-left:var(--label-padding);margin:0;list-style:none;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}: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-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:none;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--bl-index-popover);width:100%;top:var(--top);left:var(--left)}: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)}legend,label{padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));transition:all ease-in 0.1s;pointer-events:none;opacity:0;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color)}legend{height:0;visibility:hidden;display:none}legend span{padding:0 var(--label-padding);display:inline-block;opacity:0;visibility:visible}:host([placeholder]) :where(.select-open, .selected) .label,:host(:not([placeholder])) .selected .label{display:none}:where(.select-open, .selected) label{top:0;transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);pointer-events:initial;right:var(--padding-horizontal);opacity:1}:host([label]) :where(.select-open, .selected) legend{max-width:100%;font:var(--bl-font-caption);display:block}:host([label-fixed]) label{position:static;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color);opacity:1}:host([label-fixed]) legend{display:none}.hint{display:none;font:var(--bl-font-body-text-3)}.hint p{padding:0;margin:0}.error-icon,.invalid-text{display:none}.dirty.invalid label,.invalid-text,.error-icon{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-neutral-dark)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}:host([help-text]) .hint,.dirty.invalid .hint{display:block}.dirty.invalid .invalid-text{display:block}.dirty.invalid .help-text{display:none}.select-all{position:sticky;top:0;padding:var(--bl-size-xs) 0;background:var(--background-color);z-index:1;font:var(--bl-font-title-3-regular);/* Make sure option focus doesn't overflow */box-shadow:10px 0 0 var(--background-color),-10px 0 0 var(--background-color)}.select-all::after{position:absolute;content:\"\";width:100%;bottom:0;border-bottom:1px solid var(--bl-color-neutral-lighter)}.search-bar-input{font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--text-color);border:none;outline:none;background-color:transparent;width:100%;height:100%;padding:0;margin:0;box-sizing:border-box}.search-bar-input::placeholder{color:var(--placeholder-color)}.search-bar-input:focus-visible{outline:none}.search-loading-icon{animation:spin 1s linear infinite}.action-divider{display:none}.select-wrapper .action-divider{display:block;height:1rem;width:1px;background-color:var(--bl-color-neutral-lighter)}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.actions bl-icon{padding:4px}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, 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 { msg, localized } from \"@lit/localize\";\nimport { FormControlMixin, requiredValidator } from \"@open-wc/form-control\";\nimport { FormValue } from \"@open-wc/form-helpers\";\nimport \"element-internals-polyfill\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport { stringBooleanConverter } from \"../../utilities/string-boolean.converter\";\nimport \"../button/bl-button\";\nimport BlCheckbox from \"../checkbox-group/checkbox/bl-checkbox\";\nimport \"../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 _connectedOptions: BlSelectOption<ValueType>[] = [];\n\n private _cleanUpPopover: CleanUpFunction | null = null;\n\n private setOptionsSelected() {\n this._connectedOptions.forEach(\n option =>\n (option.selected =\n this.value === option.value ||\n (Array.isArray(this.value) && this.value.includes(option.value)))\n );\n\n this._selectedOptions = [...this.options.filter(option => option.selected)];\n }\n\n get options() {\n return this._connectedOptions;\n }\n\n get opened() {\n return this._isPopoverOpen;\n }\n\n get noResultFound() {\n return this._searchText !== \"\" && this._connectedOptions.every(option => option.hidden);\n }\n\n @state()\n private _selectedOptions: BlSelectOption<ValueType>[] = [];\n\n @state()\n private dirty = false;\n\n get selectedOptions(): BlSelectOption<ValueType>[] {\n return this._selectedOptions;\n }\n\n get additionalSelectedOptionCount() {\n return this._additionalSelectedOptionCount;\n }\n\n validityCallback(): string | void {\n if (this.customInvalidText) {\n return this.customInvalidText;\n }\n const select = document.createElement(\"select\");\n\n select.required = this.required;\n\n return select.validationMessage;\n }\n\n reportValidity() {\n this.dirty = true;\n return this.checkValidity();\n }\n\n resetFormControl(): void {\n this.value = this._initialValue;\n }\n\n @query(\".select-input\")\n validationTarget: HTMLElement;\n\n open() {\n if (this.searchBar) {\n setTimeout(() => {\n document.activeElement?.shadowRoot?.querySelector(\"input\")?.focus();\n }, 100);\n }\n\n this._isPopoverOpen = true;\n this._setupPopover();\n document.addEventListener(\"click\", this._interactOutsideHandler, true);\n document.addEventListener(\"focus\", this._interactOutsideHandler, true);\n }\n\n close() {\n this._handleSearchOptions({ target: { value: \"\" } } as InputEvent & {\n target: HTMLInputElement;\n });\n\n this._isPopoverOpen = false;\n this.focusedOptionIndex = -1;\n this._cleanUpPopover && this._cleanUpPopover();\n document.removeEventListener(\"click\", this._interactOutsideHandler, true);\n document.removeEventListener(\"focus\", this._interactOutsideHandler, true);\n }\n\n private _interactOutsideHandler = (event: MouseEvent | FocusEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath?.find(el => el.tagName === \"BL-SELECT\")?.contains(this)) {\n this.close();\n }\n };\n\n private _setupPopover() {\n this._cleanUpPopover = autoUpdate(this._selectInput, this._popover, () => {\n computePosition(this._selectInput, this._popover, {\n placement: \"bottom\",\n strategy: \"fixed\",\n middleware: [\n flip(),\n offset(8),\n size({\n apply(args: MiddlewareState) {\n Object.assign(args.elements.floating.style, {\n width: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n },\n }),\n ],\n }).then(({ x, y }) => {\n this._popover.style.setProperty(\"--left\", `${x}px`);\n this._popover.style.setProperty(\"--top\", `${y}px`);\n });\n });\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.form?.addEventListener(\"submit\", (e: SubmitEvent) => {\n if (!this.reportValidity()) {\n e.preventDefault();\n }\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this._cleanUpPopover && this._cleanUpPopover();\n }\n\n private inputTemplate() {\n const inputSelectedOptions = html`<ul class=\"selected-options\">\n ${this._selectedOptions.map(\n item => html`<li>${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 searchLoadingIcon = html`<bl-icon\n class=\"search-loading-icon\"\n name=\"loading\"\n style=\"color: var(--bl-color-primary);font-size: var(--bl-font-size-s)\"\n ></bl-icon>`;\n\n const actionDivider = isDividerShown ? html`<div class=\"action-divider\"></div>` : \"\";\n\n const search = html`<fieldset\n class=${classMap({\n \"select-input\": true,\n \"has-overflowed-options\": this._additionalSelectedOptionCount > 0,\n })}\n tabindex=\"${this.disabled ? \"-1\" : 0}\"\n .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 ? searchLoadingIcon : searchMagIcon) : \"\"}\n ${!this.opened ? removeButton : \"\"} ${actionDivider}\n\n <div @click=${this._togglePopover}>\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 </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 event.code === \"ArrowDown\" && this.focusedOptionIndex++;\n event.code === \"ArrowUp\" && this.focusedOptionIndex--;\n\n // Don't exceed array indexes\n this.focusedOptionIndex = Math.max(\n 0,\n Math.min(this.focusedOptionIndex, this.options.length - 1)\n );\n\n this.options[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n } 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 isVisible = option.textContent?.toLowerCase().includes(this._searchText.toLowerCase());\n\n option.hidden = !isVisible;\n });\n\n this._selectedOptions = this.options.filter(option => option.selected);\n\n this._handleLastVisibleSearchedOption();\n\n this.requestUpdate();\n }\n\n private _handleLastVisibleSearchedOption() {\n const lastVisibleOption = [...this.options].reverse().find(option => !option.hidden);\n\n if (lastVisibleOption) {\n lastVisibleOption?.shadowRoot?.querySelector(\"div\")?.classList.add(\"no-border-bottom\");\n }\n\n this.options.map(option => {\n if (!option.hidden && option !== lastVisibleOption) {\n option.shadowRoot?.querySelector(\"div\")?.classList.remove(\"no-border-bottom\");\n }\n });\n }\n\n private _handleSingleSelect(optionItem: BlSelectOption<ValueType>) {\n this.value = optionItem.value;\n\n this._handleSelectEvent();\n this._isPopoverOpen = false;\n }\n\n private _handleMultipleSelect() {\n this.value = this._connectedOptions\n .filter(option => option.selected)\n .map(option => option.value);\n\n this._handleSelectEvent();\n }\n\n private _handleSelectOptionEvent(e: CustomEvent) {\n const optionItem = e.target as BlSelectOption<ValueType>;\n\n this.dirty = true;\n\n if (this.multiple) {\n this._handleMultipleSelect();\n } else {\n this._handleSingleSelect(optionItem);\n }\n }\n\n private _handleSelectAll(e: CustomEvent) {\n const selectAllEl = this.shadowRoot?.querySelector(\".select-all\") as BlCheckbox;\n\n const checked = e.detail;\n const unselectedOptions = this._connectedOptions.filter(\n option => !option.selected && !option.hidden\n );\n const isAllUnselectedDisabled = unselectedOptions.every(option => option.disabled);\n\n // If all available options are selected, instead of checking, uncheck all options\n if (checked && isAllUnselectedDisabled) {\n setTimeout(() => {\n const checkbox = selectAllEl?.shadowRoot?.querySelector(\"input\");\n\n checkbox?.click();\n }, 0);\n return;\n }\n\n this._connectedOptions.forEach(option => {\n if (option.disabled || option.hidden) {\n return;\n }\n\n option.selected = checked;\n });\n\n this._handleMultipleSelect();\n }\n\n private _onClickRemove(e: MouseEvent) {\n e.stopPropagation();\n\n const selectedDisabledOptions = this._selectedOptions.filter(option => option.disabled);\n\n this._connectedOptions\n .filter(option => !option.disabled && option.selected)\n .forEach(option => {\n option.selected = false;\n });\n\n this.value = selectedDisabledOptions.length\n ? selectedDisabledOptions.map(option => option.value)\n : null;\n this._handleSelectEvent();\n }\n\n private _checkAdditionalItemCount() {\n if (!this.multiple || !this.selectedOptionsItems || this.selectedOptionsItems.length < 2) {\n this._additionalSelectedOptionCount = 0;\n return;\n }\n\n const firstNonVisibleItemIndex = [...this.selectedOptionsItems].findIndex(\n item => item.offsetLeft > this.selectedOptionsContainer.offsetWidth\n );\n\n if (firstNonVisibleItemIndex > -1) {\n this._additionalSelectedOptionCount =\n this.selectedOptionsItems.length - firstNonVisibleItemIndex;\n } else {\n this._additionalSelectedOptionCount = 0;\n }\n }\n\n protected firstUpdated(): void {\n if (this.value === undefined) {\n 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,mmOACfC,EAAQF,ECmCf,IAAqBG,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,kBAAiD,CAAC,EAE1D,KAAQ,gBAA0C,KA0BlD,KAAQ,iBAAgD,CAAC,EAGzD,KAAQ,MAAQ,GA0DhB,KAAQ,wBAA2BC,GAAmC,CAhUxE,IAAAC,EAiUI,IAAMC,EAAYF,EAAM,aAAa,GAEhCC,EAAAC,GAAA,YAAAA,EAAW,KAAKC,GAAMA,EAAG,UAAY,eAArC,MAAAF,EAAmD,SAAS,OAC/D,KAAK,MAAM,CAEf,EAsPA,KAAQ,mBAAqB,GAC7B,KAAQ,mBAAqB,EAC7B,KAAQ,gBAAkB,GAC1B,KAAQ,kBAAoB,IAvhB5B,WAAW,QAAyB,CAClC,MAAO,CAACG,CAAK,CACf,CAmBA,IAAI,OAAwC,CAC1C,OAAO,KAAK,MACd,CAEA,IAAI,MAAMC,EAAqC,CAG7C,GAFA,KAAK,OAASA,EAEV,MAAM,QAAQA,CAAG,EAAG,CACtB,IAAMC,EAAW,IAAI,SAErBD,EAAI,QAAQE,GAAUD,EAAS,OAAO,KAAK,KAAM,GAAGC,GAAQ,CAAC,EAC7D,KAAK,SAASD,CAAQ,OAEtB,K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AhQmBA,EAArB6D,EAAA,CAFCvC,EAAc,WAAW,EACzB2C,EAAU,GACUjE",
|
|
6
|
+
"names": ["styles", "i", "bl_select_default", "BlSelect", "FormControlMixin", "s", "event", "_a", "eventPath", "el", "bl_select_default", "val", "formData", "option", "select", "_b", "_c", "autoUpdate", "computePosition", "flip", "offset", "size", "args", "x", "y", "e", "inputSelectedOptions", "item", "isRemoveButtonShown", "removeButton", "isSearchBarVisible", "hasSelectedOptions", "isDividerShown", "searchbarPlaceholderText", "msg", "searchMagIcon", "searchLoadingIcon", "actionDivider", "search", "o", "l", "isAllRenderedOptionsSelected", "isAnySelected", "selectAllText", "invalidMessage", "helpMessage", "label", "noDataText", "clearSearchText", "key", "currentTime", "matchingOptionIndex", "options", "isVisible", "lastVisibleOption", "optionItem", "selectAllEl", "checked", "isAllUnselectedDisabled", "checkbox", "selectedDisabledOptions", "firstNonVisibleItemIndex", "_changedProperties", "requiredValidator", "__decorateClass", "stringBooleanConverter", "t", "i", "localized"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-LIW32ZGE.js";import{a as b}from"./chunk-73GEFGEG.js";import{a as i,b as a}from"./chunk-5MOOXA2X.js";import{a as s,b as r,f as o}from"./chunk-4OT5AMS5.js";import{d as l}from"./chunk-IZ2LK5GK.js";var n=s`:host{display:table-row}:host([checked]),:host([checked]) ::slotted(bl-table-cell){background-color:var(--bl-color-primary-contrast)}:host([disabled]),:host([disabled]) ::slotted(bl-table-cell){background-color:var(--bl-color-neutral-lightest);color:var(--bl-color-neutral-light)}:host(:not([checked], [disabled]).__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__),:host(:not([checked], [disabled]):hover) ::slotted(bl-table-cell),:host(:not([checked], [disabled]):hover),:host(:not([checked], [disabled]):hover) ::slotted(bl-table-cell){background-color:var(--bl-color-tertiary-background)}:host ::slotted(*:first-child){border-left:none}:host ::slotted(*:last-child){border-right:none}:host(:first-child) ::slotted(bl-table-header-cell){border-top:none;border-right:none}:host(:first-child) ::slotted(bl-table-header-cell:first-child){border-top-left-radius:var(--bl-size-3xs)}:host(:first-child) ::slotted(bl-table-header-cell:last-child){border-top-right-radius:var(--bl-size-3xs);border-right:1px}:host(:last-child) ::slotted(bl-table-cell){border-bottom:none}:host(:first-child) ::slotted(bl-table-cell){border-top:none}:host(:last-child) ::slotted(bl-table-cell:first-child){border-bottom-left-radius:var(--bl-size-3xs)}:host(:last-child) ::slotted(bl-table-cell:last-child){border-bottom-right-radius:var(--bl-size-3xs)}:host([sticky-first-column]) ::slotted(bl-table-header-cell:first-child),:host([sticky-first-column]) ::slotted(bl-table-cell:first-child){position:sticky;z-index:2;left:0}:host([sticky-last-column]) ::slotted(bl-table-header-cell:last-child),:host([sticky-last-column]) ::slotted(bl-table-cell:last-child){position:sticky;z-index:2;right:0}`,c=n;var u="bl-table-row",e=class extends o{constructor(){super(...arguments);this.selectionKey=""}static get styles(){return[c]}connectedCallback(){super.connectedCallback(),!this.closest(d)&&!this.closest(b)&&console.warn("bl-table-row is designed to be used inside a bl-table-header or bl-table-body",this)}updated(t){super.updated(t),this.removeAttribute("checked"),this.removeAttribute("disabled"),this.removeAttribute("sticky-first-column"),this.removeAttribute("sticky-last-column"),this.stickyFirstColumn&&this.setAttribute("sticky-first-column","true"),this.stickyLastColumn&&this.setAttribute("sticky-last-column","true"),this.checked?this.setAttribute("checked","true"):this.disabled&&this.setAttribute("disabled","true"),t.has("selectionKey")&&this.updateComplete.then(()=>{Array.from(this.querySelectorAll("bl-table-header-cell,bl-table-cell")).map(h=>{h.requestUpdate()})})}get _table(){return this.closest("bl-table")}get _firstTableCell(){return this.querySelector("bl-table-cell")}get disabled(){var t;return!!((t=this._firstTableCell)!=null&&t.disabled)}get checked(){var t;return!!((t=this._table)!=null&&t.isRowSelected(this.selectionKey))}get stickyFirstColumn(){var t;return!!((t=this._table)!=null&&t.isFirstColumnSticky())}get stickyLastColumn(){var t;return!!((t=this._table)!=null&&t.isLastColumnSticky())}render(){return r`<slot></slot>`}};l([a({type:String,reflect:!0,attribute:"selection-key"})],e.prototype,"selectionKey",2),e=l([i(u)],e);export{u as a,e as b};
|
|
2
|
+
//# sourceMappingURL=chunk-Y3PONRYW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const icons: readonly ["academy", "account", "add_note", "add_part", "add_photo", "add_product", "alert", "announcement", "archive", "arrow_down", "arrow_left", "arrow_right", "arrow_up", "attach", "award", "back", "back_fill", "badge", "barcode", "bill", "book", "browser", "burger", "calendar", "camera", "camera_off", "campaign", "change", "change_fill", "chart", "chatbot", "check", "check_fill", "clock", "close", "close_fill", "code", "coin", "compass", "complain", "confetti", "copy", "copy_checked", "coupon", "delete", "desktop", "desktop_filled", "dialog", "disable", "dislike", "document", "document_search", "donation", "download", "drag_and_drop", "edit", "excel", "exit", "expand", "export", "express", "express_delivery", "express_furniture", "external_link", "external_share", "eye_off", "eye_on", "facebook", "filter", "finance_accounting", "fire", "flag", "flash", "flash_fill", "forward", "full_size", "gift", "global_export", "globe", "go_forward", "graphic", "graphic_decrease", "group_of_people", "growth", "hamburger_menu", "handshake", "happy", "heart", "heart_fill", "heartbeat", "help", "history", "home", "hourglass", "image", "incognito", "info", "instagram", "label", "left_sided_arrow", "light_bulb", "like", "link", "listing", "live_monitor", "live_support", "loading", "lock", "magic_wand", "mail", "mail_opened", "map", "market", "market_order_back", "market_order_cancel", "market_order_change", "market_order_check", "market_processing", "meal_bag", "medal", "message", "metric_decrease", "metric_increase", "metric_minus", "microphone", "microphone_off", "minus", "minus_fill", "mobile", "mobile_fill", "mobile_settings", "money", "money_transfer", "motorcycle", "motorcycle_check", "new_store", "normal", "notice", "notification", "offers", "order", "order_back", "order_box", "order_boxes", "order_cancel", "order_check", "order_return", "order_settings", "order_time", "order_tracking", "paper", "partial_approve", "pause", "pause_fill", "people", "phone", "phone_settings", "photo", "photo_off", "pie_chart", "pie_chart_report", "pin", "play", "play_fill", "plus", "plus_fill", "preview", "price_settings", "print", "product", "profile", "profile_check", "profile_star", "puzzle", "qr", "report", "review", "right_sided_arrow", "rocket", "rotate", "sad", "save", "search", "send", "send_mail", "services", "settings", "share", "shopping_bag", "shopping_bag_add", "shopping_bag_back", "shopping_bag_cancel", "shopping_bag_discount", "shopping_bag_return", "sorting", "sorting_asc", "sorting_desc", "sound_off", "sound_on", "split_money", "star", "star_double", "star_fill", "star_triple", "stop", "stop_fill", "store", "store_performance", "suitcase", "support", "target", "ticket", "translation", "truck", "turn_back", "turn_back_fill", "two_sided_arrow", "unlock", "upload", "user_management", "vacation_mode", "very_happy", "very_sad", "wallet", "warehouse", "warning", "youtube", "zoom_in", "zoom_out"];
|
|
1
|
+
declare const icons: readonly ["academy", "account", "add_note", "add_part", "add_photo", "add_product", "alert", "announcement", "archive", "arrow_down", "arrow_left", "arrow_right", "arrow_up", "attach", "award", "back", "back_fill", "badge", "barcode", "bill", "book", "browser", "burger", "calendar", "camera", "camera_off", "campaign", "change", "change_fill", "chart", "chatbot", "check", "check_fill", "clock", "close", "close_fill", "code", "coin", "compass", "complain", "confetti", "copy", "copy_checked", "coupon", "credit_card", "delete", "desktop", "desktop_filled", "dialog", "disable", "dislike", "document", "document_search", "donation", "door_open", "download", "drag_and_drop", "edit", "excel", "exit", "expand", "export", "express", "express_delivery", "express_furniture", "external_link", "external_share", "eye_off", "eye_on", "facebook", "filter", "finance_accounting", "fire", "flag", "flash", "flash_fill", "forward", "full_size", "gift", "global_export", "globe", "go_forward", "graphic", "graphic_decrease", "group_of_people", "growth", "hamburger_menu", "handshake", "happy", "heart", "heart_fill", "heartbeat", "help", "history", "home", "hourglass", "image", "incognito", "info", "instagram", "label", "left_sided_arrow", "light_bulb", "like", "link", "listing", "live_monitor", "live_support", "loading", "lock", "magic_wand", "mail", "mail_opened", "map", "market", "market_order_back", "market_order_cancel", "market_order_change", "market_order_check", "market_processing", "meal_bag", "medal", "message", "metric_decrease", "metric_increase", "metric_minus", "microphone", "microphone_off", "minus", "minus_fill", "mobile", "mobile_fill", "mobile_settings", "money", "money_transfer", "motorcycle", "motorcycle_check", "new_store", "normal", "notice", "notification", "offers", "order", "order_back", "order_box", "order_boxes", "order_cancel", "order_check", "order_return", "order_settings", "order_time", "order_tracking", "paper", "partial_approve", "pause", "pause_fill", "people", "phone", "phone_settings", "photo", "photo_off", "pie_chart", "pie_chart_report", "pin", "play", "play_fill", "plus", "plus_fill", "preview", "price_settings", "print", "product", "profile", "profile_check", "profile_star", "puzzle", "qr", "report", "review", "right_sided_arrow", "rocket", "rotate", "sad", "save", "search", "send", "send_mail", "services", "settings", "share", "shopping_bag", "shopping_bag_add", "shopping_bag_back", "shopping_bag_cancel", "shopping_bag_discount", "shopping_bag_return", "sorting", "sorting_asc", "sorting_desc", "sound_off", "sound_on", "split_money", "star", "star_double", "star_fill", "star_triple", "stop", "stop_fill", "store", "store_performance", "suitcase", "support", "target", "ticket", "translation", "truck", "turn_back", "turn_back_fill", "two_sided_arrow", "unlock", "upload", "user_management", "vacation_mode", "very_happy", "very_sad", "wallet", "warehouse", "warning", "youtube", "zoom_in", "zoom_out"];
|
|
2
2
|
type BaklavaIcon = (typeof icons)[number];
|
|
3
3
|
export type { BaklavaIcon };
|
|
4
4
|
export default icons;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-list.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icon-list.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"icon-list.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icon-list.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK,k5FAwOD,CAAC;AAEX,KAAK,WAAW,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1C,YAAY,EAAE,WAAW,EAAE,CAAC;AAC5B,eAAe,KAAK,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-IZ2LK5GK.js";var e=["academy","account","add_note","add_part","add_photo","add_product","alert","announcement","archive","arrow_down","arrow_left","arrow_right","arrow_up","attach","award","back","back_fill","badge","barcode","bill","book","browser","burger","calendar","camera","camera_off","campaign","change","change_fill","chart","chatbot","check","check_fill","clock","close","close_fill","code","coin","compass","complain","confetti","copy","copy_checked","coupon","delete","desktop","desktop_filled","dialog","disable","dislike","document","document_search","donation","download","drag_and_drop","edit","excel","exit","expand","export","express","express_delivery","express_furniture","external_link","external_share","eye_off","eye_on","facebook","filter","finance_accounting","fire","flag","flash","flash_fill","forward","full_size","gift","global_export","globe","go_forward","graphic","graphic_decrease","group_of_people","growth","hamburger_menu","handshake","happy","heart","heart_fill","heartbeat","help","history","home","hourglass","image","incognito","info","instagram","label","left_sided_arrow","light_bulb","like","link","listing","live_monitor","live_support","loading","lock","magic_wand","mail","mail_opened","map","market","market_order_back","market_order_cancel","market_order_change","market_order_check","market_processing","meal_bag","medal","message","metric_decrease","metric_increase","metric_minus","microphone","microphone_off","minus","minus_fill","mobile","mobile_fill","mobile_settings","money","money_transfer","motorcycle","motorcycle_check","new_store","normal","notice","notification","offers","order","order_back","order_box","order_boxes","order_cancel","order_check","order_return","order_settings","order_time","order_tracking","paper","partial_approve","pause","pause_fill","people","phone","phone_settings","photo","photo_off","pie_chart","pie_chart_report","pin","play","play_fill","plus","plus_fill","preview","price_settings","print","product","profile","profile_check","profile_star","puzzle","qr","report","review","right_sided_arrow","rocket","rotate","sad","save","search","send","send_mail","services","settings","share","shopping_bag","shopping_bag_add","shopping_bag_back","shopping_bag_cancel","shopping_bag_discount","shopping_bag_return","sorting","sorting_asc","sorting_desc","sound_off","sound_on","split_money","star","star_double","star_fill","star_triple","stop","stop_fill","store","store_performance","suitcase","support","target","ticket","translation","truck","turn_back","turn_back_fill","two_sided_arrow","unlock","upload","user_management","vacation_mode","very_happy","very_sad","wallet","warehouse","warning","youtube","zoom_in","zoom_out"],r=e;export{r as default};
|
|
1
|
+
import"../../chunk-IZ2LK5GK.js";var e=["academy","account","add_note","add_part","add_photo","add_product","alert","announcement","archive","arrow_down","arrow_left","arrow_right","arrow_up","attach","award","back","back_fill","badge","barcode","bill","book","browser","burger","calendar","camera","camera_off","campaign","change","change_fill","chart","chatbot","check","check_fill","clock","close","close_fill","code","coin","compass","complain","confetti","copy","copy_checked","coupon","credit_card","delete","desktop","desktop_filled","dialog","disable","dislike","document","document_search","donation","door_open","download","drag_and_drop","edit","excel","exit","expand","export","express","express_delivery","express_furniture","external_link","external_share","eye_off","eye_on","facebook","filter","finance_accounting","fire","flag","flash","flash_fill","forward","full_size","gift","global_export","globe","go_forward","graphic","graphic_decrease","group_of_people","growth","hamburger_menu","handshake","happy","heart","heart_fill","heartbeat","help","history","home","hourglass","image","incognito","info","instagram","label","left_sided_arrow","light_bulb","like","link","listing","live_monitor","live_support","loading","lock","magic_wand","mail","mail_opened","map","market","market_order_back","market_order_cancel","market_order_change","market_order_check","market_processing","meal_bag","medal","message","metric_decrease","metric_increase","metric_minus","microphone","microphone_off","minus","minus_fill","mobile","mobile_fill","mobile_settings","money","money_transfer","motorcycle","motorcycle_check","new_store","normal","notice","notification","offers","order","order_back","order_box","order_boxes","order_cancel","order_check","order_return","order_settings","order_time","order_tracking","paper","partial_approve","pause","pause_fill","people","phone","phone_settings","photo","photo_off","pie_chart","pie_chart_report","pin","play","play_fill","plus","plus_fill","preview","price_settings","print","product","profile","profile_check","profile_star","puzzle","qr","report","review","right_sided_arrow","rocket","rotate","sad","save","search","send","send_mail","services","settings","share","shopping_bag","shopping_bag_add","shopping_bag_back","shopping_bag_cancel","shopping_bag_discount","shopping_bag_return","sorting","sorting_asc","sorting_desc","sound_off","sound_on","split_money","star","star_double","star_fill","star_triple","stop","stop_fill","store","store_performance","suitcase","support","target","ticket","translation","truck","turn_back","turn_back_fill","two_sided_arrow","unlock","upload","user_management","vacation_mode","very_happy","very_sad","wallet","warehouse","warning","youtube","zoom_in","zoom_out"],r=e;export{r as default};
|
|
2
2
|
//# sourceMappingURL=icon-list.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/icon/icon-list.ts"],
|
|
4
|
-
"sourcesContent": ["const icons = [\n \"academy\",\n \"account\",\n \"add_note\",\n \"add_part\",\n \"add_photo\",\n \"add_product\",\n \"alert\",\n \"announcement\",\n \"archive\",\n \"arrow_down\",\n \"arrow_left\",\n \"arrow_right\",\n \"arrow_up\",\n \"attach\",\n \"award\",\n \"back\",\n \"back_fill\",\n \"badge\",\n \"barcode\",\n \"bill\",\n \"book\",\n \"browser\",\n \"burger\",\n \"calendar\",\n \"camera\",\n \"camera_off\",\n \"campaign\",\n \"change\",\n \"change_fill\",\n \"chart\",\n \"chatbot\",\n \"check\",\n \"check_fill\",\n \"clock\",\n \"close\",\n \"close_fill\",\n \"code\",\n \"coin\",\n \"compass\",\n \"complain\",\n \"confetti\",\n \"copy\",\n \"copy_checked\",\n \"coupon\",\n \"delete\",\n \"desktop\",\n \"desktop_filled\",\n \"dialog\",\n \"disable\",\n \"dislike\",\n \"document\",\n \"document_search\",\n \"donation\",\n \"download\",\n \"drag_and_drop\",\n \"edit\",\n \"excel\",\n \"exit\",\n \"expand\",\n \"export\",\n \"express\",\n \"express_delivery\",\n \"express_furniture\",\n \"external_link\",\n \"external_share\",\n \"eye_off\",\n \"eye_on\",\n \"facebook\",\n \"filter\",\n \"finance_accounting\",\n \"fire\",\n \"flag\",\n \"flash\",\n \"flash_fill\",\n \"forward\",\n \"full_size\",\n \"gift\",\n \"global_export\",\n \"globe\",\n \"go_forward\",\n \"graphic\",\n \"graphic_decrease\",\n \"group_of_people\",\n \"growth\",\n \"hamburger_menu\",\n \"handshake\",\n \"happy\",\n \"heart\",\n \"heart_fill\",\n \"heartbeat\",\n \"help\",\n \"history\",\n \"home\",\n \"hourglass\",\n \"image\",\n \"incognito\",\n \"info\",\n \"instagram\",\n \"label\",\n \"left_sided_arrow\",\n \"light_bulb\",\n \"like\",\n \"link\",\n \"listing\",\n \"live_monitor\",\n \"live_support\",\n \"loading\",\n \"lock\",\n \"magic_wand\",\n \"mail\",\n \"mail_opened\",\n \"map\",\n \"market\",\n \"market_order_back\",\n \"market_order_cancel\",\n \"market_order_change\",\n \"market_order_check\",\n \"market_processing\",\n \"meal_bag\",\n \"medal\",\n \"message\",\n \"metric_decrease\",\n \"metric_increase\",\n \"metric_minus\",\n \"microphone\",\n \"microphone_off\",\n \"minus\",\n \"minus_fill\",\n \"mobile\",\n \"mobile_fill\",\n \"mobile_settings\",\n \"money\",\n \"money_transfer\",\n \"motorcycle\",\n \"motorcycle_check\",\n \"new_store\",\n \"normal\",\n \"notice\",\n \"notification\",\n \"offers\",\n \"order\",\n \"order_back\",\n \"order_box\",\n \"order_boxes\",\n \"order_cancel\",\n \"order_check\",\n \"order_return\",\n \"order_settings\",\n \"order_time\",\n \"order_tracking\",\n \"paper\",\n \"partial_approve\",\n \"pause\",\n \"pause_fill\",\n \"people\",\n \"phone\",\n \"phone_settings\",\n \"photo\",\n \"photo_off\",\n \"pie_chart\",\n \"pie_chart_report\",\n \"pin\",\n \"play\",\n \"play_fill\",\n \"plus\",\n \"plus_fill\",\n \"preview\",\n \"price_settings\",\n \"print\",\n \"product\",\n \"profile\",\n \"profile_check\",\n \"profile_star\",\n \"puzzle\",\n \"qr\",\n \"report\",\n \"review\",\n \"right_sided_arrow\",\n \"rocket\",\n \"rotate\",\n \"sad\",\n \"save\",\n \"search\",\n \"send\",\n \"send_mail\",\n \"services\",\n \"settings\",\n \"share\",\n \"shopping_bag\",\n \"shopping_bag_add\",\n \"shopping_bag_back\",\n \"shopping_bag_cancel\",\n \"shopping_bag_discount\",\n \"shopping_bag_return\",\n \"sorting\",\n \"sorting_asc\",\n \"sorting_desc\",\n \"sound_off\",\n \"sound_on\",\n \"split_money\",\n \"star\",\n \"star_double\",\n \"star_fill\",\n \"star_triple\",\n \"stop\",\n \"stop_fill\",\n \"store\",\n \"store_performance\",\n \"suitcase\",\n \"support\",\n \"target\",\n \"ticket\",\n \"translation\",\n \"truck\",\n \"turn_back\",\n \"turn_back_fill\",\n \"two_sided_arrow\",\n \"unlock\",\n \"upload\",\n \"user_management\",\n \"vacation_mode\",\n \"very_happy\",\n \"very_sad\",\n \"wallet\",\n \"warehouse\",\n \"warning\",\n \"youtube\",\n \"zoom_in\",\n \"zoom_out\",\n] as const;\n\ntype BaklavaIcon = (typeof icons)[number];\n\nexport type { BaklavaIcon };\nexport default icons;\n"],
|
|
5
|
-
"mappings": "gCAAA,IAAMA,EAAQ,CACZ,UACA,UACA,WACA,WACA,YACA,cACA,QACA,eACA,UACA,aACA,aACA,cACA,WACA,SACA,QACA,OACA,YACA,QACA,UACA,OACA,OACA,UACA,SACA,WACA,SACA,aACA,WACA,SACA,cACA,QACA,UACA,QACA,aACA,QACA,QACA,aACA,OACA,OACA,UACA,WACA,WACA,OACA,eACA,SACA,SACA,UACA,iBACA,SACA,UACA,UACA,WACA,kBACA,WACA,WACA,gBACA,OACA,QACA,OACA,SACA,SACA,UACA,mBACA,oBACA,gBACA,iBACA,UACA,SACA,WACA,SACA,qBACA,OACA,OACA,QACA,aACA,UACA,YACA,OACA,gBACA,QACA,aACA,UACA,mBACA,kBACA,SACA,iBACA,YACA,QACA,QACA,aACA,YACA,OACA,UACA,OACA,YACA,QACA,YACA,OACA,YACA,QACA,mBACA,aACA,OACA,OACA,UACA,eACA,eACA,UACA,OACA,aACA,OACA,cACA,MACA,SACA,oBACA,sBACA,sBACA,qBACA,oBACA,WACA,QACA,UACA,kBACA,kBACA,eACA,aACA,iBACA,QACA,aACA,SACA,cACA,kBACA,QACA,iBACA,aACA,mBACA,YACA,SACA,SACA,eACA,SACA,QACA,aACA,YACA,cACA,eACA,cACA,eACA,iBACA,aACA,iBACA,QACA,kBACA,QACA,aACA,SACA,QACA,iBACA,QACA,YACA,YACA,mBACA,MACA,OACA,YACA,OACA,YACA,UACA,iBACA,QACA,UACA,UACA,gBACA,eACA,SACA,KACA,SACA,SACA,oBACA,SACA,SACA,MACA,OACA,SACA,OACA,YACA,WACA,WACA,QACA,eACA,mBACA,oBACA,sBACA,wBACA,sBACA,UACA,cACA,eACA,YACA,WACA,cACA,OACA,cACA,YACA,cACA,OACA,YACA,QACA,oBACA,WACA,UACA,SACA,SACA,cACA,QACA,YACA,iBACA,kBACA,SACA,SACA,kBACA,gBACA,aACA,WACA,SACA,YACA,UACA,UACA,UACA,UACF,EAKOC,EAAQD",
|
|
4
|
+
"sourcesContent": ["const icons = [\n \"academy\",\n \"account\",\n \"add_note\",\n \"add_part\",\n \"add_photo\",\n \"add_product\",\n \"alert\",\n \"announcement\",\n \"archive\",\n \"arrow_down\",\n \"arrow_left\",\n \"arrow_right\",\n \"arrow_up\",\n \"attach\",\n \"award\",\n \"back\",\n \"back_fill\",\n \"badge\",\n \"barcode\",\n \"bill\",\n \"book\",\n \"browser\",\n \"burger\",\n \"calendar\",\n \"camera\",\n \"camera_off\",\n \"campaign\",\n \"change\",\n \"change_fill\",\n \"chart\",\n \"chatbot\",\n \"check\",\n \"check_fill\",\n \"clock\",\n \"close\",\n \"close_fill\",\n \"code\",\n \"coin\",\n \"compass\",\n \"complain\",\n \"confetti\",\n \"copy\",\n \"copy_checked\",\n \"coupon\",\n \"credit_card\",\n \"delete\",\n \"desktop\",\n \"desktop_filled\",\n \"dialog\",\n \"disable\",\n \"dislike\",\n \"document\",\n \"document_search\",\n \"donation\",\n \"door_open\",\n \"download\",\n \"drag_and_drop\",\n \"edit\",\n \"excel\",\n \"exit\",\n \"expand\",\n \"export\",\n \"express\",\n \"express_delivery\",\n \"express_furniture\",\n \"external_link\",\n \"external_share\",\n \"eye_off\",\n \"eye_on\",\n \"facebook\",\n \"filter\",\n \"finance_accounting\",\n \"fire\",\n \"flag\",\n \"flash\",\n \"flash_fill\",\n \"forward\",\n \"full_size\",\n \"gift\",\n \"global_export\",\n \"globe\",\n \"go_forward\",\n \"graphic\",\n \"graphic_decrease\",\n \"group_of_people\",\n \"growth\",\n \"hamburger_menu\",\n \"handshake\",\n \"happy\",\n \"heart\",\n \"heart_fill\",\n \"heartbeat\",\n \"help\",\n \"history\",\n \"home\",\n \"hourglass\",\n \"image\",\n \"incognito\",\n \"info\",\n \"instagram\",\n \"label\",\n \"left_sided_arrow\",\n \"light_bulb\",\n \"like\",\n \"link\",\n \"listing\",\n \"live_monitor\",\n \"live_support\",\n \"loading\",\n \"lock\",\n \"magic_wand\",\n \"mail\",\n \"mail_opened\",\n \"map\",\n \"market\",\n \"market_order_back\",\n \"market_order_cancel\",\n \"market_order_change\",\n \"market_order_check\",\n \"market_processing\",\n \"meal_bag\",\n \"medal\",\n \"message\",\n \"metric_decrease\",\n \"metric_increase\",\n \"metric_minus\",\n \"microphone\",\n \"microphone_off\",\n \"minus\",\n \"minus_fill\",\n \"mobile\",\n \"mobile_fill\",\n \"mobile_settings\",\n \"money\",\n \"money_transfer\",\n \"motorcycle\",\n \"motorcycle_check\",\n \"new_store\",\n \"normal\",\n \"notice\",\n \"notification\",\n \"offers\",\n \"order\",\n \"order_back\",\n \"order_box\",\n \"order_boxes\",\n \"order_cancel\",\n \"order_check\",\n \"order_return\",\n \"order_settings\",\n \"order_time\",\n \"order_tracking\",\n \"paper\",\n \"partial_approve\",\n \"pause\",\n \"pause_fill\",\n \"people\",\n \"phone\",\n \"phone_settings\",\n \"photo\",\n \"photo_off\",\n \"pie_chart\",\n \"pie_chart_report\",\n \"pin\",\n \"play\",\n \"play_fill\",\n \"plus\",\n \"plus_fill\",\n \"preview\",\n \"price_settings\",\n \"print\",\n \"product\",\n \"profile\",\n \"profile_check\",\n \"profile_star\",\n \"puzzle\",\n \"qr\",\n \"report\",\n \"review\",\n \"right_sided_arrow\",\n \"rocket\",\n \"rotate\",\n \"sad\",\n \"save\",\n \"search\",\n \"send\",\n \"send_mail\",\n \"services\",\n \"settings\",\n \"share\",\n \"shopping_bag\",\n \"shopping_bag_add\",\n \"shopping_bag_back\",\n \"shopping_bag_cancel\",\n \"shopping_bag_discount\",\n \"shopping_bag_return\",\n \"sorting\",\n \"sorting_asc\",\n \"sorting_desc\",\n \"sound_off\",\n \"sound_on\",\n \"split_money\",\n \"star\",\n \"star_double\",\n \"star_fill\",\n \"star_triple\",\n \"stop\",\n \"stop_fill\",\n \"store\",\n \"store_performance\",\n \"suitcase\",\n \"support\",\n \"target\",\n \"ticket\",\n \"translation\",\n \"truck\",\n \"turn_back\",\n \"turn_back_fill\",\n \"two_sided_arrow\",\n \"unlock\",\n \"upload\",\n \"user_management\",\n \"vacation_mode\",\n \"very_happy\",\n \"very_sad\",\n \"wallet\",\n \"warehouse\",\n \"warning\",\n \"youtube\",\n \"zoom_in\",\n \"zoom_out\",\n] as const;\n\ntype BaklavaIcon = (typeof icons)[number];\n\nexport type { BaklavaIcon };\nexport default icons;\n"],
|
|
5
|
+
"mappings": "gCAAA,IAAMA,EAAQ,CACZ,UACA,UACA,WACA,WACA,YACA,cACA,QACA,eACA,UACA,aACA,aACA,cACA,WACA,SACA,QACA,OACA,YACA,QACA,UACA,OACA,OACA,UACA,SACA,WACA,SACA,aACA,WACA,SACA,cACA,QACA,UACA,QACA,aACA,QACA,QACA,aACA,OACA,OACA,UACA,WACA,WACA,OACA,eACA,SACA,cACA,SACA,UACA,iBACA,SACA,UACA,UACA,WACA,kBACA,WACA,YACA,WACA,gBACA,OACA,QACA,OACA,SACA,SACA,UACA,mBACA,oBACA,gBACA,iBACA,UACA,SACA,WACA,SACA,qBACA,OACA,OACA,QACA,aACA,UACA,YACA,OACA,gBACA,QACA,aACA,UACA,mBACA,kBACA,SACA,iBACA,YACA,QACA,QACA,aACA,YACA,OACA,UACA,OACA,YACA,QACA,YACA,OACA,YACA,QACA,mBACA,aACA,OACA,OACA,UACA,eACA,eACA,UACA,OACA,aACA,OACA,cACA,MACA,SACA,oBACA,sBACA,sBACA,qBACA,oBACA,WACA,QACA,UACA,kBACA,kBACA,eACA,aACA,iBACA,QACA,aACA,SACA,cACA,kBACA,QACA,iBACA,aACA,mBACA,YACA,SACA,SACA,eACA,SACA,QACA,aACA,YACA,cACA,eACA,cACA,eACA,iBACA,aACA,iBACA,QACA,kBACA,QACA,aACA,SACA,QACA,iBACA,QACA,YACA,YACA,mBACA,MACA,OACA,YACA,OACA,YACA,UACA,iBACA,QACA,UACA,UACA,gBACA,eACA,SACA,KACA,SACA,SACA,oBACA,SACA,SACA,MACA,OACA,SACA,OACA,YACA,WACA,WACA,QACA,eACA,mBACA,oBACA,sBACA,wBACA,sBACA,UACA,cACA,eACA,YACA,WACA,cACA,OACA,cACA,YACA,cACA,OACA,YACA,QACA,oBACA,WACA,UACA,SACA,SACA,cACA,QACA,YACA,iBACA,kBACA,SACA,SACA,kBACA,gBACA,aACA,WACA,SACA,YACA,UACA,UACA,UACA,UACF,EAKOC,EAAQD",
|
|
6
6
|
"names": ["icons", "icon_list_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-X67Z2G2H.js";import"../../chunk-LXYK2N4C.js";import"../../chunk-MND5TXTF.js";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-X67Z2G2H.js";import"../../chunk-LXYK2N4C.js";import"../../chunk-MND5TXTF.js";import"../../chunk-XDJ3G3LW.js";import"../../chunk-WXWKIQAK.js";import"../../chunk-EZSEQHRH.js";import"../../chunk-IWBCUOHE.js";import"../../chunk-EG7U7PM3.js";import"../../chunk-AYJMIZZ3.js";import"../../chunk-XDUIVR6I.js";import"../../chunk-HZ6A5QFC.js";import"../../chunk-N6FMS7MM.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-HBPBDC7T.js";import"../../chunk-ECPWEUBG.js";import"../../chunk-DINNT5P2.js";import"../../chunk-U752J5IG.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-pagination.js.map
|
|
@@ -152,6 +152,10 @@ export default class BlSelect<ValueType extends FormValue = string> extends BlSe
|
|
|
152
152
|
selectAllTemplate(): TemplateResult<1> | null;
|
|
153
153
|
render(): TemplateResult;
|
|
154
154
|
private focusedOptionIndex;
|
|
155
|
+
private lastKeyPressedTime;
|
|
156
|
+
private typedCharacters;
|
|
157
|
+
private keyPressThreshold;
|
|
158
|
+
private handleFocusOptionByKey;
|
|
155
159
|
private handleKeydown;
|
|
156
160
|
private _togglePopover;
|
|
157
161
|
private _handleSelectEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl-select.d.ts","sourceRoot":"","sources":["../../../src/components/select/bl-select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAOvF,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,4BAA4B,CAAC;AAGpC,OAAO,qBAAqB,CAAC;AAE7B,OAAO,wCAAwC,CAAC;AAChD,OAAO,iBAAiB,CAAC;AAEzB,OAAO,mCAAmC,CAAC;AAC3C,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAC;AAE5D,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,MAAM;IACvC,KAAK,EAAE,CAAC,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC;;AAEzC;;;;;GAKG;AAGH,MAAM,CAAC,OAAO,OAAO,QAAQ,CAAC,SAAS,SAAS,SAAS,GAAG,MAAM,CAAE,SAAQ,aAE3E;IACC,MAAM,KAAK,MA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AI,IAAI;IAUzB,oBAAoB;IAMpB,OAAO,CAAC,aAAa;IA0HrB,iBAAiB;IAyBjB,MAAM,IAAI,cAAc;IA0DxB,OAAO,CAAC,kBAAkB,CAAM;IAChC,OAAO,CAAC,kBAAkB,CAAK;IAC/B,OAAO,CAAC,eAAe,CAAM;IAC7B,OAAO,CAAC,iBAAiB,CAAO;IAEhC,OAAO,CAAC,sBAAsB;IA0B9B,OAAO,CAAC,aAAa;IA4BrB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,kBAAkB;IAc1B,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,oBAAoB;IAoB5B,OAAO,CAAC,gCAAgC;IAcxC,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,wBAAwB;IAYhC,OAAO,CAAC,gBAAgB;IA8BxB,OAAO,CAAC,cAAc;IAiBtB,OAAO,CAAC,yBAAyB;IAkBjC,SAAS,CAAC,YAAY,IAAI,IAAI;IAY9B,SAAS,CAAC,OAAO,CAAC,kBAAkB,EAAE,cAAc;IAapD;;;OAGG;IACH,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,SAAS,CAAC;IAkBhD;;;OAGG;IACH,gBAAgB,CAAC,MAAM,EAAE,cAAc,CAAC,SAAS,CAAC;CAGnD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-XDJ3G3LW.js";import"../../chunk-WXWKIQAK.js";import"../../chunk-EZSEQHRH.js";import"../../chunk-IWBCUOHE.js";import"../../chunk-EG7U7PM3.js";import"../../chunk-AYJMIZZ3.js";import"../../chunk-XDUIVR6I.js";import"../../chunk-HZ6A5QFC.js";import"../../chunk-N6FMS7MM.js";import"../../chunk-6LT7O7T2.js";import"../../chunk-HBPBDC7T.js";import"../../chunk-ECPWEUBG.js";import"../../chunk-DINNT5P2.js";import"../../chunk-U752J5IG.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-3USCFSFQ.js";import"../../chunk-7GK5LKBV.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-select.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-5TPDRTCU.js";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-5TPDRTCU.js";import"../../chunk-QF4LGACD.js";import"../../chunk-Q6MAW2EF.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-tab-group.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../../chunk-
|
|
1
|
+
import{a,b}from"../../../chunk-LPHOBDYM.js";import"../../../chunk-Y3PONRYW.js";import"../../../chunk-LIW32ZGE.js";import"../../../chunk-73GEFGEG.js";import"../../../chunk-ASB5S6J4.js";import"../../../chunk-IWBCUOHE.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-U752J5IG.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableCellTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-table-cell.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../../chunk-
|
|
1
|
+
import{a,b}from"../../../chunk-P4FHU5BE.js";import"../../../chunk-Y3PONRYW.js";import"../../../chunk-LIW32ZGE.js";import"../../../chunk-73GEFGEG.js";import"../../../chunk-ASB5S6J4.js";import"../../../chunk-IWBCUOHE.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-U752J5IG.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableHeaderCellTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-table-header-cell.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../../chunk-
|
|
1
|
+
import{a,b}from"../../../chunk-Y3PONRYW.js";import"../../../chunk-LIW32ZGE.js";import"../../../chunk-73GEFGEG.js";import"../../../chunk-ASB5S6J4.js";import"../../../chunk-IWBCUOHE.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-U752J5IG.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableRowTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-table-row.js.map
|
package/package.json
CHANGED
package/dist/chunk-ITD4T4IW.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import{b as E,d as C,f as V,g as I,h as A}from"./chunk-EZSEQHRH.js";import{a as k}from"./chunk-EG7U7PM3.js";import{a as $}from"./chunk-XDUIVR6I.js";import{a as f}from"./chunk-6LT7O7T2.js";import{a as z,c as b}from"./chunk-HBPBDC7T.js";import{a as x}from"./chunk-ECPWEUBG.js";import{a as y}from"./chunk-DINNT5P2.js";import{a as m}from"./chunk-GRL4DWKG.js";import{a as T,b as s,c as h,e as v,f as S}from"./chunk-5MOOXA2X.js";import{a as w,b as r,f as g}from"./chunk-4OT5AMS5.js";import{d as l}from"./chunk-IZ2LK5GK.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);/* stylelint-disable-next-line property-no-vendor-prefix */-webkit-user-select:none;user-select:none;margin:0;width:auto;min-width:100%}.label,.placeholder{color:var(--placeholder-color);padding-left:var(--label-padding);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}:host(:not([placeholder])) .placeholder,.select-wrapper.selected .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}:host([label-fixed]) .label,:host(:not([label])) .label{display:none}.remove-all{display:none}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-neutral-darker)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-neutral-light)}.select-open .select-input,.select-input:focus-visible{border:solid 1px var(--border-focus-color);outline:none}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;padding-left:var(--label-padding);margin:0;list-style:none;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}: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-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:none;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--bl-index-popover);width:100%;top:var(--top);left:var(--left)}: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)}legend,label{padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));transition:all ease-in 0.1s;pointer-events:none;opacity:0;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color)}legend{height:0;visibility:hidden;display:none}legend span{padding:0 var(--label-padding);display:inline-block;opacity:0;visibility:visible}:host([placeholder]) :where(.select-open, .selected) .label,:host(:not([placeholder])) .selected .label{display:none}:where(.select-open, .selected) label{top:0;transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);pointer-events:initial;right:var(--padding-horizontal);opacity:1}:host([label]) :where(.select-open, .selected) legend{max-width:100%;font:var(--bl-font-caption);display:block}:host([label-fixed]) label{position:static;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color);opacity:1}:host([label-fixed]) legend{display:none}.hint{display:none;font:var(--bl-font-body-text-3)}.hint p{padding:0;margin:0}.error-icon,.invalid-text{display:none}.dirty.invalid label,.invalid-text,.error-icon{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-neutral-dark)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}:host([help-text]) .hint,.dirty.invalid .hint{display:block}.dirty.invalid .invalid-text{display:block}.dirty.invalid .help-text{display:none}.select-all{position:sticky;top:0;padding:var(--bl-size-xs) 0;background:var(--background-color);z-index:1;font:var(--bl-font-title-3-regular);/* Make sure option focus doesn't overflow */box-shadow:10px 0 0 var(--background-color),-10px 0 0 var(--background-color)}.select-all::after{position:absolute;content:"";width:100%;bottom:0;border-bottom:1px solid var(--bl-color-neutral-lighter)}.search-bar-input{font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--text-color);border:none;outline:none;background-color:transparent;width:100%;height:100%;padding:0;margin:0;box-sizing:border-box}.search-bar-input::placeholder{color:var(--placeholder-color)}.search-bar-input:focus-visible{outline:none}.search-loading-icon{animation:spin 1s linear infinite}.action-divider{display:none}.select-wrapper .action-divider{display:block;height:1rem;width:1px;background-color:var(--bl-color-neutral-lighter)}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.actions bl-icon{padding:4px}`,L=R;var 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._connectedOptions=[];this._cleanUpPopover=null;this._selectedOptions=[];this.dirty=!1;this._interactOutsideHandler=e=>{var o;let t=e.composedPath();(o=t==null?void 0:t.find(a=>a.tagName==="BL-SELECT"))!=null&&o.contains(this)||this.close()};this.focusedOptionIndex=-1}static get styles(){return[L]}get value(){return this._value}set value(e){if(this._value=e,Array.isArray(e)){let t=new FormData;e.forEach(o=>t.append(this.name,`${o}`)),this.setValue(t)}else this.setValue(e);this.setOptionsSelected()}shouldFormValueUpdate(){return this.value!==null&&this.value!==""}setOptionsSelected(){this._connectedOptions.forEach(e=>e.selected=this.value===e.value||Array.isArray(this.value)&&this.value.includes(e.value)),this._selectedOptions=[...this.options.filter(e=>e.selected)]}get options(){return this._connectedOptions}get opened(){return this._isPopoverOpen}get noResultFound(){return this._searchText!==""&&this._connectedOptions.every(e=>e.hidden)}get selectedOptions(){return this._selectedOptions}get additionalSelectedOptionCount(){return this._additionalSelectedOptionCount}validityCallback(){if(this.customInvalidText)return this.customInvalidText;let e=document.createElement("select");return e.required=this.required,e.validationMessage}reportValidity(){return this.dirty=!0,this.checkValidity()}resetFormControl(){this.value=this._initialValue}open(){this.searchBar&&setTimeout(()=>{var e,t,o;(o=(t=(e=document.activeElement)==null?void 0:e.shadowRoot)==null?void 0:t.querySelector("input"))==null||o.focus()},100),this._isPopoverOpen=!0,this._setupPopover(),document.addEventListener("click",this._interactOutsideHandler,!0),document.addEventListener("focus",this._interactOutsideHandler,!0)}close(){this._handleSearchOptions({target:{value:""}}),this._isPopoverOpen=!1,this.focusedOptionIndex=-1,this._cleanUpPopover&&this._cleanUpPopover(),document.removeEventListener("click",this._interactOutsideHandler,!0),document.removeEventListener("focus",this._interactOutsideHandler,!0)}_setupPopover(){this._cleanUpPopover=I(this._selectInput,this._popover,()=>{A(this._selectInput,this._popover,{placement:"bottom",strategy:"fixed",middleware:[E(),C(8),V({apply(e){Object.assign(e.elements.floating.style,{width:`${e.elements.reference.getBoundingClientRect().width}px`})}})]}).then(({x:e,y:t})=>{this._popover.style.setProperty("--left",`${e}px`),this._popover.style.setProperty("--top",`${t}px`)})})}connectedCallback(){var e;super.connectedCallback(),(e=this.form)==null||e.addEventListener("submit",t=>{this.reportValidity()||t.preventDefault()})}disconnectedCallback(){super.disconnectedCallback(),this._cleanUpPopover&&this._cleanUpPopover()}inputTemplate(){var O;let e=r`<ul class="selected-options">
|
|
2
|
-
${this._selectedOptions.map(p=>r`<li>${p.getAttribute("label")||p.textContent}</li>`)}
|
|
3
|
-
</ul>`,o=!(this._selectedOptions.length>0&&this._selectedOptions.every(p=>p.disabled))&&(this.clearable||this.multiple),a=o?r`<bl-button
|
|
4
|
-
class="remove-all"
|
|
5
|
-
size="small"
|
|
6
|
-
variant="tertiary"
|
|
7
|
-
kind="neutral"
|
|
8
|
-
icon="close"
|
|
9
|
-
@click=${this._onClickRemove}
|
|
10
|
-
></bl-button>`:"",d=this.searchBar&&this.opened,c=this._selectedOptions.length>0,n=d||c&&o,u=(O=this.searchBarPlaceholder)!=null?O:b("Search",{desc:"bl-select: search placeholder text"}),M=r`<bl-icon
|
|
11
|
-
class="search-mag-icon"
|
|
12
|
-
name="search"
|
|
13
|
-
style="color: var(--bl-color-primary);font-size: var(--bl-font-size-s)"
|
|
14
|
-
></bl-icon>`,P=r`<bl-icon
|
|
15
|
-
class="search-loading-icon"
|
|
16
|
-
name="loading"
|
|
17
|
-
style="color: var(--bl-color-primary);font-size: var(--bl-font-size-s)"
|
|
18
|
-
></bl-icon>`,_=n?r`<div class="action-divider"></div>`:"",D=r`<fieldset
|
|
19
|
-
class=${f({"select-input":!0,"has-overflowed-options":this._additionalSelectedOptionCount>0})}
|
|
20
|
-
tabindex="${this.disabled?"-1":0}"
|
|
21
|
-
.autofocus=${this.autofocus}
|
|
22
|
-
role="button"
|
|
23
|
-
aria-haspopup="listbox"
|
|
24
|
-
aria-expanded="${this.opened}"
|
|
25
|
-
aria-labelledby="label"
|
|
26
|
-
@click=${this.open}
|
|
27
|
-
>
|
|
28
|
-
<legend><span>${this.label}</span></legend>
|
|
29
|
-
|
|
30
|
-
${this._selectedOptions.length>0&&!this.opened?e:r`
|
|
31
|
-
<input
|
|
32
|
-
class="search-bar-input"
|
|
33
|
-
placeholder=${this.opened||this.labelFixed?u:this.label||u}
|
|
34
|
-
@input=${this._handleSearchOptions}
|
|
35
|
-
@keydown=${p=>{p.code==="Space"&&p.stopPropagation()}}
|
|
36
|
-
.value=${this._searchText}
|
|
37
|
-
/>
|
|
38
|
-
`}
|
|
39
|
-
${this.opened?"":r`<span class="additional-selection-count"
|
|
40
|
-
>+${this._additionalSelectedOptionCount}</span
|
|
41
|
-
>`}
|
|
42
|
-
|
|
43
|
-
<div class="actions">
|
|
44
|
-
${this.opened?this.searchBarLoadingState?P:M:""}
|
|
45
|
-
${this.opened?"":a} ${_}
|
|
46
|
-
|
|
47
|
-
<div @click=${this._togglePopover}>
|
|
48
|
-
<bl-icon class="dropdown-icon open" name="arrow_up"></bl-icon>
|
|
49
|
-
|
|
50
|
-
<bl-icon class="dropdown-icon closed" name="arrow_down"></bl-icon>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
</fieldset>`;return this.searchBar?D:r`<fieldset
|
|
54
|
-
class=${f({"select-input":!0,"has-overflowed-options":this._additionalSelectedOptionCount>0})}
|
|
55
|
-
tabindex="${y(this.disabled?void 0:0)}"
|
|
56
|
-
?autofocus=${this.autofocus}
|
|
57
|
-
@click=${this._togglePopover}
|
|
58
|
-
role="button"
|
|
59
|
-
aria-haspopup="listbox"
|
|
60
|
-
aria-expanded="${this.opened}"
|
|
61
|
-
aria-labelledby="label"
|
|
62
|
-
>
|
|
63
|
-
<legend><span>${this.label}</span></legend>
|
|
64
|
-
<span class="placeholder">${this.placeholder}</span>
|
|
65
|
-
<span class="label">${this.label}</span>
|
|
66
|
-
${e}
|
|
67
|
-
<span class="additional-selection-count">+${this._additionalSelectedOptionCount}</span>
|
|
68
|
-
<div class="actions">
|
|
69
|
-
${a} ${_}
|
|
70
|
-
<bl-icon class="dropdown-icon open" name="arrow_up"></bl-icon>
|
|
71
|
-
|
|
72
|
-
<bl-icon class="dropdown-icon closed" name="arrow_down"></bl-icon>
|
|
73
|
-
</div>
|
|
74
|
-
</fieldset>`}selectAllTemplate(){var a;if(!this.multiple||!this.viewSelectAll||this.noResultFound)return null;let e=this._connectedOptions.filter(d=>!d.hidden).every(d=>d.selected),t=this._selectedOptions.filter(d=>!d.hidden).length>0,o=(a=this.selectAllText)!=null?a:b("Select All",{desc:"bl-select: select all text"});return r`<bl-checkbox
|
|
75
|
-
class="select-all"
|
|
76
|
-
.checked="${e}"
|
|
77
|
-
.indeterminate="${t&&!e}"
|
|
78
|
-
role="option"
|
|
79
|
-
aria-selected="${e}"
|
|
80
|
-
@bl-checkbox-change="${this._handleSelectAll}"
|
|
81
|
-
>
|
|
82
|
-
${o}
|
|
83
|
-
</bl-checkbox>`}render(){var c,n;let e=this.checkValidity()?"":r`<p id="errorMessage" aria-live="polite" class="invalid-text">
|
|
84
|
-
${this.validationMessage}
|
|
85
|
-
</p>`,t=this.helpText?r`<p class="help-text">${this.helpText}</p>`:"",o=this.label?r`<label id="label">${this.label}</label>`:"",a=(c=this.searchNotFoundText)!=null?c:b("No Data Found",{desc:"bl-select: search no data text"}),d=(n=this.popoverClearSearchText)!=null?n:b("Clear Search",{desc:"bl-select: clear search button text"});return r`<div
|
|
86
|
-
class=${f({"select-wrapper":!0,"select-open":this.opened,selected:this._selectedOptions.length>0,invalid:!this.validity.valid,dirty:this.dirty})}
|
|
87
|
-
@keydown=${this.handleKeydown}
|
|
88
|
-
>
|
|
89
|
-
${o} ${this.inputTemplate()}
|
|
90
|
-
<div
|
|
91
|
-
class="popover"
|
|
92
|
-
tabindex="${y(this._isPopoverOpen?void 0:"-1")}"
|
|
93
|
-
@bl-select-option=${this._handleSelectOptionEvent}
|
|
94
|
-
role="listbox"
|
|
95
|
-
aria-multiselectable="${this.multiple}"
|
|
96
|
-
aria-labelledby="label"
|
|
97
|
-
>
|
|
98
|
-
${this.selectAllTemplate()}
|
|
99
|
-
<slot></slot>
|
|
100
|
-
${this.searchBar&&this.noResultFound?r`<div name="popover-clear-search-text" class="popover-no-result">
|
|
101
|
-
<span>${a}</span>
|
|
102
|
-
<bl-button
|
|
103
|
-
variant="tertiary"
|
|
104
|
-
@click=${()=>{this._handleSearchOptions({target:{value:""}})}}
|
|
105
|
-
>${d}</bl-button
|
|
106
|
-
>
|
|
107
|
-
</div>`:""}
|
|
108
|
-
</div>
|
|
109
|
-
<div class="hint">${e} ${t}</div>
|
|
110
|
-
</div> `}handleKeydown(e){this.focusedOptionIndex===-1&&["Enter","Space"].includes(e.code)?(this._togglePopover(),e.preventDefault()):this._isPopoverOpen===!1&&["ArrowDown","ArrowUp"].includes(e.code)?(this.open(),e.preventDefault()):e.code==="Escape"?(this.close(),e.preventDefault()):this._isPopoverOpen&&["ArrowDown","ArrowUp"].includes(e.code)&&(e.code==="ArrowDown"&&this.focusedOptionIndex++,e.code==="ArrowUp"&&this.focusedOptionIndex--,this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,this.options.length-1)),this.options[this.focusedOptionIndex].focus(),e.preventDefault())}_togglePopover(){this._isPopoverOpen?this.close():this.open()}_handleSelectEvent(){let e=this._selectedOptions.map(t=>({value:t.value,selected:t.selected,text:t.textContent}));this.multiple?this._onBlSelect(e):this._onBlSelect(e[0])}_handleSearchEvent(){this._onBlSearch(this._searchText)}_handleSearchOptions(e){this.searchBar&&(this._searchText=e.target.value,this._handleSearchEvent(),this._connectedOptions.forEach(t=>{var a;let o=(a=t.textContent)==null?void 0:a.toLowerCase().includes(this._searchText.toLowerCase());t.hidden=!o}),this._selectedOptions=this.options.filter(t=>t.selected),this._handleLastVisibleSearchedOption(),this.requestUpdate())}_handleLastVisibleSearchedOption(){var t,o;let e=[...this.options].reverse().find(a=>!a.hidden);e&&((o=(t=e==null?void 0:e.shadowRoot)==null?void 0:t.querySelector("div"))==null||o.classList.add("no-border-bottom")),this.options.map(a=>{var d,c;!a.hidden&&a!==e&&((c=(d=a.shadowRoot)==null?void 0:d.querySelector("div"))==null||c.classList.remove("no-border-bottom"))})}_handleSingleSelect(e){this.value=e.value,this._handleSelectEvent(),this._isPopoverOpen=!1}_handleMultipleSelect(){this.value=this._connectedOptions.filter(e=>e.selected).map(e=>e.value),this._handleSelectEvent()}_handleSelectOptionEvent(e){let t=e.target;this.dirty=!0,this.multiple?this._handleMultipleSelect():this._handleSingleSelect(t)}_handleSelectAll(e){var c;let t=(c=this.shadowRoot)==null?void 0:c.querySelector(".select-all"),o=e.detail,d=this._connectedOptions.filter(n=>!n.selected&&!n.hidden).every(n=>n.disabled);if(o&&d){setTimeout(()=>{var u;let n=(u=t==null?void 0:t.shadowRoot)==null?void 0:u.querySelector("input");n==null||n.click()},0);return}this._connectedOptions.forEach(n=>{n.disabled||n.hidden||(n.selected=o)}),this._handleMultipleSelect()}_onClickRemove(e){e.stopPropagation();let t=this._selectedOptions.filter(o=>o.disabled);this._connectedOptions.filter(o=>!o.disabled&&o.selected).forEach(o=>{o.selected=!1}),this.value=t.length?t.map(o=>o.value):null,this._handleSelectEvent()}_checkAdditionalItemCount(){if(!this.multiple||!this.selectedOptionsItems||this.selectedOptionsItems.length<2){this._additionalSelectedOptionCount=0;return}let e=[...this.selectedOptionsItems].findIndex(t=>t.offsetLeft>this.selectedOptionsContainer.offsetWidth);e>-1?this._additionalSelectedOptionCount=this.selectedOptionsItems.length-e:this._additionalSelectedOptionCount=0}firstUpdated(){this.value===void 0&&(this.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=[k],l([s()],i.prototype,"name",2),l([s()],i.prototype,"value",1),l([s({reflect:!0})],i.prototype,"label",2),l([s({reflect:!0})],i.prototype,"placeholder",2),l([s({type:String,reflect:!0})],i.prototype,"size",2),l([s({type:Boolean,reflect:!0})],i.prototype,"required",2),l([s({type:Boolean,reflect:!0})],i.prototype,"disabled",2),l([s({type:Boolean,reflect:!0})],i.prototype,"clearable",2),l([s({type:Boolean,reflect:!0})],i.prototype,"multiple",2),l([s({type:Boolean,reflect:!0})],i.prototype,"autofocus",2),l([s({type:Boolean,attribute:"label-fixed",reflect:!0})],i.prototype,"labelFixed",2),l([s({type:String,attribute:"help-text",reflect:!0})],i.prototype,"helpText",2),l([s({type:String,attribute:"invalid-text",reflect:!0})],i.prototype,"customInvalidText",2),l([s({type:Boolean,attribute:"view-select-all",converter:x()})],i.prototype,"viewSelectAll",2),l([s({type:String,attribute:"select-all-text"})],i.prototype,"selectAllText",2),l([s({type:Boolean,attribute:"search-bar",reflect:!0})],i.prototype,"searchBar",2),l([s({type:String,attribute:"search-bar-placeholder",reflect:!0})],i.prototype,"searchBarPlaceholder",2),l([s({type:Boolean,attribute:"search-bar-loading-state",converter:x()})],i.prototype,"searchBarLoadingState",2),l([s({type:String,attribute:"search-not-found-text",reflect:!0})],i.prototype,"searchNotFoundText",2),l([s({type:String,attribute:"popover-clear-search-text",reflect:!0})],i.prototype,"popoverClearSearchText",2),l([h()],i.prototype,"_isPopoverOpen",2),l([h()],i.prototype,"_additionalSelectedOptionCount",2),l([h()],i.prototype,"_searchText",2),l([v(".selected-options")],i.prototype,"selectedOptionsContainer",2),l([S(".selected-options li")],i.prototype,"selectedOptionsItems",2),l([v(".popover")],i.prototype,"_popover",2),l([v(".select-input")],i.prototype,"_selectInput",2),l([m("bl-select")],i.prototype,"_onBlSelect",2),l([m("bl-search")],i.prototype,"_onBlSearch",2),l([h()],i.prototype,"_selectedOptions",2),l([h()],i.prototype,"dirty",2),l([v(".select-input")],i.prototype,"validationTarget",2),i=l([T("bl-select"),z()],i);export{i as a};
|
|
111
|
-
//# sourceMappingURL=chunk-ITD4T4IW.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|