@dreamtree-org/twreact-ui 1.3.2 → 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/DESIGN.md +2 -2
- package/README.md +14 -6
- package/ai-skills/dreamtree-ui.md +3 -1
- package/bin/cli.mjs +72 -4
- package/dist/ai-schema.json +3 -2
- package/dist/charts/index.js +75 -47
- package/dist/components/charts/CartesianChart.d.ts.map +1 -1
- package/dist/components/charts/DonutChart.d.ts.map +1 -1
- package/dist/components/charts/Sparkline.d.ts.map +1 -1
- package/dist/components/charts/chartTheme.d.ts +13 -3
- package/dist/components/charts/chartTheme.d.ts.map +1 -1
- package/dist/components/core/Table/MobileCard.d.ts.map +1 -1
- package/dist/components/core/Table/MobileFilters.d.ts.map +1 -1
- package/dist/components/core/Table/Table.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/components/utility/Stepper.d.ts.map +1 -1
- package/dist/esm/components/blocks/StatCard.js +1 -1
- package/dist/esm/components/charts/CartesianChart.js +7 -2
- package/dist/esm/components/charts/DonutChart.js +4 -1
- package/dist/esm/components/charts/Sparkline.js +4 -1
- package/dist/esm/components/charts/chartTheme.js +65 -48
- package/dist/esm/components/core/Select.js +2 -2
- 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 +14 -12
- package/dist/esm/components/core/Table/MobileFilters.js +11 -4
- package/dist/esm/components/core/Table/Pagination.js +1 -1
- package/dist/esm/components/core/Table/Table.js +22 -19
- 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/esm/components/utility/Stepper.js +6 -4
- package/dist/index.css +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +129 -101
- package/dist/index.js +129 -101
- package/dist/tokens/brands/practicepro.json +1 -0
- package/dist/tokens/brands/studio.json +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/mcp/catalog.snapshot.json +21 -21
- package/package.json +2 -1
- package/tokens/brand.schema.json +612 -0
- package/tokens/brands/practicepro.json +1 -0
- package/tokens/brands/studio.json +1 -0
- package/tokens/lib.cjs +131 -7
package/dist/index.esm.js
CHANGED
|
@@ -3636,7 +3636,7 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, forwardedRef
|
|
|
3636
3636
|
onMenuItemRender = _ref.onMenuItemRender,
|
|
3637
3637
|
className = _ref.className,
|
|
3638
3638
|
_ref$allowClear = _ref.allowClear,
|
|
3639
|
-
allowClear = _ref$allowClear === void 0 ?
|
|
3639
|
+
allowClear = _ref$allowClear === void 0 ? false : _ref$allowClear,
|
|
3640
3640
|
_ref$creatable = _ref.creatable,
|
|
3641
3641
|
creatable = _ref$creatable === void 0 ? false : _ref$creatable,
|
|
3642
3642
|
onCreateOption = _ref.onCreateOption,
|
|
@@ -4073,7 +4073,7 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, forwardedRef
|
|
|
4073
4073
|
}, opt.value);
|
|
4074
4074
|
})
|
|
4075
4075
|
}), jsxs("div", {
|
|
4076
|
-
className: "text-xs text-primary-
|
|
4076
|
+
className: "text-xs text-primary-700",
|
|
4077
4077
|
children: ["+", rest]
|
|
4078
4078
|
})]
|
|
4079
4079
|
});
|
|
@@ -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-
|
|
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-
|
|
5102
|
+
var DEFAULT_ROW_HOVER = "bg-background";
|
|
5088
5103
|
/**
|
|
5089
5104
|
* Column visibility toggle menu
|
|
5090
5105
|
*/
|
|
@@ -5146,20 +5161,23 @@ function MobileFilters(_ref) {
|
|
|
5146
5161
|
visibleColumns = _ref.visibleColumns,
|
|
5147
5162
|
filters = _ref.filters,
|
|
5148
5163
|
handleFilter = _ref.handleFilter;
|
|
5164
|
+
var idPrefix = React__default.useId();
|
|
5149
5165
|
return jsxs("div", {
|
|
5150
|
-
className: "mb-4 p-3 bg-
|
|
5166
|
+
className: "mb-4 p-3 bg-background rounded-lg",
|
|
5151
5167
|
children: [jsxs("div", {
|
|
5152
5168
|
className: "flex items-center justify-between mb-3",
|
|
5153
5169
|
children: [jsx("h3", {
|
|
5154
5170
|
className: "text-sm font-medium",
|
|
5155
5171
|
children: "Filters"
|
|
5156
5172
|
}), jsx("button", {
|
|
5173
|
+
type: "button",
|
|
5157
5174
|
onClick: function onClick() {
|
|
5158
5175
|
return setShowMobileFilters(function (s) {
|
|
5159
5176
|
return !s;
|
|
5160
5177
|
});
|
|
5161
5178
|
},
|
|
5162
|
-
|
|
5179
|
+
"aria-expanded": !!showMobileFilters,
|
|
5180
|
+
className: "text-xs font-medium text-primary-700",
|
|
5163
5181
|
children: showMobileFilters ? "Hide" : "Show"
|
|
5164
5182
|
})]
|
|
5165
5183
|
}), showMobileFilters && jsxs("div", {
|
|
@@ -5169,6 +5187,7 @@ function MobileFilters(_ref) {
|
|
|
5169
5187
|
children: [jsx("input", {
|
|
5170
5188
|
type: "text",
|
|
5171
5189
|
placeholder: "Search...",
|
|
5190
|
+
"aria-label": "Search",
|
|
5172
5191
|
className: "w-full rounded-md border border-gray-300 px-4 py-2 text-sm",
|
|
5173
5192
|
value: searchInput,
|
|
5174
5193
|
onChange: function onChange(e) {
|
|
@@ -5176,14 +5195,17 @@ function MobileFilters(_ref) {
|
|
|
5176
5195
|
},
|
|
5177
5196
|
onKeyDown: onGlobalKeyDown
|
|
5178
5197
|
}), jsx(Search, {
|
|
5179
|
-
className: "absolute right-3 top-2.5 h-4 w-4 text-primary-400"
|
|
5198
|
+
className: "absolute right-3 top-2.5 h-4 w-4 text-primary-400",
|
|
5199
|
+
"aria-hidden": "true"
|
|
5180
5200
|
})]
|
|
5181
5201
|
}), filterable && visibleColumns.map(function (column) {
|
|
5182
5202
|
return jsxs("div", {
|
|
5183
5203
|
children: [jsx("label", {
|
|
5204
|
+
htmlFor: "".concat(idPrefix, "-filter-").concat(column.key),
|
|
5184
5205
|
className: "block text-xs font-medium mb-1",
|
|
5185
5206
|
children: column.label
|
|
5186
5207
|
}), jsx("input", {
|
|
5208
|
+
id: "".concat(idPrefix, "-filter-").concat(column.key),
|
|
5187
5209
|
type: "text",
|
|
5188
5210
|
placeholder: "Filter ".concat(column.label),
|
|
5189
5211
|
className: "w-full rounded-md border border-gray-300 px-3 py-2 text-sm",
|
|
@@ -5198,8 +5220,8 @@ function MobileFilters(_ref) {
|
|
|
5198
5220
|
});
|
|
5199
5221
|
}
|
|
5200
5222
|
|
|
5201
|
-
var DEFAULT_MENU_BG = "bg-
|
|
5202
|
-
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";
|
|
5203
5225
|
function ActionMenu(_ref) {
|
|
5204
5226
|
var _theme$menuBg, _theme$menuItemHover;
|
|
5205
5227
|
var _ref$actions = _ref.actions,
|
|
@@ -5403,7 +5425,7 @@ function ActionMenu(_ref) {
|
|
|
5403
5425
|
children: jsx("div", {
|
|
5404
5426
|
className: "p-1.5 space-y-0.5",
|
|
5405
5427
|
children: !Array.isArray(actions) || actions.length === 0 ? jsx("div", {
|
|
5406
|
-
className: "px-3 py-2 text-sm text-
|
|
5428
|
+
className: "px-3 py-2 text-sm text-muted italic",
|
|
5407
5429
|
children: "No actions"
|
|
5408
5430
|
}) : actions.map(function (action, idx) {
|
|
5409
5431
|
var _action$name;
|
|
@@ -5414,7 +5436,7 @@ function ActionMenu(_ref) {
|
|
|
5414
5436
|
type: "button",
|
|
5415
5437
|
disabled: isDisabled,
|
|
5416
5438
|
"aria-disabled": isDisabled || undefined,
|
|
5417
|
-
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-
|
|
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" : ""]),
|
|
5418
5440
|
onMouseEnter: function onMouseEnter() {
|
|
5419
5441
|
return !isDisabled && setFocusedIndex(idx);
|
|
5420
5442
|
},
|
|
@@ -5426,7 +5448,7 @@ function ActionMenu(_ref) {
|
|
|
5426
5448
|
},
|
|
5427
5449
|
children: action.render ? action.render(row) : jsxs(Fragment, {
|
|
5428
5450
|
children: [action.icon && jsx("span", {
|
|
5429
|
-
className: "inline-flex text-
|
|
5451
|
+
className: "inline-flex text-muted flex-shrink-0",
|
|
5430
5452
|
children: action.icon
|
|
5431
5453
|
}), jsx("span", {
|
|
5432
5454
|
className: "truncate",
|
|
@@ -5521,6 +5543,7 @@ function TableRow(_ref) {
|
|
|
5521
5543
|
var safeExtraRowClass = typeof extraRowClass === "string" ? extraRowClass.trim() : "";
|
|
5522
5544
|
var stripeColors = theme === null || theme === void 0 ? void 0 : theme.stripedColors;
|
|
5523
5545
|
var stripeBg = stripedRows && !isSelected && Array.isArray(stripeColors) && stripeColors.length > 0 ? stripeColors[globalIndex % stripeColors.length] : undefined;
|
|
5546
|
+
var stripeProps = getStripeProps(stripeBg);
|
|
5524
5547
|
var rowKey = isNewRow ? row._key : key;
|
|
5525
5548
|
var isRowActive = interactive && (activeCell === null || activeCell === void 0 ? void 0 : activeCell.rowKey) === rowKey;
|
|
5526
5549
|
var effectiveRow = React__default.useMemo(function () {
|
|
@@ -5529,10 +5552,8 @@ function TableRow(_ref) {
|
|
|
5529
5552
|
}, [interactive, pendingEdits, rowKey, row]);
|
|
5530
5553
|
return jsxs(React__default.Fragment, {
|
|
5531
5554
|
children: [jsxs("tr", {
|
|
5532
|
-
style:
|
|
5533
|
-
|
|
5534
|
-
} : undefined,
|
|
5535
|
-
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] : [], {
|
|
5536
5557
|
"cursor-pointer": !!onRowClick,
|
|
5537
5558
|
"bg-primary-50": isSelected,
|
|
5538
5559
|
"bg-primary-50/20": isRowActive && !isSelected,
|
|
@@ -5551,7 +5572,7 @@ function TableRow(_ref) {
|
|
|
5551
5572
|
},
|
|
5552
5573
|
"aria-expanded": isExpanded,
|
|
5553
5574
|
"aria-label": isExpanded ? "Collapse row details" : "Expand row details",
|
|
5554
|
-
className: "p-1 rounded hover:bg-gray-100",
|
|
5575
|
+
className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
5555
5576
|
children: isExpanded ? "▾" : "▸"
|
|
5556
5577
|
})
|
|
5557
5578
|
}), showSerial && jsx("td", {
|
|
@@ -5587,9 +5608,9 @@ function TableRow(_ref) {
|
|
|
5587
5608
|
title: isCellInvalid ? "Field \"".concat(column.label || column.key, "\" is required or invalid") : undefined,
|
|
5588
5609
|
className: cn$1("px-6 py-4 text-sm transition-all", wrapCell ? "whitespace-normal break-words" : "whitespace-nowrap", {
|
|
5589
5610
|
"ring-2 ring-error-500 ring-inset bg-error-50/40 relative z-10": isCellInvalid && !isCellEditing,
|
|
5590
|
-
"ring-2 ring-error-600 ring-inset bg-
|
|
5611
|
+
"ring-2 ring-error-600 ring-inset bg-surface p-1 z-20 relative": isCellEditing && isCellInvalid,
|
|
5591
5612
|
"ring-2 ring-primary-500 ring-inset bg-primary-50/50 relative z-10": isCellActive && !isCellEditing && !isCellInvalid,
|
|
5592
|
-
"ring-2 ring-primary-600 ring-inset bg-
|
|
5613
|
+
"ring-2 ring-primary-600 ring-inset bg-surface p-1 z-20 relative": isCellEditing && !isCellInvalid
|
|
5593
5614
|
}, safeExtraCellClass),
|
|
5594
5615
|
onClick: function onClick() {
|
|
5595
5616
|
if (interactive && onCellClick) {
|
|
@@ -5636,7 +5657,7 @@ function TableRow(_ref) {
|
|
|
5636
5657
|
if (action.disabled) return;
|
|
5637
5658
|
handleOnAction(action, row);
|
|
5638
5659
|
},
|
|
5639
|
-
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"),
|
|
5640
5661
|
children: action.render ? action.render(row) : (_action$icon = action.icon) !== null && _action$icon !== void 0 ? _action$icon : jsx("span", {
|
|
5641
5662
|
className: "text-xs",
|
|
5642
5663
|
children: actionLabel
|
|
@@ -5652,7 +5673,7 @@ function TableRow(_ref) {
|
|
|
5652
5673
|
return toggleActions(e, actionCellKey, row);
|
|
5653
5674
|
},
|
|
5654
5675
|
"aria-expanded": activeActionRowKey === actionCellKey,
|
|
5655
|
-
className: "p-1 rounded hover:bg-gray-100",
|
|
5676
|
+
className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
5656
5677
|
title: "Actions",
|
|
5657
5678
|
children: jsx(MoreVertical, {
|
|
5658
5679
|
className: "h-4 w-4"
|
|
@@ -5676,7 +5697,7 @@ function TableRow(_ref) {
|
|
|
5676
5697
|
colSpan: visibleCount,
|
|
5677
5698
|
className: cn$1(_defineProperty$4(_defineProperty$4({
|
|
5678
5699
|
"px-6 py-4": true
|
|
5679
|
-
}, (_theme$accentColor = theme === null || theme === void 0 ? void 0 : theme.accentColor) !== null && _theme$accentColor !== void 0 ? _theme$accentColor : "bg-
|
|
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)),
|
|
5680
5701
|
children: jsx(DetailsComponent, {
|
|
5681
5702
|
row: row,
|
|
5682
5703
|
index: globalIndex
|
|
@@ -5741,11 +5762,10 @@ function MobileCard(_ref) {
|
|
|
5741
5762
|
var hasActions = withAction && (inlineActions.length > 0 || menuActions.length > 0);
|
|
5742
5763
|
var showHeader = showDetailsToggle || selectable || showSerial || hasActions;
|
|
5743
5764
|
var stripeBg = stripedRows && !isSelected && Array.isArray(stripedColors) && stripedColors.length > 0 ? stripedColors[globalIndex % stripedColors.length] : undefined;
|
|
5765
|
+
var stripeProps = getStripeProps(stripeBg);
|
|
5744
5766
|
return jsxs("div", {
|
|
5745
|
-
style:
|
|
5746
|
-
|
|
5747
|
-
} : undefined,
|
|
5748
|
-
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", {
|
|
5749
5769
|
"cursor-pointer": !!onRowClick,
|
|
5750
5770
|
"bg-primary-50 border-primary-200": isSelected,
|
|
5751
5771
|
"hover:shadow-md": !isSelected
|
|
@@ -5754,7 +5774,7 @@ function MobileCard(_ref) {
|
|
|
5754
5774
|
return onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(row, globalIndex);
|
|
5755
5775
|
},
|
|
5756
5776
|
children: [showHeader && jsxs("div", {
|
|
5757
|
-
className: "flex items-center justify-between p-4 border-b bg-
|
|
5777
|
+
className: "flex items-center justify-between p-4 border-b border-line bg-background",
|
|
5758
5778
|
children: [jsxs("div", {
|
|
5759
5779
|
className: "flex items-center gap-3",
|
|
5760
5780
|
children: [showDetailsToggle && jsx("button", {
|
|
@@ -5765,7 +5785,7 @@ function MobileCard(_ref) {
|
|
|
5765
5785
|
},
|
|
5766
5786
|
"aria-expanded": isExpanded,
|
|
5767
5787
|
"aria-label": isExpanded ? "Collapse row details" : "Expand row details",
|
|
5768
|
-
className: "p-1 rounded hover:bg-gray-200",
|
|
5788
|
+
className: "p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700",
|
|
5769
5789
|
children: isExpanded ? "▾" : "▸"
|
|
5770
5790
|
}), selectable && jsx("input", {
|
|
5771
5791
|
type: "checkbox",
|
|
@@ -5799,7 +5819,7 @@ function MobileCard(_ref) {
|
|
|
5799
5819
|
if (action.disabled) return;
|
|
5800
5820
|
handleOnAction(action, row);
|
|
5801
5821
|
},
|
|
5802
|
-
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"),
|
|
5803
5823
|
children: action.render ? action.render(row) : (_action$icon = action.icon) !== null && _action$icon !== void 0 ? _action$icon : jsx("span", {
|
|
5804
5824
|
className: "text-xs",
|
|
5805
5825
|
children: actionLabel
|
|
@@ -5808,6 +5828,7 @@ function MobileCard(_ref) {
|
|
|
5808
5828
|
}), menuActions.length > 0 && jsxs("div", {
|
|
5809
5829
|
className: "relative",
|
|
5810
5830
|
children: [jsx("button", {
|
|
5831
|
+
type: "button",
|
|
5811
5832
|
ref: function ref(el) {
|
|
5812
5833
|
return registerActionButton === null || registerActionButton === void 0 ? void 0 : registerActionButton(actionCellKey, el);
|
|
5813
5834
|
},
|
|
@@ -5815,10 +5836,12 @@ function MobileCard(_ref) {
|
|
|
5815
5836
|
return toggleActions(e, actionCellKey, row);
|
|
5816
5837
|
},
|
|
5817
5838
|
"aria-expanded": activeActionRowKey === actionCellKey,
|
|
5818
|
-
className: "p-1.5 rounded hover:bg-gray-200",
|
|
5839
|
+
className: "p-1.5 rounded hover:bg-gray-200 dark:hover:bg-gray-700",
|
|
5819
5840
|
title: "Actions",
|
|
5841
|
+
"aria-label": "Actions",
|
|
5820
5842
|
children: jsx(MoreVertical, {
|
|
5821
|
-
className: "h-4 w-4"
|
|
5843
|
+
className: "h-4 w-4",
|
|
5844
|
+
"aria-hidden": "true"
|
|
5822
5845
|
})
|
|
5823
5846
|
}), activeActionRowKey === actionCellKey && jsx(ActionMenu, {
|
|
5824
5847
|
actions: menuActions,
|
|
@@ -5846,7 +5869,7 @@ function MobileCard(_ref) {
|
|
|
5846
5869
|
return jsxs("div", {
|
|
5847
5870
|
className: cn$1("flex justify-between items-center flex-row py-2 border-b last:border-b-0", safeExtraCellClass),
|
|
5848
5871
|
children: [jsx("div", {
|
|
5849
|
-
className: "text-xs font-medium text-primary-
|
|
5872
|
+
className: "text-xs font-medium text-primary-700 uppercase tracking-wide mb-1 sm:mb-0 sm:w-1/3 sm:pr-2",
|
|
5850
5873
|
children: column.label
|
|
5851
5874
|
}), jsx("div", {
|
|
5852
5875
|
className: "text-sm text-primary-900 sm:w-2/3 sm:pl-2 break-words",
|
|
@@ -5855,7 +5878,7 @@ function MobileCard(_ref) {
|
|
|
5855
5878
|
}, column.key);
|
|
5856
5879
|
})
|
|
5857
5880
|
}), showDetailsToggle && isExpanded && DetailsComponent && jsx("div", {
|
|
5858
|
-
className: "border-t bg-
|
|
5881
|
+
className: "border-t border-line bg-background p-4",
|
|
5859
5882
|
children: jsx(DetailsComponent, {
|
|
5860
5883
|
row: row,
|
|
5861
5884
|
index: globalIndex
|
|
@@ -5916,7 +5939,7 @@ function FieldInput(_ref) {
|
|
|
5916
5939
|
onClick: stopProp,
|
|
5917
5940
|
onMouseDown: stopProp,
|
|
5918
5941
|
placeholder: "Enter ".concat(column.label || column.key, "..."),
|
|
5919
|
-
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-
|
|
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)
|
|
5920
5943
|
});
|
|
5921
5944
|
}
|
|
5922
5945
|
// Select / Dropdown
|
|
@@ -5936,7 +5959,7 @@ function FieldInput(_ref) {
|
|
|
5936
5959
|
onKeyDown: onKeyDown,
|
|
5937
5960
|
onClick: stopProp,
|
|
5938
5961
|
onMouseDown: stopProp,
|
|
5939
|
-
className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-
|
|
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),
|
|
5940
5963
|
children: [jsxs("option", {
|
|
5941
5964
|
value: "",
|
|
5942
5965
|
children: ["Select ", column.label || column.key]
|
|
@@ -5979,7 +6002,7 @@ function FieldInput(_ref) {
|
|
|
5979
6002
|
onKeyDown: onKeyDown,
|
|
5980
6003
|
onClick: stopProp,
|
|
5981
6004
|
onMouseDown: stopProp,
|
|
5982
|
-
className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-
|
|
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)
|
|
5983
6006
|
});
|
|
5984
6007
|
}
|
|
5985
6008
|
// Number
|
|
@@ -5995,7 +6018,7 @@ function FieldInput(_ref) {
|
|
|
5995
6018
|
onClick: stopProp,
|
|
5996
6019
|
onMouseDown: stopProp,
|
|
5997
6020
|
placeholder: "Enter ".concat(column.label || column.key, "..."),
|
|
5998
|
-
className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-
|
|
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)
|
|
5999
6022
|
});
|
|
6000
6023
|
}
|
|
6001
6024
|
// Default: Text
|
|
@@ -6010,7 +6033,7 @@ function FieldInput(_ref) {
|
|
|
6010
6033
|
onClick: stopProp,
|
|
6011
6034
|
onMouseDown: stopProp,
|
|
6012
6035
|
placeholder: "Enter ".concat(column.label || column.key, "..."),
|
|
6013
|
-
className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-
|
|
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)
|
|
6014
6037
|
});
|
|
6015
6038
|
}
|
|
6016
6039
|
|
|
@@ -6021,11 +6044,11 @@ function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
6021
6044
|
var DEFAULT_DATA = [];
|
|
6022
6045
|
var DEFAULT_COLUMNS = [];
|
|
6023
6046
|
var DEFAULT_THEME = {
|
|
6024
|
-
stripedColors: ["bg-
|
|
6025
|
-
rowHover: "bg-
|
|
6026
|
-
accentColor: "bg-
|
|
6027
|
-
menuBg: "bg-
|
|
6028
|
-
menuItemHover: "hover:bg-
|
|
6047
|
+
stripedColors: ["bg-surface", "bg-background"],
|
|
6048
|
+
rowHover: "bg-background",
|
|
6049
|
+
accentColor: "bg-background",
|
|
6050
|
+
menuBg: "bg-surface",
|
|
6051
|
+
menuItemHover: "hover:bg-background"
|
|
6029
6052
|
};
|
|
6030
6053
|
var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
6031
6054
|
var _validationErrors$;
|
|
@@ -7180,10 +7203,13 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7180
7203
|
children: [showReloadButton && jsx(Fragment, {
|
|
7181
7204
|
children: renderReloadButton ? typeof renderReloadButton === "function" ? renderReloadButton() : renderReloadButton : jsxs("button", {
|
|
7182
7205
|
type: "button",
|
|
7206
|
+
"aria-label": "Reload",
|
|
7207
|
+
title: "Reload",
|
|
7183
7208
|
className: "px-4 py-2 bg-primary-100 flex items-center gap-2 rounded-lg md:rounded text-primary-700 hover:bg-primary-200 transition-colors",
|
|
7184
7209
|
onClick: onReload,
|
|
7185
7210
|
children: [jsx(RefreshCcw, {
|
|
7186
|
-
className: "size-4"
|
|
7211
|
+
className: "size-4",
|
|
7212
|
+
"aria-hidden": "true"
|
|
7187
7213
|
}), jsx("span", {
|
|
7188
7214
|
className: "hidden sm:inline",
|
|
7189
7215
|
children: "Reload"
|
|
@@ -7237,7 +7263,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7237
7263
|
onClick: handleClearChanges,
|
|
7238
7264
|
disabled: isSaving,
|
|
7239
7265
|
title: "Discard all pending modifications",
|
|
7240
|
-
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-
|
|
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",
|
|
7241
7267
|
children: [jsx(X, {
|
|
7242
7268
|
className: "w-4 h-4 text-primary-600"
|
|
7243
7269
|
}), jsx("span", {
|
|
@@ -7281,7 +7307,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7281
7307
|
onKeyDown: onGlobalKeyDown
|
|
7282
7308
|
}), jsx("button", {
|
|
7283
7309
|
onClick: applyGlobalSearch,
|
|
7284
|
-
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",
|
|
7285
7311
|
title: "Search",
|
|
7286
7312
|
children: jsx(Search, {
|
|
7287
7313
|
className: "h-4 w-4 text-primary-400"
|
|
@@ -7292,7 +7318,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7292
7318
|
setSearchInput("");
|
|
7293
7319
|
handleFilter("global", "");
|
|
7294
7320
|
},
|
|
7295
|
-
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",
|
|
7296
7322
|
children: "Clear"
|
|
7297
7323
|
})]
|
|
7298
7324
|
})
|
|
@@ -7316,7 +7342,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7316
7342
|
}), !isMobileView && jsx("div", {
|
|
7317
7343
|
className: "overflow-x-auto overflow-y-visible",
|
|
7318
7344
|
children: jsxs("table", _objectSpread$P(_objectSpread$P({
|
|
7319
|
-
className: cn$1("min-w-full divide-y divide-
|
|
7345
|
+
className: cn$1("min-w-full divide-y divide-line", className)
|
|
7320
7346
|
}, props), {}, {
|
|
7321
7347
|
children: [jsxs("thead", {
|
|
7322
7348
|
className: safeTheme.accentColor,
|
|
@@ -7324,7 +7350,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7324
7350
|
children: [hasDetailsColumn && jsx("th", {
|
|
7325
7351
|
className: "w-8 px-4 py-3"
|
|
7326
7352
|
}), showSerial && jsx("th", {
|
|
7327
|
-
className: "w-8 px-4 py-3 text-left text-xs font-medium text-primary-
|
|
7353
|
+
className: "w-8 px-4 py-3 text-left text-xs font-medium text-primary-700 uppercase tracking-wider",
|
|
7328
7354
|
children: "#"
|
|
7329
7355
|
}), selectable && jsx("th", {
|
|
7330
7356
|
className: "w-12 px-6 py-3",
|
|
@@ -7337,8 +7363,8 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7337
7363
|
}), visibleColumns.map(function (column) {
|
|
7338
7364
|
var _column$rules;
|
|
7339
7365
|
return jsx("th", {
|
|
7340
|
-
className: cn$1("px-6 py-3 text-left text-xs font-medium text-primary-
|
|
7341
|
-
"cursor-pointer hover:bg-gray-100": sortable && column.sortable !== false
|
|
7366
|
+
className: cn$1("px-6 py-3 text-left text-xs font-medium text-primary-700 uppercase tracking-wider", {
|
|
7367
|
+
"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800": sortable && column.sortable !== false
|
|
7342
7368
|
}),
|
|
7343
7369
|
onClick: function onClick() {
|
|
7344
7370
|
return column.sortable !== false && handleSort(column.key);
|
|
@@ -7382,7 +7408,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7382
7408
|
return !s;
|
|
7383
7409
|
});
|
|
7384
7410
|
},
|
|
7385
|
-
className: "p-1 rounded hover:bg-gray-100",
|
|
7411
|
+
className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
7386
7412
|
children: jsx(MoreVertical, {
|
|
7387
7413
|
className: "h-4 w-4"
|
|
7388
7414
|
})
|
|
@@ -7418,7 +7444,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7418
7444
|
})]
|
|
7419
7445
|
})]
|
|
7420
7446
|
}), jsx("tbody", {
|
|
7421
|
-
className: "divide-y divide-
|
|
7447
|
+
className: "divide-y divide-line",
|
|
7422
7448
|
children: loading ? jsx("tr", {
|
|
7423
7449
|
children: jsx("td", {
|
|
7424
7450
|
colSpan: visibleCount,
|
|
@@ -7428,7 +7454,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7428
7454
|
children: [jsx("div", {
|
|
7429
7455
|
className: "h-6 w-6 animate-spin rounded-full border-2 border-primary-600 border-t-transparent"
|
|
7430
7456
|
}), jsx("span", {
|
|
7431
|
-
className: "text-sm text-
|
|
7457
|
+
className: "text-sm text-muted",
|
|
7432
7458
|
children: "Loading..."
|
|
7433
7459
|
})]
|
|
7434
7460
|
})
|
|
@@ -7446,7 +7472,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7446
7472
|
className: "h-8 w-8"
|
|
7447
7473
|
})
|
|
7448
7474
|
}), jsx("span", {
|
|
7449
|
-
className: "text-sm text-
|
|
7475
|
+
className: "text-sm text-muted",
|
|
7450
7476
|
children: "No results found."
|
|
7451
7477
|
})]
|
|
7452
7478
|
})
|
|
@@ -7491,7 +7517,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7491
7517
|
children: [jsx("div", {
|
|
7492
7518
|
className: "h-6 w-6 animate-spin rounded-full border-2 border-primary-600 border-t-transparent"
|
|
7493
7519
|
}), jsx("span", {
|
|
7494
|
-
className: "text-sm text-
|
|
7520
|
+
className: "text-sm text-muted",
|
|
7495
7521
|
children: "Loading..."
|
|
7496
7522
|
})]
|
|
7497
7523
|
})
|
|
@@ -7505,7 +7531,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
7505
7531
|
className: "h-8 w-8"
|
|
7506
7532
|
})
|
|
7507
7533
|
}), jsx("span", {
|
|
7508
|
-
className: "text-sm text-
|
|
7534
|
+
className: "text-sm text-muted",
|
|
7509
7535
|
children: "No results found."
|
|
7510
7536
|
})]
|
|
7511
7537
|
})
|
|
@@ -20025,8 +20051,8 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
20025
20051
|
}
|
|
20026
20052
|
}), {}, {
|
|
20027
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", {
|
|
20028
|
-
"bg-primary-100 text-primary-700": isActive,
|
|
20029
|
-
"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,
|
|
20030
20056
|
"cursor-pointer": !item.disabled,
|
|
20031
20057
|
"cursor-not-allowed opacity-50": item.disabled,
|
|
20032
20058
|
"justify-center": labelHidden
|
|
@@ -20055,7 +20081,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
20055
20081
|
})]
|
|
20056
20082
|
}) : item.badge
|
|
20057
20083
|
}), hasChildren && jsx("span", {
|
|
20058
|
-
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",
|
|
20059
20085
|
"aria-hidden": "true",
|
|
20060
20086
|
"data-sidebar-chevron": "",
|
|
20061
20087
|
onClick: hasHref ? function (e) {
|
|
@@ -20105,7 +20131,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
20105
20131
|
}),
|
|
20106
20132
|
"data-sidebar-section": section.key || "",
|
|
20107
20133
|
children: [effectiveCollapsed && idx > 0 && jsx("hr", {
|
|
20108
|
-
className: "mx-2 my-2 border-
|
|
20134
|
+
className: "mx-2 my-2 border-line",
|
|
20109
20135
|
"aria-hidden": "true"
|
|
20110
20136
|
}), section.key && (effectiveCollapsed ? jsx("span", {
|
|
20111
20137
|
id: headingId,
|
|
@@ -20113,7 +20139,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
20113
20139
|
children: section.key
|
|
20114
20140
|
}) : jsx("p", {
|
|
20115
20141
|
id: headingId,
|
|
20116
|
-
className: "px-3 pb-1 pt-2 text-micro font-semibold uppercase tracking-wide text-
|
|
20142
|
+
className: "px-3 pb-1 pt-2 text-micro font-semibold uppercase tracking-wide text-muted",
|
|
20117
20143
|
children: section.key
|
|
20118
20144
|
})), section.items.map(function (item) {
|
|
20119
20145
|
return _renderMenuItem(item, 0, pane);
|
|
@@ -20152,7 +20178,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
20152
20178
|
return jsx("button", {
|
|
20153
20179
|
type: "button",
|
|
20154
20180
|
onClick: handleUserClick,
|
|
20155
|
-
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"),
|
|
20156
20182
|
"aria-label": effectiveCollapsed && !user.avatar ? user.name : undefined,
|
|
20157
20183
|
children: content
|
|
20158
20184
|
});
|
|
@@ -20166,26 +20192,26 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
20166
20192
|
}) : footer;
|
|
20167
20193
|
if (content === undefined || content === null || content === false) return null;
|
|
20168
20194
|
return jsx("div", {
|
|
20169
|
-
className: "border-t border-
|
|
20195
|
+
className: "border-t border-line p-4",
|
|
20170
20196
|
"data-sidebar-footer": "",
|
|
20171
20197
|
children: content
|
|
20172
20198
|
});
|
|
20173
20199
|
};
|
|
20174
20200
|
var renderSidebarContent = function renderSidebarContent(pane) {
|
|
20175
20201
|
return jsxs("div", {
|
|
20176
|
-
className: cn$1("flex h-full flex-col bg-
|
|
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", {
|
|
20177
20203
|
"w-16": effectiveCollapsed,
|
|
20178
20204
|
"w-64": !effectiveCollapsed
|
|
20179
20205
|
}),
|
|
20180
20206
|
children: [jsxs("div", {
|
|
20181
|
-
className: "flex h-16 items-center justify-between border-b border-
|
|
20207
|
+
className: "flex h-16 items-center justify-between border-b border-line px-4",
|
|
20182
20208
|
children: [!effectiveCollapsed && logo && jsx("div", {
|
|
20183
20209
|
className: "flex items-center",
|
|
20184
20210
|
children: logo
|
|
20185
20211
|
}), jsx("button", {
|
|
20186
20212
|
type: "button",
|
|
20187
20213
|
onClick: handleToggleClick,
|
|
20188
|
-
className: "rounded-md p-1 hover:bg-gray-100",
|
|
20214
|
+
className: "rounded-md p-1 hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
20189
20215
|
"aria-label": effectiveCollapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
20190
20216
|
children: effectiveCollapsed ? jsx(ChevronRight, {
|
|
20191
20217
|
className: "h-5 w-5"
|
|
@@ -20194,10 +20220,10 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
20194
20220
|
})
|
|
20195
20221
|
})]
|
|
20196
20222
|
}), jsx("nav", {
|
|
20197
|
-
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",
|
|
20198
20224
|
children: renderNavContent(pane)
|
|
20199
20225
|
}), renderFooter(pane), user && jsx("div", {
|
|
20200
|
-
className: "border-t border-
|
|
20226
|
+
className: "border-t border-line p-4",
|
|
20201
20227
|
children: jsx("div", {
|
|
20202
20228
|
className: "relative",
|
|
20203
20229
|
children: renderUserBlock()
|
|
@@ -20298,7 +20324,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
20298
20324
|
},
|
|
20299
20325
|
children: trigger
|
|
20300
20326
|
}), isOpen && jsx("div", {
|
|
20301
|
-
className: "absolute z-50 bg-
|
|
20327
|
+
className: "absolute z-50 bg-surface text-foreground border border-line rounded-md shadow-lg ".concat(placementClasses[placement], " min-w-48"),
|
|
20302
20328
|
children: children
|
|
20303
20329
|
})]
|
|
20304
20330
|
}));
|
|
@@ -20448,7 +20474,7 @@ var NotificationsDropdown = function NotificationsDropdown(_ref) {
|
|
|
20448
20474
|
// For simplicity, shows notifications in the dropdown, can be expanded
|
|
20449
20475
|
return jsx(Dropdown, {
|
|
20450
20476
|
trigger: jsxs("button", {
|
|
20451
|
-
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",
|
|
20452
20478
|
"aria-label": "notifications",
|
|
20453
20479
|
children: [jsx(Bell, {
|
|
20454
20480
|
className: "h-5 w-5"
|
|
@@ -20461,9 +20487,9 @@ var NotificationsDropdown = function NotificationsDropdown(_ref) {
|
|
|
20461
20487
|
children: jsxs("div", {
|
|
20462
20488
|
className: "py-2 min-w-56 max-h-80 overflow-y-auto",
|
|
20463
20489
|
children: [jsxs("div", {
|
|
20464
|
-
className: "px-4 py-2 border-b border-
|
|
20490
|
+
className: "px-4 py-2 border-b border-line flex items-center justify-between",
|
|
20465
20491
|
children: [jsx("span", {
|
|
20466
|
-
className: "font-medium text-primary-800 text-sm",
|
|
20492
|
+
className: "font-medium text-primary-800 dark:text-primary-100 text-sm",
|
|
20467
20493
|
children: "Notifications"
|
|
20468
20494
|
}), jsx("button", {
|
|
20469
20495
|
className: "text-xs text-primary-400 hover:text-error-600",
|
|
@@ -20479,16 +20505,16 @@ var NotificationsDropdown = function NotificationsDropdown(_ref) {
|
|
|
20479
20505
|
children: "No notifications"
|
|
20480
20506
|
}) : notifications.map(function (n) {
|
|
20481
20507
|
return jsxs("div", {
|
|
20482
|
-
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" : ""),
|
|
20483
20509
|
onClick: function onClick() {
|
|
20484
20510
|
return onView();
|
|
20485
20511
|
},
|
|
20486
20512
|
children: [jsx("span", {
|
|
20487
|
-
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")
|
|
20488
20514
|
}), jsxs("div", {
|
|
20489
20515
|
className: "flex-1",
|
|
20490
20516
|
children: [jsx("div", {
|
|
20491
|
-
className: "text-sm text-primary-800",
|
|
20517
|
+
className: "text-sm text-primary-800 dark:text-primary-100",
|
|
20492
20518
|
children: n.title
|
|
20493
20519
|
}), n.message && jsx("div", {
|
|
20494
20520
|
className: "text-xs text-primary-500",
|
|
@@ -20540,10 +20566,10 @@ var RightMenuContent = function RightMenuContent(_ref2) {
|
|
|
20540
20566
|
});
|
|
20541
20567
|
};
|
|
20542
20568
|
var styledClassNames = {
|
|
20543
|
-
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",
|
|
20544
20570
|
mobileItem: "md:hidden",
|
|
20545
20571
|
icon: "h-6 w-6",
|
|
20546
|
-
dropdown: "w-56 rounded-md border border-
|
|
20572
|
+
dropdown: "w-56 rounded-md border border-line bg-surface py-1 shadow-lg"
|
|
20547
20573
|
};
|
|
20548
20574
|
var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
20549
20575
|
var emitter = _ref3.emitter,
|
|
@@ -20628,7 +20654,7 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
20628
20654
|
},
|
|
20629
20655
|
className: cn$1("block w-full text-left px-4 py-2 text-sm", {
|
|
20630
20656
|
"text-primary-600": item.active,
|
|
20631
|
-
"hover:bg-gray-50": !item.active
|
|
20657
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800": !item.active
|
|
20632
20658
|
}),
|
|
20633
20659
|
children: item.label
|
|
20634
20660
|
}, item.id);
|
|
@@ -20643,7 +20669,7 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
20643
20669
|
};
|
|
20644
20670
|
return jsxs("nav", _objectSpread$p(_objectSpread$p({
|
|
20645
20671
|
ref: ref,
|
|
20646
|
-
className: cn$1("bg-
|
|
20672
|
+
className: cn$1("bg-surface text-foreground border-b border-line px-4 sm:px-6 lg:px-8", className)
|
|
20647
20673
|
}, props), {}, {
|
|
20648
20674
|
children: [jsxs("div", {
|
|
20649
20675
|
className: "flex h-16 min-w-0 items-center justify-between gap-2 sm:gap-4",
|
|
@@ -20656,7 +20682,7 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
20656
20682
|
className: "flex min-w-0 items-center",
|
|
20657
20683
|
children: [leftIcon !== false && jsx("button", {
|
|
20658
20684
|
onClick: onLeftIconClick,
|
|
20659
|
-
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",
|
|
20660
20686
|
"aria-label": "back",
|
|
20661
20687
|
children: leftIcon
|
|
20662
20688
|
}), logo && jsx("div", {
|
|
@@ -20683,7 +20709,7 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
20683
20709
|
}), jsx("input", {
|
|
20684
20710
|
type: "text",
|
|
20685
20711
|
placeholder: "Search...",
|
|
20686
|
-
className: "w-64 rounded-md border border-gray-300 bg-
|
|
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",
|
|
20687
20713
|
value: searchTerm,
|
|
20688
20714
|
onChange: function onChange(e) {
|
|
20689
20715
|
return setSearchTerm(e.target.value);
|
|
@@ -20746,9 +20772,9 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
20746
20772
|
children: jsxs("div", {
|
|
20747
20773
|
className: styledClassNames.dropdown,
|
|
20748
20774
|
children: [jsxs("div", {
|
|
20749
|
-
className: "px-4 py-2 border-b border-
|
|
20775
|
+
className: "px-4 py-2 border-b border-line",
|
|
20750
20776
|
children: [jsx("p", {
|
|
20751
|
-
className: "text-sm font-medium text-primary-900",
|
|
20777
|
+
className: "text-sm font-medium text-primary-900 dark:text-primary-100",
|
|
20752
20778
|
children: user.name
|
|
20753
20779
|
}), jsx("p", {
|
|
20754
20780
|
className: "text-xs text-primary-500",
|
|
@@ -20758,23 +20784,23 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
20758
20784
|
className: "py-1",
|
|
20759
20785
|
children: renderNavItems(true)
|
|
20760
20786
|
}), user.menuItems && user.menuItems.length > 0 && jsx("div", {
|
|
20761
|
-
className: "border-t border-
|
|
20787
|
+
className: "border-t border-line",
|
|
20762
20788
|
children: user.menuItems.map(function (mi) {
|
|
20763
20789
|
return jsx("button", {
|
|
20764
20790
|
onClick: function onClick(e) {
|
|
20765
20791
|
var _mi$onClick;
|
|
20766
20792
|
return mi === null || mi === void 0 || (_mi$onClick = mi.onClick) === null || _mi$onClick === void 0 ? void 0 : _mi$onClick.call(mi, e);
|
|
20767
20793
|
},
|
|
20768
|
-
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",
|
|
20769
20795
|
children: mi.label
|
|
20770
20796
|
}, mi.id);
|
|
20771
20797
|
})
|
|
20772
20798
|
}), jsx("div", {
|
|
20773
|
-
className: "border-t border-
|
|
20799
|
+
className: "border-t border-line sm:hidden",
|
|
20774
20800
|
children: jsxs("button", {
|
|
20775
20801
|
type: "button",
|
|
20776
20802
|
onClick: handleLogoutClick,
|
|
20777
|
-
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",
|
|
20778
20804
|
children: [jsx(LogOut, {
|
|
20779
20805
|
className: "h-4 w-4",
|
|
20780
20806
|
"aria-hidden": "true"
|
|
@@ -20788,13 +20814,13 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
20788
20814
|
}), isMobileMenuOpen && !user && jsx("div", {
|
|
20789
20815
|
className: "md:hidden h-full",
|
|
20790
20816
|
children: jsx("div", {
|
|
20791
|
-
className: "space-y-1 border-t border-
|
|
20817
|
+
className: "space-y-1 border-t border-line px-2 pt-4 pb-3",
|
|
20792
20818
|
children: items.map(function (item) {
|
|
20793
20819
|
return jsx("a", {
|
|
20794
20820
|
href: item.href,
|
|
20795
20821
|
className: cn$1("block rounded-md px-3 py-2 text-base font-medium", {
|
|
20796
|
-
"bg-primary-50 text-primary-700": item.active,
|
|
20797
|
-
"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
|
|
20798
20824
|
}),
|
|
20799
20825
|
children: item.label
|
|
20800
20826
|
}, item.id);
|
|
@@ -22160,7 +22186,7 @@ var Card = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
22160
22186
|
props = _objectWithoutProperties$1(_ref, _excluded$c);
|
|
22161
22187
|
return jsx("div", _objectSpread$g(_objectSpread$g({
|
|
22162
22188
|
ref: ref,
|
|
22163
|
-
className: cn$1('rounded-lg border border-
|
|
22189
|
+
className: cn$1('rounded-lg border border-line bg-surface shadow-sm', {
|
|
22164
22190
|
'hover:shadow-md transition-shadow': hover
|
|
22165
22191
|
}, className)
|
|
22166
22192
|
}, props), {}, {
|
|
@@ -22173,7 +22199,7 @@ var CardHeader = function CardHeader(_ref2) {
|
|
|
22173
22199
|
className = _ref2.className,
|
|
22174
22200
|
props = _objectWithoutProperties$1(_ref2, _excluded2);
|
|
22175
22201
|
return jsx("div", _objectSpread$g(_objectSpread$g({
|
|
22176
|
-
className: cn$1('px-6 py-4 border-b border-
|
|
22202
|
+
className: cn$1('px-6 py-4 border-b border-line', className)
|
|
22177
22203
|
}, props), {}, {
|
|
22178
22204
|
children: children
|
|
22179
22205
|
}));
|
|
@@ -22183,7 +22209,7 @@ var CardTitle = function CardTitle(_ref3) {
|
|
|
22183
22209
|
className = _ref3.className,
|
|
22184
22210
|
props = _objectWithoutProperties$1(_ref3, _excluded3);
|
|
22185
22211
|
return jsx("h3", _objectSpread$g(_objectSpread$g({
|
|
22186
|
-
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)
|
|
22187
22213
|
}, props), {}, {
|
|
22188
22214
|
children: children
|
|
22189
22215
|
}));
|
|
@@ -22193,7 +22219,7 @@ var CardDescription = function CardDescription(_ref4) {
|
|
|
22193
22219
|
className = _ref4.className,
|
|
22194
22220
|
props = _objectWithoutProperties$1(_ref4, _excluded4);
|
|
22195
22221
|
return jsx("p", _objectSpread$g(_objectSpread$g({
|
|
22196
|
-
className: cn$1('text-sm text-primary-600', className)
|
|
22222
|
+
className: cn$1('text-sm text-primary-600 dark:text-primary-300', className)
|
|
22197
22223
|
}, props), {}, {
|
|
22198
22224
|
children: children
|
|
22199
22225
|
}));
|
|
@@ -22213,7 +22239,7 @@ var CardFooter = function CardFooter(_ref6) {
|
|
|
22213
22239
|
className = _ref6.className,
|
|
22214
22240
|
props = _objectWithoutProperties$1(_ref6, _excluded6);
|
|
22215
22241
|
return jsx("div", _objectSpread$g(_objectSpread$g({
|
|
22216
|
-
className: cn$1('px-6 py-4 border-t border-
|
|
22242
|
+
className: cn$1('px-6 py-4 border-t border-line', className)
|
|
22217
22243
|
}, props), {}, {
|
|
22218
22244
|
children: children
|
|
22219
22245
|
}));
|
|
@@ -22360,9 +22386,9 @@ var Stepper = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
22360
22386
|
text: 'text-primary-600'
|
|
22361
22387
|
},
|
|
22362
22388
|
upcoming: {
|
|
22363
|
-
circle: 'bg-gray-300 text-
|
|
22389
|
+
circle: 'bg-gray-300 text-gray-700',
|
|
22364
22390
|
line: 'bg-gray-300',
|
|
22365
|
-
text: 'text-
|
|
22391
|
+
text: 'text-muted'
|
|
22366
22392
|
}
|
|
22367
22393
|
};
|
|
22368
22394
|
return jsx("nav", _objectSpread$e(_objectSpread$e({
|
|
@@ -22396,8 +22422,10 @@ var Stepper = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
22396
22422
|
},
|
|
22397
22423
|
disabled: !onStepClick || stepIndex > currentStep,
|
|
22398
22424
|
"aria-current": status === 'current' ? 'step' : undefined,
|
|
22425
|
+
"aria-label": "Step ".concat(stepIndex + 1).concat(step.title ? ": ".concat(step.title) : '').concat(status === 'completed' ? ' (completed)' : ''),
|
|
22399
22426
|
children: status === 'completed' ? jsx(Check, {
|
|
22400
|
-
className: "h-4 w-4"
|
|
22427
|
+
className: "h-4 w-4",
|
|
22428
|
+
"aria-hidden": "true"
|
|
22401
22429
|
}) : stepIndex + 1
|
|
22402
22430
|
}), !isLast && jsx("div", {
|
|
22403
22431
|
className: cn$1('bg-gray-300', {
|
|
@@ -22414,7 +22442,7 @@ var Stepper = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
22414
22442
|
className: cn$1('text-sm font-medium', colors.text),
|
|
22415
22443
|
children: step.title
|
|
22416
22444
|
}), step.description && jsx("span", {
|
|
22417
|
-
className: "text-xs text-
|
|
22445
|
+
className: "text-xs text-muted",
|
|
22418
22446
|
children: step.description
|
|
22419
22447
|
})]
|
|
22420
22448
|
})]
|
|
@@ -23486,7 +23514,7 @@ var StatCard = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
23486
23514
|
}), change && !loading && jsxs("p", {
|
|
23487
23515
|
className: "mt-1 flex items-center gap-1 text-xs text-muted",
|
|
23488
23516
|
children: [jsxs("span", {
|
|
23489
|
-
className: cn$1('inline-flex items-center gap-0.5 font-semibold', good ? 'text-success-
|
|
23517
|
+
className: cn$1('inline-flex items-center gap-0.5 font-semibold', good ? 'text-success-700 dark:text-success-400' : 'text-error-700 dark:text-error-400'),
|
|
23490
23518
|
children: [up ? jsx(ArrowUp, {
|
|
23491
23519
|
className: "h-3.5 w-3.5",
|
|
23492
23520
|
"aria-hidden": "true"
|