@dreamtree-org/twreact-ui 1.3.3 → 1.3.4

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.esm.js CHANGED
@@ -4802,6 +4802,21 @@ var getRowKey = function getRowKey(row, globalIndex) {
4802
4802
  if (row._id !== undefined && row._id !== null) return String(row._id);
4803
4803
  return String(globalIndex);
4804
4804
  };
4805
+ /**
4806
+ * A `stripedColors` entry is either a CSS colour ("#f7fafc", "rgb(...)") applied as an
4807
+ * inline background, or a Tailwind class ("bg-surface", "dark:bg-gray-900") applied as a
4808
+ * className. Returns the props to spread onto the striped element.
4809
+ */
4810
+ var getStripeProps = function getStripeProps(stripe) {
4811
+ if (!stripe) return {};
4812
+ return /(^|[\s:])bg-/.test(stripe) ? {
4813
+ className: stripe
4814
+ } : {
4815
+ style: {
4816
+ backgroundColor: stripe
4817
+ }
4818
+ };
4819
+ };
4805
4820
  /**
4806
4821
  * Resolve a value that may be supplied directly or as a per-row producer.
4807
4822
  * Used for an action's `label`, `icon`, `hidden` and `disabled`.
@@ -4939,7 +4954,7 @@ function useClickOutside(refs, isActive, onClickOutside) {
4939
4954
  * Pagination controls component for the table
4940
4955
  * Supports both header (icon-only) and footer (with page numbers) variants
4941
4956
  */
4942
- var DEFAULT_ROW_HOVER$1 = "bg-gray-50";
4957
+ var DEFAULT_ROW_HOVER$1 = "bg-background";
4943
4958
  // Header pagination (compact, icon-based)
4944
4959
  function PaginationHeader(_ref) {
4945
4960
  var _theme$rowHover;
@@ -5084,7 +5099,7 @@ function PaginationFooter(_ref2) {
5084
5099
  });
5085
5100
  }
5086
5101
 
5087
- var DEFAULT_ROW_HOVER = "bg-gray-50";
5102
+ var DEFAULT_ROW_HOVER = "bg-background";
5088
5103
  /**
5089
5104
  * Column visibility toggle menu
5090
5105
  */
@@ -5148,7 +5163,7 @@ function MobileFilters(_ref) {
5148
5163
  handleFilter = _ref.handleFilter;
5149
5164
  var idPrefix = React__default.useId();
5150
5165
  return jsxs("div", {
5151
- className: "mb-4 p-3 bg-gray-50 rounded-lg",
5166
+ className: "mb-4 p-3 bg-background rounded-lg",
5152
5167
  children: [jsxs("div", {
5153
5168
  className: "flex items-center justify-between mb-3",
5154
5169
  children: [jsx("h3", {
@@ -5205,8 +5220,8 @@ function MobileFilters(_ref) {
5205
5220
  });
5206
5221
  }
5207
5222
 
5208
- var DEFAULT_MENU_BG = "bg-white border border-gray-100 shadow-xl";
5209
- var DEFAULT_MENU_ITEM_HOVER = "opacity-75 hover:opacity-100 hover:bg-gray-100/80 active:bg-gray-200/80";
5223
+ var DEFAULT_MENU_BG = "bg-surface border border-line shadow-xl";
5224
+ var DEFAULT_MENU_ITEM_HOVER = "opacity-75 hover:opacity-100 hover:bg-gray-100/80 active:bg-gray-200/80 dark:hover:bg-gray-800 dark:active:bg-gray-700";
5210
5225
  function ActionMenu(_ref) {
5211
5226
  var _theme$menuBg, _theme$menuItemHover;
5212
5227
  var _ref$actions = _ref.actions,
@@ -5410,7 +5425,7 @@ function ActionMenu(_ref) {
5410
5425
  children: jsx("div", {
5411
5426
  className: "p-1.5 space-y-0.5",
5412
5427
  children: !Array.isArray(actions) || actions.length === 0 ? jsx("div", {
5413
- className: "px-3 py-2 text-sm text-gray-400 italic",
5428
+ className: "px-3 py-2 text-sm text-muted italic",
5414
5429
  children: "No actions"
5415
5430
  }) : actions.map(function (action, idx) {
5416
5431
  var _action$name;
@@ -5421,7 +5436,7 @@ function ActionMenu(_ref) {
5421
5436
  type: "button",
5422
5437
  disabled: isDisabled,
5423
5438
  "aria-disabled": isDisabled || undefined,
5424
- className: cn$1("w-full text-left px-3 py-2 text-sm flex items-center gap-2.5 rounded-lg transition-colors font-medium", isDisabled ? "opacity-50 cursor-not-allowed text-gray-400" : ["text-gray-700 hover:text-gray-900", menuItemHover, isFocused ? "bg-gray-100 text-gray-900 ring-1 ring-gray-300" : ""]),
5439
+ className: cn$1("w-full text-left px-3 py-2 text-sm flex items-center gap-2.5 rounded-lg transition-colors font-medium", isDisabled ? "opacity-50 cursor-not-allowed text-muted" : ["text-foreground", menuItemHover, isFocused ? "bg-gray-100 text-gray-900 ring-1 ring-gray-300 dark:bg-gray-800 dark:text-foreground dark:ring-gray-600" : ""]),
5425
5440
  onMouseEnter: function onMouseEnter() {
5426
5441
  return !isDisabled && setFocusedIndex(idx);
5427
5442
  },
@@ -5433,7 +5448,7 @@ function ActionMenu(_ref) {
5433
5448
  },
5434
5449
  children: action.render ? action.render(row) : jsxs(Fragment, {
5435
5450
  children: [action.icon && jsx("span", {
5436
- className: "inline-flex text-gray-500 flex-shrink-0",
5451
+ className: "inline-flex text-muted flex-shrink-0",
5437
5452
  children: action.icon
5438
5453
  }), jsx("span", {
5439
5454
  className: "truncate",
@@ -5528,6 +5543,7 @@ function TableRow(_ref) {
5528
5543
  var safeExtraRowClass = typeof extraRowClass === "string" ? extraRowClass.trim() : "";
5529
5544
  var stripeColors = theme === null || theme === void 0 ? void 0 : theme.stripedColors;
5530
5545
  var stripeBg = stripedRows && !isSelected && Array.isArray(stripeColors) && stripeColors.length > 0 ? stripeColors[globalIndex % stripeColors.length] : undefined;
5546
+ var stripeProps = getStripeProps(stripeBg);
5531
5547
  var rowKey = isNewRow ? row._key : key;
5532
5548
  var isRowActive = interactive && (activeCell === null || activeCell === void 0 ? void 0 : activeCell.rowKey) === rowKey;
5533
5549
  var effectiveRow = React__default.useMemo(function () {
@@ -5536,10 +5552,8 @@ function TableRow(_ref) {
5536
5552
  }, [interactive, pendingEdits, rowKey, row]);
5537
5553
  return jsxs(React__default.Fragment, {
5538
5554
  children: [jsxs("tr", {
5539
- style: stripeBg ? {
5540
- backgroundColor: stripeBg
5541
- } : undefined,
5542
- className: cn$1(theme !== null && theme !== void 0 && theme.rowHover ? ["hover:" + theme.rowHover] : [], {
5555
+ style: stripeProps.style,
5556
+ className: cn$1(stripeProps.className, theme !== null && theme !== void 0 && theme.rowHover ? ["hover:" + theme.rowHover] : [], {
5543
5557
  "cursor-pointer": !!onRowClick,
5544
5558
  "bg-primary-50": isSelected,
5545
5559
  "bg-primary-50/20": isRowActive && !isSelected,
@@ -5558,7 +5572,7 @@ function TableRow(_ref) {
5558
5572
  },
5559
5573
  "aria-expanded": isExpanded,
5560
5574
  "aria-label": isExpanded ? "Collapse row details" : "Expand row details",
5561
- className: "p-1 rounded hover:bg-gray-100",
5575
+ className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",
5562
5576
  children: isExpanded ? "▾" : "▸"
5563
5577
  })
5564
5578
  }), showSerial && jsx("td", {
@@ -5594,9 +5608,9 @@ function TableRow(_ref) {
5594
5608
  title: isCellInvalid ? "Field \"".concat(column.label || column.key, "\" is required or invalid") : undefined,
5595
5609
  className: cn$1("px-6 py-4 text-sm transition-all", wrapCell ? "whitespace-normal break-words" : "whitespace-nowrap", {
5596
5610
  "ring-2 ring-error-500 ring-inset bg-error-50/40 relative z-10": isCellInvalid && !isCellEditing,
5597
- "ring-2 ring-error-600 ring-inset bg-white p-1 z-20 relative": isCellEditing && isCellInvalid,
5611
+ "ring-2 ring-error-600 ring-inset bg-surface p-1 z-20 relative": isCellEditing && isCellInvalid,
5598
5612
  "ring-2 ring-primary-500 ring-inset bg-primary-50/50 relative z-10": isCellActive && !isCellEditing && !isCellInvalid,
5599
- "ring-2 ring-primary-600 ring-inset bg-white p-1 z-20 relative": isCellEditing && !isCellInvalid
5613
+ "ring-2 ring-primary-600 ring-inset bg-surface p-1 z-20 relative": isCellEditing && !isCellInvalid
5600
5614
  }, safeExtraCellClass),
5601
5615
  onClick: function onClick() {
5602
5616
  if (interactive && onCellClick) {
@@ -5643,7 +5657,7 @@ function TableRow(_ref) {
5643
5657
  if (action.disabled) return;
5644
5658
  handleOnAction(action, row);
5645
5659
  },
5646
- className: cn$1("p-1 rounded", action.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-100"),
5660
+ className: cn$1("p-1 rounded", action.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-100 dark:hover:bg-gray-800"),
5647
5661
  children: action.render ? action.render(row) : (_action$icon = action.icon) !== null && _action$icon !== void 0 ? _action$icon : jsx("span", {
5648
5662
  className: "text-xs",
5649
5663
  children: actionLabel
@@ -5659,7 +5673,7 @@ function TableRow(_ref) {
5659
5673
  return toggleActions(e, actionCellKey, row);
5660
5674
  },
5661
5675
  "aria-expanded": activeActionRowKey === actionCellKey,
5662
- className: "p-1 rounded hover:bg-gray-100",
5676
+ className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",
5663
5677
  title: "Actions",
5664
5678
  children: jsx(MoreVertical, {
5665
5679
  className: "h-4 w-4"
@@ -5683,7 +5697,7 @@ function TableRow(_ref) {
5683
5697
  colSpan: visibleCount,
5684
5698
  className: cn$1(_defineProperty$4(_defineProperty$4({
5685
5699
  "px-6 py-4": true
5686
- }, (_theme$accentColor = theme === null || theme === void 0 ? void 0 : theme.accentColor) !== null && _theme$accentColor !== void 0 ? _theme$accentColor : "bg-gray-50", true), (_theme$rowHover = theme === null || theme === void 0 ? void 0 : theme.rowHover) !== null && _theme$rowHover !== void 0 ? _theme$rowHover : "bg-gray-50", true)),
5700
+ }, (_theme$accentColor = theme === null || theme === void 0 ? void 0 : theme.accentColor) !== null && _theme$accentColor !== void 0 ? _theme$accentColor : "bg-background", true), (_theme$rowHover = theme === null || theme === void 0 ? void 0 : theme.rowHover) !== null && _theme$rowHover !== void 0 ? _theme$rowHover : "bg-background", true)),
5687
5701
  children: jsx(DetailsComponent, {
5688
5702
  row: row,
5689
5703
  index: globalIndex
@@ -5748,11 +5762,10 @@ function MobileCard(_ref) {
5748
5762
  var hasActions = withAction && (inlineActions.length > 0 || menuActions.length > 0);
5749
5763
  var showHeader = showDetailsToggle || selectable || showSerial || hasActions;
5750
5764
  var stripeBg = stripedRows && !isSelected && Array.isArray(stripedColors) && stripedColors.length > 0 ? stripedColors[globalIndex % stripedColors.length] : undefined;
5765
+ var stripeProps = getStripeProps(stripeBg);
5751
5766
  return jsxs("div", {
5752
- style: stripeBg ? {
5753
- backgroundColor: stripeBg
5754
- } : undefined,
5755
- className: cn$1("border rounded-lg mb-3 shadow-sm overflow-hidden transition-all duration-200", {
5767
+ style: stripeProps.style,
5768
+ className: cn$1(stripeProps.className, "border border-line rounded-lg mb-3 shadow-sm overflow-hidden transition-all duration-200", {
5756
5769
  "cursor-pointer": !!onRowClick,
5757
5770
  "bg-primary-50 border-primary-200": isSelected,
5758
5771
  "hover:shadow-md": !isSelected
@@ -5761,7 +5774,7 @@ function MobileCard(_ref) {
5761
5774
  return onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(row, globalIndex);
5762
5775
  },
5763
5776
  children: [showHeader && jsxs("div", {
5764
- className: "flex items-center justify-between p-4 border-b bg-gray-50",
5777
+ className: "flex items-center justify-between p-4 border-b border-line bg-background",
5765
5778
  children: [jsxs("div", {
5766
5779
  className: "flex items-center gap-3",
5767
5780
  children: [showDetailsToggle && jsx("button", {
@@ -5772,7 +5785,7 @@ function MobileCard(_ref) {
5772
5785
  },
5773
5786
  "aria-expanded": isExpanded,
5774
5787
  "aria-label": isExpanded ? "Collapse row details" : "Expand row details",
5775
- className: "p-1 rounded hover:bg-gray-200",
5788
+ className: "p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700",
5776
5789
  children: isExpanded ? "▾" : "▸"
5777
5790
  }), selectable && jsx("input", {
5778
5791
  type: "checkbox",
@@ -5806,7 +5819,7 @@ function MobileCard(_ref) {
5806
5819
  if (action.disabled) return;
5807
5820
  handleOnAction(action, row);
5808
5821
  },
5809
- className: cn$1("p-1.5 rounded", action.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-200"),
5822
+ className: cn$1("p-1.5 rounded", action.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-200 dark:hover:bg-gray-700"),
5810
5823
  children: action.render ? action.render(row) : (_action$icon = action.icon) !== null && _action$icon !== void 0 ? _action$icon : jsx("span", {
5811
5824
  className: "text-xs",
5812
5825
  children: actionLabel
@@ -5823,7 +5836,7 @@ function MobileCard(_ref) {
5823
5836
  return toggleActions(e, actionCellKey, row);
5824
5837
  },
5825
5838
  "aria-expanded": activeActionRowKey === actionCellKey,
5826
- className: "p-1.5 rounded hover:bg-gray-200",
5839
+ className: "p-1.5 rounded hover:bg-gray-200 dark:hover:bg-gray-700",
5827
5840
  title: "Actions",
5828
5841
  "aria-label": "Actions",
5829
5842
  children: jsx(MoreVertical, {
@@ -5865,7 +5878,7 @@ function MobileCard(_ref) {
5865
5878
  }, column.key);
5866
5879
  })
5867
5880
  }), showDetailsToggle && isExpanded && DetailsComponent && jsx("div", {
5868
- className: "border-t bg-gray-50 p-4",
5881
+ className: "border-t border-line bg-background p-4",
5869
5882
  children: jsx(DetailsComponent, {
5870
5883
  row: row,
5871
5884
  index: globalIndex
@@ -5926,7 +5939,7 @@ function FieldInput(_ref) {
5926
5939
  onClick: stopProp,
5927
5940
  onMouseDown: stopProp,
5928
5941
  placeholder: "Enter ".concat(column.label || column.key, "..."),
5929
- className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none transition-all focus:ring-2 focus:ring-primary-500 bg-white resize-y min-h-[2.5rem]", className)
5942
+ className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none transition-all focus:ring-2 focus:ring-primary-500 bg-surface text-foreground resize-y min-h-[2.5rem]", className)
5930
5943
  });
5931
5944
  }
5932
5945
  // Select / Dropdown
@@ -5946,7 +5959,7 @@ function FieldInput(_ref) {
5946
5959
  onKeyDown: onKeyDown,
5947
5960
  onClick: stopProp,
5948
5961
  onMouseDown: stopProp,
5949
- className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-white", className),
5962
+ className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-surface text-foreground", className),
5950
5963
  children: [jsxs("option", {
5951
5964
  value: "",
5952
5965
  children: ["Select ", column.label || column.key]
@@ -5989,7 +6002,7 @@ function FieldInput(_ref) {
5989
6002
  onKeyDown: onKeyDown,
5990
6003
  onClick: stopProp,
5991
6004
  onMouseDown: stopProp,
5992
- className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-white", className)
6005
+ className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-surface text-foreground", className)
5993
6006
  });
5994
6007
  }
5995
6008
  // Number
@@ -6005,7 +6018,7 @@ function FieldInput(_ref) {
6005
6018
  onClick: stopProp,
6006
6019
  onMouseDown: stopProp,
6007
6020
  placeholder: "Enter ".concat(column.label || column.key, "..."),
6008
- className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-white", className)
6021
+ className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-surface text-foreground", className)
6009
6022
  });
6010
6023
  }
6011
6024
  // Default: Text
@@ -6020,7 +6033,7 @@ function FieldInput(_ref) {
6020
6033
  onClick: stopProp,
6021
6034
  onMouseDown: stopProp,
6022
6035
  placeholder: "Enter ".concat(column.label || column.key, "..."),
6023
- className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-white", className)
6036
+ className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-surface text-foreground", className)
6024
6037
  });
6025
6038
  }
6026
6039
 
@@ -6031,11 +6044,11 @@ function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var t
6031
6044
  var DEFAULT_DATA = [];
6032
6045
  var DEFAULT_COLUMNS = [];
6033
6046
  var DEFAULT_THEME = {
6034
- stripedColors: ["bg-[#ffffff]", "bg-[#f7fafc]"],
6035
- rowHover: "bg-gray-50",
6036
- accentColor: "bg-gray-50",
6037
- menuBg: "bg-white",
6038
- menuItemHover: "hover:bg-gray-50"
6047
+ stripedColors: ["bg-surface", "bg-background"],
6048
+ rowHover: "bg-background",
6049
+ accentColor: "bg-background",
6050
+ menuBg: "bg-surface",
6051
+ menuItemHover: "hover:bg-background"
6039
6052
  };
6040
6053
  var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
6041
6054
  var _validationErrors$;
@@ -7250,7 +7263,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
7250
7263
  onClick: handleClearChanges,
7251
7264
  disabled: isSaving,
7252
7265
  title: "Discard all pending modifications",
7253
- className: "px-4 py-2 font-medium rounded-lg text-sm flex items-center gap-2 transition-all border border-primary-300 text-primary-700 bg-white hover:bg-primary-50 active:bg-primary-100 cursor-pointer shadow-sm disabled:opacity-50",
7266
+ className: "px-4 py-2 font-medium rounded-lg text-sm flex items-center gap-2 transition-all border border-primary-300 text-primary-700 bg-surface hover:bg-primary-50 dark:text-primary-300 dark:border-primary-700 dark:hover:bg-primary-900/40 active:bg-primary-100 cursor-pointer shadow-sm disabled:opacity-50",
7254
7267
  children: [jsx(X, {
7255
7268
  className: "w-4 h-4 text-primary-600"
7256
7269
  }), jsx("span", {
@@ -7294,7 +7307,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
7294
7307
  onKeyDown: onGlobalKeyDown
7295
7308
  }), jsx("button", {
7296
7309
  onClick: applyGlobalSearch,
7297
- className: "absolute right-2 top-1/2 transform -translate-y-1/2 p-2 rounded-lg hover:bg-gray-100",
7310
+ className: "absolute right-2 top-1/2 transform -translate-y-1/2 p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800",
7298
7311
  title: "Search",
7299
7312
  children: jsx(Search, {
7300
7313
  className: "h-4 w-4 text-primary-400"
@@ -7305,7 +7318,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
7305
7318
  setSearchInput("");
7306
7319
  handleFilter("global", "");
7307
7320
  },
7308
- className: "whitespace-nowrap rounded-lg md:rounded-md border border-gray-300 px-4 py-3 md:py-2 text-sm hover:bg-gray-100 w-full sm:w-auto",
7321
+ className: "whitespace-nowrap rounded-lg md:rounded-md border border-gray-300 px-4 py-3 md:py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-800 w-full sm:w-auto",
7309
7322
  children: "Clear"
7310
7323
  })]
7311
7324
  })
@@ -7329,7 +7342,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
7329
7342
  }), !isMobileView && jsx("div", {
7330
7343
  className: "overflow-x-auto overflow-y-visible",
7331
7344
  children: jsxs("table", _objectSpread$P(_objectSpread$P({
7332
- className: cn$1("min-w-full divide-y divide-gray-200", className)
7345
+ className: cn$1("min-w-full divide-y divide-line", className)
7333
7346
  }, props), {}, {
7334
7347
  children: [jsxs("thead", {
7335
7348
  className: safeTheme.accentColor,
@@ -7351,7 +7364,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
7351
7364
  var _column$rules;
7352
7365
  return jsx("th", {
7353
7366
  className: cn$1("px-6 py-3 text-left text-xs font-medium text-primary-700 uppercase tracking-wider", {
7354
- "cursor-pointer hover:bg-gray-100": sortable && column.sortable !== false
7367
+ "cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800": sortable && column.sortable !== false
7355
7368
  }),
7356
7369
  onClick: function onClick() {
7357
7370
  return column.sortable !== false && handleSort(column.key);
@@ -7395,7 +7408,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
7395
7408
  return !s;
7396
7409
  });
7397
7410
  },
7398
- className: "p-1 rounded hover:bg-gray-100",
7411
+ className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",
7399
7412
  children: jsx(MoreVertical, {
7400
7413
  className: "h-4 w-4"
7401
7414
  })
@@ -7431,7 +7444,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
7431
7444
  })]
7432
7445
  })]
7433
7446
  }), jsx("tbody", {
7434
- className: "divide-y divide-gray-200",
7447
+ className: "divide-y divide-line",
7435
7448
  children: loading ? jsx("tr", {
7436
7449
  children: jsx("td", {
7437
7450
  colSpan: visibleCount,
@@ -20038,8 +20051,8 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
20038
20051
  }
20039
20052
  }), {}, {
20040
20053
  className: cn$1("flex items-center rounded-md px-3 py-2 text-sm font-medium transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500", {
20041
- "bg-primary-100 text-primary-700": isActive,
20042
- "hover:bg-gray-100": !isActive && !item.disabled,
20054
+ "bg-primary-100 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300": isActive,
20055
+ "hover:bg-gray-100 dark:hover:bg-gray-800": !isActive && !item.disabled,
20043
20056
  "cursor-pointer": !item.disabled,
20044
20057
  "cursor-not-allowed opacity-50": item.disabled,
20045
20058
  "justify-center": labelHidden
@@ -20068,7 +20081,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
20068
20081
  })]
20069
20082
  }) : item.badge
20070
20083
  }), hasChildren && jsx("span", {
20071
- className: "ml-2 flex-shrink-0 rounded p-0.5 hover:bg-gray-200",
20084
+ className: "ml-2 flex-shrink-0 rounded p-0.5 hover:bg-gray-200 dark:hover:bg-gray-700",
20072
20085
  "aria-hidden": "true",
20073
20086
  "data-sidebar-chevron": "",
20074
20087
  onClick: hasHref ? function (e) {
@@ -20118,7 +20131,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
20118
20131
  }),
20119
20132
  "data-sidebar-section": section.key || "",
20120
20133
  children: [effectiveCollapsed && idx > 0 && jsx("hr", {
20121
- className: "mx-2 my-2 border-gray-200",
20134
+ className: "mx-2 my-2 border-line",
20122
20135
  "aria-hidden": "true"
20123
20136
  }), section.key && (effectiveCollapsed ? jsx("span", {
20124
20137
  id: headingId,
@@ -20126,7 +20139,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
20126
20139
  children: section.key
20127
20140
  }) : jsx("p", {
20128
20141
  id: headingId,
20129
- className: "px-3 pb-1 pt-2 text-micro font-semibold uppercase tracking-wide text-gray-500",
20142
+ className: "px-3 pb-1 pt-2 text-micro font-semibold uppercase tracking-wide text-muted",
20130
20143
  children: section.key
20131
20144
  })), section.items.map(function (item) {
20132
20145
  return _renderMenuItem(item, 0, pane);
@@ -20165,7 +20178,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
20165
20178
  return jsx("button", {
20166
20179
  type: "button",
20167
20180
  onClick: handleUserClick,
20168
- className: cn$1(base, "cursor-pointer hover:bg-gray-100 transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"),
20181
+ className: cn$1(base, "cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"),
20169
20182
  "aria-label": effectiveCollapsed && !user.avatar ? user.name : undefined,
20170
20183
  children: content
20171
20184
  });
@@ -20179,26 +20192,26 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
20179
20192
  }) : footer;
20180
20193
  if (content === undefined || content === null || content === false) return null;
20181
20194
  return jsx("div", {
20182
- className: "border-t border-gray-200 p-4",
20195
+ className: "border-t border-line p-4",
20183
20196
  "data-sidebar-footer": "",
20184
20197
  children: content
20185
20198
  });
20186
20199
  };
20187
20200
  var renderSidebarContent = function renderSidebarContent(pane) {
20188
20201
  return jsxs("div", {
20189
- className: cn$1("flex h-full flex-col bg-white border-r border-gray-200 shadow-sm", "w-64 transition-all duration-200", {
20202
+ className: cn$1("flex h-full flex-col bg-surface text-foreground border-r border-line shadow-sm", "w-64 transition-all duration-200", {
20190
20203
  "w-16": effectiveCollapsed,
20191
20204
  "w-64": !effectiveCollapsed
20192
20205
  }),
20193
20206
  children: [jsxs("div", {
20194
- className: "flex h-16 items-center justify-between border-b border-gray-200 px-4",
20207
+ className: "flex h-16 items-center justify-between border-b border-line px-4",
20195
20208
  children: [!effectiveCollapsed && logo && jsx("div", {
20196
20209
  className: "flex items-center",
20197
20210
  children: logo
20198
20211
  }), jsx("button", {
20199
20212
  type: "button",
20200
20213
  onClick: handleToggleClick,
20201
- className: "rounded-md p-1 hover:bg-gray-100",
20214
+ className: "rounded-md p-1 hover:bg-gray-100 dark:hover:bg-gray-800",
20202
20215
  "aria-label": effectiveCollapsed ? "Expand sidebar" : "Collapse sidebar",
20203
20216
  children: effectiveCollapsed ? jsx(ChevronRight, {
20204
20217
  className: "h-5 w-5"
@@ -20207,10 +20220,10 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
20207
20220
  })
20208
20221
  })]
20209
20222
  }), jsx("nav", {
20210
- className: "flex-1 space-y-1 overflow-y-auto p-4 [&::-webkit-scrollbar]:w-2\n [&::-webkit-scrollbar-track]:bg-gray-100\n [&::-webkit-scrollbar-thumb]:bg-gray-300\n hover:[&::-webkit-scrollbar-thumb]:bg-gray-400",
20223
+ className: "flex-1 space-y-1 overflow-y-auto p-4 [&::-webkit-scrollbar]:w-2\n [&::-webkit-scrollbar-track]:bg-gray-100 dark:[&::-webkit-scrollbar-track]:bg-gray-800\n [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:bg-gray-700\n hover:[&::-webkit-scrollbar-thumb]:bg-gray-400",
20211
20224
  children: renderNavContent(pane)
20212
20225
  }), renderFooter(pane), user && jsx("div", {
20213
- className: "border-t border-gray-200 p-4",
20226
+ className: "border-t border-line p-4",
20214
20227
  children: jsx("div", {
20215
20228
  className: "relative",
20216
20229
  children: renderUserBlock()
@@ -20311,7 +20324,7 @@ var Dropdown = function Dropdown(_ref) {
20311
20324
  },
20312
20325
  children: trigger
20313
20326
  }), isOpen && jsx("div", {
20314
- className: "absolute z-50 bg-white border border-gray-200 rounded-md shadow-lg ".concat(placementClasses[placement], " min-w-48"),
20327
+ className: "absolute z-50 bg-surface text-foreground border border-line rounded-md shadow-lg ".concat(placementClasses[placement], " min-w-48"),
20315
20328
  children: children
20316
20329
  })]
20317
20330
  }));
@@ -20461,7 +20474,7 @@ var NotificationsDropdown = function NotificationsDropdown(_ref) {
20461
20474
  // For simplicity, shows notifications in the dropdown, can be expanded
20462
20475
  return jsx(Dropdown, {
20463
20476
  trigger: jsxs("button", {
20464
- className: "relative rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100",
20477
+ className: "relative rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100 dark:hover:bg-gray-800",
20465
20478
  "aria-label": "notifications",
20466
20479
  children: [jsx(Bell, {
20467
20480
  className: "h-5 w-5"
@@ -20474,9 +20487,9 @@ var NotificationsDropdown = function NotificationsDropdown(_ref) {
20474
20487
  children: jsxs("div", {
20475
20488
  className: "py-2 min-w-56 max-h-80 overflow-y-auto",
20476
20489
  children: [jsxs("div", {
20477
- className: "px-4 py-2 border-b border-gray-100 flex items-center justify-between",
20490
+ className: "px-4 py-2 border-b border-line flex items-center justify-between",
20478
20491
  children: [jsx("span", {
20479
- className: "font-medium text-primary-800 text-sm",
20492
+ className: "font-medium text-primary-800 dark:text-primary-100 text-sm",
20480
20493
  children: "Notifications"
20481
20494
  }), jsx("button", {
20482
20495
  className: "text-xs text-primary-400 hover:text-error-600",
@@ -20492,16 +20505,16 @@ var NotificationsDropdown = function NotificationsDropdown(_ref) {
20492
20505
  children: "No notifications"
20493
20506
  }) : notifications.map(function (n) {
20494
20507
  return jsxs("div", {
20495
- className: cn$1("flex items-start gap-3 px-4 py-2 hover:bg-gray-50 cursor-pointer group", !n.read ? "bg-primary-50" : ""),
20508
+ className: cn$1("flex items-start gap-3 px-4 py-2 hover:bg-gray-50 dark:hover:bg-gray-800 cursor-pointer group", !n.read ? "bg-primary-50 dark:bg-primary-900/40" : ""),
20496
20509
  onClick: function onClick() {
20497
20510
  return onView();
20498
20511
  },
20499
20512
  children: [jsx("span", {
20500
- className: cn$1("h-2 w-2 mt-2 rounded-full", !n.read ? "bg-primary-500" : "bg-gray-300")
20513
+ className: cn$1("h-2 w-2 mt-2 rounded-full", !n.read ? "bg-primary-500" : "bg-gray-300 dark:bg-gray-600")
20501
20514
  }), jsxs("div", {
20502
20515
  className: "flex-1",
20503
20516
  children: [jsx("div", {
20504
- className: "text-sm text-primary-800",
20517
+ className: "text-sm text-primary-800 dark:text-primary-100",
20505
20518
  children: n.title
20506
20519
  }), n.message && jsx("div", {
20507
20520
  className: "text-xs text-primary-500",
@@ -20553,10 +20566,10 @@ var RightMenuContent = function RightMenuContent(_ref2) {
20553
20566
  });
20554
20567
  };
20555
20568
  var styledClassNames = {
20556
- button: "rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100",
20569
+ button: "rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100 dark:hover:bg-gray-800",
20557
20570
  mobileItem: "md:hidden",
20558
20571
  icon: "h-6 w-6",
20559
- dropdown: "w-56 rounded-md border border-gray-200 bg-white py-1 shadow-lg"
20572
+ dropdown: "w-56 rounded-md border border-line bg-surface py-1 shadow-lg"
20560
20573
  };
20561
20574
  var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
20562
20575
  var emitter = _ref3.emitter,
@@ -20641,7 +20654,7 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
20641
20654
  },
20642
20655
  className: cn$1("block w-full text-left px-4 py-2 text-sm", {
20643
20656
  "text-primary-600": item.active,
20644
- "hover:bg-gray-50": !item.active
20657
+ "hover:bg-gray-50 dark:hover:bg-gray-800": !item.active
20645
20658
  }),
20646
20659
  children: item.label
20647
20660
  }, item.id);
@@ -20656,7 +20669,7 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
20656
20669
  };
20657
20670
  return jsxs("nav", _objectSpread$p(_objectSpread$p({
20658
20671
  ref: ref,
20659
- className: cn$1("bg-white border-b border-gray-200 px-4 sm:px-6 lg:px-8", className)
20672
+ className: cn$1("bg-surface text-foreground border-b border-line px-4 sm:px-6 lg:px-8", className)
20660
20673
  }, props), {}, {
20661
20674
  children: [jsxs("div", {
20662
20675
  className: "flex h-16 min-w-0 items-center justify-between gap-2 sm:gap-4",
@@ -20669,7 +20682,7 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
20669
20682
  className: "flex min-w-0 items-center",
20670
20683
  children: [leftIcon !== false && jsx("button", {
20671
20684
  onClick: onLeftIconClick,
20672
- className: "shrink-0 md:hidden rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100",
20685
+ className: "shrink-0 md:hidden rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100 dark:hover:bg-gray-800",
20673
20686
  "aria-label": "back",
20674
20687
  children: leftIcon
20675
20688
  }), logo && jsx("div", {
@@ -20696,7 +20709,7 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
20696
20709
  }), jsx("input", {
20697
20710
  type: "text",
20698
20711
  placeholder: "Search...",
20699
- className: "w-64 rounded-md border border-gray-300 bg-white pl-10 pr-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",
20712
+ className: "w-64 rounded-md border border-gray-300 bg-surface text-foreground dark:border-gray-700 pl-10 pr-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",
20700
20713
  value: searchTerm,
20701
20714
  onChange: function onChange(e) {
20702
20715
  return setSearchTerm(e.target.value);
@@ -20759,9 +20772,9 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
20759
20772
  children: jsxs("div", {
20760
20773
  className: styledClassNames.dropdown,
20761
20774
  children: [jsxs("div", {
20762
- className: "px-4 py-2 border-b border-gray-200",
20775
+ className: "px-4 py-2 border-b border-line",
20763
20776
  children: [jsx("p", {
20764
- className: "text-sm font-medium text-primary-900",
20777
+ className: "text-sm font-medium text-primary-900 dark:text-primary-100",
20765
20778
  children: user.name
20766
20779
  }), jsx("p", {
20767
20780
  className: "text-xs text-primary-500",
@@ -20771,23 +20784,23 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
20771
20784
  className: "py-1",
20772
20785
  children: renderNavItems(true)
20773
20786
  }), user.menuItems && user.menuItems.length > 0 && jsx("div", {
20774
- className: "border-t border-gray-100",
20787
+ className: "border-t border-line",
20775
20788
  children: user.menuItems.map(function (mi) {
20776
20789
  return jsx("button", {
20777
20790
  onClick: function onClick(e) {
20778
20791
  var _mi$onClick;
20779
20792
  return mi === null || mi === void 0 || (_mi$onClick = mi.onClick) === null || _mi$onClick === void 0 ? void 0 : _mi$onClick.call(mi, e);
20780
20793
  },
20781
- className: "block w-full px-4 py-2 text-left text-sm hover:bg-gray-100",
20794
+ className: "block w-full px-4 py-2 text-left text-sm hover:bg-gray-100 dark:hover:bg-gray-800",
20782
20795
  children: mi.label
20783
20796
  }, mi.id);
20784
20797
  })
20785
20798
  }), jsx("div", {
20786
- className: "border-t border-gray-100 sm:hidden",
20799
+ className: "border-t border-line sm:hidden",
20787
20800
  children: jsxs("button", {
20788
20801
  type: "button",
20789
20802
  onClick: handleLogoutClick,
20790
- className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm hover:bg-gray-100",
20803
+ className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm hover:bg-gray-100 dark:hover:bg-gray-800",
20791
20804
  children: [jsx(LogOut, {
20792
20805
  className: "h-4 w-4",
20793
20806
  "aria-hidden": "true"
@@ -20801,13 +20814,13 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
20801
20814
  }), isMobileMenuOpen && !user && jsx("div", {
20802
20815
  className: "md:hidden h-full",
20803
20816
  children: jsx("div", {
20804
- className: "space-y-1 border-t border-gray-200 px-2 pt-4 pb-3",
20817
+ className: "space-y-1 border-t border-line px-2 pt-4 pb-3",
20805
20818
  children: items.map(function (item) {
20806
20819
  return jsx("a", {
20807
20820
  href: item.href,
20808
20821
  className: cn$1("block rounded-md px-3 py-2 text-base font-medium", {
20809
- "bg-primary-50 text-primary-700": item.active,
20810
- "hover:bg-gray-50": !item.active
20822
+ "bg-primary-50 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300": item.active,
20823
+ "hover:bg-gray-50 dark:hover:bg-gray-800": !item.active
20811
20824
  }),
20812
20825
  children: item.label
20813
20826
  }, item.id);
@@ -22173,7 +22186,7 @@ var Card = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
22173
22186
  props = _objectWithoutProperties$1(_ref, _excluded$c);
22174
22187
  return jsx("div", _objectSpread$g(_objectSpread$g({
22175
22188
  ref: ref,
22176
- className: cn$1('rounded-lg border border-gray-200 bg-white shadow-sm', {
22189
+ className: cn$1('rounded-lg border border-line bg-surface shadow-sm', {
22177
22190
  'hover:shadow-md transition-shadow': hover
22178
22191
  }, className)
22179
22192
  }, props), {}, {
@@ -22186,7 +22199,7 @@ var CardHeader = function CardHeader(_ref2) {
22186
22199
  className = _ref2.className,
22187
22200
  props = _objectWithoutProperties$1(_ref2, _excluded2);
22188
22201
  return jsx("div", _objectSpread$g(_objectSpread$g({
22189
- className: cn$1('px-6 py-4 border-b border-gray-200', className)
22202
+ className: cn$1('px-6 py-4 border-b border-line', className)
22190
22203
  }, props), {}, {
22191
22204
  children: children
22192
22205
  }));
@@ -22196,7 +22209,7 @@ var CardTitle = function CardTitle(_ref3) {
22196
22209
  className = _ref3.className,
22197
22210
  props = _objectWithoutProperties$1(_ref3, _excluded3);
22198
22211
  return jsx("h3", _objectSpread$g(_objectSpread$g({
22199
- className: cn$1('text-lg font-semibold text-primary-900', className)
22212
+ className: cn$1('text-lg font-semibold text-primary-900 dark:text-primary-100', className)
22200
22213
  }, props), {}, {
22201
22214
  children: children
22202
22215
  }));
@@ -22206,7 +22219,7 @@ var CardDescription = function CardDescription(_ref4) {
22206
22219
  className = _ref4.className,
22207
22220
  props = _objectWithoutProperties$1(_ref4, _excluded4);
22208
22221
  return jsx("p", _objectSpread$g(_objectSpread$g({
22209
- className: cn$1('text-sm text-primary-600', className)
22222
+ className: cn$1('text-sm text-primary-600 dark:text-primary-300', className)
22210
22223
  }, props), {}, {
22211
22224
  children: children
22212
22225
  }));
@@ -22226,7 +22239,7 @@ var CardFooter = function CardFooter(_ref6) {
22226
22239
  className = _ref6.className,
22227
22240
  props = _objectWithoutProperties$1(_ref6, _excluded6);
22228
22241
  return jsx("div", _objectSpread$g(_objectSpread$g({
22229
- className: cn$1('px-6 py-4 border-t border-gray-200', className)
22242
+ className: cn$1('px-6 py-4 border-t border-line', className)
22230
22243
  }, props), {}, {
22231
22244
  children: children
22232
22245
  }));