@blueprintui/grid 2.4.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 +7 -0
- package/dist/column/alignment.controller.js +1 -1
- package/dist/column/width.controller.js +1 -1
- package/dist/column-resize/index.js +1 -1
- package/dist/column-span/index.js +1 -1
- package/dist/csv/index.js +1 -1
- package/dist/custom-elements.json +0 -6
- package/dist/detail/element.js +1 -1
- package/dist/draggable-column/index.js +1 -1
- package/dist/draggable-row/index.js +1 -1
- package/dist/grid/dom.controller.js +1 -1
- package/dist/grid/element.css.js +1 -1
- package/dist/grid/element.d.ts +0 -2
- package/dist/grid/element.js +1 -1
- package/dist/grid/hover.controller.js +1 -1
- package/dist/grid/layout.controller.js +1 -1
- package/dist/include/keynav.js +1 -1
- package/dist/internals/controllers/interaction-scroll-visibility.controller.js +1 -1
- package/dist/internals/utils/events.js +1 -1
- package/dist/internals/utils/focus.js +1 -1
- package/dist/internals/utils/traversal.js +1 -1
- package/dist/range-selection/index.js +1 -1
- package/dist/vscode.css-custom-data.json +0 -2
- package/dist/vscode.html-custom-data.json +1 -1
- package/package.json +37 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
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
|
+
|
|
1
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)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -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(
|
|
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{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(
|
|
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,(
|
|
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(
|
|
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(
|
|
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};
|
package/dist/detail/element.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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",
|
|
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,(
|
|
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,(
|
|
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{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(
|
|
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};
|
package/dist/grid/element.css.js
CHANGED
|
@@ -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;--
|
|
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};
|
package/dist/grid/element.d.ts
CHANGED
|
@@ -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
|
package/dist/grid/element.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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",(
|
|
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",(
|
|
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(
|
|
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};
|
package/dist/include/keynav.js
CHANGED
|
@@ -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,(
|
|
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(
|
|
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(
|
|
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",(
|
|
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(
|
|
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{InteractionRangeSelectionController as e}from"@blueprintui/components/internals";class r extends e{constructor(e){super(e,(
|
|
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};
|
|
@@ -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- **--
|
|
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.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"package.json",
|
|
@@ -60,28 +60,34 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"lit": "^3.3.
|
|
63
|
+
"lit": "^3.3.1",
|
|
64
64
|
"tslib": "^2.8.1",
|
|
65
|
-
"@blueprintui/components": "^2.
|
|
66
|
-
"@blueprintui/crane": "^2.1.8",
|
|
65
|
+
"@blueprintui/components": "^2.7.1",
|
|
67
66
|
"@blueprintui/icons": "^2.1.6",
|
|
68
|
-
"@blueprintui/
|
|
69
|
-
"@blueprintui/
|
|
67
|
+
"@blueprintui/themes": "^2.1.12",
|
|
68
|
+
"@blueprintui/crane": "^2.1.8",
|
|
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.
|
|
78
|
+
"@web/test-runner": "0.20.2",
|
|
76
79
|
"@web/test-runner-core": "0.13.4",
|
|
77
|
-
"@web/test-runner-playwright": "0.11.
|
|
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.
|
|
82
|
-
"publint": "0.
|
|
83
|
-
"web-test-runner-jasmine": "0.1.
|
|
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",
|
|
90
|
+
"@blueprintui-internals/eslint": "0.0.0",
|
|
85
91
|
"@blueprintui/layout": "^2.2.0",
|
|
86
92
|
"@blueprintui/test": "^0.0.0",
|
|
87
93
|
"@blueprintui/typography": "^2.2.0"
|
|
@@ -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": [
|