@sentio/ui-core 0.1.4 → 0.1.5

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.mjs CHANGED
@@ -272,7 +272,11 @@ var CopyButton = ({
272
272
  };
273
273
 
274
274
  // src/common/NewButton.tsx
275
- import { cloneElement, forwardRef, useMemo } from "react";
275
+ import {
276
+ cloneElement,
277
+ forwardRef,
278
+ useMemo
279
+ } from "react";
276
280
 
277
281
  // src/common/DivTooltip.tsx
278
282
  import React2, { useRef as useRef2, useState as useState2, useEffect as useEffect2 } from "react";
@@ -542,7 +546,10 @@ var buttonClass = cva(["inline-flex", "items-center", "font-medium"], {
542
546
  disabled: false
543
547
  }
544
548
  });
545
- function Proccessing({ className, light }) {
549
+ function Proccessing({
550
+ className,
551
+ light
552
+ }) {
546
553
  return /* @__PURE__ */ jsxs5("svg", { className: `h-5 w-5 animate-spin ${className}`, viewBox: "0 0 24 24", children: [
547
554
  /* @__PURE__ */ jsx5(
548
555
  "circle",
@@ -625,12 +632,17 @@ function Button({
625
632
  iconEl2 = /* @__PURE__ */ jsx5(
626
633
  Proccessing,
627
634
  {
628
- className: cx(pIconClass({ size }), role == "primary" ? "text-white" : ""),
635
+ className: cx(
636
+ pIconClass({ size }),
637
+ role == "primary" ? "text-white" : ""
638
+ ),
629
639
  light: role !== "primary"
630
640
  }
631
641
  );
632
642
  } else if (icon) {
633
- iconEl2 = cloneElement(icon, { className: cx(icon.props.className, iconClasses) });
643
+ iconEl2 = cloneElement(icon, {
644
+ className: cx(icon.props.className, iconClasses)
645
+ });
634
646
  }
635
647
  return iconEl2;
636
648
  }, [icon, iconClasses, processing, role]);
@@ -2036,7 +2048,7 @@ var FlatTree = (props) => {
2036
2048
  var FlatTree_default = memo3(FlatTree);
2037
2049
 
2038
2050
  // src/common/text/LinkifyText.tsx
2039
- import { linkifyUrlsToHtml } from "linkify-urls";
2051
+ import linkifyHtml from "linkify-html";
2040
2052
  import DOMPurify from "dompurify";
2041
2053
  import { memo as memo4 } from "react";
2042
2054
  import { isString as isString2, isUndefined, isNull } from "lodash";
@@ -2076,7 +2088,7 @@ var LinkifyText = memo4(function LinkifyText2({
2076
2088
  }
2077
2089
  return null;
2078
2090
  }
2079
- const linkStr = linkifyUrlsToHtml(
2091
+ const linkStr = linkifyHtml(
2080
2092
  isHighlightNumbers ? renderTextWithColoredNumbers(text) : text,
2081
2093
  {
2082
2094
  attributes: {
@@ -2100,15 +2112,96 @@ import { useContext as useContext4 } from "react";
2100
2112
 
2101
2113
  // src/utils/extension-context.ts
2102
2114
  import { createContext as createContext3, useContext as useContext3 } from "react";
2115
+
2116
+ // src/utils/use-dark-mode.ts
2117
+ import { useEffect as useEffect7, useState as useState9 } from "react";
2118
+ var DarkModeListener = class _DarkModeListener {
2119
+ constructor() {
2120
+ this.isDarkMode = false;
2121
+ this.listeners = [];
2122
+ this.init();
2123
+ }
2124
+ static get instance() {
2125
+ if (!this._instance) {
2126
+ this._instance = new _DarkModeListener();
2127
+ }
2128
+ return this._instance;
2129
+ }
2130
+ addListener(listener) {
2131
+ this.listeners.push(listener);
2132
+ }
2133
+ removeListener(listener) {
2134
+ this.listeners = this.listeners.filter((l) => l !== listener);
2135
+ }
2136
+ get darkMode() {
2137
+ return this.isDarkMode;
2138
+ }
2139
+ _sync(theme = "system") {
2140
+ let isDarkMode = false;
2141
+ if (theme === "system") {
2142
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
2143
+ isDarkMode = mediaQuery.matches;
2144
+ localStorage.setItem("theme", "system");
2145
+ } else if (theme === "light") {
2146
+ isDarkMode = false;
2147
+ localStorage.removeItem("theme");
2148
+ } else {
2149
+ isDarkMode = theme === "dark";
2150
+ localStorage.setItem("theme", "dark");
2151
+ }
2152
+ this.isDarkMode = isDarkMode;
2153
+ document.body.classList.remove("light", "dark");
2154
+ document.body.classList.add(isDarkMode ? "dark" : "light");
2155
+ this.listeners.forEach((listener) => listener(isDarkMode));
2156
+ }
2157
+ toggleDarkMode() {
2158
+ this.isDarkMode = document.body.classList.contains("dark");
2159
+ this._sync(this.isDarkMode ? "light" : "dark");
2160
+ }
2161
+ setDarkMode(value) {
2162
+ this._sync(value);
2163
+ }
2164
+ init() {
2165
+ this.isDarkMode = document.body.classList.contains("dark");
2166
+ const observer = new MutationObserver((mutationsList) => {
2167
+ for (const mutation of mutationsList) {
2168
+ if (mutation.type === "attributes" && mutation.attributeName === "class") {
2169
+ const isDarkMode = document.body.classList.contains("dark");
2170
+ if (this.isDarkMode !== isDarkMode) {
2171
+ this.isDarkMode = isDarkMode;
2172
+ this.listeners.forEach((listener) => listener(isDarkMode));
2173
+ }
2174
+ }
2175
+ }
2176
+ });
2177
+ const config = {
2178
+ attributes: true,
2179
+ // Observe attribute changes
2180
+ attributeFilter: ["class"]
2181
+ // Only observe changes to the 'class' attribute
2182
+ };
2183
+ observer.observe(document.body, config);
2184
+ }
2185
+ };
2186
+ var useDarkMode = () => {
2187
+ const [isDarkMode, setIsDarkMode] = useState9(false);
2188
+ useEffect7(() => {
2189
+ const instance = DarkModeListener.instance;
2190
+ setIsDarkMode(instance.darkMode);
2191
+ instance.addListener(setIsDarkMode);
2192
+ return () => {
2193
+ instance.removeListener(setIsDarkMode);
2194
+ };
2195
+ }, []);
2196
+ return isDarkMode;
2197
+ };
2198
+
2199
+ // src/utils/extension-context.ts
2103
2200
  var SvgFolderContext = createContext3("");
2104
2201
  var useDetectExtenstion = () => {
2105
2202
  const folderPath = useContext3(SvgFolderContext);
2106
2203
  return Boolean(folderPath);
2107
2204
  };
2108
- var DarkModeContext = createContext3(false);
2109
- var useDarkMode = () => {
2110
- return useContext3(DarkModeContext);
2111
- };
2112
2205
 
2113
2206
  // src/common/Empty.tsx
2114
2207
  import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
@@ -2209,15 +2302,742 @@ var HeaderToolsContent = ({
2209
2302
  return /* @__PURE__ */ jsx18("div", { className: classNames11("w-full overflow-hidden", className), children });
2210
2303
  };
2211
2304
 
2305
+ // src/common/SlideOver.tsx
2306
+ import { Fragment as Fragment5, useCallback as useCallback7, useEffect as useEffect8, useRef as useRef5 } from "react";
2307
+ import { Dialog as Dialog2, Transition as Transition2 } from "@headlessui/react";
2308
+ import { XMarkIcon as XIcon } from "@heroicons/react/24/outline";
2309
+ import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
2310
+ function SlideOver({
2311
+ title,
2312
+ open,
2313
+ onClose,
2314
+ children,
2315
+ size,
2316
+ headAddon,
2317
+ triggerClose = "all",
2318
+ noAnimation
2319
+ }) {
2320
+ const onDialogClose = useCallback7(() => {
2321
+ if (triggerClose === "all") {
2322
+ onClose();
2323
+ }
2324
+ }, [triggerClose, onClose]);
2325
+ const openRef = useRef5(open);
2326
+ openRef.current = open;
2327
+ useEffect8(() => {
2328
+ function handleKeyDown(event) {
2329
+ if (event.key === "Escape") {
2330
+ event.preventDefault();
2331
+ event.stopPropagation();
2332
+ if (openRef.current) {
2333
+ onClose();
2334
+ }
2335
+ }
2336
+ }
2337
+ if (triggerClose === "button") {
2338
+ window.addEventListener("keydown", handleKeyDown);
2339
+ return () => {
2340
+ window.removeEventListener("keydown", handleKeyDown);
2341
+ };
2342
+ }
2343
+ }, [triggerClose, onClose]);
2344
+ const contentNode = /* @__PURE__ */ jsx19("div", { className: "fixed inset-0 overflow-hidden", children: /* @__PURE__ */ jsxs16("div", { className: "absolute inset-y-0 right-0 flex max-w-full pl-10 sm:pl-16", children: [
2345
+ /* @__PURE__ */ jsx19("div", { className: "max-w-2xl max-w-3xl max-w-4xl max-w-5xl max-w-6xl max-w-7xl" }),
2346
+ /* @__PURE__ */ jsxs16(
2347
+ Dialog2.Panel,
2348
+ {
2349
+ className: `dark:bg-sentio-gray-100 pointer-events-auto flex h-full w-screen flex-col overflow-x-hidden border-l bg-white shadow-md max-w-${size || "2xl"}`,
2350
+ children: [
2351
+ /* @__PURE__ */ jsx19("div", { className: "dark:bg-sentio-gray-100 relative border-b bg-white px-4 py-3", children: /* @__PURE__ */ jsxs16("div", { className: "flex h-auto items-start justify-between space-x-3 sm:h-5", children: [
2352
+ /* @__PURE__ */ jsx19("div", { className: "flex-1 space-y-1", children: /* @__PURE__ */ jsx19(Dialog2.Title, { className: "text-text-foreground text-[15px] font-semibold", children: title }) }),
2353
+ /* @__PURE__ */ jsxs16("div", { className: "flex-0 flex h-auto items-center sm:h-5", children: [
2354
+ headAddon,
2355
+ /* @__PURE__ */ jsxs16(
2356
+ "button",
2357
+ {
2358
+ type: "button",
2359
+ className: "hover:text-text-foreground ml-2 text-gray-800 dark:text-gray-500",
2360
+ onClick: () => onClose(),
2361
+ children: [
2362
+ /* @__PURE__ */ jsx19("span", { className: "sr-only", children: "Close panel" }),
2363
+ /* @__PURE__ */ jsx19(XIcon, { className: "h-5 w-5", "aria-hidden": "true" })
2364
+ ]
2365
+ }
2366
+ )
2367
+ ] })
2368
+ ] }) }),
2369
+ /* @__PURE__ */ jsx19("div", { className: "flex flex-1 overflow-y-auto overflow-x-hidden", children })
2370
+ ]
2371
+ }
2372
+ )
2373
+ ] }) });
2374
+ if (noAnimation) {
2375
+ return /* @__PURE__ */ jsx19(
2376
+ Dialog2,
2377
+ {
2378
+ open,
2379
+ as: "div",
2380
+ className: "relative z-10",
2381
+ id: "test",
2382
+ onClose: onDialogClose,
2383
+ children: contentNode
2384
+ }
2385
+ );
2386
+ }
2387
+ return /* @__PURE__ */ jsx19(Transition2.Root, { show: open, as: "div", children: /* @__PURE__ */ jsx19(
2388
+ Dialog2,
2389
+ {
2390
+ static: true,
2391
+ as: "div",
2392
+ className: "relative z-10",
2393
+ id: "test",
2394
+ onClose: onDialogClose,
2395
+ children: /* @__PURE__ */ jsx19(
2396
+ Transition2.Child,
2397
+ {
2398
+ as: Fragment5,
2399
+ enter: "transform transition ease-in-out duration-100 sm:duration-300",
2400
+ enterFrom: "translate-x-full",
2401
+ enterTo: "translate-x-0",
2402
+ leave: "transform transition ease-in-out duration-100 sm:duration-300",
2403
+ leaveFrom: "translate-x-0",
2404
+ leaveTo: "translate-x-full",
2405
+ children: contentNode
2406
+ }
2407
+ )
2408
+ }
2409
+ ) });
2410
+ }
2411
+
2412
+ // src/common/ConfirmDialog.tsx
2413
+ import { Fragment as Fragment6, useRef as useRef6, useState as useState10 } from "react";
2414
+ import { Dialog as Dialog3, Transition as Transition3 } from "@headlessui/react";
2415
+ import {
2416
+ ExclamationCircleIcon as ExclamationIcon,
2417
+ QuestionMarkCircleIcon
2418
+ } from "@heroicons/react/24/outline";
2419
+ import { Fragment as Fragment7, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
2420
+ function ConfirmDialog({
2421
+ message,
2422
+ title,
2423
+ open,
2424
+ onClose,
2425
+ onConfirm,
2426
+ buttonLabel = "Delete",
2427
+ type,
2428
+ buttons,
2429
+ children,
2430
+ disabled
2431
+ }) {
2432
+ const cancelButtonRef = useRef6(null);
2433
+ const [processing, setProcessing] = useState10(false);
2434
+ async function confirm() {
2435
+ setProcessing(true);
2436
+ try {
2437
+ await onConfirm();
2438
+ } finally {
2439
+ setProcessing(false);
2440
+ onClose(false);
2441
+ }
2442
+ }
2443
+ return /* @__PURE__ */ jsx20(Transition3.Root, { show: open, as: Fragment6, children: /* @__PURE__ */ jsxs17(
2444
+ Dialog3,
2445
+ {
2446
+ as: "div",
2447
+ className: "relative z-10",
2448
+ "aria-label": "confirm",
2449
+ initialFocus: cancelButtonRef,
2450
+ onClose,
2451
+ children: [
2452
+ /* @__PURE__ */ jsx20(
2453
+ Transition3.Child,
2454
+ {
2455
+ as: Fragment6,
2456
+ enter: "ease-out duration-300",
2457
+ enterFrom: "opacity-0",
2458
+ enterTo: "opacity-100",
2459
+ leave: "ease-in duration-200",
2460
+ leaveFrom: "opacity-100",
2461
+ leaveTo: "opacity-0",
2462
+ children: /* @__PURE__ */ jsx20("div", { className: "fixed inset-0 bg-gray-500/75 transition-opacity dark:bg-gray-200/50" })
2463
+ }
2464
+ ),
2465
+ /* @__PURE__ */ jsx20("div", { className: "fixed inset-0 z-10 overflow-y-auto", children: /* @__PURE__ */ jsx20("div", { className: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0", children: /* @__PURE__ */ jsx20(
2466
+ Transition3.Child,
2467
+ {
2468
+ as: Fragment6,
2469
+ enter: "ease-out duration-300",
2470
+ enterFrom: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
2471
+ enterTo: "opacity-100 translate-y-0 sm:scale-100",
2472
+ leave: "ease-in duration-200",
2473
+ leaveFrom: "opacity-100 translate-y-0 sm:scale-100",
2474
+ leaveTo: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
2475
+ children: /* @__PURE__ */ jsxs17(Dialog3.Panel, { className: "dark:bg-sentio-gray-100 relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg", children: [
2476
+ /* @__PURE__ */ jsx20("div", { className: "dark:bg-sentio-gray-100 bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4", children: /* @__PURE__ */ jsxs17("div", { className: "sm:flex sm:items-start", children: [
2477
+ type == "danger" && /* @__PURE__ */ jsx20("div", { className: "mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-red-100 dark:bg-red-300 sm:mx-0 sm:h-10 sm:w-10", children: /* @__PURE__ */ jsx20(
2478
+ ExclamationIcon,
2479
+ {
2480
+ className: "h-6 w-6 text-red-600 dark:text-red-800",
2481
+ "aria-hidden": "true"
2482
+ }
2483
+ ) }),
2484
+ type == "question" && /* @__PURE__ */ jsx20("div", { className: "bg-primary-100 dark:bg-primary-500 mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full sm:mx-0 sm:h-10 sm:w-10", children: /* @__PURE__ */ jsx20(
2485
+ QuestionMarkCircleIcon,
2486
+ {
2487
+ className: "text-primary-600 dark:text-primary-800 h-6 w-6",
2488
+ "aria-hidden": "true"
2489
+ }
2490
+ ) }),
2491
+ /* @__PURE__ */ jsxs17("div", { className: "mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left", children: [
2492
+ /* @__PURE__ */ jsx20(
2493
+ Dialog3.Title,
2494
+ {
2495
+ as: "h3",
2496
+ className: "text-text-foreground text-lg font-medium leading-6",
2497
+ children: title
2498
+ }
2499
+ ),
2500
+ /* @__PURE__ */ jsxs17("div", { className: "mt-2", children: [
2501
+ message && /* @__PURE__ */ jsx20("p", { className: "text-sm text-gray-500", children: message }),
2502
+ children
2503
+ ] })
2504
+ ] })
2505
+ ] }) }),
2506
+ /* @__PURE__ */ jsx20("div", { className: "flex gap-2 bg-gray-50 px-4 py-3 sm:flex-row-reverse sm:px-6", children: buttons ? buttons : /* @__PURE__ */ jsxs17(Fragment7, { children: [
2507
+ /* @__PURE__ */ jsx20(
2508
+ NewButton,
2509
+ {
2510
+ type: "button",
2511
+ processing,
2512
+ status: type == "danger" ? "danger" : void 0,
2513
+ role: "primary",
2514
+ onClick: () => confirm(),
2515
+ disabled,
2516
+ size: "lg",
2517
+ children: buttonLabel
2518
+ }
2519
+ ),
2520
+ /* @__PURE__ */ jsx20(
2521
+ NewButton,
2522
+ {
2523
+ type: "button",
2524
+ role: "secondary",
2525
+ onClick: () => onClose(false),
2526
+ ref: cancelButtonRef,
2527
+ size: "lg",
2528
+ children: "Cancel"
2529
+ }
2530
+ )
2531
+ ] }) })
2532
+ ] })
2533
+ }
2534
+ ) }) })
2535
+ ]
2536
+ }
2537
+ ) });
2538
+ }
2539
+
2540
+ // src/common/StyledTabs.tsx
2541
+ import React5 from "react";
2542
+ import { Tab as HeadlessTab } from "@headlessui/react";
2543
+ import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
2544
+ var getTabClassName = ({ selected }) => cx3(
2545
+ "font-ilabel py-1 text-sm leading-5 border-b-2 outline-0",
2546
+ selected ? "text-primary border-primary-500" : "text-gray hover:text-primary border-transparent hover:border-primary-500"
2547
+ );
2548
+ var Group = ({
2549
+ children,
2550
+ className,
2551
+ onChange,
2552
+ defaultIndex,
2553
+ selectedIndex
2554
+ }) => {
2555
+ return /* @__PURE__ */ jsx21(
2556
+ HeadlessTab.Group,
2557
+ {
2558
+ onChange,
2559
+ defaultIndex,
2560
+ selectedIndex,
2561
+ children: /* @__PURE__ */ jsx21("div", { className: cx3("flex flex-col", className), children })
2562
+ }
2563
+ );
2564
+ };
2565
+ var List = ({
2566
+ tabs,
2567
+ disabledTabs,
2568
+ className,
2569
+ noBorder,
2570
+ children
2571
+ }) => {
2572
+ return /* @__PURE__ */ jsxs18(
2573
+ HeadlessTab.List,
2574
+ {
2575
+ className: cx3(
2576
+ "flex-0 border-border-color flex justify-start space-x-6 overflow-x-auto px-4",
2577
+ noBorder ? "border-b-0" : "border-b"
2578
+ ),
2579
+ children: [
2580
+ tabs.map((tab, index) => /* @__PURE__ */ jsx21(
2581
+ HeadlessTab,
2582
+ {
2583
+ className: ({ selected }) => cx3(
2584
+ "font-ilabel outline-primary/50 whitespace-nowrap border-b-2 py-1 text-sm leading-5 outline-offset-2",
2585
+ selected ? "border-primary text-primary" : "text-gray hover:text-primary border-transparent",
2586
+ className
2587
+ ),
2588
+ disabled: disabledTabs?.includes(index),
2589
+ children: tab
2590
+ },
2591
+ index
2592
+ )),
2593
+ children
2594
+ ]
2595
+ }
2596
+ );
2597
+ };
2598
+ var Panels = React5.forwardRef(function Panels2({ children, className, ...props }, ref) {
2599
+ return /* @__PURE__ */ jsx21(
2600
+ HeadlessTab.Panels,
2601
+ {
2602
+ className: cx3("flex-1", className || "w-full overflow-auto"),
2603
+ ...props,
2604
+ ref,
2605
+ children
2606
+ }
2607
+ );
2608
+ });
2609
+ var Panel = (props) => {
2610
+ const { className, ...otherProps } = props;
2611
+ return /* @__PURE__ */ jsx21(
2612
+ HeadlessTab.Panel,
2613
+ {
2614
+ className: cx3("space-y-2 outline-0", className),
2615
+ ...otherProps
2616
+ }
2617
+ );
2618
+ };
2619
+
2620
+ // src/common/SearchInput.tsx
2621
+ import { MagnifyingGlassIcon as SearchIcon } from "@heroicons/react/20/solid";
2622
+ import { forwardRef as forwardRef4 } from "react";
2623
+ import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
2624
+ var SearchInput = forwardRef4((props, ref) => {
2625
+ const {
2626
+ onChange,
2627
+ value,
2628
+ onBlur,
2629
+ onKeydown,
2630
+ addonButton,
2631
+ placeholder = "Search",
2632
+ ...args
2633
+ } = props;
2634
+ return /* @__PURE__ */ jsxs19("div", { className: "min-w-0 flex-1", children: [
2635
+ /* @__PURE__ */ jsx22("label", { htmlFor: "search", className: "sr-only", children: "Search" }),
2636
+ /* @__PURE__ */ jsxs19("div", { className: "focus-within:ring-primary-500 focus-within:border-primary-500 relative flex rounded-md border border-gray-300", children: [
2637
+ /* @__PURE__ */ jsx22("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1 sm:pl-3", children: /* @__PURE__ */ jsx22(
2638
+ SearchIcon,
2639
+ {
2640
+ className: "sm:h-4.5 sm:w-4.5 h-4 w-4 text-gray-400",
2641
+ "aria-hidden": "true"
2642
+ }
2643
+ ) }),
2644
+ /* @__PURE__ */ jsx22(
2645
+ "input",
2646
+ {
2647
+ onChange: (e) => onChange(e.target.value),
2648
+ onBlur,
2649
+ onKeyDown: onKeydown,
2650
+ type: "search",
2651
+ className: cx3(
2652
+ "md:text-ilabel block w-full rounded-md border-0 pl-6 text-xs focus:ring-0 sm:pl-10 sm:text-sm",
2653
+ "h-[30px] py-1"
2654
+ ),
2655
+ placeholder,
2656
+ value,
2657
+ ref,
2658
+ ...args
2659
+ }
2660
+ ),
2661
+ addonButton
2662
+ ] })
2663
+ ] });
2664
+ });
2665
+ SearchInput.displayName = "SearchInput";
2666
+
2667
+ // src/common/Checkbox.tsx
2668
+ import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
2669
+ var Checkbox = ({
2670
+ checked,
2671
+ onChange,
2672
+ label,
2673
+ labelNode,
2674
+ id,
2675
+ name,
2676
+ inputProps,
2677
+ disabled,
2678
+ labelClassName,
2679
+ className
2680
+ }) => {
2681
+ return /* @__PURE__ */ jsxs20(
2682
+ "div",
2683
+ {
2684
+ className: cx3("inline-flex items-center gap-2", className),
2685
+ onClick: (e) => {
2686
+ e.stopPropagation();
2687
+ onChange?.(!checked);
2688
+ },
2689
+ children: [
2690
+ /* @__PURE__ */ jsx23(
2691
+ "input",
2692
+ {
2693
+ id,
2694
+ name,
2695
+ type: "checkbox",
2696
+ className: "text-primary-600 focus:ring-primary-500 h-4 w-4 rounded border-gray-300 ",
2697
+ disabled,
2698
+ checked,
2699
+ readOnly: true,
2700
+ ...inputProps
2701
+ }
2702
+ ),
2703
+ label && /* @__PURE__ */ jsx23(
2704
+ "span",
2705
+ {
2706
+ className: cx3(
2707
+ "text-ilabel text-gray font-medium",
2708
+ labelClassName
2709
+ ),
2710
+ children: label
2711
+ }
2712
+ ),
2713
+ labelNode
2714
+ ]
2715
+ }
2716
+ );
2717
+ };
2718
+
2719
+ // src/common/ProgressBar.tsx
2720
+ import { useMemo as useMemo5 } from "react";
2721
+ import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
2722
+ var defaultSegments = {
2723
+ 0.25: "from-cyan-600 to-cyan-500",
2724
+ 0.5: "from-cyan-500 to-orange-600",
2725
+ 0.75: "from-orange-600 to-red-600",
2726
+ 1: "from-red-600 to-red-700"
2727
+ };
2728
+ var ProgressBar = ({
2729
+ progress,
2730
+ segments = defaultSegments,
2731
+ gradient,
2732
+ upperTicks,
2733
+ lowerTicks,
2734
+ roundedFull
2735
+ }) => {
2736
+ const elements = useMemo5(() => {
2737
+ const result = [];
2738
+ const colors = Object.entries(segments).sort(
2739
+ (a, b) => parseFloat(a[0]) - parseFloat(b[0])
2740
+ );
2741
+ if (gradient) {
2742
+ let pos = 0;
2743
+ colors.forEach(([stop, color], idx) => {
2744
+ const width = (parseFloat(stop) - pos) * 100;
2745
+ result.push(
2746
+ /* @__PURE__ */ jsx24(
2747
+ "div",
2748
+ {
2749
+ className: cx3(
2750
+ `absolute top-0 h-4 bg-gradient-to-r ${color}`,
2751
+ idx === 0 && "rounded-l-full",
2752
+ idx === colors.length - 1 && "rounded-r-full"
2753
+ ),
2754
+ style: { left: `${pos * 100}%`, width: `${width}%` }
2755
+ },
2756
+ stop
2757
+ )
2758
+ );
2759
+ pos = parseFloat(stop);
2760
+ });
2761
+ } else {
2762
+ let pos = 0;
2763
+ for (const [stop, color] of colors) {
2764
+ const width = (parseFloat(stop) - pos) * 100;
2765
+ result.push(
2766
+ /* @__PURE__ */ jsx24(
2767
+ "div",
2768
+ {
2769
+ className: `absolute h-4 bg-${color} top-0 left-[${pos}] w-[${width}]`
2770
+ }
2771
+ )
2772
+ );
2773
+ pos = parseFloat(stop) * 100;
2774
+ }
2775
+ }
2776
+ return result;
2777
+ }, [segments, gradient]);
2778
+ const upperTicksElements = useMemo5(() => {
2779
+ if (!upperTicks) return null;
2780
+ return Object.entries(upperTicks).map(([p, label]) => {
2781
+ const pos = parseFloat(p);
2782
+ return /* @__PURE__ */ jsxs21(
2783
+ "div",
2784
+ {
2785
+ className: "absolute top-0 border-l border-gray-500 text-xs text-gray-500 hover:z-[1]",
2786
+ style: { left: `${pos * 100}%` },
2787
+ children: [
2788
+ /* @__PURE__ */ jsx24(
2789
+ "div",
2790
+ {
2791
+ className: cx3(
2792
+ "absolute w-fit -translate-y-full whitespace-nowrap text-gray-500",
2793
+ pos < 0.05 ? "-translate-x-1/4" : pos > 0.95 ? "-translate-x-3/4" : "-translate-x-1/2"
2794
+ ),
2795
+ children: label
2796
+ }
2797
+ ),
2798
+ /* @__PURE__ */ jsx24("div", { className: "absolute h-3 w-2 translate-y-1 border-l border-gray-400 border-opacity-50" })
2799
+ ]
2800
+ },
2801
+ pos
2802
+ );
2803
+ });
2804
+ }, [upperTicks]);
2805
+ const lowerTicksElements = useMemo5(() => {
2806
+ if (!lowerTicks) return null;
2807
+ return Object.entries(lowerTicks).map(([p, label]) => {
2808
+ const pos = parseFloat(p);
2809
+ return /* @__PURE__ */ jsxs21(
2810
+ "div",
2811
+ {
2812
+ className: "relative bottom-0 text-xs hover:z-[1]",
2813
+ style: { left: `${pos * 100}%` },
2814
+ children: [
2815
+ /* @__PURE__ */ jsx24("div", { className: "absolute top-0 h-3 w-2 border-l border-gray-400 border-opacity-50" }),
2816
+ /* @__PURE__ */ jsx24(
2817
+ "div",
2818
+ {
2819
+ className: cx3(
2820
+ "absolute translate-y-full text-gray-500",
2821
+ pos < 0.05 ? "-translate-x-1/4" : pos > 0.95 ? "-translate-x-3/4" : "-translate-x-1/2"
2822
+ ),
2823
+ children: label
2824
+ }
2825
+ )
2826
+ ]
2827
+ },
2828
+ pos
2829
+ );
2830
+ });
2831
+ }, [lowerTicks]);
2832
+ return /* @__PURE__ */ jsxs21("div", { className: "w-full", children: [
2833
+ /* @__PURE__ */ jsx24("div", { className: "relative h-4 w-full", children: upperTicksElements }),
2834
+ /* @__PURE__ */ jsxs21("div", { className: "relative h-4 w-full", children: [
2835
+ elements,
2836
+ /* @__PURE__ */ jsx24(
2837
+ "div",
2838
+ {
2839
+ className: cx3(
2840
+ progress === 0 ? "rounded-l-full" : "",
2841
+ `dark:bg-sentio-gray-400 absolute right-0 top-0 h-4 rounded-r-full bg-gray-300`
2842
+ ),
2843
+ style: { left: `${progress * 100}%` }
2844
+ }
2845
+ )
2846
+ ] }),
2847
+ /* @__PURE__ */ jsx24("div", { className: "relative h-4 w-full", children: lowerTicksElements })
2848
+ ] });
2849
+ };
2850
+
2851
+ // src/common/Descriptions.tsx
2852
+ import React6 from "react";
2853
+ import {
2854
+ isObjectLike,
2855
+ map,
2856
+ isFunction as isFunction4,
2857
+ isEmpty,
2858
+ isString as isString3,
2859
+ isNumber as isNumber2
2860
+ } from "lodash";
2861
+ import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
2862
+ function safeToString(value) {
2863
+ if (isString3(value) || isNumber2(value)) {
2864
+ return value;
2865
+ }
2866
+ try {
2867
+ return JSON.stringify(value);
2868
+ } catch {
2869
+ return "";
2870
+ }
2871
+ }
2872
+ var Descriptions = (props) => {
2873
+ const {
2874
+ data,
2875
+ labelStyle,
2876
+ valueStyle,
2877
+ className,
2878
+ labelClassName,
2879
+ valueClassName,
2880
+ trClassName,
2881
+ colon,
2882
+ renderLabel,
2883
+ renderValue
2884
+ } = props;
2885
+ return /* @__PURE__ */ jsx25("table", { className: cx3("w-full border-collapse", className), children: /* @__PURE__ */ jsx25("tbody", { children: data.map((item, index) => {
2886
+ return /* @__PURE__ */ jsxs22("tr", { className: trClassName, children: [
2887
+ /* @__PURE__ */ jsx25(
2888
+ "td",
2889
+ {
2890
+ className: cx3(
2891
+ "text-gray text-ilabel font-ilabel w-px whitespace-nowrap pr-8 align-text-bottom",
2892
+ labelClassName
2893
+ ),
2894
+ style: labelStyle,
2895
+ children: isFunction4(renderLabel) ? renderLabel?.(item) : item.label
2896
+ }
2897
+ ),
2898
+ colon,
2899
+ /* @__PURE__ */ jsx25(
2900
+ "td",
2901
+ {
2902
+ className: cx3(
2903
+ "text-ilabel font-ilabel",
2904
+ valueClassName
2905
+ ),
2906
+ style: valueStyle,
2907
+ children: React6.isValidElement(item.value) ? item.value : isObjectLike(item.value) ? isEmpty(item.value) ? /* @__PURE__ */ jsx25("div", { className: "text-gray-400", children: "{ }" }) : /* @__PURE__ */ jsxs22("div", { className: "space-y-2", children: [
2908
+ /* @__PURE__ */ jsx25("div", { className: "text-gray-400", children: "{" }),
2909
+ /* @__PURE__ */ jsx25(
2910
+ Descriptions,
2911
+ {
2912
+ ...props,
2913
+ data: map(item.value, (value, label) => ({
2914
+ key: `${item.key}.${label}`,
2915
+ label,
2916
+ value
2917
+ }))
2918
+ }
2919
+ ),
2920
+ /* @__PURE__ */ jsx25("div", { className: "text-gray-400", children: "}" })
2921
+ ] }) : isFunction4(renderValue) ? renderValue?.(item) : safeToString(item.value)
2922
+ }
2923
+ )
2924
+ ] }, item.key ?? index);
2925
+ }) }) });
2926
+ };
2927
+
2928
+ // src/common/Notification.tsx
2929
+ import { Fragment as Fragment8 } from "react";
2930
+ import { Transition as Transition4 } from "@headlessui/react";
2931
+ import { XMarkIcon as XIcon2 } from "@heroicons/react/20/solid";
2932
+ import {
2933
+ CheckCircleIcon,
2934
+ ExclamationCircleIcon as ExclamationCircleIcon2,
2935
+ InformationCircleIcon
2936
+ } from "@heroicons/react/24/outline";
2937
+ import { Fragment as Fragment9, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
2938
+ function Notification({
2939
+ show,
2940
+ setShow,
2941
+ title,
2942
+ message,
2943
+ buttons,
2944
+ type
2945
+ }) {
2946
+ let icon;
2947
+ switch (type) {
2948
+ case "success":
2949
+ icon = /* @__PURE__ */ jsx26(
2950
+ CheckCircleIcon,
2951
+ {
2952
+ className: "h-6 w-6 text-green-400",
2953
+ "aria-hidden": "true"
2954
+ }
2955
+ );
2956
+ break;
2957
+ case "error":
2958
+ icon = /* @__PURE__ */ jsx26(
2959
+ ExclamationCircleIcon2,
2960
+ {
2961
+ className: "h-6 w-6 text-red-400",
2962
+ "aria-hidden": "true"
2963
+ }
2964
+ );
2965
+ break;
2966
+ case "warning":
2967
+ icon = /* @__PURE__ */ jsx26(
2968
+ ExclamationCircleIcon2,
2969
+ {
2970
+ className: "h-6 w-6 text-yellow-400",
2971
+ "aria-hidden": "true"
2972
+ }
2973
+ );
2974
+ break;
2975
+ case "info":
2976
+ icon = /* @__PURE__ */ jsx26(
2977
+ InformationCircleIcon,
2978
+ {
2979
+ className: "h-6 w-6 text-blue-400",
2980
+ "aria-hidden": "true"
2981
+ }
2982
+ );
2983
+ break;
2984
+ }
2985
+ return /* @__PURE__ */ jsx26(Fragment9, { children: /* @__PURE__ */ jsx26(
2986
+ "div",
2987
+ {
2988
+ "aria-live": "assertive",
2989
+ className: "pointer-events-none fixed inset-0 z-40 flex items-end px-4 py-6 sm:items-start sm:p-6",
2990
+ onClick: (evt) => {
2991
+ evt.stopPropagation();
2992
+ },
2993
+ children: /* @__PURE__ */ jsx26("div", { className: "flex w-full flex-col items-center space-y-4 sm:items-end", children: /* @__PURE__ */ jsx26(
2994
+ Transition4,
2995
+ {
2996
+ show,
2997
+ as: Fragment8,
2998
+ enter: "transform ease-out duration-300 transition",
2999
+ enterFrom: "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",
3000
+ enterTo: "translate-y-0 opacity-100 sm:translate-x-0",
3001
+ leave: "transition ease-in duration-100",
3002
+ leaveFrom: "opacity-100",
3003
+ leaveTo: "opacity-0",
3004
+ children: /* @__PURE__ */ jsx26("div", { className: "dark:bg-sentio-gray-100 pointer-events-auto w-full max-w-sm rounded-lg bg-white shadow-lg ring-1 ring-black ring-opacity-5 dark:ring-gray-100", children: /* @__PURE__ */ jsx26("div", { className: "p-4", children: /* @__PURE__ */ jsxs23("div", { className: "flex items-start", children: [
3005
+ /* @__PURE__ */ jsx26("div", { className: "flex-shrink-0", children: icon }),
3006
+ /* @__PURE__ */ jsxs23("div", { className: "ml-3 w-0 flex-1", children: [
3007
+ /* @__PURE__ */ jsx26("p", { className: "text-text-foreground text-sm font-medium", children: title }),
3008
+ /* @__PURE__ */ jsx26("p", { className: "mt-1 text-sm text-gray-500", children: message }),
3009
+ buttons && /* @__PURE__ */ jsx26("div", { className: "mt-4 flex", children: buttons() })
3010
+ ] }),
3011
+ /* @__PURE__ */ jsx26("div", { className: "ml-4 flex flex-shrink-0", children: /* @__PURE__ */ jsxs23(
3012
+ "button",
3013
+ {
3014
+ type: "button",
3015
+ className: "focus:ring-primary-500 dark:bg-sentio-gray-100 inline-flex rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2",
3016
+ onClick: () => {
3017
+ setShow(false);
3018
+ },
3019
+ children: [
3020
+ /* @__PURE__ */ jsx26("span", { className: "sr-only", children: "Close" }),
3021
+ /* @__PURE__ */ jsx26(XIcon2, { className: "h-5 w-5", "aria-hidden": "true" })
3022
+ ]
3023
+ }
3024
+ ) })
3025
+ ] }) }) })
3026
+ }
3027
+ ) })
3028
+ }
3029
+ ) });
3030
+ }
3031
+
2212
3032
  // src/common/table/ResizeTable.tsx
2213
3033
  import {
2214
- forwardRef as forwardRef4,
3034
+ forwardRef as forwardRef5,
2215
3035
  memo as memo5,
2216
- useCallback as useCallback7,
2217
- useEffect as useEffect8,
2218
- useMemo as useMemo6,
2219
- useRef as useRef6,
2220
- useState as useState11
3036
+ useCallback as useCallback8,
3037
+ useEffect as useEffect10,
3038
+ useMemo as useMemo7,
3039
+ useRef as useRef8,
3040
+ useState as useState13
2221
3041
  } from "react";
2222
3042
  import {
2223
3043
  useReactTable,
@@ -2235,14 +3055,14 @@ import { debounce, isEqual as isEqual2 } from "lodash";
2235
3055
 
2236
3056
  // src/common/menu/PopupMenuButton.tsx
2237
3057
  import {
2238
- Fragment as Fragment5,
2239
- useState as useState10,
3058
+ Fragment as Fragment10,
3059
+ useState as useState12,
2240
3060
  useContext as useContext6,
2241
- useMemo as useMemo5,
2242
- useEffect as useEffect7,
2243
- useRef as useRef5
3061
+ useMemo as useMemo6,
3062
+ useEffect as useEffect9,
3063
+ useRef as useRef7
2244
3064
  } from "react";
2245
- import { Menu as Menu2, Transition as Transition2 } from "@headlessui/react";
3065
+ import { Menu as Menu2, Transition as Transition5 } from "@headlessui/react";
2246
3066
  import {
2247
3067
  FloatingPortal as FloatingPortal2,
2248
3068
  useFloating as useFloating3,
@@ -2253,7 +3073,7 @@ import {
2253
3073
  } from "@floating-ui/react";
2254
3074
 
2255
3075
  // src/common/menu/SubMenu.tsx
2256
- import { useState as useState9, createContext as createContext4, useContext as useContext5 } from "react";
3076
+ import { useState as useState11, createContext as createContext4, useContext as useContext5 } from "react";
2257
3077
  import {
2258
3078
  useFloating as useFloating2,
2259
3079
  useHover as useHover2,
@@ -2266,7 +3086,7 @@ import {
2266
3086
  import { Menu } from "@headlessui/react";
2267
3087
  import { HiCheck } from "react-icons/hi";
2268
3088
  import { ChevronRightIcon } from "@heroicons/react/20/solid";
2269
- import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
3089
+ import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
2270
3090
  var COLOR_MAP = {
2271
3091
  default: {
2272
3092
  active: "bg-gray-100 text-text-foreground dark:bg-primary-600 dark:text-white",
@@ -2282,9 +3102,9 @@ var COLOR_MAP = {
2282
3102
  var MenuContext = createContext4({});
2283
3103
  var MenuItem = ({ item, onSelect, labelClassName }) => {
2284
3104
  const { selectedKey } = useContext5(MenuContext);
2285
- return /* @__PURE__ */ jsx19(Menu.Item, { disabled: item.disabled, children: ({ active }) => {
3105
+ return /* @__PURE__ */ jsx27(Menu.Item, { disabled: item.disabled, children: ({ active }) => {
2286
3106
  if (item.items) {
2287
- return /* @__PURE__ */ jsx19(
3107
+ return /* @__PURE__ */ jsx27(
2288
3108
  SubMenuButton,
2289
3109
  {
2290
3110
  items: item.items,
@@ -2297,7 +3117,7 @@ var MenuItem = ({ item, onSelect, labelClassName }) => {
2297
3117
  item.key
2298
3118
  );
2299
3119
  }
2300
- const buttonNode = /* @__PURE__ */ jsxs16(
3120
+ const buttonNode = /* @__PURE__ */ jsxs24(
2301
3121
  "button",
2302
3122
  {
2303
3123
  onClick: (e) => onSelect?.(item.key, e, item),
@@ -2308,7 +3128,7 @@ var MenuItem = ({ item, onSelect, labelClassName }) => {
2308
3128
  disabled: item.disabled,
2309
3129
  children: [
2310
3130
  item.icon,
2311
- /* @__PURE__ */ jsx19(
3131
+ /* @__PURE__ */ jsx27(
2312
3132
  "span",
2313
3133
  {
2314
3134
  className: cx3(
@@ -2318,15 +3138,15 @@ var MenuItem = ({ item, onSelect, labelClassName }) => {
2318
3138
  children: item.label
2319
3139
  }
2320
3140
  ),
2321
- item.key === selectedKey ? /* @__PURE__ */ jsx19(HiCheck, { className: "icon-lg ml-2" }) : null
3141
+ item.key === selectedKey ? /* @__PURE__ */ jsx27(HiCheck, { className: "icon-lg ml-2" }) : null
2322
3142
  ]
2323
3143
  }
2324
3144
  );
2325
3145
  if (item.disabled && item.disabledHint) {
2326
- return /* @__PURE__ */ jsx19(
3146
+ return /* @__PURE__ */ jsx27(
2327
3147
  PopoverTooltip,
2328
3148
  {
2329
- text: /* @__PURE__ */ jsx19("span", { className: "text-icontent font-icontent text-gray cursor-auto", children: item.disabledHint }),
3149
+ text: /* @__PURE__ */ jsx27("span", { className: "text-icontent font-icontent text-gray cursor-auto", children: item.disabledHint }),
2330
3150
  strategy: "fixed",
2331
3151
  children: buttonNode
2332
3152
  }
@@ -2346,7 +3166,7 @@ var SubMenuButton = (props) => {
2346
3166
  placement = "right-start",
2347
3167
  buttonClass: buttonClass3
2348
3168
  } = props;
2349
- const [open, setOpen] = useState9(false);
3169
+ const [open, setOpen] = useState11(false);
2350
3170
  const { refs, floatingStyles, context } = useFloating2({
2351
3171
  open,
2352
3172
  onOpenChange: setOpen,
@@ -2359,7 +3179,7 @@ var SubMenuButton = (props) => {
2359
3179
  handleClose: safePolygon2()
2360
3180
  })
2361
3181
  ]);
2362
- return /* @__PURE__ */ jsxs16(
3182
+ return /* @__PURE__ */ jsxs24(
2363
3183
  Menu,
2364
3184
  {
2365
3185
  as: "div",
@@ -2369,7 +3189,7 @@ var SubMenuButton = (props) => {
2369
3189
  disabled ? "pointer-events-none cursor-not-allowed text-gray-400" : "cursor-pointer"
2370
3190
  ),
2371
3191
  children: [
2372
- /* @__PURE__ */ jsxs16(
3192
+ /* @__PURE__ */ jsxs24(
2373
3193
  Menu.Button,
2374
3194
  {
2375
3195
  className: cx3(
@@ -2385,8 +3205,8 @@ var SubMenuButton = (props) => {
2385
3205
  ...getReferenceProps,
2386
3206
  children: [
2387
3207
  props.icon,
2388
- /* @__PURE__ */ jsx19("span", { className: "flex-shrink flex-grow text-left", children: label }),
2389
- /* @__PURE__ */ jsx19(
3208
+ /* @__PURE__ */ jsx27("span", { className: "flex-shrink flex-grow text-left", children: label }),
3209
+ /* @__PURE__ */ jsx27(
2390
3210
  ChevronRightIcon,
2391
3211
  {
2392
3212
  className: cx3(
@@ -2400,7 +3220,7 @@ var SubMenuButton = (props) => {
2400
3220
  ]
2401
3221
  }
2402
3222
  ),
2403
- open && /* @__PURE__ */ jsx19(
3223
+ open && /* @__PURE__ */ jsx27(
2404
3224
  Menu.Items,
2405
3225
  {
2406
3226
  static: true,
@@ -2409,12 +3229,12 @@ var SubMenuButton = (props) => {
2409
3229
  className: "dark:bg-sentio-gray-100 dark:divide-sentio-gray-400/50 w-48 origin-top cursor-pointer divide-y divide-gray-200 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:ring-gray-100",
2410
3230
  ...getFloatingProps,
2411
3231
  children: items.map(
2412
- (items2, i) => items2 && items2.length > 0 ? /* @__PURE__ */ jsx19(
3232
+ (items2, i) => items2 && items2.length > 0 ? /* @__PURE__ */ jsx27(
2413
3233
  "div",
2414
3234
  {
2415
3235
  className: "overflow-auto py-1",
2416
3236
  style: { maxHeight: "60vh" },
2417
- children: items2.map((item) => /* @__PURE__ */ jsx19(MenuItem, { item, onSelect }, item.key))
3237
+ children: items2.map((item) => /* @__PURE__ */ jsx27(MenuItem, { item, onSelect }, item.key))
2418
3238
  },
2419
3239
  i
2420
3240
  ) : null
@@ -2438,7 +3258,7 @@ var NavSizeContext = createContext5({
2438
3258
  });
2439
3259
 
2440
3260
  // src/common/menu/PopupMenuButton.tsx
2441
- import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
3261
+ import { Fragment as Fragment11, jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
2442
3262
  function PopupMenuButton({
2443
3263
  buttonIcon,
2444
3264
  items,
@@ -2458,7 +3278,7 @@ function PopupMenuButton({
2458
3278
  selectedKey,
2459
3279
  onOpenCallback
2460
3280
  }) {
2461
- const [menuOpen, setMenuOpen] = useState10(false);
3281
+ const [menuOpen, setMenuOpen] = useState12(false);
2462
3282
  const { small } = useContext6(NavSizeContext);
2463
3283
  const { refs, floatingStyles, context } = useFloating3({
2464
3284
  open: menuOpen,
@@ -2467,64 +3287,72 @@ function PopupMenuButton({
2467
3287
  placement,
2468
3288
  whileElementsMounted: autoUpdate3
2469
3289
  });
2470
- const itemStyle = useMemo5(() => {
3290
+ const itemStyle = useMemo6(() => {
2471
3291
  return {
2472
3292
  width
2473
3293
  };
2474
3294
  }, [width]);
2475
- const onOpenCallbackRef = useRef5(onOpenCallback);
3295
+ const onOpenCallbackRef = useRef7(onOpenCallback);
2476
3296
  onOpenCallbackRef.current = onOpenCallback;
2477
- useEffect7(() => {
3297
+ useEffect9(() => {
2478
3298
  if (menuOpen) {
2479
3299
  onOpenCallbackRef.current?.();
2480
3300
  }
2481
3301
  }, [menuOpen]);
2482
3302
  let menuItems = null;
2483
3303
  if (menuOpen && items.length > 0) {
2484
- menuItems = /* @__PURE__ */ jsx20(MenuContext.Provider, { value: { selectedKey }, children: /* @__PURE__ */ jsx20("div", { ref: refs.setFloating, style: floatingStyles, className: small ? "z-10" : "z-[100]", children: /* @__PURE__ */ jsx20(
2485
- Transition2,
3304
+ menuItems = /* @__PURE__ */ jsx28(MenuContext.Provider, { value: { selectedKey }, children: /* @__PURE__ */ jsx28(
3305
+ "div",
2486
3306
  {
2487
- as: Fragment5,
2488
- enter: "transition ease-out duration-100",
2489
- enterFrom: "transform opacity-0 scale-95",
2490
- enterTo: "transform opacity-100 scale-100",
2491
- leave: "transition ease-in duration-75",
2492
- leaveFrom: "transform opacity-100 scale-100",
2493
- leaveTo: "transform opacity-0 scale-95",
2494
- children: /* @__PURE__ */ jsxs17(
2495
- Menu2.Items,
3307
+ ref: refs.setFloating,
3308
+ style: floatingStyles,
3309
+ className: small ? "z-10" : "z-[100]",
3310
+ children: /* @__PURE__ */ jsx28(
3311
+ Transition5,
2496
3312
  {
2497
- className: "dark:bg-sentio-gray-200 dark:divide-sentio-gray-400/50 z-10 mt-1 w-[80vw] origin-top cursor-pointer divide-y divide-gray-200 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:ring-gray-100 sm:w-64",
2498
- style: itemStyle,
2499
- children: [
2500
- header,
2501
- /* @__PURE__ */ jsx20("div", { className: `${itemsClassName} divide-y`, children: items.map((items2, i) => /* @__PURE__ */ jsxs17("div", { className: "py-1", children: [
2502
- groupLabels?.[i] ? /* @__PURE__ */ jsx20("div", { className: "px-4 py-0.5 text-[10px] font-medium leading-[12px] text-gray-500", children: groupLabels[i] }) : null,
2503
- items2.map(
2504
- (item) => renderItem ? renderItem(item) : /* @__PURE__ */ jsx20(
2505
- MenuItem,
2506
- {
2507
- item,
2508
- onSelect,
2509
- labelClassName: itemLabelClassName
2510
- },
2511
- item.key
2512
- )
2513
- )
2514
- ] }, i)) }),
2515
- footer
2516
- ]
3313
+ as: Fragment10,
3314
+ enter: "transition ease-out duration-100",
3315
+ enterFrom: "transform opacity-0 scale-95",
3316
+ enterTo: "transform opacity-100 scale-100",
3317
+ leave: "transition ease-in duration-75",
3318
+ leaveFrom: "transform opacity-100 scale-100",
3319
+ leaveTo: "transform opacity-0 scale-95",
3320
+ children: /* @__PURE__ */ jsxs25(
3321
+ Menu2.Items,
3322
+ {
3323
+ className: "dark:bg-sentio-gray-200 dark:divide-sentio-gray-400/50 z-10 mt-1 w-[80vw] origin-top cursor-pointer divide-y divide-gray-200 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:ring-gray-100 sm:w-64",
3324
+ style: itemStyle,
3325
+ children: [
3326
+ header,
3327
+ /* @__PURE__ */ jsx28("div", { className: `${itemsClassName} divide-y`, children: items.map((items2, i) => /* @__PURE__ */ jsxs25("div", { className: "py-1", children: [
3328
+ groupLabels?.[i] ? /* @__PURE__ */ jsx28("div", { className: "px-4 py-0.5 text-[10px] font-medium leading-[12px] text-gray-500", children: groupLabels[i] }) : null,
3329
+ items2.map(
3330
+ (item) => renderItem ? renderItem(item) : /* @__PURE__ */ jsx28(
3331
+ MenuItem,
3332
+ {
3333
+ item,
3334
+ onSelect,
3335
+ labelClassName: itemLabelClassName
3336
+ },
3337
+ item.key
3338
+ )
3339
+ )
3340
+ ] }, i)) }),
3341
+ footer
3342
+ ]
3343
+ }
3344
+ )
2517
3345
  }
2518
3346
  )
2519
3347
  }
2520
- ) }) });
3348
+ ) });
2521
3349
  }
2522
- return /* @__PURE__ */ jsx20(Menu2, { children: ({ open }) => {
3350
+ return /* @__PURE__ */ jsx28(Menu2, { children: ({ open }) => {
2523
3351
  setTimeout(() => {
2524
3352
  setMenuOpen(open);
2525
3353
  }, 0);
2526
- return /* @__PURE__ */ jsxs17(Fragment6, { children: [
2527
- /* @__PURE__ */ jsx20(
3354
+ return /* @__PURE__ */ jsxs25(Fragment11, { children: [
3355
+ /* @__PURE__ */ jsx28(
2528
3356
  Menu2.Button,
2529
3357
  {
2530
3358
  className: cx3(
@@ -2537,14 +3365,14 @@ function PopupMenuButton({
2537
3365
  children: typeof buttonIcon === "function" ? buttonIcon(menuOpen) : buttonIcon
2538
3366
  }
2539
3367
  ),
2540
- portal ? /* @__PURE__ */ jsx20(FloatingPortal2, { children: menuItems }) : menuItems
3368
+ portal ? /* @__PURE__ */ jsx28(FloatingPortal2, { children: menuItems }) : menuItems
2541
3369
  ] });
2542
3370
  } });
2543
3371
  }
2544
3372
 
2545
3373
  // src/common/table/Icons.tsx
2546
- import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
2547
- var MoveLeftIcon = (props) => /* @__PURE__ */ jsxs18(
3374
+ import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
3375
+ var MoveLeftIcon = (props) => /* @__PURE__ */ jsxs26(
2548
3376
  "svg",
2549
3377
  {
2550
3378
  width: "16",
@@ -2554,8 +3382,8 @@ var MoveLeftIcon = (props) => /* @__PURE__ */ jsxs18(
2554
3382
  xmlns: "http://www.w3.org/2000/svg",
2555
3383
  ...props,
2556
3384
  children: [
2557
- /* @__PURE__ */ jsxs18("g", { clipPath: "url(#clip0_6869_7300)", children: [
2558
- /* @__PURE__ */ jsx21(
3385
+ /* @__PURE__ */ jsxs26("g", { clipPath: "url(#clip0_6869_7300)", children: [
3386
+ /* @__PURE__ */ jsx29(
2559
3387
  "path",
2560
3388
  {
2561
3389
  d: "M2.66666 8H9.33332",
@@ -2565,7 +3393,7 @@ var MoveLeftIcon = (props) => /* @__PURE__ */ jsxs18(
2565
3393
  strokeLinejoin: "round"
2566
3394
  }
2567
3395
  ),
2568
- /* @__PURE__ */ jsx21(
3396
+ /* @__PURE__ */ jsx29(
2569
3397
  "path",
2570
3398
  {
2571
3399
  d: "M2.66666 8L5.33332 10.6667",
@@ -2575,7 +3403,7 @@ var MoveLeftIcon = (props) => /* @__PURE__ */ jsxs18(
2575
3403
  strokeLinejoin: "round"
2576
3404
  }
2577
3405
  ),
2578
- /* @__PURE__ */ jsx21(
3406
+ /* @__PURE__ */ jsx29(
2579
3407
  "path",
2580
3408
  {
2581
3409
  d: "M2.66669 7.9987L5.33335 5.33203",
@@ -2585,7 +3413,7 @@ var MoveLeftIcon = (props) => /* @__PURE__ */ jsxs18(
2585
3413
  strokeLinejoin: "round"
2586
3414
  }
2587
3415
  ),
2588
- /* @__PURE__ */ jsx21(
3416
+ /* @__PURE__ */ jsx29(
2589
3417
  "path",
2590
3418
  {
2591
3419
  d: "M13.3333 2.66797V13.3346",
@@ -2596,11 +3424,11 @@ var MoveLeftIcon = (props) => /* @__PURE__ */ jsxs18(
2596
3424
  }
2597
3425
  )
2598
3426
  ] }),
2599
- /* @__PURE__ */ jsx21("defs", { children: /* @__PURE__ */ jsx21("clipPath", { id: "clip0_6869_7300", children: /* @__PURE__ */ jsx21("rect", { width: "16", height: "16", fill: "white" }) }) })
3427
+ /* @__PURE__ */ jsx29("defs", { children: /* @__PURE__ */ jsx29("clipPath", { id: "clip0_6869_7300", children: /* @__PURE__ */ jsx29("rect", { width: "16", height: "16", fill: "white" }) }) })
2600
3428
  ]
2601
3429
  }
2602
3430
  );
2603
- var MoveRightIcon = (props) => /* @__PURE__ */ jsxs18(
3431
+ var MoveRightIcon = (props) => /* @__PURE__ */ jsxs26(
2604
3432
  "svg",
2605
3433
  {
2606
3434
  width: "16",
@@ -2610,8 +3438,8 @@ var MoveRightIcon = (props) => /* @__PURE__ */ jsxs18(
2610
3438
  xmlns: "http://www.w3.org/2000/svg",
2611
3439
  ...props,
2612
3440
  children: [
2613
- /* @__PURE__ */ jsxs18("g", { clipPath: "url(#clip0_6869_7309)", children: [
2614
- /* @__PURE__ */ jsx21(
3441
+ /* @__PURE__ */ jsxs26("g", { clipPath: "url(#clip0_6869_7309)", children: [
3442
+ /* @__PURE__ */ jsx29(
2615
3443
  "path",
2616
3444
  {
2617
3445
  d: "M13.3333 8H6.66666",
@@ -2621,7 +3449,7 @@ var MoveRightIcon = (props) => /* @__PURE__ */ jsxs18(
2621
3449
  strokeLinejoin: "round"
2622
3450
  }
2623
3451
  ),
2624
- /* @__PURE__ */ jsx21(
3452
+ /* @__PURE__ */ jsx29(
2625
3453
  "path",
2626
3454
  {
2627
3455
  d: "M13.3333 8L10.6667 10.6667",
@@ -2631,7 +3459,7 @@ var MoveRightIcon = (props) => /* @__PURE__ */ jsxs18(
2631
3459
  strokeLinejoin: "round"
2632
3460
  }
2633
3461
  ),
2634
- /* @__PURE__ */ jsx21(
3462
+ /* @__PURE__ */ jsx29(
2635
3463
  "path",
2636
3464
  {
2637
3465
  d: "M13.3334 7.9987L10.6667 5.33203",
@@ -2641,7 +3469,7 @@ var MoveRightIcon = (props) => /* @__PURE__ */ jsxs18(
2641
3469
  strokeLinejoin: "round"
2642
3470
  }
2643
3471
  ),
2644
- /* @__PURE__ */ jsx21(
3472
+ /* @__PURE__ */ jsx29(
2645
3473
  "path",
2646
3474
  {
2647
3475
  d: "M2.66669 2.66797V13.3346",
@@ -2652,11 +3480,11 @@ var MoveRightIcon = (props) => /* @__PURE__ */ jsxs18(
2652
3480
  }
2653
3481
  )
2654
3482
  ] }),
2655
- /* @__PURE__ */ jsx21("defs", { children: /* @__PURE__ */ jsx21("clipPath", { id: "clip0_6869_7309", children: /* @__PURE__ */ jsx21("rect", { width: "16", height: "16", fill: "white" }) }) })
3483
+ /* @__PURE__ */ jsx29("defs", { children: /* @__PURE__ */ jsx29("clipPath", { id: "clip0_6869_7309", children: /* @__PURE__ */ jsx29("rect", { width: "16", height: "16", fill: "white" }) }) })
2656
3484
  ]
2657
3485
  }
2658
3486
  );
2659
- var RenameIcon = (props) => /* @__PURE__ */ jsxs18(
3487
+ var RenameIcon = (props) => /* @__PURE__ */ jsxs26(
2660
3488
  "svg",
2661
3489
  {
2662
3490
  width: "16",
@@ -2666,7 +3494,7 @@ var RenameIcon = (props) => /* @__PURE__ */ jsxs18(
2666
3494
  xmlns: "http://www.w3.org/2000/svg",
2667
3495
  ...props,
2668
3496
  children: [
2669
- /* @__PURE__ */ jsx21(
3497
+ /* @__PURE__ */ jsx29(
2670
3498
  "path",
2671
3499
  {
2672
3500
  d: "M8 13.3281H14",
@@ -2676,7 +3504,7 @@ var RenameIcon = (props) => /* @__PURE__ */ jsxs18(
2676
3504
  strokeLinejoin: "round"
2677
3505
  }
2678
3506
  ),
2679
- /* @__PURE__ */ jsx21(
3507
+ /* @__PURE__ */ jsx29(
2680
3508
  "path",
2681
3509
  {
2682
3510
  d: "M11 2.33609C11.2652 2.07087 11.6249 1.92188 12 1.92188C12.1857 1.92188 12.3696 1.95845 12.5412 2.02953C12.7128 2.1006 12.8687 2.20477 13 2.33609C13.1313 2.46741 13.2355 2.62331 13.3066 2.79489C13.3776 2.96647 13.4142 3.15037 13.4142 3.33609C13.4142 3.52181 13.3776 3.7057 13.3066 3.87728C13.2355 4.04886 13.1313 4.20477 13 4.33609L4.66667 12.6694L2 13.3361L2.66667 10.6694L11 2.33609Z",
@@ -2689,7 +3517,7 @@ var RenameIcon = (props) => /* @__PURE__ */ jsxs18(
2689
3517
  ]
2690
3518
  }
2691
3519
  );
2692
- var DeleteIcon = (props) => /* @__PURE__ */ jsxs18(
3520
+ var DeleteIcon = (props) => /* @__PURE__ */ jsxs26(
2693
3521
  "svg",
2694
3522
  {
2695
3523
  width: "16",
@@ -2699,8 +3527,8 @@ var DeleteIcon = (props) => /* @__PURE__ */ jsxs18(
2699
3527
  xmlns: "http://www.w3.org/2000/svg",
2700
3528
  ...props,
2701
3529
  children: [
2702
- /* @__PURE__ */ jsxs18("g", { clipPath: "url(#clip0_6869_7344)", children: [
2703
- /* @__PURE__ */ jsx21(
3530
+ /* @__PURE__ */ jsxs26("g", { clipPath: "url(#clip0_6869_7344)", children: [
3531
+ /* @__PURE__ */ jsx29(
2704
3532
  "path",
2705
3533
  {
2706
3534
  d: "M2.66669 4.66797H13.3334",
@@ -2710,7 +3538,7 @@ var DeleteIcon = (props) => /* @__PURE__ */ jsxs18(
2710
3538
  strokeLinejoin: "round"
2711
3539
  }
2712
3540
  ),
2713
- /* @__PURE__ */ jsx21(
3541
+ /* @__PURE__ */ jsx29(
2714
3542
  "path",
2715
3543
  {
2716
3544
  d: "M6.66669 7.33203V11.332",
@@ -2720,7 +3548,7 @@ var DeleteIcon = (props) => /* @__PURE__ */ jsxs18(
2720
3548
  strokeLinejoin: "round"
2721
3549
  }
2722
3550
  ),
2723
- /* @__PURE__ */ jsx21(
3551
+ /* @__PURE__ */ jsx29(
2724
3552
  "path",
2725
3553
  {
2726
3554
  d: "M9.33331 7.33203V11.332",
@@ -2730,7 +3558,7 @@ var DeleteIcon = (props) => /* @__PURE__ */ jsxs18(
2730
3558
  strokeLinejoin: "round"
2731
3559
  }
2732
3560
  ),
2733
- /* @__PURE__ */ jsx21(
3561
+ /* @__PURE__ */ jsx29(
2734
3562
  "path",
2735
3563
  {
2736
3564
  d: "M3.33331 4.66797L3.99998 12.668C3.99998 13.0216 4.14046 13.3607 4.3905 13.6108C4.64055 13.8608 4.97969 14.0013 5.33331 14.0013H10.6666C11.0203 14.0013 11.3594 13.8608 11.6095 13.6108C11.8595 13.3607 12 13.0216 12 12.668L12.6666 4.66797",
@@ -2740,7 +3568,7 @@ var DeleteIcon = (props) => /* @__PURE__ */ jsxs18(
2740
3568
  strokeLinejoin: "round"
2741
3569
  }
2742
3570
  ),
2743
- /* @__PURE__ */ jsx21(
3571
+ /* @__PURE__ */ jsx29(
2744
3572
  "path",
2745
3573
  {
2746
3574
  d: "M6 4.66667V2.66667C6 2.48986 6.07024 2.32029 6.19526 2.19526C6.32029 2.07024 6.48986 2 6.66667 2H9.33333C9.51014 2 9.67971 2.07024 9.80474 2.19526C9.92976 2.32029 10 2.48986 10 2.66667V4.66667",
@@ -2751,14 +3579,14 @@ var DeleteIcon = (props) => /* @__PURE__ */ jsxs18(
2751
3579
  }
2752
3580
  )
2753
3581
  ] }),
2754
- /* @__PURE__ */ jsx21("defs", { children: /* @__PURE__ */ jsx21("clipPath", { id: "clip0_6869_7344", children: /* @__PURE__ */ jsx21("rect", { width: "16", height: "16", fill: "white" }) }) })
3582
+ /* @__PURE__ */ jsx29("defs", { children: /* @__PURE__ */ jsx29("clipPath", { id: "clip0_6869_7344", children: /* @__PURE__ */ jsx29("rect", { width: "16", height: "16", fill: "white" }) }) })
2755
3583
  ]
2756
3584
  }
2757
3585
  );
2758
3586
 
2759
3587
  // src/common/table/ResizeTable.tsx
2760
3588
  import { IoReload } from "react-icons/io5";
2761
- import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
3589
+ import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
2762
3590
  var reorder = (list, startIndex, endIndex) => {
2763
3591
  const result = Array.from(list);
2764
3592
  const [removed] = result.splice(startIndex, 1);
@@ -2768,7 +3596,7 @@ var reorder = (list, startIndex, endIndex) => {
2768
3596
  function onPreventClick(e) {
2769
3597
  e.stopPropagation();
2770
3598
  }
2771
- var _ResizeTable = forwardRef4(function _ResizeTable2({
3599
+ var _ResizeTable = forwardRef5(function _ResizeTable2({
2772
3600
  data,
2773
3601
  columns,
2774
3602
  columnResizeMode,
@@ -2792,7 +3620,7 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
2792
3620
  estimatedRowHeight = 35,
2793
3621
  overscan = 5
2794
3622
  }, tableContainerRef) {
2795
- const adjustedColumns = useMemo6(() => {
3623
+ const adjustedColumns = useMemo7(() => {
2796
3624
  let totalWidth = 0;
2797
3625
  const newColumns = columns.map((c) => {
2798
3626
  const item = Object.assign({ minSize }, c);
@@ -2811,7 +3639,7 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
2811
3639
  }
2812
3640
  return newColumns;
2813
3641
  }, [columns, minSize, minWidth]);
2814
- const [tableState, setTableState] = useState11(() => {
3642
+ const [tableState, setTableState] = useState13(() => {
2815
3643
  const initialState = {
2816
3644
  pagination: {
2817
3645
  pageIndex: 0,
@@ -2831,7 +3659,7 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
2831
3659
  onStateChange: setTableState,
2832
3660
  manualSorting
2833
3661
  });
2834
- useEffect8(() => {
3662
+ useEffect10(() => {
2835
3663
  if (state && Object.keys(state).length > 0) {
2836
3664
  setTableState((prev) => {
2837
3665
  const newState = {
@@ -2843,14 +3671,14 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
2843
3671
  });
2844
3672
  }
2845
3673
  }, [state]);
2846
- const debounceStateChange = useMemo6(() => {
3674
+ const debounceStateChange = useMemo7(() => {
2847
3675
  if (!onStateChange) return void 0;
2848
3676
  return debounce(onStateChange, 500, {});
2849
3677
  }, [onStateChange]);
2850
- useEffect8(() => {
3678
+ useEffect10(() => {
2851
3679
  debounceStateChange?.(tableState);
2852
3680
  }, [debounceStateChange, tableState]);
2853
- const fetchMoreOnBottomReached = useMemo6(() => {
3681
+ const fetchMoreOnBottomReached = useMemo7(() => {
2854
3682
  return debounce((containerRefElement) => {
2855
3683
  if (containerRefElement) {
2856
3684
  const { scrollHeight, scrollTop, clientHeight } = containerRefElement;
@@ -2860,8 +3688,8 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
2860
3688
  }
2861
3689
  }, 500);
2862
3690
  }, [onFetchMore, isFetching, hasMore]);
2863
- const tableContainerElementRef = useRef6(null);
2864
- useEffect8(() => {
3691
+ const tableContainerElementRef = useRef8(null);
3692
+ useEffect10(() => {
2865
3693
  if (tableContainerRef) {
2866
3694
  if (typeof tableContainerRef === "function") {
2867
3695
  tableContainerRef(tableContainerElementRef.current);
@@ -2873,21 +3701,21 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
2873
3701
  const rowVirtualizer = useVirtualizer2({
2874
3702
  count: enableVirtualization ? table.getRowModel().rows.length : 0,
2875
3703
  getScrollElement: () => tableContainerElementRef.current,
2876
- estimateSize: useCallback7(() => estimatedRowHeight, [estimatedRowHeight]),
3704
+ estimateSize: useCallback8(() => estimatedRowHeight, [estimatedRowHeight]),
2877
3705
  overscan,
2878
3706
  enabled: enableVirtualization
2879
3707
  });
2880
3708
  const virtualRows = enableVirtualization ? rowVirtualizer.getVirtualItems() : [];
2881
3709
  const paddingTop = enableVirtualization && virtualRows.length > 0 ? virtualRows[0].start : 0;
2882
3710
  const paddingBottom = enableVirtualization && virtualRows.length > 0 ? rowVirtualizer.getTotalSize() - (virtualRows[virtualRows.length - 1].start + virtualRows[virtualRows.length - 1].size) : 0;
2883
- return /* @__PURE__ */ jsx22(
3711
+ return /* @__PURE__ */ jsx30(
2884
3712
  "div",
2885
3713
  {
2886
3714
  className: "overflow-auto",
2887
3715
  style: height ? { height } : void 0,
2888
3716
  ref: tableContainerElementRef,
2889
3717
  onScroll: (e) => fetchMoreOnBottomReached(e.target),
2890
- children: /* @__PURE__ */ jsxs19(
3718
+ children: /* @__PURE__ */ jsxs27(
2891
3719
  "table",
2892
3720
  {
2893
3721
  className: "w-fit",
@@ -2897,11 +3725,11 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
2897
3725
  }
2898
3726
  },
2899
3727
  children: [
2900
- /* @__PURE__ */ jsx22("thead", { className: "dark:bg-sentio-gray-100 sticky top-0 z-[1] bg-white", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx22(
3728
+ /* @__PURE__ */ jsx30("thead", { className: "dark:bg-sentio-gray-100 sticky top-0 z-[1] bg-white", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx30(
2901
3729
  "tr",
2902
3730
  {
2903
3731
  className: "relative flex w-fit cursor-pointer items-center border-b",
2904
- children: headerGroup.headers.map((header, i) => /* @__PURE__ */ jsxs19(
3732
+ children: headerGroup.headers.map((header, i) => /* @__PURE__ */ jsxs27(
2905
3733
  "th",
2906
3734
  {
2907
3735
  colSpan: header.colSpan,
@@ -2911,12 +3739,12 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
2911
3739
  className: "text-ilabel group/th blinked dark:hover:!bg-sentio-gray-300 dark:bg-sentio-gray-100 text-text-foreground hover:!bg-primary-50 relative flex items-center whitespace-nowrap bg-white px-2 py-2 text-left font-semibold",
2912
3740
  onClick: header.column.getToggleSortingHandler(),
2913
3741
  children: [
2914
- /* @__PURE__ */ jsxs19("span", { className: "flex w-full flex-1 overflow-hidden", children: [
2915
- /* @__PURE__ */ jsx22("span", { className: "flex-1 truncate", children: header.isPlaceholder ? null : flexRender(
3742
+ /* @__PURE__ */ jsxs27("span", { className: "flex w-full flex-1 overflow-hidden", children: [
3743
+ /* @__PURE__ */ jsx30("span", { className: "flex-1 truncate", children: header.isPlaceholder ? null : flexRender(
2916
3744
  header.column.columnDef.header,
2917
3745
  header.getContext()
2918
3746
  ) }),
2919
- header.column.getCanSort() && allowSort ? /* @__PURE__ */ jsx22(
3747
+ header.column.getCanSort() && allowSort ? /* @__PURE__ */ jsx30(
2920
3748
  "span",
2921
3749
  {
2922
3750
  className: cx3(
@@ -2925,16 +3753,16 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
2925
3753
  "inline-block cursor-pointer",
2926
3754
  "shrink-0"
2927
3755
  ),
2928
- children: header.column.getIsSorted() ? header.column.getIsSorted() == "desc" ? /* @__PURE__ */ jsx22(HiOutlineSortDescending, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx22(HiOutlineSortAscending, { className: "h-4 w-4" }) : ""
3756
+ children: header.column.getIsSorted() ? header.column.getIsSorted() == "desc" ? /* @__PURE__ */ jsx30(HiOutlineSortDescending, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx30(HiOutlineSortAscending, { className: "h-4 w-4" }) : ""
2929
3757
  }
2930
3758
  ) : null
2931
3759
  ] }),
2932
- allowEditColumn !== false && /* @__PURE__ */ jsx22(
3760
+ allowEditColumn !== false && /* @__PURE__ */ jsx30(
2933
3761
  "span",
2934
3762
  {
2935
3763
  className: "invisible inline-block group-hover/th:visible",
2936
3764
  onClick: onPreventClick,
2937
- children: /* @__PURE__ */ jsx22(
3765
+ children: /* @__PURE__ */ jsx30(
2938
3766
  PopupMenuButton,
2939
3767
  {
2940
3768
  buttonClassName: "align-text-bottom",
@@ -2960,19 +3788,19 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
2960
3788
  console.log(commandKey, "is not applied");
2961
3789
  }
2962
3790
  },
2963
- buttonIcon: /* @__PURE__ */ jsx22(HiChevronDown, { className: "icon mr-2" }),
3791
+ buttonIcon: /* @__PURE__ */ jsx30(HiChevronDown, { className: "icon mr-2" }),
2964
3792
  items: [
2965
3793
  [
2966
3794
  {
2967
3795
  key: "reorder.left",
2968
3796
  label: "Move column left",
2969
- icon: /* @__PURE__ */ jsx22(MoveLeftIcon, { className: "mr-2" }),
3797
+ icon: /* @__PURE__ */ jsx30(MoveLeftIcon, { className: "mr-2" }),
2970
3798
  disabled: i === 0
2971
3799
  },
2972
3800
  {
2973
3801
  key: "reorder.right",
2974
3802
  label: "Move column right",
2975
- icon: /* @__PURE__ */ jsx22(MoveRightIcon, { className: "mr-2" }),
3803
+ icon: /* @__PURE__ */ jsx30(MoveRightIcon, { className: "mr-2" }),
2976
3804
  disabled: i === headerGroup.headers.length - 1
2977
3805
  }
2978
3806
  ],
@@ -2981,7 +3809,7 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
2981
3809
  {
2982
3810
  key: "rename",
2983
3811
  label: "Rename column",
2984
- icon: /* @__PURE__ */ jsx22(RenameIcon, { className: "mr-2" })
3812
+ icon: /* @__PURE__ */ jsx30(RenameIcon, { className: "mr-2" })
2985
3813
  }
2986
3814
  ]
2987
3815
  ] : [],
@@ -2990,7 +3818,7 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
2990
3818
  {
2991
3819
  key: "delete",
2992
3820
  label: "Remove column",
2993
- icon: /* @__PURE__ */ jsx22(DeleteIcon, { className: "mr-2" }),
3821
+ icon: /* @__PURE__ */ jsx30(DeleteIcon, { className: "mr-2" }),
2994
3822
  status: "danger"
2995
3823
  }
2996
3824
  ]
@@ -3000,7 +3828,7 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
3000
3828
  )
3001
3829
  }
3002
3830
  ),
3003
- header.column.getCanResize() ? /* @__PURE__ */ jsx22(
3831
+ header.column.getCanResize() ? /* @__PURE__ */ jsx30(
3004
3832
  "div",
3005
3833
  {
3006
3834
  onMouseDown: header.getResizeHandler(),
@@ -3023,11 +3851,11 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
3023
3851
  },
3024
3852
  headerGroup.id
3025
3853
  )) }),
3026
- /* @__PURE__ */ jsxs19("tbody", { children: [
3027
- enableVirtualization && paddingTop > 0 && /* @__PURE__ */ jsx22("tr", { children: /* @__PURE__ */ jsx22("td", { style: { height: `${paddingTop}px` } }) }),
3854
+ /* @__PURE__ */ jsxs27("tbody", { children: [
3855
+ enableVirtualization && paddingTop > 0 && /* @__PURE__ */ jsx30("tr", { children: /* @__PURE__ */ jsx30("td", { style: { height: `${paddingTop}px` } }) }),
3028
3856
  enableVirtualization ? virtualRows.map((virtualRow) => {
3029
3857
  const row = table.getRowModel().rows[virtualRow.index];
3030
- return /* @__PURE__ */ jsx22(
3858
+ return /* @__PURE__ */ jsx30(
3031
3859
  "tr",
3032
3860
  {
3033
3861
  "data-index": virtualRow.index,
@@ -3036,7 +3864,7 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
3036
3864
  onClick ? "cursor-pointer" : "",
3037
3865
  rowClassNameFn ? rowClassNameFn(row) : ""
3038
3866
  ),
3039
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx22(
3867
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx30(
3040
3868
  "td",
3041
3869
  {
3042
3870
  ...{
@@ -3056,7 +3884,7 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
3056
3884
  },
3057
3885
  row.id
3058
3886
  );
3059
- }) : table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx22(
3887
+ }) : table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx30(
3060
3888
  "tr",
3061
3889
  {
3062
3890
  className: cx3(
@@ -3064,7 +3892,7 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
3064
3892
  onClick ? "cursor-pointer" : "",
3065
3893
  rowClassNameFn ? rowClassNameFn(row) : ""
3066
3894
  ),
3067
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx22(
3895
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx30(
3068
3896
  "td",
3069
3897
  {
3070
3898
  ...{
@@ -3084,8 +3912,8 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
3084
3912
  },
3085
3913
  row.id
3086
3914
  )),
3087
- enableVirtualization && paddingBottom > 0 && /* @__PURE__ */ jsx22("tr", { children: /* @__PURE__ */ jsx22("td", { style: { height: `${paddingBottom}px` } }) }),
3088
- onFetchMore && /* @__PURE__ */ jsx22("tr", { children: /* @__PURE__ */ jsx22(
3915
+ enableVirtualization && paddingBottom > 0 && /* @__PURE__ */ jsx30("tr", { children: /* @__PURE__ */ jsx30("td", { style: { height: `${paddingBottom}px` } }) }),
3916
+ onFetchMore && /* @__PURE__ */ jsx30("tr", { children: /* @__PURE__ */ jsx30(
3089
3917
  "td",
3090
3918
  {
3091
3919
  colSpan: table.getHeaderGroups()[0].headers.length,
@@ -3094,8 +3922,8 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
3094
3922
  if (isFetching) return;
3095
3923
  onFetchMore?.();
3096
3924
  },
3097
- children: isFetching || hasMore ? /* @__PURE__ */ jsxs19("span", { className: "inline-flex items-center gap-2", children: [
3098
- /* @__PURE__ */ jsx22(
3925
+ children: isFetching || hasMore ? /* @__PURE__ */ jsxs27("span", { className: "inline-flex items-center gap-2", children: [
3926
+ /* @__PURE__ */ jsx30(
3099
3927
  IoReload,
3100
3928
  {
3101
3929
  className: cx3(
@@ -3104,7 +3932,7 @@ var _ResizeTable = forwardRef4(function _ResizeTable2({
3104
3932
  )
3105
3933
  }
3106
3934
  ),
3107
- /* @__PURE__ */ jsx22("span", { children: "Loading..." })
3935
+ /* @__PURE__ */ jsx30("span", { children: "Loading..." })
3108
3936
  ] }) : "No more data"
3109
3937
  }
3110
3938
  ) })
@@ -3142,10 +3970,10 @@ function getNumberWithDecimal(hex, decimal, asNumber) {
3142
3970
  }
3143
3971
 
3144
3972
  // src/utils/use-mobile.ts
3145
- import { useState as useState12, useEffect as useEffect9 } from "react";
3973
+ import { useState as useState14, useEffect as useEffect11 } from "react";
3146
3974
  function useMobile(breakpoint = 768, defaultValue = false) {
3147
- const [isMobile, setIsMobile] = useState12(defaultValue);
3148
- useEffect9(() => {
3975
+ const [isMobile, setIsMobile] = useState14(defaultValue);
3976
+ useEffect11(() => {
3149
3977
  const checkUserAgent = () => {
3150
3978
  if (typeof window === "undefined") return false;
3151
3979
  const userAgent = window.navigator.userAgent.toLowerCase();
@@ -3196,13 +4024,15 @@ export {
3196
4024
  BaseZIndexContext,
3197
4025
  NewButton as Button,
3198
4026
  COLOR_MAP,
4027
+ Checkbox,
3199
4028
  LuSquareX as CloseSquareO,
3200
4029
  Collapse,
4030
+ ConfirmDialog,
3201
4031
  CopyButton,
3202
4032
  CopyIcon,
3203
4033
  CopySuccessIcon,
3204
- DarkModeContext,
3205
4034
  DeleteIcon,
4035
+ Descriptions,
3206
4036
  DisclosurePanel,
3207
4037
  Empty,
3208
4038
  LuEye as EyeO,
@@ -3217,25 +4047,34 @@ export {
3217
4047
  MoveLeftIcon,
3218
4048
  MoveRightIcon,
3219
4049
  NavSizeContext,
4050
+ Notification,
3220
4051
  LuSquarePlus as PlusSquareO,
3221
4052
  PopoverTooltip,
3222
4053
  PopupMenuButton,
3223
4054
  Proccessing,
4055
+ ProgressBar,
3224
4056
  ROOT_KEY,
3225
4057
  RadioSelect,
3226
4058
  RenameIcon,
3227
4059
  ResizeTable,
3228
4060
  SUFFIX_NODE_KEY,
4061
+ SearchInput,
3229
4062
  Select,
4063
+ SlideOver,
3230
4064
  SpinLoading,
3231
4065
  StatusBadge,
3232
4066
  StatusRole,
3233
4067
  SubMenuButton,
3234
4068
  SvgFolderContext,
3235
4069
  Switch,
4070
+ Group as TabGroup,
4071
+ List as TabList,
4072
+ Panel as TabPanel,
4073
+ Panels as TabPanels,
3236
4074
  buttonClass,
3237
4075
  cx3 as classNames,
3238
4076
  getNumberWithDecimal,
4077
+ getTabClassName,
3239
4078
  parseHex,
3240
4079
  useBoolean,
3241
4080
  useDarkMode,