@underverse-ui/underverse 2.0.4 → 2.0.6

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
@@ -2912,6 +2912,8 @@ interface DataTableProps<T> {
2912
2912
  onQueryChange?: (q: DataTableQuery) => void;
2913
2913
  caption?: React__default.ReactNode;
2914
2914
  toolbar?: React__default.ReactNode;
2915
+ /** Show the toolbar row above the table. Default: true */
2916
+ showToolbar?: boolean;
2915
2917
  /**
2916
2918
  * Define color groups for the column visibility dropdown legend.
2917
2919
  * Key = color value used in column's `colorTag` (e.g. "#1e40af").
@@ -2923,6 +2925,8 @@ interface DataTableProps<T> {
2923
2925
  enableColumnVisibilityToggle?: boolean;
2924
2926
  enableDensityToggle?: boolean;
2925
2927
  enableHeaderAlignToggle?: boolean;
2928
+ /** Uppercase all text displayed in table headers. Default: false */
2929
+ uppercaseHeader?: boolean;
2926
2930
  striped?: boolean;
2927
2931
  /** Hiển thị đường kẻ dọc ngăn cách giữa các cột */
2928
2932
  columnDividers?: boolean;
@@ -2958,7 +2962,7 @@ interface DataTableProps<T> {
2958
2962
  borderMode?: BorderMode;
2959
2963
  }
2960
2964
 
2961
- 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, paginationAlign, enableHeaderAutoFit, labels, columnColorGroups, borderMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2965
+ declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, showToolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, uppercaseHeader, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, paginationAlign, enableHeaderAutoFit, labels, columnColorGroups, borderMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2962
2966
 
2963
2967
  /** Public props for the `Table` component. */
2964
2968
  interface TableProps extends React__default.HTMLAttributes<HTMLTableElement> {
package/dist/index.d.ts CHANGED
@@ -2912,6 +2912,8 @@ interface DataTableProps<T> {
2912
2912
  onQueryChange?: (q: DataTableQuery) => void;
2913
2913
  caption?: React__default.ReactNode;
2914
2914
  toolbar?: React__default.ReactNode;
2915
+ /** Show the toolbar row above the table. Default: true */
2916
+ showToolbar?: boolean;
2915
2917
  /**
2916
2918
  * Define color groups for the column visibility dropdown legend.
2917
2919
  * Key = color value used in column's `colorTag` (e.g. "#1e40af").
@@ -2923,6 +2925,8 @@ interface DataTableProps<T> {
2923
2925
  enableColumnVisibilityToggle?: boolean;
2924
2926
  enableDensityToggle?: boolean;
2925
2927
  enableHeaderAlignToggle?: boolean;
2928
+ /** Uppercase all text displayed in table headers. Default: false */
2929
+ uppercaseHeader?: boolean;
2926
2930
  striped?: boolean;
2927
2931
  /** Hiển thị đường kẻ dọc ngăn cách giữa các cột */
2928
2932
  columnDividers?: boolean;
@@ -2958,7 +2962,7 @@ interface DataTableProps<T> {
2958
2962
  borderMode?: BorderMode;
2959
2963
  }
2960
2964
 
2961
- 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, paginationAlign, enableHeaderAutoFit, labels, columnColorGroups, borderMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2965
+ declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, showToolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, uppercaseHeader, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, paginationAlign, enableHeaderAutoFit, labels, columnColorGroups, borderMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2962
2966
 
2963
2967
  /** Public props for the `Table` component. */
2964
2968
  interface TableProps extends React__default.HTMLAttributes<HTMLTableElement> {
package/dist/index.js CHANGED
@@ -4957,7 +4957,7 @@ var Combobox = ({
4957
4957
  variantStyles5[variant],
4958
4958
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",
4959
4959
  "disabled:cursor-not-allowed disabled:opacity-50",
4960
- open && "ring-2 ring-primary/20 border-primary",
4960
+ open && "border-primary",
4961
4961
  !!effectiveError && "border-destructive focus-visible:ring-destructive/30",
4962
4962
  className
4963
4963
  )
@@ -6347,11 +6347,11 @@ var DatePicker = ({
6347
6347
  formControlSizeStyles[requestedSize].control,
6348
6348
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
6349
6349
  "border-border/60 hover:border-primary/40",
6350
- "focus-within:ring-2 focus-within:ring-primary/50 focus-within:ring-offset-2 focus-within:ring-offset-background focus-within:border-transparent focus-within:hover:border-transparent",
6351
- "hover:bg-accent/10 hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5"
6350
+ "focus-within:border-primary focus-within:ring-0",
6351
+ "hover:bg-accent/10"
6352
6352
  ],
6353
6353
  "transition-all duration-300 ease-out",
6354
- isOpen && !isFocused && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
6354
+ isOpen && !isFocused && "border-primary shadow-lg shadow-primary/10",
6355
6355
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5",
6356
6356
  className
6357
6357
  ),
@@ -7105,11 +7105,11 @@ var DateRangePicker = ({
7105
7105
  formControlSizeStyles[requestedSize].control,
7106
7106
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
7107
7107
  "border-border/60 hover:border-primary/40",
7108
- "focus-within:ring-2 focus-within:ring-primary/50 focus-within:ring-offset-2 focus-within:ring-offset-background focus-within:border-transparent focus-within:hover:border-transparent",
7109
- "hover:bg-accent/10 hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5"
7108
+ "focus-within:border-primary focus-within:ring-0",
7109
+ "hover:bg-accent/10"
7110
7110
  ],
7111
7111
  "transition-all duration-300 ease-out",
7112
- isOpen && !isFocused && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
7112
+ isOpen && !isFocused && "border-primary shadow-lg shadow-primary/10",
7113
7113
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5"
7114
7114
  ),
7115
7115
  children: [
@@ -8044,11 +8044,11 @@ var LunarDatePicker = ({
8044
8044
  formControlSizeStyles[requestedSize].control,
8045
8045
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
8046
8046
  "border-border/60 hover:border-primary/40",
8047
- "focus-within:ring-2 focus-within:ring-primary/50 focus-within:ring-offset-2 focus-within:ring-offset-background focus-within:border-transparent focus-within:hover:border-transparent",
8048
- "hover:bg-accent/10 hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5"
8047
+ "focus-within:border-primary focus-within:ring-0",
8048
+ "hover:bg-accent/10"
8049
8049
  ],
8050
8050
  "transition-all duration-300 ease-out",
8051
- isOpen && !isFocused && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
8051
+ isOpen && !isFocused && "border-primary shadow-lg shadow-primary/10",
8052
8052
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5",
8053
8053
  className
8054
8054
  ),
@@ -8683,11 +8683,11 @@ var LunarDateRangePicker = ({
8683
8683
  formControlSizeStyles[requestedSize].control,
8684
8684
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
8685
8685
  "border-border/60 hover:border-primary/40",
8686
- "focus-within:ring-2 focus-within:ring-primary/50 focus-within:ring-offset-2 focus-within:ring-offset-background focus-within:border-transparent focus-within:hover:border-transparent",
8687
- "hover:bg-accent/10 hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5"
8686
+ "focus-within:border-primary focus-within:ring-0",
8687
+ "hover:bg-accent/10"
8688
8688
  ],
8689
8689
  "transition-all duration-300 ease-out text-left",
8690
- isOpen && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
8690
+ isOpen && "border-primary shadow-lg shadow-primary/10",
8691
8691
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5"
8692
8692
  ),
8693
8693
  children: [
@@ -9378,8 +9378,7 @@ function MonthYearPicker({
9378
9378
  effectiveError && "border-destructive/60 focus-visible:ring-destructive/50 bg-destructive/5",
9379
9379
  success && !effectiveError && "border-success/60 focus-visible:ring-success/50 bg-success/5",
9380
9380
  !effectiveError && !success && "border-border/60 hover:border-primary/40 hover:bg-accent/10",
9381
- animate && !disabled && "hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5",
9382
- open && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
9381
+ open && "border-primary shadow-lg shadow-primary/10",
9383
9382
  className
9384
9383
  ),
9385
9384
  children: [
@@ -11094,8 +11093,7 @@ function TimePicker({
11094
11093
  effectiveError && "border-destructive/60 focus-visible:ring-destructive/50 bg-destructive/5",
11095
11094
  success && !effectiveError && "border-success/60 focus-visible:ring-success/50 bg-success/5",
11096
11095
  !effectiveError && !success && "border-border/60 hover:border-primary/40 hover:bg-accent/10",
11097
- animate && !disabled && "hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5",
11098
- open && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
11096
+ open && "border-primary shadow-lg shadow-primary/10",
11099
11097
  className
11100
11098
  ),
11101
11099
  children: [
@@ -15254,7 +15252,7 @@ var MultiCombobox = ({
15254
15252
  variantStyles5[variant],
15255
15253
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",
15256
15254
  "disabled:cursor-not-allowed disabled:opacity-50",
15257
- open && "ring-2 ring-primary/20 border-primary",
15255
+ open && "border-primary",
15258
15256
  !!effectiveError && "border-destructive focus-visible:ring-destructive/30"
15259
15257
  ),
15260
15258
  children: [
@@ -17614,7 +17612,7 @@ function CategoryTreeSelect(props) {
17614
17612
  triggerVariantStyles[variant],
17615
17613
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
17616
17614
  disabled && "opacity-50 cursor-not-allowed hover:transform-none hover:shadow-none",
17617
- isOpen && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
17615
+ isOpen && "border-primary shadow-lg shadow-primary/10",
17618
17616
  effectiveError && "border-destructive focus-visible:ring-destructive/30"
17619
17617
  ),
17620
17618
  children: [
@@ -21548,6 +21546,7 @@ function DataTableHeader({
21548
21546
  filters,
21549
21547
  sort,
21550
21548
  columnDividers,
21549
+ uppercaseHeader,
21551
21550
  setCurPage,
21552
21551
  setFilters,
21553
21552
  setSort,
@@ -21819,6 +21818,7 @@ function DataTableHeader({
21819
21818
  "relative",
21820
21819
  (col.headerAlign ?? headerAlign) === "right" && "text-right",
21821
21820
  (col.headerAlign ?? headerAlign) === "center" && "text-center",
21821
+ uppercaseHeader && "uppercase",
21822
21822
  showBorderLeft && "border-l border-border/60",
21823
21823
  getStickyHeaderClass(col)
21824
21824
  ),
@@ -22653,10 +22653,12 @@ function DataTable({
22653
22653
  onQueryChange,
22654
22654
  caption,
22655
22655
  toolbar,
22656
+ showToolbar = true,
22656
22657
  size = "md",
22657
22658
  enableColumnVisibilityToggle = true,
22658
22659
  enableDensityToggle = true,
22659
22660
  enableHeaderAlignToggle = false,
22661
+ uppercaseHeader = false,
22660
22662
  striped = true,
22661
22663
  columnDividers = false,
22662
22664
  className,
@@ -22810,7 +22812,7 @@ function DataTable({
22810
22812
  });
22811
22813
  }, []);
22812
22814
  return /* @__PURE__ */ jsxs53("div", { className: cn("space-y-2", className), children: [
22813
- /* @__PURE__ */ jsx61(
22815
+ showToolbar && /* @__PURE__ */ jsx61(
22814
22816
  DataTableToolbar,
22815
22817
  {
22816
22818
  caption,
@@ -22870,6 +22872,7 @@ function DataTable({
22870
22872
  filters,
22871
22873
  sort,
22872
22874
  columnDividers,
22875
+ uppercaseHeader,
22873
22876
  setCurPage,
22874
22877
  setFilters,
22875
22878
  setSort,