@blueprintui/grid 1.18.1 → 2.0.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.
Files changed (61) hide show
  1. package/.tsbuildinfo +1 -1
  2. package/README.md +2 -4
  3. package/assets/bundle-1e135afb.css +9 -0
  4. package/cell/element.css.js +1 -1
  5. package/cell/element.d.ts +1 -0
  6. package/cell/element.js +1 -1
  7. package/column/alignment.controller.js +1 -1
  8. package/column/element.css.js +1 -1
  9. package/column/element.d.ts +1 -0
  10. package/column/element.js +1 -1
  11. package/column/position.controller.js +1 -1
  12. package/column/width.controller.js +1 -1
  13. package/column-resize/index.d.ts +5 -0
  14. package/column-resize/index.js +1 -0
  15. package/csv/index.d.ts +3 -0
  16. package/csv/index.js +1 -0
  17. package/custom-elements.json +424 -1
  18. package/detail/element.css.js +1 -0
  19. package/detail/element.d.ts +62 -0
  20. package/detail/element.js +1 -0
  21. package/detail/index.d.ts +1 -0
  22. package/detail/index.js +1 -0
  23. package/draggable-column/index.d.ts +5 -0
  24. package/draggable-column/index.js +1 -0
  25. package/draggable-row/index.d.ts +5 -0
  26. package/draggable-row/index.js +1 -0
  27. package/footer/element.css.js +1 -1
  28. package/footer/element.d.ts +1 -0
  29. package/footer/element.js +1 -1
  30. package/grid/dom.controller.js +1 -1
  31. package/grid/element.css.js +1 -1
  32. package/grid/element.d.ts +3 -0
  33. package/grid/element.global.css.js +1 -1
  34. package/grid/element.js +1 -1
  35. package/grid/hover.controller.js +1 -1
  36. package/grid/layout.controller.js +1 -1
  37. package/header/element.css.js +1 -1
  38. package/header/element.d.ts +2 -0
  39. package/header/element.js +1 -1
  40. package/include/column-resize.d.ts +1 -0
  41. package/include/column-resize.js +1 -0
  42. package/include/detail.d.ts +8 -0
  43. package/include/detail.js +1 -0
  44. package/include/draggable-column.d.ts +1 -0
  45. package/include/draggable-column.js +1 -0
  46. package/include/draggable-row.d.ts +1 -0
  47. package/include/draggable-row.js +1 -0
  48. package/include/range-selection.d.ts +1 -0
  49. package/include/range-selection.js +1 -0
  50. package/internals/controllers/interaction-scroll-visibility.controller.js +1 -1
  51. package/internals/styles/focus.css.js +1 -1
  52. package/package.json +7 -7
  53. package/placeholder/element.css.js +1 -1
  54. package/placeholder/element.d.ts +1 -1
  55. package/placeholder/element.js +1 -1
  56. package/range-selection/index.d.ts +5 -0
  57. package/range-selection/index.js +1 -0
  58. package/row/element.css.js +1 -1
  59. package/row/element.d.ts +2 -0
  60. package/row/element.js +1 -1
  61. package/row/position.controller.js +1 -1
@@ -46,6 +46,9 @@
46
46
  },
47
47
  {
48
48
  "name": "--color"
49
+ },
50
+ {
51
+ "name": "--border-width"
49
52
  }
50
53
  ],
51
54
  "slots": [
@@ -109,6 +112,31 @@
109
112
  }
110
113
  ]
111
114
  },
115
+ {
116
+ "kind": "javascript-module",
117
+ "path": "/column-resize/index.js",
118
+ "declarations": [
119
+ {
120
+ "kind": "class",
121
+ "description": "",
122
+ "name": "GridColumnResizeController",
123
+ "superclass": {
124
+ "name": "InteractionResizeContextController",
125
+ "package": "@blueprintui/components/internals"
126
+ }
127
+ }
128
+ ],
129
+ "exports": [
130
+ {
131
+ "kind": "js",
132
+ "name": "GridColumnResizeController",
133
+ "declaration": {
134
+ "name": "GridColumnResizeController",
135
+ "module": "/column-resize/index.js"
136
+ }
137
+ }
138
+ ]
139
+ },
112
140
  {
113
141
  "kind": "javascript-module",
114
142
  "path": "/column/alignment.controller.js",
@@ -216,6 +244,9 @@
216
244
  },
217
245
  {
218
246
  "name": "--color"
247
+ },
248
+ {
249
+ "name": "--border-width"
219
250
  }
220
251
  ],
221
252
  "slots": [
@@ -476,6 +507,305 @@
476
507
  }
477
508
  ]
478
509
  },
510
+ {
511
+ "kind": "javascript-module",
512
+ "path": "/csv/index.js",
513
+ "declarations": [
514
+ {
515
+ "kind": "function",
516
+ "name": "exportCSV",
517
+ "parameters": [
518
+ {
519
+ "name": "grid",
520
+ "type": {
521
+ "text": "BpGrid"
522
+ }
523
+ }
524
+ ]
525
+ },
526
+ {
527
+ "kind": "function",
528
+ "name": "downloadCSV",
529
+ "parameters": [
530
+ {
531
+ "name": "grid",
532
+ "type": {
533
+ "text": "BpGrid"
534
+ }
535
+ }
536
+ ]
537
+ }
538
+ ],
539
+ "exports": [
540
+ {
541
+ "kind": "js",
542
+ "name": "exportCSV",
543
+ "declaration": {
544
+ "name": "exportCSV",
545
+ "module": "/csv/index.js"
546
+ }
547
+ },
548
+ {
549
+ "kind": "js",
550
+ "name": "downloadCSV",
551
+ "declaration": {
552
+ "name": "downloadCSV",
553
+ "module": "/csv/index.js"
554
+ }
555
+ }
556
+ ]
557
+ },
558
+ {
559
+ "kind": "javascript-module",
560
+ "path": "/detail/element.css",
561
+ "declarations": [],
562
+ "exports": []
563
+ },
564
+ {
565
+ "kind": "javascript-module",
566
+ "path": "/detail/element.js",
567
+ "declarations": [
568
+ {
569
+ "kind": "class",
570
+ "description": "Grid Detail\n\n```typescript\nimport '@blueprintui/grid/include/detail.js';\n```",
571
+ "name": "BpGridDetail",
572
+ "cssProperties": [
573
+ {
574
+ "name": "--full-width-breakpoint"
575
+ },
576
+ {
577
+ "name": "--background"
578
+ }
579
+ ],
580
+ "cssParts": [
581
+ {
582
+ "name": "pointer"
583
+ },
584
+ {
585
+ "name": "close"
586
+ }
587
+ ],
588
+ "members": [
589
+ {
590
+ "kind": "field",
591
+ "name": "i18n",
592
+ "attribute": "i18n"
593
+ },
594
+ {
595
+ "kind": "field",
596
+ "name": "position",
597
+ "type": {
598
+ "text": "'inline-start' | 'inline-end'"
599
+ },
600
+ "default": "'inline-end'",
601
+ "attribute": "position",
602
+ "reflects": true
603
+ },
604
+ {
605
+ "kind": "field",
606
+ "name": "trigger",
607
+ "type": {
608
+ "text": "HTMLElement | string"
609
+ },
610
+ "attribute": "trigger"
611
+ },
612
+ {
613
+ "kind": "field",
614
+ "name": "closable",
615
+ "type": {
616
+ "text": "boolean"
617
+ },
618
+ "attribute": "closable"
619
+ },
620
+ {
621
+ "kind": "field",
622
+ "name": "typePopoverController",
623
+ "type": {
624
+ "text": "TypePopoverController<this>"
625
+ },
626
+ "privacy": "protected"
627
+ },
628
+ {
629
+ "kind": "field",
630
+ "name": "#grid",
631
+ "privacy": "private",
632
+ "readonly": true
633
+ },
634
+ {
635
+ "kind": "field",
636
+ "name": "#observer",
637
+ "privacy": "private",
638
+ "type": {
639
+ "text": "MutationObserver"
640
+ }
641
+ },
642
+ {
643
+ "kind": "field",
644
+ "name": "_internals",
645
+ "type": {
646
+ "text": "ElementInternals"
647
+ }
648
+ },
649
+ {
650
+ "kind": "field",
651
+ "name": "#trigger",
652
+ "privacy": "private",
653
+ "type": {
654
+ "text": "HTMLElement"
655
+ },
656
+ "readonly": true
657
+ },
658
+ {
659
+ "kind": "field",
660
+ "name": "#triggerRow",
661
+ "privacy": "private",
662
+ "readonly": true
663
+ },
664
+ {
665
+ "kind": "field",
666
+ "name": "#fullWidthBreakpoint",
667
+ "privacy": "private",
668
+ "readonly": true
669
+ },
670
+ {
671
+ "kind": "method",
672
+ "name": "#setTriggerPointer",
673
+ "parameters": [
674
+ {
675
+ "name": "previousAnchor",
676
+ "optional": true,
677
+ "type": {
678
+ "text": "HTMLElement"
679
+ }
680
+ }
681
+ ]
682
+ },
683
+ {
684
+ "kind": "method",
685
+ "name": "#initializeResizeChange"
686
+ },
687
+ {
688
+ "kind": "method",
689
+ "name": "#alignPanel"
690
+ }
691
+ ],
692
+ "events": [
693
+ {
694
+ "name": "close"
695
+ }
696
+ ],
697
+ "attributes": [
698
+ {
699
+ "name": "i18n",
700
+ "fieldName": "i18n"
701
+ },
702
+ {
703
+ "name": "position",
704
+ "type": {
705
+ "text": "'inline-start' | 'inline-end'"
706
+ },
707
+ "default": "'inline-end'",
708
+ "fieldName": "position"
709
+ },
710
+ {
711
+ "name": "trigger",
712
+ "type": {
713
+ "text": "HTMLElement | string"
714
+ },
715
+ "fieldName": "trigger"
716
+ },
717
+ {
718
+ "name": "closable",
719
+ "type": {
720
+ "text": "boolean"
721
+ },
722
+ "fieldName": "closable"
723
+ }
724
+ ],
725
+ "superclass": {
726
+ "name": "LitElement",
727
+ "package": "lit"
728
+ },
729
+ "tagName": "bp-grid-detail",
730
+ "customElement": true
731
+ }
732
+ ],
733
+ "exports": [
734
+ {
735
+ "kind": "js",
736
+ "name": "BpGridDetail",
737
+ "declaration": {
738
+ "name": "BpGridDetail",
739
+ "module": "/detail/element.js"
740
+ }
741
+ }
742
+ ]
743
+ },
744
+ {
745
+ "kind": "javascript-module",
746
+ "path": "/detail/index.js",
747
+ "declarations": [],
748
+ "exports": [
749
+ {
750
+ "kind": "js",
751
+ "name": "*",
752
+ "declaration": {
753
+ "name": "*",
754
+ "package": "./element.js"
755
+ }
756
+ }
757
+ ]
758
+ },
759
+ {
760
+ "kind": "javascript-module",
761
+ "path": "/draggable-column/index.js",
762
+ "declarations": [
763
+ {
764
+ "kind": "class",
765
+ "description": "",
766
+ "name": "DraggableGridColumnController",
767
+ "superclass": {
768
+ "name": "DraggableListController",
769
+ "package": "@blueprintui/crane"
770
+ }
771
+ }
772
+ ],
773
+ "exports": [
774
+ {
775
+ "kind": "js",
776
+ "name": "DraggableGridColumnController",
777
+ "declaration": {
778
+ "name": "DraggableGridColumnController",
779
+ "module": "/draggable-column/index.js"
780
+ }
781
+ }
782
+ ]
783
+ },
784
+ {
785
+ "kind": "javascript-module",
786
+ "path": "/draggable-row/index.js",
787
+ "declarations": [
788
+ {
789
+ "kind": "class",
790
+ "description": "",
791
+ "name": "DraggableGridRowController",
792
+ "superclass": {
793
+ "name": "DraggableListController",
794
+ "package": "@blueprintui/crane"
795
+ }
796
+ }
797
+ ],
798
+ "exports": [
799
+ {
800
+ "kind": "js",
801
+ "name": "DraggableGridRowController",
802
+ "declaration": {
803
+ "name": "DraggableGridRowController",
804
+ "module": "/draggable-row/index.js"
805
+ }
806
+ }
807
+ ]
808
+ },
479
809
  {
480
810
  "kind": "javascript-module",
481
811
  "path": "/examples.data.js",
@@ -556,6 +886,9 @@
556
886
  },
557
887
  {
558
888
  "name": "--padding-inline"
889
+ },
890
+ {
891
+ "name": "--border-width"
559
892
  }
560
893
  ],
561
894
  "slots": [
@@ -789,6 +1122,9 @@
789
1122
  },
790
1123
  {
791
1124
  "name": "--row-content-visibility"
1125
+ },
1126
+ {
1127
+ "name": "--border-width"
792
1128
  }
793
1129
  ],
794
1130
  "members": [
@@ -860,6 +1196,17 @@
860
1196
  "attribute": "scroll-lock",
861
1197
  "reflects": true
862
1198
  },
1199
+ {
1200
+ "kind": "field",
1201
+ "name": "layer",
1202
+ "type": {
1203
+ "text": "'flat' | 'container'"
1204
+ },
1205
+ "default": "'container'",
1206
+ "description": "determines the visual layer style (container vs flat for nesting)",
1207
+ "attribute": "layer",
1208
+ "reflects": true
1209
+ },
863
1210
  {
864
1211
  "kind": "field",
865
1212
  "name": "rangeSelection",
@@ -1015,6 +1362,15 @@
1015
1362
  "description": "disables scroll container",
1016
1363
  "fieldName": "scrollLock"
1017
1364
  },
1365
+ {
1366
+ "name": "layer",
1367
+ "type": {
1368
+ "text": "'flat' | 'container'"
1369
+ },
1370
+ "default": "'container'",
1371
+ "description": "determines the visual layer style (container vs flat for nesting)",
1372
+ "fieldName": "layer"
1373
+ },
1018
1374
  {
1019
1375
  "name": "range-selection",
1020
1376
  "type": {
@@ -1249,6 +1605,12 @@
1249
1605
  },
1250
1606
  {
1251
1607
  "name": "--min-height"
1608
+ },
1609
+ {
1610
+ "name": "--border-width"
1611
+ },
1612
+ {
1613
+ "name": "--border-color"
1252
1614
  }
1253
1615
  ],
1254
1616
  "members": [
@@ -1312,12 +1674,36 @@
1312
1674
  "declarations": [],
1313
1675
  "exports": []
1314
1676
  },
1677
+ {
1678
+ "kind": "javascript-module",
1679
+ "path": "/include/column-resize.js",
1680
+ "declarations": [],
1681
+ "exports": []
1682
+ },
1315
1683
  {
1316
1684
  "kind": "javascript-module",
1317
1685
  "path": "/include/core.js",
1318
1686
  "declarations": [],
1319
1687
  "exports": []
1320
1688
  },
1689
+ {
1690
+ "kind": "javascript-module",
1691
+ "path": "/include/detail.js",
1692
+ "declarations": [],
1693
+ "exports": []
1694
+ },
1695
+ {
1696
+ "kind": "javascript-module",
1697
+ "path": "/include/draggable-column.js",
1698
+ "declarations": [],
1699
+ "exports": []
1700
+ },
1701
+ {
1702
+ "kind": "javascript-module",
1703
+ "path": "/include/draggable-row.js",
1704
+ "declarations": [],
1705
+ "exports": []
1706
+ },
1321
1707
  {
1322
1708
  "kind": "javascript-module",
1323
1709
  "path": "/include/footer.js",
@@ -1342,6 +1728,12 @@
1342
1728
  "declarations": [],
1343
1729
  "exports": []
1344
1730
  },
1731
+ {
1732
+ "kind": "javascript-module",
1733
+ "path": "/include/range-selection.js",
1734
+ "declarations": [],
1735
+ "exports": []
1736
+ },
1345
1737
  {
1346
1738
  "kind": "javascript-module",
1347
1739
  "path": "/include/row-position.js",
@@ -1849,7 +2241,7 @@
1849
2241
  "kind": "field",
1850
2242
  "name": "bpDraggableItem",
1851
2243
  "type": {
1852
- "text": "null"
2244
+ "text": "'dropzone' | undefined"
1853
2245
  },
1854
2246
  "privacy": "private"
1855
2247
  },
@@ -1906,6 +2298,31 @@
1906
2298
  }
1907
2299
  ]
1908
2300
  },
2301
+ {
2302
+ "kind": "javascript-module",
2303
+ "path": "/range-selection/index.js",
2304
+ "declarations": [
2305
+ {
2306
+ "kind": "class",
2307
+ "description": "",
2308
+ "name": "GridRangeSelectionController",
2309
+ "superclass": {
2310
+ "name": "InteractionRangeSelectionController",
2311
+ "package": "@blueprintui/components/internals"
2312
+ }
2313
+ }
2314
+ ],
2315
+ "exports": [
2316
+ {
2317
+ "kind": "js",
2318
+ "name": "GridRangeSelectionController",
2319
+ "declaration": {
2320
+ "name": "GridRangeSelectionController",
2321
+ "module": "/range-selection/index.js"
2322
+ }
2323
+ }
2324
+ ]
2325
+ },
1909
2326
  {
1910
2327
  "kind": "javascript-module",
1911
2328
  "path": "/row/element.css",
@@ -1932,6 +2349,12 @@
1932
2349
  },
1933
2350
  {
1934
2351
  "name": "--min-height"
2352
+ },
2353
+ {
2354
+ "name": "--border-width"
2355
+ },
2356
+ {
2357
+ "name": "--border-color"
1935
2358
  }
1936
2359
  ],
1937
2360
  "members": [
@@ -0,0 +1 @@
1
+ const r=new CSSStyleSheet;r.replaceSync(":host{--background:var(--bp-layer-background-200);--full-width-breakpoint:500px;z-index:99;inset:0;border:0;width:75%;margin:0;padding:0;position:absolute;inset-inline:auto 0}[part=internal]{background:var(--background);color:var(--bp-text-color-100);padding:var(--bp-size-700);border:0;border-inline-start:var(--bp-object-border-width-100)solid var(--bp-object-border-color-100);width:100%;height:100%;overflow-y:auto}:host([full-width]){inset:0!important}:host([full-width]) [part=pointer]{display:none!important}[shape=close]{z-index:99;top:var(--bp-size-500);position:absolute;inset-inline-end:var(--bp-size-500)}[part=pointer]{background:var(--background);border-left:var(--bp-object-border-width-100)solid var(--bp-object-border-color-100);border-bottom:var(--bp-object-border-width-100)solid var(--bp-object-border-color-100);width:calc(var(--row-height)/2);height:calc(var(--row-height)/2);border-radius:var(--bp-object-border-radius-100);z-index:999;position:absolute;inset-block-start:var(--pointer-top);inset-inline-start:calc(var(--row-height)/-4);transform:rotate(45deg)}:host(:--dir-rtl) [part=pointer]{transform:rotate(-135deg)}");export{r as default};
@@ -0,0 +1,62 @@
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ import { TypePopoverController } from '@blueprintui/components/internals';
3
+ /**
4
+ * Grid Detail
5
+ *
6
+ * ```typescript
7
+ * import '@blueprintui/grid/include/detail.js';
8
+ * ```
9
+ *
10
+ * @element bp-grid-detail
11
+ * @since 1.0.0
12
+ * @event close
13
+ * @csspart pointer
14
+ * @csspart close
15
+ * @cssprop --full-width-breakpoint
16
+ * @cssprop --background
17
+ */
18
+ export declare class BpGridDetail extends LitElement {
19
+ #private;
20
+ i18n: {
21
+ sort: string;
22
+ none: string;
23
+ ascending: string;
24
+ descending: string;
25
+ expand: string;
26
+ close: string;
27
+ resize: string;
28
+ filter: string;
29
+ loading: string;
30
+ show: string;
31
+ hide: string;
32
+ previous: string;
33
+ next: string;
34
+ first: string;
35
+ last: string;
36
+ today: string;
37
+ browse: string;
38
+ removeFile: string;
39
+ files: string;
40
+ resizeColumn: string;
41
+ closeDetails: string;
42
+ noData: string;
43
+ action: string;
44
+ dropTarget: string;
45
+ firstPage: string;
46
+ previousPage: string;
47
+ nextPage: string;
48
+ lastPage: string;
49
+ pageSize: string;
50
+ };
51
+ position: 'inline-start' | 'inline-end';
52
+ trigger: HTMLElement | string;
53
+ closable: boolean;
54
+ protected typePopoverController: TypePopoverController<this>;
55
+ _internals: ElementInternals;
56
+ static styles: CSSStyleSheet[];
57
+ render(): import("lit-html").TemplateResult<1>;
58
+ connectedCallback(): Promise<void>;
59
+ firstUpdated(props: PropertyValues<this>): void;
60
+ updated(props: PropertyValues): Promise<void>;
61
+ disconnectedCallback(): void;
62
+ }
@@ -0,0 +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",(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((t=>({focusTrap:!0,trigger:t.trigger}))),l({key:"actions"}),a(),g()],d);export{d as BpGridDetail};
@@ -0,0 +1 @@
1
+ export * from './element.js';
@@ -0,0 +1 @@
1
+ export{BpGridDetail}from"./element.js";
@@ -0,0 +1,5 @@
1
+ import { DraggableListController } from '@blueprintui/crane';
2
+ import { BpGrid } from '../grid/index.js';
3
+ export declare class DraggableGridColumnController extends DraggableListController<BpGrid> {
4
+ constructor(host: BpGrid);
5
+ }
@@ -0,0 +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};
@@ -0,0 +1,5 @@
1
+ import { DraggableListController } from '@blueprintui/crane';
2
+ import { BpGrid } from '../grid/index.js';
3
+ export declare class DraggableGridRowController extends DraggableListController<BpGrid> {
4
+ constructor(host: BpGrid);
5
+ }
@@ -0,0 +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 +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);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);align-items:center;width:100%;display:flex}::slotted(bp-pagination),::slotted(bp-pagination-input){margin-left:auto}");export{i as default};
1
+ const i=new CSSStyleSheet;i.replaceSync(":host{--min-height:var(--bp-size-900,var(--bp-interaction-touch-target));--padding-block:0;--padding-inline:var(--bp-size-600)}[part=internal]{min-height:var(--min-height);padding-inline:var(--padding-inline);padding-block:var(--padding-block);border-top:var(--border-width)solid var(--border-color);color:var(--bp-text-color-500);background:var(--background);font-size:var(--bp-text-size-200);align-items:center;width:100%;display:flex}::slotted(bp-pagination),::slotted(bp-pagination-input){margin-left:auto}");export{i as default};
@@ -13,6 +13,7 @@ import { LitElement } from 'lit';
13
13
  * @cssprop --background
14
14
  * @cssprop --padding-block
15
15
  * @cssprop --padding-inline
16
+ * @cssprop --border-width
16
17
  */
17
18
  export declare class BpGridFooter extends LitElement {
18
19
  #private;
package/footer/element.js CHANGED
@@ -1 +1 @@
1
- import{LitElement as t,html as e}from"lit";import{baseStyles as r,layerStyles as s}from"@blueprintui/components/internals";import l from"./element.css.js";class n extends t{static properties={_colSpan:{state:!0}};static styles=[r,s,l];constructor(){super(),this._colSpan=""}#t=this.attachInternals();render(){return e`<slot layer role="gridcell" part="internal" .ariaColSpan="${this._colSpan}"></slot>`}connectedCallback(){super.connectedCallback(),this.slot="footer",this.#t.role="row"}}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{host;#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}#l;get grid(){if(!this.#l){const s=this.columns.filter((t=>!t.ariaColSpan)),e=t([...s,...Array.from(this.cells)]);for(this.#l=[];e.length;)this.#l.push(e.splice(0,s.length))}return this.#l}#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",(()=>this.host.updateComplete.then((()=>{this.#i(),this.host.shadowRoot.dispatchEvent(new CustomEvent("bp-slotchange"))}))))}#i(){this.#l=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}#l;get grid(){if(!this.#l){const s=this.columns.filter((t=>!t.ariaColSpan)),e=t([...s,...Array.from(this.cells)]);for(this.#l=[];e.length;)this.#l.push(e.splice(0,s.length))}return this.#l}#i=0;get isStatic(){return this.#i++,1===this.#i&&!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",(()=>this.host.updateComplete.then((()=>{this.#h(),this.host.shadowRoot.dispatchEvent(new CustomEvent("bp-slotchange"))}))))}#h(){this.#l=null,this.#r=null,this.#e=null,this.#o=null,this.#t=null,this.#s=null}}export{s as GridDOMController};
@@ -1 +1 @@
1
- const r=new CSSStyleSheet;r.replaceSync("[hidden]{display:none!important}:host{--background:var(--bp-layer-container-background);--body-height:auto;--body-min-height:auto;--scrollbar-background:var(--background);--scrollbar-thumb-background:var(--bp-object-border-color-100);--column-height:var(--bp-size-9);--row-height:var(--bp-size-9);--scroll-padding-top:var(--column-height);--row-content-visibility:auto;--border:0;width:100%;display:block;position:relative}:host([range-selection]){user-select:none}:host([column-style*=border]) ::slotted(bp-grid-row){--cell-border-width:var(--bp-object-border-width-100);--border-top:0;--border-bottom:0}:host([row-style*=border]) ::slotted(bp-grid-row){--border-top:var(--bp-object-border-width-100)solid var(--bp-object-border-color-100)}:host([row-style*=border]) ::slotted(bp-grid-row:last-of-type){--border-bottom:var(--bp-object-border-width-100)solid var(--bp-object-border-color-100)}: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)}[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);flex-direction:column;width:100%;display:flex;overflow:auto}:host([scroll-lock]) .scroll-container{overflow:hidden}.body-row-group{margin-top:var(--bp-size-2);flex-direction:column;flex:1;min-width:fit-content;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(--bp-object-border-width-100)solid transparent}::-webkit-scrollbar{width:var(--bp-size-5);height:var(--bp-size-5);background:0 0}::-webkit-scrollbar-track{margin-top:var(--bp-interaction-touch-target);box-shadow:inset 0 0 var(--bp-size-5)var(--scrollbar-background)}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb-background);border-radius:var(--bp-object-border-radius-100);border:var(--bp-size-2)solid var(--scrollbar-background)}::-webkit-scrollbar-corner{background:rgba(0 0 0 0%)}@keyframes fadein{0%{opacity:0}to{opacity:1}}");export{r as default};
1
+ const r=new CSSStyleSheet;r.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);flex-direction:column;width:100%;display:flex;overflow:auto}:host([scroll-lock]) .scroll-container{overflow:hidden}.body-row-group{margin-top:var(--bp-size-200);flex-direction:column;flex:1;min-width:fit-content;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}::-webkit-scrollbar{width:var(--bp-size-500);height:var(--bp-size-500);background:0 0}::-webkit-scrollbar-track{margin-top:var(--bp-interaction-touch-target);box-shadow:inset 0 0 var(--bp-size-500)var(--scrollbar-background)}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb-background);border-radius:var(--bp-object-border-radius-100);border:var(--bp-size-200)solid var(--scrollbar-background)}::-webkit-scrollbar-corner{background:rgba(0 0 0 0%)}@keyframes fadein{0%{opacity:0}to{opacity:1}}");export{r as default};