@trendyol/baklava 2.0.0-beta.31 → 2.0.0-beta.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/baklava.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-QVWNLWDE.js";import{a as d}from"./chunk-OJVJFWT3.js";import{a as n}from"./chunk-ECSHF6ND.js";import{a as m}from"./chunk-KWTSWXUL.js";import{a as s}from"./chunk-C5HFLPOK.js";import{a as f}from"./chunk-LZHSSAHO.js";import{a as p}from"./chunk-IDG5M2QP.js";import{a as u}from"./chunk-6WS7INIM.js";import"./chunk-VNGNBBSS.js";import{a as B}from"./chunk-EELZVHM7.js";import{a as r}from"./chunk-6UWMQKJW.js";import{a}from"./chunk-IB7GARWV.js";import"./chunk-2TVOKUHE.js";import"./chunk-ENFFFE4I.js";import{a as x}from"./chunk-N6FF6F3Y.js";import"./chunk-KQBKSEYJ.js";import{a as t,b as o,c as e}from"./chunk-WXJKPVRA.js";import"./chunk-72IJCTLJ.js";import"./chunk-23UFIOHV.js";import"./chunk-HG7OBTQS.js";import"./chunk-NZ3RGSR6.js";export{B as BlAlert,r as BlBadge,a as BlButton,x as BlCheckbox,e as BlIcon,l as BlInput,d as BlProgressIndicator,n as BlSelect,m as BlSelectOption,f as BlTab,s as BlTabGroup,p as BlTabPanel,u as BlTooltip,o as getIconPath,t as setIconPath};
1
+ import{a as l}from"./chunk-QVWNLWDE.js";import{a as d}from"./chunk-OJVJFWT3.js";import{a as n}from"./chunk-YFUMYW57.js";import{a as m}from"./chunk-KWTSWXUL.js";import{a as s}from"./chunk-C5HFLPOK.js";import{a as f}from"./chunk-LZHSSAHO.js";import{a as p}from"./chunk-IDG5M2QP.js";import{a as u}from"./chunk-6WS7INIM.js";import"./chunk-VNGNBBSS.js";import{a as B}from"./chunk-EELZVHM7.js";import{a as r}from"./chunk-6UWMQKJW.js";import{a}from"./chunk-IB7GARWV.js";import"./chunk-2TVOKUHE.js";import"./chunk-ENFFFE4I.js";import{a as x}from"./chunk-N6FF6F3Y.js";import"./chunk-KQBKSEYJ.js";import{a as t,b as o,c as e}from"./chunk-WXJKPVRA.js";import"./chunk-72IJCTLJ.js";import"./chunk-23UFIOHV.js";import"./chunk-HG7OBTQS.js";import"./chunk-NZ3RGSR6.js";export{B as BlAlert,r as BlBadge,a as BlButton,x as BlCheckbox,e as BlIcon,l as BlInput,d as BlProgressIndicator,n as BlSelect,m as BlSelectOption,f as BlTab,s as BlTabGroup,p as BlTabPanel,u as BlTooltip,o as getIconPath,t as setIconPath};
2
2
  //# sourceMappingURL=baklava.js.map
@@ -0,0 +1,35 @@
1
+ import{b as f,c as m,e as _,f as g,g as x}from"./chunk-VNGNBBSS.js";import{a as b}from"./chunk-ENFFFE4I.js";import{a as u}from"./chunk-23UFIOHV.js";import{a as c,b as i,f as d,g as v,h as n,i as r,j as a,k as h}from"./chunk-HG7OBTQS.js";import{a as l}from"./chunk-NZ3RGSR6.js";var z=c`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--background-color:#fff;--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--z-index:1;--menu-height:250px}: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)}.placeholder{color:var(--placeholder-color)}:host([disabled]) .placeholder{--placeholder-color:var(--bl-color-content-passive)}.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-hover);--label-color:var(--bl-color-danger)}.select-input{display:flex;align-items:center;justify-content:space-between;cursor:pointer;outline:0;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 var(--padding-horizontal);border-radius:var(--bl-border-radius-s);color:var(--text-color);user-select:none}.remove-all{display:none}.remove-all::after{content:'';position:absolute;left:1.5rem;bottom:4px;height:1rem;border-left:1px solid var(--bl-color-border)}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-secondary)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-content-passive)}.select-open .select-input{border:solid 1px var(--border-focus-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;margin:0;list-style:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selected-options li{display:inline;font-size:var(--font-size);color:var(--text-color)}.selected-options li:not(:last-child)::after{content:', '}:host([disabled]) .selected-options li{color:var(--bl-color-content-passive)}.select-input .actions{display:flex;align-items:center;justify-content:center;gap:var(--bl-size-2xs);margin-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:fixed;border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--z-index);width:100%;top:var(--top);left:var(--left)}.select-open .popover{display:flex;border:solid 1px var(--border-focus-color)}bl-icon{color:var(--icon-color)}label{position:absolute;display:flex;align-items:center;top:var(--padding-vertical);left:var(--padding-horizontal);transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-form-label);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial}:host([label-fixed]) .select-wrapper{padding-top:var(--bl-size-m)}:host([label-fixed]) label{top:0;left:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-form-label);color:var(--label-color);padding:0}.help-text,.invalid-text{margin:var(--bl-size-3xs) 0 0 var(--bl-size-2xs);font:var(--bl-font-title-4-regular);padding:var(--bl-size-3xs) var(--bl-input-padding-horizontal)}.help-text{color:var(--bl-color-content-secondary)}.invalid-text{color:var(--bl-color-danger)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}`,O=z;var o=class extends d{constructor(){super(...arguments);this.size="medium";this.required=!1;this.disabled=!1;this.multiple=!1;this.labelFixed=!1;this._isPopoverOpen=!1;this._selectedOptions=[];this._additionalSelectedOptionCount=0;this._isInvalid=!1;this._connectedOptions=[];this._cleanUpPopover=null;this._clickOutsideHandler=e=>{var s;let t=e.composedPath();(s=t==null?void 0:t.find(p=>p.tagName==="BL-SELECT"))!=null&&s.contains(this)||(this.close(),this._checkRequired())}}static get styles(){return[O]}get options(){return this._connectedOptions}get isPopoverOpen(){return this._isPopoverOpen}get selectedOptions(){return this._selectedOptions}get additionalSelectedOptionCount(){return this._additionalSelectedOptionCount}get isInvalid(){return this._isInvalid}open(){this._isPopoverOpen=!0,this._setupPopover(),document.addEventListener("click",this._clickOutsideHandler)}close(){this._isPopoverOpen=!1,this._cleanUpPopover&&this._cleanUpPopover(),document.removeEventListener("click",this._clickOutsideHandler)}_setupPopover(){this._cleanUpPopover=g(this._selectInput,this._popover,()=>{x(this._selectInput,this._popover,{placement:"bottom",strategy:"fixed",middleware:[f(),m(8),_({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(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._cleanUpPopover&&this._cleanUpPopover()}inputTemplate(){let e=i`<ul class="selected-options">
2
+ ${this._selectedOptions.map(y=>i`<li>${y.text}</li>`)}
3
+ </ul>`,t=this._additionalSelectedOptionCount?i`<span>+${this._additionalSelectedOptionCount}</span>`:null,s=i`<bl-button
4
+ class="remove-all"
5
+ variant="secondary"
6
+ size="small"
7
+ kind="text"
8
+ icon="close"
9
+ @click=${this._onClickRemove}></bl-button>`,p=this._showPlaceHolder?i`<span class="placeholder">${this.placeholder}</span>`:"";return i`<div
10
+ class="select-input"
11
+ ?disabled=${this.disabled}
12
+ @click=${this._onClickSelectInput}
13
+ >
14
+ ${p} ${e} ${t}
15
+ <div class="actions">
16
+ ${s}
17
+ <bl-icon
18
+ class="dropdown-icon open"
19
+ name="arrow_up"
20
+ ></bl-icon>
21
+
22
+ <bl-icon
23
+ class="dropdown-icon closed"
24
+ name="arrow_down"
25
+ ></bl-icon>
26
+ </div>
27
+ </div>`}menuTemplate(){return i`<div class="popover" @bl-select-option=${this._handleSelectOptionEvent}>
28
+ <slot></slot>
29
+ </div>`}render(){let e=this._isInvalid&&this.customInvalidText?i`<p class="invalid-text">${this.customInvalidText}</p>`:"",t=this.helpText&&!e?i`<p class="help-text">${this.helpText}</p>`:"",s=this.label?i`<label>${this.label}</label>`:"";return i`<div
30
+ class=${b({"select-wrapper":!0,"select-open":this._isPopoverOpen,selected:this._selectedOptions.length>0,invalid:this._isInvalid})}
31
+ tabindex="-1"
32
+ >
33
+ ${s} ${this.inputTemplate()} ${this.menuTemplate()} ${t} ${e}
34
+ </div> `}get _showPlaceHolder(){return this.label&&!this.labelFixed?!this._selectedOptions.length&&this._isPopoverOpen:!this._selectedOptions.length}_onClickSelectInput(){this._isPopoverOpen?this.close():this.open()}_handleSelectEvent(){this._onBlSelect(this._selectedOptions)}_handleSingleSelect(e){let t=this._connectedOptions.find(s=>s.value!==e.value&&s.selected);t&&(t.selected=!1),this._selectedOptions=[e],this._handleSelectEvent(),this._isPopoverOpen=!1}_handleMultipleSelect(e){let{value:t}=e;e.selected?this._selectedOptions=[...this._selectedOptions,e]:this._selectedOptions=this._selectedOptions.filter(s=>s.value!==t),this._handleSelectEvent()}_handleSelectOptionEvent(e){let t=e.detail;this.multiple?this._handleMultipleSelect(t):this._handleSingleSelect(t)}_onClickRemove(e){e.stopPropagation(),this._connectedOptions.filter(t=>t.selected).forEach(t=>{t.selected=!1}),this._selectedOptions=[],this._handleSelectEvent()}_checkAdditionalItemCount(){if(!this.multiple)return;let e=0;for(let t of this._selectedOptionsItems)if(t.offsetLeft<this._selectedOptionsContainer.offsetWidth)e++;else break;this._additionalSelectedOptionCount=this._selectedOptionsItems.length-e}_checkRequired(){this.required&&(this._isInvalid=this._selectedOptions.length===0)}updated(e){e.has("_selectedOptions")&&e.get("_selectedOptions")instanceof Array?(this._checkRequired(),this._checkAdditionalItemCount()):e.has("multiple")&&typeof e.get("multiple")=="boolean"&&(this._connectedOptions.forEach(t=>{t.multiple=this.multiple,t.selected=!1}),this._selectedOptions=[])}registerOption(e){if(this._connectedOptions.push(e),e.selected){let t={value:e.value,text:e.textContent,selected:e.selected};this.multiple?this._selectedOptions=[...this._selectedOptions,t]:this._selectedOptions=[t],this.requestUpdate()}}unregisterOption(e){this._connectedOptions.splice(this._connectedOptions.indexOf(e),1),this._selectedOptions=this._selectedOptions.filter(t=>t.value!==e.value)}};l([n({})],o.prototype,"label",2),l([n({})],o.prototype,"placeholder",2),l([n({type:String,reflect:!0})],o.prototype,"size",2),l([n({type:Boolean})],o.prototype,"required",2),l([n({type:Boolean})],o.prototype,"disabled",2),l([n({type:Boolean})],o.prototype,"multiple",2),l([n({type:Boolean,attribute:"label-fixed"})],o.prototype,"labelFixed",2),l([n({type:String,attribute:"help-text"})],o.prototype,"helpText",2),l([n({type:String,attribute:"invalid-text"})],o.prototype,"customInvalidText",2),l([r()],o.prototype,"_isPopoverOpen",2),l([r()],o.prototype,"_selectedOptions",2),l([r()],o.prototype,"_additionalSelectedOptionCount",2),l([r()],o.prototype,"_isInvalid",2),l([a(".selected-options")],o.prototype,"_selectedOptionsContainer",2),l([h(".selected-options li")],o.prototype,"_selectedOptionsItems",2),l([a(".popover")],o.prototype,"_popover",2),l([a(".select-input")],o.prototype,"_selectInput",2),l([u("bl-select")],o.prototype,"_onBlSelect",2),o=l([v("bl-select")],o);export{o as a};
35
+ //# sourceMappingURL=chunk-YFUMYW57.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/components/select/bl-select.css", "../src/components/select/bl-select.ts"],
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--background-color:#fff;--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--z-index:1;--menu-height:250px}: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)}.placeholder{color:var(--placeholder-color)}:host([disabled]) .placeholder{--placeholder-color:var(--bl-color-content-passive)}.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-hover);--label-color:var(--bl-color-danger)}.select-input{display:flex;align-items:center;justify-content:space-between;cursor:pointer;outline:0;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 var(--padding-horizontal);border-radius:var(--bl-border-radius-s);color:var(--text-color);user-select:none}.remove-all{display:none}.remove-all::after{content:'';position:absolute;left:1.5rem;bottom:4px;height:1rem;border-left:1px solid var(--bl-color-border)}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-secondary)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-content-passive)}.select-open .select-input{border:solid 1px var(--border-focus-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;margin:0;list-style:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selected-options li{display:inline;font-size:var(--font-size);color:var(--text-color)}.selected-options li:not(:last-child)::after{content:', '}:host([disabled]) .selected-options li{color:var(--bl-color-content-passive)}.select-input .actions{display:flex;align-items:center;justify-content:center;gap:var(--bl-size-2xs);margin-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:fixed;border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--z-index);width:100%;top:var(--top);left:var(--left)}.select-open .popover{display:flex;border:solid 1px var(--border-focus-color)}bl-icon{color:var(--icon-color)}label{position:absolute;display:flex;align-items:center;top:var(--padding-vertical);left:var(--padding-horizontal);transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-form-label);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial}:host([label-fixed]) .select-wrapper{padding-top:var(--bl-size-m)}:host([label-fixed]) label{top:0;left:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-form-label);color:var(--label-color);padding:0}.help-text,.invalid-text{margin:var(--bl-size-3xs) 0 0 var(--bl-size-2xs);font:var(--bl-font-title-4-regular);padding:var(--bl-size-3xs) var(--bl-input-padding-horizontal)}.help-text{color:var(--bl-color-content-secondary)}.invalid-text{color:var(--bl-color-danger)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}`;\nexport default styles;\n", "import { LitElement, html, CSSResultGroup, PropertyValues } from 'lit';\nimport { customElement, property, state, query, queryAll } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { computePosition, flip, MiddlewareArguments, offset, size, autoUpdate } from '@floating-ui/dom';\nimport style from '../select/bl-select.css';\nimport '../icon/bl-icon';\nimport '../select/option/bl-select-option';\nimport type BlSelectOption from './option/bl-select-option';\nimport { event, EventDispatcher } from '../../utilities/event';\n\nexport interface ISelectOption {\n value: string;\n text: string;\n selected: boolean;\n}\n\nexport type SelectSize = 'medium' | 'large' | 'small';\n\nexport type CleanUpFunction = () => void;\n\n@customElement('bl-select')\nexport default class BlSelect extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /* Declare reactive properties */\n /**\n * Sets the label value\n */\n @property({})\n label?: string;\n\n /**\n * Sets the placeholder value. If left blank, the label value (if specified) is set as placeholder.\n */\n @property({})\n placeholder?: string;\n\n /**\n * Sets the size value. Select component's height value will be changed accordingly\n */\n @property({ type: String, reflect: true })\n size: SelectSize = 'medium';\n\n /**\n * When option is not selected, shows component in error state\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Shows the component in disabled state.\n */\n @property({ type: Boolean })\n disabled = false;\n\n /**\n * Allows multiple options to be selected\n */\n @property({ type: Boolean })\n multiple = false;\n\n /**\n * Makes label as fixed positioned\n */\n @property({ type: Boolean, attribute: 'label-fixed' })\n labelFixed = false;\n\n /**\n * Adds help text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText?: string;\n\n /**\n * Set custom error message\n */\n @property({ type: String, attribute: 'invalid-text' })\n customInvalidText?: string;\n\n /* Declare internal reactive properties */\n @state()\n private _isPopoverOpen = false;\n\n @state()\n private _selectedOptions: ISelectOption[] = [];\n\n @state()\n private _additionalSelectedOptionCount = 0;\n\n @state()\n private _isInvalid = false;\n\n @query('.selected-options')\n private _selectedOptionsContainer!: HTMLElement;\n\n @queryAll('.selected-options li')\n private _selectedOptionsItems!: Array<HTMLElement>;\n\n @query('.popover')\n private _popover: HTMLElement;\n\n @query('.select-input')\n private _selectInput: HTMLElement;\n\n @event('bl-select') private _onBlSelect: EventDispatcher<ISelectOption[]>;\n\n private _connectedOptions: BlSelectOption[] = [];\n\n private _cleanUpPopover: CleanUpFunction | null = null;\n\n get options() {\n return this._connectedOptions;\n }\n\n get isPopoverOpen() {\n return this._isPopoverOpen;\n }\n\n get selectedOptions() {\n return this._selectedOptions;\n }\n\n get additionalSelectedOptionCount() {\n return this._additionalSelectedOptionCount;\n }\n\n get isInvalid() {\n return this._isInvalid;\n }\n\n open() {\n this._isPopoverOpen = true;\n this._setupPopover();\n document.addEventListener('click', this._clickOutsideHandler);\n }\n\n close() {\n this._isPopoverOpen = false;\n this._cleanUpPopover && this._cleanUpPopover();\n document.removeEventListener('click', this._clickOutsideHandler);\n }\n\n private _clickOutsideHandler = (event: MouseEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath?.find(el => el.tagName === 'BL-SELECT')?.contains(this)) {\n this.close();\n this._checkRequired();\n }\n };\n\n private _setupPopover() {\n this._cleanUpPopover = autoUpdate(this._selectInput, this._popover, () => {\n computePosition(this._selectInput, this._popover, {\n placement: 'bottom',\n strategy: 'fixed',\n middleware: [\n flip(),\n offset(8),\n size({\n apply(args: MiddlewareArguments) {\n Object.assign(args.elements.floating.style, {\n width: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n },\n }),\n ],\n }).then(({ x, y }) => {\n this._popover.style.setProperty('--left', `${x}px`);\n this._popover.style.setProperty('--top', `${y}px`);\n });\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this._cleanUpPopover && this._cleanUpPopover();\n }\n\n private inputTemplate() {\n const inputSelectedOptions = html`<ul class=\"selected-options\">\n ${this._selectedOptions.map(item => html`<li>${item.text}</li>`)}\n </ul>`;\n const _selectedItemCount = this._additionalSelectedOptionCount\n ? html`<span>+${this._additionalSelectedOptionCount}</span>`\n : null;\n const removeButton = html`<bl-button\n class=\"remove-all\"\n variant=\"secondary\"\n size=\"small\"\n kind=\"text\"\n icon=\"close\"\n @click=${this._onClickRemove}></bl-button>`;\n const placeholder = this._showPlaceHolder\n ? html`<span class=\"placeholder\">${this.placeholder}</span>`\n : '';\n\n return html`<div\n class=\"select-input\"\n ?disabled=${this.disabled}\n @click=${this._onClickSelectInput}\n >\n ${placeholder} ${inputSelectedOptions} ${_selectedItemCount}\n <div class=\"actions\">\n ${removeButton}\n <bl-icon\n class=\"dropdown-icon open\"\n name=\"arrow_up\"\n ></bl-icon>\n\n <bl-icon\n class=\"dropdown-icon closed\"\n name=\"arrow_down\"\n ></bl-icon>\n </div>\n </div>`;\n }\n\n private menuTemplate() {\n return html`<div class=\"popover\" @bl-select-option=${this._handleSelectOptionEvent}>\n <slot></slot>\n </div>`;\n }\n\n render() {\n const invalidMessage = this._isInvalid && this.customInvalidText\n ? html`<p class=\"invalid-text\">${this.customInvalidText}</p>` : ``;\n const helpMessage = this.helpText && !invalidMessage\n ? html`<p class=\"help-text\">${this.helpText}</p>` : ``;\n const label = this.label\n ? html`<label>${this.label}</label>` : '';\n\n return html`<div\n class=${classMap({\n 'select-wrapper': true,\n 'select-open': this._isPopoverOpen,\n 'selected': this._selectedOptions.length > 0,\n 'invalid': this._isInvalid,\n })}\n tabindex=\"-1\"\n >\n ${label} ${this.inputTemplate()} ${this.menuTemplate()} ${helpMessage} ${invalidMessage}\n </div> `;\n }\n\n private get _showPlaceHolder() {\n if (this.label && !this.labelFixed) {\n return !this._selectedOptions.length && this._isPopoverOpen;\n }\n return !this._selectedOptions.length;\n }\n\n private _onClickSelectInput() {\n this._isPopoverOpen ? this.close() : this.open();\n }\n\n private _handleSelectEvent() {\n this._onBlSelect(this._selectedOptions);\n }\n\n private _handleSingleSelect(optionItem: ISelectOption) {\n const oldItem = this._connectedOptions.find(option => option.value !== optionItem.value && option.selected);\n\n if (oldItem) {\n oldItem.selected = false;\n }\n\n this._selectedOptions = [optionItem];\n this._handleSelectEvent();\n this._isPopoverOpen = false;\n }\n\n private _handleMultipleSelect(optionItem: ISelectOption) {\n const { value } = optionItem;\n\n if (!optionItem.selected) {\n this._selectedOptions = this._selectedOptions.filter(item => item.value !== value);\n } else {\n this._selectedOptions = [...this._selectedOptions, optionItem];\n }\n\n this._handleSelectEvent();\n }\n\n private _handleSelectOptionEvent(e: CustomEvent) {\n const optionItem = e.detail as ISelectOption;\n\n if (this.multiple) {\n this._handleMultipleSelect(optionItem);\n } else {\n this._handleSingleSelect(optionItem);\n }\n }\n\n private _onClickRemove(e: MouseEvent) {\n e.stopPropagation();\n\n this._connectedOptions\n .filter(option => option.selected)\n .forEach(option => {\n option.selected = false;\n });\n\n this._selectedOptions = [];\n this._handleSelectEvent();\n }\n\n private _checkAdditionalItemCount() {\n if (!this.multiple) return;\n\n let visibleItems = 0;\n for(const value of this._selectedOptionsItems) {\n if (value.offsetLeft < this._selectedOptionsContainer.offsetWidth) {\n visibleItems++;\n } else {\n break;\n }\n }\n\n this._additionalSelectedOptionCount = this._selectedOptionsItems.length - visibleItems;\n }\n\n private _checkRequired() {\n if (this.required) {\n this._isInvalid = this._selectedOptions.length === 0;\n }\n }\n\n protected updated(_changedProperties: PropertyValues) {\n if (\n _changedProperties.has('_selectedOptions') &&\n _changedProperties.get('_selectedOptions') instanceof Array\n ) {\n this._checkRequired();\n this._checkAdditionalItemCount();\n } else if (\n _changedProperties.has('multiple') &&\n typeof _changedProperties.get('multiple') === 'boolean'\n ) {\n this._connectedOptions.forEach(option => {\n option.multiple = this.multiple;\n option.selected = false;\n });\n this._selectedOptions = [];\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) {\n this._connectedOptions.push(option);\n\n if (option.selected) {\n const optionItem = {\n value: option.value,\n text: option.textContent,\n selected: option.selected,\n } as ISelectOption;\n\n if (this.multiple) {\n this._selectedOptions = [...this._selectedOptions, optionItem];\n } else {\n this._selectedOptions = [optionItem];\n }\n\n this.requestUpdate();\n }\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) {\n this._connectedOptions.splice(this._connectedOptions.indexOf(option), 1);\n this._selectedOptions = this._selectedOptions.filter(item => item.value !== option.value);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-select': BlSelect;\n }\n}\n"],
5
+ "mappings": "qRACO,IAAMA,EAASC,o2IACfC,EAAQF,ECmBf,IAAqBG,EAArB,cAAsCC,CAAW,CAAjD,kCAsBE,UAAmB,SAMnB,cAAW,GAMX,cAAW,GAMX,cAAW,GAMX,gBAAa,GAgBb,KAAQ,eAAiB,GAGzB,KAAQ,iBAAoC,CAAC,EAG7C,KAAQ,+BAAiC,EAGzC,KAAQ,WAAa,GAgBrB,KAAQ,kBAAsC,CAAC,EAE/C,KAAQ,gBAA0C,KAkClD,KAAQ,qBAAwBC,GAAsB,CAhJxD,IAAAC,EAiJI,IAAMC,EAAYF,EAAM,aAAa,GAEhCC,EAAAC,GAAA,YAAAA,EAAW,KAAKC,GAAMA,EAAG,UAAY,eAArC,MAAAF,EAAmD,SAAS,QAC/D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X,8CAGA+B,EAAA,CADPE,EAAM,GAtEYjC,EAuEX,0BAGA+B,EAAA,CADPG,EAAM,mBAAmB,GAzEPlC,EA0EX,yCAGA+B,EAAA,CADPC,EAAS,sBAAsB,GA5EbhC,EA6EX,qCAGA+B,EAAA,CADPG,EAAM,UAAU,GA/EElC,EAgFX,wBAGA+B,EAAA,CADPG,EAAM,eAAe,GAlFHlC,EAmFX,4BAEoB+B,EAAA,CAA3B7B,EAAM,WAAW,GArFCF,EAqFS,2BArFTA,EAArB+B,EAAA,CADCI,EAAc,WAAW,GACLnC",
6
+ "names": ["styles", "r", "bl_select_default", "BlSelect", "s", "event", "_a", "eventPath", "el", "bl_select_default", "N", "z", "b", "T", "k", "args", "x", "y", "inputSelectedOptions", "$", "item", "_selectedItemCount", "removeButton", "placeholder", "invalidMessage", "helpMessage", "label", "o", "optionItem", "oldItem", "option", "value", "visibleItems", "_changedProperties", "__decorateClass", "e", "t", "i", "n"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-ECSHF6ND.js";import"../../chunk-KWTSWXUL.js";import"../../chunk-VNGNBBSS.js";import"../../chunk-ENFFFE4I.js";import"../../chunk-WXJKPVRA.js";import"../../chunk-72IJCTLJ.js";import"../../chunk-23UFIOHV.js";import"../../chunk-HG7OBTQS.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
1
+ import{a}from"../../chunk-YFUMYW57.js";import"../../chunk-KWTSWXUL.js";import"../../chunk-VNGNBBSS.js";import"../../chunk-ENFFFE4I.js";import"../../chunk-WXJKPVRA.js";import"../../chunk-72IJCTLJ.js";import"../../chunk-23UFIOHV.js";import"../../chunk-HG7OBTQS.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
2
2
  //# sourceMappingURL=bl-select.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trendyol/baklava",
3
- "version": "2.0.0-beta.31",
3
+ "version": "2.0.0-beta.32",
4
4
  "description": "Trendyol Baklava Design System",
5
5
  "main": "dist/baklava.js",
6
6
  "module": "dist/baklava.js",
@@ -1,35 +0,0 @@
1
- import{b as u,c as f,e as m,f as _,g}from"./chunk-VNGNBBSS.js";import{a as b}from"./chunk-ENFFFE4I.js";import{a as h}from"./chunk-23UFIOHV.js";import{a as p,b as i,f as c,g as d,h as s,i as r,j as a,k as v}from"./chunk-HG7OBTQS.js";import{a as l}from"./chunk-NZ3RGSR6.js";var z=p`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--background-color:#fff;--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--z-index:1;--menu-height:250px}: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)}.placeholder{color:var(--placeholder-color)}:host([disabled]) .placeholder{--placeholder-color:var(--bl-color-content-passive)}.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-hover);--label-color:var(--bl-color-danger)}.select-input{display:flex;align-items:center;justify-content:space-between;cursor:pointer;outline:0;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 var(--padding-horizontal);border-radius:var(--bl-border-radius-s);color:var(--text-color);user-select:none}.remove-all{display:none}.remove-all::after{content:'';position:absolute;left:1.5rem;bottom:4px;height:1rem;border-left:1px solid var(--bl-color-border)}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-secondary)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-content-passive)}.select-open .select-input{border:solid 1px var(--border-focus-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;margin:0;list-style:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selected-options li{display:inline;font-size:var(--font-size);color:var(--text-color)}.selected-options li:not(:last-child)::after{content:', '}:host([disabled]) .selected-options li{color:var(--bl-color-content-passive)}.select-input .actions{display:flex;align-items:center;justify-content:center;gap:var(--bl-size-2xs);margin-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:fixed;border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--z-index);width:100%;top:var(--top);left:var(--left)}.select-open .popover{display:flex;border:solid 1px var(--border-focus-color)}bl-icon{color:var(--icon-color)}label{position:absolute;display:flex;align-items:center;top:var(--padding-vertical);left:var(--padding-horizontal);transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-form-label);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial}:host([label-fixed]) .select-wrapper{padding-top:var(--bl-size-m)}:host([label-fixed]) label{top:0;left:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-form-label);color:var(--label-color);padding:0}.help-text,.invalid-text{margin:var(--bl-size-3xs) 0 0 var(--bl-size-2xs);font:var(--bl-font-title-4-regular);padding:var(--bl-size-3xs) var(--bl-input-padding-horizontal)}.help-text{color:var(--bl-color-content-secondary)}.invalid-text{color:var(--bl-color-danger)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}`,x=z;var o=class extends c{constructor(){super(...arguments);this.size="medium";this.required=!1;this.disabled=!1;this.multiple=!1;this.labelFixed=!1;this._isPopoverOpen=!1;this._selectedOptions=[];this._additionalSelectedOptionCount=0;this._isInvalid=!1;this._connectedOptions=[];this._cleanUpPopover=null;this._clickOutsideHandler=e=>{let t=e.target;!this.contains(t)&&this._isPopoverOpen&&(this.close(),this._checkRequired())}}static get styles(){return[x]}get options(){return this._connectedOptions}get isPopoverOpen(){return this._isPopoverOpen}get selectedOptions(){return this._selectedOptions}get additionalSelectedOptionCount(){return this._additionalSelectedOptionCount}get isInvalid(){return this._isInvalid}open(){this._isPopoverOpen=!0,this._setupPopover()}close(){this._isPopoverOpen=!1,this._cleanUpPopover&&this._cleanUpPopover()}_setupPopover(){this._cleanUpPopover=_(this._selectInput,this._popover,()=>{g(this._selectInput,this._popover,{placement:"bottom",strategy:"fixed",middleware:[u(),f(8),m({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(){super.connectedCallback(),document.addEventListener("click",this._clickOutsideHandler)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._clickOutsideHandler),this._cleanUpPopover&&this._cleanUpPopover()}inputTemplate(){let e=i`<ul class="selected-options">
2
- ${this._selectedOptions.map(y=>i`<li>${y.text}</li>`)}
3
- </ul>`,t=this._additionalSelectedOptionCount?i`<span>+${this._additionalSelectedOptionCount}</span>`:null,n=i`<bl-button
4
- class="remove-all"
5
- variant="secondary"
6
- size="small"
7
- kind="text"
8
- icon="close"
9
- @click=${this._onClickRemove}></bl-button>`,O=this._showPlaceHolder?i`<span class="placeholder">${this.placeholder}</span>`:"";return i`<div
10
- class="select-input"
11
- ?disabled=${this.disabled}
12
- @click=${this._onClickSelectInput}
13
- >
14
- ${O} ${e} ${t}
15
- <div class="actions">
16
- ${n}
17
- <bl-icon
18
- class="dropdown-icon open"
19
- name="arrow_up"
20
- ></bl-icon>
21
-
22
- <bl-icon
23
- class="dropdown-icon closed"
24
- name="arrow_down"
25
- ></bl-icon>
26
- </div>
27
- </div>`}menuTemplate(){return i`<div class="popover" @bl-select-option=${this._handleSelectOptionEvent}>
28
- <slot></slot>
29
- </div>`}render(){let e=this._isInvalid&&this.customInvalidText?i`<p class="invalid-text">${this.customInvalidText}</p>`:"",t=this.helpText&&!e?i`<p class="help-text">${this.helpText}</p>`:"",n=this.label?i`<label>${this.label}</label>`:"";return i`<div
30
- class=${b({"select-wrapper":!0,"select-open":this._isPopoverOpen,selected:this._selectedOptions.length>0,invalid:this._isInvalid})}
31
- tabindex="-1"
32
- >
33
- ${n} ${this.inputTemplate()} ${this.menuTemplate()} ${t} ${e}
34
- </div> `}get _showPlaceHolder(){return this.label&&!this.labelFixed?!this._selectedOptions.length&&this._isPopoverOpen:!this._selectedOptions.length}_onClickSelectInput(){this._isPopoverOpen?this.close():this.open()}_handleSelectEvent(){this._onBlSelect(this._selectedOptions)}_handleSingleSelect(e){let t=this._connectedOptions.find(n=>n.selected);t&&(t.selected=!1),this._selectedOptions=[e],this._handleSelectEvent(),this._isPopoverOpen=!1}_handleMultipleSelect(e){let{value:t}=e;e.selected?this._selectedOptions=[...this._selectedOptions,e]:this._selectedOptions=this._selectedOptions.filter(n=>n.value!==t),this._handleSelectEvent()}_handleSelectOptionEvent(e){let t=e.detail;this.multiple?this._handleMultipleSelect(t):this._handleSingleSelect(t)}_onClickRemove(e){e.stopPropagation(),this._connectedOptions.filter(t=>t.selected).forEach(t=>{t.selected=!1}),this._selectedOptions=[],this._handleSelectEvent()}_checkAdditionalItemCount(){if(!this.multiple)return;let e=0;for(let t of this._selectedOptionsItems)if(t.offsetLeft<this._selectedOptionsContainer.offsetWidth)e++;else break;this._additionalSelectedOptionCount=this._selectedOptionsItems.length-e}_checkRequired(){this.required&&(this._isInvalid=this._selectedOptions.length===0)}updated(e){e.has("_selectedOptions")&&e.get("_selectedOptions")instanceof Array?(this._checkRequired(),this._checkAdditionalItemCount()):e.has("multiple")&&typeof e.get("multiple")=="boolean"&&(this._connectedOptions.forEach(t=>{t.multiple=this.multiple,t.selected=!1}),this._selectedOptions=[])}registerOption(e){if(this._connectedOptions.push(e),e.selected){let t={value:e.value,text:e.textContent,selected:e.selected};this.multiple?this._selectedOptions=[...this._selectedOptions,t]:this._selectedOptions=[t],this.requestUpdate()}}unregisterOption(e){this._connectedOptions.splice(this._connectedOptions.indexOf(e),1),this._selectedOptions=this._selectedOptions.filter(t=>t.value!==e.value)}};l([s({})],o.prototype,"label",2),l([s({})],o.prototype,"placeholder",2),l([s({type:String,reflect:!0})],o.prototype,"size",2),l([s({type:Boolean})],o.prototype,"required",2),l([s({type:Boolean})],o.prototype,"disabled",2),l([s({type:Boolean})],o.prototype,"multiple",2),l([s({type:Boolean,attribute:"label-fixed"})],o.prototype,"labelFixed",2),l([s({type:String,attribute:"help-text"})],o.prototype,"helpText",2),l([s({type:String,attribute:"invalid-text"})],o.prototype,"customInvalidText",2),l([r()],o.prototype,"_isPopoverOpen",2),l([r()],o.prototype,"_selectedOptions",2),l([r()],o.prototype,"_additionalSelectedOptionCount",2),l([r()],o.prototype,"_isInvalid",2),l([a(".selected-options")],o.prototype,"_selectedOptionsContainer",2),l([v(".selected-options li")],o.prototype,"_selectedOptionsItems",2),l([a(".popover")],o.prototype,"_popover",2),l([a(".select-input")],o.prototype,"_selectInput",2),l([h("bl-select")],o.prototype,"_onBlSelect",2),o=l([d("bl-select")],o);export{o as a};
35
- //# sourceMappingURL=chunk-ECSHF6ND.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/components/select/bl-select.css", "../src/components/select/bl-select.ts"],
4
- "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--background-color:#fff;--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--z-index:1;--menu-height:250px}: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)}.placeholder{color:var(--placeholder-color)}:host([disabled]) .placeholder{--placeholder-color:var(--bl-color-content-passive)}.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-hover);--label-color:var(--bl-color-danger)}.select-input{display:flex;align-items:center;justify-content:space-between;cursor:pointer;outline:0;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 var(--padding-horizontal);border-radius:var(--bl-border-radius-s);color:var(--text-color);user-select:none}.remove-all{display:none}.remove-all::after{content:'';position:absolute;left:1.5rem;bottom:4px;height:1rem;border-left:1px solid var(--bl-color-border)}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-secondary)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-content-passive)}.select-open .select-input{border:solid 1px var(--border-focus-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{padding:0;margin:0;list-style:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selected-options li{display:inline;font-size:var(--font-size);color:var(--text-color)}.selected-options li:not(:last-child)::after{content:', '}:host([disabled]) .selected-options li{color:var(--bl-color-content-passive)}.select-input .actions{display:flex;align-items:center;justify-content:center;gap:var(--bl-size-2xs);margin-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:fixed;border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--z-index);width:100%;top:var(--top);left:var(--left)}.select-open .popover{display:flex;border:solid 1px var(--border-focus-color)}bl-icon{color:var(--icon-color)}label{position:absolute;display:flex;align-items:center;top:var(--padding-vertical);left:var(--padding-horizontal);transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-form-label);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial}:host([label-fixed]) .select-wrapper{padding-top:var(--bl-size-m)}:host([label-fixed]) label{top:0;left:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-form-label);color:var(--label-color);padding:0}.help-text,.invalid-text{margin:var(--bl-size-3xs) 0 0 var(--bl-size-2xs);font:var(--bl-font-title-4-regular);padding:var(--bl-size-3xs) var(--bl-input-padding-horizontal)}.help-text{color:var(--bl-color-content-secondary)}.invalid-text{color:var(--bl-color-danger)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}`;\nexport default styles;\n", "import { LitElement, html, CSSResultGroup, PropertyValues } from 'lit';\nimport { customElement, property, state, query, queryAll } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { computePosition, flip, MiddlewareArguments, offset, size, autoUpdate } from '@floating-ui/dom';\nimport style from '../select/bl-select.css';\nimport '../icon/bl-icon';\nimport '../select/option/bl-select-option';\nimport type BlSelectOption from './option/bl-select-option';\nimport { event, EventDispatcher } from '../../utilities/event';\n\nexport interface ISelectOption {\n value: string;\n text: string;\n selected: boolean;\n}\n\nexport type SelectSize = 'medium' | 'large' | 'small';\n\nexport type CleanUpFunction = () => void;\n\n@customElement('bl-select')\nexport default class BlSelect extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /* Declare reactive properties */\n /**\n * Sets the label value\n */\n @property({})\n label?: string;\n\n /**\n * Sets the placeholder value. If left blank, the label value (if specified) is set as placeholder.\n */\n @property({})\n placeholder?: string;\n\n /**\n * Sets the size value. Select component's height value will be changed accordingly\n */\n @property({ type: String, reflect: true })\n size: SelectSize = 'medium';\n\n /**\n * When option is not selected, shows component in error state\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Shows the component in disabled state.\n */\n @property({ type: Boolean })\n disabled = false;\n\n /**\n * Allows multiple options to be selected\n */\n @property({ type: Boolean })\n multiple = false;\n\n /**\n * Makes label as fixed positioned\n */\n @property({ type: Boolean, attribute: 'label-fixed' })\n labelFixed = false;\n\n /**\n * Adds help text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText?: string;\n\n /**\n * Set custom error message\n */\n @property({ type: String, attribute: 'invalid-text' })\n customInvalidText?: string;\n\n /* Declare internal reactive properties */\n @state()\n private _isPopoverOpen = false;\n\n @state()\n private _selectedOptions: ISelectOption[] = [];\n\n @state()\n private _additionalSelectedOptionCount = 0;\n\n @state()\n private _isInvalid = false;\n\n @query('.selected-options')\n private _selectedOptionsContainer!: HTMLElement;\n\n @queryAll('.selected-options li')\n private _selectedOptionsItems!: Array<HTMLElement>;\n\n @query('.popover')\n private _popover: HTMLElement;\n\n @query('.select-input')\n private _selectInput: HTMLElement;\n\n @event('bl-select') private _onBlSelect: EventDispatcher<ISelectOption[]>;\n\n private _connectedOptions: BlSelectOption[] = [];\n\n private _cleanUpPopover: CleanUpFunction | null = null;\n\n get options() {\n return this._connectedOptions;\n }\n\n get isPopoverOpen() {\n return this._isPopoverOpen;\n }\n\n get selectedOptions() {\n return this._selectedOptions;\n }\n\n get additionalSelectedOptionCount() {\n return this._additionalSelectedOptionCount;\n }\n\n get isInvalid() {\n return this._isInvalid;\n }\n\n open() {\n this._isPopoverOpen = true;\n this._setupPopover();\n }\n\n close() {\n this._isPopoverOpen = false;\n this._cleanUpPopover && this._cleanUpPopover();\n }\n\n private _clickOutsideHandler = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n\n if (!this.contains(target) && this._isPopoverOpen) {\n this.close();\n this._checkRequired();\n }\n };\n\n private _setupPopover() {\n this._cleanUpPopover = autoUpdate(this._selectInput, this._popover, () => {\n computePosition(this._selectInput, this._popover, {\n placement: 'bottom',\n strategy: 'fixed',\n middleware: [\n flip(),\n offset(8),\n size({\n apply(args: MiddlewareArguments) {\n Object.assign(args.elements.floating.style, {\n width: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n },\n }),\n ],\n }).then(({ x, y }) => {\n this._popover.style.setProperty('--left', `${x}px`);\n this._popover.style.setProperty('--top', `${y}px`);\n });\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n document.addEventListener('click', this._clickOutsideHandler);\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n\n document.removeEventListener('click', this._clickOutsideHandler);\n this._cleanUpPopover && this._cleanUpPopover();\n }\n\n private inputTemplate() {\n const inputSelectedOptions = html`<ul class=\"selected-options\">\n ${this._selectedOptions.map(item => html`<li>${item.text}</li>`)}\n </ul>`;\n const _selectedItemCount = this._additionalSelectedOptionCount\n ? html`<span>+${this._additionalSelectedOptionCount}</span>`\n : null;\n const removeButton = html`<bl-button\n class=\"remove-all\"\n variant=\"secondary\"\n size=\"small\"\n kind=\"text\"\n icon=\"close\"\n @click=${this._onClickRemove}></bl-button>`;\n const placeholder = this._showPlaceHolder\n ? html`<span class=\"placeholder\">${this.placeholder}</span>`\n : '';\n\n return html`<div\n class=\"select-input\"\n ?disabled=${this.disabled}\n @click=${this._onClickSelectInput}\n >\n ${placeholder} ${inputSelectedOptions} ${_selectedItemCount}\n <div class=\"actions\">\n ${removeButton}\n <bl-icon\n class=\"dropdown-icon open\"\n name=\"arrow_up\"\n ></bl-icon>\n\n <bl-icon\n class=\"dropdown-icon closed\"\n name=\"arrow_down\"\n ></bl-icon>\n </div>\n </div>`;\n }\n\n private menuTemplate() {\n return html`<div class=\"popover\" @bl-select-option=${this._handleSelectOptionEvent}>\n <slot></slot>\n </div>`;\n }\n\n render() {\n const invalidMessage = this._isInvalid && this.customInvalidText\n ? html`<p class=\"invalid-text\">${this.customInvalidText}</p>` : ``;\n const helpMessage = this.helpText && !invalidMessage\n ? html`<p class=\"help-text\">${this.helpText}</p>` : ``;\n const label = this.label\n ? html`<label>${this.label}</label>` : '';\n\n return html`<div\n class=${classMap({\n 'select-wrapper': true,\n 'select-open': this._isPopoverOpen,\n 'selected': this._selectedOptions.length > 0,\n 'invalid': this._isInvalid,\n })}\n tabindex=\"-1\"\n >\n ${label} ${this.inputTemplate()} ${this.menuTemplate()} ${helpMessage} ${invalidMessage}\n </div> `;\n }\n\n private get _showPlaceHolder() {\n if (this.label && !this.labelFixed) {\n return !this._selectedOptions.length && this._isPopoverOpen;\n }\n return !this._selectedOptions.length;\n }\n\n private _onClickSelectInput() {\n this._isPopoverOpen ? this.close() : this.open();\n }\n\n private _handleSelectEvent() {\n this._onBlSelect(this._selectedOptions);\n }\n\n private _handleSingleSelect(optionItem: ISelectOption) {\n const oldItem = this._connectedOptions.find(option => option.selected);\n\n if (oldItem) {\n oldItem.selected = false;\n }\n\n this._selectedOptions = [optionItem];\n this._handleSelectEvent();\n this._isPopoverOpen = false;\n }\n\n private _handleMultipleSelect(optionItem: ISelectOption) {\n const { value } = optionItem;\n\n if (!optionItem.selected) {\n this._selectedOptions = this._selectedOptions.filter(item => item.value !== value);\n } else {\n this._selectedOptions = [...this._selectedOptions, optionItem];\n }\n\n this._handleSelectEvent();\n }\n\n private _handleSelectOptionEvent(e: CustomEvent) {\n const optionItem = e.detail as ISelectOption;\n\n if (this.multiple) {\n this._handleMultipleSelect(optionItem);\n } else {\n this._handleSingleSelect(optionItem);\n }\n }\n\n private _onClickRemove(e: MouseEvent) {\n e.stopPropagation();\n\n this._connectedOptions\n .filter(option => option.selected)\n .forEach(option => {\n option.selected = false;\n });\n\n this._selectedOptions = [];\n this._handleSelectEvent();\n }\n\n private _checkAdditionalItemCount() {\n if (!this.multiple) return;\n\n let visibleItems = 0;\n for(const value of this._selectedOptionsItems) {\n if (value.offsetLeft < this._selectedOptionsContainer.offsetWidth) {\n visibleItems++;\n } else {\n break;\n }\n }\n\n this._additionalSelectedOptionCount = this._selectedOptionsItems.length - visibleItems;\n }\n\n private _checkRequired() {\n if (this.required) {\n this._isInvalid = this._selectedOptions.length === 0;\n }\n }\n\n protected updated(_changedProperties: PropertyValues) {\n if (\n _changedProperties.has('_selectedOptions') &&\n _changedProperties.get('_selectedOptions') instanceof Array\n ) {\n this._checkRequired();\n this._checkAdditionalItemCount();\n } else if (\n _changedProperties.has('multiple') &&\n typeof _changedProperties.get('multiple') === 'boolean'\n ) {\n this._connectedOptions.forEach(option => {\n option.multiple = this.multiple;\n option.selected = false;\n });\n this._selectedOptions = [];\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) {\n this._connectedOptions.push(option);\n\n if (option.selected) {\n const optionItem = {\n value: option.value,\n text: option.textContent,\n selected: option.selected,\n } as ISelectOption;\n\n if (this.multiple) {\n this._selectedOptions = [...this._selectedOptions, optionItem];\n } else {\n this._selectedOptions = [optionItem];\n }\n\n this.requestUpdate();\n }\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) {\n this._connectedOptions.splice(this._connectedOptions.indexOf(option), 1);\n this._selectedOptions = this._selectedOptions.filter(item => item.value !== option.value);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-select': BlSelect;\n }\n}\n"],
5
- "mappings": "gRACO,IAAMA,EAASC,o2IACfC,EAAQF,ECmBf,IAAqBG,EAArB,cAAsCC,CAAW,CAAjD,kCAsBE,UAAmB,SAMnB,cAAW,GAMX,cAAW,GAMX,cAAW,GAMX,gBAAa,GAgBb,KAAQ,eAAiB,GAGzB,KAAQ,iBAAoC,CAAC,EAG7C,KAAQ,+BAAiC,EAGzC,KAAQ,WAAa,GAgBrB,KAAQ,kBAAsC,CAAC,EAE/C,KAAQ,gBAA0C,KAgClD,KAAQ,qBAAwBC,GAAsB,CACpD,IAAMC,EAASD,EAAM,OAEjB,CAAC,KAAK,SAASC,CAAM,GAAK,KAAK,iBACjC,KAAK,MAAM,EACX,KAAK,eAAe,EAExB,EA/HA,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAwFA,IAAI,SAAU,CACZ,OAAO,KAAK,iBACd,CAEA,IAAI,eAAgB,CAClB,OAAO,KAAK,cACd,CAEA,IAAI,iBAAkB,CACpB,OAAO,KAAK,gBACd,CAEA,IAAI,+BAAgC,CAClC,OAAO,KAAK,8BACd,CAEA,IAAI,WAAY,CACd,OAAO,KAAK,UACd,CAEA,MAAO,CACL,KAAK,eAAiB,GACtB,KAAK,cAAc,CACrB,CAEA,OAAQ,CACN,KAAK,eAAiB,GACtB,KAAK,iBAAmB,KAAK,gBAAgB,CAC/C,CAWQ,eAAgB,CACtB,KAAK,gBAAkBC,EAAW,KAAK,aAAc,KAAK,SAAU,IAAM,CACxEC,EAAgB,KAAK,aAAc,KAAK,SAAU,CAChD,UAAW,SACX,SA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AAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GArBtB9B,EAsBnB,oBAMA6B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,CAAC,GA3BR9B,EA4BnB,wBAMA6B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,CAAC,GAjCR9B,EAkCnB,wBAMA6B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,CAAC,GAvCR9B,EAwCnB,wBAMA6B,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,UAAW,aAAc,CAAC,GA7ClC9B,EA8CnB,0BAMA6B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,GAnD/B9B,EAoDnB,wBAMA6B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,GAzDlC9B,EA0DnB,iCAIQ6B,EAAA,CADPE,EAAM,GA7DY/B,EA8DX,8BAGA6B,EAAA,CADPE,EAAM,GAhEY/B,EAiEX,gCAGA6B,EAAA,CADPE,EAAM,GAnEY/B,EAoEX,8CAGA6B,EAAA,CADPE,EAAM,GAtEY/B,EAuEX,0BAGA6B,EAAA,CADPG,EAAM,mBAAmB,GAzEPhC,EA0EX,yCAGA6B,EAAA,CADPC,EAAS,sBAAsB,GA5Eb9B,EA6EX,qCAGA6B,EAAA,CADPG,EAAM,UAAU,GA/EEhC,EAgFX,wBAGA6B,EAAA,CADPG,EAAM,eAAe,GAlFHhC,EAmFX,4BAEoB6B,EAAA,CAA3B3B,EAAM,WAAW,GArFCF,EAqFS,2BArFTA,EAArB6B,EAAA,CADCI,EAAc,WAAW,GACLjC",
6
- "names": ["styles", "r", "bl_select_default", "BlSelect", "s", "event", "target", "bl_select_default", "N", "z", "b", "T", "k", "args", "x", "y", "inputSelectedOptions", "$", "item", "_selectedItemCount", "removeButton", "placeholder", "invalidMessage", "helpMessage", "label", "o", "optionItem", "oldItem", "option", "value", "visibleItems", "_changedProperties", "__decorateClass", "e", "t", "i", "n"]
7
- }