@trendyol/baklava 2.0.0-beta.62 → 2.0.0-beta.64
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 +7 -1
- package/dist/baklava.js +1 -1
- package/dist/chunk-4O2YCQGA.js +29 -0
- package/dist/chunk-4O2YCQGA.js.map +7 -0
- package/dist/chunk-PQ3WCOT4.js +26 -0
- package/dist/chunk-PQ3WCOT4.js.map +7 -0
- package/dist/{chunk-6BJAHDFH.js → chunk-Q7EIOEDW.js} +3 -3
- package/dist/chunk-Q7EIOEDW.js.map +7 -0
- package/dist/chunk-YMAZFWEK.js +7 -0
- package/dist/{chunk-WXJKPVRA.js.map → chunk-YMAZFWEK.js.map} +2 -2
- package/dist/components/alert/bl-alert.js +1 -1
- package/dist/components/badge/bl-badge.js +1 -1
- package/dist/components/button/bl-button.js +1 -1
- package/dist/components/checkbox-group/bl-checkbox-group.js +1 -1
- package/dist/components/checkbox-group/checkbox/bl-checkbox.js +1 -1
- package/dist/components/dialog/bl-dialog.js +1 -1
- package/dist/components/drawer/bl-drawer.d.ts +2 -2
- package/dist/components/drawer/bl-drawer.d.ts.map +1 -1
- package/dist/components/drawer/bl-drawer.js +1 -1
- package/dist/components/dropdown/bl-dropdown.js +1 -1
- package/dist/components/dropdown/item/bl-dropdown-item.js +1 -1
- package/dist/components/icon/bl-icon.js +1 -1
- package/dist/components/input/bl-input.d.ts.map +1 -1
- package/dist/components/input/bl-input.js +1 -1
- package/dist/components/pagination/bl-pagination.js +1 -1
- package/dist/components/select/bl-select.js +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/default.css.map +2 -2
- package/package.json +2 -3
- package/dist/chunk-6BJAHDFH.js.map +0 -7
- package/dist/chunk-K7XUIYGD.js +0 -25
- package/dist/chunk-K7XUIYGD.js.map +0 -7
- package/dist/chunk-WIJU4SW3.js +0 -28
- package/dist/chunk-WIJU4SW3.js.map +0 -7
- package/dist/chunk-WXJKPVRA.js +0 -7
package/README.md
CHANGED
|
@@ -26,4 +26,10 @@ This way library will be served from a very high performant CDN and all of the B
|
|
|
26
26
|
> **⚠️ Because the scripts of the custom components are loaded into the DOM later, the baklava components may appear unstyled on the screen for a while. In order to avoid this 'FOUCE' effect, you can follow the instructions at this
|
|
27
27
|
[link](https://www.abeautifulsite.net/posts/flash-of-undefined-custom-elements/).**
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
## Useful Links
|
|
30
|
+
|
|
31
|
+
* [Storybook Documentation](https://trendyol.github.io/baklava/)
|
|
32
|
+
* [Figma Design Document](https://www.figma.com/file/RrcLH0mWpIUy4vwuTlDeKN/Baklava-Design-Guide)
|
|
33
|
+
* [Project Board](https://github.com/orgs/Trendyol/projects/4)
|
|
34
|
+
* [Discussion Board](https://github.com/Trendyol/baklava/discussions)
|
|
35
|
+
* [Mobile (React-Native) Implementation](https://github.com/Trendyol/baklava-react-native)
|
package/dist/baklava.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as G}from"./chunk-K7ADOVTV.js";import{a as g}from"./chunk-SIGNZ5EB.js";import{a as I}from"./chunk-PL6NHIFG.js";import{a as b}from"./chunk-IDG5M2QP.js";import{a as h}from"./chunk-RQQTHSVK.js";import{b as D,d as P}from"./chunk-M623DR5J.js";import{b as w}from"./chunk-LPQ6QJUJ.js";import{a as B}from"./chunk-JHOV25H6.js";import{a as s}from"./chunk-
|
|
1
|
+
import{b as G}from"./chunk-K7ADOVTV.js";import{a as g}from"./chunk-SIGNZ5EB.js";import{a as I}from"./chunk-PL6NHIFG.js";import{a as b}from"./chunk-IDG5M2QP.js";import{a as h}from"./chunk-RQQTHSVK.js";import{b as D,d as P}from"./chunk-M623DR5J.js";import{b as w}from"./chunk-LPQ6QJUJ.js";import{a as B}from"./chunk-JHOV25H6.js";import{a as s}from"./chunk-4O2YCQGA.js";import{a as n}from"./chunk-A25HQAVJ.js";import{c,f as i}from"./chunk-WFBCOT52.js";import{a as m}from"./chunk-Q7EIOEDW.js";import{a as x}from"./chunk-KWTSWXUL.js";import"./chunk-KWAF5LTC.js";import{a as r}from"./chunk-YJS4QEL4.js";import{a}from"./chunk-54XXQVFL.js";import{b as f,e as p}from"./chunk-6SKD6QNV.js";import"./chunk-KQBKSEYJ.js";import"./chunk-5VLVLBWY.js";import{a as d}from"./chunk-H37QVPNF.js";import{a as u}from"./chunk-PQ3WCOT4.js";import{a as l}from"./chunk-EADA5CG6.js";import"./chunk-ENFFFE4I.js";import"./chunk-2TVOKUHE.js";import{a as o,b as t,c as e}from"./chunk-YMAZFWEK.js";import"./chunk-72IJCTLJ.js";import"./chunk-23UFIOHV.js";import"./chunk-HG7OBTQS.js";import"./chunk-NZ3RGSR6.js";export{r as BlAlert,a as BlBadge,l as BlButton,f as BlCheckbox,p as BlCheckboxGroup,d as BlDialog,u as BlDrawer,P as BlDropdown,w as BlDropdownGroup,D as BlDropdownItem,e as BlIcon,s as BlInput,B as BlPagination,n as BlProgressIndicator,c as BlRadio,i as BlRadioGroup,m as BlSelect,x as BlSelectOption,G as BlSwitch,I as BlTab,g as BlTabGroup,b as BlTabPanel,h as BlTooltip,t as getIconPath,o as setIconPath};
|
|
2
2
|
//# sourceMappingURL=baklava.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{a as m}from"./chunk-KQBKSEYJ.js";import{a as g}from"./chunk-5VLVLBWY.js";import{a as u}from"./chunk-ENFFFE4I.js";import{a}from"./chunk-2TVOKUHE.js";import{a as d}from"./chunk-23UFIOHV.js";import{a as c,b as s,f as p,g as h,h as i,i as v,j as b}from"./chunk-HG7OBTQS.js";import{a as t}from"./chunk-NZ3RGSR6.js";var y=o=>{if(o.reportValidity()){let l=new Event("submit",{cancelable:!0});o.dispatchEvent(l),l.defaultPrevented||o.submit()}else return};var k=["valueMissing","typeMismatch","tooLong","tooShort","rangeUnderflow","rangeOverflow","badInput","customError"],f=k.map(o=>({key:o,isValid(l){return l.validationTarget?!l.validationTarget.validity[o]:!0}}));var $=c`:host{display:inline-block;width:200px;position:relative}.wrapper{--border-color:var(--bl-color-border);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--height:var(--bl-size-2xl);--input-font:var(--bl-font-body-text-2);--line-height:var(--bl-font-body-text-2-line-height);--icon-size:var(--line-height);--padding-vertical:calc((var(--height) - var(--line-height)) / 2);--padding-horizontal:var(--bl-size-xs);display:flex;flex-direction:column;position:relative;gap:var(--bl-size-3xs)}.wrapper:focus-within{--border-color:var(--bl-color-primary);--icon-color:var(--bl-color-primary)}.wrapper.dirty.invalid{--border-color:var(--bl-color-danger);--icon-color:var(--bl-color-danger)}:host([size='large']) .wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size='small']) .wrapper{--height:var(--bl-size-xl);--input-font:var(--bl-font-body-text-3);--padding-vertical:var(--bl-size-3xs);--icon-size:var(--bl-font-body-text-3-line-height)}label{position:absolute;top:var(--padding-vertical);left:var(--padding-horizontal);right:var(--padding-horizontal);max-width:max-content;transition:all ease-in .2s;pointer-events:none;font:var(--input-font);color:var(--bl-color-content-tertiary);padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.input-wrapper{--border-size:1px;display:flex;box-sizing:border-box;gap:var(--padding-vertical);height:var(--height);border:solid var(--border-size) var(--border-color);padding:0 calc(var(--padding-horizontal) - var(--border-size));border-radius:4px}input{width:100%;align-self:stretch;outline:0;border:0;padding:0;font:var(--input-font);color:var(--text-color);-webkit-text-fill-color:var(--text-color);background-color:transparent}.icon{flex-basis:var(--icon-size);align-self:center;height:var(--icon-size)}.wrapper:not(.has-icon) .icon{display:none}.hint{display:none;font:var(--bl-font-body-text-3);padding:0 var(--padding-horizontal)}.hint p{padding:0;margin:0}bl-icon{font-size:var(--icon-size);color:var(--icon-color);height:var(--icon-size)}::placeholder{color:var(--bl-color-content-tertiary);-webkit-text-fill-color:var(--bl-color-content-tertiary)}:host([label]) ::placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:color ease-out .4s}:host([label-fixed]) ::placeholder,:host .wrapper:focus-within ::placeholder{color:var(--bl-color-content-tertiary);-webkit-text-fill-color:var(--bl-color-content-tertiary)}:host([disabled]) .input-wrapper{cursor:not-allowed;background-color:var(--bl-color-secondary-background);--text-color:var(--bl-color-content-passive)}input:disabled{cursor:not-allowed}:where(.wrapper:focus-within,.wrapper.has-value) label{--label-padding:var(--bl-size-3xs);top:0;left:calc(var(--padding-horizontal) - var(--label-padding));transform:translateY(-50%);font:var(--bl-font-caption);color:var(--bl-color-content-secondary);padding:0 var(--label-padding);background-color:var(--bl-color-primary-background);pointer-events:initial}:where(.has-icon:not(:focus-within),.has-icon:not(.has-value)) label{right:calc(var(--padding-horizontal) + var(--icon-size) + var(--padding-vertical))}:host([label-fixed]) label{position:static;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--bl-color-content-secondary);padding:0}.error-icon,.invalid-text{display:none}.dirty.invalid label,.invalid-text,.error-icon{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}:host([help-text]) .hint,.dirty.invalid .hint{display:block}.dirty.invalid .invalid-text{display:block}.dirty.invalid .help-text{display:none}.dirty.invalid .error-icon{display:inline-block}.dirty.invalid .custom-icon ~ .error-icon{display:none}`,x=$;var e=class extends g(p){constructor(){super(...arguments);this.type="text";this.value="";this.required=!1;this.size="medium";this.disabled=!1;this.labelFixed=!1;this.onKeydown=r=>{r.code==="Enter"&&this.form&&y(this.form)};this.onError=()=>{this.onInvalid(this.internals.validity)};this.dirty=!1}static get styles(){return[x]}connectedCallback(){var r;super.connectedCallback(),this.addEventListener("keydown",this.onKeydown),this.addEventListener("invalid",this.onError),(r=this.internals.form)==null||r.addEventListener("submit",()=>{this.reportValidity()})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.onKeydown),this.removeEventListener("invalid",this.onError)}validityCallback(){var r;return this.customInvalidText||((r=this.validationTarget)==null?void 0:r.validationMessage)}reportValidity(){return this.dirty=!0,this.checkValidity()}valueChangedCallback(r){this.value=r}inputHandler(r){let n=r.target.value;this.setValue(n),this.onInput(n)}changeHandler(r){let n=r.target.value;this.dirty=!0,this.setValue(n),this.onChange(n)}firstUpdated(){this.setValue(this.value)}render(){let r=this.checkValidity()?"":s`<p id="errorMessage" aria-live="polite" class="invalid-text">${this.validationMessage}</p>`,n=this.helpText?s`<p id="helpText" class="help-text">${this.helpText}</p>`:"",w=this.icon?s`<bl-icon class="custom-icon" name="${this.icon}"></bl-icon>`:"",z=this.label?s`<label for="input">${this.label}</label>`:"",E={wrapper:!0,dirty:this.dirty,invalid:!this.checkValidity(),"has-icon":this.icon||this.dirty&&!this.checkValidity(),"has-value":this.value!==null&&this.value!==""};return s`<div class=${u(E)}>
|
|
2
|
+
${z}
|
|
3
|
+
<div class="input-wrapper">
|
|
4
|
+
<input
|
|
5
|
+
id="input"
|
|
6
|
+
type=${this.type}
|
|
7
|
+
.value=${m(this.value)}
|
|
8
|
+
placeholder="${a(this.placeholder)}"
|
|
9
|
+
minlength="${a(this.minlength)}"
|
|
10
|
+
maxlength="${a(this.maxlength)}"
|
|
11
|
+
min="${a(this.min)}"
|
|
12
|
+
max="${a(this.max)}"
|
|
13
|
+
step="${a(this.step)}"
|
|
14
|
+
?required=${this.required}
|
|
15
|
+
?disabled=${this.disabled}
|
|
16
|
+
@change=${this.changeHandler}
|
|
17
|
+
@input=${this.inputHandler}
|
|
18
|
+
aria-invalid=${this.checkValidity()?"false":"true"}
|
|
19
|
+
aria-describedby=${a(this.helpText?"helpText":void 0)}
|
|
20
|
+
aria-errormessage=${a(this.checkValidity()?void 0:"errorMessage")}
|
|
21
|
+
/>
|
|
22
|
+
<div class="icon">${w}<bl-icon class="error-icon" name="alert"></bl-icon></div>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="hint">
|
|
25
|
+
${r}
|
|
26
|
+
${n}
|
|
27
|
+
</div>
|
|
28
|
+
</div>`}};e.formControlValidators=f,t([b("input")],e.prototype,"validationTarget",2),t([i({})],e.prototype,"type",2),t([i({reflect:!0})],e.prototype,"label",2),t([i({})],e.prototype,"placeholder",2),t([i()],e.prototype,"value",2),t([i({type:Boolean})],e.prototype,"required",2),t([i({type:Number})],e.prototype,"minlength",2),t([i({type:Number})],e.prototype,"maxlength",2),t([i({type:Number})],e.prototype,"min",2),t([i({type:Number})],e.prototype,"max",2),t([i({type:Number})],e.prototype,"step",2),t([i({type:String})],e.prototype,"icon",2),t([i({type:String,reflect:!0})],e.prototype,"size",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,attribute:"label-fixed",reflect:!0})],e.prototype,"labelFixed",2),t([i({type:String,attribute:"invalid-text"})],e.prototype,"customInvalidText",2),t([i({type:String,attribute:"help-text",reflect:!0})],e.prototype,"helpText",2),t([d("bl-change")],e.prototype,"onChange",2),t([d("bl-input")],e.prototype,"onInput",2),t([d("bl-invalid")],e.prototype,"onInvalid",2),t([v()],e.prototype,"dirty",2),e=t([h("bl-input")],e);export{e as a};
|
|
29
|
+
//# sourceMappingURL=chunk-4O2YCQGA.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../node_modules/@open-wc/form-helpers/src/index.ts", "../src/utilities/form-control.ts", "../src/components/input/bl-input.css", "../src/components/input/bl-input.ts"],
|
|
4
|
+
"sourcesContent": [null, "const validityStates: Array<keyof ValidityState> = [\n 'valueMissing',\n 'typeMismatch',\n 'tooLong',\n 'tooShort',\n 'rangeUnderflow',\n 'rangeOverflow',\n 'badInput',\n 'customError',\n];\n\nexport const innerInputValidators = validityStates.map(key => ({\n key,\n isValid(instance: HTMLElement & { validationTarget: HTMLInputElement }) {\n if (instance.validationTarget) {\n return !instance.validationTarget.validity[key];\n }\n return true;\n },\n}));\n", "import {css} from 'lit';\nexport const styles = css`:host{display:inline-block;width:200px;position:relative}.wrapper{--border-color:var(--bl-color-border);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--height:var(--bl-size-2xl);--input-font:var(--bl-font-body-text-2);--line-height:var(--bl-font-body-text-2-line-height);--icon-size:var(--line-height);--padding-vertical:calc((var(--height) - var(--line-height)) / 2);--padding-horizontal:var(--bl-size-xs);display:flex;flex-direction:column;position:relative;gap:var(--bl-size-3xs)}.wrapper:focus-within{--border-color:var(--bl-color-primary);--icon-color:var(--bl-color-primary)}.wrapper.dirty.invalid{--border-color:var(--bl-color-danger);--icon-color:var(--bl-color-danger)}:host([size='large']) .wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size='small']) .wrapper{--height:var(--bl-size-xl);--input-font:var(--bl-font-body-text-3);--padding-vertical:var(--bl-size-3xs);--icon-size:var(--bl-font-body-text-3-line-height)}label{position:absolute;top:var(--padding-vertical);left:var(--padding-horizontal);right:var(--padding-horizontal);max-width:max-content;transition:all ease-in .2s;pointer-events:none;font:var(--input-font);color:var(--bl-color-content-tertiary);padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.input-wrapper{--border-size:1px;display:flex;box-sizing:border-box;gap:var(--padding-vertical);height:var(--height);border:solid var(--border-size) var(--border-color);padding:0 calc(var(--padding-horizontal) - var(--border-size));border-radius:4px}input{width:100%;align-self:stretch;outline:0;border:0;padding:0;font:var(--input-font);color:var(--text-color);-webkit-text-fill-color:var(--text-color);background-color:transparent}.icon{flex-basis:var(--icon-size);align-self:center;height:var(--icon-size)}.wrapper:not(.has-icon) .icon{display:none}.hint{display:none;font:var(--bl-font-body-text-3);padding:0 var(--padding-horizontal)}.hint p{padding:0;margin:0}bl-icon{font-size:var(--icon-size);color:var(--icon-color);height:var(--icon-size)}::placeholder{color:var(--bl-color-content-tertiary);-webkit-text-fill-color:var(--bl-color-content-tertiary)}:host([label]) ::placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:color ease-out .4s}:host([label-fixed]) ::placeholder,:host .wrapper:focus-within ::placeholder{color:var(--bl-color-content-tertiary);-webkit-text-fill-color:var(--bl-color-content-tertiary)}:host([disabled]) .input-wrapper{cursor:not-allowed;background-color:var(--bl-color-secondary-background);--text-color:var(--bl-color-content-passive)}input:disabled{cursor:not-allowed}:where(.wrapper:focus-within,.wrapper.has-value) label{--label-padding:var(--bl-size-3xs);top:0;left:calc(var(--padding-horizontal) - var(--label-padding));transform:translateY(-50%);font:var(--bl-font-caption);color:var(--bl-color-content-secondary);padding:0 var(--label-padding);background-color:var(--bl-color-primary-background);pointer-events:initial}:where(.has-icon:not(:focus-within),.has-icon:not(.has-value)) label{right:calc(var(--padding-horizontal) + var(--icon-size) + var(--padding-vertical))}:host([label-fixed]) label{position:static;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--bl-color-content-secondary);padding:0}.error-icon,.invalid-text{display:none}.dirty.invalid label,.invalid-text,.error-icon{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}:host([help-text]) .hint,.dirty.invalid .hint{display:block}.dirty.invalid .invalid-text{display:block}.dirty.invalid .help-text{display:none}.dirty.invalid .error-icon{display:inline-block}.dirty.invalid .custom-icon ~ .error-icon{display:none}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { FormControlMixin } from '@open-wc/form-control';\nimport { submit } from '@open-wc/form-helpers';\nimport { live } from 'lit/directives/live.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport { innerInputValidators } from '../../utilities/form-control';\nimport 'element-internals-polyfill';\nimport '../icon/bl-icon';\n\nimport style from './bl-input.css';\n\nexport type InputSize = 'medium' | 'large';\n/**\n * @tag bl-input\n * @summary Baklava Input component\n */\n@customElement('bl-input')\nexport default class BlInput extends FormControlMixin(LitElement) {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n static formControlValidators = innerInputValidators;\n\n @query('input')\n validationTarget: HTMLInputElement;\n\n /**\n * Type of the input. It's used to set `type` attribute of native input inside. Only `text` and `number` is supported for now.\n */\n @property({})\n type: 'text' | 'number' = 'text';\n\n /**\n * Sets label of the input\n */\n @property({ reflect: true })\n label?: string;\n\n /**\n * Sets placeholder of the input\n */\n @property({})\n placeholder?: string;\n\n /**\n * Sets initial value of the input\n */\n @property()\n value = '';\n\n /**\n * Makes input a mandatory field\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Sets minimum length of the input\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * Sets maximum length of the input\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * Sets the smallest number can be entered to a `number` input\n */\n @property({ type: Number })\n min?: number;\n\n /**\n * Sets the biggest number can be entered to a `number` input\n */\n @property({ type: Number })\n max?: number;\n\n /**\n * Sets the increase and decrease step to a `number` input\n */\n @property({ type: Number })\n step?: number;\n\n /**\n * Sets the custom icon name. `bl-icon` component is used to show an icon\n */\n @property({ type: String })\n icon?: string;\n\n /**\n * Sets input size.\n */\n @property({ type: String, reflect: true })\n size?: InputSize = 'medium';\n\n /**\n * Disables the input\n */\n @property({ type: Boolean, reflect: true })\n disabled = 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 * Set custom error message\n */\n @property({ type: String, attribute: 'invalid-text' })\n customInvalidText?: string;\n\n /**\n * Adds help text\n */\n @property({ type: String, attribute: 'help-text', reflect: true })\n helpText?: string;\n\n /**\n * Fires when an alteration to the element's value is committed by the user. Unlike the input event, the change event is not necessarily fired for each alteration to an element's value.\n */\n @event('bl-change') private onChange: EventDispatcher<string>;\n\n /**\n * Fires when the value of an input element has been changed.\n */\n @event('bl-input') private onInput: EventDispatcher<string>;\n\n /**\n * Fires when the value of an input element has been changed.\n */\n @event('bl-invalid') private onInvalid: EventDispatcher<ValidityState>;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('keydown', this.onKeydown);\n this.addEventListener('invalid', this.onError);\n\n this.internals.form?.addEventListener('submit', () => {\n this.reportValidity();\n });\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('keydown', this.onKeydown);\n this.removeEventListener('invalid', this.onError);\n }\n\n private onKeydown = (event: KeyboardEvent): void => {\n if (event.code === 'Enter' && this.form) {\n submit(this.form);\n }\n }\n\n private onError = (): void => {\n this.onInvalid(this.internals.validity);\n }\n\n @state() private dirty = false;\n\n validityCallback(): string | void {\n return this.customInvalidText || this.validationTarget?.validationMessage;\n }\n\n reportValidity() {\n this.dirty = true;\n return this.checkValidity();\n }\n\n valueChangedCallback(value: string): void {\n this.value = value;\n }\n\n private inputHandler(event: Event) {\n const value = (event.target as HTMLInputElement).value;\n\n this.setValue(value);\n this.onInput(value);\n }\n\n private changeHandler(event: Event) {\n const value = (event.target as HTMLInputElement).value;\n\n this.dirty = true;\n this.setValue(value);\n this.onChange(value);\n }\n\n firstUpdated() {\n this.setValue(this.value);\n }\n\n render(): TemplateResult {\n const invalidMessage = !this.checkValidity()\n ? html`<p id=\"errorMessage\" aria-live=\"polite\" class=\"invalid-text\">${this.validationMessage}</p>`\n : ``;\n const helpMessage = this.helpText ? html`<p id=\"helpText\" class=\"help-text\">${this.helpText}</p>` : ``;\n\n const icon = this.icon\n ? html`<bl-icon class=\"custom-icon\" name=\"${this.icon}\"></bl-icon>`\n : '';\n const label = this.label ? html`<label for=\"input\">${this.label}</label>` : '';\n\n const classes = {\n wrapper: true,\n dirty: this.dirty,\n invalid: !this.checkValidity(),\n 'has-icon': this.icon || (this.dirty && !this.checkValidity()),\n 'has-value': this.value !== null && this.value !== '',\n };\n\n return html`<div class=${classMap(classes)}>\n ${label}\n <div class=\"input-wrapper\">\n <input\n id=\"input\"\n type=${this.type}\n .value=${live(this.value)}\n placeholder=\"${ifDefined(this.placeholder)}\"\n minlength=\"${ifDefined(this.minlength)}\"\n maxlength=\"${ifDefined(this.maxlength)}\"\n min=\"${ifDefined(this.min)}\"\n max=\"${ifDefined(this.max)}\"\n step=\"${ifDefined(this.step)}\"\n ?required=${this.required}\n ?disabled=${this.disabled}\n @change=${this.changeHandler}\n @input=${this.inputHandler}\n aria-invalid=${this.checkValidity() ? 'false' : 'true'}\n aria-describedby=${ifDefined(this.helpText ? \"helpText\" : undefined)}\n aria-errormessage=${ifDefined(this.checkValidity() ? undefined : \"errorMessage\")}\n />\n <div class=\"icon\">${icon}<bl-icon class=\"error-icon\" name=\"alert\"></bl-icon></div>\n </div>\n <div class=\"hint\">\n ${invalidMessage}\n ${helpMessage}\n </div>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-input': BlInput;\n }\n}\n"],
|
|
5
|
+
"mappings": "6TAOO,IAAMA,EAAUC,GAA+B,CACpD,GAAKA,EAAK,eAAc,EAEjB,CACL,IAAMC,EAAc,IAAI,MAAM,SAAU,CACtC,WAAY,GACb,EACDD,EAAK,cAAcC,CAAW,EACzBA,EAAY,kBACfD,EAAK,OAAM,MAPb,OAUJ,ECnBA,IAAME,EAA6C,CACjD,eACA,eACA,UACA,WACA,iBACA,gBACA,WACA,aACF,EAEaC,EAAuBD,EAAe,IAAIE,IAAQ,CAC7D,IAAAA,EACA,QAAQC,EAAgE,CACtE,OAAIA,EAAS,iBACJ,CAACA,EAAS,iBAAiB,SAASD,GAEtC,EACT,CACF,EAAE,EClBK,IAAME,EAASC,2sHACfC,EAAQF,ECkBf,IAAqBG,EAArB,cAAqCC,EAAiBC,CAAU,CAAE,CAAlE,kCAcE,UAA0B,OAkB1B,WAAQ,GAMR,cAAW,GA0CX,UAAmB,SAMnB,cAAW,GAMX,gBAAa,GA6Cb,KAAQ,UAAaC,GAA+B,CAC9CA,EAAM,OAAS,SAAW,KAAK,MACjCC,EAAO,KAAK,IAAI,CAEpB,EAEA,KAAQ,QAAU,IAAY,CAC5B,KAAK,UAAU,KAAK,UAAU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AS,CAAE,KAAM,MAAO,CAAC,GAvDPnB,EAwDnB,mBAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,MAAO,CAAC,GA7DPnB,EA8DnB,mBAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,MAAO,CAAC,GAnEPnB,EAoEnB,oBAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,MAAO,CAAC,GAzEPnB,EA0EnB,oBAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GA/EtBnB,EAgFnB,oBAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GArFvBnB,EAsFnB,wBAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,QAAS,UAAW,cAAe,QAAS,EAAK,CAAC,GA3FjDnB,EA4FnB,0BAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,GAjGlCnB,EAkGnB,iCAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,UAAW,YAAa,QAAS,EAAK,CAAC,GAvG9CnB,EAwGnB,wBAK4BiB,EAAA,CAA3Bd,EAAM,WAAW,GA7GCH,EA6GS,wBAKDiB,EAAA,CAA1Bd,EAAM,UAAU,GAlHEH,EAkHQ,uBAKEiB,EAAA,CAA5Bd,EAAM,YAAY,GAvHAH,EAuHU,yBA4BZiB,EAAA,CAAhBG,EAAM,GAnJYpB,EAmJF,qBAnJEA,EAArBiB,EAAA,CADCI,EAAc,UAAU,GACJrB",
|
|
6
|
+
"names": ["submit", "form", "submitEvent", "validityStates", "innerInputValidators", "key", "instance", "styles", "r", "bl_input_default", "BlInput", "FormControlMixin", "s", "event", "submit", "bl_input_default", "_a", "value", "invalidMessage", "$", "helpMessage", "icon", "label", "classes", "o", "l", "innerInputValidators", "__decorateClass", "i", "e", "t", "n"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{a}from"./chunk-23UFIOHV.js";import{a as o,b as r,f as s,g as l,h as n,i as d}from"./chunk-HG7OBTQS.js";import{a as t}from"./chunk-NZ3RGSR6.js";var m=o`@keyframes slide-from-right{0%{transform:translateX(100%)}100%{transform:translateX(0)}}.drawer{box-sizing:border-box;position:fixed;display:flex;top:0;right:0;bottom:0;width:424px;padding:var(--bl-size-xl);padding-top:max(env(safe-area-inset-top),var(--bl-size-xl));padding-right:max(env(safe-area-inset-right),var(--bl-size-xl));padding-bottom:max(env(safe-area-inset-bottom),var(--bl-size-xl));background:var(--bl-color-primary-background);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transform:translateX(100%);transition:transform var(--bl-drawer-animation-duration,.25s);z-index:999}:host([open]) .drawer{transform:translateX(0);animation:slide-from-right var(--bl-drawer-animation-duration,.25s)}iframe{height:100%;width:100%;border:0}.container{display:flex;flex-direction:column;gap:var(--bl-size-xl);flex:1}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);background-color:white}header .header-buttons{display:flex;gap:24px;margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);overflow:hidden;margin:0;padding:0}.content{flex:1;overflow-y:scroll}.iframe-content{flex:1}@media only screen and (max-width:424px){:host([open]) .drawer{width:calc(100vw - 24px)}}`,c=m;var e=class extends s{constructor(){super(...arguments);this.open=!1;this.domExistence=!1}static get styles(){return[c]}connectedCallback(){super.connectedCallback(),window==null||window.addEventListener("bl-drawer-open",i=>{i.target!==this&&this.closeDrawer()})}updated(i){i.has("open")&&this.toggleDialogHandler()}toggleDialogHandler(){this.open?(this.domExistenceSchedule&&clearTimeout(this.domExistenceSchedule),this.domExistence=!0,this.onOpen("")):(this.domExistenceSchedule=window.setTimeout(()=>{this.domExistence=!1},1e3),this.onClose(""))}closeDrawer(){this.open=!1}renderContent(){let i=this.embedUrl?r`<iframe src=${this.embedUrl}></iframe>`:r`<slot></slot>`;return r`<section class=${this.embedUrl?"iframe-content":"content"}>
|
|
2
|
+
${i}
|
|
3
|
+
</section>`}renderContainer(){let i=this.caption?r`<h2 id="drawer-caption">${this.caption}</h2>`:"",p=this.externalLink?r`<bl-button
|
|
4
|
+
icon="external_link"
|
|
5
|
+
variant="tertiary"
|
|
6
|
+
kind="neutral"
|
|
7
|
+
size="small"
|
|
8
|
+
href="${this.externalLink}"
|
|
9
|
+
target="_blank"
|
|
10
|
+
></bl-button>`:"";return r`<div class="container">
|
|
11
|
+
<header>
|
|
12
|
+
${i}
|
|
13
|
+
<div class="header-buttons">
|
|
14
|
+
${p}
|
|
15
|
+
<bl-button
|
|
16
|
+
@click="${this.closeDrawer}"
|
|
17
|
+
icon="close"
|
|
18
|
+
size="small"
|
|
19
|
+
variant="tertiary"
|
|
20
|
+
kind="neutral"
|
|
21
|
+
></bl-button>
|
|
22
|
+
</div>
|
|
23
|
+
</header>
|
|
24
|
+
${this.renderContent()}
|
|
25
|
+
</div>`}render(){return this.domExistence?r`<div class="drawer">${this.renderContainer()}</div>`:r``}};t([n({type:Boolean,reflect:!0})],e.prototype,"open",2),t([n({type:String})],e.prototype,"caption",2),t([n({type:String,attribute:"embed-url"})],e.prototype,"embedUrl",2),t([n({type:String,attribute:"external-link"})],e.prototype,"externalLink",2),t([a("bl-drawer-open")],e.prototype,"onOpen",2),t([a("bl-drawer-close")],e.prototype,"onClose",2),t([d()],e.prototype,"domExistence",2),e=t([l("bl-drawer")],e);export{e as a};
|
|
26
|
+
//# sourceMappingURL=chunk-PQ3WCOT4.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/drawer/bl-drawer.css", "../src/components/drawer/bl-drawer.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`@keyframes slide-from-right{0%{transform:translateX(100%)}100%{transform:translateX(0)}}.drawer{box-sizing:border-box;position:fixed;display:flex;top:0;right:0;bottom:0;width:424px;padding:var(--bl-size-xl);padding-top:max(env(safe-area-inset-top),var(--bl-size-xl));padding-right:max(env(safe-area-inset-right),var(--bl-size-xl));padding-bottom:max(env(safe-area-inset-bottom),var(--bl-size-xl));background:var(--bl-color-primary-background);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transform:translateX(100%);transition:transform var(--bl-drawer-animation-duration,.25s);z-index:999}:host([open]) .drawer{transform:translateX(0);animation:slide-from-right var(--bl-drawer-animation-duration,.25s)}iframe{height:100%;width:100%;border:0}.container{display:flex;flex-direction:column;gap:var(--bl-size-xl);flex:1}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);background-color:white}header .header-buttons{display:flex;gap:24px;margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);overflow:hidden;margin:0;padding:0}.content{flex:1;overflow-y:scroll}.iframe-content{flex:1}@media only screen and (max-width:424px){:host([open]) .drawer{width:calc(100vw - 24px)}}`;\nexport default styles;\n", "import { customElement, property, state } from 'lit/decorators.js';\nimport { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../button/bl-button';\nimport style from './bl-drawer.css';\nimport { PropertyValues } from 'lit';\n\n/**\n * @tag bl-drawer\n * @summary Baklava Drawer component\n *\n */\n\n@customElement('bl-drawer')\nexport default class BlDrawer extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets drawer open-close status\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Sets the drawer title\n */\n @property({ type: String })\n caption?: string;\n\n /**\n * Sets the drawer embed url for iframe\n */\n @property({ type: String, attribute: 'embed-url' })\n embedUrl?: string;\n\n /**\n * Sets the drawer external link\n */\n @property({ type: String, attribute: 'external-link' })\n externalLink?: string;\n\n /**\n * Fires when the drawer is opened\n */\n @event('bl-drawer-open') private onOpen: EventDispatcher<string>;\n\n /**\n * Fires when the drawer is closed\n */\n @event('bl-drawer-close') private onClose: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n window?.addEventListener('bl-drawer-open', event => {\n if (event.target !== this) this.closeDrawer();\n });\n }\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('open')) {\n this.toggleDialogHandler();\n }\n }\n\n private domExistenceSchedule: number;\n\n private toggleDialogHandler() {\n if (this.open) {\n if (this.domExistenceSchedule) {\n clearTimeout(this.domExistenceSchedule);\n }\n\n this.domExistence = true;\n // FIXME: Allow events without payload\n this.onOpen('');\n } else {\n // Give some time for exit animation\n this.domExistenceSchedule = window.setTimeout(() => {\n this.domExistence = false;\n }, 1000);\n\n // FIXME: Allow events without payload\n this.onClose('');\n }\n }\n\n @state() private domExistence = false;\n\n private closeDrawer() {\n this.open = false;\n }\n\n private renderContent() {\n const content = this.embedUrl ? html`<iframe src=${this.embedUrl}></iframe>` : html`<slot></slot>`;\n\n return html`<section class=${this.embedUrl ? 'iframe-content' : 'content'}>\n ${content}\n </section>`;\n }\n\n private renderContainer() {\n const title = this.caption ? html`<h2 id=\"drawer-caption\">${this.caption}</h2>` : '';\n const external_button = this.externalLink\n ? html`<bl-button\n icon=\"external_link\"\n variant=\"tertiary\"\n kind=\"neutral\"\n size=\"small\"\n href=\"${this.externalLink}\"\n target=\"_blank\"\n ></bl-button>`\n : '';\n\n return html`<div class=\"container\">\n <header>\n ${title}\n <div class=\"header-buttons\">\n ${external_button}\n <bl-button\n @click=\"${this.closeDrawer}\"\n icon=\"close\"\n size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\n ></bl-button>\n </div>\n </header>\n ${this.renderContent()}\n </div>`;\n }\n\n render(): TemplateResult {\n if (this.domExistence) {\n return html`<div class=\"drawer\">${this.renderContainer()}</div>`;\n } else {\n return html``;\n }\n }\n}\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-drawer': BlDrawer;\n }\n}\n"],
|
|
5
|
+
"mappings": "sJACO,IAAMA,EAASC,iwCACfC,EAAQF,ECYf,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O,CAAC,GAdPT,EAenB,uBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,GApB/BT,EAqBnB,wBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,GA1BnCT,EA2BnB,4BAKiCQ,EAAA,CAAhCN,EAAM,gBAAgB,GAhCJF,EAgCc,sBAKCQ,EAAA,CAAjCN,EAAM,iBAAiB,GArCLF,EAqCe,uBAqCjBQ,EAAA,CAAhBE,EAAM,GA1EYV,EA0EF,4BA1EEA,EAArBQ,EAAA,CADCG,EAAc,WAAW,GACLX",
|
|
6
|
+
"names": ["styles", "r", "bl_drawer_default", "BlDrawer", "bl_drawer_default", "event", "changedProperties", "content", "$", "title", "external_button", "__decorateClass", "e", "t", "n"]
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as
|
|
1
|
+
import{b as f,c as m,e as g,g as _,h as x}from"./chunk-KWAF5LTC.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:var(--bl-color-primary-background);--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--z-index: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);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}: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:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));max-width:max-content;transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial;right:var(--padding-horizontal)}:host([label-fixed]) .select-wrapper{padding-top:var(--bl-size-m)}:host([label-fixed]) label{top:0;left:0;right:0;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color)}.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 opened(){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=_(this._selectInput,this._popover,()=>{x(this._selectInput,this._popover,{placement:"bottom",strategy:"fixed",middleware:[f(),m(8),g({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
2
|
${this._selectedOptions.map(y=>i`<li>${y.text}</li>`)}
|
|
3
3
|
</ul>`,t=this._additionalSelectedOptionCount?i`<span>+${this._additionalSelectedOptionCount}</span>`:null,s=i`<bl-button
|
|
4
4
|
class="remove-all"
|
|
@@ -31,5 +31,5 @@ import{b as m,c as f,e as g,g as _,h as x}from"./chunk-KWAF5LTC.js";import{a as
|
|
|
31
31
|
tabindex="-1"
|
|
32
32
|
>
|
|
33
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-
|
|
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({reflect:!0})],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",reflect:!0})],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-Q7EIOEDW.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:var(--bl-color-primary-background);--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--z-index: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);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}: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:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));max-width:max-content;transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial;right:var(--padding-horizontal)}:host([label-fixed]) .select-wrapper{padding-top:var(--bl-size-m)}:host([label-fixed]) label{top:0;left:0;right:0;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color)}.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({ reflect: true })\n label?: string;\n\n /**\n * Sets the placeholder value. If left blank, the label value (if specified) is set as placeholder.\n */\n @property({})\n placeholder?: string;\n\n /**\n * Sets the size value. Select component's height value will be changed accordingly\n */\n @property({ type: String, reflect: true })\n size: SelectSize = 'medium';\n\n /**\n * When option is not selected, shows component in error state\n */\n @property({ type: Boolean })\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', reflect: true })\n labelFixed = false;\n\n /**\n * Adds help text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText?: string;\n\n /**\n * Set custom error message\n */\n @property({ type: String, attribute: 'invalid-text' })\n customInvalidText?: string;\n\n /* Declare internal reactive properties */\n @state()\n private _isPopoverOpen = false;\n\n @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 opened() {\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 size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\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 ${this.multiple ? removeButton : null}\n <bl-icon\n class=\"dropdown-icon open\"\n name=\"arrow_up\"\n ></bl-icon>\n\n <bl-icon\n class=\"dropdown-icon closed\"\n name=\"arrow_down\"\n ></bl-icon>\n </div>\n </div>`;\n }\n\n 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.opened,\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': BlS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4BnB,wBAMA+B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,CAAC,GAjCRhC,EAkCnB,wBAMA+B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,CAAC,GAvCRhC,EAwCnB,wBAMA+B,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,UAAW,cAAe,QAAS,EAAK,CAAC,GA7CjDhC,EA8CnB,0BAMA+B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,GAnD/BhC,EAoDnB,wBAMA+B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,GAzDlChC,EA0DnB,iCAIQ+B,EAAA,CADPE,EAAM,GA7DYjC,EA8DX,8BAGA+B,EAAA,CADPE,EAAM,GAhEYjC,EAiEX,gCAGA+B,EAAA,CADPE,EAAM,GAnEYjC,EAoEX,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
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as w,b as m,c as E}from"./chunk-72IJCTLJ.js";import{a as p}from"./chunk-23UFIOHV.js";import{a as f,b as u,c as g,d as l,f as v,g as y,h as x,i as T}from"./chunk-HG7OBTQS.js";import{a as r}from"./chunk-NZ3RGSR6.js";var s=class extends E{constructor(t){if(super(t),this.it=l,t.type!==w.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===l||t==null)return this.ft=void 0,this.it=t;if(t===g)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;let i=[t];return i.raw=i,this.ft={_$litType$:this.constructor.resultType,strings:i,values:[]}}};s.directiveName="unsafeHTML",s.resultType=1;var G=m(s);var n=class extends s{};n.directiveName="unsafeSVG",n.resultType=2;var L=m(n);var P="./assets";function M(a){P=a}function $(){return P}var N=import.meta.url;N&&M(N.split("/").slice(0,-1).concat("assets").join("/"));var D=f`:host{display:inline-block}:host div{display:flex;align-items:stretch;width:1em;height:1em;min-width:1em;min-height:1em;overflow:hidden;transform:translateZ(0)}:host svg{width:1em;height:1em}`,b=D;var d=new Map,e=class extends v{static get styles(){return[b]}get name(){return this._iconName}set name(i){i!==this._iconName&&(this._iconName=i,this.load())}async load(){let c=`${$()}/${this.name}.svg`;d.has(c)||d.set(c,fetch(c));try{let o=await d.get(c),h=await(o==null?void 0:o.clone());h!=null&&h.ok?(this.svg=await h.text(),this.onLoad(`${this.name} icon loaded`),this.requestUpdate()):this.onError(`${this.name} icon failed to load`)}catch(o){this.onError(`${this.name} icon failed to load [${o}]`)}}render(){return u`<div aria-hidden="true">${L(this.svg)}</div>`}};r([x()],e.prototype,"name",1),r([p("bl-load")],e.prototype,"onLoad",2),r([p("bl-error")],e.prototype,"onError",2),r([T()],e.prototype,"svg",2),e=r([y("bl-icon")],e);export{M as a,$ as b,e as c};
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2017 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
//# sourceMappingURL=chunk-YMAZFWEK.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../node_modules/lit-html/src/directives/unsafe-html.ts", "../node_modules/lit-html/src/directives/unsafe-svg.ts", "../src/utilities/asset-paths.ts", "../src/components/icon/bl-icon.css", "../src/components/icon/bl-icon.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {nothing, TemplateResult, noChange} from '../lit-html.js';\nimport {directive, Directive, PartInfo, PartType} from '../directive.js';\n\nconst HTML_RESULT = 1;\n\nexport class UnsafeHTMLDirective extends Directive {\n static directiveName = 'unsafeHTML';\n static resultType = HTML_RESULT;\n\n private _value: unknown = nothing;\n private _templateResult?: TemplateResult;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.CHILD) {\n throw new Error(\n `${\n (this.constructor as typeof UnsafeHTMLDirective).directiveName\n }() can only be used in child bindings`\n );\n }\n }\n\n render(value: string | typeof nothing | typeof noChange | undefined | null) {\n if (value === nothing || value == null) {\n this._templateResult = undefined;\n return (this._value = value);\n }\n if (value === noChange) {\n return value;\n }\n if (typeof value != 'string') {\n throw new Error(\n `${\n (this.constructor as typeof UnsafeHTMLDirective).directiveName\n }() called with a non-string value`\n );\n }\n if (value === this._value) {\n return this._templateResult;\n }\n this._value = value;\n const strings = [value] as unknown as TemplateStringsArray;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (strings as any).raw = strings;\n // WARNING: impersonating a TemplateResult like this is extremely\n // dangerous. Third-party directives should not do this.\n return (this._templateResult = {\n // Cast to a known set of integers that satisfy ResultType so that we\n // don't have to export ResultType and possibly encourage this pattern.\n // This property needs to remain unminified.\n ['_$litType$']: (this.constructor as typeof UnsafeHTMLDirective)\n .resultType as 1 | 2,\n strings,\n values: [],\n });\n }\n}\n\n/**\n * Renders the result as HTML, rather than text.\n *\n * The values `undefined`, `null`, and `nothing`, will all result in no content\n * (empty string) being rendered.\n *\n * Note, this is unsafe to use with any user-provided input that hasn't been\n * sanitized or escaped, as it may lead to cross-site-scripting\n * vulnerabilities.\n */\nexport const unsafeHTML = directive(UnsafeHTMLDirective);\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {directive} from '../directive.js';\nimport {UnsafeHTMLDirective} from './unsafe-html.js';\n\nconst SVG_RESULT = 2;\n\nclass UnsafeSVGDirective extends UnsafeHTMLDirective {\n static override directiveName = 'unsafeSVG';\n static override resultType = SVG_RESULT;\n}\n\n/**\n * Renders the result as SVG, rather than text.\n *\n * The values `undefined`, `null`, and `nothing`, will all result in no content\n * (empty string) being rendered.\n *\n * Note, this is unsafe to use with any user-provided input that hasn't been\n * sanitized or escaped, as it may lead to cross-site-scripting\n * vulnerabilities.\n */\nexport const unsafeSVG = directive(UnsafeSVGDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {UnsafeSVGDirective};\n", "let iconPath = './assets';\n\nexport function setIconPath(path: string) {\n iconPath = path;\n}\n\nexport function getIconPath() {\n return iconPath;\n}\n\nconst modulePath = import.meta.url;\n\nif (modulePath) {\n setIconPath(modulePath.split('/').slice(0, -1).concat('assets').join('/'));\n}\n", "import {css} from 'lit';\nexport const styles = css`:host{display:inline-block;
|
|
5
|
-
"mappings": "mOAWaA,gBAA4BC,CAAAA,CAOvCC,YAAYC,EAAAA,CAEV,GADAC,MAAMD,CAAAA,EAJAE,KAAAA,GAAkBC,EAKpBH,EAASI,OAASC,EAASC,MAC7B,MAAUC,MAELL,KAAKH,YAA2CS,cADnD,uCAAA,CAAA,CAONC,OAAOC,EAAAA,CACL,GAAIA,IAAUP,GAAWO,GAAS,KAEhC,OADAR,KAAKS,GAAAA,OACGT,KAAKU,GAASF,EAExB,GAAIA,IAAUG,EACZ,OAAOH,EAET,GAAoB,OAATA,GAAS,SAClB,MAAUH,MAELL,KAAKH,YAA2CS,cADnD,mCAAA,EAKJ,GAAIE,IAAUR,KAAKU,GACjB,OAAOV,KAAKS,GAEdT,KAAKU,GAASF,EACd,IAAMI,EAAU,CAACJ,CAAAA,EAKjB,OAHCI,EAAgBC,IAAMD,EAGfZ,KAAKS,GAAkB,CAI7BK,WAAiBd,KAAKH,YACnBkB,WACHH,QAAAA,EACAI,OAAQ,CAAA,CAAA,CAAA,CAAA,EAhDLrB,EAAAA,cAAgB,aAChBA,EAAAA,WAJW,EAAA,IAkEPsB,EAAaC,EAAUvB,CAAAA,EChEpC,IAAMwB,EAAN,cAAiCC,CAAAA,CAAAA,EACfD,EAAAA,cAAgB,YAChBA,EAAAA,WAJC,EAAA,IAiBNE,EAAYC,EAAUH,CAAAA,EC1BnC,IAAII,EAAW,WAER,SAASC,EAAYC,EAAc,CACxCF,EAAWE,CACb,CAEO,SAASC,GAAc,CAC5B,OAAOH,CACT,CAEA,IAAMI,EAAa,YAAY,IAE3BA,GACFH,EAAYG,EAAW,MAAM,GAAG,EAAE,MAAM,EAAG,EAAE,EAAE,OAAO,QAAQ,EAAE,KAAK,GAAG,CAAC,ECZpE,IAAMC,EAASC,
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {nothing, TemplateResult, noChange} from '../lit-html.js';\nimport {directive, Directive, PartInfo, PartType} from '../directive.js';\n\nconst HTML_RESULT = 1;\n\nexport class UnsafeHTMLDirective extends Directive {\n static directiveName = 'unsafeHTML';\n static resultType = HTML_RESULT;\n\n private _value: unknown = nothing;\n private _templateResult?: TemplateResult;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.CHILD) {\n throw new Error(\n `${\n (this.constructor as typeof UnsafeHTMLDirective).directiveName\n }() can only be used in child bindings`\n );\n }\n }\n\n render(value: string | typeof nothing | typeof noChange | undefined | null) {\n if (value === nothing || value == null) {\n this._templateResult = undefined;\n return (this._value = value);\n }\n if (value === noChange) {\n return value;\n }\n if (typeof value != 'string') {\n throw new Error(\n `${\n (this.constructor as typeof UnsafeHTMLDirective).directiveName\n }() called with a non-string value`\n );\n }\n if (value === this._value) {\n return this._templateResult;\n }\n this._value = value;\n const strings = [value] as unknown as TemplateStringsArray;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (strings as any).raw = strings;\n // WARNING: impersonating a TemplateResult like this is extremely\n // dangerous. Third-party directives should not do this.\n return (this._templateResult = {\n // Cast to a known set of integers that satisfy ResultType so that we\n // don't have to export ResultType and possibly encourage this pattern.\n // This property needs to remain unminified.\n ['_$litType$']: (this.constructor as typeof UnsafeHTMLDirective)\n .resultType as 1 | 2,\n strings,\n values: [],\n });\n }\n}\n\n/**\n * Renders the result as HTML, rather than text.\n *\n * The values `undefined`, `null`, and `nothing`, will all result in no content\n * (empty string) being rendered.\n *\n * Note, this is unsafe to use with any user-provided input that hasn't been\n * sanitized or escaped, as it may lead to cross-site-scripting\n * vulnerabilities.\n */\nexport const unsafeHTML = directive(UnsafeHTMLDirective);\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {directive} from '../directive.js';\nimport {UnsafeHTMLDirective} from './unsafe-html.js';\n\nconst SVG_RESULT = 2;\n\nclass UnsafeSVGDirective extends UnsafeHTMLDirective {\n static override directiveName = 'unsafeSVG';\n static override resultType = SVG_RESULT;\n}\n\n/**\n * Renders the result as SVG, rather than text.\n *\n * The values `undefined`, `null`, and `nothing`, will all result in no content\n * (empty string) being rendered.\n *\n * Note, this is unsafe to use with any user-provided input that hasn't been\n * sanitized or escaped, as it may lead to cross-site-scripting\n * vulnerabilities.\n */\nexport const unsafeSVG = directive(UnsafeSVGDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {UnsafeSVGDirective};\n", "let iconPath = './assets';\n\nexport function setIconPath(path: string) {\n iconPath = path;\n}\n\nexport function getIconPath() {\n return iconPath;\n}\n\nconst modulePath = import.meta.url;\n\nif (modulePath) {\n setIconPath(modulePath.split('/').slice(0, -1).concat('assets').join('/'));\n}\n", "import {css} from 'lit';\nexport const styles = css`:host{display:inline-block}:host div{display:flex;align-items:stretch;width:1em;height:1em;min-width:1em;min-height:1em;overflow:hidden;transform:translateZ(0)}:host svg{width:1em;height:1em}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { unsafeSVG } from 'lit/directives/unsafe-svg.js';\nimport { getIconPath } from '../../utilities/asset-paths';\nimport { event, EventDispatcher } from '../../utilities/event';\n\nimport style from './bl-icon.css';\n\nconst requestMap = new Map<string, Promise<Response>>();\n\n/**\n * @tag bl-icon\n * @summary Baklava Icon component\n *\n * @cssproperty font-size - Setting size of icon. Default is current font size in DOM place\n * @cssproperty color - Setting color of icon. Default is `currentColor`\n */\n@customElement('bl-icon')\nexport default class BlIcon extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n private _iconName: string;\n\n /**\n * Name of the icon to show\n */\n @property()\n get name(): string {\n return this._iconName;\n }\n\n set name(value: string) {\n if (value !== this._iconName) {\n this._iconName = value;\n this.load();\n }\n }\n\n /**\n * Fires when SVG icon loaded\n */\n @event('bl-load') private onLoad: EventDispatcher<string>;\n\n /**\n * Fires when SVG icon failed to load\n */\n @event('bl-error') private onError: EventDispatcher<string>;\n\n @state() private svg: string;\n\n async load() {\n const iconPath = getIconPath();\n const fileUrl = `${iconPath}/${this.name}.svg`;\n\n if (!requestMap.has(fileUrl)) {\n requestMap.set(fileUrl, fetch(fileUrl));\n }\n\n try {\n const iconRequest = await requestMap.get(fileUrl);\n const res = await iconRequest?.clone();\n\n if (res?.ok) {\n this.svg = await res.text();\n this.onLoad(`${this.name} icon loaded`);\n this.requestUpdate();\n } else {\n this.onError(`${this.name} icon failed to load`);\n }\n } catch (error) {\n this.onError(`${this.name} icon failed to load [${error}]`);\n }\n }\n\n render(): TemplateResult {\n return html`<div aria-hidden=\"true\">${unsafeSVG(this.svg)}</div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-icon': BlIcon;\n }\n}\n"],
|
|
5
|
+
"mappings": "mOAWaA,gBAA4BC,CAAAA,CAOvCC,YAAYC,EAAAA,CAEV,GADAC,MAAMD,CAAAA,EAJAE,KAAAA,GAAkBC,EAKpBH,EAASI,OAASC,EAASC,MAC7B,MAAUC,MAELL,KAAKH,YAA2CS,cADnD,uCAAA,CAAA,CAONC,OAAOC,EAAAA,CACL,GAAIA,IAAUP,GAAWO,GAAS,KAEhC,OADAR,KAAKS,GAAAA,OACGT,KAAKU,GAASF,EAExB,GAAIA,IAAUG,EACZ,OAAOH,EAET,GAAoB,OAATA,GAAS,SAClB,MAAUH,MAELL,KAAKH,YAA2CS,cADnD,mCAAA,EAKJ,GAAIE,IAAUR,KAAKU,GACjB,OAAOV,KAAKS,GAEdT,KAAKU,GAASF,EACd,IAAMI,EAAU,CAACJ,CAAAA,EAKjB,OAHCI,EAAgBC,IAAMD,EAGfZ,KAAKS,GAAkB,CAI7BK,WAAiBd,KAAKH,YACnBkB,WACHH,QAAAA,EACAI,OAAQ,CAAA,CAAA,CAAA,CAAA,EAhDLrB,EAAAA,cAAgB,aAChBA,EAAAA,WAJW,EAAA,IAkEPsB,EAAaC,EAAUvB,CAAAA,EChEpC,IAAMwB,EAAN,cAAiCC,CAAAA,CAAAA,EACfD,EAAAA,cAAgB,YAChBA,EAAAA,WAJC,EAAA,IAiBNE,EAAYC,EAAUH,CAAAA,EC1BnC,IAAII,EAAW,WAER,SAASC,EAAYC,EAAc,CACxCF,EAAWE,CACb,CAEO,SAASC,GAAc,CAC5B,OAAOH,CACT,CAEA,IAAMI,EAAa,YAAY,IAE3BA,GACFH,EAAYG,EAAW,MAAM,GAAG,EAAE,MAAM,EAAG,EAAE,EAAE,OAAO,QAAQ,EAAE,KAAK,GAAG,CAAC,ECZpE,IAAMC,EAASC,mMACfC,EAAQF,ECMf,IAAMG,EAAa,IAAI,IAUFC,EAArB,cAAoCC,CAAW,CAC7C,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAQA,IAAI,MAAe,CACjB,OAAO,KAAK,SACd,CAEA,IAAI,KAAKC,EAAe,CAClBA,IAAU,KAAK,YACjB,KAAK,UAAYA,EACjB,KAAK,KAAK,EAEd,CAcA,MAAM,MAAO,CAEX,IAAMC,EAAU,GADCC,EAAY,KACE,KAAK,WAE/BN,EAAW,IAAIK,CAAO,GACzBL,EAAW,IAAIK,EAAS,MAAMA,CAAO,CAAC,EAGxC,GAAI,CACF,IAAME,EAAc,MAAMP,EAAW,IAAIK,CAAO,EAC1CG,EAAM,MAAMD,GAAA,YAAAA,EAAa,SAE3BC,GAAA,MAAAA,EAAK,IACP,KAAK,IAAM,MAAMA,EAAI,KAAK,EAC1B,KAAK,OAAO,GAAG,KAAK,kBAAkB,EACtC,KAAK,cAAc,GAEnB,KAAK,QAAQ,GAAG,KAAK,0BAA0B,CAEnD,OAASC,EAAP,CACA,KAAK,QAAQ,GAAG,KAAK,6BAA6BA,IAAQ,CAC5D,CACF,CAEA,QAAyB,CACvB,OAAOC,4BAA+BC,EAAU,KAAK,GAAG,SAC1D,CACF,EAlDMC,EAAA,CADHC,EAAS,GAVSZ,EAWf,oBAcsBW,EAAA,CAAzBE,EAAM,SAAS,GAzBGb,EAyBO,sBAKCW,EAAA,CAA1BE,EAAM,UAAU,GA9BEb,EA8BQ,uBAEVW,EAAA,CAAhBG,EAAM,GAhCYd,EAgCF,mBAhCEA,EAArBW,EAAA,CADCI,EAAc,SAAS,GACHf",
|
|
6
6
|
"names": ["UnsafeHTMLDirective", "Directive", "constructor", "partInfo", "super", "this", "nothing", "type", "PartType", "CHILD", "Error", "directiveName", "render", "value", "_templateResult", "_value", "noChange", "strings", "raw", "_$litType$", "resultType", "values", "unsafeHTML", "directive", "UnsafeSVGDirective", "UnsafeHTMLDirective", "unsafeSVG", "directive", "iconPath", "setIconPath", "path", "getIconPath", "modulePath", "styles", "r", "bl_icon_default", "requestMap", "BlIcon", "s", "bl_icon_default", "value", "fileUrl", "getIconPath", "iconRequest", "res", "error", "$", "o", "__decorateClass", "e", "event", "t", "n"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-YJS4QEL4.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-YJS4QEL4.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-YMAZFWEK.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-alert.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-54XXQVFL.js";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-54XXQVFL.js";import"../../chunk-YMAZFWEK.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-badge.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-EADA5CG6.js";import"../../chunk-ENFFFE4I.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-EADA5CG6.js";import"../../chunk-ENFFFE4I.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-YMAZFWEK.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-button.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a,d as b,e as c}from"../../chunk-6SKD6QNV.js";import"../../chunk-KQBKSEYJ.js";import"../../chunk-5VLVLBWY.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-
|
|
1
|
+
import{c as a,d as b,e as c}from"../../chunk-6SKD6QNV.js";import"../../chunk-KQBKSEYJ.js";import"../../chunk-5VLVLBWY.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-YMAZFWEK.js";import"../../chunk-72IJCTLJ.js";import"../../chunk-23UFIOHV.js";import"../../chunk-HG7OBTQS.js";import"../../chunk-NZ3RGSR6.js";export{b as blChangeEventName,a as blCheckboxGroupTag,c as default};
|
|
2
2
|
//# sourceMappingURL=bl-checkbox-group.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../../chunk-6SKD6QNV.js";import"../../../chunk-KQBKSEYJ.js";import"../../../chunk-5VLVLBWY.js";import"../../../chunk-2TVOKUHE.js";import"../../../chunk-
|
|
1
|
+
import{a,b}from"../../../chunk-6SKD6QNV.js";import"../../../chunk-KQBKSEYJ.js";import"../../../chunk-5VLVLBWY.js";import"../../../chunk-2TVOKUHE.js";import"../../../chunk-YMAZFWEK.js";import"../../../chunk-72IJCTLJ.js";import"../../../chunk-23UFIOHV.js";import"../../../chunk-HG7OBTQS.js";import"../../../chunk-NZ3RGSR6.js";export{a as blCheckboxTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-checkbox.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-H37QVPNF.js";import"../../chunk-EADA5CG6.js";import"../../chunk-ENFFFE4I.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-H37QVPNF.js";import"../../chunk-EADA5CG6.js";import"../../chunk-ENFFFE4I.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-YMAZFWEK.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-dialog.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CSSResultGroup, LitElement, TemplateResult } from
|
|
1
|
+
import { CSSResultGroup, LitElement, TemplateResult } from 'lit';
|
|
2
2
|
import '../button/bl-button';
|
|
3
|
-
import { PropertyValues } from
|
|
3
|
+
import { PropertyValues } from 'lit';
|
|
4
4
|
/**
|
|
5
5
|
* @tag bl-drawer
|
|
6
6
|
* @summary Baklava Drawer component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl-drawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/bl-drawer.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"bl-drawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/bl-drawer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAEvE,OAAO,qBAAqB,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAErC;;;;GAIG;AAGH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,UAAU;IAC9C,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED;;OAEG;IAEH,IAAI,UAAS;IAEb;;OAEG;IAEH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IAEH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IAEH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACsB,OAAO,CAAC,MAAM,CAA0B;IAEjE;;OAEG;IACuB,OAAO,CAAC,OAAO,CAA0B;IAEnE,iBAAiB;IAOjB,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAM/C,OAAO,CAAC,oBAAoB,CAAS;IAErC,OAAO,CAAC,mBAAmB;IAoBlB,OAAO,CAAC,YAAY,CAAS;IAEtC,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,eAAe;IA+BvB,MAAM,IAAI,cAAc;CAOzB;AACD,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-PQ3WCOT4.js";import"../../chunk-EADA5CG6.js";import"../../chunk-ENFFFE4I.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-YMAZFWEK.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-drawer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a,d as b}from"../../chunk-M623DR5J.js";import"../../chunk-LPQ6QJUJ.js";import"../../chunk-KWAF5LTC.js";import"../../chunk-EADA5CG6.js";import"../../chunk-ENFFFE4I.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-
|
|
1
|
+
import{c as a,d as b}from"../../chunk-M623DR5J.js";import"../../chunk-LPQ6QJUJ.js";import"../../chunk-KWAF5LTC.js";import"../../chunk-EADA5CG6.js";import"../../chunk-ENFFFE4I.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-YMAZFWEK.js";import"../../chunk-72IJCTLJ.js";import"../../chunk-23UFIOHV.js";import"../../chunk-HG7OBTQS.js";import"../../chunk-NZ3RGSR6.js";export{a as blDropdownTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-dropdown.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../../chunk-M623DR5J.js";import"../../../chunk-LPQ6QJUJ.js";import"../../../chunk-KWAF5LTC.js";import"../../../chunk-EADA5CG6.js";import"../../../chunk-ENFFFE4I.js";import"../../../chunk-2TVOKUHE.js";import"../../../chunk-
|
|
1
|
+
import{a,b}from"../../../chunk-M623DR5J.js";import"../../../chunk-LPQ6QJUJ.js";import"../../../chunk-KWAF5LTC.js";import"../../../chunk-EADA5CG6.js";import"../../../chunk-ENFFFE4I.js";import"../../../chunk-2TVOKUHE.js";import"../../../chunk-YMAZFWEK.js";import"../../../chunk-72IJCTLJ.js";import"../../../chunk-23UFIOHV.js";import"../../../chunk-HG7OBTQS.js";import"../../../chunk-NZ3RGSR6.js";export{a as blDropdownItemTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-dropdown-item.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a}from"../../chunk-
|
|
1
|
+
import{c as a}from"../../chunk-YMAZFWEK.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-icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl-input.d.ts","sourceRoot":"","sources":["../../../src/components/input/bl-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AASvE,OAAO,4BAA4B,CAAC;AACpC,OAAO,iBAAiB,CAAC;AAIzB,oBAAY,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;;AAC3C;;;GAGG;AAEH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,YAA4B;IAC/D,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED,MAAM,CAAC,qBAAqB;;;;;QAAwB;IAGpD,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC;;OAEG;IAEH,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAU;IAEjC;;OAEG;IAEH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IAEH,WAAW,CAAC,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IAM5B,OAAO,CAAC,SAAS,CAIhB;IAED,OAAO,CAAC,OAAO,CAEd;IAEQ,OAAO,CAAC,KAAK,CAAS;IAE/B,gBAAgB,IAAI,MAAM,GAAG,IAAI;IAIjC,cAAc;IAKd,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIzC,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,aAAa;IAQrB,YAAY;IAIZ,MAAM,IAAI,cAAc;CAgDzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-4O2YCQGA.js";import"../../chunk-KQBKSEYJ.js";import"../../chunk-5VLVLBWY.js";import"../../chunk-ENFFFE4I.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-YMAZFWEK.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-input.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-JHOV25H6.js";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-JHOV25H6.js";import"../../chunk-4O2YCQGA.js";import"../../chunk-Q7EIOEDW.js";import"../../chunk-KWTSWXUL.js";import"../../chunk-KWAF5LTC.js";import"../../chunk-KQBKSEYJ.js";import"../../chunk-5VLVLBWY.js";import"../../chunk-EADA5CG6.js";import"../../chunk-ENFFFE4I.js";import"../../chunk-2TVOKUHE.js";import"../../chunk-YMAZFWEK.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-pagination.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-Q7EIOEDW.js";import"../../chunk-KWTSWXUL.js";import"../../chunk-KWAF5LTC.js";import"../../chunk-ENFFFE4I.js";import"../../chunk-YMAZFWEK.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/dist/themes/default.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-cyrillic-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-cyrillic-ext-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-hebrew-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-latin-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-latin-ext-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}:root{--bl-color-primary: #f27a1a;--bl-color-primary-hover: #ef6114;--bl-color-secondary: #273142;--bl-color-secondary-hover: #0f131a;--bl-color-tertiary: #f1f2f7;--bl-color-tertiary-hover: #d5d9e1;--bl-color-success: #0bc15c;--bl-color-success-hover: #09a44e;--bl-color-danger: #ff5043;--bl-color-danger-hover: #ff3028;--bl-color-warning: #ffb600;--bl-color-warning-hover: #ff9800;--bl-color-alternative: #5794ff;--bl-color-alternative-hover: #457eff;--bl-color-featured: #8c4eff;--bl-color-featured-hover: #753eff;--bl-color-primary-background: #fff;--bl-color-accent-primary-background: #fef2e8;--bl-color-secondary-background: #f1f2f7;--bl-color-tertiary-background: #f7f7fa;--bl-color-success-background: #e7f9ef;--bl-color-danger-background: #ffeeec;--bl-color-warning-background: #fff8e6;--bl-color-alternative-background: #eef4ff;--bl-color-featured-background: #f4edff;--bl-color-content-primary: #273142;--bl-color-content-secondary: #6e7787;--bl-color-content-tertiary: #95a1b5;--bl-color-content-passive: #afbbca;--bl-color-content-primary-contrast: #fff;--bl-color-content-hover: #f27a1a;--bl-color-border: #d5d9e1;--bl-size-4xs: .125rem;--bl-size-3xs: .25rem;--bl-size-2xs: .5rem;--bl-size-xs: .75rem;--bl-size-s: .875rem;--bl-size-m: 1rem;--bl-size-l: 1.25rem;--bl-size-xl: 1.5rem;--bl-size-2xl: 2rem;--bl-size-3xl: 2.5rem;--bl-size-4xl: 3rem;--bl-size-5xl: 4rem;--bl-size-6xl: 5rem;--bl-font-family: "RubikVariable", sans-serif;--bl-font-weight-light: 300;--bl-font-weight-regular: 400;--bl-font-weight-medium: 500;--bl-font-weight-semibold: 600;--bl-font-weight-bold: 700;--bl-font-size-2xs: .5rem;--bl-font-size-xs: .625rem;--bl-font-size-s: .75rem;--bl-font-size-m: .875rem;--bl-font-size-l: 1rem;--bl-font-size-xl: 1.25rem;--bl-font-size-2xl: 1.5rem;--bl-font-size-3xl: 1.75rem;--bl-font-size-4xl: 2rem;--bl-font-size-5xl: 3rem;--bl-font-size-6xl: 4rem;--bl-border-radius-xs: .125rem;--bl-border-radius-s: .25rem;--bl-border-radius-m: .375rem;--bl-border-radius-l: .5rem;--bl-border-radius-pill: 62.438rem;--bl-border-radius-circle: 50%;--bl-font-display-font-size: var(--bl-font-size-5xl);--bl-font-display-line-height: calc(var(--bl-font-display-font-size) + var(--bl-size-2xs));--bl-font-display-size: var(--bl-font-display-font-size)/var(--bl-font-display-line-height);--bl-font-display: var(--bl-font-display-size) var(--bl-font-family);--bl-font-display-light: var(--bl-font-weight-light) var(--bl-font-display);--bl-font-display-regular: var(--bl-font-weight-regular) var(--bl-font-display);--bl-font-display-medium: var(--bl-font-weight-medium) var(--bl-font-display);--bl-font-display-semibold: var(--bl-font-weight-semibold) var(--bl-font-display);--bl-font-display-bold: var(--bl-font-weight-bold) var(--bl-font-display);--bl-font-heading-1-font-size: var(--bl-font-size-4xl);--bl-font-heading-1-line-height: calc(var(--bl-font-heading-1-font-size) + var(--bl-size-3xs));--bl-font-heading-1-size: var(--bl-font-heading-1-font-size)/var(--bl-font-heading-1-line-height);--bl-font-heading-1: var(--bl-font-weight-light) var(--bl-font-heading-1-size) var(--bl-font-family);--bl-font-heading-2-font-size: var(--bl-font-size-3xl);--bl-font-heading-2-line-height: calc(var(--bl-font-heading-2-font-size) + var(--bl-size-3xs));--bl-font-heading-2-size: var(--bl-font-heading-2-font-size)/var(--bl-font-heading-2-line-height);--bl-font-heading-2: var(--bl-font-weight-regular) var(--bl-font-heading-2-size) var(--bl-font-family);--bl-font-heading-3-font-size: var(--bl-font-size-2xl);--bl-font-heading-3-line-height: calc(var(--bl-font-heading-3-font-size) + var(--bl-size-3xs));--bl-font-heading-3-size: var(--bl-font-heading-3-font-size)/var(--bl-font-heading-3-line-height);--bl-font-heading-3: var(--bl-font-weight-regular) var(--bl-font-heading-3-size) var(--bl-font-family);--bl-font-title-1-font-size: var(--bl-font-size-xl);--bl-font-title-1-line-height: calc(var(--bl-font-title-1-font-size) + var(--bl-size-3xs));--bl-font-title-1-size: var(--bl-font-title-1-font-size)/var(--bl-font-title-1-line-height);--bl-font-title-1: var(--bl-font-title-1-size) var(--bl-font-family);--bl-font-title-1-regular: var(--bl-font-weight-regular) var(--bl-font-title-1);--bl-font-title-1-medium: var(--bl-font-weight-medium) var(--bl-font-title-1);--bl-font-title-1-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-1);--bl-font-title-1-bold: var(--bl-font-weight-bold) var(--bl-font-title-1);--bl-font-title-2-font-size: var(--bl-font-size-l);--bl-font-title-2-line-height: calc(var(--bl-font-title-2-font-size) + var(--bl-size-3xs));--bl-font-title-2-size: var(--bl-font-title-2-font-size)/var(--bl-font-title-2-line-height);--bl-font-title-2: var(--bl-font-title-2-size) var(--bl-font-family);--bl-font-title-2-regular: var(--bl-font-weight-regular) var(--bl-font-title-2);--bl-font-title-2-medium: var(--bl-font-weight-medium) var(--bl-font-title-2);--bl-font-title-2-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-2);--bl-font-title-2-bold: var(--bl-font-weight-bold) var(--bl-font-title-2);--bl-font-title-3-font-size: var(--bl-font-size-m);--bl-font-title-3-line-height: calc(var(--bl-font-title-3-font-size) + var(--bl-size-4xs));--bl-font-title-3-size: var(--bl-font-title-3-font-size)/var(--bl-font-title-3-line-height);--bl-font-title-3: var(--bl-font-title-3-size) var(--bl-font-family);--bl-font-title-3-regular: var(--bl-font-weight-regular) var(--bl-font-title-3);--bl-font-title-3-medium: var(--bl-font-weight-medium) var(--bl-font-title-3);--bl-font-title-3-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-3);--bl-font-title-3-bold: var(--bl-font-weight-bold) var(--bl-font-title-3);--bl-font-title-4-font-size: var(--bl-font-size-s);--bl-font-title-4-line-height: calc(var(--bl-font-title-4-font-size) + var(--bl-size-4xs));--bl-font-title-4-size: var(--bl-font-title-4-font-size)/var(--bl-font-title-4-line-height);--bl-font-title-4: var(--bl-font-title-4-size) var(--bl-font-family);--bl-font-title-4-regular: var(--bl-font-weight-regular) var(--bl-font-title-4);--bl-font-title-4-medium: var(--bl-font-weight-medium) var(--bl-font-title-4);--bl-font-title-4-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-4);--bl-font-title-4-bold: var(--bl-font-weight-bold) var(--bl-font-title-4);--bl-font-body-text-1-font-size: var(--bl-font-size-l);--bl-font-body-text-1-line-height: calc(var(--bl-font-body-text-1-font-size) + var(--bl-size-4xs));--bl-font-body-text-1-size: var(--bl-font-body-text-1-font-size)/var(--bl-font-body-text-1-line-height);--bl-font-body-text-1: var(--bl-font-weight-regular) var(--bl-font-body-text-1-size) var(--bl-font-family);--bl-font-body-text-2-font-size: var(--bl-font-size-m);--bl-font-body-text-2-line-height: calc(var(--bl-font-body-text-2-font-size) + var(--bl-size-4xs));--bl-font-body-text-2-size: var(--bl-font-body-text-2-font-size)/var(--bl-font-body-text-2-line-height);--bl-font-body-text-2: var(--bl-font-weight-regular) var(--bl-font-body-text-2-size) var(--bl-font-family);--bl-font-body-text-3-font-size: var(--bl-font-size-s);--bl-font-body-text-3-line-height: calc(var(--bl-font-body-text-3-font-size) + var(--bl-size-4xs));--bl-font-body-text-3-size: var(--bl-font-body-text-3-font-size)/var(--bl-font-body-text-3-line-height);--bl-font-body-text-3: var(--bl-font-weight-regular) var(--bl-font-body-text-3-size) var(--bl-font-family);--bl-font-caption-font-size: var(--bl-font-size-
|
|
1
|
+
@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-cyrillic-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-cyrillic-ext-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-hebrew-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-latin-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:RubikVariable;font-style:normal;font-display:swap;font-weight:300 900;src:url(../assets/rubik-latin-ext-variable-wghtOnly-normal.woff2) format("woff2");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}:root{--bl-color-primary: #f27a1a;--bl-color-primary-hover: #ef6114;--bl-color-secondary: #273142;--bl-color-secondary-hover: #0f131a;--bl-color-tertiary: #f1f2f7;--bl-color-tertiary-hover: #d5d9e1;--bl-color-success: #0bc15c;--bl-color-success-hover: #09a44e;--bl-color-danger: #ff5043;--bl-color-danger-hover: #ff3028;--bl-color-warning: #ffb600;--bl-color-warning-hover: #ff9800;--bl-color-alternative: #5794ff;--bl-color-alternative-hover: #457eff;--bl-color-featured: #8c4eff;--bl-color-featured-hover: #753eff;--bl-color-primary-background: #fff;--bl-color-accent-primary-background: #fef2e8;--bl-color-secondary-background: #f1f2f7;--bl-color-tertiary-background: #f7f7fa;--bl-color-success-background: #e7f9ef;--bl-color-danger-background: #ffeeec;--bl-color-warning-background: #fff8e6;--bl-color-alternative-background: #eef4ff;--bl-color-featured-background: #f4edff;--bl-color-content-primary: #273142;--bl-color-content-secondary: #6e7787;--bl-color-content-tertiary: #95a1b5;--bl-color-content-passive: #afbbca;--bl-color-content-primary-contrast: #fff;--bl-color-content-hover: #f27a1a;--bl-color-border: #d5d9e1;--bl-size-4xs: .125rem;--bl-size-3xs: .25rem;--bl-size-2xs: .5rem;--bl-size-xs: .75rem;--bl-size-s: .875rem;--bl-size-m: 1rem;--bl-size-l: 1.25rem;--bl-size-xl: 1.5rem;--bl-size-2xl: 2rem;--bl-size-3xl: 2.5rem;--bl-size-4xl: 3rem;--bl-size-5xl: 4rem;--bl-size-6xl: 5rem;--bl-font-family: "RubikVariable", sans-serif;--bl-font-weight-light: 300;--bl-font-weight-regular: 400;--bl-font-weight-medium: 500;--bl-font-weight-semibold: 600;--bl-font-weight-bold: 700;--bl-font-size-2xs: .5rem;--bl-font-size-xs: .625rem;--bl-font-size-s: .75rem;--bl-font-size-m: .875rem;--bl-font-size-l: 1rem;--bl-font-size-xl: 1.25rem;--bl-font-size-2xl: 1.5rem;--bl-font-size-3xl: 1.75rem;--bl-font-size-4xl: 2rem;--bl-font-size-5xl: 3rem;--bl-font-size-6xl: 4rem;--bl-border-radius-xs: .125rem;--bl-border-radius-s: .25rem;--bl-border-radius-m: .375rem;--bl-border-radius-l: .5rem;--bl-border-radius-pill: 62.438rem;--bl-border-radius-circle: 50%;--bl-font-display-font-size: var(--bl-font-size-5xl);--bl-font-display-line-height: calc(var(--bl-font-display-font-size) + var(--bl-size-2xs));--bl-font-display-size: var(--bl-font-display-font-size)/var(--bl-font-display-line-height);--bl-font-display: var(--bl-font-display-size) var(--bl-font-family);--bl-font-display-light: var(--bl-font-weight-light) var(--bl-font-display);--bl-font-display-regular: var(--bl-font-weight-regular) var(--bl-font-display);--bl-font-display-medium: var(--bl-font-weight-medium) var(--bl-font-display);--bl-font-display-semibold: var(--bl-font-weight-semibold) var(--bl-font-display);--bl-font-display-bold: var(--bl-font-weight-bold) var(--bl-font-display);--bl-font-heading-1-font-size: var(--bl-font-size-4xl);--bl-font-heading-1-line-height: calc(var(--bl-font-heading-1-font-size) + var(--bl-size-3xs));--bl-font-heading-1-size: var(--bl-font-heading-1-font-size)/var(--bl-font-heading-1-line-height);--bl-font-heading-1: var(--bl-font-weight-light) var(--bl-font-heading-1-size) var(--bl-font-family);--bl-font-heading-2-font-size: var(--bl-font-size-3xl);--bl-font-heading-2-line-height: calc(var(--bl-font-heading-2-font-size) + var(--bl-size-3xs));--bl-font-heading-2-size: var(--bl-font-heading-2-font-size)/var(--bl-font-heading-2-line-height);--bl-font-heading-2: var(--bl-font-weight-regular) var(--bl-font-heading-2-size) var(--bl-font-family);--bl-font-heading-3-font-size: var(--bl-font-size-2xl);--bl-font-heading-3-line-height: calc(var(--bl-font-heading-3-font-size) + var(--bl-size-3xs));--bl-font-heading-3-size: var(--bl-font-heading-3-font-size)/var(--bl-font-heading-3-line-height);--bl-font-heading-3: var(--bl-font-weight-regular) var(--bl-font-heading-3-size) var(--bl-font-family);--bl-font-title-1-font-size: var(--bl-font-size-xl);--bl-font-title-1-line-height: calc(var(--bl-font-title-1-font-size) + var(--bl-size-3xs));--bl-font-title-1-size: var(--bl-font-title-1-font-size)/var(--bl-font-title-1-line-height);--bl-font-title-1: var(--bl-font-title-1-size) var(--bl-font-family);--bl-font-title-1-regular: var(--bl-font-weight-regular) var(--bl-font-title-1);--bl-font-title-1-medium: var(--bl-font-weight-medium) var(--bl-font-title-1);--bl-font-title-1-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-1);--bl-font-title-1-bold: var(--bl-font-weight-bold) var(--bl-font-title-1);--bl-font-title-2-font-size: var(--bl-font-size-l);--bl-font-title-2-line-height: calc(var(--bl-font-title-2-font-size) + var(--bl-size-3xs));--bl-font-title-2-size: var(--bl-font-title-2-font-size)/var(--bl-font-title-2-line-height);--bl-font-title-2: var(--bl-font-title-2-size) var(--bl-font-family);--bl-font-title-2-regular: var(--bl-font-weight-regular) var(--bl-font-title-2);--bl-font-title-2-medium: var(--bl-font-weight-medium) var(--bl-font-title-2);--bl-font-title-2-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-2);--bl-font-title-2-bold: var(--bl-font-weight-bold) var(--bl-font-title-2);--bl-font-title-3-font-size: var(--bl-font-size-m);--bl-font-title-3-line-height: calc(var(--bl-font-title-3-font-size) + var(--bl-size-4xs));--bl-font-title-3-size: var(--bl-font-title-3-font-size)/var(--bl-font-title-3-line-height);--bl-font-title-3: var(--bl-font-title-3-size) var(--bl-font-family);--bl-font-title-3-regular: var(--bl-font-weight-regular) var(--bl-font-title-3);--bl-font-title-3-medium: var(--bl-font-weight-medium) var(--bl-font-title-3);--bl-font-title-3-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-3);--bl-font-title-3-bold: var(--bl-font-weight-bold) var(--bl-font-title-3);--bl-font-title-4-font-size: var(--bl-font-size-s);--bl-font-title-4-line-height: calc(var(--bl-font-title-4-font-size) + var(--bl-size-4xs));--bl-font-title-4-size: var(--bl-font-title-4-font-size)/var(--bl-font-title-4-line-height);--bl-font-title-4: var(--bl-font-title-4-size) var(--bl-font-family);--bl-font-title-4-regular: var(--bl-font-weight-regular) var(--bl-font-title-4);--bl-font-title-4-medium: var(--bl-font-weight-medium) var(--bl-font-title-4);--bl-font-title-4-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-4);--bl-font-title-4-bold: var(--bl-font-weight-bold) var(--bl-font-title-4);--bl-font-body-text-1-font-size: var(--bl-font-size-l);--bl-font-body-text-1-line-height: calc(var(--bl-font-body-text-1-font-size) + var(--bl-size-4xs));--bl-font-body-text-1-size: var(--bl-font-body-text-1-font-size)/var(--bl-font-body-text-1-line-height);--bl-font-body-text-1: var(--bl-font-weight-regular) var(--bl-font-body-text-1-size) var(--bl-font-family);--bl-font-body-text-2-font-size: var(--bl-font-size-m);--bl-font-body-text-2-line-height: calc(var(--bl-font-body-text-2-font-size) + var(--bl-size-4xs));--bl-font-body-text-2-size: var(--bl-font-body-text-2-font-size)/var(--bl-font-body-text-2-line-height);--bl-font-body-text-2: var(--bl-font-weight-regular) var(--bl-font-body-text-2-size) var(--bl-font-family);--bl-font-body-text-3-font-size: var(--bl-font-size-s);--bl-font-body-text-3-line-height: calc(var(--bl-font-body-text-3-font-size) + var(--bl-size-4xs));--bl-font-body-text-3-size: var(--bl-font-body-text-3-font-size)/var(--bl-font-body-text-3-line-height);--bl-font-body-text-3: var(--bl-font-weight-regular) var(--bl-font-body-text-3-size) var(--bl-font-family);--bl-font-caption-font-size: var(--bl-font-size-xs);--bl-font-caption-line-height: calc(var(--bl-font-caption-font-size) + var(--bl-size-4xs));--bl-font-caption-size: var(--bl-font-caption-font-size)/var(--bl-font-caption-line-height);--bl-font-caption: var(--bl-font-weight-medium) var(--bl-font-caption-size) var(--bl-font-family)}
|
|
2
2
|
/*# sourceMappingURL=default.css.map */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../node_modules/@fontsource/rubik/variable.css", "../../src/themes/default.css"],
|
|
4
|
-
"sourcesContent": ["/* rubik-cyrillic-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-cyrillic-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n} \n/* rubik-cyrillic-ext-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-cyrillic-ext-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n} \n/* rubik-hebrew-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-hebrew-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;\n} \n/* rubik-latin-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-latin-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n} \n/* rubik-latin-ext-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-latin-ext-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n} \n", "@import '@fontsource/rubik/variable.css';\n\n:root {\n /* Colors */\n --bl-color-primary: #f27a1a;\n --bl-color-primary-hover: #ef6114;\n --bl-color-secondary: #273142;\n --bl-color-secondary-hover: #0f131a;\n --bl-color-tertiary: #f1f2f7;\n --bl-color-tertiary-hover: #d5d9e1;\n --bl-color-success: #0bc15c;\n --bl-color-success-hover: #09a44e;\n --bl-color-danger: #ff5043;\n --bl-color-danger-hover: #ff3028;\n --bl-color-warning: #ffb600;\n --bl-color-warning-hover: #ff9800;\n --bl-color-alternative: #5794ff;\n --bl-color-alternative-hover: #457eff;\n --bl-color-featured: #8c4eff;\n --bl-color-featured-hover: #753eff;\n\n /* Background Colors */\n --bl-color-primary-background: #fff;\n --bl-color-accent-primary-background: #fef2e8;\n --bl-color-secondary-background: #f1f2f7;\n --bl-color-tertiary-background: #f7f7fa;\n --bl-color-success-background: #e7f9ef;\n --bl-color-danger-background: #ffeeec;\n --bl-color-warning-background: #fff8e6;\n --bl-color-alternative-background: #eef4ff;\n --bl-color-featured-background: #f4edff;\n\n /* Content Colors */\n --bl-color-content-primary: #273142;\n --bl-color-content-secondary: #6e7787;\n --bl-color-content-tertiary: #95a1b5;\n --bl-color-content-passive: #afbbca;\n --bl-color-content-primary-contrast: #fff;\n --bl-color-content-hover: #f27a1a;\n --bl-color-border: #d5d9e1;\n\n /* Size and Spacing */\n --bl-size-4xs: 0.125rem; /* 2px */\n --bl-size-3xs: 0.25rem; /* 4px */\n --bl-size-2xs: 0.5rem; /* 8px */\n --bl-size-xs: 0.75rem; /* 12px */\n --bl-size-s: 0.875rem; /* 14px */\n --bl-size-m: 1rem; /* 16px */\n --bl-size-l: 1.25rem; /* 20px */\n --bl-size-xl: 1.5rem; /* 24px */\n --bl-size-2xl: 2rem; /* 32px */\n --bl-size-3xl: 2.5rem; /* 40px */\n --bl-size-4xl: 3rem; /* 48px */\n --bl-size-5xl: 4rem; /* 64px */\n --bl-size-6xl: 5rem; /* 80px */\n\n /* Typography */\n --bl-font-family: 'RubikVariable', sans-serif;\n\n /* Font weights */\n --bl-font-weight-light: 300;\n --bl-font-weight-regular: 400;\n --bl-font-weight-medium: 500;\n --bl-font-weight-semibold: 600;\n --bl-font-weight-bold: 700;\n\n /* Font sizes */\n --bl-font-size-2xs: 0.5rem; /* 8px */\n --bl-font-size-xs: 0.625rem; /* 10px */\n --bl-font-size-s: 0.75rem; /* 12px */\n --bl-font-size-m: 0.875rem; /* 14px */\n --bl-font-size-l: 1rem; /* 16px */\n --bl-font-size-xl: 1.25rem; /* 20px */\n --bl-font-size-2xl: 1.5rem; /* 24px */\n --bl-font-size-3xl: 1.75rem; /* 28px */\n --bl-font-size-4xl: 2rem; /* 32px */\n --bl-font-size-5xl: 3rem; /* 48px */\n --bl-font-size-6xl: 4rem; /* 64px */\n\n /* Border radius */\n --bl-border-radius-xs: 0.125rem; /* 2px */\n --bl-border-radius-s: 0.25rem; /* 4px */\n --bl-border-radius-m: 0.375rem; /* 6px */\n --bl-border-radius-l: 0.5rem; /* 8px */\n --bl-border-radius-pill: 62.438rem; /* 999px */\n --bl-border-radius-circle: 50%;\n\n /* Font Style: Display */\n --bl-font-display-font-size: var(--bl-font-size-5xl);\n --bl-font-display-line-height: calc(var(--bl-font-display-font-size) + var(--bl-size-2xs));\n --bl-font-display-size: var(--bl-font-display-font-size)/var(--bl-font-display-line-height);\n --bl-font-display: var(--bl-font-display-size) var(--bl-font-family);\n --bl-font-display-light: var(--bl-font-weight-light) var(--bl-font-display);\n --bl-font-display-regular: var(--bl-font-weight-regular) var(--bl-font-display);\n --bl-font-display-medium: var(--bl-font-weight-medium) var(--bl-font-display);\n --bl-font-display-semibold: var(--bl-font-weight-semibold) var(--bl-font-display);\n --bl-font-display-bold: var(--bl-font-weight-bold) var(--bl-font-display);\n\n /* Font Style: Heading 1 */\n --bl-font-heading-1-font-size: var(--bl-font-size-4xl);\n --bl-font-heading-1-line-height: calc(var(--bl-font-heading-1-font-size) + var(--bl-size-3xs));\n --bl-font-heading-1-size: var(--bl-font-heading-1-font-size)/var(--bl-font-heading-1-line-height);\n --bl-font-heading-1: var(--bl-font-weight-light) var(--bl-font-heading-1-size) var(--bl-font-family);\n\n /* Font Style: Heading 2 */\n --bl-font-heading-2-font-size: var(--bl-font-size-3xl);\n --bl-font-heading-2-line-height: calc(var(--bl-font-heading-2-font-size) + var(--bl-size-3xs));\n --bl-font-heading-2-size: var(--bl-font-heading-2-font-size)/var(--bl-font-heading-2-line-height);\n --bl-font-heading-2: var(--bl-font-weight-regular) var(--bl-font-heading-2-size) var(--bl-font-family);\n\n /* Font Style: Heading 3 */\n --bl-font-heading-3-font-size: var(--bl-font-size-2xl);\n --bl-font-heading-3-line-height: calc(var(--bl-font-heading-3-font-size) + var(--bl-size-3xs));\n --bl-font-heading-3-size: var(--bl-font-heading-3-font-size)/var(--bl-font-heading-3-line-height);\n --bl-font-heading-3: var(--bl-font-weight-regular) var(--bl-font-heading-3-size) var(--bl-font-family);\n\n /* Font Style: Title 1 */\n --bl-font-title-1-font-size: var(--bl-font-size-xl);\n --bl-font-title-1-line-height: calc(var(--bl-font-title-1-font-size) + var(--bl-size-3xs));\n --bl-font-title-1-size: var(--bl-font-title-1-font-size)/var(--bl-font-title-1-line-height);\n --bl-font-title-1: var(--bl-font-title-1-size) var(--bl-font-family);\n --bl-font-title-1-regular: var(--bl-font-weight-regular) var(--bl-font-title-1);\n --bl-font-title-1-medium: var(--bl-font-weight-medium) var(--bl-font-title-1);\n --bl-font-title-1-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-1);\n --bl-font-title-1-bold: var(--bl-font-weight-bold) var(--bl-font-title-1);\n\n /* Font Style: Title 2 */\n --bl-font-title-2-font-size: var(--bl-font-size-l);\n --bl-font-title-2-line-height: calc(var(--bl-font-title-2-font-size) + var(--bl-size-3xs));\n --bl-font-title-2-size: var(--bl-font-title-2-font-size)/var(--bl-font-title-2-line-height);\n --bl-font-title-2: var(--bl-font-title-2-size) var(--bl-font-family);\n --bl-font-title-2-regular: var(--bl-font-weight-regular) var(--bl-font-title-2);\n --bl-font-title-2-medium: var(--bl-font-weight-medium) var(--bl-font-title-2);\n --bl-font-title-2-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-2);\n --bl-font-title-2-bold: var(--bl-font-weight-bold) var(--bl-font-title-2);\n\n /* Font Style: Title 3 */\n --bl-font-title-3-font-size: var(--bl-font-size-m);\n --bl-font-title-3-line-height: calc(var(--bl-font-title-3-font-size) + var(--bl-size-4xs));\n --bl-font-title-3-size: var(--bl-font-title-3-font-size)/var(--bl-font-title-3-line-height);\n --bl-font-title-3: var(--bl-font-title-3-size) var(--bl-font-family);\n --bl-font-title-3-regular: var(--bl-font-weight-regular) var(--bl-font-title-3);\n --bl-font-title-3-medium: var(--bl-font-weight-medium) var(--bl-font-title-3);\n --bl-font-title-3-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-3);\n --bl-font-title-3-bold: var(--bl-font-weight-bold) var(--bl-font-title-3);\n\n /* Font Style: Title 4 */\n --bl-font-title-4-font-size: var(--bl-font-size-s);\n --bl-font-title-4-line-height: calc(var(--bl-font-title-4-font-size) + var(--bl-size-4xs));\n --bl-font-title-4-size: var(--bl-font-title-4-font-size)/var(--bl-font-title-4-line-height);\n --bl-font-title-4: var(--bl-font-title-4-size) var(--bl-font-family);\n --bl-font-title-4-regular: var(--bl-font-weight-regular) var(--bl-font-title-4);\n --bl-font-title-4-medium: var(--bl-font-weight-medium) var(--bl-font-title-4);\n --bl-font-title-4-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-4);\n --bl-font-title-4-bold: var(--bl-font-weight-bold) var(--bl-font-title-4);\n\n /* Font Style: Body Text 1 */\n --bl-font-body-text-1-font-size: var(--bl-font-size-l);\n --bl-font-body-text-1-line-height: calc(var(--bl-font-body-text-1-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-1-size: var(--bl-font-body-text-1-font-size)/var(--bl-font-body-text-1-line-height);\n --bl-font-body-text-1: var(--bl-font-weight-regular) var(--bl-font-body-text-1-size) var(--bl-font-family);\n\n /* Font Style: Body Text 2 */\n --bl-font-body-text-2-font-size: var(--bl-font-size-m);\n --bl-font-body-text-2-line-height: calc(var(--bl-font-body-text-2-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-2-size: var(--bl-font-body-text-2-font-size)/var(--bl-font-body-text-2-line-height);\n --bl-font-body-text-2: var(--bl-font-weight-regular) var(--bl-font-body-text-2-size) var(--bl-font-family);\n\n /* Font Style: Body Text 3 */\n --bl-font-body-text-3-font-size: var(--bl-font-size-s);\n --bl-font-body-text-3-line-height: calc(var(--bl-font-body-text-3-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-3-size: var(--bl-font-body-text-3-font-size)/var(--bl-font-body-text-3-line-height);\n --bl-font-body-text-3: var(--bl-font-weight-regular) var(--bl-font-body-text-3-size) var(--bl-font-family);\n\n /* Font Style: Caption */\n --bl-font-caption-font-size: var(--bl-font-size-s);\n --bl-font-caption-line-height: calc(var(--bl-font-caption-font-size) + var(--bl-size-4xs));\n --bl-font-caption-size: var(--bl-font-caption-font-size)/var(--bl-font-caption-line-height);\n --bl-font-caption: var(--bl-font-weight-medium) var(--bl-font-caption-size) var(--bl-font-family);\n}\n"],
|
|
5
|
-
"mappings": "AACA,WACE,0BACA,kBACA,kBACA,oBACA,iFACA,yDAGF,WACE,0BACA,kBACA,kBACA,oBACA,qFACA,iFAGF,WACE,0BACA,kBACA,kBACA,oBACA,+EACA,gEAGF,WACE,0BACA,kBACA,kBACA,oBACA,8EACA,yJAGF,WACE,0BACA,kBACA,kBACA,oBACA,kFACA,2GCzCF,MAEE,4BACA,kCACA,8BACA,oCACA,6BACA,mCACA,4BACA,kCACA,2BACA,iCACA,4BACA,kCACA,gCACA,sCACA,6BACA,mCAGA,oCACA,8CACA,yCACA,wCACA,uCACA,sCACA,uCACA,2CACA,wCAGA,oCACA,sCACA,qCACA,oCACA,0CACA,kCACA,2BAGA,uBACA,sBACA,qBACA,qBACA,qBACA,kBACA,qBACA,qBACA,oBACA,sBACA,oBACA,oBACA,oBAGA,8CAGA,4BACA,8BACA,6BACA,+BACA,2BAGA,0BACA,2BACA,yBACA,0BACA,uBACA,2BACA,2BACA,4BACA,yBACA,yBACA,yBAGA,+BACA,6BACA,8BACA,4BACA,mCACA,+BAGA,qDACA,2FACA,4FACA,qEACA,4EACA,gFACA,8EACA,kFACA,0EAGA,uDACA,+FACA,kGACA,qGAGC,uDACA,+FACA,kGACA,uGAGA,uDACA,+FACA,kGACA,uGAGD,oDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,uDACA,mGACA,wGACA,2GAGA,uDACA,mGACA,wGACA,2GAGA,uDACA,mGACA,wGACA,2GAGA,
|
|
4
|
+
"sourcesContent": ["/* rubik-cyrillic-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-cyrillic-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n} \n/* rubik-cyrillic-ext-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-cyrillic-ext-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n} \n/* rubik-hebrew-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-hebrew-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;\n} \n/* rubik-latin-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-latin-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n} \n/* rubik-latin-ext-variable-wghtOnly-normal */\n@font-face {\n font-family: 'RubikVariable';\n font-style: normal;\n font-display: swap;\n font-weight: 300 900;\n src: url('./files/rubik-latin-ext-variable-wghtOnly-normal.woff2') format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n} \n", "@import '@fontsource/rubik/variable.css';\n\n:root {\n /* Colors */\n --bl-color-primary: #f27a1a;\n --bl-color-primary-hover: #ef6114;\n --bl-color-secondary: #273142;\n --bl-color-secondary-hover: #0f131a;\n --bl-color-tertiary: #f1f2f7;\n --bl-color-tertiary-hover: #d5d9e1;\n --bl-color-success: #0bc15c;\n --bl-color-success-hover: #09a44e;\n --bl-color-danger: #ff5043;\n --bl-color-danger-hover: #ff3028;\n --bl-color-warning: #ffb600;\n --bl-color-warning-hover: #ff9800;\n --bl-color-alternative: #5794ff;\n --bl-color-alternative-hover: #457eff;\n --bl-color-featured: #8c4eff;\n --bl-color-featured-hover: #753eff;\n\n /* Background Colors */\n --bl-color-primary-background: #fff;\n --bl-color-accent-primary-background: #fef2e8;\n --bl-color-secondary-background: #f1f2f7;\n --bl-color-tertiary-background: #f7f7fa;\n --bl-color-success-background: #e7f9ef;\n --bl-color-danger-background: #ffeeec;\n --bl-color-warning-background: #fff8e6;\n --bl-color-alternative-background: #eef4ff;\n --bl-color-featured-background: #f4edff;\n\n /* Content Colors */\n --bl-color-content-primary: #273142;\n --bl-color-content-secondary: #6e7787;\n --bl-color-content-tertiary: #95a1b5;\n --bl-color-content-passive: #afbbca;\n --bl-color-content-primary-contrast: #fff;\n --bl-color-content-hover: #f27a1a;\n --bl-color-border: #d5d9e1;\n\n /* Size and Spacing */\n --bl-size-4xs: 0.125rem; /* 2px */\n --bl-size-3xs: 0.25rem; /* 4px */\n --bl-size-2xs: 0.5rem; /* 8px */\n --bl-size-xs: 0.75rem; /* 12px */\n --bl-size-s: 0.875rem; /* 14px */\n --bl-size-m: 1rem; /* 16px */\n --bl-size-l: 1.25rem; /* 20px */\n --bl-size-xl: 1.5rem; /* 24px */\n --bl-size-2xl: 2rem; /* 32px */\n --bl-size-3xl: 2.5rem; /* 40px */\n --bl-size-4xl: 3rem; /* 48px */\n --bl-size-5xl: 4rem; /* 64px */\n --bl-size-6xl: 5rem; /* 80px */\n\n /* Typography */\n --bl-font-family: 'RubikVariable', sans-serif;\n\n /* Font weights */\n --bl-font-weight-light: 300;\n --bl-font-weight-regular: 400;\n --bl-font-weight-medium: 500;\n --bl-font-weight-semibold: 600;\n --bl-font-weight-bold: 700;\n\n /* Font sizes */\n --bl-font-size-2xs: 0.5rem; /* 8px */\n --bl-font-size-xs: 0.625rem; /* 10px */\n --bl-font-size-s: 0.75rem; /* 12px */\n --bl-font-size-m: 0.875rem; /* 14px */\n --bl-font-size-l: 1rem; /* 16px */\n --bl-font-size-xl: 1.25rem; /* 20px */\n --bl-font-size-2xl: 1.5rem; /* 24px */\n --bl-font-size-3xl: 1.75rem; /* 28px */\n --bl-font-size-4xl: 2rem; /* 32px */\n --bl-font-size-5xl: 3rem; /* 48px */\n --bl-font-size-6xl: 4rem; /* 64px */\n\n /* Border radius */\n --bl-border-radius-xs: 0.125rem; /* 2px */\n --bl-border-radius-s: 0.25rem; /* 4px */\n --bl-border-radius-m: 0.375rem; /* 6px */\n --bl-border-radius-l: 0.5rem; /* 8px */\n --bl-border-radius-pill: 62.438rem; /* 999px */\n --bl-border-radius-circle: 50%;\n\n /* Font Style: Display */\n --bl-font-display-font-size: var(--bl-font-size-5xl);\n --bl-font-display-line-height: calc(var(--bl-font-display-font-size) + var(--bl-size-2xs));\n --bl-font-display-size: var(--bl-font-display-font-size)/var(--bl-font-display-line-height);\n --bl-font-display: var(--bl-font-display-size) var(--bl-font-family);\n --bl-font-display-light: var(--bl-font-weight-light) var(--bl-font-display);\n --bl-font-display-regular: var(--bl-font-weight-regular) var(--bl-font-display);\n --bl-font-display-medium: var(--bl-font-weight-medium) var(--bl-font-display);\n --bl-font-display-semibold: var(--bl-font-weight-semibold) var(--bl-font-display);\n --bl-font-display-bold: var(--bl-font-weight-bold) var(--bl-font-display);\n\n /* Font Style: Heading 1 */\n --bl-font-heading-1-font-size: var(--bl-font-size-4xl);\n --bl-font-heading-1-line-height: calc(var(--bl-font-heading-1-font-size) + var(--bl-size-3xs));\n --bl-font-heading-1-size: var(--bl-font-heading-1-font-size)/var(--bl-font-heading-1-line-height);\n --bl-font-heading-1: var(--bl-font-weight-light) var(--bl-font-heading-1-size) var(--bl-font-family);\n\n /* Font Style: Heading 2 */\n --bl-font-heading-2-font-size: var(--bl-font-size-3xl);\n --bl-font-heading-2-line-height: calc(var(--bl-font-heading-2-font-size) + var(--bl-size-3xs));\n --bl-font-heading-2-size: var(--bl-font-heading-2-font-size)/var(--bl-font-heading-2-line-height);\n --bl-font-heading-2: var(--bl-font-weight-regular) var(--bl-font-heading-2-size) var(--bl-font-family);\n\n /* Font Style: Heading 3 */\n --bl-font-heading-3-font-size: var(--bl-font-size-2xl);\n --bl-font-heading-3-line-height: calc(var(--bl-font-heading-3-font-size) + var(--bl-size-3xs));\n --bl-font-heading-3-size: var(--bl-font-heading-3-font-size)/var(--bl-font-heading-3-line-height);\n --bl-font-heading-3: var(--bl-font-weight-regular) var(--bl-font-heading-3-size) var(--bl-font-family);\n\n /* Font Style: Title 1 */\n --bl-font-title-1-font-size: var(--bl-font-size-xl);\n --bl-font-title-1-line-height: calc(var(--bl-font-title-1-font-size) + var(--bl-size-3xs));\n --bl-font-title-1-size: var(--bl-font-title-1-font-size)/var(--bl-font-title-1-line-height);\n --bl-font-title-1: var(--bl-font-title-1-size) var(--bl-font-family);\n --bl-font-title-1-regular: var(--bl-font-weight-regular) var(--bl-font-title-1);\n --bl-font-title-1-medium: var(--bl-font-weight-medium) var(--bl-font-title-1);\n --bl-font-title-1-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-1);\n --bl-font-title-1-bold: var(--bl-font-weight-bold) var(--bl-font-title-1);\n\n /* Font Style: Title 2 */\n --bl-font-title-2-font-size: var(--bl-font-size-l);\n --bl-font-title-2-line-height: calc(var(--bl-font-title-2-font-size) + var(--bl-size-3xs));\n --bl-font-title-2-size: var(--bl-font-title-2-font-size)/var(--bl-font-title-2-line-height);\n --bl-font-title-2: var(--bl-font-title-2-size) var(--bl-font-family);\n --bl-font-title-2-regular: var(--bl-font-weight-regular) var(--bl-font-title-2);\n --bl-font-title-2-medium: var(--bl-font-weight-medium) var(--bl-font-title-2);\n --bl-font-title-2-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-2);\n --bl-font-title-2-bold: var(--bl-font-weight-bold) var(--bl-font-title-2);\n\n /* Font Style: Title 3 */\n --bl-font-title-3-font-size: var(--bl-font-size-m);\n --bl-font-title-3-line-height: calc(var(--bl-font-title-3-font-size) + var(--bl-size-4xs));\n --bl-font-title-3-size: var(--bl-font-title-3-font-size)/var(--bl-font-title-3-line-height);\n --bl-font-title-3: var(--bl-font-title-3-size) var(--bl-font-family);\n --bl-font-title-3-regular: var(--bl-font-weight-regular) var(--bl-font-title-3);\n --bl-font-title-3-medium: var(--bl-font-weight-medium) var(--bl-font-title-3);\n --bl-font-title-3-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-3);\n --bl-font-title-3-bold: var(--bl-font-weight-bold) var(--bl-font-title-3);\n\n /* Font Style: Title 4 */\n --bl-font-title-4-font-size: var(--bl-font-size-s);\n --bl-font-title-4-line-height: calc(var(--bl-font-title-4-font-size) + var(--bl-size-4xs));\n --bl-font-title-4-size: var(--bl-font-title-4-font-size)/var(--bl-font-title-4-line-height);\n --bl-font-title-4: var(--bl-font-title-4-size) var(--bl-font-family);\n --bl-font-title-4-regular: var(--bl-font-weight-regular) var(--bl-font-title-4);\n --bl-font-title-4-medium: var(--bl-font-weight-medium) var(--bl-font-title-4);\n --bl-font-title-4-semibold: var(--bl-font-weight-semibold) var(--bl-font-title-4);\n --bl-font-title-4-bold: var(--bl-font-weight-bold) var(--bl-font-title-4);\n\n /* Font Style: Body Text 1 */\n --bl-font-body-text-1-font-size: var(--bl-font-size-l);\n --bl-font-body-text-1-line-height: calc(var(--bl-font-body-text-1-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-1-size: var(--bl-font-body-text-1-font-size)/var(--bl-font-body-text-1-line-height);\n --bl-font-body-text-1: var(--bl-font-weight-regular) var(--bl-font-body-text-1-size) var(--bl-font-family);\n\n /* Font Style: Body Text 2 */\n --bl-font-body-text-2-font-size: var(--bl-font-size-m);\n --bl-font-body-text-2-line-height: calc(var(--bl-font-body-text-2-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-2-size: var(--bl-font-body-text-2-font-size)/var(--bl-font-body-text-2-line-height);\n --bl-font-body-text-2: var(--bl-font-weight-regular) var(--bl-font-body-text-2-size) var(--bl-font-family);\n\n /* Font Style: Body Text 3 */\n --bl-font-body-text-3-font-size: var(--bl-font-size-s);\n --bl-font-body-text-3-line-height: calc(var(--bl-font-body-text-3-font-size) + var(--bl-size-4xs));\n --bl-font-body-text-3-size: var(--bl-font-body-text-3-font-size)/var(--bl-font-body-text-3-line-height);\n --bl-font-body-text-3: var(--bl-font-weight-regular) var(--bl-font-body-text-3-size) var(--bl-font-family);\n\n /* Font Style: Caption */\n --bl-font-caption-font-size: var(--bl-font-size-xs);\n --bl-font-caption-line-height: calc(var(--bl-font-caption-font-size) + var(--bl-size-4xs));\n --bl-font-caption-size: var(--bl-font-caption-font-size)/var(--bl-font-caption-line-height);\n --bl-font-caption: var(--bl-font-weight-medium) var(--bl-font-caption-size) var(--bl-font-family);\n}\n"],
|
|
5
|
+
"mappings": "AACA,WACE,0BACA,kBACA,kBACA,oBACA,iFACA,yDAGF,WACE,0BACA,kBACA,kBACA,oBACA,qFACA,iFAGF,WACE,0BACA,kBACA,kBACA,oBACA,+EACA,gEAGF,WACE,0BACA,kBACA,kBACA,oBACA,8EACA,yJAGF,WACE,0BACA,kBACA,kBACA,oBACA,kFACA,2GCzCF,MAEE,4BACA,kCACA,8BACA,oCACA,6BACA,mCACA,4BACA,kCACA,2BACA,iCACA,4BACA,kCACA,gCACA,sCACA,6BACA,mCAGA,oCACA,8CACA,yCACA,wCACA,uCACA,sCACA,uCACA,2CACA,wCAGA,oCACA,sCACA,qCACA,oCACA,0CACA,kCACA,2BAGA,uBACA,sBACA,qBACA,qBACA,qBACA,kBACA,qBACA,qBACA,oBACA,sBACA,oBACA,oBACA,oBAGA,8CAGA,4BACA,8BACA,6BACA,+BACA,2BAGA,0BACA,2BACA,yBACA,0BACA,uBACA,2BACA,2BACA,4BACA,yBACA,yBACA,yBAGA,+BACA,6BACA,8BACA,4BACA,mCACA,+BAGA,qDACA,2FACA,4FACA,qEACA,4EACA,gFACA,8EACA,kFACA,0EAGA,uDACA,+FACA,kGACA,qGAGC,uDACA,+FACA,kGACA,uGAGA,uDACA,+FACA,kGACA,uGAGD,oDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,mDACA,2FACA,4FACA,qEACA,gFACA,8EACA,kFACA,0EAGA,uDACA,mGACA,wGACA,2GAGA,uDACA,mGACA,wGACA,2GAGA,uDACA,mGACA,wGACA,2GAGA,oDACA,2FACA,4FACA",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trendyol/baklava",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.64",
|
|
4
4
|
"description": "Trendyol Baklava Design System",
|
|
5
5
|
"main": "dist/baklava.js",
|
|
6
6
|
"module": "dist/baklava.js",
|
|
@@ -34,8 +34,7 @@
|
|
|
34
34
|
"format": "npm-run-all -s format:*",
|
|
35
35
|
"format:code": "eslint --fix ./src && prettier --write ./src",
|
|
36
36
|
"fix": "npm run format && npm run lint",
|
|
37
|
-
"chromatic": "npx chromatic --
|
|
38
|
-
"chromatic:force": "npx chromatic --only-changed --project-token 14b660c71183 --force-rebuild",
|
|
37
|
+
"chromatic": "npx chromatic --only-changed --project-token 14b660c71183 --force-rebuild",
|
|
39
38
|
"ci": "rm -rf node_modules && npm install --frozen-lockfile",
|
|
40
39
|
"clean": "npm-run-all -s clean:*",
|
|
41
40
|
"clean:dist": "rimraf dist",
|
|
@@ -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:var(--bl-color-primary-background);--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--z-index: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);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}: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:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));max-width:max-content;transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial;right:var(--padding-horizontal)}:host([label-fixed]) .select-wrapper{padding-top:var(--bl-size-m)}:host([label-fixed]) label{top:0;left:0;right:0;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color)}.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 opened() {\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 size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\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 ${this.multiple ? removeButton : null}\n <bl-icon\n class=\"dropdown-icon open\"\n name=\"arrow_up\"\n ></bl-icon>\n\n <bl-icon\n class=\"dropdown-icon closed\"\n name=\"arrow_down\"\n ></bl-icon>\n </div>\n </div>`;\n }\n\n 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.opened,\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,knJACfC,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,KAAK,MAAM,EACX,KAAK,eAAe,EAExB,EAjIA,WAAW,QAAyB,CAClC,MAAO,CAACG,CAAK,CACf,CAwFA,IAAI,SAAU,CACZ,OAAO,KAAK,iBACd,CAEA,IAAI,QAAS,CACX,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,EACnB,SAAS,iBAAiB,QAAS,KAAK,oBAAoB,CAC9D,C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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
|
-
}
|
package/dist/chunk-K7XUIYGD.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{a as g}from"./chunk-KQBKSEYJ.js";import{a as m}from"./chunk-5VLVLBWY.js";import{a as u}from"./chunk-ENFFFE4I.js";import{a as o}from"./chunk-2TVOKUHE.js";import{a as d}from"./chunk-23UFIOHV.js";import{a as c,b as s,f as p,g as b,h as i,i as v,j as h}from"./chunk-HG7OBTQS.js";import{a as e}from"./chunk-NZ3RGSR6.js";var y=a=>{if(a.reportValidity()){let l=new Event("submit",{cancelable:!0});a.dispatchEvent(l),l.defaultPrevented||a.submit()}else return};var T=["valueMissing","typeMismatch","tooLong","tooShort","rangeUnderflow","rangeOverflow","badInput","customError"],f=T.map(a=>({key:a,isValid(l){return l.validationTarget?!l.validationTarget.validity[a]:!0}}));var k=c`:host{display:inline-block;width:200px;position:relative;--bl-input-padding-vertical:var(--bl-size-2xs);--bl-input-padding-horizontal:var(--bl-size-xs);--bl-input-border-color:var(--bl-color-border);--bl-input-icon-color:var(--bl-color-content-tertiary);--bl-input-text-color:var(--bl-color-content-primary);--bl-input-height:var(--bl-size-2xl)}input{outline:0;box-sizing:border-box;height:var(--bl-input-height);border:solid 1px var(--bl-input-border-color);width:100%;font:var(--bl-font-title-3-regular);padding:0 var(--bl-input-padding-horizontal);margin:0;border-radius:4px;color:var(--bl-input-text-color)}bl-icon{position:absolute;top:var(--bl-input-padding-vertical);right:var(--bl-input-padding-horizontal);font-size:var(--bl-size-m);z-index:1;color:var(--bl-input-icon-color)}input:focus{--bl-input-border-color:var(--bl-color-primary)}:host([label-fixed]) bl-icon{top:calc(var(--bl-input-padding-vertical) + var(--bl-size-m))}input:focus ~ bl-icon{--bl-input-icon-color:var(--bl-color-primary)}:host ::placeholder{color:var(--bl-color-content-tertiary)}:host([label]) ::placeholder{color:transparent;transition:color ease-out .4s}:host input:focus::placeholder,:host([label-fixed]) ::placeholder{color:var(--bl-color-content-tertiary)}input:disabled{background-color:var(--bl-color-primary-background);--bl-input-text-color:var(--bl-color-content-tertiary)}input.dirty:invalid{--bl-input-border-color:var(--bl-color-danger)}input.has-icon{padding-right:calc(var(--bl-size-xs) * 2 + var(--bl-size-m))}.error-icon,.invalid-text{display:none}label{position:absolute;top:var(--bl-input-padding-vertical);left:var(--bl-input-padding-horizontal);transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);color:var(--bl-color-content-tertiary);padding:0}:where(input:focus,input.has-value) ~ label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-caption);color:var(--bl-color-content-secondary);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial}:host([label-fixed]){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-caption);color:var(--bl-color-content-secondary);padding:0}.dirty:invalid ~ label{color:var(--bl-color-danger)}.invalid-text,.help-text{font:var(--bl-font-title-4-regular);padding:var(--bl-size-3xs) var(--bl-input-padding-horizontal);margin:0}.invalid-text{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}.error-icon{color:var(--bl-color-danger)}.dirty:invalid ~ .invalid-text{display:block}.dirty:invalid ~ .help-text{display:none}.dirty:invalid ~ .error-icon{display:inline-block}.dirty:invalid ~ .custom-icon ~ .error-icon{display:none}.dirty:invalid ~ .custom-icon{--bl-input-icon-color:var(--bl-color-danger)}:host([size='large']){--bl-input-height:var(--bl-size-3xl);--bl-input-padding-vertical:var(--bl-size-xs);--bl-input-padding-horizontal:var(--bl-size-m)}`,x=k;var t=class extends m(p){constructor(){super(...arguments);this.type="text";this.value="";this.required=!1;this.size="medium";this.disabled=!1;this.labelFixed=!1;this.onKeydown=r=>{r.code==="Enter"&&this.form&&y(this.form)};this.onError=()=>{this.onInvalid(this.internals.validity)};this.dirty=!1}static get styles(){return[x]}connectedCallback(){var r;super.connectedCallback(),this.addEventListener("keydown",this.onKeydown),this.addEventListener("invalid",this.onError),(r=this.internals.form)==null||r.addEventListener("submit",()=>{this.reportValidity()})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.onKeydown),this.removeEventListener("invalid",this.onError)}validityCallback(){var r;return this.customInvalidText||((r=this.validationTarget)==null?void 0:r.validationMessage)}reportValidity(){return this.dirty=!0,this.checkValidity()}valueChangedCallback(r){this.value=r}inputHandler(r){let n=r.target.value;this.setValue(n),this.onInput(n)}changeHandler(r){let n=r.target.value;this.dirty=!0,this.setValue(n),this.onChange(n)}firstUpdated(){this.setValue(this.value)}render(){let r=this.checkValidity()?"":s`<p id="errorMessage" aria-live="polite" class="invalid-text">${this.validationMessage}</p>`,n=this.helpText?s`<p id="helpText" class="help-text">${this.helpText}</p>`:"",E=this.icon?s` <bl-icon class="custom-icon" name="${this.icon}"></bl-icon>`:"",z=this.label?s`<label for="input">${this.label}</label>`:"",$={dirty:this.dirty,"has-icon":this.icon||this.dirty&&!this.checkValidity(),"has-value":this.value!==null&&this.value!==""};return s`
|
|
2
|
-
<input
|
|
3
|
-
id="input"
|
|
4
|
-
type=${this.type}
|
|
5
|
-
class=${u($)}
|
|
6
|
-
.value=${g(this.value)}
|
|
7
|
-
placeholder="${o(this.placeholder)}"
|
|
8
|
-
minlength="${o(this.minlength)}"
|
|
9
|
-
maxlength="${o(this.maxlength)}"
|
|
10
|
-
min="${o(this.min)}"
|
|
11
|
-
max="${o(this.max)}"
|
|
12
|
-
step="${o(this.step)}"
|
|
13
|
-
?required=${this.required}
|
|
14
|
-
?disabled=${this.disabled}
|
|
15
|
-
@change=${this.changeHandler}
|
|
16
|
-
@input=${this.inputHandler}
|
|
17
|
-
aria-invalid=${this.checkValidity()?"false":"true"}
|
|
18
|
-
aria-describedby=${o(this.helpText?"helpText":void 0)}
|
|
19
|
-
aria-errormessage=${o(this.checkValidity()?void 0:"errorMessage")}
|
|
20
|
-
/>
|
|
21
|
-
${z} ${E}
|
|
22
|
-
<bl-icon class="error-icon" name="alert"></bl-icon>
|
|
23
|
-
${r} ${n}
|
|
24
|
-
`}};t.formControlValidators=f,e([h("input")],t.prototype,"validationTarget",2),e([i({})],t.prototype,"type",2),e([i({reflect:!0})],t.prototype,"label",2),e([i({})],t.prototype,"placeholder",2),e([i()],t.prototype,"value",2),e([i({type:Boolean})],t.prototype,"required",2),e([i({type:Number})],t.prototype,"minlength",2),e([i({type:Number})],t.prototype,"maxlength",2),e([i({type:Number})],t.prototype,"min",2),e([i({type:Number})],t.prototype,"max",2),e([i({type:Number})],t.prototype,"step",2),e([i({type:String})],t.prototype,"icon",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,attribute:"label-fixed",reflect:!0})],t.prototype,"labelFixed",2),e([i({type:String,attribute:"invalid-text"})],t.prototype,"customInvalidText",2),e([i({type:String,attribute:"help-text"})],t.prototype,"helpText",2),e([d("bl-change")],t.prototype,"onChange",2),e([d("bl-input")],t.prototype,"onInput",2),e([d("bl-invalid")],t.prototype,"onInvalid",2),e([v()],t.prototype,"dirty",2),t=e([b("bl-input")],t);export{t as a};
|
|
25
|
-
//# sourceMappingURL=chunk-K7XUIYGD.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../node_modules/@open-wc/form-helpers/src/index.ts", "../src/utilities/form-control.ts", "../src/components/input/bl-input.css", "../src/components/input/bl-input.ts"],
|
|
4
|
-
"sourcesContent": [null, "const validityStates: Array<keyof ValidityState> = [\n 'valueMissing',\n 'typeMismatch',\n 'tooLong',\n 'tooShort',\n 'rangeUnderflow',\n 'rangeOverflow',\n 'badInput',\n 'customError',\n];\n\nexport const innerInputValidators = validityStates.map(key => ({\n key,\n isValid(instance: HTMLElement & { validationTarget: HTMLInputElement }) {\n if (instance.validationTarget) {\n return !instance.validationTarget.validity[key];\n }\n return true;\n },\n}));\n", "import {css} from 'lit';\nexport const styles = css`:host{display:inline-block;width:200px;position:relative;--bl-input-padding-vertical:var(--bl-size-2xs);--bl-input-padding-horizontal:var(--bl-size-xs);--bl-input-border-color:var(--bl-color-border);--bl-input-icon-color:var(--bl-color-content-tertiary);--bl-input-text-color:var(--bl-color-content-primary);--bl-input-height:var(--bl-size-2xl)}input{outline:0;box-sizing:border-box;height:var(--bl-input-height);border:solid 1px var(--bl-input-border-color);width:100%;font:var(--bl-font-title-3-regular);padding:0 var(--bl-input-padding-horizontal);margin:0;border-radius:4px;color:var(--bl-input-text-color)}bl-icon{position:absolute;top:var(--bl-input-padding-vertical);right:var(--bl-input-padding-horizontal);font-size:var(--bl-size-m);z-index:1;color:var(--bl-input-icon-color)}input:focus{--bl-input-border-color:var(--bl-color-primary)}:host([label-fixed]) bl-icon{top:calc(var(--bl-input-padding-vertical) + var(--bl-size-m))}input:focus ~ bl-icon{--bl-input-icon-color:var(--bl-color-primary)}:host ::placeholder{color:var(--bl-color-content-tertiary)}:host([label]) ::placeholder{color:transparent;transition:color ease-out .4s}:host input:focus::placeholder,:host([label-fixed]) ::placeholder{color:var(--bl-color-content-tertiary)}input:disabled{background-color:var(--bl-color-primary-background);--bl-input-text-color:var(--bl-color-content-tertiary)}input.dirty:invalid{--bl-input-border-color:var(--bl-color-danger)}input.has-icon{padding-right:calc(var(--bl-size-xs) * 2 + var(--bl-size-m))}.error-icon,.invalid-text{display:none}label{position:absolute;top:var(--bl-input-padding-vertical);left:var(--bl-input-padding-horizontal);transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);color:var(--bl-color-content-tertiary);padding:0}:where(input:focus,input.has-value) ~ label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-caption);color:var(--bl-color-content-secondary);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial}:host([label-fixed]){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-caption);color:var(--bl-color-content-secondary);padding:0}.dirty:invalid ~ label{color:var(--bl-color-danger)}.invalid-text,.help-text{font:var(--bl-font-title-4-regular);padding:var(--bl-size-3xs) var(--bl-input-padding-horizontal);margin:0}.invalid-text{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}.error-icon{color:var(--bl-color-danger)}.dirty:invalid ~ .invalid-text{display:block}.dirty:invalid ~ .help-text{display:none}.dirty:invalid ~ .error-icon{display:inline-block}.dirty:invalid ~ .custom-icon ~ .error-icon{display:none}.dirty:invalid ~ .custom-icon{--bl-input-icon-color:var(--bl-color-danger)}:host([size='large']){--bl-input-height:var(--bl-size-3xl);--bl-input-padding-vertical:var(--bl-size-xs);--bl-input-padding-horizontal:var(--bl-size-m)}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { FormControlMixin } from '@open-wc/form-control';\nimport { submit } from '@open-wc/form-helpers';\nimport { live } from 'lit/directives/live.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport { innerInputValidators } from '../../utilities/form-control';\nimport 'element-internals-polyfill';\nimport '../icon/bl-icon';\n\nimport style from './bl-input.css';\n\nexport type InputSize = 'medium' | 'large';\n/**\n * @tag bl-input\n * @summary Baklava Input component\n */\n@customElement('bl-input')\nexport default class BlInput extends FormControlMixin(LitElement) {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n static formControlValidators = innerInputValidators;\n\n @query('input')\n validationTarget: HTMLInputElement;\n\n /**\n * Type of the input. It's used to set `type` attribute of native input inside. Only `text` and `number` is supported for now.\n */\n @property({})\n type: 'text' | 'number' = 'text';\n\n /**\n * Sets label of the input\n */\n @property({ reflect: true })\n label?: string;\n\n /**\n * Sets placeholder of the input\n */\n @property({})\n placeholder?: string;\n\n /**\n * Sets initial value of the input\n */\n @property()\n value = '';\n\n /**\n * Makes input a mandatory field\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Sets minimum length of the input\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * Sets maximum length of the input\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * Sets the smallest number can be entered to a `number` input\n */\n @property({ type: Number })\n min?: number;\n\n /**\n * Sets the biggest number can be entered to a `number` input\n */\n @property({ type: Number })\n max?: number;\n\n /**\n * Sets the increase and decrease step to a `number` input\n */\n @property({ type: Number })\n step?: number;\n\n /**\n * Sets the custom icon name. `bl-icon` component is used to show an icon\n */\n @property({ type: String })\n icon?: string;\n\n /**\n * Sets input size.\n */\n @property({ type: String, reflect: true })\n size?: InputSize = 'medium';\n\n /**\n * Disables the input\n */\n @property({ type: Boolean, reflect: true })\n disabled = 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 * Set custom error message\n */\n @property({ type: String, attribute: 'invalid-text' })\n customInvalidText?: string;\n\n /**\n * Adds help text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText?: string;\n\n /**\n * Fires when an alteration to the element's value is committed by the user. Unlike the input event, the change event is not necessarily fired for each alteration to an element's value.\n */\n @event('bl-change') private onChange: EventDispatcher<string>;\n\n /**\n * Fires when the value of an input element has been changed.\n */\n @event('bl-input') private onInput: EventDispatcher<string>;\n\n /**\n * Fires when the value of an input element has been changed.\n */\n @event('bl-invalid') private onInvalid: EventDispatcher<ValidityState>;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('keydown', this.onKeydown);\n this.addEventListener('invalid', this.onError);\n\n this.internals.form?.addEventListener('submit', () => {\n this.reportValidity();\n });\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('keydown', this.onKeydown);\n this.removeEventListener('invalid', this.onError);\n }\n\n private onKeydown = (event: KeyboardEvent): void => {\n if (event.code === 'Enter' && this.form) {\n submit(this.form);\n }\n }\n\n private onError = (): void => {\n this.onInvalid(this.internals.validity);\n }\n\n @state() private dirty = false;\n\n validityCallback(): string | void {\n return this.customInvalidText || this.validationTarget?.validationMessage;\n }\n\n reportValidity() {\n this.dirty = true;\n return this.checkValidity();\n }\n\n valueChangedCallback(value: string): void {\n this.value = value;\n }\n\n private inputHandler(event: Event) {\n const value = (event.target as HTMLInputElement).value;\n\n this.setValue(value);\n this.onInput(value);\n }\n\n private changeHandler(event: Event) {\n const value = (event.target as HTMLInputElement).value;\n\n this.dirty = true;\n this.setValue(value);\n this.onChange(value);\n }\n\n firstUpdated() {\n this.setValue(this.value);\n }\n\n render(): TemplateResult {\n const invalidMessage = !this.checkValidity()\n ? html`<p id=\"errorMessage\" aria-live=\"polite\" class=\"invalid-text\">${this.validationMessage}</p>`\n : ``;\n const helpMessage = this.helpText ? html`<p id=\"helpText\" class=\"help-text\">${this.helpText}</p>` : ``;\n const icon = this.icon\n ? html` <bl-icon class=\"custom-icon\" name=\"${this.icon}\"></bl-icon>`\n : '';\n const label = this.label ? html`<label for=\"input\">${this.label}</label>` : '';\n\n const classes = {\n 'dirty': this.dirty,\n 'has-icon': this.icon || (this.dirty && !this.checkValidity()),\n 'has-value': this.value !== null && this.value !== '',\n };\n\n return html`\n <input\n id=\"input\"\n type=${this.type}\n class=${classMap(classes)}\n .value=${live(this.value)}\n placeholder=\"${ifDefined(this.placeholder)}\"\n minlength=\"${ifDefined(this.minlength)}\"\n maxlength=\"${ifDefined(this.maxlength)}\"\n min=\"${ifDefined(this.min)}\"\n max=\"${ifDefined(this.max)}\"\n step=\"${ifDefined(this.step)}\"\n ?required=${this.required}\n ?disabled=${this.disabled}\n @change=${this.changeHandler}\n @input=${this.inputHandler}\n aria-invalid=${this.checkValidity() ? 'false' : 'true'}\n aria-describedby=${ifDefined(this.helpText ? \"helpText\" : undefined)}\n aria-errormessage=${ifDefined(this.checkValidity() ? undefined : \"errorMessage\")}\n />\n ${label} ${icon}\n <bl-icon class=\"error-icon\" name=\"alert\"></bl-icon>\n ${invalidMessage} ${helpMessage}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-input': BlInput;\n }\n}\n"],
|
|
5
|
-
"mappings": "kUAOO,IAAMA,EAAUC,GAA+B,CACpD,GAAKA,EAAK,eAAc,EAEjB,CACL,IAAMC,EAAc,IAAI,MAAM,SAAU,CACtC,WAAY,GACb,EACDD,EAAK,cAAcC,CAAW,EACzBA,EAAY,kBACfD,EAAK,OAAM,MAPb,OAUJ,ECnBA,IAAME,EAA6C,CACjD,eACA,eACA,UACA,WACA,iBACA,gBACA,WACA,aACF,EAEaC,EAAuBD,EAAe,IAAIE,IAAQ,CAC7D,IAAAA,EACA,QAAQC,EAAgE,CACtE,OAAIA,EAAS,iBACJ,CAACA,EAAS,iBAAiB,SAASD,GAEtC,EACT,CACF,EAAE,EClBK,IAAME,EAASC,48FACfC,EAAQF,ECkBf,IAAqBG,EAArB,cAAqCC,EAAiBC,CAAU,CAAE,CAAlE,kCAcE,UAA0B,OAkB1B,WAAQ,GAMR,cAAW,GA0CX,UAAmB,SAMnB,cAAW,GAMX,gBAAa,GA6Cb,KAAQ,UAAaC,GAA+B,CAC9CA,EAAM,OAAS,SAAW,KAAK,MACjCC,EAAO,KAAK,IAAI,CAEpB,EAEA,KAAQ,QAAU,IAAY,CAC5B,KAAK,UAAU,KAAK,UAAU,QAAQ,CACxC,EAES,KAAQ,MAAQ,GAlJzB,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAsHA,mBAA0B,CA7I5B,IAAAC,EA8II,MAAM,kBAAkB,EACxB,KAAK,iBAAiB,UAAW,KAAK,SAAS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0EnB,oBAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GA/EtBnB,EAgFnB,oBAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GArFvBnB,EAsFnB,wBAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,QAAS,UAAW,cAAe,QAAS,EAAK,CAAC,GA3FjDnB,EA4FnB,0BAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,GAjGlCnB,EAkGnB,iCAMAiB,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,GAvG/BnB,EAwGnB,wBAK4BiB,EAAA,CAA3Bd,EAAM,WAAW,GA7GCH,EA6GS,wBAKDiB,EAAA,CAA1Bd,EAAM,UAAU,GAlHEH,EAkHQ,uBAKEiB,EAAA,CAA5Bd,EAAM,YAAY,GAvHAH,EAuHU,yBA4BZiB,EAAA,CAAhBG,EAAM,GAnJYpB,EAmJF,qBAnJEA,EAArBiB,EAAA,CADCI,EAAc,UAAU,GACJrB",
|
|
6
|
-
"names": ["submit", "form", "submitEvent", "validityStates", "innerInputValidators", "key", "instance", "styles", "r", "bl_input_default", "BlInput", "FormControlMixin", "s", "event", "submit", "bl_input_default", "_a", "value", "invalidMessage", "$", "helpMessage", "icon", "label", "classes", "o", "l", "innerInputValidators", "__decorateClass", "i", "e", "t", "n"]
|
|
7
|
-
}
|
package/dist/chunk-WIJU4SW3.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-23UFIOHV.js";import{a as s,b as r,f as o,g as l,h as n,i as d}from"./chunk-HG7OBTQS.js";import{a as t}from"./chunk-NZ3RGSR6.js";var p=s`@keyframes slide-from-right{0%{transform:translateX(100%)}100%{transform:translateX(0)}}.drawer{position:fixed;top:0;right:0;width:424px;height:100vh;background:var(--bl-color-primary-background);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transform:translateX(100%);transition:transform var(--bl-drawer-animation-duration,.25s);z-index:999}:host([open]) .drawer{transform:translateX(0);animation:slide-from-right var(--bl-drawer-animation-duration,.25s)}iframe{height:100%;width:100%;border:0}.container{display:flex;flex-direction:column;width:100%;height:100%}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl);background-color:white}header .header-buttons{display:flex;gap:24px;margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);overflow:hidden;margin:0;padding:0}section{padding:var(--bl-size-xl) var(--bl-size-xl) var(--bl-size-m) var(--bl-size-xl)}.content{overflow-y:scroll}.iframe-content{height:100%}@media only screen and (max-width:424px){:host([open]) .drawer{width:calc(100vw - 24px)}}`,c=p;var e=class extends o{constructor(){super(...arguments);this.open=!1;this.domExistence=!1}static get styles(){return[c]}connectedCallback(){super.connectedCallback(),window==null||window.addEventListener("bl-drawer-open",i=>{i.target!==this&&this.closeDrawer()})}updated(i){i.has("open")&&this.toggleDialogHandler()}toggleDialogHandler(){this.open?(this.domExistenceSchedule&&clearTimeout(this.domExistenceSchedule),this.domExistence=!0,this.onOpen("")):(this.domExistenceSchedule=window.setTimeout(()=>{this.domExistence=!1},1e3),this.onClose(""))}closeDrawer(){this.open=!1}renderContent(){let i=this.embedUrl?r`<iframe src=${this.embedUrl}></iframe>`:r`<slot />`;return r`<section class=${this.embedUrl?"iframe-content":"content"}>
|
|
2
|
-
${i}
|
|
3
|
-
</section>`}renderContainer(){let i=this.caption?r`<h2 id="drawer-caption">${this.caption}</h2>`:"",h=this.externalLink?r`<bl-button
|
|
4
|
-
icon="external_link"
|
|
5
|
-
variant="tertiary"
|
|
6
|
-
kind="neutral"
|
|
7
|
-
size="small"
|
|
8
|
-
href="${this.externalLink}"
|
|
9
|
-
target="_blank"
|
|
10
|
-
></bl-button>`:"";return r`<div class="container">
|
|
11
|
-
<header>
|
|
12
|
-
${i}
|
|
13
|
-
<div class="header-buttons">
|
|
14
|
-
${h}
|
|
15
|
-
<bl-button
|
|
16
|
-
@click="${this.closeDrawer}"
|
|
17
|
-
icon="close"
|
|
18
|
-
size="small"
|
|
19
|
-
variant="tertiary"
|
|
20
|
-
kind="neutral"
|
|
21
|
-
></bl-button>
|
|
22
|
-
</div>
|
|
23
|
-
</header>
|
|
24
|
-
${this.renderContent()}
|
|
25
|
-
</div>`}render(){return this.domExistence?r`<div class="drawer">
|
|
26
|
-
${this.renderContainer()}
|
|
27
|
-
</div>`:r``}};t([n({type:Boolean,reflect:!0})],e.prototype,"open",2),t([n({type:String})],e.prototype,"caption",2),t([n({type:String,attribute:"embed-url"})],e.prototype,"embedUrl",2),t([n({type:String,attribute:"external-link"})],e.prototype,"externalLink",2),t([a("bl-drawer-open")],e.prototype,"onOpen",2),t([a("bl-drawer-close")],e.prototype,"onClose",2),t([d()],e.prototype,"domExistence",2),e=t([l("bl-drawer")],e);export{e as a};
|
|
28
|
-
//# sourceMappingURL=chunk-WIJU4SW3.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/drawer/bl-drawer.css", "../src/components/drawer/bl-drawer.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`@keyframes slide-from-right{0%{transform:translateX(100%)}100%{transform:translateX(0)}}.drawer{position:fixed;top:0;right:0;width:424px;height:100vh;background:var(--bl-color-primary-background);box-shadow:var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);transform:translateX(100%);transition:transform var(--bl-drawer-animation-duration,.25s);z-index:999}:host([open]) .drawer{transform:translateX(0);animation:slide-from-right var(--bl-drawer-animation-duration,.25s)}iframe{height:100%;width:100%;border:0}.container{display:flex;flex-direction:column;width:100%;height:100%}header{display:flex;justify-content:space-between;align-items:baseline;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl);background-color:white}header .header-buttons{display:flex;gap:24px;margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-secondary);overflow:hidden;margin:0;padding:0}section{padding:var(--bl-size-xl) var(--bl-size-xl) var(--bl-size-m) var(--bl-size-xl)}.content{overflow-y:scroll}.iframe-content{height:100%}@media only screen and (max-width:424px){:host([open]) .drawer{width:calc(100vw - 24px)}}`;\nexport default styles;\n", "import {customElement, property, state} from \"lit/decorators.js\";\nimport {CSSResultGroup, html, LitElement, TemplateResult} from \"lit\";\nimport {event, EventDispatcher} from \"../../utilities/event\";\nimport '../button/bl-button';\nimport style from './bl-drawer.css';\nimport {PropertyValues} from \"lit\";\n\n/**\n * @tag bl-drawer\n * @summary Baklava Drawer component\n *\n */\n\n@customElement('bl-drawer')\nexport default class BlDrawer extends LitElement{\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets drawer open-close status\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Sets the drawer title\n */\n @property({type:String})\n caption?: string;\n\n /**\n * Sets the drawer embed url for iframe\n */\n @property({type:String, attribute:'embed-url'})\n embedUrl?: string;\n\n /**\n * Sets the drawer external link\n */\n @property({type:String, attribute:'external-link'})\n externalLink?: string;\n\n /**\n * Fires when the drawer is opened\n */\n @event('bl-drawer-open') private onOpen: EventDispatcher<string>;\n\n /**\n * Fires when the drawer is closed\n */\n @event('bl-drawer-close') private onClose: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n window?.addEventListener('bl-drawer-open',(event) => {\n if(event.target !== this)\n this.closeDrawer();\n });\n }\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('open')) {\n this.toggleDialogHandler();\n }\n }\n\n private domExistenceSchedule: number;\n\n private toggleDialogHandler() {\n if (this.open) {\n if (this.domExistenceSchedule) {\n clearTimeout(this.domExistenceSchedule);\n }\n\n this.domExistence = true;\n // FIXME: Allow events without payload\n this.onOpen('');\n } else {\n // Give some time for exit animation\n this.domExistenceSchedule = window.setTimeout(() => {\n this.domExistence = false;\n }, 1000);\n\n // FIXME: Allow events without payload\n this.onClose('');\n }\n }\n\n @state() private domExistence = false;\n\n private closeDrawer() {\n this.open = false;\n }\n\n private renderContent(){\n const content = this.embedUrl ?\n html`<iframe src=${this.embedUrl}></iframe>`\n : html`<slot />`\n\n return html`<section class=${this.embedUrl ? 'iframe-content' : 'content'}>\n ${content}\n </section>`\n }\n\n private renderContainer() {\n const title = this.caption ? html`<h2 id=\"drawer-caption\">${this.caption}</h2>` : '';\n const external_button = this.externalLink ? html`<bl-button\n icon=\"external_link\"\n variant=\"tertiary\"\n kind=\"neutral\"\n size=\"small\"\n href=\"${this.externalLink}\"\n target=\"_blank\"\n ></bl-button>` : '';\n\n return html`<div class=\"container\">\n <header>\n ${title}\n <div class=\"header-buttons\">\n ${external_button}\n <bl-button\n @click=\"${this.closeDrawer}\"\n icon=\"close\"\n size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\n ></bl-button>\n </div>\n </header>\n ${this.renderContent()}\n </div>`;\n }\n\n render(): TemplateResult{\n if(this.domExistence){\n return html`<div class=\"drawer\">\n ${this.renderContainer()}\n </div>`;\n }else {\n return html``\n }\n }\n\n}\ndeclare global{\n interface HTMLElementTagNameMap {\n 'bl-drawer' : BlDrawer;\n }\n}\n"],
|
|
5
|
-
"mappings": "sJACO,IAAMA,EAASC,ypCACfC,EAAQF,ECYf,IAAqBG,EAArB,cAAsCC,CAAU,CAAhD,kCASE,UAAO,GAkEE,KAAQ,aAAe,GA1EhC,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAoCA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,qBAAQ,iBAAiB,iBAAkBC,GAAU,CAChDA,EAAM,SAAW,MAClB,KAAK,YAAY,CACrB,EACF,CAEA,QAAQC,EAAyC,CAC3CA,EAAkB,IAAI,MAAM,GAC9B,KAAK,oBAAoB,CAE7B,CA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,EAAM,GA3EYX,EA2EF,4BA3EEA,EAArBS,EAAA,CADCG,EAAc,WAAW,GACLZ",
|
|
6
|
-
"names": ["styles", "r", "bl_drawer_default", "BlDrawer", "s", "bl_drawer_default", "event", "changedProperties", "content", "$", "title", "external_button", "__decorateClass", "e", "t", "n"]
|
|
7
|
-
}
|
package/dist/chunk-WXJKPVRA.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{a as w,b as m,c as E}from"./chunk-72IJCTLJ.js";import{a as p}from"./chunk-23UFIOHV.js";import{a as f,b as u,c as g,d as l,f as v,g as y,h as T,i as x}from"./chunk-HG7OBTQS.js";import{a as r}from"./chunk-NZ3RGSR6.js";var s=class extends E{constructor(t){if(super(t),this.it=l,t.type!==w.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===l||t==null)return this.ft=void 0,this.it=t;if(t===g)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;let i=[t];return i.raw=i,this.ft={_$litType$:this.constructor.resultType,strings:i,values:[]}}};s.directiveName="unsafeHTML",s.resultType=1;var G=m(s);var n=class extends s{};n.directiveName="unsafeSVG",n.resultType=2;var L=m(n);var P="./assets";function M(a){P=a}function $(){return P}var N=import.meta.url;N&&M(N.split("/").slice(0,-1).concat("assets").join("/"));var D=f`:host{display:inline-block;position:relative;width:1em;height:1em;min-width:1em;min-height:1em}:host div,:host svg{width:100%;height:100%}`,b=D;var d=new Map,e=class extends v{static get styles(){return[b]}get name(){return this._iconName}set name(i){i!==this._iconName&&(this._iconName=i,this.load())}async load(){let c=`${$()}/${this.name}.svg`;d.has(c)||d.set(c,fetch(c));try{let o=await d.get(c),h=await(o==null?void 0:o.clone());h!=null&&h.ok?(this.svg=await h.text(),this.onLoad(`${this.name} icon loaded`),this.requestUpdate()):this.onError(`${this.name} icon failed to load`)}catch(o){this.onError(`${this.name} icon failed to load [${o}]`)}}render(){return u`<div aria-hidden="true">${L(this.svg)}</div>`}};r([T()],e.prototype,"name",1),r([p("bl-load")],e.prototype,"onLoad",2),r([p("bl-error")],e.prototype,"onError",2),r([x()],e.prototype,"svg",2),e=r([y("bl-icon")],e);export{M as a,$ as b,e as c};
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2017 Google LLC
|
|
5
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
//# sourceMappingURL=chunk-WXJKPVRA.js.map
|