@juv/codego-react-ui 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1624 -799
- package/dist/index.d.cts +208 -28
- package/dist/index.d.ts +208 -28
- package/dist/index.global.js +1684 -863
- package/dist/index.js +1640 -824
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -1699,18 +1699,18 @@ var CodegoUI = (() => {
|
|
|
1699
1699
|
function isValidElement(object) {
|
|
1700
1700
|
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1701
1701
|
}
|
|
1702
|
-
var
|
|
1702
|
+
var React45 = require_react(), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = React45.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
1703
1703
|
return null;
|
|
1704
1704
|
};
|
|
1705
|
-
|
|
1705
|
+
React45 = {
|
|
1706
1706
|
react_stack_bottom_frame: function(callStackForError) {
|
|
1707
1707
|
return callStackForError();
|
|
1708
1708
|
}
|
|
1709
1709
|
};
|
|
1710
1710
|
var specialPropKeyWarningShown;
|
|
1711
1711
|
var didWarnAboutElementRef = {};
|
|
1712
|
-
var unknownOwnerDebugStack =
|
|
1713
|
-
|
|
1712
|
+
var unknownOwnerDebugStack = React45.react_stack_bottom_frame.bind(
|
|
1713
|
+
React45,
|
|
1714
1714
|
UnknownOwner
|
|
1715
1715
|
)();
|
|
1716
1716
|
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
@@ -1758,7 +1758,7 @@ var CodegoUI = (() => {
|
|
|
1758
1758
|
var require_react_dom_production = __commonJS({
|
|
1759
1759
|
"node_modules/react-dom/cjs/react-dom.production.js"(exports) {
|
|
1760
1760
|
"use strict";
|
|
1761
|
-
var
|
|
1761
|
+
var React45 = require_react();
|
|
1762
1762
|
function formatProdErrorMessage(code) {
|
|
1763
1763
|
var url = "https://react.dev/errors/" + code;
|
|
1764
1764
|
if (1 < arguments.length) {
|
|
@@ -1798,7 +1798,7 @@ var CodegoUI = (() => {
|
|
|
1798
1798
|
implementation
|
|
1799
1799
|
};
|
|
1800
1800
|
}
|
|
1801
|
-
var ReactSharedInternals =
|
|
1801
|
+
var ReactSharedInternals = React45.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
1802
1802
|
function getCrossOriginStringAs(as, input) {
|
|
1803
1803
|
if ("font" === as) return "";
|
|
1804
1804
|
if ("string" === typeof input)
|
|
@@ -1952,7 +1952,7 @@ var CodegoUI = (() => {
|
|
|
1952
1952
|
return dispatcher;
|
|
1953
1953
|
}
|
|
1954
1954
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1955
|
-
var
|
|
1955
|
+
var React45 = require_react(), Internals = {
|
|
1956
1956
|
d: {
|
|
1957
1957
|
f: noop,
|
|
1958
1958
|
r: function() {
|
|
@@ -1970,7 +1970,7 @@ var CodegoUI = (() => {
|
|
|
1970
1970
|
},
|
|
1971
1971
|
p: 0,
|
|
1972
1972
|
findDOMNode: null
|
|
1973
|
-
}, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), ReactSharedInternals =
|
|
1973
|
+
}, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), ReactSharedInternals = React45.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
1974
1974
|
"function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
|
|
1975
1975
|
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
|
|
1976
1976
|
);
|
|
@@ -2201,14 +2201,20 @@ var CodegoUI = (() => {
|
|
|
2201
2201
|
DateRangePicker: () => DateRangePicker,
|
|
2202
2202
|
Drawer: () => Drawer,
|
|
2203
2203
|
Dropdown: () => Dropdown,
|
|
2204
|
+
DropdownItem: () => DropdownItem,
|
|
2205
|
+
DropdownLabel: () => DropdownLabel,
|
|
2206
|
+
DropdownSeparator: () => DropdownSeparator,
|
|
2204
2207
|
FileUpload: () => FileUpload,
|
|
2208
|
+
FlexItem: () => FlexItem,
|
|
2205
2209
|
FlexLayout: () => FlexLayout,
|
|
2210
|
+
GridItem: () => GridItem,
|
|
2206
2211
|
GridLayout: () => GridLayout,
|
|
2207
2212
|
GroupNavigation: () => GroupNavigation,
|
|
2208
2213
|
Input: () => Input,
|
|
2209
2214
|
KanbanBoard: () => KanbanBoard,
|
|
2210
2215
|
Label: () => Label,
|
|
2211
2216
|
LeftSidebar: () => LeftSidebar,
|
|
2217
|
+
MetricRow: () => MetricRow,
|
|
2212
2218
|
Modal: () => Modal,
|
|
2213
2219
|
ModalConfirmation: () => ModalConfirmation,
|
|
2214
2220
|
ModalUnchange: () => ModalUnchange,
|
|
@@ -2223,6 +2229,7 @@ var CodegoUI = (() => {
|
|
|
2223
2229
|
PanelSidebarItem: () => PanelSidebarItem,
|
|
2224
2230
|
Popover: () => Popover,
|
|
2225
2231
|
Progress: () => Progress,
|
|
2232
|
+
PropsTable: () => PropsTable,
|
|
2226
2233
|
RadioGroup: () => RadioGroup,
|
|
2227
2234
|
RangeSlider: () => RangeSlider,
|
|
2228
2235
|
Repeater: () => Repeater,
|
|
@@ -2232,6 +2239,7 @@ var CodegoUI = (() => {
|
|
|
2232
2239
|
ScrollArea: () => ScrollArea,
|
|
2233
2240
|
SectionBlock: () => SectionBlock,
|
|
2234
2241
|
Select: () => Select,
|
|
2242
|
+
Settings: () => Settings,
|
|
2235
2243
|
Skeleton: () => Skeleton,
|
|
2236
2244
|
Slider: () => Slider,
|
|
2237
2245
|
StatCard: () => StatCard,
|
|
@@ -2249,6 +2257,7 @@ var CodegoUI = (() => {
|
|
|
2249
2257
|
Topbar: () => Topbar,
|
|
2250
2258
|
TreeView: () => TreeView,
|
|
2251
2259
|
Widget: () => Widget,
|
|
2260
|
+
Wizard: () => Wizard,
|
|
2252
2261
|
useToast: () => useToast
|
|
2253
2262
|
});
|
|
2254
2263
|
|
|
@@ -2450,94 +2459,102 @@ var CodegoUI = (() => {
|
|
|
2450
2459
|
];
|
|
2451
2460
|
var ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode14);
|
|
2452
2461
|
|
|
2453
|
-
// node_modules/lucide-react/dist/esm/icons/circle-
|
|
2462
|
+
// node_modules/lucide-react/dist/esm/icons/circle-alert.js
|
|
2454
2463
|
var __iconNode15 = [
|
|
2464
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2465
|
+
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
2466
|
+
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
2467
|
+
];
|
|
2468
|
+
var CircleAlert = createLucideIcon("circle-alert", __iconNode15);
|
|
2469
|
+
|
|
2470
|
+
// node_modules/lucide-react/dist/esm/icons/circle-check-big.js
|
|
2471
|
+
var __iconNode16 = [
|
|
2455
2472
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
2456
2473
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
2457
2474
|
];
|
|
2458
|
-
var CircleCheckBig = createLucideIcon("circle-check-big",
|
|
2475
|
+
var CircleCheckBig = createLucideIcon("circle-check-big", __iconNode16);
|
|
2459
2476
|
|
|
2460
2477
|
// node_modules/lucide-react/dist/esm/icons/circle-x.js
|
|
2461
|
-
var
|
|
2478
|
+
var __iconNode17 = [
|
|
2462
2479
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2463
2480
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
2464
2481
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
2465
2482
|
];
|
|
2466
|
-
var CircleX = createLucideIcon("circle-x",
|
|
2483
|
+
var CircleX = createLucideIcon("circle-x", __iconNode17);
|
|
2467
2484
|
|
|
2468
2485
|
// node_modules/lucide-react/dist/esm/icons/circle.js
|
|
2469
|
-
var
|
|
2470
|
-
var Circle = createLucideIcon("circle",
|
|
2486
|
+
var __iconNode18 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
|
|
2487
|
+
var Circle = createLucideIcon("circle", __iconNode18);
|
|
2471
2488
|
|
|
2472
2489
|
// node_modules/lucide-react/dist/esm/icons/clock.js
|
|
2473
|
-
var
|
|
2490
|
+
var __iconNode19 = [
|
|
2474
2491
|
["path", { d: "M12 6v6l4 2", key: "mmk7yg" }],
|
|
2475
2492
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
2476
2493
|
];
|
|
2477
|
-
var Clock = createLucideIcon("clock",
|
|
2494
|
+
var Clock = createLucideIcon("clock", __iconNode19);
|
|
2478
2495
|
|
|
2479
2496
|
// node_modules/lucide-react/dist/esm/icons/cloud-upload.js
|
|
2480
|
-
var
|
|
2497
|
+
var __iconNode20 = [
|
|
2481
2498
|
["path", { d: "M12 13v8", key: "1l5pq0" }],
|
|
2482
2499
|
["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }],
|
|
2483
2500
|
["path", { d: "m8 17 4-4 4 4", key: "1quai1" }]
|
|
2484
2501
|
];
|
|
2485
|
-
var CloudUpload = createLucideIcon("cloud-upload",
|
|
2502
|
+
var CloudUpload = createLucideIcon("cloud-upload", __iconNode20);
|
|
2486
2503
|
|
|
2487
2504
|
// node_modules/lucide-react/dist/esm/icons/code.js
|
|
2488
|
-
var
|
|
2505
|
+
var __iconNode21 = [
|
|
2489
2506
|
["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
|
|
2490
2507
|
["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
|
|
2491
2508
|
];
|
|
2492
|
-
var Code = createLucideIcon("code",
|
|
2509
|
+
var Code = createLucideIcon("code", __iconNode21);
|
|
2493
2510
|
|
|
2494
2511
|
// node_modules/lucide-react/dist/esm/icons/command.js
|
|
2495
|
-
var
|
|
2512
|
+
var __iconNode22 = [
|
|
2496
2513
|
[
|
|
2497
2514
|
"path",
|
|
2498
2515
|
{ d: "M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3", key: "11bfej" }
|
|
2499
2516
|
]
|
|
2500
2517
|
];
|
|
2501
|
-
var Command = createLucideIcon("command",
|
|
2518
|
+
var Command = createLucideIcon("command", __iconNode22);
|
|
2502
2519
|
|
|
2503
2520
|
// node_modules/lucide-react/dist/esm/icons/contrast.js
|
|
2504
|
-
var
|
|
2521
|
+
var __iconNode23 = [
|
|
2505
2522
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2506
2523
|
["path", { d: "M12 18a6 6 0 0 0 0-12v12z", key: "j4l70d" }]
|
|
2507
2524
|
];
|
|
2508
|
-
var Contrast = createLucideIcon("contrast",
|
|
2525
|
+
var Contrast = createLucideIcon("contrast", __iconNode23);
|
|
2509
2526
|
|
|
2510
2527
|
// node_modules/lucide-react/dist/esm/icons/corner-down-left.js
|
|
2511
|
-
var
|
|
2528
|
+
var __iconNode24 = [
|
|
2512
2529
|
["path", { d: "M20 4v7a4 4 0 0 1-4 4H4", key: "6o5b7l" }],
|
|
2513
2530
|
["path", { d: "m9 10-5 5 5 5", key: "1kshq7" }]
|
|
2514
2531
|
];
|
|
2515
|
-
var CornerDownLeft = createLucideIcon("corner-down-left",
|
|
2532
|
+
var CornerDownLeft = createLucideIcon("corner-down-left", __iconNode24);
|
|
2516
2533
|
|
|
2517
2534
|
// node_modules/lucide-react/dist/esm/icons/crop.js
|
|
2518
|
-
var
|
|
2535
|
+
var __iconNode25 = [
|
|
2519
2536
|
["path", { d: "M6 2v14a2 2 0 0 0 2 2h14", key: "ron5a4" }],
|
|
2520
2537
|
["path", { d: "M18 22V8a2 2 0 0 0-2-2H2", key: "7s9ehn" }]
|
|
2521
2538
|
];
|
|
2522
|
-
var Crop = createLucideIcon("crop",
|
|
2539
|
+
var Crop = createLucideIcon("crop", __iconNode25);
|
|
2523
2540
|
|
|
2524
2541
|
// node_modules/lucide-react/dist/esm/icons/ellipsis.js
|
|
2525
|
-
var
|
|
2542
|
+
var __iconNode26 = [
|
|
2526
2543
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2527
2544
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
2528
2545
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
2529
2546
|
];
|
|
2530
|
-
var Ellipsis = createLucideIcon("ellipsis",
|
|
2547
|
+
var Ellipsis = createLucideIcon("ellipsis", __iconNode26);
|
|
2531
2548
|
|
|
2532
2549
|
// node_modules/lucide-react/dist/esm/icons/file.js
|
|
2533
|
-
var
|
|
2550
|
+
var __iconNode27 = [
|
|
2534
2551
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
2535
2552
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
|
|
2536
2553
|
];
|
|
2537
|
-
var File = createLucideIcon("file",
|
|
2554
|
+
var File = createLucideIcon("file", __iconNode27);
|
|
2538
2555
|
|
|
2539
2556
|
// node_modules/lucide-react/dist/esm/icons/flip-horizontal.js
|
|
2540
|
-
var
|
|
2557
|
+
var __iconNode28 = [
|
|
2541
2558
|
["path", { d: "M8 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h3", key: "1i73f7" }],
|
|
2542
2559
|
["path", { d: "M16 3h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-3", key: "saxlbk" }],
|
|
2543
2560
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -2545,10 +2562,10 @@ var CodegoUI = (() => {
|
|
|
2545
2562
|
["path", { d: "M12 8v2", key: "1woqiv" }],
|
|
2546
2563
|
["path", { d: "M12 2v2", key: "tus03m" }]
|
|
2547
2564
|
];
|
|
2548
|
-
var FlipHorizontal = createLucideIcon("flip-horizontal",
|
|
2565
|
+
var FlipHorizontal = createLucideIcon("flip-horizontal", __iconNode28);
|
|
2549
2566
|
|
|
2550
2567
|
// node_modules/lucide-react/dist/esm/icons/flip-vertical.js
|
|
2551
|
-
var
|
|
2568
|
+
var __iconNode29 = [
|
|
2552
2569
|
["path", { d: "M21 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v3", key: "14bfxa" }],
|
|
2553
2570
|
["path", { d: "M21 16v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-3", key: "14rx03" }],
|
|
2554
2571
|
["path", { d: "M4 12H2", key: "rhcxmi" }],
|
|
@@ -2556,10 +2573,10 @@ var CodegoUI = (() => {
|
|
|
2556
2573
|
["path", { d: "M16 12h-2", key: "10asgb" }],
|
|
2557
2574
|
["path", { d: "M22 12h-2", key: "14jgyd" }]
|
|
2558
2575
|
];
|
|
2559
|
-
var FlipVertical = createLucideIcon("flip-vertical",
|
|
2576
|
+
var FlipVertical = createLucideIcon("flip-vertical", __iconNode29);
|
|
2560
2577
|
|
|
2561
2578
|
// node_modules/lucide-react/dist/esm/icons/folder-open.js
|
|
2562
|
-
var
|
|
2579
|
+
var __iconNode30 = [
|
|
2563
2580
|
[
|
|
2564
2581
|
"path",
|
|
2565
2582
|
{
|
|
@@ -2568,10 +2585,10 @@ var CodegoUI = (() => {
|
|
|
2568
2585
|
}
|
|
2569
2586
|
]
|
|
2570
2587
|
];
|
|
2571
|
-
var FolderOpen = createLucideIcon("folder-open",
|
|
2588
|
+
var FolderOpen = createLucideIcon("folder-open", __iconNode30);
|
|
2572
2589
|
|
|
2573
2590
|
// node_modules/lucide-react/dist/esm/icons/folder.js
|
|
2574
|
-
var
|
|
2591
|
+
var __iconNode31 = [
|
|
2575
2592
|
[
|
|
2576
2593
|
"path",
|
|
2577
2594
|
{
|
|
@@ -2580,10 +2597,10 @@ var CodegoUI = (() => {
|
|
|
2580
2597
|
}
|
|
2581
2598
|
]
|
|
2582
2599
|
];
|
|
2583
|
-
var Folder = createLucideIcon("folder",
|
|
2600
|
+
var Folder = createLucideIcon("folder", __iconNode31);
|
|
2584
2601
|
|
|
2585
2602
|
// node_modules/lucide-react/dist/esm/icons/grip-vertical.js
|
|
2586
|
-
var
|
|
2603
|
+
var __iconNode32 = [
|
|
2587
2604
|
["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
|
|
2588
2605
|
["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
|
|
2589
2606
|
["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
|
|
@@ -2591,52 +2608,52 @@ var CodegoUI = (() => {
|
|
|
2591
2608
|
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
|
|
2592
2609
|
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
|
|
2593
2610
|
];
|
|
2594
|
-
var GripVertical = createLucideIcon("grip-vertical",
|
|
2611
|
+
var GripVertical = createLucideIcon("grip-vertical", __iconNode32);
|
|
2595
2612
|
|
|
2596
2613
|
// node_modules/lucide-react/dist/esm/icons/heading-2.js
|
|
2597
|
-
var
|
|
2614
|
+
var __iconNode33 = [
|
|
2598
2615
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
2599
2616
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
2600
2617
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
2601
2618
|
["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
|
|
2602
2619
|
];
|
|
2603
|
-
var Heading2 = createLucideIcon("heading-2",
|
|
2620
|
+
var Heading2 = createLucideIcon("heading-2", __iconNode33);
|
|
2604
2621
|
|
|
2605
2622
|
// node_modules/lucide-react/dist/esm/icons/heading-3.js
|
|
2606
|
-
var
|
|
2623
|
+
var __iconNode34 = [
|
|
2607
2624
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
2608
2625
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
2609
2626
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
2610
2627
|
["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
|
|
2611
2628
|
["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
|
|
2612
2629
|
];
|
|
2613
|
-
var Heading3 = createLucideIcon("heading-3",
|
|
2630
|
+
var Heading3 = createLucideIcon("heading-3", __iconNode34);
|
|
2614
2631
|
|
|
2615
2632
|
// node_modules/lucide-react/dist/esm/icons/info.js
|
|
2616
|
-
var
|
|
2633
|
+
var __iconNode35 = [
|
|
2617
2634
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2618
2635
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
2619
2636
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
2620
2637
|
];
|
|
2621
|
-
var Info = createLucideIcon("info",
|
|
2638
|
+
var Info = createLucideIcon("info", __iconNode35);
|
|
2622
2639
|
|
|
2623
2640
|
// node_modules/lucide-react/dist/esm/icons/italic.js
|
|
2624
|
-
var
|
|
2641
|
+
var __iconNode36 = [
|
|
2625
2642
|
["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
|
|
2626
2643
|
["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
|
|
2627
2644
|
["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
|
|
2628
2645
|
];
|
|
2629
|
-
var Italic = createLucideIcon("italic",
|
|
2646
|
+
var Italic = createLucideIcon("italic", __iconNode36);
|
|
2630
2647
|
|
|
2631
2648
|
// node_modules/lucide-react/dist/esm/icons/link.js
|
|
2632
|
-
var
|
|
2649
|
+
var __iconNode37 = [
|
|
2633
2650
|
["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
|
|
2634
2651
|
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
|
|
2635
2652
|
];
|
|
2636
|
-
var Link = createLucideIcon("link",
|
|
2653
|
+
var Link = createLucideIcon("link", __iconNode37);
|
|
2637
2654
|
|
|
2638
2655
|
// node_modules/lucide-react/dist/esm/icons/list-ordered.js
|
|
2639
|
-
var
|
|
2656
|
+
var __iconNode38 = [
|
|
2640
2657
|
["path", { d: "M11 5h10", key: "1cz7ny" }],
|
|
2641
2658
|
["path", { d: "M11 12h10", key: "1438ji" }],
|
|
2642
2659
|
["path", { d: "M11 19h10", key: "11t30w" }],
|
|
@@ -2644,10 +2661,10 @@ var CodegoUI = (() => {
|
|
|
2644
2661
|
["path", { d: "M4 9h2", key: "r1h2o0" }],
|
|
2645
2662
|
["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02", key: "xtkcd5" }]
|
|
2646
2663
|
];
|
|
2647
|
-
var ListOrdered = createLucideIcon("list-ordered",
|
|
2664
|
+
var ListOrdered = createLucideIcon("list-ordered", __iconNode38);
|
|
2648
2665
|
|
|
2649
2666
|
// node_modules/lucide-react/dist/esm/icons/list.js
|
|
2650
|
-
var
|
|
2667
|
+
var __iconNode39 = [
|
|
2651
2668
|
["path", { d: "M3 5h.01", key: "18ugdj" }],
|
|
2652
2669
|
["path", { d: "M3 12h.01", key: "nlz23k" }],
|
|
2653
2670
|
["path", { d: "M3 19h.01", key: "noohij" }],
|
|
@@ -2655,14 +2672,14 @@ var CodegoUI = (() => {
|
|
|
2655
2672
|
["path", { d: "M8 12h13", key: "1za7za" }],
|
|
2656
2673
|
["path", { d: "M8 19h13", key: "m83p4d" }]
|
|
2657
2674
|
];
|
|
2658
|
-
var List = createLucideIcon("list",
|
|
2675
|
+
var List = createLucideIcon("list", __iconNode39);
|
|
2659
2676
|
|
|
2660
2677
|
// node_modules/lucide-react/dist/esm/icons/minus.js
|
|
2661
|
-
var
|
|
2662
|
-
var Minus = createLucideIcon("minus",
|
|
2678
|
+
var __iconNode40 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
|
|
2679
|
+
var Minus = createLucideIcon("minus", __iconNode40);
|
|
2663
2680
|
|
|
2664
2681
|
// node_modules/lucide-react/dist/esm/icons/moon.js
|
|
2665
|
-
var
|
|
2682
|
+
var __iconNode41 = [
|
|
2666
2683
|
[
|
|
2667
2684
|
"path",
|
|
2668
2685
|
{
|
|
@@ -2671,33 +2688,33 @@ var CodegoUI = (() => {
|
|
|
2671
2688
|
}
|
|
2672
2689
|
]
|
|
2673
2690
|
];
|
|
2674
|
-
var Moon = createLucideIcon("moon",
|
|
2691
|
+
var Moon = createLucideIcon("moon", __iconNode41);
|
|
2675
2692
|
|
|
2676
2693
|
// node_modules/lucide-react/dist/esm/icons/panel-left-close.js
|
|
2677
|
-
var
|
|
2694
|
+
var __iconNode42 = [
|
|
2678
2695
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
2679
2696
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
2680
2697
|
["path", { d: "m16 15-3-3 3-3", key: "14y99z" }]
|
|
2681
2698
|
];
|
|
2682
|
-
var PanelLeftClose = createLucideIcon("panel-left-close",
|
|
2699
|
+
var PanelLeftClose = createLucideIcon("panel-left-close", __iconNode42);
|
|
2683
2700
|
|
|
2684
2701
|
// node_modules/lucide-react/dist/esm/icons/panel-left-open.js
|
|
2685
|
-
var
|
|
2702
|
+
var __iconNode43 = [
|
|
2686
2703
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
2687
2704
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
2688
2705
|
["path", { d: "m14 9 3 3-3 3", key: "8010ee" }]
|
|
2689
2706
|
];
|
|
2690
|
-
var PanelLeftOpen = createLucideIcon("panel-left-open",
|
|
2707
|
+
var PanelLeftOpen = createLucideIcon("panel-left-open", __iconNode43);
|
|
2691
2708
|
|
|
2692
2709
|
// node_modules/lucide-react/dist/esm/icons/plus.js
|
|
2693
|
-
var
|
|
2710
|
+
var __iconNode44 = [
|
|
2694
2711
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
2695
2712
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
2696
2713
|
];
|
|
2697
|
-
var Plus = createLucideIcon("plus",
|
|
2714
|
+
var Plus = createLucideIcon("plus", __iconNode44);
|
|
2698
2715
|
|
|
2699
2716
|
// node_modules/lucide-react/dist/esm/icons/quote.js
|
|
2700
|
-
var
|
|
2717
|
+
var __iconNode45 = [
|
|
2701
2718
|
[
|
|
2702
2719
|
"path",
|
|
2703
2720
|
{
|
|
@@ -2713,47 +2730,47 @@ var CodegoUI = (() => {
|
|
|
2713
2730
|
}
|
|
2714
2731
|
]
|
|
2715
2732
|
];
|
|
2716
|
-
var Quote = createLucideIcon("quote",
|
|
2733
|
+
var Quote = createLucideIcon("quote", __iconNode45);
|
|
2717
2734
|
|
|
2718
2735
|
// node_modules/lucide-react/dist/esm/icons/redo.js
|
|
2719
|
-
var
|
|
2736
|
+
var __iconNode46 = [
|
|
2720
2737
|
["path", { d: "M21 7v6h-6", key: "3ptur4" }],
|
|
2721
2738
|
["path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7", key: "1kgawr" }]
|
|
2722
2739
|
];
|
|
2723
|
-
var Redo = createLucideIcon("redo",
|
|
2740
|
+
var Redo = createLucideIcon("redo", __iconNode46);
|
|
2724
2741
|
|
|
2725
2742
|
// node_modules/lucide-react/dist/esm/icons/rotate-ccw.js
|
|
2726
|
-
var
|
|
2743
|
+
var __iconNode47 = [
|
|
2727
2744
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
2728
2745
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
2729
2746
|
];
|
|
2730
|
-
var RotateCcw = createLucideIcon("rotate-ccw",
|
|
2747
|
+
var RotateCcw = createLucideIcon("rotate-ccw", __iconNode47);
|
|
2731
2748
|
|
|
2732
2749
|
// node_modules/lucide-react/dist/esm/icons/rotate-cw.js
|
|
2733
|
-
var
|
|
2750
|
+
var __iconNode48 = [
|
|
2734
2751
|
["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
|
|
2735
2752
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }]
|
|
2736
2753
|
];
|
|
2737
|
-
var RotateCw = createLucideIcon("rotate-cw",
|
|
2754
|
+
var RotateCw = createLucideIcon("rotate-cw", __iconNode48);
|
|
2738
2755
|
|
|
2739
2756
|
// node_modules/lucide-react/dist/esm/icons/search.js
|
|
2740
|
-
var
|
|
2757
|
+
var __iconNode49 = [
|
|
2741
2758
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
2742
2759
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
2743
2760
|
];
|
|
2744
|
-
var Search = createLucideIcon("search",
|
|
2761
|
+
var Search = createLucideIcon("search", __iconNode49);
|
|
2745
2762
|
|
|
2746
2763
|
// node_modules/lucide-react/dist/esm/icons/settings-2.js
|
|
2747
|
-
var
|
|
2764
|
+
var __iconNode50 = [
|
|
2748
2765
|
["path", { d: "M14 17H5", key: "gfn3mx" }],
|
|
2749
2766
|
["path", { d: "M19 7h-9", key: "6i9tg" }],
|
|
2750
2767
|
["circle", { cx: "17", cy: "17", r: "3", key: "18b49y" }],
|
|
2751
2768
|
["circle", { cx: "7", cy: "7", r: "3", key: "dfmy0x" }]
|
|
2752
2769
|
];
|
|
2753
|
-
var Settings2 = createLucideIcon("settings-2",
|
|
2770
|
+
var Settings2 = createLucideIcon("settings-2", __iconNode50);
|
|
2754
2771
|
|
|
2755
2772
|
// node_modules/lucide-react/dist/esm/icons/sun.js
|
|
2756
|
-
var
|
|
2773
|
+
var __iconNode51 = [
|
|
2757
2774
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
2758
2775
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
2759
2776
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -2764,34 +2781,34 @@ var CodegoUI = (() => {
|
|
|
2764
2781
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
2765
2782
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
2766
2783
|
];
|
|
2767
|
-
var Sun = createLucideIcon("sun",
|
|
2784
|
+
var Sun = createLucideIcon("sun", __iconNode51);
|
|
2768
2785
|
|
|
2769
2786
|
// node_modules/lucide-react/dist/esm/icons/trash-2.js
|
|
2770
|
-
var
|
|
2787
|
+
var __iconNode52 = [
|
|
2771
2788
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
2772
2789
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
2773
2790
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
2774
2791
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
2775
2792
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
2776
2793
|
];
|
|
2777
|
-
var Trash2 = createLucideIcon("trash-2",
|
|
2794
|
+
var Trash2 = createLucideIcon("trash-2", __iconNode52);
|
|
2778
2795
|
|
|
2779
2796
|
// node_modules/lucide-react/dist/esm/icons/trending-down.js
|
|
2780
|
-
var
|
|
2797
|
+
var __iconNode53 = [
|
|
2781
2798
|
["path", { d: "M16 17h6v-6", key: "t6n2it" }],
|
|
2782
2799
|
["path", { d: "m22 17-8.5-8.5-5 5L2 7", key: "x473p" }]
|
|
2783
2800
|
];
|
|
2784
|
-
var TrendingDown = createLucideIcon("trending-down",
|
|
2801
|
+
var TrendingDown = createLucideIcon("trending-down", __iconNode53);
|
|
2785
2802
|
|
|
2786
2803
|
// node_modules/lucide-react/dist/esm/icons/trending-up.js
|
|
2787
|
-
var
|
|
2804
|
+
var __iconNode54 = [
|
|
2788
2805
|
["path", { d: "M16 7h6v6", key: "box55l" }],
|
|
2789
2806
|
["path", { d: "m22 7-8.5 8.5-5-5L2 17", key: "1t1m79" }]
|
|
2790
2807
|
];
|
|
2791
|
-
var TrendingUp = createLucideIcon("trending-up",
|
|
2808
|
+
var TrendingUp = createLucideIcon("trending-up", __iconNode54);
|
|
2792
2809
|
|
|
2793
2810
|
// node_modules/lucide-react/dist/esm/icons/triangle-alert.js
|
|
2794
|
-
var
|
|
2811
|
+
var __iconNode55 = [
|
|
2795
2812
|
[
|
|
2796
2813
|
"path",
|
|
2797
2814
|
{
|
|
@@ -2802,28 +2819,28 @@ var CodegoUI = (() => {
|
|
|
2802
2819
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
2803
2820
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
2804
2821
|
];
|
|
2805
|
-
var TriangleAlert = createLucideIcon("triangle-alert",
|
|
2822
|
+
var TriangleAlert = createLucideIcon("triangle-alert", __iconNode55);
|
|
2806
2823
|
|
|
2807
2824
|
// node_modules/lucide-react/dist/esm/icons/underline.js
|
|
2808
|
-
var
|
|
2825
|
+
var __iconNode56 = [
|
|
2809
2826
|
["path", { d: "M6 4v6a6 6 0 0 0 12 0V4", key: "9kb039" }],
|
|
2810
2827
|
["line", { x1: "4", x2: "20", y1: "20", y2: "20", key: "nun2al" }]
|
|
2811
2828
|
];
|
|
2812
|
-
var Underline = createLucideIcon("underline",
|
|
2829
|
+
var Underline = createLucideIcon("underline", __iconNode56);
|
|
2813
2830
|
|
|
2814
2831
|
// node_modules/lucide-react/dist/esm/icons/undo.js
|
|
2815
|
-
var
|
|
2832
|
+
var __iconNode57 = [
|
|
2816
2833
|
["path", { d: "M3 7v6h6", key: "1v2h90" }],
|
|
2817
2834
|
["path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13", key: "1r6uu6" }]
|
|
2818
2835
|
];
|
|
2819
|
-
var Undo = createLucideIcon("undo",
|
|
2836
|
+
var Undo = createLucideIcon("undo", __iconNode57);
|
|
2820
2837
|
|
|
2821
2838
|
// node_modules/lucide-react/dist/esm/icons/x.js
|
|
2822
|
-
var
|
|
2839
|
+
var __iconNode58 = [
|
|
2823
2840
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
2824
2841
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
2825
2842
|
];
|
|
2826
|
-
var X = createLucideIcon("x",
|
|
2843
|
+
var X = createLucideIcon("x", __iconNode58);
|
|
2827
2844
|
|
|
2828
2845
|
// node_modules/clsx/dist/clsx.mjs
|
|
2829
2846
|
function r(e) {
|
|
@@ -7655,6 +7672,32 @@ var CodegoUI = (() => {
|
|
|
7655
7672
|
] })
|
|
7656
7673
|
] });
|
|
7657
7674
|
}
|
|
7675
|
+
function MetricRow({ items, divided = true, className }) {
|
|
7676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Card, { className: cn("overflow-hidden", className), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CardContent, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: cn("grid", `grid-cols-${Math.min(items.length, 4)}`), children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
7677
|
+
"div",
|
|
7678
|
+
{
|
|
7679
|
+
className: cn(
|
|
7680
|
+
"flex flex-col gap-1 px-5 py-4",
|
|
7681
|
+
divided && i > 0 && "border-l border-border"
|
|
7682
|
+
),
|
|
7683
|
+
children: [
|
|
7684
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-xs font-medium text-muted-foreground", children: item.label }),
|
|
7685
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: cn("text-xl font-bold tabular-nums", item.color && semanticText[item.color]), children: item.value }),
|
|
7686
|
+
item.trendValue && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: cn(
|
|
7687
|
+
"text-xs font-medium",
|
|
7688
|
+
item.trend === "up" && "text-success",
|
|
7689
|
+
item.trend === "down" && "text-danger",
|
|
7690
|
+
item.trend === "neutral" && "text-muted-foreground"
|
|
7691
|
+
), children: [
|
|
7692
|
+
item.trend === "up" && "\u2191 ",
|
|
7693
|
+
item.trend === "down" && "\u2193 ",
|
|
7694
|
+
item.trendValue
|
|
7695
|
+
] })
|
|
7696
|
+
]
|
|
7697
|
+
},
|
|
7698
|
+
i
|
|
7699
|
+
)) }) }) });
|
|
7700
|
+
}
|
|
7658
7701
|
|
|
7659
7702
|
// src/components/ui/data-grid.tsx
|
|
7660
7703
|
var React12 = __toESM(require_react(), 1);
|
|
@@ -10511,6 +10554,42 @@ var CodegoUI = (() => {
|
|
|
10511
10554
|
)
|
|
10512
10555
|
] });
|
|
10513
10556
|
}
|
|
10557
|
+
function DropdownItem({
|
|
10558
|
+
children,
|
|
10559
|
+
onClick,
|
|
10560
|
+
icon,
|
|
10561
|
+
disabled = false,
|
|
10562
|
+
variant = "default",
|
|
10563
|
+
className
|
|
10564
|
+
}) {
|
|
10565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
10566
|
+
"button",
|
|
10567
|
+
{
|
|
10568
|
+
onClick,
|
|
10569
|
+
disabled,
|
|
10570
|
+
className: cn(
|
|
10571
|
+
"flex w-full items-center gap-2.5 px-3.5 py-2 text-left text-sm rounded-lg mx-1 transition-colors duration-100",
|
|
10572
|
+
"w-[calc(100%-0.5rem)]",
|
|
10573
|
+
variant === "danger" ? "text-red-400 hover:bg-red-500/15 hover:text-red-300" : "hover:bg-white/8 hover:text-accent-foreground",
|
|
10574
|
+
disabled && "opacity-40 cursor-not-allowed pointer-events-none",
|
|
10575
|
+
className
|
|
10576
|
+
),
|
|
10577
|
+
children: [
|
|
10578
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "shrink-0 opacity-70", children: icon }),
|
|
10579
|
+
children
|
|
10580
|
+
]
|
|
10581
|
+
}
|
|
10582
|
+
);
|
|
10583
|
+
}
|
|
10584
|
+
function DropdownSeparator({ className }) {
|
|
10585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("my-1.5 h-px bg-white/8", className) });
|
|
10586
|
+
}
|
|
10587
|
+
function DropdownLabel({
|
|
10588
|
+
children,
|
|
10589
|
+
className
|
|
10590
|
+
}) {
|
|
10591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: cn("px-3.5 py-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground/60", className), children });
|
|
10592
|
+
}
|
|
10514
10593
|
|
|
10515
10594
|
// src/components/ui/file-upload.tsx
|
|
10516
10595
|
var React17 = __toESM(require_react(), 1);
|
|
@@ -10949,6 +11028,13 @@ var CodegoUI = (() => {
|
|
|
10949
11028
|
around: "justify-around",
|
|
10950
11029
|
evenly: "justify-evenly"
|
|
10951
11030
|
};
|
|
11031
|
+
var selfMap = {
|
|
11032
|
+
start: "self-start",
|
|
11033
|
+
center: "self-center",
|
|
11034
|
+
end: "self-end",
|
|
11035
|
+
stretch: "self-stretch",
|
|
11036
|
+
baseline: "self-baseline"
|
|
11037
|
+
};
|
|
10952
11038
|
function FlexLayout({
|
|
10953
11039
|
direction = "row",
|
|
10954
11040
|
wrap = "nowrap",
|
|
@@ -10969,6 +11055,29 @@ var CodegoUI = (() => {
|
|
|
10969
11055
|
className
|
|
10970
11056
|
), children });
|
|
10971
11057
|
}
|
|
11058
|
+
function FlexItem({
|
|
11059
|
+
grow,
|
|
11060
|
+
shrink,
|
|
11061
|
+
basis,
|
|
11062
|
+
order,
|
|
11063
|
+
alignSelf,
|
|
11064
|
+
children,
|
|
11065
|
+
className
|
|
11066
|
+
}) {
|
|
11067
|
+
const style = {};
|
|
11068
|
+
if (grow !== void 0) style.flexGrow = grow === true ? 1 : grow === false ? 0 : grow;
|
|
11069
|
+
if (shrink !== void 0) style.flexShrink = shrink === true ? 1 : shrink === false ? 0 : shrink;
|
|
11070
|
+
if (basis) style.flexBasis = basis;
|
|
11071
|
+
if (order !== void 0) style.order = order;
|
|
11072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
11073
|
+
"div",
|
|
11074
|
+
{
|
|
11075
|
+
className: cn(alignSelf && selfMap[alignSelf], className),
|
|
11076
|
+
style,
|
|
11077
|
+
children
|
|
11078
|
+
}
|
|
11079
|
+
);
|
|
11080
|
+
}
|
|
10972
11081
|
|
|
10973
11082
|
// src/components/ui/grid-layout.tsx
|
|
10974
11083
|
var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -11044,6 +11153,17 @@ var CodegoUI = (() => {
|
|
|
11044
11153
|
end: "justify-items-end",
|
|
11045
11154
|
stretch: "justify-items-stretch"
|
|
11046
11155
|
};
|
|
11156
|
+
var spanMap = {
|
|
11157
|
+
1: "col-span-1",
|
|
11158
|
+
2: "col-span-2",
|
|
11159
|
+
3: "col-span-3",
|
|
11160
|
+
4: "col-span-4",
|
|
11161
|
+
5: "col-span-5",
|
|
11162
|
+
6: "col-span-6",
|
|
11163
|
+
12: "col-span-12",
|
|
11164
|
+
full: "col-span-full"
|
|
11165
|
+
};
|
|
11166
|
+
var rowSpanMap = { 1: "row-span-1", 2: "row-span-2", 3: "row-span-3" };
|
|
11047
11167
|
function GridLayout({
|
|
11048
11168
|
cols = 3,
|
|
11049
11169
|
smCols,
|
|
@@ -11071,6 +11191,13 @@ var CodegoUI = (() => {
|
|
|
11071
11191
|
className
|
|
11072
11192
|
), children });
|
|
11073
11193
|
}
|
|
11194
|
+
function GridItem({ span, rowSpan, children, className }) {
|
|
11195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cn(
|
|
11196
|
+
span && spanMap[String(span)],
|
|
11197
|
+
rowSpan && rowSpanMap[rowSpan],
|
|
11198
|
+
className
|
|
11199
|
+
), children });
|
|
11200
|
+
}
|
|
11074
11201
|
|
|
11075
11202
|
// src/components/ui/input.tsx
|
|
11076
11203
|
var React18 = __toESM(require_react(), 1);
|
|
@@ -12785,68 +12912,354 @@ var CodegoUI = (() => {
|
|
|
12785
12912
|
] }, i)) });
|
|
12786
12913
|
}
|
|
12787
12914
|
|
|
12788
|
-
// src/components/ui/
|
|
12915
|
+
// src/components/ui/panel.tsx
|
|
12916
|
+
var React30 = __toESM(require_react(), 1);
|
|
12917
|
+
|
|
12918
|
+
// src/components/ui/tooltip.tsx
|
|
12789
12919
|
var React28 = __toESM(require_react(), 1);
|
|
12920
|
+
var ReactDOM = __toESM(require_react_dom(), 1);
|
|
12790
12921
|
var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
|
|
12791
|
-
|
|
12792
|
-
"top": "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
12793
|
-
"bottom": "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
12794
|
-
"left": "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
12795
|
-
"right": "left-full top-1/2 -translate-y-1/2 ml-2",
|
|
12796
|
-
"top-start": "bottom-full left-0 mb-2",
|
|
12797
|
-
"top-end": "bottom-full right-0 mb-2",
|
|
12798
|
-
"bottom-start": "top-full left-0 mt-2",
|
|
12799
|
-
"bottom-end": "top-full right-0 mt-2"
|
|
12800
|
-
};
|
|
12801
|
-
function Popover({
|
|
12802
|
-
trigger,
|
|
12922
|
+
function Tooltip({
|
|
12803
12923
|
content,
|
|
12804
|
-
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
className
|
|
12924
|
+
children,
|
|
12925
|
+
side = "right",
|
|
12926
|
+
className,
|
|
12927
|
+
enabled = true
|
|
12809
12928
|
}) {
|
|
12810
|
-
const [
|
|
12929
|
+
const [visible, setVisible] = React28.useState(false);
|
|
12930
|
+
const [coords, setCoords] = React28.useState({ top: 0, left: 0 });
|
|
12811
12931
|
const ref = React28.useRef(null);
|
|
12812
|
-
|
|
12813
|
-
function
|
|
12814
|
-
|
|
12815
|
-
|
|
12932
|
+
if (!enabled) return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children });
|
|
12933
|
+
function calcCoords() {
|
|
12934
|
+
const r2 = ref.current?.getBoundingClientRect();
|
|
12935
|
+
if (!r2) return;
|
|
12936
|
+
const GAP = 8;
|
|
12937
|
+
switch (side) {
|
|
12938
|
+
case "right":
|
|
12939
|
+
setCoords({ top: r2.top + r2.height / 2, left: r2.right + GAP });
|
|
12940
|
+
break;
|
|
12941
|
+
case "left":
|
|
12942
|
+
setCoords({ top: r2.top + r2.height / 2, left: r2.left - GAP });
|
|
12943
|
+
break;
|
|
12944
|
+
case "top":
|
|
12945
|
+
setCoords({ top: r2.top - GAP, left: r2.left + r2.width / 2 });
|
|
12946
|
+
break;
|
|
12947
|
+
case "bottom":
|
|
12948
|
+
setCoords({ top: r2.bottom + GAP, left: r2.left + r2.width / 2 });
|
|
12949
|
+
break;
|
|
12950
|
+
}
|
|
12816
12951
|
}
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
|
|
12820
|
-
|
|
12952
|
+
const transformClass = {
|
|
12953
|
+
right: "-translate-y-1/2",
|
|
12954
|
+
left: "-translate-y-1/2 -translate-x-full",
|
|
12955
|
+
top: "-translate-x-1/2 -translate-y-full",
|
|
12956
|
+
bottom: "-translate-x-1/2"
|
|
12957
|
+
}[side];
|
|
12958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
12959
|
+
"div",
|
|
12960
|
+
{
|
|
12961
|
+
ref,
|
|
12962
|
+
className: "relative inline-flex",
|
|
12963
|
+
onMouseEnter: () => {
|
|
12964
|
+
calcCoords();
|
|
12965
|
+
setVisible(true);
|
|
12966
|
+
},
|
|
12967
|
+
onMouseLeave: () => setVisible(false),
|
|
12968
|
+
onFocus: () => {
|
|
12969
|
+
calcCoords();
|
|
12970
|
+
setVisible(true);
|
|
12971
|
+
},
|
|
12972
|
+
onBlur: () => setVisible(false),
|
|
12973
|
+
children: [
|
|
12974
|
+
children,
|
|
12975
|
+
visible && ReactDOM.createPortal(
|
|
12976
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
12977
|
+
"div",
|
|
12978
|
+
{
|
|
12979
|
+
role: "tooltip",
|
|
12980
|
+
style: { top: coords.top, left: coords.left },
|
|
12981
|
+
className: cn(
|
|
12982
|
+
"fixed z-[9999] whitespace-nowrap rounded-md bg-foreground px-2.5 py-1 text-xs font-medium text-background shadow-lg pointer-events-none",
|
|
12983
|
+
transformClass,
|
|
12984
|
+
className
|
|
12985
|
+
),
|
|
12986
|
+
children: content
|
|
12987
|
+
}
|
|
12988
|
+
),
|
|
12989
|
+
document.body
|
|
12990
|
+
)
|
|
12991
|
+
]
|
|
12821
12992
|
}
|
|
12822
|
-
|
|
12823
|
-
return () => document.removeEventListener("mousedown", handler);
|
|
12824
|
-
}, [triggerOn]);
|
|
12825
|
-
const hoverProps = triggerOn === "hover" ? { onMouseEnter: () => setOpen(true), onMouseLeave: () => setOpen(false) } : {};
|
|
12826
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ref, className: "relative inline-block", ...hoverProps, children: [
|
|
12827
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { onClick: () => triggerOn === "click" && setOpen(!open), children: trigger }),
|
|
12828
|
-
open && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn(
|
|
12829
|
-
"absolute z-50 min-w-max rounded-xl border border-border glass shadow-2xl",
|
|
12830
|
-
PLACEMENT_CLASSES[placement],
|
|
12831
|
-
className
|
|
12832
|
-
), children: content })
|
|
12833
|
-
] });
|
|
12993
|
+
);
|
|
12834
12994
|
}
|
|
12835
12995
|
|
|
12836
|
-
// src/components/
|
|
12996
|
+
// src/components/theme-provider.tsx
|
|
12997
|
+
var import_react3 = __toESM(require_react(), 1);
|
|
12837
12998
|
var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
|
|
12838
|
-
var
|
|
12839
|
-
|
|
12840
|
-
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
info: "
|
|
12999
|
+
var defaultColors = {
|
|
13000
|
+
primary: "#8b5cf6",
|
|
13001
|
+
primaryHover: "#7c3aed",
|
|
13002
|
+
secondary: "#171717",
|
|
13003
|
+
secondaryHover: "#262626",
|
|
13004
|
+
info: "#3b82f6",
|
|
13005
|
+
infoHover: "#2563eb",
|
|
13006
|
+
warning: "#f59e0b",
|
|
13007
|
+
warningHover: "#d97706",
|
|
13008
|
+
danger: "#ef4444",
|
|
13009
|
+
dangerHover: "#dc2626"
|
|
12844
13010
|
};
|
|
12845
|
-
var
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
|
|
12849
|
-
|
|
13011
|
+
var initialState = {
|
|
13012
|
+
theme: "system",
|
|
13013
|
+
colors: defaultColors,
|
|
13014
|
+
fontSize: "16px",
|
|
13015
|
+
fontFamily: '"Space Grotesk", "Inter", sans-serif',
|
|
13016
|
+
setTheme: () => null,
|
|
13017
|
+
setColors: () => null,
|
|
13018
|
+
setFontSize: () => null,
|
|
13019
|
+
setFontFamily: () => null,
|
|
13020
|
+
resetSettings: () => null
|
|
13021
|
+
};
|
|
13022
|
+
var ThemeProviderContext = (0, import_react3.createContext)(initialState);
|
|
13023
|
+
var COLOR_PALETTE = [
|
|
13024
|
+
{ base: "#6366f1", hover: "#4f46e5" },
|
|
13025
|
+
// Indigo
|
|
13026
|
+
{ base: "#8b5cf6", hover: "#7c3aed" },
|
|
13027
|
+
// Violet
|
|
13028
|
+
{ base: "#3b82f6", hover: "#2563eb" },
|
|
13029
|
+
// Blue
|
|
13030
|
+
{ base: "#10b981", hover: "#059669" },
|
|
13031
|
+
// Emerald
|
|
13032
|
+
{ base: "#22c55e", hover: "#16a34a" },
|
|
13033
|
+
// Green
|
|
13034
|
+
{ base: "#eab308", hover: "#ca8a04" },
|
|
13035
|
+
// Yellow
|
|
13036
|
+
{ base: "#f59e0b", hover: "#d97706" },
|
|
13037
|
+
// Amber
|
|
13038
|
+
{ base: "#f97316", hover: "#ea580c" },
|
|
13039
|
+
// Orange
|
|
13040
|
+
{ base: "#ef4444", hover: "#dc2626" },
|
|
13041
|
+
// Red
|
|
13042
|
+
{ base: "#ec4899", hover: "#db2777" }
|
|
13043
|
+
// Pink
|
|
13044
|
+
];
|
|
13045
|
+
var useTheme = () => {
|
|
13046
|
+
const context = (0, import_react3.useContext)(ThemeProviderContext);
|
|
13047
|
+
if (context === void 0)
|
|
13048
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
13049
|
+
return context;
|
|
13050
|
+
};
|
|
13051
|
+
|
|
13052
|
+
// src/components/ui/panel.tsx
|
|
13053
|
+
var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
|
|
13054
|
+
var PanelCollapsedContext = React30.createContext(false);
|
|
13055
|
+
function PanelThemeToggle() {
|
|
13056
|
+
const { theme, setTheme } = useTheme();
|
|
13057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
13058
|
+
"button",
|
|
13059
|
+
{
|
|
13060
|
+
type: "button",
|
|
13061
|
+
onClick: () => setTheme(theme === "light" ? "dark" : "light"),
|
|
13062
|
+
className: "text-muted-foreground hover:text-foreground transition-colors",
|
|
13063
|
+
"aria-label": "Toggle theme",
|
|
13064
|
+
children: [
|
|
13065
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Sun, { className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
13066
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Moon, { className: "absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" })
|
|
13067
|
+
]
|
|
13068
|
+
}
|
|
13069
|
+
);
|
|
13070
|
+
}
|
|
13071
|
+
function Panel({
|
|
13072
|
+
sidebar,
|
|
13073
|
+
sidebarHeader,
|
|
13074
|
+
sidebarFooter,
|
|
13075
|
+
sidebarWidth = "w-56",
|
|
13076
|
+
topbar,
|
|
13077
|
+
topbarTrailing,
|
|
13078
|
+
defaultCollapsed = false,
|
|
13079
|
+
collapsible = false,
|
|
13080
|
+
showThemeToggle = false,
|
|
13081
|
+
defaultPage,
|
|
13082
|
+
height = "h-[520px]",
|
|
13083
|
+
children,
|
|
13084
|
+
className
|
|
13085
|
+
}) {
|
|
13086
|
+
const [collapsed, setCollapsed] = React30.useState(defaultCollapsed);
|
|
13087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PanelCollapsedContext.Provider, { value: collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
13088
|
+
"div",
|
|
13089
|
+
{
|
|
13090
|
+
className: cn(
|
|
13091
|
+
"relative flex overflow-hidden rounded-xl border border-border bg-background shadow-lg",
|
|
13092
|
+
height,
|
|
13093
|
+
className
|
|
13094
|
+
),
|
|
13095
|
+
children: [
|
|
13096
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "pointer-events-none absolute inset-0 overflow-hidden", children: [
|
|
13097
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "absolute -top-[40%] -left-[20%] h-[80%] w-[60%] rounded-full bg-primary/10 blur-[120px]" }),
|
|
13098
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "absolute -bottom-[40%] -right-[20%] h-[80%] w-[60%] rounded-full bg-info/10 blur-[120px]" })
|
|
13099
|
+
] }),
|
|
13100
|
+
sidebar && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
13101
|
+
"aside",
|
|
13102
|
+
{
|
|
13103
|
+
className: cn(
|
|
13104
|
+
"relative z-10 flex flex-col shrink-0 border-r border-border transition-all duration-200",
|
|
13105
|
+
collapsed ? "w-14" : sidebarWidth
|
|
13106
|
+
),
|
|
13107
|
+
children: [
|
|
13108
|
+
sidebarHeader && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
13109
|
+
"div",
|
|
13110
|
+
{
|
|
13111
|
+
className: cn(
|
|
13112
|
+
"shrink-0 border-b border-border",
|
|
13113
|
+
collapsed ? "flex items-center justify-center py-3" : "px-4 py-3 text-sm font-semibold"
|
|
13114
|
+
),
|
|
13115
|
+
children: sidebarHeader
|
|
13116
|
+
}
|
|
13117
|
+
),
|
|
13118
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex-1 overflow-y-auto py-2", children: sidebar }),
|
|
13119
|
+
sidebarFooter && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
13120
|
+
"div",
|
|
13121
|
+
{
|
|
13122
|
+
className: cn(
|
|
13123
|
+
"shrink-0 border-t border-border",
|
|
13124
|
+
collapsed ? "flex items-center justify-center py-3" : "px-4 py-3"
|
|
13125
|
+
),
|
|
13126
|
+
children: !collapsed && sidebarFooter
|
|
13127
|
+
}
|
|
13128
|
+
)
|
|
13129
|
+
]
|
|
13130
|
+
}
|
|
13131
|
+
),
|
|
13132
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "relative z-10 flex flex-1 min-w-0 flex-col", children: [
|
|
13133
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("header", { className: "flex h-14 shrink-0 items-center justify-between border-b glass px-4 gap-2", children: [
|
|
13134
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
13135
|
+
collapsible && sidebar && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
13136
|
+
Tooltip,
|
|
13137
|
+
{
|
|
13138
|
+
content: collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
13139
|
+
side: "bottom",
|
|
13140
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
13141
|
+
"button",
|
|
13142
|
+
{
|
|
13143
|
+
type: "button",
|
|
13144
|
+
onClick: () => setCollapsed((c) => !c),
|
|
13145
|
+
className: "text-muted-foreground hover:text-foreground transition-colors",
|
|
13146
|
+
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
13147
|
+
children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PanelLeftOpen, { className: "h-5 w-5" }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PanelLeftClose, { className: "h-5 w-5" })
|
|
13148
|
+
}
|
|
13149
|
+
)
|
|
13150
|
+
}
|
|
13151
|
+
),
|
|
13152
|
+
topbar && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center gap-2", children: topbar })
|
|
13153
|
+
] }),
|
|
13154
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
13155
|
+
topbarTrailing,
|
|
13156
|
+
showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PanelThemeToggle, {})
|
|
13157
|
+
] })
|
|
13158
|
+
] }),
|
|
13159
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("main", { className: "flex-1 overflow-y-auto p-4", children })
|
|
13160
|
+
] })
|
|
13161
|
+
]
|
|
13162
|
+
}
|
|
13163
|
+
) });
|
|
13164
|
+
}
|
|
13165
|
+
function PanelSidebarItem({
|
|
13166
|
+
icon: Icon2,
|
|
13167
|
+
label,
|
|
13168
|
+
active,
|
|
13169
|
+
onClick
|
|
13170
|
+
}) {
|
|
13171
|
+
const collapsed = React30.useContext(PanelCollapsedContext);
|
|
13172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Tooltip, { content: label, side: "right", enabled: collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
13173
|
+
"button",
|
|
13174
|
+
{
|
|
13175
|
+
type: "button",
|
|
13176
|
+
onClick,
|
|
13177
|
+
className: cn(
|
|
13178
|
+
"flex w-full items-center rounded-md text-sm font-medium transition-colors",
|
|
13179
|
+
collapsed ? "justify-center h-9 w-9 mx-auto px-0" : "gap-2 px-3 py-2",
|
|
13180
|
+
active ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-primary/20 hover:text-primary cursor-pointer"
|
|
13181
|
+
),
|
|
13182
|
+
children: [
|
|
13183
|
+
Icon2 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon2, { className: "h-4 w-4 shrink-0" }),
|
|
13184
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "truncate", children: label })
|
|
13185
|
+
]
|
|
13186
|
+
}
|
|
13187
|
+
) });
|
|
13188
|
+
}
|
|
13189
|
+
function PanelSidebarGroup({
|
|
13190
|
+
title,
|
|
13191
|
+
children
|
|
13192
|
+
}) {
|
|
13193
|
+
const collapsed = React30.useContext(PanelCollapsedContext);
|
|
13194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "px-2 py-1", children: [
|
|
13195
|
+
title && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mb-1 px-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: title }),
|
|
13196
|
+
title && collapsed && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mx-1 mb-1 h-px bg-border" }),
|
|
13197
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("main", { className: "space-y-0.5", children })
|
|
13198
|
+
] });
|
|
13199
|
+
}
|
|
13200
|
+
|
|
13201
|
+
// src/components/ui/popover.tsx
|
|
13202
|
+
var React31 = __toESM(require_react(), 1);
|
|
13203
|
+
var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
|
|
13204
|
+
var PLACEMENT_CLASSES = {
|
|
13205
|
+
"top": "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
13206
|
+
"bottom": "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
13207
|
+
"left": "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
13208
|
+
"right": "left-full top-1/2 -translate-y-1/2 ml-2",
|
|
13209
|
+
"top-start": "bottom-full left-0 mb-2",
|
|
13210
|
+
"top-end": "bottom-full right-0 mb-2",
|
|
13211
|
+
"bottom-start": "top-full left-0 mt-2",
|
|
13212
|
+
"bottom-end": "top-full right-0 mt-2"
|
|
13213
|
+
};
|
|
13214
|
+
function Popover({
|
|
13215
|
+
trigger,
|
|
13216
|
+
content,
|
|
13217
|
+
placement = "bottom-start",
|
|
13218
|
+
triggerOn = "click",
|
|
13219
|
+
open: controlled,
|
|
13220
|
+
onOpenChange,
|
|
13221
|
+
className
|
|
13222
|
+
}) {
|
|
13223
|
+
const [internal, setInternal] = React31.useState(false);
|
|
13224
|
+
const ref = React31.useRef(null);
|
|
13225
|
+
const open = controlled ?? internal;
|
|
13226
|
+
function setOpen(v) {
|
|
13227
|
+
if (controlled === void 0) setInternal(v);
|
|
13228
|
+
onOpenChange?.(v);
|
|
13229
|
+
}
|
|
13230
|
+
React31.useEffect(() => {
|
|
13231
|
+
if (triggerOn !== "click") return;
|
|
13232
|
+
function handler(e) {
|
|
13233
|
+
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
13234
|
+
}
|
|
13235
|
+
document.addEventListener("mousedown", handler);
|
|
13236
|
+
return () => document.removeEventListener("mousedown", handler);
|
|
13237
|
+
}, [triggerOn]);
|
|
13238
|
+
const hoverProps = triggerOn === "hover" ? { onMouseEnter: () => setOpen(true), onMouseLeave: () => setOpen(false) } : {};
|
|
13239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { ref, className: "relative inline-block", ...hoverProps, children: [
|
|
13240
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { onClick: () => triggerOn === "click" && setOpen(!open), children: trigger }),
|
|
13241
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn(
|
|
13242
|
+
"absolute z-50 min-w-max rounded-xl border border-border glass shadow-2xl",
|
|
13243
|
+
PLACEMENT_CLASSES[placement],
|
|
13244
|
+
className
|
|
13245
|
+
), children: content })
|
|
13246
|
+
] });
|
|
13247
|
+
}
|
|
13248
|
+
|
|
13249
|
+
// src/components/ui/progress.tsx
|
|
13250
|
+
var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
|
|
13251
|
+
var BAR_COLOR = {
|
|
13252
|
+
default: "bg-primary",
|
|
13253
|
+
success: "bg-success",
|
|
13254
|
+
error: "bg-danger",
|
|
13255
|
+
warning: "bg-warning",
|
|
13256
|
+
info: "bg-info"
|
|
13257
|
+
};
|
|
13258
|
+
var STROKE_COLOR = {
|
|
13259
|
+
default: "stroke-primary",
|
|
13260
|
+
success: "stroke-success",
|
|
13261
|
+
error: "stroke-danger",
|
|
13262
|
+
warning: "stroke-warning",
|
|
12850
13263
|
info: "stroke-info"
|
|
12851
13264
|
};
|
|
12852
13265
|
var HEIGHT = {
|
|
@@ -12868,15 +13281,15 @@ var CodegoUI = (() => {
|
|
|
12868
13281
|
className
|
|
12869
13282
|
}) {
|
|
12870
13283
|
const pct2 = indeterminate ? 100 : Math.min(100, Math.max(0, value / max * 100));
|
|
12871
|
-
return /* @__PURE__ */ (0,
|
|
12872
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
12873
|
-
label && /* @__PURE__ */ (0,
|
|
12874
|
-
showValue && !indeterminate && /* @__PURE__ */ (0,
|
|
13284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("w-full space-y-1.5", className), children: [
|
|
13285
|
+
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center justify-between text-xs text-muted-foreground", children: [
|
|
13286
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: label }),
|
|
13287
|
+
showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { children: [
|
|
12875
13288
|
Math.round(pct2),
|
|
12876
13289
|
"%"
|
|
12877
13290
|
] })
|
|
12878
13291
|
] }),
|
|
12879
|
-
/* @__PURE__ */ (0,
|
|
13292
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn("w-full overflow-hidden rounded-full bg-muted", HEIGHT[size]), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
12880
13293
|
"div",
|
|
12881
13294
|
{
|
|
12882
13295
|
className: cn(
|
|
@@ -12906,10 +13319,10 @@ var CodegoUI = (() => {
|
|
|
12906
13319
|
const circ = 2 * Math.PI * r2;
|
|
12907
13320
|
const pct2 = indeterminate ? 0.75 : Math.min(1, Math.max(0, value / max));
|
|
12908
13321
|
const dash = pct2 * circ;
|
|
12909
|
-
return /* @__PURE__ */ (0,
|
|
12910
|
-
/* @__PURE__ */ (0,
|
|
12911
|
-
/* @__PURE__ */ (0,
|
|
12912
|
-
/* @__PURE__ */ (0,
|
|
13322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("inline-flex flex-col items-center gap-1", className), children: [
|
|
13323
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "relative", style: { width: size, height: size }, children: [
|
|
13324
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("svg", { width: size, height: size, className: cn(indeterminate && "animate-spin"), children: [
|
|
13325
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
12913
13326
|
"circle",
|
|
12914
13327
|
{
|
|
12915
13328
|
cx: size / 2,
|
|
@@ -12920,7 +13333,7 @@ var CodegoUI = (() => {
|
|
|
12920
13333
|
className: "stroke-muted"
|
|
12921
13334
|
}
|
|
12922
13335
|
),
|
|
12923
|
-
/* @__PURE__ */ (0,
|
|
13336
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
12924
13337
|
"circle",
|
|
12925
13338
|
{
|
|
12926
13339
|
cx: size / 2,
|
|
@@ -12935,18 +13348,55 @@ var CodegoUI = (() => {
|
|
|
12935
13348
|
}
|
|
12936
13349
|
)
|
|
12937
13350
|
] }),
|
|
12938
|
-
showValue && !indeterminate && /* @__PURE__ */ (0,
|
|
13351
|
+
showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "absolute inset-0 flex items-center justify-center text-xs font-semibold", children: [
|
|
12939
13352
|
Math.round(pct2 * 100),
|
|
12940
13353
|
"%"
|
|
12941
13354
|
] })
|
|
12942
13355
|
] }),
|
|
12943
|
-
label && /* @__PURE__ */ (0,
|
|
13356
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-xs text-muted-foreground", children: label })
|
|
13357
|
+
] });
|
|
13358
|
+
}
|
|
13359
|
+
|
|
13360
|
+
// src/components/ui/props-table.tsx
|
|
13361
|
+
var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
|
|
13362
|
+
function PropsTable({ rows }) {
|
|
13363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "w-full space-y-3", children: [
|
|
13364
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { children: [
|
|
13365
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h2", { className: "text-2xl font-bold tracking-tight text-gradient", children: "Props" }),
|
|
13366
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-muted-foreground", children: "All available props for this component." })
|
|
13367
|
+
] }),
|
|
13368
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "rounded-xl border border-border overflow-hidden bg-card/50 backdrop-blur-sm shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("table", { className: "w-full text-sm", children: [
|
|
13369
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("tr", { className: "border-b border-border bg-muted/40", children: ["Prop", "Type", "Default", "Description"].map((h) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("th", { className: "h-11 px-4 text-left text-xs font-semibold uppercase tracking-wider text-muted-foreground whitespace-nowrap", children: h }, h)) }) }),
|
|
13370
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
13371
|
+
"tr",
|
|
13372
|
+
{
|
|
13373
|
+
className: cn(
|
|
13374
|
+
"border-b border-border/60 last:border-0 transition-colors hover:bg-muted/20",
|
|
13375
|
+
i % 2 !== 0 && "bg-muted/5"
|
|
13376
|
+
),
|
|
13377
|
+
children: [
|
|
13378
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("td", { className: "px-4 py-3 align-top whitespace-nowrap", children: [
|
|
13379
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("code", { className: "font-mono text-xs font-semibold text-primary", children: row.prop }),
|
|
13380
|
+
row.required && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "ml-1 text-[10px] font-bold text-danger", children: "*" })
|
|
13381
|
+
] }),
|
|
13382
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("td", { className: "px-4 py-3 align-top", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("code", { className: "font-mono text-xs text-info/90 whitespace-pre-wrap", children: row.type }) }),
|
|
13383
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("td", { className: "px-4 py-3 align-top whitespace-nowrap", children: row.default ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("code", { className: "font-mono text-xs text-muted-foreground", children: row.default }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-muted-foreground/40 text-xs", children: "\u2014" }) }),
|
|
13384
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("td", { className: "px-4 py-3 align-top text-xs text-muted-foreground leading-relaxed", children: row.description })
|
|
13385
|
+
]
|
|
13386
|
+
},
|
|
13387
|
+
row.prop
|
|
13388
|
+
)) })
|
|
13389
|
+
] }) }) }),
|
|
13390
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
|
|
13391
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-danger font-bold", children: "*" }),
|
|
13392
|
+
" Required prop"
|
|
13393
|
+
] })
|
|
12944
13394
|
] });
|
|
12945
13395
|
}
|
|
12946
13396
|
|
|
12947
13397
|
// src/components/ui/radio-group.tsx
|
|
12948
|
-
var
|
|
12949
|
-
var
|
|
13398
|
+
var React32 = __toESM(require_react(), 1);
|
|
13399
|
+
var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
|
|
12950
13400
|
var SIZE_RADIO = {
|
|
12951
13401
|
sm: "h-3.5 w-3.5",
|
|
12952
13402
|
md: "h-4 w-4",
|
|
@@ -12968,14 +13418,14 @@ var CodegoUI = (() => {
|
|
|
12968
13418
|
name,
|
|
12969
13419
|
className
|
|
12970
13420
|
}) {
|
|
12971
|
-
const [internal, setInternal] =
|
|
13421
|
+
const [internal, setInternal] = React32.useState(defaultValue ?? "");
|
|
12972
13422
|
const active = controlledValue ?? internal;
|
|
12973
13423
|
function select(val) {
|
|
12974
13424
|
if (!controlledValue) setInternal(val);
|
|
12975
13425
|
onChange?.(val);
|
|
12976
13426
|
}
|
|
12977
13427
|
if (variant === "card") {
|
|
12978
|
-
return /* @__PURE__ */ (0,
|
|
13428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn("grid gap-3", orientation === "horizontal" ? "grid-flow-col auto-cols-fr" : "grid-cols-1", className), children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
12979
13429
|
"label",
|
|
12980
13430
|
{
|
|
12981
13431
|
className: cn(
|
|
@@ -12984,7 +13434,7 @@ var CodegoUI = (() => {
|
|
|
12984
13434
|
active === opt.value ? "border-primary bg-primary/5 ring-1 ring-primary" : "border-border hover:border-primary/40 hover:bg-accent/30"
|
|
12985
13435
|
),
|
|
12986
13436
|
children: [
|
|
12987
|
-
/* @__PURE__ */ (0,
|
|
13437
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
12988
13438
|
"input",
|
|
12989
13439
|
{
|
|
12990
13440
|
type: "radio",
|
|
@@ -12996,414 +13446,150 @@ var CodegoUI = (() => {
|
|
|
12996
13446
|
className: "sr-only"
|
|
12997
13447
|
}
|
|
12998
13448
|
),
|
|
12999
|
-
/* @__PURE__ */ (0,
|
|
13000
|
-
opt.icon && /* @__PURE__ */ (0,
|
|
13001
|
-
/* @__PURE__ */ (0,
|
|
13002
|
-
/* @__PURE__ */ (0,
|
|
13003
|
-
opt.description && /* @__PURE__ */ (0,
|
|
13449
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex w-full gap-3", children: [
|
|
13450
|
+
opt.icon && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "shrink-0 mt-0.5 text-muted-foreground", children: opt.icon }),
|
|
13451
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
13452
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: cn("font-medium", SIZE_TEXT[size], active === opt.value && "text-primary"), children: opt.label }),
|
|
13453
|
+
opt.description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-xs text-muted-foreground mt-0.5", children: opt.description })
|
|
13004
13454
|
] }),
|
|
13005
|
-
/* @__PURE__ */ (0,
|
|
13455
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn(
|
|
13006
13456
|
"shrink-0 mt-0.5 rounded-full border-2 flex items-center justify-center transition-colors",
|
|
13007
13457
|
SIZE_RADIO[size],
|
|
13008
13458
|
active === opt.value ? "border-primary" : "border-muted-foreground/40"
|
|
13009
|
-
), children: active === opt.value && /* @__PURE__ */ (0,
|
|
13459
|
+
), children: active === opt.value && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn("rounded-full bg-primary", size === "sm" ? "h-1.5 w-1.5" : size === "lg" ? "h-2.5 w-2.5" : "h-2 w-2") }) })
|
|
13010
13460
|
] })
|
|
13011
13461
|
]
|
|
13012
|
-
},
|
|
13013
|
-
opt.value
|
|
13014
|
-
)) });
|
|
13015
|
-
}
|
|
13016
|
-
if (variant === "button") {
|
|
13017
|
-
return /* @__PURE__ */ (0,
|
|
13018
|
-
"label",
|
|
13019
|
-
{
|
|
13020
|
-
className: cn(
|
|
13021
|
-
"inline-flex items-center gap-2 cursor-pointer rounded-lg border px-3 py-2 font-medium transition-all",
|
|
13022
|
-
SIZE_TEXT[size],
|
|
13023
|
-
opt.disabled && "opacity-40 cursor-not-allowed pointer-events-none",
|
|
13024
|
-
active === opt.value ? "border-primary bg-primary text-primary-foreground" : "border-border hover:border-primary/40 hover:bg-accent/30 text-muted-foreground"
|
|
13025
|
-
),
|
|
13026
|
-
children: [
|
|
13027
|
-
/* @__PURE__ */ (0,
|
|
13028
|
-
"input",
|
|
13029
|
-
{
|
|
13030
|
-
type: "radio",
|
|
13031
|
-
name,
|
|
13032
|
-
value: opt.value,
|
|
13033
|
-
checked: active === opt.value,
|
|
13034
|
-
disabled: opt.disabled,
|
|
13035
|
-
onChange: () => select(opt.value),
|
|
13036
|
-
className: "sr-only"
|
|
13037
|
-
}
|
|
13038
|
-
),
|
|
13039
|
-
opt.icon && /* @__PURE__ */ (0,
|
|
13040
|
-
opt.label
|
|
13041
|
-
]
|
|
13042
|
-
},
|
|
13043
|
-
opt.value
|
|
13044
|
-
)) });
|
|
13045
|
-
}
|
|
13046
|
-
return /* @__PURE__ */ (0,
|
|
13047
|
-
"label",
|
|
13048
|
-
{
|
|
13049
|
-
className: cn(
|
|
13050
|
-
"flex items-start gap-3 cursor-pointer",
|
|
13051
|
-
opt.disabled && "opacity-40 cursor-not-allowed pointer-events-none"
|
|
13052
|
-
),
|
|
13053
|
-
children: [
|
|
13054
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: cn(
|
|
13055
|
-
"mt-0.5 shrink-0 rounded-full border-2 flex items-center justify-center transition-colors",
|
|
13056
|
-
SIZE_RADIO[size],
|
|
13057
|
-
active === opt.value ? "border-primary" : "border-muted-foreground/40"
|
|
13058
|
-
), children: active === opt.value && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: cn("rounded-full bg-primary", size === "sm" ? "h-1.5 w-1.5" : size === "lg" ? "h-2.5 w-2.5" : "h-2 w-2") }) }),
|
|
13059
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
13060
|
-
"input",
|
|
13061
|
-
{
|
|
13062
|
-
type: "radio",
|
|
13063
|
-
name,
|
|
13064
|
-
value: opt.value,
|
|
13065
|
-
checked: active === opt.value,
|
|
13066
|
-
disabled: opt.disabled,
|
|
13067
|
-
onChange: () => select(opt.value),
|
|
13068
|
-
className: "sr-only"
|
|
13069
|
-
}
|
|
13070
|
-
),
|
|
13071
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { children: [
|
|
13072
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: cn("font-medium leading-tight", SIZE_TEXT[size]), children: opt.label }),
|
|
13073
|
-
opt.description && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-xs text-muted-foreground mt-0.5", children: opt.description })
|
|
13074
|
-
] })
|
|
13075
|
-
]
|
|
13076
|
-
},
|
|
13077
|
-
opt.value
|
|
13078
|
-
)) });
|
|
13079
|
-
}
|
|
13080
|
-
|
|
13081
|
-
// src/components/ui/repeater.tsx
|
|
13082
|
-
var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
|
|
13083
|
-
function Repeater({
|
|
13084
|
-
items,
|
|
13085
|
-
onAdd,
|
|
13086
|
-
onRemove,
|
|
13087
|
-
renderItem,
|
|
13088
|
-
addButtonText = "Add Item",
|
|
13089
|
-
className
|
|
13090
|
-
}) {
|
|
13091
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: cn("space-y-3", className), children: [
|
|
13092
|
-
items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
13093
|
-
"div",
|
|
13094
|
-
{
|
|
13095
|
-
className: "group relative flex items-start gap-3 rounded-xl border border-border bg-card/50 backdrop-blur-sm p-4 shadow-sm transition-all duration-200 hover:border-primary/30 hover:shadow-md hover:shadow-primary/5",
|
|
13096
|
-
style: { animation: "fadeSlideIn 0.2s ease-out" },
|
|
13097
|
-
children: [
|
|
13098
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mt-1 cursor-grab text-muted-foreground/30 group-hover:text-muted-foreground/60 transition-colors shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(GripVertical, { className: "h-4 w-4" }) }),
|
|
13099
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mt-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary/10 text-[10px] font-semibold text-primary", children: index + 1 }),
|
|
13100
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex-1 min-w-0", children: renderItem(item, index) }),
|
|
13101
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
13102
|
-
Button,
|
|
13103
|
-
{
|
|
13104
|
-
type: "button",
|
|
13105
|
-
variant: "ghost",
|
|
13106
|
-
size: "sm",
|
|
13107
|
-
className: "mt-0.5 h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-danger hover:bg-danger/10 transition-all duration-150 p-0",
|
|
13108
|
-
onClick: () => onRemove(index),
|
|
13109
|
-
children: [
|
|
13110
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Trash2, { className: "h-3.5 w-3.5" }),
|
|
13111
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "sr-only", children: "Remove item" })
|
|
13112
|
-
]
|
|
13113
|
-
}
|
|
13114
|
-
)
|
|
13115
|
-
]
|
|
13116
|
-
},
|
|
13117
|
-
index
|
|
13118
|
-
)),
|
|
13119
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
13120
|
-
"button",
|
|
13121
|
-
{
|
|
13122
|
-
type: "button",
|
|
13123
|
-
onClick: onAdd,
|
|
13124
|
-
className: "group flex w-full items-center justify-center gap-2 rounded-xl border border-dashed border-border py-3 text-sm font-medium text-muted-foreground transition-all duration-200 hover:border-primary/50 hover:bg-primary/5 hover:text-primary",
|
|
13125
|
-
children: [
|
|
13126
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-muted group-hover:bg-primary/10 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Plus, { className: "h-3 w-3" }) }),
|
|
13127
|
-
addButtonText
|
|
13128
|
-
]
|
|
13129
|
-
}
|
|
13130
|
-
),
|
|
13131
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("style", { children: `
|
|
13132
|
-
@keyframes fadeSlideIn {
|
|
13133
|
-
from { opacity: 0; transform: translateY(-6px); }
|
|
13134
|
-
to { opacity: 1; transform: translateY(0); }
|
|
13135
|
-
}
|
|
13136
|
-
` })
|
|
13137
|
-
] });
|
|
13138
|
-
}
|
|
13139
|
-
|
|
13140
|
-
// src/components/ui/panel.tsx
|
|
13141
|
-
var React32 = __toESM(require_react(), 1);
|
|
13142
|
-
|
|
13143
|
-
// src/components/ui/tooltip.tsx
|
|
13144
|
-
var React30 = __toESM(require_react(), 1);
|
|
13145
|
-
var ReactDOM = __toESM(require_react_dom(), 1);
|
|
13146
|
-
var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
|
|
13147
|
-
function Tooltip({
|
|
13148
|
-
content,
|
|
13149
|
-
children,
|
|
13150
|
-
side = "right",
|
|
13151
|
-
className,
|
|
13152
|
-
enabled = true
|
|
13153
|
-
}) {
|
|
13154
|
-
const [visible, setVisible] = React30.useState(false);
|
|
13155
|
-
const [coords, setCoords] = React30.useState({ top: 0, left: 0 });
|
|
13156
|
-
const ref = React30.useRef(null);
|
|
13157
|
-
if (!enabled) return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children });
|
|
13158
|
-
function calcCoords() {
|
|
13159
|
-
const r2 = ref.current?.getBoundingClientRect();
|
|
13160
|
-
if (!r2) return;
|
|
13161
|
-
const GAP = 8;
|
|
13162
|
-
switch (side) {
|
|
13163
|
-
case "right":
|
|
13164
|
-
setCoords({ top: r2.top + r2.height / 2, left: r2.right + GAP });
|
|
13165
|
-
break;
|
|
13166
|
-
case "left":
|
|
13167
|
-
setCoords({ top: r2.top + r2.height / 2, left: r2.left - GAP });
|
|
13168
|
-
break;
|
|
13169
|
-
case "top":
|
|
13170
|
-
setCoords({ top: r2.top - GAP, left: r2.left + r2.width / 2 });
|
|
13171
|
-
break;
|
|
13172
|
-
case "bottom":
|
|
13173
|
-
setCoords({ top: r2.bottom + GAP, left: r2.left + r2.width / 2 });
|
|
13174
|
-
break;
|
|
13175
|
-
}
|
|
13176
|
-
}
|
|
13177
|
-
const transformClass = {
|
|
13178
|
-
right: "-translate-y-1/2",
|
|
13179
|
-
left: "-translate-y-1/2 -translate-x-full",
|
|
13180
|
-
top: "-translate-x-1/2 -translate-y-full",
|
|
13181
|
-
bottom: "-translate-x-1/2"
|
|
13182
|
-
}[side];
|
|
13183
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
13184
|
-
"div",
|
|
13185
|
-
{
|
|
13186
|
-
ref,
|
|
13187
|
-
className: "relative inline-flex",
|
|
13188
|
-
onMouseEnter: () => {
|
|
13189
|
-
calcCoords();
|
|
13190
|
-
setVisible(true);
|
|
13191
|
-
},
|
|
13192
|
-
onMouseLeave: () => setVisible(false),
|
|
13193
|
-
onFocus: () => {
|
|
13194
|
-
calcCoords();
|
|
13195
|
-
setVisible(true);
|
|
13196
|
-
},
|
|
13197
|
-
onBlur: () => setVisible(false),
|
|
13198
|
-
children: [
|
|
13199
|
-
children,
|
|
13200
|
-
visible && ReactDOM.createPortal(
|
|
13201
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
13202
|
-
"div",
|
|
13203
|
-
{
|
|
13204
|
-
role: "tooltip",
|
|
13205
|
-
style: { top: coords.top, left: coords.left },
|
|
13206
|
-
className: cn(
|
|
13207
|
-
"fixed z-[9999] whitespace-nowrap rounded-md bg-foreground px-2.5 py-1 text-xs font-medium text-background shadow-lg pointer-events-none",
|
|
13208
|
-
transformClass,
|
|
13209
|
-
className
|
|
13210
|
-
),
|
|
13211
|
-
children: content
|
|
13212
|
-
}
|
|
13213
|
-
),
|
|
13214
|
-
document.body
|
|
13215
|
-
)
|
|
13216
|
-
]
|
|
13217
|
-
}
|
|
13218
|
-
);
|
|
13219
|
-
}
|
|
13220
|
-
|
|
13221
|
-
// src/components/theme-provider.tsx
|
|
13222
|
-
var import_react3 = __toESM(require_react(), 1);
|
|
13223
|
-
var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
|
|
13224
|
-
var defaultColors = {
|
|
13225
|
-
primary: "#8b5cf6",
|
|
13226
|
-
primaryHover: "#7c3aed",
|
|
13227
|
-
secondary: "#171717",
|
|
13228
|
-
secondaryHover: "#262626",
|
|
13229
|
-
info: "#3b82f6",
|
|
13230
|
-
infoHover: "#2563eb",
|
|
13231
|
-
warning: "#f59e0b",
|
|
13232
|
-
warningHover: "#d97706",
|
|
13233
|
-
danger: "#ef4444",
|
|
13234
|
-
dangerHover: "#dc2626"
|
|
13235
|
-
};
|
|
13236
|
-
var initialState = {
|
|
13237
|
-
theme: "system",
|
|
13238
|
-
colors: defaultColors,
|
|
13239
|
-
fontSize: "16px",
|
|
13240
|
-
fontFamily: '"Space Grotesk", "Inter", sans-serif',
|
|
13241
|
-
setTheme: () => null,
|
|
13242
|
-
setColors: () => null,
|
|
13243
|
-
setFontSize: () => null,
|
|
13244
|
-
setFontFamily: () => null,
|
|
13245
|
-
resetSettings: () => null
|
|
13246
|
-
};
|
|
13247
|
-
var ThemeProviderContext = (0, import_react3.createContext)(initialState);
|
|
13248
|
-
var useTheme = () => {
|
|
13249
|
-
const context = (0, import_react3.useContext)(ThemeProviderContext);
|
|
13250
|
-
if (context === void 0)
|
|
13251
|
-
throw new Error("useTheme must be used within a ThemeProvider");
|
|
13252
|
-
return context;
|
|
13253
|
-
};
|
|
13254
|
-
|
|
13255
|
-
// src/components/ui/panel.tsx
|
|
13256
|
-
var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
|
|
13257
|
-
var PanelCollapsedContext = React32.createContext(false);
|
|
13258
|
-
function PanelThemeToggle() {
|
|
13259
|
-
const { theme, setTheme } = useTheme();
|
|
13260
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
13261
|
-
"button",
|
|
13262
|
-
{
|
|
13263
|
-
type: "button",
|
|
13264
|
-
onClick: () => setTheme(theme === "light" ? "dark" : "light"),
|
|
13265
|
-
className: "text-muted-foreground hover:text-foreground transition-colors",
|
|
13266
|
-
"aria-label": "Toggle theme",
|
|
13267
|
-
children: [
|
|
13268
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Sun, { className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
13269
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Moon, { className: "absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" })
|
|
13270
|
-
]
|
|
13271
|
-
}
|
|
13272
|
-
);
|
|
13273
|
-
}
|
|
13274
|
-
function Panel({
|
|
13275
|
-
sidebar,
|
|
13276
|
-
sidebarHeader,
|
|
13277
|
-
sidebarFooter,
|
|
13278
|
-
sidebarWidth = "w-56",
|
|
13279
|
-
topbar,
|
|
13280
|
-
topbarTrailing,
|
|
13281
|
-
defaultCollapsed = false,
|
|
13282
|
-
collapsible = false,
|
|
13283
|
-
showThemeToggle = false,
|
|
13284
|
-
defaultPage,
|
|
13285
|
-
height = "h-[520px]",
|
|
13286
|
-
children,
|
|
13287
|
-
className
|
|
13288
|
-
}) {
|
|
13289
|
-
const [collapsed, setCollapsed] = React32.useState(defaultCollapsed);
|
|
13290
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PanelCollapsedContext.Provider, { value: collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
13291
|
-
"div",
|
|
13292
|
-
{
|
|
13293
|
-
className: cn(
|
|
13294
|
-
"relative flex overflow-hidden rounded-xl border border-border bg-background shadow-lg",
|
|
13295
|
-
height,
|
|
13296
|
-
className
|
|
13297
|
-
),
|
|
13298
|
-
children: [
|
|
13299
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "pointer-events-none absolute inset-0 overflow-hidden", children: [
|
|
13300
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "absolute -top-[40%] -left-[20%] h-[80%] w-[60%] rounded-full bg-primary/10 blur-[120px]" }),
|
|
13301
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "absolute -bottom-[40%] -right-[20%] h-[80%] w-[60%] rounded-full bg-info/10 blur-[120px]" })
|
|
13302
|
-
] }),
|
|
13303
|
-
sidebar && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
13304
|
-
"aside",
|
|
13305
|
-
{
|
|
13306
|
-
className: cn(
|
|
13307
|
-
"relative z-10 flex flex-col shrink-0 border-r border-border transition-all duration-200",
|
|
13308
|
-
collapsed ? "w-14" : sidebarWidth
|
|
13309
|
-
),
|
|
13310
|
-
children: [
|
|
13311
|
-
sidebarHeader && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
13312
|
-
"div",
|
|
13313
|
-
{
|
|
13314
|
-
className: cn(
|
|
13315
|
-
"shrink-0 border-b border-border",
|
|
13316
|
-
collapsed ? "flex items-center justify-center py-3" : "px-4 py-3 text-sm font-semibold"
|
|
13317
|
-
),
|
|
13318
|
-
children: sidebarHeader
|
|
13319
|
-
}
|
|
13320
|
-
),
|
|
13321
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex-1 overflow-y-auto py-2", children: sidebar }),
|
|
13322
|
-
sidebarFooter && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
13323
|
-
"div",
|
|
13324
|
-
{
|
|
13325
|
-
className: cn(
|
|
13326
|
-
"shrink-0 border-t border-border",
|
|
13327
|
-
collapsed ? "flex items-center justify-center py-3" : "px-4 py-3"
|
|
13328
|
-
),
|
|
13329
|
-
children: !collapsed && sidebarFooter
|
|
13330
|
-
}
|
|
13331
|
-
)
|
|
13332
|
-
]
|
|
13333
|
-
}
|
|
13334
|
-
),
|
|
13335
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "relative z-10 flex flex-1 min-w-0 flex-col", children: [
|
|
13336
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("header", { className: "flex h-14 shrink-0 items-center justify-between border-b glass px-4 gap-2", children: [
|
|
13337
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
13338
|
-
collapsible && sidebar && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
13339
|
-
Tooltip,
|
|
13340
|
-
{
|
|
13341
|
-
content: collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
13342
|
-
side: "bottom",
|
|
13343
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
13344
|
-
"button",
|
|
13345
|
-
{
|
|
13346
|
-
type: "button",
|
|
13347
|
-
onClick: () => setCollapsed((c) => !c),
|
|
13348
|
-
className: "text-muted-foreground hover:text-foreground transition-colors",
|
|
13349
|
-
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
13350
|
-
children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PanelLeftOpen, { className: "h-5 w-5" }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PanelLeftClose, { className: "h-5 w-5" })
|
|
13351
|
-
}
|
|
13352
|
-
)
|
|
13353
|
-
}
|
|
13354
|
-
),
|
|
13355
|
-
topbar && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex items-center gap-2", children: topbar })
|
|
13356
|
-
] }),
|
|
13357
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
13358
|
-
topbarTrailing,
|
|
13359
|
-
showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PanelThemeToggle, {})
|
|
13360
|
-
] })
|
|
13361
|
-
] }),
|
|
13362
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("main", { className: "flex-1 overflow-y-auto p-4", children })
|
|
13363
|
-
] })
|
|
13364
|
-
]
|
|
13365
|
-
}
|
|
13366
|
-
) });
|
|
13367
|
-
}
|
|
13368
|
-
function PanelSidebarItem({
|
|
13369
|
-
icon: Icon2,
|
|
13370
|
-
label,
|
|
13371
|
-
active,
|
|
13372
|
-
onClick
|
|
13373
|
-
}) {
|
|
13374
|
-
const collapsed = React32.useContext(PanelCollapsedContext);
|
|
13375
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Tooltip, { content: label, side: "right", enabled: collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
13376
|
-
"button",
|
|
13462
|
+
},
|
|
13463
|
+
opt.value
|
|
13464
|
+
)) });
|
|
13465
|
+
}
|
|
13466
|
+
if (variant === "button") {
|
|
13467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn("flex flex-wrap gap-2", className), children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
13468
|
+
"label",
|
|
13469
|
+
{
|
|
13470
|
+
className: cn(
|
|
13471
|
+
"inline-flex items-center gap-2 cursor-pointer rounded-lg border px-3 py-2 font-medium transition-all",
|
|
13472
|
+
SIZE_TEXT[size],
|
|
13473
|
+
opt.disabled && "opacity-40 cursor-not-allowed pointer-events-none",
|
|
13474
|
+
active === opt.value ? "border-primary bg-primary text-primary-foreground" : "border-border hover:border-primary/40 hover:bg-accent/30 text-muted-foreground"
|
|
13475
|
+
),
|
|
13476
|
+
children: [
|
|
13477
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
13478
|
+
"input",
|
|
13479
|
+
{
|
|
13480
|
+
type: "radio",
|
|
13481
|
+
name,
|
|
13482
|
+
value: opt.value,
|
|
13483
|
+
checked: active === opt.value,
|
|
13484
|
+
disabled: opt.disabled,
|
|
13485
|
+
onChange: () => select(opt.value),
|
|
13486
|
+
className: "sr-only"
|
|
13487
|
+
}
|
|
13488
|
+
),
|
|
13489
|
+
opt.icon && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "shrink-0", children: opt.icon }),
|
|
13490
|
+
opt.label
|
|
13491
|
+
]
|
|
13492
|
+
},
|
|
13493
|
+
opt.value
|
|
13494
|
+
)) });
|
|
13495
|
+
}
|
|
13496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn("flex gap-3", orientation === "horizontal" ? "flex-row flex-wrap" : "flex-col", className), children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
13497
|
+
"label",
|
|
13377
13498
|
{
|
|
13378
|
-
type: "button",
|
|
13379
|
-
onClick,
|
|
13380
13499
|
className: cn(
|
|
13381
|
-
"flex
|
|
13382
|
-
|
|
13383
|
-
active ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-primary/20 hover:text-primary cursor-pointer"
|
|
13500
|
+
"flex items-start gap-3 cursor-pointer",
|
|
13501
|
+
opt.disabled && "opacity-40 cursor-not-allowed pointer-events-none"
|
|
13384
13502
|
),
|
|
13385
13503
|
children: [
|
|
13386
|
-
|
|
13387
|
-
|
|
13504
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn(
|
|
13505
|
+
"mt-0.5 shrink-0 rounded-full border-2 flex items-center justify-center transition-colors",
|
|
13506
|
+
SIZE_RADIO[size],
|
|
13507
|
+
active === opt.value ? "border-primary" : "border-muted-foreground/40"
|
|
13508
|
+
), children: active === opt.value && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn("rounded-full bg-primary", size === "sm" ? "h-1.5 w-1.5" : size === "lg" ? "h-2.5 w-2.5" : "h-2 w-2") }) }),
|
|
13509
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
13510
|
+
"input",
|
|
13511
|
+
{
|
|
13512
|
+
type: "radio",
|
|
13513
|
+
name,
|
|
13514
|
+
value: opt.value,
|
|
13515
|
+
checked: active === opt.value,
|
|
13516
|
+
disabled: opt.disabled,
|
|
13517
|
+
onChange: () => select(opt.value),
|
|
13518
|
+
className: "sr-only"
|
|
13519
|
+
}
|
|
13520
|
+
),
|
|
13521
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { children: [
|
|
13522
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: cn("font-medium leading-tight", SIZE_TEXT[size]), children: opt.label }),
|
|
13523
|
+
opt.description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-xs text-muted-foreground mt-0.5", children: opt.description })
|
|
13524
|
+
] })
|
|
13388
13525
|
]
|
|
13389
|
-
}
|
|
13390
|
-
|
|
13526
|
+
},
|
|
13527
|
+
opt.value
|
|
13528
|
+
)) });
|
|
13391
13529
|
}
|
|
13392
|
-
|
|
13393
|
-
|
|
13394
|
-
|
|
13530
|
+
|
|
13531
|
+
// src/components/ui/repeater.tsx
|
|
13532
|
+
var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
|
|
13533
|
+
function Repeater({
|
|
13534
|
+
items,
|
|
13535
|
+
onAdd,
|
|
13536
|
+
onRemove,
|
|
13537
|
+
renderItem,
|
|
13538
|
+
addButtonText = "Add Item",
|
|
13539
|
+
className
|
|
13395
13540
|
}) {
|
|
13396
|
-
|
|
13397
|
-
|
|
13398
|
-
|
|
13399
|
-
|
|
13400
|
-
|
|
13541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: cn("space-y-3", className), children: [
|
|
13542
|
+
items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
13543
|
+
"div",
|
|
13544
|
+
{
|
|
13545
|
+
className: "group relative flex items-start gap-3 rounded-xl border border-border bg-card/50 backdrop-blur-sm p-4 shadow-sm transition-all duration-200 hover:border-primary/30 hover:shadow-md hover:shadow-primary/5",
|
|
13546
|
+
style: { animation: "fadeSlideIn 0.2s ease-out" },
|
|
13547
|
+
children: [
|
|
13548
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mt-1 cursor-grab text-muted-foreground/30 group-hover:text-muted-foreground/60 transition-colors shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(GripVertical, { className: "h-4 w-4" }) }),
|
|
13549
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mt-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary/10 text-[10px] font-semibold text-primary", children: index + 1 }),
|
|
13550
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex-1 min-w-0", children: renderItem(item, index) }),
|
|
13551
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
13552
|
+
Button,
|
|
13553
|
+
{
|
|
13554
|
+
type: "button",
|
|
13555
|
+
variant: "ghost",
|
|
13556
|
+
size: "sm",
|
|
13557
|
+
className: "mt-0.5 h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-danger hover:bg-danger/10 transition-all duration-150 p-0",
|
|
13558
|
+
onClick: () => onRemove(index),
|
|
13559
|
+
children: [
|
|
13560
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Trash2, { className: "h-3.5 w-3.5" }),
|
|
13561
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "sr-only", children: "Remove item" })
|
|
13562
|
+
]
|
|
13563
|
+
}
|
|
13564
|
+
)
|
|
13565
|
+
]
|
|
13566
|
+
},
|
|
13567
|
+
index
|
|
13568
|
+
)),
|
|
13569
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
13570
|
+
"button",
|
|
13571
|
+
{
|
|
13572
|
+
type: "button",
|
|
13573
|
+
onClick: onAdd,
|
|
13574
|
+
className: "group flex w-full items-center justify-center gap-2 rounded-xl border border-dashed border-border py-3 text-sm font-medium text-muted-foreground transition-all duration-200 hover:border-primary/50 hover:bg-primary/5 hover:text-primary",
|
|
13575
|
+
children: [
|
|
13576
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-muted group-hover:bg-primary/10 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Plus, { className: "h-3 w-3" }) }),
|
|
13577
|
+
addButtonText
|
|
13578
|
+
]
|
|
13579
|
+
}
|
|
13580
|
+
),
|
|
13581
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("style", { children: `
|
|
13582
|
+
@keyframes fadeSlideIn {
|
|
13583
|
+
from { opacity: 0; transform: translateY(-6px); }
|
|
13584
|
+
to { opacity: 1; transform: translateY(0); }
|
|
13585
|
+
}
|
|
13586
|
+
` })
|
|
13401
13587
|
] });
|
|
13402
13588
|
}
|
|
13403
13589
|
|
|
13404
13590
|
// src/components/ui/resizable-panels.tsx
|
|
13405
13591
|
var React33 = __toESM(require_react(), 1);
|
|
13406
|
-
var
|
|
13592
|
+
var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
|
|
13407
13593
|
function ResizablePanels({
|
|
13408
13594
|
children,
|
|
13409
13595
|
orientation = "horizontal",
|
|
@@ -13440,7 +13626,7 @@ var CodegoUI = (() => {
|
|
|
13440
13626
|
document.removeEventListener("mouseup", onUp);
|
|
13441
13627
|
};
|
|
13442
13628
|
}, [dragging, isHorizontal, minSize, maxSize]);
|
|
13443
|
-
return /* @__PURE__ */ (0,
|
|
13629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
13444
13630
|
"div",
|
|
13445
13631
|
{
|
|
13446
13632
|
ref: containerRef,
|
|
@@ -13451,7 +13637,7 @@ var CodegoUI = (() => {
|
|
|
13451
13637
|
className
|
|
13452
13638
|
),
|
|
13453
13639
|
children: [
|
|
13454
|
-
/* @__PURE__ */ (0,
|
|
13640
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
13455
13641
|
"div",
|
|
13456
13642
|
{
|
|
13457
13643
|
className: "overflow-auto",
|
|
@@ -13459,7 +13645,7 @@ var CodegoUI = (() => {
|
|
|
13459
13645
|
children: children[0]
|
|
13460
13646
|
}
|
|
13461
13647
|
),
|
|
13462
|
-
/* @__PURE__ */ (0,
|
|
13648
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
13463
13649
|
"div",
|
|
13464
13650
|
{
|
|
13465
13651
|
onMouseDown,
|
|
@@ -13469,13 +13655,13 @@ var CodegoUI = (() => {
|
|
|
13469
13655
|
dragging && (isHorizontal ? "w-1.5 bg-primary/60" : "h-1.5 bg-primary/60"),
|
|
13470
13656
|
handleClassName
|
|
13471
13657
|
),
|
|
13472
|
-
children: /* @__PURE__ */ (0,
|
|
13658
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: cn(
|
|
13473
13659
|
"rounded-full bg-muted-foreground/40",
|
|
13474
13660
|
isHorizontal ? "h-8 w-0.5" : "w-8 h-0.5"
|
|
13475
13661
|
) })
|
|
13476
13662
|
}
|
|
13477
13663
|
),
|
|
13478
|
-
/* @__PURE__ */ (0,
|
|
13664
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
13479
13665
|
"div",
|
|
13480
13666
|
{
|
|
13481
13667
|
className: "flex-1 overflow-auto",
|
|
@@ -13490,24 +13676,24 @@ var CodegoUI = (() => {
|
|
|
13490
13676
|
|
|
13491
13677
|
// src/components/ui/rich-text-editor.tsx
|
|
13492
13678
|
var React34 = __toESM(require_react(), 1);
|
|
13493
|
-
var
|
|
13679
|
+
var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
|
|
13494
13680
|
var TOOLBAR = [
|
|
13495
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13496
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13681
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Undo, { className: "h-3.5 w-3.5" }), command: "undo", title: "Undo" },
|
|
13682
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Redo, { className: "h-3.5 w-3.5" }), command: "redo", title: "Redo" },
|
|
13497
13683
|
"divider",
|
|
13498
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13499
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13684
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Heading2, { className: "h-3.5 w-3.5" }), command: "formatBlock", value: "h2", title: "Heading 2" },
|
|
13685
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Heading3, { className: "h-3.5 w-3.5" }), command: "formatBlock", value: "h3", title: "Heading 3" },
|
|
13500
13686
|
"divider",
|
|
13501
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13502
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13503
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13504
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13687
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Bold, { className: "h-3.5 w-3.5" }), command: "bold", title: "Bold" },
|
|
13688
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Italic, { className: "h-3.5 w-3.5" }), command: "italic", title: "Italic" },
|
|
13689
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Underline, { className: "h-3.5 w-3.5" }), command: "underline", title: "Underline" },
|
|
13690
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Code, { className: "h-3.5 w-3.5" }), command: "formatBlock", value: "pre", title: "Code block" },
|
|
13505
13691
|
"divider",
|
|
13506
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13507
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13508
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13692
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(List, { className: "h-3.5 w-3.5" }), command: "insertUnorderedList", title: "Bullet list" },
|
|
13693
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ListOrdered, { className: "h-3.5 w-3.5" }), command: "insertOrderedList", title: "Numbered list" },
|
|
13694
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Quote, { className: "h-3.5 w-3.5" }), command: "formatBlock", value: "blockquote", title: "Quote" },
|
|
13509
13695
|
"divider",
|
|
13510
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13696
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Link, { className: "h-3.5 w-3.5" }), command: "createLink", title: "Insert link" }
|
|
13511
13697
|
];
|
|
13512
13698
|
function RichTextEditor({
|
|
13513
13699
|
value: controlled,
|
|
@@ -13556,14 +13742,14 @@ var CodegoUI = (() => {
|
|
|
13556
13742
|
return false;
|
|
13557
13743
|
}
|
|
13558
13744
|
}
|
|
13559
|
-
return /* @__PURE__ */ (0,
|
|
13745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn(
|
|
13560
13746
|
"rounded-xl border border-border overflow-hidden transition-colors",
|
|
13561
13747
|
focused && "ring-2 ring-ring border-primary",
|
|
13562
13748
|
disabled && "opacity-50 pointer-events-none",
|
|
13563
13749
|
className
|
|
13564
13750
|
), children: [
|
|
13565
|
-
/* @__PURE__ */ (0,
|
|
13566
|
-
(item, i) => item === "divider" ? /* @__PURE__ */ (0,
|
|
13751
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex flex-wrap items-center gap-0.5 border-b border-border bg-muted/30 px-2 py-1.5", children: TOOLBAR.map(
|
|
13752
|
+
(item, i) => item === "divider" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "mx-1 h-4 w-px bg-border" }, i) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
13567
13753
|
"button",
|
|
13568
13754
|
{
|
|
13569
13755
|
type: "button",
|
|
@@ -13581,9 +13767,9 @@ var CodegoUI = (() => {
|
|
|
13581
13767
|
i
|
|
13582
13768
|
)
|
|
13583
13769
|
) }),
|
|
13584
|
-
/* @__PURE__ */ (0,
|
|
13585
|
-
isEmpty && !focused && /* @__PURE__ */ (0,
|
|
13586
|
-
/* @__PURE__ */ (0,
|
|
13770
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "relative", children: [
|
|
13771
|
+
isEmpty && !focused && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "absolute top-3 left-4 text-sm text-muted-foreground pointer-events-none select-none", children: placeholder }),
|
|
13772
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
13587
13773
|
"div",
|
|
13588
13774
|
{
|
|
13589
13775
|
ref: editorRef,
|
|
@@ -13610,7 +13796,7 @@ var CodegoUI = (() => {
|
|
|
13610
13796
|
}
|
|
13611
13797
|
|
|
13612
13798
|
// src/components/ui/scroll-area.tsx
|
|
13613
|
-
var
|
|
13799
|
+
var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
|
|
13614
13800
|
function ScrollArea({
|
|
13615
13801
|
maxHeight,
|
|
13616
13802
|
maxWidth,
|
|
@@ -13625,7 +13811,7 @@ var CodegoUI = (() => {
|
|
|
13625
13811
|
horizontal: "overflow-x-auto overflow-y-hidden",
|
|
13626
13812
|
both: "overflow-auto"
|
|
13627
13813
|
}[orientation];
|
|
13628
|
-
return /* @__PURE__ */ (0,
|
|
13814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13629
13815
|
"div",
|
|
13630
13816
|
{
|
|
13631
13817
|
className: cn(
|
|
@@ -13646,7 +13832,7 @@ var CodegoUI = (() => {
|
|
|
13646
13832
|
|
|
13647
13833
|
// src/components/ui/section.tsx
|
|
13648
13834
|
var React35 = __toESM(require_react(), 1);
|
|
13649
|
-
var
|
|
13835
|
+
var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
|
|
13650
13836
|
var variantWrap = {
|
|
13651
13837
|
default: "",
|
|
13652
13838
|
card: "rounded-xl glass shadow-lg overflow-hidden",
|
|
@@ -13679,8 +13865,8 @@ var CodegoUI = (() => {
|
|
|
13679
13865
|
contentClassName
|
|
13680
13866
|
}) {
|
|
13681
13867
|
const [open, setOpen] = React35.useState(defaultOpen);
|
|
13682
|
-
return /* @__PURE__ */ (0,
|
|
13683
|
-
(title || description || action) && /* @__PURE__ */ (0,
|
|
13868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: cn(variantWrap[variant], className), children: [
|
|
13869
|
+
(title || description || action) && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
13684
13870
|
"div",
|
|
13685
13871
|
{
|
|
13686
13872
|
className: cn(
|
|
@@ -13691,16 +13877,16 @@ var CodegoUI = (() => {
|
|
|
13691
13877
|
),
|
|
13692
13878
|
onClick: collapsible ? () => setOpen((o) => !o) : void 0,
|
|
13693
13879
|
children: [
|
|
13694
|
-
/* @__PURE__ */ (0,
|
|
13695
|
-
icon && /* @__PURE__ */ (0,
|
|
13696
|
-
/* @__PURE__ */ (0,
|
|
13697
|
-
title && /* @__PURE__ */ (0,
|
|
13698
|
-
description && /* @__PURE__ */ (0,
|
|
13880
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-start gap-3 min-w-0", children: [
|
|
13881
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "mt-0.5 shrink-0 text-primary", children: icon }),
|
|
13882
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "min-w-0", children: [
|
|
13883
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("h3", { className: "text-base font-semibold leading-tight", children: title }),
|
|
13884
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description })
|
|
13699
13885
|
] })
|
|
13700
13886
|
] }),
|
|
13701
|
-
/* @__PURE__ */ (0,
|
|
13702
|
-
action && /* @__PURE__ */ (0,
|
|
13703
|
-
collapsible && /* @__PURE__ */ (0,
|
|
13887
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
13888
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { onClick: (e) => e.stopPropagation(), children: action }),
|
|
13889
|
+
collapsible && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
13704
13890
|
ChevronDown,
|
|
13705
13891
|
{
|
|
13706
13892
|
className: cn(
|
|
@@ -13713,17 +13899,283 @@ var CodegoUI = (() => {
|
|
|
13713
13899
|
]
|
|
13714
13900
|
}
|
|
13715
13901
|
),
|
|
13716
|
-
(!collapsible || open) && /* @__PURE__ */ (0,
|
|
13902
|
+
(!collapsible || open) && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cn(variantBody[variant], contentClassName), children })
|
|
13903
|
+
] });
|
|
13904
|
+
}
|
|
13905
|
+
|
|
13906
|
+
// src/components/ui/tabs.tsx
|
|
13907
|
+
var React36 = __toESM(require_react(), 1);
|
|
13908
|
+
var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
|
|
13909
|
+
var sizeMap = {
|
|
13910
|
+
sm: "px-3 py-1.5 text-xs",
|
|
13911
|
+
md: "px-4 py-2 text-sm",
|
|
13912
|
+
lg: "px-5 py-2.5 text-base"
|
|
13913
|
+
};
|
|
13914
|
+
var variantTrack = {
|
|
13915
|
+
line: "border-b border-border gap-0",
|
|
13916
|
+
pill: "bg-muted/50 rounded-xl p-1 gap-1",
|
|
13917
|
+
boxed: "border border-border rounded-xl p-1 gap-1",
|
|
13918
|
+
lifted: "gap-0"
|
|
13919
|
+
};
|
|
13920
|
+
function tabClass(variant, size, active, disabled) {
|
|
13921
|
+
const base = cn(
|
|
13922
|
+
"inline-flex items-center gap-2 font-medium transition-all duration-150 select-none whitespace-nowrap",
|
|
13923
|
+
sizeMap[size],
|
|
13924
|
+
disabled && "opacity-40 cursor-not-allowed pointer-events-none"
|
|
13925
|
+
);
|
|
13926
|
+
if (variant === "line") return cn(
|
|
13927
|
+
base,
|
|
13928
|
+
"rounded-none border-b-2 -mb-px",
|
|
13929
|
+
active ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"
|
|
13930
|
+
);
|
|
13931
|
+
if (variant === "pill") return cn(
|
|
13932
|
+
base,
|
|
13933
|
+
"rounded-lg",
|
|
13934
|
+
active ? "bg-primary text-primary-foreground shadow-sm" : "text-muted-foreground hover:text-foreground hover:bg-background/60"
|
|
13935
|
+
);
|
|
13936
|
+
if (variant === "boxed") return cn(
|
|
13937
|
+
base,
|
|
13938
|
+
"rounded-lg",
|
|
13939
|
+
active ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
13940
|
+
);
|
|
13941
|
+
if (variant === "lifted") return cn(
|
|
13942
|
+
base,
|
|
13943
|
+
"rounded-t-lg border border-b-0",
|
|
13944
|
+
active ? "border-border bg-background text-foreground -mb-px" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
13945
|
+
);
|
|
13946
|
+
return base;
|
|
13947
|
+
}
|
|
13948
|
+
function Tabs({
|
|
13949
|
+
items,
|
|
13950
|
+
value: controlledValue,
|
|
13951
|
+
defaultValue,
|
|
13952
|
+
onChange,
|
|
13953
|
+
variant = "line",
|
|
13954
|
+
size = "md",
|
|
13955
|
+
fullWidth = false,
|
|
13956
|
+
className
|
|
13957
|
+
}) {
|
|
13958
|
+
const [internal, setInternal] = React36.useState(defaultValue ?? items[0]?.value ?? "");
|
|
13959
|
+
const active = controlledValue ?? internal;
|
|
13960
|
+
const select = (v) => {
|
|
13961
|
+
if (!controlledValue) setInternal(v);
|
|
13962
|
+
onChange?.(v);
|
|
13963
|
+
};
|
|
13964
|
+
const activeItem = items.find((i) => i.value === active);
|
|
13965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("w-full", className), children: [
|
|
13966
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: cn("flex", fullWidth && "w-full", variantTrack[variant]), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
13967
|
+
"button",
|
|
13968
|
+
{
|
|
13969
|
+
type: "button",
|
|
13970
|
+
disabled: item.disabled,
|
|
13971
|
+
onClick: () => select(item.value),
|
|
13972
|
+
className: cn(
|
|
13973
|
+
tabClass(variant, size, active === item.value, !!item.disabled),
|
|
13974
|
+
fullWidth && "flex-1 justify-center"
|
|
13975
|
+
),
|
|
13976
|
+
children: [
|
|
13977
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "shrink-0", children: item.icon }),
|
|
13978
|
+
item.label,
|
|
13979
|
+
item.badge && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "shrink-0", children: item.badge })
|
|
13980
|
+
]
|
|
13981
|
+
},
|
|
13982
|
+
item.value
|
|
13983
|
+
)) }),
|
|
13984
|
+
activeItem?.content && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "mt-4", children: activeItem.content })
|
|
13985
|
+
] });
|
|
13986
|
+
}
|
|
13987
|
+
|
|
13988
|
+
// src/components/ui/settings.tsx
|
|
13989
|
+
var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
|
|
13990
|
+
var FONT_SIZES = [
|
|
13991
|
+
{ value: "14px", label: "Small (14px)" },
|
|
13992
|
+
{ value: "16px", label: "Medium (16px)" },
|
|
13993
|
+
{ value: "18px", label: "Large (18px)" },
|
|
13994
|
+
{ value: "20px", label: "Extra Large (20px)" }
|
|
13995
|
+
];
|
|
13996
|
+
var FONT_FAMILIES = [
|
|
13997
|
+
{ value: '"Space Grotesk", "Inter", sans-serif', label: "Space Grotesk" },
|
|
13998
|
+
{ value: '"Inter", sans-serif', label: "Inter" },
|
|
13999
|
+
{ value: '"JetBrains Mono", monospace', label: "JetBrains Mono" },
|
|
14000
|
+
{ value: "system-ui, sans-serif", label: "System UI" }
|
|
14001
|
+
];
|
|
14002
|
+
var THEME_OPTIONS = [
|
|
14003
|
+
{ value: "light", label: "Light" },
|
|
14004
|
+
{ value: "dark", label: "Dark" },
|
|
14005
|
+
{ value: "system", label: "System" }
|
|
14006
|
+
];
|
|
14007
|
+
var COLOR_PAIRS = [
|
|
14008
|
+
{ base: "primary", hover: "primaryHover", label: "Primary" },
|
|
14009
|
+
{ base: "secondary", hover: "secondaryHover", label: "Secondary" },
|
|
14010
|
+
{ base: "info", hover: "infoHover", label: "Info" },
|
|
14011
|
+
{ base: "warning", hover: "warningHover", label: "Warning" },
|
|
14012
|
+
{ base: "danger", hover: "dangerHover", label: "Danger" }
|
|
14013
|
+
];
|
|
14014
|
+
function SettingRow({ label, description, children }) {
|
|
14015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-0", children: [
|
|
14016
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-w-0", children: [
|
|
14017
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-sm font-medium", children: label }),
|
|
14018
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-xs text-muted-foreground mt-0.5", children: description })
|
|
14019
|
+
] }),
|
|
14020
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "shrink-0", children })
|
|
14021
|
+
] });
|
|
14022
|
+
}
|
|
14023
|
+
function SectionHeading({ children }) {
|
|
14024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-3 mt-1", children });
|
|
14025
|
+
}
|
|
14026
|
+
function AppearancePanel({ onThemeChange }) {
|
|
14027
|
+
const { theme, setTheme } = useTheme();
|
|
14028
|
+
const handleTheme = (v) => {
|
|
14029
|
+
const t = v;
|
|
14030
|
+
setTheme(t);
|
|
14031
|
+
onThemeChange?.(t);
|
|
14032
|
+
};
|
|
14033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-1", children: [
|
|
14034
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SectionHeading, { children: "Display" }),
|
|
14035
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SettingRow, { label: "Theme", description: "Choose between light, dark, or follow system preference.", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
14036
|
+
Select,
|
|
14037
|
+
{
|
|
14038
|
+
options: THEME_OPTIONS,
|
|
14039
|
+
value: theme,
|
|
14040
|
+
onChange: handleTheme,
|
|
14041
|
+
className: "w-32"
|
|
14042
|
+
}
|
|
14043
|
+
) })
|
|
14044
|
+
] });
|
|
14045
|
+
}
|
|
14046
|
+
function ColorsPanel({ onColorsChange }) {
|
|
14047
|
+
const { colors, setColors } = useTheme();
|
|
14048
|
+
const handleColor = (key, value) => {
|
|
14049
|
+
setColors({ [key]: value });
|
|
14050
|
+
onColorsChange?.({ [key]: value });
|
|
14051
|
+
};
|
|
14052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-4", children: [
|
|
14053
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
|
|
14054
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SectionHeading, { children: "Quick Palette" }),
|
|
14055
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "grid grid-cols-10 gap-1.5", children: COLOR_PALETTE.map((c) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
14056
|
+
"button",
|
|
14057
|
+
{
|
|
14058
|
+
type: "button",
|
|
14059
|
+
title: c.base,
|
|
14060
|
+
onClick: () => {
|
|
14061
|
+
setColors({ primary: c.base, primaryHover: c.hover });
|
|
14062
|
+
onColorsChange?.({ primary: c.base, primaryHover: c.hover });
|
|
14063
|
+
},
|
|
14064
|
+
className: cn(
|
|
14065
|
+
"h-7 w-full rounded-md border border-white/10 transition-transform hover:scale-110 focus:outline-none focus:ring-2 focus:ring-ring",
|
|
14066
|
+
colors.primary === c.base && "ring-2 ring-ring ring-offset-1"
|
|
14067
|
+
),
|
|
14068
|
+
style: { backgroundColor: c.base }
|
|
14069
|
+
},
|
|
14070
|
+
c.base
|
|
14071
|
+
)) })
|
|
14072
|
+
] }),
|
|
14073
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
|
|
14074
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SectionHeading, { children: "Custom Colors" }),
|
|
14075
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "space-y-0", children: COLOR_PAIRS.map((pair) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "py-3 border-b border-border/60 last:border-0", children: [
|
|
14076
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-xs font-semibold mb-2", children: pair.label }),
|
|
14077
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "grid grid-cols-2 gap-3", children: ["base", "hover"].map((variant) => {
|
|
14078
|
+
const key = variant === "base" ? pair.base : pair.hover;
|
|
14079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
14080
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
14081
|
+
Input,
|
|
14082
|
+
{
|
|
14083
|
+
type: "color",
|
|
14084
|
+
value: colors[key],
|
|
14085
|
+
onChange: (e) => handleColor(key, e.target.value),
|
|
14086
|
+
className: "h-7 w-12 cursor-pointer p-0.5 rounded"
|
|
14087
|
+
}
|
|
14088
|
+
),
|
|
14089
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
|
|
14090
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-[10px] text-muted-foreground capitalize", children: variant }),
|
|
14091
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-xs font-mono", children: colors[key] })
|
|
14092
|
+
] })
|
|
14093
|
+
] }, variant);
|
|
14094
|
+
}) })
|
|
14095
|
+
] }, pair.base)) })
|
|
14096
|
+
] })
|
|
14097
|
+
] });
|
|
14098
|
+
}
|
|
14099
|
+
function TypographyPanel({
|
|
14100
|
+
onFontSizeChange,
|
|
14101
|
+
onFontFamilyChange
|
|
14102
|
+
}) {
|
|
14103
|
+
const { fontSize, setFontSize, fontFamily, setFontFamily } = useTheme();
|
|
14104
|
+
const handleSize = (v) => {
|
|
14105
|
+
setFontSize(v);
|
|
14106
|
+
onFontSizeChange?.(v);
|
|
14107
|
+
};
|
|
14108
|
+
const handleFamily = (v) => {
|
|
14109
|
+
setFontFamily(v);
|
|
14110
|
+
onFontFamilyChange?.(v);
|
|
14111
|
+
};
|
|
14112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-1", children: [
|
|
14113
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SectionHeading, { children: "Font" }),
|
|
14114
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SettingRow, { label: "Font Size", description: "Base font size applied across the UI.", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Select, { options: FONT_SIZES, value: fontSize, onChange: handleSize, className: "w-44" }) }),
|
|
14115
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SettingRow, { label: "Font Family", description: "Primary typeface used for all text.", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Select, { options: FONT_FAMILIES, value: fontFamily, onChange: handleFamily, className: "w-44" }) }),
|
|
14116
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "pt-4", children: [
|
|
14117
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SectionHeading, { children: "Preview" }),
|
|
14118
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
14119
|
+
"div",
|
|
14120
|
+
{
|
|
14121
|
+
className: "rounded-lg border border-border bg-muted/30 p-4 space-y-1",
|
|
14122
|
+
style: { fontFamily, fontSize },
|
|
14123
|
+
children: [
|
|
14124
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "font-bold text-foreground", children: "The quick brown fox" }),
|
|
14125
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-muted-foreground", children: "jumps over the lazy dog. 0123456789" })
|
|
14126
|
+
]
|
|
14127
|
+
}
|
|
14128
|
+
)
|
|
14129
|
+
] })
|
|
14130
|
+
] });
|
|
14131
|
+
}
|
|
14132
|
+
function Settings({
|
|
14133
|
+
defaultTab = "appearance",
|
|
14134
|
+
onThemeChange,
|
|
14135
|
+
onColorsChange,
|
|
14136
|
+
onFontSizeChange,
|
|
14137
|
+
onFontFamilyChange,
|
|
14138
|
+
onReset,
|
|
14139
|
+
className
|
|
14140
|
+
}) {
|
|
14141
|
+
const { resetSettings } = useTheme();
|
|
14142
|
+
const handleReset = () => {
|
|
14143
|
+
resetSettings();
|
|
14144
|
+
onReset?.();
|
|
14145
|
+
};
|
|
14146
|
+
const tabs = [
|
|
14147
|
+
{
|
|
14148
|
+
value: "appearance",
|
|
14149
|
+
label: "Appearance",
|
|
14150
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AppearancePanel, { onThemeChange })
|
|
14151
|
+
},
|
|
14152
|
+
{
|
|
14153
|
+
value: "colors",
|
|
14154
|
+
label: "Colors",
|
|
14155
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ColorsPanel, { onColorsChange })
|
|
14156
|
+
},
|
|
14157
|
+
{
|
|
14158
|
+
value: "typography",
|
|
14159
|
+
label: "Typography",
|
|
14160
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TypographyPanel, { onFontSizeChange, onFontFamilyChange })
|
|
14161
|
+
}
|
|
14162
|
+
];
|
|
14163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("flex flex-col gap-4", className), children: [
|
|
14164
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Tabs, { items: tabs, defaultValue: defaultTab, variant: "pill" }),
|
|
14165
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex justify-end pt-1", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Button, { variant: "outline", size: "sm", onClick: handleReset, children: [
|
|
14166
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(RotateCcw, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
14167
|
+
"Reset to Defaults"
|
|
14168
|
+
] }) })
|
|
13717
14169
|
] });
|
|
13718
14170
|
}
|
|
13719
14171
|
|
|
13720
14172
|
// src/components/ui/skeleton.tsx
|
|
13721
|
-
var
|
|
14173
|
+
var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
|
|
13722
14174
|
function Skeleton({
|
|
13723
14175
|
className,
|
|
13724
14176
|
...props
|
|
13725
14177
|
}) {
|
|
13726
|
-
return /* @__PURE__ */ (0,
|
|
14178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13727
14179
|
"div",
|
|
13728
14180
|
{
|
|
13729
14181
|
className: cn("animate-pulse rounded-md bg-white/5 backdrop-blur-sm", className),
|
|
@@ -13732,9 +14184,9 @@ var CodegoUI = (() => {
|
|
|
13732
14184
|
);
|
|
13733
14185
|
}
|
|
13734
14186
|
|
|
13735
|
-
// src/components/ui/slider.tsx
|
|
13736
|
-
var
|
|
13737
|
-
var
|
|
14187
|
+
// src/components/ui/slider.tsx
|
|
14188
|
+
var React37 = __toESM(require_react(), 1);
|
|
14189
|
+
var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
|
|
13738
14190
|
function pct(val, min, max) {
|
|
13739
14191
|
return (val - min) / (max - min) * 100;
|
|
13740
14192
|
}
|
|
@@ -13753,8 +14205,8 @@ var CodegoUI = (() => {
|
|
|
13753
14205
|
showValue = false,
|
|
13754
14206
|
className
|
|
13755
14207
|
}) {
|
|
13756
|
-
const [internal, setInternal] =
|
|
13757
|
-
const [hovering, setHovering] =
|
|
14208
|
+
const [internal, setInternal] = React37.useState(defaultValue);
|
|
14209
|
+
const [hovering, setHovering] = React37.useState(false);
|
|
13758
14210
|
const val = controlled ?? internal;
|
|
13759
14211
|
function handleChange(e) {
|
|
13760
14212
|
const v = Number(e.target.value);
|
|
@@ -13762,20 +14214,20 @@ var CodegoUI = (() => {
|
|
|
13762
14214
|
onChange?.(v);
|
|
13763
14215
|
}
|
|
13764
14216
|
const p = pct(val, min, max);
|
|
13765
|
-
return /* @__PURE__ */ (0,
|
|
13766
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
13767
|
-
label && /* @__PURE__ */ (0,
|
|
13768
|
-
showValue && /* @__PURE__ */ (0,
|
|
14217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("w-full space-y-2", className), children: [
|
|
14218
|
+
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between text-sm", children: [
|
|
14219
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "font-medium", children: label }),
|
|
14220
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-muted-foreground tabular-nums", children: val })
|
|
13769
14221
|
] }),
|
|
13770
|
-
/* @__PURE__ */ (0,
|
|
14222
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
13771
14223
|
"div",
|
|
13772
14224
|
{
|
|
13773
14225
|
className: "relative flex items-center h-5",
|
|
13774
14226
|
onMouseEnter: () => setHovering(true),
|
|
13775
14227
|
onMouseLeave: () => setHovering(false),
|
|
13776
14228
|
children: [
|
|
13777
|
-
/* @__PURE__ */ (0,
|
|
13778
|
-
showTooltip && hovering && !disabled && /* @__PURE__ */ (0,
|
|
14229
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "absolute w-full h-1.5 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "h-full rounded-full bg-primary", style: { width: `${p}%` } }) }),
|
|
14230
|
+
showTooltip && hovering && !disabled && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13779
14231
|
"div",
|
|
13780
14232
|
{
|
|
13781
14233
|
className: "absolute -top-8 -translate-x-1/2 bg-foreground text-background text-xs font-medium px-2 py-0.5 rounded-md pointer-events-none",
|
|
@@ -13783,7 +14235,7 @@ var CodegoUI = (() => {
|
|
|
13783
14235
|
children: val
|
|
13784
14236
|
}
|
|
13785
14237
|
),
|
|
13786
|
-
/* @__PURE__ */ (0,
|
|
14238
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13787
14239
|
"input",
|
|
13788
14240
|
{
|
|
13789
14241
|
type: "range",
|
|
@@ -13799,7 +14251,7 @@ var CodegoUI = (() => {
|
|
|
13799
14251
|
)
|
|
13800
14252
|
}
|
|
13801
14253
|
),
|
|
13802
|
-
/* @__PURE__ */ (0,
|
|
14254
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13803
14255
|
"div",
|
|
13804
14256
|
{
|
|
13805
14257
|
className: cn(
|
|
@@ -13812,9 +14264,9 @@ var CodegoUI = (() => {
|
|
|
13812
14264
|
]
|
|
13813
14265
|
}
|
|
13814
14266
|
),
|
|
13815
|
-
(showMarks || marks) && /* @__PURE__ */ (0,
|
|
13816
|
-
/* @__PURE__ */ (0,
|
|
13817
|
-
m.label && /* @__PURE__ */ (0,
|
|
14267
|
+
(showMarks || marks) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "relative w-full flex justify-between px-0", children: (marks ?? [{ value: min }, { value: max }]).map((m) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col items-center gap-0.5", style: { position: "absolute", left: `${pct(m.value, min, max)}%`, transform: "translateX(-50%)" }, children: [
|
|
14268
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "h-1 w-0.5 bg-border" }),
|
|
14269
|
+
m.label && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-[10px] text-muted-foreground", children: m.label })
|
|
13818
14270
|
] }, m.value)) })
|
|
13819
14271
|
] });
|
|
13820
14272
|
}
|
|
@@ -13831,8 +14283,8 @@ var CodegoUI = (() => {
|
|
|
13831
14283
|
showValue = false,
|
|
13832
14284
|
className
|
|
13833
14285
|
}) {
|
|
13834
|
-
const [internal, setInternal] =
|
|
13835
|
-
const [active, setActive] =
|
|
14286
|
+
const [internal, setInternal] = React37.useState(defaultValue);
|
|
14287
|
+
const [active, setActive] = React37.useState(null);
|
|
13836
14288
|
const val = controlled ?? internal;
|
|
13837
14289
|
function handleChange(idx, e) {
|
|
13838
14290
|
const v = Number(e.target.value);
|
|
@@ -13842,21 +14294,21 @@ var CodegoUI = (() => {
|
|
|
13842
14294
|
}
|
|
13843
14295
|
const p0 = pct(val[0], min, max);
|
|
13844
14296
|
const p1 = pct(val[1], min, max);
|
|
13845
|
-
return /* @__PURE__ */ (0,
|
|
13846
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
13847
|
-
label && /* @__PURE__ */ (0,
|
|
13848
|
-
showValue && /* @__PURE__ */ (0,
|
|
14297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("w-full space-y-2", className), children: [
|
|
14298
|
+
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between text-sm", children: [
|
|
14299
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "font-medium", children: label }),
|
|
14300
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "text-muted-foreground tabular-nums", children: [
|
|
13849
14301
|
val[0],
|
|
13850
14302
|
" \u2013 ",
|
|
13851
14303
|
val[1]
|
|
13852
14304
|
] })
|
|
13853
14305
|
] }),
|
|
13854
|
-
/* @__PURE__ */ (0,
|
|
13855
|
-
/* @__PURE__ */ (0,
|
|
14306
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "relative flex items-center h-5", children: [
|
|
14307
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "absolute w-full h-1.5 rounded-full bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "absolute h-full rounded-full bg-primary", style: { left: `${p0}%`, width: `${p1 - p0}%` } }) }),
|
|
13856
14308
|
[0, 1].map((idx) => {
|
|
13857
14309
|
const p = idx === 0 ? p0 : p1;
|
|
13858
|
-
return /* @__PURE__ */ (0,
|
|
13859
|
-
showTooltip && active === idx && !disabled && /* @__PURE__ */ (0,
|
|
14310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(React37.Fragment, { children: [
|
|
14311
|
+
showTooltip && active === idx && !disabled && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13860
14312
|
"div",
|
|
13861
14313
|
{
|
|
13862
14314
|
className: "absolute -top-8 -translate-x-1/2 bg-foreground text-background text-xs font-medium px-2 py-0.5 rounded-md pointer-events-none z-10",
|
|
@@ -13864,7 +14316,7 @@ var CodegoUI = (() => {
|
|
|
13864
14316
|
children: val[idx]
|
|
13865
14317
|
}
|
|
13866
14318
|
),
|
|
13867
|
-
/* @__PURE__ */ (0,
|
|
14319
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13868
14320
|
"input",
|
|
13869
14321
|
{
|
|
13870
14322
|
type: "range",
|
|
@@ -13880,7 +14332,7 @@ var CodegoUI = (() => {
|
|
|
13880
14332
|
style: { zIndex: idx === 1 ? 2 : 1 }
|
|
13881
14333
|
}
|
|
13882
14334
|
),
|
|
13883
|
-
/* @__PURE__ */ (0,
|
|
14335
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13884
14336
|
"div",
|
|
13885
14337
|
{
|
|
13886
14338
|
className: "absolute h-4 w-4 rounded-full border-2 border-primary bg-background shadow-md pointer-events-none",
|
|
@@ -13894,7 +14346,7 @@ var CodegoUI = (() => {
|
|
|
13894
14346
|
}
|
|
13895
14347
|
|
|
13896
14348
|
// src/components/ui/stat-card.tsx
|
|
13897
|
-
var
|
|
14349
|
+
var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
|
|
13898
14350
|
function Sparkline2({ data, trend }) {
|
|
13899
14351
|
if (data.length < 2) return null;
|
|
13900
14352
|
const min = Math.min(...data);
|
|
@@ -13908,7 +14360,7 @@ var CodegoUI = (() => {
|
|
|
13908
14360
|
return `${x},${y}`;
|
|
13909
14361
|
}).join(" ");
|
|
13910
14362
|
const color = trend === "up" ? "stroke-success" : trend === "down" ? "stroke-danger" : "stroke-primary";
|
|
13911
|
-
return /* @__PURE__ */ (0,
|
|
14363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("svg", { width: w, height: h, className: "overflow-visible", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13912
14364
|
"polyline",
|
|
13913
14365
|
{
|
|
13914
14366
|
points: pts,
|
|
@@ -13936,37 +14388,37 @@ var CodegoUI = (() => {
|
|
|
13936
14388
|
const TrendIcon = autoTrend === "up" ? TrendingUp : autoTrend === "down" ? TrendingDown : Minus;
|
|
13937
14389
|
const trendColor = autoTrend === "up" ? "text-success" : autoTrend === "down" ? "text-danger" : "text-muted-foreground";
|
|
13938
14390
|
if (loading) {
|
|
13939
|
-
return /* @__PURE__ */ (0,
|
|
13940
|
-
/* @__PURE__ */ (0,
|
|
13941
|
-
/* @__PURE__ */ (0,
|
|
13942
|
-
/* @__PURE__ */ (0,
|
|
14391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cn("rounded-xl glass p-5 space-y-3 animate-pulse", className), children: [
|
|
14392
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "h-3 w-24 rounded bg-muted" }),
|
|
14393
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "h-7 w-32 rounded bg-muted" }),
|
|
14394
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "h-3 w-16 rounded bg-muted" })
|
|
13943
14395
|
] });
|
|
13944
14396
|
}
|
|
13945
|
-
return /* @__PURE__ */ (0,
|
|
13946
|
-
/* @__PURE__ */ (0,
|
|
13947
|
-
/* @__PURE__ */ (0,
|
|
13948
|
-
icon && /* @__PURE__ */ (0,
|
|
14397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cn("rounded-xl glass p-5 space-y-3", className), children: [
|
|
14398
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
|
|
14399
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-muted-foreground font-medium", children: title }),
|
|
14400
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10 text-primary shrink-0", children: icon })
|
|
13949
14401
|
] }),
|
|
13950
|
-
/* @__PURE__ */ (0,
|
|
13951
|
-
/* @__PURE__ */ (0,
|
|
13952
|
-
sparkline && /* @__PURE__ */ (0,
|
|
14402
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-end justify-between gap-2", children: [
|
|
14403
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-3xl font-bold tracking-tight", children: value }),
|
|
14404
|
+
sparkline && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Sparkline2, { data: sparkline, trend: autoTrend })
|
|
13953
14405
|
] }),
|
|
13954
|
-
/* @__PURE__ */ (0,
|
|
13955
|
-
change !== void 0 && /* @__PURE__ */ (0,
|
|
13956
|
-
/* @__PURE__ */ (0,
|
|
14406
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
14407
|
+
change !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: cn("flex items-center gap-0.5 text-xs font-semibold", trendColor), children: [
|
|
14408
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TrendIcon, { className: "h-3.5 w-3.5" }),
|
|
13957
14409
|
change > 0 ? "+" : "",
|
|
13958
14410
|
change,
|
|
13959
14411
|
"%"
|
|
13960
14412
|
] }),
|
|
13961
|
-
changeLabel && /* @__PURE__ */ (0,
|
|
13962
|
-
description && !changeLabel && /* @__PURE__ */ (0,
|
|
14413
|
+
changeLabel && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-xs text-muted-foreground", children: changeLabel }),
|
|
14414
|
+
description && !changeLabel && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-xs text-muted-foreground", children: description })
|
|
13963
14415
|
] })
|
|
13964
14416
|
] });
|
|
13965
14417
|
}
|
|
13966
14418
|
|
|
13967
14419
|
// src/components/ui/stepper.tsx
|
|
13968
|
-
var
|
|
13969
|
-
var
|
|
14420
|
+
var React38 = __toESM(require_react(), 1);
|
|
14421
|
+
var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
|
|
13970
14422
|
function getStatus(idx, current) {
|
|
13971
14423
|
if (idx < current) return "complete";
|
|
13972
14424
|
if (idx === current) return "current";
|
|
@@ -13987,7 +14439,7 @@ var CodegoUI = (() => {
|
|
|
13987
14439
|
clickable = false,
|
|
13988
14440
|
className
|
|
13989
14441
|
}) {
|
|
13990
|
-
const [internal, setInternal] =
|
|
14442
|
+
const [internal, setInternal] = React38.useState(defaultCurrent);
|
|
13991
14443
|
const current = controlled ?? internal;
|
|
13992
14444
|
function go(idx) {
|
|
13993
14445
|
if (!clickable) return;
|
|
@@ -13995,20 +14447,20 @@ var CodegoUI = (() => {
|
|
|
13995
14447
|
onChange?.(idx);
|
|
13996
14448
|
}
|
|
13997
14449
|
const isHorizontal = orientation === "horizontal";
|
|
13998
|
-
return /* @__PURE__ */ (0,
|
|
13999
|
-
/* @__PURE__ */ (0,
|
|
14450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn("w-full", className), children: [
|
|
14451
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn(
|
|
14000
14452
|
"flex",
|
|
14001
14453
|
isHorizontal ? "flex-row items-start" : "flex-col gap-0"
|
|
14002
14454
|
), children: steps.map((step, i) => {
|
|
14003
14455
|
const status = getStatus(i, current);
|
|
14004
14456
|
const isLast = i === steps.length - 1;
|
|
14005
|
-
return /* @__PURE__ */ (0,
|
|
14457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(React38.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn(
|
|
14006
14458
|
"flex",
|
|
14007
14459
|
isHorizontal ? "flex-col items-center flex-1" : "flex-row gap-4"
|
|
14008
14460
|
), children: [
|
|
14009
|
-
/* @__PURE__ */ (0,
|
|
14010
|
-
isHorizontal && i > 0 && /* @__PURE__ */ (0,
|
|
14011
|
-
/* @__PURE__ */ (0,
|
|
14461
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn("flex items-center", isHorizontal ? "w-full" : "flex-col"), children: [
|
|
14462
|
+
isHorizontal && i > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("flex-1 h-0.5 transition-colors", i <= current ? "bg-primary" : "bg-border") }),
|
|
14463
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
14012
14464
|
"button",
|
|
14013
14465
|
{
|
|
14014
14466
|
type: "button",
|
|
@@ -14020,34 +14472,34 @@ var CodegoUI = (() => {
|
|
|
14020
14472
|
clickable && "cursor-pointer hover:scale-110",
|
|
14021
14473
|
!clickable && "cursor-default"
|
|
14022
14474
|
),
|
|
14023
|
-
children: status === "complete" ? /* @__PURE__ */ (0,
|
|
14475
|
+
children: status === "complete" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Check, { className: "h-4 w-4" }) : status === "error" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(X, { className: "h-4 w-4" }) : step.icon ?? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: i + 1 })
|
|
14024
14476
|
}
|
|
14025
14477
|
),
|
|
14026
|
-
isHorizontal && !isLast && /* @__PURE__ */ (0,
|
|
14027
|
-
!isHorizontal && !isLast && /* @__PURE__ */ (0,
|
|
14478
|
+
isHorizontal && !isLast && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("flex-1 h-0.5 transition-colors", i < current ? "bg-primary" : "bg-border") }),
|
|
14479
|
+
!isHorizontal && !isLast && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("w-0.5 flex-1 min-h-8 transition-colors mt-1", i < current ? "bg-primary" : "bg-border") })
|
|
14028
14480
|
] }),
|
|
14029
|
-
/* @__PURE__ */ (0,
|
|
14481
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn(
|
|
14030
14482
|
isHorizontal ? "mt-2 text-center px-1" : "pb-6 min-w-0"
|
|
14031
14483
|
), children: [
|
|
14032
|
-
/* @__PURE__ */ (0,
|
|
14484
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("p", { className: cn(
|
|
14033
14485
|
"text-sm font-medium leading-tight",
|
|
14034
14486
|
status === "current" ? "text-primary" : status === "complete" ? "text-foreground" : "text-muted-foreground"
|
|
14035
14487
|
), children: [
|
|
14036
14488
|
step.label,
|
|
14037
|
-
step.optional && /* @__PURE__ */ (0,
|
|
14489
|
+
step.optional && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "ml-1 text-xs text-muted-foreground", children: "(optional)" })
|
|
14038
14490
|
] }),
|
|
14039
|
-
step.description && /* @__PURE__ */ (0,
|
|
14040
|
-
!isHorizontal && step.content && i === current && /* @__PURE__ */ (0,
|
|
14491
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-xs text-muted-foreground mt-0.5", children: step.description }),
|
|
14492
|
+
!isHorizontal && step.content && i === current && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mt-3", children: step.content })
|
|
14041
14493
|
] })
|
|
14042
14494
|
] }) }, i);
|
|
14043
14495
|
}) }),
|
|
14044
|
-
isHorizontal && steps[current]?.content && /* @__PURE__ */ (0,
|
|
14496
|
+
isHorizontal && steps[current]?.content && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mt-6", children: steps[current].content })
|
|
14045
14497
|
] });
|
|
14046
14498
|
}
|
|
14047
14499
|
|
|
14048
14500
|
// src/components/ui/table.tsx
|
|
14049
|
-
var
|
|
14050
|
-
var
|
|
14501
|
+
var React39 = __toESM(require_react(), 1);
|
|
14502
|
+
var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
|
|
14051
14503
|
var BADGE_COLORS = {
|
|
14052
14504
|
active: "bg-success/10 text-success border-success/20",
|
|
14053
14505
|
inactive: "bg-muted text-muted-foreground border-border",
|
|
@@ -14070,11 +14522,11 @@ var CodegoUI = (() => {
|
|
|
14070
14522
|
idKey = "id",
|
|
14071
14523
|
className
|
|
14072
14524
|
}) {
|
|
14073
|
-
const [search, setSearch] =
|
|
14074
|
-
const [currentPage, setCurrentPage] =
|
|
14075
|
-
const [selectedIds, setSelectedIds] =
|
|
14076
|
-
const [sortKey, setSortKey] =
|
|
14077
|
-
const [sortDir, setSortDir] =
|
|
14525
|
+
const [search, setSearch] = React39.useState("");
|
|
14526
|
+
const [currentPage, setCurrentPage] = React39.useState(1);
|
|
14527
|
+
const [selectedIds, setSelectedIds] = React39.useState([]);
|
|
14528
|
+
const [sortKey, setSortKey] = React39.useState(null);
|
|
14529
|
+
const [sortDir, setSortDir] = React39.useState(null);
|
|
14078
14530
|
const handleSort = (key) => {
|
|
14079
14531
|
if (sortKey !== key) {
|
|
14080
14532
|
setSortKey(key);
|
|
@@ -14088,7 +14540,7 @@ var CodegoUI = (() => {
|
|
|
14088
14540
|
setSortKey(null);
|
|
14089
14541
|
setSortDir(null);
|
|
14090
14542
|
};
|
|
14091
|
-
const filteredData =
|
|
14543
|
+
const filteredData = React39.useMemo(() => {
|
|
14092
14544
|
let d = search ? data.filter(
|
|
14093
14545
|
(item) => Object.values(item).some(
|
|
14094
14546
|
(val) => val && typeof val === "string" && val.toLowerCase().includes(search.toLowerCase())
|
|
@@ -14106,18 +14558,18 @@ var CodegoUI = (() => {
|
|
|
14106
14558
|
}, [data, search, sortKey, sortDir]);
|
|
14107
14559
|
const totalPages = Math.max(1, Math.ceil(filteredData.length / itemsPerPage));
|
|
14108
14560
|
const safePage = Math.min(currentPage, totalPages);
|
|
14109
|
-
const paginatedData =
|
|
14561
|
+
const paginatedData = React39.useMemo(() => {
|
|
14110
14562
|
if (!pagination) return filteredData;
|
|
14111
14563
|
const start = (safePage - 1) * itemsPerPage;
|
|
14112
14564
|
return filteredData.slice(start, start + itemsPerPage);
|
|
14113
14565
|
}, [filteredData, pagination, safePage, itemsPerPage]);
|
|
14114
|
-
|
|
14566
|
+
React39.useEffect(() => {
|
|
14115
14567
|
setCurrentPage(1);
|
|
14116
14568
|
}, [search]);
|
|
14117
14569
|
const handleSelectAll = (checked) => setSelectedIds(checked ? paginatedData.map((item) => String(item[idKey])) : []);
|
|
14118
14570
|
const handleSelect = (id, checked) => setSelectedIds((prev) => checked ? [...prev, id] : prev.filter((i) => i !== id));
|
|
14119
14571
|
const allSelected = paginatedData.length > 0 && selectedIds.length === paginatedData.length;
|
|
14120
|
-
const pagePills =
|
|
14572
|
+
const pagePills = React39.useMemo(() => {
|
|
14121
14573
|
if (totalPages <= 5) return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
14122
14574
|
if (safePage <= 3) return [1, 2, 3, 4, 5];
|
|
14123
14575
|
if (safePage >= totalPages - 2) return [totalPages - 4, totalPages - 3, totalPages - 2, totalPages - 1, totalPages];
|
|
@@ -14125,14 +14577,14 @@ var CodegoUI = (() => {
|
|
|
14125
14577
|
}, [totalPages, safePage]);
|
|
14126
14578
|
const SortIcon = ({ col }) => {
|
|
14127
14579
|
if (!col.sortable) return null;
|
|
14128
|
-
if (sortKey !== String(col.key)) return /* @__PURE__ */ (0,
|
|
14129
|
-
return sortDir === "asc" ? /* @__PURE__ */ (0,
|
|
14580
|
+
if (sortKey !== String(col.key)) return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChevronsUpDown, { className: "ml-1.5 h-3.5 w-3.5 opacity-40" });
|
|
14581
|
+
return sortDir === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChevronUp, { className: "ml-1.5 h-3.5 w-3.5 text-primary" }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChevronDown, { className: "ml-1.5 h-3.5 w-3.5 text-primary" });
|
|
14130
14582
|
};
|
|
14131
|
-
return /* @__PURE__ */ (0,
|
|
14132
|
-
/* @__PURE__ */ (0,
|
|
14133
|
-
searchable && /* @__PURE__ */ (0,
|
|
14134
|
-
/* @__PURE__ */ (0,
|
|
14135
|
-
/* @__PURE__ */ (0,
|
|
14583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("w-full space-y-3", className), children: [
|
|
14584
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center justify-between gap-3 flex-wrap", children: [
|
|
14585
|
+
searchable && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "relative w-72", children: [
|
|
14586
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Search, { className: "absolute text-primary left-3 top-1/2 -translate-y-1/2 h-4 w-4 z-10" }),
|
|
14587
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14136
14588
|
"input",
|
|
14137
14589
|
{
|
|
14138
14590
|
placeholder: searchPlaceholder,
|
|
@@ -14141,17 +14593,17 @@ var CodegoUI = (() => {
|
|
|
14141
14593
|
className: "h-9 w-full rounded-xl border border-border bg-background/50 backdrop-blur-sm pl-9 pr-8 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 transition-colors hover:bg-background/80"
|
|
14142
14594
|
}
|
|
14143
14595
|
),
|
|
14144
|
-
search && /* @__PURE__ */ (0,
|
|
14596
|
+
search && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14145
14597
|
"button",
|
|
14146
14598
|
{
|
|
14147
14599
|
onClick: () => setSearch(""),
|
|
14148
14600
|
className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",
|
|
14149
|
-
children: /* @__PURE__ */ (0,
|
|
14601
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(X, { className: "h-3.5 w-3.5" })
|
|
14150
14602
|
}
|
|
14151
14603
|
)
|
|
14152
14604
|
] }),
|
|
14153
|
-
/* @__PURE__ */ (0,
|
|
14154
|
-
selectable && onBulkDelete && selectedIds.length > 0 && /* @__PURE__ */ (0,
|
|
14605
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
14606
|
+
selectable && onBulkDelete && selectedIds.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
14155
14607
|
"button",
|
|
14156
14608
|
{
|
|
14157
14609
|
onClick: () => {
|
|
@@ -14160,14 +14612,14 @@ var CodegoUI = (() => {
|
|
|
14160
14612
|
},
|
|
14161
14613
|
className: "inline-flex items-center gap-1.5 rounded-lg bg-danger/10 border border-danger/20 px-3 py-1.5 text-xs font-medium text-danger hover:bg-danger/20 transition-colors",
|
|
14162
14614
|
children: [
|
|
14163
|
-
/* @__PURE__ */ (0,
|
|
14615
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Trash2, { className: "h-3.5 w-3.5" }),
|
|
14164
14616
|
"Delete ",
|
|
14165
14617
|
selectedIds.length,
|
|
14166
14618
|
" selected"
|
|
14167
14619
|
]
|
|
14168
14620
|
}
|
|
14169
14621
|
),
|
|
14170
|
-
/* @__PURE__ */ (0,
|
|
14622
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
14171
14623
|
filteredData.length,
|
|
14172
14624
|
" ",
|
|
14173
14625
|
filteredData.length === 1 ? "row" : "rows",
|
|
@@ -14175,16 +14627,16 @@ var CodegoUI = (() => {
|
|
|
14175
14627
|
] })
|
|
14176
14628
|
] })
|
|
14177
14629
|
] }),
|
|
14178
|
-
/* @__PURE__ */ (0,
|
|
14179
|
-
/* @__PURE__ */ (0,
|
|
14180
|
-
selectable && /* @__PURE__ */ (0,
|
|
14630
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "rounded-xl border border-border overflow-hidden bg-card/50 backdrop-blur-sm shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("table", { className: "w-full caption-bottom text-sm", children: [
|
|
14631
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("tr", { className: "border-b border-border bg-muted/40", children: [
|
|
14632
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("th", { className: "h-11 w-[46px] px-4 text-left align-middle", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14181
14633
|
Checkbox,
|
|
14182
14634
|
{
|
|
14183
14635
|
checked: allSelected,
|
|
14184
14636
|
onChange: (e) => handleSelectAll(e.target.checked)
|
|
14185
14637
|
}
|
|
14186
14638
|
) }),
|
|
14187
|
-
columns.map((col) => /* @__PURE__ */ (0,
|
|
14639
|
+
columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14188
14640
|
"th",
|
|
14189
14641
|
{
|
|
14190
14642
|
onClick: () => col.sortable && handleSort(String(col.key)),
|
|
@@ -14192,29 +14644,29 @@ var CodegoUI = (() => {
|
|
|
14192
14644
|
"h-11 px-4 text-left align-middle text-xs font-semibold uppercase tracking-wider text-muted-foreground select-none whitespace-nowrap",
|
|
14193
14645
|
col.sortable && "cursor-pointer hover:text-foreground transition-colors"
|
|
14194
14646
|
),
|
|
14195
|
-
children: /* @__PURE__ */ (0,
|
|
14647
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "inline-flex items-center", children: [
|
|
14196
14648
|
col.title,
|
|
14197
|
-
/* @__PURE__ */ (0,
|
|
14649
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SortIcon, { col })
|
|
14198
14650
|
] })
|
|
14199
14651
|
},
|
|
14200
14652
|
String(col.key)
|
|
14201
14653
|
))
|
|
14202
14654
|
] }) }),
|
|
14203
|
-
/* @__PURE__ */ (0,
|
|
14655
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tbody", { children: paginatedData.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14204
14656
|
"td",
|
|
14205
14657
|
{
|
|
14206
14658
|
colSpan: columns.length + (selectable ? 1 : 0),
|
|
14207
14659
|
className: "h-32 text-center align-middle",
|
|
14208
|
-
children: /* @__PURE__ */ (0,
|
|
14209
|
-
/* @__PURE__ */ (0,
|
|
14210
|
-
/* @__PURE__ */ (0,
|
|
14211
|
-
search && /* @__PURE__ */ (0,
|
|
14660
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col items-center gap-1 text-muted-foreground", children: [
|
|
14661
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Search, { className: "h-8 w-8 opacity-20" }),
|
|
14662
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-sm", children: "No results found" }),
|
|
14663
|
+
search && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("button", { onClick: () => setSearch(""), className: "text-xs text-primary hover:underline", children: "Clear search" })
|
|
14212
14664
|
] })
|
|
14213
14665
|
}
|
|
14214
14666
|
) }) : paginatedData.map((item, i) => {
|
|
14215
14667
|
const id = String(item[idKey] || i);
|
|
14216
14668
|
const isSelected = selectedIds.includes(id);
|
|
14217
|
-
return /* @__PURE__ */ (0,
|
|
14669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
14218
14670
|
"tr",
|
|
14219
14671
|
{
|
|
14220
14672
|
className: cn(
|
|
@@ -14222,38 +14674,38 @@ var CodegoUI = (() => {
|
|
|
14222
14674
|
isSelected ? "bg-primary/5 hover:bg-primary/8" : "hover:bg-muted/30"
|
|
14223
14675
|
),
|
|
14224
14676
|
children: [
|
|
14225
|
-
selectable && /* @__PURE__ */ (0,
|
|
14677
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("td", { className: "px-4 py-3 align-middle", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14226
14678
|
Checkbox,
|
|
14227
14679
|
{
|
|
14228
14680
|
checked: isSelected,
|
|
14229
14681
|
onChange: (e) => handleSelect(id, e.target.checked)
|
|
14230
14682
|
}
|
|
14231
14683
|
) }),
|
|
14232
|
-
columns.map((col) => /* @__PURE__ */ (0,
|
|
14684
|
+
columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("td", { className: "px-4 py-3 align-middle", children: col.render ? col.render(item) : col.type === "image" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14233
14685
|
"img",
|
|
14234
14686
|
{
|
|
14235
14687
|
src: item[col.key],
|
|
14236
14688
|
alt: item[col.key],
|
|
14237
14689
|
className: "h-9 w-9 rounded-lg object-cover ring-1 ring-border"
|
|
14238
14690
|
}
|
|
14239
|
-
) : col.type === "badge" ? /* @__PURE__ */ (0,
|
|
14691
|
+
) : col.type === "badge" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: cn(
|
|
14240
14692
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium",
|
|
14241
14693
|
badgeClass(String(item[col.key]))
|
|
14242
14694
|
), children: [
|
|
14243
|
-
/* @__PURE__ */ (0,
|
|
14695
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: cn(
|
|
14244
14696
|
"mr-1.5 h-1.5 w-1.5 rounded-full",
|
|
14245
14697
|
badgeClass(String(item[col.key])).includes("success") ? "bg-success" : badgeClass(String(item[col.key])).includes("warning") ? "bg-warning" : badgeClass(String(item[col.key])).includes("danger") ? "bg-danger" : badgeClass(String(item[col.key])).includes("info") ? "bg-info" : "bg-primary"
|
|
14246
14698
|
) }),
|
|
14247
14699
|
item[col.key]
|
|
14248
|
-
] }) : col.type === "stack" ? /* @__PURE__ */ (0,
|
|
14700
|
+
] }) : col.type === "stack" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AvatarStack, { images: Array.isArray(item[col.key]) ? item[col.key] : [], ...col.stackProps ?? {} }) : col.type === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "flex items-center", children: item[col.key] }) : col.type === "select" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14249
14701
|
"select",
|
|
14250
14702
|
{
|
|
14251
14703
|
value: item[col.key],
|
|
14252
14704
|
onChange: (e) => col.onChange?.(item, e.target.value),
|
|
14253
14705
|
className: "h-8 rounded-lg border border-border bg-background/50 px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-ring transition-colors",
|
|
14254
|
-
children: (col.selectOptions ?? []).map((opt) => /* @__PURE__ */ (0,
|
|
14706
|
+
children: (col.selectOptions ?? []).map((opt) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("option", { value: opt, children: opt }, opt))
|
|
14255
14707
|
}
|
|
14256
|
-
) : col.type === "toggle" ? /* @__PURE__ */ (0,
|
|
14708
|
+
) : col.type === "toggle" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14257
14709
|
"button",
|
|
14258
14710
|
{
|
|
14259
14711
|
role: "switch",
|
|
@@ -14263,13 +14715,13 @@ var CodegoUI = (() => {
|
|
|
14263
14715
|
"relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
14264
14716
|
item[col.key] ? "bg-primary" : "bg-muted"
|
|
14265
14717
|
),
|
|
14266
|
-
children: /* @__PURE__ */ (0,
|
|
14718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: cn(
|
|
14267
14719
|
"pointer-events-none inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform",
|
|
14268
14720
|
item[col.key] ? "translate-x-4" : "translate-x-0"
|
|
14269
14721
|
) })
|
|
14270
14722
|
}
|
|
14271
|
-
) : col.type === "color" ? /* @__PURE__ */ (0,
|
|
14272
|
-
/* @__PURE__ */ (0,
|
|
14723
|
+
) : col.type === "color" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
14724
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14273
14725
|
"input",
|
|
14274
14726
|
{
|
|
14275
14727
|
type: "color",
|
|
@@ -14278,22 +14730,22 @@ var CodegoUI = (() => {
|
|
|
14278
14730
|
className: "h-7 w-7 cursor-pointer rounded border border-border bg-transparent p-0.5"
|
|
14279
14731
|
}
|
|
14280
14732
|
),
|
|
14281
|
-
/* @__PURE__ */ (0,
|
|
14282
|
-
] }) : col.type === "checkbox" ? /* @__PURE__ */ (0,
|
|
14733
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-xs text-muted-foreground font-mono", children: item[col.key] })
|
|
14734
|
+
] }) : col.type === "checkbox" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14283
14735
|
Checkbox,
|
|
14284
14736
|
{
|
|
14285
14737
|
checked: !!item[col.key],
|
|
14286
14738
|
onChange: (e) => col.onChange?.(item, e.target.checked)
|
|
14287
14739
|
}
|
|
14288
|
-
) : /* @__PURE__ */ (0,
|
|
14740
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-foreground/90", children: item[col.key] }) }, String(col.key)))
|
|
14289
14741
|
]
|
|
14290
14742
|
},
|
|
14291
14743
|
id
|
|
14292
14744
|
);
|
|
14293
14745
|
}) })
|
|
14294
14746
|
] }) }) }),
|
|
14295
|
-
pagination && totalPages > 1 && /* @__PURE__ */ (0,
|
|
14296
|
-
/* @__PURE__ */ (0,
|
|
14747
|
+
pagination && totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
14748
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
14297
14749
|
"Showing ",
|
|
14298
14750
|
(safePage - 1) * itemsPerPage + 1,
|
|
14299
14751
|
"\u2013",
|
|
@@ -14301,21 +14753,21 @@ var CodegoUI = (() => {
|
|
|
14301
14753
|
" of ",
|
|
14302
14754
|
filteredData.length
|
|
14303
14755
|
] }),
|
|
14304
|
-
/* @__PURE__ */ (0,
|
|
14305
|
-
/* @__PURE__ */ (0,
|
|
14756
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
14757
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14306
14758
|
"button",
|
|
14307
14759
|
{
|
|
14308
14760
|
onClick: () => setCurrentPage((p) => Math.max(1, p - 1)),
|
|
14309
14761
|
disabled: safePage === 1,
|
|
14310
14762
|
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
14311
|
-
children: /* @__PURE__ */ (0,
|
|
14763
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChevronLeft, { className: "h-4 w-4" })
|
|
14312
14764
|
}
|
|
14313
14765
|
),
|
|
14314
|
-
pagePills[0] > 1 && /* @__PURE__ */ (0,
|
|
14315
|
-
/* @__PURE__ */ (0,
|
|
14316
|
-
pagePills[0] > 2 && /* @__PURE__ */ (0,
|
|
14766
|
+
pagePills[0] > 1 && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
14767
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("button", { onClick: () => setCurrentPage(1), className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-xs text-muted-foreground hover:bg-muted transition-colors", children: "1" }),
|
|
14768
|
+
pagePills[0] > 2 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "px-1 text-muted-foreground text-xs", children: "\u2026" })
|
|
14317
14769
|
] }),
|
|
14318
|
-
pagePills.map((p) => /* @__PURE__ */ (0,
|
|
14770
|
+
pagePills.map((p) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14319
14771
|
"button",
|
|
14320
14772
|
{
|
|
14321
14773
|
onClick: () => setCurrentPage(p),
|
|
@@ -14327,17 +14779,17 @@ var CodegoUI = (() => {
|
|
|
14327
14779
|
},
|
|
14328
14780
|
p
|
|
14329
14781
|
)),
|
|
14330
|
-
pagePills[pagePills.length - 1] < totalPages && /* @__PURE__ */ (0,
|
|
14331
|
-
pagePills[pagePills.length - 1] < totalPages - 1 && /* @__PURE__ */ (0,
|
|
14332
|
-
/* @__PURE__ */ (0,
|
|
14782
|
+
pagePills[pagePills.length - 1] < totalPages && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
14783
|
+
pagePills[pagePills.length - 1] < totalPages - 1 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "px-1 text-muted-foreground text-xs", children: "\u2026" }),
|
|
14784
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("button", { onClick: () => setCurrentPage(totalPages), className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-xs text-muted-foreground hover:bg-muted transition-colors", children: totalPages })
|
|
14333
14785
|
] }),
|
|
14334
|
-
/* @__PURE__ */ (0,
|
|
14786
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14335
14787
|
"button",
|
|
14336
14788
|
{
|
|
14337
14789
|
onClick: () => setCurrentPage((p) => Math.min(totalPages, p + 1)),
|
|
14338
14790
|
disabled: safePage === totalPages,
|
|
14339
14791
|
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
14340
|
-
children: /* @__PURE__ */ (0,
|
|
14792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChevronRight, { className: "h-4 w-4" })
|
|
14341
14793
|
}
|
|
14342
14794
|
)
|
|
14343
14795
|
] })
|
|
@@ -14345,91 +14797,9 @@ var CodegoUI = (() => {
|
|
|
14345
14797
|
] });
|
|
14346
14798
|
}
|
|
14347
14799
|
|
|
14348
|
-
// src/components/ui/tabs.tsx
|
|
14349
|
-
var React39 = __toESM(require_react(), 1);
|
|
14350
|
-
var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
|
|
14351
|
-
var sizeMap = {
|
|
14352
|
-
sm: "px-3 py-1.5 text-xs",
|
|
14353
|
-
md: "px-4 py-2 text-sm",
|
|
14354
|
-
lg: "px-5 py-2.5 text-base"
|
|
14355
|
-
};
|
|
14356
|
-
var variantTrack = {
|
|
14357
|
-
line: "border-b border-border gap-0",
|
|
14358
|
-
pill: "bg-muted/50 rounded-xl p-1 gap-1",
|
|
14359
|
-
boxed: "border border-border rounded-xl p-1 gap-1",
|
|
14360
|
-
lifted: "gap-0"
|
|
14361
|
-
};
|
|
14362
|
-
function tabClass(variant, size, active, disabled) {
|
|
14363
|
-
const base = cn(
|
|
14364
|
-
"inline-flex items-center gap-2 font-medium transition-all duration-150 select-none whitespace-nowrap",
|
|
14365
|
-
sizeMap[size],
|
|
14366
|
-
disabled && "opacity-40 cursor-not-allowed pointer-events-none"
|
|
14367
|
-
);
|
|
14368
|
-
if (variant === "line") return cn(
|
|
14369
|
-
base,
|
|
14370
|
-
"rounded-none border-b-2 -mb-px",
|
|
14371
|
-
active ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"
|
|
14372
|
-
);
|
|
14373
|
-
if (variant === "pill") return cn(
|
|
14374
|
-
base,
|
|
14375
|
-
"rounded-lg",
|
|
14376
|
-
active ? "bg-primary text-primary-foreground shadow-sm" : "text-muted-foreground hover:text-foreground hover:bg-background/60"
|
|
14377
|
-
);
|
|
14378
|
-
if (variant === "boxed") return cn(
|
|
14379
|
-
base,
|
|
14380
|
-
"rounded-lg",
|
|
14381
|
-
active ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
14382
|
-
);
|
|
14383
|
-
if (variant === "lifted") return cn(
|
|
14384
|
-
base,
|
|
14385
|
-
"rounded-t-lg border border-b-0",
|
|
14386
|
-
active ? "border-border bg-background text-foreground -mb-px" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
14387
|
-
);
|
|
14388
|
-
return base;
|
|
14389
|
-
}
|
|
14390
|
-
function Tabs({
|
|
14391
|
-
items,
|
|
14392
|
-
value: controlledValue,
|
|
14393
|
-
defaultValue,
|
|
14394
|
-
onChange,
|
|
14395
|
-
variant = "line",
|
|
14396
|
-
size = "md",
|
|
14397
|
-
fullWidth = false,
|
|
14398
|
-
className
|
|
14399
|
-
}) {
|
|
14400
|
-
const [internal, setInternal] = React39.useState(defaultValue ?? items[0]?.value ?? "");
|
|
14401
|
-
const active = controlledValue ?? internal;
|
|
14402
|
-
const select = (v) => {
|
|
14403
|
-
if (!controlledValue) setInternal(v);
|
|
14404
|
-
onChange?.(v);
|
|
14405
|
-
};
|
|
14406
|
-
const activeItem = items.find((i) => i.value === active);
|
|
14407
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cn("w-full", className), children: [
|
|
14408
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: cn("flex", fullWidth && "w-full", variantTrack[variant]), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
14409
|
-
"button",
|
|
14410
|
-
{
|
|
14411
|
-
type: "button",
|
|
14412
|
-
disabled: item.disabled,
|
|
14413
|
-
onClick: () => select(item.value),
|
|
14414
|
-
className: cn(
|
|
14415
|
-
tabClass(variant, size, active === item.value, !!item.disabled),
|
|
14416
|
-
fullWidth && "flex-1 justify-center"
|
|
14417
|
-
),
|
|
14418
|
-
children: [
|
|
14419
|
-
item.icon && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "shrink-0", children: item.icon }),
|
|
14420
|
-
item.label,
|
|
14421
|
-
item.badge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "shrink-0", children: item.badge })
|
|
14422
|
-
]
|
|
14423
|
-
},
|
|
14424
|
-
item.value
|
|
14425
|
-
)) }),
|
|
14426
|
-
activeItem?.content && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mt-4", children: activeItem.content })
|
|
14427
|
-
] });
|
|
14428
|
-
}
|
|
14429
|
-
|
|
14430
14800
|
// src/components/ui/tag-input.tsx
|
|
14431
14801
|
var React40 = __toESM(require_react(), 1);
|
|
14432
|
-
var
|
|
14802
|
+
var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
|
|
14433
14803
|
function TagInput({
|
|
14434
14804
|
value: controlled,
|
|
14435
14805
|
defaultValue = [],
|
|
@@ -14467,7 +14837,7 @@ var CodegoUI = (() => {
|
|
|
14467
14837
|
removeTag(tags.length - 1);
|
|
14468
14838
|
}
|
|
14469
14839
|
}
|
|
14470
|
-
return /* @__PURE__ */ (0,
|
|
14840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
14471
14841
|
"div",
|
|
14472
14842
|
{
|
|
14473
14843
|
className: cn(
|
|
@@ -14478,8 +14848,8 @@ var CodegoUI = (() => {
|
|
|
14478
14848
|
),
|
|
14479
14849
|
onClick: () => inputRef.current?.focus(),
|
|
14480
14850
|
children: [
|
|
14481
|
-
tags.map((tag, i) => /* @__PURE__ */ (0,
|
|
14482
|
-
/* @__PURE__ */ (0,
|
|
14851
|
+
tags.map((tag, i) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Badge, { variant: "default", size: "sm", removable: true, onRemove: () => removeTag(i), children: tag }, i)),
|
|
14852
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14483
14853
|
"input",
|
|
14484
14854
|
{
|
|
14485
14855
|
ref: inputRef,
|
|
@@ -14498,7 +14868,7 @@ var CodegoUI = (() => {
|
|
|
14498
14868
|
}
|
|
14499
14869
|
|
|
14500
14870
|
// src/components/ui/timeline.tsx
|
|
14501
|
-
var
|
|
14871
|
+
var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
|
|
14502
14872
|
var DOT_COLOR = {
|
|
14503
14873
|
default: "bg-primary border-primary/30",
|
|
14504
14874
|
success: "bg-success border-success/30",
|
|
@@ -14514,32 +14884,32 @@ var CodegoUI = (() => {
|
|
|
14514
14884
|
info: "text-info"
|
|
14515
14885
|
};
|
|
14516
14886
|
var DEFAULT_ICON = {
|
|
14517
|
-
default: /* @__PURE__ */ (0,
|
|
14518
|
-
success: /* @__PURE__ */ (0,
|
|
14519
|
-
error: /* @__PURE__ */ (0,
|
|
14520
|
-
warning: /* @__PURE__ */ (0,
|
|
14521
|
-
info: /* @__PURE__ */ (0,
|
|
14887
|
+
default: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Circle, { className: "h-3 w-3" }),
|
|
14888
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CircleCheckBig, { className: "h-3.5 w-3.5" }),
|
|
14889
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CircleX, { className: "h-3.5 w-3.5" }),
|
|
14890
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TriangleAlert, { className: "h-3.5 w-3.5" }),
|
|
14891
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Info, { className: "h-3.5 w-3.5" })
|
|
14522
14892
|
};
|
|
14523
14893
|
function Timeline({ items, align = "left", className }) {
|
|
14524
|
-
return /* @__PURE__ */ (0,
|
|
14894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: cn("relative", className), children: items.map((item, i) => {
|
|
14525
14895
|
const variant = item.variant ?? "default";
|
|
14526
14896
|
const isLast = i === items.length - 1;
|
|
14527
14897
|
const isRight = align === "alternate" && i % 2 === 1;
|
|
14528
|
-
return /* @__PURE__ */ (0,
|
|
14529
|
-
/* @__PURE__ */ (0,
|
|
14530
|
-
/* @__PURE__ */ (0,
|
|
14898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("relative flex gap-4", align === "alternate" && "justify-center", isRight && "flex-row-reverse"), children: [
|
|
14899
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
14900
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: cn(
|
|
14531
14901
|
"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 z-10",
|
|
14532
14902
|
item.icon ? "bg-background border-border" : DOT_COLOR[variant]
|
|
14533
|
-
), children: /* @__PURE__ */ (0,
|
|
14534
|
-
!isLast && /* @__PURE__ */ (0,
|
|
14903
|
+
), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: cn("shrink-0", item.icon ? ICON_COLOR[variant] : "text-white"), children: item.icon ?? DEFAULT_ICON[variant] }) }),
|
|
14904
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "w-0.5 flex-1 bg-border mt-1 mb-1 min-h-4" })
|
|
14535
14905
|
] }),
|
|
14536
|
-
/* @__PURE__ */ (0,
|
|
14537
|
-
/* @__PURE__ */ (0,
|
|
14538
|
-
/* @__PURE__ */ (0,
|
|
14539
|
-
item.time && /* @__PURE__ */ (0,
|
|
14906
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("flex-1 pb-6 min-w-0", isRight && "text-right"), children: [
|
|
14907
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("flex items-start justify-between gap-2", isRight && "flex-row-reverse"), children: [
|
|
14908
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm font-semibold leading-tight", children: item.title }),
|
|
14909
|
+
item.time && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "shrink-0 text-xs text-muted-foreground whitespace-nowrap", children: item.time })
|
|
14540
14910
|
] }),
|
|
14541
|
-
item.description && /* @__PURE__ */ (0,
|
|
14542
|
-
item.content && /* @__PURE__ */ (0,
|
|
14911
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground leading-snug", children: item.description }),
|
|
14912
|
+
item.content && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mt-2", children: item.content })
|
|
14543
14913
|
] })
|
|
14544
14914
|
] }, item.id ?? i);
|
|
14545
14915
|
}) });
|
|
@@ -14547,7 +14917,7 @@ var CodegoUI = (() => {
|
|
|
14547
14917
|
|
|
14548
14918
|
// src/components/ui/toggle-switch.tsx
|
|
14549
14919
|
var React41 = __toESM(require_react(), 1);
|
|
14550
|
-
var
|
|
14920
|
+
var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
|
|
14551
14921
|
var ToggleSwitch = React41.forwardRef(
|
|
14552
14922
|
({
|
|
14553
14923
|
className,
|
|
@@ -14578,13 +14948,13 @@ var CodegoUI = (() => {
|
|
|
14578
14948
|
if (!isControlled) setInternalChecked(e.target.checked);
|
|
14579
14949
|
onChange?.(e);
|
|
14580
14950
|
};
|
|
14581
|
-
const toggle = /* @__PURE__ */ (0,
|
|
14951
|
+
const toggle = /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
14582
14952
|
"label",
|
|
14583
14953
|
{
|
|
14584
14954
|
htmlFor: toggleId,
|
|
14585
14955
|
className: cn("relative inline-flex items-center cursor-pointer", disabled && "opacity-50 cursor-not-allowed"),
|
|
14586
14956
|
children: [
|
|
14587
|
-
/* @__PURE__ */ (0,
|
|
14957
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14588
14958
|
"input",
|
|
14589
14959
|
{
|
|
14590
14960
|
type: "checkbox",
|
|
@@ -14597,7 +14967,7 @@ var CodegoUI = (() => {
|
|
|
14597
14967
|
...props
|
|
14598
14968
|
}
|
|
14599
14969
|
),
|
|
14600
|
-
/* @__PURE__ */ (0,
|
|
14970
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14601
14971
|
"div",
|
|
14602
14972
|
{
|
|
14603
14973
|
className: cn(
|
|
@@ -14610,7 +14980,7 @@ var CodegoUI = (() => {
|
|
|
14610
14980
|
height: trackH,
|
|
14611
14981
|
...stateColor ? { backgroundColor: stateColor } : {}
|
|
14612
14982
|
},
|
|
14613
|
-
children: /* @__PURE__ */ (0,
|
|
14983
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14614
14984
|
"span",
|
|
14615
14985
|
{
|
|
14616
14986
|
className: `absolute top-[1px] ${isOn ? "bg-slate-50/40" : "bg-primary"} rounded-full border border-slate-300/50 shadow transition-transform duration-200`,
|
|
@@ -14628,9 +14998,9 @@ var CodegoUI = (() => {
|
|
|
14628
14998
|
}
|
|
14629
14999
|
);
|
|
14630
15000
|
if (inline && label) {
|
|
14631
|
-
return /* @__PURE__ */ (0,
|
|
15001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "inline-flex items-center gap-2 select-none", children: [
|
|
14632
15002
|
toggle,
|
|
14633
|
-
/* @__PURE__ */ (0,
|
|
15003
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("label", { htmlFor: toggleId, className: cn("text-sm cursor-pointer", disabled && "opacity-50 cursor-not-allowed"), children: label })
|
|
14634
15004
|
] });
|
|
14635
15005
|
}
|
|
14636
15006
|
return toggle;
|
|
@@ -14640,14 +15010,14 @@ var CodegoUI = (() => {
|
|
|
14640
15010
|
|
|
14641
15011
|
// src/components/ui/tree-view.tsx
|
|
14642
15012
|
var React42 = __toESM(require_react(), 1);
|
|
14643
|
-
var
|
|
15013
|
+
var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
|
|
14644
15014
|
function TreeNodeItem({ node, depth, selected, expanded, onToggleExpand, onSelect, multiple }) {
|
|
14645
15015
|
const hasChildren = !!node.children?.length;
|
|
14646
15016
|
const isExpanded = expanded.includes(node.id);
|
|
14647
15017
|
const isSelected = selected.includes(node.id);
|
|
14648
|
-
const defaultIcon = hasChildren ? isExpanded ? /* @__PURE__ */ (0,
|
|
14649
|
-
return /* @__PURE__ */ (0,
|
|
14650
|
-
/* @__PURE__ */ (0,
|
|
15018
|
+
const defaultIcon = hasChildren ? isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FolderOpen, { className: "h-4 w-4 text-warning" }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Folder, { className: "h-4 w-4 text-warning" }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(File, { className: "h-4 w-4 text-muted-foreground" });
|
|
15019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { children: [
|
|
15020
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
14651
15021
|
"div",
|
|
14652
15022
|
{
|
|
14653
15023
|
className: cn(
|
|
@@ -14661,13 +15031,13 @@ var CodegoUI = (() => {
|
|
|
14661
15031
|
onSelect(node.id);
|
|
14662
15032
|
},
|
|
14663
15033
|
children: [
|
|
14664
|
-
hasChildren ? /* @__PURE__ */ (0,
|
|
14665
|
-
/* @__PURE__ */ (0,
|
|
14666
|
-
/* @__PURE__ */ (0,
|
|
15034
|
+
hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ChevronRight, { className: cn("h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform", isExpanded && "rotate-90") }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "w-3.5 shrink-0" }),
|
|
15035
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "shrink-0", children: node.icon ?? defaultIcon }),
|
|
15036
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "truncate", children: node.label })
|
|
14667
15037
|
]
|
|
14668
15038
|
}
|
|
14669
15039
|
),
|
|
14670
|
-
hasChildren && isExpanded && /* @__PURE__ */ (0,
|
|
15040
|
+
hasChildren && isExpanded && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { children: node.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
14671
15041
|
TreeNodeItem,
|
|
14672
15042
|
{
|
|
14673
15043
|
node: child,
|
|
@@ -14708,7 +15078,7 @@ var CodegoUI = (() => {
|
|
|
14708
15078
|
function toggleExpand(id) {
|
|
14709
15079
|
setExpanded((prev) => prev.includes(id) ? prev.filter((v) => v !== id) : [...prev, id]);
|
|
14710
15080
|
}
|
|
14711
|
-
return /* @__PURE__ */ (0,
|
|
15081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: cn("w-full", className), children: nodes.map((node) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
14712
15082
|
TreeNodeItem,
|
|
14713
15083
|
{
|
|
14714
15084
|
node,
|
|
@@ -14725,7 +15095,7 @@ var CodegoUI = (() => {
|
|
|
14725
15095
|
|
|
14726
15096
|
// src/components/ui/widget.tsx
|
|
14727
15097
|
var React43 = __toESM(require_react(), 1);
|
|
14728
|
-
var
|
|
15098
|
+
var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
|
|
14729
15099
|
var iconColorMap = {
|
|
14730
15100
|
primary: "bg-primary/10 text-primary",
|
|
14731
15101
|
info: "bg-info/10 text-info",
|
|
@@ -14797,7 +15167,7 @@ var CodegoUI = (() => {
|
|
|
14797
15167
|
const counted = useCountUp(isNumeric ? value : 0, animate && isNumeric);
|
|
14798
15168
|
const displayValue = animate && isNumeric ? counted : value;
|
|
14799
15169
|
const s = sizeMap2[size];
|
|
14800
|
-
return /* @__PURE__ */ (0,
|
|
15170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
14801
15171
|
Card,
|
|
14802
15172
|
{
|
|
14803
15173
|
className: cn(
|
|
@@ -14808,27 +15178,27 @@ var CodegoUI = (() => {
|
|
|
14808
15178
|
),
|
|
14809
15179
|
onClick,
|
|
14810
15180
|
...props,
|
|
14811
|
-
children: /* @__PURE__ */ (0,
|
|
14812
|
-
/* @__PURE__ */ (0,
|
|
14813
|
-
/* @__PURE__ */ (0,
|
|
14814
|
-
/* @__PURE__ */ (0,
|
|
14815
|
-
/* @__PURE__ */ (0,
|
|
14816
|
-
badge && /* @__PURE__ */ (0,
|
|
15181
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(CardContent, { className: s.card, children: [
|
|
15182
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
15183
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
15184
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
15185
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-sm font-medium text-muted-foreground truncate", children: title }),
|
|
15186
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "shrink-0", children: badge })
|
|
14817
15187
|
] }),
|
|
14818
|
-
loading ? /* @__PURE__ */ (0,
|
|
14819
|
-
description && /* @__PURE__ */ (0,
|
|
15188
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "h-8 w-24 animate-pulse rounded-md bg-muted" }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: cn("font-bold tabular-nums", s.value), children: displayValue }),
|
|
15189
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-xs text-muted-foreground", children: description })
|
|
14820
15190
|
] }),
|
|
14821
|
-
icon && /* @__PURE__ */ (0,
|
|
15191
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cn(
|
|
14822
15192
|
"relative flex shrink-0 items-center justify-center rounded-full",
|
|
14823
15193
|
s.icon,
|
|
14824
15194
|
iconColorMap[iconColor]
|
|
14825
15195
|
), children: [
|
|
14826
|
-
pulse && /* @__PURE__ */ (0,
|
|
14827
|
-
/* @__PURE__ */ (0,
|
|
15196
|
+
pulse && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "absolute inset-0 rounded-full animate-ping opacity-30 bg-current" }),
|
|
15197
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: s.iconSize, children: icon })
|
|
14828
15198
|
] })
|
|
14829
15199
|
] }),
|
|
14830
|
-
trendValue && !loading && /* @__PURE__ */ (0,
|
|
14831
|
-
/* @__PURE__ */ (0,
|
|
15200
|
+
trendValue && !loading && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "mt-3 flex items-center gap-1.5 text-sm", children: [
|
|
15201
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: cn(
|
|
14832
15202
|
"font-medium",
|
|
14833
15203
|
trend === "up" && "text-success",
|
|
14834
15204
|
trend === "down" && "text-danger",
|
|
@@ -14838,21 +15208,21 @@ var CodegoUI = (() => {
|
|
|
14838
15208
|
trend === "down" && "\u2193 ",
|
|
14839
15209
|
trendValue
|
|
14840
15210
|
] }),
|
|
14841
|
-
previousValue !== void 0 && /* @__PURE__ */ (0,
|
|
15211
|
+
previousValue !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "text-muted-foreground", children: [
|
|
14842
15212
|
"vs ",
|
|
14843
15213
|
previousValue
|
|
14844
15214
|
] }),
|
|
14845
|
-
/* @__PURE__ */ (0,
|
|
15215
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-muted-foreground", children: trendLabel })
|
|
14846
15216
|
] }),
|
|
14847
|
-
progress !== void 0 && /* @__PURE__ */ (0,
|
|
14848
|
-
/* @__PURE__ */ (0,
|
|
14849
|
-
/* @__PURE__ */ (0,
|
|
14850
|
-
/* @__PURE__ */ (0,
|
|
15217
|
+
progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "mt-4 space-y-1", children: [
|
|
15218
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex justify-between text-xs text-muted-foreground", children: [
|
|
15219
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: "Progress" }),
|
|
15220
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { children: [
|
|
14851
15221
|
Math.min(100, Math.max(0, progress)),
|
|
14852
15222
|
"%"
|
|
14853
15223
|
] })
|
|
14854
15224
|
] }),
|
|
14855
|
-
/* @__PURE__ */ (0,
|
|
15225
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "h-1.5 w-full rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
14856
15226
|
"div",
|
|
14857
15227
|
{
|
|
14858
15228
|
className: cn("h-full rounded-full transition-all duration-700", progressColorMap[progressColor]),
|
|
@@ -14860,10 +15230,460 @@ var CodegoUI = (() => {
|
|
|
14860
15230
|
}
|
|
14861
15231
|
) })
|
|
14862
15232
|
] }),
|
|
14863
|
-
footer && /* @__PURE__ */ (0,
|
|
15233
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "mt-4 border-t pt-3 text-sm text-muted-foreground", children: footer })
|
|
15234
|
+
] })
|
|
15235
|
+
}
|
|
15236
|
+
);
|
|
15237
|
+
}
|
|
15238
|
+
|
|
15239
|
+
// src/components/ui/wizard.tsx
|
|
15240
|
+
var React44 = __toESM(require_react(), 1);
|
|
15241
|
+
var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
|
|
15242
|
+
var SIZE_MAP = {
|
|
15243
|
+
sm: "max-w-sm",
|
|
15244
|
+
md: "max-w-lg",
|
|
15245
|
+
lg: "max-w-2xl",
|
|
15246
|
+
xl: "max-w-4xl",
|
|
15247
|
+
full: "max-w-full"
|
|
15248
|
+
};
|
|
15249
|
+
function stepStatus(idx, current) {
|
|
15250
|
+
if (idx < current) return "complete";
|
|
15251
|
+
if (idx === current) return "current";
|
|
15252
|
+
return "upcoming";
|
|
15253
|
+
}
|
|
15254
|
+
function HeaderDefault({
|
|
15255
|
+
steps,
|
|
15256
|
+
current,
|
|
15257
|
+
clickable,
|
|
15258
|
+
onGo
|
|
15259
|
+
}) {
|
|
15260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex items-start w-full", children: steps.map((step, i) => {
|
|
15261
|
+
const status = stepStatus(i, current);
|
|
15262
|
+
const isLast = i === steps.length - 1;
|
|
15263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(React44.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col items-center flex-1 min-w-0", children: [
|
|
15264
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center w-full", children: [
|
|
15265
|
+
i > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn("flex-1 h-0.5 transition-colors", i <= current ? "bg-primary" : "bg-border") }),
|
|
15266
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
15267
|
+
"button",
|
|
15268
|
+
{
|
|
15269
|
+
type: "button",
|
|
15270
|
+
disabled: !clickable || status === "upcoming",
|
|
15271
|
+
onClick: () => clickable && status !== "upcoming" && onGo(i),
|
|
15272
|
+
className: cn(
|
|
15273
|
+
"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 text-xs font-semibold transition-all",
|
|
15274
|
+
status === "complete" && "bg-primary border-primary text-primary-foreground",
|
|
15275
|
+
status === "current" && "bg-background border-primary text-primary ring-4 ring-primary/20",
|
|
15276
|
+
status === "upcoming" && "bg-background border-border text-muted-foreground",
|
|
15277
|
+
clickable && status !== "upcoming" && "cursor-pointer hover:scale-110"
|
|
15278
|
+
),
|
|
15279
|
+
children: status === "complete" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Check, { className: "h-3.5 w-3.5" }) : step.icon ?? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: i + 1 })
|
|
15280
|
+
}
|
|
15281
|
+
),
|
|
15282
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn("flex-1 h-0.5 transition-colors", i < current ? "bg-primary" : "bg-border") })
|
|
15283
|
+
] }),
|
|
15284
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "mt-2 text-center px-1 max-w-[80px]", children: [
|
|
15285
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: cn(
|
|
15286
|
+
"text-xs font-medium leading-tight truncate",
|
|
15287
|
+
status === "current" ? "text-primary" : status === "complete" ? "text-foreground" : "text-muted-foreground"
|
|
15288
|
+
), children: step.title }),
|
|
15289
|
+
step.optional && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-[10px] text-muted-foreground", children: "(optional)" })
|
|
15290
|
+
] })
|
|
15291
|
+
] }) }, i);
|
|
15292
|
+
}) });
|
|
15293
|
+
}
|
|
15294
|
+
function HeaderDots({ steps, current, clickable, onGo }) {
|
|
15295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col items-center gap-3 w-full", children: [
|
|
15296
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex items-center gap-2", children: steps.map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
15297
|
+
"button",
|
|
15298
|
+
{
|
|
15299
|
+
type: "button",
|
|
15300
|
+
disabled: !clickable || i > current,
|
|
15301
|
+
onClick: () => clickable && i <= current && onGo(i),
|
|
15302
|
+
className: cn(
|
|
15303
|
+
"rounded-full transition-all duration-200",
|
|
15304
|
+
i === current ? "w-6 h-2.5 bg-primary" : i < current ? "w-2.5 h-2.5 bg-primary/60 hover:bg-primary cursor-pointer" : "w-2.5 h-2.5 bg-border"
|
|
15305
|
+
)
|
|
15306
|
+
},
|
|
15307
|
+
i
|
|
15308
|
+
)) }),
|
|
15309
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "text-center", children: [
|
|
15310
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-sm font-semibold", children: steps[current]?.title }),
|
|
15311
|
+
steps[current]?.description && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-xs text-muted-foreground mt-0.5", children: steps[current].description })
|
|
15312
|
+
] })
|
|
15313
|
+
] });
|
|
15314
|
+
}
|
|
15315
|
+
function HeaderMinimal({ steps, current }) {
|
|
15316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between w-full", children: [
|
|
15317
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { children: [
|
|
15318
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-base font-semibold", children: steps[current]?.title }),
|
|
15319
|
+
steps[current]?.description && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-xs text-muted-foreground mt-0.5", children: steps[current].description })
|
|
15320
|
+
] }),
|
|
15321
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "text-xs font-medium text-muted-foreground shrink-0 ml-4", children: [
|
|
15322
|
+
"Step ",
|
|
15323
|
+
current + 1,
|
|
15324
|
+
" of ",
|
|
15325
|
+
steps.length
|
|
15326
|
+
] })
|
|
15327
|
+
] });
|
|
15328
|
+
}
|
|
15329
|
+
function HeaderCards({ steps, current, clickable, onGo }) {
|
|
15330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex gap-2 flex-wrap", children: steps.map((step, i) => {
|
|
15331
|
+
const status = stepStatus(i, current);
|
|
15332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
15333
|
+
"button",
|
|
15334
|
+
{
|
|
15335
|
+
type: "button",
|
|
15336
|
+
disabled: !clickable || status === "upcoming",
|
|
15337
|
+
onClick: () => clickable && status !== "upcoming" && onGo(i),
|
|
15338
|
+
className: cn(
|
|
15339
|
+
"flex items-center gap-1.5 rounded-full px-3 py-1.5 text-xs font-medium border transition-all",
|
|
15340
|
+
status === "complete" && "bg-primary/10 border-primary/30 text-primary cursor-pointer",
|
|
15341
|
+
status === "current" && "bg-primary border-primary text-primary-foreground shadow-sm",
|
|
15342
|
+
status === "upcoming" && "bg-muted/40 border-border text-muted-foreground",
|
|
15343
|
+
clickable && status !== "upcoming" && "hover:scale-105"
|
|
15344
|
+
),
|
|
15345
|
+
children: [
|
|
15346
|
+
status === "complete" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Check, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: i + 1 }),
|
|
15347
|
+
step.title,
|
|
15348
|
+
step.optional && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "opacity-60", children: "(opt)" })
|
|
15349
|
+
]
|
|
15350
|
+
},
|
|
15351
|
+
i
|
|
15352
|
+
);
|
|
15353
|
+
}) });
|
|
15354
|
+
}
|
|
15355
|
+
function SidebarNav({ steps, current, clickable, onGo }) {
|
|
15356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("nav", { className: "flex flex-col gap-0.5 w-48 shrink-0 border-r border-border pr-4 py-1", children: steps.map((step, i) => {
|
|
15357
|
+
const status = stepStatus(i, current);
|
|
15358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
15359
|
+
"button",
|
|
15360
|
+
{
|
|
15361
|
+
type: "button",
|
|
15362
|
+
disabled: !clickable || status === "upcoming",
|
|
15363
|
+
onClick: () => clickable && status !== "upcoming" && onGo(i),
|
|
15364
|
+
className: cn(
|
|
15365
|
+
"flex items-center gap-2.5 rounded-lg px-3 py-2.5 text-sm text-left transition-colors w-full",
|
|
15366
|
+
status === "current" && "bg-primary text-primary-foreground",
|
|
15367
|
+
status === "complete" && "text-foreground hover:bg-muted/60 cursor-pointer",
|
|
15368
|
+
status === "upcoming" && "text-muted-foreground"
|
|
15369
|
+
),
|
|
15370
|
+
children: [
|
|
15371
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: cn(
|
|
15372
|
+
"flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-[10px] font-bold border",
|
|
15373
|
+
status === "complete" && "bg-primary/20 border-primary/40 text-primary",
|
|
15374
|
+
status === "current" && "bg-primary-foreground/20 border-primary-foreground/40 text-primary-foreground",
|
|
15375
|
+
status === "upcoming" && "bg-muted border-border text-muted-foreground"
|
|
15376
|
+
), children: status === "complete" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Check, { className: "h-3 w-3" }) : i + 1 }),
|
|
15377
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "min-w-0", children: [
|
|
15378
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "block truncate font-medium", children: step.title }),
|
|
15379
|
+
step.optional && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-[10px] opacity-60", children: "Optional" })
|
|
15380
|
+
] })
|
|
15381
|
+
]
|
|
15382
|
+
},
|
|
15383
|
+
i
|
|
15384
|
+
);
|
|
15385
|
+
}) });
|
|
15386
|
+
}
|
|
15387
|
+
function ProgressBar({ current, total }) {
|
|
15388
|
+
const pct2 = Math.round(current / (total - 1) * 100);
|
|
15389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "w-full h-1 bg-border rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
15390
|
+
"div",
|
|
15391
|
+
{
|
|
15392
|
+
className: "h-full bg-primary transition-all duration-300 rounded-full",
|
|
15393
|
+
style: { width: `${pct2}%` }
|
|
15394
|
+
}
|
|
15395
|
+
) });
|
|
15396
|
+
}
|
|
15397
|
+
function DefaultActions({
|
|
15398
|
+
step,
|
|
15399
|
+
total,
|
|
15400
|
+
onBack,
|
|
15401
|
+
onNext,
|
|
15402
|
+
onClose,
|
|
15403
|
+
isLast,
|
|
15404
|
+
isFirst,
|
|
15405
|
+
backLabel,
|
|
15406
|
+
nextLabel,
|
|
15407
|
+
finishLabel,
|
|
15408
|
+
cancelLabel,
|
|
15409
|
+
showCancel,
|
|
15410
|
+
showBackOnFirst,
|
|
15411
|
+
loading
|
|
15412
|
+
}) {
|
|
15413
|
+
const showBack = !isFirst || showBackOnFirst;
|
|
15414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between gap-2 w-full", children: [
|
|
15415
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex items-center gap-2", children: showCancel && onClose && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
15416
|
+
"button",
|
|
15417
|
+
{
|
|
15418
|
+
type: "button",
|
|
15419
|
+
onClick: onClose,
|
|
15420
|
+
className: "inline-flex items-center justify-center rounded-md border border-border bg-background px-4 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors",
|
|
15421
|
+
children: cancelLabel ?? "Cancel"
|
|
15422
|
+
}
|
|
15423
|
+
) }),
|
|
15424
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
15425
|
+
showBack && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
15426
|
+
"button",
|
|
15427
|
+
{
|
|
15428
|
+
type: "button",
|
|
15429
|
+
onClick: onBack,
|
|
15430
|
+
disabled: isFirst,
|
|
15431
|
+
className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-4 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors disabled:opacity-40 disabled:pointer-events-none",
|
|
15432
|
+
children: [
|
|
15433
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ChevronLeft, { className: "h-4 w-4" }),
|
|
15434
|
+
backLabel ?? "Back"
|
|
15435
|
+
]
|
|
15436
|
+
}
|
|
15437
|
+
),
|
|
15438
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
15439
|
+
"button",
|
|
15440
|
+
{
|
|
15441
|
+
type: "button",
|
|
15442
|
+
onClick: onNext,
|
|
15443
|
+
disabled: loading,
|
|
15444
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary-hover transition-colors disabled:opacity-60 disabled:pointer-events-none",
|
|
15445
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
15446
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("svg", { className: "animate-spin h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", children: [
|
|
15447
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
15448
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8v8z" })
|
|
15449
|
+
] }),
|
|
15450
|
+
"Processing..."
|
|
15451
|
+
] }) : isLast ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
15452
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Check, { className: "h-4 w-4" }),
|
|
15453
|
+
finishLabel ?? "Finish"
|
|
15454
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
15455
|
+
nextLabel ?? "Next",
|
|
15456
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ChevronRight, { className: "h-4 w-4" })
|
|
15457
|
+
] })
|
|
15458
|
+
}
|
|
15459
|
+
)
|
|
15460
|
+
] })
|
|
15461
|
+
] });
|
|
15462
|
+
}
|
|
15463
|
+
function WizardPanel({
|
|
15464
|
+
steps,
|
|
15465
|
+
current,
|
|
15466
|
+
onGo,
|
|
15467
|
+
variant,
|
|
15468
|
+
size,
|
|
15469
|
+
title,
|
|
15470
|
+
description,
|
|
15471
|
+
hideHeader,
|
|
15472
|
+
footer,
|
|
15473
|
+
renderActions,
|
|
15474
|
+
backLabel,
|
|
15475
|
+
nextLabel,
|
|
15476
|
+
finishLabel,
|
|
15477
|
+
cancelLabel,
|
|
15478
|
+
showCancel,
|
|
15479
|
+
showBackOnFirst,
|
|
15480
|
+
loading,
|
|
15481
|
+
clickableSteps,
|
|
15482
|
+
onBack,
|
|
15483
|
+
onNext,
|
|
15484
|
+
onClose,
|
|
15485
|
+
className,
|
|
15486
|
+
contentClassName
|
|
15487
|
+
}) {
|
|
15488
|
+
const isFirst = current === 0;
|
|
15489
|
+
const isLast = current === steps.length - 1;
|
|
15490
|
+
const isSidebar = variant === "sidebar";
|
|
15491
|
+
const [validationError, setValidationError] = React44.useState(null);
|
|
15492
|
+
const handleNext = () => {
|
|
15493
|
+
const validate = steps[current]?.validate;
|
|
15494
|
+
if (validate) {
|
|
15495
|
+
const result = validate();
|
|
15496
|
+
if (result === false) {
|
|
15497
|
+
setValidationError("Please complete this step before continuing.");
|
|
15498
|
+
return;
|
|
15499
|
+
}
|
|
15500
|
+
if (typeof result === "string") {
|
|
15501
|
+
setValidationError(result);
|
|
15502
|
+
return;
|
|
15503
|
+
}
|
|
15504
|
+
}
|
|
15505
|
+
setValidationError(null);
|
|
15506
|
+
onNext();
|
|
15507
|
+
};
|
|
15508
|
+
const actionProps = {
|
|
15509
|
+
step: current,
|
|
15510
|
+
total: steps.length,
|
|
15511
|
+
onBack,
|
|
15512
|
+
onNext: handleNext,
|
|
15513
|
+
onClose,
|
|
15514
|
+
isFirst,
|
|
15515
|
+
isLast,
|
|
15516
|
+
loading
|
|
15517
|
+
};
|
|
15518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: cn(
|
|
15519
|
+
"flex flex-col w-full",
|
|
15520
|
+
size && !isSidebar && SIZE_MAP[size ?? "md"],
|
|
15521
|
+
className
|
|
15522
|
+
), children: [
|
|
15523
|
+
!hideHeader && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: cn(
|
|
15524
|
+
"shrink-0 px-6 pt-5 pb-4",
|
|
15525
|
+
variant !== "sidebar" && "border-b border-border"
|
|
15526
|
+
), children: [
|
|
15527
|
+
(title || description) && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "mb-4", children: [
|
|
15528
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h2", { className: "text-lg font-semibold", children: title }),
|
|
15529
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-sm text-muted-foreground mt-0.5", children: description })
|
|
15530
|
+
] }),
|
|
15531
|
+
variant === "default" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(HeaderDefault, { steps, current, clickable: !!clickableSteps, onGo }),
|
|
15532
|
+
variant === "dots" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(HeaderDots, { steps, current, clickable: !!clickableSteps, onGo }),
|
|
15533
|
+
variant === "minimal" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(HeaderMinimal, { steps, current }),
|
|
15534
|
+
variant === "cards" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(HeaderCards, { steps, current, clickable: !!clickableSteps, onGo }),
|
|
15535
|
+
(variant === "default" || variant === "minimal") && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "mt-3", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ProgressBar, { current, total: steps.length }) })
|
|
15536
|
+
] }),
|
|
15537
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: cn("flex flex-1 min-h-0", isSidebar && "gap-6 px-6 py-5"), children: [
|
|
15538
|
+
isSidebar && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SidebarNav, { steps, current, clickable: !!clickableSteps, onGo }),
|
|
15539
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: cn(
|
|
15540
|
+
"flex-1 min-w-0",
|
|
15541
|
+
!isSidebar && "px-6 py-5",
|
|
15542
|
+
contentClassName
|
|
15543
|
+
), children: [
|
|
15544
|
+
validationError && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center gap-2 rounded-lg border border-danger/30 bg-danger/10 px-3 py-2 text-sm text-danger mb-4", children: [
|
|
15545
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(CircleAlert, { className: "h-4 w-4 shrink-0" }),
|
|
15546
|
+
validationError
|
|
15547
|
+
] }),
|
|
15548
|
+
steps[current]?.content
|
|
14864
15549
|
] })
|
|
15550
|
+
] }),
|
|
15551
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "shrink-0 border-t border-border px-6 py-4", children: footer ?? (renderActions ? renderActions(actionProps) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
15552
|
+
DefaultActions,
|
|
15553
|
+
{
|
|
15554
|
+
...actionProps,
|
|
15555
|
+
backLabel,
|
|
15556
|
+
nextLabel,
|
|
15557
|
+
finishLabel,
|
|
15558
|
+
cancelLabel,
|
|
15559
|
+
showCancel,
|
|
15560
|
+
showBackOnFirst,
|
|
15561
|
+
loading
|
|
15562
|
+
}
|
|
15563
|
+
)) })
|
|
15564
|
+
] });
|
|
15565
|
+
}
|
|
15566
|
+
function Wizard({
|
|
15567
|
+
steps,
|
|
15568
|
+
step: controlledStep,
|
|
15569
|
+
defaultStep = 0,
|
|
15570
|
+
onStepChange,
|
|
15571
|
+
onFinish,
|
|
15572
|
+
onClose,
|
|
15573
|
+
layout = "inline",
|
|
15574
|
+
variant = "default",
|
|
15575
|
+
size = "md",
|
|
15576
|
+
isOpen = false,
|
|
15577
|
+
showClose = true,
|
|
15578
|
+
unchange = false,
|
|
15579
|
+
title,
|
|
15580
|
+
description,
|
|
15581
|
+
hideHeader = false,
|
|
15582
|
+
footer,
|
|
15583
|
+
renderActions,
|
|
15584
|
+
backLabel,
|
|
15585
|
+
nextLabel,
|
|
15586
|
+
finishLabel,
|
|
15587
|
+
cancelLabel,
|
|
15588
|
+
showCancel = false,
|
|
15589
|
+
showBackOnFirst = false,
|
|
15590
|
+
loading = false,
|
|
15591
|
+
clickableSteps = false,
|
|
15592
|
+
className,
|
|
15593
|
+
contentClassName
|
|
15594
|
+
}) {
|
|
15595
|
+
const [internalStep, setInternalStep] = React44.useState(defaultStep);
|
|
15596
|
+
const current = controlledStep ?? internalStep;
|
|
15597
|
+
const go = (idx) => {
|
|
15598
|
+
const clamped = Math.max(0, Math.min(steps.length - 1, idx));
|
|
15599
|
+
if (controlledStep === void 0) setInternalStep(clamped);
|
|
15600
|
+
onStepChange?.(clamped);
|
|
15601
|
+
};
|
|
15602
|
+
const handleBack = () => go(current - 1);
|
|
15603
|
+
const handleNext = () => {
|
|
15604
|
+
if (current === steps.length - 1) {
|
|
15605
|
+
onFinish?.();
|
|
15606
|
+
return;
|
|
15607
|
+
}
|
|
15608
|
+
go(current + 1);
|
|
15609
|
+
};
|
|
15610
|
+
React44.useEffect(() => {
|
|
15611
|
+
if (layout !== "modal" || !isOpen || unchange) return;
|
|
15612
|
+
const handler = (e) => {
|
|
15613
|
+
if (e.key === "Escape") onClose?.();
|
|
15614
|
+
};
|
|
15615
|
+
window.addEventListener("keydown", handler);
|
|
15616
|
+
return () => window.removeEventListener("keydown", handler);
|
|
15617
|
+
}, [layout, isOpen, unchange, onClose]);
|
|
15618
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
15619
|
+
WizardPanel,
|
|
15620
|
+
{
|
|
15621
|
+
steps,
|
|
15622
|
+
current,
|
|
15623
|
+
onGo: go,
|
|
15624
|
+
onBack: handleBack,
|
|
15625
|
+
onNext: handleNext,
|
|
15626
|
+
onClose,
|
|
15627
|
+
variant,
|
|
15628
|
+
size,
|
|
15629
|
+
title,
|
|
15630
|
+
description,
|
|
15631
|
+
hideHeader,
|
|
15632
|
+
footer,
|
|
15633
|
+
renderActions,
|
|
15634
|
+
backLabel,
|
|
15635
|
+
nextLabel,
|
|
15636
|
+
finishLabel,
|
|
15637
|
+
cancelLabel,
|
|
15638
|
+
showCancel,
|
|
15639
|
+
showBackOnFirst,
|
|
15640
|
+
loading,
|
|
15641
|
+
clickableSteps,
|
|
15642
|
+
contentClassName
|
|
14865
15643
|
}
|
|
14866
15644
|
);
|
|
15645
|
+
if (layout === "modal") {
|
|
15646
|
+
if (!isOpen) return null;
|
|
15647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
15648
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
15649
|
+
"div",
|
|
15650
|
+
{
|
|
15651
|
+
className: "absolute inset-0 bg-background/80 backdrop-blur-sm",
|
|
15652
|
+
onClick: () => !unchange && onClose?.()
|
|
15653
|
+
}
|
|
15654
|
+
),
|
|
15655
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: cn(
|
|
15656
|
+
"relative z-10 w-full rounded-2xl border border-border bg-background/90 backdrop-blur-xl shadow-2xl overflow-hidden",
|
|
15657
|
+
SIZE_MAP[size],
|
|
15658
|
+
className
|
|
15659
|
+
), children: [
|
|
15660
|
+
showClose && onClose && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
15661
|
+
"button",
|
|
15662
|
+
{
|
|
15663
|
+
type: "button",
|
|
15664
|
+
onClick: onClose,
|
|
15665
|
+
className: "absolute right-4 top-4 z-10 rounded-sm opacity-60 hover:opacity-100 transition-opacity",
|
|
15666
|
+
children: [
|
|
15667
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(X, { className: "h-4 w-4" }),
|
|
15668
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "sr-only", children: "Close" })
|
|
15669
|
+
]
|
|
15670
|
+
}
|
|
15671
|
+
),
|
|
15672
|
+
panel
|
|
15673
|
+
] })
|
|
15674
|
+
] });
|
|
15675
|
+
}
|
|
15676
|
+
if (layout === "page") {
|
|
15677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn("w-full min-h-screen flex items-start justify-center p-6 bg-background", className), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn(
|
|
15678
|
+
"w-full rounded-2xl border border-border bg-card shadow-lg overflow-hidden",
|
|
15679
|
+
SIZE_MAP[size]
|
|
15680
|
+
), children: panel }) });
|
|
15681
|
+
}
|
|
15682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn(
|
|
15683
|
+
"w-full rounded-xl border border-border bg-card shadow-sm overflow-hidden",
|
|
15684
|
+
SIZE_MAP[size],
|
|
15685
|
+
className
|
|
15686
|
+
), children: panel });
|
|
14867
15687
|
}
|
|
14868
15688
|
return __toCommonJS(index_exports);
|
|
14869
15689
|
})();
|
|
@@ -14953,6 +15773,7 @@ lucide-react/dist/esm/icons/chevron-up.js:
|
|
|
14953
15773
|
lucide-react/dist/esm/icons/chevrons-left.js:
|
|
14954
15774
|
lucide-react/dist/esm/icons/chevrons-right.js:
|
|
14955
15775
|
lucide-react/dist/esm/icons/chevrons-up-down.js:
|
|
15776
|
+
lucide-react/dist/esm/icons/circle-alert.js:
|
|
14956
15777
|
lucide-react/dist/esm/icons/circle-check-big.js:
|
|
14957
15778
|
lucide-react/dist/esm/icons/circle-x.js:
|
|
14958
15779
|
lucide-react/dist/esm/icons/circle.js:
|