@sentio/ui-core 0.1.3 → 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.js CHANGED
@@ -36,13 +36,15 @@ __export(index_exports, {
36
36
  BaseZIndexContext: () => BaseZIndexContext,
37
37
  Button: () => NewButton,
38
38
  COLOR_MAP: () => COLOR_MAP,
39
+ Checkbox: () => Checkbox,
39
40
  CloseSquareO: () => import_lu2.LuSquareX,
40
41
  Collapse: () => Collapse,
42
+ ConfirmDialog: () => ConfirmDialog,
41
43
  CopyButton: () => CopyButton,
42
44
  CopyIcon: () => CopyIcon,
43
45
  CopySuccessIcon: () => CopySuccessIcon,
44
- DarkModeContext: () => DarkModeContext,
45
46
  DeleteIcon: () => DeleteIcon,
47
+ Descriptions: () => Descriptions,
46
48
  DisclosurePanel: () => DisclosurePanel,
47
49
  Empty: () => Empty,
48
50
  EyeO: () => import_lu2.LuEye,
@@ -57,25 +59,34 @@ __export(index_exports, {
57
59
  MoveLeftIcon: () => MoveLeftIcon,
58
60
  MoveRightIcon: () => MoveRightIcon,
59
61
  NavSizeContext: () => NavSizeContext,
62
+ Notification: () => Notification,
60
63
  PlusSquareO: () => import_lu2.LuSquarePlus,
61
64
  PopoverTooltip: () => PopoverTooltip,
62
65
  PopupMenuButton: () => PopupMenuButton,
63
66
  Proccessing: () => Proccessing,
67
+ ProgressBar: () => ProgressBar,
64
68
  ROOT_KEY: () => ROOT_KEY,
65
69
  RadioSelect: () => RadioSelect,
66
70
  RenameIcon: () => RenameIcon,
67
71
  ResizeTable: () => ResizeTable,
68
72
  SUFFIX_NODE_KEY: () => SUFFIX_NODE_KEY,
73
+ SearchInput: () => SearchInput,
69
74
  Select: () => Select,
75
+ SlideOver: () => SlideOver,
70
76
  SpinLoading: () => SpinLoading,
71
77
  StatusBadge: () => StatusBadge,
72
78
  StatusRole: () => StatusRole,
73
79
  SubMenuButton: () => SubMenuButton,
74
80
  SvgFolderContext: () => SvgFolderContext,
75
81
  Switch: () => Switch,
82
+ TabGroup: () => Group,
83
+ TabList: () => List,
84
+ TabPanel: () => Panel,
85
+ TabPanels: () => Panels,
76
86
  buttonClass: () => buttonClass,
77
87
  classNames: () => import_class_variance_authority10.cx,
78
88
  getNumberWithDecimal: () => getNumberWithDecimal,
89
+ getTabClassName: () => getTabClassName,
79
90
  parseHex: () => parseHex,
80
91
  useBoolean: () => useBoolean,
81
92
  useDarkMode: () => useDarkMode,
@@ -132,39 +143,41 @@ var import_react2 = __toESM(require("react"));
132
143
  var import_react_spinners2 = require("react-spinners");
133
144
  var import_class_variance_authority2 = require("class-variance-authority");
134
145
  var import_jsx_runtime2 = require("react/jsx-runtime");
135
- var SpinLoading = import_react2.default.forwardRef(function Spinner(args, ref) {
136
- const {
137
- loading = false,
138
- children,
139
- className,
140
- size = 48,
141
- showMask,
142
- maskOpacity = 80
143
- } = args;
144
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ref, className: (0, import_class_variance_authority2.cx)("relative", className), children: [
145
- showMask && loading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
146
- "div",
147
- {
148
- className: (0, import_class_variance_authority2.cx)(
149
- "absolute bottom-0 left-0 right-0 top-0 z-[1]",
150
- maskOpacity ? `bg-white dark:bg-sentio-gray-100/${maskOpacity}` : "dark:bg-sentio-gray-100 bg-white"
151
- )
152
- }
153
- ),
154
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "absolute left-[50%] top-[50%] z-[1] -translate-y-6", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
155
- import_react_spinners2.ClipLoader,
156
- {
157
- loading,
158
- color: "#3B82F6",
159
- size,
160
- cssOverride: {
161
- borderWidth: 3
146
+ var SpinLoading = import_react2.default.forwardRef(
147
+ function Spinner(args, ref) {
148
+ const {
149
+ loading = false,
150
+ children,
151
+ className,
152
+ size = 48,
153
+ showMask,
154
+ maskOpacity = 80
155
+ } = args;
156
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ref, className: (0, import_class_variance_authority2.cx)("relative", className), children: [
157
+ showMask && loading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
158
+ "div",
159
+ {
160
+ className: (0, import_class_variance_authority2.cx)(
161
+ "absolute bottom-0 left-0 right-0 top-0 z-[1]",
162
+ maskOpacity ? `bg-white dark:bg-sentio-gray-100/${maskOpacity}` : "dark:bg-sentio-gray-100 bg-white"
163
+ )
162
164
  }
163
- }
164
- ) }),
165
- children
166
- ] });
167
- });
165
+ ),
166
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "absolute left-[50%] top-[50%] z-[1] -translate-y-6", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
167
+ import_react_spinners2.ClipLoader,
168
+ {
169
+ loading,
170
+ color: "#3B82F6",
171
+ size,
172
+ cssOverride: {
173
+ borderWidth: 3
174
+ }
175
+ }
176
+ ) }),
177
+ children
178
+ ] });
179
+ }
180
+ );
168
181
 
169
182
  // src/common/CopyButton.tsx
170
183
  var import_react3 = require("react");
@@ -475,7 +488,7 @@ var PopoverTooltip = ({
475
488
  !hideArrow && placement === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
476
489
  "div",
477
490
  {
478
- className: "arrow dark:before:bg-sentio-gray-200 -translate-y-[5px] before:absolute before:h-2 before:w-2 before:rotate-45 before:border-l before:border-t before:border-black/5 before:bg-white dark:before:border-gray-100",
491
+ className: "arrow dark:bg-sentio-gray-100 before:border-border-color -translate-y-[7px] bg-white before:visible before:border before:border-b-0 before:border-r-0",
479
492
  ref: arrowRef,
480
493
  style: {
481
494
  left: arrowX ?? 0,
@@ -609,23 +622,30 @@ var buttonClass = (0, import_class_variance_authority5.cva)(["inline-flex", "ite
609
622
  disabled: false
610
623
  }
611
624
  });
612
- function Proccessing({ className, light }) {
625
+ function Proccessing({
626
+ className,
627
+ light
628
+ }) {
613
629
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { className: `h-5 w-5 animate-spin ${className}`, viewBox: "0 0 24 24", children: [
614
630
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
615
631
  "circle",
616
632
  {
617
- className: light ? "opacity-5" : "opacity-10",
618
633
  cx: "12",
619
634
  cy: "12",
620
635
  r: "10",
621
636
  stroke: "currentColor",
622
- strokeWidth: "4"
637
+ strokeWidth: "4",
638
+ style: {
639
+ opacity: light ? 0.05 : 0.1
640
+ }
623
641
  }
624
642
  ),
625
643
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
626
644
  "path",
627
645
  {
628
- className: light ? "opacity-50" : "opacity-75",
646
+ style: {
647
+ opacity: light ? 0.5 : 0.75
648
+ },
629
649
  fill: "currentColor",
630
650
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
631
651
  }
@@ -688,12 +708,17 @@ function Button({
688
708
  iconEl2 = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
689
709
  Proccessing,
690
710
  {
691
- className: (0, import_class_variance_authority5.cx)(pIconClass({ size }), role == "primary" ? "text-white" : ""),
711
+ className: (0, import_class_variance_authority5.cx)(
712
+ pIconClass({ size }),
713
+ role == "primary" ? "text-white" : ""
714
+ ),
692
715
  light: role !== "primary"
693
716
  }
694
717
  );
695
718
  } else if (icon) {
696
- iconEl2 = (0, import_react6.cloneElement)(icon, { className: (0, import_class_variance_authority5.cx)(icon.props.className, iconClasses) });
719
+ iconEl2 = (0, import_react6.cloneElement)(icon, {
720
+ className: (0, import_class_variance_authority5.cx)(icon.props.className, iconClasses)
721
+ });
697
722
  }
698
723
  return iconEl2;
699
724
  }, [icon, iconClasses, processing, role]);
@@ -2079,7 +2104,7 @@ var FlatTree = (props) => {
2079
2104
  var FlatTree_default = (0, import_react20.memo)(FlatTree);
2080
2105
 
2081
2106
  // src/common/text/LinkifyText.tsx
2082
- var import_linkify_urls = require("linkify-urls");
2107
+ var import_linkify_html = __toESM(require("linkify-html"));
2083
2108
  var import_dompurify = __toESM(require("dompurify"));
2084
2109
  var import_react21 = require("react");
2085
2110
  var import_lodash5 = require("lodash");
@@ -2095,7 +2120,7 @@ if (import_dompurify.default?.addHook) {
2095
2120
  });
2096
2121
  }
2097
2122
  var renderTextWithColoredNumbers = (text) => {
2098
- const numberRegex = /\b(\d+(?:\.\d+)?)\b/g;
2123
+ const numberRegex = /\b(\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/g;
2099
2124
  return text.replace(numberRegex, (match, number, offset2) => {
2100
2125
  const before = text.charAt(offset2 - 1);
2101
2126
  const after = text.charAt(offset2 + match.length);
@@ -2119,7 +2144,7 @@ var LinkifyText = (0, import_react21.memo)(function LinkifyText2({
2119
2144
  }
2120
2145
  return null;
2121
2146
  }
2122
- const linkStr = (0, import_linkify_urls.linkifyUrlsToHtml)(
2147
+ const linkStr = (0, import_linkify_html.default)(
2123
2148
  isHighlightNumbers ? renderTextWithColoredNumbers(text) : text,
2124
2149
  {
2125
2150
  attributes: {
@@ -2139,24 +2164,105 @@ var LinkifyText = (0, import_react21.memo)(function LinkifyText2({
2139
2164
  });
2140
2165
 
2141
2166
  // src/common/Empty.tsx
2142
- var import_react23 = require("react");
2167
+ var import_react24 = require("react");
2143
2168
 
2144
2169
  // src/utils/extension-context.ts
2170
+ var import_react23 = require("react");
2171
+
2172
+ // src/utils/use-dark-mode.ts
2145
2173
  var import_react22 = require("react");
2146
- var SvgFolderContext = (0, import_react22.createContext)("");
2147
- var useDetectExtenstion = () => {
2148
- const folderPath = (0, import_react22.useContext)(SvgFolderContext);
2149
- return Boolean(folderPath);
2174
+ var DarkModeListener = class _DarkModeListener {
2175
+ constructor() {
2176
+ this.isDarkMode = false;
2177
+ this.listeners = [];
2178
+ this.init();
2179
+ }
2180
+ static get instance() {
2181
+ if (!this._instance) {
2182
+ this._instance = new _DarkModeListener();
2183
+ }
2184
+ return this._instance;
2185
+ }
2186
+ addListener(listener) {
2187
+ this.listeners.push(listener);
2188
+ }
2189
+ removeListener(listener) {
2190
+ this.listeners = this.listeners.filter((l) => l !== listener);
2191
+ }
2192
+ get darkMode() {
2193
+ return this.isDarkMode;
2194
+ }
2195
+ _sync(theme = "system") {
2196
+ let isDarkMode = false;
2197
+ if (theme === "system") {
2198
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
2199
+ isDarkMode = mediaQuery.matches;
2200
+ localStorage.setItem("theme", "system");
2201
+ } else if (theme === "light") {
2202
+ isDarkMode = false;
2203
+ localStorage.removeItem("theme");
2204
+ } else {
2205
+ isDarkMode = theme === "dark";
2206
+ localStorage.setItem("theme", "dark");
2207
+ }
2208
+ this.isDarkMode = isDarkMode;
2209
+ document.body.classList.remove("light", "dark");
2210
+ document.body.classList.add(isDarkMode ? "dark" : "light");
2211
+ this.listeners.forEach((listener) => listener(isDarkMode));
2212
+ }
2213
+ toggleDarkMode() {
2214
+ this.isDarkMode = document.body.classList.contains("dark");
2215
+ this._sync(this.isDarkMode ? "light" : "dark");
2216
+ }
2217
+ setDarkMode(value) {
2218
+ this._sync(value);
2219
+ }
2220
+ init() {
2221
+ this.isDarkMode = document.body.classList.contains("dark");
2222
+ const observer = new MutationObserver((mutationsList) => {
2223
+ for (const mutation of mutationsList) {
2224
+ if (mutation.type === "attributes" && mutation.attributeName === "class") {
2225
+ const isDarkMode = document.body.classList.contains("dark");
2226
+ if (this.isDarkMode !== isDarkMode) {
2227
+ this.isDarkMode = isDarkMode;
2228
+ this.listeners.forEach((listener) => listener(isDarkMode));
2229
+ }
2230
+ }
2231
+ }
2232
+ });
2233
+ const config = {
2234
+ attributes: true,
2235
+ // Observe attribute changes
2236
+ attributeFilter: ["class"]
2237
+ // Only observe changes to the 'class' attribute
2238
+ };
2239
+ observer.observe(document.body, config);
2240
+ }
2150
2241
  };
2151
- var DarkModeContext = (0, import_react22.createContext)(false);
2152
2242
  var useDarkMode = () => {
2153
- return (0, import_react22.useContext)(DarkModeContext);
2243
+ const [isDarkMode, setIsDarkMode] = (0, import_react22.useState)(false);
2244
+ (0, import_react22.useEffect)(() => {
2245
+ const instance = DarkModeListener.instance;
2246
+ setIsDarkMode(instance.darkMode);
2247
+ instance.addListener(setIsDarkMode);
2248
+ return () => {
2249
+ instance.removeListener(setIsDarkMode);
2250
+ };
2251
+ }, []);
2252
+ return isDarkMode;
2253
+ };
2254
+
2255
+ // src/utils/extension-context.ts
2256
+ var SvgFolderContext = (0, import_react23.createContext)("");
2257
+ var useDetectExtenstion = () => {
2258
+ const folderPath = (0, import_react23.useContext)(SvgFolderContext);
2259
+ return Boolean(folderPath);
2154
2260
  };
2155
2261
 
2156
2262
  // src/common/Empty.tsx
2157
2263
  var import_jsx_runtime16 = require("react/jsx-runtime");
2158
2264
  var Empty = (props) => {
2159
- const parentFolder = (0, import_react23.useContext)(SvgFolderContext);
2265
+ const parentFolder = (0, import_react24.useContext)(SvgFolderContext);
2160
2266
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "mx-auto w-fit", children: [
2161
2267
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2162
2268
  "img",
@@ -2252,25 +2358,738 @@ var HeaderToolsContent = ({
2252
2358
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_class_variance_authority16.cx)("w-full overflow-hidden", className), children });
2253
2359
  };
2254
2360
 
2255
- // src/common/table/ResizeTable.tsx
2361
+ // src/common/SlideOver.tsx
2362
+ var import_react25 = require("react");
2363
+ var import_react26 = require("@headlessui/react");
2364
+ var import_outline = require("@heroicons/react/24/outline");
2365
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2366
+ function SlideOver({
2367
+ title,
2368
+ open,
2369
+ onClose,
2370
+ children,
2371
+ size,
2372
+ headAddon,
2373
+ triggerClose = "all",
2374
+ noAnimation
2375
+ }) {
2376
+ const onDialogClose = (0, import_react25.useCallback)(() => {
2377
+ if (triggerClose === "all") {
2378
+ onClose();
2379
+ }
2380
+ }, [triggerClose, onClose]);
2381
+ const openRef = (0, import_react25.useRef)(open);
2382
+ openRef.current = open;
2383
+ (0, import_react25.useEffect)(() => {
2384
+ function handleKeyDown(event) {
2385
+ if (event.key === "Escape") {
2386
+ event.preventDefault();
2387
+ event.stopPropagation();
2388
+ if (openRef.current) {
2389
+ onClose();
2390
+ }
2391
+ }
2392
+ }
2393
+ if (triggerClose === "button") {
2394
+ window.addEventListener("keydown", handleKeyDown);
2395
+ return () => {
2396
+ window.removeEventListener("keydown", handleKeyDown);
2397
+ };
2398
+ }
2399
+ }, [triggerClose, onClose]);
2400
+ const contentNode = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "fixed inset-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "absolute inset-y-0 right-0 flex max-w-full pl-10 sm:pl-16", children: [
2401
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "max-w-2xl max-w-3xl max-w-4xl max-w-5xl max-w-6xl max-w-7xl" }),
2402
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2403
+ import_react26.Dialog.Panel,
2404
+ {
2405
+ 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"}`,
2406
+ children: [
2407
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dark:bg-sentio-gray-100 relative border-b bg-white px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex h-auto items-start justify-between space-x-3 sm:h-5", children: [
2408
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex-1 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react26.Dialog.Title, { className: "text-text-foreground text-[15px] font-semibold", children: title }) }),
2409
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex-0 flex h-auto items-center sm:h-5", children: [
2410
+ headAddon,
2411
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2412
+ "button",
2413
+ {
2414
+ type: "button",
2415
+ className: "hover:text-text-foreground ml-2 text-gray-800 dark:text-gray-500",
2416
+ onClick: () => onClose(),
2417
+ children: [
2418
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "sr-only", children: "Close panel" }),
2419
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_outline.XMarkIcon, { className: "h-5 w-5", "aria-hidden": "true" })
2420
+ ]
2421
+ }
2422
+ )
2423
+ ] })
2424
+ ] }) }),
2425
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex flex-1 overflow-y-auto overflow-x-hidden", children })
2426
+ ]
2427
+ }
2428
+ )
2429
+ ] }) });
2430
+ if (noAnimation) {
2431
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2432
+ import_react26.Dialog,
2433
+ {
2434
+ open,
2435
+ as: "div",
2436
+ className: "relative z-10",
2437
+ id: "test",
2438
+ onClose: onDialogClose,
2439
+ children: contentNode
2440
+ }
2441
+ );
2442
+ }
2443
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react26.Transition.Root, { show: open, as: "div", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2444
+ import_react26.Dialog,
2445
+ {
2446
+ static: true,
2447
+ as: "div",
2448
+ className: "relative z-10",
2449
+ id: "test",
2450
+ onClose: onDialogClose,
2451
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2452
+ import_react26.Transition.Child,
2453
+ {
2454
+ as: import_react25.Fragment,
2455
+ enter: "transform transition ease-in-out duration-100 sm:duration-300",
2456
+ enterFrom: "translate-x-full",
2457
+ enterTo: "translate-x-0",
2458
+ leave: "transform transition ease-in-out duration-100 sm:duration-300",
2459
+ leaveFrom: "translate-x-0",
2460
+ leaveTo: "translate-x-full",
2461
+ children: contentNode
2462
+ }
2463
+ )
2464
+ }
2465
+ ) });
2466
+ }
2467
+
2468
+ // src/common/ConfirmDialog.tsx
2469
+ var import_react27 = require("react");
2470
+ var import_react28 = require("@headlessui/react");
2471
+ var import_outline2 = require("@heroicons/react/24/outline");
2472
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2473
+ function ConfirmDialog({
2474
+ message,
2475
+ title,
2476
+ open,
2477
+ onClose,
2478
+ onConfirm,
2479
+ buttonLabel = "Delete",
2480
+ type,
2481
+ buttons,
2482
+ children,
2483
+ disabled
2484
+ }) {
2485
+ const cancelButtonRef = (0, import_react27.useRef)(null);
2486
+ const [processing, setProcessing] = (0, import_react27.useState)(false);
2487
+ async function confirm() {
2488
+ setProcessing(true);
2489
+ try {
2490
+ await onConfirm();
2491
+ } finally {
2492
+ setProcessing(false);
2493
+ onClose(false);
2494
+ }
2495
+ }
2496
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react28.Transition.Root, { show: open, as: import_react27.Fragment, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2497
+ import_react28.Dialog,
2498
+ {
2499
+ as: "div",
2500
+ className: "relative z-10",
2501
+ "aria-label": "confirm",
2502
+ initialFocus: cancelButtonRef,
2503
+ onClose,
2504
+ children: [
2505
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2506
+ import_react28.Transition.Child,
2507
+ {
2508
+ as: import_react27.Fragment,
2509
+ enter: "ease-out duration-300",
2510
+ enterFrom: "opacity-0",
2511
+ enterTo: "opacity-100",
2512
+ leave: "ease-in duration-200",
2513
+ leaveFrom: "opacity-100",
2514
+ leaveTo: "opacity-0",
2515
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "fixed inset-0 bg-gray-500/75 transition-opacity dark:bg-gray-200/50" })
2516
+ }
2517
+ ),
2518
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "fixed inset-0 z-10 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2519
+ import_react28.Transition.Child,
2520
+ {
2521
+ as: import_react27.Fragment,
2522
+ enter: "ease-out duration-300",
2523
+ enterFrom: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
2524
+ enterTo: "opacity-100 translate-y-0 sm:scale-100",
2525
+ leave: "ease-in duration-200",
2526
+ leaveFrom: "opacity-100 translate-y-0 sm:scale-100",
2527
+ leaveTo: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
2528
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react28.Dialog.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: [
2529
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dark:bg-sentio-gray-100 bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "sm:flex sm:items-start", children: [
2530
+ type == "danger" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("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__ */ (0, import_jsx_runtime20.jsx)(
2531
+ import_outline2.ExclamationCircleIcon,
2532
+ {
2533
+ className: "h-6 w-6 text-red-600 dark:text-red-800",
2534
+ "aria-hidden": "true"
2535
+ }
2536
+ ) }),
2537
+ type == "question" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("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__ */ (0, import_jsx_runtime20.jsx)(
2538
+ import_outline2.QuestionMarkCircleIcon,
2539
+ {
2540
+ className: "text-primary-600 dark:text-primary-800 h-6 w-6",
2541
+ "aria-hidden": "true"
2542
+ }
2543
+ ) }),
2544
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left", children: [
2545
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2546
+ import_react28.Dialog.Title,
2547
+ {
2548
+ as: "h3",
2549
+ className: "text-text-foreground text-lg font-medium leading-6",
2550
+ children: title
2551
+ }
2552
+ ),
2553
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mt-2", children: [
2554
+ message && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm text-gray-500", children: message }),
2555
+ children
2556
+ ] })
2557
+ ] })
2558
+ ] }) }),
2559
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex gap-2 bg-gray-50 px-4 py-3 sm:flex-row-reverse sm:px-6", children: buttons ? buttons : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
2560
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2561
+ NewButton,
2562
+ {
2563
+ type: "button",
2564
+ processing,
2565
+ status: type == "danger" ? "danger" : void 0,
2566
+ role: "primary",
2567
+ onClick: () => confirm(),
2568
+ disabled,
2569
+ size: "lg",
2570
+ children: buttonLabel
2571
+ }
2572
+ ),
2573
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2574
+ NewButton,
2575
+ {
2576
+ type: "button",
2577
+ role: "secondary",
2578
+ onClick: () => onClose(false),
2579
+ ref: cancelButtonRef,
2580
+ size: "lg",
2581
+ children: "Cancel"
2582
+ }
2583
+ )
2584
+ ] }) })
2585
+ ] })
2586
+ }
2587
+ ) }) })
2588
+ ]
2589
+ }
2590
+ ) });
2591
+ }
2592
+
2593
+ // src/common/StyledTabs.tsx
2594
+ var import_react29 = __toESM(require("react"));
2595
+ var import_react30 = require("@headlessui/react");
2596
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2597
+ var getTabClassName = ({ selected }) => (0, import_class_variance_authority10.cx)(
2598
+ "font-ilabel py-1 text-sm leading-5 border-b-2 outline-0",
2599
+ selected ? "text-primary border-primary-500" : "text-gray hover:text-primary border-transparent hover:border-primary-500"
2600
+ );
2601
+ var Group = ({
2602
+ children,
2603
+ className,
2604
+ onChange,
2605
+ defaultIndex,
2606
+ selectedIndex
2607
+ }) => {
2608
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2609
+ import_react30.Tab.Group,
2610
+ {
2611
+ onChange,
2612
+ defaultIndex,
2613
+ selectedIndex,
2614
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: (0, import_class_variance_authority10.cx)("flex flex-col", className), children })
2615
+ }
2616
+ );
2617
+ };
2618
+ var List = ({
2619
+ tabs,
2620
+ disabledTabs,
2621
+ className,
2622
+ noBorder,
2623
+ children
2624
+ }) => {
2625
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2626
+ import_react30.Tab.List,
2627
+ {
2628
+ className: (0, import_class_variance_authority10.cx)(
2629
+ "flex-0 border-border-color flex justify-start space-x-6 overflow-x-auto px-4",
2630
+ noBorder ? "border-b-0" : "border-b"
2631
+ ),
2632
+ children: [
2633
+ tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2634
+ import_react30.Tab,
2635
+ {
2636
+ className: ({ selected }) => (0, import_class_variance_authority10.cx)(
2637
+ "font-ilabel outline-primary/50 whitespace-nowrap border-b-2 py-1 text-sm leading-5 outline-offset-2",
2638
+ selected ? "border-primary text-primary" : "text-gray hover:text-primary border-transparent",
2639
+ className
2640
+ ),
2641
+ disabled: disabledTabs?.includes(index),
2642
+ children: tab
2643
+ },
2644
+ index
2645
+ )),
2646
+ children
2647
+ ]
2648
+ }
2649
+ );
2650
+ };
2651
+ var Panels = import_react29.default.forwardRef(function Panels2({ children, className, ...props }, ref) {
2652
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2653
+ import_react30.Tab.Panels,
2654
+ {
2655
+ className: (0, import_class_variance_authority10.cx)("flex-1", className || "w-full overflow-auto"),
2656
+ ...props,
2657
+ ref,
2658
+ children
2659
+ }
2660
+ );
2661
+ });
2662
+ var Panel = (props) => {
2663
+ const { className, ...otherProps } = props;
2664
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2665
+ import_react30.Tab.Panel,
2666
+ {
2667
+ className: (0, import_class_variance_authority10.cx)("space-y-2 outline-0", className),
2668
+ ...otherProps
2669
+ }
2670
+ );
2671
+ };
2672
+
2673
+ // src/common/SearchInput.tsx
2674
+ var import_solid4 = require("@heroicons/react/20/solid");
2256
2675
  var import_react31 = require("react");
2676
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2677
+ var SearchInput = (0, import_react31.forwardRef)((props, ref) => {
2678
+ const {
2679
+ onChange,
2680
+ value,
2681
+ onBlur,
2682
+ onKeydown,
2683
+ addonButton,
2684
+ placeholder = "Search",
2685
+ ...args
2686
+ } = props;
2687
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "min-w-0 flex-1", children: [
2688
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "search", className: "sr-only", children: "Search" }),
2689
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "focus-within:ring-primary-500 focus-within:border-primary-500 relative flex rounded-md border border-gray-300", children: [
2690
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1 sm:pl-3", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2691
+ import_solid4.MagnifyingGlassIcon,
2692
+ {
2693
+ className: "sm:h-4.5 sm:w-4.5 h-4 w-4 text-gray-400",
2694
+ "aria-hidden": "true"
2695
+ }
2696
+ ) }),
2697
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2698
+ "input",
2699
+ {
2700
+ onChange: (e) => onChange(e.target.value),
2701
+ onBlur,
2702
+ onKeyDown: onKeydown,
2703
+ type: "search",
2704
+ className: (0, import_class_variance_authority10.cx)(
2705
+ "md:text-ilabel block w-full rounded-md border-0 pl-6 text-xs focus:ring-0 sm:pl-10 sm:text-sm",
2706
+ "h-[30px] py-1"
2707
+ ),
2708
+ placeholder,
2709
+ value,
2710
+ ref,
2711
+ ...args
2712
+ }
2713
+ ),
2714
+ addonButton
2715
+ ] })
2716
+ ] });
2717
+ });
2718
+ SearchInput.displayName = "SearchInput";
2719
+
2720
+ // src/common/Checkbox.tsx
2721
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2722
+ var Checkbox = ({
2723
+ checked,
2724
+ onChange,
2725
+ label,
2726
+ labelNode,
2727
+ id,
2728
+ name,
2729
+ inputProps,
2730
+ disabled,
2731
+ labelClassName,
2732
+ className
2733
+ }) => {
2734
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2735
+ "div",
2736
+ {
2737
+ className: (0, import_class_variance_authority10.cx)("inline-flex items-center gap-2", className),
2738
+ onClick: (e) => {
2739
+ e.stopPropagation();
2740
+ onChange?.(!checked);
2741
+ },
2742
+ children: [
2743
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2744
+ "input",
2745
+ {
2746
+ id,
2747
+ name,
2748
+ type: "checkbox",
2749
+ className: "text-primary-600 focus:ring-primary-500 h-4 w-4 rounded border-gray-300 ",
2750
+ disabled,
2751
+ checked,
2752
+ readOnly: true,
2753
+ ...inputProps
2754
+ }
2755
+ ),
2756
+ label && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2757
+ "span",
2758
+ {
2759
+ className: (0, import_class_variance_authority10.cx)(
2760
+ "text-ilabel text-gray font-medium",
2761
+ labelClassName
2762
+ ),
2763
+ children: label
2764
+ }
2765
+ ),
2766
+ labelNode
2767
+ ]
2768
+ }
2769
+ );
2770
+ };
2771
+
2772
+ // src/common/ProgressBar.tsx
2773
+ var import_react32 = require("react");
2774
+ var import_jsx_runtime24 = require("react/jsx-runtime");
2775
+ var defaultSegments = {
2776
+ 0.25: "from-cyan-600 to-cyan-500",
2777
+ 0.5: "from-cyan-500 to-orange-600",
2778
+ 0.75: "from-orange-600 to-red-600",
2779
+ 1: "from-red-600 to-red-700"
2780
+ };
2781
+ var ProgressBar = ({
2782
+ progress,
2783
+ segments = defaultSegments,
2784
+ gradient,
2785
+ upperTicks,
2786
+ lowerTicks,
2787
+ roundedFull
2788
+ }) => {
2789
+ const elements = (0, import_react32.useMemo)(() => {
2790
+ const result = [];
2791
+ const colors = Object.entries(segments).sort(
2792
+ (a, b) => parseFloat(a[0]) - parseFloat(b[0])
2793
+ );
2794
+ if (gradient) {
2795
+ let pos = 0;
2796
+ colors.forEach(([stop, color], idx) => {
2797
+ const width = (parseFloat(stop) - pos) * 100;
2798
+ result.push(
2799
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2800
+ "div",
2801
+ {
2802
+ className: (0, import_class_variance_authority10.cx)(
2803
+ `absolute top-0 h-4 bg-gradient-to-r ${color}`,
2804
+ idx === 0 && "rounded-l-full",
2805
+ idx === colors.length - 1 && "rounded-r-full"
2806
+ ),
2807
+ style: { left: `${pos * 100}%`, width: `${width}%` }
2808
+ },
2809
+ stop
2810
+ )
2811
+ );
2812
+ pos = parseFloat(stop);
2813
+ });
2814
+ } else {
2815
+ let pos = 0;
2816
+ for (const [stop, color] of colors) {
2817
+ const width = (parseFloat(stop) - pos) * 100;
2818
+ result.push(
2819
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2820
+ "div",
2821
+ {
2822
+ className: `absolute h-4 bg-${color} top-0 left-[${pos}] w-[${width}]`
2823
+ }
2824
+ )
2825
+ );
2826
+ pos = parseFloat(stop) * 100;
2827
+ }
2828
+ }
2829
+ return result;
2830
+ }, [segments, gradient]);
2831
+ const upperTicksElements = (0, import_react32.useMemo)(() => {
2832
+ if (!upperTicks) return null;
2833
+ return Object.entries(upperTicks).map(([p, label]) => {
2834
+ const pos = parseFloat(p);
2835
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2836
+ "div",
2837
+ {
2838
+ className: "absolute top-0 border-l border-gray-500 text-xs text-gray-500 hover:z-[1]",
2839
+ style: { left: `${pos * 100}%` },
2840
+ children: [
2841
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2842
+ "div",
2843
+ {
2844
+ className: (0, import_class_variance_authority10.cx)(
2845
+ "absolute w-fit -translate-y-full whitespace-nowrap text-gray-500",
2846
+ pos < 0.05 ? "-translate-x-1/4" : pos > 0.95 ? "-translate-x-3/4" : "-translate-x-1/2"
2847
+ ),
2848
+ children: label
2849
+ }
2850
+ ),
2851
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "absolute h-3 w-2 translate-y-1 border-l border-gray-400 border-opacity-50" })
2852
+ ]
2853
+ },
2854
+ pos
2855
+ );
2856
+ });
2857
+ }, [upperTicks]);
2858
+ const lowerTicksElements = (0, import_react32.useMemo)(() => {
2859
+ if (!lowerTicks) return null;
2860
+ return Object.entries(lowerTicks).map(([p, label]) => {
2861
+ const pos = parseFloat(p);
2862
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2863
+ "div",
2864
+ {
2865
+ className: "relative bottom-0 text-xs hover:z-[1]",
2866
+ style: { left: `${pos * 100}%` },
2867
+ children: [
2868
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "absolute top-0 h-3 w-2 border-l border-gray-400 border-opacity-50" }),
2869
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2870
+ "div",
2871
+ {
2872
+ className: (0, import_class_variance_authority10.cx)(
2873
+ "absolute translate-y-full text-gray-500",
2874
+ pos < 0.05 ? "-translate-x-1/4" : pos > 0.95 ? "-translate-x-3/4" : "-translate-x-1/2"
2875
+ ),
2876
+ children: label
2877
+ }
2878
+ )
2879
+ ]
2880
+ },
2881
+ pos
2882
+ );
2883
+ });
2884
+ }, [lowerTicks]);
2885
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "w-full", children: [
2886
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "relative h-4 w-full", children: upperTicksElements }),
2887
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "relative h-4 w-full", children: [
2888
+ elements,
2889
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2890
+ "div",
2891
+ {
2892
+ className: (0, import_class_variance_authority10.cx)(
2893
+ progress === 0 ? "rounded-l-full" : "",
2894
+ `dark:bg-sentio-gray-400 absolute right-0 top-0 h-4 rounded-r-full bg-gray-300`
2895
+ ),
2896
+ style: { left: `${progress * 100}%` }
2897
+ }
2898
+ )
2899
+ ] }),
2900
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "relative h-4 w-full", children: lowerTicksElements })
2901
+ ] });
2902
+ };
2903
+
2904
+ // src/common/Descriptions.tsx
2905
+ var import_react33 = __toESM(require("react"));
2906
+ var import_lodash6 = require("lodash");
2907
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2908
+ function safeToString(value) {
2909
+ if ((0, import_lodash6.isString)(value) || (0, import_lodash6.isNumber)(value)) {
2910
+ return value;
2911
+ }
2912
+ try {
2913
+ return JSON.stringify(value);
2914
+ } catch {
2915
+ return "";
2916
+ }
2917
+ }
2918
+ var Descriptions = (props) => {
2919
+ const {
2920
+ data,
2921
+ labelStyle,
2922
+ valueStyle,
2923
+ className,
2924
+ labelClassName,
2925
+ valueClassName,
2926
+ trClassName,
2927
+ colon,
2928
+ renderLabel,
2929
+ renderValue
2930
+ } = props;
2931
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("table", { className: (0, import_class_variance_authority10.cx)("w-full border-collapse", className), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("tbody", { children: data.map((item, index) => {
2932
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { className: trClassName, children: [
2933
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2934
+ "td",
2935
+ {
2936
+ className: (0, import_class_variance_authority10.cx)(
2937
+ "text-gray text-ilabel font-ilabel w-px whitespace-nowrap pr-8 align-text-bottom",
2938
+ labelClassName
2939
+ ),
2940
+ style: labelStyle,
2941
+ children: (0, import_lodash6.isFunction)(renderLabel) ? renderLabel?.(item) : item.label
2942
+ }
2943
+ ),
2944
+ colon,
2945
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2946
+ "td",
2947
+ {
2948
+ className: (0, import_class_variance_authority10.cx)(
2949
+ "text-ilabel font-ilabel",
2950
+ valueClassName
2951
+ ),
2952
+ style: valueStyle,
2953
+ children: import_react33.default.isValidElement(item.value) ? item.value : (0, import_lodash6.isObjectLike)(item.value) ? (0, import_lodash6.isEmpty)(item.value) ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "text-gray-400", children: "{ }" }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-2", children: [
2954
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "text-gray-400", children: "{" }),
2955
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2956
+ Descriptions,
2957
+ {
2958
+ ...props,
2959
+ data: (0, import_lodash6.map)(item.value, (value, label) => ({
2960
+ key: `${item.key}.${label}`,
2961
+ label,
2962
+ value
2963
+ }))
2964
+ }
2965
+ ),
2966
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "text-gray-400", children: "}" })
2967
+ ] }) : (0, import_lodash6.isFunction)(renderValue) ? renderValue?.(item) : safeToString(item.value)
2968
+ }
2969
+ )
2970
+ ] }, item.key ?? index);
2971
+ }) }) });
2972
+ };
2973
+
2974
+ // src/common/Notification.tsx
2975
+ var import_react34 = require("react");
2976
+ var import_react35 = require("@headlessui/react");
2977
+ var import_solid5 = require("@heroicons/react/20/solid");
2978
+ var import_outline3 = require("@heroicons/react/24/outline");
2979
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2980
+ function Notification({
2981
+ show,
2982
+ setShow,
2983
+ title,
2984
+ message,
2985
+ buttons,
2986
+ type
2987
+ }) {
2988
+ let icon;
2989
+ switch (type) {
2990
+ case "success":
2991
+ icon = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2992
+ import_outline3.CheckCircleIcon,
2993
+ {
2994
+ className: "h-6 w-6 text-green-400",
2995
+ "aria-hidden": "true"
2996
+ }
2997
+ );
2998
+ break;
2999
+ case "error":
3000
+ icon = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3001
+ import_outline3.ExclamationCircleIcon,
3002
+ {
3003
+ className: "h-6 w-6 text-red-400",
3004
+ "aria-hidden": "true"
3005
+ }
3006
+ );
3007
+ break;
3008
+ case "warning":
3009
+ icon = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3010
+ import_outline3.ExclamationCircleIcon,
3011
+ {
3012
+ className: "h-6 w-6 text-yellow-400",
3013
+ "aria-hidden": "true"
3014
+ }
3015
+ );
3016
+ break;
3017
+ case "info":
3018
+ icon = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3019
+ import_outline3.InformationCircleIcon,
3020
+ {
3021
+ className: "h-6 w-6 text-blue-400",
3022
+ "aria-hidden": "true"
3023
+ }
3024
+ );
3025
+ break;
3026
+ }
3027
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3028
+ "div",
3029
+ {
3030
+ "aria-live": "assertive",
3031
+ className: "pointer-events-none fixed inset-0 z-40 flex items-end px-4 py-6 sm:items-start sm:p-6",
3032
+ onClick: (evt) => {
3033
+ evt.stopPropagation();
3034
+ },
3035
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex w-full flex-col items-center space-y-4 sm:items-end", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3036
+ import_react35.Transition,
3037
+ {
3038
+ show,
3039
+ as: import_react34.Fragment,
3040
+ enter: "transform ease-out duration-300 transition",
3041
+ enterFrom: "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",
3042
+ enterTo: "translate-y-0 opacity-100 sm:translate-x-0",
3043
+ leave: "transition ease-in duration-100",
3044
+ leaveFrom: "opacity-100",
3045
+ leaveTo: "opacity-0",
3046
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("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__ */ (0, import_jsx_runtime26.jsx)("div", { className: "p-4", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-start", children: [
3047
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex-shrink-0", children: icon }),
3048
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "ml-3 w-0 flex-1", children: [
3049
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-text-foreground text-sm font-medium", children: title }),
3050
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mt-1 text-sm text-gray-500", children: message }),
3051
+ buttons && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mt-4 flex", children: buttons() })
3052
+ ] }),
3053
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "ml-4 flex flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3054
+ "button",
3055
+ {
3056
+ type: "button",
3057
+ 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",
3058
+ onClick: () => {
3059
+ setShow(false);
3060
+ },
3061
+ children: [
3062
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "sr-only", children: "Close" }),
3063
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_solid5.XMarkIcon, { className: "h-5 w-5", "aria-hidden": "true" })
3064
+ ]
3065
+ }
3066
+ ) })
3067
+ ] }) }) })
3068
+ }
3069
+ ) })
3070
+ }
3071
+ ) });
3072
+ }
3073
+
3074
+ // src/common/table/ResizeTable.tsx
3075
+ var import_react43 = require("react");
2257
3076
  var import_react_table = require("@tanstack/react-table");
2258
3077
  var import_react_virtual2 = require("@tanstack/react-virtual");
2259
3078
  var import_hi2 = require("react-icons/hi");
2260
- var import_lodash6 = require("lodash");
3079
+ var import_lodash7 = require("lodash");
2261
3080
 
2262
3081
  // src/common/menu/PopupMenuButton.tsx
2263
- var import_react28 = require("react");
2264
- var import_react29 = require("@headlessui/react");
2265
- var import_react30 = require("@floating-ui/react");
3082
+ var import_react40 = require("react");
3083
+ var import_react41 = require("@headlessui/react");
3084
+ var import_react42 = require("@floating-ui/react");
2266
3085
 
2267
3086
  // src/common/menu/SubMenu.tsx
2268
- var import_react24 = require("react");
2269
- var import_react25 = require("@floating-ui/react");
2270
- var import_react26 = require("@headlessui/react");
3087
+ var import_react36 = require("react");
3088
+ var import_react37 = require("@floating-ui/react");
3089
+ var import_react38 = require("@headlessui/react");
2271
3090
  var import_hi = require("react-icons/hi");
2272
- var import_solid4 = require("@heroicons/react/20/solid");
2273
- var import_jsx_runtime19 = require("react/jsx-runtime");
3091
+ var import_solid6 = require("@heroicons/react/20/solid");
3092
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2274
3093
  var COLOR_MAP = {
2275
3094
  default: {
2276
3095
  active: "bg-gray-100 text-text-foreground dark:bg-primary-600 dark:text-white",
@@ -2283,12 +3102,12 @@ var COLOR_MAP = {
2283
3102
  disabled: "text-red-200 dark:text-red-600/40 cursor-not-allowed"
2284
3103
  }
2285
3104
  };
2286
- var MenuContext = (0, import_react24.createContext)({});
3105
+ var MenuContext = (0, import_react36.createContext)({});
2287
3106
  var MenuItem = ({ item, onSelect, labelClassName }) => {
2288
- const { selectedKey } = (0, import_react24.useContext)(MenuContext);
2289
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react26.Menu.Item, { disabled: item.disabled, children: ({ active }) => {
3107
+ const { selectedKey } = (0, import_react36.useContext)(MenuContext);
3108
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react38.Menu.Item, { disabled: item.disabled, children: ({ active }) => {
2290
3109
  if (item.items) {
2291
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3110
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2292
3111
  SubMenuButton,
2293
3112
  {
2294
3113
  items: item.items,
@@ -2301,7 +3120,7 @@ var MenuItem = ({ item, onSelect, labelClassName }) => {
2301
3120
  item.key
2302
3121
  );
2303
3122
  }
2304
- const buttonNode = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3123
+ const buttonNode = /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2305
3124
  "button",
2306
3125
  {
2307
3126
  onClick: (e) => onSelect?.(item.key, e, item),
@@ -2312,7 +3131,7 @@ var MenuItem = ({ item, onSelect, labelClassName }) => {
2312
3131
  disabled: item.disabled,
2313
3132
  children: [
2314
3133
  item.icon,
2315
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3134
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2316
3135
  "span",
2317
3136
  {
2318
3137
  className: (0, import_class_variance_authority10.cx)(
@@ -2322,15 +3141,15 @@ var MenuItem = ({ item, onSelect, labelClassName }) => {
2322
3141
  children: item.label
2323
3142
  }
2324
3143
  ),
2325
- item.key === selectedKey ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_hi.HiCheck, { className: "icon-lg ml-2" }) : null
3144
+ item.key === selectedKey ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_hi.HiCheck, { className: "icon-lg ml-2" }) : null
2326
3145
  ]
2327
3146
  }
2328
3147
  );
2329
3148
  if (item.disabled && item.disabledHint) {
2330
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3149
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2331
3150
  PopoverTooltip,
2332
3151
  {
2333
- text: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-icontent font-icontent text-gray cursor-auto", children: item.disabledHint }),
3152
+ text: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-icontent font-icontent text-gray cursor-auto", children: item.disabledHint }),
2334
3153
  strategy: "fixed",
2335
3154
  children: buttonNode
2336
3155
  }
@@ -2350,21 +3169,21 @@ var SubMenuButton = (props) => {
2350
3169
  placement = "right-start",
2351
3170
  buttonClass: buttonClass3
2352
3171
  } = props;
2353
- const [open, setOpen] = (0, import_react24.useState)(false);
2354
- const { refs, floatingStyles, context } = (0, import_react25.useFloating)({
3172
+ const [open, setOpen] = (0, import_react36.useState)(false);
3173
+ const { refs, floatingStyles, context } = (0, import_react37.useFloating)({
2355
3174
  open,
2356
3175
  onOpenChange: setOpen,
2357
3176
  placement,
2358
- whileElementsMounted: import_react25.autoUpdate,
2359
- middleware: [(0, import_react25.flip)(), (0, import_react25.shift)()]
3177
+ whileElementsMounted: import_react37.autoUpdate,
3178
+ middleware: [(0, import_react37.flip)(), (0, import_react37.shift)()]
2360
3179
  });
2361
- const { getReferenceProps, getFloatingProps } = (0, import_react25.useInteractions)([
2362
- (0, import_react25.useHover)(context, {
2363
- handleClose: (0, import_react25.safePolygon)()
3180
+ const { getReferenceProps, getFloatingProps } = (0, import_react37.useInteractions)([
3181
+ (0, import_react37.useHover)(context, {
3182
+ handleClose: (0, import_react37.safePolygon)()
2364
3183
  })
2365
3184
  ]);
2366
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2367
- import_react26.Menu,
3185
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3186
+ import_react38.Menu,
2368
3187
  {
2369
3188
  as: "div",
2370
3189
  className: (0, import_class_variance_authority10.cx)(
@@ -2373,8 +3192,8 @@ var SubMenuButton = (props) => {
2373
3192
  disabled ? "pointer-events-none cursor-not-allowed text-gray-400" : "cursor-pointer"
2374
3193
  ),
2375
3194
  children: [
2376
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2377
- import_react26.Menu.Button,
3195
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3196
+ import_react38.Menu.Button,
2378
3197
  {
2379
3198
  className: (0, import_class_variance_authority10.cx)(
2380
3199
  active || open ? COLOR_MAP[status || "default"].active : COLOR_MAP[status || "default"].default,
@@ -2389,9 +3208,9 @@ var SubMenuButton = (props) => {
2389
3208
  ...getReferenceProps,
2390
3209
  children: [
2391
3210
  props.icon,
2392
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "flex-shrink flex-grow text-left", children: label }),
2393
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2394
- import_solid4.ChevronRightIcon,
3211
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "flex-shrink flex-grow text-left", children: label }),
3212
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3213
+ import_solid6.ChevronRightIcon,
2395
3214
  {
2396
3215
  className: (0, import_class_variance_authority10.cx)(
2397
3216
  open ? "text-gray-500" : "text-gray-400",
@@ -2404,8 +3223,8 @@ var SubMenuButton = (props) => {
2404
3223
  ]
2405
3224
  }
2406
3225
  ),
2407
- open && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2408
- import_react26.Menu.Items,
3226
+ open && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3227
+ import_react38.Menu.Items,
2409
3228
  {
2410
3229
  static: true,
2411
3230
  ref: refs.setFloating,
@@ -2413,12 +3232,12 @@ var SubMenuButton = (props) => {
2413
3232
  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",
2414
3233
  ...getFloatingProps,
2415
3234
  children: items.map(
2416
- (items2, i) => items2 && items2.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3235
+ (items2, i) => items2 && items2.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2417
3236
  "div",
2418
3237
  {
2419
3238
  className: "overflow-auto py-1",
2420
3239
  style: { maxHeight: "60vh" },
2421
- children: items2.map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MenuItem, { item, onSelect }, item.key))
3240
+ children: items2.map((item) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MenuItem, { item, onSelect }, item.key))
2422
3241
  },
2423
3242
  i
2424
3243
  ) : null
@@ -2431,8 +3250,8 @@ var SubMenuButton = (props) => {
2431
3250
  };
2432
3251
 
2433
3252
  // src/utils/nav-size-context.ts
2434
- var import_react27 = require("react");
2435
- var NavSizeContext = (0, import_react27.createContext)({
3253
+ var import_react39 = require("react");
3254
+ var NavSizeContext = (0, import_react39.createContext)({
2436
3255
  small: true,
2437
3256
  showLabel: true,
2438
3257
  setSmall: (small) => {
@@ -2442,7 +3261,7 @@ var NavSizeContext = (0, import_react27.createContext)({
2442
3261
  });
2443
3262
 
2444
3263
  // src/common/menu/PopupMenuButton.tsx
2445
- var import_jsx_runtime20 = require("react/jsx-runtime");
3264
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2446
3265
  function PopupMenuButton({
2447
3266
  buttonIcon,
2448
3267
  items,
@@ -2462,74 +3281,82 @@ function PopupMenuButton({
2462
3281
  selectedKey,
2463
3282
  onOpenCallback
2464
3283
  }) {
2465
- const [menuOpen, setMenuOpen] = (0, import_react28.useState)(false);
2466
- const { small } = (0, import_react28.useContext)(NavSizeContext);
2467
- const { refs, floatingStyles, context } = (0, import_react30.useFloating)({
3284
+ const [menuOpen, setMenuOpen] = (0, import_react40.useState)(false);
3285
+ const { small } = (0, import_react40.useContext)(NavSizeContext);
3286
+ const { refs, floatingStyles, context } = (0, import_react42.useFloating)({
2468
3287
  open: menuOpen,
2469
3288
  onOpenChange: setMenuOpen,
2470
- middleware: [(0, import_react30.offset)(offset2), (0, import_react30.flip)(), (0, import_react30.shift)()],
3289
+ middleware: [(0, import_react42.offset)(offset2), (0, import_react42.flip)(), (0, import_react42.shift)()],
2471
3290
  placement,
2472
- whileElementsMounted: import_react30.autoUpdate
3291
+ whileElementsMounted: import_react42.autoUpdate
2473
3292
  });
2474
- const itemStyle = (0, import_react28.useMemo)(() => {
3293
+ const itemStyle = (0, import_react40.useMemo)(() => {
2475
3294
  return {
2476
3295
  width
2477
3296
  };
2478
3297
  }, [width]);
2479
- const onOpenCallbackRef = (0, import_react28.useRef)(onOpenCallback);
3298
+ const onOpenCallbackRef = (0, import_react40.useRef)(onOpenCallback);
2480
3299
  onOpenCallbackRef.current = onOpenCallback;
2481
- (0, import_react28.useEffect)(() => {
3300
+ (0, import_react40.useEffect)(() => {
2482
3301
  if (menuOpen) {
2483
3302
  onOpenCallbackRef.current?.();
2484
3303
  }
2485
3304
  }, [menuOpen]);
2486
3305
  let menuItems = null;
2487
3306
  if (menuOpen && items.length > 0) {
2488
- menuItems = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MenuContext.Provider, { value: { selectedKey }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { ref: refs.setFloating, style: floatingStyles, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2489
- import_react29.Transition,
3307
+ menuItems = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MenuContext.Provider, { value: { selectedKey }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3308
+ "div",
2490
3309
  {
2491
- as: import_react28.Fragment,
2492
- enter: "transition ease-out duration-100",
2493
- enterFrom: "transform opacity-0 scale-95",
2494
- enterTo: "transform opacity-100 scale-100",
2495
- leave: "transition ease-in duration-75",
2496
- leaveFrom: "transform opacity-100 scale-100",
2497
- leaveTo: "transform opacity-0 scale-95",
2498
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2499
- import_react29.Menu.Items,
3310
+ ref: refs.setFloating,
3311
+ style: floatingStyles,
3312
+ className: small ? "z-10" : "z-[100]",
3313
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3314
+ import_react41.Transition,
2500
3315
  {
2501
- 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",
2502
- style: itemStyle,
2503
- children: [
2504
- header,
2505
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: `${itemsClassName} divide-y`, children: items.map((items2, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "py-1", children: [
2506
- groupLabels?.[i] ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "px-4 py-0.5 text-[10px] font-medium leading-[12px] text-gray-500", children: groupLabels[i] }) : null,
2507
- items2.map(
2508
- (item) => renderItem ? renderItem(item) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2509
- MenuItem,
2510
- {
2511
- item,
2512
- onSelect,
2513
- labelClassName: itemLabelClassName
2514
- },
2515
- item.key
2516
- )
2517
- )
2518
- ] }, i)) }),
2519
- footer
2520
- ]
3316
+ as: import_react40.Fragment,
3317
+ enter: "transition ease-out duration-100",
3318
+ enterFrom: "transform opacity-0 scale-95",
3319
+ enterTo: "transform opacity-100 scale-100",
3320
+ leave: "transition ease-in duration-75",
3321
+ leaveFrom: "transform opacity-100 scale-100",
3322
+ leaveTo: "transform opacity-0 scale-95",
3323
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
3324
+ import_react41.Menu.Items,
3325
+ {
3326
+ 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",
3327
+ style: itemStyle,
3328
+ children: [
3329
+ header,
3330
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `${itemsClassName} divide-y`, children: items.map((items2, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "py-1", children: [
3331
+ groupLabels?.[i] ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "px-4 py-0.5 text-[10px] font-medium leading-[12px] text-gray-500", children: groupLabels[i] }) : null,
3332
+ items2.map(
3333
+ (item) => renderItem ? renderItem(item) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3334
+ MenuItem,
3335
+ {
3336
+ item,
3337
+ onSelect,
3338
+ labelClassName: itemLabelClassName
3339
+ },
3340
+ item.key
3341
+ )
3342
+ )
3343
+ ] }, i)) }),
3344
+ footer
3345
+ ]
3346
+ }
3347
+ )
2521
3348
  }
2522
3349
  )
2523
3350
  }
2524
- ) }) });
3351
+ ) });
2525
3352
  }
2526
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react29.Menu, { children: ({ open }) => {
3353
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react41.Menu, { children: ({ open }) => {
2527
3354
  setTimeout(() => {
2528
3355
  setMenuOpen(open);
2529
3356
  }, 0);
2530
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
2531
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2532
- import_react29.Menu.Button,
3357
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
3358
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3359
+ import_react41.Menu.Button,
2533
3360
  {
2534
3361
  className: (0, import_class_variance_authority10.cx)(
2535
3362
  "text-gray w-fit px-1 hover:text-gray-500 active:text-gray-700",
@@ -2541,14 +3368,14 @@ function PopupMenuButton({
2541
3368
  children: typeof buttonIcon === "function" ? buttonIcon(menuOpen) : buttonIcon
2542
3369
  }
2543
3370
  ),
2544
- portal ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react30.FloatingPortal, { children: menuItems }) : menuItems
3371
+ portal ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react42.FloatingPortal, { children: menuItems }) : menuItems
2545
3372
  ] });
2546
3373
  } });
2547
3374
  }
2548
3375
 
2549
3376
  // src/common/table/Icons.tsx
2550
- var import_jsx_runtime21 = require("react/jsx-runtime");
2551
- var MoveLeftIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3377
+ var import_jsx_runtime29 = require("react/jsx-runtime");
3378
+ var MoveLeftIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2552
3379
  "svg",
2553
3380
  {
2554
3381
  width: "16",
@@ -2558,8 +3385,8 @@ var MoveLeftIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2558
3385
  xmlns: "http://www.w3.org/2000/svg",
2559
3386
  ...props,
2560
3387
  children: [
2561
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("g", { clipPath: "url(#clip0_6869_7300)", children: [
2562
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3388
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("g", { clipPath: "url(#clip0_6869_7300)", children: [
3389
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2563
3390
  "path",
2564
3391
  {
2565
3392
  d: "M2.66666 8H9.33332",
@@ -2569,7 +3396,7 @@ var MoveLeftIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2569
3396
  strokeLinejoin: "round"
2570
3397
  }
2571
3398
  ),
2572
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3399
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2573
3400
  "path",
2574
3401
  {
2575
3402
  d: "M2.66666 8L5.33332 10.6667",
@@ -2579,7 +3406,7 @@ var MoveLeftIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2579
3406
  strokeLinejoin: "round"
2580
3407
  }
2581
3408
  ),
2582
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3409
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2583
3410
  "path",
2584
3411
  {
2585
3412
  d: "M2.66669 7.9987L5.33335 5.33203",
@@ -2589,7 +3416,7 @@ var MoveLeftIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2589
3416
  strokeLinejoin: "round"
2590
3417
  }
2591
3418
  ),
2592
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3419
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2593
3420
  "path",
2594
3421
  {
2595
3422
  d: "M13.3333 2.66797V13.3346",
@@ -2600,11 +3427,11 @@ var MoveLeftIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2600
3427
  }
2601
3428
  )
2602
3429
  ] }),
2603
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("clipPath", { id: "clip0_6869_7300", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
3430
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("clipPath", { id: "clip0_6869_7300", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
2604
3431
  ]
2605
3432
  }
2606
3433
  );
2607
- var MoveRightIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3434
+ var MoveRightIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2608
3435
  "svg",
2609
3436
  {
2610
3437
  width: "16",
@@ -2614,8 +3441,8 @@ var MoveRightIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2614
3441
  xmlns: "http://www.w3.org/2000/svg",
2615
3442
  ...props,
2616
3443
  children: [
2617
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("g", { clipPath: "url(#clip0_6869_7309)", children: [
2618
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3444
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("g", { clipPath: "url(#clip0_6869_7309)", children: [
3445
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2619
3446
  "path",
2620
3447
  {
2621
3448
  d: "M13.3333 8H6.66666",
@@ -2625,7 +3452,7 @@ var MoveRightIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2625
3452
  strokeLinejoin: "round"
2626
3453
  }
2627
3454
  ),
2628
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3455
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2629
3456
  "path",
2630
3457
  {
2631
3458
  d: "M13.3333 8L10.6667 10.6667",
@@ -2635,7 +3462,7 @@ var MoveRightIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2635
3462
  strokeLinejoin: "round"
2636
3463
  }
2637
3464
  ),
2638
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3465
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2639
3466
  "path",
2640
3467
  {
2641
3468
  d: "M13.3334 7.9987L10.6667 5.33203",
@@ -2645,7 +3472,7 @@ var MoveRightIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2645
3472
  strokeLinejoin: "round"
2646
3473
  }
2647
3474
  ),
2648
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3475
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2649
3476
  "path",
2650
3477
  {
2651
3478
  d: "M2.66669 2.66797V13.3346",
@@ -2656,11 +3483,11 @@ var MoveRightIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2656
3483
  }
2657
3484
  )
2658
3485
  ] }),
2659
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("clipPath", { id: "clip0_6869_7309", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
3486
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("clipPath", { id: "clip0_6869_7309", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
2660
3487
  ]
2661
3488
  }
2662
3489
  );
2663
- var RenameIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3490
+ var RenameIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2664
3491
  "svg",
2665
3492
  {
2666
3493
  width: "16",
@@ -2670,7 +3497,7 @@ var RenameIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2670
3497
  xmlns: "http://www.w3.org/2000/svg",
2671
3498
  ...props,
2672
3499
  children: [
2673
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3500
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2674
3501
  "path",
2675
3502
  {
2676
3503
  d: "M8 13.3281H14",
@@ -2680,7 +3507,7 @@ var RenameIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2680
3507
  strokeLinejoin: "round"
2681
3508
  }
2682
3509
  ),
2683
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3510
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2684
3511
  "path",
2685
3512
  {
2686
3513
  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",
@@ -2693,7 +3520,7 @@ var RenameIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2693
3520
  ]
2694
3521
  }
2695
3522
  );
2696
- var DeleteIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3523
+ var DeleteIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2697
3524
  "svg",
2698
3525
  {
2699
3526
  width: "16",
@@ -2703,8 +3530,8 @@ var DeleteIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2703
3530
  xmlns: "http://www.w3.org/2000/svg",
2704
3531
  ...props,
2705
3532
  children: [
2706
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("g", { clipPath: "url(#clip0_6869_7344)", children: [
2707
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3533
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("g", { clipPath: "url(#clip0_6869_7344)", children: [
3534
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2708
3535
  "path",
2709
3536
  {
2710
3537
  d: "M2.66669 4.66797H13.3334",
@@ -2714,7 +3541,7 @@ var DeleteIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2714
3541
  strokeLinejoin: "round"
2715
3542
  }
2716
3543
  ),
2717
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3544
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2718
3545
  "path",
2719
3546
  {
2720
3547
  d: "M6.66669 7.33203V11.332",
@@ -2724,7 +3551,7 @@ var DeleteIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2724
3551
  strokeLinejoin: "round"
2725
3552
  }
2726
3553
  ),
2727
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3554
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2728
3555
  "path",
2729
3556
  {
2730
3557
  d: "M9.33331 7.33203V11.332",
@@ -2734,7 +3561,7 @@ var DeleteIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2734
3561
  strokeLinejoin: "round"
2735
3562
  }
2736
3563
  ),
2737
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3564
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2738
3565
  "path",
2739
3566
  {
2740
3567
  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",
@@ -2744,7 +3571,7 @@ var DeleteIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2744
3571
  strokeLinejoin: "round"
2745
3572
  }
2746
3573
  ),
2747
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3574
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2748
3575
  "path",
2749
3576
  {
2750
3577
  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",
@@ -2755,14 +3582,14 @@ var DeleteIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2755
3582
  }
2756
3583
  )
2757
3584
  ] }),
2758
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("clipPath", { id: "clip0_6869_7344", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
3585
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("clipPath", { id: "clip0_6869_7344", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
2759
3586
  ]
2760
3587
  }
2761
3588
  );
2762
3589
 
2763
3590
  // src/common/table/ResizeTable.tsx
2764
3591
  var import_io5 = require("react-icons/io5");
2765
- var import_jsx_runtime22 = require("react/jsx-runtime");
3592
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2766
3593
  var reorder = (list, startIndex, endIndex) => {
2767
3594
  const result = Array.from(list);
2768
3595
  const [removed] = result.splice(startIndex, 1);
@@ -2772,7 +3599,7 @@ var reorder = (list, startIndex, endIndex) => {
2772
3599
  function onPreventClick(e) {
2773
3600
  e.stopPropagation();
2774
3601
  }
2775
- var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
3602
+ var _ResizeTable = (0, import_react43.forwardRef)(function _ResizeTable2({
2776
3603
  data,
2777
3604
  columns,
2778
3605
  columnResizeMode,
@@ -2796,7 +3623,7 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
2796
3623
  estimatedRowHeight = 35,
2797
3624
  overscan = 5
2798
3625
  }, tableContainerRef) {
2799
- const adjustedColumns = (0, import_react31.useMemo)(() => {
3626
+ const adjustedColumns = (0, import_react43.useMemo)(() => {
2800
3627
  let totalWidth = 0;
2801
3628
  const newColumns = columns.map((c) => {
2802
3629
  const item = Object.assign({ minSize }, c);
@@ -2815,7 +3642,7 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
2815
3642
  }
2816
3643
  return newColumns;
2817
3644
  }, [columns, minSize, minWidth]);
2818
- const [tableState, setTableState] = (0, import_react31.useState)(() => {
3645
+ const [tableState, setTableState] = (0, import_react43.useState)(() => {
2819
3646
  const initialState = {
2820
3647
  pagination: {
2821
3648
  pageIndex: 0,
@@ -2835,7 +3662,7 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
2835
3662
  onStateChange: setTableState,
2836
3663
  manualSorting
2837
3664
  });
2838
- (0, import_react31.useEffect)(() => {
3665
+ (0, import_react43.useEffect)(() => {
2839
3666
  if (state && Object.keys(state).length > 0) {
2840
3667
  setTableState((prev) => {
2841
3668
  const newState = {
@@ -2843,19 +3670,19 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
2843
3670
  ...state,
2844
3671
  pagination: prev.pagination || state.pagination || { pageIndex: 0, pageSize: 10 }
2845
3672
  };
2846
- return (0, import_lodash6.isEqual)(prev, newState) ? prev : newState;
3673
+ return (0, import_lodash7.isEqual)(prev, newState) ? prev : newState;
2847
3674
  });
2848
3675
  }
2849
3676
  }, [state]);
2850
- const debounceStateChange = (0, import_react31.useMemo)(() => {
3677
+ const debounceStateChange = (0, import_react43.useMemo)(() => {
2851
3678
  if (!onStateChange) return void 0;
2852
- return (0, import_lodash6.debounce)(onStateChange, 500, {});
3679
+ return (0, import_lodash7.debounce)(onStateChange, 500, {});
2853
3680
  }, [onStateChange]);
2854
- (0, import_react31.useEffect)(() => {
3681
+ (0, import_react43.useEffect)(() => {
2855
3682
  debounceStateChange?.(tableState);
2856
3683
  }, [debounceStateChange, tableState]);
2857
- const fetchMoreOnBottomReached = (0, import_react31.useMemo)(() => {
2858
- return (0, import_lodash6.debounce)((containerRefElement) => {
3684
+ const fetchMoreOnBottomReached = (0, import_react43.useMemo)(() => {
3685
+ return (0, import_lodash7.debounce)((containerRefElement) => {
2859
3686
  if (containerRefElement) {
2860
3687
  const { scrollHeight, scrollTop, clientHeight } = containerRefElement;
2861
3688
  if (scrollHeight - scrollTop - clientHeight < 300 && !isFetching && hasMore) {
@@ -2864,8 +3691,8 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
2864
3691
  }
2865
3692
  }, 500);
2866
3693
  }, [onFetchMore, isFetching, hasMore]);
2867
- const tableContainerElementRef = (0, import_react31.useRef)(null);
2868
- (0, import_react31.useEffect)(() => {
3694
+ const tableContainerElementRef = (0, import_react43.useRef)(null);
3695
+ (0, import_react43.useEffect)(() => {
2869
3696
  if (tableContainerRef) {
2870
3697
  if (typeof tableContainerRef === "function") {
2871
3698
  tableContainerRef(tableContainerElementRef.current);
@@ -2877,21 +3704,21 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
2877
3704
  const rowVirtualizer = (0, import_react_virtual2.useVirtualizer)({
2878
3705
  count: enableVirtualization ? table.getRowModel().rows.length : 0,
2879
3706
  getScrollElement: () => tableContainerElementRef.current,
2880
- estimateSize: (0, import_react31.useCallback)(() => estimatedRowHeight, [estimatedRowHeight]),
3707
+ estimateSize: (0, import_react43.useCallback)(() => estimatedRowHeight, [estimatedRowHeight]),
2881
3708
  overscan,
2882
3709
  enabled: enableVirtualization
2883
3710
  });
2884
3711
  const virtualRows = enableVirtualization ? rowVirtualizer.getVirtualItems() : [];
2885
3712
  const paddingTop = enableVirtualization && virtualRows.length > 0 ? virtualRows[0].start : 0;
2886
3713
  const paddingBottom = enableVirtualization && virtualRows.length > 0 ? rowVirtualizer.getTotalSize() - (virtualRows[virtualRows.length - 1].start + virtualRows[virtualRows.length - 1].size) : 0;
2887
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3714
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2888
3715
  "div",
2889
3716
  {
2890
3717
  className: "overflow-auto",
2891
3718
  style: height ? { height } : void 0,
2892
3719
  ref: tableContainerElementRef,
2893
3720
  onScroll: (e) => fetchMoreOnBottomReached(e.target),
2894
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3721
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2895
3722
  "table",
2896
3723
  {
2897
3724
  className: "w-fit",
@@ -2901,11 +3728,11 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
2901
3728
  }
2902
3729
  },
2903
3730
  children: [
2904
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("thead", { className: "dark:bg-sentio-gray-100 sticky top-0 z-[1] bg-white", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3731
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("thead", { className: "dark:bg-sentio-gray-100 sticky top-0 z-[1] bg-white", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2905
3732
  "tr",
2906
3733
  {
2907
3734
  className: "relative flex w-fit cursor-pointer items-center border-b",
2908
- children: headerGroup.headers.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3735
+ children: headerGroup.headers.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2909
3736
  "th",
2910
3737
  {
2911
3738
  colSpan: header.colSpan,
@@ -2915,12 +3742,12 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
2915
3742
  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",
2916
3743
  onClick: header.column.getToggleSortingHandler(),
2917
3744
  children: [
2918
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "flex w-full flex-1 overflow-hidden", children: [
2919
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "flex-1 truncate", children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
3745
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "flex w-full flex-1 overflow-hidden", children: [
3746
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "flex-1 truncate", children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
2920
3747
  header.column.columnDef.header,
2921
3748
  header.getContext()
2922
3749
  ) }),
2923
- header.column.getCanSort() && allowSort ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3750
+ header.column.getCanSort() && allowSort ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2924
3751
  "span",
2925
3752
  {
2926
3753
  className: (0, import_class_variance_authority10.cx)(
@@ -2929,16 +3756,16 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
2929
3756
  "inline-block cursor-pointer",
2930
3757
  "shrink-0"
2931
3758
  ),
2932
- children: header.column.getIsSorted() ? header.column.getIsSorted() == "desc" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_hi2.HiOutlineSortDescending, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_hi2.HiOutlineSortAscending, { className: "h-4 w-4" }) : ""
3759
+ children: header.column.getIsSorted() ? header.column.getIsSorted() == "desc" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_hi2.HiOutlineSortDescending, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_hi2.HiOutlineSortAscending, { className: "h-4 w-4" }) : ""
2933
3760
  }
2934
3761
  ) : null
2935
3762
  ] }),
2936
- allowEditColumn !== false && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3763
+ allowEditColumn !== false && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2937
3764
  "span",
2938
3765
  {
2939
3766
  className: "invisible inline-block group-hover/th:visible",
2940
3767
  onClick: onPreventClick,
2941
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3768
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2942
3769
  PopupMenuButton,
2943
3770
  {
2944
3771
  buttonClassName: "align-text-bottom",
@@ -2964,19 +3791,19 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
2964
3791
  console.log(commandKey, "is not applied");
2965
3792
  }
2966
3793
  },
2967
- buttonIcon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_hi2.HiChevronDown, { className: "icon mr-2" }),
3794
+ buttonIcon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_hi2.HiChevronDown, { className: "icon mr-2" }),
2968
3795
  items: [
2969
3796
  [
2970
3797
  {
2971
3798
  key: "reorder.left",
2972
3799
  label: "Move column left",
2973
- icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MoveLeftIcon, { className: "mr-2" }),
3800
+ icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(MoveLeftIcon, { className: "mr-2" }),
2974
3801
  disabled: i === 0
2975
3802
  },
2976
3803
  {
2977
3804
  key: "reorder.right",
2978
3805
  label: "Move column right",
2979
- icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MoveRightIcon, { className: "mr-2" }),
3806
+ icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(MoveRightIcon, { className: "mr-2" }),
2980
3807
  disabled: i === headerGroup.headers.length - 1
2981
3808
  }
2982
3809
  ],
@@ -2985,7 +3812,7 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
2985
3812
  {
2986
3813
  key: "rename",
2987
3814
  label: "Rename column",
2988
- icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(RenameIcon, { className: "mr-2" })
3815
+ icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RenameIcon, { className: "mr-2" })
2989
3816
  }
2990
3817
  ]
2991
3818
  ] : [],
@@ -2994,7 +3821,7 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
2994
3821
  {
2995
3822
  key: "delete",
2996
3823
  label: "Remove column",
2997
- icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DeleteIcon, { className: "mr-2" }),
3824
+ icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DeleteIcon, { className: "mr-2" }),
2998
3825
  status: "danger"
2999
3826
  }
3000
3827
  ]
@@ -3004,7 +3831,7 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
3004
3831
  )
3005
3832
  }
3006
3833
  ),
3007
- header.column.getCanResize() ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3834
+ header.column.getCanResize() ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3008
3835
  "div",
3009
3836
  {
3010
3837
  onMouseDown: header.getResizeHandler(),
@@ -3027,11 +3854,11 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
3027
3854
  },
3028
3855
  headerGroup.id
3029
3856
  )) }),
3030
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("tbody", { children: [
3031
- enableVirtualization && paddingTop > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { style: { height: `${paddingTop}px` } }) }),
3857
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("tbody", { children: [
3858
+ enableVirtualization && paddingTop > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("td", { style: { height: `${paddingTop}px` } }) }),
3032
3859
  enableVirtualization ? virtualRows.map((virtualRow) => {
3033
3860
  const row = table.getRowModel().rows[virtualRow.index];
3034
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3861
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3035
3862
  "tr",
3036
3863
  {
3037
3864
  "data-index": virtualRow.index,
@@ -3040,7 +3867,7 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
3040
3867
  onClick ? "cursor-pointer" : "",
3041
3868
  rowClassNameFn ? rowClassNameFn(row) : ""
3042
3869
  ),
3043
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3870
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3044
3871
  "td",
3045
3872
  {
3046
3873
  ...{
@@ -3060,7 +3887,7 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
3060
3887
  },
3061
3888
  row.id
3062
3889
  );
3063
- }) : table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3890
+ }) : table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3064
3891
  "tr",
3065
3892
  {
3066
3893
  className: (0, import_class_variance_authority10.cx)(
@@ -3068,7 +3895,7 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
3068
3895
  onClick ? "cursor-pointer" : "",
3069
3896
  rowClassNameFn ? rowClassNameFn(row) : ""
3070
3897
  ),
3071
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3898
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3072
3899
  "td",
3073
3900
  {
3074
3901
  ...{
@@ -3088,8 +3915,8 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
3088
3915
  },
3089
3916
  row.id
3090
3917
  )),
3091
- enableVirtualization && paddingBottom > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { style: { height: `${paddingBottom}px` } }) }),
3092
- onFetchMore && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3918
+ enableVirtualization && paddingBottom > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("td", { style: { height: `${paddingBottom}px` } }) }),
3919
+ onFetchMore && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3093
3920
  "td",
3094
3921
  {
3095
3922
  colSpan: table.getHeaderGroups()[0].headers.length,
@@ -3098,8 +3925,8 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
3098
3925
  if (isFetching) return;
3099
3926
  onFetchMore?.();
3100
3927
  },
3101
- children: isFetching || hasMore ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
3102
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3928
+ children: isFetching || hasMore ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
3929
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3103
3930
  import_io5.IoReload,
3104
3931
  {
3105
3932
  className: (0, import_class_variance_authority10.cx)(
@@ -3108,7 +3935,7 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
3108
3935
  )
3109
3936
  }
3110
3937
  ),
3111
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: "Loading..." })
3938
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "Loading..." })
3112
3939
  ] }) : "No more data"
3113
3940
  }
3114
3941
  ) })
@@ -3119,7 +3946,7 @@ var _ResizeTable = (0, import_react31.forwardRef)(function _ResizeTable2({
3119
3946
  }
3120
3947
  );
3121
3948
  });
3122
- var ResizeTable = (0, import_react31.memo)(_ResizeTable);
3949
+ var ResizeTable = (0, import_react43.memo)(_ResizeTable);
3123
3950
 
3124
3951
  // src/utils/number-format.ts
3125
3952
  var import_bigdecimal = __toESM(require("@sentio/bigdecimal"));
@@ -3146,10 +3973,10 @@ function getNumberWithDecimal(hex, decimal, asNumber) {
3146
3973
  }
3147
3974
 
3148
3975
  // src/utils/use-mobile.ts
3149
- var import_react32 = require("react");
3976
+ var import_react44 = require("react");
3150
3977
  function useMobile(breakpoint = 768, defaultValue = false) {
3151
- const [isMobile, setIsMobile] = (0, import_react32.useState)(defaultValue);
3152
- (0, import_react32.useEffect)(() => {
3978
+ const [isMobile, setIsMobile] = (0, import_react44.useState)(defaultValue);
3979
+ (0, import_react44.useEffect)(() => {
3153
3980
  const checkUserAgent = () => {
3154
3981
  if (typeof window === "undefined") return false;
3155
3982
  const userAgent = window.navigator.userAgent.toLowerCase();
@@ -3201,13 +4028,15 @@ function useMobile(breakpoint = 768, defaultValue = false) {
3201
4028
  BaseZIndexContext,
3202
4029
  Button,
3203
4030
  COLOR_MAP,
4031
+ Checkbox,
3204
4032
  CloseSquareO,
3205
4033
  Collapse,
4034
+ ConfirmDialog,
3206
4035
  CopyButton,
3207
4036
  CopyIcon,
3208
4037
  CopySuccessIcon,
3209
- DarkModeContext,
3210
4038
  DeleteIcon,
4039
+ Descriptions,
3211
4040
  DisclosurePanel,
3212
4041
  Empty,
3213
4042
  EyeO,
@@ -3222,25 +4051,34 @@ function useMobile(breakpoint = 768, defaultValue = false) {
3222
4051
  MoveLeftIcon,
3223
4052
  MoveRightIcon,
3224
4053
  NavSizeContext,
4054
+ Notification,
3225
4055
  PlusSquareO,
3226
4056
  PopoverTooltip,
3227
4057
  PopupMenuButton,
3228
4058
  Proccessing,
4059
+ ProgressBar,
3229
4060
  ROOT_KEY,
3230
4061
  RadioSelect,
3231
4062
  RenameIcon,
3232
4063
  ResizeTable,
3233
4064
  SUFFIX_NODE_KEY,
4065
+ SearchInput,
3234
4066
  Select,
4067
+ SlideOver,
3235
4068
  SpinLoading,
3236
4069
  StatusBadge,
3237
4070
  StatusRole,
3238
4071
  SubMenuButton,
3239
4072
  SvgFolderContext,
3240
4073
  Switch,
4074
+ TabGroup,
4075
+ TabList,
4076
+ TabPanel,
4077
+ TabPanels,
3241
4078
  buttonClass,
3242
4079
  classNames,
3243
4080
  getNumberWithDecimal,
4081
+ getTabClassName,
3244
4082
  parseHex,
3245
4083
  useBoolean,
3246
4084
  useDarkMode,