@blueprintui/grid 1.11.1 → 1.12.0

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.
@@ -1261,12 +1261,6 @@
1261
1261
  "declarations": [],
1262
1262
  "exports": []
1263
1263
  },
1264
- {
1265
- "kind": "javascript-module",
1266
- "path": "/include/pagination.js",
1267
- "declarations": [],
1268
- "exports": []
1269
- },
1270
1264
  {
1271
1265
  "kind": "javascript-module",
1272
1266
  "path": "/include/placeholder.js",
@@ -1308,14 +1302,6 @@
1308
1302
  "package": "./footer/element.js"
1309
1303
  }
1310
1304
  },
1311
- {
1312
- "kind": "js",
1313
- "name": "*",
1314
- "declaration": {
1315
- "name": "*",
1316
- "package": "./pagination/element.js"
1317
- }
1318
- },
1319
1305
  {
1320
1306
  "kind": "js",
1321
1307
  "name": "*",
@@ -1769,192 +1755,6 @@
1769
1755
  }
1770
1756
  ]
1771
1757
  },
1772
- {
1773
- "kind": "javascript-module",
1774
- "path": "/pagination/element.css",
1775
- "declarations": [],
1776
- "exports": []
1777
- },
1778
- {
1779
- "kind": "javascript-module",
1780
- "path": "/pagination/element.js",
1781
- "declarations": [
1782
- {
1783
- "kind": "class",
1784
- "description": "Grid Pagination\n\n```typescript\nimport '@blueprintui/grid/include/core.js';\n```\n\n```html\n<bp-grid-pagination></bp-grid-pagination>\n```",
1785
- "name": "BpGridPagination",
1786
- "members": [
1787
- {
1788
- "kind": "field",
1789
- "name": "i18n",
1790
- "attribute": "i18n"
1791
- },
1792
- {
1793
- "kind": "field",
1794
- "name": "page",
1795
- "type": {
1796
- "text": "number"
1797
- },
1798
- "default": "1",
1799
- "attribute": "page"
1800
- },
1801
- {
1802
- "kind": "field",
1803
- "name": "pageSize",
1804
- "type": {
1805
- "text": "number"
1806
- },
1807
- "default": "10",
1808
- "attribute": "page-size"
1809
- },
1810
- {
1811
- "kind": "field",
1812
- "name": "pageCount",
1813
- "type": {
1814
- "text": "number"
1815
- },
1816
- "default": "1",
1817
- "attribute": "page-count"
1818
- },
1819
- {
1820
- "kind": "field",
1821
- "name": "pageSizeOptions",
1822
- "type": {
1823
- "text": "number[]"
1824
- },
1825
- "default": "[]",
1826
- "attribute": "page-size-options"
1827
- },
1828
- {
1829
- "kind": "method",
1830
- "name": "#setPage",
1831
- "parameters": [
1832
- {
1833
- "name": "event",
1834
- "type": {
1835
- "text": "any"
1836
- }
1837
- }
1838
- ]
1839
- },
1840
- {
1841
- "kind": "method",
1842
- "name": "#nextPage"
1843
- },
1844
- {
1845
- "kind": "method",
1846
- "name": "#prevPage"
1847
- },
1848
- {
1849
- "kind": "method",
1850
- "name": "#firstPage"
1851
- },
1852
- {
1853
- "kind": "method",
1854
- "name": "#lastPage"
1855
- },
1856
- {
1857
- "kind": "method",
1858
- "name": "#pageChange",
1859
- "parameters": [
1860
- {
1861
- "name": "detail",
1862
- "type": {
1863
- "text": "number"
1864
- }
1865
- }
1866
- ]
1867
- },
1868
- {
1869
- "kind": "method",
1870
- "name": "#sizeChange",
1871
- "parameters": [
1872
- {
1873
- "name": "detail",
1874
- "type": {
1875
- "text": "number"
1876
- }
1877
- }
1878
- ]
1879
- }
1880
- ],
1881
- "events": [
1882
- {
1883
- "name": "page",
1884
- "type": {
1885
- "text": "CustomEvent"
1886
- }
1887
- },
1888
- {
1889
- "name": "size",
1890
- "type": {
1891
- "text": "CustomEvent"
1892
- }
1893
- }
1894
- ],
1895
- "attributes": [
1896
- {
1897
- "name": "i18n",
1898
- "fieldName": "i18n"
1899
- },
1900
- {
1901
- "name": "page",
1902
- "type": {
1903
- "text": "number"
1904
- },
1905
- "default": "1",
1906
- "fieldName": "page"
1907
- },
1908
- {
1909
- "name": "page-size",
1910
- "type": {
1911
- "text": "number"
1912
- },
1913
- "default": "10",
1914
- "fieldName": "pageSize"
1915
- },
1916
- {
1917
- "name": "page-count",
1918
- "type": {
1919
- "text": "number"
1920
- },
1921
- "default": "1",
1922
- "fieldName": "pageCount"
1923
- },
1924
- {
1925
- "name": "page-size-options",
1926
- "type": {
1927
- "text": "number[]"
1928
- },
1929
- "default": "[]",
1930
- "fieldName": "pageSizeOptions"
1931
- }
1932
- ],
1933
- "superclass": {
1934
- "name": "LitElement",
1935
- "package": "lit"
1936
- },
1937
- "tagName": "bp-grid-pagination",
1938
- "customElement": true
1939
- }
1940
- ],
1941
- "exports": [
1942
- {
1943
- "kind": "js",
1944
- "name": "BpGridPagination",
1945
- "declaration": {
1946
- "name": "BpGridPagination",
1947
- "module": "/pagination/element.js"
1948
- }
1949
- }
1950
- ]
1951
- },
1952
- {
1953
- "kind": "javascript-module",
1954
- "path": "/pagination/element.visual.js",
1955
- "declarations": [],
1956
- "exports": []
1957
- },
1958
1758
  {
1959
1759
  "kind": "javascript-module",
1960
1760
  "path": "/placeholder/element.css",
@@ -1983,6 +1783,14 @@
1983
1783
  },
1984
1784
  "default": "'0'"
1985
1785
  },
1786
+ {
1787
+ "kind": "field",
1788
+ "name": "bpDraggableItem",
1789
+ "type": {
1790
+ "text": "null"
1791
+ },
1792
+ "privacy": "private"
1793
+ },
1986
1794
  {
1987
1795
  "kind": "field",
1988
1796
  "name": "#internals",
@@ -1 +1 @@
1
- const i=new CSSStyleSheet;i.replaceSync(":host{--min-height:var(--bp-size-9, var(--bp-interaction-touch-target));--padding-block:0;--padding-inline:var(--bp-size-6)}[part=internal]{min-height:var(--min-height);display:flex;align-items:center;padding-inline:var(--padding-inline);padding-block:var(--padding-block);border-top:var(--cell-border-width, var(--bp-object-border-width-100)) solid var(--bp-object-border-color-100);color:var(--bp-text-color-500);background:var(--background);font-size:var(--bp-text-size-200);width:100%}::slotted(bp-grid-pagination),::slotted(bp-pagination){margin-left:auto}");export{i as default};
1
+ const i=new CSSStyleSheet;i.replaceSync(":host{--min-height:var(--bp-size-9, var(--bp-interaction-touch-target));--padding-block:0;--padding-inline:var(--bp-size-6)}[part=internal]{min-height:var(--min-height);display:flex;align-items:center;padding-inline:var(--padding-inline);padding-block:var(--padding-block);border-top:var(--cell-border-width, var(--bp-object-border-width-100)) solid var(--bp-object-border-color-100);color:var(--bp-text-color-500);background:var(--background);font-size:var(--bp-text-size-200);width:100%}::slotted(bp-pagination),::slotted(bp-pagination-input){margin-left:auto}");export{i as default};
@@ -1 +1 @@
1
- const e=new CSSStyleSheet;e.replaceSync("bp-grid-row:has(bp-grid-cell:first-child bp-checkbox:--checked),bp-grid-row:has(bp-grid-cell:first-child bp-radio:--checked){--bp-interaction-offset:var(--bp-interaction-selected-offset)}bp-grid-cell[role=rowheader]:first-child{--bp-interaction-offset:var(--bp-interaction-selected-offset);--cell-border-width:var(--bp-size-1)}bp-grid-row bp-grid-cell:last-child{--border-right:0}");export{e as default};
1
+ const e=new CSSStyleSheet;e.replaceSync("bp-grid-row:has(bp-grid-cell:first-child bp-checkbox:--checked),bp-grid-row:has(bp-grid-cell:first-child bp-radio:--checked){--bp-interaction-offset:var(--bp-interaction-selected-offset)}bp-grid-cell[role=rowheader]:first-child{--bp-interaction-offset:var(--bp-interaction-selected-offset);--cell-border-width:var(--bp-size-1)}bp-grid-row bp-grid-cell:last-child{--border-right:0}bp-grid-cell:has(bp-button-handle){--padding-inline:var(--bp-size-4)}");export{e as default};
package/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export * from './cell/element.js';
2
2
  export * from './column/element.js';
3
3
  export * from './footer/element.js';
4
- export * from './pagination/element.js';
5
4
  export * from './placeholder/element.js';
6
5
  export * from './row/element.js';
7
6
  export * from './grid/element.js';
package/index.js CHANGED
@@ -1 +1 @@
1
- export{BpGridCell}from"./cell/element.js";export{BpGridColumn}from"./column/element.js";export{BpGridFooter}from"./footer/element.js";export{BpGridPagination}from"./pagination/element.js";export{BpGridPlaceholder}from"./placeholder/element.js";export{BpGridRow}from"./row/element.js";export{BpGrid}from"./grid/element.js";
1
+ export{BpGridCell}from"./cell/element.js";export{BpGridColumn}from"./column/element.js";export{BpGridFooter}from"./footer/element.js";export{BpGridPlaceholder}from"./placeholder/element.js";export{BpGridRow}from"./row/element.js";export{BpGrid}from"./grid/element.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueprintui/grid",
3
- "version": "1.11.1",
3
+ "version": "1.12.0",
4
4
  "main": "./index.js",
5
5
  "module": "./index.js",
6
6
  "typings": "./index.d.ts",
@@ -42,6 +42,7 @@ export declare class BpGridPlaceholder extends LitElement {
42
42
  pageSize: string;
43
43
  };
44
44
  _colSpan: string;
45
+ private bpDraggableItem;
45
46
  static styles: CSSStyleSheet[];
46
47
  render(): import("lit-html").TemplateResult<1>;
47
48
  connectedCallback(): void;
@@ -1 +1 @@
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 a from"./element.css.js";let o=class extends e{static properties={i18n:{type:Object},_colSpan:{state:!0}};constructor(){super(...arguments);this.i18n=s.keys.actions,this._colSpan="0"}static styles=[n,a];#t=this.attachInternals();render(){return r`<slot role="gridcell" part="internal" .ariaColSpan="${this._colSpan}">${"false"!==this.getAttribute("draggable")?r`<p>${this.i18n.noData}</p>`:r`<p sr-only>${this.i18n.dropTarget}</p>`}</slot>`}connectedCallback(){super.connectedCallback(),this.#t.role="row"}};o=t([i({key:"actions"})],o);export{o 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 o}from"@blueprintui/components/internals";import a from"./element.css.js";let i=class extends e{static properties={i18n:{type:Object},_colSpan:{state:!0},bpDraggableItem:{state:!0}};constructor(){super(...arguments);this.i18n=s.keys.actions,this._colSpan="0"}static styles=[n,a];#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"}};i=t([o({key:"actions"})],i);export{i as BpGridPlaceholder};
@@ -1 +1 @@
1
- const t=new CSSStyleSheet;t.replaceSync(":host{--min-height:var(--row-height);--border-top:0;--border-bottom:0;--box-shadow:none;content-visibility:var(--row-content-visibility, auto);contain-intrinsic-size:auto var(--min-height)}:host([position='fixed']) ::slotted(bp-grid-cell),:host([position='sticky']) ::slotted(bp-grid-cell),:host([selected]) ::slotted(bp-grid-cell){--bp-interaction-offset:var(--bp-interaction-selected-offset)}slot{background:color-mix(in oklab,var(--background),black var(--bp-interaction-offset, 0%));grid-template-columns:var(--ch-grid);box-shadow:var(--box-shadow);min-height:var(--min-height);border-top:var(--border-top);border-bottom:var(--border-bottom);display:grid}:host([position='fixed']),:host([position='sticky']){--border-bottom:0;--box-shadow:0 var(--bp-object-border-width-100) var(--bp-object-border-width-100) -1px var(--bp-object-border-color-100);--row-content-visibility:visible;z-index:99;position:sticky;top:calc(var(--min-height) + var(--bp-size-1))}:host([draggable='true']){-webkit-user-drag:element;user-select:none}:host([bp-draggable*='target']){--box-shadow:inset 0 var(--bp-object-border-width-300) 0 calc(var(--bp-size-1) * -1)\n var(--bp-interaction-accent-background)}");export{t as default};
1
+ const t=new CSSStyleSheet;t.replaceSync(":host{--min-height:var(--row-height);--border-top:0;--border-bottom:0;--box-shadow:none;content-visibility:var(--row-content-visibility, auto);contain-intrinsic-size:auto var(--min-height)}:host([position='fixed']) ::slotted(bp-grid-cell),:host([position='sticky']) ::slotted(bp-grid-cell),:host([selected]) ::slotted(bp-grid-cell){--bp-interaction-offset:var(--bp-interaction-selected-offset)}slot{background:color-mix(in oklab,var(--background),black var(--bp-interaction-offset, 0%));grid-template-columns:var(--ch-grid);box-shadow:var(--box-shadow);min-height:var(--min-height);border-top:var(--border-top);border-bottom:var(--border-bottom);display:grid}:host([position='fixed']),:host([position='sticky']){--border-bottom:0;--box-shadow:0 var(--bp-object-border-width-100) var(--bp-object-border-width-100) -1px var(--bp-object-border-color-100);--row-content-visibility:visible;z-index:99;position:sticky;top:calc(var(--min-height) + var(--bp-size-1))}:host([draggable='true']){-webkit-user-drag:element;user-select:none}:host([bp-crane*='target']){--box-shadow:inset 0 var(--bp-object-border-width-200) 0 calc(var(--bp-size-1) * -1)\n var(--bp-interaction-accent-background)}");export{t as default};
@@ -1,10 +0,0 @@
1
- import '@blueprintui/components/include/button-icon.js';
2
- import '@blueprintui/components/include/pagination.js';
3
- import '@blueprintui/components/include/select.js';
4
- import '@blueprintui/components/include/input.js';
5
- import { BpGridPagination } from '../pagination/element.js';
6
- declare global {
7
- interface HTMLElementTagNameMap {
8
- 'bp-grid-pagination': BpGridPagination;
9
- }
10
- }
@@ -1 +0,0 @@
1
- import{defineElement as n}from"@blueprintui/components/internals";import"@blueprintui/components/include/button-icon.js";import"@blueprintui/components/include/pagination.js";import"@blueprintui/components/include/select.js";import"@blueprintui/components/include/input.js";import{BpGridPagination as i}from"../pagination/element.js";n("bp-grid-pagination",i);
@@ -1 +0,0 @@
1
- const t=new CSSStyleSheet;t.replaceSync("[part=internal]{display:flex;gap:var(--bp-space-sm)}button{background:0 0;border:0;cursor:pointer}button[disabled]{cursor:not-allowed}bp-select{--width:fit-content;--min-width:0}");export{t as default};
@@ -1,56 +0,0 @@
1
- import { LitElement } from 'lit';
2
- /**
3
- * Grid Pagination
4
- *
5
- * ```typescript
6
- * import '@blueprintui/grid/include/core.js';
7
- * ```
8
- *
9
- * ```html
10
- * <bp-grid-pagination></bp-grid-pagination>
11
- * ```
12
- *
13
- * @element bp-grid-pagination
14
- * @event page
15
- * @event size
16
- */
17
- export declare class BpGridPagination extends LitElement {
18
- #private;
19
- i18n: {
20
- sort: string;
21
- none: string;
22
- ascending: string;
23
- descending: string;
24
- expand: string;
25
- close: string;
26
- resize: string;
27
- filter: string;
28
- loading: string;
29
- show: string;
30
- hide: string;
31
- previous: string;
32
- next: string;
33
- first: string;
34
- last: string;
35
- today: string;
36
- browse: string;
37
- removeFile: string;
38
- files: string;
39
- resizeColumn: string;
40
- closeDetails: string;
41
- noData: string;
42
- action: string;
43
- dropTarget: string;
44
- firstPage: string;
45
- previousPage: string;
46
- nextPage: string;
47
- lastPage: string;
48
- pageSize: string;
49
- };
50
- page: number;
51
- pageSize: number;
52
- pageCount: number;
53
- pageSizeOptions: number[];
54
- static styles: CSSStyleSheet[];
55
- render(): import("lit-html").TemplateResult<1>;
56
- }
@@ -1 +0,0 @@
1
- import{__decorate as e}from"tslib";import{LitElement as t,html as i}from"lit";import{I18nService as a,baseStyles as s,i18n as p}from"@blueprintui/components/internals";import n from"./element.css.js";let g=class extends t{static properties={i18n:{type:Object},page:{type:Number},pageSize:{type:Number,attribute:"page-size"},pageCount:{type:Number,attribute:"page-count"},pageSizeOptions:{type:Array,attribute:"page-size-options"}};constructor(){super(...arguments);this.i18n=a.keys.actions,this.page=1,this.pageSize=10,this.pageCount=1,this.pageSizeOptions=[]}static styles=[s,n];render(){return i`<section part="internal"><bp-pagination aria-label="pagination">${this.pageSizeOptions.length?i`<bp-select slot="page-size" .value="${this.pageSize.toString()}" .ariaLabel="${this.i18n.pageSize}" @input="${e=>this.#e(parseInt(e.target.value))}">${this.pageSizeOptions.map((e=>i`<bp-option value="${e}" ?selected="${e===this.pageSize}">${e}</bp-option>`))}</bp-select>`:""}<bp-button-icon slot="first" .ariaLabel="${this.i18n.firstPage}" .disabled="${1===this.page}" @click="${this.#t}"></bp-button-icon><bp-button-icon slot="prev" .ariaLabel="${this.i18n.previousPage}" .disabled="${1===this.page}" @click="${this.#i}"></bp-button-icon><bp-field novalidate><bp-input type="number" size="${e=this.page,1+(0|Math.log10((e^e>>31)-(e>>31)))}" min="1" value="${this.page}" max="${this.pageCount}" .ariaLabel="${`${this.page} of ${this.pageCount}`}" @input="${this.#a}"></bp-input><bp-field-message>/ ${this.pageCount}</bp-field-message></bp-field><bp-button-icon slot="next" .ariaLabel="${this.i18n.nextPage}" ?disabled="${this.page===this.pageCount}" @click="${this.#s}"></bp-button-icon><bp-button-icon slot="last" .ariaLabel="${this.i18n.lastPage}" ?disabled="${this.page===this.pageCount}" @click="${this.#p}"></bp-button-icon></bp-pagination></section>`;var e}#a(e){this.#n(e.target.valueAsNumber)}#s(){this.#n(this.page+1)}#i(){this.#n(this.page-1)}#t(){this.#n(1)}#p(){this.#n(this.pageCount)}#n(e){this.dispatchEvent(new CustomEvent("page",{detail:e}))}#e(e){this.dispatchEvent(new CustomEvent("size",{detail:e}))}};g=e([p({key:"actions"})],g);export{g as BpGridPagination};