@geomak/ui 1.0.0
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/README.md +118 -0
- package/dist/index.cjs +2674 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1273 -0
- package/dist/index.d.ts +1273 -0
- package/dist/index.js +2602 -0
- package/dist/index.js.map +1 -0
- package/package.json +83 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2674 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React9 = require('react');
|
|
5
|
+
var Dialog = require('@radix-ui/react-dialog');
|
|
6
|
+
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
7
|
+
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
8
|
+
var Accordion = require('@radix-ui/react-accordion');
|
|
9
|
+
var ToggleGroup = require('@radix-ui/react-toggle-group');
|
|
10
|
+
var Toast = require('@radix-ui/react-toast');
|
|
11
|
+
var Popover = require('@radix-ui/react-popover');
|
|
12
|
+
var SwitchPrimitive = require('@radix-ui/react-switch');
|
|
13
|
+
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
14
|
+
|
|
15
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
|
|
17
|
+
function _interopNamespace(e) {
|
|
18
|
+
if (e && e.__esModule) return e;
|
|
19
|
+
var n = Object.create(null);
|
|
20
|
+
if (e) {
|
|
21
|
+
Object.keys(e).forEach(function (k) {
|
|
22
|
+
if (k !== 'default') {
|
|
23
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
24
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return e[k]; }
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
n.default = e;
|
|
32
|
+
return Object.freeze(n);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
var React9__default = /*#__PURE__*/_interopDefault(React9);
|
|
36
|
+
var Dialog__namespace = /*#__PURE__*/_interopNamespace(Dialog);
|
|
37
|
+
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
38
|
+
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
39
|
+
var Accordion__namespace = /*#__PURE__*/_interopNamespace(Accordion);
|
|
40
|
+
var ToggleGroup__namespace = /*#__PURE__*/_interopNamespace(ToggleGroup);
|
|
41
|
+
var Toast__namespace = /*#__PURE__*/_interopNamespace(Toast);
|
|
42
|
+
var Popover__namespace = /*#__PURE__*/_interopNamespace(Popover);
|
|
43
|
+
var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
|
|
44
|
+
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
45
|
+
|
|
46
|
+
// src/utils/colors.ts
|
|
47
|
+
var PALETTE = {
|
|
48
|
+
"true-blue": "#0466C8",
|
|
49
|
+
"usafa-blue": "#0353A4",
|
|
50
|
+
"dark-cornflower-blue": "#023E7D",
|
|
51
|
+
"oxford-blue-700": "#002855",
|
|
52
|
+
"oxford-blue-800": "#001845",
|
|
53
|
+
"oxford-blue-900": "#001233",
|
|
54
|
+
independence: "#33415C",
|
|
55
|
+
"black-coral": "#5C677D",
|
|
56
|
+
"roman-silver": "#7D8597",
|
|
57
|
+
manatee: "#979DAC",
|
|
58
|
+
white: "#fff",
|
|
59
|
+
ice: "#DBF1FD",
|
|
60
|
+
"ice-dark": "#d0e3ed",
|
|
61
|
+
"midnight-green-eagle-900": "#013E53",
|
|
62
|
+
"midnight-green-eagle-700": "#125F6C",
|
|
63
|
+
"midnight-green-eagle-500": "#125F6C",
|
|
64
|
+
"rich-black-fogra": "#000202",
|
|
65
|
+
"rich-black-fogra-opaque": "#0000005b",
|
|
66
|
+
"prussian-blue": "#00273A",
|
|
67
|
+
"indigo-dye": "#013C54",
|
|
68
|
+
ming: "#0F6372",
|
|
69
|
+
skobeloff: "#217479",
|
|
70
|
+
"dark-cyan": "#2A8784",
|
|
71
|
+
"celadon-green": "#297E74",
|
|
72
|
+
turquise: "#2EB8B0",
|
|
73
|
+
"oxford-blue-700-opaque": "rgba(0, 40, 85, .3)",
|
|
74
|
+
disabled: "#dee2e6",
|
|
75
|
+
error: "tomato",
|
|
76
|
+
warning: "orange",
|
|
77
|
+
success: "lightgreen",
|
|
78
|
+
info: "lightblue",
|
|
79
|
+
transparent: "rgba(255, 255, 255, .0)"
|
|
80
|
+
};
|
|
81
|
+
var COLORS = { PALETTE };
|
|
82
|
+
var colors_default = COLORS;
|
|
83
|
+
var Moon = ({ color = "gray" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: color, viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className: "w-8 h-8", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z" }) });
|
|
84
|
+
var Sun = ({ color = "yellow" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: color, viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className: "w-8 h-8", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z" }) });
|
|
85
|
+
var CheckCircle = ({ color = "#fff", size = 28 }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 28 28", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14 0.25C6.40625 0.25 0.25 6.40625 0.25 14C0.25 21.5937 6.40625 27.75 14 27.75C21.5937 27.75 27.75 21.5937 27.75 14C27.75 6.40625 21.5937 0.25 14 0.25ZM19.96 11.675C20.0697 11.5496 20.1533 11.4034 20.2057 11.2452C20.2582 11.087 20.2784 10.9199 20.2653 10.7537C20.2522 10.5876 20.206 10.4257 20.1295 10.2777C20.0529 10.1296 19.9475 9.99838 19.8194 9.89168C19.6914 9.78497 19.5433 9.70495 19.3839 9.65633C19.2244 9.6077 19.0569 9.59145 18.8911 9.60853C18.7253 9.62562 18.5646 9.67568 18.4184 9.75579C18.2723 9.8359 18.1436 9.94443 18.04 10.075L12.665 16.5237L9.88375 13.7412C9.648 13.5136 9.33224 13.3876 9.0045 13.3904C8.67675 13.3933 8.36324 13.5247 8.13148 13.7565C7.89972 13.9882 7.76825 14.3018 7.76541 14.6295C7.76256 14.9572 7.88855 15.273 8.11625 15.5087L11.8662 19.2587C11.9891 19.3815 12.1361 19.4773 12.298 19.5401C12.4599 19.6028 12.6331 19.6312 12.8066 19.6233C12.98 19.6154 13.15 19.5715 13.3055 19.4943C13.4611 19.4171 13.5988 19.3084 13.71 19.175L19.96 11.675Z", fill: color }) });
|
|
86
|
+
var Login = ({ color = "#fff", size = 6 }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className: `w-${size} h-${size}`, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9" }) });
|
|
87
|
+
var Loading = ({ color = "#fff", size = 6 }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: color, className: `w-${size} h-${size} animate-spin`, children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M4.755 10.059a7.5 7.5 0 0112.548-3.364l1.903 1.903h-3.183a.75.75 0 100 1.5h4.992a.75.75 0 00.75-.75V4.356a.75.75 0 00-1.5 0v3.18l-1.9-1.9A9 9 0 003.306 9.67a.75.75 0 101.45.388zm15.408 3.352a.75.75 0 00-.919.53 7.5 7.5 0 01-12.548 3.364l-1.902-1.903h3.183a.75.75 0 000-1.5H2.984a.75.75 0 00-.75.75v4.992a.75.75 0 001.5 0v-3.18l1.9 1.9a9 9 0 0015.059-4.035.75.75 0 00-.53-.918z", clipRule: "evenodd" }) });
|
|
88
|
+
var ToggleLoading = ({ color = "#fff", loading = false, size = 6 }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: color, className: `w-${size} h-${size} ${loading && "animate-spin"}`, children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M4.755 10.059a7.5 7.5 0 0112.548-3.364l1.903 1.903h-3.183a.75.75 0 100 1.5h4.992a.75.75 0 00.75-.75V4.356a.75.75 0 00-1.5 0v3.18l-1.9-1.9A9 9 0 003.306 9.67a.75.75 0 101.45.388zm15.408 3.352a.75.75 0 00-.919.53 7.5 7.5 0 01-12.548 3.364l-1.902-1.903h3.183a.75.75 0 000-1.5H2.984a.75.75 0 00-.75.75v4.992a.75.75 0 001.5 0v-3.18l1.9 1.9a9 9 0 0015.059-4.035.75.75 0 00-.53-.918z", clipRule: "evenodd" }) });
|
|
89
|
+
var Eye = ({ color = "#fff", size = 6 }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: color, className: `w-${size} h-${size}`, children: [
|
|
90
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 15a3 3 0 100-6 3 3 0 000 6z" }),
|
|
91
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z", clipRule: "evenodd" })
|
|
92
|
+
] });
|
|
93
|
+
var EyeSlash = ({ color = "#fff", size = 6 }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: color, className: `w-${size} h-${size}`, children: [
|
|
94
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.53 2.47a.75.75 0 00-1.06 1.06l18 18a.75.75 0 101.06-1.06l-18-18zM22.676 12.553a11.249 11.249 0 01-2.631 4.31l-3.099-3.099a5.25 5.25 0 00-6.71-6.71L7.759 4.577a11.217 11.217 0 014.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113z" }),
|
|
95
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0115.75 12zM12.53 15.713l-4.243-4.244a3.75 3.75 0 004.243 4.243z" }),
|
|
96
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 00-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 016.75 12z" })
|
|
97
|
+
] });
|
|
98
|
+
var ArrowRight = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M3.75 12a.75.75 0 01.75-.75h13.19l-5.47-5.47a.75.75 0 011.06-1.06l6.75 6.75a.75.75 0 010 1.06l-6.75 6.75a.75.75 0 11-1.06-1.06l5.47-5.47H4.5a.75.75 0 01-.75-.75z", clipRule: "evenodd" }) });
|
|
99
|
+
var Minus = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 12h-15" }) });
|
|
100
|
+
var Dashboard = ({ color = "#fff", size = 30 }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 28 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14.4688 9.65625H24.7812M3.21875 14.3438H13.5312M14 3.09375V20.9062M2.28125 2.15625H25.7188V21.8438H2.28125V2.15625Z", stroke: color, strokeWidth: "2.8125", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
101
|
+
var FleetIcon = ({ color = "#fff", size = 30 }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
102
|
+
/* @__PURE__ */ jsxRuntime.jsx("g", { clipPath: "url(#clip0_327_836)", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M26.5249 26.0324C26.7104 25.8203 26.93 25.7143 27.1839 25.7143C27.4377 25.7143 27.6573 25.8203 27.8428 26.0324L29.7173 28.1752L28.3993 29.6819L27.1839 28.2924L25.9684 29.6819C25.7927 29.894 25.573 30 25.3094 30C25.0458 30 24.8262 29.894 24.6504 29.6819L23.435 28.2924L22.2195 29.6819C22.034 29.894 21.8144 30 21.5605 30C21.3067 30 21.087 29.894 20.9016 29.6819L19.6861 28.2924L18.4706 29.6819C18.2852 29.894 18.0655 30 17.8117 30C17.5578 30 17.3382 29.894 17.1527 29.6819L15.9372 28.2924L14.7218 29.6819C14.5363 29.894 14.3166 30 14.0628 30C13.809 30 13.5893 29.894 13.4038 29.6819L12.1884 28.2924L10.9729 29.6819C10.7874 29.894 10.5677 30 10.3139 30C10.0601 30 9.84042 29.894 9.65493 29.6819L8.43948 28.2924L7.22402 29.6819C7.03853 29.894 6.81887 30 6.56504 30C6.31121 30 6.09155 29.894 5.90606 29.6819L4.6906 28.2924L3.47515 29.6819C3.28966 29.894 3.06999 30 2.81616 30C2.56233 30 2.34267 29.894 2.15718 29.6819L0.282745 27.5391L1.60071 26.0324L2.81616 27.4219L4.03162 26.0324C4.21711 25.8203 4.43677 25.7143 4.6906 25.7143C4.94443 25.7143 5.16409 25.8203 5.34958 26.0324L6.56504 27.4219L7.7805 26.0324C7.96599 25.8203 8.18565 25.7143 8.43948 25.7143C8.69331 25.7143 8.91297 25.8203 9.09846 26.0324L10.3139 27.4219L11.5294 26.0324C11.7149 25.8203 11.9345 25.7143 12.1884 25.7143C12.4422 25.7143 12.6618 25.8203 12.8473 26.0324L14.0628 27.4219L15.2782 26.0324C15.4637 25.8203 15.6834 25.7143 15.9372 25.7143C16.1911 25.7143 16.4107 25.8203 16.5962 26.0324L17.8117 27.4219L19.0271 26.0324C19.2126 25.8203 19.4323 25.7143 19.6861 25.7143C19.9399 25.7143 20.1596 25.8203 20.3451 26.0324L21.5605 27.4219L22.776 26.0324C22.9615 25.8203 23.1811 25.7143 23.435 25.7143C23.6888 25.7143 23.9085 25.8203 24.094 26.0324L25.3094 27.4219L26.5249 26.0324ZM3.47515 25.3962C3.28966 25.6083 3.06999 25.7143 2.81616 25.7143C2.56233 25.7143 2.34267 25.6083 2.15718 25.3962L0.282745 23.2533L1.60071 21.7467L2.81616 23.1194L4.03162 21.7467C4.21711 21.5346 4.43677 21.4286 4.6906 21.4286C4.94443 21.4286 5.16409 21.5346 5.34958 21.7467L6.56504 23.1194L7.50226 22.048V17.1429L4.42701 11.8862C4.26104 11.596 4.22687 11.2807 4.3245 10.9403C4.42213 10.5999 4.61738 10.3739 4.91026 10.2623L7.50226 9.29129V4.28571H9.3767V2.14286H13.1256V0H16.8744V2.14286H20.6233V4.28571H22.4978V9.29129L25.0898 10.2623C25.3826 10.3739 25.5779 10.5999 25.6755 10.9403C25.7731 11.2807 25.739 11.596 25.573 11.8862L22.4978 17.1429V22.048L22.776 21.7467C22.9615 21.5346 23.1811 21.4286 23.435 21.4286C23.6888 21.4286 23.9085 21.5346 24.094 21.7467L25.3094 23.1194L26.5249 21.7467C26.7104 21.5346 26.93 21.4286 27.1839 21.4286C27.4377 21.4286 27.6573 21.5346 27.8428 21.7467L29.7173 23.8895L28.3993 25.3962L27.1839 24.0067L25.9684 25.3962C25.7927 25.6083 25.573 25.7143 25.3094 25.7143C25.0458 25.7143 24.8262 25.6083 24.6504 25.3962L23.435 24.0067L22.2195 25.3962C22.034 25.6083 21.8144 25.7143 21.5605 25.7143C21.3067 25.7143 21.087 25.6083 20.9016 25.3962L19.6861 24.0067L18.4706 25.3962C18.2852 25.6083 18.0655 25.7143 17.8117 25.7143C17.5578 25.7143 17.3382 25.6083 17.1527 25.3962L15.9372 24.0067L14.7218 25.3962C14.5363 25.6083 14.3166 25.7143 14.0628 25.7143C13.809 25.7143 13.5893 25.6083 13.4038 25.3962L12.1884 24.0067L10.9729 25.3962C10.7874 25.6083 10.5677 25.7143 10.3139 25.7143C10.0601 25.7143 9.84042 25.6083 9.65493 25.3962L8.43948 24.0067L7.22402 25.3962C7.03853 25.6083 6.81887 25.7143 6.56504 25.7143C6.31121 25.7143 6.09155 25.6083 5.90606 25.3962L4.6906 24.0067L3.47515 25.3962ZM9.3767 6.42857V8.57143L15 6.42857L20.6233 8.57143V6.42857H18.7489V4.28571H11.2511V6.42857H9.3767Z", fill: color }) }),
|
|
103
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: "clip0_327_836", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "30", height: "30", fill: color }) }) })
|
|
104
|
+
] });
|
|
105
|
+
var Performance = ({ color = "#fff", size = 30 }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5.64 25.515H24.36C26.0709 23.3842 27.0024 20.7327 27 18C27 11.385 21.63 6 15 6C8.37 6 3 11.385 3 18C3 20.85 3.99 23.445 5.64 25.515ZM13.5 9C13.5 8.175 14.175 7.5 15 7.5C15.825 7.5 16.5 8.175 16.5 9C16.5 9.84 15.825 10.5 15 10.5C14.175 10.5 13.5 9.84 13.5 9ZM6 12C6 11.175 6.675 10.5 7.5 10.5C8.325 10.5 9 11.175 9 12C9 12.84 8.325 13.5 7.5 13.5C6.675 13.5 6 12.84 6 12ZM12.78 17.1C14.04 15.855 22.545 11.85 22.545 11.85C22.545 11.85 18.555 20.37 17.31 21.615C16.05 22.875 14.04 22.875 12.78 21.615C12.1819 21.016 11.8459 20.204 11.8459 19.3575C11.8459 18.511 12.1819 17.699 12.78 17.1ZM4.5 19.5C4.5 18.675 5.175 18 6 18C6.825 18 7.5 18.675 7.5 19.5C7.5 20.34 6.825 21 6 21C5.175 21 4.5 20.34 4.5 19.5ZM13.5 19.5C13.5 18.675 14.175 18 15 18C15.825 18 16.5 18.675 16.5 19.5C16.5 20.34 15.825 21 15 21C14.175 21 13.5 20.34 13.5 19.5ZM22.5 19.5C22.5 18.675 23.175 18 24 18C24.825 18 25.5 18.675 25.5 19.5C25.5 20.34 24.825 21 24 21C23.175 21 22.5 20.34 22.5 19.5Z", fill: color }) });
|
|
106
|
+
var Map = ({ color = "#fff", size = 30 }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 34 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
107
|
+
/* @__PURE__ */ jsxRuntime.jsx("g", { clipPath: "url(#clip0_327_830)", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.875 0C12.7975 0 9.49219 3.30527 9.49219 7.38281C9.49219 10.6793 14.3174 16.6875 16.166 18.8684C16.5404 19.3102 17.2102 19.3102 17.584 18.8684C19.4326 16.6875 24.2578 10.6793 24.2578 7.38281C24.2578 3.30527 20.9525 0 16.875 0ZM16.875 9.84375C15.5156 9.84375 14.4141 8.74219 14.4141 7.38281C14.4141 6.02344 15.5156 4.92188 16.875 4.92188C18.2344 4.92188 19.3359 6.02344 19.3359 7.38281C19.3359 8.74219 18.2344 9.84375 16.875 9.84375ZM1.17891 12.6533C0.830964 12.7925 0.532694 13.0327 0.322564 13.343C0.112435 13.6533 8.33325e-05 14.0194 0 14.3941L0 29.0613C0 29.7246 0.669727 30.1781 1.28555 29.932L9.375 26.25V12.593C8.85703 11.6566 8.4334 10.7449 8.12988 9.87305L1.17891 12.6533ZM16.875 21.0744C16.0506 21.0744 15.2707 20.7123 14.7357 20.0807C13.5838 18.7213 12.3586 17.1732 11.25 15.5854V26.2494L22.5 29.9994V15.5859C21.3914 17.1732 20.1668 18.7219 19.0143 20.0812C18.4793 20.7123 17.6994 21.0744 16.875 21.0744ZM32.4645 9.44297L24.375 13.125V30L32.5711 26.7217C32.9191 26.5826 33.2174 26.3424 33.4275 26.0321C33.6377 25.7218 33.75 25.3556 33.75 24.9809V10.3137C33.75 9.65039 33.0803 9.19688 32.4645 9.44297Z", fill: color }) }),
|
|
108
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: "clip0_327_830", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "33.75", height: "30", fill: color }) }) })
|
|
109
|
+
] });
|
|
110
|
+
var CharterParty = ({ color = "#fff", size = 30 }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
111
|
+
/* @__PURE__ */ jsxRuntime.jsxs("mask", { id: "mask0_327_823", style: { maskType: "alpha" }, maskUnits: "userSpaceOnUse", x: "3", y: "1", width: "24", height: "28", children: [
|
|
112
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M23.75 2.5H6.25C5.55964 2.5 5 3.05964 5 3.75V26.25C5 26.9404 5.55964 27.5 6.25 27.5H23.75C24.4404 27.5 25 26.9404 25 26.25V3.75C25 3.05964 24.4404 2.5 23.75 2.5Z", stroke: "white", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
113
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 2.5H15.625V12.5L12.8125 10L10 12.5V2.5Z", fill: color, stroke: color, strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
114
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 17.5H16.25M10 21.25H20", stroke: color, strokeWidth: "2.5", strokeLinecap: "round" })
|
|
115
|
+
] }),
|
|
116
|
+
/* @__PURE__ */ jsxRuntime.jsx("g", { mask: "url(#mask0_327_823)", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0H30V30H0V0Z", fill: color }) })
|
|
117
|
+
] });
|
|
118
|
+
var Compliance = ({ color = "#fff", size = 30 }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
119
|
+
/* @__PURE__ */ jsxRuntime.jsx("g", { clipPath: "url(#clip0_327_821)", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1.87499 14.9962C1.86582 11.6183 3.15973 8.36699 5.48738 5.91906C7.81504 3.47112 10.9971 2.01516 14.3712 1.85426C17.7453 1.69336 21.0514 2.83991 23.6015 5.05525C26.1515 7.27058 27.7489 10.384 28.0612 13.7475C27.6828 13.6443 27.3021 13.5499 26.9194 13.4644C24.8954 13.0002 22.8059 12.893 20.745 13.1475C19.9256 13.2506 19.1512 13.41 18.4219 13.6312C18.325 13.4207 18.2243 13.2119 18.12 13.005C17.9905 12.7506 17.8673 12.493 17.7506 12.2325C17.5856 11.8575 17.4056 11.37 17.4375 10.8525C17.475 10.2525 17.7787 9.76498 18.2681 9.39748C18.8625 8.95123 19.6106 7.92935 20.2556 6.89623C20.5669 6.4031 20.8312 5.93998 21.0187 5.60248L21.0619 5.52373C19.2523 4.36216 17.1465 3.74636 14.9962 3.74998H14.9062C15.0769 4.08748 15.2644 4.4906 15.4331 4.93873C15.8906 6.14998 16.3031 7.92373 15.5662 9.49123C14.8894 10.935 13.7212 11.31 12.8475 11.535L12.7219 11.5669C11.8725 11.7862 11.5219 11.8762 11.2669 12.2606C11.0306 12.6206 11.0737 13.0725 11.3419 13.9481L11.4037 14.145C11.5106 14.4862 11.6381 14.8912 11.7037 15.2737C11.7862 15.75 11.8087 16.3462 11.5087 16.9237C11.2532 17.4397 10.8463 17.8655 10.3425 18.1444C9.95176 18.3427 9.5312 18.4757 9.09749 18.5381L8.96999 18.5606C8.29874 18.6787 7.95749 18.7387 7.62936 19.0893C7.37249 19.365 7.21311 19.8431 7.12124 20.5369C7.08374 20.82 7.05936 21.1012 7.03686 21.3919L7.02374 21.5456C7.00327 21.8794 6.96005 22.2114 6.89436 22.5394L6.84749 22.7456C8.00741 23.9672 9.42664 24.9129 11.0006 25.5131C10.6481 26.0381 10.3219 26.5819 10.0181 27.1406C7.60928 26.1523 5.54882 24.4699 4.09879 22.3074C2.64875 20.1449 1.87467 17.5999 1.87499 14.9962ZM29.8594 16.3837C29.7756 16.2476 29.6584 16.1351 29.5189 16.057C29.3795 15.9789 29.2223 15.9377 29.0625 15.9375H29.0475C28.9738 15.9284 28.9006 15.9159 28.8281 15.9C28.64 15.8553 28.4531 15.8059 28.2675 15.7519L28.0894 15.7031C27.5677 15.5518 27.0419 15.4155 26.5125 15.2943C24.6983 14.8768 22.8251 14.7798 20.9775 15.0075C18.7237 15.2887 17.0006 16.0537 15.825 17.1487C14.6437 18.2531 14.0625 19.6556 14.0625 21.0862C14.0625 21.4294 14.0887 21.7556 14.1337 22.0612C16.1025 20.3437 18.5306 18.9544 21.2137 17.88C21.3281 17.8342 21.4504 17.8114 21.5736 17.8128C21.6968 17.8143 21.8185 17.84 21.9317 17.8885C22.045 17.937 22.1476 18.0073 22.2337 18.0954C22.3197 18.1836 22.3876 18.2878 22.4334 18.4022C22.4792 18.5165 22.502 18.6388 22.5006 18.762C22.4991 18.8852 22.4734 19.0069 22.4249 19.1202C22.3764 19.2334 22.3061 19.336 22.218 19.4221C22.1298 19.5082 22.0256 19.5761 21.9112 19.6219C20.4169 20.22 19.035 20.91 17.79 21.6881C14.6925 23.4956 12.7631 25.8169 11.3494 28.6444C11.2898 28.7549 11.253 28.8762 11.2412 29.0012C11.2294 29.1262 11.2428 29.2523 11.2807 29.372C11.3185 29.4917 11.38 29.6026 11.4616 29.6981C11.5431 29.7936 11.643 29.8717 11.7553 29.9279C11.8676 29.984 11.99 30.017 12.1153 30.025C12.2406 30.0329 12.3662 30.0156 12.4847 29.974C12.6032 29.9325 12.7121 29.8676 12.805 29.7831C12.898 29.6987 12.973 29.5965 13.0256 29.4825C13.7456 28.0462 14.6062 26.7544 15.7406 25.605C16.0418 26.1539 16.4089 26.6639 16.8337 27.1237C17.7037 28.0612 19.1081 29.0625 21.0937 29.0625C22.3162 29.0625 23.3325 28.7512 24.165 28.2075C24.99 27.6712 25.5862 26.9419 26.0325 26.1769C26.7225 24.9956 27.1181 23.5893 27.4106 22.5469C27.4856 22.2843 27.5512 22.0462 27.615 21.84C27.9394 20.7825 28.4137 19.8337 28.8525 19.0575C29.0737 18.6712 29.2819 18.3319 29.4619 18.0431L29.4919 17.9944C29.6374 17.7668 29.7737 17.5335 29.9006 17.295C29.9719 17.1521 30.0055 16.9935 29.9983 16.834C29.9911 16.6745 29.9433 16.5195 29.8594 16.3837Z", fill: color }) }),
|
|
120
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: "clip0_327_821", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "30", height: "30", fill: color }) }) })
|
|
121
|
+
] });
|
|
122
|
+
var Applications = ({ color = "#fff", size = 30 }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.28125 3.28125H11.7188V11.7188H3.28125V3.28125ZM3.28125 18.2812H11.7188V26.7188H3.28125V18.2812ZM18.2812 18.2812H26.7188V26.7188H18.2812V18.2812ZM18.2812 3.28125H26.7188V11.7188H18.2812V3.28125Z", stroke: color, strokeWidth: "2.8125", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
123
|
+
var PowerOff = ({ color = "#fff", size = 6 }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className: `w-${size} h-${size}`, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5.636 5.636a9 9 0 1012.728 0M12 3v9" }) });
|
|
124
|
+
var ChevronDown = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
125
|
+
var ChevronRight = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" }) });
|
|
126
|
+
var Checked = ({ color = "#fff", size = 4 }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className: `w-${size} h-${size}`, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 12.75l6 6 9-13.5" }) });
|
|
127
|
+
var Search = ({ color = "#fff", size = 4 }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className: `w-${size} h-${size}`, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" }) });
|
|
128
|
+
var Calendar = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5" }) });
|
|
129
|
+
var Clock = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" }) });
|
|
130
|
+
var ChartBoard = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3.75 3v11.25A2.25 2.25 0 006 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0118 16.5h-2.25m-7.5 0h7.5m-7.5 0l-1 3m8.5-3l1 3m0 0l.5 1.5m-.5-1.5h-9.5m0 0l-.5 1.5m.75-9l3-3 2.148 2.148A12.061 12.061 0 0116.5 7.605" }) });
|
|
131
|
+
var BarChartBoard = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3.75 3v11.25A2.25 2.25 0 006 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0118 16.5h-2.25m-7.5 0h7.5m-7.5 0l-1 3m8.5-3l1 3m0 0l.5 1.5m-.5-1.5h-9.5m0 0l-.5 1.5M9 11.25v1.5M12 9v3.75m3-6v6" }) });
|
|
132
|
+
var ChartBar = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z" }) });
|
|
133
|
+
var PieChart = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: [
|
|
134
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10.5 6a7.5 7.5 0 107.5 7.5h-7.5V6z" }),
|
|
135
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13.5 10.5H21A7.5 7.5 0 0013.5 3v7.5z" })
|
|
136
|
+
] });
|
|
137
|
+
var BarChartSquare = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7.5 14.25v2.25m3-4.5v4.5m3-6.75v6.75m3-9v9M6 20.25h12A2.25 2.25 0 0020.25 18V6A2.25 2.25 0 0018 3.75H6A2.25 2.25 0 003.75 6v12A2.25 2.25 0 006 20.25z" }) });
|
|
138
|
+
var Shield = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3.75m0-10.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.75c0 5.592 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.57-.598-3.75h-.152c-3.196 0-6.1-1.249-8.25-3.286zm0 13.036h.008v.008H12v-.008z" }) });
|
|
139
|
+
var Calculator = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 15.75V18m-7.5-6.75h.008v.008H8.25v-.008zm0 2.25h.008v.008H8.25V13.5zm0 2.25h.008v.008H8.25v-.008zm0 2.25h.008v.008H8.25V18zm2.498-6.75h.007v.008h-.007v-.008zm0 2.25h.007v.008h-.007V13.5zm0 2.25h.007v.008h-.007v-.008zm0 2.25h.007v.008h-.007V18zm2.504-6.75h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V13.5zm0 2.25h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V18zm2.498-6.75h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V13.5zM8.25 6h7.5v2.25h-7.5V6zM12 2.25c-1.892 0-3.758.11-5.593.322C5.307 2.7 4.5 3.65 4.5 4.757V19.5a2.25 2.25 0 002.25 2.25h10.5a2.25 2.25 0 002.25-2.25V4.757c0-1.108-.806-2.057-1.907-2.185A48.507 48.507 0 0012 2.25z" }) });
|
|
140
|
+
var Contract = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" }) });
|
|
141
|
+
var Buoy = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.712 4.33a9.027 9.027 0 011.652 1.306c.51.51.944 1.064 1.306 1.652M16.712 4.33l-3.448 4.138m3.448-4.138a9.014 9.014 0 00-9.424 0M19.67 7.288l-4.138 3.448m4.138-3.448a9.014 9.014 0 010 9.424m-4.138-5.976a3.736 3.736 0 00-.88-1.388 3.737 3.737 0 00-1.388-.88m2.268 2.268a3.765 3.765 0 010 2.528m-2.268-4.796a3.765 3.765 0 00-2.528 0m4.796 4.796c-.181.506-.475.982-.88 1.388a3.736 3.736 0 01-1.388.88m2.268-2.268l4.138 3.448m0 0a9.027 9.027 0 01-1.306 1.652c-.51.51-1.064.944-1.652 1.306m0 0l-3.448-4.138m3.448 4.138a9.014 9.014 0 01-9.424 0m5.976-4.138a3.765 3.765 0 01-2.528 0m0 0a3.736 3.736 0 01-1.388-.88 3.737 3.737 0 01-.88-1.388m2.268 2.268L7.288 19.67m0 0a9.024 9.024 0 01-1.652-1.306 9.027 9.027 0 01-1.306-1.652m0 0l4.138-3.448M4.33 16.712a9.014 9.014 0 010-9.424m4.138 5.976a3.765 3.765 0 010-2.528m0 0c.181-.506.475-.982.88-1.388a3.736 3.736 0 011.388-.88m-2.268 2.268L4.33 7.288m6.406 1.18L7.288 4.33m0 0a9.024 9.024 0 00-1.652 1.306A9.025 9.025 0 004.33 7.288" }) });
|
|
142
|
+
var Cog = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: [
|
|
143
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 011.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.56.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.893.149c-.425.07-.765.383-.93.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 01-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.397.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 01-.12-1.45l.527-.737c.25-.35.273-.806.108-1.204-.165-.397-.505-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.107-1.204l-.527-.738a1.125 1.125 0 01.12-1.45l.773-.773a1.125 1.125 0 011.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894z" }),
|
|
144
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
|
|
145
|
+
] });
|
|
146
|
+
var TableIcon = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 01-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0112 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5" }) });
|
|
147
|
+
var Data = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" }) });
|
|
148
|
+
var XClose = ({ color = "#fff", className = "h-6 w-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) });
|
|
149
|
+
var Grid = ({ color = "#fff", size = 6 }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 6 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
150
|
+
/* @__PURE__ */ jsxRuntime.jsx("g", { clipPath: "url(#clip0_401_39)", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0.375 0.75C0.375 0.650544 0.414509 0.555161 0.484835 0.484835C0.555161 0.414509 0.650544 0.375 0.75 0.375H1.5C1.59946 0.375 1.69484 0.414509 1.76516 0.484835C1.83549 0.555161 1.875 0.650544 1.875 0.75V1.5C1.875 1.59946 1.83549 1.69484 1.76516 1.76516C1.69484 1.83549 1.59946 1.875 1.5 1.875H0.75C0.650544 1.875 0.555161 1.83549 0.484835 1.76516C0.414509 1.69484 0.375 1.59946 0.375 1.5V0.75ZM2.25 0.75C2.25 0.650544 2.28951 0.555161 2.35984 0.484835C2.43016 0.414509 2.52554 0.375 2.625 0.375H3.375C3.47446 0.375 3.56984 0.414509 3.64016 0.484835C3.71049 0.555161 3.75 0.650544 3.75 0.75V1.5C3.75 1.59946 3.71049 1.69484 3.64016 1.76516C3.56984 1.83549 3.47446 1.875 3.375 1.875H2.625C2.52554 1.875 2.43016 1.83549 2.35984 1.76516C2.28951 1.69484 2.25 1.59946 2.25 1.5V0.75ZM4.125 0.75C4.125 0.650544 4.16451 0.555161 4.23484 0.484835C4.30516 0.414509 4.40054 0.375 4.5 0.375H5.25C5.34946 0.375 5.44484 0.414509 5.51516 0.484835C5.58549 0.555161 5.625 0.650544 5.625 0.75V1.5C5.625 1.59946 5.58549 1.69484 5.51516 1.76516C5.44484 1.83549 5.34946 1.875 5.25 1.875H4.5C4.40054 1.875 4.30516 1.83549 4.23484 1.76516C4.16451 1.69484 4.125 1.59946 4.125 1.5V0.75ZM0.375 2.625C0.375 2.52554 0.414509 2.43016 0.484835 2.35984C0.555161 2.28951 0.650544 2.25 0.75 2.25H1.5C1.59946 2.25 1.69484 2.28951 1.76516 2.35984C1.83549 2.43016 1.875 2.52554 1.875 2.625V3.375C1.875 3.47446 1.83549 3.56984 1.76516 3.64016C1.69484 3.71049 1.59946 3.75 1.5 3.75H0.75C0.650544 3.75 0.555161 3.71049 0.484835 3.64016C0.414509 3.56984 0.375 3.47446 0.375 3.375V2.625ZM2.25 2.625C2.25 2.52554 2.28951 2.43016 2.35984 2.35984C2.43016 2.28951 2.52554 2.25 2.625 2.25H3.375C3.47446 2.25 3.56984 2.28951 3.64016 2.35984C3.71049 2.43016 3.75 2.52554 3.75 2.625V3.375C3.75 3.47446 3.71049 3.56984 3.64016 3.64016C3.56984 3.71049 3.47446 3.75 3.375 3.75H2.625C2.52554 3.75 2.43016 3.71049 2.35984 3.64016C2.28951 3.56984 2.25 3.47446 2.25 3.375V2.625ZM4.125 2.625C4.125 2.52554 4.16451 2.43016 4.23484 2.35984C4.30516 2.28951 4.40054 2.25 4.5 2.25H5.25C5.34946 2.25 5.44484 2.28951 5.51516 2.35984C5.58549 2.43016 5.625 2.52554 5.625 2.625V3.375C5.625 3.47446 5.58549 3.56984 5.51516 3.64016C5.44484 3.71049 5.34946 3.75 5.25 3.75H4.5C4.40054 3.75 4.30516 3.71049 4.23484 3.64016C4.16451 3.56984 4.125 3.47446 4.125 3.375V2.625ZM0.375 4.5C0.375 4.40054 0.414509 4.30516 0.484835 4.23484C0.555161 4.16451 0.650544 4.125 0.75 4.125H1.5C1.59946 4.125 1.69484 4.16451 1.76516 4.23484C1.83549 4.30516 1.875 4.40054 1.875 4.5V5.25C1.875 5.34946 1.83549 5.44484 1.76516 5.51516C1.69484 5.58549 1.59946 5.625 1.5 5.625H0.75C0.650544 5.625 0.555161 5.58549 0.484835 5.51516C0.414509 5.44484 0.375 5.34946 0.375 5.25V4.5ZM2.25 4.5C2.25 4.40054 2.28951 4.30516 2.35984 4.23484C2.43016 4.16451 2.52554 4.125 2.625 4.125H3.375C3.47446 4.125 3.56984 4.16451 3.64016 4.23484C3.71049 4.30516 3.75 4.40054 3.75 4.5V5.25C3.75 5.34946 3.71049 5.44484 3.64016 5.51516C3.56984 5.58549 3.47446 5.625 3.375 5.625H2.625C2.52554 5.625 2.43016 5.58549 2.35984 5.51516C2.28951 5.44484 2.25 5.34946 2.25 5.25V4.5ZM4.125 4.5C4.125 4.40054 4.16451 4.30516 4.23484 4.23484C4.30516 4.16451 4.40054 4.125 4.5 4.125H5.25C5.34946 4.125 5.44484 4.16451 5.51516 4.23484C5.58549 4.30516 5.625 4.40054 5.625 4.5V5.25C5.625 5.34946 5.58549 5.44484 5.51516 5.51516C5.44484 5.58549 5.34946 5.625 5.25 5.625H4.5C4.40054 5.625 4.30516 5.58549 4.23484 5.51516C4.16451 5.44484 4.125 5.34946 4.125 5.25V4.5Z", fill: color }) }),
|
|
151
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: "clip0_401_39", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "6", height: "6", fill: "white" }) }) })
|
|
152
|
+
] });
|
|
153
|
+
var Carousel = ({ color = "#fff", size = 6 }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 6 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
154
|
+
/* @__PURE__ */ jsxRuntime.jsx("g", { clipPath: "url(#clip0_401_41)", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1 4.75H1.5C1.5 5.02575 1.72425 5.25 2 5.25H4C4.27575 5.25 4.5 5.02575 4.5 4.75H5C5.27575 4.75 5.5 4.52575 5.5 4.25V1.75C5.5 1.47425 5.27575 1.25 5 1.25H4.5C4.5 0.97425 4.27575 0.75 4 0.75H2C1.72425 0.75 1.5 0.97425 1.5 1.25H1C0.72425 1.25 0.5 1.47425 0.5 1.75V4.25C0.5 4.52575 0.72425 4.75 1 4.75ZM5 1.75V4.25H4.5V1.75H5ZM2 1.25H4L4.00025 4.75H2V1.25ZM1 1.75H1.5V4.25H1V1.75Z", fill: color }) }),
|
|
155
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: "clip0_401_41", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "6", height: "6", fill: "white" }) }) })
|
|
156
|
+
] });
|
|
157
|
+
var DoubleChevronRight = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" }) });
|
|
158
|
+
var PlusCircle = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" }) });
|
|
159
|
+
var Info = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" }) });
|
|
160
|
+
var Warning = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" }) });
|
|
161
|
+
var ErrorIcon = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3.75m0-10.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.75c0 5.592 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.57-.598-3.75h-.152c-3.196 0-6.1-1.249-8.25-3.286zm0 13.036h.008v.008H12v-.008z" }) });
|
|
162
|
+
var ShowMore = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 6.75a.75.75 0 110-1.5.75.75 0 010 1.5zM12 12.75a.75.75 0 110-1.5.75.75 0 010 1.5zM12 18.75a.75.75 0 110-1.5.75.75 0 010 1.5z" }) });
|
|
163
|
+
var Tweak = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10.5 6h9.75M10.5 6a1.5 1.5 0 11-3 0m3 0a1.5 1.5 0 10-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m-9.75 0h9.75" }) });
|
|
164
|
+
var Download = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3" }) });
|
|
165
|
+
var Expand = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15" }) });
|
|
166
|
+
var Collapse = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 9V4.5M9 9H4.5M9 9L3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5l5.25 5.25" }) });
|
|
167
|
+
var ShieldCheck = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z" }) });
|
|
168
|
+
var XCircle = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) });
|
|
169
|
+
var Play = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.348a1.125 1.125 0 010 1.971l-11.54 6.347a1.125 1.125 0 01-1.667-.985V5.653z" }) });
|
|
170
|
+
var Document = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m.75 12l3 3m0 0l3-3m-3 3v-6m-1.5-9H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" }) });
|
|
171
|
+
var EditIcon = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" }) });
|
|
172
|
+
var Upload = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z" }) });
|
|
173
|
+
var FileIcon = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 019 9v.375M10.125 2.25A3.375 3.375 0 0113.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 013.375 3.375M9 15l2.25 2.25L15 12" }) });
|
|
174
|
+
var Delete = ({ color = "#fff", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" }) });
|
|
175
|
+
var Bookmarks = ({ color = "#000", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9" }) });
|
|
176
|
+
var Save = ({ color = "#000", size = 16 }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.1716 1C18.702 1 19.2107 1.21071 19.5858 1.58579L22.4142 4.41421C22.7893 4.78929 23 5.29799 23 5.82843V20C23 21.6569 21.6569 23 20 23H4C2.34315 23 1 21.6569 1 20V4C1 2.34315 2.34315 1 4 1H18.1716ZM4 3C3.44772 3 3 3.44772 3 4V20C3 20.5523 3.44772 21 4 21L5 21L5 15C5 13.3431 6.34315 12 8 12L16 12C17.6569 12 19 13.3431 19 15V21H20C20.5523 21 21 20.5523 21 20V6.82843C21 6.29799 20.7893 5.78929 20.4142 5.41421L18.5858 3.58579C18.2107 3.21071 17.702 3 17.1716 3H17V5C17 6.65685 15.6569 8 14 8H10C8.34315 8 7 6.65685 7 5V3H4ZM17 21V15C17 14.4477 16.5523 14 16 14L8 14C7.44772 14 7 14.4477 7 15L7 21L17 21ZM9 3H15V5C15 5.55228 14.5523 6 14 6H10C9.44772 6 9 5.55228 9 5V3Z", fill: color }) });
|
|
177
|
+
var CircleStack = ({ color = "#000", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" }) });
|
|
178
|
+
var Copy = ({ color = "#000", className = "w-6 h-6" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184" }) });
|
|
179
|
+
var Icon = () => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
180
|
+
Icon.Moon = Moon;
|
|
181
|
+
Icon.Sun = Sun;
|
|
182
|
+
Icon.CheckCircle = CheckCircle;
|
|
183
|
+
Icon.Login = Login;
|
|
184
|
+
Icon.Loading = Loading;
|
|
185
|
+
Icon.ToggleLoading = ToggleLoading;
|
|
186
|
+
Icon.Eye = Eye;
|
|
187
|
+
Icon.EyeSlash = EyeSlash;
|
|
188
|
+
Icon.ArrowRight = ArrowRight;
|
|
189
|
+
Icon.Minus = Minus;
|
|
190
|
+
Icon.Dashboard = Dashboard;
|
|
191
|
+
Icon.FleetIcon = FleetIcon;
|
|
192
|
+
Icon.Performance = Performance;
|
|
193
|
+
Icon.Map = Map;
|
|
194
|
+
Icon.CharterParty = CharterParty;
|
|
195
|
+
Icon.Compliance = Compliance;
|
|
196
|
+
Icon.Applications = Applications;
|
|
197
|
+
Icon.PowerOff = PowerOff;
|
|
198
|
+
Icon.ChevronDown = ChevronDown;
|
|
199
|
+
Icon.ChevronRight = ChevronRight;
|
|
200
|
+
Icon.DoubleChevronRight = DoubleChevronRight;
|
|
201
|
+
Icon.Checked = Checked;
|
|
202
|
+
Icon.Search = Search;
|
|
203
|
+
Icon.Calendar = Calendar;
|
|
204
|
+
Icon.Clock = Clock;
|
|
205
|
+
Icon.ChartBoard = ChartBoard;
|
|
206
|
+
Icon.BarChartBoard = BarChartBoard;
|
|
207
|
+
Icon.BarChartSquare = BarChartSquare;
|
|
208
|
+
Icon.ChartBar = ChartBar;
|
|
209
|
+
Icon.PieChart = PieChart;
|
|
210
|
+
Icon.Shield = Shield;
|
|
211
|
+
Icon.Calculator = Calculator;
|
|
212
|
+
Icon.Contract = Contract;
|
|
213
|
+
Icon.Buoy = Buoy;
|
|
214
|
+
Icon.Cog = Cog;
|
|
215
|
+
Icon.Table = TableIcon;
|
|
216
|
+
Icon.Data = Data;
|
|
217
|
+
Icon.XClose = XClose;
|
|
218
|
+
Icon.Grid = Grid;
|
|
219
|
+
Icon.Carousel = Carousel;
|
|
220
|
+
Icon.PlusCircle = PlusCircle;
|
|
221
|
+
Icon.Info = Info;
|
|
222
|
+
Icon.Warning = Warning;
|
|
223
|
+
Icon.Error = ErrorIcon;
|
|
224
|
+
Icon.ShowMore = ShowMore;
|
|
225
|
+
Icon.Tweak = Tweak;
|
|
226
|
+
Icon.Download = Download;
|
|
227
|
+
Icon.Expand = Expand;
|
|
228
|
+
Icon.Collapse = Collapse;
|
|
229
|
+
Icon.ShieldCheck = ShieldCheck;
|
|
230
|
+
Icon.XCircle = XCircle;
|
|
231
|
+
Icon.Play = Play;
|
|
232
|
+
Icon.Document = Document;
|
|
233
|
+
Icon.Edit = EditIcon;
|
|
234
|
+
Icon.Upload = Upload;
|
|
235
|
+
Icon.File = FileIcon;
|
|
236
|
+
Icon.Delete = Delete;
|
|
237
|
+
Icon.Bookmarks = Bookmarks;
|
|
238
|
+
Icon.Save = Save;
|
|
239
|
+
Icon.Copy = Copy;
|
|
240
|
+
Icon.CircleStack = CircleStack;
|
|
241
|
+
var icons_default = Icon;
|
|
242
|
+
function IconButton({
|
|
243
|
+
icon,
|
|
244
|
+
onClick,
|
|
245
|
+
type = "primary",
|
|
246
|
+
buttonType = "button",
|
|
247
|
+
disabled = false,
|
|
248
|
+
size = "lg",
|
|
249
|
+
loading = false,
|
|
250
|
+
loadingIcon
|
|
251
|
+
}) {
|
|
252
|
+
const colorScheme = React9.useMemo(() => {
|
|
253
|
+
if (type === "primary") {
|
|
254
|
+
return "hover:bg-true-blue bg-usafa-blue dark:bg-independence dark:hover:bg-black-coral";
|
|
255
|
+
}
|
|
256
|
+
if (type === "bordered") {
|
|
257
|
+
return "bg-ice hover:bg-ice-dark border border-prussian-blue disabled:border-disabled";
|
|
258
|
+
}
|
|
259
|
+
return "";
|
|
260
|
+
}, [type]);
|
|
261
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
262
|
+
"button",
|
|
263
|
+
{
|
|
264
|
+
type: buttonType,
|
|
265
|
+
disabled: disabled || loading,
|
|
266
|
+
onClick,
|
|
267
|
+
className: `${size === "sm" ? "p-1" : "p-2"} rounded-lg shadow-lg transition-all duration-150 ${colorScheme} dark:disabled:bg-manatee disabled:bg-disabled disabled:cursor-not-allowed`,
|
|
268
|
+
children: loading ? loadingIcon : icon
|
|
269
|
+
}
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
function Button({
|
|
273
|
+
content,
|
|
274
|
+
buttonType = "button",
|
|
275
|
+
loading,
|
|
276
|
+
disabled,
|
|
277
|
+
style,
|
|
278
|
+
icon,
|
|
279
|
+
onClick
|
|
280
|
+
}) {
|
|
281
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
282
|
+
"button",
|
|
283
|
+
{
|
|
284
|
+
onClick,
|
|
285
|
+
disabled: disabled || loading,
|
|
286
|
+
type: buttonType,
|
|
287
|
+
className: "bg-usafa-blue w-60 h-9 outline-offset-2 mt-5 rounded-lg disabled:bg-roman-silver disabled:cursor-not-allowed transition-all duration-300 hover:bg-true-blue active:bg-usafa-blue flex justify-center gap-1 items-center text-white",
|
|
288
|
+
style: style ?? {},
|
|
289
|
+
children: [
|
|
290
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
291
|
+
"svg",
|
|
292
|
+
{
|
|
293
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
294
|
+
viewBox: "0 0 24 24",
|
|
295
|
+
fill: "#fff",
|
|
296
|
+
className: "w-6 h-6 animate-spin",
|
|
297
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
298
|
+
"path",
|
|
299
|
+
{
|
|
300
|
+
fillRule: "evenodd",
|
|
301
|
+
d: "M4.755 10.059a7.5 7.5 0 0112.548-3.364l1.903 1.903h-3.183a.75.75 0 100 1.5h4.992a.75.75 0 00.75-.75V4.356a.75.75 0 00-1.5 0v3.18l-1.9-1.9A9 9 0 003.306 9.67a.75.75 0 101.45.388zm15.408 3.352a.75.75 0 00-.919.53 7.5 7.5 0 01-12.548 3.364l-1.902-1.903h3.183a.75.75 0 000-1.5H2.984a.75.75 0 00-.75.75v4.992a.75.75 0 001.5 0v-3.18l1.9 1.9a9 9 0 0015.059-4.035.75.75 0 00-.53-.918z",
|
|
302
|
+
clipRule: "evenodd"
|
|
303
|
+
}
|
|
304
|
+
)
|
|
305
|
+
}
|
|
306
|
+
) : icon ? icon : null,
|
|
307
|
+
content
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
function Modal({
|
|
313
|
+
size = [600, 400],
|
|
314
|
+
isOpen = false,
|
|
315
|
+
onClose,
|
|
316
|
+
onOk,
|
|
317
|
+
onCancel,
|
|
318
|
+
okText = "Ok",
|
|
319
|
+
cancelText = "Cancel",
|
|
320
|
+
hasFooter = true,
|
|
321
|
+
title,
|
|
322
|
+
children
|
|
323
|
+
}) {
|
|
324
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Root, { open: isOpen, onOpenChange: (open) => {
|
|
325
|
+
if (!open) onClose?.();
|
|
326
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { children: [
|
|
327
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Overlay, { className: "fixed inset-0 bg-oxford-blue-700-opaque z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 transition-all duration-300" }),
|
|
328
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
329
|
+
Dialog__namespace.Content,
|
|
330
|
+
{
|
|
331
|
+
style: { width: size[0], height: size[1] },
|
|
332
|
+
className: "fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 z-50 shadow-md rounded-lg bg-white dark:bg-prussian-blue p-1 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 duration-300 focus:outline-none",
|
|
333
|
+
children: [
|
|
334
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-[12%] flex items-center justify-between border-b border-ice dark:border-independence p-2", children: [
|
|
335
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Title, { className: "text-prussian-blue dark:text-white font-bold text-lg", children: title }),
|
|
336
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
337
|
+
"button",
|
|
338
|
+
{
|
|
339
|
+
"aria-label": "Close",
|
|
340
|
+
className: "cursor-pointer rounded p-1 hover:bg-ice dark:hover:bg-independence transition-colors",
|
|
341
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 5L5 15M5 5l10 10", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", className: "dark:stroke-white" }) })
|
|
342
|
+
}
|
|
343
|
+
) })
|
|
344
|
+
] }),
|
|
345
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${hasFooter ? "max-h-[77%]" : "max-h-[90%]"} p-2 overflow-y-auto`, children: isOpen && children }),
|
|
346
|
+
hasFooter && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end items-center gap-5 border-t border-ice dark:border-independence h-max p-2", children: [
|
|
347
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
348
|
+
Button,
|
|
349
|
+
{
|
|
350
|
+
style: { width: 100, margin: "0" },
|
|
351
|
+
content: cancelText,
|
|
352
|
+
onClick: onCancel
|
|
353
|
+
}
|
|
354
|
+
),
|
|
355
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
356
|
+
Button,
|
|
357
|
+
{
|
|
358
|
+
style: { width: 100, margin: "0" },
|
|
359
|
+
content: okText,
|
|
360
|
+
onClick: onOk
|
|
361
|
+
}
|
|
362
|
+
)
|
|
363
|
+
] })
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
)
|
|
367
|
+
] }) });
|
|
368
|
+
}
|
|
369
|
+
function Drawer({
|
|
370
|
+
isOpen = false,
|
|
371
|
+
onClose,
|
|
372
|
+
hasFooter = true,
|
|
373
|
+
placement = "right",
|
|
374
|
+
width = 320,
|
|
375
|
+
okText = "Ok",
|
|
376
|
+
cancelText = "Cancel",
|
|
377
|
+
onOk,
|
|
378
|
+
onCancel,
|
|
379
|
+
title,
|
|
380
|
+
children
|
|
381
|
+
}) {
|
|
382
|
+
const isRight = placement === "right";
|
|
383
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Root, { open: isOpen, onOpenChange: (open) => {
|
|
384
|
+
if (!open) onClose?.();
|
|
385
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { children: [
|
|
386
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Overlay, { className: "fixed inset-0 bg-oxford-blue-700-opaque z-[5000] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 duration-300" }),
|
|
387
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
388
|
+
Dialog__namespace.Content,
|
|
389
|
+
{
|
|
390
|
+
style: { width },
|
|
391
|
+
className: `fixed top-0 bottom-0 ${isRight ? "right-0 data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right" : "left-0 data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left"} z-[5000] h-full shadow-md bg-white dark:bg-prussian-blue p-1 data-[state=open]:animate-in data-[state=closed]:animate-out duration-300 focus:outline-none`,
|
|
392
|
+
children: [
|
|
393
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
394
|
+
"div",
|
|
395
|
+
{
|
|
396
|
+
className: `h-[5%] border-b border-ice dark:border-independence p-2 flex items-center justify-between ${isRight && "flex-row-reverse"}`,
|
|
397
|
+
children: [
|
|
398
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Title, { className: "text-prussian-blue dark:text-white font-bold text-lg", children: title }),
|
|
399
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
400
|
+
"button",
|
|
401
|
+
{
|
|
402
|
+
"aria-label": "Close drawer",
|
|
403
|
+
className: "cursor-pointer rounded p-1 hover:bg-ice dark:hover:bg-independence transition-colors",
|
|
404
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 5L5 15M5 5l10 10", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", className: "dark:stroke-white" }) })
|
|
405
|
+
}
|
|
406
|
+
) })
|
|
407
|
+
]
|
|
408
|
+
}
|
|
409
|
+
),
|
|
410
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${hasFooter ? "h-[88%]" : "h-[95%]"} overflow-y-auto`, children: isOpen && children }),
|
|
411
|
+
hasFooter && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
412
|
+
"div",
|
|
413
|
+
{
|
|
414
|
+
className: `gap-5 h-[7%] pr-2 pl-2 border-t border-ice dark:border-independence flex items-center ${isRight ? "justify-start" : "justify-end"}`,
|
|
415
|
+
children: [
|
|
416
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { style: { width: 100 }, content: cancelText, onClick: onCancel }),
|
|
417
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { style: { width: 100 }, content: okText, onClick: onOk })
|
|
418
|
+
]
|
|
419
|
+
}
|
|
420
|
+
)
|
|
421
|
+
]
|
|
422
|
+
}
|
|
423
|
+
)
|
|
424
|
+
] }) });
|
|
425
|
+
}
|
|
426
|
+
function Tooltip({
|
|
427
|
+
children,
|
|
428
|
+
title,
|
|
429
|
+
placement = "left",
|
|
430
|
+
delayDuration = 400
|
|
431
|
+
}) {
|
|
432
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Provider, { delayDuration, children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipPrimitive__namespace.Root, { children: [
|
|
433
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-max w-max", children }) }),
|
|
434
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
435
|
+
TooltipPrimitive__namespace.Content,
|
|
436
|
+
{
|
|
437
|
+
side: placement,
|
|
438
|
+
sideOffset: 8,
|
|
439
|
+
className: "pointer-events-none z-[500000000] rounded-lg bg-prussian-blue dark:bg-rich-black-fogra px-2 py-1.5 text-white text-sm w-max max-w-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
440
|
+
children: [
|
|
441
|
+
title,
|
|
442
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Arrow, { className: "fill-prussian-blue dark:fill-rich-black-fogra" })
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
) })
|
|
446
|
+
] }) });
|
|
447
|
+
}
|
|
448
|
+
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
449
|
+
function Tabs({
|
|
450
|
+
tabs = [],
|
|
451
|
+
onTabChange,
|
|
452
|
+
onTabClose,
|
|
453
|
+
isLazy,
|
|
454
|
+
tabsClosable = true,
|
|
455
|
+
defaultActiveTab
|
|
456
|
+
}) {
|
|
457
|
+
const [value, setValue] = React9.useState(() => defaultActiveTab ?? tabs[0]?.key ?? "");
|
|
458
|
+
React9.useEffect(() => {
|
|
459
|
+
if (defaultActiveTab) setValue(defaultActiveTab);
|
|
460
|
+
}, [defaultActiveTab]);
|
|
461
|
+
React9.useEffect(() => {
|
|
462
|
+
if (tabs.length === 0) {
|
|
463
|
+
setValue("");
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
const exists = tabs.find((t) => t.key === value);
|
|
467
|
+
if (!exists) {
|
|
468
|
+
setValue(tabs[tabs.length - 1].key);
|
|
469
|
+
}
|
|
470
|
+
}, [tabs, value]);
|
|
471
|
+
const handleValueChange = (newValue) => {
|
|
472
|
+
const prev = tabs.find((t) => t.key === value);
|
|
473
|
+
const next = tabs.find((t) => t.key === newValue);
|
|
474
|
+
onTabChange?.(prev, next);
|
|
475
|
+
setValue(newValue);
|
|
476
|
+
};
|
|
477
|
+
const toPreviousTab = () => {
|
|
478
|
+
const idx = tabs.findIndex((t) => t.key === value);
|
|
479
|
+
if (idx > 0) handleValueChange(tabs[idx - 1].key);
|
|
480
|
+
};
|
|
481
|
+
const toNextTab = () => {
|
|
482
|
+
const idx = tabs.findIndex((t) => t.key === value);
|
|
483
|
+
if (idx < tabs.length - 1) handleValueChange(tabs[idx + 1].key);
|
|
484
|
+
};
|
|
485
|
+
if (tabs.length === 0) return null;
|
|
486
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
487
|
+
TabsPrimitive__namespace.Root,
|
|
488
|
+
{
|
|
489
|
+
value,
|
|
490
|
+
onValueChange: handleValueChange,
|
|
491
|
+
className: "h-full max-w-full flex flex-col gap-2",
|
|
492
|
+
children: [
|
|
493
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "glassmorphism dark:bg-prussian-blue rounded-lg flex items-center justify-between h-[7%] w-full p-1 overflow-hidden", children: [
|
|
494
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
495
|
+
"button",
|
|
496
|
+
{
|
|
497
|
+
type: "button",
|
|
498
|
+
onClick: toPreviousTab,
|
|
499
|
+
"aria-label": "Previous tab",
|
|
500
|
+
className: "cursor-pointer rounded-lg transition-all duration-300 hover:bg-ice-dark dark:hover:bg-independence rotate-180 flex-shrink-0",
|
|
501
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-6 w-6 dark:stroke-white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
502
|
+
}
|
|
503
|
+
),
|
|
504
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
505
|
+
TabsPrimitive__namespace.List,
|
|
506
|
+
{
|
|
507
|
+
"aria-label": "Tabs",
|
|
508
|
+
className: "flex-1 flex items-center gap-1 overflow-x-auto overflow-y-hidden rounded-lg scroll-smooth snap-x snap-mandatory hidden-scrollbar",
|
|
509
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
510
|
+
TabsPrimitive__namespace.Trigger,
|
|
511
|
+
{
|
|
512
|
+
value: tab.key,
|
|
513
|
+
className: "snap-start snap-always flex items-center justify-between gap-2 p-3 rounded-3xl cursor-pointer transition-all duration-300 select-none h-12 w-[220px] min-w-[220px] flex-shrink-0 text-prussian-blue dark:text-white\n bg-ice dark:bg-indigo-dye\n hover:bg-ice-dark dark:hover:bg-black-coral\n data-[state=active]:bg-ice-dark dark:data-[state=active]:bg-black-coral\n focus:outline-none focus-visible:ring-2 focus-visible:ring-usafa-blue",
|
|
514
|
+
children: [
|
|
515
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm", children: tab.title }),
|
|
516
|
+
tabsClosable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
517
|
+
"span",
|
|
518
|
+
{
|
|
519
|
+
role: "button",
|
|
520
|
+
"aria-label": `Close ${tab.title}`,
|
|
521
|
+
onClick: (e) => {
|
|
522
|
+
e.stopPropagation();
|
|
523
|
+
onTabClose?.(tab.key);
|
|
524
|
+
},
|
|
525
|
+
className: "flex-shrink-0 rounded hover:bg-ice-dark dark:hover:bg-independence p-0.5 transition-colors",
|
|
526
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 5L5 15M5 5l10 10", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", className: "dark:stroke-white" }) })
|
|
527
|
+
}
|
|
528
|
+
)
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
tab.key
|
|
532
|
+
))
|
|
533
|
+
}
|
|
534
|
+
),
|
|
535
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
536
|
+
"button",
|
|
537
|
+
{
|
|
538
|
+
type: "button",
|
|
539
|
+
onClick: toNextTab,
|
|
540
|
+
"aria-label": "Next tab",
|
|
541
|
+
className: "cursor-pointer rounded-lg transition-all duration-300 hover:bg-ice-dark dark:hover:bg-independence flex-shrink-0",
|
|
542
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-6 w-6 dark:stroke-white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
543
|
+
}
|
|
544
|
+
)
|
|
545
|
+
] }),
|
|
546
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2 rounded-lg w-full h-[92%] glassmorphism dark:bg-prussian-blue overflow-hidden", children: isLazy ? (
|
|
547
|
+
// Mount only the active content
|
|
548
|
+
tabs.filter((t) => t.key === value).map((t) => /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Content, { value: t.key, className: "w-full h-full focus:outline-none", children: t.content }, t.key))
|
|
549
|
+
) : (
|
|
550
|
+
// Pre-mount all, hide non-active via Radix
|
|
551
|
+
tabs.map((t) => /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Content, { value: t.key, className: "w-full h-full focus:outline-none", forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-full h-full ${t.key === value ? "block" : "hidden"}`, children: t.content }) }, t.key))
|
|
552
|
+
) })
|
|
553
|
+
]
|
|
554
|
+
}
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
var isParent = (item) => Boolean(item.children && item.children.length > 0);
|
|
558
|
+
function TreeNodeItem({
|
|
559
|
+
item,
|
|
560
|
+
onItemClick,
|
|
561
|
+
defaultExpandAll,
|
|
562
|
+
defaultExpandedKeys,
|
|
563
|
+
depth = 0
|
|
564
|
+
}) {
|
|
565
|
+
if (!isParent(item)) {
|
|
566
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
567
|
+
"div",
|
|
568
|
+
{
|
|
569
|
+
style: { marginLeft: depth * 10 + 16 },
|
|
570
|
+
className: "flex items-center gap-2 cursor-pointer py-0.5",
|
|
571
|
+
onClick: () => onItemClick({
|
|
572
|
+
isParent: false,
|
|
573
|
+
key: item.key,
|
|
574
|
+
label: item.value,
|
|
575
|
+
data: item.nodeData,
|
|
576
|
+
parentLabel: item.parentLabel
|
|
577
|
+
}),
|
|
578
|
+
children: [
|
|
579
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-4 w-4 flex-shrink-0 dark:stroke-white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", d: "M5 12h14" }) }),
|
|
580
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-prussian-blue dark:text-white select-none transition-all duration-300 hover:bg-ice-dark dark:hover:bg-independence rounded-lg p-1", children: item.value })
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
);
|
|
584
|
+
}
|
|
585
|
+
const initialOpen = defaultExpandAll || defaultExpandedKeys.includes(item.key) ? [item.key] : [];
|
|
586
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
587
|
+
Accordion__namespace.Root,
|
|
588
|
+
{
|
|
589
|
+
type: "multiple",
|
|
590
|
+
defaultValue: initialOpen,
|
|
591
|
+
style: { marginLeft: depth * 10 },
|
|
592
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Accordion__namespace.Item, { value: item.key, className: "border-none", children: [
|
|
593
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
594
|
+
Accordion__namespace.Trigger,
|
|
595
|
+
{
|
|
596
|
+
className: "flex items-center gap-2 cursor-pointer py-0.5 group focus:outline-none w-full text-left",
|
|
597
|
+
onClick: (e) => e.stopPropagation(),
|
|
598
|
+
children: [
|
|
599
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
600
|
+
"svg",
|
|
601
|
+
{
|
|
602
|
+
viewBox: "0 0 24 24",
|
|
603
|
+
fill: "none",
|
|
604
|
+
stroke: colors_default.PALETTE["prussian-blue"],
|
|
605
|
+
strokeWidth: 2,
|
|
606
|
+
className: "h-4 w-4 flex-shrink-0 transition-transform duration-300 group-data-[state=closed]:-rotate-90 dark:stroke-white",
|
|
607
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
|
|
608
|
+
}
|
|
609
|
+
),
|
|
610
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
611
|
+
"span",
|
|
612
|
+
{
|
|
613
|
+
className: "text-sm font-bold text-prussian-blue dark:text-white select-none transition-all duration-300 hover:bg-ice-dark dark:hover:bg-independence rounded-lg p-1",
|
|
614
|
+
onClick: () => onItemClick({
|
|
615
|
+
isParent: true,
|
|
616
|
+
key: item.key,
|
|
617
|
+
label: item.value,
|
|
618
|
+
data: item.nodeData,
|
|
619
|
+
parentLabel: item.parentLabel
|
|
620
|
+
}),
|
|
621
|
+
children: item.value
|
|
622
|
+
}
|
|
623
|
+
)
|
|
624
|
+
]
|
|
625
|
+
}
|
|
626
|
+
),
|
|
627
|
+
/* @__PURE__ */ jsxRuntime.jsx(Accordion__namespace.Content, { className: "overflow-hidden data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-[7px] border-l border-prussian-blue dark:border-ice-dark", children: item.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
628
|
+
TreeNodeItem,
|
|
629
|
+
{
|
|
630
|
+
item: child,
|
|
631
|
+
onItemClick,
|
|
632
|
+
defaultExpandAll,
|
|
633
|
+
defaultExpandedKeys,
|
|
634
|
+
depth: depth + 1
|
|
635
|
+
},
|
|
636
|
+
child.key
|
|
637
|
+
)) }) })
|
|
638
|
+
] })
|
|
639
|
+
}
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
function Tree({
|
|
643
|
+
structure,
|
|
644
|
+
onItemClick,
|
|
645
|
+
defaultExpandAll = false,
|
|
646
|
+
defaultExpandedKeys = []
|
|
647
|
+
}) {
|
|
648
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2", children: structure.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
649
|
+
TreeNodeItem,
|
|
650
|
+
{
|
|
651
|
+
item,
|
|
652
|
+
onItemClick,
|
|
653
|
+
defaultExpandAll,
|
|
654
|
+
defaultExpandedKeys
|
|
655
|
+
},
|
|
656
|
+
item.key
|
|
657
|
+
)) });
|
|
658
|
+
}
|
|
659
|
+
function ToggleButton({ items, onChange, activeKey }) {
|
|
660
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
661
|
+
ToggleGroup__namespace.Root,
|
|
662
|
+
{
|
|
663
|
+
type: "single",
|
|
664
|
+
value: activeKey,
|
|
665
|
+
onValueChange: (val) => {
|
|
666
|
+
if (val) onChange(val);
|
|
667
|
+
},
|
|
668
|
+
className: "flex items-center",
|
|
669
|
+
children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
670
|
+
ToggleGroup__namespace.Item,
|
|
671
|
+
{
|
|
672
|
+
value: item.key,
|
|
673
|
+
"aria-label": typeof item.label === "string" ? item.label : item.key,
|
|
674
|
+
className: [
|
|
675
|
+
index === 0 && "rounded-l-lg border-r border-ice-dark",
|
|
676
|
+
index === items.length - 1 && "rounded-r-lg border-l border-ice-dark dark:border-manatee",
|
|
677
|
+
"p-2 cursor-pointer transition-all duration-300",
|
|
678
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-usafa-blue",
|
|
679
|
+
"bg-ice dark:bg-manatee hover:bg-ice-dark dark:hover:bg-black-coral",
|
|
680
|
+
"data-[state=on]:bg-ice-dark dark:data-[state=on]:bg-indigo-dye"
|
|
681
|
+
].filter(Boolean).join(" "),
|
|
682
|
+
children: item.icon ?? item.label
|
|
683
|
+
},
|
|
684
|
+
item.key
|
|
685
|
+
))
|
|
686
|
+
}
|
|
687
|
+
);
|
|
688
|
+
}
|
|
689
|
+
var NotificationContext = React9.createContext({
|
|
690
|
+
open: () => void 0,
|
|
691
|
+
close: () => void 0
|
|
692
|
+
});
|
|
693
|
+
var typeClass = {
|
|
694
|
+
info: "bg-info",
|
|
695
|
+
success: "bg-success",
|
|
696
|
+
warning: "bg-warning",
|
|
697
|
+
danger: "bg-error"
|
|
698
|
+
};
|
|
699
|
+
function TypeIcon({ type }) {
|
|
700
|
+
if (type === "success") {
|
|
701
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
702
|
+
"path",
|
|
703
|
+
{
|
|
704
|
+
fillRule: "evenodd",
|
|
705
|
+
clipRule: "evenodd",
|
|
706
|
+
d: "M14 0.25C6.40625 0.25 0.25 6.40625 0.25 14C0.25 21.5937 6.40625 27.75 14 27.75C21.5937 27.75 27.75 21.5937 27.75 14C27.75 6.40625 21.5937 0.25 14 0.25ZM19.96 11.675C20.0697 11.5496 20.1533 11.4034 20.2057 11.2452C20.2582 11.087 20.2784 10.9199 20.2653 10.7537C20.2522 10.5876 20.206 10.4257 20.1295 10.2777C20.0529 10.1296 19.9475 9.99838 19.8194 9.89168C19.6914 9.78497 19.5433 9.70495 19.3839 9.65633C19.2244 9.6077 19.0569 9.59145 18.8911 9.60853C18.7253 9.62562 18.5646 9.67568 18.4184 9.75579C18.2723 9.8359 18.1436 9.94443 18.04 10.075L12.665 16.5237L9.88375 13.7412C9.648 13.5136 9.33224 13.3876 9.0045 13.3904C8.67675 13.3933 8.36324 13.5247 8.13148 13.7565C7.89972 13.9882 7.76825 14.3018 7.76541 14.6295C7.76256 14.9572 7.88855 15.273 8.11625 15.5087L11.8662 19.2587C11.9891 19.3815 12.1361 19.4773 12.298 19.5401C12.4599 19.6028 12.6331 19.6312 12.8066 19.6233C12.98 19.6154 13.15 19.5715 13.3055 19.4943C13.4611 19.4171 13.5988 19.3084 13.71 19.175L19.96 11.675Z",
|
|
707
|
+
fill: "#fff"
|
|
708
|
+
}
|
|
709
|
+
) });
|
|
710
|
+
}
|
|
711
|
+
if (type === "info") {
|
|
712
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#fff", className: "w-7 h-7", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 01.67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 11-.671-1.34l.041-.022zM12 9a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" }) });
|
|
713
|
+
}
|
|
714
|
+
if (type === "warning") {
|
|
715
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#fff", className: "w-7 h-7", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" }) });
|
|
716
|
+
}
|
|
717
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#fff", className: "w-7 h-7", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm11.378-3.917c-.89-.777-2.366-.777-3.255 0a.75.75 0 01-.988-1.129c1.454-1.272 3.776-1.272 5.23 0 1.513 1.324 1.513 3.518 0 4.842a3.75 3.75 0 01-.837.552c-.676.328-1.028.774-1.028 1.152v.75a.75.75 0 01-1.5 0v-.75c0-1.279 1.06-2.107 1.875-2.502.182-.088.351-.199.503-.331.83-.727.83-1.857 0-2.584zM12 18a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" }) });
|
|
718
|
+
}
|
|
719
|
+
function NotificationProvider({ children }) {
|
|
720
|
+
const [notifications, setNotifications] = React9.useState([]);
|
|
721
|
+
const open = (payload) => {
|
|
722
|
+
setNotifications((prev) => [...prev, { duration: 4e3, ...payload, id: Date.now() + Math.random() }]);
|
|
723
|
+
};
|
|
724
|
+
const close = (id) => {
|
|
725
|
+
setNotifications((prev) => prev.filter((n) => n.id !== id));
|
|
726
|
+
};
|
|
727
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NotificationContext.Provider, { value: { open, close }, children: /* @__PURE__ */ jsxRuntime.jsxs(Toast__namespace.Provider, { swipeDirection: "right", children: [
|
|
728
|
+
children,
|
|
729
|
+
notifications.map((n) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
730
|
+
Toast__namespace.Root,
|
|
731
|
+
{
|
|
732
|
+
open: true,
|
|
733
|
+
duration: n.duration,
|
|
734
|
+
onOpenChange: (o) => {
|
|
735
|
+
if (!o) close(n.id);
|
|
736
|
+
},
|
|
737
|
+
className: `rounded-lg shadow-md p-2 w-[300px] text-white ${typeClass[n.type ?? "info"]} data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-right-full data-[state=closed]:slide-out-to-right-full`,
|
|
738
|
+
children: [
|
|
739
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3 border-b border-white pb-1", children: [
|
|
740
|
+
/* @__PURE__ */ jsxRuntime.jsx(TypeIcon, { type: n.type ?? "info" }),
|
|
741
|
+
/* @__PURE__ */ jsxRuntime.jsx(Toast__namespace.Title, { className: "text-center font-bold text-lg flex-1", children: n.title }),
|
|
742
|
+
/* @__PURE__ */ jsxRuntime.jsx(Toast__namespace.Action, { asChild: true, altText: "Close", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
743
|
+
"button",
|
|
744
|
+
{
|
|
745
|
+
"aria-label": "Close notification",
|
|
746
|
+
onClick: () => close(n.id),
|
|
747
|
+
className: "cursor-pointer rounded p-0.5 hover:bg-white/20 transition-colors",
|
|
748
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 5L5 15M5 5l10 10", stroke: "#fff", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
749
|
+
}
|
|
750
|
+
) })
|
|
751
|
+
] }),
|
|
752
|
+
n.description && /* @__PURE__ */ jsxRuntime.jsx(Toast__namespace.Description, { className: "text-center mt-1 text-sm", children: n.description })
|
|
753
|
+
]
|
|
754
|
+
},
|
|
755
|
+
n.id
|
|
756
|
+
)),
|
|
757
|
+
/* @__PURE__ */ jsxRuntime.jsx(Toast__namespace.Viewport, { className: "fixed top-[50px] right-0 flex flex-col gap-2 w-[350px] z-[500000] p-4 outline-none" })
|
|
758
|
+
] }) });
|
|
759
|
+
}
|
|
760
|
+
function useNotification() {
|
|
761
|
+
const { open } = React9.useContext(NotificationContext);
|
|
762
|
+
return {
|
|
763
|
+
info: (props) => open({ type: "info", ...props }),
|
|
764
|
+
success: (props) => open({ type: "success", ...props }),
|
|
765
|
+
warning: (props) => open({ type: "warning", ...props }),
|
|
766
|
+
danger: (props) => open({ type: "danger", ...props })
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
function LoadingSpinner({ prompt }) {
|
|
770
|
+
const letterRefs = React9.useMemo(() => [], []);
|
|
771
|
+
const letters = prompt.split("");
|
|
772
|
+
React9.useEffect(() => {
|
|
773
|
+
const timeouts = [];
|
|
774
|
+
if (letterRefs.length === letters.length) {
|
|
775
|
+
letterRefs.forEach((ref, index) => {
|
|
776
|
+
const t = setTimeout(() => {
|
|
777
|
+
ref?.classList.add("slowly-appear");
|
|
778
|
+
}, index * 100);
|
|
779
|
+
timeouts.push(t);
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
return () => timeouts.forEach(clearTimeout);
|
|
783
|
+
}, [letterRefs, letters.length]);
|
|
784
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed top-0 bottom-0 right-0 left-0 bg-oxford-blue-700-opaque z-[8000000] flex flex-col gap-5 items-center justify-start pt-80", children: [
|
|
785
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-r-prussian-blue border-l-prussian-blue border-t-white border-b-white border-[10px] w-[80px] h-[80px] rounded-xl shapeshift" }),
|
|
786
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-prussian-blue dark:text-white text-3xl font-bold", children: letters.map((letter, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
787
|
+
"span",
|
|
788
|
+
{
|
|
789
|
+
className: "select-none",
|
|
790
|
+
ref: (ref) => {
|
|
791
|
+
letterRefs[index] = ref;
|
|
792
|
+
},
|
|
793
|
+
children: letter
|
|
794
|
+
},
|
|
795
|
+
index
|
|
796
|
+
)) })
|
|
797
|
+
] });
|
|
798
|
+
}
|
|
799
|
+
function FadingBase({
|
|
800
|
+
className = "",
|
|
801
|
+
isMounted = false,
|
|
802
|
+
children
|
|
803
|
+
}) {
|
|
804
|
+
const [shouldRender, setShouldRender] = React9.useState(isMounted);
|
|
805
|
+
const [visible, setVisible] = React9.useState(false);
|
|
806
|
+
const timerRef = React9.useRef(null);
|
|
807
|
+
React9.useEffect(() => {
|
|
808
|
+
if (isMounted) {
|
|
809
|
+
setShouldRender(true);
|
|
810
|
+
const rafId = requestAnimationFrame(() => setVisible(true));
|
|
811
|
+
return () => cancelAnimationFrame(rafId);
|
|
812
|
+
} else {
|
|
813
|
+
setVisible(false);
|
|
814
|
+
timerRef.current = setTimeout(() => setShouldRender(false), 300);
|
|
815
|
+
return () => {
|
|
816
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
}, [isMounted]);
|
|
820
|
+
if (!shouldRender) return null;
|
|
821
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
822
|
+
"div",
|
|
823
|
+
{
|
|
824
|
+
className: `w-full calculated-height pl-2 pr-2 pb-2 transition-opacity duration-300 ${visible ? "opacity-100" : "opacity-0"}`,
|
|
825
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `bg-ice dark:glassmorphism w-full h-full rounded-lg p-2 ${className}`, children })
|
|
826
|
+
}
|
|
827
|
+
);
|
|
828
|
+
}
|
|
829
|
+
function List2({ items, onItemClick, activeKey }) {
|
|
830
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "listbox", children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
831
|
+
"div",
|
|
832
|
+
{
|
|
833
|
+
role: "option",
|
|
834
|
+
"aria-selected": activeKey === item.key,
|
|
835
|
+
className: `hover:bg-ice-dark dark:hover:bg-independence cursor-pointer p-3 border-b border-b-ice-dark dark:border-b-independence transition-all duration-300 ${activeKey === item.key ? "bg-ice-dark dark:bg-independence" : ""}`,
|
|
836
|
+
onClick: () => onItemClick(item),
|
|
837
|
+
children: item.label
|
|
838
|
+
},
|
|
839
|
+
item.key
|
|
840
|
+
)) });
|
|
841
|
+
}
|
|
842
|
+
function ScalableContainer({
|
|
843
|
+
width,
|
|
844
|
+
height,
|
|
845
|
+
children,
|
|
846
|
+
assignClassOnClick
|
|
847
|
+
}) {
|
|
848
|
+
const containerRef = React9.useRef(null);
|
|
849
|
+
const [isScaled, setScaled] = React9.useState(false);
|
|
850
|
+
const [wrapperClass, setWrapperClass] = React9.useState("");
|
|
851
|
+
const onClick = () => {
|
|
852
|
+
const next = !isScaled;
|
|
853
|
+
setScaled(next);
|
|
854
|
+
setTimeout(() => {
|
|
855
|
+
containerRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
856
|
+
if (assignClassOnClick) {
|
|
857
|
+
setWrapperClass(next ? assignClassOnClick : "");
|
|
858
|
+
}
|
|
859
|
+
}, 200);
|
|
860
|
+
};
|
|
861
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
862
|
+
"div",
|
|
863
|
+
{
|
|
864
|
+
ref: containerRef,
|
|
865
|
+
style: {
|
|
866
|
+
width: isScaled ? "100%" : width,
|
|
867
|
+
height: isScaled ? "100%" : height
|
|
868
|
+
},
|
|
869
|
+
className: "rounded-lg bg-ice-dark dark:bg-prussian-blue flex flex-col transition-all duration-300 origin-center",
|
|
870
|
+
children: [
|
|
871
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2 w-max", children: /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { placement: "right", title: isScaled ? "Collapse" : "Expand", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
872
|
+
IconButton,
|
|
873
|
+
{
|
|
874
|
+
onClick,
|
|
875
|
+
icon: isScaled ? (
|
|
876
|
+
/* Collapse (arrows-pointing-in) */
|
|
877
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#fff", className: "w-5 h-5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M3.22 3.22a.75.75 0 011.06 0l3.97 3.97V4.5a.75.75 0 011.5 0V9a.75.75 0 01-.75.75H4.5a.75.75 0 010-1.5h2.69L3.22 4.28a.75.75 0 010-1.06zm17.56 0a.75.75 0 010 1.06l-3.97 3.97h2.69a.75.75 0 010 1.5H15a.75.75 0 01-.75-.75V4.5a.75.75 0 011.5 0v2.69l3.97-3.97a.75.75 0 011.06 0zM3.75 15a.75.75 0 01.75-.75H9a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-2.69l-3.97 3.97a.75.75 0 01-1.06-1.06l3.97-3.97H4.5a.75.75 0 01-.75-.75zm10.5 0a.75.75 0 01.75-.75h4.5a.75.75 0 01.75.75 .75.75 0 01-.75.75h-2.69l3.97 3.97a.75.75 0 11-1.06 1.06l-3.97-3.97v2.69a.75.75 0 01-1.5 0V15z", clipRule: "evenodd" }) })
|
|
878
|
+
) : (
|
|
879
|
+
/* Expand (arrows-pointing-out) */
|
|
880
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#fff", className: "w-5 h-5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M15 3a.75.75 0 01.75-.75h5.25A.75.75 0 0121 3v5.25a.75.75 0 01-1.5 0V4.81l-5.72 5.72a.75.75 0 11-1.06-1.06L18.19 3.75H15.75A.75.75 0 0115 3zM3 15a.75.75 0 01.75-.75h2.44l5.72-5.72a.75.75 0 111.06 1.06l-5.72 5.72v2.44a.75.75 0 01-1.5 0V15.75A.75.75 0 013 15zm0-11.25A.75.75 0 013.75 3h5.25a.75.75 0 010 1.5H4.81l5.72 5.72a.75.75 0 11-1.06 1.06L3.75 5.56V8.25a.75.75 0 01-1.5 0V3.75A.75.75 0 013 3zm18 12a.75.75 0 01-.75.75h-5.25a.75.75 0 010-1.5h2.44l-5.72-5.72a.75.75 0 111.06-1.06l5.72 5.72v-2.44a.75.75 0 011.5 0V15z", clipRule: "evenodd" }) })
|
|
881
|
+
)
|
|
882
|
+
}
|
|
883
|
+
) }) }),
|
|
884
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: wrapperClass, children })
|
|
885
|
+
]
|
|
886
|
+
}
|
|
887
|
+
);
|
|
888
|
+
}
|
|
889
|
+
function GridCard({ item, buttonText = "Open Application", onOpen }) {
|
|
890
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col w-[200px] h-[250px] rounded-lg bg-ice dark:bg-independence items-center justify-between p-2 shadow-2xl", children: [
|
|
891
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-prussian-blue dark:text-white text-lg font-bold text-center h-1/4", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { children: item.title }) }),
|
|
892
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1/4 flex items-center justify-center", children: typeof item.cover === "string" ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.cover, alt: "Grid Card Cover" }) : item.cover }),
|
|
893
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-prussian-blue text-sm dark:text-white text-center h-1/4", children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: item.description }) }),
|
|
894
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
895
|
+
Button,
|
|
896
|
+
{
|
|
897
|
+
disabled: !item.enabled,
|
|
898
|
+
style: { width: "max-content", padding: "0 8px", margin: "0" },
|
|
899
|
+
content: buttonText,
|
|
900
|
+
onClick: () => onOpen?.(item)
|
|
901
|
+
}
|
|
902
|
+
) })
|
|
903
|
+
] });
|
|
904
|
+
}
|
|
905
|
+
function OpaqueGridCard({
|
|
906
|
+
item,
|
|
907
|
+
isRight = false,
|
|
908
|
+
buttonText = "Open Application",
|
|
909
|
+
onOpen
|
|
910
|
+
}) {
|
|
911
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
912
|
+
"div",
|
|
913
|
+
{
|
|
914
|
+
className: `flex flex-col w-[200px] h-[250px] rounded-lg items-center p-2 ${!isRight ? "opaque-carousel-card-left dark:opaque-carousel-card-dark-left" : "opaque-carousel-card-right dark:opaque-carousel-card-dark-right"}`,
|
|
915
|
+
children: [
|
|
916
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
917
|
+
"div",
|
|
918
|
+
{
|
|
919
|
+
className: `${!isRight ? "opaque-carousel-card-text-right dark:opaque-carousel-card-text-dark-right" : "opaque-carousel-card-text-left dark:opaque-carousel-card-text-dark-left"} text-prussian-blue dark:text-white text-lg font-bold text-center h-1/4 select-none`,
|
|
920
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("h2", { children: item.title })
|
|
921
|
+
}
|
|
922
|
+
),
|
|
923
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1/4 flex items-center justify-center", children: typeof item.cover === "string" ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.cover, alt: "Grid Card Cover" }) : item.cover }),
|
|
924
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
925
|
+
"div",
|
|
926
|
+
{
|
|
927
|
+
className: `${!isRight ? "opaque-carousel-card-text-right dark:opaque-carousel-card-text-dark-right" : "opaque-carousel-card-text-left dark:opaque-carousel-card-text-dark-left"} text-prussian-blue dark:text-white text-center h-1/4 select-none text-sm`,
|
|
928
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: item.description })
|
|
929
|
+
}
|
|
930
|
+
),
|
|
931
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
932
|
+
Button,
|
|
933
|
+
{
|
|
934
|
+
style: {
|
|
935
|
+
width: "max-content",
|
|
936
|
+
padding: "0 8px",
|
|
937
|
+
margin: "0",
|
|
938
|
+
background: !isRight ? "linear-gradient(90deg, #0353A4 6.29%, rgba(3, 83, 164, 0) 97.35%)" : "linear-gradient(270deg, #0353A4 3.97%, rgba(3, 83, 164, 0) 94.04%)",
|
|
939
|
+
pointerEvents: "none",
|
|
940
|
+
userSelect: "none"
|
|
941
|
+
},
|
|
942
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(
|
|
943
|
+
"div",
|
|
944
|
+
{
|
|
945
|
+
className: !isRight ? "opaque-carousel-card-text-dark-right" : "opaque-carousel-card-text-dark-left",
|
|
946
|
+
children: buttonText
|
|
947
|
+
}
|
|
948
|
+
),
|
|
949
|
+
onClick: () => onOpen?.(item)
|
|
950
|
+
}
|
|
951
|
+
) })
|
|
952
|
+
]
|
|
953
|
+
}
|
|
954
|
+
);
|
|
955
|
+
}
|
|
956
|
+
function CatalogGrid({ items, buttonText, onOpen }) {
|
|
957
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(GridCard, { item, buttonText, onOpen }, item.key)) });
|
|
958
|
+
}
|
|
959
|
+
function CatalogCarousel({ items, buttonText, onOpen }) {
|
|
960
|
+
const [activeIndex, setActiveIndex] = React9.useState(0);
|
|
961
|
+
const [indexPool, setIndexPool] = React9.useState([]);
|
|
962
|
+
const cardRefs = React9.useRef([]);
|
|
963
|
+
const getIndexes = React9.useMemo(() => {
|
|
964
|
+
let nextIndex = activeIndex + 1;
|
|
965
|
+
let previousIndex = activeIndex - 1;
|
|
966
|
+
if (activeIndex === 0) previousIndex = items.length - 1;
|
|
967
|
+
if (activeIndex === items.length - 1) nextIndex = 0;
|
|
968
|
+
return { previousIndex, nextIndex };
|
|
969
|
+
}, [activeIndex, items.length]);
|
|
970
|
+
React9.useEffect(() => {
|
|
971
|
+
const { nextIndex, previousIndex } = getIndexes;
|
|
972
|
+
let indexes = [previousIndex, activeIndex, nextIndex];
|
|
973
|
+
if (activeIndex !== 0 && activeIndex !== items.length - 1) {
|
|
974
|
+
indexes = [...indexes].sort((a, b) => a - b);
|
|
975
|
+
}
|
|
976
|
+
setIndexPool(indexes);
|
|
977
|
+
const timeouts = [];
|
|
978
|
+
cardRefs.current.forEach(({ cardIndex, ref }) => {
|
|
979
|
+
if (cardIndex !== 1) {
|
|
980
|
+
ref.classList.remove("animate-in");
|
|
981
|
+
const t = setTimeout(() => ref.classList.add("animate-in"), 50);
|
|
982
|
+
timeouts.push(t);
|
|
983
|
+
}
|
|
984
|
+
if (cardIndex === 1) {
|
|
985
|
+
ref.classList.remove("scale-125");
|
|
986
|
+
const t2 = setTimeout(() => {
|
|
987
|
+
if (cardIndex === 1) ref.classList.add("scale-125");
|
|
988
|
+
}, 100);
|
|
989
|
+
timeouts.push(t2);
|
|
990
|
+
}
|
|
991
|
+
});
|
|
992
|
+
return () => timeouts.forEach(clearTimeout);
|
|
993
|
+
}, [activeIndex, getIndexes, items.length]);
|
|
994
|
+
const nextApp = () => setActiveIndex((prev) => prev + 1 === items.length ? 0 : prev + 1);
|
|
995
|
+
const previousApp = () => setActiveIndex((prev) => prev - 1 === -1 ? items.length - 1 : prev - 1);
|
|
996
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-10", children: [
|
|
997
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
998
|
+
"button",
|
|
999
|
+
{
|
|
1000
|
+
type: "button",
|
|
1001
|
+
onClick: previousApp,
|
|
1002
|
+
"aria-label": "Previous",
|
|
1003
|
+
className: "cursor-pointer rounded-lg transition-all duration-300 hover:bg-ice-dark dark:hover:bg-independence rotate-180",
|
|
1004
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-10 w-10 dark:stroke-white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
1005
|
+
}
|
|
1006
|
+
),
|
|
1007
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex", children: indexPool.map((index, id) => {
|
|
1008
|
+
const item = items[index];
|
|
1009
|
+
if (!item) return null;
|
|
1010
|
+
return id === 1 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1011
|
+
"div",
|
|
1012
|
+
{
|
|
1013
|
+
ref: (ref) => {
|
|
1014
|
+
if (cardRefs.current.length < 3 && ref)
|
|
1015
|
+
cardRefs.current.push({ cardIndex: id, ref });
|
|
1016
|
+
},
|
|
1017
|
+
className: "transition-all duration-300 scale-125 z-10 shadow-2xl rounded-lg",
|
|
1018
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(GridCard, { item, buttonText, onOpen })
|
|
1019
|
+
},
|
|
1020
|
+
id
|
|
1021
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1022
|
+
"div",
|
|
1023
|
+
{
|
|
1024
|
+
ref: (ref) => {
|
|
1025
|
+
if (cardRefs.current.length < 3 && ref)
|
|
1026
|
+
cardRefs.current.push({ cardIndex: id, ref });
|
|
1027
|
+
},
|
|
1028
|
+
className: "transition-all duration-300 shadow-2xl rounded-lg",
|
|
1029
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(OpaqueGridCard, { item, isRight: id === 2, buttonText, onOpen })
|
|
1030
|
+
},
|
|
1031
|
+
id
|
|
1032
|
+
);
|
|
1033
|
+
}) }),
|
|
1034
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1035
|
+
"button",
|
|
1036
|
+
{
|
|
1037
|
+
type: "button",
|
|
1038
|
+
onClick: nextApp,
|
|
1039
|
+
"aria-label": "Next",
|
|
1040
|
+
className: "cursor-pointer rounded-lg transition-all duration-300 hover:bg-ice-dark dark:hover:bg-independence",
|
|
1041
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-10 w-10 dark:stroke-white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
1042
|
+
}
|
|
1043
|
+
)
|
|
1044
|
+
] }) });
|
|
1045
|
+
}
|
|
1046
|
+
function Catalog({ display = "grid", items = [], buttonText, onOpen }) {
|
|
1047
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full", children: display === "grid" ? /* @__PURE__ */ jsxRuntime.jsx(CatalogGrid, { items, buttonText, onOpen }) : /* @__PURE__ */ jsxRuntime.jsx(CatalogCarousel, { items, buttonText, onOpen }) });
|
|
1048
|
+
}
|
|
1049
|
+
function MenuBarItem({ icon, isActive, title, onClick }) {
|
|
1050
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { title, placement: "right", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1051
|
+
"div",
|
|
1052
|
+
{
|
|
1053
|
+
role: "button",
|
|
1054
|
+
"aria-label": title,
|
|
1055
|
+
"aria-current": isActive ? "page" : void 0,
|
|
1056
|
+
className: `transition duration-300 hover:bg-prussian-blue ${isActive ? "bg-prussian-blue" : ""} rounded-lg p-2 cursor-pointer`,
|
|
1057
|
+
onClick,
|
|
1058
|
+
tabIndex: 0,
|
|
1059
|
+
onKeyDown: (e) => e.key === "Enter" && onClick?.(),
|
|
1060
|
+
children: icon
|
|
1061
|
+
}
|
|
1062
|
+
) });
|
|
1063
|
+
}
|
|
1064
|
+
function MenuBar({ items }) {
|
|
1065
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1066
|
+
"nav",
|
|
1067
|
+
{
|
|
1068
|
+
"aria-label": "Main navigation",
|
|
1069
|
+
className: "w-16 calculated-height bg-independence rounded-tr-lg rounded-br-lg flex flex-col gap-2 items-center p-2 z-50",
|
|
1070
|
+
children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1071
|
+
MenuBarItem,
|
|
1072
|
+
{
|
|
1073
|
+
icon: item.icon,
|
|
1074
|
+
title: item.title,
|
|
1075
|
+
isActive: item.isActive,
|
|
1076
|
+
onClick: item.onClick
|
|
1077
|
+
},
|
|
1078
|
+
item.key
|
|
1079
|
+
))
|
|
1080
|
+
}
|
|
1081
|
+
);
|
|
1082
|
+
}
|
|
1083
|
+
function ContextMenu({ items, position, visible, onClose }) {
|
|
1084
|
+
const contextRef = React9.useRef(null);
|
|
1085
|
+
const childMenuRef = React9.useRef(null);
|
|
1086
|
+
const [hasArrowUp, setHasArrowUp] = React9.useState(true);
|
|
1087
|
+
const [childArrowUp, setChildArrowUp] = React9.useState(false);
|
|
1088
|
+
const [hoveredItem, setHoveredItem] = React9.useState(-1);
|
|
1089
|
+
const [hoveredChild, setHoveredChild] = React9.useState(-1);
|
|
1090
|
+
const [activeChildren, setActiveChildren] = React9.useState([]);
|
|
1091
|
+
React9.useEffect(() => {
|
|
1092
|
+
const clickAway = ({ target }) => {
|
|
1093
|
+
if (contextRef.current && !contextRef.current.contains(target)) {
|
|
1094
|
+
if (childMenuRef.current) {
|
|
1095
|
+
childMenuRef.current.classList.add("opacity-0");
|
|
1096
|
+
childMenuRef.current.style.left = "0px";
|
|
1097
|
+
childMenuRef.current.style.top = "0px";
|
|
1098
|
+
}
|
|
1099
|
+
setActiveChildren([]);
|
|
1100
|
+
onClose();
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1103
|
+
window.addEventListener("click", clickAway);
|
|
1104
|
+
return () => window.removeEventListener("click", clickAway);
|
|
1105
|
+
}, [onClose]);
|
|
1106
|
+
React9.useEffect(() => {
|
|
1107
|
+
const current = contextRef.current;
|
|
1108
|
+
const child = childMenuRef.current;
|
|
1109
|
+
if (!current || !child) return;
|
|
1110
|
+
const { height, width } = current.getBoundingClientRect();
|
|
1111
|
+
if (position.y + height >= window.innerHeight) {
|
|
1112
|
+
current.style.top = `${position.y - (height - 40)}px`;
|
|
1113
|
+
setHasArrowUp(false);
|
|
1114
|
+
} else {
|
|
1115
|
+
current.style.top = `${position.y}px`;
|
|
1116
|
+
setHasArrowUp(true);
|
|
1117
|
+
}
|
|
1118
|
+
current.style.left = `${position.x}px`;
|
|
1119
|
+
child.style.width = `${width}px`;
|
|
1120
|
+
child.classList.add("opacity-0");
|
|
1121
|
+
}, [position]);
|
|
1122
|
+
const onItemClick = (e, item) => {
|
|
1123
|
+
if (item.onClick) {
|
|
1124
|
+
if (childMenuRef.current) {
|
|
1125
|
+
childMenuRef.current.classList.add("opacity-0");
|
|
1126
|
+
childMenuRef.current.style.left = "0px";
|
|
1127
|
+
childMenuRef.current.style.top = "0px";
|
|
1128
|
+
}
|
|
1129
|
+
setActiveChildren([]);
|
|
1130
|
+
item.onClick(item.path, item.reportType);
|
|
1131
|
+
} else if (item.children?.length) {
|
|
1132
|
+
const targetBbox = e.target.getBoundingClientRect();
|
|
1133
|
+
const childHeight = childMenuRef.current?.getBoundingClientRect().height ?? 0;
|
|
1134
|
+
const contextBbox = contextRef.current?.getBoundingClientRect() ?? { y: 0, width: 0};
|
|
1135
|
+
const contextWidth = contextBbox.width;
|
|
1136
|
+
if (targetBbox.y + childHeight >= window.innerHeight) {
|
|
1137
|
+
setChildArrowUp(false);
|
|
1138
|
+
if (childMenuRef.current) childMenuRef.current.style.top = `${targetBbox.y - childHeight}px`;
|
|
1139
|
+
} else {
|
|
1140
|
+
setChildArrowUp(true);
|
|
1141
|
+
if (childMenuRef.current)
|
|
1142
|
+
childMenuRef.current.style.top = `${targetBbox.y - contextBbox.y + targetBbox.height / 2 - 10}px`;
|
|
1143
|
+
}
|
|
1144
|
+
setActiveChildren(item.children);
|
|
1145
|
+
if (childMenuRef.current) {
|
|
1146
|
+
childMenuRef.current.classList.remove("opacity-0");
|
|
1147
|
+
childMenuRef.current.style.left = `${Math.round(contextWidth + 10)}px`;
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
};
|
|
1151
|
+
if (!visible) return null;
|
|
1152
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1153
|
+
"div",
|
|
1154
|
+
{
|
|
1155
|
+
ref: contextRef,
|
|
1156
|
+
className: `transition-all duration-150 absolute rounded-lg bg-ice text-prussian-blue z-30 flex ${hasArrowUp && hoveredItem === 0 ? "context-arrow-up context-arrow-hovered" : !hasArrowUp && hoveredItem === items.length - 1 ? "context-arrow-down context-arrow-hovered" : hasArrowUp ? "context-arrow-up" : "context-arrow-down"}`,
|
|
1157
|
+
children: [
|
|
1158
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "z-50", children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1159
|
+
"li",
|
|
1160
|
+
{
|
|
1161
|
+
onContextMenu: (e) => e.preventDefault(),
|
|
1162
|
+
onMouseEnter: () => setHoveredItem(index),
|
|
1163
|
+
onMouseLeave: () => setHoveredItem(-1),
|
|
1164
|
+
className: `flex items-center justify-between transition-all duration-300 p-2 cursor-pointer hover:bg-ice-dark ${index === 0 ? "rounded-tl-lg rounded-tr-lg" : ""} ${index === items.length - 1 ? "rounded-bl-lg rounded-br-lg" : ""}`,
|
|
1165
|
+
onClick: (e) => onItemClick(e, item),
|
|
1166
|
+
children: [
|
|
1167
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 pointer-events-none", children: [
|
|
1168
|
+
item.icon,
|
|
1169
|
+
item.value
|
|
1170
|
+
] }),
|
|
1171
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none", children: item.children && /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) })
|
|
1172
|
+
]
|
|
1173
|
+
},
|
|
1174
|
+
item.key
|
|
1175
|
+
)) }),
|
|
1176
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1177
|
+
"div",
|
|
1178
|
+
{
|
|
1179
|
+
ref: childMenuRef,
|
|
1180
|
+
className: `transition-all duration-150 absolute rounded-lg bg-ice text-prussian-blue ${childArrowUp && hoveredChild === 0 ? "context-arrow-up context-arrow-hovered" : !childArrowUp && hoveredChild === activeChildren.length - 1 ? "context-arrow-down context-arrow-hovered" : childArrowUp ? "context-arrow-up" : "context-arrow-down"}`,
|
|
1181
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("ul", { children: activeChildren.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1182
|
+
"li",
|
|
1183
|
+
{
|
|
1184
|
+
className: `flex items-center gap-2 p-2 cursor-pointer transition-all duration-150 hover:bg-ice-dark ${index === 0 ? "rounded-tl-lg rounded-tr-lg" : ""} ${index === activeChildren.length - 1 ? "rounded-bl-lg rounded-br-lg" : ""}`,
|
|
1185
|
+
onClick: () => item.onClick?.(item.path, item.reportType),
|
|
1186
|
+
onMouseEnter: () => setHoveredChild(index),
|
|
1187
|
+
onMouseLeave: () => setHoveredChild(-1),
|
|
1188
|
+
children: [
|
|
1189
|
+
item.icon,
|
|
1190
|
+
item.value
|
|
1191
|
+
]
|
|
1192
|
+
},
|
|
1193
|
+
index
|
|
1194
|
+
)) })
|
|
1195
|
+
}
|
|
1196
|
+
)
|
|
1197
|
+
]
|
|
1198
|
+
}
|
|
1199
|
+
);
|
|
1200
|
+
}
|
|
1201
|
+
function Wizard({ children, steps, storageKey = "po_wizard" }) {
|
|
1202
|
+
const wizardRef = React9.useRef(null);
|
|
1203
|
+
const [activeStep, setActiveStep] = React9.useState(0);
|
|
1204
|
+
const [targetBbox, setTargetBbox] = React9.useState(null);
|
|
1205
|
+
const HIGHLIGHTED = React9.useMemo(
|
|
1206
|
+
() => ["border", "border-4", "border-prussian-blue", "pointer-events-none"],
|
|
1207
|
+
[]
|
|
1208
|
+
);
|
|
1209
|
+
const closeWizard = React9.useCallback(() => {
|
|
1210
|
+
steps[activeStep]?.stepRef.current?.classList.remove(...HIGHLIGHTED);
|
|
1211
|
+
if (wizardRef.current) wizardRef.current.style.display = "none";
|
|
1212
|
+
}, [HIGHLIGHTED, steps, activeStep]);
|
|
1213
|
+
React9.useEffect(() => {
|
|
1214
|
+
const visited = JSON.parse(localStorage.getItem(storageKey) ?? "false");
|
|
1215
|
+
if (visited) {
|
|
1216
|
+
closeWizard();
|
|
1217
|
+
return;
|
|
1218
|
+
}
|
|
1219
|
+
const el = steps[activeStep]?.stepRef.current;
|
|
1220
|
+
if (el) {
|
|
1221
|
+
setTargetBbox(el.getBoundingClientRect());
|
|
1222
|
+
el.classList.add(...HIGHLIGHTED);
|
|
1223
|
+
}
|
|
1224
|
+
}, [closeWizard, steps, activeStep, HIGHLIGHTED, storageKey]);
|
|
1225
|
+
const onStepChange = () => {
|
|
1226
|
+
if (steps[activeStep + 1]) {
|
|
1227
|
+
steps[activeStep].stepRef.current?.classList.remove(...HIGHLIGHTED);
|
|
1228
|
+
const nextEl = steps[activeStep + 1].stepRef.current;
|
|
1229
|
+
if (nextEl) setTargetBbox(nextEl.getBoundingClientRect());
|
|
1230
|
+
setActiveStep(activeStep + 1);
|
|
1231
|
+
} else {
|
|
1232
|
+
localStorage.setItem(storageKey, "true");
|
|
1233
|
+
closeWizard();
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1236
|
+
const step = steps[activeStep];
|
|
1237
|
+
const left = step && targetBbox ? step.positioning === "natural" ? isNaN(targetBbox.width + 20) ? 0 : targetBbox.width + 20 : isNaN(targetBbox.width / 2) ? 0 : targetBbox.width / 2 : "auto";
|
|
1238
|
+
const top = step && targetBbox ? step.positioning === "natural" ? isNaN(targetBbox.y + 10) ? 0 : targetBbox.y + 10 : isNaN(targetBbox.height / 2) ? 0 : targetBbox.height / 2 : "auto";
|
|
1239
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full p-1 rounded-lg w-full", children: [
|
|
1240
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute", ref: wizardRef, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1241
|
+
"div",
|
|
1242
|
+
{
|
|
1243
|
+
style: { left, top },
|
|
1244
|
+
className: "absolute bg-white rounded-lg p-2 w-[220px] z-50 text-prussian-blue drop-shadow-md transition-all duration-300",
|
|
1245
|
+
children: [
|
|
1246
|
+
step?.description,
|
|
1247
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end", children: [
|
|
1248
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex h-3 w-3 relative left-14 top-4", children: [
|
|
1249
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-ping absolute inline-flex h-3 w-3 rounded-full bg-dark-cornflower-blue opacity-75" }),
|
|
1250
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative inline-flex rounded-full h-3 w-3 bg-dark-cornflower-blue" })
|
|
1251
|
+
] }),
|
|
1252
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1253
|
+
Button,
|
|
1254
|
+
{
|
|
1255
|
+
onClick: onStepChange,
|
|
1256
|
+
content: activeStep === steps.length - 1 ? "Close" : "Next",
|
|
1257
|
+
style: { width: 55, padding: "5px 10px", margin: "0" }
|
|
1258
|
+
}
|
|
1259
|
+
)
|
|
1260
|
+
] })
|
|
1261
|
+
]
|
|
1262
|
+
}
|
|
1263
|
+
) }),
|
|
1264
|
+
children
|
|
1265
|
+
] });
|
|
1266
|
+
}
|
|
1267
|
+
var SearchInput = React9__default.default.forwardRef(function SearchInput2({
|
|
1268
|
+
value,
|
|
1269
|
+
onChange,
|
|
1270
|
+
disabled,
|
|
1271
|
+
label,
|
|
1272
|
+
htmlFor,
|
|
1273
|
+
placeholder,
|
|
1274
|
+
name,
|
|
1275
|
+
inputStyle,
|
|
1276
|
+
style,
|
|
1277
|
+
layout = "vertical"
|
|
1278
|
+
}, ref) {
|
|
1279
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex flex-col items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1280
|
+
"div",
|
|
1281
|
+
{
|
|
1282
|
+
className: `flex ${layout === "vertical" ? "flex-col" : "flex-row items-center gap-2"}`,
|
|
1283
|
+
style: style ?? {},
|
|
1284
|
+
children: [
|
|
1285
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-lg font-bold ml-1 max-content text-prussian-blue dark:text-white", htmlFor, children: label }),
|
|
1286
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white flex items-center gap-1 rounded-lg focus:outline-oxford-blue-700-opaque pr-2", children: [
|
|
1287
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1288
|
+
"input",
|
|
1289
|
+
{
|
|
1290
|
+
ref,
|
|
1291
|
+
disabled,
|
|
1292
|
+
value,
|
|
1293
|
+
onChange,
|
|
1294
|
+
type: "text",
|
|
1295
|
+
name,
|
|
1296
|
+
id: htmlFor,
|
|
1297
|
+
className: "focus:outline-none pl-2 h-9 w-56 outline-offset-2 text-prussian-blue mt-1 rounded-lg disabled:bg-disabled disabled:cursor-not-allowed",
|
|
1298
|
+
style: inputStyle ?? {},
|
|
1299
|
+
placeholder: placeholder ?? ""
|
|
1300
|
+
}
|
|
1301
|
+
),
|
|
1302
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: colors_default.PALETTE["prussian-blue"], className: "w-6 h-6", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M10.5 3.75a6.75 6.75 0 100 13.5 6.75 6.75 0 000-13.5zM2.25 10.5a8.25 8.25 0 1114.59 5.28l4.69 4.69a.75.75 0 11-1.06 1.06l-4.69-4.69A8.25 8.25 0 012.25 10.5z", clipRule: "evenodd" }) })
|
|
1303
|
+
] })
|
|
1304
|
+
]
|
|
1305
|
+
}
|
|
1306
|
+
) });
|
|
1307
|
+
});
|
|
1308
|
+
var SearchInput_default = SearchInput;
|
|
1309
|
+
function DropdownPill({ value, hasSiblings = false }) {
|
|
1310
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1311
|
+
"div",
|
|
1312
|
+
{
|
|
1313
|
+
className: `bg-prussian-blue text-white text-sm text-ellipsis ${hasSiblings ? "w-24" : "w-max"} p-1 rounded-lg whitespace-nowrap overflow-hidden`,
|
|
1314
|
+
children: value
|
|
1315
|
+
}
|
|
1316
|
+
);
|
|
1317
|
+
}
|
|
1318
|
+
function Dropdown({
|
|
1319
|
+
isMultiselect = false,
|
|
1320
|
+
hasSearch = true,
|
|
1321
|
+
label,
|
|
1322
|
+
name,
|
|
1323
|
+
value,
|
|
1324
|
+
onChange,
|
|
1325
|
+
disabled,
|
|
1326
|
+
layout = "horizontal",
|
|
1327
|
+
errorMessage,
|
|
1328
|
+
style = {},
|
|
1329
|
+
htmlFor,
|
|
1330
|
+
items = [],
|
|
1331
|
+
labelStyle = {},
|
|
1332
|
+
placeholder
|
|
1333
|
+
}) {
|
|
1334
|
+
const [open, setOpen] = React9.useState(false);
|
|
1335
|
+
const [selectedItems, setSelectedItems] = React9.useState([]);
|
|
1336
|
+
const [hoveredItem, setHoveredItem] = React9.useState(null);
|
|
1337
|
+
const [searchTerm, setSearchTerm] = React9.useState("");
|
|
1338
|
+
const [innerItems, setInnerItems] = React9.useState([]);
|
|
1339
|
+
React9.useEffect(() => {
|
|
1340
|
+
setInnerItems(items);
|
|
1341
|
+
}, [items]);
|
|
1342
|
+
React9.useEffect(() => {
|
|
1343
|
+
if (isMultiselect && Array.isArray(value)) {
|
|
1344
|
+
setSelectedItems(value);
|
|
1345
|
+
}
|
|
1346
|
+
}, [isMultiselect, value]);
|
|
1347
|
+
const selectItem = (key) => {
|
|
1348
|
+
if (isMultiselect) {
|
|
1349
|
+
const next = selectedItems.includes(key) ? selectedItems.filter((it) => it !== key) : [...selectedItems, key];
|
|
1350
|
+
setSelectedItems(next);
|
|
1351
|
+
onChange?.({ target: { value: next, id: htmlFor, name } });
|
|
1352
|
+
} else {
|
|
1353
|
+
setSelectedItems([key]);
|
|
1354
|
+
onChange?.({ target: { value: key, id: htmlFor, name } });
|
|
1355
|
+
setOpen(false);
|
|
1356
|
+
}
|
|
1357
|
+
};
|
|
1358
|
+
const onSearchChange = (e) => {
|
|
1359
|
+
const term = e.target.value;
|
|
1360
|
+
setSearchTerm(term);
|
|
1361
|
+
setInnerItems(
|
|
1362
|
+
term.trim() === "" ? items : items.filter(
|
|
1363
|
+
(it) => String(it.label).toLowerCase().includes(term.toLowerCase())
|
|
1364
|
+
)
|
|
1365
|
+
);
|
|
1366
|
+
};
|
|
1367
|
+
const isSelected = (key) => Array.isArray(value) ? value.includes(key) : value === key;
|
|
1368
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2", children: [
|
|
1369
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1370
|
+
"div",
|
|
1371
|
+
{
|
|
1372
|
+
className: `flex ${layout === "vertical" ? "flex-col" : "flex-row items-center gap-2"}`,
|
|
1373
|
+
children: [
|
|
1374
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1375
|
+
"label",
|
|
1376
|
+
{
|
|
1377
|
+
className: "text-md font-bold ml-1 max-content select-none text-prussian-blue dark:text-white",
|
|
1378
|
+
htmlFor,
|
|
1379
|
+
style: labelStyle,
|
|
1380
|
+
children: label
|
|
1381
|
+
}
|
|
1382
|
+
),
|
|
1383
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover__namespace.Root, { open: open && !disabled, onOpenChange: (o) => !disabled && setOpen(o), children: [
|
|
1384
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1385
|
+
"div",
|
|
1386
|
+
{
|
|
1387
|
+
id: htmlFor,
|
|
1388
|
+
role: "combobox",
|
|
1389
|
+
"aria-expanded": open,
|
|
1390
|
+
"aria-haspopup": "listbox",
|
|
1391
|
+
style,
|
|
1392
|
+
className: `flex items-center justify-between relative h-9 rounded-lg cursor-pointer select-none ${disabled ? "cursor-not-allowed bg-disabled" : "bg-white"}`,
|
|
1393
|
+
tabIndex: disabled ? -1 : 0,
|
|
1394
|
+
onKeyDown: (e) => e.key === "Enter" && !disabled && setOpen(true),
|
|
1395
|
+
children: [
|
|
1396
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1397
|
+
"div",
|
|
1398
|
+
{
|
|
1399
|
+
className: `h-7 pl-2 ${!style?.width ? "min-w-[240px]" : ""} focus:outline-none text-prussian-blue flex items-center gap-1 overflow-hidden`,
|
|
1400
|
+
children: !value || Array.isArray(value) && value.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-roman-silver text-sm", children: placeholder }) : Array.isArray(value) ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1401
|
+
value.slice(0, 1).map((val) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1402
|
+
DropdownPill,
|
|
1403
|
+
{
|
|
1404
|
+
hasSiblings: value.length > 1,
|
|
1405
|
+
value: innerItems.find((it) => it.key === val)?.label
|
|
1406
|
+
},
|
|
1407
|
+
String(val)
|
|
1408
|
+
)),
|
|
1409
|
+
value.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(DropdownPill, { value: `+${value.length - 1} more` })
|
|
1410
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(DropdownPill, { value: innerItems.find((it) => it.key === value)?.label })
|
|
1411
|
+
}
|
|
1412
|
+
),
|
|
1413
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `transition-transform duration-300 mr-2 ${open ? "rotate-180" : "rotate-0"}`, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
1414
|
+
]
|
|
1415
|
+
}
|
|
1416
|
+
) }),
|
|
1417
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1418
|
+
Popover__namespace.Content,
|
|
1419
|
+
{
|
|
1420
|
+
align: "start",
|
|
1421
|
+
sideOffset: 4,
|
|
1422
|
+
style: { width: style?.width || 240 },
|
|
1423
|
+
className: "bg-ice rounded-lg shadow-md z-50 p-2 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
1424
|
+
onInteractOutside: () => setOpen(false),
|
|
1425
|
+
children: [
|
|
1426
|
+
hasSearch && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1427
|
+
SearchInput_default,
|
|
1428
|
+
{
|
|
1429
|
+
style: { width: "100%" },
|
|
1430
|
+
inputStyle: { width: "100%" },
|
|
1431
|
+
value: searchTerm,
|
|
1432
|
+
onChange: onSearchChange,
|
|
1433
|
+
placeholder: "Search..."
|
|
1434
|
+
}
|
|
1435
|
+
) }),
|
|
1436
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { role: "listbox", "aria-multiselectable": isMultiselect, className: "max-h-40 overflow-y-auto", children: innerItems.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1437
|
+
"div",
|
|
1438
|
+
{
|
|
1439
|
+
role: "option",
|
|
1440
|
+
"aria-selected": isSelected(item.key),
|
|
1441
|
+
"aria-rowindex": idx,
|
|
1442
|
+
className: `flex items-center justify-between p-2 hover:bg-prussian-blue hover:text-white transition-all duration-150 text-sm text-prussian-blue rounded-lg cursor-pointer ${selectedItems.includes(item.key) ? "bg-ice-dark" : ""}`,
|
|
1443
|
+
onClick: () => selectItem(item.key),
|
|
1444
|
+
onMouseEnter: () => setHoveredItem(item.key),
|
|
1445
|
+
onMouseLeave: () => setHoveredItem(null),
|
|
1446
|
+
children: [
|
|
1447
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs", children: [
|
|
1448
|
+
item.icon && /* @__PURE__ */ jsxRuntime.jsx("div", { children: item.icon }),
|
|
1449
|
+
item.label
|
|
1450
|
+
] }),
|
|
1451
|
+
isSelected(item.key) && /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1452
|
+
"path",
|
|
1453
|
+
{
|
|
1454
|
+
d: "M4 10l4.5 4.5L16 6",
|
|
1455
|
+
stroke: hoveredItem === item.key ? "#fff" : colors_default.PALETTE["prussian-blue"],
|
|
1456
|
+
strokeWidth: "2",
|
|
1457
|
+
strokeLinecap: "round",
|
|
1458
|
+
strokeLinejoin: "round"
|
|
1459
|
+
}
|
|
1460
|
+
) })
|
|
1461
|
+
]
|
|
1462
|
+
},
|
|
1463
|
+
item.key
|
|
1464
|
+
)) })
|
|
1465
|
+
]
|
|
1466
|
+
}
|
|
1467
|
+
) })
|
|
1468
|
+
] })
|
|
1469
|
+
]
|
|
1470
|
+
}
|
|
1471
|
+
),
|
|
1472
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-error dark:text-prussian-blue min-h-0", children: errorMessage })
|
|
1473
|
+
] });
|
|
1474
|
+
}
|
|
1475
|
+
var DEFAULT_PICKER = [
|
|
1476
|
+
{ key: 1, value: 5, label: 5 },
|
|
1477
|
+
{ key: 2, value: 10, label: 10 },
|
|
1478
|
+
{ key: 3, value: 15, label: 15 },
|
|
1479
|
+
{ key: 4, value: 20, label: 20 }
|
|
1480
|
+
];
|
|
1481
|
+
var DEFAULT_PAGINATION = {
|
|
1482
|
+
enabled: true,
|
|
1483
|
+
perPage: 15,
|
|
1484
|
+
withPicker: true,
|
|
1485
|
+
pickerOptions: DEFAULT_PICKER
|
|
1486
|
+
};
|
|
1487
|
+
var DEFAULT_EXPAND = {
|
|
1488
|
+
enabled: false,
|
|
1489
|
+
expandIcon: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}),
|
|
1490
|
+
expandComponent: () => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {})
|
|
1491
|
+
};
|
|
1492
|
+
function createDatasets(rows, perPage) {
|
|
1493
|
+
if (!perPage) return [rows.slice()];
|
|
1494
|
+
const all = [];
|
|
1495
|
+
for (let i = 0; i < rows.length; i += perPage) {
|
|
1496
|
+
all.push(rows.slice(i, i + perPage));
|
|
1497
|
+
}
|
|
1498
|
+
return all;
|
|
1499
|
+
}
|
|
1500
|
+
function TableHeader({ columns }) {
|
|
1501
|
+
return /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "dark:bg-prussian-blue bg-ice-dark min-h-[50px] border-b border-b-white border-t-white dark:border-b-independence flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "flex w-full items-center justify-center", children: columns.map((col) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1502
|
+
"th",
|
|
1503
|
+
{
|
|
1504
|
+
className: "text-center w-full text-[13px] text-prussian-blue dark:text-white",
|
|
1505
|
+
children: col.label
|
|
1506
|
+
},
|
|
1507
|
+
col.key
|
|
1508
|
+
)) }) });
|
|
1509
|
+
}
|
|
1510
|
+
function TableBody({
|
|
1511
|
+
columns,
|
|
1512
|
+
rows,
|
|
1513
|
+
expandRow
|
|
1514
|
+
}) {
|
|
1515
|
+
const [visibleRows, setVisibleRows] = React9.useState({});
|
|
1516
|
+
const toggleRow = (rowKey) => {
|
|
1517
|
+
setVisibleRows((prev) => ({
|
|
1518
|
+
...prev,
|
|
1519
|
+
[rowKey]: { visible: !prev[rowKey]?.visible }
|
|
1520
|
+
}));
|
|
1521
|
+
};
|
|
1522
|
+
React9.useEffect(() => {
|
|
1523
|
+
if (rows.length && Object.keys(visibleRows).length === 0) {
|
|
1524
|
+
const initial = {};
|
|
1525
|
+
rows.forEach((row) => {
|
|
1526
|
+
initial[row.key] = { visible: false };
|
|
1527
|
+
});
|
|
1528
|
+
setVisibleRows(initial);
|
|
1529
|
+
}
|
|
1530
|
+
}, [rows]);
|
|
1531
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "w-full", children: rows.map((row, i) => /* @__PURE__ */ jsxRuntime.jsxs(React9__default.default.Fragment, { children: [
|
|
1532
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1533
|
+
"tr",
|
|
1534
|
+
{
|
|
1535
|
+
className: `border-b border-b-white dark:border-b-manatee flex min-w-max hover:bg-ice-dark dark:hover:bg-prussian-blue transition-all duration-150 ${i % 2 === 0 ? "bg-ice dark:bg-prussian-blue" : "bg-ice-dark dark:bg-black-coral"}`,
|
|
1536
|
+
children: [
|
|
1537
|
+
expandRow.enabled && /* @__PURE__ */ jsxRuntime.jsx("td", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1538
|
+
"span",
|
|
1539
|
+
{
|
|
1540
|
+
onClick: () => toggleRow(row.key),
|
|
1541
|
+
className: `p-2 cursor-pointer origin-center transition-all duration-200 ${visibleRows[row.key]?.visible ? "rotate-180" : "rotate-0"}`,
|
|
1542
|
+
children: expandRow.expandIcon ?? /* PlusCircle */
|
|
1543
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: colors_default.PALETTE["prussian-blue"], className: "w-5 h-5 dark:fill-white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zM12.75 9a.75.75 0 00-1.5 0v2.25H9a.75.75 0 000 1.5h2.25V15a.75.75 0 001.5 0v-2.25H15a.75.75 0 000-1.5h-2.25V9z", clipRule: "evenodd" }) })
|
|
1544
|
+
}
|
|
1545
|
+
) }),
|
|
1546
|
+
columns.map((col, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1547
|
+
"td",
|
|
1548
|
+
{
|
|
1549
|
+
className: `text-center min-h-[40px] w-full flex items-center justify-center p-1 border-white dark:border-manatee ${index !== columns.length - 1 ? "border-r-2" : ""}`,
|
|
1550
|
+
children: "component" in col && col.component ? col.component(row[col.keyBind], row) : row[col.keyBind]
|
|
1551
|
+
},
|
|
1552
|
+
index
|
|
1553
|
+
))
|
|
1554
|
+
]
|
|
1555
|
+
}
|
|
1556
|
+
),
|
|
1557
|
+
expandRow.enabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1558
|
+
"tr",
|
|
1559
|
+
{
|
|
1560
|
+
className: `overflow-hidden w-full transition-all duration-300 ${visibleRows[row.key]?.visible ? "max-h-[2000px]" : "max-h-0"}`,
|
|
1561
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: columns.length, className: "p-0 pb-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1562
|
+
"div",
|
|
1563
|
+
{
|
|
1564
|
+
className: `overflow-hidden w-full transition-[max-height] duration-300 ${visibleRows[row.key]?.visible ? "max-h-[2000px]" : "max-h-0"}`,
|
|
1565
|
+
children: expandRow.expandComponent?.(row)
|
|
1566
|
+
}
|
|
1567
|
+
) })
|
|
1568
|
+
},
|
|
1569
|
+
`extra-${i}`
|
|
1570
|
+
)
|
|
1571
|
+
] }, row.key)) });
|
|
1572
|
+
}
|
|
1573
|
+
function Pagination({
|
|
1574
|
+
activePage,
|
|
1575
|
+
onPageChange,
|
|
1576
|
+
maxPage,
|
|
1577
|
+
options,
|
|
1578
|
+
onPerPageChange,
|
|
1579
|
+
serverSide = false
|
|
1580
|
+
}) {
|
|
1581
|
+
const picker = options.pickerOptions ?? DEFAULT_PICKER;
|
|
1582
|
+
const matchedOption = picker.find(
|
|
1583
|
+
(o) => o.label === options.perPage || o.value === options.perPage
|
|
1584
|
+
);
|
|
1585
|
+
const [perPageKey, setPerPageKey] = React9.useState(() => matchedOption?.key ?? picker[0]?.key);
|
|
1586
|
+
const displayPerPageKey = serverSide ? matchedOption?.key ?? perPageKey : perPageKey;
|
|
1587
|
+
React9.useEffect(() => {
|
|
1588
|
+
if (serverSide && options.perPage != null) {
|
|
1589
|
+
const next = picker.find((o) => o.label === options.perPage || o.value === options.perPage);
|
|
1590
|
+
if (next) setPerPageKey(next.key);
|
|
1591
|
+
}
|
|
1592
|
+
}, [serverSide, options.perPage, picker]);
|
|
1593
|
+
const navBtn = (icon, disabled, onClick) => /* @__PURE__ */ jsxRuntime.jsx(IconButton, { disabled, onClick, icon });
|
|
1594
|
+
const chevronRight = (color) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, className: "h-5 w-5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) });
|
|
1595
|
+
const doubleChevronRight = (color) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, className: "h-5 w-5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 5l7 7-7 7M5 5l7 7-7 7" }) });
|
|
1596
|
+
const disabledColor = colors_default.PALETTE["prussian-blue"];
|
|
1597
|
+
const enabledColor = colors_default.PALETTE.white;
|
|
1598
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2 items-center justify-end pt-2", children: [
|
|
1599
|
+
navBtn(
|
|
1600
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rotate-180 inline-flex", children: doubleChevronRight(activePage === 0 ? disabledColor : enabledColor) }),
|
|
1601
|
+
activePage === 0,
|
|
1602
|
+
() => onPageChange(0)
|
|
1603
|
+
),
|
|
1604
|
+
navBtn(
|
|
1605
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rotate-180 inline-flex", children: chevronRight(activePage === 0 ? disabledColor : enabledColor) }),
|
|
1606
|
+
activePage === 0,
|
|
1607
|
+
() => activePage > 0 && onPageChange(activePage - 1)
|
|
1608
|
+
),
|
|
1609
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-ice-dark dark:bg-independence rounded-lg ml-2 mr-2 shadow-md p-2 w-10 text-center select-none", children: activePage + 1 }),
|
|
1610
|
+
navBtn(
|
|
1611
|
+
chevronRight(activePage === maxPage ? disabledColor : enabledColor),
|
|
1612
|
+
activePage === maxPage,
|
|
1613
|
+
() => activePage < maxPage && onPageChange(activePage + 1)
|
|
1614
|
+
),
|
|
1615
|
+
navBtn(
|
|
1616
|
+
doubleChevronRight(activePage === maxPage ? disabledColor : enabledColor),
|
|
1617
|
+
activePage === maxPage,
|
|
1618
|
+
() => onPageChange(maxPage)
|
|
1619
|
+
),
|
|
1620
|
+
options.withPicker && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1621
|
+
Dropdown,
|
|
1622
|
+
{
|
|
1623
|
+
style: { width: 80, position: "relative", bottom: 4 },
|
|
1624
|
+
hasSearch: false,
|
|
1625
|
+
items: picker,
|
|
1626
|
+
isMultiselect: false,
|
|
1627
|
+
value: displayPerPageKey,
|
|
1628
|
+
onChange: ({ target: { value } }) => {
|
|
1629
|
+
const key = typeof value === "string" && /^\d+$/.test(value) ? Number(value) : value;
|
|
1630
|
+
if (!serverSide) setPerPageKey(key);
|
|
1631
|
+
const opt = picker.find((o) => o.key === key);
|
|
1632
|
+
onPerPageChange(opt?.label ?? opt?.value ?? key);
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
)
|
|
1636
|
+
] });
|
|
1637
|
+
}
|
|
1638
|
+
function Table({
|
|
1639
|
+
columns = [],
|
|
1640
|
+
rows = [],
|
|
1641
|
+
pagination = DEFAULT_PAGINATION,
|
|
1642
|
+
expandRow = DEFAULT_EXPAND,
|
|
1643
|
+
hasSearch = true,
|
|
1644
|
+
footer = null,
|
|
1645
|
+
header = null
|
|
1646
|
+
}) {
|
|
1647
|
+
const searchRef = React9.useRef(null);
|
|
1648
|
+
const [searchTerm, setSearchTerm] = React9.useState("");
|
|
1649
|
+
const [perPage, setPerPage] = React9.useState(
|
|
1650
|
+
typeof pagination.perPage === "number" ? pagination.perPage : 15
|
|
1651
|
+
);
|
|
1652
|
+
const [activePage, setActivePage] = React9.useState(0);
|
|
1653
|
+
const [datasets, setDatasets] = React9.useState([]);
|
|
1654
|
+
const isServerSide = !!(pagination.enabled && pagination.serverSide);
|
|
1655
|
+
const MAX_PAGE = React9.useMemo(() => {
|
|
1656
|
+
if (isServerSide && typeof pagination.maxPage === "number") return Math.max(0, pagination.maxPage);
|
|
1657
|
+
if (isServerSide && typeof pagination.totalCount === "number")
|
|
1658
|
+
return Math.max(0, Math.ceil(pagination.totalCount / perPage) - 1);
|
|
1659
|
+
return datasets.length ? datasets.length - 1 : 0;
|
|
1660
|
+
}, [isServerSide, pagination.maxPage, pagination.totalCount, perPage, datasets.length]);
|
|
1661
|
+
const currentPageRows = React9.useMemo(() => {
|
|
1662
|
+
if (isServerSide) return rows;
|
|
1663
|
+
return datasets.length ? datasets[activePage] ?? [] : [];
|
|
1664
|
+
}, [isServerSide, rows, datasets, activePage]);
|
|
1665
|
+
React9.useEffect(() => {
|
|
1666
|
+
if (pagination.enabled && !isServerSide) setPerPage(pagination.perPage ?? 15);
|
|
1667
|
+
}, [pagination, isServerSide]);
|
|
1668
|
+
React9.useEffect(() => {
|
|
1669
|
+
if (isServerSide && typeof pagination.perPage === "number") setPerPage(pagination.perPage);
|
|
1670
|
+
}, [isServerSide, pagination.perPage]);
|
|
1671
|
+
React9.useEffect(() => {
|
|
1672
|
+
if (isServerSide) return;
|
|
1673
|
+
setDatasets(createDatasets(rows, pagination.enabled ? perPage : null));
|
|
1674
|
+
}, [rows, perPage, pagination, isServerSide]);
|
|
1675
|
+
React9.useEffect(() => {
|
|
1676
|
+
if (isServerSide && typeof pagination.page === "number" && pagination.page >= 1)
|
|
1677
|
+
setActivePage(pagination.page - 1);
|
|
1678
|
+
}, [isServerSide, pagination.page]);
|
|
1679
|
+
const onSearchChange = (e) => {
|
|
1680
|
+
const term = e.target.value;
|
|
1681
|
+
setSearchTerm(term);
|
|
1682
|
+
if (isServerSide) return;
|
|
1683
|
+
const filtered = rows.filter(
|
|
1684
|
+
(row) => Object.values(row).some(
|
|
1685
|
+
(v) => !!v && String(v).toLowerCase().includes(term.toLowerCase())
|
|
1686
|
+
)
|
|
1687
|
+
);
|
|
1688
|
+
setDatasets(createDatasets(filtered, pagination.enabled ? perPage : null));
|
|
1689
|
+
setActivePage(0);
|
|
1690
|
+
};
|
|
1691
|
+
const onPaginationChange = (perPageValue) => {
|
|
1692
|
+
setPerPage(perPageValue);
|
|
1693
|
+
setActivePage(0);
|
|
1694
|
+
if (isServerSide) pagination.onPerPageChange?.(perPageValue);
|
|
1695
|
+
};
|
|
1696
|
+
const handlePageChange = (newPage) => {
|
|
1697
|
+
if (isServerSide) {
|
|
1698
|
+
pagination.onPageChange?.(newPage + 1);
|
|
1699
|
+
return;
|
|
1700
|
+
}
|
|
1701
|
+
setActivePage(newPage);
|
|
1702
|
+
};
|
|
1703
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full h-max rounded-lg", children: [
|
|
1704
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
1705
|
+
hasSearch && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1706
|
+
SearchInput_default,
|
|
1707
|
+
{
|
|
1708
|
+
ref: searchRef,
|
|
1709
|
+
value: searchTerm,
|
|
1710
|
+
onChange: onSearchChange,
|
|
1711
|
+
placeholder: "Search term..."
|
|
1712
|
+
}
|
|
1713
|
+
),
|
|
1714
|
+
pagination.enabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1715
|
+
Pagination,
|
|
1716
|
+
{
|
|
1717
|
+
activePage,
|
|
1718
|
+
onPageChange: handlePageChange,
|
|
1719
|
+
maxPage: MAX_PAGE,
|
|
1720
|
+
onPerPageChange: onPaginationChange,
|
|
1721
|
+
options: pagination,
|
|
1722
|
+
serverSide: isServerSide
|
|
1723
|
+
}
|
|
1724
|
+
)
|
|
1725
|
+
] }),
|
|
1726
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: header }),
|
|
1727
|
+
/* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full h-full", children: [
|
|
1728
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableHeader, { columns }),
|
|
1729
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableBody, { columns, rows: currentPageRows, expandRow })
|
|
1730
|
+
] }),
|
|
1731
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: footer })
|
|
1732
|
+
] });
|
|
1733
|
+
}
|
|
1734
|
+
function Switch({ checked, onChange }) {
|
|
1735
|
+
const id = React9.useId();
|
|
1736
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative bottom-5", children: /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className: "flex items-center cursor-pointer mr-12 select-none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1737
|
+
SwitchPrimitive__namespace.Root,
|
|
1738
|
+
{
|
|
1739
|
+
id,
|
|
1740
|
+
checked,
|
|
1741
|
+
onCheckedChange: (c) => onChange({ target: { checked: c } }),
|
|
1742
|
+
className: "relative inline-flex h-6 w-14 items-center rounded-full bg-prussian-blue dark:bg-white transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-usafa-blue",
|
|
1743
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1744
|
+
SwitchPrimitive__namespace.Thumb,
|
|
1745
|
+
{
|
|
1746
|
+
className: "pointer-events-none inline-flex h-8 w-8 rounded-full shadow transition-transform duration-200 data-[state=checked]:translate-x-[22px] data-[state=unchecked]:translate-x-[-4px]",
|
|
1747
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1748
|
+
"div",
|
|
1749
|
+
{
|
|
1750
|
+
className: `rounded-full w-8 h-8 ${checked ? "bg-success" : "bg-error"} transition-colors duration-200`
|
|
1751
|
+
}
|
|
1752
|
+
)
|
|
1753
|
+
}
|
|
1754
|
+
)
|
|
1755
|
+
}
|
|
1756
|
+
) }) });
|
|
1757
|
+
}
|
|
1758
|
+
function TextInput({
|
|
1759
|
+
value,
|
|
1760
|
+
onChange,
|
|
1761
|
+
disabled,
|
|
1762
|
+
label,
|
|
1763
|
+
htmlFor,
|
|
1764
|
+
placeholder,
|
|
1765
|
+
name,
|
|
1766
|
+
inputStyle,
|
|
1767
|
+
style,
|
|
1768
|
+
layout,
|
|
1769
|
+
onBlur,
|
|
1770
|
+
errorMessage,
|
|
1771
|
+
labelColor
|
|
1772
|
+
}) {
|
|
1773
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col items-center justify-center", children: [
|
|
1774
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1775
|
+
"div",
|
|
1776
|
+
{
|
|
1777
|
+
className: `flex ${layout === "vertical" ? "flex-col" : "flex-row items-center gap-2"}`,
|
|
1778
|
+
style: style ?? {},
|
|
1779
|
+
children: [
|
|
1780
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1781
|
+
"label",
|
|
1782
|
+
{
|
|
1783
|
+
style: { color: labelColor || void 0 },
|
|
1784
|
+
className: `text-md font-bold ml-1 max-content ${!labelColor && "text-prussian-blue dark:text-white"}`,
|
|
1785
|
+
htmlFor,
|
|
1786
|
+
children: label
|
|
1787
|
+
}
|
|
1788
|
+
),
|
|
1789
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1790
|
+
"input",
|
|
1791
|
+
{
|
|
1792
|
+
autoComplete: "off",
|
|
1793
|
+
disabled,
|
|
1794
|
+
value,
|
|
1795
|
+
onChange,
|
|
1796
|
+
onBlur,
|
|
1797
|
+
type: "text",
|
|
1798
|
+
name,
|
|
1799
|
+
id: htmlFor,
|
|
1800
|
+
className: `${errorMessage !== void 0 ? "border border-error" : ""} focus:outline-oxford-blue-700-opaque p-2 h-9 w-60 outline-offset-2 text-prussian-blue mt-1 rounded-lg disabled:bg-disabled disabled:cursor-not-allowed transition-all`,
|
|
1801
|
+
style: inputStyle ?? {},
|
|
1802
|
+
placeholder: placeholder ?? ""
|
|
1803
|
+
}
|
|
1804
|
+
)
|
|
1805
|
+
]
|
|
1806
|
+
}
|
|
1807
|
+
),
|
|
1808
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-error dark:text-prussian-blue min-h-0", children: errorMessage })
|
|
1809
|
+
] });
|
|
1810
|
+
}
|
|
1811
|
+
function NumberInput({
|
|
1812
|
+
step = 1,
|
|
1813
|
+
value,
|
|
1814
|
+
onChange,
|
|
1815
|
+
label,
|
|
1816
|
+
htmlFor,
|
|
1817
|
+
name,
|
|
1818
|
+
disabled,
|
|
1819
|
+
layout,
|
|
1820
|
+
errorMessage,
|
|
1821
|
+
inputStyle,
|
|
1822
|
+
labelStyle,
|
|
1823
|
+
placeholder,
|
|
1824
|
+
style = {},
|
|
1825
|
+
min,
|
|
1826
|
+
max,
|
|
1827
|
+
readOnly = false
|
|
1828
|
+
}) {
|
|
1829
|
+
const onIncrement = () => {
|
|
1830
|
+
let newValue = value ? parseFloat(value) + step : 0 + step;
|
|
1831
|
+
if (max !== void 0 && newValue > max) return;
|
|
1832
|
+
onChange?.({ target: { value: newValue, id: htmlFor, name } });
|
|
1833
|
+
};
|
|
1834
|
+
const onDecrement = () => {
|
|
1835
|
+
let newValue = value ? parseFloat(value) - step : 0 - step;
|
|
1836
|
+
if (min !== void 0 && newValue < min) return;
|
|
1837
|
+
onChange?.({ target: { value: newValue, id: htmlFor, name } });
|
|
1838
|
+
};
|
|
1839
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1840
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between pr-1 pl-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1841
|
+
"div",
|
|
1842
|
+
{
|
|
1843
|
+
className: `flex ${layout === "vertical" ? "flex-col" : "flex-row items-center gap-2"}`,
|
|
1844
|
+
children: [
|
|
1845
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1846
|
+
"label",
|
|
1847
|
+
{
|
|
1848
|
+
className: "text-md font-bold ml-1 w-60 select-none text-prussian-blue dark:text-white",
|
|
1849
|
+
style: labelStyle,
|
|
1850
|
+
htmlFor,
|
|
1851
|
+
children: label
|
|
1852
|
+
}
|
|
1853
|
+
),
|
|
1854
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1855
|
+
"div",
|
|
1856
|
+
{
|
|
1857
|
+
style,
|
|
1858
|
+
className: `${disabled ? "bg-disabled" : "bg-white"} rounded-lg flex items-center pr-1 pl-2 w-max`,
|
|
1859
|
+
children: [
|
|
1860
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1861
|
+
"input",
|
|
1862
|
+
{
|
|
1863
|
+
min,
|
|
1864
|
+
max,
|
|
1865
|
+
autoComplete: "off",
|
|
1866
|
+
disabled,
|
|
1867
|
+
name,
|
|
1868
|
+
id: htmlFor,
|
|
1869
|
+
step,
|
|
1870
|
+
value,
|
|
1871
|
+
onChange,
|
|
1872
|
+
type: "number",
|
|
1873
|
+
className: "focus:outline-0 focus-visible:outline-0 h-9 w-60 text-prussian-blue disabled:bg-disabled disabled:cursor-not-allowed transition-all",
|
|
1874
|
+
style: inputStyle ?? {},
|
|
1875
|
+
placeholder: placeholder ?? "",
|
|
1876
|
+
readOnly
|
|
1877
|
+
}
|
|
1878
|
+
),
|
|
1879
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
1880
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1881
|
+
"span",
|
|
1882
|
+
{
|
|
1883
|
+
onClick: onIncrement,
|
|
1884
|
+
className: "rotate-180 cursor-pointer transition-all duration-300 hover:bg-ice rounded-sm",
|
|
1885
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-3 w-3", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) })
|
|
1886
|
+
}
|
|
1887
|
+
),
|
|
1888
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1889
|
+
"span",
|
|
1890
|
+
{
|
|
1891
|
+
onClick: onDecrement,
|
|
1892
|
+
className: "cursor-pointer transition-all duration-300 hover:bg-ice rounded-sm",
|
|
1893
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-3 w-3", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) })
|
|
1894
|
+
}
|
|
1895
|
+
)
|
|
1896
|
+
] })
|
|
1897
|
+
]
|
|
1898
|
+
}
|
|
1899
|
+
)
|
|
1900
|
+
]
|
|
1901
|
+
}
|
|
1902
|
+
) }),
|
|
1903
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-error min-h-0", children: errorMessage })
|
|
1904
|
+
] });
|
|
1905
|
+
}
|
|
1906
|
+
function Password({
|
|
1907
|
+
value,
|
|
1908
|
+
onChange,
|
|
1909
|
+
disabled,
|
|
1910
|
+
label,
|
|
1911
|
+
htmlFor,
|
|
1912
|
+
placeholder,
|
|
1913
|
+
name,
|
|
1914
|
+
inputStyle,
|
|
1915
|
+
style,
|
|
1916
|
+
layout,
|
|
1917
|
+
onBlur,
|
|
1918
|
+
errorMessage,
|
|
1919
|
+
labelColor,
|
|
1920
|
+
iconColor
|
|
1921
|
+
}) {
|
|
1922
|
+
const [passwordVisible, setPasswordVisible] = React9.useState(false);
|
|
1923
|
+
const color = iconColor ?? colors_default.PALETTE["prussian-blue"];
|
|
1924
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col items-center justify-center", style: style ?? {}, children: [
|
|
1925
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex ${layout === "vertical" ? "flex-col" : "flex-row items-center gap-2"}`, children: [
|
|
1926
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1927
|
+
"label",
|
|
1928
|
+
{
|
|
1929
|
+
style: { color: labelColor || void 0 },
|
|
1930
|
+
className: `text-md font-bold ml-1 max-content ${!labelColor && "text-prussian-blue dark:text-white"}`,
|
|
1931
|
+
htmlFor,
|
|
1932
|
+
children: label
|
|
1933
|
+
}
|
|
1934
|
+
),
|
|
1935
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1936
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1937
|
+
"input",
|
|
1938
|
+
{
|
|
1939
|
+
autoComplete: "off",
|
|
1940
|
+
disabled,
|
|
1941
|
+
value,
|
|
1942
|
+
onChange,
|
|
1943
|
+
onBlur,
|
|
1944
|
+
type: passwordVisible ? "text" : "password",
|
|
1945
|
+
name,
|
|
1946
|
+
id: htmlFor,
|
|
1947
|
+
className: `${errorMessage !== void 0 ? "border border-error" : ""} focus:outline-oxford-blue-700-opaque p-2 h-9 w-52 outline-offset-2 text-prussian-blue mt-1 rounded-lg disabled:bg-disabled disabled:cursor-not-allowed transition-all`,
|
|
1948
|
+
style: inputStyle ?? {},
|
|
1949
|
+
placeholder: placeholder ?? ""
|
|
1950
|
+
}
|
|
1951
|
+
),
|
|
1952
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1953
|
+
"button",
|
|
1954
|
+
{
|
|
1955
|
+
type: "button",
|
|
1956
|
+
className: "cursor-pointer p-1",
|
|
1957
|
+
onClick: () => setPasswordVisible(!passwordVisible),
|
|
1958
|
+
"aria-label": passwordVisible ? "Hide password" : "Show password",
|
|
1959
|
+
children: passwordVisible ? (
|
|
1960
|
+
/* EyeSlash */
|
|
1961
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: color, className: "w-6 h-6", children: [
|
|
1962
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.53 2.47a.75.75 0 00-1.06 1.06l18 18a.75.75 0 101.06-1.06l-18-18zM22.676 12.553a11.249 11.249 0 01-2.631 4.31l-3.099-3.099a5.25 5.25 0 00-6.71-6.71L7.759 4.577a11.217 11.217 0 014.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113z" }),
|
|
1963
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0115.75 12zM12.53 15.713l-4.243-4.244a3.75 3.75 0 004.243 4.243z" }),
|
|
1964
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 00-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 016.75 12z" })
|
|
1965
|
+
] })
|
|
1966
|
+
) : (
|
|
1967
|
+
/* Eye */
|
|
1968
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: color, className: "w-6 h-6", children: [
|
|
1969
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 15a3 3 0 100-6 3 3 0 000 6z" }),
|
|
1970
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z", clipRule: "evenodd" })
|
|
1971
|
+
] })
|
|
1972
|
+
)
|
|
1973
|
+
}
|
|
1974
|
+
)
|
|
1975
|
+
] })
|
|
1976
|
+
] }),
|
|
1977
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-error dark:text-prussian-blue min-h-0", children: errorMessage })
|
|
1978
|
+
] });
|
|
1979
|
+
}
|
|
1980
|
+
function Checkbox({
|
|
1981
|
+
layout = "vertical",
|
|
1982
|
+
labelPosition = "left",
|
|
1983
|
+
label,
|
|
1984
|
+
name,
|
|
1985
|
+
htmlFor,
|
|
1986
|
+
errorMessage,
|
|
1987
|
+
value = false,
|
|
1988
|
+
onChange
|
|
1989
|
+
}) {
|
|
1990
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-2", children: [
|
|
1991
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1992
|
+
"div",
|
|
1993
|
+
{
|
|
1994
|
+
className: `flex ${layout === "vertical" ? "flex-col" : labelPosition === "left" ? "flex-row" : "flex-row-reverse"} gap-2`,
|
|
1995
|
+
children: [
|
|
1996
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1997
|
+
"label",
|
|
1998
|
+
{
|
|
1999
|
+
htmlFor,
|
|
2000
|
+
className: "font-bold text-md text-prussian-blue dark:text-white cursor-pointer",
|
|
2001
|
+
children: label
|
|
2002
|
+
}
|
|
2003
|
+
),
|
|
2004
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2005
|
+
CheckboxPrimitive__namespace.Root,
|
|
2006
|
+
{
|
|
2007
|
+
id: htmlFor,
|
|
2008
|
+
name,
|
|
2009
|
+
checked: value,
|
|
2010
|
+
onCheckedChange: (checked) => onChange?.({
|
|
2011
|
+
target: { value: !!checked, id: htmlFor, name }
|
|
2012
|
+
}),
|
|
2013
|
+
className: "border-2 border-prussian-blue dark:border-independence rounded-md w-6 h-6 flex items-center justify-center cursor-pointer transition-colors duration-150 data-[state=checked]:bg-prussian-blue dark:data-[state=checked]:bg-independence focus:outline-none focus-visible:ring-2 focus-visible:ring-usafa-blue",
|
|
2014
|
+
"aria-label": typeof label === "string" ? label : void 0,
|
|
2015
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { className: "transition-transform duration-150 scale-100", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2016
|
+
"path",
|
|
2017
|
+
{
|
|
2018
|
+
d: "M4 10l4.5 4.5L16 6",
|
|
2019
|
+
stroke: "#fff",
|
|
2020
|
+
strokeWidth: "2",
|
|
2021
|
+
strokeLinecap: "round",
|
|
2022
|
+
strokeLinejoin: "round"
|
|
2023
|
+
}
|
|
2024
|
+
) }) })
|
|
2025
|
+
}
|
|
2026
|
+
)
|
|
2027
|
+
]
|
|
2028
|
+
}
|
|
2029
|
+
),
|
|
2030
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-error text-center", children: errorMessage })
|
|
2031
|
+
] });
|
|
2032
|
+
}
|
|
2033
|
+
function Switch2({
|
|
2034
|
+
checked = false,
|
|
2035
|
+
onChange,
|
|
2036
|
+
checkedIcon,
|
|
2037
|
+
uncheckedIcon
|
|
2038
|
+
}) {
|
|
2039
|
+
const id = React9.useId();
|
|
2040
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className: "flex items-center cursor-pointer mr-12 select-none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2041
|
+
SwitchPrimitive__namespace.Root,
|
|
2042
|
+
{
|
|
2043
|
+
id,
|
|
2044
|
+
checked,
|
|
2045
|
+
onCheckedChange: (c) => onChange?.({ target: { checked: c } }),
|
|
2046
|
+
className: "relative inline-flex h-6 w-14 items-center rounded-full bg-prussian-blue dark:bg-white transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-usafa-blue",
|
|
2047
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2048
|
+
SwitchPrimitive__namespace.Thumb,
|
|
2049
|
+
{
|
|
2050
|
+
className: "pointer-events-none inline-flex h-8 w-8 items-center justify-center rounded-full bg-independence dark:bg-prussian-blue shadow transition-transform duration-200 data-[state=checked]:translate-x-[22px] data-[state=unchecked]:translate-x-[-4px]",
|
|
2051
|
+
children: checkedIcon && uncheckedIcon ? checked ? checkedIcon : uncheckedIcon : null
|
|
2052
|
+
}
|
|
2053
|
+
)
|
|
2054
|
+
}
|
|
2055
|
+
) }) });
|
|
2056
|
+
}
|
|
2057
|
+
function AutoComplete({
|
|
2058
|
+
disabled,
|
|
2059
|
+
label,
|
|
2060
|
+
placeholder,
|
|
2061
|
+
name,
|
|
2062
|
+
inputStyle,
|
|
2063
|
+
style,
|
|
2064
|
+
layout = "vertical",
|
|
2065
|
+
items = [],
|
|
2066
|
+
onItemClick,
|
|
2067
|
+
emptyText = "No results found"
|
|
2068
|
+
}) {
|
|
2069
|
+
const [term, setTerm] = React9.useState("");
|
|
2070
|
+
const [open, setOpen] = React9.useState(false);
|
|
2071
|
+
const foundItems = term.trim() ? items.filter(
|
|
2072
|
+
({ key, label: label2 }) => label2.toLowerCase().includes(term.toLowerCase()) || key.toLowerCase().includes(term.toLowerCase())
|
|
2073
|
+
) : [];
|
|
2074
|
+
const handleSelect = (item) => {
|
|
2075
|
+
setTerm(`${item.label} (${item.value})`);
|
|
2076
|
+
onItemClick?.(item.value);
|
|
2077
|
+
setOpen(false);
|
|
2078
|
+
};
|
|
2079
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex flex-col items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2080
|
+
"div",
|
|
2081
|
+
{
|
|
2082
|
+
className: `flex ${layout === "vertical" ? "flex-col" : "flex-row items-center gap-2"}`,
|
|
2083
|
+
style: style ?? {},
|
|
2084
|
+
children: [
|
|
2085
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-lg font-bold ml-1 max-content text-prussian-blue dark:text-white", children: label }),
|
|
2086
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover__namespace.Root, { open: open && !disabled, onOpenChange: (o) => !disabled && setOpen(o), children: [
|
|
2087
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Anchor, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white flex items-center gap-1 rounded-lg pr-2", children: [
|
|
2088
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2089
|
+
"input",
|
|
2090
|
+
{
|
|
2091
|
+
disabled,
|
|
2092
|
+
value: term,
|
|
2093
|
+
onChange: (e) => {
|
|
2094
|
+
setTerm(e.target.value);
|
|
2095
|
+
setOpen(true);
|
|
2096
|
+
},
|
|
2097
|
+
onFocus: () => setOpen(true),
|
|
2098
|
+
type: "text",
|
|
2099
|
+
name,
|
|
2100
|
+
className: "focus:outline-none pl-2 h-9 w-56 outline-offset-2 text-prussian-blue mt-1 rounded-lg disabled:bg-disabled disabled:cursor-not-allowed",
|
|
2101
|
+
style: inputStyle ?? {},
|
|
2102
|
+
placeholder: placeholder ?? "",
|
|
2103
|
+
autoComplete: "off",
|
|
2104
|
+
"aria-haspopup": "listbox",
|
|
2105
|
+
"aria-expanded": open,
|
|
2106
|
+
"aria-autocomplete": "list"
|
|
2107
|
+
}
|
|
2108
|
+
),
|
|
2109
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: colors_default.PALETTE["prussian-blue"], className: "w-5 h-5 flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M10.5 3.75a6.75 6.75 0 100 13.5 6.75 6.75 0 000-13.5zM2.25 10.5a8.25 8.25 0 1114.59 5.28l4.69 4.69a.75.75 0 11-1.06 1.06l-4.69-4.69A8.25 8.25 0 012.25 10.5z", clipRule: "evenodd" }) })
|
|
2110
|
+
] }) }),
|
|
2111
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2112
|
+
Popover__namespace.Content,
|
|
2113
|
+
{
|
|
2114
|
+
align: "start",
|
|
2115
|
+
sideOffset: 4,
|
|
2116
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
2117
|
+
className: "w-64 bg-ice dark:bg-midnight-green-eagle-900 rounded-lg mt-1 shadow-md z-50 overflow-y-auto max-h-36 animate-in fade-in-0 zoom-in-95",
|
|
2118
|
+
children: foundItems.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full w-full flex flex-col items-center justify-center py-4 text-sm text-prussian-blue dark:text-white", children: emptyText }) : /* @__PURE__ */ jsxRuntime.jsx("div", { role: "listbox", children: foundItems.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2119
|
+
"div",
|
|
2120
|
+
{
|
|
2121
|
+
role: "option",
|
|
2122
|
+
className: "text-sm flex items-center gap-2 p-2 transition-all duration-150 hover:bg-ice-dark dark:hover:bg-prussian-blue cursor-pointer text-prussian-blue dark:text-white",
|
|
2123
|
+
onClick: () => handleSelect(item),
|
|
2124
|
+
children: [
|
|
2125
|
+
item.icon,
|
|
2126
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
2127
|
+
item.label,
|
|
2128
|
+
" (",
|
|
2129
|
+
item.value,
|
|
2130
|
+
")"
|
|
2131
|
+
] })
|
|
2132
|
+
]
|
|
2133
|
+
},
|
|
2134
|
+
item.key
|
|
2135
|
+
)) })
|
|
2136
|
+
}
|
|
2137
|
+
) })
|
|
2138
|
+
] })
|
|
2139
|
+
]
|
|
2140
|
+
}
|
|
2141
|
+
) });
|
|
2142
|
+
}
|
|
2143
|
+
function TreeSelect({
|
|
2144
|
+
label,
|
|
2145
|
+
name,
|
|
2146
|
+
value,
|
|
2147
|
+
onChange,
|
|
2148
|
+
disabled,
|
|
2149
|
+
layout = "horizontal",
|
|
2150
|
+
errorMessage,
|
|
2151
|
+
style = {},
|
|
2152
|
+
htmlFor,
|
|
2153
|
+
items = []
|
|
2154
|
+
}) {
|
|
2155
|
+
const [open, setOpen] = React9.useState(false);
|
|
2156
|
+
const [hoveredItem, setHoveredItem] = React9.useState(null);
|
|
2157
|
+
const [innerItems, setInnerItems] = React9.useState([]);
|
|
2158
|
+
React9.useEffect(() => {
|
|
2159
|
+
setInnerItems(items);
|
|
2160
|
+
}, [items]);
|
|
2161
|
+
const selectItem = (key) => {
|
|
2162
|
+
onChange?.({ target: { value: key, id: htmlFor, name } });
|
|
2163
|
+
setOpen(false);
|
|
2164
|
+
};
|
|
2165
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2", children: [
|
|
2166
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2167
|
+
"div",
|
|
2168
|
+
{
|
|
2169
|
+
className: `flex ${layout === "vertical" ? "flex-col" : "flex-row items-center gap-2"}`,
|
|
2170
|
+
children: [
|
|
2171
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2172
|
+
"label",
|
|
2173
|
+
{
|
|
2174
|
+
className: "text-md font-bold ml-1 max-content select-none text-prussian-blue dark:text-white",
|
|
2175
|
+
htmlFor,
|
|
2176
|
+
children: label
|
|
2177
|
+
}
|
|
2178
|
+
),
|
|
2179
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover__namespace.Root, { open: open && !disabled, onOpenChange: (o) => !disabled && setOpen(o), children: [
|
|
2180
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2181
|
+
"div",
|
|
2182
|
+
{
|
|
2183
|
+
id: htmlFor,
|
|
2184
|
+
style,
|
|
2185
|
+
role: "combobox",
|
|
2186
|
+
"aria-expanded": open,
|
|
2187
|
+
"aria-haspopup": "listbox",
|
|
2188
|
+
className: `flex items-center justify-between relative h-9 rounded-lg p-2 cursor-pointer ${disabled ? "cursor-not-allowed bg-disabled" : "bg-white"}`,
|
|
2189
|
+
tabIndex: disabled ? -1 : 0,
|
|
2190
|
+
children: [
|
|
2191
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-7 ${!style?.width ? "min-w-[240px]" : ""} focus:outline-none text-prussian-blue flex items-center gap-1`, children: Array.isArray(value) ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2192
|
+
value.slice(0, 1).map((val, id) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2193
|
+
DropdownPill,
|
|
2194
|
+
{
|
|
2195
|
+
hasSiblings: value.length > 1,
|
|
2196
|
+
value: innerItems.find((it) => it.key === val)?.label
|
|
2197
|
+
},
|
|
2198
|
+
id
|
|
2199
|
+
)),
|
|
2200
|
+
value.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(DropdownPill, { value: `+${value.length - 1} more` })
|
|
2201
|
+
] }) : value != null ? /* @__PURE__ */ jsxRuntime.jsx(DropdownPill, { value: innerItems.find((it) => it.key === value)?.label }) : null }),
|
|
2202
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `transition-transform duration-300 ml-2 ${open ? "rotate-180" : "rotate-0"}`, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
2203
|
+
]
|
|
2204
|
+
}
|
|
2205
|
+
) }),
|
|
2206
|
+
/* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2207
|
+
Popover__namespace.Content,
|
|
2208
|
+
{
|
|
2209
|
+
align: "start",
|
|
2210
|
+
sideOffset: 4,
|
|
2211
|
+
style: { width: style?.width || 240 },
|
|
2212
|
+
className: "bg-ice rounded-lg shadow-md z-50 p-2 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
2213
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { role: "listbox", className: "max-h-40 overflow-y-auto", children: innerItems.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2214
|
+
"div",
|
|
2215
|
+
{
|
|
2216
|
+
role: "option",
|
|
2217
|
+
"aria-selected": value === item.key,
|
|
2218
|
+
"aria-rowindex": idx,
|
|
2219
|
+
className: `flex items-center justify-between p-2 hover:bg-prussian-blue hover:text-white transition-all duration-150 text-sm text-prussian-blue rounded-lg cursor-pointer`,
|
|
2220
|
+
onClick: () => selectItem(item.key),
|
|
2221
|
+
onMouseEnter: () => setHoveredItem(item.key),
|
|
2222
|
+
onMouseLeave: () => setHoveredItem(null),
|
|
2223
|
+
children: [
|
|
2224
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs", children: [
|
|
2225
|
+
item.icon && /* @__PURE__ */ jsxRuntime.jsx("div", { children: item.icon }),
|
|
2226
|
+
item.label
|
|
2227
|
+
] }),
|
|
2228
|
+
value === item.key && /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2229
|
+
"path",
|
|
2230
|
+
{
|
|
2231
|
+
d: "M4 10l4.5 4.5L16 6",
|
|
2232
|
+
stroke: hoveredItem === item.key ? "#fff" : colors_default.PALETTE["prussian-blue"],
|
|
2233
|
+
strokeWidth: "2",
|
|
2234
|
+
strokeLinecap: "round",
|
|
2235
|
+
strokeLinejoin: "round"
|
|
2236
|
+
}
|
|
2237
|
+
) })
|
|
2238
|
+
]
|
|
2239
|
+
},
|
|
2240
|
+
item.key
|
|
2241
|
+
)) })
|
|
2242
|
+
}
|
|
2243
|
+
) })
|
|
2244
|
+
] })
|
|
2245
|
+
]
|
|
2246
|
+
}
|
|
2247
|
+
),
|
|
2248
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-error dark:text-prussian-blue min-h-0", children: errorMessage })
|
|
2249
|
+
] });
|
|
2250
|
+
}
|
|
2251
|
+
function FileInput({
|
|
2252
|
+
allowMultiple = false,
|
|
2253
|
+
onChange,
|
|
2254
|
+
name,
|
|
2255
|
+
accept = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,.xlsx"
|
|
2256
|
+
}) {
|
|
2257
|
+
const fileInput = React9.useRef(null);
|
|
2258
|
+
const [files, setFiles] = React9.useState([]);
|
|
2259
|
+
const openPicker = () => {
|
|
2260
|
+
fileInput.current?.dispatchEvent(new MouseEvent("click", { bubbles: false }));
|
|
2261
|
+
};
|
|
2262
|
+
const handleFiles = (list) => {
|
|
2263
|
+
setFiles(list);
|
|
2264
|
+
onChange?.({ target: { files: list } });
|
|
2265
|
+
};
|
|
2266
|
+
const onDrop = (e) => {
|
|
2267
|
+
e.preventDefault();
|
|
2268
|
+
const fileList = [];
|
|
2269
|
+
if (e.dataTransfer.items) {
|
|
2270
|
+
for (let i = 0; i < e.dataTransfer.items.length; i++) {
|
|
2271
|
+
if (e.dataTransfer.items[i].kind === "file") {
|
|
2272
|
+
const f = e.dataTransfer.items[i].getAsFile();
|
|
2273
|
+
if (f) fileList.push(f);
|
|
2274
|
+
}
|
|
2275
|
+
}
|
|
2276
|
+
} else {
|
|
2277
|
+
for (let i = 0; i < e.dataTransfer.files.length; i++) {
|
|
2278
|
+
fileList.push(e.dataTransfer.files[i]);
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
handleFiles(fileList);
|
|
2282
|
+
};
|
|
2283
|
+
const localOnChange = (e) => {
|
|
2284
|
+
handleFiles(Array.from(e.target.files ?? []));
|
|
2285
|
+
};
|
|
2286
|
+
const removeFile = (e) => {
|
|
2287
|
+
e.stopPropagation();
|
|
2288
|
+
setFiles([]);
|
|
2289
|
+
onChange?.({ target: { files: [], name, id: name, value: "" } });
|
|
2290
|
+
if (fileInput.current) fileInput.current.value = "";
|
|
2291
|
+
};
|
|
2292
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2293
|
+
"div",
|
|
2294
|
+
{
|
|
2295
|
+
onClick: openPicker,
|
|
2296
|
+
className: "border-2 hover:border-prussian-blue border-ice-dark w-full h-full rounded-md transition-all duration-300 border-dashed dark:border-independence hover:dark:border-ice-dark cursor-pointer",
|
|
2297
|
+
onDragOver: (e) => e.preventDefault(),
|
|
2298
|
+
onDrop,
|
|
2299
|
+
children: [
|
|
2300
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2301
|
+
"input",
|
|
2302
|
+
{
|
|
2303
|
+
id: name,
|
|
2304
|
+
name,
|
|
2305
|
+
onChange: localOnChange,
|
|
2306
|
+
ref: fileInput,
|
|
2307
|
+
hidden: true,
|
|
2308
|
+
type: "file",
|
|
2309
|
+
accept,
|
|
2310
|
+
multiple: allowMultiple
|
|
2311
|
+
}
|
|
2312
|
+
),
|
|
2313
|
+
files.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full items-center justify-center gap-2", children: [
|
|
2314
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: colors_default.PALETTE["prussian-blue"], className: "w-16 h-16 dark:fill-white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M11.47 2.47a.75.75 0 011.06 0l4.5 4.5a.75.75 0 01-1.06 1.06l-3.22-3.22V16.5a.75.75 0 01-1.5 0V4.81L8.03 8.03a.75.75 0 01-1.06-1.06l4.5-4.5zM3 15.75a.75.75 0 01.75.75v2.25a1.5 1.5 0 001.5 1.5h13.5a1.5 1.5 0 001.5-1.5V16.5a.75.75 0 011.5 0v2.25a3 3 0 01-3 3H5.25a3 3 0 01-3-3V16.5a.75.75 0 01.75-.75z", clipRule: "evenodd" }) }),
|
|
2315
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-prussian-blue dark:text-white text-sm", children: "Click or Drop a file" })
|
|
2316
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3 items-center justify-center w-full h-full", children: files.map((file, id) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2317
|
+
"div",
|
|
2318
|
+
{
|
|
2319
|
+
className: "text-xs flex flex-col items-center w-20 h-24 text-center bg-ice-dark p-4 dark:bg-independence rounded-md relative",
|
|
2320
|
+
children: [
|
|
2321
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2322
|
+
"button",
|
|
2323
|
+
{
|
|
2324
|
+
type: "button",
|
|
2325
|
+
onClick: removeFile,
|
|
2326
|
+
className: "bg-error rounded-full w-4 h-4 absolute right-[-5px] top-[-5px] cursor-pointer flex items-center justify-center",
|
|
2327
|
+
"aria-label": "Remove file",
|
|
2328
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "10", height: "10", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 5L5 15M5 5l10 10", stroke: "#fff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
2329
|
+
}
|
|
2330
|
+
),
|
|
2331
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: colors_default.PALETTE["prussian-blue"], className: "w-10 h-10 dark:fill-white", children: [
|
|
2332
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0016.5 9h-1.875a1.875 1.875 0 01-1.875-1.875V5.25A3.75 3.75 0 009 1.5H5.625z", clipRule: "evenodd" }),
|
|
2333
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12.971 1.816A5.23 5.23 0 0114.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 013.434 1.279 9.768 9.768 0 00-6.963-6.963z" })
|
|
2334
|
+
] }),
|
|
2335
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-ellipsis whitespace-nowrap overflow-hidden w-full text-prussian-blue dark:text-white", children: file.name })
|
|
2336
|
+
]
|
|
2337
|
+
},
|
|
2338
|
+
`${id}${file.name}`
|
|
2339
|
+
)) })
|
|
2340
|
+
]
|
|
2341
|
+
}
|
|
2342
|
+
);
|
|
2343
|
+
}
|
|
2344
|
+
var MONTHS = {
|
|
2345
|
+
1: "January",
|
|
2346
|
+
2: "February",
|
|
2347
|
+
3: "March",
|
|
2348
|
+
4: "April",
|
|
2349
|
+
5: "May",
|
|
2350
|
+
6: "June",
|
|
2351
|
+
7: "July",
|
|
2352
|
+
8: "August",
|
|
2353
|
+
9: "September",
|
|
2354
|
+
10: "October",
|
|
2355
|
+
11: "November",
|
|
2356
|
+
12: "December"
|
|
2357
|
+
};
|
|
2358
|
+
var DAYS = { 0: "Sun", 1: "Mon", 2: "Tue", 3: "Wed", 4: "Thu", 5: "Fri", 6: "Sat" };
|
|
2359
|
+
function formatDate(date) {
|
|
2360
|
+
const fmt = new Intl.DateTimeFormat("en-GB", { year: "numeric", month: "numeric", day: "numeric" });
|
|
2361
|
+
const parts = fmt.formatToParts(date);
|
|
2362
|
+
const d = parts.find((x) => x.type === "day").value;
|
|
2363
|
+
const m = parts.find((x) => x.type === "month").value;
|
|
2364
|
+
const y = parts.find((x) => x.type === "year").value;
|
|
2365
|
+
return `${y}-${m}-${d}`;
|
|
2366
|
+
}
|
|
2367
|
+
function getMonthDays(year, month) {
|
|
2368
|
+
const days = [];
|
|
2369
|
+
for (let i = 1; i <= 31; i++) {
|
|
2370
|
+
const d = new Date(year, month - 1, i);
|
|
2371
|
+
if (d.getMonth() + 1 > month) break;
|
|
2372
|
+
days.push(d);
|
|
2373
|
+
}
|
|
2374
|
+
return days;
|
|
2375
|
+
}
|
|
2376
|
+
var ChevronRight2 = ({ color = colors_default.PALETTE["prussian-blue"] }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) });
|
|
2377
|
+
var DoubleChevronRight2 = ({ color = colors_default.PALETTE["prussian-blue"] }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 5l7 7-7 7M5 5l7 7-7 7" }) });
|
|
2378
|
+
var ChevronDown2 = ({ color = colors_default.PALETTE["prussian-blue"] }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) });
|
|
2379
|
+
function DatePickerBase({
|
|
2380
|
+
value,
|
|
2381
|
+
onChange,
|
|
2382
|
+
layout,
|
|
2383
|
+
label,
|
|
2384
|
+
htmlFor,
|
|
2385
|
+
name,
|
|
2386
|
+
style = {},
|
|
2387
|
+
errorMessage,
|
|
2388
|
+
disableBefore,
|
|
2389
|
+
disableAfter,
|
|
2390
|
+
disabled
|
|
2391
|
+
}) {
|
|
2392
|
+
const pickerRef = React9.useRef(null);
|
|
2393
|
+
const calendarRef = React9.useRef(null);
|
|
2394
|
+
const [isExpanded, setExpanded] = React9.useState(false);
|
|
2395
|
+
const [isCloseToBottom, setCloseToBottom] = React9.useState(false);
|
|
2396
|
+
const [currentYear, setCurrentYear] = React9.useState(value.getFullYear());
|
|
2397
|
+
const [currentMonth, setCurrentMonth] = React9.useState(value.getMonth() + 1);
|
|
2398
|
+
const toggle = () => {
|
|
2399
|
+
if (!disabled) setExpanded((p) => !p);
|
|
2400
|
+
};
|
|
2401
|
+
const toNextMonth = () => {
|
|
2402
|
+
if (currentMonth + 1 > 12) {
|
|
2403
|
+
setCurrentMonth(1);
|
|
2404
|
+
setCurrentYear((y) => y + 1);
|
|
2405
|
+
} else setCurrentMonth((m) => m + 1);
|
|
2406
|
+
};
|
|
2407
|
+
const toPrevMonth = () => {
|
|
2408
|
+
if (currentMonth - 1 === 0) {
|
|
2409
|
+
setCurrentMonth(12);
|
|
2410
|
+
setCurrentYear((y) => y - 1);
|
|
2411
|
+
} else setCurrentMonth((m) => m - 1);
|
|
2412
|
+
};
|
|
2413
|
+
const isToday = (d) => {
|
|
2414
|
+
const t = /* @__PURE__ */ new Date();
|
|
2415
|
+
return t.getDate() === d.getDate() && t.getMonth() === d.getMonth() && t.getFullYear() === d.getFullYear();
|
|
2416
|
+
};
|
|
2417
|
+
const isSelected = (d) => value.getDate() === d.getDate() && value.getMonth() === d.getMonth() && value.getFullYear() === d.getFullYear();
|
|
2418
|
+
const isDateDisabled = (d) => {
|
|
2419
|
+
if (disableBefore && d.getTime() < new Date(disableBefore).getTime()) return true;
|
|
2420
|
+
if (disableAfter && d.getTime() > new Date(disableAfter).getTime()) return true;
|
|
2421
|
+
return false;
|
|
2422
|
+
};
|
|
2423
|
+
const onDateClick = (d) => {
|
|
2424
|
+
const next = new Date(formatDate(d));
|
|
2425
|
+
onChange({ target: { value: next, id: htmlFor, name } });
|
|
2426
|
+
setExpanded(false);
|
|
2427
|
+
setCurrentYear(d.getFullYear());
|
|
2428
|
+
setCurrentMonth(d.getMonth() + 1);
|
|
2429
|
+
};
|
|
2430
|
+
const renderCalendar = () => {
|
|
2431
|
+
const days = getMonthDays(currentYear, currentMonth);
|
|
2432
|
+
const firstDay = days[0].getDay();
|
|
2433
|
+
const cols = [[], [], [], [], [], [], []];
|
|
2434
|
+
days.forEach((d) => cols[d.getDay()].push(d));
|
|
2435
|
+
let ordered = [...cols];
|
|
2436
|
+
if (firstDay > 0) {
|
|
2437
|
+
ordered = [...ordered.splice(firstDay), ...ordered];
|
|
2438
|
+
}
|
|
2439
|
+
return ordered;
|
|
2440
|
+
};
|
|
2441
|
+
React9.useEffect(() => {
|
|
2442
|
+
const clickAway = (e) => {
|
|
2443
|
+
if (pickerRef.current && !pickerRef.current.contains(e.target) && calendarRef.current && !calendarRef.current.contains(e.target)) setExpanded(false);
|
|
2444
|
+
};
|
|
2445
|
+
document.addEventListener("mousedown", clickAway);
|
|
2446
|
+
return () => document.removeEventListener("mousedown", clickAway);
|
|
2447
|
+
}, []);
|
|
2448
|
+
React9.useEffect(() => {
|
|
2449
|
+
const bbox = pickerRef.current?.getBoundingClientRect();
|
|
2450
|
+
if (bbox && (bbox.y > window.innerHeight - 220 || bbox.bottom > window.innerHeight - 400)) {
|
|
2451
|
+
setCloseToBottom(true);
|
|
2452
|
+
} else setCloseToBottom(false);
|
|
2453
|
+
}, []);
|
|
2454
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
|
|
2455
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex relative ${layout === "vertical" ? "flex-col" : "flex-row items-center gap-2"}`, children: [
|
|
2456
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-md font-bold ml-1 max-content text-prussian-blue dark:text-white", children: label }),
|
|
2457
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2458
|
+
"div",
|
|
2459
|
+
{
|
|
2460
|
+
style,
|
|
2461
|
+
ref: pickerRef,
|
|
2462
|
+
className: `flex items-center justify-between relative h-9 ${disabled ? "bg-disabled cursor-not-allowed" : "bg-white cursor-pointer"} rounded-lg p-2`,
|
|
2463
|
+
children: [
|
|
2464
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2465
|
+
"div",
|
|
2466
|
+
{
|
|
2467
|
+
onClick: toggle,
|
|
2468
|
+
className: `h-7 focus:outline-none text-prussian-blue ${disabled ? "cursor-not-allowed" : "cursor-pointer"} ${!style.width ? "min-w-[240px]" : ""} flex items-center gap-1`,
|
|
2469
|
+
children: formatDate(value)
|
|
2470
|
+
}
|
|
2471
|
+
),
|
|
2472
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2473
|
+
"div",
|
|
2474
|
+
{
|
|
2475
|
+
onClick: toggle,
|
|
2476
|
+
className: `transition-all duration-300 ml-2 ${isExpanded ? "rotate-180" : "rotate-0 w-4 h-4"}`,
|
|
2477
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDown2, {})
|
|
2478
|
+
}
|
|
2479
|
+
)
|
|
2480
|
+
]
|
|
2481
|
+
}
|
|
2482
|
+
),
|
|
2483
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2484
|
+
"div",
|
|
2485
|
+
{
|
|
2486
|
+
ref: calendarRef,
|
|
2487
|
+
className: `w-[280px] bg-ice absolute ${isCloseToBottom ? "bottom-[40px]" : "top-[60px]"} z-10 rounded-lg shadow-md transition-all duration-150 ${isExpanded ? "h-max scale-100" : "scale-0 pointer-events-none"}`,
|
|
2488
|
+
children: isExpanded && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-3", children: [
|
|
2489
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center mx-auto w-max", children: [
|
|
2490
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { onClick: () => setCurrentYear((y) => y - 1), className: "cursor-pointer rotate-180 p-1 rounded-lg hover:bg-ice-dark transition-all duration-300", children: /* @__PURE__ */ jsxRuntime.jsx(DoubleChevronRight2, {}) }),
|
|
2491
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { onClick: toPrevMonth, className: "cursor-pointer rotate-180 p-1 rounded-lg hover:bg-ice-dark transition-all duration-300", children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRight2, {}) }),
|
|
2492
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-bold text-prussian-blue select-none w-[130px] text-center", children: [
|
|
2493
|
+
currentYear,
|
|
2494
|
+
" ",
|
|
2495
|
+
MONTHS[currentMonth]
|
|
2496
|
+
] }),
|
|
2497
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { onClick: toNextMonth, className: "cursor-pointer p-1 rounded-lg hover:bg-ice-dark transition-all duration-300", children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRight2, {}) }),
|
|
2498
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { onClick: () => setCurrentYear((y) => y + 1), className: "cursor-pointer p-1 rounded-lg hover:bg-ice-dark transition-all duration-300", children: /* @__PURE__ */ jsxRuntime.jsx(DoubleChevronRight2, {}) })
|
|
2499
|
+
] }),
|
|
2500
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3 p-2", children: renderCalendar().map((weekDay, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
|
|
2501
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center font-bold text-sm text-prussian-blue", children: weekDay[0] ? DAYS[weekDay[0].getDay()] : "" }),
|
|
2502
|
+
weekDay.map((day) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2503
|
+
"div",
|
|
2504
|
+
{
|
|
2505
|
+
onClick: () => !isDateDisabled(day) && onDateClick(day),
|
|
2506
|
+
className: `cursor-pointer flex items-center justify-center text-prussian-blue rounded-md w-6 h-6 transition-all duration-300
|
|
2507
|
+
${isToday(day) ? "border border-prussian-blue" : ""}
|
|
2508
|
+
${isSelected(day) ? "bg-prussian-blue text-white" : ""}
|
|
2509
|
+
${!isSelected(day) ? "hover:bg-ice-dark" : ""}
|
|
2510
|
+
${isDateDisabled(day) ? "bg-ice-dark text-roman-silver cursor-not-allowed pointer-events-none" : ""}`,
|
|
2511
|
+
children: day.getDate()
|
|
2512
|
+
},
|
|
2513
|
+
day.getDate()
|
|
2514
|
+
))
|
|
2515
|
+
] }, index)) }),
|
|
2516
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pb-2 pr-2 flex items-center justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2517
|
+
Button,
|
|
2518
|
+
{
|
|
2519
|
+
onClick: () => onDateClick(/* @__PURE__ */ new Date()),
|
|
2520
|
+
content: "Today",
|
|
2521
|
+
style: { width: "max-content", padding: "0px 5px", margin: "0" }
|
|
2522
|
+
}
|
|
2523
|
+
) })
|
|
2524
|
+
] })
|
|
2525
|
+
}
|
|
2526
|
+
)
|
|
2527
|
+
] }),
|
|
2528
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-error dark:text-prussian-blue min-h-0", children: errorMessage })
|
|
2529
|
+
] });
|
|
2530
|
+
}
|
|
2531
|
+
function TemporalPickerBase({
|
|
2532
|
+
value,
|
|
2533
|
+
onChange,
|
|
2534
|
+
lowerLimit = 2e3,
|
|
2535
|
+
upperLimit = (/* @__PURE__ */ new Date()).getFullYear(),
|
|
2536
|
+
errorMessage,
|
|
2537
|
+
label,
|
|
2538
|
+
layout,
|
|
2539
|
+
style = {}
|
|
2540
|
+
}) {
|
|
2541
|
+
const pickerRef = React9.useRef(null);
|
|
2542
|
+
const calendarRef = React9.useRef(null);
|
|
2543
|
+
const valueRefs = React9.useRef([]);
|
|
2544
|
+
const [isExpanded, setExpanded] = React9.useState(false);
|
|
2545
|
+
const [isCloseToBottom, setCloseToBottom] = React9.useState(false);
|
|
2546
|
+
const innerValues = React9.useMemo(() => {
|
|
2547
|
+
const vals = [];
|
|
2548
|
+
for (let i = lowerLimit; i <= upperLimit; i++) vals.push(i);
|
|
2549
|
+
return vals;
|
|
2550
|
+
}, [lowerLimit, upperLimit]);
|
|
2551
|
+
React9.useEffect(() => {
|
|
2552
|
+
const clickAway = (e) => {
|
|
2553
|
+
if (pickerRef.current && !pickerRef.current.contains(e.target) && calendarRef.current && !calendarRef.current.contains(e.target)) setExpanded(false);
|
|
2554
|
+
};
|
|
2555
|
+
document.addEventListener("mousedown", clickAway);
|
|
2556
|
+
return () => document.removeEventListener("mousedown", clickAway);
|
|
2557
|
+
}, []);
|
|
2558
|
+
React9.useEffect(() => {
|
|
2559
|
+
const bbox = pickerRef.current?.getBoundingClientRect();
|
|
2560
|
+
if (bbox && bbox.y > window.innerHeight - 220) setCloseToBottom(true);
|
|
2561
|
+
else setCloseToBottom(false);
|
|
2562
|
+
}, []);
|
|
2563
|
+
React9.useEffect(() => {
|
|
2564
|
+
if (!isExpanded) return;
|
|
2565
|
+
const t = setTimeout(() => {
|
|
2566
|
+
const node = valueRefs.current.find((n) => n.value === value);
|
|
2567
|
+
node?.ref.scrollIntoView({ block: "end", inline: "nearest", behavior: "smooth" });
|
|
2568
|
+
}, 150);
|
|
2569
|
+
return () => clearTimeout(t);
|
|
2570
|
+
}, [isExpanded, value]);
|
|
2571
|
+
const navigate = (delta) => {
|
|
2572
|
+
const next = value + delta;
|
|
2573
|
+
if (next < lowerLimit || next > upperLimit) return;
|
|
2574
|
+
onChange({ target: { value: next } });
|
|
2575
|
+
const node = valueRefs.current.find((n) => n.value === next);
|
|
2576
|
+
node?.ref.scrollIntoView({ block: "end", inline: "nearest", behavior: "smooth" });
|
|
2577
|
+
};
|
|
2578
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2", children: [
|
|
2579
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex relative ${layout === "vertical" ? "flex-col" : "flex-row items-center gap-2"}`, children: [
|
|
2580
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-md font-bold ml-1 max-content text-prussian-blue dark:text-white", children: label }),
|
|
2581
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2582
|
+
"div",
|
|
2583
|
+
{
|
|
2584
|
+
style,
|
|
2585
|
+
ref: pickerRef,
|
|
2586
|
+
className: "flex items-center justify-between relative h-9 bg-white rounded-lg p-2 cursor-pointer",
|
|
2587
|
+
children: [
|
|
2588
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2589
|
+
"div",
|
|
2590
|
+
{
|
|
2591
|
+
onClick: () => setExpanded((p) => !p),
|
|
2592
|
+
className: `h-7 ${!style.width ? "min-w-[240px]" : ""} focus:outline-none text-prussian-blue cursor-pointer flex items-center gap-1`,
|
|
2593
|
+
children: innerValues.includes(value) ? value : "N/A"
|
|
2594
|
+
}
|
|
2595
|
+
),
|
|
2596
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { onClick: () => setExpanded((p) => !p), className: `transition-all duration-300 ml-2 ${isExpanded ? "rotate-180" : "rotate-0 w-4 h-4"}`, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDown2, {}) })
|
|
2597
|
+
]
|
|
2598
|
+
}
|
|
2599
|
+
),
|
|
2600
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2601
|
+
"div",
|
|
2602
|
+
{
|
|
2603
|
+
style: { width: style.width },
|
|
2604
|
+
ref: calendarRef,
|
|
2605
|
+
className: `${!style.width ? "w-[280px]" : ""} bg-ice absolute z-10 ${isCloseToBottom ? "bottom-[40px]" : "top-10"} rounded-lg shadow-md transition-all duration-150 right-0 overflow-hidden ${isExpanded ? "h-max scale-100" : "scale-0 pointer-events-none"}`,
|
|
2606
|
+
children: [
|
|
2607
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { onClick: () => navigate(-1), className: "flex items-center justify-center rotate-180 transition-all duration-300 hover:bg-ice-dark cursor-pointer rounded-br-lg rounded-bl-lg", children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDown2, {}) }),
|
|
2608
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 overflow-hidden", children: innerValues.map((val) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2609
|
+
"div",
|
|
2610
|
+
{
|
|
2611
|
+
ref: (ref) => {
|
|
2612
|
+
if (!valueRefs.current.find((n) => n.value === val) && ref)
|
|
2613
|
+
valueRefs.current.push({ value: val, ref });
|
|
2614
|
+
},
|
|
2615
|
+
className: "font-bold text-center text-lg",
|
|
2616
|
+
children: val
|
|
2617
|
+
},
|
|
2618
|
+
val
|
|
2619
|
+
)) }),
|
|
2620
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { onClick: () => navigate(1), className: "flex items-center justify-center transition-all hover:bg-ice-dark cursor-pointer rounded-br-lg rounded-bl-lg", children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDown2, {}) })
|
|
2621
|
+
]
|
|
2622
|
+
}
|
|
2623
|
+
)
|
|
2624
|
+
] }),
|
|
2625
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-error dark:text-prussian-blue min-h-0", children: errorMessage })
|
|
2626
|
+
] });
|
|
2627
|
+
}
|
|
2628
|
+
var Temporal = {};
|
|
2629
|
+
Temporal.DatePicker = DatePickerBase;
|
|
2630
|
+
Temporal.TemporalPicker = TemporalPickerBase;
|
|
2631
|
+
var DatePicker_default = Temporal;
|
|
2632
|
+
|
|
2633
|
+
exports.AutoComplete = AutoComplete;
|
|
2634
|
+
exports.Button = Button;
|
|
2635
|
+
exports.COLORS = colors_default;
|
|
2636
|
+
exports.Catalog = Catalog;
|
|
2637
|
+
exports.CatalogCarousel = CatalogCarousel;
|
|
2638
|
+
exports.CatalogGrid = CatalogGrid;
|
|
2639
|
+
exports.Checkbox = Checkbox;
|
|
2640
|
+
exports.ContextMenu = ContextMenu;
|
|
2641
|
+
exports.Drawer = Drawer;
|
|
2642
|
+
exports.Dropdown = Dropdown;
|
|
2643
|
+
exports.DropdownPill = DropdownPill;
|
|
2644
|
+
exports.FadingBase = FadingBase;
|
|
2645
|
+
exports.FileInput = FileInput;
|
|
2646
|
+
exports.GridCard = GridCard;
|
|
2647
|
+
exports.Icon = icons_default;
|
|
2648
|
+
exports.IconButton = IconButton;
|
|
2649
|
+
exports.List = List2;
|
|
2650
|
+
exports.LoadingSpinner = LoadingSpinner;
|
|
2651
|
+
exports.MenuBar = MenuBar;
|
|
2652
|
+
exports.MenuBarItem = MenuBarItem;
|
|
2653
|
+
exports.Modal = Modal;
|
|
2654
|
+
exports.NotificationProvider = NotificationProvider;
|
|
2655
|
+
exports.NumberInput = NumberInput;
|
|
2656
|
+
exports.OpaqueGridCard = OpaqueGridCard;
|
|
2657
|
+
exports.Password = Password;
|
|
2658
|
+
exports.ScalableContainer = ScalableContainer;
|
|
2659
|
+
exports.SearchInput = SearchInput_default;
|
|
2660
|
+
exports.Switch = Switch2;
|
|
2661
|
+
exports.Table = Table;
|
|
2662
|
+
exports.Tabs = Tabs;
|
|
2663
|
+
exports.Temporal = DatePicker_default;
|
|
2664
|
+
exports.TextInput = TextInput;
|
|
2665
|
+
exports.ThemeSwitch = Switch;
|
|
2666
|
+
exports.ToggleButton = ToggleButton;
|
|
2667
|
+
exports.Tooltip = Tooltip;
|
|
2668
|
+
exports.TooltipProvider = TooltipProvider;
|
|
2669
|
+
exports.Tree = Tree;
|
|
2670
|
+
exports.TreeSelect = TreeSelect;
|
|
2671
|
+
exports.Wizard = Wizard;
|
|
2672
|
+
exports.useNotification = useNotification;
|
|
2673
|
+
//# sourceMappingURL=index.cjs.map
|
|
2674
|
+
//# sourceMappingURL=index.cjs.map
|