@blueprintui/grid 2.3.0 → 2.4.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [@blueprintui/grid-v2.4.1](https://github.com/blueprintui/blueprintui/compare/@blueprintui/grid-v2.4.0...@blueprintui/grid-v2.4.1) (2025-10-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **grid:** scroll styles ([5261052](https://github.com/blueprintui/blueprintui/commit/526105299c5b77ad671141c53bd2269cd0490235))
7
+
8
+ # [@blueprintui/grid-v2.4.0](https://github.com/blueprintui/blueprintui/compare/@blueprintui/grid-v2.3.0...@blueprintui/grid-v2.4.0) (2025-06-08)
9
+
10
+
11
+ ### Features
12
+
13
+ * **components:** add page and panel components ([0ad25b3](https://github.com/blueprintui/blueprintui/commit/0ad25b36232ea1d2cac064eaab11561c8543e2fb))
14
+
1
15
  # [@blueprintui/grid-v2.3.0](https://github.com/blueprintui/blueprintui/compare/@blueprintui/grid-v2.2.1...@blueprintui/grid-v2.3.0) (2025-05-20)
2
16
 
3
17
 
@@ -1 +1 @@
1
- import{attachInternals as t}from"@blueprintui/components/internals";class n{#t;get#n(){const t=this.host.parentElement.parentElement.grid,n=t[0].indexOf(this.host);return this.host.ariaColSpan?[this.host]:t.slice(0).map((t=>t[n]))}constructor(t){this.host=t,this.host.addController(this)}hostConnected(){t(this.host),this.#s()}hostUpdated(){this.#s()}#s(){this.host.alignment!==this.#t&&(this.#n.forEach((t=>{s(t),this.host.alignment&&t._internals.states.add("alignment-"+this.host.alignment)})),this.#t=this.host.alignment)}}function s(t){t._internals.states.delete("alignment-start"),t._internals.states.delete("alignment-center"),t._internals.states.delete("alignment-end")}export{n as ColumnAlignmentController,s as resetAlignmentState};
1
+ import{attachInternals as t}from"@blueprintui/components/internals";class n{#t;get#n(){const t=this.host.parentElement.parentElement.grid,n=t[0].indexOf(this.host);return this.host.ariaColSpan?[this.host]:t.slice(0).map(t=>t[n])}constructor(t){this.host=t,this.host.addController(this)}hostConnected(){t(this.host),this.#s()}hostUpdated(){this.#s()}#s(){this.host.alignment!==this.#t&&(this.#n.forEach(t=>{s(t),this.host.alignment&&t._internals.states.add("alignment-"+this.host.alignment)}),this.#t=this.host.alignment)}}function s(t){t._internals.states.delete("alignment-start"),t._internals.states.delete("alignment-center"),t._internals.states.delete("alignment-end")}export{n as ColumnAlignmentController,s as resetAlignmentState};
@@ -1 +1 @@
1
- import{__decorate as t}from"tslib";import{LitElement as r,html as e}from"lit";import{property as o}from"lit/decorators/property.js";import{baseStyles as i,dynamicControllers as s}from"@blueprintui/components/internals";import n from"../internals/styles/focus.css.js";import{GridColumnWidthController as l}from"./width.controller.js";import p from"./element.css.js";let a=class extends r{static{this.styles=[i,p,n]}render(){return e`<div role="group" part="internal" focusable><slot> </slot><slot name="resize"><div class="border"></div></slot><div class="line"></div></div>`}constructor(){super(),this._internals=this.attachInternals(),new l(this),this._internals.role="columnheader",this._internals.ariaSort="none"}};t([o({type:String})],a.prototype,"width",void 0),t([o({type:String,reflect:!0})],a.prototype,"position",void 0),t([o({type:String,reflect:!0})],a.prototype,"alignment",void 0),a=t([s()],a);export{a as BpGridColumn};
1
+ import{__decorate as t}from"tslib";import{LitElement as r,html as s}from"lit";import{baseStyles as e,dynamicControllers as i}from"@blueprintui/components/internals";import n from"../internals/styles/focus.css.js";import{GridColumnWidthController as o}from"./width.controller.js";import l from"./element.css.js";let a=class extends r{static{this.properties={width:{type:String},position:{type:String,reflect:!0},alignment:{type:String,reflect:!0}}}static{this.styles=[e,l,n]}render(){return s`<div role="group" part="internal" focusable><slot> </slot><slot name="resize"><div class="border"></div></slot><div class="line"></div></div>`}constructor(){super(),this._internals=this.attachInternals(),new o(this),this._internals.role="columnheader",this._internals.ariaSort="none"}};a=t([i()],a);export{a as BpGridColumn};
@@ -1 +1 @@
1
- import{isNumericString as t}from"@blueprintui/components/internals";class s{#t;constructor(t){this.host=t,this.host.addController(this)}async hostConnected(){await this.host.updateComplete,this.#t=this.host.parentElement.parentElement,this.#s()}async hostUpdated(){await this.host.updateComplete,this.#s()}async#s(){if(await new Promise((t=>setTimeout(t,0))),"max-content"===this.host.width){const t=this.#t.grid[0].indexOf(this.host),s=this.#t.grid[1][t],{width:i}=getComputedStyle(s);this.#t.style.setProperty("--ch"+(t+1),i)}else if(this.host.width){const s=t(this.host.width)?this.host.width+"px":this.host.width;this.#t.style.setProperty("--ch"+this.host.ariaColIndex,s)}}}export{s as GridColumnWidthController};
1
+ import{isNumericString as t}from"@blueprintui/components/internals";class s{#t;constructor(t){this.host=t,this.host.addController(this)}async hostConnected(){await this.host.updateComplete,this.#t=this.host.parentElement.parentElement,this.#s()}async hostUpdated(){await this.host.updateComplete,this.#s()}async#s(){if(await new Promise(t=>setTimeout(t,0)),"max-content"===this.host.width){const t=this.#t.grid[0].indexOf(this.host),s=this.#t.grid[1][t],{width:i}=getComputedStyle(s);this.#t.style.setProperty("--ch"+(t+1),i)}else if(this.host.width){const s=t(this.host.width)?this.host.width+"px":this.host.width;this.#t.style.setProperty("--ch"+this.host.ariaColIndex,s)}}}export{s as GridColumnWidthController};
@@ -1 +1 @@
1
- import{InteractionResizeContextController as t}from"@blueprintui/components/internals";class e extends t{constructor(t){super(t,(()=>({resizer:this.host?.querySelector("bp-button-resize"),max:parseInt(getComputedStyle(this.host.parentElement.parentElement).width)}))),this.host.addEventListener("resize-input",(t=>{this.host.parentElement.parentElement.style.setProperty("--ch"+this.host.ariaColIndex,t.detail+"px")}))}}export{e as GridColumnResizeController};
1
+ import{InteractionResizeContextController as t}from"@blueprintui/components/internals";class e extends t{constructor(t){super(t,()=>({resizer:this.host?.querySelector("bp-button-resize"),max:parseInt(getComputedStyle(this.host.parentElement.parentElement).width)})),this.host.addEventListener("resize-input",t=>{this.host.parentElement.parentElement.style.setProperty("--ch"+this.host.ariaColIndex,t.detail+"px")})}}export{e as GridColumnResizeController};
@@ -1 +1 @@
1
- class t{#t;constructor(t){this.host=t,this.host.addController(this)}hostConnected(){this.#e(),this.#s()}hostDisconnected(){this.#t.disconnect()}#e(){this.#t=new MutationObserver((t=>{t.filter((t=>"attributes"===t.type&&"aria-colspan"===t.attributeName)).forEach((t=>this.#o(t.target)))})),this.#t.observe(this.host,{characterData:!1,attributes:!0,childList:!0,subtree:!0})}#s(){[...this.host.gridLayoutControllerConfig.columns,...this.host.cells].forEach((t=>this.#o(t)))}#o(t){t.ariaColSpan&&(t.style.gridColumnEnd="span "+t.ariaColSpan)}}export{t as ColumnSpanController};
1
+ class t{#t;constructor(t){this.host=t,this.host.addController(this)}hostConnected(){this.#e(),this.#s()}hostDisconnected(){this.#t.disconnect()}#e(){this.#t=new MutationObserver(t=>{t.filter(t=>"attributes"===t.type&&"aria-colspan"===t.attributeName).forEach(t=>this.#o(t.target))}),this.#t.observe(this.host,{characterData:!1,attributes:!0,childList:!0,subtree:!0})}#s(){[...this.host.gridLayoutControllerConfig.columns,...this.host.cells].forEach(t=>this.#o(t))}#o(t){t.ariaColSpan&&(t.style.gridColumnEnd="span "+t.ariaColSpan)}}export{t as ColumnSpanController};
package/dist/csv/index.js CHANGED
@@ -1 +1 @@
1
- function t(t){return""+t.grid.map((t=>t.map((t=>`${t.textContent}${t.querySelector("input")?.value??""}`)))).map((t=>""+t.map((t=>t.trim())).join(","))).join("\n")}function n(n){const e=document.createElement("a");e.href="data:application/octet-stream,"+encodeURIComponent(t(n)),e.download="download.csv",e.click()}export{n as downloadCSV,t as exportCSV};
1
+ function t(t){return""+t.grid.map(t=>t.map(t=>`${t.textContent}${t.querySelector("input")?.value??""}`)).map(t=>""+t.map(t=>t.trim()).join(",")).join("\n")}function n(n){const e=document.createElement("a");e.href="data:application/octet-stream,"+encodeURIComponent(t(n)),e.download="download.csv",e.click()}export{n as downloadCSV,t as exportCSV};
@@ -77,7 +77,10 @@
77
77
  "package": "lit"
78
78
  },
79
79
  "tagName": "bp-grid-cell",
80
- "customElement": true
80
+ "customElement": true,
81
+ "metadata": {
82
+ "since": "1.0.0"
83
+ }
81
84
  }
82
85
  ],
83
86
  "exports": [
@@ -450,7 +453,10 @@
450
453
  "package": "lit"
451
454
  },
452
455
  "tagName": "bp-grid-column",
453
- "customElement": true
456
+ "customElement": true,
457
+ "metadata": {
458
+ "since": "1.0.0"
459
+ }
454
460
  }
455
461
  ],
456
462
  "exports": [
@@ -847,7 +853,10 @@
847
853
  "package": "lit"
848
854
  },
849
855
  "tagName": "bp-grid-detail",
850
- "customElement": true
856
+ "customElement": true,
857
+ "metadata": {
858
+ "since": "1.0.0"
859
+ }
851
860
  }
852
861
  ],
853
862
  "exports": [
@@ -1037,7 +1046,10 @@
1037
1046
  "package": "lit"
1038
1047
  },
1039
1048
  "tagName": "bp-grid-footer",
1040
- "customElement": true
1049
+ "customElement": true,
1050
+ "metadata": {
1051
+ "since": "1.0.0"
1052
+ }
1041
1053
  }
1042
1054
  ],
1043
1055
  "exports": [
@@ -1226,12 +1238,6 @@
1226
1238
  {
1227
1239
  "name": "--body-height"
1228
1240
  },
1229
- {
1230
- "name": "--scrollbar-background"
1231
- },
1232
- {
1233
- "name": "--scrollbar-thumb-background"
1234
- },
1235
1241
  {
1236
1242
  "name": "--column-height"
1237
1243
  },
@@ -1543,7 +1549,10 @@
1543
1549
  "package": "lit"
1544
1550
  },
1545
1551
  "tagName": "bp-grid",
1546
- "customElement": true
1552
+ "customElement": true,
1553
+ "metadata": {
1554
+ "since": "1.0.0"
1555
+ }
1547
1556
  }
1548
1557
  ],
1549
1558
  "exports": [
@@ -1795,7 +1804,10 @@
1795
1804
  "package": "lit"
1796
1805
  },
1797
1806
  "tagName": "bp-grid-header",
1798
- "customElement": true
1807
+ "customElement": true,
1808
+ "metadata": {
1809
+ "since": "1.0.0"
1810
+ }
1799
1811
  }
1800
1812
  ],
1801
1813
  "exports": [
@@ -2439,7 +2451,10 @@
2439
2451
  "package": "lit"
2440
2452
  },
2441
2453
  "tagName": "bp-grid-placeholder",
2442
- "customElement": true
2454
+ "customElement": true,
2455
+ "metadata": {
2456
+ "since": "1.0.0"
2457
+ }
2443
2458
  }
2444
2459
  ],
2445
2460
  "exports": [
@@ -2591,7 +2606,10 @@
2591
2606
  "package": "lit"
2592
2607
  },
2593
2608
  "tagName": "bp-grid-row",
2594
- "customElement": true
2609
+ "customElement": true,
2610
+ "metadata": {
2611
+ "since": "1.0.0"
2612
+ }
2595
2613
  }
2596
2614
  ],
2597
2615
  "exports": [
@@ -1 +1 @@
1
- import{__decorate as t}from"tslib";import{LitElement as e,html as i,nothing as r}from"lit";import{property as s}from"lit/decorators/property.js";import{I18nService as o,baseStyles as n,typePopover as l,i18n as a,stateDirection as g,interactionResponsive as p}from"@blueprintui/components/internals";import d from"./element.css.js";let h=class extends e{constructor(){super(...arguments),this.i18n=o.keys.actions,this.position="inline-end"}get#t(){return this.parentElement}#e;get#i(){return"string"==typeof this.trigger?this.getRootNode().querySelector("#"+this.trigger):this.trigger}get#r(){return this.#i?.closest("bp-grid-row")}get#s(){return parseInt(getComputedStyle(this).getPropertyValue("--full-width-breakpoint"))}static{this.styles=[n,d]}render(){return i`<div part="internal" role="presentation">${this.closable?i`<bp-button-icon @click="${this.hidePopover}" aria-label="${this.i18n.close}" shape="close" action="flat" type="button"></bp-button-icon>`:r}<slot></slot></div>${this.trigger?i`<div part="pointer" role="presentation"></div>`:r}`}async connectedCallback(){super.connectedCallback(),this.slot="detail",this.#o()}firstUpdated(t){super.firstUpdated(t),this.#n(),this.addEventListener("toggle",(t=>{"open"===t.newState&&this.#n()}))}async updated(t){super.updated(t),await this.updateComplete,t.has("trigger")&&t.get("trigger")!==this.#i&&!this.hidden&&this.#l(t.get("trigger"))}disconnectedCallback(){super.disconnectedCallback(),this.#e.disconnect()}#l(t){t?.closest&&t?.closest("bp-grid-row")?.removeAttribute("_detail-row");const e=this.#i?.getBoundingClientRect()?.top-this.getBoundingClientRect().top;this.style.setProperty("--pointer-top",e-2+"px")}#o(){this.addEventListener("resize-layout",(t=>{t.detail.width<this.#s?this.setAttribute("full-width",""):t.detail.width>this.#s+parseInt(this.style.insetInlineStart)&&(this.removeAttribute("full-width"),this.#n())}))}async#n(){this.#t.scrollLock=!this.hidden,await this.updateComplete;const t=Array.from(this.#r?this.#r.querySelectorAll("bp-grid-cell"):[]).find((t=>"rowheader"===t.role));if(t){const e=this.#t?.getBoundingClientRect(),i=t.getBoundingClientRect();this.style.width="auto","inline-start"===this.position||"rtl"===this.#t?.getAttribute("dir")?this.style.insetInlineStart=Math.floor(e.right-i.left)+"px":this.style.insetInlineStart=Math.floor(i.right-e.left)+"px"}}};t([s({type:Object})],h.prototype,"i18n",void 0),t([s({type:String,reflect:!0})],h.prototype,"position",void 0),t([s({type:String})],h.prototype,"trigger",void 0),t([s({type:Boolean})],h.prototype,"closable",void 0),h=t([l((()=>({focusTrap:!0}))),a({key:"actions"}),g(),p()],h);export{h as BpGridDetail};
1
+ import{__decorate as t}from"tslib";import{LitElement as e,html as i,nothing as r}from"lit";import{I18nService as s,baseStyles as n,typePopover as o,i18n as l,stateDirection as a,interactionResponsive as g}from"@blueprintui/components/internals";import h from"./element.css.js";let d=class extends e{static{this.properties={i18n:{type:Object},position:{type:String,reflect:!0},trigger:{type:String},closable:{type:Boolean}}}constructor(){super(...arguments),this.i18n=s.keys.actions,this.position="inline-end"}get#t(){return this.parentElement}#e;get#i(){return"string"==typeof this.trigger?this.getRootNode().querySelector("#"+this.trigger):this.trigger}get#r(){return this.#i?.closest("bp-grid-row")}get#s(){return parseInt(getComputedStyle(this).getPropertyValue("--full-width-breakpoint"))}static{this.styles=[n,h]}render(){return i`<div part="internal" role="presentation">${this.closable?i`<bp-button-icon @click="${this.hidePopover}" aria-label="${this.i18n.close}" shape="close" action="flat" type="button"></bp-button-icon>`:r}<slot></slot></div>${this.trigger?i`<div part="pointer" role="presentation"></div>`:r}`}async connectedCallback(){super.connectedCallback(),this.slot="detail",this.#n()}firstUpdated(t){super.firstUpdated(t),this.#o(),this.addEventListener("toggle",t=>{"open"===t.newState&&this.#o()})}async updated(t){super.updated(t),await this.updateComplete,t.has("trigger")&&t.get("trigger")!==this.#i&&!this.hidden&&this.#l(t.get("trigger"))}disconnectedCallback(){super.disconnectedCallback(),this.#e.disconnect()}#l(t){t?.closest&&t?.closest("bp-grid-row")?.removeAttribute("_detail-row");const e=this.#i?.getBoundingClientRect()?.top-this.getBoundingClientRect().top;this.style.setProperty("--pointer-top",e-2+"px")}#n(){this.addEventListener("resize-layout",t=>{t.detail.width<this.#s?this.setAttribute("full-width",""):t.detail.width>this.#s+parseInt(this.style.insetInlineStart)&&(this.removeAttribute("full-width"),this.#o())})}async#o(){this.#t.scrollLock=!this.hidden,await this.updateComplete;const t=Array.from(this.#r?this.#r.querySelectorAll("bp-grid-cell"):[]).find(t=>"rowheader"===t.role);if(t){const e=this.#t?.getBoundingClientRect(),i=t.getBoundingClientRect();this.style.width="auto","inline-start"===this.position||"rtl"===this.#t?.getAttribute("dir")?this.style.insetInlineStart=Math.floor(e.right-i.left)+"px":this.style.insetInlineStart=Math.floor(i.right-e.left)+"px"}}};d=t([o(()=>({focusTrap:!0})),l({key:"actions"}),a(),g()],d);export{d as BpGridDetail};
@@ -1 +1 @@
1
- import{DraggableListController as e}from"@blueprintui/crane";class r extends e{constructor(e){super(e,(()=>({manageFocus:!0,manageTabindex:!0,items:e.querySelectorAll("bp-grid-column"),dropZones:[]})))}}export{r as DraggableGridColumnController};
1
+ import{DraggableListController as e}from"@blueprintui/crane";class r extends e{constructor(e){super(e,()=>({manageFocus:!0,manageTabindex:!0,items:e.querySelectorAll("bp-grid-column"),dropZones:[]}))}}export{r as DraggableGridColumnController};
@@ -1 +1 @@
1
- import{DraggableListController as e}from"@blueprintui/crane";class r extends e{constructor(e){super(e,(()=>({manageFocus:!0,manageTabindex:!0,items:e.querySelectorAll("bp-grid-row"),dropZones:e.querySelectorAll("bp-grid-placeholder")})))}}export{r as DraggableGridRowController};
1
+ import{DraggableListController as e}from"@blueprintui/crane";class r extends e{constructor(e){super(e,()=>({manageFocus:!0,manageTabindex:!0,items:e.querySelectorAll("bp-grid-row"),dropZones:e.querySelectorAll("bp-grid-placeholder")}))}}export{r as DraggableGridRowController};
@@ -1 +1 @@
1
- import{__decorate as t}from"tslib";import{LitElement as r,html as o}from"lit";import{state as s}from"lit/decorators/state.js";import{baseStyles as e}from"@blueprintui/components/internals";import l from"./element.css.js";class n extends r{constructor(){super(...arguments),this._colSpan="",this.#t=this.attachInternals()}static{this.styles=[e,l]}#t;render(){return o`<slot role="gridcell" part="internal" .ariaColSpan="${this._colSpan}"></slot>`}connectedCallback(){super.connectedCallback(),this.slot="footer",this.#t.role="row"}}t([s()],n.prototype,"_colSpan",void 0);export{n as BpGridFooter};
1
+ import{LitElement as t,html as e}from"lit";import{baseStyles as r}from"@blueprintui/components/internals";import s from"./element.css.js";class n extends t{constructor(){super(),this._colSpan=""}static{this.properties={_colSpan:{state:!0}}}static{this.styles=[r,s]}#t=this.attachInternals();render(){return e`<slot role="gridcell" part="internal" .ariaColSpan="${this._colSpan}"></slot>`}connectedCallback(){super.connectedCallback(),this.slot="footer",this.#t.role="row"}}export{n as BpGridFooter};
@@ -1 +1 @@
1
- import{insertSpanningCells as t}from"@blueprintui/grid/internals";class s{#t;get placeholder(){return this.#t||(this.#t=this.host.querySelector("bp-grid-placeholder")),this.#t}#s;get footer(){return this.#s||(this.#s=this.host.querySelector("bp-grid-footer")),this.#s}#e;get rows(){return this.#e||(this.#e=Array.from(this.host.querySelectorAll("bp-grid-row"))),this.#e}#r;get columns(){return this.#r||(this.#r=Array.from(this.host.querySelectorAll("bp-grid-column"))),this.#r}#o;get cells(){return this.#o||(this.#o=Array.from(this.host.querySelectorAll("bp-grid-cell"))),this.#o}#i;get grid(){if(!this.#i){const s=this.columns.filter((t=>!t.ariaColSpan)),e=t([...s,...Array.from(this.cells)]);for(this.#i=[];e.length;)this.#i.push(e.splice(0,s.length))}return this.#i}#h=0;get isStatic(){return this.#h++,1===this.#h&&!this.host.rangeSelection&&!this.host.querySelector("bp-grid-column bp-button-resize")&&!Array.from(this.columns).find((t=>void 0!==t.position||t.draggable||t.width))}constructor(t){this.host=t,this.host.addController(this)}async hostConnected(){await this.host.updateComplete,this.host.shadowRoot.addEventListener("slotchange",(async()=>{await this.host.updateComplete,this.#l(),this.host.shadowRoot.dispatchEvent(new CustomEvent("bp-slotchange"))})),this.host.addEventListener("bp-crane-end",(async()=>{await this.host.updateComplete,this.#l()}))}#l(){this.#i=null,this.#r=null,this.#e=null,this.#o=null,this.#t=null,this.#s=null}}export{s as GridDOMController};
1
+ import{insertSpanningCells as t}from"@blueprintui/grid/internals";class s{#t;get placeholder(){return this.#t||(this.#t=this.host.querySelector("bp-grid-placeholder")),this.#t}#s;get footer(){return this.#s||(this.#s=this.host.querySelector("bp-grid-footer")),this.#s}#e;get rows(){return this.#e||(this.#e=Array.from(this.host.querySelectorAll("bp-grid-row"))),this.#e}#r;get columns(){return this.#r||(this.#r=Array.from(this.host.querySelectorAll("bp-grid-column"))),this.#r}#o;get cells(){return this.#o||(this.#o=Array.from(this.host.querySelectorAll("bp-grid-cell"))),this.#o}#i;get grid(){if(!this.#i){const s=this.columns.filter(t=>!t.ariaColSpan),e=t([...s,...Array.from(this.cells)]);for(this.#i=[];e.length;)this.#i.push(e.splice(0,s.length))}return this.#i}#h=0;get isStatic(){return this.#h++,1===this.#h&&!this.host.rangeSelection&&!this.host.querySelector("bp-grid-column bp-button-resize")&&!Array.from(this.columns).find(t=>void 0!==t.position||t.draggable||t.width)}constructor(t){this.host=t,this.host.addController(this)}async hostConnected(){await this.host.updateComplete,this.host.shadowRoot.addEventListener("slotchange",async()=>{await this.host.updateComplete,this.#l(),this.host.shadowRoot.dispatchEvent(new CustomEvent("bp-slotchange"))}),this.host.addEventListener("bp-crane-end",async()=>{await this.host.updateComplete,this.#l()})}#l(){this.#i=null,this.#r=null,this.#e=null,this.#o=null,this.#t=null,this.#s=null}}export{s as GridDOMController};
@@ -1 +1 @@
1
- const o=new CSSStyleSheet;o.replaceSync("[hidden]{display:none!important}:host{--background:var(--bp-layer-background-200);--body-height:auto;--body-min-height:auto;--scrollbar-background:var(--background);--scrollbar-thumb-background:var(--border-color);--column-height:var(--bp-size-900);--row-height:var(--bp-size-900);--scroll-padding-top:var(--column-height);--row-content-visibility:auto;--border:0;--border-width:var(--bp-object-border-width-100);--border-color:var(--bp-object-border-color-100);width:100%;display:block;position:relative}:host([range-selection]){user-select:none}:host([column-style*=border]) ::slotted(bp-grid-row){--cell-border-width:var(--border-width);--border-top:0;--border-bottom:0}:host([row-style*=border]) ::slotted(bp-grid-row){--border-top:var(--border-width)solid var(--border-color)}:host([row-style*=border]) ::slotted(bp-grid-row:last-of-type){--border-bottom:var(--border-width)solid var(--border-color)}:host([row-style*=border]) ::slotted(bp-grid-row:first-of-type){--border-top:0}:host([row-style*=stripe]) ::slotted(bp-grid-row){--border-top:0;--border-bottom:0}:host([row-style*=stripe]) ::slotted(bp-grid-row:nth-child(2n)),:host([row-style*=hover]) ::slotted(bp-grid-row:hover){--bp-interaction-offset:var(--bp-interaction-hover-offset)}:host([layer=flat]){--border-color:var(--bp-object-border-color-200);--background:inherit!important}[part=internal]{border:var(--border);border-radius:var(--bp-object-border-radius-100);background:var(--background);position:relative}.scroll-container{box-shadow:var(--box-shadow);border:var(--border);height:var(--body-height,100%);min-height:var(--body-min-height,auto);scroll-padding-top:var(--scroll-padding-top);scrollbar-color:var(--scrollbar-thumb-background)var(--scrollbar-background);scrollbar-width:thin;flex-direction:column;width:100%;display:flex;overflow:auto}:host([scroll-lock]) .scroll-container{overflow:hidden}.body-row-group{min-width:fit-content;margin-top:var(--bp-size-200);flex-direction:column;flex:1;display:flex}slot[name=header]{z-index:99;flex-direction:column;min-width:fit-content;display:flex;position:sticky;top:0}::slotted(bp-grid-row:not([bp-draggable=target]):first-of-type){--box-shadow:var(--border-width)solid transparent}@keyframes fadein{0%{opacity:0}to{opacity:1}}");export{o as default};
1
+ const o=new CSSStyleSheet;o.replaceSync("[hidden]{display:none!important}:host{--background:var(--bp-layer-background-200);--body-height:auto;--body-min-height:auto;--column-height:var(--bp-size-900);--row-height:var(--bp-size-900);--scroll-padding-top:var(--column-height);--row-content-visibility:auto;--border:0;--border-width:var(--bp-object-border-width-100);--border-color:var(--bp-object-border-color-100);width:100%;display:block;position:relative}:host([range-selection]){user-select:none}:host([column-style*=border]) ::slotted(bp-grid-row){--cell-border-width:var(--border-width);--border-top:0;--border-bottom:0}:host([row-style*=border]) ::slotted(bp-grid-row){--border-top:var(--border-width)solid var(--border-color)}:host([row-style*=border]) ::slotted(bp-grid-row:last-of-type){--border-bottom:var(--border-width)solid var(--border-color)}:host([row-style*=border]) ::slotted(bp-grid-row:first-of-type){--border-top:0}:host([row-style*=stripe]) ::slotted(bp-grid-row){--border-top:0;--border-bottom:0}:host([row-style*=stripe]) ::slotted(bp-grid-row:nth-child(2n)),:host([row-style*=hover]) ::slotted(bp-grid-row:hover){--bp-interaction-offset:var(--bp-interaction-hover-offset)}:host([layer=flat]){--border-color:var(--bp-object-border-color-200);--background:inherit!important}[part=internal]{border:var(--border);border-radius:var(--bp-object-border-radius-100);background:var(--background);position:relative}.scroll-container{scrollbar-color:var(--bp-scrollbar-color);scrollbar-width:var(--bp-scrollbar-width);box-shadow:var(--box-shadow);border:var(--border);height:var(--body-height,100%);min-height:var(--body-min-height,auto);scroll-padding-top:var(--scroll-padding-top);flex-direction:column;width:100%;display:flex;overflow:auto}:host([scroll-lock]) .scroll-container{overflow:hidden}.body-row-group{min-width:fit-content;margin-top:var(--bp-size-200);flex-direction:column;flex:1;display:flex}slot[name=header]{z-index:99;flex-direction:column;min-width:fit-content;display:flex;position:sticky;top:0}::slotted(bp-grid-row:not([bp-draggable=target]):first-of-type){--box-shadow:var(--border-width)solid transparent}@keyframes fadein{0%{opacity:0}to{opacity:1}}");export{o as default};
@@ -15,8 +15,6 @@ import { GridLayoutController } from './layout.controller.js';
15
15
  * @since 1.0.0
16
16
  * @cssprop --background
17
17
  * @cssprop --body-height
18
- * @cssprop --scrollbar-background
19
- * @cssprop --scrollbar-thumb-background
20
18
  * @cssprop --column-height
21
19
  * @cssprop --row-height
22
20
  * @cssprop --scroll-padding-top
@@ -1 +1 @@
1
- import{__decorate as t}from"tslib";import{LitElement as o,html as e}from"lit";import{property as r}from"lit/decorators/property.js";import{baseStyles as i,I18nService as l,createId as n,attachRootNodeStyles as s,dynamicControllers as a,i18n as h,typeMultiSelectable as c}from"@blueprintui/components/internals";import{interactionScrollVisibility as p}from"@blueprintui/grid/internals";import{GridLayoutController as d}from"./layout.controller.js";import{GridDOMController as u}from"./dom.controller.js";import m from"./element.global.css.js";import C from"./element.css.js";let y=class extends o{static{this.styles=[i,C]}get gridLayoutControllerConfig(){return{columns:this.#t.columns,columnLayout:this.columnLayout,height:this.height}}#t;get grid(){return this.#t.grid}get columns(){return this.#t.columns}get cells(){return this.#t.cells}get rows(){return this.#t.rows}get keyNavGrid(){return this.shadowRoot.querySelector(".scroll-container")}render(){return e`<div role="presentation" part="internal"><div role="presentation" class="scroll-container"><slot role="presentation" name="header"></slot><slot role="presentation" class="body-row-group"></slot></div><slot name="footer"></slot><slot name="detail"></slot></div>`}constructor(){super(),this.i18n=l.keys.actions,this.columnLayout="fixed",this.scrollLock=!1,this.layer="container",this.rangeSelection=!1,this._id=n(),this.gridLayoutController=new d(this),this._internals=this.attachInternals(),this.#t=new u(this),this._internals.role="grid",this._internals.states.add("bp-layer"),this.#o()}async connectedCallback(){super.connectedCallback(),s(this,[m]),await this.updateComplete,this.shadowRoot.addEventListener("bp-slotchange",(()=>this.#e())),this.#e()}#o(){this.addEventListener("sort",(t=>{const o=t.composedPath().find((t=>"BP-GRID-COLUMN"===t.tagName));o&&(o.ariaSort=t.detail)}))}async#e(){this.#t.isStatic||(this.#r(),this.#i(),this.#l(),this.#n(),this.#s(),this.#a())}#r(){const t=Math.max(this.#t.rows?.length,1),o=this.#t.footer?1:0;this._internals.ariaRowCount=""+(1+t+o),this._internals.ariaColCount=""+this.#t.columns.length}#i(){this.#t.columns.forEach(((t,o)=>t.ariaColIndex=""+(o+1)))}#l(){this.#t.rows?.forEach(((t,o)=>t.ariaRowIndex=""+(o+2)))}#n(){this.#t.cells?.forEach(((t,o)=>t.ariaColIndex=""+(o%this.#t.columns.length+1)))}#s(){this.#t.placeholder&&(this.#t.placeholder.ariaRowCount=""+(this.#t.rows.length+1),this.#t.placeholder._colSpan=this._internals.ariaColCount)}#a(){this.#t.footer&&(this.#t.footer.ariaRowCount=""+(this.#t.rows.length+2),this.#t.footer._colSpan=this._internals.ariaColCount)}};t([r({type:Object})],y.prototype,"i18n",void 0),t([r({type:String,reflect:!0})],y.prototype,"height",void 0),t([r({type:String,reflect:!0,attribute:"column-layout"})],y.prototype,"columnLayout",void 0),t([r({type:String,reflect:!0,attribute:"row-style"})],y.prototype,"rowStyle",void 0),t([r({type:String,reflect:!0,attribute:"column-style"})],y.prototype,"columnStyle",void 0),t([r({type:String,reflect:!0})],y.prototype,"selectable",void 0),t([r({type:Boolean,reflect:!0,attribute:"scroll-lock"})],y.prototype,"scrollLock",void 0),t([r({type:String,reflect:!0})],y.prototype,"layer",void 0),t([r({type:Boolean,reflect:!0,attribute:"range-selection"})],y.prototype,"rangeSelection",void 0),t([r({type:String,reflect:!0})],y.prototype,"_id",void 0),y=t([a(),h({key:"actions"}),c(),p()],y);export{y as BpGrid};
1
+ import{__decorate as t}from"tslib";import{LitElement as e,html as o}from"lit";import{baseStyles as r,I18nService as l,createId as i,attachRootNodeStyles as n,dynamicControllers as s,i18n as a,typeMultiSelectable as h}from"@blueprintui/components/internals";import{interactionScrollVisibility as c}from"@blueprintui/grid/internals";import{GridLayoutController as u}from"./layout.controller.js";import{GridDOMController as d}from"./dom.controller.js";import C from"./element.global.css.js";import m from"./element.css.js";let p=class extends e{static{this.properties={i18n:{type:Object},height:{type:String,reflect:!0},columnLayout:{type:String,reflect:!0,attribute:"column-layout"},rowStyle:{type:String,reflect:!0,attribute:"row-style"},columnStyle:{type:String,reflect:!0,attribute:"column-style"},selectable:{type:String,reflect:!0},scrollLock:{type:Boolean,reflect:!0,attribute:"scroll-lock"},layer:{type:String,reflect:!0},rangeSelection:{type:Boolean,reflect:!0,attribute:"range-selection"},_id:{type:String,reflect:!0}}}static{this.styles=[r,m]}get gridLayoutControllerConfig(){return{columns:this.#t.columns,columnLayout:this.columnLayout,height:this.height}}#t;get grid(){return this.#t.grid}get columns(){return this.#t.columns}get cells(){return this.#t.cells}get rows(){return this.#t.rows}get keyNavGrid(){return this.shadowRoot.querySelector(".scroll-container")}render(){return o`<div role="presentation" part="internal"><div role="presentation" class="scroll-container"><slot role="presentation" name="header"></slot><slot role="presentation" class="body-row-group"></slot></div><slot name="footer"></slot><slot name="detail"></slot></div>`}constructor(){super(),this.gridLayoutController=new u(this),this._internals=this.attachInternals(),this.#t=new d(this),this._internals.role="grid",this._internals.states.add("bp-layer"),this.#e(),this.i18n=l.keys.actions,this.columnLayout="fixed",this.scrollLock=!1,this.layer="container",this.rangeSelection=!1,this._id=i()}async connectedCallback(){super.connectedCallback(),n(this,[C]),await this.updateComplete,this.shadowRoot.addEventListener("bp-slotchange",()=>this.#o()),this.#o()}#e(){this.addEventListener("sort",t=>{const e=t.composedPath().find(t=>"BP-GRID-COLUMN"===t.tagName);e&&(e.ariaSort=t.detail)})}async#o(){this.#t.isStatic||(this.#r(),this.#l(),this.#i(),this.#n(),this.#s(),this.#a())}#r(){const t=Math.max(this.#t.rows?.length,1),e=this.#t.footer?1:0;this._internals.ariaRowCount=""+(1+t+e),this._internals.ariaColCount=""+this.#t.columns.length}#l(){this.#t.columns.forEach((t,e)=>t.ariaColIndex=""+(e+1))}#i(){this.#t.rows?.forEach((t,e)=>t.ariaRowIndex=""+(e+2))}#n(){this.#t.cells?.forEach((t,e)=>t.ariaColIndex=""+(e%this.#t.columns.length+1))}#s(){this.#t.placeholder&&(this.#t.placeholder.ariaRowCount=""+(this.#t.rows.length+1),this.#t.placeholder._colSpan=this._internals.ariaColCount)}#a(){this.#t.footer&&(this.#t.footer.ariaRowCount=""+(this.#t.rows.length+2),this.#t.footer._colSpan=this._internals.ariaColCount)}};p=t([s(),a({key:"actions"}),h(),c()],p);export{p as BpGrid};
@@ -1 +1 @@
1
- import{attachRootNodeStyles as t}from"@blueprintui/components/internals";class e{#t;constructor(t){this.host=t,this.host.addController(this)}async hostConnected(){await this.host.updateComplete,this.#e(),this.host.addEventListener("mouseout",(()=>this.#i()))}hostUpdated(){this.#e()}#e(){this.host.columnStyle?.includes("hover")&&!this.#t&&(this.#t=new CSSStyleSheet,t(this.host,[this.#t]),this.host.addEventListener("mouseover",(t=>{const e=t.target.closest("bp-grid-cell, bp-grid-column");if(e){const t=Array.from(e.parentElement.querySelectorAll("bp-grid-cell, bp-grid-column")).indexOf(e)+1;this.#t.replaceSync(`\n bp-grid[_id=${this.host._id}] bp-grid-cell:nth-child(${t}),\n bp-grid[_id=${this.host._id}] bp-grid-column:nth-child(${t}) {\n --bp-interaction-offset: var(--bp-interaction-hover-offset);\n }\n `)}})))}#i(){this.#t?.replaceSync("")}}export{e as GridHoverController};
1
+ import{attachRootNodeStyles as t}from"@blueprintui/components/internals";class e{#t;constructor(t){this.host=t,this.host.addController(this)}async hostConnected(){await this.host.updateComplete,this.#e(),this.host.addEventListener("mouseout",()=>this.#i())}hostUpdated(){this.#e()}#e(){this.host.columnStyle?.includes("hover")&&!this.#t&&(this.#t=new CSSStyleSheet,t(this.host,[this.#t]),this.host.addEventListener("mouseover",t=>{const e=t.target.closest("bp-grid-cell, bp-grid-column");if(e){const t=Array.from(e.parentElement.querySelectorAll("bp-grid-cell, bp-grid-column")).indexOf(e)+1;this.#t.replaceSync(`\n bp-grid[_id=${this.host._id}] bp-grid-cell:nth-child(${t}),\n bp-grid[_id=${this.host._id}] bp-grid-column:nth-child(${t}) {\n --bp-interaction-offset: var(--bp-interaction-hover-offset);\n }\n `)}}))}#i(){this.#t?.replaceSync("")}}export{e as GridHoverController};
@@ -1 +1 @@
1
- import{listenForAttributeListChange as t,isNumericString as i}from"@blueprintui/components/internals";import{onChildListMutation as s}from"@blueprintui/grid/internals";class e{#t=[];#i;get#s(){return Array.from(this.#i??[])}get#e(){return this.host.gridLayoutControllerConfig}get#o(){return this.#s.filter((t=>!t.hidden))}get#h(){return this.#o["rtl"===this.host.getAttribute("dir")?0:this.#o.length-1]}constructor(t){this.host=t,this.host.addController(this)}async hostConnected(){await this.host.updateComplete,this.#l(),this.host.addEventListener("resize-input",(()=>this.#n()),{once:!0,capture:!0}),this.#t.push(s(this.host,(async t=>{await this.host.updateComplete,t&&this.#r(t)&&this.#l()}))),this.#t.push(t(this.host,["hidden"],(()=>this.#l())))}hostUpdated(){this.#e.height&&this.host.style.setProperty("--body-height",i(this.#e.height)?this.#e.height+"px":this.#e.height)}hostDisconnected(){this.#t.forEach((t=>t.disconnect()))}#r(t){return[...Array.from(t.removedNodes),...Array.from(t.addedNodes)].find((t=>"BP-GRID-COLUMN"===t.tagName))}#n(){"fixed"===this.#e.columnLayout&&(this.#o.filter((t=>t.width)).forEach((t=>this.host.style.setProperty("--ch"+t.ariaColIndex,i(t.width)?t.width+"px":t.width))),this.#o.filter((t=>!t.width&&parseInt(t.ariaColIndex)!==this.#s.length)).forEach((t=>this.host.style.setProperty("--ch"+t.ariaColIndex,parseInt(getComputedStyle(t).width)+"px"))),this.host.style.setProperty("--ch"+this.#h.ariaColIndex,`minmax(${this.#d()??parseInt(getComputedStyle(this.#h).width)+"px"}, 100%)`))}#d(){return i(this.#h.width)?this.#h.width+"px":this.#h.width?this.#h.width:null}#l(){this.#i=this.#e.columns,this.#a(),this.#u()}#a(){const t=this.#s.filter((t=>!t.hidden&&!t.ariaColSpan)).reduce(((t,s,e)=>`${t} var(--ch${e+1}, ${(i(s.width)?s.width+"px":s.width)||"1fr"})`),"");this.host.style.setProperty("--ch-grid",t)}#u(){this.#o.forEach((t=>t._internals.states.delete("ch-last"))),this.#h?._internals.states.add("ch-last")}}export{e as GridLayoutController};
1
+ import{listenForAttributeListChange as t,isNumericString as i}from"@blueprintui/components/internals";import{onChildListMutation as s}from"@blueprintui/grid/internals";class e{#t=[];#i;get#s(){return Array.from(this.#i??[])}get#e(){return this.host.gridLayoutControllerConfig}get#o(){return this.#s.filter(t=>!t.hidden)}get#h(){return this.#o["rtl"===this.host.getAttribute("dir")?0:this.#o.length-1]}constructor(t){this.host=t,this.host.addController(this)}async hostConnected(){await this.host.updateComplete,this.#l(),this.host.addEventListener("resize-input",()=>this.#n(),{once:!0,capture:!0}),this.#t.push(s(this.host,async t=>{await this.host.updateComplete,t&&this.#r(t)&&this.#l()})),this.#t.push(t(this.host,["hidden"],()=>this.#l()))}hostUpdated(){this.#e.height&&this.host.style.setProperty("--body-height",i(this.#e.height)?this.#e.height+"px":this.#e.height)}hostDisconnected(){this.#t.forEach(t=>t.disconnect())}#r(t){return[...Array.from(t.removedNodes),...Array.from(t.addedNodes)].find(t=>"BP-GRID-COLUMN"===t.tagName)}#n(){"fixed"===this.#e.columnLayout&&(this.#o.filter(t=>t.width).forEach(t=>this.host.style.setProperty("--ch"+t.ariaColIndex,i(t.width)?t.width+"px":t.width)),this.#o.filter(t=>!t.width&&parseInt(t.ariaColIndex)!==this.#s.length).forEach(t=>this.host.style.setProperty("--ch"+t.ariaColIndex,parseInt(getComputedStyle(t).width)+"px")),this.host.style.setProperty("--ch"+this.#h.ariaColIndex,`minmax(${this.#d()??parseInt(getComputedStyle(this.#h).width)+"px"}, 100%)`))}#d(){return i(this.#h.width)?this.#h.width+"px":this.#h.width?this.#h.width:null}#l(){this.#i=this.#e.columns,this.#a(),this.#u()}#a(){const t=this.#s.filter(t=>!t.hidden&&!t.ariaColSpan).reduce((t,s,e)=>`${t} var(--ch${e+1}, ${(i(s.width)?s.width+"px":s.width)||"1fr"})`,"");this.host.style.setProperty("--ch-grid",t)}#u(){this.#o.forEach(t=>t._internals.states.delete("ch-last")),this.#h?._internals.states.add("ch-last")}}export{e as GridLayoutController};
@@ -1 +1 @@
1
- import{KeynavController as r}from"@blueprintui/typewriter";import{DynamicControllers as t}from"@blueprintui/components/internals";import{BpGrid as e}from"../grid/element.js";t.add(e,class extends r{constructor(r){super(r,(()=>({host:r.keyNavGrid,grid:r.grid})))}});
1
+ import{KeynavController as r}from"@blueprintui/typewriter";import{DynamicControllers as t}from"@blueprintui/components/internals";import{BpGrid as e}from"../grid/element.js";t.add(e,class extends r{constructor(r){super(r,()=>({host:r.keyNavGrid,grid:r.grid}))}});
@@ -1 +1 @@
1
- function t(){return(t,e)=>t.addInitializer((t=>new i(t)))}class i{constructor(t){this.host=t,this.host.addController(this)}async hostConnected(){await this.host.updateComplete,this.host.renderRoot.addEventListener("scroll",(()=>this.#t()),{once:!0,capture:!0}),this.host.renderRoot.addEventListener("pointerdown",(()=>this.#t()),{once:!0,capture:!0})}#t(){this.host.style.setProperty("--row-content-visibility","visibile")}}export{i as InteractionScrollVisibilityController,t as interactionScrollVisibility};
1
+ function t(){return(t,e)=>t.addInitializer(t=>new i(t))}class i{constructor(t){this.host=t,this.host.addController(this)}async hostConnected(){await this.host.updateComplete,this.host.renderRoot.addEventListener("scroll",()=>this.#t(),{once:!0,capture:!0}),this.host.renderRoot.addEventListener("pointerdown",()=>this.#t(),{once:!0,capture:!0})}#t(){this.host.style.setProperty("--row-content-visibility","visibile")}}export{i as InteractionScrollVisibilityController,t as interactionScrollVisibility};
@@ -1 +1 @@
1
- function t(t,e){const o=new MutationObserver((t=>{for(const o of t)"childList"===o.type&&e(o)}));return o.observe(t,{childList:!0}),o}export{t as onChildListMutation};
1
+ function t(t,e){const o=new MutationObserver(t=>{for(const o of t)"childList"===o.type&&e(o)});return o.observe(t,{childList:!0}),o}export{t as onChildListMutation};
@@ -1 +1 @@
1
- function t(t){return t.matches("a[href],area[href],input:not([disabled]),button:not([disabled]),select:not([disabled]),textarea:not([disabled]),iframe,object,embed,*[tabindex],*[contenteditable=true],[role=button]:not([disabled])")}function e(t){return t.matches("a[href],button:not([disabled]),input[type=checkbox],input[type=radio],object,embed,*[tabindex],[role=button]:not([disabled])")}function n(t=document){return t.activeElement&&t.activeElement.shadowRoot?n(t.activeElement.shadowRoot)??t.activeElement:t.activeElement}function o(e){e&&!t(e)?(e.setAttribute("tabindex","-1"),e.focus(),e.addEventListener("blur",(()=>e.removeAttribute("tabindex")),{once:!0})):e?.focus()}function a(t,e){t.forEach((t=>t.tabIndex=-1)),e.tabIndex=0}function d(t){t.forEach((t=>t.tabIndex=-1)),t[0].tabIndex=0}export{o as focusElement,t as focusable,n as getActiveElement,d as initializeKeyListItems,a as setActiveKeyListItem,e as simpleFocusable};
1
+ function t(t){return t.matches("a[href],area[href],input:not([disabled]),button:not([disabled]),select:not([disabled]),textarea:not([disabled]),iframe,object,embed,*[tabindex],*[contenteditable=true],[role=button]:not([disabled])")}function e(t){return t.matches("a[href],button:not([disabled]),input[type=checkbox],input[type=radio],object,embed,*[tabindex],[role=button]:not([disabled])")}function n(t=document){return t.activeElement&&t.activeElement.shadowRoot?n(t.activeElement.shadowRoot)??t.activeElement:t.activeElement}function o(e){e&&!t(e)?(e.setAttribute("tabindex","-1"),e.focus(),e.addEventListener("blur",()=>e.removeAttribute("tabindex"),{once:!0})):e?.focus()}function a(t,e){t.forEach(t=>t.tabIndex=-1),e.tabIndex=0}function d(t){t.forEach(t=>t.tabIndex=-1),t[0].tabIndex=0}export{o as focusElement,t as focusable,n as getActiveElement,d as initializeKeyListItems,a as setActiveKeyListItem,e as simpleFocusable};
@@ -1 +1 @@
1
- import{focusable as r}from"./focus.js";function n(n,e=10){return t(n,e).filter((n=>r(n)))}function t(r,n=10){return Array.from(e(r)).reduce(((r,o)=>[...r,[o,[...Array.from(e(o)).map((r=>[r,t(r,n)]))]]]),[]).flat(n)}function e(r){if(r.documentElement)return r.documentElement.children;if(r.shadowRoot)return r.shadowRoot.children;if(r.assignedElements){const n=r.assignedElements();return n.length?n:r.children}return r.children}function o(r){return r?.constructor===Object}function c(...r){const n={};return r.map((r=>o(r)?{...r}:{})).forEach((r=>{Object.keys(r).forEach((t=>{const e=r[t];Array.isArray(e)?n[t]=Array.from(e):o(e)?n[t]=c(n[t]||{},e):n[t]=e}))})),n}function i(r){const n=[...r];return[...r].forEach((t=>{if(t.ariaColSpan){const e=r.indexOf(t);for(let r=1;r<parseInt(t.ariaColSpan);r++)n.splice(e+r,0,t)}})),n}export{e as getChildren,t as getFlattenedDOMTree,n as getFlattenedFocusableItems,i as insertSpanningCells,o as isObject,c as mergeObjects};
1
+ import{focusable as r}from"./focus.js";function n(n,e=10){return t(n,e).filter(n=>r(n))}function t(r,n=10){return Array.from(e(r)).reduce((r,o)=>[...r,[o,[...Array.from(e(o)).map(r=>[r,t(r,n)])]]],[]).flat(n)}function e(r){if(r.documentElement)return r.documentElement.children;if(r.shadowRoot)return r.shadowRoot.children;if(r.assignedElements){const n=r.assignedElements();return n.length?n:r.children}return r.children}function o(r){return r?.constructor===Object}function c(...r){const n={};return r.map(r=>o(r)?{...r}:{}).forEach(r=>{Object.keys(r).forEach(t=>{const e=r[t];Array.isArray(e)?n[t]=Array.from(e):o(e)?n[t]=c(n[t]||{},e):n[t]=e})}),n}function i(r){const n=[...r];return[...r].forEach(t=>{if(t.ariaColSpan){const e=r.indexOf(t);for(let r=1;r<parseInt(t.ariaColSpan);r++)n.splice(e+r,0,t)}}),n}export{e as getChildren,t as getFlattenedDOMTree,n as getFlattenedFocusableItems,i as insertSpanningCells,o as isObject,c as mergeObjects};
@@ -1 +1 @@
1
- import{__decorate as t}from"tslib";import{LitElement as r,html as o}from"lit";import{property as e}from"lit/decorators/property.js";import{state as s}from"lit/decorators/state.js";import{I18nService as i,baseStyles as n,i18n as l}from"@blueprintui/components/internals";import a from"./element.css.js";let p=class extends r{constructor(){super(...arguments),this.i18n=i.keys.actions,this._colSpan="0",this.#t=this.attachInternals()}static{this.styles=[n,a]}#t;render(){return o`<slot role="gridcell" part="internal" .ariaColSpan="${this._colSpan}">${"dropzone"===this.bpDraggableItem?o`<p sr-only>${this.i18n.dropTarget}</p>`:""}</slot>`}connectedCallback(){super.connectedCallback(),this.#t.role="row"}};t([e({type:Object})],p.prototype,"i18n",void 0),t([s()],p.prototype,"_colSpan",void 0),t([s()],p.prototype,"bpDraggableItem",void 0),p=t([l({key:"actions"})],p);export{p as BpGridPlaceholder};
1
+ import{__decorate as t}from"tslib";import{LitElement as e,html as r}from"lit";import{I18nService as s,baseStyles as n,i18n as i}from"@blueprintui/components/internals";import o from"./element.css.js";let a=class extends e{static{this.properties={i18n:{type:Object},_colSpan:{state:!0},bpDraggableItem:{state:!0}}}constructor(){super(...arguments),this.i18n=s.keys.actions,this._colSpan="0"}static{this.styles=[n,o]}#t=this.attachInternals();render(){return r`<slot role="gridcell" part="internal" .ariaColSpan="${this._colSpan}">${"dropzone"===this.bpDraggableItem?r`<p sr-only>${this.i18n.dropTarget}</p>`:""}</slot>`}connectedCallback(){super.connectedCallback(),this.#t.role="row"}};a=t([i({key:"actions"})],a);export{a as BpGridPlaceholder};
@@ -1 +1 @@
1
- import{InteractionRangeSelectionController as e}from"@blueprintui/components/internals";class r extends e{constructor(e){super(e,(()=>({rangeSelection:e.rangeSelection,grid:e.grid.slice(1)})))}}export{r as GridRangeSelectionController};
1
+ import{InteractionRangeSelectionController as e}from"@blueprintui/components/internals";class r extends e{constructor(e){super(e,()=>({rangeSelection:e.rangeSelection,grid:e.grid.slice(1)}))}}export{r as GridRangeSelectionController};
@@ -1 +1 @@
1
- import{__decorate as t}from"tslib";import{LitElement as r,html as e}from"lit";import{property as o}from"lit/decorators/property.js";import{baseStyles as s,dynamicControllers as i}from"@blueprintui/components/internals";import l from"./element.css.js";let n=class extends r{static{this.styles=[s,l]}render(){return e`<slot></slot>`}constructor(){super(),this._internals=this.attachInternals(),this._internals.role="row"}};t([o({type:Boolean,reflect:!0})],n.prototype,"selected",void 0),t([o({type:String,reflect:!0})],n.prototype,"position",void 0),n=t([i()],n);export{n as BpGridRow};
1
+ import{__decorate as t}from"tslib";import{LitElement as e,html as r}from"lit";import{baseStyles as s,dynamicControllers as i}from"@blueprintui/components/internals";import o from"./element.css.js";let n=class extends e{static{this.properties={selected:{type:Boolean,reflect:!0},position:{type:String,reflect:!0}}}static{this.styles=[s,o]}render(){return r`<slot></slot>`}constructor(){super(),this._internals=this.attachInternals(),this._internals.role="row"}};n=t([i()],n);export{n as BpGridRow};
@@ -31,8 +31,6 @@
31
31
  { "name": "--border-width", "values": [] },
32
32
  { "name": "--background", "values": [] },
33
33
  { "name": "--body-height", "values": [] },
34
- { "name": "--scrollbar-background", "values": [] },
35
- { "name": "--scrollbar-thumb-background", "values": [] },
36
34
  { "name": "--column-height", "values": [] },
37
35
  { "name": "--row-height", "values": [] },
38
36
  { "name": "--scroll-padding-top", "values": [] },
@@ -56,7 +56,7 @@
56
56
  },
57
57
  {
58
58
  "name": "bp-grid",
59
- "description": "Grid\n\n```typescript\nimport '@blueprintui/grid/include/core.js';\n```\n---\n\n\n### **CSS Properties:**\n - **--background** - undefined _(default: undefined)_\n- **--body-height** - undefined _(default: undefined)_\n- **--scrollbar-background** - undefined _(default: undefined)_\n- **--scrollbar-thumb-background** - undefined _(default: undefined)_\n- **--column-height** - undefined _(default: undefined)_\n- **--row-height** - undefined _(default: undefined)_\n- **--scroll-padding-top** - undefined _(default: undefined)_\n- **--row-content-visibility** - undefined _(default: undefined)_\n- **--border-width** - undefined _(default: undefined)_",
59
+ "description": "Grid\n\n```typescript\nimport '@blueprintui/grid/include/core.js';\n```\n---\n\n\n### **CSS Properties:**\n - **--background** - undefined _(default: undefined)_\n- **--body-height** - undefined _(default: undefined)_\n- **--column-height** - undefined _(default: undefined)_\n- **--row-height** - undefined _(default: undefined)_\n- **--scroll-padding-top** - undefined _(default: undefined)_\n- **--row-content-visibility** - undefined _(default: undefined)_\n- **--border-width** - undefined _(default: undefined)_",
60
60
  "attributes": [
61
61
  {
62
62
  "name": "i18n",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueprintui/grid",
3
- "version": "2.3.0",
3
+ "version": "2.4.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "package.json",
@@ -60,29 +60,35 @@
60
60
  }
61
61
  },
62
62
  "dependencies": {
63
- "lit": "^3.3.0",
63
+ "lit": "^3.3.1",
64
64
  "tslib": "^2.8.1",
65
- "@blueprintui/components": "^2.5.0",
65
+ "@blueprintui/components": "^2.7.1",
66
66
  "@blueprintui/icons": "^2.1.6",
67
+ "@blueprintui/themes": "^2.1.12",
67
68
  "@blueprintui/crane": "^2.1.8",
68
- "@blueprintui/themes": "^2.1.11",
69
69
  "@blueprintui/typewriter": "^2.1.11"
70
70
  },
71
71
  "devDependencies": {
72
+ "@blueprintui/cli": "0.11.3",
73
+ "@blueprintui/drafter": "0.9.4",
74
+ "@types/jasmine": "5.1.9",
72
75
  "@web/dev-server": "0.4.6",
73
76
  "@web/dev-server-esbuild": "1.0.4",
74
77
  "@web/dev-server-rollup": "0.6.4",
75
- "@web/test-runner": "0.20.1",
78
+ "@web/test-runner": "0.20.2",
76
79
  "@web/test-runner-core": "0.13.4",
77
- "@web/test-runner-playwright": "0.11.0",
80
+ "@web/test-runner-playwright": "0.11.1",
78
81
  "@web/test-runner-visual-regression": "0.10.0",
79
82
  "del-cli": "6.0.0",
83
+ "jasmine": "5.10.0",
84
+ "jasmine-core": "5.10.0",
80
85
  "modern-normalize": "^3.0.1",
81
- "playwright": "1.52.0",
82
- "publint": "0.2.10",
83
- "web-test-runner-jasmine": "0.1.2",
86
+ "playwright": "1.55.0",
87
+ "publint": "0.3.12",
88
+ "web-test-runner-jasmine": "0.1.4",
84
89
  "web-test-runner-performance": "0.1.6",
85
- "@blueprintui/layout": "^2.1.7",
90
+ "@blueprintui-internals/eslint": "0.0.0",
91
+ "@blueprintui/layout": "^2.2.0",
86
92
  "@blueprintui/test": "^0.0.0",
87
93
  "@blueprintui/typography": "^2.2.0"
88
94
  },
@@ -104,7 +110,7 @@
104
110
  "build": {
105
111
  "command": "bp build",
106
112
  "dependencies": [
107
- "../test:build",
113
+ "../internals/test:build",
108
114
  "../components:build",
109
115
  "../crane:build",
110
116
  "../icons:build",
@@ -155,9 +161,23 @@
155
161
  },
156
162
  "lint": {
157
163
  "dependencies": [
164
+ "lint:eslint",
158
165
  "lint:publish"
159
166
  ]
160
167
  },
168
+ "lint:eslint": {
169
+ "command": "eslint -c ./eslint.config.js --color",
170
+ "dependencies": [
171
+ "../internals/eslint:ci"
172
+ ],
173
+ "files": [
174
+ "./src/**/*.js",
175
+ "./src/**/*.ts",
176
+ ".eslint.config.js",
177
+ ".eslintcache"
178
+ ],
179
+ "output": []
180
+ },
161
181
  "lint:publish": {
162
182
  "command": "publint",
163
183
  "dependencies": [
@@ -185,7 +205,7 @@
185
205
  "test:unit": {
186
206
  "command": "del ./.coverage && node node_modules/@blueprintui/test/dist/wtr.js",
187
207
  "dependencies": [
188
- "../test:build",
208
+ "../internals/test:build",
189
209
  "build"
190
210
  ],
191
211
  "files": [
@@ -202,7 +222,7 @@
202
222
  "test:coverage": {
203
223
  "command": "del ./.coverage && node node_modules/@blueprintui/test/dist/wtr.js --coverage",
204
224
  "dependencies": [
205
- "../test:build",
225
+ "../internals/test:build",
206
226
  "build"
207
227
  ],
208
228
  "files": [
@@ -221,7 +241,7 @@
221
241
  "test:a11y": {
222
242
  "command": "node node_modules/@blueprintui/test/dist/wtr.js --config ./web-test-runner.a11y.mjs",
223
243
  "dependencies": [
224
- "../test:build",
244
+ "../internals/test:build",
225
245
  "build"
226
246
  ],
227
247
  "files": [
@@ -235,7 +255,7 @@
235
255
  "test:performance": {
236
256
  "command": "node node_modules/@blueprintui/test/dist/wtr.js --config ./web-test-runner.performance.mjs",
237
257
  "dependencies": [
238
- "../test:build",
258
+ "../internals/test:build",
239
259
  "build"
240
260
  ],
241
261
  "files": [
@@ -250,7 +270,7 @@
250
270
  "test:visual": {
251
271
  "command": "web-test-runner --config ./web-test-runner.visual.mjs",
252
272
  "dependencies": [
253
- "../test:build",
273
+ "../internals/test:build",
254
274
  "build"
255
275
  ],
256
276
  "files": [