@trendyol/baklava 2.0.0-beta.79 → 2.0.0-beta.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/baklava.js +1 -1
- package/dist/chunk-IBKG5DOR.js +52 -0
- package/dist/chunk-IBKG5DOR.js.map +7 -0
- package/dist/{chunk-VGPPX6IG.js → chunk-MWMCAJBW.js} +3 -3
- package/dist/{chunk-VGPPX6IG.js.map → chunk-MWMCAJBW.js.map} +2 -2
- package/dist/{chunk-VHM6RRSN.js → chunk-TTMNJLGU.js} +3 -3
- package/dist/chunk-TTMNJLGU.js.map +7 -0
- package/dist/chunk-ZAU7BBDB.js +19 -0
- package/dist/chunk-ZAU7BBDB.js.map +7 -0
- package/dist/components/button/bl-button.d.ts +8 -0
- package/dist/components/button/bl-button.d.ts.map +1 -1
- package/dist/components/button/bl-button.js +1 -1
- package/dist/components/dialog/bl-dialog.js +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/input/bl-input.d.ts +3 -3
- 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.d.ts.map +1 -1
- package/dist/components/pagination/bl-pagination.js +1 -1
- package/dist/components/textarea/bl-textarea.d.ts +1 -1
- package/dist/components/textarea/bl-textarea.d.ts.map +1 -1
- package/dist/components/textarea/bl-textarea.js +1 -1
- package/dist/custom-elements.json +17 -0
- package/package.json +1 -1
- package/dist/chunk-2PVZLIDX.js +0 -19
- package/dist/chunk-2PVZLIDX.js.map +0 -7
- package/dist/chunk-A6IEG6S5.js +0 -52
- package/dist/chunk-A6IEG6S5.js.map +0 -7
- package/dist/chunk-VHM6RRSN.js.map +0 -7
package/dist/baklava.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as G}from"./chunk-4IAGV6FP.js";import{a as g}from"./chunk-2R4IL3VH.js";import{a as I}from"./chunk-MIGVYPFB.js";import{a as b}from"./chunk-GX7AW5WB.js";import{a as h}from"./chunk-
|
|
1
|
+
import{b as G}from"./chunk-4IAGV6FP.js";import{a as g}from"./chunk-2R4IL3VH.js";import{a as I}from"./chunk-MIGVYPFB.js";import{a as b}from"./chunk-GX7AW5WB.js";import{a as h}from"./chunk-MWMCAJBW.js";import{a as w}from"./chunk-N455HW4V.js";import{b as P,d as T}from"./chunk-WUDM5U5Z.js";import{b as D}from"./chunk-KQBXYF3J.js";import{a as B}from"./chunk-IBKG5DOR.js";import{a as x}from"./chunk-TTMNJLGU.js";import"./chunk-AEVRCHAZ.js";import{a as n}from"./chunk-6J4GSOJU.js";import{c,f as i}from"./chunk-2E7PEDV6.js";import{a as m}from"./chunk-7R56R3UM.js";import{a as s}from"./chunk-4WJJQP4L.js";import"./chunk-5ODNFE7B.js";import{a}from"./chunk-C3X43Y7C.js";import{a as r}from"./chunk-TJ47AW2B.js";import{b as f,e as p}from"./chunk-F3CGCLRX.js";import"./chunk-EPJ347EQ.js";import"./chunk-7K5FMQLQ.js";import{a as d}from"./chunk-Y2EBT6QM.js";import{a as u}from"./chunk-TAU2CM6U.js";import{b as l}from"./chunk-ZAU7BBDB.js";import"./chunk-OLPYXE2P.js";import"./chunk-KPAWUBRO.js";import{a as o,b as t,c as e}from"./chunk-F3ZH5IV7.js";import"./chunk-RLMJN536.js";import"./chunk-23UFIOHV.js";import"./chunk-57PTZNIL.js";import"./chunk-NZ3RGSR6.js";export{a as BlAlert,r as BlBadge,l as BlButton,f as BlCheckbox,p as BlCheckboxGroup,d as BlDialog,u as BlDrawer,T as BlDropdown,D as BlDropdownGroup,P as BlDropdownItem,e as BlIcon,x as BlInput,B as BlPagination,n as BlProgressIndicator,c as BlRadio,i as BlRadioGroup,m as BlSelect,s as BlSelectOption,G as BlSwitch,I as BlTab,g as BlTabGroup,b as BlTabPanel,h as BlTextarea,w as BlTooltip,t as getIconPath,o as setIconPath};
|
|
2
2
|
//# sourceMappingURL=baklava.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import{a as h}from"./chunk-KPAWUBRO.js";import{a as o}from"./chunk-23UFIOHV.js";import{a as p,b as s,f as u,g as c,h as i,i as g}from"./chunk-57PTZNIL.js";import{a as r}from"./chunk-NZ3RGSR6.js";var b=p`.pagination{display:flex;flex-wrap:wrap;justify-content:center;max-width:max-content;gap:var(--bl-size-s)}.pagination *{margin:0;padding:0;box-sizing:border-box}.page-container{display:flex;align-items:center}.page-list{display:flex;align-items:center;list-style:none;user-select:none;gap:var(--bl-size-3xs)}.dots{margin:0 var(--bl-size-2xs)}.dots::before{content:' \\B7 \\B7 \\B7';color:var(--bl-color-content-primary)}.pagination-helpers{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:var(--bl-size-m);color:var(--bl-color-content-primary)}.jumper,.select{display:flex;align-items:center;gap:var(--bl-size-2xs)}label{font:var(--bl-font-title-3-medium);font-size:var(--bl-font-size-m);font-weight:var(--bl-font-weight-medium);line-height:var(--bl-font-size-m);letter-spacing:0;user-select:none}bl-input{width:62px}bl-select{width:128px}@media only screen and (max-width:768px){label{display:none}}`,m=b;var t=class extends u{constructor(){super(...arguments);this.currentPage=1;this.totalItems=0;this.itemsPerPage=10;this.hasJumper=!1;this.jumperLabel="Go To";this.hasSelect=!1;this.selectLabel="Show";this.itemsPerPageOptions=[{text:"10 Items",value:10},{text:"25 Items",value:25},{text:"50 Items",value:50},{text:"100 Items",value:100}];this.pages=[]}static get styles(){return[m]}connectedCallback(){super.connectedCallback(),setTimeout(()=>{window==null||window.addEventListener("resize",()=>this._paginate())})}disconnectedCallback(){super.disconnectedCallback(),window==null||window.removeEventListener("resize",this._paginate)}updated(e){(e.has("currentPage")||e.has("itemsPerPage")||e.has("totalItems"))&&this._paginate()}_paginate(){this.pages=[];let e=Math.ceil(Math.abs(this.totalItems/this.itemsPerPage))||1;if(e<=8){this.pages=Array.from(Array(e),(a,l)=>l+1);return}this.pages.push(1),this.currentPage<5?this.pages.push(2,3,4,5,"..."):this.currentPage>=5&&this.currentPage<=e-4?this.pages.push("...",this.currentPage-1,this.currentPage,this.currentPage+1,"..."):this.pages.push("...",e-4,e-3,e-2,e-1),this.pages.push(e)}_changePage(e){let a=this.currentPage;this.currentPage=e,this.onChange({selectedPage:e,prevPage:a,itemsPerPage:this.itemsPerPage})}_pageBack(){this.currentPage!==1&&this._changePage(this.currentPage-1)}_pageForward(){this.currentPage!==this._getLastPage()&&this._changePage(this.currentPage+1)}_getLastPage(){return+this.pages[this.pages.length-1]}_inputHandler(e){e.stopPropagation();let a=+e.target.value,l=a>0?Math.min(this._getLastPage(),a):1;this._changePage(l)}_selectHandler(e){var a;this.itemsPerPage=+((a=e==null?void 0:e.detail[0])==null?void 0:a.value)||100,this._changePage(1)}_renderSinglePage(e){if(typeof e=="string")return s`<li class="dots"></li>`;let a=this.currentPage===e?"page":void 0;return s` <li>
|
|
2
|
+
<bl-button
|
|
3
|
+
@click="${()=>this._changePage(e)}"
|
|
4
|
+
variant=${this.currentPage===e?"primary":"tertiary"}
|
|
5
|
+
kind="neutral"
|
|
6
|
+
label="Page ${e}"
|
|
7
|
+
aria-current=${h(a)}
|
|
8
|
+
>
|
|
9
|
+
${e}
|
|
10
|
+
</bl-button>
|
|
11
|
+
</li>`}renderPages(){return s`
|
|
12
|
+
<div class="page-container">
|
|
13
|
+
<bl-button
|
|
14
|
+
@click="${this._pageBack}"
|
|
15
|
+
variant="tertiary"
|
|
16
|
+
kind="neutral"
|
|
17
|
+
icon="arrow_left"
|
|
18
|
+
class="previous"
|
|
19
|
+
label="Previous"
|
|
20
|
+
?disabled=${this.currentPage===1}
|
|
21
|
+
></bl-button>
|
|
22
|
+
<ul class="page-list">
|
|
23
|
+
${window.innerWidth<768?s`${this._renderSinglePage(this.currentPage)}`:this.pages.map(e=>s`${this._renderSinglePage(e)}`)}
|
|
24
|
+
</ul>
|
|
25
|
+
<bl-button
|
|
26
|
+
@click="${this._pageForward}"
|
|
27
|
+
variant="tertiary"
|
|
28
|
+
kind="neutral"
|
|
29
|
+
icon="arrow_right"
|
|
30
|
+
class="next"
|
|
31
|
+
label="Next"
|
|
32
|
+
?disabled=${this.currentPage===this._getLastPage()}
|
|
33
|
+
></bl-button>
|
|
34
|
+
</div>
|
|
35
|
+
`}render(){let e=this.hasSelect?s`
|
|
36
|
+
<div class="select">
|
|
37
|
+
<label>${this.selectLabel}</label>
|
|
38
|
+
<bl-select @bl-select="${this._selectHandler}">
|
|
39
|
+
${this.itemsPerPageOptions.map(n=>s`<bl-select-option
|
|
40
|
+
value="${n.value}"
|
|
41
|
+
?selected=${n.value===this.itemsPerPage}
|
|
42
|
+
>${n.text}</bl-select-option
|
|
43
|
+
>`)}
|
|
44
|
+
</bl-select>
|
|
45
|
+
</div>
|
|
46
|
+
`:null,a=this.hasJumper?s` <div class="jumper">
|
|
47
|
+
<label>${this.jumperLabel}</label>
|
|
48
|
+
<bl-input .value="${this.currentPage}" @bl-change="${this._inputHandler}"></bl-input>
|
|
49
|
+
</div>`:null;return s` <nav class="pagination" aria-label="Pagination">
|
|
50
|
+
${(()=>{if(!(!this.hasSelect&&!this.hasJumper))return s` <div class="pagination-helpers">${e} ${a}</div> `})()} ${this.renderPages()}
|
|
51
|
+
</nav>`}};r([i({attribute:"current-page",type:Number,reflect:!0})],t.prototype,"currentPage",2),r([i({attribute:"total-items",type:Number})],t.prototype,"totalItems",2),r([i({attribute:"items-per-page",type:Number,reflect:!0})],t.prototype,"itemsPerPage",2),r([i({attribute:"has-jumper",type:Boolean})],t.prototype,"hasJumper",2),r([i({attribute:"jumper-label",type:String})],t.prototype,"jumperLabel",2),r([i({attribute:"has-select",type:Boolean})],t.prototype,"hasSelect",2),r([i({attribute:"select-label",type:String})],t.prototype,"selectLabel",2),r([i({type:Array,attribute:!1})],t.prototype,"itemsPerPageOptions",2),r([g()],t.prototype,"pages",2),r([o("bl-change")],t.prototype,"onChange",2),t=r([c("bl-pagination")],t);export{t as a};
|
|
52
|
+
//# sourceMappingURL=chunk-IBKG5DOR.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/pagination/bl-pagination.css", "../src/components/pagination/bl-pagination.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.pagination{display:flex;flex-wrap:wrap;justify-content:center;max-width:max-content;gap:var(--bl-size-s)}.pagination *{margin:0;padding:0;box-sizing:border-box}.page-container{display:flex;align-items:center}.page-list{display:flex;align-items:center;list-style:none;user-select:none;gap:var(--bl-size-3xs)}.dots{margin:0 var(--bl-size-2xs)}.dots::before{content:' \\\\B7 \\\\B7 \\\\B7';color:var(--bl-color-content-primary)}.pagination-helpers{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:var(--bl-size-m);color:var(--bl-color-content-primary)}.jumper,.select{display:flex;align-items:center;gap:var(--bl-size-2xs)}label{font:var(--bl-font-title-3-medium);font-size:var(--bl-font-size-m);font-weight:var(--bl-font-weight-medium);line-height:var(--bl-font-size-m);letter-spacing:0;user-select:none}bl-input{width:62px}bl-select{width:128px}@media only screen and (max-width:768px){label{display:none}}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult, PropertyValues } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../button/bl-button';\nimport '../input/bl-input';\nimport '../select/bl-select';\n\nimport style from './bl-pagination.css';\n\n/**\n * @tag bl-pagination\n * @summary Baklava Pagination component\n */\n\n@customElement('bl-pagination')\nexport default class BlPagination extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the current page\n */\n @property({ attribute: 'current-page', type: Number, reflect: true })\n currentPage = 1;\n\n /**\n * Sets the total items to be paginated\n */\n @property({ attribute: 'total-items', type: Number })\n totalItems = 0;\n\n /**\n * Sets the number of items per page\n */\n @property({ attribute: 'items-per-page', type: Number, reflect: true })\n itemsPerPage = 10;\n\n /**\n * Adds jumper element if provided as true\n */\n @property({ attribute: 'has-jumper', type: Boolean })\n hasJumper = false;\n\n /**\n * Sets the jumper label\n */\n @property({ attribute: 'jumper-label', type: String })\n jumperLabel = 'Go To';\n\n /**\n * Adds select element to choose the items per page\n */\n @property({ attribute: 'has-select', type: Boolean })\n hasSelect = false;\n\n /**\n * Adds select element to choose the items per page\n */\n @property({ attribute: 'select-label', type: String })\n selectLabel = 'Show';\n\n /**\n * Sets the items per page options of the select element\n * PROPERTY\n */\n @property({ type: Array, attribute: false })\n itemsPerPageOptions = [\n {\n text: '10 Items',\n value: 10,\n },\n {\n text: '25 Items',\n value: 25,\n },\n {\n text: '50 Items',\n value: 50,\n },\n {\n text: '100 Items',\n value: 100,\n },\n ];\n\n @state() private pages: Array<number | string> = [];\n\n /**\n * Fires when the current page changes\n */\n @event('bl-change') private onChange: EventDispatcher<{\n selectedPage: number;\n prevPage: number;\n itemsPerPage: number;\n }>;\n\n connectedCallback() {\n super.connectedCallback();\n\n setTimeout(() => {\n window?.addEventListener('resize', () => this._paginate());\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n window?.removeEventListener('resize', this._paginate);\n }\n\n updated(changedProperties: PropertyValues<this>) {\n if (\n changedProperties.has('currentPage') ||\n changedProperties.has('itemsPerPage') ||\n changedProperties.has('totalItems')\n ) {\n this._paginate();\n }\n }\n\n private _paginate() {\n this.pages = [];\n const pageListLength = Math.ceil(Math.abs(this.totalItems / this.itemsPerPage)) || 1;\n\n if (pageListLength <= 8) {\n this.pages = Array.from(Array(pageListLength), (_, index) => index + 1);\n return;\n }\n\n this.pages.push(1);\n\n if (this.currentPage < 5) {\n this.pages.push(2, 3, 4, 5, '...');\n } else if (this.currentPage >= 5 && this.currentPage <= pageListLength - 4) {\n this.pages.push('...', this.currentPage - 1, this.currentPage, this.currentPage + 1, '...');\n } else {\n this.pages.push(\n '...',\n pageListLength - 4,\n pageListLength - 3,\n pageListLength - 2,\n pageListLength - 1\n );\n }\n\n this.pages.push(pageListLength);\n }\n\n private _changePage(selectedPage: number): void {\n const prevPage = this.currentPage;\n\n this.currentPage = selectedPage;\n\n this.onChange({\n selectedPage,\n prevPage,\n itemsPerPage: this.itemsPerPage,\n });\n }\n\n private _pageBack(): void {\n if (this.currentPage === 1) return;\n this._changePage(this.currentPage - 1);\n }\n\n private _pageForward(): void {\n if (this.currentPage === this._getLastPage()) return;\n this._changePage(this.currentPage + 1);\n }\n\n private _getLastPage(): number {\n return +this.pages[this.pages.length - 1];\n }\n\n private _inputHandler(event: CustomEvent) {\n event.stopPropagation();\n const inputValue = +(event.target as HTMLInputElement).value;\n const newPage = inputValue > 0 ? Math.min(this._getLastPage(), inputValue) : 1;\n this._changePage(newPage);\n }\n\n private _selectHandler(event: CustomEvent) {\n this.itemsPerPage = +event?.detail[0]?.value || 100;\n this._changePage(1);\n }\n\n private _renderSinglePage(page: number | string) {\n if (typeof page === 'string') {\n return html`<li class=\"dots\"></li>`;\n }\n const ariaCurrent = this.currentPage === page ? 'page' : undefined;\n return html` <li>\n <bl-button\n @click=\"${() => this._changePage(page)}\"\n variant=${this.currentPage === page ? 'primary' : 'tertiary'}\n kind=\"neutral\"\n label=\"Page ${page}\"\n aria-current=${ifDefined(ariaCurrent)}\n >\n ${page}\n </bl-button>\n </li>`;\n }\n\n private renderPages() {\n return html`\n <div class=\"page-container\">\n <bl-button\n @click=\"${this._pageBack}\"\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"arrow_left\"\n class=\"previous\"\n label=\"Previous\"\n ?disabled=${this.currentPage === 1}\n ></bl-button>\n <ul class=\"page-list\">\n ${window.innerWidth < 768\n ? html`${this._renderSinglePage(this.currentPage)}`\n : this.pages.map(page => html`${this._renderSinglePage(page)}`)}\n </ul>\n <bl-button\n @click=\"${this._pageForward}\"\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"arrow_right\"\n class=\"next\"\n label=\"Next\"\n ?disabled=${this.currentPage === this._getLastPage()}\n ></bl-button>\n </div>\n `;\n }\n\n render(): TemplateResult {\n const selectEl = this.hasSelect\n ? html`\n <div class=\"select\">\n <label>${this.selectLabel}</label>\n <bl-select @bl-select=\"${this._selectHandler}\">\n ${this.itemsPerPageOptions.map(option => {\n return html`<bl-select-option\n value=\"${option.value}\"\n ?selected=${option.value === this.itemsPerPage}\n >${option.text}</bl-select-option\n >`;\n })}\n </bl-select>\n </div>\n `\n : null;\n\n const jumperEl = this.hasJumper\n ? html` <div class=\"jumper\">\n <label>${this.jumperLabel}</label>\n <bl-input .value=\"${this.currentPage}\" @bl-change=\"${this._inputHandler}\"></bl-input>\n </div>`\n : null;\n\n const getHelperElements = () => {\n if (!this.hasSelect && !this.hasJumper) return;\n return html` <div class=\"pagination-helpers\">${selectEl} ${jumperEl}</div> `;\n };\n\n return html` <nav class=\"pagination\" aria-label=\"Pagination\">\n ${getHelperElements()} ${this.renderPages()}\n </nav>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-pagination': BlPagination;\n }\n}\n"],
|
|
5
|
+
"mappings": "mMACO,IAAMA,EAASC,i6BACfC,EAAQF,ECcf,IAAqBG,EAArB,cAA0CC,CAAW,CAArD,kCASE,iBAAc,EAMd,gBAAa,EAMb,kBAAe,GAMf,eAAY,GAMZ,iBAAc,QAMd,eAAY,GAMZ,iBAAc,OAOd,yBAAsB,CACpB,CACE,KAAM,WACN,MAAO,EACT,EACA,CACE,KAAM,WACN,MAAO,EACT,EACA,CACE,KAAM,WACN,MAAO,EACT,EACA,CACE,KAAM,YACN,MAAO,GACT,CACF,EAES,KAAQ,MAAgC,CAAC,EAtElD,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CA+EA,mBAAoB,CAClB,MAAM,kBAAkB,EAExB,WAAW,IAAM,CACf,qBAAQ,iBAAiB,SAAU,IAAM,KAAK,UAA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C,EAAW,KAAK,UAClBL;AAAA,mBACW,KAAK;AAAA,8BACM,KAAK,4BAA4B,KAAK;AAAA,gBAE5D,KAOJ,OAAOA;AAAA,SALmB,IAAM,CAC9B,GAAI,GAAC,KAAK,WAAa,CAAC,KAAK,WAC7B,OAAOA,qCAAwCG,KAAYE,UAC7D,GAGsB,KAAK,KAAK,YAAY;AAAA,WAE9C,CACF,EApPEC,EAAA,CADCC,EAAS,CAAE,UAAW,eAAgB,KAAM,OAAQ,QAAS,EAAK,CAAC,GARjDrB,EASnB,2BAMAoB,EAAA,CADCC,EAAS,CAAE,UAAW,cAAe,KAAM,MAAO,CAAC,GAdjCrB,EAenB,0BAMAoB,EAAA,CADCC,EAAS,CAAE,UAAW,iBAAkB,KAAM,OAAQ,QAAS,EAAK,CAAC,GApBnDrB,EAqBnB,4BAMAoB,EAAA,CADCC,EAAS,CAAE,UAAW,aAAc,KAAM,OAAQ,CAAC,GA1BjCrB,EA2BnB,yBAMAoB,EAAA,CADCC,EAAS,CAAE,UAAW,eAAgB,KAAM,MAAO,CAAC,GAhClCrB,EAiCnB,2BAMAoB,EAAA,CADCC,EAAS,CAAE,UAAW,aAAc,KAAM,OAAQ,CAAC,GAtCjCrB,EAuCnB,yBAMAoB,EAAA,CADCC,EAAS,CAAE,UAAW,eAAgB,KAAM,MAAO,CAAC,GA5ClCrB,EA6CnB,2BAOAoB,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,UAAW,EAAM,CAAC,GAnDxBrB,EAoDnB,mCAmBiBoB,EAAA,CAAhBE,EAAM,GAvEYtB,EAuEF,qBAKWoB,EAAA,CAA3BX,EAAM,WAAW,GA5ECT,EA4ES,wBA5ETA,EAArBoB,EAAA,CADCC,EAAc,eAAe,GACTrB",
|
|
6
|
+
"names": ["styles", "i", "bl_pagination_default", "BlPagination", "s", "bl_pagination_default", "changedProperties", "pageListLength", "_", "index", "selectedPage", "prevPage", "event", "inputValue", "newPage", "_a", "page", "y", "ariaCurrent", "l", "selectEl", "option", "jumperEl", "__decorateClass", "e", "t"]
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{b as $}from"./chunk-AEVRCHAZ.js";import{a as z}from"./chunk-EPJ347EQ.js";import{a as w}from"./chunk-7K5FMQLQ.js";import{a as x}from"./chunk-OLPYXE2P.js";import{a as d}from"./chunk-KPAWUBRO.js";import{a as m,b as y,c as f}from"./chunk-RLMJN536.js";import{a as h}from"./chunk-23UFIOHV.js";import{a as p,b as n,c as v,f as u,g,h as a,i as c,j as b}from"./chunk-57PTZNIL.js";import{a as i}from"./chunk-NZ3RGSR6.js";var C=y(class extends f{constructor(l){var o;if(super(l),l.type!==m.ATTRIBUTE||l.name!=="style"||((o=l.strings)===null||o===void 0?void 0:o.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(l){return Object.keys(l).reduce((o,e)=>{let r=l[e];return r==null?o:o+`${e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(l,[o]){let{style:e}=l.element;if(this.vt===void 0){this.vt=new Set;for(let r in o)this.vt.add(r);return this.render(o)}this.vt.forEach(r=>{o[r]==null&&(this.vt.delete(r),r.includes("-")?e.removeProperty(r):e[r]="")});for(let r in o){let s=o[r];s!=null&&(this.vt.add(r),r.includes("-")?e.setProperty(r,s):e[r]=s)}return v}});var
|
|
2
|
-
<div style=${C(
|
|
1
|
+
import{b as $}from"./chunk-AEVRCHAZ.js";import{a as z}from"./chunk-EPJ347EQ.js";import{a as w}from"./chunk-7K5FMQLQ.js";import{a as x}from"./chunk-OLPYXE2P.js";import{a as d}from"./chunk-KPAWUBRO.js";import{a as m,b as y,c as f}from"./chunk-RLMJN536.js";import{a as h}from"./chunk-23UFIOHV.js";import{a as p,b as n,c as v,f as u,g,h as a,i as c,j as b}from"./chunk-57PTZNIL.js";import{a as i}from"./chunk-NZ3RGSR6.js";var C=y(class extends f{constructor(l){var o;if(super(l),l.type!==m.ATTRIBUTE||l.name!=="style"||((o=l.strings)===null||o===void 0?void 0:o.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(l){return Object.keys(l).reduce((o,e)=>{let r=l[e];return r==null?o:o+`${e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(l,[o]){let{style:e}=l.element;if(this.vt===void 0){this.vt=new Set;for(let r in o)this.vt.add(r);return this.render(o)}this.vt.forEach(r=>{o[r]==null&&(this.vt.delete(r),r.includes("-")?e.removeProperty(r):e[r]="")});for(let r in o){let s=o[r];s!=null&&(this.vt.add(r),r.includes("-")?e.setProperty(r,s):e[r]=s)}return v}});var V=p`:host{display:inline-block;width:200px;position:relative}.wrapper{--row-count:1;--maxrow-count:;--line-height:var(--bl-font-title-3-line-height);--scroll-height:var(--line-height);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--border-size:1px;--default-scroll-height:calc((var(--row-count) * var(--line-height)) + var(--padding-vertical));--height:max(var(--scroll-height),var(--default-scroll-height));--input-font:var(--bl-font-body-text-2);--border-radius:var(--bl-size-3xs);display:flex;flex-direction:column;position:relative;gap:var(--bl-size-3xs)}.input-wrapper{border:solid var(--border-size) var(--bl-color-border);border-radius:var(--border-radius);padding-top:var(--padding-vertical);display:flex;box-sizing:border-box}textarea{width:100%;align-self:stretch;outline:0;font:var(--input-font);padding:0 calc(var(--padding-horizontal) - var(--border-size));padding-bottom:var(--padding-vertical);margin:0;border:0;border-radius:var(--border-radius);color:var(--bl-color-content-primary);resize:vertical;display:block}:host([size='large']) .wrapper{--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size='small']) .wrapper{--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-xs);--input-font:var(--bl-font-body-text-3);--line-height:var(--bl-font-title-4-line-height)}textarea:disabled{background-color:var(--bl-color-secondary-background);color:var(--bl-color-content-tertiary);cursor:not-allowed}:host([disabled]) .wrapper{background-color:var(--bl-color-secondary-background)}:host([expand]) textarea{overflow:hidden;resize:none;height:var(--height)}:host([expand][max-rows]) textarea{--maxrow-height:calc((var(--maxrow-count) * var(--line-height)) + var(--padding-vertical));overflow-y:scroll;height:min(var(--height),var(--maxrow-height))}.wrapper:focus-within{border-color:var(--bl-color-primary)}.dirty.max-len-invalid,.dirty.invalid{border-color:var(--bl-color-danger)}:host([label]) ::placeholder{color:transparent;transition:color ease-out .4s}label{position:absolute;top:var(--padding-vertical);left:var(--padding-horizontal);right:var(--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;max-width:max-content;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}: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-content-primary-contrast);pointer-events:initial}:host ::placeholder,:host([label-fixed]) ::placeholder{color:var(--bl-color-content-tertiary)}:host([label-fixed]) label{position:static;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--bl-color-content-secondary);background-color:initial;padding:0}.hint{display:none;font:var(--bl-font-body-text-3)}:host([character-counter]) .hint,:host([help-text]) .hint,.dirty.invalid .hint{display:flex;gap:var(--bl-size-3xs)}.hint>*{margin:0;padding:0}.help-text,.invalid-text{flex:1}.counter-text{color:var(--bl-color-content-secondary);margin-left:auto}:where(.max-len-invalid,.dirty.invalid) .hint>.counter-text{color:var(--bl-color-danger)}.invalid-text{display:none;color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}:where(.dirty.max-len-invalid,.dirty.invalid) .hint>.invalid-text{display:inline-block}.dirty.invalid .hint>.help-text{display:none}`,k=V;var t=class extends w(u){constructor(){super(...arguments);this.name="";this.required=!1;this.disabled=!1;this.expand=!1;this.size="medium";this.labelFixed=!1;this.characterCounter=!1;this.value="";this.rows=4;this.customScrollHeight=null;this.onError=()=>{this.onInvalid(this.internals.validity)};this.dirty=!1}static get styles(){return[k]}connectedCallback(){var e;super.connectedCallback(),(e=this.internals.form)==null||e.addEventListener("submit",()=>{this.reportValidity()})}inputHandler(e){this.autoResize();let r=e.target.value;this.value=r,this.onInput(r)}changeHandler(e){let r=e.target.value;this.dirty=!0,this.value=r,this.onChange(r)}firstUpdated(){this.setValue(this.value),this.autoResize()}async updated(e){e.has("rows")&&this.autoResize(),e.has("value")&&(this.setValue(this.value),await this.validationComplete,this.requestUpdate())}reportValidity(){return this.dirty=!0,this.checkValidity()}valueChangedCallback(e){this.value=e}validityCallback(){var e;return this.customInvalidText||((e=this.validationTarget)==null?void 0:e.validationMessage)}autoResize(){if(!this.expand)return;this.validationTarget.style.height="auto";let e=this.validationTarget.scrollHeight;this.customScrollHeight=`${e}px`,this.validationTarget.style.removeProperty("height")}render(){let e=this.internals.validity.tooLong,r=this.checkValidity()?"":n`<p class="invalid-text">${this.validationMessage}</p>`,s=this.helpText?n`<p class="help-text">${this.helpText}</p>`:"",E=this.label?n`<label for="input">${this.label}</label>`:"",S=this.characterCounter&&this.maxlength?`${this.value.length}/${this.maxlength}`:this.characterCounter?`${this.value.length}`:"",M=this.characterCounter?n`<p class="counter-text">${S}</p>`:"",H={wrapper:!0,"has-value":this.value!==null&&this.value!=="",dirty:this.dirty,"max-len-invalid":e,invalid:!this.checkValidity()},R={"--row-count":`${this.rows}`,"--maxrow-count":this.maxRows?`${this.maxRows}`:null,"--scroll-height":this.customScrollHeight};return n`
|
|
2
|
+
<div style=${C(R)} class=${x(H)}>
|
|
3
3
|
${E}
|
|
4
4
|
<div class="input-wrapper">
|
|
5
5
|
<textarea
|
|
@@ -29,4 +29,4 @@ lit-html/directives/style-map.js:
|
|
|
29
29
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
30
30
|
*)
|
|
31
31
|
*/
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-MWMCAJBW.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../node_modules/lit-html/src/directives/style-map.ts", "../src/components/textarea/bl-textarea.css", "../src/components/textarea/bl-textarea.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange} from '../lit-html.js';\nimport {\n directive,\n Directive,\n DirectiveParameters,\n PartInfo,\n PartType,\n} from '../directive.js';\n\n/**\n * A key-value set of CSS properties and values.\n *\n * The key should be either a valid CSS property name string, like\n * `'background-color'`, or a valid JavaScript camel case property name\n * for CSSStyleDeclaration like `backgroundColor`.\n */\nexport interface StyleInfo {\n [name: string]: string | undefined | null;\n}\n\nclass StyleMapDirective extends Directive {\n _previousStyleProperties?: Set<string>;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (\n partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'style' ||\n (partInfo.strings?.length as number) > 2\n ) {\n throw new Error(\n 'The `styleMap` directive must be used in the `style` attribute ' +\n 'and must be the only part in the attribute.'\n );\n }\n }\n\n render(styleInfo: Readonly<StyleInfo>) {\n return Object.keys(styleInfo).reduce((style, prop) => {\n const value = styleInfo[prop];\n if (value == null) {\n return style;\n }\n // Convert property names from camel-case to dash-case, i.e.:\n // `backgroundColor` -> `background-color`\n // Vendor-prefixed names need an extra `-` appended to front:\n // `webkitAppearance` -> `-webkit-appearance`\n // Exception is any property name containing a dash, including\n // custom properties; we assume these are already dash-cased i.e.:\n // `--my-button-color` --> `--my-button-color`\n prop = prop\n .replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, '-$&')\n .toLowerCase();\n return style + `${prop}:${value};`;\n }, '');\n }\n\n override update(part: AttributePart, [styleInfo]: DirectiveParameters<this>) {\n const {style} = part.element as HTMLElement;\n\n if (this._previousStyleProperties === undefined) {\n this._previousStyleProperties = new Set();\n for (const name in styleInfo) {\n this._previousStyleProperties.add(name);\n }\n return this.render(styleInfo);\n }\n\n // Remove old properties that no longer exist in styleInfo\n // We use forEach() instead of for-of so that re don't require down-level\n // iteration.\n this._previousStyleProperties!.forEach((name) => {\n // If the name isn't in styleInfo or it's null/undefined\n if (styleInfo[name] == null) {\n this._previousStyleProperties!.delete(name);\n if (name.includes('-')) {\n style.removeProperty(name);\n } else {\n // Note reset using empty string (vs null) as IE11 does not always\n // reset via null (https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style#setting_styles)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (style as any)[name] = '';\n }\n }\n });\n\n // Add or update properties\n for (const name in styleInfo) {\n const value = styleInfo[name];\n if (value != null) {\n this._previousStyleProperties.add(name);\n if (name.includes('-')) {\n style.setProperty(name, value);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (style as any)[name] = value;\n }\n }\n }\n return noChange;\n }\n}\n\n/**\n * A directive that applies CSS properties to an element.\n *\n * `styleMap` can only be used in the `style` attribute and must be the only\n * expression in the attribute. It takes the property names in the\n * {@link StyleInfo styleInfo} object and adds the property values as CSS\n * properties. Property names with dashes (`-`) are assumed to be valid CSS\n * property names and set on the element's style object using `setProperty()`.\n * Names without dashes are assumed to be camelCased JavaScript property names\n * and set on the element's style object using property assignment, allowing the\n * style object to translate JavaScript-style names to CSS property names.\n *\n * For example `styleMap({backgroundColor: 'red', 'border-top': '5px', '--size':\n * '0'})` sets the `background-color`, `border-top` and `--size` properties.\n *\n * @param styleInfo\n * @see {@link https://lit.dev/docs/templates/directives/#stylemap styleMap code samples on Lit.dev}\n */\nexport const styleMap = directive(StyleMapDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {StyleMapDirective};\n", "import {css} from 'lit';\nexport const styles = css`:host{display:inline-block;width:200px;position:relative}.wrapper{--row-count:1;--maxrow-count:;--line-height:var(--bl-font-title-3-line-height);--scroll-height:var(--line-height);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--border-size:1px;--default-scroll-height:calc((var(--row-count) * var(--line-height)) + var(--padding-vertical));--height:max(var(--scroll-height),var(--default-scroll-height));--input-font:var(--bl-font-body-text-2);--border-radius:var(--bl-size-3xs);display:flex;flex-direction:column;position:relative;gap:var(--bl-size-3xs)}.input-wrapper{border:solid var(--border-size) var(--bl-color-border);border-radius:var(--border-radius);padding-top:var(--padding-vertical);display:flex;box-sizing:border-box}textarea{width:100%;align-self:stretch;outline:0;font:var(--input-font);padding:0 calc(var(--padding-horizontal) - var(--border-size));padding-bottom:var(--padding-vertical);margin:0;border:0;border-radius:var(--border-radius);color:var(--bl-color-content-primary);resize:vertical;display:block}:host([size='large']) .wrapper{--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size='small']) .wrapper{--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-xs);--input-font:var(--bl-font-body-text-3);--line-height:var(--bl-font-title-4-line-height)}textarea:disabled{background-color:var(--bl-color-secondary-background);color:var(--bl-color-content-tertiary);cursor:not-allowed}:host([disabled]) .wrapper{background-color:var(--bl-color-secondary-background)}:host([expand]) textarea{overflow:hidden;resize:none;height:var(--height)}:host([expand][max-rows]) textarea{--maxrow-height:calc((var(--maxrow-count) * var(--line-height)) + var(--padding-vertical));overflow-y:scroll;height:min(var(--height),var(--maxrow-height))}.wrapper:focus-within{border-color:var(--bl-color-primary)}.dirty.max-len-invalid,.dirty.invalid{border-color:var(--bl-color-danger)}:host([label]) ::placeholder{color:transparent;transition:color ease-out .4s}label{position:absolute;top:var(--padding-vertical);left:var(--padding-horizontal);right:var(--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;max-width:max-content;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}: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-content-primary-contrast);pointer-events:initial}:host ::placeholder,:host([label-fixed]) ::placeholder{color:var(--bl-color-content-tertiary)}:host([label-fixed]) label{position:static;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--bl-color-content-secondary);background-color:initial;padding:0}.hint{display:none;font:var(--bl-font-body-text-3)}:host([character-counter]) .hint,:host([help-text]) .hint,.dirty.invalid .hint{display:flex;gap:var(--bl-size-3xs)}.hint>*{margin:0;padding:0}.help-text,.invalid-text{flex:1}.counter-text{color:var(--bl-color-content-secondary);margin-left:auto}:where(.max-len-invalid,.dirty.invalid) .hint>.counter-text{color:var(--bl-color-danger)}.invalid-text{display:none;color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}:where(.dirty.max-len-invalid,.dirty.invalid) .hint>.invalid-text{display:inline-block}.dirty.invalid .hint>.help-text{display:none}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { FormControlMixin } from '@open-wc/form-control';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { live } from 'lit/directives/live.js';\nimport { textAreaValidators } from '../../utilities/form-control';\nimport 'element-internals-polyfill';\nimport style from './bl-textarea.css';\n\nexport type TextareaSize = 'small' | 'medium' | 'large';\n/**\n * @tag bl-textarea\n * @summary Baklava Textarea component\n */\n@customElement('bl-textarea')\nexport default class BlTextarea extends FormControlMixin(LitElement) {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n static formControlValidators = textAreaValidators;\n\n @query('textarea')\n validationTarget: HTMLTextAreaElement;\n\n /**\n * Name of textarea\n */\n @property({ type: String })\n name = '';\n\n /**\n * Makes textarea a mandatory field\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Disables the textarea\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Sets expandity\n */\n @property({ type: Boolean, reflect: true })\n expand = false;\n\n /**\n * Sets max row when expand is true\n */\n @property({ type: Number, reflect: true, attribute: 'max-rows' })\n maxRows?: number;\n\n /**\n * Sets textarea size.\n */\n @property({ type: String, reflect: true })\n size?: TextareaSize = 'medium';\n\n /**\n * Sets label of the textarea\n */\n @property({ reflect: true })\n label?: string;\n\n /**\n * Makes label as fixed positioned\n */\n @property({ type: Boolean, attribute: 'label-fixed', reflect: true })\n labelFixed = false;\n\n /**\n * Sets placeholder of the textarea\n */\n @property({})\n placeholder?: string;\n\n /**\n * Enables showing character counter.\n */\n @property({ type: Boolean, attribute: 'character-counter' })\n characterCounter = 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 /**\n * Sets minimum length of the textarea\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * Sets max length of textarea\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * Sets initial value of the textarea\n */\n @property()\n value = '';\n\n /**\n * Sets textarea visible row count.\n */\n @property({ type: Number })\n rows?: number = 4;\n\n @event('bl-input') private onInput: EventDispatcher<string>;\n\n @event('bl-change') private onChange: EventDispatcher<string>;\n\n @event('bl-invalid') private onInvalid: EventDispatcher<ValidityState>;\n\n @state()\n private customScrollHeight: string | null = null;\n\n connectedCallback() {\n super.connectedCallback();\n this.internals.form?.addEventListener('submit', () => {\n this.reportValidity();\n });\n }\n\n private onError = (): void => {\n this.onInvalid(this.internals.validity);\n };\n\n private inputHandler(event: Event) {\n this.autoResize();\n\n const value = (event.target as HTMLTextAreaElement).value;\n this.setValue(value);\n this.onInput(value);\n }\n\n private changeHandler(event: Event) {\n const value = (event.target as HTMLTextAreaElement).value;\n\n this.dirty = true;\n this.setValue(value);\n this.onChange(value);\n }\n\n firstUpdated() {\n this.setValue(this.value);\n this.autoResize();\n }\n\n protected updated(changedProperties: PropertyValues) {\n if (changedProperties.has('rows')) {\n this.autoResize();\n }\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 validityCallback(): string | void {\n return this.customInvalidText || this.validationTarget?.validationMessage;\n }\n\n private autoResize() {\n if (!this.expand) {\n return;\n }\n\n this.validationTarget.style.height = 'auto';\n const scrollHeight = this.validationTarget.scrollHeight;\n this.customScrollHeight = `${scrollHeight}px`;\n this.validationTarget.style.removeProperty('height');\n }\n\n @state() private dirty = false;\n\n render(): TemplateResult {\n const maxLengthInvalid = this.internals.validity.tooLong;\n const invalidMessage = !this.checkValidity()\n ? html`<p class=\"invalid-text\">${this.validationMessage}</p>`\n : ``;\n const helpMessage =\n this.helpText ? html`<p class=\"help-text\">${this.helpText}</p>` : ``;\n\n const label = this.label ? html`<label for=\"input\">${this.label}</label>` : '';\n const characterCounterText =\n this.characterCounter && this.maxlength\n ? `${this.value.length}/${this.maxlength}`\n : this.characterCounter\n ? `${this.value.length}`\n : '';\n const characterCounter = this.characterCounter\n ? html`<p class=\"counter-text\">${characterCounterText}</p>`\n : '';\n\n const wrapperClasses = {\n 'wrapper': true,\n 'has-value': this.value !== null && this.value !== '',\n 'dirty': this.dirty,\n 'max-len-invalid': maxLengthInvalid,\n 'invalid': !this.checkValidity(),\n };\n\n const styles = {\n '--row-count': `${this.rows}`,\n '--maxrow-count': this.maxRows ? `${this.maxRows}` : null,\n '--scroll-height': this.customScrollHeight,\n };\n\n return html`\n <div style=${styleMap(styles)} class=${classMap(wrapperClasses)}>\n ${label}\n <div class=\"input-wrapper\">\n <textarea\n id=\"input\"\n name=\"${ifDefined(this.name)}\"\n .value=${live(this.value)}\n placeholder=\"${ifDefined(this.placeholder)}\"\n minlength=\"${ifDefined(this.minlength)}\"\n rows=\"${ifDefined(this.rows)}\"\n ?required=${this.required}\n ?disabled=${this.disabled}\n @change=${this.changeHandler}\n @input=${this.inputHandler}\n @invalid=${this.onError}\n >\n </textarea>\n </div>\n <div class=\"hint\">${invalidMessage}${helpMessage}${characterCounter}</div>\n </div>\n `;\n }\n}\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-textarea': BlTextarea;\n }\n}\n"],
|
|
5
|
-
"mappings": "saA+HaA,EAAWC,EArGxB,cAAgCC,CAAAA,CAG9BC,YAAYC,EAAAA,CAAAA,IAAAA,EAEV,GADAC,MAAMD,CAAAA,EAEJA,EAASE,OAASC,EAASC,WAC3BJ,EAASK,OAAS,WACjBC,EAAAN,EAASO,WADDF,MACCE,IAAAA,OAAAA,OAAAA,EAASC,QAAoB,EAEvC,MAAUC,MACR,4GAAA,CAIL,CAEDC,OAAOC,EAAAA,CACL,OAAOC,OAAOC,KAAKF,CAAAA,EAAWG,OAAO,CAACC,EAAOC,IAAAA,CAC3C,IAAMC,EAAQN,EAAUK,CAAAA,EACxB,OAAIC,GAAS,KACJF,EAYFA,EAAQ,GAHfC,EAAOA,EACJE,QAAQ,oCAAqC,KAAA,EAC7CC,YAAAA,KACuBF,IAAQ,EACjC,EAAA,CACJ,CAEQG,OAAOC,EAAAA,CAAsBV,CAAAA,EAAAA,CACpC,GAAA,CAAMI,MAACA,CAAAA,EAASM,EAAKC,QAErB,GAAIC,KAAKC,KAAT,OAAiD,CAC/CD,KAAKC,GAA2B,IAAIC,IACpC,QAAWpB,KAAQM,EACjBY,KAAKC,GAAyBE,IAAIrB,CAAAA,EAEpC,OAAOkB,KAAKb,OAAOC,CAAAA,EAMrBY,KAAKC,GAA0BG,QAAStB,GAAAA,CAElCM,EAAUN,CAAAA,GAAS,OACrBkB,KAAKC,GAA0BI,OAAOvB,CAAAA,EAClCA,EAAKwB,SAAS,GAAA,EAChBd,EAAMe,eAAezB,CAAAA,EAKpBU,EAAcV,CAAAA,EAAQ,GAE1B,CAAA,EAIH,QAAWA,KAAQM,EAAW,CAC5B,IAAMM,EAAQN,EAAUN,CAAAA,EACpBY,GAAS,OACXM,KAAKC,GAAyBE,IAAIrB,CAAAA,EAC9BA,EAAKwB,SAAS,GAAA,EAChBd,EAAMgB,YAAY1B,EAAMY,CAAAA,EAGvBF,EAAcV,CAAAA,EAAQY,GAI7B,OAAOe,CACR,CAAA,CAAA,ECzGI,IAAMC,EAASC,0kHACfC,EAAQF,ECgBf,IAAqBG,EAArB,cAAwCC,EAAiBC,CAAU,CAAE,CAArE,kCAcE,UAAO,GAMP,cAAW,GAMX,cAAW,GAMX,YAAS,GAYT,UAAsB,SAYtB,gBAAa,GAYb,sBAAmB,GA8BnB,WAAQ,GAMR,UAAgB,EAShB,KAAQ,mBAAoC,KAS5C,KAAQ,QAAU,IAAY,CAC5B,KAAK,UAAU,KAAK,UAAU,QAAQ,CACxC,
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange} from '../lit-html.js';\nimport {\n directive,\n Directive,\n DirectiveParameters,\n PartInfo,\n PartType,\n} from '../directive.js';\n\n/**\n * A key-value set of CSS properties and values.\n *\n * The key should be either a valid CSS property name string, like\n * `'background-color'`, or a valid JavaScript camel case property name\n * for CSSStyleDeclaration like `backgroundColor`.\n */\nexport interface StyleInfo {\n [name: string]: string | undefined | null;\n}\n\nclass StyleMapDirective extends Directive {\n _previousStyleProperties?: Set<string>;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (\n partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'style' ||\n (partInfo.strings?.length as number) > 2\n ) {\n throw new Error(\n 'The `styleMap` directive must be used in the `style` attribute ' +\n 'and must be the only part in the attribute.'\n );\n }\n }\n\n render(styleInfo: Readonly<StyleInfo>) {\n return Object.keys(styleInfo).reduce((style, prop) => {\n const value = styleInfo[prop];\n if (value == null) {\n return style;\n }\n // Convert property names from camel-case to dash-case, i.e.:\n // `backgroundColor` -> `background-color`\n // Vendor-prefixed names need an extra `-` appended to front:\n // `webkitAppearance` -> `-webkit-appearance`\n // Exception is any property name containing a dash, including\n // custom properties; we assume these are already dash-cased i.e.:\n // `--my-button-color` --> `--my-button-color`\n prop = prop\n .replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, '-$&')\n .toLowerCase();\n return style + `${prop}:${value};`;\n }, '');\n }\n\n override update(part: AttributePart, [styleInfo]: DirectiveParameters<this>) {\n const {style} = part.element as HTMLElement;\n\n if (this._previousStyleProperties === undefined) {\n this._previousStyleProperties = new Set();\n for (const name in styleInfo) {\n this._previousStyleProperties.add(name);\n }\n return this.render(styleInfo);\n }\n\n // Remove old properties that no longer exist in styleInfo\n // We use forEach() instead of for-of so that re don't require down-level\n // iteration.\n this._previousStyleProperties!.forEach((name) => {\n // If the name isn't in styleInfo or it's null/undefined\n if (styleInfo[name] == null) {\n this._previousStyleProperties!.delete(name);\n if (name.includes('-')) {\n style.removeProperty(name);\n } else {\n // Note reset using empty string (vs null) as IE11 does not always\n // reset via null (https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style#setting_styles)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (style as any)[name] = '';\n }\n }\n });\n\n // Add or update properties\n for (const name in styleInfo) {\n const value = styleInfo[name];\n if (value != null) {\n this._previousStyleProperties.add(name);\n if (name.includes('-')) {\n style.setProperty(name, value);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (style as any)[name] = value;\n }\n }\n }\n return noChange;\n }\n}\n\n/**\n * A directive that applies CSS properties to an element.\n *\n * `styleMap` can only be used in the `style` attribute and must be the only\n * expression in the attribute. It takes the property names in the\n * {@link StyleInfo styleInfo} object and adds the property values as CSS\n * properties. Property names with dashes (`-`) are assumed to be valid CSS\n * property names and set on the element's style object using `setProperty()`.\n * Names without dashes are assumed to be camelCased JavaScript property names\n * and set on the element's style object using property assignment, allowing the\n * style object to translate JavaScript-style names to CSS property names.\n *\n * For example `styleMap({backgroundColor: 'red', 'border-top': '5px', '--size':\n * '0'})` sets the `background-color`, `border-top` and `--size` properties.\n *\n * @param styleInfo\n * @see {@link https://lit.dev/docs/templates/directives/#stylemap styleMap code samples on Lit.dev}\n */\nexport const styleMap = directive(StyleMapDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {StyleMapDirective};\n", "import {css} from 'lit';\nexport const styles = css`:host{display:inline-block;width:200px;position:relative}.wrapper{--row-count:1;--maxrow-count:;--line-height:var(--bl-font-title-3-line-height);--scroll-height:var(--line-height);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--border-size:1px;--default-scroll-height:calc((var(--row-count) * var(--line-height)) + var(--padding-vertical));--height:max(var(--scroll-height),var(--default-scroll-height));--input-font:var(--bl-font-body-text-2);--border-radius:var(--bl-size-3xs);display:flex;flex-direction:column;position:relative;gap:var(--bl-size-3xs)}.input-wrapper{border:solid var(--border-size) var(--bl-color-border);border-radius:var(--border-radius);padding-top:var(--padding-vertical);display:flex;box-sizing:border-box}textarea{width:100%;align-self:stretch;outline:0;font:var(--input-font);padding:0 calc(var(--padding-horizontal) - var(--border-size));padding-bottom:var(--padding-vertical);margin:0;border:0;border-radius:var(--border-radius);color:var(--bl-color-content-primary);resize:vertical;display:block}:host([size='large']) .wrapper{--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size='small']) .wrapper{--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-xs);--input-font:var(--bl-font-body-text-3);--line-height:var(--bl-font-title-4-line-height)}textarea:disabled{background-color:var(--bl-color-secondary-background);color:var(--bl-color-content-tertiary);cursor:not-allowed}:host([disabled]) .wrapper{background-color:var(--bl-color-secondary-background)}:host([expand]) textarea{overflow:hidden;resize:none;height:var(--height)}:host([expand][max-rows]) textarea{--maxrow-height:calc((var(--maxrow-count) * var(--line-height)) + var(--padding-vertical));overflow-y:scroll;height:min(var(--height),var(--maxrow-height))}.wrapper:focus-within{border-color:var(--bl-color-primary)}.dirty.max-len-invalid,.dirty.invalid{border-color:var(--bl-color-danger)}:host([label]) ::placeholder{color:transparent;transition:color ease-out .4s}label{position:absolute;top:var(--padding-vertical);left:var(--padding-horizontal);right:var(--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;max-width:max-content;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}: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-content-primary-contrast);pointer-events:initial}:host ::placeholder,:host([label-fixed]) ::placeholder{color:var(--bl-color-content-tertiary)}:host([label-fixed]) label{position:static;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--bl-color-content-secondary);background-color:initial;padding:0}.hint{display:none;font:var(--bl-font-body-text-3)}:host([character-counter]) .hint,:host([help-text]) .hint,.dirty.invalid .hint{display:flex;gap:var(--bl-size-3xs)}.hint>*{margin:0;padding:0}.help-text,.invalid-text{flex:1}.counter-text{color:var(--bl-color-content-secondary);margin-left:auto}:where(.max-len-invalid,.dirty.invalid) .hint>.counter-text{color:var(--bl-color-danger)}.invalid-text{display:none;color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}:where(.dirty.max-len-invalid,.dirty.invalid) .hint>.invalid-text{display:inline-block}.dirty.invalid .hint>.help-text{display:none}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { FormControlMixin } from '@open-wc/form-control';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { live } from 'lit/directives/live.js';\nimport { textAreaValidators } from '../../utilities/form-control';\nimport 'element-internals-polyfill';\nimport style from './bl-textarea.css';\n\nexport type TextareaSize = 'small' | 'medium' | 'large';\n/**\n * @tag bl-textarea\n * @summary Baklava Textarea component\n */\n@customElement('bl-textarea')\nexport default class BlTextarea extends FormControlMixin(LitElement) {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n static formControlValidators = textAreaValidators;\n\n @query('textarea')\n validationTarget: HTMLTextAreaElement;\n\n /**\n * Name of textarea\n */\n @property({ type: String })\n name = '';\n\n /**\n * Makes textarea a mandatory field\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Disables the textarea\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Sets expandity\n */\n @property({ type: Boolean, reflect: true })\n expand = false;\n\n /**\n * Sets max row when expand is true\n */\n @property({ type: Number, reflect: true, attribute: 'max-rows' })\n maxRows?: number;\n\n /**\n * Sets textarea size.\n */\n @property({ type: String, reflect: true })\n size?: TextareaSize = 'medium';\n\n /**\n * Sets label of the textarea\n */\n @property({ reflect: true })\n label?: string;\n\n /**\n * Makes label as fixed positioned\n */\n @property({ type: Boolean, attribute: 'label-fixed', reflect: true })\n labelFixed = false;\n\n /**\n * Sets placeholder of the textarea\n */\n @property({})\n placeholder?: string;\n\n /**\n * Enables showing character counter.\n */\n @property({ type: Boolean, attribute: 'character-counter' })\n characterCounter = 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 /**\n * Sets minimum length of the textarea\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * Sets max length of textarea\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * Sets initial value of the textarea\n */\n @property()\n value = '';\n\n /**\n * Sets textarea visible row count.\n */\n @property({ type: Number })\n rows?: number = 4;\n\n @event('bl-input') private onInput: EventDispatcher<string>;\n\n @event('bl-change') private onChange: EventDispatcher<string>;\n\n @event('bl-invalid') private onInvalid: EventDispatcher<ValidityState>;\n\n @state()\n private customScrollHeight: string | null = null;\n\n connectedCallback() {\n super.connectedCallback();\n this.internals.form?.addEventListener('submit', () => {\n this.reportValidity();\n });\n }\n\n private onError = (): void => {\n this.onInvalid(this.internals.validity);\n };\n\n private inputHandler(event: Event) {\n this.autoResize();\n\n const value = (event.target as HTMLTextAreaElement).value;\n this.value = value;\n this.onInput(value);\n }\n\n private changeHandler(event: Event) {\n const value = (event.target as HTMLTextAreaElement).value;\n\n this.dirty = true;\n this.value = value;\n this.onChange(value);\n }\n\n firstUpdated() {\n this.setValue(this.value);\n this.autoResize();\n }\n\n protected async updated(changedProperties: PropertyValues) {\n if (changedProperties.has('rows')) {\n this.autoResize();\n }\n\n if (changedProperties.has('value')) {\n this.setValue(this.value);\n\n await this.validationComplete;\n\n this.requestUpdate();\n }\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 validityCallback(): string | void {\n return this.customInvalidText || this.validationTarget?.validationMessage;\n }\n\n private autoResize() {\n if (!this.expand) {\n return;\n }\n\n this.validationTarget.style.height = 'auto';\n const scrollHeight = this.validationTarget.scrollHeight;\n this.customScrollHeight = `${scrollHeight}px`;\n this.validationTarget.style.removeProperty('height');\n }\n\n @state() private dirty = false;\n\n render(): TemplateResult {\n const maxLengthInvalid = this.internals.validity.tooLong;\n const invalidMessage = !this.checkValidity()\n ? html`<p class=\"invalid-text\">${this.validationMessage}</p>`\n : ``;\n const helpMessage =\n this.helpText ? html`<p class=\"help-text\">${this.helpText}</p>` : ``;\n\n const label = this.label ? html`<label for=\"input\">${this.label}</label>` : '';\n const characterCounterText =\n this.characterCounter && this.maxlength\n ? `${this.value.length}/${this.maxlength}`\n : this.characterCounter\n ? `${this.value.length}`\n : '';\n const characterCounter = this.characterCounter\n ? html`<p class=\"counter-text\">${characterCounterText}</p>`\n : '';\n\n const wrapperClasses = {\n 'wrapper': true,\n 'has-value': this.value !== null && this.value !== '',\n 'dirty': this.dirty,\n 'max-len-invalid': maxLengthInvalid,\n 'invalid': !this.checkValidity(),\n };\n\n const styles = {\n '--row-count': `${this.rows}`,\n '--maxrow-count': this.maxRows ? `${this.maxRows}` : null,\n '--scroll-height': this.customScrollHeight,\n };\n\n return html`\n <div style=${styleMap(styles)} class=${classMap(wrapperClasses)}>\n ${label}\n <div class=\"input-wrapper\">\n <textarea\n id=\"input\"\n name=\"${ifDefined(this.name)}\"\n .value=${live(this.value)}\n placeholder=\"${ifDefined(this.placeholder)}\"\n minlength=\"${ifDefined(this.minlength)}\"\n rows=\"${ifDefined(this.rows)}\"\n ?required=${this.required}\n ?disabled=${this.disabled}\n @change=${this.changeHandler}\n @input=${this.inputHandler}\n @invalid=${this.onError}\n >\n </textarea>\n </div>\n <div class=\"hint\">${invalidMessage}${helpMessage}${characterCounter}</div>\n </div>\n `;\n }\n}\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-textarea': BlTextarea;\n }\n}\n"],
|
|
5
|
+
"mappings": "saA+HaA,EAAWC,EArGxB,cAAgCC,CAAAA,CAG9BC,YAAYC,EAAAA,CAAAA,IAAAA,EAEV,GADAC,MAAMD,CAAAA,EAEJA,EAASE,OAASC,EAASC,WAC3BJ,EAASK,OAAS,WACjBC,EAAAN,EAASO,WADDF,MACCE,IAAAA,OAAAA,OAAAA,EAASC,QAAoB,EAEvC,MAAUC,MACR,4GAAA,CAIL,CAEDC,OAAOC,EAAAA,CACL,OAAOC,OAAOC,KAAKF,CAAAA,EAAWG,OAAO,CAACC,EAAOC,IAAAA,CAC3C,IAAMC,EAAQN,EAAUK,CAAAA,EAC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", "length", "Error", "render", "styleInfo", "Object", "keys", "reduce", "style", "prop", "value", "replace", "toLowerCase", "update", "part", "element", "this", "_previousStyleProperties", "Set", "add", "forEach", "delete", "includes", "removeProperty", "setProperty", "noChange", "styles", "i", "bl_textarea_default", "BlTextarea", "FormControlMixin", "s", "bl_textarea_default", "_a", "event", "value", "changedProperties", "scrollHeight", "maxLengthInvalid", "invalidMessage", "y", "helpMessage", "label", "characterCounterText", "characterCounter", "wrapperClasses", "styles", "i", "o", "l", "textAreaValidators", "__decorateClass", "e", "t"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as m}from"./chunk-AEVRCHAZ.js";import{a as g}from"./chunk-EPJ347EQ.js";import{a as u}from"./chunk-7K5FMQLQ.js";import{a as b}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-AEVRCHAZ.js";import{a as g}from"./chunk-EPJ347EQ.js";import{a as u}from"./chunk-7K5FMQLQ.js";import{a as b}from"./chunk-ZAU7BBDB.js";import{a as d}from"./chunk-OLPYXE2P.js";import{a}from"./chunk-KPAWUBRO.js";import{a as s}from"./chunk-23UFIOHV.js";import{a as c,b as l,f as p,g as h,h as t,i as n,j as v}from"./chunk-57PTZNIL.js";import{a as i}from"./chunk-NZ3RGSR6.js";var E=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);--autofill-bg-color:var(--bl-color-accent-primary-background);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)}.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:var(--bl-size-3xs)}:host([disabled]) .input-wrapper{cursor:not-allowed;background-color:var(--bl-color-secondary-background);--text-color:var(--bl-color-content-passive)}.input-wrapper:has(input:autofill){background-color:var(--autofill-bg-color)}.input-wrapper:has(input:-webkit-autofill){background-color:var(--autofill-bg-color)}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{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}input:disabled{cursor:not-allowed}input:autofill{background-color:var(--autofill-bg-color);box-shadow:0 0 0 40rem var(--autofill-bg-color) inset}input:-webkit-autofill{background-color:var(--autofill-bg-color);box-shadow:0 0 0 40rem var(--autofill-bg-color) inset}.icon{display:flex;align-items:center;gap:8px;flex-basis:var(--icon-size);align-self:center;height:var(--icon-size)}bl-icon:not(.reveal-icon){font-size:var(--icon-size);color:var(--icon-color);height:var(--icon-size)}.reveal-button bl-icon{display:none}bl-icon[name='eye_on']{display:inline-block}.password-visible bl-icon[name='eye_on']{display:none}.password-visible bl-icon[name='eye_off']{display:inline-block}.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}::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)}: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}`,y=E;var e=class extends u(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&&b(this.form)};this.onError=()=>{this.onInvalid(this.internals.validity)};this.dirty=!1;this.passwordVisible=!1;this.passwordInput=!1}static get styles(){return[y]}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)}textVisibilityToggle(){this.passwordVisible=!this.passwordVisible}validityCallback(){var r;return this.customInvalidText||((r=this.validationTarget)==null?void 0:r.validationMessage)}reportValidity(){return this.dirty=!0,this.checkValidity()}inputHandler(r){let o=r.target.value;this.value=o,this.onInput(o)}changeHandler(r){let o=r.target.value;this.dirty=!0,this.value=o,this.onChange(o)}firstUpdated(){this.passwordInput=this.type==="password",this.setValue(this.value)}async updated(r){r.has("value")&&(this.setValue(this.value),await this.validationComplete,this.requestUpdate())}render(){let r=this.checkValidity()?"":l`<p id="errorMessage" aria-live="polite" class="invalid-text">
|
|
2
2
|
${this.validationMessage}
|
|
3
3
|
</p>`,o=this.helpText?l`<p id="helpText" class="help-text">${this.helpText}</p>`:"",f=this.icon?l`<bl-icon class="custom-icon" name="${this.icon}"></bl-icon>`:"",x=this.label?l`<label for="input">${this.label}</label>`:"",w=this.passwordInput?l`<bl-button
|
|
4
4
|
size="small"
|
|
@@ -6,7 +6,7 @@ import{a as m}from"./chunk-AEVRCHAZ.js";import{a as g}from"./chunk-EPJ347EQ.js";
|
|
|
6
6
|
variant="tertiary"
|
|
7
7
|
class="${d({"reveal-button":!0,"password-visible":this.passwordVisible})}"
|
|
8
8
|
aria-label="Toggle password reveal"
|
|
9
|
-
@bl-click="${this.
|
|
9
|
+
@bl-click="${this.textVisibilityToggle}"
|
|
10
10
|
>
|
|
11
11
|
<bl-icon class="reveal-icon" slot="icon" name="eye_on"></bl-icon>
|
|
12
12
|
<bl-icon class="reveal-icon" slot="icon" name="eye_off"></bl-icon>
|
|
@@ -38,4 +38,4 @@ import{a as m}from"./chunk-AEVRCHAZ.js";import{a as g}from"./chunk-EPJ347EQ.js";
|
|
|
38
38
|
</div>
|
|
39
39
|
<div class="hint">${r} ${o}</div>
|
|
40
40
|
</div>`}};e.formControlValidators=m,i([v("input")],e.prototype,"validationTarget",2),i([t({})],e.prototype,"name",2),i([t({})],e.prototype,"type",2),i([t({reflect:!0})],e.prototype,"label",2),i([t({})],e.prototype,"placeholder",2),i([t()],e.prototype,"value",2),i([t({type:Boolean})],e.prototype,"required",2),i([t({type:Number})],e.prototype,"minlength",2),i([t({type:Number})],e.prototype,"maxlength",2),i([t({type:Number})],e.prototype,"min",2),i([t({type:Number})],e.prototype,"max",2),i([t({type:Number})],e.prototype,"step",2),i([t({type:String})],e.prototype,"icon",2),i([t({type:String,reflect:!0})],e.prototype,"size",2),i([t({type:Boolean,reflect:!0})],e.prototype,"disabled",2),i([t({type:Boolean,attribute:"label-fixed",reflect:!0})],e.prototype,"labelFixed",2),i([t({type:String,attribute:"invalid-text"})],e.prototype,"customInvalidText",2),i([t({type:String,attribute:"help-text",reflect:!0})],e.prototype,"helpText",2),i([s("bl-change")],e.prototype,"onChange",2),i([s("bl-input")],e.prototype,"onInput",2),i([s("bl-invalid")],e.prototype,"onInvalid",2),i([n()],e.prototype,"dirty",2),i([n()],e.prototype,"passwordVisible",2),i([n()],e.prototype,"passwordInput",2),e=i([h("bl-input")],e);export{e as a};
|
|
41
|
-
//# sourceMappingURL=chunk-
|
|
41
|
+
//# sourceMappingURL=chunk-TTMNJLGU.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/input/bl-input.css", "../src/components/input/bl-input.ts"],
|
|
4
|
+
"sourcesContent": ["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);--autofill-bg-color:var(--bl-color-accent-primary-background);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)}.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:var(--bl-size-3xs)}:host([disabled]) .input-wrapper{cursor:not-allowed;background-color:var(--bl-color-secondary-background);--text-color:var(--bl-color-content-passive)}.input-wrapper:has(input:autofill){background-color:var(--autofill-bg-color)}.input-wrapper:has(input:-webkit-autofill){background-color:var(--autofill-bg-color)}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{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}input:disabled{cursor:not-allowed}input:autofill{background-color:var(--autofill-bg-color);box-shadow:0 0 0 40rem var(--autofill-bg-color) inset}input:-webkit-autofill{background-color:var(--autofill-bg-color);box-shadow:0 0 0 40rem var(--autofill-bg-color) inset}.icon{display:flex;align-items:center;gap:8px;flex-basis:var(--icon-size);align-self:center;height:var(--icon-size)}bl-icon:not(.reveal-icon){font-size:var(--icon-size);color:var(--icon-color);height:var(--icon-size)}.reveal-button bl-icon{display:none}bl-icon[name='eye_on']{display:inline-block}.password-visible bl-icon[name='eye_on']{display:none}.password-visible bl-icon[name='eye_off']{display:inline-block}.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}::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)}: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, PropertyValues } 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';\nimport '../button/bl-button';\n\nimport style from './bl-input.css';\n\nexport type InputSize = 'small' | '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 * Sets name of the input\n */\n @property({})\n name?: string;\n\n /**\n * Type of the input. It's used to set `type` attribute of native input inside. Only `text`, `number` and `password` is supported for now.\n */\n @property({})\n type: 'text' | 'password' | '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 @state() private passwordVisible = false;\n\n @state() private passwordInput = false;\n\n private textVisibilityToggle() {\n this.passwordVisible = !this.passwordVisible;\n }\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 private inputHandler(event: Event) {\n const value = (event.target as HTMLInputElement).value;\n\n this.value = 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.value = value;\n this.onChange(value);\n }\n\n firstUpdated() {\n this.passwordInput = this.type === 'password';\n this.setValue(this.value);\n }\n\n protected async updated(changedProperties: PropertyValues) {\n if (changedProperties.has('value')) {\n this.setValue(this.value);\n\n await this.validationComplete;\n\n this.requestUpdate();\n }\n }\n\n render(): TemplateResult {\n const invalidMessage = !this.checkValidity()\n ? html`<p id=\"errorMessage\" aria-live=\"polite\" class=\"invalid-text\">\n ${this.validationMessage}\n </p>`\n : ``;\n const helpMessage = this.helpText\n ? html`<p id=\"helpText\" class=\"help-text\">${this.helpText}</p>`\n : ``;\n\n const icon = this.icon ? html`<bl-icon class=\"custom-icon\" name=\"${this.icon}\"></bl-icon>` : '';\n const label = this.label ? html`<label for=\"input\">${this.label}</label>` : '';\n\n const revealButton = this.passwordInput\n ? html`<bl-button\n size=\"small\"\n kind=\"neutral\"\n variant=\"tertiary\"\n class=\"${classMap({\n 'reveal-button': true,\n 'password-visible': this.passwordVisible,\n })}\"\n aria-label=\"Toggle password reveal\"\n @bl-click=\"${this.textVisibilityToggle}\"\n >\n <bl-icon class=\"reveal-icon\" slot=\"icon\" name=\"eye_on\"></bl-icon>\n <bl-icon class=\"reveal-icon\" slot=\"icon\" name=\"eye_off\"></bl-icon>\n </bl-button>`\n : '';\n\n const classes = {\n 'wrapper': true,\n 'dirty': this.dirty,\n 'invalid': !this.checkValidity(),\n 'has-icon': this.passwordInput || this.icon || (this.dirty && !this.checkValidity()),\n 'has-value': this.value !== null && this.value !== '',\n };\n\n const passwordType = this.passwordVisible ? 'text' : 'password';\n const inputType = this.passwordInput ? passwordType : this.type;\n\n return html`<div class=${classMap(classes)}>\n ${label}\n <div class=\"input-wrapper\">\n <input\n id=\"input\"\n type=${inputType}\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\">\n ${revealButton} ${icon}\n <bl-icon class=\"error-icon\" name=\"alert\"></bl-icon>\n </div>\n </div>\n <div class=\"hint\">${invalidMessage} ${helpMessage}</div>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-input': BlInput;\n }\n}\n"],
|
|
5
|
+
"mappings": "6YACO,IAAMA,EAASC,+5IACfC,EAAQF,ECmBf,IAAqBG,EAArB,cAA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AAA,CADCE,EAAS,CAAE,KAAM,QAAS,UAAW,cAAe,QAAS,EAAK,CAAC,GAjGjDvB,EAkGnB,0BAMAqB,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,GAvGlCvB,EAwGnB,iCAMAqB,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,UAAW,YAAa,QAAS,EAAK,CAAC,GA7G9CvB,EA8GnB,wBAK4BqB,EAAA,CAA3BlB,EAAM,WAAW,GAnHCH,EAmHS,wBAKDqB,EAAA,CAA1BlB,EAAM,UAAU,GAxHEH,EAwHQ,uBAKEqB,EAAA,CAA5BlB,EAAM,YAAY,GA7HAH,EA6HU,yBA4BZqB,EAAA,CAAhBG,EAAM,GAzJYxB,EAyJF,qBAEAqB,EAAA,CAAhBG,EAAM,GA3JYxB,EA2JF,+BAEAqB,EAAA,CAAhBG,EAAM,GA7JYxB,EA6JF,6BA7JEA,EAArBqB,EAAA,CADCE,EAAc,UAAU,GACJvB",
|
|
6
|
+
"names": ["styles", "i", "bl_input_default", "BlInput", "FormControlMixin", "s", "event", "submit", "bl_input_default", "_a", "value", "changedProperties", "invalidMessage", "y", "helpMessage", "icon", "label", "revealButton", "o", "classes", "passwordType", "inputType", "l", "innerInputValidators", "__decorateClass", "i", "e", "t"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{a as _}from"./chunk-OLPYXE2P.js";import{a as n}from"./chunk-KPAWUBRO.js";import{a as y}from"./chunk-23UFIOHV.js";import{a as h,b as e,f as u,g as m,h as r,i as g,j as f}from"./chunk-57PTZNIL.js";import{a as o}from"./chunk-NZ3RGSR6.js";var x=l=>{if(l.reportValidity()){let d=new SubmitEvent("submit",{bubbles:!0,cancelable:!0});l.dispatchEvent(d),d.defaultPrevented||l.submit()}else return};var T=h`@keyframes spin{from{transform:rotate(0)}to{transform:rotate(359deg)}}:host{display:var(--bl-button-display,inline-block);max-width:100%;position:relative}.button{--main-color:var(--bl-color-primary);--main-hover-color:var(--bl-color-primary-hover);--text-hover-color:var(--bl-color-secondary-background);--content-color:var(--bl-color-content-primary-contrast);--bg-color:var(--main-color);--border-color:var(--main-color);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-m);--margin-icon:var(--padding-vertical);--icon-size:var(--bl-size-m);--font:var(--bl-font-title-3-medium);--height:var(--bl-size-2xl);display:flex;gap:var(--margin-icon);justify-content:var(--bl-button-justify,center);align-items:center;box-sizing:border-box;width:100%;height:var(--height);border:solid 1px var(--border-color);border-radius:6px;text-decoration:none;padding:var(--padding-vertical) var(--padding-horizontal);cursor:pointer;background-color:var(--bg-color);color:var(--content-color);font:var(--font);font-kerning:none;user-select:none}:host(:hover) .button,:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([size='small']) .button{--font:var(--bl-font-title-4-medium);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-2xs);--icon-size:var(--bl-size-s);--height:var(--bl-size-xl)}:host([size='large']) .button{--font:var(--bl-font-title-3-medium);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-xl);--margin-icon:var(--bl-size-2xs);--height:var(--bl-size-3xl)}.button:focus{outline:0}.button:focus-visible{position:relative;outline:0}.button:focus-visible::after{border:2px solid var(--main-color);border-radius:var(--bl-border-radius-l);content:'';position:absolute;inset:-4px}.loading-icon{animation:spin 1s linear infinite;font-size:var(--icon-size)}:host ::slotted(bl-icon){font-size:var(--icon-size)}:host([loading]) ::slotted(bl-icon){display:none}:host .has-icon:not(.has-content){--padding-horizontal:var(--padding-vertical);--margin-icon:0}:host([variant='secondary']) .button{--bg-color:transparent;--content-color:var(--main-color)}:host([variant='tertiary']) .button{--content-color:var(--main-color);--border-color:transparent;--bg-color:transparent}:host([kind='neutral']) .button{--main-color:var(--bl-color-secondary);--main-hover-color:var(--bl-color-secondary-hover)}:host([kind='success']) .button{--main-color:var(--bl-color-success);--main-hover-color:var(--bl-color-success-hover)}:host([kind='danger']) .button{--main-color:var(--bl-color-danger);--main-hover-color:var(--bl-color-danger-hover)}:host([disabled]){cursor:not-allowed}:host([loading]){cursor:wait}:host([loading]) bl-icon:not(.loading-icon){display:none}:host .button[aria-disabled='true']{--main-color:var(--bl-color-tertiary);--main-hover-color:var(--bl-color-tertiary);--content-color:var(--bl-color-content-passive);--bg-color:var(--main-color);pointer-events:none;text-decoration:none}:host([variant='tertiary']) .button[aria-disabled='true']{--main-color:transparent}:host([variant='secondary']:hover) .button[aria-disabled='false'],:host([variant='secondary'].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button[aria-disabled='false']{--content-color:var(--bl-color-content-primary-contrast);--bg-color:var(--main-hover-color)}:host([variant='tertiary']:hover) .button[aria-disabled='false'],:host([variant='tertiary'].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button[aria-disabled='false']{--content-color:var(--main-hover-color);--bg-color:var(--text-hover-color)}:host([dropdown]) .open{display:none}:host([dropdown]) .active .open{display:inline-block}:host([dropdown]) .active .close{display:none}:host .active.button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}:host([variant='secondary']) .active.button{--content-color:var(--bl-color-content-primary-contrast);--bg-color:var(--main-hover-color)}:host([variant='tertiary']) .active.button{--content-color:var(--main-color);--bg-color:var(--bl-color-tertiary);--border-color:transparent}`,z=T;var t=class extends u{constructor(){super(...arguments);this.variant="primary";this.kind="default";this.size="medium";this.loading=!1;this.disabled=!1;this.target="_self";this.dropdown=!1;this.active=!1}static get styles(){return[z]}get _isActive(){return this.active}connectedCallback(){super.connectedCallback(),this.form=this.closest("form")}caretTemplate(){return e` <bl-icon class="open" name="arrow_up"></bl-icon>
|
|
2
|
+
<bl-icon class="close" name="arrow_down"></bl-icon>`}_handleClick(){this.type==="submit"&&this.form&&x(this.form),this.onClick("Click event fired!")}focus(){this.button.focus()}get _hasIconSlot(){return this.querySelector(':scope > [slot="icon"]')!==null}get _hasDefaultSlot(){return[...this.childNodes].some(a=>{var c;let i=a.nodeType;return i===a.TEXT_NODE&&((c=a.textContent)==null?void 0:c.trim())!==""||i===a.ELEMENT_NODE&&!a.hasAttribute("slot")})}render(){let s=this.loading||this.disabled,a=this.loading&&this.loadingLabel?this.loadingLabel:e`<slot></slot>`,i=!!this.href,c=this.icon?e`<bl-icon name=${this.icon}></bl-icon>`:"",b=this.loading?e`<bl-icon class="loading-icon" name="loading"></bl-icon>`:"",p=e`<slot name="icon">${c}</slot> <span class="label">${a}</span>`,O=this.dropdown?this.caretTemplate():"",v=_({button:!0,"has-icon":this.icon||this._hasIconSlot,"has-content":this._hasDefaultSlot,active:!i&&this._isActive});return i?e`<a
|
|
3
|
+
class=${v}
|
|
4
|
+
aria-disabled="${n(s)}"
|
|
5
|
+
aria-label="${n(this.label)}"
|
|
6
|
+
href=${n(this.href)}
|
|
7
|
+
target=${n(this.target)}
|
|
8
|
+
role="button"
|
|
9
|
+
>${b} ${p}
|
|
10
|
+
</a>`:e`<button
|
|
11
|
+
class=${v}
|
|
12
|
+
aria-disabled="${n(s)}"
|
|
13
|
+
aria-label="${n(this.label)}"
|
|
14
|
+
?disabled=${s}
|
|
15
|
+
@click="${this._handleClick}"
|
|
16
|
+
>
|
|
17
|
+
${b} ${p} ${O}
|
|
18
|
+
</button>`}};o([r({type:String,reflect:!0})],t.prototype,"variant",2),o([r({type:String,reflect:!0})],t.prototype,"kind",2),o([r({type:String,reflect:!0})],t.prototype,"size",2),o([r({type:String})],t.prototype,"label",2),o([r({type:String,attribute:"loading-label"})],t.prototype,"loadingLabel",2),o([r({type:Boolean,reflect:!0})],t.prototype,"loading",2),o([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),o([r({type:String})],t.prototype,"href",2),o([r({type:String})],t.prototype,"icon",2),o([r({type:String})],t.prototype,"target",2),o([r({type:String})],t.prototype,"type",2),o([r({type:Boolean})],t.prototype,"dropdown",2),o([g({})],t.prototype,"active",2),o([f(".button")],t.prototype,"button",2),o([y("bl-click")],t.prototype,"onClick",2),t=o([m("bl-button")],t);export{x as a,t as b};
|
|
19
|
+
//# sourceMappingURL=chunk-ZAU7BBDB.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../node_modules/@open-wc/form-helpers/src/index.ts", "../src/components/button/bl-button.css", "../src/components/button/bl-button.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Implicitly submit a form by first validating all controls. If the form\n * is valid, issue a submit event and if that event is not prevented, manually\n * call the form's submit method.\n *\n * @param form {HTMLFormElement} - A form to implicitly submit\n */\nexport const submit = (form: HTMLFormElement): void => {\n if (!form.reportValidity()) {\n return;\n } else {\n const submitEvent = new SubmitEvent('submit', {\n bubbles: true,\n cancelable: true\n });\n form.dispatchEvent(submitEvent);\n if (!submitEvent.defaultPrevented) {\n form.submit();\n }\n }\n};\n\nexport type FormValue = string|FormData|File|FormValue[];\n\n/**\n * Parse a form and return a set of values based on the name/value pair.\n * If multiple controls of a similar name exist, return an array for those values;\n * otherwise return a single value.\n *\n * @param form {HTMLFormElement} - The form to parse for values\n * @returns {Record<string, any>} - An object representing the form's current values\n */\nexport const formValues = (form: HTMLFormElement): Record<string, FormValue> => {\n const formData = new FormData(form);\n const values: Record<string, FormValue> = {};\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore This does exist in all browsers. TypeScript is wrong\n for (const [key, value] of formData.entries()) {\n if (!values.hasOwnProperty(key)) {\n values[key] = value;\n } else if (Array.isArray(values[key])) {\n const pointer = values[key] as FormValue[];\n pointer.push(value);\n } else {\n values[key] = [values[key], value];\n }\n }\n\n return values;\n};\n\n/**\n * This method takes a form and parses it as an object. If any form control has a `.`\n * in its name, this utility will evaluate that name as a deep key for an object;\n * in other words, if a form has a named control, `name.first` and another, `name.last`\n * it will report back a nested object, name, with first and last properties\n * representing those controls' values.\n *\n * This can be useful when you have a complex model that you are attempting to represent\n * in declaratively in HTML.\n *\n * @param form {HTMLFormElement} - The form to grab values from\n * @returns {Object<string, FormValue>} - An object representation of the form\n */\nexport const parseFormAsObject = (form: HTMLFormElement): Record<string, FormValue> => {\n const data = formValues(form);\n const output: Record<string, FormValue> = {};\n\n Object.entries(data).forEach(([key, value]) => {\n /** If the key has a '.', parse it as an object */\n if (key.includes('.')) {\n const path = key.split('.');\n const destination: string | undefined = path.pop();\n let pointer = output;\n\n while (path.length) {\n const key = path.shift();\n pointer[key as string] = pointer[key as string] || ({} as FormValue);\n pointer = pointer[key as string] as unknown as Record<string, FormValue>;\n }\n\n pointer[destination as string] = value;\n } else {\n output[key] = data[key];\n }\n });\n\n return output;\n};\n", "import {css} from 'lit';\nexport const styles = css`@keyframes spin{from{transform:rotate(0)}to{transform:rotate(359deg)}}:host{display:var(--bl-button-display,inline-block);max-width:100%;position:relative}.button{--main-color:var(--bl-color-primary);--main-hover-color:var(--bl-color-primary-hover);--text-hover-color:var(--bl-color-secondary-background);--content-color:var(--bl-color-content-primary-contrast);--bg-color:var(--main-color);--border-color:var(--main-color);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-m);--margin-icon:var(--padding-vertical);--icon-size:var(--bl-size-m);--font:var(--bl-font-title-3-medium);--height:var(--bl-size-2xl);display:flex;gap:var(--margin-icon);justify-content:var(--bl-button-justify,center);align-items:center;box-sizing:border-box;width:100%;height:var(--height);border:solid 1px var(--border-color);border-radius:6px;text-decoration:none;padding:var(--padding-vertical) var(--padding-horizontal);cursor:pointer;background-color:var(--bg-color);color:var(--content-color);font:var(--font);font-kerning:none;user-select:none}:host(:hover) .button,:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([size='small']) .button{--font:var(--bl-font-title-4-medium);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-2xs);--icon-size:var(--bl-size-s);--height:var(--bl-size-xl)}:host([size='large']) .button{--font:var(--bl-font-title-3-medium);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-xl);--margin-icon:var(--bl-size-2xs);--height:var(--bl-size-3xl)}.button:focus{outline:0}.button:focus-visible{position:relative;outline:0}.button:focus-visible::after{border:2px solid var(--main-color);border-radius:var(--bl-border-radius-l);content:'';position:absolute;inset:-4px}.loading-icon{animation:spin 1s linear infinite;font-size:var(--icon-size)}:host ::slotted(bl-icon){font-size:var(--icon-size)}:host([loading]) ::slotted(bl-icon){display:none}:host .has-icon:not(.has-content){--padding-horizontal:var(--padding-vertical);--margin-icon:0}:host([variant='secondary']) .button{--bg-color:transparent;--content-color:var(--main-color)}:host([variant='tertiary']) .button{--content-color:var(--main-color);--border-color:transparent;--bg-color:transparent}:host([kind='neutral']) .button{--main-color:var(--bl-color-secondary);--main-hover-color:var(--bl-color-secondary-hover)}:host([kind='success']) .button{--main-color:var(--bl-color-success);--main-hover-color:var(--bl-color-success-hover)}:host([kind='danger']) .button{--main-color:var(--bl-color-danger);--main-hover-color:var(--bl-color-danger-hover)}:host([disabled]){cursor:not-allowed}:host([loading]){cursor:wait}:host([loading]) bl-icon:not(.loading-icon){display:none}:host .button[aria-disabled='true']{--main-color:var(--bl-color-tertiary);--main-hover-color:var(--bl-color-tertiary);--content-color:var(--bl-color-content-passive);--bg-color:var(--main-color);pointer-events:none;text-decoration:none}:host([variant='tertiary']) .button[aria-disabled='true']{--main-color:transparent}:host([variant='secondary']:hover) .button[aria-disabled='false'],:host([variant='secondary'].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button[aria-disabled='false']{--content-color:var(--bl-color-content-primary-contrast);--bg-color:var(--main-hover-color)}:host([variant='tertiary']:hover) .button[aria-disabled='false'],:host([variant='tertiary'].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button[aria-disabled='false']{--content-color:var(--main-hover-color);--bg-color:var(--text-hover-color)}:host([dropdown]) .open{display:none}:host([dropdown]) .active .open{display:inline-block}:host([dropdown]) .active .close{display:none}:host .active.button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}:host([variant='secondary']) .active.button{--content-color:var(--bl-color-content-primary-contrast);--bg-color:var(--main-hover-color)}:host([variant='tertiary']) .active.button{--content-color:var(--main-color);--bg-color:var(--bl-color-tertiary);--border-color:transparent}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, state, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { submit } from '@open-wc/form-helpers';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport style from './bl-button.css';\nimport '../icon/bl-icon';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'tertiary';\nexport type ButtonKind = 'default' | 'neutral' | 'success' | 'danger';\nexport type ButtonSize = 'small' | 'medium' | 'large';\nexport type TargetType = '_blank' | '_parent' | '_self' | '_top';\n\n/**\n * @tag bl-button\n * @summary Baklava Button component\n *\n * @cssproperty --bl-button-display - Sets the display property of button. Default value is 'inline-block'.\n * @cssproperty --bl-button-justify - Sets the justify-content property of button. Default value is 'center'.\n *\n */\n@customElement('bl-button')\nexport default class BlButton extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the button variant\n */\n @property({ type: String, reflect: true })\n variant: ButtonVariant = 'primary';\n\n /**\n * Sets the button kind\n */\n @property({ type: String, reflect: true })\n kind: ButtonKind = 'default';\n\n /**\n * Sets the button size\n */\n @property({ type: String, reflect: true })\n size: ButtonSize = 'medium';\n\n /**\n * Sets the button label. Used for accessibility.\n */\n @property({ type: String })\n label: string;\n\n /**\n * Sets the button label for loading status.\n */\n @property({ type: String, attribute: 'loading-label' })\n loadingLabel: string;\n\n /**\n * Sets loading state of button\n */\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n /**\n * Sets button as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Set link url. If set, button will be rendered as anchor tag.\n */\n @property({ type: String })\n href?: string;\n\n /**\n * Sets the icon name. Shows icon with bl-icon component\n */\n @property({ type: String })\n icon?: string;\n\n /**\n * Sets the anchor target. Used when `href` is set.\n */\n @property({ type: String })\n target?: TargetType = '_self';\n\n /**\n * Sets the type of the button. Set `submit` to use button as the submitter of parent form.\n */\n @property({ type: String })\n type: 'submit' | null;\n\n /**\n * Sets button type to dropdown\n */\n @property({ type: Boolean })\n dropdown = false;\n\n /**\n * Active state\n */\n @state({})\n active = false;\n\n @query('.button')\n private button: HTMLAnchorElement | HTMLButtonElement;\n\n /**\n * Fires when button clicked\n */\n @event('bl-click') private onClick: EventDispatcher<string>;\n\n private get _isActive() {\n return this.active;\n }\n\n private form: HTMLFormElement | null;\n\n connectedCallback() {\n super.connectedCallback();\n this.form = this.closest('form');\n }\n\n private caretTemplate(): TemplateResult {\n return html` <bl-icon class=\"open\" name=\"arrow_up\"></bl-icon>\n <bl-icon class=\"close\" name=\"arrow_down\"></bl-icon>`;\n }\n\n private _handleClick() {\n if (this.type === 'submit' && this.form) {\n submit(this.form);\n }\n\n this.onClick('Click event fired!');\n }\n\n focus() {\n this.button.focus();\n }\n\n get _hasIconSlot() {\n return this.querySelector(':scope > [slot=\"icon\"]') !== null;\n }\n\n get _hasDefaultSlot() {\n const childNodes = [...this.childNodes];\n return childNodes.some(node => {\n const nodeType = node.nodeType;\n // has only text node.\n if (nodeType === node.TEXT_NODE && node.textContent?.trim() !== '') {\n return true;\n }\n // has element node, it should not have slot attribute.\n if (nodeType === node.ELEMENT_NODE) {\n if (!(node as HTMLElement).hasAttribute('slot')) {\n return true;\n }\n }\n return false;\n });\n }\n\n render(): TemplateResult {\n const isDisabled = this.loading || this.disabled;\n const label = (this.loading && this.loadingLabel) ? this.loadingLabel : html`<slot></slot>`;\n const isAnchor = !!this.href;\n const icon = this.icon ? html`<bl-icon name=${this.icon}></bl-icon>` : '';\n const loadingIcon = this.loading ? html`<bl-icon class=\"loading-icon\" name=\"loading\"></bl-icon>` : '';\n const slots = html`<slot name=\"icon\">${icon}</slot> <span class=\"label\">${label}</span>`;\n const caret = this.dropdown ? this.caretTemplate() : '';\n const classes = classMap({\n 'button': true,\n 'has-icon': this.icon || this._hasIconSlot,\n 'has-content': this._hasDefaultSlot,\n 'active': !isAnchor && this._isActive,\n });\n\n return isAnchor\n ? html`<a\n class=${classes}\n aria-disabled=\"${ifDefined(isDisabled)}\"\n aria-label=\"${ifDefined(this.label)}\"\n href=${ifDefined(this.href)}\n target=${ifDefined(this.target)}\n role=\"button\"\n >${loadingIcon} ${slots}\n </a>`\n : html`<button\n class=${classes}\n aria-disabled=\"${ifDefined(isDisabled)}\"\n aria-label=\"${ifDefined(this.label)}\"\n ?disabled=${isDisabled}\n @click=\"${this._handleClick}\"\n >\n ${loadingIcon} ${slots} ${caret}\n </button>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-button': BlButton;\n }\n}\n"],
|
|
5
|
+
"mappings": "kPAOO,IAAMA,EAAUC,GAA+B,CACpD,GAAKA,EAAK,eAAc,EAEjB,CACL,IAAMC,EAAc,IAAI,YAAY,SAAU,CAC5C,QAAS,GACT,WAAY,GACb,EACDD,EAAK,cAAcC,CAAW,EACzBA,EAAY,kBACfD,EAAK,OAAM,MARb,OAWJ,ECnBO,IAAME,EAASC,6lIACfC,EAAQF,ECqBf,IAAqBG,EAArB,cAAsCC,CAAW,CAAjD,kCASE,aAAyB,UAMzB,UAAmB,UAMnB,UAAmB,SAkBnB,aAAU,GAMV,cAAW,GAkBX,YAAsB,QAYtB,cAAW,GAMX,YAAS,GAhFT,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAwFA,IAAY,WAAY,CACtB,OAAO,KAAK,MACd,CAIA,mBAAoB,CAClB,MAAM,kBAAkB,EACxB,KAAK,KA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"names": ["submit", "form", "submitEvent", "styles", "i", "bl_button_default", "BlButton", "s", "bl_button_default", "y", "submit", "node", "_a", "nodeType", "isDisabled", "label", "isAnchor", "icon", "loadingIcon", "slots", "caret", "classes", "o", "l", "__decorateClass", "e", "t", "i", "event"]
|
|
7
|
+
}
|
|
@@ -30,6 +30,14 @@ export default class BlButton extends LitElement {
|
|
|
30
30
|
* Sets the button label. Used for accessibility.
|
|
31
31
|
*/
|
|
32
32
|
label: string;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the button label for loading status.
|
|
35
|
+
*/
|
|
36
|
+
loadingLabel: string;
|
|
37
|
+
/**
|
|
38
|
+
* Sets loading state of button
|
|
39
|
+
*/
|
|
40
|
+
loading: boolean;
|
|
33
41
|
/**
|
|
34
42
|
* Sets button as disabled
|
|
35
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl-button.d.ts","sourceRoot":"","sources":["../../../src/components/button/bl-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAOvE,OAAO,iBAAiB,CAAC;AAEzB,oBAAY,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AACjE,oBAAY,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AACtE,oBAAY,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AACtD,oBAAY,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjE;;;;;;;GAOG;AAEH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,UAAU;IAC9C,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED;;OAEG;IAEH,OAAO,EAAE,aAAa,CAAa;IAEnC;;OAEG;IAEH,IAAI,EAAE,UAAU,CAAa;IAE7B;;OAEG;IAEH,IAAI,EAAE,UAAU,CA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IAEH,OAAO,EAAE,aAAa,CAAa;IAEnC;;OAEG;IAEH,IAAI,EAAE,UAAU,CAAa;IAE7B;;OAEG;IAEH,IAAI,EAAE,UAAU,CAAY;IAE5B;;OAEG;IAEH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IAEH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IAEH,OAAO,UAAS;IAEhB;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IAEH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IAEH,MAAM,CAAC,EAAE,UAAU,CAAW;IAE9B;;OAEG;IAEH,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEtB;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,MAAM,UAAS;IAGf,OAAO,CAAC,MAAM,CAAwC;IAEtD;;OAEG;IACgB,OAAO,CAAC,OAAO,CAA0B;IAE5D,OAAO,KAAK,SAAS,GAEpB;IAED,OAAO,CAAC,IAAI,CAAyB;IAErC,iBAAiB;IAKjB,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,YAAY;IAQpB,KAAK;IAIL,IAAI,YAAY,YAEf;IAED,IAAI,eAAe,YAgBlB;IAED,MAAM,IAAI,cAAc;CAmCzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"../../chunk-
|
|
1
|
+
import{b as a}from"../../chunk-ZAU7BBDB.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-button.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-Y2EBT6QM.js";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-Y2EBT6QM.js";import"../../chunk-ZAU7BBDB.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-dialog.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-TAU2CM6U.js";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-TAU2CM6U.js";import"../../chunk-ZAU7BBDB.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.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-WUDM5U5Z.js";import"../../chunk-KQBXYF3J.js";import"../../chunk-5ODNFE7B.js";import"../../chunk-
|
|
1
|
+
import{c as a,d as b}from"../../chunk-WUDM5U5Z.js";import"../../chunk-KQBXYF3J.js";import"../../chunk-5ODNFE7B.js";import"../../chunk-ZAU7BBDB.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.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-WUDM5U5Z.js";import"../../../chunk-KQBXYF3J.js";import"../../../chunk-5ODNFE7B.js";import"../../../chunk-
|
|
1
|
+
import{a,b}from"../../../chunk-WUDM5U5Z.js";import"../../../chunk-KQBXYF3J.js";import"../../../chunk-5ODNFE7B.js";import"../../../chunk-ZAU7BBDB.js";import"../../../chunk-OLPYXE2P.js";import"../../../chunk-KPAWUBRO.js";import"../../../chunk-F3ZH5IV7.js";import"../../../chunk-RLMJN536.js";import"../../../chunk-23UFIOHV.js";import"../../../chunk-57PTZNIL.js";import"../../../chunk-NZ3RGSR6.js";export{a as blDropdownItemTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-dropdown-item.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSResultGroup, LitElement, TemplateResult } from 'lit';
|
|
1
|
+
import { CSSResultGroup, LitElement, TemplateResult, PropertyValues } from 'lit';
|
|
2
2
|
import 'element-internals-polyfill';
|
|
3
3
|
import '../icon/bl-icon';
|
|
4
4
|
import '../button/bl-button';
|
|
@@ -104,13 +104,13 @@ export default class BlInput extends BlInput_base {
|
|
|
104
104
|
private dirty;
|
|
105
105
|
private passwordVisible;
|
|
106
106
|
private passwordInput;
|
|
107
|
-
private
|
|
107
|
+
private textVisibilityToggle;
|
|
108
108
|
validityCallback(): string | void;
|
|
109
109
|
reportValidity(): boolean;
|
|
110
|
-
valueChangedCallback(value: string): void;
|
|
111
110
|
private inputHandler;
|
|
112
111
|
private changeHandler;
|
|
113
112
|
firstUpdated(): void;
|
|
113
|
+
protected updated(changedProperties: PropertyValues): Promise<void>;
|
|
114
114
|
render(): TemplateResult;
|
|
115
115
|
}
|
|
116
116
|
declare global {
|
|
@@ -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;
|
|
1
|
+
{"version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C;IAE3B;;OAEG;IAEH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACiB,OAAO,CAAC,QAAQ,CAA0B;IAE9D;;OAEG;IACgB,OAAO,CAAC,OAAO,CAA0B;IAE5D;;OAEG;IACkB,OAAO,CAAC,SAAS,CAAiC;IAEvE,iBAAiB,IAAI,IAAI;IAUzB,oBAAoB,IAAI,IAAI;IAM5B,OAAO,CAAC,SAAS,CAIf;IAEF,OAAO,CAAC,OAAO,CAEb;IAEO,OAAO,CAAC,KAAK,CAAS;IAEtB,OAAO,CAAC,eAAe,CAAS;IAEhC,OAAO,CAAC,aAAa,CAAS;IAEvC,OAAO,CAAC,oBAAoB;IAI5B,gBAAgB,IAAI,MAAM,GAAG,IAAI;IAIjC,cAAc;IAKd,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,aAAa;IAQrB,YAAY;cAKI,OAAO,CAAC,iBAAiB,EAAE,cAAc;IAUzD,MAAM,IAAI,cAAc;CAsEzB;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-TTMNJLGU.js";import"../../chunk-AEVRCHAZ.js";import"../../chunk-EPJ347EQ.js";import"../../chunk-7K5FMQLQ.js";import"../../chunk-ZAU7BBDB.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl-pagination.d.ts","sourceRoot":"","sources":["../../../src/components/pagination/bl-pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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SAAS,UAAS;IAElB;;OAEG;IAEH,WAAW,SAAU;IAErB;;;OAGG;IAEH,mBAAmB;;;QAiBjB;IAEO,OAAO,CAAC,KAAK,CAA8B;IAEpD;;OAEG;IACiB,OAAO,CAAC,QAAQ,CAIjC;IAEH,iBAAiB;IAQjB,oBAAoB;IAKpB,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAU/C,OAAO,CAAC,SAAS;IA4BjB,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,WAAW;IA8BnB,MAAM,IAAI,cAAc;CAkCzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-IBKG5DOR.js";import"../../chunk-TTMNJLGU.js";import"../../chunk-AEVRCHAZ.js";import"../../chunk-7R56R3UM.js";import"../../chunk-4WJJQP4L.js";import"../../chunk-5ODNFE7B.js";import"../../chunk-EPJ347EQ.js";import"../../chunk-7K5FMQLQ.js";import"../../chunk-ZAU7BBDB.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-pagination.js.map
|
|
@@ -95,7 +95,7 @@ export default class BlTextarea extends BlTextarea_base {
|
|
|
95
95
|
private inputHandler;
|
|
96
96
|
private changeHandler;
|
|
97
97
|
firstUpdated(): void;
|
|
98
|
-
protected updated(changedProperties: PropertyValues): void
|
|
98
|
+
protected updated(changedProperties: PropertyValues): Promise<void>;
|
|
99
99
|
reportValidity(): boolean;
|
|
100
100
|
valueChangedCallback(value: string): void;
|
|
101
101
|
validityCallback(): string | void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl-textarea.d.ts","sourceRoot":"","sources":["../../../src/components/textarea/bl-textarea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AASvF,OAAO,4BAA4B,CAAC;AAGpC,oBAAY,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;;AACxD;;;GAGG;AAEH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,eAA4B;IAClE,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED,MAAM,CAAC,qBAAqB;;;;;;;;;;;;SAAsB;IAGlD,gBAAgB,EAAE,mBAAmB,CAAC;IAEtC;;OAEG;IAEH,IAAI,SAAM;IAEV;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,MAAM,UAAS;IAEf;;OAEG;IAEH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IAEH,IAAI,CAAC,EAAE,YAAY,CAAY;IAE/B;;OAEG;IAEH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IAEH,UAAU,UAAS;IAEnB;;OAEG;IAEH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IAEH,gBAAgB,UAAS;IAEzB;;OAEG;IAEH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IAEH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IAEH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IAEH,SAAS,CAAC,EAAE,MAAM,CAAC;IAE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B;;OAEG;IAEH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IAEH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IAEH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IAEH,KAAK,SAAM;IAEX;;OAEG;IAEH,IAAI,CAAC,EAAE,MAAM,CAAK;IAEC,OAAO,CAAC,OAAO,CAA0B;IAExC,OAAO,CAAC,QAAQ,CAA0B;IAEzC,OAAO,CAAC,SAAS,CAAiC;IAGvE,OAAO,CAAC,kBAAkB,CAAuB;IAEjD,iBAAiB;IAOjB,OAAO,CAAC,OAAO,CAEb;IAEF,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,aAAa;IAQrB,YAAY;cAKI,OAAO,CAAC,iBAAiB,EAAE,cAAc;IAczD,cAAc;IAKd,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIzC,gBAAgB,IAAI,MAAM,GAAG,IAAI;IAIjC,OAAO,CAAC,UAAU;IAWT,OAAO,CAAC,KAAK,CAAS;IAE/B,MAAM,IAAI,cAAc;CAwDzB;AACD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-MWMCAJBW.js";import"../../chunk-AEVRCHAZ.js";import"../../chunk-EPJ347EQ.js";import"../../chunk-7K5FMQLQ.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-textarea.js.map
|
|
@@ -228,6 +228,23 @@
|
|
|
228
228
|
"description": "Sets the button label. Used for accessibility.",
|
|
229
229
|
"fieldName": "label"
|
|
230
230
|
},
|
|
231
|
+
{
|
|
232
|
+
"name": "loading-label",
|
|
233
|
+
"type": {
|
|
234
|
+
"text": "string"
|
|
235
|
+
},
|
|
236
|
+
"description": "Sets the button label for loading status.",
|
|
237
|
+
"fieldName": "loadingLabel"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "loading",
|
|
241
|
+
"type": {
|
|
242
|
+
"text": "boolean"
|
|
243
|
+
},
|
|
244
|
+
"default": "false",
|
|
245
|
+
"description": "Sets loading state of button",
|
|
246
|
+
"fieldName": "loading"
|
|
247
|
+
},
|
|
231
248
|
{
|
|
232
249
|
"name": "disabled",
|
|
233
250
|
"type": {
|
package/package.json
CHANGED
package/dist/chunk-2PVZLIDX.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import{a as g}from"./chunk-OLPYXE2P.js";import{a}from"./chunk-KPAWUBRO.js";import{a as f}from"./chunk-23UFIOHV.js";import{a as v,b as n,f as p,g as h,h as r,i as u,j as m}from"./chunk-57PTZNIL.js";import{a as o}from"./chunk-NZ3RGSR6.js";var y=l=>{if(l.reportValidity()){let c=new SubmitEvent("submit",{bubbles:!0,cancelable:!0});l.dispatchEvent(c),c.defaultPrevented||l.submit()}else return};var x=v`:host{display:var(--bl-button-display,inline-block);max-width:100%;position:relative}.button{--main-color:var(--bl-color-primary);--main-hover-color:var(--bl-color-primary-hover);--text-hover-color:var(--bl-color-secondary-background);--content-color:var(--bl-color-content-primary-contrast);--bg-color:var(--main-color);--border-color:var(--main-color);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-m);--margin-icon:var(--padding-vertical);--icon-size:var(--bl-size-m);--font:var(--bl-font-title-3-medium);--height:var(--bl-size-2xl);display:flex;gap:var(--margin-icon);justify-content:var(--bl-button-justify,center);align-items:center;box-sizing:border-box;width:100%;height:var(--height);border:solid 1px var(--border-color);border-radius:6px;text-decoration:none;padding:var(--padding-vertical) var(--padding-horizontal);cursor:pointer;background-color:var(--bg-color);color:var(--content-color);font:var(--font);font-kerning:none;user-select:none}:host(:hover) .button,:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([size='small']) .button{--font:var(--bl-font-title-4-medium);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-2xs);--icon-size:var(--bl-size-s);--height:var(--bl-size-xl)}:host([size='large']) .button{--font:var(--bl-font-title-3-medium);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-xl);--margin-icon:var(--bl-size-2xs);--height:var(--bl-size-3xl)}.button:focus{outline:0}.button:focus-visible{position:relative;outline:0}.button:focus-visible::after{border:2px solid var(--main-color);border-radius:var(--bl-border-radius-l);content:"";position:absolute;inset:-4px}:host ::slotted(bl-icon){font-size:var(--icon-size)}:host .has-icon:not(.has-content){--padding-horizontal:var(--padding-vertical);--margin-icon:0}:host([variant='secondary']) .button{--bg-color:transparent;--content-color:var(--main-color)}:host([variant='tertiary']) .button{--content-color:var(--main-color);--border-color:transparent;--bg-color:transparent}:host([kind='neutral']) .button{--main-color:var(--bl-color-secondary);--main-hover-color:var(--bl-color-secondary-hover)}:host([kind='success']) .button{--main-color:var(--bl-color-success);--main-hover-color:var(--bl-color-success-hover)}:host([kind='danger']) .button{--main-color:var(--bl-color-danger);--main-hover-color:var(--bl-color-danger-hover)}:host([disabled]){cursor:not-allowed}:host([disabled]) .button{--main-color:var(--bl-color-tertiary);--main-hover-color:var(--bl-color-tertiary);--content-color:var(--bl-color-content-passive);--bg-color:var(--main-color);pointer-events:none;text-decoration:none}:host([variant='tertiary'][disabled]) .button{--main-color:transparent}:host([variant='secondary']:hover:not([disabled])) .button,:host([variant='secondary'].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__:not([disabled])) .button{--content-color:var(--bl-color-content-primary-contrast);--bg-color:var(--main-hover-color)}:host([variant='tertiary']:hover:not([disabled])) .button,:host([variant='tertiary'].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__:not([disabled])) .button{--content-color:var(--main-hover-color);--bg-color:var(--text-hover-color)}:host([dropdown]) .open{display:none}:host([dropdown]) .active .open{display:inline-block}:host([dropdown]) .active .close{display:none}:host .active.button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}:host([variant='secondary']) .active.button{--content-color:var(--bl-color-content-primary-contrast);--bg-color:var(--main-hover-color)}:host([variant='tertiary']) .active.button{--content-color:var(--main-color);--bg-color:var(--bl-color-tertiary);--border-color:transparent}`,_=x;var t=class extends p{constructor(){super(...arguments);this.variant="primary";this.kind="default";this.size="medium";this.disabled=!1;this.target="_self";this.dropdown=!1;this.active=!1}static get styles(){return[_]}get _isActive(){return this.active}connectedCallback(){super.connectedCallback(),this.form=this.closest("form")}caretTemplate(){return n` <bl-icon class="open" name="arrow_up"></bl-icon>
|
|
2
|
-
<bl-icon class="close" name="arrow_down"></bl-icon>`}_handleClick(){this.type==="submit"&&this.form&&y(this.form),this.onClick("Click event fired!")}focus(){this.button.focus()}get _hasIconSlot(){return this.querySelector(':scope > [slot="icon"]')!==null}get _hasDefaultSlot(){return[...this.childNodes].some(e=>{var s;let i=e.nodeType;return i===e.TEXT_NODE&&((s=e.textContent)==null?void 0:s.trim())!==""||i===e.ELEMENT_NODE&&!e.hasAttribute("slot")})}render(){let b=!!this.href,e=this.icon?n`<bl-icon name=${this.icon}></bl-icon>`:"",i=n`<slot name="icon">${e}</slot> <span class="label"><slot></slot></span>`,s=this.dropdown?this.caretTemplate():"",d=g({button:!0,"has-icon":this.icon||this._hasIconSlot,"has-content":this._hasDefaultSlot,active:!b&&this._isActive});return b?n`<a
|
|
3
|
-
class=${d}
|
|
4
|
-
aria-disabled="${a(this.disabled)}"
|
|
5
|
-
aria-label="${a(this.label)}"
|
|
6
|
-
href=${a(this.href)}
|
|
7
|
-
target=${a(this.target)}
|
|
8
|
-
role="button"
|
|
9
|
-
>${i}
|
|
10
|
-
</a>`:n`<button
|
|
11
|
-
class=${d}
|
|
12
|
-
aria-disabled="${a(this.disabled)}"
|
|
13
|
-
aria-label="${a(this.label)}"
|
|
14
|
-
?disabled=${this.disabled}
|
|
15
|
-
@click="${this._handleClick}"
|
|
16
|
-
>
|
|
17
|
-
${i} ${s}
|
|
18
|
-
</button>`}};o([r({type:String,reflect:!0})],t.prototype,"variant",2),o([r({type:String,reflect:!0})],t.prototype,"kind",2),o([r({type:String,reflect:!0})],t.prototype,"size",2),o([r({type:String})],t.prototype,"label",2),o([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),o([r({type:String})],t.prototype,"href",2),o([r({type:String})],t.prototype,"icon",2),o([r({type:String})],t.prototype,"target",2),o([r({type:String})],t.prototype,"type",2),o([r({type:Boolean})],t.prototype,"dropdown",2),o([u({})],t.prototype,"active",2),o([m(".button")],t.prototype,"button",2),o([f("bl-click")],t.prototype,"onClick",2),t=o([h("bl-button")],t);export{y as a,t as b};
|
|
19
|
-
//# sourceMappingURL=chunk-2PVZLIDX.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../node_modules/@open-wc/form-helpers/src/index.ts", "../src/components/button/bl-button.css", "../src/components/button/bl-button.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Implicitly submit a form by first validating all controls. If the form\n * is valid, issue a submit event and if that event is not prevented, manually\n * call the form's submit method.\n *\n * @param form {HTMLFormElement} - A form to implicitly submit\n */\nexport const submit = (form: HTMLFormElement): void => {\n if (!form.reportValidity()) {\n return;\n } else {\n const submitEvent = new SubmitEvent('submit', {\n bubbles: true,\n cancelable: true\n });\n form.dispatchEvent(submitEvent);\n if (!submitEvent.defaultPrevented) {\n form.submit();\n }\n }\n};\n\nexport type FormValue = string|FormData|File|FormValue[];\n\n/**\n * Parse a form and return a set of values based on the name/value pair.\n * If multiple controls of a similar name exist, return an array for those values;\n * otherwise return a single value.\n *\n * @param form {HTMLFormElement} - The form to parse for values\n * @returns {Record<string, any>} - An object representing the form's current values\n */\nexport const formValues = (form: HTMLFormElement): Record<string, FormValue> => {\n const formData = new FormData(form);\n const values: Record<string, FormValue> = {};\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore This does exist in all browsers. TypeScript is wrong\n for (const [key, value] of formData.entries()) {\n if (!values.hasOwnProperty(key)) {\n values[key] = value;\n } else if (Array.isArray(values[key])) {\n const pointer = values[key] as FormValue[];\n pointer.push(value);\n } else {\n values[key] = [values[key], value];\n }\n }\n\n return values;\n};\n\n/**\n * This method takes a form and parses it as an object. If any form control has a `.`\n * in its name, this utility will evaluate that name as a deep key for an object;\n * in other words, if a form has a named control, `name.first` and another, `name.last`\n * it will report back a nested object, name, with first and last properties\n * representing those controls' values.\n *\n * This can be useful when you have a complex model that you are attempting to represent\n * in declaratively in HTML.\n *\n * @param form {HTMLFormElement} - The form to grab values from\n * @returns {Object<string, FormValue>} - An object representation of the form\n */\nexport const parseFormAsObject = (form: HTMLFormElement): Record<string, FormValue> => {\n const data = formValues(form);\n const output: Record<string, FormValue> = {};\n\n Object.entries(data).forEach(([key, value]) => {\n /** If the key has a '.', parse it as an object */\n if (key.includes('.')) {\n const path = key.split('.');\n const destination: string | undefined = path.pop();\n let pointer = output;\n\n while (path.length) {\n const key = path.shift();\n pointer[key as string] = pointer[key as string] || ({} as FormValue);\n pointer = pointer[key as string] as unknown as Record<string, FormValue>;\n }\n\n pointer[destination as string] = value;\n } else {\n output[key] = data[key];\n }\n });\n\n return output;\n};\n", "import {css} from 'lit';\nexport const styles = css`:host{display:var(--bl-button-display,inline-block);max-width:100%;position:relative}.button{--main-color:var(--bl-color-primary);--main-hover-color:var(--bl-color-primary-hover);--text-hover-color:var(--bl-color-secondary-background);--content-color:var(--bl-color-content-primary-contrast);--bg-color:var(--main-color);--border-color:var(--main-color);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-m);--margin-icon:var(--padding-vertical);--icon-size:var(--bl-size-m);--font:var(--bl-font-title-3-medium);--height:var(--bl-size-2xl);display:flex;gap:var(--margin-icon);justify-content:var(--bl-button-justify,center);align-items:center;box-sizing:border-box;width:100%;height:var(--height);border:solid 1px var(--border-color);border-radius:6px;text-decoration:none;padding:var(--padding-vertical) var(--padding-horizontal);cursor:pointer;background-color:var(--bg-color);color:var(--content-color);font:var(--font);font-kerning:none;user-select:none}:host(:hover) .button,:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([size='small']) .button{--font:var(--bl-font-title-4-medium);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-2xs);--icon-size:var(--bl-size-s);--height:var(--bl-size-xl)}:host([size='large']) .button{--font:var(--bl-font-title-3-medium);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-xl);--margin-icon:var(--bl-size-2xs);--height:var(--bl-size-3xl)}.button:focus{outline:0}.button:focus-visible{position:relative;outline:0}.button:focus-visible::after{border:2px solid var(--main-color);border-radius:var(--bl-border-radius-l);content:\"\";position:absolute;inset:-4px}:host ::slotted(bl-icon){font-size:var(--icon-size)}:host .has-icon:not(.has-content){--padding-horizontal:var(--padding-vertical);--margin-icon:0}:host([variant='secondary']) .button{--bg-color:transparent;--content-color:var(--main-color)}:host([variant='tertiary']) .button{--content-color:var(--main-color);--border-color:transparent;--bg-color:transparent}:host([kind='neutral']) .button{--main-color:var(--bl-color-secondary);--main-hover-color:var(--bl-color-secondary-hover)}:host([kind='success']) .button{--main-color:var(--bl-color-success);--main-hover-color:var(--bl-color-success-hover)}:host([kind='danger']) .button{--main-color:var(--bl-color-danger);--main-hover-color:var(--bl-color-danger-hover)}:host([disabled]){cursor:not-allowed}:host([disabled]) .button{--main-color:var(--bl-color-tertiary);--main-hover-color:var(--bl-color-tertiary);--content-color:var(--bl-color-content-passive);--bg-color:var(--main-color);pointer-events:none;text-decoration:none}:host([variant='tertiary'][disabled]) .button{--main-color:transparent}:host([variant='secondary']:hover:not([disabled])) .button,:host([variant='secondary'].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__:not([disabled])) .button{--content-color:var(--bl-color-content-primary-contrast);--bg-color:var(--main-hover-color)}:host([variant='tertiary']:hover:not([disabled])) .button,:host([variant='tertiary'].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__:not([disabled])) .button{--content-color:var(--main-hover-color);--bg-color:var(--text-hover-color)}:host([dropdown]) .open{display:none}:host([dropdown]) .active .open{display:inline-block}:host([dropdown]) .active .close{display:none}:host .active.button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}:host([variant='secondary']) .active.button{--content-color:var(--bl-color-content-primary-contrast);--bg-color:var(--main-hover-color)}:host([variant='tertiary']) .active.button{--content-color:var(--main-color);--bg-color:var(--bl-color-tertiary);--border-color:transparent}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property, state, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { submit } from '@open-wc/form-helpers';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport style from './bl-button.css';\nimport '../icon/bl-icon';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'tertiary';\nexport type ButtonKind = 'default' | 'neutral' | 'success' | 'danger';\nexport type ButtonSize = 'small' | 'medium' | 'large';\nexport type TargetType = '_blank' | '_parent' | '_self' | '_top';\n\n/**\n * @tag bl-button\n * @summary Baklava Button component\n *\n * @cssproperty --bl-button-display - Sets the display property of button. Default value is 'inline-block'.\n * @cssproperty --bl-button-justify - Sets the justify-content property of button. Default value is 'center'.\n *\n */\n@customElement('bl-button')\nexport default class BlButton extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the button variant\n */\n @property({ type: String, reflect: true })\n variant: ButtonVariant = 'primary';\n\n /**\n * Sets the button kind\n */\n @property({ type: String, reflect: true })\n kind: ButtonKind = 'default';\n\n /**\n * Sets the button size\n */\n @property({ type: String, reflect: true })\n size: ButtonSize = 'medium';\n\n /**\n * Sets the button label. Used for accessibility.\n */\n @property({ type: String })\n label: string;\n\n /**\n * Sets button as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Set link url. If set, button will be rendered as anchor tag.\n */\n @property({ type: String })\n href?: string;\n\n /**\n * Sets the icon name. Shows icon with bl-icon component\n */\n @property({ type: String })\n icon?: string;\n\n /**\n * Sets the anchor target. Used when `href` is set.\n */\n @property({ type: String })\n target?: TargetType = '_self';\n\n /**\n * Sets the type of the button. Set `submit` to use button as the submitter of parent form.\n */\n @property({ type: String })\n type: 'submit' | null;\n\n /**\n * Sets button type to dropdown\n */\n @property({ type: Boolean })\n dropdown = false;\n\n /**\n * Active state\n */\n @state({})\n active = false;\n\n @query('.button')\n private button: HTMLAnchorElement | HTMLButtonElement;\n\n /**\n * Fires when button clicked\n */\n @event('bl-click') private onClick: EventDispatcher<string>;\n\n private get _isActive() {\n return this.active;\n }\n\n private form: HTMLFormElement | null;\n\n connectedCallback() {\n super.connectedCallback();\n this.form = this.closest('form');\n }\n\n private caretTemplate(): TemplateResult {\n return html` <bl-icon class=\"open\" name=\"arrow_up\"></bl-icon>\n <bl-icon class=\"close\" name=\"arrow_down\"></bl-icon>`;\n }\n\n private _handleClick() {\n if (this.type === 'submit' && this.form) {\n submit(this.form);\n }\n\n this.onClick('Click event fired!');\n }\n\n focus() {\n this.button.focus();\n }\n\n get _hasIconSlot() {\n return this.querySelector(':scope > [slot=\"icon\"]') !== null;\n }\n\n get _hasDefaultSlot() {\n const childNodes = [...this.childNodes];\n return childNodes.some(node => {\n const nodeType = node.nodeType;\n // has only text node.\n if (nodeType === node.TEXT_NODE && node.textContent?.trim() !== '') {\n return true;\n }\n // has element node, it should not have slot attribute.\n if (nodeType === node.ELEMENT_NODE) {\n if (!(node as HTMLElement).hasAttribute('slot')) {\n return true;\n }\n }\n return false;\n });\n }\n\n render(): TemplateResult {\n const isAnchor = !!this.href;\n const icon = this.icon ? html`<bl-icon name=${this.icon}></bl-icon>` : '';\n const slots = html`<slot name=\"icon\">${icon}</slot> <span class=\"label\"><slot></slot></span>`;\n const caret = this.dropdown ? this.caretTemplate() : '';\n const classes = classMap({\n 'button': true,\n 'has-icon': this.icon || this._hasIconSlot,\n 'has-content': this._hasDefaultSlot,\n 'active': !isAnchor && this._isActive,\n });\n\n return isAnchor\n ? html`<a\n class=${classes}\n aria-disabled=\"${ifDefined(this.disabled)}\"\n aria-label=\"${ifDefined(this.label)}\"\n href=${ifDefined(this.href)}\n target=${ifDefined(this.target)}\n role=\"button\"\n >${slots}\n </a>`\n : html`<button\n class=${classes}\n aria-disabled=\"${ifDefined(this.disabled)}\"\n aria-label=\"${ifDefined(this.label)}\"\n ?disabled=${this.disabled}\n @click=\"${this._handleClick}\"\n >\n ${slots} ${caret}\n </button>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-button': BlButton;\n }\n}\n"],
|
|
5
|
-
"mappings": "6OAOO,IAAMA,EAAUC,GAA+B,CACpD,GAAKA,EAAK,eAAc,EAEjB,CACL,IAAMC,EAAc,IAAI,YAAY,SAAU,CAC5C,QAAS,GACT,WAAY,GACb,EACDD,EAAK,cAAcC,CAAW,EACzBA,EAAY,kBACfD,EAAK,OAAM,MARb,OAWJ,ECnBO,IAAME,EAASC,mxHACfC,EAAQF,ECqBf,IAAqBG,EAArB,cAAsCC,CAAW,CAAjD,kCASE,aAAyB,UAMzB,UAAmB,UAMnB,UAAmB,SAYnB,cAAW,GAkBX,YAAsB,QAYtB,cAAW,GAMX,YAAS,GApET,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CA4EA,IAAY,WAAY,CACtB,OAAO,KAAK,MACd,CAIA,mBAAoB,CAClB,MAAM,kBAAk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CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GARtBhB,EASnB,uBAMAe,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAdtBhB,EAenB,oBAMAe,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GApBtBhB,EAqBnB,oBAMAe,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GA1BPhB,EA2BnB,qBAMAe,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAhCvBhB,EAiCnB,wBAMAe,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAtCPhB,EAuCnB,oBAMAe,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GA5CPhB,EA6CnB,oBAMAe,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAlDPhB,EAmDnB,sBAMAe,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAxDPhB,EAyDnB,oBAMAe,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,CAAC,GA9DRhB,EA+DnB,wBAMAe,EAAA,CADCE,EAAM,CAAC,CAAC,GApEUjB,EAqEnB,sBAGQe,EAAA,CADPG,EAAM,SAAS,GAvEGlB,EAwEX,sBAKmBe,EAAA,CAA1BI,EAAM,UAAU,GA7EEnB,EA6EQ,uBA7ERA,EAArBe,EAAA,CADCC,EAAc,WAAW,GACLhB",
|
|
6
|
-
"names": ["submit", "form", "submitEvent", "styles", "i", "bl_button_default", "BlButton", "s", "bl_button_default", "y", "submit", "node", "_a", "nodeType", "isAnchor", "icon", "slots", "caret", "classes", "o", "l", "__decorateClass", "e", "t", "i", "event"]
|
|
7
|
-
}
|
package/dist/chunk-A6IEG6S5.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import{a as h}from"./chunk-KPAWUBRO.js";import{a as o}from"./chunk-23UFIOHV.js";import{a as u,b as r,f as p,g as c,h as i,i as g}from"./chunk-57PTZNIL.js";import{a}from"./chunk-NZ3RGSR6.js";var b=u`.pagination{display:flex;flex-wrap:wrap;justify-content:center;max-width:max-content;gap:var(--bl-size-s)}.pagination *{margin:0;padding:0;box-sizing:border-box}.page-container{display:flex;align-items:center}.page-list{display:flex;align-items:center;list-style:none;user-select:none;gap:var(--bl-size-3xs)}.dots{margin:0 var(--bl-size-2xs)}.dots::before{content:' \\B7 \\B7 \\B7';color:var(--bl-color-content-primary)}.pagination-helpers{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:var(--bl-size-m);color:var(--bl-color-content-primary)}.jumper,.select{display:flex;align-items:center;gap:var(--bl-size-2xs)}label{font:var(--bl-font-title-3-medium);font-size:var(--bl-font-size-m);font-weight:var(--bl-font-weight-medium);line-height:var(--bl-font-size-m);letter-spacing:0;user-select:none}bl-input{width:62px}bl-select{width:128px}@media only screen and (max-width:768px){label{display:none}}`,m=b;var t=class extends p{constructor(){super(...arguments);this.currentPage=1;this.totalItems=0;this.itemsPerPage=10;this.hasJumper=!1;this.jumperLabel="Go To";this.hasSelect=!1;this.selectLabel="Show";this.itemsPerPageOptions=[{text:"10 Items",value:10},{text:"25 Items",value:25},{text:"50 Items",value:50},{text:"100 Items",value:100}];this.pages=[]}static get styles(){return[m]}connectedCallback(){super.connectedCallback(),setTimeout(()=>{window==null||window.addEventListener("resize",()=>this._paginate())})}disconnectedCallback(){super.disconnectedCallback(),window==null||window.removeEventListener("resize",this._paginate)}updated(e){(e.has("currentPage")||e.has("itemsPerPage")||e.has("totalItems"))&&this._paginate(),(e.get("currentPage")||e.get("itemsPerPage"))&&this.onChange({selectedPage:this.currentPage,prevPage:e.get("currentPage"),itemsPerPage:this.itemsPerPage})}_paginate(){this.pages=[];let e=Math.ceil(Math.abs(this.totalItems/this.itemsPerPage))||1;if(e<=8){this.pages=Array.from(Array(e),(s,l)=>l+1);return}this.pages.push(1),this.currentPage<5?this.pages.push(2,3,4,5,"..."):this.currentPage>=5&&this.currentPage<=e-4?this.pages.push("...",this.currentPage-1,this.currentPage,this.currentPage+1,"..."):this.pages.push("...",e-4,e-3,e-2,e-1),this.pages.push(e)}_changePage(e){this.currentPage=e}_pageBack(){this.currentPage!==1&&this.currentPage--}_pageForward(){this.currentPage!==this._getLastPage()&&this.currentPage++}_getLastPage(){return+this.pages[this.pages.length-1]}_inputHandler(e){let s=+e.target.value,l=s>0?Math.min(this._getLastPage(),s):1;this._changePage(l)}_selectHandler(e){var s;this.itemsPerPage=+((s=e==null?void 0:e.detail[0])==null?void 0:s.value)||100,this.currentPage=1}_renderSinglePage(e){if(typeof e=="string")return r`<li class="dots"></li>`;let s=this.currentPage===e?"page":void 0;return r` <li>
|
|
2
|
-
<bl-button
|
|
3
|
-
@click="${()=>this._changePage(e)}"
|
|
4
|
-
variant=${this.currentPage===e?"primary":"tertiary"}
|
|
5
|
-
kind="neutral"
|
|
6
|
-
label="Page ${e}"
|
|
7
|
-
aria-current=${h(s)}
|
|
8
|
-
>
|
|
9
|
-
${e}
|
|
10
|
-
</bl-button>
|
|
11
|
-
</li>`}renderPages(){return r`
|
|
12
|
-
<div class="page-container">
|
|
13
|
-
<bl-button
|
|
14
|
-
@click="${this._pageBack}"
|
|
15
|
-
variant="tertiary"
|
|
16
|
-
kind="neutral"
|
|
17
|
-
icon="arrow_left"
|
|
18
|
-
class="previous"
|
|
19
|
-
label="Previous"
|
|
20
|
-
?disabled=${this.currentPage===1}
|
|
21
|
-
></bl-button>
|
|
22
|
-
<ul class="page-list">
|
|
23
|
-
${window.innerWidth<768?r`${this._renderSinglePage(this.currentPage)}`:this.pages.map(e=>r`${this._renderSinglePage(e)}`)}
|
|
24
|
-
</ul>
|
|
25
|
-
<bl-button
|
|
26
|
-
@click="${this._pageForward}"
|
|
27
|
-
variant="tertiary"
|
|
28
|
-
kind="neutral"
|
|
29
|
-
icon="arrow_right"
|
|
30
|
-
class="next"
|
|
31
|
-
label="Next"
|
|
32
|
-
?disabled=${this.currentPage===this._getLastPage()}
|
|
33
|
-
></bl-button>
|
|
34
|
-
</div>
|
|
35
|
-
`}render(){let e=this.hasSelect?r`
|
|
36
|
-
<div class="select">
|
|
37
|
-
<label>${this.selectLabel}</label>
|
|
38
|
-
<bl-select @bl-select="${this._selectHandler}">
|
|
39
|
-
${this.itemsPerPageOptions.map(n=>r`<bl-select-option
|
|
40
|
-
value="${n.value}"
|
|
41
|
-
?selected=${n.value===this.itemsPerPage}
|
|
42
|
-
>${n.text}</bl-select-option
|
|
43
|
-
>`)}
|
|
44
|
-
</bl-select>
|
|
45
|
-
</div>
|
|
46
|
-
`:null,s=this.hasJumper?r` <div class="jumper">
|
|
47
|
-
<label>${this.jumperLabel}</label>
|
|
48
|
-
<bl-input value="${this.currentPage}" @bl-change="${this._inputHandler}"></bl-input>
|
|
49
|
-
</div>`:null;return r` <nav class="pagination" aria-label="Pagination">
|
|
50
|
-
${(()=>{if(!(!this.hasSelect&&!this.hasJumper))return r` <div class="pagination-helpers">${e} ${s}</div> `})()} ${this.renderPages()}
|
|
51
|
-
</nav>`}};a([i({attribute:"current-page",type:Number,reflect:!0})],t.prototype,"currentPage",2),a([i({attribute:"total-items",type:Number})],t.prototype,"totalItems",2),a([i({attribute:"items-per-page",type:Number,reflect:!0})],t.prototype,"itemsPerPage",2),a([i({attribute:"has-jumper",type:Boolean})],t.prototype,"hasJumper",2),a([i({attribute:"jumper-label",type:String})],t.prototype,"jumperLabel",2),a([i({attribute:"has-select",type:Boolean})],t.prototype,"hasSelect",2),a([i({attribute:"select-label",type:String})],t.prototype,"selectLabel",2),a([i({type:Array,attribute:!1})],t.prototype,"itemsPerPageOptions",2),a([g()],t.prototype,"pages",2),a([o("bl-change")],t.prototype,"onChange",2),t=a([c("bl-pagination")],t);export{t as a};
|
|
52
|
-
//# sourceMappingURL=chunk-A6IEG6S5.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/pagination/bl-pagination.css", "../src/components/pagination/bl-pagination.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`.pagination{display:flex;flex-wrap:wrap;justify-content:center;max-width:max-content;gap:var(--bl-size-s)}.pagination *{margin:0;padding:0;box-sizing:border-box}.page-container{display:flex;align-items:center}.page-list{display:flex;align-items:center;list-style:none;user-select:none;gap:var(--bl-size-3xs)}.dots{margin:0 var(--bl-size-2xs)}.dots::before{content:' \\\\B7 \\\\B7 \\\\B7';color:var(--bl-color-content-primary)}.pagination-helpers{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:var(--bl-size-m);color:var(--bl-color-content-primary)}.jumper,.select{display:flex;align-items:center;gap:var(--bl-size-2xs)}label{font:var(--bl-font-title-3-medium);font-size:var(--bl-font-size-m);font-weight:var(--bl-font-weight-medium);line-height:var(--bl-font-size-m);letter-spacing:0;user-select:none}bl-input{width:62px}bl-select{width:128px}@media only screen and (max-width:768px){label{display:none}}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult, PropertyValues } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../button/bl-button';\nimport '../input/bl-input';\nimport '../select/bl-select';\n\nimport style from './bl-pagination.css';\n\n/**\n * @tag bl-pagination\n * @summary Baklava Pagination component\n */\n\n@customElement('bl-pagination')\nexport default class BlPagination extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the current page\n */\n @property({ attribute: 'current-page', type: Number, reflect: true })\n currentPage = 1;\n\n /**\n * Sets the total items to be paginated\n */\n @property({ attribute: 'total-items', type: Number })\n totalItems = 0;\n\n /**\n * Sets the number of items per page\n */\n @property({ attribute: 'items-per-page', type: Number, reflect: true })\n itemsPerPage = 10;\n\n /**\n * Adds jumper element if provided as true\n */\n @property({ attribute: 'has-jumper', type: Boolean })\n hasJumper = false;\n\n /**\n * Sets the jumper label\n */\n @property({ attribute: 'jumper-label', type: String })\n jumperLabel = 'Go To';\n\n /**\n * Adds select element to choose the items per page\n */\n @property({ attribute: 'has-select', type: Boolean })\n hasSelect = false;\n\n /**\n * Adds select element to choose the items per page\n */\n @property({ attribute: 'select-label', type: String })\n selectLabel = 'Show';\n\n /**\n * Sets the items per page options of the select element\n * PROPERTY\n */\n @property({ type: Array, attribute: false })\n itemsPerPageOptions = [\n {\n text: '10 Items',\n value: 10,\n },\n {\n text: '25 Items',\n value: 25,\n },\n {\n text: '50 Items',\n value: 50,\n },\n {\n text: '100 Items',\n value: 100,\n },\n ];\n\n @state() private pages: Array<number | string> = [];\n\n /**\n * Fires when the current page changes\n */\n @event('bl-change') private onChange: EventDispatcher<{\n selectedPage: number;\n prevPage: number;\n itemsPerPage: number;\n }>;\n\n connectedCallback() {\n super.connectedCallback();\n\n setTimeout(() => {\n window?.addEventListener('resize', () => this._paginate());\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n window?.removeEventListener('resize', this._paginate);\n }\n\n updated(changedProperties: PropertyValues<this>) {\n if (\n changedProperties.has('currentPage') ||\n changedProperties.has('itemsPerPage') ||\n changedProperties.has('totalItems')\n ) {\n this._paginate();\n }\n\n if (changedProperties.get('currentPage') || changedProperties.get('itemsPerPage')) {\n this.onChange({\n selectedPage: this.currentPage,\n prevPage: changedProperties.get('currentPage'),\n itemsPerPage: this.itemsPerPage,\n });\n }\n }\n\n private _paginate() {\n this.pages = [];\n const pageListLength = Math.ceil(Math.abs(this.totalItems / this.itemsPerPage)) || 1;\n\n if (pageListLength <= 8) {\n this.pages = Array.from(Array(pageListLength), (_, index) => index + 1);\n return;\n }\n\n this.pages.push(1);\n\n if (this.currentPage < 5) {\n this.pages.push(2, 3, 4, 5, '...');\n } else if (this.currentPage >= 5 && this.currentPage <= pageListLength - 4) {\n this.pages.push('...', this.currentPage - 1, this.currentPage, this.currentPage + 1, '...');\n } else {\n this.pages.push(\n '...',\n pageListLength - 4,\n pageListLength - 3,\n pageListLength - 2,\n pageListLength - 1\n );\n }\n\n this.pages.push(pageListLength);\n }\n\n private _changePage(page: number): void {\n this.currentPage = page;\n }\n\n private _pageBack(): void {\n if (this.currentPage === 1) return;\n this.currentPage--;\n }\n\n private _pageForward(): void {\n if (this.currentPage === this._getLastPage()) return;\n this.currentPage++;\n }\n\n private _getLastPage(): number {\n return +this.pages[this.pages.length - 1];\n }\n\n private _inputHandler(event: CustomEvent) {\n const inputValue = +(event.target as HTMLInputElement).value;\n const newPage = inputValue > 0 ? Math.min(this._getLastPage(), inputValue) : 1;\n this._changePage(newPage);\n }\n\n private _selectHandler(event: CustomEvent) {\n this.itemsPerPage = +event?.detail[0]?.value || 100;\n this.currentPage = 1;\n }\n\n private _renderSinglePage(page: number | string) {\n if (typeof page === 'string') {\n return html`<li class=\"dots\"></li>`;\n }\n const ariaCurrent = this.currentPage === page ? 'page' : undefined;\n return html` <li>\n <bl-button\n @click=\"${() => this._changePage(page)}\"\n variant=${this.currentPage === page ? 'primary' : 'tertiary'}\n kind=\"neutral\"\n label=\"Page ${page}\"\n aria-current=${ifDefined(ariaCurrent)}\n >\n ${page}\n </bl-button>\n </li>`;\n }\n\n private renderPages() {\n return html`\n <div class=\"page-container\">\n <bl-button\n @click=\"${this._pageBack}\"\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"arrow_left\"\n class=\"previous\"\n label=\"Previous\"\n ?disabled=${this.currentPage === 1}\n ></bl-button>\n <ul class=\"page-list\">\n ${window.innerWidth < 768\n ? html`${this._renderSinglePage(this.currentPage)}`\n : this.pages.map(page => html`${this._renderSinglePage(page)}`)}\n </ul>\n <bl-button\n @click=\"${this._pageForward}\"\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"arrow_right\"\n class=\"next\"\n label=\"Next\"\n ?disabled=${this.currentPage === this._getLastPage()}\n ></bl-button>\n </div>\n `;\n }\n\n render(): TemplateResult {\n const selectEl = this.hasSelect\n ? html`\n <div class=\"select\">\n <label>${this.selectLabel}</label>\n <bl-select @bl-select=\"${this._selectHandler}\">\n ${this.itemsPerPageOptions.map(option => {\n return html`<bl-select-option\n value=\"${option.value}\"\n ?selected=${option.value === this.itemsPerPage}\n >${option.text}</bl-select-option\n >`;\n })}\n </bl-select>\n </div>\n `\n : null;\n\n const jumperEl = this.hasJumper\n ? html` <div class=\"jumper\">\n <label>${this.jumperLabel}</label>\n <bl-input value=\"${this.currentPage}\" @bl-change=\"${this._inputHandler}\"></bl-input>\n </div>`\n : null;\n\n const getHelperElements = () => {\n if (!this.hasSelect && !this.hasJumper) return;\n return html` <div class=\"pagination-helpers\">${selectEl} ${jumperEl}</div> `;\n };\n\n return html` <nav class=\"pagination\" aria-label=\"Pagination\">\n ${getHelperElements()} ${this.renderPages()}\n </nav>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-pagination': BlPagination;\n }\n}\n"],
|
|
5
|
-
"mappings": "8LACO,IAAMA,EAASC,i6BACfC,EAAQF,ECcf,IAAqBG,EAArB,cAA0CC,CAAW,CAArD,kCASE,iBAAc,EAMd,gBAAa,EAMb,kBAAe,GAMf,eAAY,GAMZ,iBAAc,QAMd,eAAY,GAMZ,iBAAc,OAOd,yBAAsB,CACpB,CACE,KAAM,WACN,MAAO,EACT,EACA,CACE,KAAM,WACN,MAAO,EACT,EACA,CACE,KAAM,WACN,MAAO,EACT,EACA,CACE,KAAM,YACN,MAAO,GACT,CACF,EAES,KAAQ,MAAgC,CAAC,EAtElD,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CA+EA,mBAAoB,CAClB,MAAM,kBAAkB,EAExB,WAAW,IAAM,CACf,qBAAQ,iBAAiB,SAAU,IAAM,KAAK,UAAU,EAC1D,CAAC,CACH,CAEA,sBAAuB,CACrB,MAAM,qBAAqB,EAC3B,qBAAQ,oBAAoB,SAAU,KAAK,UAC7C,CAEA,QAAQC,EAAyC,EAE7CA,EAAkB,IAAI,aAAa,GAC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AOA,qCAAwCG,KAAYE,UAC7D,GAGsB,KAAK,KAAK,YAAY;AAAA,WAE9C,CACF,EAnPEC,EAAA,CADCC,EAAS,CAAE,UAAW,eAAgB,KAAM,OAAQ,QAAS,EAAK,CAAC,GARjDnB,EASnB,2BAMAkB,EAAA,CADCC,EAAS,CAAE,UAAW,cAAe,KAAM,MAAO,CAAC,GAdjCnB,EAenB,0BAMAkB,EAAA,CADCC,EAAS,CAAE,UAAW,iBAAkB,KAAM,OAAQ,QAAS,EAAK,CAAC,GApBnDnB,EAqBnB,4BAMAkB,EAAA,CADCC,EAAS,CAAE,UAAW,aAAc,KAAM,OAAQ,CAAC,GA1BjCnB,EA2BnB,yBAMAkB,EAAA,CADCC,EAAS,CAAE,UAAW,eAAgB,KAAM,MAAO,CAAC,GAhClCnB,EAiCnB,2BAMAkB,EAAA,CADCC,EAAS,CAAE,UAAW,aAAc,KAAM,OAAQ,CAAC,GAtCjCnB,EAuCnB,yBAMAkB,EAAA,CADCC,EAAS,CAAE,UAAW,eAAgB,KAAM,MAAO,CAAC,GA5ClCnB,EA6CnB,2BAOAkB,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,UAAW,EAAM,CAAC,GAnDxBnB,EAoDnB,mCAmBiBkB,EAAA,CAAhBE,EAAM,GAvEYpB,EAuEF,qBAKWkB,EAAA,CAA3BV,EAAM,WAAW,GA5ECR,EA4ES,wBA5ETA,EAArBkB,EAAA,CADCC,EAAc,eAAe,GACTnB",
|
|
6
|
-
"names": ["styles", "i", "bl_pagination_default", "BlPagination", "s", "bl_pagination_default", "changedProperties", "pageListLength", "_", "index", "page", "event", "inputValue", "newPage", "_a", "y", "ariaCurrent", "l", "selectEl", "option", "jumperEl", "__decorateClass", "e", "t"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/input/bl-input.css", "../src/components/input/bl-input.ts"],
|
|
4
|
-
"sourcesContent": ["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);--autofill-bg-color:var(--bl-color-accent-primary-background);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)}.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:var(--bl-size-3xs)}:host([disabled]) .input-wrapper{cursor:not-allowed;background-color:var(--bl-color-secondary-background);--text-color:var(--bl-color-content-passive)}.input-wrapper:has(input:autofill){background-color:var(--autofill-bg-color)}.input-wrapper:has(input:-webkit-autofill){background-color:var(--autofill-bg-color)}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{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}input:disabled{cursor:not-allowed}input:autofill{background-color:var(--autofill-bg-color);box-shadow:0 0 0 40rem var(--autofill-bg-color) inset}input:-webkit-autofill{background-color:var(--autofill-bg-color);box-shadow:0 0 0 40rem var(--autofill-bg-color) inset}.icon{display:flex;align-items:center;gap:8px;flex-basis:var(--icon-size);align-self:center;height:var(--icon-size)}bl-icon:not(.reveal-icon){font-size:var(--icon-size);color:var(--icon-color);height:var(--icon-size)}.reveal-button bl-icon{display:none}bl-icon[name='eye_on']{display:inline-block}.password-visible bl-icon[name='eye_on']{display:none}.password-visible bl-icon[name='eye_off']{display:inline-block}.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}::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)}: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';\nimport '../button/bl-button';\n\nimport style from './bl-input.css';\n\nexport type InputSize = 'small' | '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 * Sets name of the input\n */\n @property({})\n name?: string;\n\n /**\n * Type of the input. It's used to set `type` attribute of native input inside. Only `text`, `number` and `password` is supported for now.\n */\n @property({})\n type: 'text' | 'password' | '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 @state() private passwordVisible = false;\n\n @state() private passwordInput = false;\n\n private textVisiblityToggle() {\n this.passwordVisible = !this.passwordVisible;\n }\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.passwordInput = this.type === 'password';\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\">\n ${this.validationMessage}\n </p>`\n : ``;\n const helpMessage = this.helpText\n ? html`<p id=\"helpText\" class=\"help-text\">${this.helpText}</p>`\n : ``;\n\n const icon = this.icon ? html`<bl-icon class=\"custom-icon\" name=\"${this.icon}\"></bl-icon>` : '';\n const label = this.label ? html`<label for=\"input\">${this.label}</label>` : '';\n\n const revealButton = this.passwordInput\n ? html`<bl-button\n size=\"small\"\n kind=\"neutral\"\n variant=\"tertiary\"\n class=\"${classMap({\n 'reveal-button': true,\n 'password-visible': this.passwordVisible,\n })}\"\n aria-label=\"Toggle password reveal\"\n @bl-click=\"${this.textVisiblityToggle}\"\n >\n <bl-icon class=\"reveal-icon\" slot=\"icon\" name=\"eye_on\"></bl-icon>\n <bl-icon class=\"reveal-icon\" slot=\"icon\" name=\"eye_off\"></bl-icon>\n </bl-button>`\n : '';\n\n const classes = {\n 'wrapper': true,\n 'dirty': this.dirty,\n 'invalid': !this.checkValidity(),\n 'has-icon': this.passwordInput || this.icon || (this.dirty && !this.checkValidity()),\n 'has-value': this.value !== null && this.value !== '',\n };\n\n const passwordType = this.passwordVisible ? 'text' : 'password';\n const inputType = this.passwordInput ? passwordType : this.type;\n\n return html`<div class=${classMap(classes)}>\n ${label}\n <div class=\"input-wrapper\">\n <input\n id=\"input\"\n type=${inputType}\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\">\n ${revealButton} ${icon}\n <bl-icon class=\"error-icon\" name=\"alert\"></bl-icon>\n </div>\n </div>\n <div class=\"hint\">${invalidMessage} ${helpMessage}</div>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-input': BlInput;\n }\n}\n"],
|
|
5
|
-
"mappings": "6YACO,IAAMA,EAASC,+5IACfC,EAAQF,ECmBf,IAAqBG,EAArB,cAAqCC,EAAiBC,CAAU,CAAE,CAAlE,kCAoBE,UAAuC,OAkBvC,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,GAEhB,KAAQ,gBAAkB,GAE1B,KAAQ,cAAgB,GA5JjC,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CA4HA,mBAA0B,CApJ5B,IAAAC,EAqJI,MAAM,kBAAkB,EACxB,KAAK,iBAAiB,UAAW,KAAK,SAAS,EAC/C,KAAK,iBAAiB,UAAW,KAAK,OAAO,GAE7CA,EAAA,KAAK,UAAU,OAAf,MAAAA,EAAqB,iBAAiB,SAAU,IAAM,CACpD,KAAK,eAAe,CACtB,EACF,CAEA,sBAA6B,CAC3B,MAAM,qBAAqB,EAC3B,KAAK,oBAAoB,UAAW,KAAK,SAAS,EAClD,KAAK,oBAAoB,UAAW,KAAK,OAAO,CAClD,CAkBQ,qBAAsB,CAC5B,KAAK,gBAAkB,CAAC,KAAK,eAC/B,CAEA,kBAAkC,CAxLpC,IAAAA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EPtB,EAoEnB,mBAMAoB,EAAA,CADCE,EAAS,CAAE,KAAM,MAAO,CAAC,GAzEPtB,EA0EnB,oBAMAoB,EAAA,CADCE,EAAS,CAAE,KAAM,MAAO,CAAC,GA/EPtB,EAgFnB,oBAMAoB,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GArFtBtB,EAsFnB,oBAMAoB,EAAA,CADCE,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA3FvBtB,EA4FnB,wBAMAoB,EAAA,CADCE,EAAS,CAAE,KAAM,QAAS,UAAW,cAAe,QAAS,EAAK,CAAC,GAjGjDtB,EAkGnB,0BAMAoB,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,GAvGlCtB,EAwGnB,iCAMAoB,EAAA,CADCE,EAAS,CAAE,KAAM,OAAQ,UAAW,YAAa,QAAS,EAAK,CAAC,GA7G9CtB,EA8GnB,wBAK4BoB,EAAA,CAA3BjB,EAAM,WAAW,GAnHCH,EAmHS,wBAKDoB,EAAA,CAA1BjB,EAAM,UAAU,GAxHEH,EAwHQ,uBAKEoB,EAAA,CAA5BjB,EAAM,YAAY,GA7HAH,EA6HU,yBA4BZoB,EAAA,CAAhBG,EAAM,GAzJYvB,EAyJF,qBAEAoB,EAAA,CAAhBG,EAAM,GA3JYvB,EA2JF,+BAEAoB,EAAA,CAAhBG,EAAM,GA7JYvB,EA6JF,6BA7JEA,EAArBoB,EAAA,CADCE,EAAc,UAAU,GACJtB",
|
|
6
|
-
"names": ["styles", "i", "bl_input_default", "BlInput", "FormControlMixin", "s", "event", "submit", "bl_input_default", "_a", "value", "invalidMessage", "y", "helpMessage", "icon", "label", "revealButton", "o", "classes", "passwordType", "inputType", "l", "innerInputValidators", "__decorateClass", "i", "e", "t"]
|
|
7
|
-
}
|