@alaarab/ogrid-react-fluent 2.1.10 → 2.1.11

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.
@@ -426,14 +426,15 @@
426
426
  .ogrid-fluent__DataGridTable-module__tableWidthAnchor {
427
427
  position: relative;
428
428
  width: max-content;
429
- min-width: var(--data-table-min-width, max-content);
429
+ min-width: 100%;
430
+ overflow: clip;
430
431
  background: var(--ogrid-bg, #fff);
431
432
  }
432
433
  .ogrid-fluent__DataGridTable-module__tableWrapper {
433
434
  position: relative;
434
435
  flex: 1;
435
436
  min-height: 0;
436
- overflow-x: hidden;
437
+ overflow-x: auto;
437
438
  overflow-y: auto;
438
439
  width: 100%;
439
440
  min-width: 0;
@@ -442,8 +443,8 @@
442
443
  background: var(--ogrid-bg, #fff);
443
444
  will-change: scroll-position;
444
445
  }
445
- .ogrid-fluent__DataGridTable-module__tableWrapper[data-overflow-x=true] {
446
- overflow-x: auto;
446
+ .ogrid-fluent__DataGridTable-module__tableWrapper[data-suppress-scroll=true] {
447
+ overflow-x: hidden;
447
448
  }
448
449
  .ogrid-fluent__DataGridTable-module__tableWrapper[data-empty=true] {
449
450
  overflow-x: hidden;
@@ -452,9 +453,8 @@
452
453
  min-height: 200px;
453
454
  }
454
455
  .ogrid-fluent__DataGridTable-module__dataTable {
455
- width: var(--data-table-width, fit-content);
456
- max-width: 100%;
457
- min-width: var(--data-table-min-width, max-content);
456
+ width: var(--data-table-width, 100%);
457
+ min-width: max-content;
458
458
  border-collapse: separate;
459
459
  border-spacing: 0;
460
460
  box-sizing: border-box;
@@ -469,7 +469,7 @@
469
469
  text-align: center;
470
470
  font-weight: 600;
471
471
  border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
472
- padding: 6px 10px;
472
+ padding: var(--ogrid-cell-padding, 6px 10px);
473
473
  background: var(--ogrid-header-bg, #f5f5f5);
474
474
  }
475
475
  .ogrid-fluent__DataGridTable-module__headerCellContent {
@@ -511,7 +511,7 @@
511
511
  width: 3px;
512
512
  background: var(--ogrid-selection-color, #217346);
513
513
  pointer-events: none;
514
- z-index: 100;
514
+ z-index: var(--ogrid-z-drop-indicator, 100);
515
515
  transition: left 0.05s;
516
516
  }
517
517
  .ogrid-fluent__DataGridTable-module__resizeHandle {
@@ -522,7 +522,7 @@
522
522
  width: 8px;
523
523
  cursor: col-resize;
524
524
  user-select: none;
525
- z-index: 1;
525
+ z-index: var(--ogrid-z-resize-handle, 1);
526
526
  }
527
527
  .ogrid-fluent__DataGridTable-module__resizeHandle::after {
528
528
  content: "";
@@ -540,7 +540,7 @@
540
540
  }
541
541
  .ogrid-fluent__DataGridTable-module__pinnedColLeft {
542
542
  position: sticky;
543
- z-index: 6;
543
+ z-index: var(--ogrid-z-pinned, 6);
544
544
  background: var(--ogrid-bg, #ffffff);
545
545
  }
546
546
  .ogrid-fluent__DataGridTable-module__pinnedColLeft::after {
@@ -559,7 +559,7 @@
559
559
  }
560
560
  .ogrid-fluent__DataGridTable-module__pinnedColRight {
561
561
  position: sticky;
562
- z-index: 6;
562
+ z-index: var(--ogrid-z-pinned, 6);
563
563
  background: var(--ogrid-bg, #ffffff);
564
564
  }
565
565
  .ogrid-fluent__DataGridTable-module__pinnedColRight::before {
@@ -595,7 +595,7 @@
595
595
  .ogrid-fluent__DataGridTable-module__activeCellContent {
596
596
  outline: 2px solid var(--ogrid-selection-color, #217346);
597
597
  outline-offset: -1px;
598
- z-index: 2;
598
+ z-index: var(--ogrid-z-active-cell, 2);
599
599
  position: relative;
600
600
  overflow: visible;
601
601
  background: var(--ogrid-active-cell-bg, rgba(0, 0, 0, 0.02));
@@ -608,27 +608,27 @@
608
608
  box-sizing: border-box;
609
609
  outline: 2px solid var(--ogrid-selection-color, #217346);
610
610
  outline-offset: -1px;
611
- z-index: 2;
611
+ z-index: var(--ogrid-z-active-cell, 2);
612
612
  position: relative;
613
613
  background: var(--ogrid-bg, #fff);
614
614
  overflow: visible;
615
615
  padding: 0;
616
616
  }
617
- .ogrid-fluent__DataGridTable-module__cellInRange {
618
- background: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12)) !important;
617
+ .ogrid-fluent__DataGridTable-module__tableWrapper .ogrid-fluent__DataGridTable-module__cellInRange {
618
+ background: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12));
619
619
  }
620
- [data-drag-range] {
621
- background: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12)) !important;
620
+ .ogrid-fluent__DataGridTable-module__tableWrapper [data-drag-range] {
621
+ background: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12));
622
622
  }
623
- [data-drag-anchor] {
624
- background: var(--ogrid-bg, #fff) !important;
623
+ .ogrid-fluent__DataGridTable-module__tableWrapper [data-drag-anchor] {
624
+ background: var(--ogrid-bg, #fff);
625
625
  }
626
626
  .ogrid-fluent__DataGridTable-module__activeCellContent[data-drag-anchor],
627
627
  .ogrid-fluent__DataGridTable-module__activeCellContent[data-drag-range] {
628
628
  outline: none;
629
629
  }
630
- .ogrid-fluent__DataGridTable-module__cellCut {
631
- background: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04)) !important;
630
+ .ogrid-fluent__DataGridTable-module__tableWrapper .ogrid-fluent__DataGridTable-module__cellCut {
631
+ background: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04));
632
632
  opacity: 0.7;
633
633
  }
634
634
  .ogrid-fluent__DataGridTable-module__fillHandle {
@@ -642,7 +642,7 @@
642
642
  border-radius: 1px;
643
643
  cursor: crosshair;
644
644
  pointer-events: auto;
645
- z-index: 3;
645
+ z-index: var(--ogrid-z-fill-handle, 3);
646
646
  }
647
647
  .ogrid-fluent__DataGridTable-module__selectionHeaderCellInner,
648
648
  .ogrid-fluent__DataGridTable-module__selectionCellInner {
@@ -693,7 +693,7 @@
693
693
  }
694
694
  .ogrid-fluent__DataGridTable-module__contextMenu {
695
695
  position: fixed;
696
- z-index: 10000;
696
+ z-index: var(--ogrid-z-context-menu, 10000);
697
697
  min-width: 160px;
698
698
  padding: 4px 0;
699
699
  background: var(--ogrid-bg, #fff);
@@ -737,7 +737,7 @@
737
737
  .ogrid-fluent__DataGridTable-module__loadingOverlay {
738
738
  position: absolute;
739
739
  inset: 0;
740
- z-index: 2;
740
+ z-index: var(--ogrid-z-loading, 2);
741
741
  display: flex;
742
742
  align-items: center;
743
743
  justify-content: center;
@@ -816,6 +816,26 @@
816
816
  }
817
817
  }
818
818
  :where(:root) {
819
+ --ogrid-cell-padding: 6px 10px;
820
+ --ogrid-cell-padding-vertical: 6px;
821
+ --ogrid-cell-padding-horizontal: 10px;
822
+ --ogrid-z-resize-handle: 1;
823
+ --ogrid-z-active-cell: 2;
824
+ --ogrid-z-fill-handle: 3;
825
+ --ogrid-z-row-number: 5;
826
+ --ogrid-z-pinned: 6;
827
+ --ogrid-z-selection-cell: 7;
828
+ --ogrid-z-thead: 8;
829
+ --ogrid-z-pinned-header: 10;
830
+ --ogrid-z-header-focus: 11;
831
+ --ogrid-z-selection-header-pinned: 12;
832
+ --ogrid-z-checkbox: 12;
833
+ --ogrid-z-loading: 2;
834
+ --ogrid-z-drop-indicator: 100;
835
+ --ogrid-z-filter-popover: 1000;
836
+ --ogrid-z-popover: 1000;
837
+ --ogrid-z-fullscreen: 9999;
838
+ --ogrid-z-context-menu: 10000;
819
839
  --ogrid-bg: #ffffff;
820
840
  --ogrid-fg: rgba(0, 0, 0, 0.87);
821
841
  --ogrid-fg-secondary: rgba(0, 0, 0, 0.6);
@@ -944,8 +964,10 @@
944
964
  -webkit-overflow-scrolling: touch;
945
965
  outline: none;
946
966
  }
967
+ .ogrid-fluent__DataGridTable-module__tableWrapper .ogrid-fluent__DataGridTable-module__dataTable {
968
+ table-layout: auto;
969
+ }
947
970
  .ogrid-fluent__DataGridTable-module__dataTable {
948
- table-layout: auto !important;
949
971
  background-color: var(--colorNeutralBackground1, var(--ogrid-bg, #ffffff));
950
972
  }
951
973
  .ogrid-fluent__DataGridTable-module__dataTable .fui-TableHeaderCell,
@@ -963,16 +985,16 @@
963
985
  color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
964
986
  white-space: nowrap;
965
987
  background-color: var(--colorSubtleBackgroundSelected, var(--ogrid-header-bg, #f3f2f1));
966
- z-index: 8;
988
+ z-index: var(--ogrid-z-thead, 8);
967
989
  border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
968
990
  }
969
991
  .ogrid-fluent__DataGridTable-module__dataTable .fui-TableHeaderCell > .fui-TableHeaderCell__button {
970
- position: static !important;
992
+ position: static;
971
993
  }
972
994
  .ogrid-fluent__DataGridTable-module__dataTable .fui-TableHeaderCell:focus-visible {
973
995
  outline: 2px solid var(--colorBrandStroke1, var(--ogrid-accent, #0078d4));
974
996
  outline-offset: -2px;
975
- z-index: 11;
997
+ z-index: var(--ogrid-z-header-focus, 11);
976
998
  }
977
999
  .ogrid-fluent__DataGridTable-module__dataTable .fui-TableCell {
978
1000
  padding: 0;
@@ -1006,36 +1028,36 @@
1006
1028
  padding: 6px 10px;
1007
1029
  background: var(--ogrid-header-bg, #f3f2f1);
1008
1030
  }
1009
- .ogrid-fluent__DataGridTable-module__selectionHeaderCellWrapper {
1031
+ .ogrid-fluent__DataGridTable-module__dataTable .ogrid-fluent__DataGridTable-module__selectionHeaderCellWrapper {
1010
1032
  width: 48px;
1011
1033
  min-width: 48px;
1012
1034
  max-width: 48px;
1013
- padding: 4px !important;
1035
+ padding: 4px;
1014
1036
  text-align: center;
1015
1037
  }
1016
- .ogrid-fluent__DataGridTable-module__selectionCellWrapper {
1038
+ .ogrid-fluent__DataGridTable-module__dataTable .ogrid-fluent__DataGridTable-module__selectionCellWrapper {
1017
1039
  width: 48px;
1018
1040
  min-width: 48px;
1019
1041
  max-width: 48px;
1020
- padding: 4px !important;
1042
+ padding: 4px;
1021
1043
  text-align: center;
1022
1044
  }
1023
- .ogrid-fluent__DataGridTable-module__rowNumberHeaderCellWrapper {
1045
+ .ogrid-fluent__DataGridTable-module__dataTable .ogrid-fluent__DataGridTable-module__rowNumberHeaderCellWrapper {
1024
1046
  width: 50px;
1025
1047
  min-width: 50px;
1026
1048
  max-width: 50px;
1027
- padding: 4px 8px !important;
1049
+ padding: 4px 8px;
1028
1050
  text-align: center;
1029
1051
  background: var(--ogrid-header-bg, #f5f5f5);
1030
1052
  font-weight: 600;
1031
1053
  color: var(--colorNeutralForeground3, #666);
1032
1054
  border-right: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
1033
1055
  }
1034
- .ogrid-fluent__DataGridTable-module__rowNumberCellWrapper {
1056
+ .ogrid-fluent__DataGridTable-module__dataTable .ogrid-fluent__DataGridTable-module__rowNumberCellWrapper {
1035
1057
  width: 50px;
1036
1058
  min-width: 50px;
1037
1059
  max-width: 50px;
1038
- padding: 4px 8px !important;
1060
+ padding: 4px 8px;
1039
1061
  text-align: center;
1040
1062
  background: var(--colorNeutralBackground3, #f5f5f5);
1041
1063
  font-weight: 600;
@@ -1056,26 +1078,26 @@
1056
1078
  cursor: pointer;
1057
1079
  }
1058
1080
  .ogrid-fluent__DataGridTable-module__cellContent {
1059
- padding: 4px 8px;
1081
+ padding: var(--ogrid-cell-padding, 4px 8px);
1060
1082
  }
1061
- .ogrid-fluent__DataGridTable-module__activeCellContent {
1062
- outline: 2px solid var(--ogrid-selection-color, #217346) !important;
1063
- background-color: var(--ogrid-active-cell-bg, rgba(0, 0, 0, 0.02)) !important;
1083
+ .ogrid-fluent__DataGridTable-module__tableWrapper .ogrid-fluent__DataGridTable-module__activeCellContent {
1084
+ outline: 2px solid var(--ogrid-selection-color, #217346);
1085
+ background-color: var(--ogrid-active-cell-bg, rgba(0, 0, 0, 0.02));
1064
1086
  }
1065
- .ogrid-fluent__DataGridTable-module__cellInRange {
1066
- background-color: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12)) !important;
1087
+ .ogrid-fluent__DataGridTable-module__tableWrapper .ogrid-fluent__DataGridTable-module__cellInRange {
1088
+ background-color: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12));
1067
1089
  }
1068
- [data-drag-range] {
1069
- background-color: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12)) !important;
1090
+ .ogrid-fluent__DataGridTable-module__tableWrapper [data-drag-range] {
1091
+ background-color: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12));
1070
1092
  }
1071
- [data-drag-anchor] {
1072
- background-color: var(--ogrid-bg, #ffffff) !important;
1093
+ .ogrid-fluent__DataGridTable-module__tableWrapper [data-drag-anchor] {
1094
+ background-color: var(--ogrid-bg, #ffffff);
1073
1095
  }
1074
- .ogrid-fluent__DataGridTable-module__cellCut {
1075
- background-color: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04)) !important;
1096
+ .ogrid-fluent__DataGridTable-module__tableWrapper .ogrid-fluent__DataGridTable-module__cellCut {
1097
+ background-color: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04));
1076
1098
  }
1077
1099
  .ogrid-fluent__DataGridTable-module__stickyHeader {
1078
- z-index: 8;
1100
+ z-index: var(--ogrid-z-thead, 8);
1079
1101
  background-color: var(--colorSubtleBackgroundSelected, var(--ogrid-header-bg, #f3f2f1));
1080
1102
  }
1081
1103
  .ogrid-fluent__DataGridTable-module__stickyHeader .fui-TableHeaderCell {
@@ -1085,7 +1107,7 @@
1085
1107
  .ogrid-fluent__DataGridTable-module__stickyHeader .ogrid-fluent__DataGridTable-module__pinnedColLeft,
1086
1108
  .ogrid-fluent__DataGridTable-module__stickyHeader .ogrid-fluent__DataGridTable-module__pinnedColRight {
1087
1109
  top: 0;
1088
- z-index: 10;
1110
+ z-index: var(--ogrid-z-pinned-header, 10);
1089
1111
  }
1090
1112
  .ogrid-fluent__DataGridTable-module__dataTable .ogrid-fluent__DataGridTable-module__pinnedColLeft {
1091
1113
  background-color: var(--colorNeutralBackground1, var(--ogrid-bg, #ffffff));
package/dist/esm/index.js CHANGED
@@ -364,6 +364,8 @@ var ColumnHeaderFilter = React.memo((props) => {
364
364
  className: `${ColumnHeaderFilter_module_default.filterIcon} ${hasActiveFilter ? ColumnHeaderFilter_module_default.filterActive : ""} ${isFilterOpen ? ColumnHeaderFilter_module_default.filterOpen : ""}`,
365
365
  onClick: handlers.handleFilterIconClick,
366
366
  "aria-label": `Filter ${columnName}`,
367
+ "aria-expanded": isFilterOpen,
368
+ "aria-haspopup": "dialog",
367
369
  title: `Filter ${columnName}`,
368
370
  children: [
369
371
  /* @__PURE__ */ jsx(FilterRegular, {}),
@@ -556,6 +558,7 @@ function GridRowInner(props) {
556
558
  className: isSelected ? DataGridTable_module_default.selectedRow : void 0,
557
559
  "data-row-id": rowId,
558
560
  onClick: handleSingleRowClick,
561
+ "aria-selected": isSelected || void 0,
559
562
  children: [
560
563
  hasCheckboxCol && /* @__PURE__ */ jsx(TableCell, { className: DataGridTable_module_default.selectionCellWrapper, children: /* @__PURE__ */ jsx(
561
564
  "div",
@@ -622,11 +625,12 @@ function DataGridTableInner(props) {
622
625
  rowHeight,
623
626
  rowNumberOffset,
624
627
  headerRows,
625
- allowOverflowX,
628
+ allowOverflowX: _allowOverflowX,
626
629
  fitToContent,
627
630
  editCallbacks,
628
631
  interactionHandlers,
629
632
  cellDescriptorInputRef,
633
+ cellDescriptorCacheRef,
630
634
  pendingEditorValueRef,
631
635
  popoverAnchorElRef,
632
636
  handleSingleRowClick,
@@ -684,7 +688,7 @@ function DataGridTableInner(props) {
684
688
  });
685
689
  const renderCellContent = useCallback(
686
690
  (item, col, rowIndex, colIdx) => {
687
- const descriptor = getCellRenderDescriptor(item, col, rowIndex, colIdx, cellDescriptorInputRef.current);
691
+ const descriptor = getCellRenderDescriptor(item, col, rowIndex, colIdx, cellDescriptorInputRef.current, cellDescriptorCacheRef.current);
688
692
  const rowId = getRowId(item);
689
693
  let content;
690
694
  if (descriptor.mode === "editing-inline") {
@@ -743,7 +747,7 @@ function DataGridTableInner(props) {
743
747
  }
744
748
  return /* @__PURE__ */ jsx(CellErrorBoundary, { onError: onCellError, children: content }, `${rowId}-${col.columnId}`);
745
749
  },
746
- [editCallbacks, interactionHandlers, handleFillHandleMouseDown, setPopoverAnchorEl, cancelPopoverEdit, getRowId, onCellError, cellDescriptorInputRef, pendingEditorValueRef, popoverAnchorElRef]
750
+ [editCallbacks, interactionHandlers, handleFillHandleMouseDown, setPopoverAnchorEl, cancelPopoverEdit, getRowId, onCellError, cellDescriptorInputRef, cellDescriptorCacheRef, pendingEditorValueRef, popoverAnchorElRef]
747
751
  );
748
752
  return /* @__PURE__ */ jsxs("div", { style: GRID_ROOT_STYLE, children: [
749
753
  /* @__PURE__ */ jsxs(
@@ -761,7 +765,7 @@ function DataGridTableInner(props) {
761
765
  "data-empty": showEmptyInGrid ? "true" : void 0,
762
766
  "data-loading": isLoading && items.length === 0 ? "true" : void 0,
763
767
  "data-column-count": totalColCount,
764
- "data-overflow-x": allowOverflowX ? "true" : "false",
768
+ "data-suppress-scroll": o.suppressHorizontalScroll ? "true" : void 0,
765
769
  "data-container-width": containerWidth,
766
770
  "data-min-table-width": Math.round(minTableWidth),
767
771
  "data-has-selection": rowSelection !== "none" ? "true" : void 0,
@@ -769,9 +773,7 @@ function DataGridTableInner(props) {
769
773
  onKeyDown: handleGridKeyDown,
770
774
  style: {
771
775
  ["--data-table-column-count"]: totalColCount,
772
- ["--data-table-width"]: showEmptyInGrid ? "100%" : allowOverflowX ? "fit-content" : fitToContent ? "fit-content" : "100%",
773
- ["--data-table-min-width"]: showEmptyInGrid ? "100%" : allowOverflowX ? "max-content" : fitToContent ? "max-content" : "100%",
774
- ["--data-table-total-min-width"]: `${minTableWidth}px`,
776
+ ["--data-table-width"]: showEmptyInGrid ? "100%" : fitToContent ? "fit-content" : "100%",
775
777
  ...rowHeight ? { ["--ogrid-row-height"]: `${rowHeight}px` } : {}
776
778
  },
777
779
  children: [
@@ -804,6 +806,7 @@ function DataGridTableInner(props) {
804
806
  return /* @__PURE__ */ jsxs(
805
807
  TableHeaderCell,
806
808
  {
809
+ scope: "col",
807
810
  "data-column-id": col.columnId,
808
811
  className: columnMeta.hdrClasses[col.columnId] || void 0,
809
812
  style: {
@@ -833,6 +836,8 @@ function DataGridTableInner(props) {
833
836
  "div",
834
837
  {
835
838
  className: DataGridTable_module_default.resizeHandle,
839
+ role: "separator",
840
+ "aria-orientation": "vertical",
836
841
  onMouseDown: (e) => {
837
842
  setActiveCell(null);
838
843
  interaction.setSelectionRange(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-react-fluent",
3
- "version": "2.1.10",
3
+ "version": "2.1.11",
4
4
  "description": "OGrid React Fluent implementation – DataGrid-powered data table with sorting, filtering, pagination, column chooser, and CSV export.",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -41,7 +41,7 @@
41
41
  "node": ">=18"
42
42
  },
43
43
  "dependencies": {
44
- "@alaarab/ogrid-react": "2.1.10"
44
+ "@alaarab/ogrid-react": "2.1.11"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@fluentui/react-components": "^9.0.0",