@blueprintui/grid 2.1.3 → 2.1.5

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.
Files changed (120) hide show
  1. package/{cell → dist/cell}/element.css.js +1 -1
  2. package/{cell → dist/cell}/element.d.ts +1 -1
  3. package/{column → dist/column}/element.css.js +1 -1
  4. package/{column → dist/column}/element.d.ts +1 -1
  5. package/dist/column/element.js +1 -0
  6. package/dist/column/width.controller.js +1 -0
  7. package/{detail → dist/detail}/element.d.ts +1 -1
  8. package/dist/detail/element.js +1 -0
  9. package/{footer → dist/footer}/element.d.ts +1 -1
  10. package/dist/footer/element.js +1 -0
  11. package/{grid → dist/grid}/element.d.ts +1 -1
  12. package/dist/grid/element.js +1 -0
  13. package/{header → dist/header}/element.d.ts +1 -1
  14. package/{placeholder → dist/placeholder}/element.d.ts +1 -1
  15. package/dist/placeholder/element.js +1 -0
  16. package/{row → dist/row}/element.d.ts +1 -1
  17. package/dist/row/element.js +1 -0
  18. package/dist/vscode.css-custom-data.json +55 -0
  19. package/dist/vscode.html-custom-data.json +153 -0
  20. package/package.json +284 -25
  21. package/.tsbuildinfo +0 -1
  22. package/column/element.js +0 -1
  23. package/column/width.controller.js +0 -1
  24. package/detail/element.js +0 -1
  25. package/footer/element.js +0 -1
  26. package/grid/element.js +0 -1
  27. package/placeholder/element.js +0 -1
  28. package/row/element.js +0 -1
  29. /package/{cell → dist/cell}/element.js +0 -0
  30. /package/{cell → dist/cell}/index.d.ts +0 -0
  31. /package/{cell → dist/cell}/index.js +0 -0
  32. /package/{column → dist/column}/alignment.controller.d.ts +0 -0
  33. /package/{column → dist/column}/alignment.controller.js +0 -0
  34. /package/{column → dist/column}/index.d.ts +0 -0
  35. /package/{column → dist/column}/index.js +0 -0
  36. /package/{column → dist/column}/position.controller.d.ts +0 -0
  37. /package/{column → dist/column}/position.controller.js +0 -0
  38. /package/{column → dist/column}/width.controller.d.ts +0 -0
  39. /package/{column-resize → dist/column-resize}/index.d.ts +0 -0
  40. /package/{column-resize → dist/column-resize}/index.js +0 -0
  41. /package/{csv → dist/csv}/index.d.ts +0 -0
  42. /package/{csv → dist/csv}/index.js +0 -0
  43. /package/{custom-elements.json → dist/custom-elements.json} +0 -0
  44. /package/{detail → dist/detail}/element.css.js +0 -0
  45. /package/{detail → dist/detail}/index.d.ts +0 -0
  46. /package/{detail → dist/detail}/index.js +0 -0
  47. /package/{draggable-column → dist/draggable-column}/index.d.ts +0 -0
  48. /package/{draggable-column → dist/draggable-column}/index.js +0 -0
  49. /package/{draggable-row → dist/draggable-row}/index.d.ts +0 -0
  50. /package/{draggable-row → dist/draggable-row}/index.js +0 -0
  51. /package/{footer → dist/footer}/element.css.js +0 -0
  52. /package/{footer → dist/footer}/index.d.ts +0 -0
  53. /package/{footer → dist/footer}/index.js +0 -0
  54. /package/{grid → dist/grid}/dom.controller.d.ts +0 -0
  55. /package/{grid → dist/grid}/dom.controller.js +0 -0
  56. /package/{grid → dist/grid}/element.css.js +0 -0
  57. /package/{grid → dist/grid}/element.global.css.js +0 -0
  58. /package/{grid → dist/grid}/hover.controller.d.ts +0 -0
  59. /package/{grid → dist/grid}/hover.controller.js +0 -0
  60. /package/{grid → dist/grid}/index.d.ts +0 -0
  61. /package/{grid → dist/grid}/index.js +0 -0
  62. /package/{grid → dist/grid}/layout.controller.d.ts +0 -0
  63. /package/{grid → dist/grid}/layout.controller.js +0 -0
  64. /package/{header → dist/header}/element.css.js +0 -0
  65. /package/{header → dist/header}/element.js +0 -0
  66. /package/{header → dist/header}/index.d.ts +0 -0
  67. /package/{header → dist/header}/index.js +0 -0
  68. /package/{include → dist/include}/column-alignment.d.ts +0 -0
  69. /package/{include → dist/include}/column-alignment.js +0 -0
  70. /package/{include → dist/include}/column-position.d.ts +0 -0
  71. /package/{include → dist/include}/column-position.js +0 -0
  72. /package/{include → dist/include}/column-resize.d.ts +0 -0
  73. /package/{include → dist/include}/column-resize.js +0 -0
  74. /package/{include → dist/include}/core.d.ts +0 -0
  75. /package/{include → dist/include}/core.js +0 -0
  76. /package/{include → dist/include}/detail.d.ts +0 -0
  77. /package/{include → dist/include}/detail.js +0 -0
  78. /package/{include → dist/include}/draggable-column.d.ts +0 -0
  79. /package/{include → dist/include}/draggable-column.js +0 -0
  80. /package/{include → dist/include}/draggable-row.d.ts +0 -0
  81. /package/{include → dist/include}/draggable-row.js +0 -0
  82. /package/{include → dist/include}/footer.d.ts +0 -0
  83. /package/{include → dist/include}/footer.js +0 -0
  84. /package/{include → dist/include}/hover.d.ts +0 -0
  85. /package/{include → dist/include}/hover.js +0 -0
  86. /package/{include → dist/include}/keynav.d.ts +0 -0
  87. /package/{include → dist/include}/keynav.js +0 -0
  88. /package/{include → dist/include}/placeholder.d.ts +0 -0
  89. /package/{include → dist/include}/placeholder.js +0 -0
  90. /package/{include → dist/include}/range-selection.d.ts +0 -0
  91. /package/{include → dist/include}/range-selection.js +0 -0
  92. /package/{include → dist/include}/row-position.d.ts +0 -0
  93. /package/{include → dist/include}/row-position.js +0 -0
  94. /package/{index.d.ts → dist/index.d.ts} +0 -0
  95. /package/{index.js → dist/index.js} +0 -0
  96. /package/{internals → dist/internals}/controllers/interaction-scroll-visibility.controller.d.ts +0 -0
  97. /package/{internals → dist/internals}/controllers/interaction-scroll-visibility.controller.js +0 -0
  98. /package/{internals → dist/internals}/index.d.ts +0 -0
  99. /package/{internals → dist/internals}/index.js +0 -0
  100. /package/{internals → dist/internals}/styles/focus.css.js +0 -0
  101. /package/{internals → dist/internals}/types/index.d.ts +0 -0
  102. /package/{internals → dist/internals}/types/index.js +0 -0
  103. /package/{internals → dist/internals}/utils/events.d.ts +0 -0
  104. /package/{internals → dist/internals}/utils/events.js +0 -0
  105. /package/{internals → dist/internals}/utils/focus.d.ts +0 -0
  106. /package/{internals → dist/internals}/utils/focus.js +0 -0
  107. /package/{internals → dist/internals}/utils/traversal.d.ts +0 -0
  108. /package/{internals → dist/internals}/utils/traversal.js +0 -0
  109. /package/{placeholder → dist/placeholder}/element.css.js +0 -0
  110. /package/{placeholder → dist/placeholder}/index.d.ts +0 -0
  111. /package/{placeholder → dist/placeholder}/index.js +0 -0
  112. /package/{range-selection → dist/range-selection}/index.d.ts +0 -0
  113. /package/{range-selection → dist/range-selection}/index.js +0 -0
  114. /package/{row → dist/row}/element.css.js +0 -0
  115. /package/{row → dist/row}/index.d.ts +0 -0
  116. /package/{row → dist/row}/index.js +0 -0
  117. /package/{row → dist/row}/position.controller.d.ts +0 -0
  118. /package/{row → dist/row}/position.controller.js +0 -0
  119. /package/{test → dist/test}/index.d.ts +0 -0
  120. /package/{test → dist/test}/index.js +0 -0
@@ -1 +1 @@
1
- const t=new CSSStyleSheet;t.replaceSync(':host{--border-right:var(--cell-border-width)solid var(--border-color);--border-left:0;--min-width:var(--bp-size-900);--min-height:var(--bp-size-900);--font-size:var(--bp-text-size-200);--justify-content:var(--cell-justify-content,start);--padding-block:var(--bp-size-400);--padding-inline:var(--bp-size-600);--color:var(--bp-text-color-500);height:100%;display:block;position:sticky;outline:0!important}:host(:state(alignment-start)){--justify-content:start}:host(:state(alignment-center)){--justify-content:center}:host(:state(alignment-end)){--justify-content:end}slot{background:color-mix(in oklab,var(--background),black var(--bp-interaction-offset,0%));justify-content:var(--justify-content);border-left:var(--border-left);box-shadow:var(--box-shadow);border-right:var(--border-right);min-width:var(--min-width);min-height:var(--min-height);font-size:var(--font-size);padding-inline:var(--padding-inline);padding-block:var(--padding-block);color:var(--color);text-align:left;gap:var(--bp-space-sm);align-items:center;width:100%;height:100%;line-height:1em;display:flex;position:relative}:host(:state(highlight)) slot:after{background:var(--bp-interaction-highlight-background);content:"";pointer-events:none;display:block;position:absolute;inset:0}:host{--highlight-border:var(--border-width)solid var(--bp-status-accent-background-100)}:host(:state(highlight-block-start)) slot:after{border-block-start:var(--highlight-border)}:host(:state(highlight-block-end)) slot:after{border-block-end:var(--highlight-border)}:host(:state(highlight-inline-start)) slot:after{border-inline-start:var(--highlight-border)}:host(:state(highlight-inline-end)) slot:after{border-inline-end:var(--highlight-border)}');export{t as default};
1
+ const t=new CSSStyleSheet;t.replaceSync(':host{--border-right:var(--cell-border-width)solid var(--border-color);--border-left:0;--min-width:var(--bp-size-900);--min-height:var(--bp-size-900);--font-size:var(--bp-text-size-200);--justify-content:var(--cell-justify-content,start);--padding-block:var(--bp-size-400);--padding-inline:var(--bp-size-500);--color:var(--bp-text-color-500);height:100%;display:block;position:sticky;outline:0!important}:host(:state(alignment-start)){--justify-content:start}:host(:state(alignment-center)){--justify-content:center}:host(:state(alignment-end)){--justify-content:end}slot{background:color-mix(in oklab,var(--background),black var(--bp-interaction-offset,0%));justify-content:var(--justify-content);border-left:var(--border-left);box-shadow:var(--box-shadow);border-right:var(--border-right);min-width:var(--min-width);min-height:var(--min-height);font-size:var(--font-size);padding-inline:var(--padding-inline);padding-block:var(--padding-block);color:var(--color);text-align:left;gap:var(--bp-space-sm);align-items:center;width:100%;height:100%;line-height:1em;display:flex;position:relative}:host(:state(highlight)) slot:after{background:var(--bp-interaction-highlight-background);content:"";pointer-events:none;display:block;position:absolute;inset:0}:host{--highlight-border:var(--border-width)solid var(--bp-status-accent-background-100)}:host(:state(highlight-block-start)) slot:after{border-block-start:var(--highlight-border)}:host(:state(highlight-block-end)) slot:after{border-block-end:var(--highlight-border)}:host(:state(highlight-inline-start)) slot:after{border-inline-start:var(--highlight-border)}:host(:state(highlight-inline-end)) slot:after{border-inline-end:var(--highlight-border)}');export{t as default};
@@ -25,6 +25,6 @@ export declare class BpGridCell extends LitElement {
25
25
  static styles: CSSStyleSheet[];
26
26
  /** @private */
27
27
  _internals: ElementInternals;
28
- render(): import("lit-html").TemplateResult<1>;
28
+ render(): import("lit").TemplateResult<1>;
29
29
  constructor();
30
30
  }
@@ -1 +1 @@
1
- const t=new CSSStyleSheet;t.replaceSync(':host{--bp-layer:0;--min-height:var(--column-height,var(--bp-interaction-touch-target));--min-width:fit-content;--justify-content:start;--padding-block:var(--bp-size-400);--padding-inline:var(--bp-size-600);--font-size:var(--bp-text-size-200);--color:var(--bp-text-color-500);z-index:998;min-height:var(--min-height);min-width:var(--min-width);align-items:center;display:flex;position:sticky;top:0;outline:0!important}:host(:state(alignment-start)){--justify-content:start}:host(:state(alignment-center)){--justify-content:center}:host(:state(alignment-end)){--justify-content:end}[part=internal]{background:var(--background);min-height:var(--min-height);justify-content:var(--justify-content);padding-inline:var(--padding-inline);padding-block:var(--padding-block);font-size:var(--font-size);color:var(--color);border-bottom:var(--border-width)solid var(--border-color);text-align:left;white-space:nowrap;text-overflow:ellipsis;gap:var(--bp-size-sm);align-items:center;width:100%;height:100%;margin:0;font-weight:500;line-height:1em;display:flex;overflow:visible;position:sticky!important}:host([position=fixed]),:host([position=sticky]){z-index:999}[part=internal]:after{background:var(--border-color);width:var(--border-width);content:"";height:50%;display:none;position:absolute;right:0}[focused]+[part=internal]:after{background:var(--bp-interaction-accent-background);height:100vh;right:0}.border{right:0;top:var(--bp-size-400);bottom:var(--bp-size-400);width:var(--border-width);background:var(--border-color);position:absolute}:host([draggable=true]){-webkit-user-drag:element;user-select:none}::slotted(bp-button-handle){--width:var(--bp-size-700);--height:var(--bp-size-700)}.line{top:var(--min-height);background:var(--bp-interaction-accent-background);width:var(--border-width);height:100vh;display:none;position:absolute;bottom:0;right:0}:host([bp-crane*=target]) .line{right:initial;display:block;left:0}:host(:state(resizing)) .line{display:block}:host(:state(hover)){--interaction-offset:var(--bp-interaction-hover-offset)}::slotted([tabindex="0"]),::slotted(button){margin-left:auto}::slotted(bp-button-sort){--icon-height:14px;position:absolute;right:8px;--bp-interaction-outline-webkit:none!important;--bp-interaction-outline-offset:none!important;outline:none!important}::slotted(bp-button-resize){--height:32px;--background:var(--border-color);--width:var(--border-width);position:absolute;right:0}:host(:state(ch-last)) .border,:host(:state(ch-last)) ::slotted(bp-button-resize){display:none}');export{t as default};
1
+ const t=new CSSStyleSheet;t.replaceSync(':host{--bp-layer:0;--min-height:var(--column-height,var(--bp-interaction-touch-target));--min-width:fit-content;--justify-content:start;--padding-block:var(--bp-size-400);--padding-inline:var(--bp-size-500);--font-size:var(--bp-text-size-200);--color:var(--bp-text-color-500);z-index:998;min-height:var(--min-height);min-width:var(--min-width);align-items:center;display:flex;position:sticky;top:0;outline:0!important}:host(:state(alignment-start)){--justify-content:start}:host(:state(alignment-center)){--justify-content:center}:host(:state(alignment-end)){--justify-content:end}[part=internal]{background:var(--background);min-height:var(--min-height);justify-content:var(--justify-content);padding-inline:var(--padding-inline);padding-block:var(--padding-block);font-size:var(--font-size);color:var(--color);border-bottom:var(--border-width)solid var(--border-color);text-align:left;white-space:nowrap;text-overflow:ellipsis;gap:var(--bp-size-sm);align-items:center;width:100%;height:100%;margin:0;font-weight:500;line-height:1em;display:flex;overflow:visible;position:sticky!important}:host([position=fixed]),:host([position=sticky]){z-index:999}[part=internal]:after{background:var(--border-color);width:var(--border-width);content:"";height:50%;display:none;position:absolute;right:0}[focused]+[part=internal]:after{background:var(--bp-interaction-accent-background);height:100vh;right:0}.border{right:0;top:var(--bp-size-400);bottom:var(--bp-size-400);width:var(--border-width);background:var(--border-color);position:absolute}:host([draggable=true]){-webkit-user-drag:element;user-select:none}::slotted(bp-button-handle){--width:var(--bp-size-700);--height:var(--bp-size-700)}.line{top:var(--min-height);background:var(--bp-interaction-accent-background);width:var(--border-width);height:100vh;display:none;position:absolute;bottom:0;right:0}:host([bp-crane*=target]) .line{right:initial;display:block;left:0}:host(:state(resizing)) .line{display:block}:host(:state(hover)){--interaction-offset:var(--bp-interaction-hover-offset)}::slotted(bp-button-sort){--icon-height:14px;position:absolute;right:8px;--bp-interaction-outline-webkit:none!important;--bp-interaction-outline-offset:none!important;outline:none!important}::slotted(bp-button-resize){--height:32px;--background:var(--border-color);--width:var(--border-width);position:absolute;right:0}:host(:state(ch-last)) .border,:host(:state(ch-last)) ::slotted(bp-button-resize){display:none}::slotted([bp-layout~=inline:end]){margin-left:auto!important}');export{t as default};
@@ -29,6 +29,6 @@ export declare class BpGridColumn extends LitElement {
29
29
  static styles: CSSStyleSheet[];
30
30
  /** @private */
31
31
  _internals: ElementInternals;
32
- render(): import("lit-html").TemplateResult<1>;
32
+ render(): import("lit").TemplateResult<1>;
33
33
  constructor();
34
34
  }
@@ -0,0 +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};
@@ -0,0 +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};
@@ -54,7 +54,7 @@ export declare class BpGridDetail extends LitElement {
54
54
  protected typePopoverController: TypePopoverController<this>;
55
55
  _internals: ElementInternals;
56
56
  static styles: CSSStyleSheet[];
57
- render(): import("lit-html").TemplateResult<1>;
57
+ render(): import("lit").TemplateResult<1>;
58
58
  connectedCallback(): Promise<void>;
59
59
  firstUpdated(props: PropertyValues<this>): void;
60
60
  updated(props: PropertyValues): Promise<void>;
@@ -0,0 +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((t=>({focusTrap:!0,trigger:t.trigger}))),a({key:"actions"}),g(),p()],h);export{h as BpGridDetail};
@@ -19,6 +19,6 @@ export declare class BpGridFooter extends LitElement {
19
19
  #private;
20
20
  static styles: CSSStyleSheet[];
21
21
  _colSpan: string;
22
- render(): import("lit-html").TemplateResult<1>;
22
+ render(): import("lit").TemplateResult<1>;
23
23
  connectedCallback(): void;
24
24
  }
@@ -0,0 +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};
@@ -84,7 +84,7 @@ export declare class BpGrid extends LitElement {
84
84
  /** @private */
85
85
  get keyNavGrid(): HTMLElement;
86
86
  _internals: ElementInternals;
87
- render(): import("lit-html").TemplateResult<1>;
87
+ render(): import("lit").TemplateResult<1>;
88
88
  constructor();
89
89
  connectedCallback(): Promise<void>;
90
90
  }
@@ -0,0 +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.css.js";import y from"./element.global.css.js";let C=class extends o{static{this.styles=[i,m]}get gridLayoutControllerConfig(){return{columns:this.#t.columns,columnLayout:this.columnLayout,height:this.height}}#t;get grid(){return this.#t.grid}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.parentNode,[y]),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})],C.prototype,"i18n",void 0),t([r({type:String,reflect:!0})],C.prototype,"height",void 0),t([r({type:String,reflect:!0,attribute:"column-layout"})],C.prototype,"columnLayout",void 0),t([r({type:String,reflect:!0,attribute:"row-style"})],C.prototype,"rowStyle",void 0),t([r({type:String,reflect:!0,attribute:"column-style"})],C.prototype,"columnStyle",void 0),t([r({type:String,reflect:!0})],C.prototype,"selectable",void 0),t([r({type:Boolean,reflect:!0,attribute:"scroll-lock"})],C.prototype,"scrollLock",void 0),t([r({type:String,reflect:!0})],C.prototype,"layer",void 0),t([r({type:Boolean,reflect:!0,attribute:"range-selection"})],C.prototype,"rangeSelection",void 0),t([r({type:String,reflect:!0})],C.prototype,"_id",void 0),C=t([a(),h({key:"actions"}),c(),p()],C);export{C as BpGrid};
@@ -19,7 +19,7 @@ export declare class BpGridHeader extends LitElement {
19
19
  static styles: CSSStyleSheet[];
20
20
  /** @private */
21
21
  _internals: ElementInternals;
22
- render(): import("lit-html").TemplateResult<1>;
22
+ render(): import("lit").TemplateResult<1>;
23
23
  constructor();
24
24
  connectedCallback(): void;
25
25
  }
@@ -46,6 +46,6 @@ export declare class BpGridPlaceholder extends LitElement {
46
46
  _colSpan: string;
47
47
  private bpDraggableItem?;
48
48
  static styles: CSSStyleSheet[];
49
- render(): import("lit-html").TemplateResult<1>;
49
+ render(): import("lit").TemplateResult<1>;
50
50
  connectedCallback(): void;
51
51
  }
@@ -0,0 +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};
@@ -23,6 +23,6 @@ export declare class BpGridRow extends LitElement {
23
23
  static styles: CSSStyleSheet[];
24
24
  /** @private */
25
25
  _internals: ElementInternals;
26
- render(): import("lit-html").TemplateResult<1>;
26
+ render(): import("lit").TemplateResult<1>;
27
27
  constructor();
28
28
  }
@@ -0,0 +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};
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
3
+ "version": 1.1,
4
+ "properties": [
5
+ { "name": "--border-right", "values": [] },
6
+ { "name": "--border-left", "values": [] },
7
+ { "name": "--min-height", "values": [] },
8
+ { "name": "--min-width", "values": [] },
9
+ { "name": "--font-size", "values": [] },
10
+ { "name": "--justify-content", "values": [] },
11
+ { "name": "--padding-block", "values": [] },
12
+ { "name": "--padding-inline-start", "values": [] },
13
+ { "name": "--padding-inline-end", "values": [] },
14
+ { "name": "--color", "values": [] },
15
+ { "name": "--border-width", "values": [] },
16
+ { "name": "--min-height", "values": [] },
17
+ { "name": "--min-width", "values": [] },
18
+ { "name": "--justify-content", "values": [] },
19
+ { "name": "--padding-block", "values": [] },
20
+ { "name": "--padding-inline", "values": [] },
21
+ { "name": "--background", "values": [] },
22
+ { "name": "--font-size", "values": [] },
23
+ { "name": "--color", "values": [] },
24
+ { "name": "--border-width", "values": [] },
25
+ { "name": "--full-width-breakpoint", "values": [] },
26
+ { "name": "--background", "values": [] },
27
+ { "name": "--min-height", "values": [] },
28
+ { "name": "--background", "values": [] },
29
+ { "name": "--padding-block", "values": [] },
30
+ { "name": "--padding-inline", "values": [] },
31
+ { "name": "--border-width", "values": [] },
32
+ { "name": "--background", "values": [] },
33
+ { "name": "--body-height", "values": [] },
34
+ { "name": "--scrollbar-background", "values": [] },
35
+ { "name": "--scrollbar-thumb-background", "values": [] },
36
+ { "name": "--column-height", "values": [] },
37
+ { "name": "--row-height", "values": [] },
38
+ { "name": "--scroll-padding-top", "values": [] },
39
+ { "name": "--row-content-visibility", "values": [] },
40
+ { "name": "--border-width", "values": [] },
41
+ { "name": "--border-top", "values": [] },
42
+ { "name": "--border-bottom", "values": [] },
43
+ { "name": "--background", "values": [] },
44
+ { "name": "--min-height", "values": [] },
45
+ { "name": "--border-width", "values": [] },
46
+ { "name": "--border-color", "values": [] },
47
+ { "name": "--border-top", "values": [] },
48
+ { "name": "--border-bottom", "values": [] },
49
+ { "name": "--background", "values": [] },
50
+ { "name": "--min-height", "values": [] },
51
+ { "name": "--border-width", "values": [] },
52
+ { "name": "--border-color", "values": [] }
53
+ ],
54
+ "pseudoElements": [{ "name": "::part(pointer)" }, { "name": "::part(close)" }]
55
+ }
@@ -0,0 +1,153 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
3
+ "version": 1.1,
4
+ "tags": [
5
+ {
6
+ "name": "bp-grid-cell",
7
+ "description": "Grid Cell\n\n```typescript\nimport '@blueprintui/grid/include/core.js';\n```\n---\n\n\n### **Slots:**\n - _default_ - cell content\n\n### **CSS Properties:**\n - **--border-right** - undefined _(default: undefined)_\n- **--border-left** - undefined _(default: undefined)_\n- **--min-height** - undefined _(default: undefined)_\n- **--min-width** - undefined _(default: undefined)_\n- **--font-size** - undefined _(default: undefined)_\n- **--justify-content** - undefined _(default: undefined)_\n- **--padding-block** - undefined _(default: undefined)_\n- **--padding-inline-start** - undefined _(default: undefined)_\n- **--padding-inline-end** - undefined _(default: undefined)_\n- **--color** - undefined _(default: undefined)_\n- **--border-width** - undefined _(default: undefined)_",
8
+ "attributes": [],
9
+ "references": []
10
+ },
11
+ {
12
+ "name": "bp-grid-column",
13
+ "description": "Grid Column\n\n```typescript\nimport '@blueprintui/grid/include/core.js';\n```\n---\n\n\n### **Slots:**\n - _default_ - column content\n\n### **CSS Properties:**\n - **--min-height** - undefined _(default: undefined)_\n- **--min-width** - undefined _(default: undefined)_\n- **--justify-content** - undefined _(default: undefined)_\n- **--padding-block** - undefined _(default: undefined)_\n- **--padding-inline** - undefined _(default: undefined)_\n- **--background** - undefined _(default: undefined)_\n- **--font-size** - undefined _(default: undefined)_\n- **--color** - undefined _(default: undefined)_\n- **--border-width** - undefined _(default: undefined)_",
14
+ "attributes": [
15
+ {
16
+ "name": "width",
17
+ "description": "control width of grid column via numeric or CSS value types",
18
+ "values": []
19
+ },
20
+ {
21
+ "name": "position",
22
+ "description": "position individual column relative to the grid scroll container",
23
+ "values": [{ "name": "sticky" }, { "name": "fixed" }]
24
+ },
25
+ {
26
+ "name": "alignment",
27
+ "description": "align column content and corresponding column cells",
28
+ "values": [
29
+ { "name": "start" },
30
+ { "name": "center" },
31
+ { "name": "end" }
32
+ ]
33
+ }
34
+ ],
35
+ "references": []
36
+ },
37
+ {
38
+ "name": "bp-grid-detail",
39
+ "description": "Grid Detail\n\n```typescript\nimport '@blueprintui/grid/include/detail.js';\n```\n---\n\n\n### **Events:**\n - **close**\n\n### **CSS Properties:**\n - **--full-width-breakpoint** - undefined _(default: undefined)_\n- **--background** - undefined _(default: undefined)_\n\n### **CSS Parts:**\n - **pointer** - undefined\n- **close** - undefined",
40
+ "attributes": [
41
+ { "name": "i18n", "values": [] },
42
+ {
43
+ "name": "position",
44
+ "values": [{ "name": "inline-start" }, { "name": "inline-end" }]
45
+ },
46
+ { "name": "trigger", "values": [{ "name": "HTMLElement" }] },
47
+ { "name": "closable", "values": [] }
48
+ ],
49
+ "references": []
50
+ },
51
+ {
52
+ "name": "bp-grid-footer",
53
+ "description": "Grid Footer\n\n```typescript\nimport '@blueprintui/grid/include/core.js';\n```\n---\n\n\n### **Slots:**\n - _default_ - footer content\n\n### **CSS Properties:**\n - **--min-height** - undefined _(default: undefined)_\n- **--background** - undefined _(default: undefined)_\n- **--padding-block** - undefined _(default: undefined)_\n- **--padding-inline** - undefined _(default: undefined)_\n- **--border-width** - undefined _(default: undefined)_",
54
+ "attributes": [],
55
+ "references": []
56
+ },
57
+ {
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)_",
60
+ "attributes": [
61
+ {
62
+ "name": "i18n",
63
+ "description": "set default aria/i18n strings",
64
+ "values": []
65
+ },
66
+ {
67
+ "name": "height",
68
+ "description": "max height for grid container",
69
+ "values": []
70
+ },
71
+ {
72
+ "name": "column-layout",
73
+ "description": "column layout determines initial column width calculation",
74
+ "values": [{ "name": "fixed" }, { "name": "flex" }]
75
+ },
76
+ {
77
+ "name": "row-style",
78
+ "description": "determines the visual style for rows",
79
+ "values": [
80
+ { "name": "Permutations<\n 'hover'" },
81
+ { "name": "stripe" },
82
+ { "name": "'border'\n >" }
83
+ ]
84
+ },
85
+ {
86
+ "name": "column-style",
87
+ "description": "determines the visual style for columns",
88
+ "values": [
89
+ { "name": "Permutations<'hover'" },
90
+ { "name": "'border'>" }
91
+ ]
92
+ },
93
+ {
94
+ "name": "selectable",
95
+ "description": "initializes grid to appropriate aria/a11y settings for selections",
96
+ "values": [{ "name": "multi" }, { "name": "single" }]
97
+ },
98
+ {
99
+ "name": "scroll-lock",
100
+ "description": "disables scroll container",
101
+ "values": []
102
+ },
103
+ {
104
+ "name": "layer",
105
+ "description": "determines the visual layer style (container vs flat for nesting)",
106
+ "values": [{ "name": "flat" }, { "name": "container" }]
107
+ },
108
+ { "name": "range-selection", "values": [] },
109
+ { "name": "_id", "values": [] }
110
+ ],
111
+ "references": []
112
+ },
113
+ {
114
+ "name": "bp-grid-header",
115
+ "description": "Grid Row\n\n```typescript\nimport '@blueprintui/grid/include/core.js';\n```\n---\n\n\n### **CSS Properties:**\n - **--border-top** - undefined _(default: undefined)_\n- **--border-bottom** - undefined _(default: undefined)_\n- **--background** - undefined _(default: undefined)_\n- **--min-height** - undefined _(default: undefined)_\n- **--border-width** - undefined _(default: undefined)_\n- **--border-color** - undefined _(default: undefined)_",
116
+ "attributes": [],
117
+ "references": []
118
+ },
119
+ {
120
+ "name": "bp-grid-placeholder",
121
+ "description": "Grid Placeholder\n\n```typescript\nimport '@blueprintui/grid/include/core.js';\n```\n---\n",
122
+ "attributes": [
123
+ {
124
+ "name": "i18n",
125
+ "description": "set default aria/i18n strings",
126
+ "values": []
127
+ }
128
+ ],
129
+ "references": []
130
+ },
131
+ {
132
+ "name": "bp-grid-row",
133
+ "description": "Grid Row\n\n```typescript\nimport '@blueprintui/grid/include/core.js';\n```\n---\n\n\n### **CSS Properties:**\n - **--border-top** - undefined _(default: undefined)_\n- **--border-bottom** - undefined _(default: undefined)_\n- **--background** - undefined _(default: undefined)_\n- **--min-height** - undefined _(default: undefined)_\n- **--border-width** - undefined _(default: undefined)_\n- **--border-color** - undefined _(default: undefined)_",
134
+ "attributes": [
135
+ {
136
+ "name": "selected",
137
+ "description": "selected visual state",
138
+ "values": []
139
+ },
140
+ {
141
+ "name": "position",
142
+ "description": "position individual row relative to the grid scroll container",
143
+ "values": [
144
+ { "name": "fixed" },
145
+ { "name": "sticky" },
146
+ { "name": "''" }
147
+ ]
148
+ }
149
+ ],
150
+ "references": []
151
+ }
152
+ ]
153
+ }