@underverse-ui/underverse 1.0.160 → 1.0.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -2559,7 +2559,20 @@ type DataTableColumn<T> = {
2559
2559
  /** Advanced: Override auto-calculated colspan (defaults to number of leaf descendants) */
2560
2560
  colSpan?: number;
2561
2561
  /** Advanced: Override auto-calculated rowspan (defaults based on depth) */
2562
+ /** Advanced: Override auto-calculated rowspan (defaults based on depth) */
2562
2563
  rowSpan?: number;
2564
+ /**
2565
+ * Color tag for this column (hex or rgb string, e.g. "#3b82f6").
2566
+ * - Header cell gets a darker tinted background
2567
+ * - Body cells get a lighter tinted background
2568
+ * - Columns with the same colorTag are grouped together in the visibility dropdown
2569
+ */
2570
+ colorTag?: string;
2571
+ };
2572
+ /** Configuration for a column color group in the visibility dropdown */
2573
+ type ColumnColorGroup = {
2574
+ /** Display label for this group (e.g. "Bắt buộc", "Tùy chọn") */
2575
+ label: string;
2563
2576
  };
2564
2577
  type Sorter = {
2565
2578
  key: string;
@@ -2583,6 +2596,8 @@ type DataTableLabels = {
2583
2596
  alignRight?: string;
2584
2597
  noData?: string;
2585
2598
  sortBy?: string;
2599
+ selectAll?: string;
2600
+ default?: string;
2586
2601
  };
2587
2602
  /** Public props for the `DataTable` component. */
2588
2603
  interface DataTableProps<T> {
@@ -2597,6 +2612,12 @@ interface DataTableProps<T> {
2597
2612
  onQueryChange?: (q: DataTableQuery) => void;
2598
2613
  caption?: React__default.ReactNode;
2599
2614
  toolbar?: React__default.ReactNode;
2615
+ /**
2616
+ * Define color groups for the column visibility dropdown legend.
2617
+ * Key = color value used in column's `colorTag` (e.g. "#1e40af").
2618
+ * If not provided, columns with colorTag still get colored but won't be grouped in dropdown.
2619
+ */
2620
+ columnColorGroups?: Record<string, ColumnColorGroup>;
2600
2621
  /** Visual size preset. Maps to component scales in the table UI. */
2601
2622
  size?: DataTableSize;
2602
2623
  enableColumnVisibilityToggle?: boolean;
@@ -2634,7 +2655,7 @@ interface DataTableProps<T> {
2634
2655
  labels?: DataTableLabels;
2635
2656
  }
2636
2657
 
2637
- declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, enableHeaderAutoFit, labels, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2658
+ declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, enableHeaderAutoFit, labels, columnColorGroups, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2638
2659
 
2639
2660
  /** Public props for the `Table` component. */
2640
2661
  interface TableProps extends React__default.HTMLAttributes<HTMLTableElement> {
@@ -3375,6 +3396,9 @@ declare const underverseMessages: {
3375
3396
  loading: string;
3376
3397
  noData: string;
3377
3398
  clearFilter: string;
3399
+ selectAll: string;
3400
+ default: string;
3401
+ other: string;
3378
3402
  headerAlign: string;
3379
3403
  alignLeft: string;
3380
3404
  alignCenter: string;
@@ -3768,6 +3792,9 @@ declare const underverseMessages: {
3768
3792
  loading: string;
3769
3793
  noData: string;
3770
3794
  clearFilter: string;
3795
+ selectAll: string;
3796
+ default: string;
3797
+ other: string;
3771
3798
  headerAlign: string;
3772
3799
  alignLeft: string;
3773
3800
  alignCenter: string;
@@ -4161,6 +4188,9 @@ declare const underverseMessages: {
4161
4188
  loading: string;
4162
4189
  noData: string;
4163
4190
  clearFilter: string;
4191
+ selectAll: string;
4192
+ default: string;
4193
+ other: string;
4164
4194
  headerAlign: string;
4165
4195
  alignLeft: string;
4166
4196
  alignCenter: string;
@@ -4554,6 +4584,9 @@ declare const underverseMessages: {
4554
4584
  loading: string;
4555
4585
  noData: string;
4556
4586
  clearFilter: string;
4587
+ selectAll: string;
4588
+ default: string;
4589
+ other: string;
4557
4590
  headerAlign: string;
4558
4591
  alignLeft: string;
4559
4592
  alignCenter: string;
@@ -4950,6 +4983,9 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
4950
4983
  loading: string;
4951
4984
  noData: string;
4952
4985
  clearFilter: string;
4986
+ selectAll: string;
4987
+ default: string;
4988
+ other: string;
4953
4989
  headerAlign: string;
4954
4990
  alignLeft: string;
4955
4991
  alignCenter: string;
@@ -5342,6 +5378,9 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
5342
5378
  loading: string;
5343
5379
  noData: string;
5344
5380
  clearFilter: string;
5381
+ selectAll: string;
5382
+ default: string;
5383
+ other: string;
5345
5384
  headerAlign: string;
5346
5385
  alignLeft: string;
5347
5386
  alignCenter: string;
@@ -5734,6 +5773,9 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
5734
5773
  loading: string;
5735
5774
  noData: string;
5736
5775
  clearFilter: string;
5776
+ selectAll: string;
5777
+ default: string;
5778
+ other: string;
5737
5779
  headerAlign: string;
5738
5780
  alignLeft: string;
5739
5781
  alignCenter: string;
@@ -6126,6 +6168,9 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
6126
6168
  loading: string;
6127
6169
  noData: string;
6128
6170
  clearFilter: string;
6171
+ selectAll: string;
6172
+ default: string;
6173
+ other: string;
6129
6174
  headerAlign: string;
6130
6175
  alignLeft: string;
6131
6176
  alignCenter: string;
package/dist/index.d.ts CHANGED
@@ -2559,7 +2559,20 @@ type DataTableColumn<T> = {
2559
2559
  /** Advanced: Override auto-calculated colspan (defaults to number of leaf descendants) */
2560
2560
  colSpan?: number;
2561
2561
  /** Advanced: Override auto-calculated rowspan (defaults based on depth) */
2562
+ /** Advanced: Override auto-calculated rowspan (defaults based on depth) */
2562
2563
  rowSpan?: number;
2564
+ /**
2565
+ * Color tag for this column (hex or rgb string, e.g. "#3b82f6").
2566
+ * - Header cell gets a darker tinted background
2567
+ * - Body cells get a lighter tinted background
2568
+ * - Columns with the same colorTag are grouped together in the visibility dropdown
2569
+ */
2570
+ colorTag?: string;
2571
+ };
2572
+ /** Configuration for a column color group in the visibility dropdown */
2573
+ type ColumnColorGroup = {
2574
+ /** Display label for this group (e.g. "Bắt buộc", "Tùy chọn") */
2575
+ label: string;
2563
2576
  };
2564
2577
  type Sorter = {
2565
2578
  key: string;
@@ -2583,6 +2596,8 @@ type DataTableLabels = {
2583
2596
  alignRight?: string;
2584
2597
  noData?: string;
2585
2598
  sortBy?: string;
2599
+ selectAll?: string;
2600
+ default?: string;
2586
2601
  };
2587
2602
  /** Public props for the `DataTable` component. */
2588
2603
  interface DataTableProps<T> {
@@ -2597,6 +2612,12 @@ interface DataTableProps<T> {
2597
2612
  onQueryChange?: (q: DataTableQuery) => void;
2598
2613
  caption?: React__default.ReactNode;
2599
2614
  toolbar?: React__default.ReactNode;
2615
+ /**
2616
+ * Define color groups for the column visibility dropdown legend.
2617
+ * Key = color value used in column's `colorTag` (e.g. "#1e40af").
2618
+ * If not provided, columns with colorTag still get colored but won't be grouped in dropdown.
2619
+ */
2620
+ columnColorGroups?: Record<string, ColumnColorGroup>;
2600
2621
  /** Visual size preset. Maps to component scales in the table UI. */
2601
2622
  size?: DataTableSize;
2602
2623
  enableColumnVisibilityToggle?: boolean;
@@ -2634,7 +2655,7 @@ interface DataTableProps<T> {
2634
2655
  labels?: DataTableLabels;
2635
2656
  }
2636
2657
 
2637
- declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, enableHeaderAutoFit, labels, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2658
+ declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, enableHeaderAutoFit, labels, columnColorGroups, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2638
2659
 
2639
2660
  /** Public props for the `Table` component. */
2640
2661
  interface TableProps extends React__default.HTMLAttributes<HTMLTableElement> {
@@ -3375,6 +3396,9 @@ declare const underverseMessages: {
3375
3396
  loading: string;
3376
3397
  noData: string;
3377
3398
  clearFilter: string;
3399
+ selectAll: string;
3400
+ default: string;
3401
+ other: string;
3378
3402
  headerAlign: string;
3379
3403
  alignLeft: string;
3380
3404
  alignCenter: string;
@@ -3768,6 +3792,9 @@ declare const underverseMessages: {
3768
3792
  loading: string;
3769
3793
  noData: string;
3770
3794
  clearFilter: string;
3795
+ selectAll: string;
3796
+ default: string;
3797
+ other: string;
3771
3798
  headerAlign: string;
3772
3799
  alignLeft: string;
3773
3800
  alignCenter: string;
@@ -4161,6 +4188,9 @@ declare const underverseMessages: {
4161
4188
  loading: string;
4162
4189
  noData: string;
4163
4190
  clearFilter: string;
4191
+ selectAll: string;
4192
+ default: string;
4193
+ other: string;
4164
4194
  headerAlign: string;
4165
4195
  alignLeft: string;
4166
4196
  alignCenter: string;
@@ -4554,6 +4584,9 @@ declare const underverseMessages: {
4554
4584
  loading: string;
4555
4585
  noData: string;
4556
4586
  clearFilter: string;
4587
+ selectAll: string;
4588
+ default: string;
4589
+ other: string;
4557
4590
  headerAlign: string;
4558
4591
  alignLeft: string;
4559
4592
  alignCenter: string;
@@ -4950,6 +4983,9 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
4950
4983
  loading: string;
4951
4984
  noData: string;
4952
4985
  clearFilter: string;
4986
+ selectAll: string;
4987
+ default: string;
4988
+ other: string;
4953
4989
  headerAlign: string;
4954
4990
  alignLeft: string;
4955
4991
  alignCenter: string;
@@ -5342,6 +5378,9 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
5342
5378
  loading: string;
5343
5379
  noData: string;
5344
5380
  clearFilter: string;
5381
+ selectAll: string;
5382
+ default: string;
5383
+ other: string;
5345
5384
  headerAlign: string;
5346
5385
  alignLeft: string;
5347
5386
  alignCenter: string;
@@ -5734,6 +5773,9 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
5734
5773
  loading: string;
5735
5774
  noData: string;
5736
5775
  clearFilter: string;
5776
+ selectAll: string;
5777
+ default: string;
5778
+ other: string;
5737
5779
  headerAlign: string;
5738
5780
  alignLeft: string;
5739
5781
  alignCenter: string;
@@ -6126,6 +6168,9 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
6126
6168
  loading: string;
6127
6169
  noData: string;
6128
6170
  clearFilter: string;
6171
+ selectAll: string;
6172
+ default: string;
6173
+ other: string;
6129
6174
  headerAlign: string;
6130
6175
  alignLeft: string;
6131
6176
  alignCenter: string;