@juv/codego-react-ui 1.0.5 → 1.0.7
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 +453 -310
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.global.js +520 -364
- package/dist/index.js +389 -246
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -410,8 +410,8 @@ var CodegoUI = (() => {
|
|
|
410
410
|
exports.use = function(usable) {
|
|
411
411
|
return ReactSharedInternals.H.use(usable);
|
|
412
412
|
};
|
|
413
|
-
exports.useActionState = function(action,
|
|
414
|
-
return ReactSharedInternals.H.useActionState(action,
|
|
413
|
+
exports.useActionState = function(action, initialState2, permalink) {
|
|
414
|
+
return ReactSharedInternals.H.useActionState(action, initialState2, permalink);
|
|
415
415
|
};
|
|
416
416
|
exports.useCallback = function(callback, deps) {
|
|
417
417
|
return ReactSharedInternals.H.useCallback(callback, deps);
|
|
@@ -454,8 +454,8 @@ var CodegoUI = (() => {
|
|
|
454
454
|
exports.useRef = function(initialValue) {
|
|
455
455
|
return ReactSharedInternals.H.useRef(initialValue);
|
|
456
456
|
};
|
|
457
|
-
exports.useState = function(
|
|
458
|
-
return ReactSharedInternals.H.useState(
|
|
457
|
+
exports.useState = function(initialState2) {
|
|
458
|
+
return ReactSharedInternals.H.useState(initialState2);
|
|
459
459
|
};
|
|
460
460
|
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
461
461
|
return ReactSharedInternals.H.useSyncExternalStore(
|
|
@@ -1362,10 +1362,10 @@ var CodegoUI = (() => {
|
|
|
1362
1362
|
exports.use = function(usable) {
|
|
1363
1363
|
return resolveDispatcher().use(usable);
|
|
1364
1364
|
};
|
|
1365
|
-
exports.useActionState = function(action,
|
|
1365
|
+
exports.useActionState = function(action, initialState2, permalink) {
|
|
1366
1366
|
return resolveDispatcher().useActionState(
|
|
1367
1367
|
action,
|
|
1368
|
-
|
|
1368
|
+
initialState2,
|
|
1369
1369
|
permalink
|
|
1370
1370
|
);
|
|
1371
1371
|
};
|
|
@@ -1424,8 +1424,8 @@ var CodegoUI = (() => {
|
|
|
1424
1424
|
exports.useRef = function(initialValue) {
|
|
1425
1425
|
return resolveDispatcher().useRef(initialValue);
|
|
1426
1426
|
};
|
|
1427
|
-
exports.useState = function(
|
|
1428
|
-
return resolveDispatcher().useState(
|
|
1427
|
+
exports.useState = function(initialState2) {
|
|
1428
|
+
return resolveDispatcher().useState(initialState2);
|
|
1429
1429
|
};
|
|
1430
1430
|
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
1431
1431
|
return resolveDispatcher().useSyncExternalStore(
|
|
@@ -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 React44 = 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 = React44.__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
|
+
React44 = {
|
|
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 = React44.react_stack_bottom_frame.bind(
|
|
1713
|
+
React44,
|
|
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 React44 = 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 = React44.__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)
|
|
@@ -1893,8 +1893,8 @@ var CodegoUI = (() => {
|
|
|
1893
1893
|
exports.unstable_batchedUpdates = function(fn, a) {
|
|
1894
1894
|
return fn(a);
|
|
1895
1895
|
};
|
|
1896
|
-
exports.useFormState = function(action,
|
|
1897
|
-
return ReactSharedInternals.H.useFormState(action,
|
|
1896
|
+
exports.useFormState = function(action, initialState2, permalink) {
|
|
1897
|
+
return ReactSharedInternals.H.useFormState(action, initialState2, permalink);
|
|
1898
1898
|
};
|
|
1899
1899
|
exports.useFormStatus = function() {
|
|
1900
1900
|
return ReactSharedInternals.H.useHostTransitionStatus();
|
|
@@ -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 React44 = 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 = React44.__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
|
);
|
|
@@ -2135,8 +2135,8 @@ var CodegoUI = (() => {
|
|
|
2135
2135
|
exports.unstable_batchedUpdates = function(fn, a) {
|
|
2136
2136
|
return fn(a);
|
|
2137
2137
|
};
|
|
2138
|
-
exports.useFormState = function(action,
|
|
2139
|
-
return resolveDispatcher().useFormState(action,
|
|
2138
|
+
exports.useFormState = function(action, initialState2, permalink) {
|
|
2139
|
+
return resolveDispatcher().useFormState(action, initialState2, permalink);
|
|
2140
2140
|
};
|
|
2141
2141
|
exports.useFormStatus = function() {
|
|
2142
2142
|
return resolveDispatcher().useHostTransitionStatus();
|
|
@@ -2661,31 +2661,43 @@ var CodegoUI = (() => {
|
|
|
2661
2661
|
var __iconNode39 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
|
|
2662
2662
|
var Minus = createLucideIcon("minus", __iconNode39);
|
|
2663
2663
|
|
|
2664
|
-
// node_modules/lucide-react/dist/esm/icons/
|
|
2664
|
+
// node_modules/lucide-react/dist/esm/icons/moon.js
|
|
2665
2665
|
var __iconNode40 = [
|
|
2666
|
+
[
|
|
2667
|
+
"path",
|
|
2668
|
+
{
|
|
2669
|
+
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
|
|
2670
|
+
key: "kfwtm"
|
|
2671
|
+
}
|
|
2672
|
+
]
|
|
2673
|
+
];
|
|
2674
|
+
var Moon = createLucideIcon("moon", __iconNode40);
|
|
2675
|
+
|
|
2676
|
+
// node_modules/lucide-react/dist/esm/icons/panel-left-close.js
|
|
2677
|
+
var __iconNode41 = [
|
|
2666
2678
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
2667
2679
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
2668
2680
|
["path", { d: "m16 15-3-3 3-3", key: "14y99z" }]
|
|
2669
2681
|
];
|
|
2670
|
-
var PanelLeftClose = createLucideIcon("panel-left-close",
|
|
2682
|
+
var PanelLeftClose = createLucideIcon("panel-left-close", __iconNode41);
|
|
2671
2683
|
|
|
2672
2684
|
// node_modules/lucide-react/dist/esm/icons/panel-left-open.js
|
|
2673
|
-
var
|
|
2685
|
+
var __iconNode42 = [
|
|
2674
2686
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
2675
2687
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
2676
2688
|
["path", { d: "m14 9 3 3-3 3", key: "8010ee" }]
|
|
2677
2689
|
];
|
|
2678
|
-
var PanelLeftOpen = createLucideIcon("panel-left-open",
|
|
2690
|
+
var PanelLeftOpen = createLucideIcon("panel-left-open", __iconNode42);
|
|
2679
2691
|
|
|
2680
2692
|
// node_modules/lucide-react/dist/esm/icons/plus.js
|
|
2681
|
-
var
|
|
2693
|
+
var __iconNode43 = [
|
|
2682
2694
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
2683
2695
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
2684
2696
|
];
|
|
2685
|
-
var Plus = createLucideIcon("plus",
|
|
2697
|
+
var Plus = createLucideIcon("plus", __iconNode43);
|
|
2686
2698
|
|
|
2687
2699
|
// node_modules/lucide-react/dist/esm/icons/quote.js
|
|
2688
|
-
var
|
|
2700
|
+
var __iconNode44 = [
|
|
2689
2701
|
[
|
|
2690
2702
|
"path",
|
|
2691
2703
|
{
|
|
@@ -2701,47 +2713,47 @@ var CodegoUI = (() => {
|
|
|
2701
2713
|
}
|
|
2702
2714
|
]
|
|
2703
2715
|
];
|
|
2704
|
-
var Quote = createLucideIcon("quote",
|
|
2716
|
+
var Quote = createLucideIcon("quote", __iconNode44);
|
|
2705
2717
|
|
|
2706
2718
|
// node_modules/lucide-react/dist/esm/icons/redo.js
|
|
2707
|
-
var
|
|
2719
|
+
var __iconNode45 = [
|
|
2708
2720
|
["path", { d: "M21 7v6h-6", key: "3ptur4" }],
|
|
2709
2721
|
["path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7", key: "1kgawr" }]
|
|
2710
2722
|
];
|
|
2711
|
-
var Redo = createLucideIcon("redo",
|
|
2723
|
+
var Redo = createLucideIcon("redo", __iconNode45);
|
|
2712
2724
|
|
|
2713
2725
|
// node_modules/lucide-react/dist/esm/icons/rotate-ccw.js
|
|
2714
|
-
var
|
|
2726
|
+
var __iconNode46 = [
|
|
2715
2727
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
2716
2728
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
2717
2729
|
];
|
|
2718
|
-
var RotateCcw = createLucideIcon("rotate-ccw",
|
|
2730
|
+
var RotateCcw = createLucideIcon("rotate-ccw", __iconNode46);
|
|
2719
2731
|
|
|
2720
2732
|
// node_modules/lucide-react/dist/esm/icons/rotate-cw.js
|
|
2721
|
-
var
|
|
2733
|
+
var __iconNode47 = [
|
|
2722
2734
|
["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
|
|
2723
2735
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }]
|
|
2724
2736
|
];
|
|
2725
|
-
var RotateCw = createLucideIcon("rotate-cw",
|
|
2737
|
+
var RotateCw = createLucideIcon("rotate-cw", __iconNode47);
|
|
2726
2738
|
|
|
2727
2739
|
// node_modules/lucide-react/dist/esm/icons/search.js
|
|
2728
|
-
var
|
|
2740
|
+
var __iconNode48 = [
|
|
2729
2741
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
2730
2742
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
2731
2743
|
];
|
|
2732
|
-
var Search = createLucideIcon("search",
|
|
2744
|
+
var Search = createLucideIcon("search", __iconNode48);
|
|
2733
2745
|
|
|
2734
2746
|
// node_modules/lucide-react/dist/esm/icons/settings-2.js
|
|
2735
|
-
var
|
|
2747
|
+
var __iconNode49 = [
|
|
2736
2748
|
["path", { d: "M14 17H5", key: "gfn3mx" }],
|
|
2737
2749
|
["path", { d: "M19 7h-9", key: "6i9tg" }],
|
|
2738
2750
|
["circle", { cx: "17", cy: "17", r: "3", key: "18b49y" }],
|
|
2739
2751
|
["circle", { cx: "7", cy: "7", r: "3", key: "dfmy0x" }]
|
|
2740
2752
|
];
|
|
2741
|
-
var Settings2 = createLucideIcon("settings-2",
|
|
2753
|
+
var Settings2 = createLucideIcon("settings-2", __iconNode49);
|
|
2742
2754
|
|
|
2743
2755
|
// node_modules/lucide-react/dist/esm/icons/sun.js
|
|
2744
|
-
var
|
|
2756
|
+
var __iconNode50 = [
|
|
2745
2757
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
2746
2758
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
2747
2759
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -2752,34 +2764,34 @@ var CodegoUI = (() => {
|
|
|
2752
2764
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
2753
2765
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
2754
2766
|
];
|
|
2755
|
-
var Sun = createLucideIcon("sun",
|
|
2767
|
+
var Sun = createLucideIcon("sun", __iconNode50);
|
|
2756
2768
|
|
|
2757
2769
|
// node_modules/lucide-react/dist/esm/icons/trash-2.js
|
|
2758
|
-
var
|
|
2770
|
+
var __iconNode51 = [
|
|
2759
2771
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
2760
2772
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
2761
2773
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
2762
2774
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
2763
2775
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
2764
2776
|
];
|
|
2765
|
-
var Trash2 = createLucideIcon("trash-2",
|
|
2777
|
+
var Trash2 = createLucideIcon("trash-2", __iconNode51);
|
|
2766
2778
|
|
|
2767
2779
|
// node_modules/lucide-react/dist/esm/icons/trending-down.js
|
|
2768
|
-
var
|
|
2780
|
+
var __iconNode52 = [
|
|
2769
2781
|
["path", { d: "M16 17h6v-6", key: "t6n2it" }],
|
|
2770
2782
|
["path", { d: "m22 17-8.5-8.5-5 5L2 7", key: "x473p" }]
|
|
2771
2783
|
];
|
|
2772
|
-
var TrendingDown = createLucideIcon("trending-down",
|
|
2784
|
+
var TrendingDown = createLucideIcon("trending-down", __iconNode52);
|
|
2773
2785
|
|
|
2774
2786
|
// node_modules/lucide-react/dist/esm/icons/trending-up.js
|
|
2775
|
-
var
|
|
2787
|
+
var __iconNode53 = [
|
|
2776
2788
|
["path", { d: "M16 7h6v6", key: "box55l" }],
|
|
2777
2789
|
["path", { d: "m22 7-8.5 8.5-5-5L2 17", key: "1t1m79" }]
|
|
2778
2790
|
];
|
|
2779
|
-
var TrendingUp = createLucideIcon("trending-up",
|
|
2791
|
+
var TrendingUp = createLucideIcon("trending-up", __iconNode53);
|
|
2780
2792
|
|
|
2781
2793
|
// node_modules/lucide-react/dist/esm/icons/triangle-alert.js
|
|
2782
|
-
var
|
|
2794
|
+
var __iconNode54 = [
|
|
2783
2795
|
[
|
|
2784
2796
|
"path",
|
|
2785
2797
|
{
|
|
@@ -2790,28 +2802,28 @@ var CodegoUI = (() => {
|
|
|
2790
2802
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
2791
2803
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
2792
2804
|
];
|
|
2793
|
-
var TriangleAlert = createLucideIcon("triangle-alert",
|
|
2805
|
+
var TriangleAlert = createLucideIcon("triangle-alert", __iconNode54);
|
|
2794
2806
|
|
|
2795
2807
|
// node_modules/lucide-react/dist/esm/icons/underline.js
|
|
2796
|
-
var
|
|
2808
|
+
var __iconNode55 = [
|
|
2797
2809
|
["path", { d: "M6 4v6a6 6 0 0 0 12 0V4", key: "9kb039" }],
|
|
2798
2810
|
["line", { x1: "4", x2: "20", y1: "20", y2: "20", key: "nun2al" }]
|
|
2799
2811
|
];
|
|
2800
|
-
var Underline = createLucideIcon("underline",
|
|
2812
|
+
var Underline = createLucideIcon("underline", __iconNode55);
|
|
2801
2813
|
|
|
2802
2814
|
// node_modules/lucide-react/dist/esm/icons/undo.js
|
|
2803
|
-
var
|
|
2815
|
+
var __iconNode56 = [
|
|
2804
2816
|
["path", { d: "M3 7v6h6", key: "1v2h90" }],
|
|
2805
2817
|
["path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13", key: "1r6uu6" }]
|
|
2806
2818
|
];
|
|
2807
|
-
var Undo = createLucideIcon("undo",
|
|
2819
|
+
var Undo = createLucideIcon("undo", __iconNode56);
|
|
2808
2820
|
|
|
2809
2821
|
// node_modules/lucide-react/dist/esm/icons/x.js
|
|
2810
|
-
var
|
|
2822
|
+
var __iconNode57 = [
|
|
2811
2823
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
2812
2824
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
2813
2825
|
];
|
|
2814
|
-
var X = createLucideIcon("x",
|
|
2826
|
+
var X = createLucideIcon("x", __iconNode57);
|
|
2815
2827
|
|
|
2816
2828
|
// node_modules/clsx/dist/clsx.mjs
|
|
2817
2829
|
function r(e) {
|
|
@@ -6358,7 +6370,9 @@ var CodegoUI = (() => {
|
|
|
6358
6370
|
debounceTime,
|
|
6359
6371
|
throttleTime,
|
|
6360
6372
|
confirmBeforeClick,
|
|
6361
|
-
|
|
6373
|
+
confirmBeforeClickModalTitle,
|
|
6374
|
+
confirmBeforeClickModalContent,
|
|
6375
|
+
confirmBeforeClickFooterAction,
|
|
6362
6376
|
href,
|
|
6363
6377
|
target,
|
|
6364
6378
|
as = "button",
|
|
@@ -6429,12 +6443,27 @@ var CodegoUI = (() => {
|
|
|
6429
6443
|
background: gradientFrom && gradientTo ? `linear-gradient(${gradientDirection === "to-r" ? "to right" : gradientDirection === "to-l" ? "to left" : gradientDirection === "to-t" ? "to top" : gradientDirection === "to-b" ? "to bottom" : gradientDirection === "to-tr" ? "to top right" : gradientDirection === "to-tl" ? "to top left" : gradientDirection === "to-br" ? "to bottom right" : "to bottom left"}, ${gradientFrom}, ${gradientTo})` : void 0,
|
|
6430
6444
|
...style
|
|
6431
6445
|
};
|
|
6446
|
+
const [confirmOpen, setConfirmOpen] = React3.useState(false);
|
|
6447
|
+
const pendingEvent = React3.useRef(null);
|
|
6432
6448
|
const handleClick = (e) => {
|
|
6433
6449
|
if (preventDefault) e.preventDefault();
|
|
6434
6450
|
if (stopPropagation) e.stopPropagation();
|
|
6435
|
-
if (confirmBeforeClick
|
|
6451
|
+
if (confirmBeforeClick) {
|
|
6452
|
+
pendingEvent.current = e;
|
|
6453
|
+
setConfirmOpen(true);
|
|
6454
|
+
return;
|
|
6455
|
+
}
|
|
6436
6456
|
onClick?.(e);
|
|
6437
6457
|
};
|
|
6458
|
+
function handleConfirmProceed() {
|
|
6459
|
+
setConfirmOpen(false);
|
|
6460
|
+
onClick?.(pendingEvent.current ?? void 0);
|
|
6461
|
+
pendingEvent.current = null;
|
|
6462
|
+
}
|
|
6463
|
+
function handleConfirmCancel() {
|
|
6464
|
+
setConfirmOpen(false);
|
|
6465
|
+
pendingEvent.current = null;
|
|
6466
|
+
}
|
|
6438
6467
|
const buttonContent = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
6439
6468
|
loading && loadingPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "animate-spin mr-2", children: "\u27F3" }),
|
|
6440
6469
|
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mr-2", children: leftIcon }),
|
|
@@ -6459,22 +6488,72 @@ var CodegoUI = (() => {
|
|
|
6459
6488
|
tabIndex,
|
|
6460
6489
|
"data-testid": testID
|
|
6461
6490
|
};
|
|
6491
|
+
const confirmModal = confirmBeforeClick && confirmOpen ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
6492
|
+
"div",
|
|
6493
|
+
{
|
|
6494
|
+
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
6495
|
+
onClick: handleConfirmCancel,
|
|
6496
|
+
children: [
|
|
6497
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "absolute inset-0 bg-black/50 backdrop-blur-sm" }),
|
|
6498
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
6499
|
+
"div",
|
|
6500
|
+
{
|
|
6501
|
+
className: "relative z-10 w-full max-w-sm rounded-2xl border border-border bg-card p-6 shadow-2xl",
|
|
6502
|
+
onClick: (e) => e.stopPropagation(),
|
|
6503
|
+
children: [
|
|
6504
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-base font-semibold text-foreground mb-2", children: confirmBeforeClickModalTitle ?? "Are you sure?" }),
|
|
6505
|
+
confirmBeforeClickModalContent && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "text-sm text-muted-foreground mb-5", children: confirmBeforeClickModalContent }),
|
|
6506
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex justify-end gap-2 mt-4", children: confirmBeforeClickFooterAction ?? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
6507
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
6508
|
+
"button",
|
|
6509
|
+
{
|
|
6510
|
+
type: "button",
|
|
6511
|
+
onClick: handleConfirmCancel,
|
|
6512
|
+
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",
|
|
6513
|
+
children: "Cancel"
|
|
6514
|
+
}
|
|
6515
|
+
),
|
|
6516
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
6517
|
+
"button",
|
|
6518
|
+
{
|
|
6519
|
+
type: "button",
|
|
6520
|
+
onClick: handleConfirmProceed,
|
|
6521
|
+
className: "inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary-hover transition-colors",
|
|
6522
|
+
children: "Proceed"
|
|
6523
|
+
}
|
|
6524
|
+
)
|
|
6525
|
+
] }) })
|
|
6526
|
+
]
|
|
6527
|
+
}
|
|
6528
|
+
)
|
|
6529
|
+
]
|
|
6530
|
+
}
|
|
6531
|
+
) : null;
|
|
6462
6532
|
if (Element === "a") {
|
|
6463
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.
|
|
6533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
6534
|
+
confirmModal,
|
|
6535
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("a", { ...sharedProps, href, target, children: buttonContent })
|
|
6536
|
+
] });
|
|
6464
6537
|
}
|
|
6465
6538
|
if (Element === "div") {
|
|
6466
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.
|
|
6539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
6540
|
+
confirmModal,
|
|
6541
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ...sharedProps, children: buttonContent })
|
|
6542
|
+
] });
|
|
6467
6543
|
}
|
|
6468
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
6545
|
+
confirmModal,
|
|
6546
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
6547
|
+
"button",
|
|
6548
|
+
{
|
|
6549
|
+
...sharedProps,
|
|
6550
|
+
type,
|
|
6551
|
+
disabled,
|
|
6552
|
+
...props,
|
|
6553
|
+
children: buttonContent
|
|
6554
|
+
}
|
|
6555
|
+
)
|
|
6556
|
+
] });
|
|
6478
6557
|
}
|
|
6479
6558
|
);
|
|
6480
6559
|
Button.displayName = "Button";
|
|
@@ -7464,12 +7543,12 @@ var CodegoUI = (() => {
|
|
|
7464
7543
|
const total = data.reduce((s, d) => s + d.value, 0) || 1;
|
|
7465
7544
|
const cx = 80, cy = height / 2, r2 = Math.min(cx, cy) - 10, inner = r2 * 0.58;
|
|
7466
7545
|
let angle = -Math.PI / 2;
|
|
7467
|
-
const
|
|
7546
|
+
const defaultColors2 = ["primary", "info", "success", "warning", "danger"];
|
|
7468
7547
|
const slices = data.map((d, i) => {
|
|
7469
7548
|
const sweep = d.value / total * 2 * Math.PI;
|
|
7470
7549
|
const start = angle;
|
|
7471
7550
|
angle += sweep;
|
|
7472
|
-
const c = d.color ??
|
|
7551
|
+
const c = d.color ?? defaultColors2[i % defaultColors2.length];
|
|
7473
7552
|
return { ...d, start, sweep, color: c };
|
|
7474
7553
|
});
|
|
7475
7554
|
const arc = (cx2, cy2, r3, start, end) => {
|
|
@@ -13059,7 +13138,7 @@ var CodegoUI = (() => {
|
|
|
13059
13138
|
}
|
|
13060
13139
|
|
|
13061
13140
|
// src/components/ui/panel.tsx
|
|
13062
|
-
var
|
|
13141
|
+
var React32 = __toESM(require_react(), 1);
|
|
13063
13142
|
|
|
13064
13143
|
// src/components/ui/tooltip.tsx
|
|
13065
13144
|
var React30 = __toESM(require_react(), 1);
|
|
@@ -13139,9 +13218,59 @@ var CodegoUI = (() => {
|
|
|
13139
13218
|
);
|
|
13140
13219
|
}
|
|
13141
13220
|
|
|
13142
|
-
// src/components/
|
|
13221
|
+
// src/components/theme-provider.tsx
|
|
13222
|
+
var import_react3 = __toESM(require_react(), 1);
|
|
13143
13223
|
var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
|
|
13144
|
-
var
|
|
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
|
+
}
|
|
13145
13274
|
function Panel({
|
|
13146
13275
|
sidebar,
|
|
13147
13276
|
sidebarHeader,
|
|
@@ -13151,60 +13280,86 @@ var CodegoUI = (() => {
|
|
|
13151
13280
|
topbarTrailing,
|
|
13152
13281
|
defaultCollapsed = false,
|
|
13153
13282
|
collapsible = false,
|
|
13283
|
+
showThemeToggle = false,
|
|
13284
|
+
defaultPage,
|
|
13154
13285
|
height = "h-[520px]",
|
|
13155
13286
|
children,
|
|
13156
13287
|
className
|
|
13157
13288
|
}) {
|
|
13158
|
-
const [collapsed, setCollapsed] =
|
|
13159
|
-
return /* @__PURE__ */ (0,
|
|
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)(
|
|
13160
13291
|
"div",
|
|
13161
13292
|
{
|
|
13162
13293
|
className: cn(
|
|
13163
|
-
"flex overflow-hidden rounded-xl border border-border
|
|
13294
|
+
"relative flex overflow-hidden rounded-xl border border-border bg-background shadow-lg",
|
|
13164
13295
|
height,
|
|
13165
13296
|
className
|
|
13166
13297
|
),
|
|
13167
13298
|
children: [
|
|
13168
|
-
|
|
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)(
|
|
13169
13304
|
"aside",
|
|
13170
13305
|
{
|
|
13171
13306
|
className: cn(
|
|
13172
|
-
"flex flex-col shrink-0 border-r border-border transition-all duration-200",
|
|
13307
|
+
"relative z-10 flex flex-col shrink-0 border-r border-border transition-all duration-200",
|
|
13173
13308
|
collapsed ? "w-14" : sidebarWidth
|
|
13174
13309
|
),
|
|
13175
13310
|
children: [
|
|
13176
|
-
sidebarHeader &&
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
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
|
+
)
|
|
13180
13332
|
]
|
|
13181
13333
|
}
|
|
13182
13334
|
),
|
|
13183
|
-
/* @__PURE__ */ (0,
|
|
13184
|
-
/* @__PURE__ */ (0,
|
|
13185
|
-
/* @__PURE__ */ (0,
|
|
13186
|
-
collapsible && sidebar && /* @__PURE__ */ (0,
|
|
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)(
|
|
13187
13339
|
Tooltip,
|
|
13188
13340
|
{
|
|
13189
13341
|
content: collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
13190
13342
|
side: "bottom",
|
|
13191
|
-
children: /* @__PURE__ */ (0,
|
|
13343
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
13192
13344
|
"button",
|
|
13193
13345
|
{
|
|
13194
13346
|
type: "button",
|
|
13195
13347
|
onClick: () => setCollapsed((c) => !c),
|
|
13196
13348
|
className: "text-muted-foreground hover:text-foreground transition-colors",
|
|
13197
13349
|
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
13198
|
-
children: collapsed ? /* @__PURE__ */ (0,
|
|
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" })
|
|
13199
13351
|
}
|
|
13200
13352
|
)
|
|
13201
13353
|
}
|
|
13202
13354
|
),
|
|
13203
|
-
topbar && /* @__PURE__ */ (0,
|
|
13355
|
+
topbar && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex items-center gap-2", children: topbar })
|
|
13204
13356
|
] }),
|
|
13205
|
-
|
|
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
|
+
] })
|
|
13206
13361
|
] }),
|
|
13207
|
-
/* @__PURE__ */ (0,
|
|
13362
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("main", { className: "flex-1 overflow-y-auto p-4", children })
|
|
13208
13363
|
] })
|
|
13209
13364
|
]
|
|
13210
13365
|
}
|
|
@@ -13216,8 +13371,8 @@ var CodegoUI = (() => {
|
|
|
13216
13371
|
active,
|
|
13217
13372
|
onClick
|
|
13218
13373
|
}) {
|
|
13219
|
-
const collapsed =
|
|
13220
|
-
return /* @__PURE__ */ (0,
|
|
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)(
|
|
13221
13376
|
"button",
|
|
13222
13377
|
{
|
|
13223
13378
|
type: "button",
|
|
@@ -13228,8 +13383,8 @@ var CodegoUI = (() => {
|
|
|
13228
13383
|
active ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-primary/20 hover:text-primary cursor-pointer"
|
|
13229
13384
|
),
|
|
13230
13385
|
children: [
|
|
13231
|
-
Icon2 && /* @__PURE__ */ (0,
|
|
13232
|
-
!collapsed && /* @__PURE__ */ (0,
|
|
13386
|
+
Icon2 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon2, { className: "h-4 w-4 shrink-0" }),
|
|
13387
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "truncate", children: label })
|
|
13233
13388
|
]
|
|
13234
13389
|
}
|
|
13235
13390
|
) });
|
|
@@ -13238,17 +13393,17 @@ var CodegoUI = (() => {
|
|
|
13238
13393
|
title,
|
|
13239
13394
|
children
|
|
13240
13395
|
}) {
|
|
13241
|
-
const collapsed =
|
|
13242
|
-
return /* @__PURE__ */ (0,
|
|
13243
|
-
title && !collapsed && /* @__PURE__ */ (0,
|
|
13244
|
-
title && collapsed && /* @__PURE__ */ (0,
|
|
13245
|
-
/* @__PURE__ */ (0,
|
|
13396
|
+
const collapsed = React32.useContext(PanelCollapsedContext);
|
|
13397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "px-2 py-1", children: [
|
|
13398
|
+
title && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "mb-1 px-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: title }),
|
|
13399
|
+
title && collapsed && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "mx-1 mb-1 h-px bg-border" }),
|
|
13400
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("main", { className: "space-y-0.5", children })
|
|
13246
13401
|
] });
|
|
13247
13402
|
}
|
|
13248
13403
|
|
|
13249
13404
|
// src/components/ui/resizable-panels.tsx
|
|
13250
|
-
var
|
|
13251
|
-
var
|
|
13405
|
+
var React33 = __toESM(require_react(), 1);
|
|
13406
|
+
var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
|
|
13252
13407
|
function ResizablePanels({
|
|
13253
13408
|
children,
|
|
13254
13409
|
orientation = "horizontal",
|
|
@@ -13258,15 +13413,15 @@ var CodegoUI = (() => {
|
|
|
13258
13413
|
handleClassName,
|
|
13259
13414
|
className
|
|
13260
13415
|
}) {
|
|
13261
|
-
const [size, setSize] =
|
|
13262
|
-
const [dragging, setDragging] =
|
|
13263
|
-
const containerRef =
|
|
13416
|
+
const [size, setSize] = React33.useState(defaultSize);
|
|
13417
|
+
const [dragging, setDragging] = React33.useState(false);
|
|
13418
|
+
const containerRef = React33.useRef(null);
|
|
13264
13419
|
const isHorizontal = orientation === "horizontal";
|
|
13265
13420
|
function onMouseDown(e) {
|
|
13266
13421
|
e.preventDefault();
|
|
13267
13422
|
setDragging(true);
|
|
13268
13423
|
}
|
|
13269
|
-
|
|
13424
|
+
React33.useEffect(() => {
|
|
13270
13425
|
if (!dragging) return;
|
|
13271
13426
|
function onMove(e) {
|
|
13272
13427
|
const container = containerRef.current;
|
|
@@ -13285,7 +13440,7 @@ var CodegoUI = (() => {
|
|
|
13285
13440
|
document.removeEventListener("mouseup", onUp);
|
|
13286
13441
|
};
|
|
13287
13442
|
}, [dragging, isHorizontal, minSize, maxSize]);
|
|
13288
|
-
return /* @__PURE__ */ (0,
|
|
13443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
13289
13444
|
"div",
|
|
13290
13445
|
{
|
|
13291
13446
|
ref: containerRef,
|
|
@@ -13296,7 +13451,7 @@ var CodegoUI = (() => {
|
|
|
13296
13451
|
className
|
|
13297
13452
|
),
|
|
13298
13453
|
children: [
|
|
13299
|
-
/* @__PURE__ */ (0,
|
|
13454
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
13300
13455
|
"div",
|
|
13301
13456
|
{
|
|
13302
13457
|
className: "overflow-auto",
|
|
@@ -13304,7 +13459,7 @@ var CodegoUI = (() => {
|
|
|
13304
13459
|
children: children[0]
|
|
13305
13460
|
}
|
|
13306
13461
|
),
|
|
13307
|
-
/* @__PURE__ */ (0,
|
|
13462
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
13308
13463
|
"div",
|
|
13309
13464
|
{
|
|
13310
13465
|
onMouseDown,
|
|
@@ -13314,13 +13469,13 @@ var CodegoUI = (() => {
|
|
|
13314
13469
|
dragging && (isHorizontal ? "w-1.5 bg-primary/60" : "h-1.5 bg-primary/60"),
|
|
13315
13470
|
handleClassName
|
|
13316
13471
|
),
|
|
13317
|
-
children: /* @__PURE__ */ (0,
|
|
13472
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn(
|
|
13318
13473
|
"rounded-full bg-muted-foreground/40",
|
|
13319
13474
|
isHorizontal ? "h-8 w-0.5" : "w-8 h-0.5"
|
|
13320
13475
|
) })
|
|
13321
13476
|
}
|
|
13322
13477
|
),
|
|
13323
|
-
/* @__PURE__ */ (0,
|
|
13478
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
13324
13479
|
"div",
|
|
13325
13480
|
{
|
|
13326
13481
|
className: "flex-1 overflow-auto",
|
|
@@ -13334,25 +13489,25 @@ var CodegoUI = (() => {
|
|
|
13334
13489
|
}
|
|
13335
13490
|
|
|
13336
13491
|
// src/components/ui/rich-text-editor.tsx
|
|
13337
|
-
var
|
|
13338
|
-
var
|
|
13492
|
+
var React34 = __toESM(require_react(), 1);
|
|
13493
|
+
var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
|
|
13339
13494
|
var TOOLBAR = [
|
|
13340
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13341
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13495
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Undo, { className: "h-3.5 w-3.5" }), command: "undo", title: "Undo" },
|
|
13496
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Redo, { className: "h-3.5 w-3.5" }), command: "redo", title: "Redo" },
|
|
13342
13497
|
"divider",
|
|
13343
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13344
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13498
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Heading2, { className: "h-3.5 w-3.5" }), command: "formatBlock", value: "h2", title: "Heading 2" },
|
|
13499
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Heading3, { className: "h-3.5 w-3.5" }), command: "formatBlock", value: "h3", title: "Heading 3" },
|
|
13345
13500
|
"divider",
|
|
13346
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13347
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13348
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13349
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13501
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Bold, { className: "h-3.5 w-3.5" }), command: "bold", title: "Bold" },
|
|
13502
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Italic, { className: "h-3.5 w-3.5" }), command: "italic", title: "Italic" },
|
|
13503
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Underline, { className: "h-3.5 w-3.5" }), command: "underline", title: "Underline" },
|
|
13504
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Code, { className: "h-3.5 w-3.5" }), command: "formatBlock", value: "pre", title: "Code block" },
|
|
13350
13505
|
"divider",
|
|
13351
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13352
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13353
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13506
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(List, { className: "h-3.5 w-3.5" }), command: "insertUnorderedList", title: "Bullet list" },
|
|
13507
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ListOrdered, { className: "h-3.5 w-3.5" }), command: "insertOrderedList", title: "Numbered list" },
|
|
13508
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Quote, { className: "h-3.5 w-3.5" }), command: "formatBlock", value: "blockquote", title: "Quote" },
|
|
13354
13509
|
"divider",
|
|
13355
|
-
{ icon: /* @__PURE__ */ (0,
|
|
13510
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Link, { className: "h-3.5 w-3.5" }), command: "createLink", title: "Insert link" }
|
|
13356
13511
|
];
|
|
13357
13512
|
function RichTextEditor({
|
|
13358
13513
|
value: controlled,
|
|
@@ -13363,17 +13518,17 @@ var CodegoUI = (() => {
|
|
|
13363
13518
|
disabled = false,
|
|
13364
13519
|
className
|
|
13365
13520
|
}) {
|
|
13366
|
-
const editorRef =
|
|
13367
|
-
const [focused, setFocused] =
|
|
13368
|
-
const [isEmpty, setIsEmpty] =
|
|
13369
|
-
|
|
13521
|
+
const editorRef = React34.useRef(null);
|
|
13522
|
+
const [focused, setFocused] = React34.useState(false);
|
|
13523
|
+
const [isEmpty, setIsEmpty] = React34.useState(!defaultValue);
|
|
13524
|
+
React34.useEffect(() => {
|
|
13370
13525
|
if (editorRef.current && controlled !== void 0) {
|
|
13371
13526
|
if (editorRef.current.innerHTML !== controlled) {
|
|
13372
13527
|
editorRef.current.innerHTML = controlled;
|
|
13373
13528
|
}
|
|
13374
13529
|
}
|
|
13375
13530
|
}, [controlled]);
|
|
13376
|
-
|
|
13531
|
+
React34.useEffect(() => {
|
|
13377
13532
|
if (editorRef.current && defaultValue) {
|
|
13378
13533
|
editorRef.current.innerHTML = defaultValue;
|
|
13379
13534
|
setIsEmpty(false);
|
|
@@ -13401,14 +13556,14 @@ var CodegoUI = (() => {
|
|
|
13401
13556
|
return false;
|
|
13402
13557
|
}
|
|
13403
13558
|
}
|
|
13404
|
-
return /* @__PURE__ */ (0,
|
|
13559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: cn(
|
|
13405
13560
|
"rounded-xl border border-border overflow-hidden transition-colors",
|
|
13406
13561
|
focused && "ring-2 ring-ring border-primary",
|
|
13407
13562
|
disabled && "opacity-50 pointer-events-none",
|
|
13408
13563
|
className
|
|
13409
13564
|
), children: [
|
|
13410
|
-
/* @__PURE__ */ (0,
|
|
13411
|
-
(item, i) => item === "divider" ? /* @__PURE__ */ (0,
|
|
13565
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.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(
|
|
13566
|
+
(item, i) => item === "divider" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "mx-1 h-4 w-px bg-border" }, i) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
13412
13567
|
"button",
|
|
13413
13568
|
{
|
|
13414
13569
|
type: "button",
|
|
@@ -13426,9 +13581,9 @@ var CodegoUI = (() => {
|
|
|
13426
13581
|
i
|
|
13427
13582
|
)
|
|
13428
13583
|
) }),
|
|
13429
|
-
/* @__PURE__ */ (0,
|
|
13430
|
-
isEmpty && !focused && /* @__PURE__ */ (0,
|
|
13431
|
-
/* @__PURE__ */ (0,
|
|
13584
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "relative", children: [
|
|
13585
|
+
isEmpty && !focused && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "absolute top-3 left-4 text-sm text-muted-foreground pointer-events-none select-none", children: placeholder }),
|
|
13586
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
13432
13587
|
"div",
|
|
13433
13588
|
{
|
|
13434
13589
|
ref: editorRef,
|
|
@@ -13455,7 +13610,7 @@ var CodegoUI = (() => {
|
|
|
13455
13610
|
}
|
|
13456
13611
|
|
|
13457
13612
|
// src/components/ui/scroll-area.tsx
|
|
13458
|
-
var
|
|
13613
|
+
var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
|
|
13459
13614
|
function ScrollArea({
|
|
13460
13615
|
maxHeight,
|
|
13461
13616
|
maxWidth,
|
|
@@ -13470,7 +13625,7 @@ var CodegoUI = (() => {
|
|
|
13470
13625
|
horizontal: "overflow-x-auto overflow-y-hidden",
|
|
13471
13626
|
both: "overflow-auto"
|
|
13472
13627
|
}[orientation];
|
|
13473
|
-
return /* @__PURE__ */ (0,
|
|
13628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
13474
13629
|
"div",
|
|
13475
13630
|
{
|
|
13476
13631
|
className: cn(
|
|
@@ -13490,8 +13645,8 @@ var CodegoUI = (() => {
|
|
|
13490
13645
|
}
|
|
13491
13646
|
|
|
13492
13647
|
// src/components/ui/section.tsx
|
|
13493
|
-
var
|
|
13494
|
-
var
|
|
13648
|
+
var React35 = __toESM(require_react(), 1);
|
|
13649
|
+
var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
|
|
13495
13650
|
var variantWrap = {
|
|
13496
13651
|
default: "",
|
|
13497
13652
|
card: "rounded-xl glass shadow-lg overflow-hidden",
|
|
@@ -13523,9 +13678,9 @@ var CodegoUI = (() => {
|
|
|
13523
13678
|
className,
|
|
13524
13679
|
contentClassName
|
|
13525
13680
|
}) {
|
|
13526
|
-
const [open, setOpen] =
|
|
13527
|
-
return /* @__PURE__ */ (0,
|
|
13528
|
-
(title || description || action) && /* @__PURE__ */ (0,
|
|
13681
|
+
const [open, setOpen] = React35.useState(defaultOpen);
|
|
13682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn(variantWrap[variant], className), children: [
|
|
13683
|
+
(title || description || action) && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
13529
13684
|
"div",
|
|
13530
13685
|
{
|
|
13531
13686
|
className: cn(
|
|
@@ -13536,16 +13691,16 @@ var CodegoUI = (() => {
|
|
|
13536
13691
|
),
|
|
13537
13692
|
onClick: collapsible ? () => setOpen((o) => !o) : void 0,
|
|
13538
13693
|
children: [
|
|
13539
|
-
/* @__PURE__ */ (0,
|
|
13540
|
-
icon && /* @__PURE__ */ (0,
|
|
13541
|
-
/* @__PURE__ */ (0,
|
|
13542
|
-
title && /* @__PURE__ */ (0,
|
|
13543
|
-
description && /* @__PURE__ */ (0,
|
|
13694
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-start gap-3 min-w-0", children: [
|
|
13695
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "mt-0.5 shrink-0 text-primary", children: icon }),
|
|
13696
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "min-w-0", children: [
|
|
13697
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h3", { className: "text-base font-semibold leading-tight", children: title }),
|
|
13698
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description })
|
|
13544
13699
|
] })
|
|
13545
13700
|
] }),
|
|
13546
|
-
/* @__PURE__ */ (0,
|
|
13547
|
-
action && /* @__PURE__ */ (0,
|
|
13548
|
-
collapsible && /* @__PURE__ */ (0,
|
|
13701
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
13702
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { onClick: (e) => e.stopPropagation(), children: action }),
|
|
13703
|
+
collapsible && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13549
13704
|
ChevronDown,
|
|
13550
13705
|
{
|
|
13551
13706
|
className: cn(
|
|
@@ -13558,17 +13713,17 @@ var CodegoUI = (() => {
|
|
|
13558
13713
|
]
|
|
13559
13714
|
}
|
|
13560
13715
|
),
|
|
13561
|
-
(!collapsible || open) && /* @__PURE__ */ (0,
|
|
13716
|
+
(!collapsible || open) && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: cn(variantBody[variant], contentClassName), children })
|
|
13562
13717
|
] });
|
|
13563
13718
|
}
|
|
13564
13719
|
|
|
13565
13720
|
// src/components/ui/skeleton.tsx
|
|
13566
|
-
var
|
|
13721
|
+
var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
|
|
13567
13722
|
function Skeleton({
|
|
13568
13723
|
className,
|
|
13569
13724
|
...props
|
|
13570
13725
|
}) {
|
|
13571
|
-
return /* @__PURE__ */ (0,
|
|
13726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
13572
13727
|
"div",
|
|
13573
13728
|
{
|
|
13574
13729
|
className: cn("animate-pulse rounded-md bg-white/5 backdrop-blur-sm", className),
|
|
@@ -13578,8 +13733,8 @@ var CodegoUI = (() => {
|
|
|
13578
13733
|
}
|
|
13579
13734
|
|
|
13580
13735
|
// src/components/ui/slider.tsx
|
|
13581
|
-
var
|
|
13582
|
-
var
|
|
13736
|
+
var React36 = __toESM(require_react(), 1);
|
|
13737
|
+
var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
|
|
13583
13738
|
function pct(val, min, max) {
|
|
13584
13739
|
return (val - min) / (max - min) * 100;
|
|
13585
13740
|
}
|
|
@@ -13598,8 +13753,8 @@ var CodegoUI = (() => {
|
|
|
13598
13753
|
showValue = false,
|
|
13599
13754
|
className
|
|
13600
13755
|
}) {
|
|
13601
|
-
const [internal, setInternal] =
|
|
13602
|
-
const [hovering, setHovering] =
|
|
13756
|
+
const [internal, setInternal] = React36.useState(defaultValue);
|
|
13757
|
+
const [hovering, setHovering] = React36.useState(false);
|
|
13603
13758
|
const val = controlled ?? internal;
|
|
13604
13759
|
function handleChange(e) {
|
|
13605
13760
|
const v = Number(e.target.value);
|
|
@@ -13607,20 +13762,20 @@ var CodegoUI = (() => {
|
|
|
13607
13762
|
onChange?.(v);
|
|
13608
13763
|
}
|
|
13609
13764
|
const p = pct(val, min, max);
|
|
13610
|
-
return /* @__PURE__ */ (0,
|
|
13611
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
13612
|
-
label && /* @__PURE__ */ (0,
|
|
13613
|
-
showValue && /* @__PURE__ */ (0,
|
|
13765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("w-full space-y-2", className), children: [
|
|
13766
|
+
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center justify-between text-sm", children: [
|
|
13767
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "font-medium", children: label }),
|
|
13768
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-muted-foreground tabular-nums", children: val })
|
|
13614
13769
|
] }),
|
|
13615
|
-
/* @__PURE__ */ (0,
|
|
13770
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
13616
13771
|
"div",
|
|
13617
13772
|
{
|
|
13618
13773
|
className: "relative flex items-center h-5",
|
|
13619
13774
|
onMouseEnter: () => setHovering(true),
|
|
13620
13775
|
onMouseLeave: () => setHovering(false),
|
|
13621
13776
|
children: [
|
|
13622
|
-
/* @__PURE__ */ (0,
|
|
13623
|
-
showTooltip && hovering && !disabled && /* @__PURE__ */ (0,
|
|
13777
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "absolute w-full h-1.5 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "h-full rounded-full bg-primary", style: { width: `${p}%` } }) }),
|
|
13778
|
+
showTooltip && hovering && !disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
13624
13779
|
"div",
|
|
13625
13780
|
{
|
|
13626
13781
|
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",
|
|
@@ -13628,7 +13783,7 @@ var CodegoUI = (() => {
|
|
|
13628
13783
|
children: val
|
|
13629
13784
|
}
|
|
13630
13785
|
),
|
|
13631
|
-
/* @__PURE__ */ (0,
|
|
13786
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
13632
13787
|
"input",
|
|
13633
13788
|
{
|
|
13634
13789
|
type: "range",
|
|
@@ -13644,7 +13799,7 @@ var CodegoUI = (() => {
|
|
|
13644
13799
|
)
|
|
13645
13800
|
}
|
|
13646
13801
|
),
|
|
13647
|
-
/* @__PURE__ */ (0,
|
|
13802
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
13648
13803
|
"div",
|
|
13649
13804
|
{
|
|
13650
13805
|
className: cn(
|
|
@@ -13657,9 +13812,9 @@ var CodegoUI = (() => {
|
|
|
13657
13812
|
]
|
|
13658
13813
|
}
|
|
13659
13814
|
),
|
|
13660
|
-
(showMarks || marks) && /* @__PURE__ */ (0,
|
|
13661
|
-
/* @__PURE__ */ (0,
|
|
13662
|
-
m.label && /* @__PURE__ */ (0,
|
|
13815
|
+
(showMarks || marks) && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "relative w-full flex justify-between px-0", children: (marks ?? [{ value: min }, { value: max }]).map((m) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-col items-center gap-0.5", style: { position: "absolute", left: `${pct(m.value, min, max)}%`, transform: "translateX(-50%)" }, children: [
|
|
13816
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "h-1 w-0.5 bg-border" }),
|
|
13817
|
+
m.label && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-[10px] text-muted-foreground", children: m.label })
|
|
13663
13818
|
] }, m.value)) })
|
|
13664
13819
|
] });
|
|
13665
13820
|
}
|
|
@@ -13676,8 +13831,8 @@ var CodegoUI = (() => {
|
|
|
13676
13831
|
showValue = false,
|
|
13677
13832
|
className
|
|
13678
13833
|
}) {
|
|
13679
|
-
const [internal, setInternal] =
|
|
13680
|
-
const [active, setActive] =
|
|
13834
|
+
const [internal, setInternal] = React36.useState(defaultValue);
|
|
13835
|
+
const [active, setActive] = React36.useState(null);
|
|
13681
13836
|
const val = controlled ?? internal;
|
|
13682
13837
|
function handleChange(idx, e) {
|
|
13683
13838
|
const v = Number(e.target.value);
|
|
@@ -13687,21 +13842,21 @@ var CodegoUI = (() => {
|
|
|
13687
13842
|
}
|
|
13688
13843
|
const p0 = pct(val[0], min, max);
|
|
13689
13844
|
const p1 = pct(val[1], min, max);
|
|
13690
|
-
return /* @__PURE__ */ (0,
|
|
13691
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
13692
|
-
label && /* @__PURE__ */ (0,
|
|
13693
|
-
showValue && /* @__PURE__ */ (0,
|
|
13845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("w-full space-y-2", className), children: [
|
|
13846
|
+
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center justify-between text-sm", children: [
|
|
13847
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "font-medium", children: label }),
|
|
13848
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "text-muted-foreground tabular-nums", children: [
|
|
13694
13849
|
val[0],
|
|
13695
13850
|
" \u2013 ",
|
|
13696
13851
|
val[1]
|
|
13697
13852
|
] })
|
|
13698
13853
|
] }),
|
|
13699
|
-
/* @__PURE__ */ (0,
|
|
13700
|
-
/* @__PURE__ */ (0,
|
|
13854
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative flex items-center h-5", children: [
|
|
13855
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "absolute w-full h-1.5 rounded-full bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "absolute h-full rounded-full bg-primary", style: { left: `${p0}%`, width: `${p1 - p0}%` } }) }),
|
|
13701
13856
|
[0, 1].map((idx) => {
|
|
13702
13857
|
const p = idx === 0 ? p0 : p1;
|
|
13703
|
-
return /* @__PURE__ */ (0,
|
|
13704
|
-
showTooltip && active === idx && !disabled && /* @__PURE__ */ (0,
|
|
13858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(React36.Fragment, { children: [
|
|
13859
|
+
showTooltip && active === idx && !disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
13705
13860
|
"div",
|
|
13706
13861
|
{
|
|
13707
13862
|
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",
|
|
@@ -13709,7 +13864,7 @@ var CodegoUI = (() => {
|
|
|
13709
13864
|
children: val[idx]
|
|
13710
13865
|
}
|
|
13711
13866
|
),
|
|
13712
|
-
/* @__PURE__ */ (0,
|
|
13867
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
13713
13868
|
"input",
|
|
13714
13869
|
{
|
|
13715
13870
|
type: "range",
|
|
@@ -13725,7 +13880,7 @@ var CodegoUI = (() => {
|
|
|
13725
13880
|
style: { zIndex: idx === 1 ? 2 : 1 }
|
|
13726
13881
|
}
|
|
13727
13882
|
),
|
|
13728
|
-
/* @__PURE__ */ (0,
|
|
13883
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
13729
13884
|
"div",
|
|
13730
13885
|
{
|
|
13731
13886
|
className: "absolute h-4 w-4 rounded-full border-2 border-primary bg-background shadow-md pointer-events-none",
|
|
@@ -13739,7 +13894,7 @@ var CodegoUI = (() => {
|
|
|
13739
13894
|
}
|
|
13740
13895
|
|
|
13741
13896
|
// src/components/ui/stat-card.tsx
|
|
13742
|
-
var
|
|
13897
|
+
var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
|
|
13743
13898
|
function Sparkline2({ data, trend }) {
|
|
13744
13899
|
if (data.length < 2) return null;
|
|
13745
13900
|
const min = Math.min(...data);
|
|
@@ -13753,7 +13908,7 @@ var CodegoUI = (() => {
|
|
|
13753
13908
|
return `${x},${y}`;
|
|
13754
13909
|
}).join(" ");
|
|
13755
13910
|
const color = trend === "up" ? "stroke-success" : trend === "down" ? "stroke-danger" : "stroke-primary";
|
|
13756
|
-
return /* @__PURE__ */ (0,
|
|
13911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("svg", { width: w, height: h, className: "overflow-visible", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
13757
13912
|
"polyline",
|
|
13758
13913
|
{
|
|
13759
13914
|
points: pts,
|
|
@@ -13781,37 +13936,37 @@ var CodegoUI = (() => {
|
|
|
13781
13936
|
const TrendIcon = autoTrend === "up" ? TrendingUp : autoTrend === "down" ? TrendingDown : Minus;
|
|
13782
13937
|
const trendColor = autoTrend === "up" ? "text-success" : autoTrend === "down" ? "text-danger" : "text-muted-foreground";
|
|
13783
13938
|
if (loading) {
|
|
13784
|
-
return /* @__PURE__ */ (0,
|
|
13785
|
-
/* @__PURE__ */ (0,
|
|
13786
|
-
/* @__PURE__ */ (0,
|
|
13787
|
-
/* @__PURE__ */ (0,
|
|
13939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("rounded-xl glass p-5 space-y-3 animate-pulse", className), children: [
|
|
13940
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "h-3 w-24 rounded bg-muted" }),
|
|
13941
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "h-7 w-32 rounded bg-muted" }),
|
|
13942
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "h-3 w-16 rounded bg-muted" })
|
|
13788
13943
|
] });
|
|
13789
13944
|
}
|
|
13790
|
-
return /* @__PURE__ */ (0,
|
|
13791
|
-
/* @__PURE__ */ (0,
|
|
13792
|
-
/* @__PURE__ */ (0,
|
|
13793
|
-
icon && /* @__PURE__ */ (0,
|
|
13945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("rounded-xl glass p-5 space-y-3", className), children: [
|
|
13946
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
|
|
13947
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-sm text-muted-foreground font-medium", children: title }),
|
|
13948
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10 text-primary shrink-0", children: icon })
|
|
13794
13949
|
] }),
|
|
13795
|
-
/* @__PURE__ */ (0,
|
|
13796
|
-
/* @__PURE__ */ (0,
|
|
13797
|
-
sparkline && /* @__PURE__ */ (0,
|
|
13950
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-end justify-between gap-2", children: [
|
|
13951
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-3xl font-bold tracking-tight", children: value }),
|
|
13952
|
+
sparkline && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Sparkline2, { data: sparkline, trend: autoTrend })
|
|
13798
13953
|
] }),
|
|
13799
|
-
/* @__PURE__ */ (0,
|
|
13800
|
-
change !== void 0 && /* @__PURE__ */ (0,
|
|
13801
|
-
/* @__PURE__ */ (0,
|
|
13954
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
13955
|
+
change !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: cn("flex items-center gap-0.5 text-xs font-semibold", trendColor), children: [
|
|
13956
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TrendIcon, { className: "h-3.5 w-3.5" }),
|
|
13802
13957
|
change > 0 ? "+" : "",
|
|
13803
13958
|
change,
|
|
13804
13959
|
"%"
|
|
13805
13960
|
] }),
|
|
13806
|
-
changeLabel && /* @__PURE__ */ (0,
|
|
13807
|
-
description && !changeLabel && /* @__PURE__ */ (0,
|
|
13961
|
+
changeLabel && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs text-muted-foreground", children: changeLabel }),
|
|
13962
|
+
description && !changeLabel && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs text-muted-foreground", children: description })
|
|
13808
13963
|
] })
|
|
13809
13964
|
] });
|
|
13810
13965
|
}
|
|
13811
13966
|
|
|
13812
13967
|
// src/components/ui/stepper.tsx
|
|
13813
|
-
var
|
|
13814
|
-
var
|
|
13968
|
+
var React37 = __toESM(require_react(), 1);
|
|
13969
|
+
var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
|
|
13815
13970
|
function getStatus(idx, current) {
|
|
13816
13971
|
if (idx < current) return "complete";
|
|
13817
13972
|
if (idx === current) return "current";
|
|
@@ -13832,7 +13987,7 @@ var CodegoUI = (() => {
|
|
|
13832
13987
|
clickable = false,
|
|
13833
13988
|
className
|
|
13834
13989
|
}) {
|
|
13835
|
-
const [internal, setInternal] =
|
|
13990
|
+
const [internal, setInternal] = React37.useState(defaultCurrent);
|
|
13836
13991
|
const current = controlled ?? internal;
|
|
13837
13992
|
function go(idx) {
|
|
13838
13993
|
if (!clickable) return;
|
|
@@ -13840,20 +13995,20 @@ var CodegoUI = (() => {
|
|
|
13840
13995
|
onChange?.(idx);
|
|
13841
13996
|
}
|
|
13842
13997
|
const isHorizontal = orientation === "horizontal";
|
|
13843
|
-
return /* @__PURE__ */ (0,
|
|
13844
|
-
/* @__PURE__ */ (0,
|
|
13998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn("w-full", className), children: [
|
|
13999
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: cn(
|
|
13845
14000
|
"flex",
|
|
13846
14001
|
isHorizontal ? "flex-row items-start" : "flex-col gap-0"
|
|
13847
14002
|
), children: steps.map((step, i) => {
|
|
13848
14003
|
const status = getStatus(i, current);
|
|
13849
14004
|
const isLast = i === steps.length - 1;
|
|
13850
|
-
return /* @__PURE__ */ (0,
|
|
14005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(React37.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn(
|
|
13851
14006
|
"flex",
|
|
13852
14007
|
isHorizontal ? "flex-col items-center flex-1" : "flex-row gap-4"
|
|
13853
14008
|
), children: [
|
|
13854
|
-
/* @__PURE__ */ (0,
|
|
13855
|
-
isHorizontal && i > 0 && /* @__PURE__ */ (0,
|
|
13856
|
-
/* @__PURE__ */ (0,
|
|
14009
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn("flex items-center", isHorizontal ? "w-full" : "flex-col"), children: [
|
|
14010
|
+
isHorizontal && i > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: cn("flex-1 h-0.5 transition-colors", i <= current ? "bg-primary" : "bg-border") }),
|
|
14011
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13857
14012
|
"button",
|
|
13858
14013
|
{
|
|
13859
14014
|
type: "button",
|
|
@@ -13865,34 +14020,34 @@ var CodegoUI = (() => {
|
|
|
13865
14020
|
clickable && "cursor-pointer hover:scale-110",
|
|
13866
14021
|
!clickable && "cursor-default"
|
|
13867
14022
|
),
|
|
13868
|
-
children: status === "complete" ? /* @__PURE__ */ (0,
|
|
14023
|
+
children: status === "complete" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Check, { className: "h-4 w-4" }) : status === "error" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(X, { className: "h-4 w-4" }) : step.icon ?? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: i + 1 })
|
|
13869
14024
|
}
|
|
13870
14025
|
),
|
|
13871
|
-
isHorizontal && !isLast && /* @__PURE__ */ (0,
|
|
13872
|
-
!isHorizontal && !isLast && /* @__PURE__ */ (0,
|
|
14026
|
+
isHorizontal && !isLast && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: cn("flex-1 h-0.5 transition-colors", i < current ? "bg-primary" : "bg-border") }),
|
|
14027
|
+
!isHorizontal && !isLast && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: cn("w-0.5 flex-1 min-h-8 transition-colors mt-1", i < current ? "bg-primary" : "bg-border") })
|
|
13873
14028
|
] }),
|
|
13874
|
-
/* @__PURE__ */ (0,
|
|
14029
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn(
|
|
13875
14030
|
isHorizontal ? "mt-2 text-center px-1" : "pb-6 min-w-0"
|
|
13876
14031
|
), children: [
|
|
13877
|
-
/* @__PURE__ */ (0,
|
|
14032
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("p", { className: cn(
|
|
13878
14033
|
"text-sm font-medium leading-tight",
|
|
13879
14034
|
status === "current" ? "text-primary" : status === "complete" ? "text-foreground" : "text-muted-foreground"
|
|
13880
14035
|
), children: [
|
|
13881
14036
|
step.label,
|
|
13882
|
-
step.optional && /* @__PURE__ */ (0,
|
|
14037
|
+
step.optional && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "ml-1 text-xs text-muted-foreground", children: "(optional)" })
|
|
13883
14038
|
] }),
|
|
13884
|
-
step.description && /* @__PURE__ */ (0,
|
|
13885
|
-
!isHorizontal && step.content && i === current && /* @__PURE__ */ (0,
|
|
14039
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-xs text-muted-foreground mt-0.5", children: step.description }),
|
|
14040
|
+
!isHorizontal && step.content && i === current && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "mt-3", children: step.content })
|
|
13886
14041
|
] })
|
|
13887
14042
|
] }) }, i);
|
|
13888
14043
|
}) }),
|
|
13889
|
-
isHorizontal && steps[current]?.content && /* @__PURE__ */ (0,
|
|
14044
|
+
isHorizontal && steps[current]?.content && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "mt-6", children: steps[current].content })
|
|
13890
14045
|
] });
|
|
13891
14046
|
}
|
|
13892
14047
|
|
|
13893
14048
|
// src/components/ui/table.tsx
|
|
13894
|
-
var
|
|
13895
|
-
var
|
|
14049
|
+
var React38 = __toESM(require_react(), 1);
|
|
14050
|
+
var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
|
|
13896
14051
|
var BADGE_COLORS = {
|
|
13897
14052
|
active: "bg-success/10 text-success border-success/20",
|
|
13898
14053
|
inactive: "bg-muted text-muted-foreground border-border",
|
|
@@ -13915,11 +14070,11 @@ var CodegoUI = (() => {
|
|
|
13915
14070
|
idKey = "id",
|
|
13916
14071
|
className
|
|
13917
14072
|
}) {
|
|
13918
|
-
const [search, setSearch] =
|
|
13919
|
-
const [currentPage, setCurrentPage] =
|
|
13920
|
-
const [selectedIds, setSelectedIds] =
|
|
13921
|
-
const [sortKey, setSortKey] =
|
|
13922
|
-
const [sortDir, setSortDir] =
|
|
14073
|
+
const [search, setSearch] = React38.useState("");
|
|
14074
|
+
const [currentPage, setCurrentPage] = React38.useState(1);
|
|
14075
|
+
const [selectedIds, setSelectedIds] = React38.useState([]);
|
|
14076
|
+
const [sortKey, setSortKey] = React38.useState(null);
|
|
14077
|
+
const [sortDir, setSortDir] = React38.useState(null);
|
|
13923
14078
|
const handleSort = (key) => {
|
|
13924
14079
|
if (sortKey !== key) {
|
|
13925
14080
|
setSortKey(key);
|
|
@@ -13933,7 +14088,7 @@ var CodegoUI = (() => {
|
|
|
13933
14088
|
setSortKey(null);
|
|
13934
14089
|
setSortDir(null);
|
|
13935
14090
|
};
|
|
13936
|
-
const filteredData =
|
|
14091
|
+
const filteredData = React38.useMemo(() => {
|
|
13937
14092
|
let d = search ? data.filter(
|
|
13938
14093
|
(item) => Object.values(item).some(
|
|
13939
14094
|
(val) => val && typeof val === "string" && val.toLowerCase().includes(search.toLowerCase())
|
|
@@ -13951,18 +14106,18 @@ var CodegoUI = (() => {
|
|
|
13951
14106
|
}, [data, search, sortKey, sortDir]);
|
|
13952
14107
|
const totalPages = Math.max(1, Math.ceil(filteredData.length / itemsPerPage));
|
|
13953
14108
|
const safePage = Math.min(currentPage, totalPages);
|
|
13954
|
-
const paginatedData =
|
|
14109
|
+
const paginatedData = React38.useMemo(() => {
|
|
13955
14110
|
if (!pagination) return filteredData;
|
|
13956
14111
|
const start = (safePage - 1) * itemsPerPage;
|
|
13957
14112
|
return filteredData.slice(start, start + itemsPerPage);
|
|
13958
14113
|
}, [filteredData, pagination, safePage, itemsPerPage]);
|
|
13959
|
-
|
|
14114
|
+
React38.useEffect(() => {
|
|
13960
14115
|
setCurrentPage(1);
|
|
13961
14116
|
}, [search]);
|
|
13962
14117
|
const handleSelectAll = (checked) => setSelectedIds(checked ? paginatedData.map((item) => String(item[idKey])) : []);
|
|
13963
14118
|
const handleSelect = (id, checked) => setSelectedIds((prev) => checked ? [...prev, id] : prev.filter((i) => i !== id));
|
|
13964
14119
|
const allSelected = paginatedData.length > 0 && selectedIds.length === paginatedData.length;
|
|
13965
|
-
const pagePills =
|
|
14120
|
+
const pagePills = React38.useMemo(() => {
|
|
13966
14121
|
if (totalPages <= 5) return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
13967
14122
|
if (safePage <= 3) return [1, 2, 3, 4, 5];
|
|
13968
14123
|
if (safePage >= totalPages - 2) return [totalPages - 4, totalPages - 3, totalPages - 2, totalPages - 1, totalPages];
|
|
@@ -13970,14 +14125,14 @@ var CodegoUI = (() => {
|
|
|
13970
14125
|
}, [totalPages, safePage]);
|
|
13971
14126
|
const SortIcon = ({ col }) => {
|
|
13972
14127
|
if (!col.sortable) return null;
|
|
13973
|
-
if (sortKey !== String(col.key)) return /* @__PURE__ */ (0,
|
|
13974
|
-
return sortDir === "asc" ? /* @__PURE__ */ (0,
|
|
14128
|
+
if (sortKey !== String(col.key)) return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChevronsUpDown, { className: "ml-1.5 h-3.5 w-3.5 opacity-40" });
|
|
14129
|
+
return sortDir === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChevronUp, { className: "ml-1.5 h-3.5 w-3.5 text-primary" }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChevronDown, { className: "ml-1.5 h-3.5 w-3.5 text-primary" });
|
|
13975
14130
|
};
|
|
13976
|
-
return /* @__PURE__ */ (0,
|
|
13977
|
-
/* @__PURE__ */ (0,
|
|
13978
|
-
searchable && /* @__PURE__ */ (0,
|
|
13979
|
-
/* @__PURE__ */ (0,
|
|
13980
|
-
/* @__PURE__ */ (0,
|
|
14131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("w-full space-y-3", className), children: [
|
|
14132
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between gap-3 flex-wrap", children: [
|
|
14133
|
+
searchable && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "relative w-72", children: [
|
|
14134
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Search, { className: "absolute text-primary left-3 top-1/2 -translate-y-1/2 h-4 w-4 z-10" }),
|
|
14135
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13981
14136
|
"input",
|
|
13982
14137
|
{
|
|
13983
14138
|
placeholder: searchPlaceholder,
|
|
@@ -13986,17 +14141,17 @@ var CodegoUI = (() => {
|
|
|
13986
14141
|
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"
|
|
13987
14142
|
}
|
|
13988
14143
|
),
|
|
13989
|
-
search && /* @__PURE__ */ (0,
|
|
14144
|
+
search && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13990
14145
|
"button",
|
|
13991
14146
|
{
|
|
13992
14147
|
onClick: () => setSearch(""),
|
|
13993
14148
|
className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",
|
|
13994
|
-
children: /* @__PURE__ */ (0,
|
|
14149
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(X, { className: "h-3.5 w-3.5" })
|
|
13995
14150
|
}
|
|
13996
14151
|
)
|
|
13997
14152
|
] }),
|
|
13998
|
-
/* @__PURE__ */ (0,
|
|
13999
|
-
selectable && onBulkDelete && selectedIds.length > 0 && /* @__PURE__ */ (0,
|
|
14153
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
14154
|
+
selectable && onBulkDelete && selectedIds.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
14000
14155
|
"button",
|
|
14001
14156
|
{
|
|
14002
14157
|
onClick: () => {
|
|
@@ -14005,14 +14160,14 @@ var CodegoUI = (() => {
|
|
|
14005
14160
|
},
|
|
14006
14161
|
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",
|
|
14007
14162
|
children: [
|
|
14008
|
-
/* @__PURE__ */ (0,
|
|
14163
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Trash2, { className: "h-3.5 w-3.5" }),
|
|
14009
14164
|
"Delete ",
|
|
14010
14165
|
selectedIds.length,
|
|
14011
14166
|
" selected"
|
|
14012
14167
|
]
|
|
14013
14168
|
}
|
|
14014
14169
|
),
|
|
14015
|
-
/* @__PURE__ */ (0,
|
|
14170
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
14016
14171
|
filteredData.length,
|
|
14017
14172
|
" ",
|
|
14018
14173
|
filteredData.length === 1 ? "row" : "rows",
|
|
@@ -14020,16 +14175,16 @@ var CodegoUI = (() => {
|
|
|
14020
14175
|
] })
|
|
14021
14176
|
] })
|
|
14022
14177
|
] }),
|
|
14023
|
-
/* @__PURE__ */ (0,
|
|
14024
|
-
/* @__PURE__ */ (0,
|
|
14025
|
-
selectable && /* @__PURE__ */ (0,
|
|
14178
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "rounded-xl border border-border overflow-hidden bg-card/50 backdrop-blur-sm shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("table", { className: "w-full caption-bottom text-sm", children: [
|
|
14179
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("tr", { className: "border-b border-border bg-muted/40", children: [
|
|
14180
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("th", { className: "h-11 w-[46px] px-4 text-left align-middle", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
14026
14181
|
Checkbox,
|
|
14027
14182
|
{
|
|
14028
14183
|
checked: allSelected,
|
|
14029
14184
|
onChange: (e) => handleSelectAll(e.target.checked)
|
|
14030
14185
|
}
|
|
14031
14186
|
) }),
|
|
14032
|
-
columns.map((col) => /* @__PURE__ */ (0,
|
|
14187
|
+
columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
14033
14188
|
"th",
|
|
14034
14189
|
{
|
|
14035
14190
|
onClick: () => col.sortable && handleSort(String(col.key)),
|
|
@@ -14037,29 +14192,29 @@ var CodegoUI = (() => {
|
|
|
14037
14192
|
"h-11 px-4 text-left align-middle text-xs font-semibold uppercase tracking-wider text-muted-foreground select-none whitespace-nowrap",
|
|
14038
14193
|
col.sortable && "cursor-pointer hover:text-foreground transition-colors"
|
|
14039
14194
|
),
|
|
14040
|
-
children: /* @__PURE__ */ (0,
|
|
14195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "inline-flex items-center", children: [
|
|
14041
14196
|
col.title,
|
|
14042
|
-
/* @__PURE__ */ (0,
|
|
14197
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SortIcon, { col })
|
|
14043
14198
|
] })
|
|
14044
14199
|
},
|
|
14045
14200
|
String(col.key)
|
|
14046
14201
|
))
|
|
14047
14202
|
] }) }),
|
|
14048
|
-
/* @__PURE__ */ (0,
|
|
14203
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("tbody", { children: paginatedData.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
14049
14204
|
"td",
|
|
14050
14205
|
{
|
|
14051
14206
|
colSpan: columns.length + (selectable ? 1 : 0),
|
|
14052
14207
|
className: "h-32 text-center align-middle",
|
|
14053
|
-
children: /* @__PURE__ */ (0,
|
|
14054
|
-
/* @__PURE__ */ (0,
|
|
14055
|
-
/* @__PURE__ */ (0,
|
|
14056
|
-
search && /* @__PURE__ */ (0,
|
|
14208
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col items-center gap-1 text-muted-foreground", children: [
|
|
14209
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Search, { className: "h-8 w-8 opacity-20" }),
|
|
14210
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-sm", children: "No results found" }),
|
|
14211
|
+
search && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("button", { onClick: () => setSearch(""), className: "text-xs text-primary hover:underline", children: "Clear search" })
|
|
14057
14212
|
] })
|
|
14058
14213
|
}
|
|
14059
14214
|
) }) : paginatedData.map((item, i) => {
|
|
14060
14215
|
const id = String(item[idKey] || i);
|
|
14061
14216
|
const isSelected = selectedIds.includes(id);
|
|
14062
|
-
return /* @__PURE__ */ (0,
|
|
14217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
14063
14218
|
"tr",
|
|
14064
14219
|
{
|
|
14065
14220
|
className: cn(
|
|
@@ -14067,38 +14222,38 @@ var CodegoUI = (() => {
|
|
|
14067
14222
|
isSelected ? "bg-primary/5 hover:bg-primary/8" : "hover:bg-muted/30"
|
|
14068
14223
|
),
|
|
14069
14224
|
children: [
|
|
14070
|
-
selectable && /* @__PURE__ */ (0,
|
|
14225
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("td", { className: "px-4 py-3 align-middle", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
14071
14226
|
Checkbox,
|
|
14072
14227
|
{
|
|
14073
14228
|
checked: isSelected,
|
|
14074
14229
|
onChange: (e) => handleSelect(id, e.target.checked)
|
|
14075
14230
|
}
|
|
14076
14231
|
) }),
|
|
14077
|
-
columns.map((col) => /* @__PURE__ */ (0,
|
|
14232
|
+
columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("td", { className: "px-4 py-3 align-middle", children: col.render ? col.render(item) : col.type === "image" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
14078
14233
|
"img",
|
|
14079
14234
|
{
|
|
14080
14235
|
src: item[col.key],
|
|
14081
14236
|
alt: item[col.key],
|
|
14082
14237
|
className: "h-9 w-9 rounded-lg object-cover ring-1 ring-border"
|
|
14083
14238
|
}
|
|
14084
|
-
) : col.type === "badge" ? /* @__PURE__ */ (0,
|
|
14239
|
+
) : col.type === "badge" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: cn(
|
|
14085
14240
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium",
|
|
14086
14241
|
badgeClass(String(item[col.key]))
|
|
14087
14242
|
), children: [
|
|
14088
|
-
/* @__PURE__ */ (0,
|
|
14243
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: cn(
|
|
14089
14244
|
"mr-1.5 h-1.5 w-1.5 rounded-full",
|
|
14090
14245
|
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"
|
|
14091
14246
|
) }),
|
|
14092
14247
|
item[col.key]
|
|
14093
|
-
] }) : col.type === "stack" ? /* @__PURE__ */ (0,
|
|
14248
|
+
] }) : col.type === "stack" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AvatarStack, { images: Array.isArray(item[col.key]) ? item[col.key] : [], ...col.stackProps ?? {} }) : col.type === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex items-center", children: item[col.key] }) : col.type === "select" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
14094
14249
|
"select",
|
|
14095
14250
|
{
|
|
14096
14251
|
value: item[col.key],
|
|
14097
14252
|
onChange: (e) => col.onChange?.(item, e.target.value),
|
|
14098
14253
|
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",
|
|
14099
|
-
children: (col.selectOptions ?? []).map((opt) => /* @__PURE__ */ (0,
|
|
14254
|
+
children: (col.selectOptions ?? []).map((opt) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("option", { value: opt, children: opt }, opt))
|
|
14100
14255
|
}
|
|
14101
|
-
) : col.type === "toggle" ? /* @__PURE__ */ (0,
|
|
14256
|
+
) : col.type === "toggle" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
14102
14257
|
"button",
|
|
14103
14258
|
{
|
|
14104
14259
|
role: "switch",
|
|
@@ -14108,13 +14263,13 @@ var CodegoUI = (() => {
|
|
|
14108
14263
|
"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",
|
|
14109
14264
|
item[col.key] ? "bg-primary" : "bg-muted"
|
|
14110
14265
|
),
|
|
14111
|
-
children: /* @__PURE__ */ (0,
|
|
14266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: cn(
|
|
14112
14267
|
"pointer-events-none inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform",
|
|
14113
14268
|
item[col.key] ? "translate-x-4" : "translate-x-0"
|
|
14114
14269
|
) })
|
|
14115
14270
|
}
|
|
14116
|
-
) : col.type === "color" ? /* @__PURE__ */ (0,
|
|
14117
|
-
/* @__PURE__ */ (0,
|
|
14271
|
+
) : col.type === "color" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
14272
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
14118
14273
|
"input",
|
|
14119
14274
|
{
|
|
14120
14275
|
type: "color",
|
|
@@ -14123,22 +14278,22 @@ var CodegoUI = (() => {
|
|
|
14123
14278
|
className: "h-7 w-7 cursor-pointer rounded border border-border bg-transparent p-0.5"
|
|
14124
14279
|
}
|
|
14125
14280
|
),
|
|
14126
|
-
/* @__PURE__ */ (0,
|
|
14127
|
-
] }) : col.type === "checkbox" ? /* @__PURE__ */ (0,
|
|
14281
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-xs text-muted-foreground font-mono", children: item[col.key] })
|
|
14282
|
+
] }) : col.type === "checkbox" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
14128
14283
|
Checkbox,
|
|
14129
14284
|
{
|
|
14130
14285
|
checked: !!item[col.key],
|
|
14131
14286
|
onChange: (e) => col.onChange?.(item, e.target.checked)
|
|
14132
14287
|
}
|
|
14133
|
-
) : /* @__PURE__ */ (0,
|
|
14288
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-foreground/90", children: item[col.key] }) }, String(col.key)))
|
|
14134
14289
|
]
|
|
14135
14290
|
},
|
|
14136
14291
|
id
|
|
14137
14292
|
);
|
|
14138
14293
|
}) })
|
|
14139
14294
|
] }) }) }),
|
|
14140
|
-
pagination && totalPages > 1 && /* @__PURE__ */ (0,
|
|
14141
|
-
/* @__PURE__ */ (0,
|
|
14295
|
+
pagination && totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
14296
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
14142
14297
|
"Showing ",
|
|
14143
14298
|
(safePage - 1) * itemsPerPage + 1,
|
|
14144
14299
|
"\u2013",
|
|
@@ -14146,21 +14301,21 @@ var CodegoUI = (() => {
|
|
|
14146
14301
|
" of ",
|
|
14147
14302
|
filteredData.length
|
|
14148
14303
|
] }),
|
|
14149
|
-
/* @__PURE__ */ (0,
|
|
14150
|
-
/* @__PURE__ */ (0,
|
|
14304
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
14305
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
14151
14306
|
"button",
|
|
14152
14307
|
{
|
|
14153
14308
|
onClick: () => setCurrentPage((p) => Math.max(1, p - 1)),
|
|
14154
14309
|
disabled: safePage === 1,
|
|
14155
14310
|
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",
|
|
14156
|
-
children: /* @__PURE__ */ (0,
|
|
14311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChevronLeft, { className: "h-4 w-4" })
|
|
14157
14312
|
}
|
|
14158
14313
|
),
|
|
14159
|
-
pagePills[0] > 1 && /* @__PURE__ */ (0,
|
|
14160
|
-
/* @__PURE__ */ (0,
|
|
14161
|
-
pagePills[0] > 2 && /* @__PURE__ */ (0,
|
|
14314
|
+
pagePills[0] > 1 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
14315
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.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" }),
|
|
14316
|
+
pagePills[0] > 2 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "px-1 text-muted-foreground text-xs", children: "\u2026" })
|
|
14162
14317
|
] }),
|
|
14163
|
-
pagePills.map((p) => /* @__PURE__ */ (0,
|
|
14318
|
+
pagePills.map((p) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
14164
14319
|
"button",
|
|
14165
14320
|
{
|
|
14166
14321
|
onClick: () => setCurrentPage(p),
|
|
@@ -14172,17 +14327,17 @@ var CodegoUI = (() => {
|
|
|
14172
14327
|
},
|
|
14173
14328
|
p
|
|
14174
14329
|
)),
|
|
14175
|
-
pagePills[pagePills.length - 1] < totalPages && /* @__PURE__ */ (0,
|
|
14176
|
-
pagePills[pagePills.length - 1] < totalPages - 1 && /* @__PURE__ */ (0,
|
|
14177
|
-
/* @__PURE__ */ (0,
|
|
14330
|
+
pagePills[pagePills.length - 1] < totalPages && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
14331
|
+
pagePills[pagePills.length - 1] < totalPages - 1 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "px-1 text-muted-foreground text-xs", children: "\u2026" }),
|
|
14332
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.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 })
|
|
14178
14333
|
] }),
|
|
14179
|
-
/* @__PURE__ */ (0,
|
|
14334
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
14180
14335
|
"button",
|
|
14181
14336
|
{
|
|
14182
14337
|
onClick: () => setCurrentPage((p) => Math.min(totalPages, p + 1)),
|
|
14183
14338
|
disabled: safePage === totalPages,
|
|
14184
14339
|
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",
|
|
14185
|
-
children: /* @__PURE__ */ (0,
|
|
14340
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChevronRight, { className: "h-4 w-4" })
|
|
14186
14341
|
}
|
|
14187
14342
|
)
|
|
14188
14343
|
] })
|
|
@@ -14191,8 +14346,8 @@ var CodegoUI = (() => {
|
|
|
14191
14346
|
}
|
|
14192
14347
|
|
|
14193
14348
|
// src/components/ui/tabs.tsx
|
|
14194
|
-
var
|
|
14195
|
-
var
|
|
14349
|
+
var React39 = __toESM(require_react(), 1);
|
|
14350
|
+
var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
|
|
14196
14351
|
var sizeMap = {
|
|
14197
14352
|
sm: "px-3 py-1.5 text-xs",
|
|
14198
14353
|
md: "px-4 py-2 text-sm",
|
|
@@ -14242,15 +14397,15 @@ var CodegoUI = (() => {
|
|
|
14242
14397
|
fullWidth = false,
|
|
14243
14398
|
className
|
|
14244
14399
|
}) {
|
|
14245
|
-
const [internal, setInternal] =
|
|
14400
|
+
const [internal, setInternal] = React39.useState(defaultValue ?? items[0]?.value ?? "");
|
|
14246
14401
|
const active = controlledValue ?? internal;
|
|
14247
14402
|
const select = (v) => {
|
|
14248
14403
|
if (!controlledValue) setInternal(v);
|
|
14249
14404
|
onChange?.(v);
|
|
14250
14405
|
};
|
|
14251
14406
|
const activeItem = items.find((i) => i.value === active);
|
|
14252
|
-
return /* @__PURE__ */ (0,
|
|
14253
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
14254
14409
|
"button",
|
|
14255
14410
|
{
|
|
14256
14411
|
type: "button",
|
|
@@ -14261,20 +14416,20 @@ var CodegoUI = (() => {
|
|
|
14261
14416
|
fullWidth && "flex-1 justify-center"
|
|
14262
14417
|
),
|
|
14263
14418
|
children: [
|
|
14264
|
-
item.icon && /* @__PURE__ */ (0,
|
|
14419
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "shrink-0", children: item.icon }),
|
|
14265
14420
|
item.label,
|
|
14266
|
-
item.badge && /* @__PURE__ */ (0,
|
|
14421
|
+
item.badge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "shrink-0", children: item.badge })
|
|
14267
14422
|
]
|
|
14268
14423
|
},
|
|
14269
14424
|
item.value
|
|
14270
14425
|
)) }),
|
|
14271
|
-
activeItem?.content && /* @__PURE__ */ (0,
|
|
14426
|
+
activeItem?.content && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mt-4", children: activeItem.content })
|
|
14272
14427
|
] });
|
|
14273
14428
|
}
|
|
14274
14429
|
|
|
14275
14430
|
// src/components/ui/tag-input.tsx
|
|
14276
|
-
var
|
|
14277
|
-
var
|
|
14431
|
+
var React40 = __toESM(require_react(), 1);
|
|
14432
|
+
var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
|
|
14278
14433
|
function TagInput({
|
|
14279
14434
|
value: controlled,
|
|
14280
14435
|
defaultValue = [],
|
|
@@ -14285,9 +14440,9 @@ var CodegoUI = (() => {
|
|
|
14285
14440
|
disabled = false,
|
|
14286
14441
|
className
|
|
14287
14442
|
}) {
|
|
14288
|
-
const [internal, setInternal] =
|
|
14289
|
-
const [input, setInput] =
|
|
14290
|
-
const inputRef =
|
|
14443
|
+
const [internal, setInternal] = React40.useState(defaultValue);
|
|
14444
|
+
const [input, setInput] = React40.useState("");
|
|
14445
|
+
const inputRef = React40.useRef(null);
|
|
14291
14446
|
const tags = controlled ?? internal;
|
|
14292
14447
|
function addTag(raw) {
|
|
14293
14448
|
const tag = raw.trim();
|
|
@@ -14312,7 +14467,7 @@ var CodegoUI = (() => {
|
|
|
14312
14467
|
removeTag(tags.length - 1);
|
|
14313
14468
|
}
|
|
14314
14469
|
}
|
|
14315
|
-
return /* @__PURE__ */ (0,
|
|
14470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
14316
14471
|
"div",
|
|
14317
14472
|
{
|
|
14318
14473
|
className: cn(
|
|
@@ -14323,8 +14478,8 @@ var CodegoUI = (() => {
|
|
|
14323
14478
|
),
|
|
14324
14479
|
onClick: () => inputRef.current?.focus(),
|
|
14325
14480
|
children: [
|
|
14326
|
-
tags.map((tag, i) => /* @__PURE__ */ (0,
|
|
14327
|
-
/* @__PURE__ */ (0,
|
|
14481
|
+
tags.map((tag, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Badge, { variant: "default", size: "sm", removable: true, onRemove: () => removeTag(i), children: tag }, i)),
|
|
14482
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
14328
14483
|
"input",
|
|
14329
14484
|
{
|
|
14330
14485
|
ref: inputRef,
|
|
@@ -14343,7 +14498,7 @@ var CodegoUI = (() => {
|
|
|
14343
14498
|
}
|
|
14344
14499
|
|
|
14345
14500
|
// src/components/ui/timeline.tsx
|
|
14346
|
-
var
|
|
14501
|
+
var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
|
|
14347
14502
|
var DOT_COLOR = {
|
|
14348
14503
|
default: "bg-primary border-primary/30",
|
|
14349
14504
|
success: "bg-success border-success/30",
|
|
@@ -14359,41 +14514,41 @@ var CodegoUI = (() => {
|
|
|
14359
14514
|
info: "text-info"
|
|
14360
14515
|
};
|
|
14361
14516
|
var DEFAULT_ICON = {
|
|
14362
|
-
default: /* @__PURE__ */ (0,
|
|
14363
|
-
success: /* @__PURE__ */ (0,
|
|
14364
|
-
error: /* @__PURE__ */ (0,
|
|
14365
|
-
warning: /* @__PURE__ */ (0,
|
|
14366
|
-
info: /* @__PURE__ */ (0,
|
|
14517
|
+
default: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Circle, { className: "h-3 w-3" }),
|
|
14518
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CircleCheckBig, { className: "h-3.5 w-3.5" }),
|
|
14519
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CircleX, { className: "h-3.5 w-3.5" }),
|
|
14520
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TriangleAlert, { className: "h-3.5 w-3.5" }),
|
|
14521
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Info, { className: "h-3.5 w-3.5" })
|
|
14367
14522
|
};
|
|
14368
14523
|
function Timeline({ items, align = "left", className }) {
|
|
14369
|
-
return /* @__PURE__ */ (0,
|
|
14524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: cn("relative", className), children: items.map((item, i) => {
|
|
14370
14525
|
const variant = item.variant ?? "default";
|
|
14371
14526
|
const isLast = i === items.length - 1;
|
|
14372
14527
|
const isRight = align === "alternate" && i % 2 === 1;
|
|
14373
|
-
return /* @__PURE__ */ (0,
|
|
14374
|
-
/* @__PURE__ */ (0,
|
|
14375
|
-
/* @__PURE__ */ (0,
|
|
14528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("relative flex gap-4", align === "alternate" && "justify-center", isRight && "flex-row-reverse"), children: [
|
|
14529
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
14530
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: cn(
|
|
14376
14531
|
"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 z-10",
|
|
14377
14532
|
item.icon ? "bg-background border-border" : DOT_COLOR[variant]
|
|
14378
|
-
), children: /* @__PURE__ */ (0,
|
|
14379
|
-
!isLast && /* @__PURE__ */ (0,
|
|
14533
|
+
), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: cn("shrink-0", item.icon ? ICON_COLOR[variant] : "text-white"), children: item.icon ?? DEFAULT_ICON[variant] }) }),
|
|
14534
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-0.5 flex-1 bg-border mt-1 mb-1 min-h-4" })
|
|
14380
14535
|
] }),
|
|
14381
|
-
/* @__PURE__ */ (0,
|
|
14382
|
-
/* @__PURE__ */ (0,
|
|
14383
|
-
/* @__PURE__ */ (0,
|
|
14384
|
-
item.time && /* @__PURE__ */ (0,
|
|
14536
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("flex-1 pb-6 min-w-0", isRight && "text-right"), children: [
|
|
14537
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("flex items-start justify-between gap-2", isRight && "flex-row-reverse"), children: [
|
|
14538
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-sm font-semibold leading-tight", children: item.title }),
|
|
14539
|
+
item.time && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "shrink-0 text-xs text-muted-foreground whitespace-nowrap", children: item.time })
|
|
14385
14540
|
] }),
|
|
14386
|
-
item.description && /* @__PURE__ */ (0,
|
|
14387
|
-
item.content && /* @__PURE__ */ (0,
|
|
14541
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground leading-snug", children: item.description }),
|
|
14542
|
+
item.content && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mt-2", children: item.content })
|
|
14388
14543
|
] })
|
|
14389
14544
|
] }, item.id ?? i);
|
|
14390
14545
|
}) });
|
|
14391
14546
|
}
|
|
14392
14547
|
|
|
14393
14548
|
// src/components/ui/toggle-switch.tsx
|
|
14394
|
-
var
|
|
14395
|
-
var
|
|
14396
|
-
var ToggleSwitch =
|
|
14549
|
+
var React41 = __toESM(require_react(), 1);
|
|
14550
|
+
var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
|
|
14551
|
+
var ToggleSwitch = React41.forwardRef(
|
|
14397
14552
|
({
|
|
14398
14553
|
className,
|
|
14399
14554
|
inline = false,
|
|
@@ -14411,10 +14566,10 @@ var CodegoUI = (() => {
|
|
|
14411
14566
|
disabled,
|
|
14412
14567
|
...props
|
|
14413
14568
|
}, ref) => {
|
|
14414
|
-
const toggleId = id ??
|
|
14569
|
+
const toggleId = id ?? React41.useId();
|
|
14415
14570
|
const trackW = width ? typeof width === "number" ? `${width}px` : width : "2.75rem";
|
|
14416
14571
|
const trackH = height ? typeof height === "number" ? `${height}px` : height : "1.5rem";
|
|
14417
|
-
const [internalChecked, setInternalChecked] =
|
|
14572
|
+
const [internalChecked, setInternalChecked] = React41.useState(defaultChecked ?? false);
|
|
14418
14573
|
const isControlled = checked !== void 0;
|
|
14419
14574
|
const isOn = accepted ? true : declined ? false : isControlled ? checked : internalChecked;
|
|
14420
14575
|
const stateColor = accepted ? acceptedColor ?? "#22c55e" : declined ? declinedColor ?? "#ef4444" : isOn ? void 0 : void 0;
|
|
@@ -14423,13 +14578,13 @@ var CodegoUI = (() => {
|
|
|
14423
14578
|
if (!isControlled) setInternalChecked(e.target.checked);
|
|
14424
14579
|
onChange?.(e);
|
|
14425
14580
|
};
|
|
14426
|
-
const toggle = /* @__PURE__ */ (0,
|
|
14581
|
+
const toggle = /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
14427
14582
|
"label",
|
|
14428
14583
|
{
|
|
14429
14584
|
htmlFor: toggleId,
|
|
14430
14585
|
className: cn("relative inline-flex items-center cursor-pointer", disabled && "opacity-50 cursor-not-allowed"),
|
|
14431
14586
|
children: [
|
|
14432
|
-
/* @__PURE__ */ (0,
|
|
14587
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14433
14588
|
"input",
|
|
14434
14589
|
{
|
|
14435
14590
|
type: "checkbox",
|
|
@@ -14442,7 +14597,7 @@ var CodegoUI = (() => {
|
|
|
14442
14597
|
...props
|
|
14443
14598
|
}
|
|
14444
14599
|
),
|
|
14445
|
-
/* @__PURE__ */ (0,
|
|
14600
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14446
14601
|
"div",
|
|
14447
14602
|
{
|
|
14448
14603
|
className: cn(
|
|
@@ -14455,7 +14610,7 @@ var CodegoUI = (() => {
|
|
|
14455
14610
|
height: trackH,
|
|
14456
14611
|
...stateColor ? { backgroundColor: stateColor } : {}
|
|
14457
14612
|
},
|
|
14458
|
-
children: /* @__PURE__ */ (0,
|
|
14613
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14459
14614
|
"span",
|
|
14460
14615
|
{
|
|
14461
14616
|
className: `absolute top-[1px] ${isOn ? "bg-slate-50/40" : "bg-primary"} rounded-full border border-slate-300/50 shadow transition-transform duration-200`,
|
|
@@ -14473,9 +14628,9 @@ var CodegoUI = (() => {
|
|
|
14473
14628
|
}
|
|
14474
14629
|
);
|
|
14475
14630
|
if (inline && label) {
|
|
14476
|
-
return /* @__PURE__ */ (0,
|
|
14631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "inline-flex items-center gap-2 select-none", children: [
|
|
14477
14632
|
toggle,
|
|
14478
|
-
/* @__PURE__ */ (0,
|
|
14633
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("label", { htmlFor: toggleId, className: cn("text-sm cursor-pointer", disabled && "opacity-50 cursor-not-allowed"), children: label })
|
|
14479
14634
|
] });
|
|
14480
14635
|
}
|
|
14481
14636
|
return toggle;
|
|
@@ -14484,15 +14639,15 @@ var CodegoUI = (() => {
|
|
|
14484
14639
|
ToggleSwitch.displayName = "ToggleSwitch";
|
|
14485
14640
|
|
|
14486
14641
|
// src/components/ui/tree-view.tsx
|
|
14487
|
-
var
|
|
14488
|
-
var
|
|
14642
|
+
var React42 = __toESM(require_react(), 1);
|
|
14643
|
+
var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
|
|
14489
14644
|
function TreeNodeItem({ node, depth, selected, expanded, onToggleExpand, onSelect, multiple }) {
|
|
14490
14645
|
const hasChildren = !!node.children?.length;
|
|
14491
14646
|
const isExpanded = expanded.includes(node.id);
|
|
14492
14647
|
const isSelected = selected.includes(node.id);
|
|
14493
|
-
const defaultIcon = hasChildren ? isExpanded ? /* @__PURE__ */ (0,
|
|
14494
|
-
return /* @__PURE__ */ (0,
|
|
14495
|
-
/* @__PURE__ */ (0,
|
|
14648
|
+
const defaultIcon = hasChildren ? isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(FolderOpen, { className: "h-4 w-4 text-warning" }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Folder, { className: "h-4 w-4 text-warning" }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(File, { className: "h-4 w-4 text-muted-foreground" });
|
|
14649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { children: [
|
|
14650
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
14496
14651
|
"div",
|
|
14497
14652
|
{
|
|
14498
14653
|
className: cn(
|
|
@@ -14506,13 +14661,13 @@ var CodegoUI = (() => {
|
|
|
14506
14661
|
onSelect(node.id);
|
|
14507
14662
|
},
|
|
14508
14663
|
children: [
|
|
14509
|
-
hasChildren ? /* @__PURE__ */ (0,
|
|
14510
|
-
/* @__PURE__ */ (0,
|
|
14511
|
-
/* @__PURE__ */ (0,
|
|
14664
|
+
hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ChevronRight, { className: cn("h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform", isExpanded && "rotate-90") }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "w-3.5 shrink-0" }),
|
|
14665
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "shrink-0", children: node.icon ?? defaultIcon }),
|
|
14666
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "truncate", children: node.label })
|
|
14512
14667
|
]
|
|
14513
14668
|
}
|
|
14514
14669
|
),
|
|
14515
|
-
hasChildren && isExpanded && /* @__PURE__ */ (0,
|
|
14670
|
+
hasChildren && isExpanded && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { children: node.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14516
14671
|
TreeNodeItem,
|
|
14517
14672
|
{
|
|
14518
14673
|
node: child,
|
|
@@ -14537,8 +14692,8 @@ var CodegoUI = (() => {
|
|
|
14537
14692
|
className
|
|
14538
14693
|
}) {
|
|
14539
14694
|
const init = defaultSelected ? Array.isArray(defaultSelected) ? defaultSelected : [defaultSelected] : [];
|
|
14540
|
-
const [internal, setInternal] =
|
|
14541
|
-
const [expanded, setExpanded] =
|
|
14695
|
+
const [internal, setInternal] = React42.useState(init);
|
|
14696
|
+
const [expanded, setExpanded] = React42.useState(defaultExpanded);
|
|
14542
14697
|
const selected = controlled ? Array.isArray(controlled) ? controlled : [controlled] : internal;
|
|
14543
14698
|
function handleSelect(id) {
|
|
14544
14699
|
let next;
|
|
@@ -14553,7 +14708,7 @@ var CodegoUI = (() => {
|
|
|
14553
14708
|
function toggleExpand(id) {
|
|
14554
14709
|
setExpanded((prev) => prev.includes(id) ? prev.filter((v) => v !== id) : [...prev, id]);
|
|
14555
14710
|
}
|
|
14556
|
-
return /* @__PURE__ */ (0,
|
|
14711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: cn("w-full", className), children: nodes.map((node) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14557
14712
|
TreeNodeItem,
|
|
14558
14713
|
{
|
|
14559
14714
|
node,
|
|
@@ -14569,8 +14724,8 @@ var CodegoUI = (() => {
|
|
|
14569
14724
|
}
|
|
14570
14725
|
|
|
14571
14726
|
// src/components/ui/widget.tsx
|
|
14572
|
-
var
|
|
14573
|
-
var
|
|
14727
|
+
var React43 = __toESM(require_react(), 1);
|
|
14728
|
+
var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
|
|
14574
14729
|
var iconColorMap = {
|
|
14575
14730
|
primary: "bg-primary/10 text-primary",
|
|
14576
14731
|
info: "bg-info/10 text-info",
|
|
@@ -14598,8 +14753,8 @@ var CodegoUI = (() => {
|
|
|
14598
14753
|
outline: "bg-transparent border-2"
|
|
14599
14754
|
};
|
|
14600
14755
|
function useCountUp(target, enabled, duration = 1e3) {
|
|
14601
|
-
const [display, setDisplay] =
|
|
14602
|
-
|
|
14756
|
+
const [display, setDisplay] = React43.useState(enabled ? 0 : target);
|
|
14757
|
+
React43.useEffect(() => {
|
|
14603
14758
|
if (!enabled) {
|
|
14604
14759
|
setDisplay(target);
|
|
14605
14760
|
return;
|
|
@@ -14642,7 +14797,7 @@ var CodegoUI = (() => {
|
|
|
14642
14797
|
const counted = useCountUp(isNumeric ? value : 0, animate && isNumeric);
|
|
14643
14798
|
const displayValue = animate && isNumeric ? counted : value;
|
|
14644
14799
|
const s = sizeMap2[size];
|
|
14645
|
-
return /* @__PURE__ */ (0,
|
|
14800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14646
14801
|
Card,
|
|
14647
14802
|
{
|
|
14648
14803
|
className: cn(
|
|
@@ -14653,27 +14808,27 @@ var CodegoUI = (() => {
|
|
|
14653
14808
|
),
|
|
14654
14809
|
onClick,
|
|
14655
14810
|
...props,
|
|
14656
|
-
children: /* @__PURE__ */ (0,
|
|
14657
|
-
/* @__PURE__ */ (0,
|
|
14658
|
-
/* @__PURE__ */ (0,
|
|
14659
|
-
/* @__PURE__ */ (0,
|
|
14660
|
-
/* @__PURE__ */ (0,
|
|
14661
|
-
badge && /* @__PURE__ */ (0,
|
|
14811
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(CardContent, { className: s.card, children: [
|
|
14812
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
14813
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
14814
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
14815
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-sm font-medium text-muted-foreground truncate", children: title }),
|
|
14816
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "shrink-0", children: badge })
|
|
14662
14817
|
] }),
|
|
14663
|
-
loading ? /* @__PURE__ */ (0,
|
|
14664
|
-
description && /* @__PURE__ */ (0,
|
|
14818
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "h-8 w-24 animate-pulse rounded-md bg-muted" }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: cn("font-bold tabular-nums", s.value), children: displayValue }),
|
|
14819
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-xs text-muted-foreground", children: description })
|
|
14665
14820
|
] }),
|
|
14666
|
-
icon && /* @__PURE__ */ (0,
|
|
14821
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn(
|
|
14667
14822
|
"relative flex shrink-0 items-center justify-center rounded-full",
|
|
14668
14823
|
s.icon,
|
|
14669
14824
|
iconColorMap[iconColor]
|
|
14670
14825
|
), children: [
|
|
14671
|
-
pulse && /* @__PURE__ */ (0,
|
|
14672
|
-
/* @__PURE__ */ (0,
|
|
14826
|
+
pulse && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "absolute inset-0 rounded-full animate-ping opacity-30 bg-current" }),
|
|
14827
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: s.iconSize, children: icon })
|
|
14673
14828
|
] })
|
|
14674
14829
|
] }),
|
|
14675
|
-
trendValue && !loading && /* @__PURE__ */ (0,
|
|
14676
|
-
/* @__PURE__ */ (0,
|
|
14830
|
+
trendValue && !loading && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "mt-3 flex items-center gap-1.5 text-sm", children: [
|
|
14831
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: cn(
|
|
14677
14832
|
"font-medium",
|
|
14678
14833
|
trend === "up" && "text-success",
|
|
14679
14834
|
trend === "down" && "text-danger",
|
|
@@ -14683,21 +14838,21 @@ var CodegoUI = (() => {
|
|
|
14683
14838
|
trend === "down" && "\u2193 ",
|
|
14684
14839
|
trendValue
|
|
14685
14840
|
] }),
|
|
14686
|
-
previousValue !== void 0 && /* @__PURE__ */ (0,
|
|
14841
|
+
previousValue !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: "text-muted-foreground", children: [
|
|
14687
14842
|
"vs ",
|
|
14688
14843
|
previousValue
|
|
14689
14844
|
] }),
|
|
14690
|
-
/* @__PURE__ */ (0,
|
|
14845
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-muted-foreground", children: trendLabel })
|
|
14691
14846
|
] }),
|
|
14692
|
-
progress !== void 0 && /* @__PURE__ */ (0,
|
|
14693
|
-
/* @__PURE__ */ (0,
|
|
14694
|
-
/* @__PURE__ */ (0,
|
|
14695
|
-
/* @__PURE__ */ (0,
|
|
14847
|
+
progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "mt-4 space-y-1", children: [
|
|
14848
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex justify-between text-xs text-muted-foreground", children: [
|
|
14849
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: "Progress" }),
|
|
14850
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { children: [
|
|
14696
14851
|
Math.min(100, Math.max(0, progress)),
|
|
14697
14852
|
"%"
|
|
14698
14853
|
] })
|
|
14699
14854
|
] }),
|
|
14700
|
-
/* @__PURE__ */ (0,
|
|
14855
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "h-1.5 w-full rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14701
14856
|
"div",
|
|
14702
14857
|
{
|
|
14703
14858
|
className: cn("h-full rounded-full transition-all duration-700", progressColorMap[progressColor]),
|
|
@@ -14705,7 +14860,7 @@ var CodegoUI = (() => {
|
|
|
14705
14860
|
}
|
|
14706
14861
|
) })
|
|
14707
14862
|
] }),
|
|
14708
|
-
footer && /* @__PURE__ */ (0,
|
|
14863
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "mt-4 border-t pt-3 text-sm text-muted-foreground", children: footer })
|
|
14709
14864
|
] })
|
|
14710
14865
|
}
|
|
14711
14866
|
);
|
|
@@ -14823,6 +14978,7 @@ lucide-react/dist/esm/icons/link.js:
|
|
|
14823
14978
|
lucide-react/dist/esm/icons/list-ordered.js:
|
|
14824
14979
|
lucide-react/dist/esm/icons/list.js:
|
|
14825
14980
|
lucide-react/dist/esm/icons/minus.js:
|
|
14981
|
+
lucide-react/dist/esm/icons/moon.js:
|
|
14826
14982
|
lucide-react/dist/esm/icons/panel-left-close.js:
|
|
14827
14983
|
lucide-react/dist/esm/icons/panel-left-open.js:
|
|
14828
14984
|
lucide-react/dist/esm/icons/plus.js:
|