@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/README.md +3 -1
- package/dist/ai-schema.json +2 -1
- package/dist/components/core/Table/MobileCard.d.ts.map +1 -1
- package/dist/components/core/Table/TableRow.d.ts.map +1 -1
- package/dist/components/core/Table/helpers.d.ts +12 -0
- package/dist/components/core/Table/helpers.d.ts.map +1 -1
- package/dist/esm/components/core/Table/ActionMenu.js +5 -5
- package/dist/esm/components/core/Table/ColumnMenu.js +1 -1
- package/dist/esm/components/core/Table/FieldInput.js +5 -5
- package/dist/esm/components/core/Table/MobileCard.js +9 -10
- package/dist/esm/components/core/Table/MobileFilters.js +1 -1
- package/dist/esm/components/core/Table/Pagination.js +1 -1
- package/dist/esm/components/core/Table/Table.js +12 -12
- package/dist/esm/components/core/Table/TableRow.js +10 -11
- package/dist/esm/components/core/Table/helpers.js +16 -1
- package/dist/esm/components/navigation/Dropdown.js +1 -1
- package/dist/esm/components/navigation/Navbar.js +21 -21
- package/dist/esm/components/navigation/Sidebar.js +12 -12
- package/dist/esm/components/utility/Card.js +5 -5
- package/dist/index.css +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +96 -83
- package/dist/index.js +96 -83
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/mcp/catalog.snapshot.json +9 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4822,6 +4822,21 @@ var getRowKey = function getRowKey(row, globalIndex) {
|
|
|
4822
4822
|
if (row._id !== undefined && row._id !== null) return String(row._id);
|
|
4823
4823
|
return String(globalIndex);
|
|
4824
4824
|
};
|
|
4825
|
+
/**
|
|
4826
|
+
* A `stripedColors` entry is either a CSS colour ("#f7fafc", "rgb(...)") applied as an
|
|
4827
|
+
* inline background, or a Tailwind class ("bg-surface", "dark:bg-gray-900") applied as a
|
|
4828
|
+
* className. Returns the props to spread onto the striped element.
|
|
4829
|
+
*/
|
|
4830
|
+
var getStripeProps = function getStripeProps(stripe) {
|
|
4831
|
+
if (!stripe) return {};
|
|
4832
|
+
return /(^|[\s:])bg-/.test(stripe) ? {
|
|
4833
|
+
className: stripe
|
|
4834
|
+
} : {
|
|
4835
|
+
style: {
|
|
4836
|
+
backgroundColor: stripe
|
|
4837
|
+
}
|
|
4838
|
+
};
|
|
4839
|
+
};
|
|
4825
4840
|
/**
|
|
4826
4841
|
* Resolve a value that may be supplied directly or as a per-row producer.
|
|
4827
4842
|
* Used for an action's `label`, `icon`, `hidden` and `disabled`.
|
|
@@ -4959,7 +4974,7 @@ function useClickOutside(refs, isActive, onClickOutside) {
|
|
|
4959
4974
|
* Pagination controls component for the table
|
|
4960
4975
|
* Supports both header (icon-only) and footer (with page numbers) variants
|
|
4961
4976
|
*/
|
|
4962
|
-
var DEFAULT_ROW_HOVER$1 = "bg-
|
|
4977
|
+
var DEFAULT_ROW_HOVER$1 = "bg-background";
|
|
4963
4978
|
// Header pagination (compact, icon-based)
|
|
4964
4979
|
function PaginationHeader(_ref) {
|
|
4965
4980
|
var _theme$rowHover;
|
|
@@ -5104,7 +5119,7 @@ function PaginationFooter(_ref2) {
|
|
|
5104
5119
|
});
|
|
5105
5120
|
}
|
|
5106
5121
|
|
|
5107
|
-
var DEFAULT_ROW_HOVER = "bg-
|
|
5122
|
+
var DEFAULT_ROW_HOVER = "bg-background";
|
|
5108
5123
|
/**
|
|
5109
5124
|
* Column visibility toggle menu
|
|
5110
5125
|
*/
|
|
@@ -5168,7 +5183,7 @@ function MobileFilters(_ref) {
|
|
|
5168
5183
|
handleFilter = _ref.handleFilter;
|
|
5169
5184
|
var idPrefix = React.useId();
|
|
5170
5185
|
return jsxRuntime.jsxs("div", {
|
|
5171
|
-
className: "mb-4 p-3 bg-
|
|
5186
|
+
className: "mb-4 p-3 bg-background rounded-lg",
|
|
5172
5187
|
children: [jsxRuntime.jsxs("div", {
|
|
5173
5188
|
className: "flex items-center justify-between mb-3",
|
|
5174
5189
|
children: [jsxRuntime.jsx("h3", {
|
|
@@ -5225,8 +5240,8 @@ function MobileFilters(_ref) {
|
|
|
5225
5240
|
});
|
|
5226
5241
|
}
|
|
5227
5242
|
|
|
5228
|
-
var DEFAULT_MENU_BG = "bg-
|
|
5229
|
-
var DEFAULT_MENU_ITEM_HOVER = "opacity-75 hover:opacity-100 hover:bg-gray-100/80 active:bg-gray-200/80";
|
|
5243
|
+
var DEFAULT_MENU_BG = "bg-surface border border-line shadow-xl";
|
|
5244
|
+
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";
|
|
5230
5245
|
function ActionMenu(_ref) {
|
|
5231
5246
|
var _theme$menuBg, _theme$menuItemHover;
|
|
5232
5247
|
var _ref$actions = _ref.actions,
|
|
@@ -5430,7 +5445,7 @@ function ActionMenu(_ref) {
|
|
|
5430
5445
|
children: jsxRuntime.jsx("div", {
|
|
5431
5446
|
className: "p-1.5 space-y-0.5",
|
|
5432
5447
|
children: !Array.isArray(actions) || actions.length === 0 ? jsxRuntime.jsx("div", {
|
|
5433
|
-
className: "px-3 py-2 text-sm text-
|
|
5448
|
+
className: "px-3 py-2 text-sm text-muted italic",
|
|
5434
5449
|
children: "No actions"
|
|
5435
5450
|
}) : actions.map(function (action, idx) {
|
|
5436
5451
|
var _action$name;
|
|
@@ -5441,7 +5456,7 @@ function ActionMenu(_ref) {
|
|
|
5441
5456
|
type: "button",
|
|
5442
5457
|
disabled: isDisabled,
|
|
5443
5458
|
"aria-disabled": isDisabled || undefined,
|
|
5444
|
-
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-
|
|
5459
|
+
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" : ""]),
|
|
5445
5460
|
onMouseEnter: function onMouseEnter() {
|
|
5446
5461
|
return !isDisabled && setFocusedIndex(idx);
|
|
5447
5462
|
},
|
|
@@ -5453,7 +5468,7 @@ function ActionMenu(_ref) {
|
|
|
5453
5468
|
},
|
|
5454
5469
|
children: action.render ? action.render(row) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5455
5470
|
children: [action.icon && jsxRuntime.jsx("span", {
|
|
5456
|
-
className: "inline-flex text-
|
|
5471
|
+
className: "inline-flex text-muted flex-shrink-0",
|
|
5457
5472
|
children: action.icon
|
|
5458
5473
|
}), jsxRuntime.jsx("span", {
|
|
5459
5474
|
className: "truncate",
|
|
@@ -5548,6 +5563,7 @@ function TableRow(_ref) {
|
|
|
5548
5563
|
var safeExtraRowClass = typeof extraRowClass === "string" ? extraRowClass.trim() : "";
|
|
5549
5564
|
var stripeColors = theme === null || theme === void 0 ? void 0 : theme.stripedColors;
|
|
5550
5565
|
var stripeBg = stripedRows && !isSelected && Array.isArray(stripeColors) && stripeColors.length > 0 ? stripeColors[globalIndex % stripeColors.length] : undefined;
|
|
5566
|
+
var stripeProps = getStripeProps(stripeBg);
|
|
5551
5567
|
var rowKey = isNewRow ? row._key : key;
|
|
5552
5568
|
var isRowActive = interactive && (activeCell === null || activeCell === void 0 ? void 0 : activeCell.rowKey) === rowKey;
|
|
5553
5569
|
var effectiveRow = React.useMemo(function () {
|
|
@@ -5556,10 +5572,8 @@ function TableRow(_ref) {
|
|
|
5556
5572
|
}, [interactive, pendingEdits, rowKey, row]);
|
|
5557
5573
|
return jsxRuntime.jsxs(React.Fragment, {
|
|
5558
5574
|
children: [jsxRuntime.jsxs("tr", {
|
|
5559
|
-
style:
|
|
5560
|
-
|
|
5561
|
-
} : undefined,
|
|
5562
|
-
className: cn$1(theme !== null && theme !== void 0 && theme.rowHover ? ["hover:" + theme.rowHover] : [], {
|
|
5575
|
+
style: stripeProps.style,
|
|
5576
|
+
className: cn$1(stripeProps.className, theme !== null && theme !== void 0 && theme.rowHover ? ["hover:" + theme.rowHover] : [], {
|
|
5563
5577
|
"cursor-pointer": !!onRowClick,
|
|
5564
5578
|
"bg-primary-50": isSelected,
|
|
5565
5579
|
"bg-primary-50/20": isRowActive && !isSelected,
|
|
@@ -5578,7 +5592,7 @@ function TableRow(_ref) {
|
|
|
5578
5592
|
},
|
|
5579
5593
|
"aria-expanded": isExpanded,
|
|
5580
5594
|
"aria-label": isExpanded ? "Collapse row details" : "Expand row details",
|
|
5581
|
-
className: "p-1 rounded hover:bg-gray-100",
|
|
5595
|
+
className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
5582
5596
|
children: isExpanded ? "▾" : "▸"
|
|
5583
5597
|
})
|
|
5584
5598
|
}), showSerial && jsxRuntime.jsx("td", {
|
|
@@ -5614,9 +5628,9 @@ function TableRow(_ref) {
|
|
|
5614
5628
|
title: isCellInvalid ? "Field \"".concat(column.label || column.key, "\" is required or invalid") : undefined,
|
|
5615
5629
|
className: cn$1("px-6 py-4 text-sm transition-all", wrapCell ? "whitespace-normal break-words" : "whitespace-nowrap", {
|
|
5616
5630
|
"ring-2 ring-error-500 ring-inset bg-error-50/40 relative z-10": isCellInvalid && !isCellEditing,
|
|
5617
|
-
"ring-2 ring-error-600 ring-inset bg-
|
|
5631
|
+
"ring-2 ring-error-600 ring-inset bg-surface p-1 z-20 relative": isCellEditing && isCellInvalid,
|
|
5618
5632
|
"ring-2 ring-primary-500 ring-inset bg-primary-50/50 relative z-10": isCellActive && !isCellEditing && !isCellInvalid,
|
|
5619
|
-
"ring-2 ring-primary-600 ring-inset bg-
|
|
5633
|
+
"ring-2 ring-primary-600 ring-inset bg-surface p-1 z-20 relative": isCellEditing && !isCellInvalid
|
|
5620
5634
|
}, safeExtraCellClass),
|
|
5621
5635
|
onClick: function onClick() {
|
|
5622
5636
|
if (interactive && onCellClick) {
|
|
@@ -5663,7 +5677,7 @@ function TableRow(_ref) {
|
|
|
5663
5677
|
if (action.disabled) return;
|
|
5664
5678
|
handleOnAction(action, row);
|
|
5665
5679
|
},
|
|
5666
|
-
className: cn$1("p-1 rounded", action.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-100"),
|
|
5680
|
+
className: cn$1("p-1 rounded", action.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-100 dark:hover:bg-gray-800"),
|
|
5667
5681
|
children: action.render ? action.render(row) : (_action$icon = action.icon) !== null && _action$icon !== void 0 ? _action$icon : jsxRuntime.jsx("span", {
|
|
5668
5682
|
className: "text-xs",
|
|
5669
5683
|
children: actionLabel
|
|
@@ -5679,7 +5693,7 @@ function TableRow(_ref) {
|
|
|
5679
5693
|
return toggleActions(e, actionCellKey, row);
|
|
5680
5694
|
},
|
|
5681
5695
|
"aria-expanded": activeActionRowKey === actionCellKey,
|
|
5682
|
-
className: "p-1 rounded hover:bg-gray-100",
|
|
5696
|
+
className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
5683
5697
|
title: "Actions",
|
|
5684
5698
|
children: jsxRuntime.jsx(MoreVertical, {
|
|
5685
5699
|
className: "h-4 w-4"
|
|
@@ -5703,7 +5717,7 @@ function TableRow(_ref) {
|
|
|
5703
5717
|
colSpan: visibleCount,
|
|
5704
5718
|
className: cn$1(_defineProperty$4(_defineProperty$4({
|
|
5705
5719
|
"px-6 py-4": true
|
|
5706
|
-
}, (_theme$accentColor = theme === null || theme === void 0 ? void 0 : theme.accentColor) !== null && _theme$accentColor !== void 0 ? _theme$accentColor : "bg-
|
|
5720
|
+
}, (_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)),
|
|
5707
5721
|
children: jsxRuntime.jsx(DetailsComponent, {
|
|
5708
5722
|
row: row,
|
|
5709
5723
|
index: globalIndex
|
|
@@ -5768,11 +5782,10 @@ function MobileCard(_ref) {
|
|
|
5768
5782
|
var hasActions = withAction && (inlineActions.length > 0 || menuActions.length > 0);
|
|
5769
5783
|
var showHeader = showDetailsToggle || selectable || showSerial || hasActions;
|
|
5770
5784
|
var stripeBg = stripedRows && !isSelected && Array.isArray(stripedColors) && stripedColors.length > 0 ? stripedColors[globalIndex % stripedColors.length] : undefined;
|
|
5785
|
+
var stripeProps = getStripeProps(stripeBg);
|
|
5771
5786
|
return jsxRuntime.jsxs("div", {
|
|
5772
|
-
style:
|
|
5773
|
-
|
|
5774
|
-
} : undefined,
|
|
5775
|
-
className: cn$1("border rounded-lg mb-3 shadow-sm overflow-hidden transition-all duration-200", {
|
|
5787
|
+
style: stripeProps.style,
|
|
5788
|
+
className: cn$1(stripeProps.className, "border border-line rounded-lg mb-3 shadow-sm overflow-hidden transition-all duration-200", {
|
|
5776
5789
|
"cursor-pointer": !!onRowClick,
|
|
5777
5790
|
"bg-primary-50 border-primary-200": isSelected,
|
|
5778
5791
|
"hover:shadow-md": !isSelected
|
|
@@ -5781,7 +5794,7 @@ function MobileCard(_ref) {
|
|
|
5781
5794
|
return onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(row, globalIndex);
|
|
5782
5795
|
},
|
|
5783
5796
|
children: [showHeader && jsxRuntime.jsxs("div", {
|
|
5784
|
-
className: "flex items-center justify-between p-4 border-b bg-
|
|
5797
|
+
className: "flex items-center justify-between p-4 border-b border-line bg-background",
|
|
5785
5798
|
children: [jsxRuntime.jsxs("div", {
|
|
5786
5799
|
className: "flex items-center gap-3",
|
|
5787
5800
|
children: [showDetailsToggle && jsxRuntime.jsx("button", {
|
|
@@ -5792,7 +5805,7 @@ function MobileCard(_ref) {
|
|
|
5792
5805
|
},
|
|
5793
5806
|
"aria-expanded": isExpanded,
|
|
5794
5807
|
"aria-label": isExpanded ? "Collapse row details" : "Expand row details",
|
|
5795
|
-
className: "p-1 rounded hover:bg-gray-200",
|
|
5808
|
+
className: "p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700",
|
|
5796
5809
|
children: isExpanded ? "▾" : "▸"
|
|
5797
5810
|
}), selectable && jsxRuntime.jsx("input", {
|
|
5798
5811
|
type: "checkbox",
|
|
@@ -5826,7 +5839,7 @@ function MobileCard(_ref) {
|
|
|
5826
5839
|
if (action.disabled) return;
|
|
5827
5840
|
handleOnAction(action, row);
|
|
5828
5841
|
},
|
|
5829
|
-
className: cn$1("p-1.5 rounded", action.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-200"),
|
|
5842
|
+
className: cn$1("p-1.5 rounded", action.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-200 dark:hover:bg-gray-700"),
|
|
5830
5843
|
children: action.render ? action.render(row) : (_action$icon = action.icon) !== null && _action$icon !== void 0 ? _action$icon : jsxRuntime.jsx("span", {
|
|
5831
5844
|
className: "text-xs",
|
|
5832
5845
|
children: actionLabel
|
|
@@ -5843,7 +5856,7 @@ function MobileCard(_ref) {
|
|
|
5843
5856
|
return toggleActions(e, actionCellKey, row);
|
|
5844
5857
|
},
|
|
5845
5858
|
"aria-expanded": activeActionRowKey === actionCellKey,
|
|
5846
|
-
className: "p-1.5 rounded hover:bg-gray-200",
|
|
5859
|
+
className: "p-1.5 rounded hover:bg-gray-200 dark:hover:bg-gray-700",
|
|
5847
5860
|
title: "Actions",
|
|
5848
5861
|
"aria-label": "Actions",
|
|
5849
5862
|
children: jsxRuntime.jsx(MoreVertical, {
|
|
@@ -5885,7 +5898,7 @@ function MobileCard(_ref) {
|
|
|
5885
5898
|
}, column.key);
|
|
5886
5899
|
})
|
|
5887
5900
|
}), showDetailsToggle && isExpanded && DetailsComponent && jsxRuntime.jsx("div", {
|
|
5888
|
-
className: "border-t bg-
|
|
5901
|
+
className: "border-t border-line bg-background p-4",
|
|
5889
5902
|
children: jsxRuntime.jsx(DetailsComponent, {
|
|
5890
5903
|
row: row,
|
|
5891
5904
|
index: globalIndex
|
|
@@ -5946,7 +5959,7 @@ function FieldInput(_ref) {
|
|
|
5946
5959
|
onClick: stopProp,
|
|
5947
5960
|
onMouseDown: stopProp,
|
|
5948
5961
|
placeholder: "Enter ".concat(column.label || column.key, "..."),
|
|
5949
|
-
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-
|
|
5962
|
+
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)
|
|
5950
5963
|
});
|
|
5951
5964
|
}
|
|
5952
5965
|
// Select / Dropdown
|
|
@@ -5966,7 +5979,7 @@ function FieldInput(_ref) {
|
|
|
5966
5979
|
onKeyDown: onKeyDown,
|
|
5967
5980
|
onClick: stopProp,
|
|
5968
5981
|
onMouseDown: stopProp,
|
|
5969
|
-
className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-
|
|
5982
|
+
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),
|
|
5970
5983
|
children: [jsxRuntime.jsxs("option", {
|
|
5971
5984
|
value: "",
|
|
5972
5985
|
children: ["Select ", column.label || column.key]
|
|
@@ -6009,7 +6022,7 @@ function FieldInput(_ref) {
|
|
|
6009
6022
|
onKeyDown: onKeyDown,
|
|
6010
6023
|
onClick: stopProp,
|
|
6011
6024
|
onMouseDown: stopProp,
|
|
6012
|
-
className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-
|
|
6025
|
+
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)
|
|
6013
6026
|
});
|
|
6014
6027
|
}
|
|
6015
6028
|
// Number
|
|
@@ -6025,7 +6038,7 @@ function FieldInput(_ref) {
|
|
|
6025
6038
|
onClick: stopProp,
|
|
6026
6039
|
onMouseDown: stopProp,
|
|
6027
6040
|
placeholder: "Enter ".concat(column.label || column.key, "..."),
|
|
6028
|
-
className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-
|
|
6041
|
+
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)
|
|
6029
6042
|
});
|
|
6030
6043
|
}
|
|
6031
6044
|
// Default: Text
|
|
@@ -6040,7 +6053,7 @@ function FieldInput(_ref) {
|
|
|
6040
6053
|
onClick: stopProp,
|
|
6041
6054
|
onMouseDown: stopProp,
|
|
6042
6055
|
placeholder: "Enter ".concat(column.label || column.key, "..."),
|
|
6043
|
-
className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-
|
|
6056
|
+
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)
|
|
6044
6057
|
});
|
|
6045
6058
|
}
|
|
6046
6059
|
|
|
@@ -6051,11 +6064,11 @@ function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
6051
6064
|
var DEFAULT_DATA = [];
|
|
6052
6065
|
var DEFAULT_COLUMNS = [];
|
|
6053
6066
|
var DEFAULT_THEME = {
|
|
6054
|
-
stripedColors: ["bg-
|
|
6055
|
-
rowHover: "bg-
|
|
6056
|
-
accentColor: "bg-
|
|
6057
|
-
menuBg: "bg-
|
|
6058
|
-
menuItemHover: "hover:bg-
|
|
6067
|
+
stripedColors: ["bg-surface", "bg-background"],
|
|
6068
|
+
rowHover: "bg-background",
|
|
6069
|
+
accentColor: "bg-background",
|
|
6070
|
+
menuBg: "bg-surface",
|
|
6071
|
+
menuItemHover: "hover:bg-background"
|
|
6059
6072
|
};
|
|
6060
6073
|
var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
|
|
6061
6074
|
var _validationErrors$;
|
|
@@ -7270,7 +7283,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
|
|
|
7270
7283
|
onClick: handleClearChanges,
|
|
7271
7284
|
disabled: isSaving,
|
|
7272
7285
|
title: "Discard all pending modifications",
|
|
7273
|
-
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-
|
|
7286
|
+
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",
|
|
7274
7287
|
children: [jsxRuntime.jsx(X, {
|
|
7275
7288
|
className: "w-4 h-4 text-primary-600"
|
|
7276
7289
|
}), jsxRuntime.jsx("span", {
|
|
@@ -7314,7 +7327,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
|
|
|
7314
7327
|
onKeyDown: onGlobalKeyDown
|
|
7315
7328
|
}), jsxRuntime.jsx("button", {
|
|
7316
7329
|
onClick: applyGlobalSearch,
|
|
7317
|
-
className: "absolute right-2 top-1/2 transform -translate-y-1/2 p-2 rounded-lg hover:bg-gray-100",
|
|
7330
|
+
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",
|
|
7318
7331
|
title: "Search",
|
|
7319
7332
|
children: jsxRuntime.jsx(Search, {
|
|
7320
7333
|
className: "h-4 w-4 text-primary-400"
|
|
@@ -7325,7 +7338,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
|
|
|
7325
7338
|
setSearchInput("");
|
|
7326
7339
|
handleFilter("global", "");
|
|
7327
7340
|
},
|
|
7328
|
-
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",
|
|
7341
|
+
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",
|
|
7329
7342
|
children: "Clear"
|
|
7330
7343
|
})]
|
|
7331
7344
|
})
|
|
@@ -7349,7 +7362,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
|
|
|
7349
7362
|
}), !isMobileView && jsxRuntime.jsx("div", {
|
|
7350
7363
|
className: "overflow-x-auto overflow-y-visible",
|
|
7351
7364
|
children: jsxRuntime.jsxs("table", _objectSpread$P(_objectSpread$P({
|
|
7352
|
-
className: cn$1("min-w-full divide-y divide-
|
|
7365
|
+
className: cn$1("min-w-full divide-y divide-line", className)
|
|
7353
7366
|
}, props), {}, {
|
|
7354
7367
|
children: [jsxRuntime.jsxs("thead", {
|
|
7355
7368
|
className: safeTheme.accentColor,
|
|
@@ -7371,7 +7384,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
|
|
|
7371
7384
|
var _column$rules;
|
|
7372
7385
|
return jsxRuntime.jsx("th", {
|
|
7373
7386
|
className: cn$1("px-6 py-3 text-left text-xs font-medium text-primary-700 uppercase tracking-wider", {
|
|
7374
|
-
"cursor-pointer hover:bg-gray-100": sortable && column.sortable !== false
|
|
7387
|
+
"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800": sortable && column.sortable !== false
|
|
7375
7388
|
}),
|
|
7376
7389
|
onClick: function onClick() {
|
|
7377
7390
|
return column.sortable !== false && handleSort(column.key);
|
|
@@ -7415,7 +7428,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
|
|
|
7415
7428
|
return !s;
|
|
7416
7429
|
});
|
|
7417
7430
|
},
|
|
7418
|
-
className: "p-1 rounded hover:bg-gray-100",
|
|
7431
|
+
className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
7419
7432
|
children: jsxRuntime.jsx(MoreVertical, {
|
|
7420
7433
|
className: "h-4 w-4"
|
|
7421
7434
|
})
|
|
@@ -7451,7 +7464,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
|
|
|
7451
7464
|
})]
|
|
7452
7465
|
})]
|
|
7453
7466
|
}), jsxRuntime.jsx("tbody", {
|
|
7454
|
-
className: "divide-y divide-
|
|
7467
|
+
className: "divide-y divide-line",
|
|
7455
7468
|
children: loading ? jsxRuntime.jsx("tr", {
|
|
7456
7469
|
children: jsxRuntime.jsx("td", {
|
|
7457
7470
|
colSpan: visibleCount,
|
|
@@ -20058,8 +20071,8 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
20058
20071
|
}
|
|
20059
20072
|
}), {}, {
|
|
20060
20073
|
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", {
|
|
20061
|
-
"bg-primary-100 text-primary-700": isActive,
|
|
20062
|
-
"hover:bg-gray-100": !isActive && !item.disabled,
|
|
20074
|
+
"bg-primary-100 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300": isActive,
|
|
20075
|
+
"hover:bg-gray-100 dark:hover:bg-gray-800": !isActive && !item.disabled,
|
|
20063
20076
|
"cursor-pointer": !item.disabled,
|
|
20064
20077
|
"cursor-not-allowed opacity-50": item.disabled,
|
|
20065
20078
|
"justify-center": labelHidden
|
|
@@ -20088,7 +20101,7 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
20088
20101
|
})]
|
|
20089
20102
|
}) : item.badge
|
|
20090
20103
|
}), hasChildren && jsxRuntime.jsx("span", {
|
|
20091
|
-
className: "ml-2 flex-shrink-0 rounded p-0.5 hover:bg-gray-200",
|
|
20104
|
+
className: "ml-2 flex-shrink-0 rounded p-0.5 hover:bg-gray-200 dark:hover:bg-gray-700",
|
|
20092
20105
|
"aria-hidden": "true",
|
|
20093
20106
|
"data-sidebar-chevron": "",
|
|
20094
20107
|
onClick: hasHref ? function (e) {
|
|
@@ -20138,7 +20151,7 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
20138
20151
|
}),
|
|
20139
20152
|
"data-sidebar-section": section.key || "",
|
|
20140
20153
|
children: [effectiveCollapsed && idx > 0 && jsxRuntime.jsx("hr", {
|
|
20141
|
-
className: "mx-2 my-2 border-
|
|
20154
|
+
className: "mx-2 my-2 border-line",
|
|
20142
20155
|
"aria-hidden": "true"
|
|
20143
20156
|
}), section.key && (effectiveCollapsed ? jsxRuntime.jsx("span", {
|
|
20144
20157
|
id: headingId,
|
|
@@ -20146,7 +20159,7 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
20146
20159
|
children: section.key
|
|
20147
20160
|
}) : jsxRuntime.jsx("p", {
|
|
20148
20161
|
id: headingId,
|
|
20149
|
-
className: "px-3 pb-1 pt-2 text-micro font-semibold uppercase tracking-wide text-
|
|
20162
|
+
className: "px-3 pb-1 pt-2 text-micro font-semibold uppercase tracking-wide text-muted",
|
|
20150
20163
|
children: section.key
|
|
20151
20164
|
})), section.items.map(function (item) {
|
|
20152
20165
|
return _renderMenuItem(item, 0, pane);
|
|
@@ -20185,7 +20198,7 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
20185
20198
|
return jsxRuntime.jsx("button", {
|
|
20186
20199
|
type: "button",
|
|
20187
20200
|
onClick: handleUserClick,
|
|
20188
|
-
className: cn$1(base, "cursor-pointer hover:bg-gray-100 transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"),
|
|
20201
|
+
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"),
|
|
20189
20202
|
"aria-label": effectiveCollapsed && !user.avatar ? user.name : undefined,
|
|
20190
20203
|
children: content
|
|
20191
20204
|
});
|
|
@@ -20199,26 +20212,26 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
20199
20212
|
}) : footer;
|
|
20200
20213
|
if (content === undefined || content === null || content === false) return null;
|
|
20201
20214
|
return jsxRuntime.jsx("div", {
|
|
20202
|
-
className: "border-t border-
|
|
20215
|
+
className: "border-t border-line p-4",
|
|
20203
20216
|
"data-sidebar-footer": "",
|
|
20204
20217
|
children: content
|
|
20205
20218
|
});
|
|
20206
20219
|
};
|
|
20207
20220
|
var renderSidebarContent = function renderSidebarContent(pane) {
|
|
20208
20221
|
return jsxRuntime.jsxs("div", {
|
|
20209
|
-
className: cn$1("flex h-full flex-col bg-
|
|
20222
|
+
className: cn$1("flex h-full flex-col bg-surface text-foreground border-r border-line shadow-sm", "w-64 transition-all duration-200", {
|
|
20210
20223
|
"w-16": effectiveCollapsed,
|
|
20211
20224
|
"w-64": !effectiveCollapsed
|
|
20212
20225
|
}),
|
|
20213
20226
|
children: [jsxRuntime.jsxs("div", {
|
|
20214
|
-
className: "flex h-16 items-center justify-between border-b border-
|
|
20227
|
+
className: "flex h-16 items-center justify-between border-b border-line px-4",
|
|
20215
20228
|
children: [!effectiveCollapsed && logo && jsxRuntime.jsx("div", {
|
|
20216
20229
|
className: "flex items-center",
|
|
20217
20230
|
children: logo
|
|
20218
20231
|
}), jsxRuntime.jsx("button", {
|
|
20219
20232
|
type: "button",
|
|
20220
20233
|
onClick: handleToggleClick,
|
|
20221
|
-
className: "rounded-md p-1 hover:bg-gray-100",
|
|
20234
|
+
className: "rounded-md p-1 hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
20222
20235
|
"aria-label": effectiveCollapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
20223
20236
|
children: effectiveCollapsed ? jsxRuntime.jsx(ChevronRight, {
|
|
20224
20237
|
className: "h-5 w-5"
|
|
@@ -20227,10 +20240,10 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
20227
20240
|
})
|
|
20228
20241
|
})]
|
|
20229
20242
|
}), jsxRuntime.jsx("nav", {
|
|
20230
|
-
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",
|
|
20243
|
+
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",
|
|
20231
20244
|
children: renderNavContent(pane)
|
|
20232
20245
|
}), renderFooter(pane), user && jsxRuntime.jsx("div", {
|
|
20233
|
-
className: "border-t border-
|
|
20246
|
+
className: "border-t border-line p-4",
|
|
20234
20247
|
children: jsxRuntime.jsx("div", {
|
|
20235
20248
|
className: "relative",
|
|
20236
20249
|
children: renderUserBlock()
|
|
@@ -20331,7 +20344,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
20331
20344
|
},
|
|
20332
20345
|
children: trigger
|
|
20333
20346
|
}), isOpen && jsxRuntime.jsx("div", {
|
|
20334
|
-
className: "absolute z-50 bg-
|
|
20347
|
+
className: "absolute z-50 bg-surface text-foreground border border-line rounded-md shadow-lg ".concat(placementClasses[placement], " min-w-48"),
|
|
20335
20348
|
children: children
|
|
20336
20349
|
})]
|
|
20337
20350
|
}));
|
|
@@ -20481,7 +20494,7 @@ var NotificationsDropdown = function NotificationsDropdown(_ref) {
|
|
|
20481
20494
|
// For simplicity, shows notifications in the dropdown, can be expanded
|
|
20482
20495
|
return jsxRuntime.jsx(Dropdown, {
|
|
20483
20496
|
trigger: jsxRuntime.jsxs("button", {
|
|
20484
|
-
className: "relative rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100",
|
|
20497
|
+
className: "relative rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
20485
20498
|
"aria-label": "notifications",
|
|
20486
20499
|
children: [jsxRuntime.jsx(Bell, {
|
|
20487
20500
|
className: "h-5 w-5"
|
|
@@ -20494,9 +20507,9 @@ var NotificationsDropdown = function NotificationsDropdown(_ref) {
|
|
|
20494
20507
|
children: jsxRuntime.jsxs("div", {
|
|
20495
20508
|
className: "py-2 min-w-56 max-h-80 overflow-y-auto",
|
|
20496
20509
|
children: [jsxRuntime.jsxs("div", {
|
|
20497
|
-
className: "px-4 py-2 border-b border-
|
|
20510
|
+
className: "px-4 py-2 border-b border-line flex items-center justify-between",
|
|
20498
20511
|
children: [jsxRuntime.jsx("span", {
|
|
20499
|
-
className: "font-medium text-primary-800 text-sm",
|
|
20512
|
+
className: "font-medium text-primary-800 dark:text-primary-100 text-sm",
|
|
20500
20513
|
children: "Notifications"
|
|
20501
20514
|
}), jsxRuntime.jsx("button", {
|
|
20502
20515
|
className: "text-xs text-primary-400 hover:text-error-600",
|
|
@@ -20512,16 +20525,16 @@ var NotificationsDropdown = function NotificationsDropdown(_ref) {
|
|
|
20512
20525
|
children: "No notifications"
|
|
20513
20526
|
}) : notifications.map(function (n) {
|
|
20514
20527
|
return jsxRuntime.jsxs("div", {
|
|
20515
|
-
className: cn$1("flex items-start gap-3 px-4 py-2 hover:bg-gray-50 cursor-pointer group", !n.read ? "bg-primary-50" : ""),
|
|
20528
|
+
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" : ""),
|
|
20516
20529
|
onClick: function onClick() {
|
|
20517
20530
|
return onView();
|
|
20518
20531
|
},
|
|
20519
20532
|
children: [jsxRuntime.jsx("span", {
|
|
20520
|
-
className: cn$1("h-2 w-2 mt-2 rounded-full", !n.read ? "bg-primary-500" : "bg-gray-300")
|
|
20533
|
+
className: cn$1("h-2 w-2 mt-2 rounded-full", !n.read ? "bg-primary-500" : "bg-gray-300 dark:bg-gray-600")
|
|
20521
20534
|
}), jsxRuntime.jsxs("div", {
|
|
20522
20535
|
className: "flex-1",
|
|
20523
20536
|
children: [jsxRuntime.jsx("div", {
|
|
20524
|
-
className: "text-sm text-primary-800",
|
|
20537
|
+
className: "text-sm text-primary-800 dark:text-primary-100",
|
|
20525
20538
|
children: n.title
|
|
20526
20539
|
}), n.message && jsxRuntime.jsx("div", {
|
|
20527
20540
|
className: "text-xs text-primary-500",
|
|
@@ -20573,10 +20586,10 @@ var RightMenuContent = function RightMenuContent(_ref2) {
|
|
|
20573
20586
|
});
|
|
20574
20587
|
};
|
|
20575
20588
|
var styledClassNames = {
|
|
20576
|
-
button: "rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100",
|
|
20589
|
+
button: "rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
20577
20590
|
mobileItem: "md:hidden",
|
|
20578
20591
|
icon: "h-6 w-6",
|
|
20579
|
-
dropdown: "w-56 rounded-md border border-
|
|
20592
|
+
dropdown: "w-56 rounded-md border border-line bg-surface py-1 shadow-lg"
|
|
20580
20593
|
};
|
|
20581
20594
|
var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
20582
20595
|
var emitter = _ref3.emitter,
|
|
@@ -20661,7 +20674,7 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
20661
20674
|
},
|
|
20662
20675
|
className: cn$1("block w-full text-left px-4 py-2 text-sm", {
|
|
20663
20676
|
"text-primary-600": item.active,
|
|
20664
|
-
"hover:bg-gray-50": !item.active
|
|
20677
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800": !item.active
|
|
20665
20678
|
}),
|
|
20666
20679
|
children: item.label
|
|
20667
20680
|
}, item.id);
|
|
@@ -20676,7 +20689,7 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
20676
20689
|
};
|
|
20677
20690
|
return jsxRuntime.jsxs("nav", _objectSpread$p(_objectSpread$p({
|
|
20678
20691
|
ref: ref,
|
|
20679
|
-
className: cn$1("bg-
|
|
20692
|
+
className: cn$1("bg-surface text-foreground border-b border-line px-4 sm:px-6 lg:px-8", className)
|
|
20680
20693
|
}, props), {}, {
|
|
20681
20694
|
children: [jsxRuntime.jsxs("div", {
|
|
20682
20695
|
className: "flex h-16 min-w-0 items-center justify-between gap-2 sm:gap-4",
|
|
@@ -20689,7 +20702,7 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
20689
20702
|
className: "flex min-w-0 items-center",
|
|
20690
20703
|
children: [leftIcon !== false && jsxRuntime.jsx("button", {
|
|
20691
20704
|
onClick: onLeftIconClick,
|
|
20692
|
-
className: "shrink-0 md:hidden rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100",
|
|
20705
|
+
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",
|
|
20693
20706
|
"aria-label": "back",
|
|
20694
20707
|
children: leftIcon
|
|
20695
20708
|
}), logo && jsxRuntime.jsx("div", {
|
|
@@ -20716,7 +20729,7 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
20716
20729
|
}), jsxRuntime.jsx("input", {
|
|
20717
20730
|
type: "text",
|
|
20718
20731
|
placeholder: "Search...",
|
|
20719
|
-
className: "w-64 rounded-md border border-gray-300 bg-
|
|
20732
|
+
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",
|
|
20720
20733
|
value: searchTerm,
|
|
20721
20734
|
onChange: function onChange(e) {
|
|
20722
20735
|
return setSearchTerm(e.target.value);
|
|
@@ -20779,9 +20792,9 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
20779
20792
|
children: jsxRuntime.jsxs("div", {
|
|
20780
20793
|
className: styledClassNames.dropdown,
|
|
20781
20794
|
children: [jsxRuntime.jsxs("div", {
|
|
20782
|
-
className: "px-4 py-2 border-b border-
|
|
20795
|
+
className: "px-4 py-2 border-b border-line",
|
|
20783
20796
|
children: [jsxRuntime.jsx("p", {
|
|
20784
|
-
className: "text-sm font-medium text-primary-900",
|
|
20797
|
+
className: "text-sm font-medium text-primary-900 dark:text-primary-100",
|
|
20785
20798
|
children: user.name
|
|
20786
20799
|
}), jsxRuntime.jsx("p", {
|
|
20787
20800
|
className: "text-xs text-primary-500",
|
|
@@ -20791,23 +20804,23 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
20791
20804
|
className: "py-1",
|
|
20792
20805
|
children: renderNavItems(true)
|
|
20793
20806
|
}), user.menuItems && user.menuItems.length > 0 && jsxRuntime.jsx("div", {
|
|
20794
|
-
className: "border-t border-
|
|
20807
|
+
className: "border-t border-line",
|
|
20795
20808
|
children: user.menuItems.map(function (mi) {
|
|
20796
20809
|
return jsxRuntime.jsx("button", {
|
|
20797
20810
|
onClick: function onClick(e) {
|
|
20798
20811
|
var _mi$onClick;
|
|
20799
20812
|
return mi === null || mi === void 0 || (_mi$onClick = mi.onClick) === null || _mi$onClick === void 0 ? void 0 : _mi$onClick.call(mi, e);
|
|
20800
20813
|
},
|
|
20801
|
-
className: "block w-full px-4 py-2 text-left text-sm hover:bg-gray-100",
|
|
20814
|
+
className: "block w-full px-4 py-2 text-left text-sm hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
20802
20815
|
children: mi.label
|
|
20803
20816
|
}, mi.id);
|
|
20804
20817
|
})
|
|
20805
20818
|
}), jsxRuntime.jsx("div", {
|
|
20806
|
-
className: "border-t border-
|
|
20819
|
+
className: "border-t border-line sm:hidden",
|
|
20807
20820
|
children: jsxRuntime.jsxs("button", {
|
|
20808
20821
|
type: "button",
|
|
20809
20822
|
onClick: handleLogoutClick,
|
|
20810
|
-
className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm hover:bg-gray-100",
|
|
20823
|
+
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",
|
|
20811
20824
|
children: [jsxRuntime.jsx(LogOut, {
|
|
20812
20825
|
className: "h-4 w-4",
|
|
20813
20826
|
"aria-hidden": "true"
|
|
@@ -20821,13 +20834,13 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
20821
20834
|
}), isMobileMenuOpen && !user && jsxRuntime.jsx("div", {
|
|
20822
20835
|
className: "md:hidden h-full",
|
|
20823
20836
|
children: jsxRuntime.jsx("div", {
|
|
20824
|
-
className: "space-y-1 border-t border-
|
|
20837
|
+
className: "space-y-1 border-t border-line px-2 pt-4 pb-3",
|
|
20825
20838
|
children: items.map(function (item) {
|
|
20826
20839
|
return jsxRuntime.jsx("a", {
|
|
20827
20840
|
href: item.href,
|
|
20828
20841
|
className: cn$1("block rounded-md px-3 py-2 text-base font-medium", {
|
|
20829
|
-
"bg-primary-50 text-primary-700": item.active,
|
|
20830
|
-
"hover:bg-gray-50": !item.active
|
|
20842
|
+
"bg-primary-50 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300": item.active,
|
|
20843
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800": !item.active
|
|
20831
20844
|
}),
|
|
20832
20845
|
children: item.label
|
|
20833
20846
|
}, item.id);
|
|
@@ -22193,7 +22206,7 @@ var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
22193
22206
|
props = _objectWithoutProperties$1(_ref, _excluded$c);
|
|
22194
22207
|
return jsxRuntime.jsx("div", _objectSpread$g(_objectSpread$g({
|
|
22195
22208
|
ref: ref,
|
|
22196
|
-
className: cn$1('rounded-lg border border-
|
|
22209
|
+
className: cn$1('rounded-lg border border-line bg-surface shadow-sm', {
|
|
22197
22210
|
'hover:shadow-md transition-shadow': hover
|
|
22198
22211
|
}, className)
|
|
22199
22212
|
}, props), {}, {
|
|
@@ -22206,7 +22219,7 @@ var CardHeader = function CardHeader(_ref2) {
|
|
|
22206
22219
|
className = _ref2.className,
|
|
22207
22220
|
props = _objectWithoutProperties$1(_ref2, _excluded2);
|
|
22208
22221
|
return jsxRuntime.jsx("div", _objectSpread$g(_objectSpread$g({
|
|
22209
|
-
className: cn$1('px-6 py-4 border-b border-
|
|
22222
|
+
className: cn$1('px-6 py-4 border-b border-line', className)
|
|
22210
22223
|
}, props), {}, {
|
|
22211
22224
|
children: children
|
|
22212
22225
|
}));
|
|
@@ -22216,7 +22229,7 @@ var CardTitle = function CardTitle(_ref3) {
|
|
|
22216
22229
|
className = _ref3.className,
|
|
22217
22230
|
props = _objectWithoutProperties$1(_ref3, _excluded3);
|
|
22218
22231
|
return jsxRuntime.jsx("h3", _objectSpread$g(_objectSpread$g({
|
|
22219
|
-
className: cn$1('text-lg font-semibold text-primary-900', className)
|
|
22232
|
+
className: cn$1('text-lg font-semibold text-primary-900 dark:text-primary-100', className)
|
|
22220
22233
|
}, props), {}, {
|
|
22221
22234
|
children: children
|
|
22222
22235
|
}));
|
|
@@ -22226,7 +22239,7 @@ var CardDescription = function CardDescription(_ref4) {
|
|
|
22226
22239
|
className = _ref4.className,
|
|
22227
22240
|
props = _objectWithoutProperties$1(_ref4, _excluded4);
|
|
22228
22241
|
return jsxRuntime.jsx("p", _objectSpread$g(_objectSpread$g({
|
|
22229
|
-
className: cn$1('text-sm text-primary-600', className)
|
|
22242
|
+
className: cn$1('text-sm text-primary-600 dark:text-primary-300', className)
|
|
22230
22243
|
}, props), {}, {
|
|
22231
22244
|
children: children
|
|
22232
22245
|
}));
|
|
@@ -22246,7 +22259,7 @@ var CardFooter = function CardFooter(_ref6) {
|
|
|
22246
22259
|
className = _ref6.className,
|
|
22247
22260
|
props = _objectWithoutProperties$1(_ref6, _excluded6);
|
|
22248
22261
|
return jsxRuntime.jsx("div", _objectSpread$g(_objectSpread$g({
|
|
22249
|
-
className: cn$1('px-6 py-4 border-t border-
|
|
22262
|
+
className: cn$1('px-6 py-4 border-t border-line', className)
|
|
22250
22263
|
}, props), {}, {
|
|
22251
22264
|
children: children
|
|
22252
22265
|
}));
|
package/dist/types/index.d.ts
CHANGED
|
@@ -275,6 +275,7 @@ export interface TableSortConfig {
|
|
|
275
275
|
direction: 'asc' | 'desc';
|
|
276
276
|
}
|
|
277
277
|
export interface TableTheme {
|
|
278
|
+
/** Each entry is a Tailwind `bg-*` class or a CSS colour. Default `['bg-surface', 'bg-background']`. */
|
|
278
279
|
stripedColors?: string[];
|
|
279
280
|
rowHover?: string;
|
|
280
281
|
accentColor?: string;
|