@trendyol/baklava 3.0.0-beta.30 → 3.0.0-beta.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/baklava.js CHANGED
@@ -1,2 +1,2 @@
1
- import{b as z}from"./chunk-D5MPTIGC.js";import{b as q}from"./chunk-X2XFV2S3.js";import{b as j}from"./chunk-5HU4KWMX.js";import{b as O}from"./chunk-73GEFGEG.js";import{b as y}from"./chunk-LIW32ZGE.js";import{a as g}from"./chunk-IZTTP5LH.js";import{a as D}from"./chunk-2LP7VYJJ.js";import{a as t}from"./chunk-7QNX2GPS.js";import{b as N}from"./chunk-WQTBAXMP.js";import{a as b}from"./chunk-2GQCCDR3.js";import{c as T,f as w}from"./chunk-FVBGMXMC.js";import{b as k}from"./chunk-FQBDGFMR.js";import{a as P}from"./chunk-5TPDRTCU.js";import{a as C}from"./chunk-Q6MAW2EF.js";import{a as I}from"./chunk-QF4LGACD.js";import{d as v}from"./chunk-ASB5S6J4.js";import{b as G,d as A,f as R}from"./chunk-B7ZEUBIV.js";import{b as S}from"./chunk-73RGV4UX.js";import{b as H}from"./chunk-4T26H7PC.js";import{a as c}from"./chunk-X67Z2G2H.js";import{a as i}from"./chunk-P7J47Z2J.js";import{a as n}from"./chunk-WXWKIQAK.js";import{a as m}from"./chunk-DZ77A43H.js";import"./chunk-MND5TXTF.js";import{b as h}from"./chunk-UCLJCOUS.js";import"./chunk-EZSEQHRH.js";import{a as E}from"./chunk-KOWS266A.js";import"./chunk-WEEGH2F4.js";import{b as u,e as x}from"./chunk-TRWCD65K.js";import"./chunk-EG7U7PM3.js";import"./chunk-XDUIVR6I.js";import"./chunk-HZ6A5QFC.js";import"./chunk-AYJMIZZ3.js";import{a as B}from"./chunk-6BSYS2G5.js";import{a as s}from"./chunk-C4GIIUCS.js";import{b as d}from"./chunk-VU6LRFZR.js";import{b as p}from"./chunk-CYLRPJKP.js";import"./chunk-6LT7O7T2.js";import"./chunk-HBPBDC7T.js";import{a as o}from"./chunk-NGJM4NWA.js";import{a as l}from"./chunk-RQEU3SZQ.js";import"./chunk-ECPWEUBG.js";import"./chunk-DINNT5P2.js";import{a as f}from"./chunk-4BZSILLM.js";import{a as e,b as a,c as r}from"./chunk-HYB2HRRX.js";import"./chunk-GRL4DWKG.js";import"./chunk-3USCFSFQ.js";import"./chunk-7GK5LKBV.js";import"./chunk-5MOOXA2X.js";import"./chunk-4OT5AMS5.js";import"./chunk-IZ2LK5GK.js";export{t as BlAccordion,o as BlAccordionGroup,l as BlAlert,f as BlBadge,d as BlButton,E as BlCalendar,u as BlCheckbox,x as BlCheckboxGroup,B as BlDialog,s as BlDrawer,R as BlDropdown,S as BlDropdownGroup,A as BlDropdownItem,r as BlIcon,m as BlInput,H as BlNotification,N as BlNotificationCard,c as BlPagination,h as BlPopover,b as BlProgressIndicator,T as BlRadio,w as BlRadioGroup,i as BlSelect,n as BlSelectOption,p as BlSpinner,G as BlSplitButton,k as BlSwitch,C as BlTab,P as BlTabGroup,I as BlTabPanel,v as BlTable,O as BlTableBody,z as BlTableCell,y as BlTableHeader,q as BlTableHeaderCell,j as BlTableRow,g as BlTextarea,D as BlTooltip,a as getIconPath,e as setIconPath};
1
+ import{b as z}from"./chunk-KPWKBI57.js";import{b as q}from"./chunk-Y7B25ZG3.js";import{b as j}from"./chunk-C4DOPHMG.js";import{b as O}from"./chunk-VJRVHJVZ.js";import{b as y}from"./chunk-DIS2PGBH.js";import{a as g}from"./chunk-IZTTP5LH.js";import{a as D}from"./chunk-2LP7VYJJ.js";import{a as t}from"./chunk-7QNX2GPS.js";import{b as N}from"./chunk-WQTBAXMP.js";import{a as b}from"./chunk-2GQCCDR3.js";import{c as T,f as w}from"./chunk-FVBGMXMC.js";import{b as k}from"./chunk-FQBDGFMR.js";import{a as P}from"./chunk-5TPDRTCU.js";import{a as C}from"./chunk-Q6MAW2EF.js";import{a as I}from"./chunk-QF4LGACD.js";import{d as v}from"./chunk-STMCW2R6.js";import{b as G,d as A,f as R}from"./chunk-B7ZEUBIV.js";import{b as S}from"./chunk-73RGV4UX.js";import{b as H}from"./chunk-4T26H7PC.js";import{a as c}from"./chunk-X67Z2G2H.js";import{a as i}from"./chunk-P7J47Z2J.js";import{a as n}from"./chunk-WXWKIQAK.js";import{a as m}from"./chunk-DZ77A43H.js";import"./chunk-MND5TXTF.js";import{b as h}from"./chunk-UCLJCOUS.js";import"./chunk-EZSEQHRH.js";import{a as E}from"./chunk-KOWS266A.js";import"./chunk-WEEGH2F4.js";import{b as u,e as x}from"./chunk-TRWCD65K.js";import"./chunk-EG7U7PM3.js";import"./chunk-XDUIVR6I.js";import"./chunk-HZ6A5QFC.js";import"./chunk-AYJMIZZ3.js";import{a as B}from"./chunk-6BSYS2G5.js";import{a as s}from"./chunk-C4GIIUCS.js";import{b as d}from"./chunk-VU6LRFZR.js";import{b as p}from"./chunk-CYLRPJKP.js";import"./chunk-6LT7O7T2.js";import"./chunk-HBPBDC7T.js";import{a as o}from"./chunk-NGJM4NWA.js";import{a as l}from"./chunk-RQEU3SZQ.js";import"./chunk-ECPWEUBG.js";import"./chunk-DINNT5P2.js";import{a as f}from"./chunk-4BZSILLM.js";import{a as e,b as a,c as r}from"./chunk-HYB2HRRX.js";import"./chunk-GRL4DWKG.js";import"./chunk-3USCFSFQ.js";import"./chunk-7GK5LKBV.js";import"./chunk-5MOOXA2X.js";import"./chunk-4OT5AMS5.js";import"./chunk-IZ2LK5GK.js";export{t as BlAccordion,o as BlAccordionGroup,l as BlAlert,f as BlBadge,d as BlButton,E as BlCalendar,u as BlCheckbox,x as BlCheckboxGroup,B as BlDialog,s as BlDrawer,R as BlDropdown,S as BlDropdownGroup,A as BlDropdownItem,r as BlIcon,m as BlInput,H as BlNotification,N as BlNotificationCard,c as BlPagination,h as BlPopover,b as BlProgressIndicator,T as BlRadio,w as BlRadioGroup,i as BlSelect,n as BlSelectOption,p as BlSpinner,G as BlSplitButton,k as BlSwitch,C as BlTab,P as BlTabGroup,I as BlTabPanel,v as BlTable,O as BlTableBody,z as BlTableCell,y as BlTableHeader,q as BlTableHeaderCell,j as BlTableRow,g as BlTextarea,D as BlTooltip,a as getIconPath,e as setIconPath};
2
2
  //# sourceMappingURL=baklava.js.map
@@ -0,0 +1,2 @@
1
+ import{a as u}from"./chunk-VJRVHJVZ.js";import{a as n}from"./chunk-DIS2PGBH.js";import{a as c,b as h}from"./chunk-5MOOXA2X.js";import{a,b,f as d}from"./chunk-4OT5AMS5.js";import{d as l}from"./chunk-IZ2LK5GK.js";var f=a`:host{display:table-row}:host([checked]),:host([checked]) ::slotted(bl-table-cell){background-color:var(--bl-color-primary-contrast)}:host([disabled]),:host([disabled]) ::slotted(bl-table-cell){background-color:var(--bl-color-neutral-lightest);color:var(--bl-color-neutral-light)}:host(:not([checked], [disabled]).__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__),:host(:not([checked], [disabled]):hover) ::slotted(bl-table-cell),:host(:not([checked], [disabled]):hover),:host(:not([checked], [disabled]):hover) ::slotted(bl-table-cell){background-color:var(--bl-color-tertiary-background)}:host ::slotted(*:first-child){border-left:none}:host ::slotted(*:last-child){border-right:none}:host(:first-child) ::slotted(bl-table-header-cell){border-top:none;border-right:none}:host(:first-child) ::slotted(bl-table-header-cell:first-child){border-top-left-radius:var(--bl-size-3xs)}:host(:first-child) ::slotted(bl-table-header-cell:last-child){border-top-right-radius:var(--bl-size-3xs);border-right:1px}:host(:last-child) ::slotted(bl-table-cell){border-bottom:none}:host(:first-child) ::slotted(bl-table-cell){border-top:none}:host(:last-child) ::slotted(bl-table-cell:first-child){border-bottom-left-radius:var(--bl-size-3xs)}:host(:last-child) ::slotted(bl-table-cell:last-child){border-bottom-right-radius:var(--bl-size-3xs)}:host([sticky-first-column]) ::slotted(bl-table-header-cell:first-child),:host([sticky-first-column]) ::slotted(bl-table-cell:first-child){position:sticky;z-index:2;left:0}:host([sticky-last-column]) ::slotted(bl-table-header-cell:last-child),:host([sticky-last-column]) ::slotted(bl-table-cell:last-child){position:sticky;z-index:2;right:0}`,m=f;var y="bl-table-row",e=class extends d{constructor(){super(...arguments);this.selectionKey=""}static get styles(){return[m]}connectedCallback(){super.connectedCallback(),!this.closest(n)&&!this.closest(u)&&console.warn("bl-table-row is designed to be used inside a bl-table-header or bl-table-body",this)}updated(t){super.updated(t),this.removeAttribute("checked"),this.removeAttribute("disabled"),this.removeAttribute("sticky-first-column"),this.removeAttribute("sticky-last-column"),this.stickyFirstColumn&&this.setAttribute("sticky-first-column","true"),this.stickyLastColumn&&this.setAttribute("sticky-last-column","true"),this.checked?this.setAttribute("checked","true"):this.disabled&&this.setAttribute("disabled","true"),t.has("selectionKey")&&this.updateComplete.then(()=>{var s,r,o,i;Array.from(this.querySelectorAll("bl-table-header-cell,bl-table-cell")).map(p=>{p.requestUpdate()}),(s=this._table)!=null&&s.multiple&&((r=this._table)!=null&&r.selectable)&&((i=(o=this._table)==null?void 0:o.querySelector("bl-table-header-cell"))==null||i.requestUpdate())})}get _table(){return this.closest("bl-table")}get _firstTableCell(){return this.querySelector("bl-table-cell")}get disabled(){var t;return!!((t=this._firstTableCell)!=null&&t.disabled)}get checked(){var t;return!!((t=this._table)!=null&&t.isRowSelected(this.selectionKey))}get stickyFirstColumn(){var t;return!!((t=this._table)!=null&&t.isFirstColumnSticky())}get stickyLastColumn(){var t;return!!((t=this._table)!=null&&t.isLastColumnSticky())}render(){return b`<slot></slot>`}};l([h({type:String,reflect:!0,attribute:"selection-key"})],e.prototype,"selectionKey",2),e=l([c(y)],e);export{y as a,e as b};
2
+ //# sourceMappingURL=chunk-C4DOPHMG.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/components/table/table-row/bl-table-row.css", "../src/components/table/table-row/bl-table-row.ts"],
4
- "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:table-row}:host([checked]),:host([checked]) ::slotted(bl-table-cell){background-color:var(--bl-color-primary-contrast)}:host([disabled]),:host([disabled]) ::slotted(bl-table-cell){background-color:var(--bl-color-neutral-lightest);color:var(--bl-color-neutral-light)}:host(:not([checked], [disabled]).__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__),:host(:not([checked], [disabled]):hover) ::slotted(bl-table-cell),:host(:not([checked], [disabled]):hover),:host(:not([checked], [disabled]):hover) ::slotted(bl-table-cell){background-color:var(--bl-color-tertiary-background)}:host ::slotted(*:first-child){border-left:none}:host ::slotted(*:last-child){border-right:none}:host(:first-child) ::slotted(bl-table-header-cell){border-top:none;border-right:none}:host(:first-child) ::slotted(bl-table-header-cell:first-child){border-top-left-radius:var(--bl-size-3xs)}:host(:first-child) ::slotted(bl-table-header-cell:last-child){border-top-right-radius:var(--bl-size-3xs);border-right:1px}:host(:last-child) ::slotted(bl-table-cell){border-bottom:none}:host(:first-child) ::slotted(bl-table-cell){border-top:none}:host(:last-child) ::slotted(bl-table-cell:first-child){border-bottom-left-radius:var(--bl-size-3xs)}:host(:last-child) ::slotted(bl-table-cell:last-child){border-bottom-right-radius:var(--bl-size-3xs)}:host([sticky-first-column]) ::slotted(bl-table-header-cell:first-child),:host([sticky-first-column]) ::slotted(bl-table-cell:first-child){position:sticky;z-index:2;left:0}:host([sticky-last-column]) ::slotted(bl-table-header-cell:last-child),:host([sticky-last-column]) ::slotted(bl-table-cell:last-child){position:sticky;z-index:2;right:0}`;\nexport default styles;\n", "import { html, LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { CSSResultGroup } from \"lit/development\";\nimport \"element-internals-polyfill\";\nimport \"../../checkbox-group/checkbox/bl-checkbox\";\nimport { blTableBodyTag } from \"../table-body/bl-table-body\";\nimport type BlTableBody from \"../table-body/bl-table-body\";\nimport BlTableCell from \"../table-cell/bl-table-cell\";\nimport BlTableHeaderCell from \"../table-header-cell/bl-table-header-cell\";\nimport { blTableHeaderTag } from \"../table-header/bl-table-header\";\nimport type BlTableHeader from \"../table-header/bl-table-header\";\nimport style from \"../table-row/bl-table-row.css\";\n\nexport const blTableRowTag = \"bl-table-row\";\n\n/**\n * @tag bl-table-row\n * @summary Baklava Table component\n */\n@customElement(blTableRowTag)\nexport default class BlTableRow extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * selection key for table row\n */\n @property({ type: String, reflect: true, attribute: \"selection-key\" })\n selectionKey: string = \"\";\n\n connectedCallback(): void {\n super.connectedCallback();\n if (\n !this.closest<BlTableHeader>(blTableHeaderTag) &&\n !this.closest<BlTableBody>(blTableBodyTag)\n ) {\n console.warn(\n \"bl-table-row is designed to be used inside a bl-table-header or bl-table-body\",\n this\n );\n }\n }\n\n updated(_changedProperties: PropertyValues) {\n super.updated(_changedProperties);\n this.removeAttribute(\"checked\");\n this.removeAttribute(\"disabled\");\n this.removeAttribute(\"sticky-first-column\");\n this.removeAttribute(\"sticky-last-column\");\n\n if (this.stickyFirstColumn) {\n this.setAttribute(\"sticky-first-column\", \"true\");\n }\n if (this.stickyLastColumn) {\n this.setAttribute(\"sticky-last-column\", \"true\");\n }\n if (this.checked) {\n this.setAttribute(\"checked\", \"true\");\n } else if (this.disabled) {\n this.setAttribute(\"disabled\", \"true\");\n }\n if (_changedProperties.has(\"selectionKey\")) {\n this.updateComplete.then(() => {\n Array.from(this.querySelectorAll(\"bl-table-header-cell,bl-table-cell\")).map(com => {\n (com as BlTableHeaderCell | BlTableCell).requestUpdate();\n });\n });\n }\n }\n\n private get _table() {\n return this.closest(\"bl-table\");\n }\n\n private get _firstTableCell() {\n return this.querySelector(\"bl-table-cell\");\n }\n get disabled() {\n return !!this._firstTableCell?.disabled;\n }\n\n get checked() {\n return !!this._table?.isRowSelected(this.selectionKey);\n }\n\n get stickyFirstColumn() {\n return !!this._table?.isFirstColumnSticky();\n }\n\n get stickyLastColumn() {\n return !!this._table?.isLastColumnSticky();\n }\n\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blTableRowTag]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AL,MAAAA,EAAa,sBACxB,CAEA,IAAI,kBAAmB,CA1FzB,IAAAA,EA2FI,MAAO,CAAC,GAACA,EAAA,KAAK,SAAL,MAAAA,EAAa,qBACxB,CAEA,QAAyB,CACvB,OAAOC,gBACT,CACF,EApEEC,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,eAAgB,CAAC,GARlDV,EASnB,4BATmBA,EAArBS,EAAA,CADCC,EAAcX,CAAa,GACPC",
6
- "names": ["styles", "i", "bl_table_row_default", "blTableRowTag", "BlTableRow", "s", "bl_table_row_default", "blTableHeaderTag", "blTableBodyTag", "_changedProperties", "com", "_a", "x", "__decorateClass", "e"]
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:table-row}:host([checked]),:host([checked]) ::slotted(bl-table-cell){background-color:var(--bl-color-primary-contrast)}:host([disabled]),:host([disabled]) ::slotted(bl-table-cell){background-color:var(--bl-color-neutral-lightest);color:var(--bl-color-neutral-light)}:host(:not([checked], [disabled]).__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__),:host(:not([checked], [disabled]):hover) ::slotted(bl-table-cell),:host(:not([checked], [disabled]):hover),:host(:not([checked], [disabled]):hover) ::slotted(bl-table-cell){background-color:var(--bl-color-tertiary-background)}:host ::slotted(*:first-child){border-left:none}:host ::slotted(*:last-child){border-right:none}:host(:first-child) ::slotted(bl-table-header-cell){border-top:none;border-right:none}:host(:first-child) ::slotted(bl-table-header-cell:first-child){border-top-left-radius:var(--bl-size-3xs)}:host(:first-child) ::slotted(bl-table-header-cell:last-child){border-top-right-radius:var(--bl-size-3xs);border-right:1px}:host(:last-child) ::slotted(bl-table-cell){border-bottom:none}:host(:first-child) ::slotted(bl-table-cell){border-top:none}:host(:last-child) ::slotted(bl-table-cell:first-child){border-bottom-left-radius:var(--bl-size-3xs)}:host(:last-child) ::slotted(bl-table-cell:last-child){border-bottom-right-radius:var(--bl-size-3xs)}:host([sticky-first-column]) ::slotted(bl-table-header-cell:first-child),:host([sticky-first-column]) ::slotted(bl-table-cell:first-child){position:sticky;z-index:2;left:0}:host([sticky-last-column]) ::slotted(bl-table-header-cell:last-child),:host([sticky-last-column]) ::slotted(bl-table-cell:last-child){position:sticky;z-index:2;right:0}`;\nexport default styles;\n", "import { html, LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { CSSResultGroup } from \"lit/development\";\nimport \"element-internals-polyfill\";\nimport \"../../checkbox-group/checkbox/bl-checkbox\";\nimport { blTableBodyTag } from \"../table-body/bl-table-body\";\nimport type BlTableBody from \"../table-body/bl-table-body\";\nimport BlTableCell from \"../table-cell/bl-table-cell\";\nimport BlTableHeaderCell from \"../table-header-cell/bl-table-header-cell\";\nimport { blTableHeaderTag } from \"../table-header/bl-table-header\";\nimport type BlTableHeader from \"../table-header/bl-table-header\";\nimport style from \"../table-row/bl-table-row.css\";\n\nexport const blTableRowTag = \"bl-table-row\";\n\n/**\n * @tag bl-table-row\n * @summary Baklava Table component\n */\n@customElement(blTableRowTag)\nexport default class BlTableRow extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * selection key for table row\n */\n @property({ type: String, reflect: true, attribute: \"selection-key\" })\n selectionKey: string = \"\";\n\n connectedCallback(): void {\n super.connectedCallback();\n if (\n !this.closest<BlTableHeader>(blTableHeaderTag) &&\n !this.closest<BlTableBody>(blTableBodyTag)\n ) {\n console.warn(\n \"bl-table-row is designed to be used inside a bl-table-header or bl-table-body\",\n this\n );\n }\n }\n\n updated(_changedProperties: PropertyValues) {\n super.updated(_changedProperties);\n this.removeAttribute(\"checked\");\n this.removeAttribute(\"disabled\");\n this.removeAttribute(\"sticky-first-column\");\n this.removeAttribute(\"sticky-last-column\");\n\n if (this.stickyFirstColumn) {\n this.setAttribute(\"sticky-first-column\", \"true\");\n }\n if (this.stickyLastColumn) {\n this.setAttribute(\"sticky-last-column\", \"true\");\n }\n if (this.checked) {\n this.setAttribute(\"checked\", \"true\");\n } else if (this.disabled) {\n this.setAttribute(\"disabled\", \"true\");\n }\n if (_changedProperties.has(\"selectionKey\")) {\n this.updateComplete.then(() => {\n Array.from(this.querySelectorAll(\"bl-table-header-cell,bl-table-cell\")).map(com => {\n (com as BlTableHeaderCell | BlTableCell).requestUpdate();\n });\n\n if (this._table?.multiple && this._table?.selectable) {\n this._table?.querySelector(\"bl-table-header-cell\")?.requestUpdate();\n }\n });\n }\n }\n\n private get _table() {\n return this.closest(\"bl-table\");\n }\n\n private get _firstTableCell() {\n return this.querySelector(\"bl-table-cell\");\n }\n get disabled() {\n return !!this._firstTableCell?.disabled;\n }\n\n get checked() {\n return !!this._table?.isRowSelected(this.selectionKey);\n }\n\n get stickyFirstColumn() {\n return !!this._table?.isFirstColumnSticky();\n }\n\n get stickyLastColumn() {\n return !!this._table?.isLastColumnSticky();\n }\n\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blTableRowTag]: BlTableRow;\n }\n}\n"],
5
+ "mappings": "mNACO,IAAMA,EAASC,koDACfC,EAAQF,ECWR,IAAMG,EAAgB,eAORC,EAArB,cAAwCC,CAAW,CAAnD,kCASE,kBAAuB,GARvB,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAQA,mBAA0B,CACxB,MAAM,kBAAkB,EAEtB,CAAC,KAAK,QAAuBC,CAAgB,GAC7C,CAAC,KAAK,QAAqBC,CAAc,GAEzC,QAAQ,KACN,gFACA,IACF,CAEJ,CAEA,QAAQC,EAAoC,CAC1C,MAAM,QAAQA,CAAkB,EAChC,KAAK,gBAAgB,SAAS,EAC9B,KAAK,gBAAgB,UAAU,EAC/B,KAAK,gBAAgB,qBAAqB,EAC1C,KAAK,gBAAgB,oBAAoB,EAErC,KAAK,mBACP,KAAK,aAAa,sBAAuB,MAAM,EAE7C,KAAK,kBACP,KAAK,aAAa,qBAAsB,MAAM,EAE5C,KAAK,QACP,KAAK,aAAa,UAAW,MAAM,EAC1B,KAAK,UACd,KAAK,aAAa,WAAY,MAAM,EAElCA,EAAmB,IAAI,cAAc,GACvC,KAAK,eAAe,KAAK,IAAM,CA/DrC,IAAAC,EAAAC,EAAAC,EAAAC,EAgEQ,MAAM,KAAK,KAAK,iBAAiB,oCAAoC,CAAC,EAAE,IAAIC,GAAO,CAChFA,EAAwC,cAAc,CACzD,CAAC,GAEGJ,EAAA,KAAK,SAAL,MAAAA,EAAa,YAAYC,EAAA,KAAK,SAAL,MAAAA,EAAa,eACxCE,GAAAD,EAAA,KAAK,SAAL,YAAAA,EAAa,cAAc,0BAA3B,MAAAC,EAAoD,gBAExD,CAAC,CAEL,CAEA,IAAY,QAAS,CACnB,OAAO,KAAK,QAAQ,UAAU,CAChC,CAEA,IAAY,iBAAkB,CAC5B,OAAO,KAAK,cAAc,eAAe,CAC3C,CACA,IAAI,UAAW,CAlFjB,IAAAH,EAmFI,MAAO,CAAC,GAACA,EAAA,KAAK,kBAAL,MAAAA,EAAsB,SACjC,CAEA,IAAI,SAAU,CAtFhB,IAAAA,EAuFI,MAAO,CAAC,GAACA,EAAA,KAAK,SAAL,MAAAA,EAAa,cAAc,KAAK,cAC3C,CAEA,IAAI,mBAAoB,CA1F1B,IAAAA,EA2FI,MAAO,CAAC,GAACA,EAAA,KAAK,SAAL,MAAAA,EAAa,sBACxB,CAEA,IAAI,kBAAmB,CA9FzB,IAAAA,EA+FI,MAAO,CAAC,GAACA,EAAA,KAAK,SAAL,MAAAA,EAAa,qBACxB,CAEA,QAAyB,CACvB,OAAOK,gBACT,CACF,EAxEEC,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,eAAgB,CAAC,GARlDb,EASnB,4BATmBA,EAArBY,EAAA,CADCC,EAAcd,CAAa,GACPC",
6
+ "names": ["styles", "i", "bl_table_row_default", "blTableRowTag", "BlTableRow", "s", "bl_table_row_default", "blTableHeaderTag", "blTableBodyTag", "_changedProperties", "_a", "_b", "_c", "_d", "com", "x", "__decorateClass", "e"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-ASB5S6J4.js";import{a as r,b as a}from"./chunk-5MOOXA2X.js";import{a as o,b as l,f as s}from"./chunk-4OT5AMS5.js";import{d as e}from"./chunk-IZ2LK5GK.js";var n=o`:host{display:table-header-group}:host([sticky]){position:sticky;top:0;left:0;right:0;z-index:3;transition:top 0.05s ease;box-shadow:0 8px 16px 0 rgb(39 49 66 / 10%)}:host([sticky])::after{content:"";display:block;position:absolute;bottom:0;left:0;right:0;height:1px;background:var(--bl-color-neutral-lighter)}`,p=n;var b="bl-table-header",t=class extends s{constructor(){super(...arguments);this.sticky=!1}static get styles(){return[p]}connectedCallback(){super.connectedCallback(),this.closest(i)||console.warn("bl-table-header is designed to be used inside a bl-table",this)}render(){return l`<slot></slot> `}};e([a({type:Boolean,reflect:!0})],t.prototype,"sticky",2),t=e([r(b)],t);export{b as a,t as b};
2
- //# sourceMappingURL=chunk-LIW32ZGE.js.map
1
+ import{a as i}from"./chunk-STMCW2R6.js";import{a as r,b as a}from"./chunk-5MOOXA2X.js";import{a as o,b as l,f as s}from"./chunk-4OT5AMS5.js";import{d as e}from"./chunk-IZ2LK5GK.js";var n=o`:host{display:table-header-group}:host([sticky]){position:sticky;top:0;left:0;right:0;z-index:3;transition:top 0.05s ease;box-shadow:0 8px 16px 0 rgb(39 49 66 / 10%)}:host([sticky])::after{content:"";display:block;position:absolute;bottom:0;left:0;right:0;height:1px;background:var(--bl-color-neutral-lighter)}`,p=n;var b="bl-table-header",t=class extends s{constructor(){super(...arguments);this.sticky=!1}static get styles(){return[p]}connectedCallback(){super.connectedCallback(),this.closest(i)||console.warn("bl-table-header is designed to be used inside a bl-table",this)}render(){return l`<slot></slot> `}};e([a({type:Boolean,reflect:!0})],t.prototype,"sticky",2),t=e([r(b)],t);export{b as a,t as b};
2
+ //# sourceMappingURL=chunk-DIS2PGBH.js.map
@@ -1,4 +1,4 @@
1
- import{a as b}from"./chunk-5HU4KWMX.js";import{a as s,b as n}from"./chunk-5MOOXA2X.js";import{a as i,b as o,f as a}from"./chunk-4OT5AMS5.js";import{d as l}from"./chunk-IZ2LK5GK.js";var d=i`:host{display:table-cell;border:1px solid var(--bl-color-neutral-lighter);padding:var(--bl-size-m);font:var(--bl-font-title-3-regular);color:var(--bl-color-neutral-darker);box-sizing:border-box;vertical-align:middle;word-break:break-word;background-color:var(--bl-color-neutral-full);background-clip:padding-box;border-top:none;border-right:none}.table-cell{display:flex;align-items:center}.table-cell.shadow-right::before{content:"";position:absolute;right:-1px;top:0;width:16px;height:100%;z-index:-1;border-right:1px solid var(--bl-color-neutral-lighter);box-shadow:8px 0 16px 0 rgb(39 49 66 / 10%)}.table-cell.shadow-left::before{content:"";position:absolute;left:-1px;top:0;width:16px;height:100%;z-index:-1;border-left:1px solid var(--bl-color-neutral-lighter);box-shadow:-8px 0 16px 0 rgb(39 49 66 / 10%)}bl-checkbox{margin-right:var(--bl-size-m)}`,c=d;var h="bl-table-cell",t=class extends a{constructor(){super(...arguments);this.disableSelection=!1}static get styles(){return[c]}get _table(){return this.closest("bl-table")}get _tableRow(){return this.closest("bl-table-row")}get disabled(){return this.disableSelection}get selectable(){var e;return this.index===0&&!!((e=this._table)!=null&&e.isSelectable(!1))&&this.selectionKey}get index(){let e=this.parentNode;return e?[...e.children].indexOf(this):-1}get selectionKey(){return this._tableRow?this._tableRow.selectionKey:""}get checked(){var e;return!!((e=this._tableRow)!=null&&e.checked)}get shadowRight(){var e;return!!((e=this._tableRow)!=null&&e.stickyFirstColumn)&&this.index===0}get shadowLeft(){var e;return!!((e=this._tableRow)!=null&&e.stickyLastColumn)&&this.nextElementSibling===null}connectedCallback(){super.connectedCallback(),this.closest(b)||console.warn("bl-table-cell is designed to be used inside a bl-table-row",this)}onChange(e){var r;(r=this._table)==null||r.onSelectionChange(!1,e.detail,this.selectionKey)}_renderCheckbox(){return this.selectable?o`<bl-checkbox
1
+ import{a as b}from"./chunk-C4DOPHMG.js";import{a as s,b as n}from"./chunk-5MOOXA2X.js";import{a as i,b as o,f as a}from"./chunk-4OT5AMS5.js";import{d as l}from"./chunk-IZ2LK5GK.js";var d=i`:host{display:table-cell;border:1px solid var(--bl-color-neutral-lighter);padding:var(--bl-size-m);font:var(--bl-font-title-3-regular);color:var(--bl-color-neutral-darker);box-sizing:border-box;vertical-align:middle;word-break:break-word;background-color:var(--bl-color-neutral-full);background-clip:padding-box;border-top:none;border-right:none}.table-cell{display:flex;align-items:center}.table-cell.shadow-right::before{content:"";position:absolute;right:-1px;top:0;width:16px;height:100%;z-index:-1;border-right:1px solid var(--bl-color-neutral-lighter);box-shadow:8px 0 16px 0 rgb(39 49 66 / 10%)}.table-cell.shadow-left::before{content:"";position:absolute;left:-1px;top:0;width:16px;height:100%;z-index:-1;border-left:1px solid var(--bl-color-neutral-lighter);box-shadow:-8px 0 16px 0 rgb(39 49 66 / 10%)}bl-checkbox{margin-right:var(--bl-size-m)}`,c=d;var h="bl-table-cell",t=class extends a{constructor(){super(...arguments);this.disableSelection=!1}static get styles(){return[c]}get _table(){return this.closest("bl-table")}get _tableRow(){return this.closest("bl-table-row")}get disabled(){return this.disableSelection}get selectable(){var e;return this.index===0&&!!((e=this._table)!=null&&e.isSelectable(!1))&&this.selectionKey}get index(){let e=this.parentNode;return e?[...e.children].indexOf(this):-1}get selectionKey(){return this._tableRow?this._tableRow.selectionKey:""}get checked(){var e;return!!((e=this._tableRow)!=null&&e.checked)}get shadowRight(){var e;return!!((e=this._tableRow)!=null&&e.stickyFirstColumn)&&this.index===0}get shadowLeft(){var e;return!!((e=this._tableRow)!=null&&e.stickyLastColumn)&&this.nextElementSibling===null}connectedCallback(){super.connectedCallback(),this.closest(b)||console.warn("bl-table-cell is designed to be used inside a bl-table-row",this)}onChange(e){var r;(r=this._table)==null||r.onSelectionChange(!1,e.detail,this.selectionKey)}_renderCheckbox(){return this.selectable?o`<bl-checkbox
2
2
  ?checked=${this.checked}
3
3
  ?disabled=${this.disabled}
4
4
  value="row"
@@ -8,4 +8,4 @@ import{a as b}from"./chunk-5HU4KWMX.js";import{a as s,b as n}from"./chunk-5MOOXA
8
8
  ${this._renderCheckbox()}
9
9
  <slot></slot>
10
10
  </div>`}};l([n({type:Boolean,reflect:!0,attribute:"disabled"})],t.prototype,"disableSelection",2),t=l([s(h)],t);export{h as a,t as b};
11
- //# sourceMappingURL=chunk-D5MPTIGC.js.map
11
+ //# sourceMappingURL=chunk-KPWKBI57.js.map
@@ -0,0 +1,8 @@
1
+ import{a}from"./chunk-GRL4DWKG.js";import{a as d,b as s,c as o}from"./chunk-5MOOXA2X.js";import{a as n,b as c,f as h}from"./chunk-4OT5AMS5.js";import{d as r}from"./chunk-IZ2LK5GK.js";var p=n`:host{display:block;height:100%}.table-wrapper{overflow:auto;border:1px solid var(--bl-color-neutral-lighter);border-radius:var(--bl-size-3xs);position:relative;max-height:100%}.table{width:100%;display:table;border-spacing:0}`,u=p;var b="bl-table",m="bl-sort",y="bl-row-select",l=class extends h{constructor(){super(...arguments);this.selectable=!1;this.multiple=!1;this.sortable=!1;this.stickyFirstColumn=!1;this.stickyLastColumn=!1;this._selectedValues=[];this._sortKey="";this._sortDirection=""}static get styles(){return[u]}get selected(){return this._selectedValues}set selected(e){this._selectedValues=e,this.updateComplete.then(()=>{this.querySelectorAll("bl-table-header-cell,bl-table-cell,bl-table-row").forEach(t=>{t.requestUpdate()})})}get sortKey(){return this._sortKey}set sortKey(e){this._sortKey=e}get sortDirection(){return this._sortDirection}set sortDirection(e){this._sortDirection=e}updated(e){(e.has("selectable")||e.has("multiple")||e.has("stickyFirstColumn")||e.has("stickyLastColumn")||e.has("sortable"))&&this.querySelectorAll("bl-table-header-cell,bl-table-cell,bl-table-row").forEach(t=>{t.requestUpdate()})}get tableRows(){return this.querySelectorAll("bl-table-body bl-table-row")}isFirstColumnSticky(){return this.stickyFirstColumn}isLastColumnSticky(){return this.stickyLastColumn}isSelectable(e=!1){return e?this.multiple&&this.selectable:this.selectable}isRowSelected(e){return this.selected.includes(e)}isAllSelected(){return Array.from(this.tableRows).every(e=>this.selected.includes(e.selectionKey))}isAnySelected(){return!this.isAllSelected()&&Array.from(this.tableRows).some(e=>!e.disabled&&this.selected.includes(e.selectionKey))}isAllUnselectedDisabled(){return Array.from(this.tableRows).filter(e=>!this.selected.includes(e.selectionKey)).every(e=>e.disabled)}onSelectionChange(e=!1,t,i){e?this.handleHeaderSelection(t):this.handleRowSelection(t,i),this.notifyRowSelectionChange()}handleHeaderSelection(e){let t=this.getSelectedValuesFromRows();e?this.selected=[...new Set([...this.selected,...t])]:this.selected=this.selected.filter(i=>!t.includes(i))}handleRowSelection(e,t){e?this.addSelection(t):this.removeSelection(t)}notifyRowSelectionChange(){this.onRowSelect(this.selected)}addSelection(e){this.selected.includes(e)||this.selected.push(e)}removeSelection(e){this.selected=this.selected.filter(t=>t!==e)}getSelectedValuesFromRows(){return Array.from(this.tableRows).filter(e=>!e.disabled).map(e=>e.selectionKey)}resetScrollPosition(){var t;let e=(t=this.shadowRoot)==null?void 0:t.querySelector(".table-wrapper");e&&e.scrollTo({behavior:"smooth",top:0})}onSortChange(e,t){this._sortKey=e,this._sortDirection=t,this.onSort([this.sortKey,this.sortDirection]),this.updateComplete.then(()=>{this.querySelectorAll("bl-table-header-cell").forEach(i=>{i.requestUpdate()})}),this.resetScrollPosition()}render(){return c` <div class="table-wrapper">
2
+ <div class="table">
3
+ <table>
4
+ <slot></slot>
5
+ </table>
6
+ </div>
7
+ </div>`}};r([s({type:Array,reflect:!0,attribute:"selected"})],l.prototype,"selected",1),r([s({type:Boolean,reflect:!0})],l.prototype,"selectable",2),r([s({type:Boolean,reflect:!0})],l.prototype,"multiple",2),r([s({type:Boolean,reflect:!0})],l.prototype,"sortable",2),r([s({type:Boolean,reflect:!0,attribute:"sticky-first-column"})],l.prototype,"stickyFirstColumn",2),r([s({type:Boolean,reflect:!0,attribute:"sticky-last-column"})],l.prototype,"stickyLastColumn",2),r([s({type:String,reflect:!0,attribute:"sort-key"})],l.prototype,"sortKey",1),r([s({type:String,reflect:!0,attribute:"sort-direction"})],l.prototype,"sortDirection",1),r([a(m)],l.prototype,"onSort",2),r([a(y)],l.prototype,"onRowSelect",2),r([o()],l.prototype,"_selectedValues",2),r([o()],l.prototype,"_sortKey",2),r([o()],l.prototype,"_sortDirection",2),l=r([d(b)],l);export{b as a,m as b,y as c,l as d};
8
+ //# sourceMappingURL=chunk-STMCW2R6.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/components/table/bl-table.css", "../src/components/table/bl-table.ts"],
4
- "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:block;height:100%}.table-wrapper{overflow:auto;border:1px solid var(--bl-color-neutral-lighter);border-radius:var(--bl-size-3xs);position:relative;max-height:100%}.table{width:100%;display:table;border-spacing:0}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport \"element-internals-polyfill\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport style from \"./bl-table.css\";\nimport BlTableCell from \"./table-cell/bl-table-cell\";\nimport BlTableHeaderCell from \"./table-header-cell/bl-table-header-cell\";\nimport BlTableRow from \"./table-row/bl-table-row\";\n\nexport const blTableTag = \"bl-table\";\n\nexport const blSortChangeEventName = \"bl-sort\";\nexport const blRowSelectChangeEventName = \"bl-row-select\";\n\nexport type SortDirection = \"asc\" | \"desc\" | \"\";\n\n/**\n * @tag bl-table\n * @summary Baklava Table component\n *\n */\n@customElement(blTableTag)\nexport default class BlTable extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Selected table row selection key list\n */\n @property({ type: Array, reflect: true, attribute: \"selected\" })\n get selected(): string[] {\n return this._selectedValues;\n }\n\n set selected(value: string[]) {\n this._selectedValues = value;\n this.updateComplete.then(() => {\n this.querySelectorAll(\"bl-table-header-cell,bl-table-cell,bl-table-row\").forEach(com => {\n (com as BlTableHeaderCell | BlTableCell | BlTableRow).requestUpdate();\n });\n });\n }\n\n /**\n * Sets table row as selectable\n */\n @property({ type: Boolean, reflect: true })\n selectable = false;\n\n /**\n * Sets table row multiple selection enable\n */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n /**\n * Sets table as sortable\n */\n @property({ type: Boolean, reflect: true })\n sortable = false;\n /**\n * Sets table first column as sticky\n */\n @property({ type: Boolean, reflect: true, attribute: \"sticky-first-column\" })\n stickyFirstColumn = false;\n /**\n * Sets table last column as sticky\n */\n @property({ type: Boolean, reflect: true, attribute: \"sticky-last-column\" })\n stickyLastColumn = false;\n\n /**\n * Sets table sorted column key\n */\n @property({ type: String, reflect: true, attribute: \"sort-key\" })\n get sortKey(): string {\n return this._sortKey;\n }\n\n set sortKey(value: string) {\n this._sortKey = value;\n }\n\n /**\n * Sets table sorting direction\n */\n @property({ type: String, reflect: true, attribute: \"sort-direction\" })\n get sortDirection(): SortDirection {\n return this._sortDirection;\n }\n\n set sortDirection(value: SortDirection) {\n this._sortDirection = value;\n }\n\n /**\n * Fires when table sort options changed\n */\n @event(blSortChangeEventName) private onSort: EventDispatcher<string[]>;\n\n /**\n * Fires when selected table rows changed\n */\n @event(blRowSelectChangeEventName) private onRowSelect: EventDispatcher<string[]>;\n\n @state() private _selectedValues: string[] = [];\n\n @state() private _sortKey: string = \"\";\n\n @state() private _sortDirection: SortDirection = \"\";\n\n protected updated(_changedProperties: PropertyValues) {\n if (\n _changedProperties.has(\"selectable\") ||\n _changedProperties.has(\"multiple\") ||\n _changedProperties.has(\"stickyFirstColumn\") ||\n _changedProperties.has(\"stickyLastColumn\") ||\n _changedProperties.has(\"sortable\")\n ) {\n this.querySelectorAll(\"bl-table-header-cell,bl-table-cell,bl-table-row\").forEach(com => {\n (com as BlTableHeaderCell | BlTableCell | BlTableRow).requestUpdate();\n });\n }\n }\n\n get tableRows() {\n return this.querySelectorAll<BlTableRow>(\"bl-table-body bl-table-row\");\n }\n\n isFirstColumnSticky() {\n return this.stickyFirstColumn;\n }\n\n isLastColumnSticky() {\n return this.stickyLastColumn;\n }\n\n isSelectable(isHeaderCell = false) {\n return isHeaderCell ? this.multiple && this.selectable : this.selectable;\n }\n\n isRowSelected(selectionKey: string) {\n return this.selected.includes(selectionKey);\n }\n\n isAllSelected() {\n return Array.from(this.tableRows).every(tr => this.selected.includes(tr.selectionKey));\n }\n\n isAnySelected() {\n return (\n !this.isAllSelected() &&\n Array.from(this.tableRows).some(tr => !tr.disabled && this.selected.includes(tr.selectionKey))\n );\n }\n\n isAllUnselectedDisabled() {\n return Array.from(this.tableRows)\n .filter(tr => !this.selected.includes(tr.selectionKey))\n .every(tr => tr.disabled);\n }\n\n /**\n * Handles selection changes for both header and row selections.\n * @param isHeader - Indicates if the selection change is for the header.\n * @param isSelected - The selection state.\n * @param selectionKey - The key identifying the selected row. It must be there if it is not the header.\n */\n onSelectionChange(isHeader: boolean = false, isSelected: boolean, selectionKey: string) {\n if (isHeader) {\n this.handleHeaderSelection(isSelected);\n } else {\n this.handleRowSelection(isSelected, selectionKey);\n }\n\n this.notifyRowSelectionChange();\n }\n\n /**\n * Updates selected values based on header selection.\n * @param isSelected - The selection state.\n */\n private handleHeaderSelection(isSelected: boolean) {\n this.selected = isSelected ? this.getSelectedValuesFromRows() : [];\n }\n\n /**\n * Updates selected values based on row selection.\n * @param isSelected - The selection state.\n * @param selectionKey - The key identifying the selected row.\n */\n private handleRowSelection(isSelected: boolean, selectionKey: string) {\n if (isSelected) {\n this.addSelection(selectionKey);\n } else {\n this.removeSelection(selectionKey);\n }\n }\n\n /**\n * Notifies about the row selection change.\n */\n private notifyRowSelectionChange() {\n this.onRowSelect(this.selected);\n }\n\n /**\n * Adds a selection key to the selected values.\n * @param selectionKey - The key to add.\n */\n private addSelection(selectionKey: string) {\n if (!this.selected.includes(selectionKey)) {\n this.selected.push(selectionKey);\n }\n }\n\n /**\n * Removes a selection key from the selected values.\n * @param selectionKey - The key to remove.\n */\n private removeSelection(selectionKey: string) {\n this.selected = this.selected.filter(value => value !== selectionKey);\n }\n\n /**\n * Gets the selection keys from all selectable table rows.\n * @returns An array of selection keys.\n */\n private getSelectedValuesFromRows(): string[] {\n return Array.from(this.tableRows)\n .filter(tableRow => !tableRow.disabled)\n .map(tableRow => tableRow.selectionKey);\n }\n\n resetScrollPosition(): void {\n const tableWrapper = this.shadowRoot?.querySelector(\".table-wrapper\");\n\n if (tableWrapper) {\n tableWrapper.scrollTo({\n behavior: \"smooth\",\n top: 0,\n });\n }\n }\n\n onSortChange(sortKey: string, sortDirection: SortDirection) {\n this._sortKey = sortKey;\n this._sortDirection = sortDirection;\n this.onSort([this.sortKey, this.sortDirection]);\n this.updateComplete.then(() => {\n this.querySelectorAll(\"bl-table-header-cell\").forEach(com => {\n (com as BlTableHeaderCell).requestUpdate();\n });\n });\n this.resetScrollPosition();\n }\n\n render(): TemplateResult {\n return html` <div class=\"table-wrapper\">\n <div class=\"table\">\n <table>\n <slot></slot>\n </table>\n </div>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blTableTag]: BlTable;\n }\n\n interface HTMLElementEventMap {\n [blSortChangeEventName]: CustomEvent<string[]>;\n [blRowSelectChangeEventName]: CustomEvent<string[]>;\n }\n}\n"],
5
- "mappings": "uLACO,IAAMA,EAASC,sOACfC,EAAQF,ECOR,IAAMG,EAAa,WAEbC,EAAwB,UACxBC,EAA6B,gBAUrBC,EAArB,cAAqCC,CAAW,CAAhD,kCA0BE,gBAAa,GAMb,cAAW,GAMX,cAAW,GAKX,uBAAoB,GAKpB,sBAAmB,GAoCV,KAAQ,gBAA4B,CAAC,EAErC,KAAQ,SAAmB,GAE3B,KAAQ,eAAgC,GAvFjD,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAMA,IAAI,UAAqB,CACvB,OAAO,KAAK,eACd,CAEA,IAAI,SAASC,EAAiB,CAC5B,KAAK,gBAAkBA,EACv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CADHC,EAAS,CAAE,KAAM,MAAO,QAAS,GAAM,UAAW,UAAW,CAAC,GAR5ClB,EASf,wBAiBJiB,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAzBvBlB,EA0BnB,0BAMAiB,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA/BvBlB,EAgCnB,wBAMAiB,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GArCvBlB,EAsCnB,wBAKAiB,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,qBAAsB,CAAC,GA1CzDlB,EA2CnB,iCAKAiB,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,oBAAqB,CAAC,GA/CxDlB,EAgDnB,gCAMIiB,EAAA,CADHC,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,UAAW,CAAC,GArD7ClB,EAsDf,uBAYAiB,EAAA,CADHC,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,gBAAiB,CAAC,GAjEnDlB,EAkEf,6BAWkCiB,EAAA,CAArCE,EAAMrB,CAAqB,GA7ETE,EA6EmB,sBAKKiB,EAAA,CAA1CE,EAAMpB,CAA0B,GAlFdC,EAkFwB,2BAE1BiB,EAAA,CAAhBG,EAAM,GApFYpB,EAoFF,+BAEAiB,EAAA,CAAhBG,EAAM,GAtFYpB,EAsFF,wBAEAiB,EAAA,CAAhBG,EAAM,GAxFYpB,EAwFF,8BAxFEA,EAArBiB,EAAA,CADCC,EAAcrB,CAAU,GACJG",
6
- "names": ["styles", "i", "bl_table_default", "blTableTag", "blSortChangeEventName", "blRowSelectChangeEventName", "BlTable", "s", "bl_table_default", "value", "com", "_changedProperties", "isHeaderCell", "selectionKey", "tr", "isHeader", "isSelected", "tableRow", "_a", "tableWrapper", "sortKey", "sortDirection", "x", "__decorateClass", "e", "event", "t"]
4
+ "sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:block;height:100%}.table-wrapper{overflow:auto;border:1px solid var(--bl-color-neutral-lighter);border-radius:var(--bl-size-3xs);position:relative;max-height:100%}.table{width:100%;display:table;border-spacing:0}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport \"element-internals-polyfill\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport style from \"./bl-table.css\";\nimport BlTableCell from \"./table-cell/bl-table-cell\";\nimport BlTableHeaderCell from \"./table-header-cell/bl-table-header-cell\";\nimport BlTableRow from \"./table-row/bl-table-row\";\n\nexport const blTableTag = \"bl-table\";\n\nexport const blSortChangeEventName = \"bl-sort\";\nexport const blRowSelectChangeEventName = \"bl-row-select\";\n\nexport type SortDirection = \"asc\" | \"desc\" | \"\";\n\n/**\n * @tag bl-table\n * @summary Baklava Table component\n *\n */\n@customElement(blTableTag)\nexport default class BlTable extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Selected table row selection key list\n */\n @property({ type: Array, reflect: true, attribute: \"selected\" })\n get selected(): string[] {\n return this._selectedValues;\n }\n\n set selected(value: string[]) {\n this._selectedValues = value;\n this.updateComplete.then(() => {\n this.querySelectorAll(\"bl-table-header-cell,bl-table-cell,bl-table-row\").forEach(com => {\n (com as BlTableHeaderCell | BlTableCell | BlTableRow).requestUpdate();\n });\n });\n }\n\n /**\n * Sets table row as selectable\n */\n @property({ type: Boolean, reflect: true })\n selectable = false;\n\n /**\n * Sets table row multiple selection enable\n */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n /**\n * Sets table as sortable\n */\n @property({ type: Boolean, reflect: true })\n sortable = false;\n /**\n * Sets table first column as sticky\n */\n @property({ type: Boolean, reflect: true, attribute: \"sticky-first-column\" })\n stickyFirstColumn = false;\n /**\n * Sets table last column as sticky\n */\n @property({ type: Boolean, reflect: true, attribute: \"sticky-last-column\" })\n stickyLastColumn = false;\n\n /**\n * Sets table sorted column key\n */\n @property({ type: String, reflect: true, attribute: \"sort-key\" })\n get sortKey(): string {\n return this._sortKey;\n }\n\n set sortKey(value: string) {\n this._sortKey = value;\n }\n\n /**\n * Sets table sorting direction\n */\n @property({ type: String, reflect: true, attribute: \"sort-direction\" })\n get sortDirection(): SortDirection {\n return this._sortDirection;\n }\n\n set sortDirection(value: SortDirection) {\n this._sortDirection = value;\n }\n\n /**\n * Fires when table sort options changed\n */\n @event(blSortChangeEventName) private onSort: EventDispatcher<string[]>;\n\n /**\n * Fires when selected table rows changed\n */\n @event(blRowSelectChangeEventName) private onRowSelect: EventDispatcher<string[]>;\n\n @state() private _selectedValues: string[] = [];\n\n @state() private _sortKey: string = \"\";\n\n @state() private _sortDirection: SortDirection = \"\";\n\n protected updated(_changedProperties: PropertyValues) {\n if (\n _changedProperties.has(\"selectable\") ||\n _changedProperties.has(\"multiple\") ||\n _changedProperties.has(\"stickyFirstColumn\") ||\n _changedProperties.has(\"stickyLastColumn\") ||\n _changedProperties.has(\"sortable\")\n ) {\n this.querySelectorAll(\"bl-table-header-cell,bl-table-cell,bl-table-row\").forEach(com => {\n (com as BlTableHeaderCell | BlTableCell | BlTableRow).requestUpdate();\n });\n }\n }\n\n get tableRows() {\n return this.querySelectorAll<BlTableRow>(\"bl-table-body bl-table-row\");\n }\n\n isFirstColumnSticky() {\n return this.stickyFirstColumn;\n }\n\n isLastColumnSticky() {\n return this.stickyLastColumn;\n }\n\n isSelectable(isHeaderCell = false) {\n return isHeaderCell ? this.multiple && this.selectable : this.selectable;\n }\n\n isRowSelected(selectionKey: string) {\n return this.selected.includes(selectionKey);\n }\n\n isAllSelected() {\n return Array.from(this.tableRows).every(tr => this.selected.includes(tr.selectionKey));\n }\n\n isAnySelected() {\n return (\n !this.isAllSelected() &&\n Array.from(this.tableRows).some(tr => !tr.disabled && this.selected.includes(tr.selectionKey))\n );\n }\n\n isAllUnselectedDisabled() {\n return Array.from(this.tableRows)\n .filter(tr => !this.selected.includes(tr.selectionKey))\n .every(tr => tr.disabled);\n }\n\n /**\n * Handles selection changes for both header and row selections.\n * @param isHeader - Indicates if the selection change is for the header.\n * @param isSelected - The selection state.\n * @param selectionKey - The key identifying the selected row. It must be there if it is not the header.\n */\n onSelectionChange(isHeader: boolean = false, isSelected: boolean, selectionKey: string) {\n if (isHeader) {\n this.handleHeaderSelection(isSelected);\n } else {\n this.handleRowSelection(isSelected, selectionKey);\n }\n\n this.notifyRowSelectionChange();\n }\n\n /**\n * Updates selected values based on header selection for currently rendered rows.\n * @param isSelected - The selection state.\n */\n private handleHeaderSelection(isSelected: boolean) {\n const rowValues = this.getSelectedValuesFromRows();\n\n if (isSelected) {\n this.selected = [...new Set([...this.selected, ...rowValues])];\n } else {\n this.selected = this.selected.filter(value => !rowValues.includes(value));\n }\n }\n\n /**\n * Updates selected values based on row selection.\n * @param isSelected - The selection state.\n * @param selectionKey - The key identifying the selected row.\n */\n private handleRowSelection(isSelected: boolean, selectionKey: string) {\n if (isSelected) {\n this.addSelection(selectionKey);\n } else {\n this.removeSelection(selectionKey);\n }\n }\n\n /**\n * Notifies about the row selection change.\n */\n private notifyRowSelectionChange() {\n this.onRowSelect(this.selected);\n }\n\n /**\n * Adds a selection key to the selected values.\n * @param selectionKey - The key to add.\n */\n private addSelection(selectionKey: string) {\n if (!this.selected.includes(selectionKey)) {\n this.selected.push(selectionKey);\n }\n }\n\n /**\n * Removes a selection key from the selected values.\n * @param selectionKey - The key to remove.\n */\n private removeSelection(selectionKey: string) {\n this.selected = this.selected.filter(value => value !== selectionKey);\n }\n\n /**\n * Gets the selection keys from all selectable table rows.\n * @returns An array of selection keys.\n */\n private getSelectedValuesFromRows(): string[] {\n return Array.from(this.tableRows)\n .filter(tableRow => !tableRow.disabled)\n .map(tableRow => tableRow.selectionKey);\n }\n\n resetScrollPosition(): void {\n const tableWrapper = this.shadowRoot?.querySelector(\".table-wrapper\");\n\n if (tableWrapper) {\n tableWrapper.scrollTo({\n behavior: \"smooth\",\n top: 0,\n });\n }\n }\n\n onSortChange(sortKey: string, sortDirection: SortDirection) {\n this._sortKey = sortKey;\n this._sortDirection = sortDirection;\n this.onSort([this.sortKey, this.sortDirection]);\n this.updateComplete.then(() => {\n this.querySelectorAll(\"bl-table-header-cell\").forEach(com => {\n (com as BlTableHeaderCell).requestUpdate();\n });\n });\n this.resetScrollPosition();\n }\n\n render(): TemplateResult {\n return html` <div class=\"table-wrapper\">\n <div class=\"table\">\n <table>\n <slot></slot>\n </table>\n </div>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blTableTag]: BlTable;\n }\n\n interface HTMLElementEventMap {\n [blSortChangeEventName]: CustomEvent<string[]>;\n [blRowSelectChangeEventName]: CustomEvent<string[]>;\n }\n}\n"],
5
+ "mappings": "uLACO,IAAMA,EAASC,sOACfC,EAAQF,ECOR,IAAMG,EAAa,WAEbC,EAAwB,UACxBC,EAA6B,gBAUrBC,EAArB,cAAqCC,CAAW,CAAhD,kCA0BE,gBAAa,GAMb,cAAW,GAMX,cAAW,GAKX,uBAAoB,GAKpB,sBAAmB,GAoCV,KAAQ,gBAA4B,CAAC,EAErC,KAAQ,SAAmB,GAE3B,KAAQ,eAAgC,GAvFjD,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAMA,IAAI,UAAqB,CACvB,OAAO,KAAK,eACd,CAEA,IAAI,SAASC,EAAiB,CAC5B,KAAK,gBAAkBA,EACvB,KAAK,eAAe,KAAK,IAAM,CAC7B,KAAK,iBAAiB,iDAAiD,EAAE,QAAQC,GAAO,CACrFA,EAAqD,cAAc,CACtE,CAAC,CACH,CAAC,CACH,CAkCA,IAAI,SAAkB,CACpB,OAAO,KAAK,QACd,CAEA,IAAI,QAAQD,EAAe,CACzB,KAAK,SAAWA,CAClB,CAMA,IAAI,eAA+B,CACjC,OAAO,KAAK,cACd,CAEA,IAAI,cAAcA,EAAsB,CACtC,KAAK,eAAiBA,C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,EA0BnB,0BAMAkB,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA/BvBnB,EAgCnB,wBAMAkB,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GArCvBnB,EAsCnB,wBAKAkB,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,qBAAsB,CAAC,GA1CzDnB,EA2CnB,iCAKAkB,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,oBAAqB,CAAC,GA/CxDnB,EAgDnB,gCAMIkB,EAAA,CADHC,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,UAAW,CAAC,GArD7CnB,EAsDf,uBAYAkB,EAAA,CADHC,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,gBAAiB,CAAC,GAjEnDnB,EAkEf,6BAWkCkB,EAAA,CAArCE,EAAMtB,CAAqB,GA7ETE,EA6EmB,sBAKKkB,EAAA,CAA1CE,EAAMrB,CAA0B,GAlFdC,EAkFwB,2BAE1BkB,EAAA,CAAhBG,EAAM,GApFYrB,EAoFF,+BAEAkB,EAAA,CAAhBG,EAAM,GAtFYrB,EAsFF,wBAEAkB,EAAA,CAAhBG,EAAM,GAxFYrB,EAwFF,8BAxFEA,EAArBkB,EAAA,CADCC,EAActB,CAAU,GACJG",
6
+ "names": ["styles", "i", "bl_table_default", "blTableTag", "blSortChangeEventName", "blRowSelectChangeEventName", "BlTable", "s", "bl_table_default", "value", "com", "_changedProperties", "isHeaderCell", "selectionKey", "tr", "isHeader", "isSelected", "rowValues", "tableRow", "_a", "tableWrapper", "sortKey", "sortDirection", "x", "__decorateClass", "e", "event", "t"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-ASB5S6J4.js";import{a as s}from"./chunk-5MOOXA2X.js";import{a as l,b as o,f as r}from"./chunk-4OT5AMS5.js";import{d as t}from"./chunk-IZ2LK5GK.js";var b=l`:host{display:table-row-group}`,m=b;var p="bl-table-body",e=class extends r{static get styles(){return[m]}connectedCallback(){super.connectedCallback(),this.closest(a)||console.warn("bl-table-body is designed to be used inside a bl-table",this)}render(){return o` <slot></slot> `}};e=t([s(p)],e);export{p as a,e as b};
2
- //# sourceMappingURL=chunk-73GEFGEG.js.map
1
+ import{a}from"./chunk-STMCW2R6.js";import{a as s}from"./chunk-5MOOXA2X.js";import{a as l,b as o,f as r}from"./chunk-4OT5AMS5.js";import{d as t}from"./chunk-IZ2LK5GK.js";var b=l`:host{display:table-row-group}`,m=b;var p="bl-table-body",e=class extends r{static get styles(){return[m]}connectedCallback(){super.connectedCallback(),this.closest(a)||console.warn("bl-table-body is designed to be used inside a bl-table",this)}render(){return o` <slot></slot> `}};e=t([s(p)],e);export{p as a,e as b};
2
+ //# sourceMappingURL=chunk-VJRVHJVZ.js.map
@@ -1,4 +1,4 @@
1
- import{a as m}from"./chunk-5HU4KWMX.js";import{a as u}from"./chunk-DINNT5P2.js";import{a as b,b as p}from"./chunk-5MOOXA2X.js";import{a as d,b as i,f as h}from"./chunk-4OT5AMS5.js";import{d as a}from"./chunk-IZ2LK5GK.js";var f=d`:host{--header-cell-width:var(--bl-table-header-cell-width, auto);--header-cell-min-width:var(--bl-table-header-cell-min-width, auto);display:table-cell;border:1px solid var(--bl-color-neutral-lighter);background-color:var(--bl-color-neutral-lightest);padding:var(--bl-size-m);font:var(--bl-font-title-3-medium);color:var(--bl-color-neutral-darker);box-sizing:border-box;vertical-align:middle;white-space:normal;width:var(--header-cell-width);min-width:var(--header-cell-min-width);background-clip:padding-box}.table-header-cell{display:flex;align-items:center}.table-header-cell.shadow-right::before{content:"";position:absolute;right:-1px;top:0;width:16px;height:100%;z-index:-1;border-right:1px solid var(--bl-color-neutral-lighter);box-shadow:8px 0 16px 0 rgb(39 49 66 / 10%)}.table-header-cell.shadow-left::before{content:"";position:absolute;left:-1px;top:0;width:16px;height:100%;z-index:-1;border-left:1px solid var(--bl-color-neutral-lighter);box-shadow:-8px 0 16px 0 rgb(39 49 66 / 10%)}bl-checkbox{margin-right:var(--bl-size-m)}.sort-icons-wrapper{all:unset;width:100%;display:flex;align-items:center;justify-content:space-between;gap:var(--bl-size-4xs);cursor:pointer}.sort-icons-wrapper:focus-visible{outline:2px solid var(--bl-color-primary);outline-offset:2px;border-radius:var(--bl-border-radius-xs)}.sort-icons-wrapper bl-icon{font-size:var(--bl-font-size-m);color:var(--bl-color-neutral-darker)}`,g=f;var x="bl-table-header-cell",r=class extends h{constructor(){super(...arguments);this.sortKey=""}static get styles(){return[g]}get _table(){return this.closest("bl-table")}get _tableRow(){return this.closest("bl-table-row")}get selectable(){var e;return this.index===0&&!!((e=this._table)!=null&&e.isSelectable(!0))}get sortable(){var e;return!!((e=this._table)!=null&&e.sortable)&&!!this.sortKey}get index(){let e=this.parentNode;return e?[...e.children].indexOf(this):-1}get checked(){var e;return!!((e=this._table)!=null&&e.isAllSelected())}get indeterminate(){var e;return!!((e=this._table)!=null&&e.isAnySelected())}get isAllUnselectedDisabled(){var e;return!!((e=this._table)!=null&&e.isAllUnselectedDisabled())}get sortDirection(){var e,t;return((e=this._table)==null?void 0:e.sortKey)===this.sortKey&&((t=this._table)==null?void 0:t.sortDirection)||""}get sortIconName(){return this.sortDirection==="asc"?"sorting_asc":this.sortDirection==="desc"?"sorting_desc":"sorting"}get shadowRight(){var e;return!!((e=this._tableRow)!=null&&e.stickyFirstColumn)&&this.index===0}get shadowLeft(){var e;return!!((e=this._tableRow)!=null&&e.stickyLastColumn)&&this.nextElementSibling===null}connectedCallback(){super.connectedCallback(),this.closest(m)||console.warn("bl-table-header-cell is designed to be used inside a bl-table-row",this)}onChange(e){var o,l;let t=(o=this.shadowRoot)==null?void 0:o.querySelector(".select-all");if(e.detail&&this.isAllUnselectedDisabled){setTimeout(()=>{var c;let s=(c=t==null?void 0:t.shadowRoot)==null?void 0:c.querySelector("input");s==null||s.click()},0);return}(l=this._table)==null||l.onSelectionChange(!0,e.detail,""),setTimeout(()=>{t.checked=this.checked,t.indeterminate=this.indeterminate})}onSort(){var t;let e="asc";this.sortDirection==="asc"?e="desc":this.sortDirection==="desc"&&(e=""),(t=this._table)==null||t.onSortChange(this.sortKey,e)}_renderCheckbox(){return this.selectable?i`<bl-checkbox
1
+ import{a as m}from"./chunk-C4DOPHMG.js";import{a as u}from"./chunk-DINNT5P2.js";import{a as b,b as p}from"./chunk-5MOOXA2X.js";import{a as d,b as i,f as h}from"./chunk-4OT5AMS5.js";import{d as a}from"./chunk-IZ2LK5GK.js";var f=d`:host{--header-cell-width:var(--bl-table-header-cell-width, auto);--header-cell-min-width:var(--bl-table-header-cell-min-width, auto);display:table-cell;border:1px solid var(--bl-color-neutral-lighter);background-color:var(--bl-color-neutral-lightest);padding:var(--bl-size-m);font:var(--bl-font-title-3-medium);color:var(--bl-color-neutral-darker);box-sizing:border-box;vertical-align:middle;white-space:normal;width:var(--header-cell-width);min-width:var(--header-cell-min-width);background-clip:padding-box}.table-header-cell{display:flex;align-items:center}.table-header-cell.shadow-right::before{content:"";position:absolute;right:-1px;top:0;width:16px;height:100%;z-index:-1;border-right:1px solid var(--bl-color-neutral-lighter);box-shadow:8px 0 16px 0 rgb(39 49 66 / 10%)}.table-header-cell.shadow-left::before{content:"";position:absolute;left:-1px;top:0;width:16px;height:100%;z-index:-1;border-left:1px solid var(--bl-color-neutral-lighter);box-shadow:-8px 0 16px 0 rgb(39 49 66 / 10%)}bl-checkbox{margin-right:var(--bl-size-m)}.sort-icons-wrapper{all:unset;width:100%;display:flex;align-items:center;justify-content:space-between;gap:var(--bl-size-4xs);cursor:pointer}.sort-icons-wrapper:focus-visible{outline:2px solid var(--bl-color-primary);outline-offset:2px;border-radius:var(--bl-border-radius-xs)}.sort-icons-wrapper bl-icon{font-size:var(--bl-font-size-m);color:var(--bl-color-neutral-darker)}`,g=f;var x="bl-table-header-cell",r=class extends h{constructor(){super(...arguments);this.sortKey=""}static get styles(){return[g]}get _table(){return this.closest("bl-table")}get _tableRow(){return this.closest("bl-table-row")}get selectable(){var e;return this.index===0&&!!((e=this._table)!=null&&e.isSelectable(!0))}get sortable(){var e;return!!((e=this._table)!=null&&e.sortable)&&!!this.sortKey}get index(){let e=this.parentNode;return e?[...e.children].indexOf(this):-1}get checked(){var e;return!!((e=this._table)!=null&&e.isAllSelected())}get indeterminate(){var e;return!!((e=this._table)!=null&&e.isAnySelected())}get isAllUnselectedDisabled(){var e;return!!((e=this._table)!=null&&e.isAllUnselectedDisabled())}get sortDirection(){var e,t;return((e=this._table)==null?void 0:e.sortKey)===this.sortKey&&((t=this._table)==null?void 0:t.sortDirection)||""}get sortIconName(){return this.sortDirection==="asc"?"sorting_asc":this.sortDirection==="desc"?"sorting_desc":"sorting"}get shadowRight(){var e;return!!((e=this._tableRow)!=null&&e.stickyFirstColumn)&&this.index===0}get shadowLeft(){var e;return!!((e=this._tableRow)!=null&&e.stickyLastColumn)&&this.nextElementSibling===null}connectedCallback(){super.connectedCallback(),this.closest(m)||console.warn("bl-table-header-cell is designed to be used inside a bl-table-row",this)}onChange(e){var o,l;let t=(o=this.shadowRoot)==null?void 0:o.querySelector(".select-all");if(e.detail&&this.isAllUnselectedDisabled){setTimeout(()=>{var c;let s=(c=t==null?void 0:t.shadowRoot)==null?void 0:c.querySelector("input");s==null||s.click()},0);return}(l=this._table)==null||l.onSelectionChange(!0,e.detail,""),setTimeout(()=>{t.checked=this.checked,t.indeterminate=this.indeterminate})}onSort(){var t;let e="asc";this.sortDirection==="asc"?e="desc":this.sortDirection==="desc"&&(e=""),(t=this._table)==null||t.onSortChange(this.sortKey,e)}_renderCheckbox(){return this.selectable?i`<bl-checkbox
2
2
  class="select-all"
3
3
  value="all"
4
4
  .indeterminate="${this.indeterminate}"
@@ -13,4 +13,4 @@ import{a as m}from"./chunk-5HU4KWMX.js";import{a as u}from"./chunk-DINNT5P2.js";
13
13
  </button>`:i` <slot></slot>`;return i`<div class="table-header-cell ${o}" aria-sort=${u(n)}>
14
14
  ${this._renderCheckbox()} ${l}
15
15
  </div> `}};a([p({type:String,reflect:!0,attribute:"sort-key"})],r.prototype,"sortKey",2),r=a([b(x)],r);export{x as a,r as b};
16
- //# sourceMappingURL=chunk-X2XFV2S3.js.map
16
+ //# sourceMappingURL=chunk-Y7B25ZG3.js.map
@@ -75,7 +75,7 @@ export default class BlTable extends LitElement {
75
75
  */
76
76
  onSelectionChange(isHeader: boolean | undefined, isSelected: boolean, selectionKey: string): void;
77
77
  /**
78
- * Updates selected values based on header selection.
78
+ * Updates selected values based on header selection for currently rendered rows.
79
79
  * @param isSelected - The selection state.
80
80
  */
81
81
  private handleHeaderSelection;
@@ -1 +1 @@
1
- {"version":3,"file":"bl-table.d.ts","sourceRoot":"","sources":["../../../src/components/table/bl-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAEvF,OAAO,4BAA4B,CAAC;AAKpC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAElD,eAAO,MAAM,UAAU,aAAa,CAAC;AAErC,eAAO,MAAM,qBAAqB,YAAY,CAAC;AAC/C,eAAO,MAAM,0BAA0B,kBAAkB,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,EAAE,CAAC;AAEhD;;;;GAIG;AAEH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,UAAU;IAC7C,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED;;OAEG;IACH,IACI,QAAQ,IAAI,MAAM,EAAE,CAEvB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,EAO3B;IAED;;OAEG;IAEH,UAAU,UAAS;IAEnB;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,QAAQ,UAAS;IACjB;;OAEG;IAEH,iBAAiB,UAAS;IAC1B;;OAEG;IAEH,gBAAgB,UAAS;IAEzB;;OAEG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B,OAAO,CAAC,cAAc,CAAqB;IAEpD,SAAS,CAAC,OAAO,CAAC,kBAAkB,EAAE,cAAc;IAcpD,IAAI,SAAS,2BAEZ;IAED,mBAAmB;IAInB,kBAAkB;IAIlB,YAAY,CAAC,YAAY,UAAQ;IAIjC,aAAa,CAAC,YAAY,EAAE,MAAM;IAIlC,aAAa;IAIb,aAAa;IAOb,uBAAuB;IAMvB;;;;;OAKG;IACH,iBAAiB,CAAC,QAAQ,qBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM;IAUtF;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAU7B;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAQ1B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAIhC;;;OAGG;IACH,OAAO,CAAC,YAAY;IAMpB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAIvB;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IAMjC,mBAAmB,IAAI,IAAI;IAW3B,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa;IAY1D,MAAM,IAAI,cAAc;CASzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;KACvB;IAED,UAAU,mBAAmB;QAC3B,CAAC,qBAAqB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;QAC/C,CAAC,0BAA0B,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;KACrD;CACF"}
@@ -1,2 +1,2 @@
1
- import{a,b,c,d}from"../../chunk-ASB5S6J4.js";import"../../chunk-HZ6A5QFC.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{c as blRowSelectChangeEventName,b as blSortChangeEventName,a as blTableTag,d as default};
1
+ import{a,b,c,d}from"../../chunk-STMCW2R6.js";import"../../chunk-HZ6A5QFC.js";import"../../chunk-GRL4DWKG.js";import"../../chunk-5MOOXA2X.js";import"../../chunk-4OT5AMS5.js";import"../../chunk-IZ2LK5GK.js";export{c as blRowSelectChangeEventName,b as blSortChangeEventName,a as blTableTag,d as default};
2
2
  //# sourceMappingURL=bl-table.js.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"../../../chunk-73GEFGEG.js";import"../../../chunk-ASB5S6J4.js";import"../../../chunk-HZ6A5QFC.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableBodyTag,b as default};
1
+ import{a,b}from"../../../chunk-VJRVHJVZ.js";import"../../../chunk-STMCW2R6.js";import"../../../chunk-HZ6A5QFC.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableBodyTag,b as default};
2
2
  //# sourceMappingURL=bl-table-body.js.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"../../../chunk-D5MPTIGC.js";import"../../../chunk-5HU4KWMX.js";import"../../../chunk-73GEFGEG.js";import"../../../chunk-LIW32ZGE.js";import"../../../chunk-ASB5S6J4.js";import"../../../chunk-TRWCD65K.js";import"../../../chunk-EG7U7PM3.js";import"../../../chunk-XDUIVR6I.js";import"../../../chunk-HZ6A5QFC.js";import"../../../chunk-AYJMIZZ3.js";import"../../../chunk-6LT7O7T2.js";import"../../../chunk-DINNT5P2.js";import"../../../chunk-HYB2HRRX.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableCellTag,b as default};
1
+ import{a,b}from"../../../chunk-KPWKBI57.js";import"../../../chunk-C4DOPHMG.js";import"../../../chunk-VJRVHJVZ.js";import"../../../chunk-DIS2PGBH.js";import"../../../chunk-STMCW2R6.js";import"../../../chunk-TRWCD65K.js";import"../../../chunk-EG7U7PM3.js";import"../../../chunk-XDUIVR6I.js";import"../../../chunk-HZ6A5QFC.js";import"../../../chunk-AYJMIZZ3.js";import"../../../chunk-6LT7O7T2.js";import"../../../chunk-DINNT5P2.js";import"../../../chunk-HYB2HRRX.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableCellTag,b as default};
2
2
  //# sourceMappingURL=bl-table-cell.js.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"../../../chunk-LIW32ZGE.js";import"../../../chunk-ASB5S6J4.js";import"../../../chunk-HZ6A5QFC.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableHeaderTag,b as default};
1
+ import{a,b}from"../../../chunk-DIS2PGBH.js";import"../../../chunk-STMCW2R6.js";import"../../../chunk-HZ6A5QFC.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableHeaderTag,b as default};
2
2
  //# sourceMappingURL=bl-table-header.js.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"../../../chunk-X2XFV2S3.js";import"../../../chunk-5HU4KWMX.js";import"../../../chunk-73GEFGEG.js";import"../../../chunk-LIW32ZGE.js";import"../../../chunk-ASB5S6J4.js";import"../../../chunk-TRWCD65K.js";import"../../../chunk-EG7U7PM3.js";import"../../../chunk-XDUIVR6I.js";import"../../../chunk-HZ6A5QFC.js";import"../../../chunk-AYJMIZZ3.js";import"../../../chunk-6LT7O7T2.js";import"../../../chunk-DINNT5P2.js";import"../../../chunk-HYB2HRRX.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableHeaderCellTag,b as default};
1
+ import{a,b}from"../../../chunk-Y7B25ZG3.js";import"../../../chunk-C4DOPHMG.js";import"../../../chunk-VJRVHJVZ.js";import"../../../chunk-DIS2PGBH.js";import"../../../chunk-STMCW2R6.js";import"../../../chunk-TRWCD65K.js";import"../../../chunk-EG7U7PM3.js";import"../../../chunk-XDUIVR6I.js";import"../../../chunk-HZ6A5QFC.js";import"../../../chunk-AYJMIZZ3.js";import"../../../chunk-6LT7O7T2.js";import"../../../chunk-DINNT5P2.js";import"../../../chunk-HYB2HRRX.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableHeaderCellTag,b as default};
2
2
  //# sourceMappingURL=bl-table-header-cell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bl-table-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-row/bl-table-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,4BAA4B,CAAC;AACpC,OAAO,2CAA2C,CAAC;AASnD,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C;;;GAGG;AAEH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,UAAU;IAChD,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED;;OAEG;IAEH,YAAY,EAAE,MAAM,CAAM;IAE1B,iBAAiB,IAAI,IAAI;IAazB,OAAO,CAAC,kBAAkB,EAAE,cAAc;IA2B1C,OAAO,KAAK,MAAM,GAEjB;IAED,OAAO,KAAK,eAAe,GAE1B;IACD,IAAI,QAAQ,YAEX;IAED,IAAI,OAAO,YAEV;IAED,IAAI,iBAAiB,YAEpB;IAED,IAAI,gBAAgB,YAEnB;IAED,MAAM,IAAI,cAAc;CAGzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC;KAC7B;CACF"}
1
+ {"version":3,"file":"bl-table-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-row/bl-table-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,4BAA4B,CAAC;AACpC,OAAO,2CAA2C,CAAC;AASnD,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C;;;GAGG;AAEH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,UAAU;IAChD,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED;;OAEG;IAEH,YAAY,EAAE,MAAM,CAAM;IAE1B,iBAAiB,IAAI,IAAI;IAazB,OAAO,CAAC,kBAAkB,EAAE,cAAc;IA+B1C,OAAO,KAAK,MAAM,GAEjB;IAED,OAAO,KAAK,eAAe,GAE1B;IACD,IAAI,QAAQ,YAEX;IAED,IAAI,OAAO,YAEV;IAED,IAAI,iBAAiB,YAEpB;IAED,IAAI,gBAAgB,YAEnB;IAED,MAAM,IAAI,cAAc;CAGzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC;KAC7B;CACF"}
@@ -1,2 +1,2 @@
1
- import{a,b}from"../../../chunk-5HU4KWMX.js";import"../../../chunk-73GEFGEG.js";import"../../../chunk-LIW32ZGE.js";import"../../../chunk-ASB5S6J4.js";import"../../../chunk-TRWCD65K.js";import"../../../chunk-EG7U7PM3.js";import"../../../chunk-XDUIVR6I.js";import"../../../chunk-HZ6A5QFC.js";import"../../../chunk-AYJMIZZ3.js";import"../../../chunk-6LT7O7T2.js";import"../../../chunk-DINNT5P2.js";import"../../../chunk-HYB2HRRX.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableRowTag,b as default};
1
+ import{a,b}from"../../../chunk-C4DOPHMG.js";import"../../../chunk-VJRVHJVZ.js";import"../../../chunk-DIS2PGBH.js";import"../../../chunk-STMCW2R6.js";import"../../../chunk-TRWCD65K.js";import"../../../chunk-EG7U7PM3.js";import"../../../chunk-XDUIVR6I.js";import"../../../chunk-HZ6A5QFC.js";import"../../../chunk-AYJMIZZ3.js";import"../../../chunk-6LT7O7T2.js";import"../../../chunk-DINNT5P2.js";import"../../../chunk-HYB2HRRX.js";import"../../../chunk-GRL4DWKG.js";import"../../../chunk-3USCFSFQ.js";import"../../../chunk-7GK5LKBV.js";import"../../../chunk-5MOOXA2X.js";import"../../../chunk-4OT5AMS5.js";import"../../../chunk-IZ2LK5GK.js";export{a as blTableRowTag,b as default};
2
2
  //# sourceMappingURL=bl-table-row.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@trendyol/baklava",
3
3
  "type": "module",
4
- "version": "3.0.0-beta.30",
4
+ "version": "3.0.0-beta.31",
5
5
  "description": "Trendyol Baklava Design System",
6
6
  "main": "dist/baklava.js",
7
7
  "module": "dist/baklava.js",
@@ -1,2 +0,0 @@
1
- import{a as b}from"./chunk-73GEFGEG.js";import{a as d}from"./chunk-LIW32ZGE.js";import{a as i,b as a}from"./chunk-5MOOXA2X.js";import{a as s,b as r,f as o}from"./chunk-4OT5AMS5.js";import{d as l}from"./chunk-IZ2LK5GK.js";var n=s`:host{display:table-row}:host([checked]),:host([checked]) ::slotted(bl-table-cell){background-color:var(--bl-color-primary-contrast)}:host([disabled]),:host([disabled]) ::slotted(bl-table-cell){background-color:var(--bl-color-neutral-lightest);color:var(--bl-color-neutral-light)}:host(:not([checked], [disabled]).__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__),:host(:not([checked], [disabled]):hover) ::slotted(bl-table-cell),:host(:not([checked], [disabled]):hover),:host(:not([checked], [disabled]):hover) ::slotted(bl-table-cell){background-color:var(--bl-color-tertiary-background)}:host ::slotted(*:first-child){border-left:none}:host ::slotted(*:last-child){border-right:none}:host(:first-child) ::slotted(bl-table-header-cell){border-top:none;border-right:none}:host(:first-child) ::slotted(bl-table-header-cell:first-child){border-top-left-radius:var(--bl-size-3xs)}:host(:first-child) ::slotted(bl-table-header-cell:last-child){border-top-right-radius:var(--bl-size-3xs);border-right:1px}:host(:last-child) ::slotted(bl-table-cell){border-bottom:none}:host(:first-child) ::slotted(bl-table-cell){border-top:none}:host(:last-child) ::slotted(bl-table-cell:first-child){border-bottom-left-radius:var(--bl-size-3xs)}:host(:last-child) ::slotted(bl-table-cell:last-child){border-bottom-right-radius:var(--bl-size-3xs)}:host([sticky-first-column]) ::slotted(bl-table-header-cell:first-child),:host([sticky-first-column]) ::slotted(bl-table-cell:first-child){position:sticky;z-index:2;left:0}:host([sticky-last-column]) ::slotted(bl-table-header-cell:last-child),:host([sticky-last-column]) ::slotted(bl-table-cell:last-child){position:sticky;z-index:2;right:0}`,c=n;var u="bl-table-row",e=class extends o{constructor(){super(...arguments);this.selectionKey=""}static get styles(){return[c]}connectedCallback(){super.connectedCallback(),!this.closest(d)&&!this.closest(b)&&console.warn("bl-table-row is designed to be used inside a bl-table-header or bl-table-body",this)}updated(t){super.updated(t),this.removeAttribute("checked"),this.removeAttribute("disabled"),this.removeAttribute("sticky-first-column"),this.removeAttribute("sticky-last-column"),this.stickyFirstColumn&&this.setAttribute("sticky-first-column","true"),this.stickyLastColumn&&this.setAttribute("sticky-last-column","true"),this.checked?this.setAttribute("checked","true"):this.disabled&&this.setAttribute("disabled","true"),t.has("selectionKey")&&this.updateComplete.then(()=>{Array.from(this.querySelectorAll("bl-table-header-cell,bl-table-cell")).map(h=>{h.requestUpdate()})})}get _table(){return this.closest("bl-table")}get _firstTableCell(){return this.querySelector("bl-table-cell")}get disabled(){var t;return!!((t=this._firstTableCell)!=null&&t.disabled)}get checked(){var t;return!!((t=this._table)!=null&&t.isRowSelected(this.selectionKey))}get stickyFirstColumn(){var t;return!!((t=this._table)!=null&&t.isFirstColumnSticky())}get stickyLastColumn(){var t;return!!((t=this._table)!=null&&t.isLastColumnSticky())}render(){return r`<slot></slot>`}};l([a({type:String,reflect:!0,attribute:"selection-key"})],e.prototype,"selectionKey",2),e=l([i(u)],e);export{u as a,e as b};
2
- //# sourceMappingURL=chunk-5HU4KWMX.js.map
@@ -1,8 +0,0 @@
1
- import{a}from"./chunk-GRL4DWKG.js";import{a as u,b as s,c as o}from"./chunk-5MOOXA2X.js";import{a as n,b as c,f as h}from"./chunk-4OT5AMS5.js";import{d as r}from"./chunk-IZ2LK5GK.js";var p=n`:host{display:block;height:100%}.table-wrapper{overflow:auto;border:1px solid var(--bl-color-neutral-lighter);border-radius:var(--bl-size-3xs);position:relative;max-height:100%}.table{width:100%;display:table;border-spacing:0}`,d=p;var b="bl-table",m="bl-sort",y="bl-row-select",t=class extends h{constructor(){super(...arguments);this.selectable=!1;this.multiple=!1;this.sortable=!1;this.stickyFirstColumn=!1;this.stickyLastColumn=!1;this._selectedValues=[];this._sortKey="";this._sortDirection=""}static get styles(){return[d]}get selected(){return this._selectedValues}set selected(e){this._selectedValues=e,this.updateComplete.then(()=>{this.querySelectorAll("bl-table-header-cell,bl-table-cell,bl-table-row").forEach(l=>{l.requestUpdate()})})}get sortKey(){return this._sortKey}set sortKey(e){this._sortKey=e}get sortDirection(){return this._sortDirection}set sortDirection(e){this._sortDirection=e}updated(e){(e.has("selectable")||e.has("multiple")||e.has("stickyFirstColumn")||e.has("stickyLastColumn")||e.has("sortable"))&&this.querySelectorAll("bl-table-header-cell,bl-table-cell,bl-table-row").forEach(l=>{l.requestUpdate()})}get tableRows(){return this.querySelectorAll("bl-table-body bl-table-row")}isFirstColumnSticky(){return this.stickyFirstColumn}isLastColumnSticky(){return this.stickyLastColumn}isSelectable(e=!1){return e?this.multiple&&this.selectable:this.selectable}isRowSelected(e){return this.selected.includes(e)}isAllSelected(){return Array.from(this.tableRows).every(e=>this.selected.includes(e.selectionKey))}isAnySelected(){return!this.isAllSelected()&&Array.from(this.tableRows).some(e=>!e.disabled&&this.selected.includes(e.selectionKey))}isAllUnselectedDisabled(){return Array.from(this.tableRows).filter(e=>!this.selected.includes(e.selectionKey)).every(e=>e.disabled)}onSelectionChange(e=!1,l,i){e?this.handleHeaderSelection(l):this.handleRowSelection(l,i),this.notifyRowSelectionChange()}handleHeaderSelection(e){this.selected=e?this.getSelectedValuesFromRows():[]}handleRowSelection(e,l){e?this.addSelection(l):this.removeSelection(l)}notifyRowSelectionChange(){this.onRowSelect(this.selected)}addSelection(e){this.selected.includes(e)||this.selected.push(e)}removeSelection(e){this.selected=this.selected.filter(l=>l!==e)}getSelectedValuesFromRows(){return Array.from(this.tableRows).filter(e=>!e.disabled).map(e=>e.selectionKey)}resetScrollPosition(){var l;let e=(l=this.shadowRoot)==null?void 0:l.querySelector(".table-wrapper");e&&e.scrollTo({behavior:"smooth",top:0})}onSortChange(e,l){this._sortKey=e,this._sortDirection=l,this.onSort([this.sortKey,this.sortDirection]),this.updateComplete.then(()=>{this.querySelectorAll("bl-table-header-cell").forEach(i=>{i.requestUpdate()})}),this.resetScrollPosition()}render(){return c` <div class="table-wrapper">
2
- <div class="table">
3
- <table>
4
- <slot></slot>
5
- </table>
6
- </div>
7
- </div>`}};r([s({type:Array,reflect:!0,attribute:"selected"})],t.prototype,"selected",1),r([s({type:Boolean,reflect:!0})],t.prototype,"selectable",2),r([s({type:Boolean,reflect:!0})],t.prototype,"multiple",2),r([s({type:Boolean,reflect:!0})],t.prototype,"sortable",2),r([s({type:Boolean,reflect:!0,attribute:"sticky-first-column"})],t.prototype,"stickyFirstColumn",2),r([s({type:Boolean,reflect:!0,attribute:"sticky-last-column"})],t.prototype,"stickyLastColumn",2),r([s({type:String,reflect:!0,attribute:"sort-key"})],t.prototype,"sortKey",1),r([s({type:String,reflect:!0,attribute:"sort-direction"})],t.prototype,"sortDirection",1),r([a(m)],t.prototype,"onSort",2),r([a(y)],t.prototype,"onRowSelect",2),r([o()],t.prototype,"_selectedValues",2),r([o()],t.prototype,"_sortKey",2),r([o()],t.prototype,"_sortDirection",2),t=r([u(b)],t);export{b as a,m as b,y as c,t as d};
8
- //# sourceMappingURL=chunk-ASB5S6J4.js.map