@nswds/app 1.54.4 → 1.55.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/dist/globals.css +316 -4
- package/dist/index.cjs +793 -369
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +79 -6
- package/dist/index.d.ts +79 -6
- package/dist/index.js +656 -238
- package/dist/index.js.map +1 -1
- package/dist/styles.css +326 -4
- package/dist/styles.css.map +1 -1
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@ var classVarianceAuthority = require('class-variance-authority');
|
|
|
8
8
|
var AspectRatioPrimitive = require('@radix-ui/react-aspect-ratio');
|
|
9
9
|
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
10
10
|
var Headless4 = require('@headlessui/react');
|
|
11
|
-
var
|
|
11
|
+
var React18 = require('react');
|
|
12
12
|
var Link10 = require('next/link');
|
|
13
13
|
var culori = require('culori');
|
|
14
14
|
var reactSlot = require('@radix-ui/react-slot');
|
|
@@ -33,7 +33,7 @@ var sonner = require('sonner');
|
|
|
33
33
|
var LabelPrimitive = require('@radix-ui/react-label');
|
|
34
34
|
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
35
35
|
var lucideReact = require('lucide-react');
|
|
36
|
-
var
|
|
36
|
+
var TabsPrimitives = require('@radix-ui/react-tabs');
|
|
37
37
|
var CollapsiblePrimitive = require('@radix-ui/react-collapsible');
|
|
38
38
|
var cmdk = require('cmdk');
|
|
39
39
|
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
@@ -56,6 +56,7 @@ var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
|
|
|
56
56
|
var reactDayPicker = require('react-day-picker');
|
|
57
57
|
var useEmblaCarousel = require('embla-carousel-react');
|
|
58
58
|
var inputOtp = require('input-otp');
|
|
59
|
+
var reactTable = require('@tanstack/react-table');
|
|
59
60
|
var slugify = require('@sindresorhus/slugify');
|
|
60
61
|
var zustand = require('zustand');
|
|
61
62
|
var middleware = require('zustand/middleware');
|
|
@@ -85,7 +86,7 @@ var clsx21__default = /*#__PURE__*/_interopDefault(clsx21);
|
|
|
85
86
|
var AspectRatioPrimitive__namespace = /*#__PURE__*/_interopNamespace(AspectRatioPrimitive);
|
|
86
87
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
87
88
|
var Headless4__namespace = /*#__PURE__*/_interopNamespace(Headless4);
|
|
88
|
-
var
|
|
89
|
+
var React18__namespace = /*#__PURE__*/_interopNamespace(React18);
|
|
89
90
|
var Link10__default = /*#__PURE__*/_interopDefault(Link10);
|
|
90
91
|
var culori__namespace = /*#__PURE__*/_interopNamespace(culori);
|
|
91
92
|
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
@@ -97,7 +98,7 @@ var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive)
|
|
|
97
98
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
98
99
|
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
99
100
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
100
|
-
var
|
|
101
|
+
var TabsPrimitives__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitives);
|
|
101
102
|
var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(CollapsiblePrimitive);
|
|
102
103
|
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
103
104
|
var ContextMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(ContextMenuPrimitive);
|
|
@@ -122,6 +123,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
122
123
|
});
|
|
123
124
|
var Icons = {
|
|
124
125
|
account_circle: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M234-276q51-39 114-61.5T480-360q69 0 132 22.5T726-276q35-41 54.5-93T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 59 19.5 111t54.5 93Zm246-164q-59 0-99.5-40.5T340-580q0-59 40.5-99.5T480-720q59 0 99.5 40.5T620-580q0 59-40.5 99.5T480-440Zm0 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q53 0 100-15.5t86-44.5q-39-29-86-44.5T480-280q-53 0-100 15.5T294-220q39 29 86 44.5T480-160Zm0-360q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm0-60Zm0 360Z" }) }),
|
|
126
|
+
add_circle: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M440-440v120q0 17 11.5 28.5T480-280q17 0 28.5-11.5T520-320v-120h120q17 0 28.5-11.5T680-480q0-17-11.5-28.5T640-520H520v-120q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640v120H320q-17 0-28.5 11.5T280-480q0 17 11.5 28.5T320-440h120Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" }) }),
|
|
125
127
|
add_location: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M440-520v80q0 17 11.5 28.5T480-400q17 0 28.5-11.5T520-440v-80h80q17 0 28.5-11.5T640-560q0-17-11.5-28.5T600-600h-80v-80q0-17-11.5-28.5T480-720q-17 0-28.5 11.5T440-680v80h-80q-17 0-28.5 11.5T320-560q0 17 11.5 28.5T360-520h80Zm40 334q122-112 181-203.5T720-552q0-109-69.5-178.5T480-800q-101 0-170.5 69.5T240-552q0 71 59 162.5T480-186Zm0 79q-14 0-28-5t-25-15q-65-60-115-117t-83.5-110.5q-33.5-53.5-51-103T160-552q0-150 96.5-239T480-880q127 0 223.5 89T800-552q0 45-17.5 94.5t-51 103Q698-301 648-244T533-127q-11 10-25 15t-28 5Zm0-453Z" }) }),
|
|
126
128
|
add_photo: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M480-480ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280q17 0 28.5 11.5T520-800q0 17-11.5 28.5T480-760H200v560h560v-280q0-17 11.5-28.5T800-520q17 0 28.5 11.5T840-480v280q0 33-23.5 56.5T760-120H200Zm40-160h480L570-480 450-320l-90-120-120 160Zm440-400h-40q-17 0-28.5-11.5T600-720q0-17 11.5-28.5T640-760h40v-40q0-17 11.5-28.5T720-840q17 0 28.5 11.5T760-800v40h40q17 0 28.5 11.5T840-720q0 17-11.5 28.5T800-680h-40v40q0 17-11.5 28.5T720-600q-17 0-28.5-11.5T680-640v-40Z" }) }),
|
|
127
129
|
add: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M440-440H240q-17 0-28.5-11.5T200-480q0-17 11.5-28.5T240-520h200v-200q0-17 11.5-28.5T480-760q17 0 28.5 11.5T520-720v200h200q17 0 28.5 11.5T760-480q0 17-11.5 28.5T720-440H520v200q0 17-11.5 28.5T480-200q-17 0-28.5-11.5T440-240v-200Z" }) }),
|
|
@@ -161,6 +163,7 @@ var Icons = {
|
|
|
161
163
|
error: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm0-160q17 0 28.5-11.5T520-480v-160q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640v160q0 17 11.5 28.5T480-440Zm0 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" }) }),
|
|
162
164
|
exclamation: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M480-400q-17 0-28.5-11.5T440-440v-280q0-17 11.5-28.5T480-760q17 0 28.5 11.5T520-720v280q0 17-11.5 28.5T480-400Zm0 200q-17 0-28.5-11.5T440-240q0-17 11.5-28.5T480-280q17 0 28.5 11.5T520-240q0 17-11.5 28.5T480-200Z" }) }),
|
|
163
165
|
eye: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-134 0-244.5-72T61-462q-5-9-7.5-18.5T51-500q0-10 2.5-19.5T61-538q64-118 174.5-190T480-800q134 0 244.5 72T899-538q5 9 7.5 18.5T909-500q0 10-2.5 19.5T899-462q-64 118-174.5 190T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z" }) }),
|
|
166
|
+
eye_off: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M607-627q29 29 42.5 66t9.5 76q0 15-11 25.5T622-449q-15 0-25.5-10.5T586-485q5-26-3-50t-25-41q-17-17-41-26t-51-4q-15 0-25.5-11T430-643q0-15 10.5-25.5T466-679q38-4 75 9.5t66 42.5Zm-127-93q-19 0-37 1.5t-36 5.5q-17 3-30.5-5T358-742q-5-16 3.5-31t24.5-18q23-5 46.5-7t47.5-2q137 0 250.5 72T904-534q4 8 6 16.5t2 17.5q0 9-1.5 17.5T905-466q-18 40-44.5 75T802-327q-12 11-28 9t-26-16q-10-14-8.5-30.5T753-392q24-23 44-50t35-58q-50-101-144.5-160.5T480-720Zm0 520q-134 0-245-72.5T60-463q-5-8-7.5-17.5T50-500q0-10 2-19t7-18q20-40 46.5-76.5T166-680l-83-84q-11-12-10.5-28.5T84-820q11-11 28-11t28 11l680 680q11 11 11.5 27.5T820-84q-11 11-28 11t-28-11L624-222q-35 11-71 16.5t-73 5.5ZM222-624q-29 26-53 57t-41 67q50 101 144.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z" }) }),
|
|
164
167
|
face: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M360-390q-21 0-35.5-14.5T310-440q0-21 14.5-35.5T360-490q21 0 35.5 14.5T410-440q0 21-14.5 35.5T360-390Zm240 0q-21 0-35.5-14.5T550-440q0-21 14.5-35.5T600-490q21 0 35.5 14.5T650-440q0 21-14.5 35.5T600-390ZM480-160q134 0 227-93t93-227q0-24-3-46.5T786-570q-21 5-42 7.5t-44 2.5q-91 0-172-39T390-708q-32 78-91.5 135.5T160-486v6q0 134 93 227t227 93Zm0 80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm-54-715q42 70 114 112.5T700-640q14 0 27-1.5t27-3.5q-42-70-114-112.5T480-800q-14 0-27 1.5t-27 3.5ZM177-581q51-29 89-75t57-103q-51 29-89 75t-57 103Zm249-214Zm-103 36Z" }) }),
|
|
165
168
|
favorite: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M480-147q-14 0-28.5-5T426-168l-69-63q-106-97-191.5-192.5T80-634q0-94 63-157t157-63q53 0 100 22.5t80 61.5q33-39 80-61.5T660-854q94 0 157 63t63 157q0 115-85 211T602-230l-68 62q-11 11-25.5 16t-28.5 5Zm-38-543q-29-41-62-62.5T300-774q-60 0-100 40t-40 100q0 52 37 110.5T285.5-410q51.5 55 106 103t88.5 79q34-31 88.5-79t106-103Q726-465 763-523.5T800-634q0-60-40-100t-100-40q-47 0-80 21.5T518-690q-7 10-17 15t-21 5q-11 0-21-5t-17-15Zm38 189Z" }) }),
|
|
166
169
|
file_open: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h287q16 0 30.5 6t25.5 17l194 194q11 11 17 25.5t6 30.5v167q0 17-11.5 28.5T760-400q-17 0-28.5-11.5T720-440v-160H560q-17 0-28.5-11.5T520-640v-160H240v640h320q17 0 28.5 11.5T600-120q0 17-11.5 28.5T560-80H240Zm520-103v49q0 17-11.5 28.5T720-94q-17 0-28.5-11.5T680-134v-146q0-17 11.5-28.5T720-320h146q17 0 28.5 11.5T906-280q0 17-11.5 28.5T866-240h-50l90 90q11 11 11 27.5T906-94q-12 12-28.5 12T849-94l-89-89Zm-520 23v-640 640Z" }) }),
|
|
@@ -225,6 +228,7 @@ var Icons = {
|
|
|
225
228
|
table_view: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M320-80q-33 0-56.5-23.5T240-160v-480q0-33 23.5-56.5T320-720h480q33 0 56.5 23.5T880-640v480q0 33-23.5 56.5T800-80H320Zm0-80h200v-120H320v120Zm280 0h200v-120H600v120Zm-480-80q-17 0-28.5-11.5T80-280v-520q0-33 23.5-56.5T160-880h520q17 0 28.5 11.5T720-840q0 17-11.5 28.5T680-800H160v520q0 17-11.5 28.5T120-240Zm200-120h200v-120H320v120Zm280 0h200v-120H600v120ZM320-560h480v-80H320v80Z" }) }),
|
|
226
229
|
tablet: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M480-140q17 0 28.5-11.5T520-180q0-17-11.5-28.5T480-220q-17 0-28.5 11.5T440-180q0 17 11.5 28.5T480-140ZM200-40q-33 0-56.5-23.5T120-120v-720q0-33 23.5-56.5T200-920h560q33 0 56.5 23.5T840-840v720q0 33-23.5 56.5T760-40H200Zm0-200v120h560v-120H200Zm0-80h560v-400H200v400Zm0-480h560v-40H200v40Zm0 0v-40 40Zm0 560v120-120Z" }) }),
|
|
227
230
|
toc: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M160-280q-17 0-28.5-11.5T120-320q0-17 11.5-28.5T160-360h480q17 0 28.5 11.5T680-320q0 17-11.5 28.5T640-280H160Zm0-160q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h480q17 0 28.5 11.5T680-480q0 17-11.5 28.5T640-440H160Zm0-160q-17 0-28.5-11.5T120-640q0-17 11.5-28.5T160-680h480q17 0 28.5 11.5T680-640q0 17-11.5 28.5T640-600H160Zm640 320q-17 0-28.5-11.5T760-320q0-17 11.5-28.5T800-360q17 0 28.5 11.5T840-320q0 17-11.5 28.5T800-280Zm0-160q-17 0-28.5-11.5T760-480q0-17 11.5-28.5T800-520q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440Zm0-160q-17 0-28.5-11.5T760-640q0-17 11.5-28.5T800-680q17 0 28.5 11.5T840-640q0 17-11.5 28.5T800-600Z" }) }),
|
|
231
|
+
tune: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M480-120q-17 0-28.5-11.5T440-160v-160q0-17 11.5-28.5T480-360q17 0 28.5 11.5T520-320v40h280q17 0 28.5 11.5T840-240q0 17-11.5 28.5T800-200H520v40q0 17-11.5 28.5T480-120Zm-320-80q-17 0-28.5-11.5T120-240q0-17 11.5-28.5T160-280h160q17 0 28.5 11.5T360-240q0 17-11.5 28.5T320-200H160Zm160-160q-17 0-28.5-11.5T280-400v-40H160q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h120v-40q0-17 11.5-28.5T320-600q17 0 28.5 11.5T360-560v160q0 17-11.5 28.5T320-360Zm160-80q-17 0-28.5-11.5T440-480q0-17 11.5-28.5T480-520h320q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H480Zm160-160q-17 0-28.5-11.5T600-640v-160q0-17 11.5-28.5T640-840q17 0 28.5 11.5T680-800v40h120q17 0 28.5 11.5T840-720q0 17-11.5 28.5T800-680H680v40q0 17-11.5 28.5T640-600Zm-480-80q-17 0-28.5-11.5T120-720q0-17 11.5-28.5T160-760h320q17 0 28.5 11.5T520-720q0 17-11.5 28.5T480-680H160Z" }) }),
|
|
228
232
|
unfold_less: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m480-284-96 96q-11 11-28 11t-28-11q-11-11-11-28t11-28l124-124q6-6 13-8.5t15-2.5q8 0 15 2.5t13 8.5l124 124q11 11 11 28t-11 28q-11 11-28 11t-28-11l-96-96Zm0-392 96-96q11-11 28-11t28 11q11 11 11 28t-11 28L508-592q-6 6-13 8.5t-15 2.5q-8 0-15-2.5t-13-8.5L328-716q-11-11-11-28t11-28q11-11 28-11t28 11l96 96Z" }) }),
|
|
229
233
|
unfold_more: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m480-236 93-93q12-12 29-12t29 12q12 12 12 29t-12 29L508-148q-6 6-13 8.5t-15 2.5q-8 0-15-2.5t-13-8.5L329-271q-12-12-12-29t12-29q12-12 29-12t29 12l93 93Zm0-484-93 93q-12 12-29 12t-29-12q-12-12-12-29t12-29l123-123q6-6 13-8.5t15-2.5q8 0 15 2.5t13 8.5l123 123q12 12 12 29t-12 29q-12 12-29 12t-29-12l-93-93Z" }) }),
|
|
230
234
|
upload: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M240-160q-33 0-56.5-23.5T160-240v-80q0-17 11.5-28.5T200-360q17 0 28.5 11.5T240-320v80h480v-80q0-17 11.5-28.5T760-360q17 0 28.5 11.5T800-320v80q0 33-23.5 56.5T720-160H240Zm200-486-75 75q-12 12-28.5 11.5T308-572q-11-12-11.5-28t11.5-28l144-144q6-6 13-8.5t15-2.5q8 0 15 2.5t13 8.5l144 144q12 12 11.5 28T652-572q-12 12-28.5 12.5T595-571l-75-75v286q0 17-11.5 28.5T480-320q-17 0-28.5-11.5T440-360v-286Z" }) }),
|
|
@@ -431,7 +435,7 @@ function AvatarFallback({
|
|
|
431
435
|
}
|
|
432
436
|
);
|
|
433
437
|
}
|
|
434
|
-
var Link =
|
|
438
|
+
var Link = React18.forwardRef(function Link2(props, ref) {
|
|
435
439
|
return /* @__PURE__ */ jsxRuntime.jsx(Headless4__namespace.DataInteractive, { children: /* @__PURE__ */ jsxRuntime.jsx(Link10__default.default, { ...props, ref }) });
|
|
436
440
|
});
|
|
437
441
|
var styles = {
|
|
@@ -743,7 +747,7 @@ var buttonVariants = classVarianceAuthority.cva(styles.base, {
|
|
|
743
747
|
size: "default"
|
|
744
748
|
}
|
|
745
749
|
});
|
|
746
|
-
var Button2 =
|
|
750
|
+
var Button2 = React18.forwardRef(function Button3({ className, variant, color: color2, size, children, ...props }, ref) {
|
|
747
751
|
const classes = cn(buttonVariants({ variant, color: color2, size }), className);
|
|
748
752
|
return "href" in props ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
749
753
|
Link,
|
|
@@ -1216,7 +1220,7 @@ function Badge({
|
|
|
1216
1220
|
}
|
|
1217
1221
|
);
|
|
1218
1222
|
}
|
|
1219
|
-
var BadgeButton =
|
|
1223
|
+
var BadgeButton = React18.forwardRef(function BadgeButton2({
|
|
1220
1224
|
variant,
|
|
1221
1225
|
color: color2,
|
|
1222
1226
|
size,
|
|
@@ -1925,7 +1929,7 @@ function Breadcrumbs({
|
|
|
1925
1929
|
});
|
|
1926
1930
|
const shouldCollapse = breadcrumbItems.length > maxItems;
|
|
1927
1931
|
if (!shouldCollapse) {
|
|
1928
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Breadcrumb, { className: "-ml-1", children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbList, { children: breadcrumbItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1932
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Breadcrumb, { className: "-ml-1", children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbList, { children: breadcrumbItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React18__namespace.Fragment, { children: [
|
|
1929
1933
|
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Link10__default.default, { href: item.path, children: item.label }) }) }),
|
|
1930
1934
|
index < breadcrumbItems.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {})
|
|
1931
1935
|
] }, item.path)) }) });
|
|
@@ -1936,7 +1940,7 @@ function Breadcrumbs({
|
|
|
1936
1940
|
const itemsAtEnd = breadcrumbItems.slice(-endItems);
|
|
1937
1941
|
const collapsedItems = breadcrumbItems.slice(startItems, breadcrumbItems.length - endItems);
|
|
1938
1942
|
return /* @__PURE__ */ jsxRuntime.jsx(Breadcrumb, { children: /* @__PURE__ */ jsxRuntime.jsxs(BreadcrumbList, { children: [
|
|
1939
|
-
itemsAtStart.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1943
|
+
itemsAtStart.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React18__namespace.Fragment, { children: [
|
|
1940
1944
|
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Link10__default.default, { href: item.path, children: item.label }) }) }),
|
|
1941
1945
|
index < itemsAtStart.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {})
|
|
1942
1946
|
] }, item.path)),
|
|
@@ -1949,7 +1953,7 @@ function Breadcrumbs({
|
|
|
1949
1953
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "start", children: collapsedItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Link10__default.default, { href: item.path, children: item.label }) }, item.path)) })
|
|
1950
1954
|
] }) }),
|
|
1951
1955
|
itemsAtEnd.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {}),
|
|
1952
|
-
itemsAtEnd.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1956
|
+
itemsAtEnd.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React18__namespace.Fragment, { children: [
|
|
1953
1957
|
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Link10__default.default, { href: item.path, children: item.label }) }) }),
|
|
1954
1958
|
index < itemsAtEnd.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {})
|
|
1955
1959
|
] }, item.path))
|
|
@@ -5571,8 +5575,8 @@ function ScrollBar({
|
|
|
5571
5575
|
);
|
|
5572
5576
|
}
|
|
5573
5577
|
function PreWithCopy(props) {
|
|
5574
|
-
const textInput =
|
|
5575
|
-
const [isJustCopied, setJustCopied] =
|
|
5578
|
+
const textInput = React18.useRef(null);
|
|
5579
|
+
const [isJustCopied, setJustCopied] = React18.useState(false);
|
|
5576
5580
|
function handleCopy() {
|
|
5577
5581
|
if (textInput.current) {
|
|
5578
5582
|
navigator.clipboard.writeText(textInput.current.textContent || "");
|
|
@@ -5892,7 +5896,7 @@ function SegmentedControl({
|
|
|
5892
5896
|
...props
|
|
5893
5897
|
}) {
|
|
5894
5898
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5895
|
-
|
|
5899
|
+
TabsPrimitives__namespace.Root,
|
|
5896
5900
|
{
|
|
5897
5901
|
"data-slot": "tabs",
|
|
5898
5902
|
className: cn("flex flex-col gap-2", className),
|
|
@@ -5905,7 +5909,7 @@ function SegmentedControlList({
|
|
|
5905
5909
|
...props
|
|
5906
5910
|
}) {
|
|
5907
5911
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5908
|
-
|
|
5912
|
+
TabsPrimitives__namespace.List,
|
|
5909
5913
|
{
|
|
5910
5914
|
"data-slot": "segmented-control-list",
|
|
5911
5915
|
className: cn(
|
|
@@ -5921,7 +5925,7 @@ function SegmentedControlTrigger({
|
|
|
5921
5925
|
...props
|
|
5922
5926
|
}) {
|
|
5923
5927
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5924
|
-
|
|
5928
|
+
TabsPrimitives__namespace.Trigger,
|
|
5925
5929
|
{
|
|
5926
5930
|
"data-slot": "segmented-control-trigger",
|
|
5927
5931
|
className: cn(
|
|
@@ -5974,8 +5978,8 @@ function ThemeSelectorContent({
|
|
|
5974
5978
|
colorThemes: colorThemes2
|
|
5975
5979
|
}) {
|
|
5976
5980
|
const [, copyToClipboardRaw] = usehooks.useCopyToClipboard();
|
|
5977
|
-
const [copied, setCopied] =
|
|
5978
|
-
const updateUrlParams =
|
|
5981
|
+
const [copied, setCopied] = React18.useState(false);
|
|
5982
|
+
const updateUrlParams = React18.useCallback(
|
|
5979
5983
|
(category, primary, accent) => {
|
|
5980
5984
|
const params = new URLSearchParams();
|
|
5981
5985
|
params.set("theme", category);
|
|
@@ -6155,7 +6159,7 @@ function ThemeSelectorContent({
|
|
|
6155
6159
|
] });
|
|
6156
6160
|
}
|
|
6157
6161
|
function ThemeSelector(props) {
|
|
6158
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6162
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React18.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(ThemeSelectorLoading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(ThemeSelectorContent, { ...props }) });
|
|
6159
6163
|
}
|
|
6160
6164
|
function CodeDemoLoading() {
|
|
6161
6165
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 animate-pulse", children: [
|
|
@@ -6179,19 +6183,19 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
6179
6183
|
const { resolvedTheme } = nextThemes.useTheme();
|
|
6180
6184
|
const searchParams = navigation.useSearchParams();
|
|
6181
6185
|
const { rtl = false, darkMode = false, themeSelector = false } = hide;
|
|
6182
|
-
const [tabIndex, setTabIndex] =
|
|
6183
|
-
const [variant, setVariant] =
|
|
6184
|
-
const [view, setView] =
|
|
6185
|
-
const [isRTL, setIsRTL] =
|
|
6186
|
-
const [isDarkMode, setDarkMode] =
|
|
6187
|
-
const [isExpanded, setExpanded] =
|
|
6188
|
-
const [isJustCopied, setJustCopied] =
|
|
6189
|
-
const [themeCategory, setThemeCategory] =
|
|
6190
|
-
const [primaryColor, setPrimaryColor] =
|
|
6191
|
-
const [accentColor, setAccentColor] =
|
|
6192
|
-
const [greyColor, setGreyColor] =
|
|
6193
|
-
const [isThemeInitialized, setIsThemeInitialized] =
|
|
6194
|
-
|
|
6186
|
+
const [tabIndex, setTabIndex] = React18.useState(0);
|
|
6187
|
+
const [variant, setVariant] = React18.useState(getInitialVariant(data));
|
|
6188
|
+
const [view, setView] = React18.useState("desktop");
|
|
6189
|
+
const [isRTL, setIsRTL] = React18.useState(false);
|
|
6190
|
+
const [isDarkMode, setDarkMode] = React18.useState(null);
|
|
6191
|
+
const [isExpanded, setExpanded] = React18.useState(false);
|
|
6192
|
+
const [isJustCopied, setJustCopied] = React18.useState(false);
|
|
6193
|
+
const [themeCategory, setThemeCategory] = React18.useState("brand");
|
|
6194
|
+
const [primaryColor, setPrimaryColor] = React18.useState("blue");
|
|
6195
|
+
const [accentColor, setAccentColor] = React18.useState("red");
|
|
6196
|
+
const [greyColor, setGreyColor] = React18.useState("grey");
|
|
6197
|
+
const [isThemeInitialized, setIsThemeInitialized] = React18.useState(false);
|
|
6198
|
+
React18.useEffect(() => {
|
|
6195
6199
|
const themeParam = searchParams.get("theme");
|
|
6196
6200
|
const primaryParam = searchParams.get("primary");
|
|
6197
6201
|
const accentParam = searchParams.get("accent");
|
|
@@ -6237,16 +6241,16 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
6237
6241
|
}
|
|
6238
6242
|
setIsThemeInitialized(true);
|
|
6239
6243
|
}, [searchParams, themeCategory, primaryColor, accentColor]);
|
|
6240
|
-
|
|
6244
|
+
React18.useEffect(() => {
|
|
6241
6245
|
setDarkMode(resolvedTheme === "dark");
|
|
6242
6246
|
}, [resolvedTheme]);
|
|
6243
|
-
const iframeRef =
|
|
6247
|
+
const iframeRef = React18.useRef(null);
|
|
6244
6248
|
const getShades = (prefix, colorKey, themeCat) => colors[themeCat][colorKey].colors.reduce((acc, shade) => {
|
|
6245
6249
|
const suffix = shade.token.split("-").pop();
|
|
6246
6250
|
acc[`${prefix}${suffix}`] = shade.hex;
|
|
6247
6251
|
return acc;
|
|
6248
6252
|
}, {});
|
|
6249
|
-
const themeValues =
|
|
6253
|
+
const themeValues = React18__namespace.default.useMemo(
|
|
6250
6254
|
() => ({
|
|
6251
6255
|
...getShades("primary", primaryColor, themeCategory),
|
|
6252
6256
|
...getShades("accent", accentColor, themeCategory),
|
|
@@ -6254,7 +6258,7 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
6254
6258
|
}),
|
|
6255
6259
|
[themeCategory, primaryColor, accentColor, greyColor]
|
|
6256
6260
|
);
|
|
6257
|
-
|
|
6261
|
+
React18__namespace.default.useEffect(() => {
|
|
6258
6262
|
const frame2 = iframeRef.current;
|
|
6259
6263
|
if (!frame2) return;
|
|
6260
6264
|
const send = () => {
|
|
@@ -6321,11 +6325,11 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
6321
6325
|
const codeItems = getCodeItems(code);
|
|
6322
6326
|
const current = getCurrent(codeItems, tabIndex);
|
|
6323
6327
|
const shouldExpand = getShouldExpand(current.code.trim());
|
|
6324
|
-
const variantLabels =
|
|
6328
|
+
const variantLabels = React18__namespace.default.useMemo(() => {
|
|
6325
6329
|
const explicit = data.labels ?? {};
|
|
6326
6330
|
return Object.fromEntries(variants.map((v) => [v, explicit[v] ?? humaniseVariant(v)]));
|
|
6327
6331
|
}, [variants, data]);
|
|
6328
|
-
|
|
6332
|
+
React18.useEffect(() => {
|
|
6329
6333
|
if (!isThemeInitialized) return;
|
|
6330
6334
|
const neutralKey = Object.keys(colorThemes[themeCategory]).find((k) => k.toLowerCase().includes("grey")) ?? "";
|
|
6331
6335
|
if (neutralKey && neutralKey !== greyColor) {
|
|
@@ -6439,11 +6443,11 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
6439
6443
|
] });
|
|
6440
6444
|
}
|
|
6441
6445
|
function CodeDemo(props) {
|
|
6442
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6446
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React18.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(CodeDemoLoading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(CodeDemoContent, { ...props }) });
|
|
6443
6447
|
}
|
|
6444
|
-
var IFrame =
|
|
6448
|
+
var IFrame = React18__namespace.default.forwardRef(
|
|
6445
6449
|
({ iframe, isRTL, isDarkMode }, ref) => {
|
|
6446
|
-
|
|
6450
|
+
React18.useEffect(() => {
|
|
6447
6451
|
const document2 = ref?.current?.contentDocument;
|
|
6448
6452
|
const root = document2?.documentElement;
|
|
6449
6453
|
if (document2 && root) {
|
|
@@ -6488,7 +6492,7 @@ function CodePreview({
|
|
|
6488
6492
|
themeValues,
|
|
6489
6493
|
children
|
|
6490
6494
|
}) {
|
|
6491
|
-
const cssVars =
|
|
6495
|
+
const cssVars = React18__namespace.default.useMemo(() => {
|
|
6492
6496
|
const withCssVarNames = Object.entries(themeValues).map(([key, value]) => {
|
|
6493
6497
|
const kebab = key.replace(/(\D+)(\d+)/, "$1-$2");
|
|
6494
6498
|
return [`--color-${kebab}`, value];
|
|
@@ -6584,7 +6588,7 @@ function ThemeSelectorDropDown({
|
|
|
6584
6588
|
setGreyColor,
|
|
6585
6589
|
isInitialized
|
|
6586
6590
|
}) {
|
|
6587
|
-
const filteredColorThemes =
|
|
6591
|
+
const filteredColorThemes = React18.useMemo(() => {
|
|
6588
6592
|
const filtered = {};
|
|
6589
6593
|
for (const category of Object.keys(colorThemes)) {
|
|
6590
6594
|
filtered[category] = Object.fromEntries(
|
|
@@ -6595,11 +6599,11 @@ function ThemeSelectorDropDown({
|
|
|
6595
6599
|
}
|
|
6596
6600
|
return filtered;
|
|
6597
6601
|
}, []);
|
|
6598
|
-
const availableAccentColors =
|
|
6602
|
+
const availableAccentColors = React18.useMemo(() => {
|
|
6599
6603
|
const allColors = Object.keys(filteredColorThemes[themeCategory]);
|
|
6600
6604
|
return allColors.filter((color2) => color2 !== primaryColor);
|
|
6601
6605
|
}, [filteredColorThemes, themeCategory, primaryColor]);
|
|
6602
|
-
|
|
6606
|
+
React18.useEffect(() => {
|
|
6603
6607
|
if (!isInitialized) return;
|
|
6604
6608
|
const neutralKey = Object.keys(colorThemes[themeCategory]).find((k) => k.toLowerCase().includes("grey")) ?? "";
|
|
6605
6609
|
if (neutralKey && neutralKey !== greyColor) {
|
|
@@ -6748,9 +6752,9 @@ function CollapsibleContent2({
|
|
|
6748
6752
|
return /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.CollapsibleContent, { "data-slot": "collapsible-content", ...props });
|
|
6749
6753
|
}
|
|
6750
6754
|
var TruncatingTooltip = ({ children, className }) => {
|
|
6751
|
-
const textRef =
|
|
6752
|
-
const [isTruncated, setIsTruncated] =
|
|
6753
|
-
|
|
6755
|
+
const textRef = React18.useRef(null);
|
|
6756
|
+
const [isTruncated, setIsTruncated] = React18.useState(false);
|
|
6757
|
+
React18.useEffect(() => {
|
|
6754
6758
|
const el = textRef.current;
|
|
6755
6759
|
if (el) {
|
|
6756
6760
|
setIsTruncated(el.scrollWidth > el.clientWidth);
|
|
@@ -6763,7 +6767,7 @@ var TruncatingTooltip = ({ children, className }) => {
|
|
|
6763
6767
|
};
|
|
6764
6768
|
function ColorCard({ name, token, hex: hex2, rgb: rgb2, hsl, oklch: oklch2, format, viewMode }) {
|
|
6765
6769
|
const [, copyToClipboardRaw] = usehooks.useCopyToClipboard();
|
|
6766
|
-
const [copied, setCopied] =
|
|
6770
|
+
const [copied, setCopied] = React18.useState(false);
|
|
6767
6771
|
const formattedColor = getColorValue({ oklch: oklch2, hex: hex2, rgb: rgb2, hsl }, format);
|
|
6768
6772
|
const copyToClipboard = () => {
|
|
6769
6773
|
copyToClipboardRaw(formattedColor);
|
|
@@ -7235,6 +7239,80 @@ function ContextMenuShortcut({ className, ...props }) {
|
|
|
7235
7239
|
}
|
|
7236
7240
|
);
|
|
7237
7241
|
}
|
|
7242
|
+
var CheckboxSmall = React18__namespace.default.forwardRef(({ className, checked, ...props }, forwardedRef) => {
|
|
7243
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7244
|
+
CheckboxPrimitive__namespace.Root,
|
|
7245
|
+
{
|
|
7246
|
+
ref: forwardedRef,
|
|
7247
|
+
...props,
|
|
7248
|
+
checked,
|
|
7249
|
+
className: cn(
|
|
7250
|
+
// base
|
|
7251
|
+
"relative inline-flex size-4 shrink-0 appearance-none items-center justify-center rounded-sm shadow-xs ring-1 outline-hidden transition duration-100 ring-inset enabled:cursor-pointer",
|
|
7252
|
+
// text color
|
|
7253
|
+
"dark:text-grey-50 text-white",
|
|
7254
|
+
// background color
|
|
7255
|
+
"dark:bg-grey-950 bg-white",
|
|
7256
|
+
// ring color
|
|
7257
|
+
"ring-grey-300 dark:ring-grey-800",
|
|
7258
|
+
// disabled
|
|
7259
|
+
"data-disabled:bg-grey-100 data-disabled:text-grey-400 data-disabled:ring-grey-300",
|
|
7260
|
+
"dark:data-disabled:bg-grey-800 dark:data-disabled:text-grey-500 dark:data-disabled:ring-grey-700",
|
|
7261
|
+
// checked and enabled
|
|
7262
|
+
"enabled:data-[state=checked]:bg-primary-600 enabled:data-[state=checked]:ring-0 enabled:data-[state=checked]:ring-transparent",
|
|
7263
|
+
// indeterminate
|
|
7264
|
+
"enabled:data-[state=indeterminate]:bg-primary-600 enabled:data-[state=indeterminate]:ring-0 enabled:data-[state=indeterminate]:ring-transparent",
|
|
7265
|
+
// focus
|
|
7266
|
+
focusRing,
|
|
7267
|
+
className
|
|
7268
|
+
),
|
|
7269
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { asChild: true, className: "flex size-full items-center justify-center", children: checked === "indeterminate" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7270
|
+
"svg",
|
|
7271
|
+
{
|
|
7272
|
+
"aria-hidden": "true",
|
|
7273
|
+
width: "16",
|
|
7274
|
+
height: "16",
|
|
7275
|
+
viewBox: "0 0 16 16",
|
|
7276
|
+
fill: "none",
|
|
7277
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7278
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7279
|
+
"line",
|
|
7280
|
+
{
|
|
7281
|
+
stroke: "currentColor",
|
|
7282
|
+
strokeLinecap: "round",
|
|
7283
|
+
strokeWidth: "2",
|
|
7284
|
+
x1: "4",
|
|
7285
|
+
x2: "12",
|
|
7286
|
+
y1: "8",
|
|
7287
|
+
y2: "8"
|
|
7288
|
+
}
|
|
7289
|
+
)
|
|
7290
|
+
}
|
|
7291
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
7292
|
+
"svg",
|
|
7293
|
+
{
|
|
7294
|
+
"aria-hidden": "true",
|
|
7295
|
+
width: "16",
|
|
7296
|
+
height: "16",
|
|
7297
|
+
viewBox: "0 0 16 16",
|
|
7298
|
+
fill: "none",
|
|
7299
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7300
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7301
|
+
"path",
|
|
7302
|
+
{
|
|
7303
|
+
d: "M11.2 5.59998L6.79999 9.99998L4.79999 7.99998",
|
|
7304
|
+
stroke: "currentColor",
|
|
7305
|
+
strokeLinecap: "round",
|
|
7306
|
+
strokeLinejoin: "round",
|
|
7307
|
+
strokeWidth: "2"
|
|
7308
|
+
}
|
|
7309
|
+
)
|
|
7310
|
+
}
|
|
7311
|
+
) })
|
|
7312
|
+
}
|
|
7313
|
+
);
|
|
7314
|
+
});
|
|
7315
|
+
CheckboxSmall.displayName = "CheckboxSmall";
|
|
7238
7316
|
function Drawer({ ...props }) {
|
|
7239
7317
|
return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Root, { "data-slot": "drawer", ...props });
|
|
7240
7318
|
}
|
|
@@ -7335,7 +7413,7 @@ function DrawerDescription({
|
|
|
7335
7413
|
);
|
|
7336
7414
|
}
|
|
7337
7415
|
function DynamicFavicon({ lightModeFavicon, darkModeFavicon }) {
|
|
7338
|
-
|
|
7416
|
+
React18.useEffect(() => {
|
|
7339
7417
|
const updateFavicon = () => {
|
|
7340
7418
|
const isDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
7341
7419
|
const favicon = document.querySelector("link[rel='icon']");
|
|
@@ -7355,10 +7433,10 @@ function DynamicFavicon({ lightModeFavicon, darkModeFavicon }) {
|
|
|
7355
7433
|
}, [lightModeFavicon, darkModeFavicon]);
|
|
7356
7434
|
return null;
|
|
7357
7435
|
}
|
|
7358
|
-
var ExpandableSearchContext =
|
|
7359
|
-
var ExpandableSearch =
|
|
7360
|
-
const [value, setValue] =
|
|
7361
|
-
const formRef =
|
|
7436
|
+
var ExpandableSearchContext = React18__namespace.createContext(null);
|
|
7437
|
+
var ExpandableSearch = React18__namespace.forwardRef(({ className, onAction, defaultValue = "", ...props }, ref) => {
|
|
7438
|
+
const [value, setValue] = React18__namespace.useState(defaultValue);
|
|
7439
|
+
const formRef = React18__namespace.useRef(null);
|
|
7362
7440
|
const handleAction = (e) => {
|
|
7363
7441
|
e.preventDefault();
|
|
7364
7442
|
if (onAction) {
|
|
@@ -7376,10 +7454,10 @@ var ExpandableSearch = React16__namespace.forwardRef(({ className, onAction, def
|
|
|
7376
7454
|
) });
|
|
7377
7455
|
});
|
|
7378
7456
|
ExpandableSearch.displayName = "ExpandableSearch";
|
|
7379
|
-
var ExpandableSearchField =
|
|
7380
|
-
const context =
|
|
7457
|
+
var ExpandableSearchField = React18__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
7458
|
+
const context = React18__namespace.useContext(ExpandableSearchContext);
|
|
7381
7459
|
if (!context) throw new Error("ExpandableSearchField must be used within ExpandableSearch");
|
|
7382
|
-
const [isFocused, setIsFocused] =
|
|
7460
|
+
const [isFocused, setIsFocused] = React18__namespace.useState(false);
|
|
7383
7461
|
const isActive = context.value.length > 0 || isFocused;
|
|
7384
7462
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
|
|
7385
7463
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "sr-only", htmlFor: "expandable-search", children: "Search" }),
|
|
@@ -7508,15 +7586,15 @@ function Footer({
|
|
|
7508
7586
|
] });
|
|
7509
7587
|
}
|
|
7510
7588
|
var Form = reactHookForm.FormProvider;
|
|
7511
|
-
var FormFieldContext =
|
|
7589
|
+
var FormFieldContext = React18__namespace.createContext({});
|
|
7512
7590
|
var FormField = ({
|
|
7513
7591
|
...props
|
|
7514
7592
|
}) => {
|
|
7515
7593
|
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
|
|
7516
7594
|
};
|
|
7517
7595
|
var useFormField = () => {
|
|
7518
|
-
const fieldContext =
|
|
7519
|
-
const itemContext =
|
|
7596
|
+
const fieldContext = React18__namespace.useContext(FormFieldContext);
|
|
7597
|
+
const itemContext = React18__namespace.useContext(FormItemContext);
|
|
7520
7598
|
const { getFieldState } = reactHookForm.useFormContext();
|
|
7521
7599
|
const formState = reactHookForm.useFormState({ name: fieldContext.name });
|
|
7522
7600
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
@@ -7533,9 +7611,9 @@ var useFormField = () => {
|
|
|
7533
7611
|
...fieldState
|
|
7534
7612
|
};
|
|
7535
7613
|
};
|
|
7536
|
-
var FormItemContext =
|
|
7614
|
+
var FormItemContext = React18__namespace.createContext({});
|
|
7537
7615
|
function FormItem({ className, ...props }) {
|
|
7538
|
-
const id3 =
|
|
7616
|
+
const id3 = React18__namespace.useId();
|
|
7539
7617
|
return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id: id3 }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "form-item", className: cn("grid gap-2", className), ...props }) });
|
|
7540
7618
|
}
|
|
7541
7619
|
function FormLabel({ className, ...props }) {
|
|
@@ -7663,7 +7741,7 @@ function Toggle({
|
|
|
7663
7741
|
}
|
|
7664
7742
|
);
|
|
7665
7743
|
}
|
|
7666
|
-
var ToggleGroupContext =
|
|
7744
|
+
var ToggleGroupContext = React18__namespace.createContext({
|
|
7667
7745
|
size: "default",
|
|
7668
7746
|
variant: "ghost"
|
|
7669
7747
|
});
|
|
@@ -7696,7 +7774,7 @@ function ToggleGroupItem({
|
|
|
7696
7774
|
size,
|
|
7697
7775
|
...props
|
|
7698
7776
|
}) {
|
|
7699
|
-
const context =
|
|
7777
|
+
const context = React18__namespace.useContext(ToggleGroupContext);
|
|
7700
7778
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7701
7779
|
ToggleGroupPrimitive__namespace.Item,
|
|
7702
7780
|
{
|
|
@@ -7794,7 +7872,7 @@ function Heading({
|
|
|
7794
7872
|
|
|
7795
7873
|
// package.json
|
|
7796
7874
|
var package_default = {
|
|
7797
|
-
version: "1.
|
|
7875
|
+
version: "1.54.7"};
|
|
7798
7876
|
function Logo(props) {
|
|
7799
7877
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7800
7878
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "NSW Government" }),
|
|
@@ -7836,9 +7914,9 @@ function Logo(props) {
|
|
|
7836
7914
|
}
|
|
7837
7915
|
function ThemeSwitcher() {
|
|
7838
7916
|
const { resolvedTheme, setTheme } = nextThemes.useTheme();
|
|
7839
|
-
const [mounted, setMounted] =
|
|
7917
|
+
const [mounted, setMounted] = React18.useState(false);
|
|
7840
7918
|
const classes = "fill-grey-600 dark:fill-grey-100";
|
|
7841
|
-
|
|
7919
|
+
React18.useEffect(() => {
|
|
7842
7920
|
setMounted(true);
|
|
7843
7921
|
}, []);
|
|
7844
7922
|
if (!mounted) {
|
|
@@ -7860,9 +7938,9 @@ function ThemeSwitcher() {
|
|
|
7860
7938
|
);
|
|
7861
7939
|
}
|
|
7862
7940
|
function SiteSearch({ navigation: navigation$1 }) {
|
|
7863
|
-
const [open, setOpen] =
|
|
7941
|
+
const [open, setOpen] = React18__namespace.useState(false);
|
|
7864
7942
|
const router = navigation.useRouter();
|
|
7865
|
-
|
|
7943
|
+
React18__namespace.useEffect(() => {
|
|
7866
7944
|
const down = (e) => {
|
|
7867
7945
|
if (e.key === "k" && (e.metaKey || e.ctrlKey)) {
|
|
7868
7946
|
e.preventDefault();
|
|
@@ -7872,7 +7950,7 @@ function SiteSearch({ navigation: navigation$1 }) {
|
|
|
7872
7950
|
document.addEventListener("keydown", down);
|
|
7873
7951
|
return () => document.removeEventListener("keydown", down);
|
|
7874
7952
|
}, []);
|
|
7875
|
-
const runCommand =
|
|
7953
|
+
const runCommand = React18__namespace.useCallback((command) => {
|
|
7876
7954
|
setOpen(false);
|
|
7877
7955
|
command();
|
|
7878
7956
|
}, []);
|
|
@@ -7917,9 +7995,9 @@ function Header2({
|
|
|
7917
7995
|
version = false,
|
|
7918
7996
|
hide = {}
|
|
7919
7997
|
}) {
|
|
7920
|
-
const [isScrolled, setIsScrolled] =
|
|
7998
|
+
const [isScrolled, setIsScrolled] = React18.useState(false);
|
|
7921
7999
|
const { search = true, themeSwitcher = true, github = true, shadow = true } = hide;
|
|
7922
|
-
|
|
8000
|
+
React18.useEffect(() => {
|
|
7923
8001
|
function onScroll() {
|
|
7924
8002
|
setIsScrolled(window.scrollY > 0);
|
|
7925
8003
|
}
|
|
@@ -8118,7 +8196,7 @@ var gapStyles = {
|
|
|
8118
8196
|
md: "space-y-2",
|
|
8119
8197
|
lg: "space-y-3"
|
|
8120
8198
|
};
|
|
8121
|
-
var List2 =
|
|
8199
|
+
var List2 = React18__namespace.forwardRef(
|
|
8122
8200
|
({ asChild, variant = "disc", size = "md", gap = "md", className, ...props }, ref) => {
|
|
8123
8201
|
const Comp = asChild ? reactSlot.Slot : "ul";
|
|
8124
8202
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8133,7 +8211,7 @@ var List2 = React16__namespace.forwardRef(
|
|
|
8133
8211
|
}
|
|
8134
8212
|
);
|
|
8135
8213
|
List2.displayName = "List";
|
|
8136
|
-
var ListItem =
|
|
8214
|
+
var ListItem = React18__namespace.forwardRef(
|
|
8137
8215
|
({ icon, className, children, ...props }, ref) => {
|
|
8138
8216
|
if (icon) {
|
|
8139
8217
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { ref, "data-slot": "list-item", className: cn2("flex gap-2", className), ...props, children: [
|
|
@@ -8358,10 +8436,10 @@ function MenubarSubContent({
|
|
|
8358
8436
|
);
|
|
8359
8437
|
}
|
|
8360
8438
|
function useSelectorHeight(selector = "header") {
|
|
8361
|
-
const [height, setHeight] =
|
|
8362
|
-
const elementRef =
|
|
8363
|
-
const resizeObserverRef =
|
|
8364
|
-
|
|
8439
|
+
const [height, setHeight] = React18.useState(0);
|
|
8440
|
+
const elementRef = React18.useRef(null);
|
|
8441
|
+
const resizeObserverRef = React18.useRef(null);
|
|
8442
|
+
React18.useEffect(() => {
|
|
8365
8443
|
const element = document.querySelector(selector);
|
|
8366
8444
|
if (!element) return;
|
|
8367
8445
|
elementRef.current = element;
|
|
@@ -8554,9 +8632,9 @@ function NavigationLink({
|
|
|
8554
8632
|
}
|
|
8555
8633
|
);
|
|
8556
8634
|
}
|
|
8557
|
-
var LayoutGroupContext =
|
|
8635
|
+
var LayoutGroupContext = React18.createContext({});
|
|
8558
8636
|
function useConstant(init) {
|
|
8559
|
-
const ref =
|
|
8637
|
+
const ref = React18.useRef(null);
|
|
8560
8638
|
if (ref.current === null) {
|
|
8561
8639
|
ref.current = init();
|
|
8562
8640
|
}
|
|
@@ -8567,8 +8645,8 @@ function useConstant(init) {
|
|
|
8567
8645
|
var isBrowser = typeof window !== "undefined";
|
|
8568
8646
|
|
|
8569
8647
|
// node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs
|
|
8570
|
-
var useIsomorphicLayoutEffect = isBrowser ?
|
|
8571
|
-
var PresenceContext = /* @__PURE__ */
|
|
8648
|
+
var useIsomorphicLayoutEffect = isBrowser ? React18.useLayoutEffect : React18.useEffect;
|
|
8649
|
+
var PresenceContext = /* @__PURE__ */ React18.createContext(null);
|
|
8572
8650
|
|
|
8573
8651
|
// node_modules/motion-utils/dist/es/array.mjs
|
|
8574
8652
|
function addUniqueItem(arr, item) {
|
|
@@ -11624,28 +11702,28 @@ var isMotionValue = (value) => Boolean(value && value.getVelocity);
|
|
|
11624
11702
|
// node_modules/motion-dom/dist/es/value/types/utils/find.mjs
|
|
11625
11703
|
var valueTypes = [...dimensionValueTypes, color, complex];
|
|
11626
11704
|
var findValueType = (v) => valueTypes.find(testValueType(v));
|
|
11627
|
-
var MotionConfigContext =
|
|
11705
|
+
var MotionConfigContext = React18.createContext({
|
|
11628
11706
|
transformPagePoint: (p) => p,
|
|
11629
11707
|
isStatic: false,
|
|
11630
11708
|
reducedMotion: "never"
|
|
11631
11709
|
});
|
|
11632
11710
|
function usePresence(subscribe = true) {
|
|
11633
|
-
const context =
|
|
11711
|
+
const context = React18.useContext(PresenceContext);
|
|
11634
11712
|
if (context === null)
|
|
11635
11713
|
return [true, null];
|
|
11636
11714
|
const { isPresent, onExitComplete, register } = context;
|
|
11637
|
-
const id3 =
|
|
11638
|
-
|
|
11715
|
+
const id3 = React18.useId();
|
|
11716
|
+
React18.useEffect(() => {
|
|
11639
11717
|
if (subscribe) {
|
|
11640
11718
|
return register(id3);
|
|
11641
11719
|
}
|
|
11642
11720
|
}, [subscribe]);
|
|
11643
|
-
const safeToRemove =
|
|
11721
|
+
const safeToRemove = React18.useCallback(() => subscribe && onExitComplete && onExitComplete(id3), [id3, onExitComplete, subscribe]);
|
|
11644
11722
|
return !isPresent && onExitComplete ? [false, safeToRemove] : [true];
|
|
11645
11723
|
}
|
|
11646
|
-
var DeprecatedLayoutGroupContext =
|
|
11724
|
+
var DeprecatedLayoutGroupContext = React18.createContext(null);
|
|
11647
11725
|
function useIsMounted() {
|
|
11648
|
-
const isMounted =
|
|
11726
|
+
const isMounted = React18.useRef(false);
|
|
11649
11727
|
useIsomorphicLayoutEffect(() => {
|
|
11650
11728
|
isMounted.current = true;
|
|
11651
11729
|
return () => {
|
|
@@ -11658,11 +11736,11 @@ function useIsMounted() {
|
|
|
11658
11736
|
// node_modules/framer-motion/dist/es/utils/use-force-update.mjs
|
|
11659
11737
|
function useForceUpdate() {
|
|
11660
11738
|
const isMounted = useIsMounted();
|
|
11661
|
-
const [forcedRenderCount, setForcedRenderCount] =
|
|
11662
|
-
const forceRender =
|
|
11739
|
+
const [forcedRenderCount, setForcedRenderCount] = React18.useState(0);
|
|
11740
|
+
const forceRender = React18.useCallback(() => {
|
|
11663
11741
|
isMounted.current && setForcedRenderCount(forcedRenderCount + 1);
|
|
11664
11742
|
}, [forcedRenderCount]);
|
|
11665
|
-
const deferredForceRender =
|
|
11743
|
+
const deferredForceRender = React18.useCallback(() => frame.postRender(forceRender), [forceRender]);
|
|
11666
11744
|
return [deferredForceRender, forcedRenderCount];
|
|
11667
11745
|
}
|
|
11668
11746
|
|
|
@@ -11694,10 +11772,10 @@ function nodeGroup() {
|
|
|
11694
11772
|
var shouldInheritGroup = (inherit) => inherit === true;
|
|
11695
11773
|
var shouldInheritId = (inherit) => shouldInheritGroup(inherit === true) || inherit === "id";
|
|
11696
11774
|
var LayoutGroup = ({ children, id: id3, inherit = true }) => {
|
|
11697
|
-
const layoutGroupContext =
|
|
11698
|
-
const deprecatedLayoutGroupContext =
|
|
11775
|
+
const layoutGroupContext = React18.useContext(LayoutGroupContext);
|
|
11776
|
+
const deprecatedLayoutGroupContext = React18.useContext(DeprecatedLayoutGroupContext);
|
|
11699
11777
|
const [forceRender, key] = useForceUpdate();
|
|
11700
|
-
const context =
|
|
11778
|
+
const context = React18.useRef(null);
|
|
11701
11779
|
const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext;
|
|
11702
11780
|
if (context.current === null) {
|
|
11703
11781
|
if (shouldInheritId(inherit) && upstreamId) {
|
|
@@ -11708,10 +11786,10 @@ var LayoutGroup = ({ children, id: id3, inherit = true }) => {
|
|
|
11708
11786
|
group: shouldInheritGroup(inherit) ? layoutGroupContext.group || nodeGroup() : nodeGroup()
|
|
11709
11787
|
};
|
|
11710
11788
|
}
|
|
11711
|
-
const memoizedContext =
|
|
11789
|
+
const memoizedContext = React18.useMemo(() => ({ ...context.current, forceRender }), [key]);
|
|
11712
11790
|
return jsxRuntime.jsx(LayoutGroupContext.Provider, { value: memoizedContext, children });
|
|
11713
11791
|
};
|
|
11714
|
-
var LazyContext =
|
|
11792
|
+
var LazyContext = React18.createContext({ strict: false });
|
|
11715
11793
|
|
|
11716
11794
|
// node_modules/framer-motion/dist/es/motion/features/definitions.mjs
|
|
11717
11795
|
var featureProps = {
|
|
@@ -11840,7 +11918,7 @@ function createDOMMotionComponentProxy(componentFactory) {
|
|
|
11840
11918
|
}
|
|
11841
11919
|
});
|
|
11842
11920
|
}
|
|
11843
|
-
var MotionContext = /* @__PURE__ */
|
|
11921
|
+
var MotionContext = /* @__PURE__ */ React18.createContext({});
|
|
11844
11922
|
|
|
11845
11923
|
// node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs
|
|
11846
11924
|
function isAnimationControls(v) {
|
|
@@ -11886,8 +11964,8 @@ function getCurrentTreeVariants(props, context) {
|
|
|
11886
11964
|
|
|
11887
11965
|
// node_modules/framer-motion/dist/es/context/MotionContext/create.mjs
|
|
11888
11966
|
function useCreateMotionContext(props) {
|
|
11889
|
-
const { initial, animate } = getCurrentTreeVariants(props,
|
|
11890
|
-
return
|
|
11967
|
+
const { initial, animate } = getCurrentTreeVariants(props, React18.useContext(MotionContext));
|
|
11968
|
+
return React18.useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);
|
|
11891
11969
|
}
|
|
11892
11970
|
function variantLabelsAsDependency(prop) {
|
|
11893
11971
|
return Array.isArray(prop) ? prop.join(" ") : prop;
|
|
@@ -11903,7 +11981,7 @@ function isRefObject(ref) {
|
|
|
11903
11981
|
|
|
11904
11982
|
// node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs
|
|
11905
11983
|
function useMotionRef(visualState, visualElement, externalRef) {
|
|
11906
|
-
return
|
|
11984
|
+
return React18.useCallback(
|
|
11907
11985
|
(instance) => {
|
|
11908
11986
|
if (instance) {
|
|
11909
11987
|
visualState.onMount && visualState.onMount(instance);
|
|
@@ -11938,15 +12016,15 @@ var camelToDash = (str) => str.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(
|
|
|
11938
12016
|
// node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs
|
|
11939
12017
|
var optimizedAppearDataId = "framerAppearId";
|
|
11940
12018
|
var optimizedAppearDataAttribute = "data-" + camelToDash(optimizedAppearDataId);
|
|
11941
|
-
var SwitchLayoutGroupContext =
|
|
12019
|
+
var SwitchLayoutGroupContext = React18.createContext({});
|
|
11942
12020
|
|
|
11943
12021
|
// node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs
|
|
11944
12022
|
function useVisualElement(Component2, visualState, props, createVisualElement, ProjectionNodeConstructor) {
|
|
11945
|
-
const { visualElement: parent } =
|
|
11946
|
-
const lazyContext =
|
|
11947
|
-
const presenceContext =
|
|
11948
|
-
const reducedMotionConfig =
|
|
11949
|
-
const visualElementRef =
|
|
12023
|
+
const { visualElement: parent } = React18.useContext(MotionContext);
|
|
12024
|
+
const lazyContext = React18.useContext(LazyContext);
|
|
12025
|
+
const presenceContext = React18.useContext(PresenceContext);
|
|
12026
|
+
const reducedMotionConfig = React18.useContext(MotionConfigContext).reducedMotion;
|
|
12027
|
+
const visualElementRef = React18.useRef(null);
|
|
11950
12028
|
createVisualElement = createVisualElement || lazyContext.renderer;
|
|
11951
12029
|
if (!visualElementRef.current && createVisualElement) {
|
|
11952
12030
|
visualElementRef.current = createVisualElement(Component2, {
|
|
@@ -11959,18 +12037,18 @@ function useVisualElement(Component2, visualState, props, createVisualElement, P
|
|
|
11959
12037
|
});
|
|
11960
12038
|
}
|
|
11961
12039
|
const visualElement = visualElementRef.current;
|
|
11962
|
-
const initialLayoutGroupConfig =
|
|
12040
|
+
const initialLayoutGroupConfig = React18.useContext(SwitchLayoutGroupContext);
|
|
11963
12041
|
if (visualElement && !visualElement.projection && ProjectionNodeConstructor && (visualElement.type === "html" || visualElement.type === "svg")) {
|
|
11964
12042
|
createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);
|
|
11965
12043
|
}
|
|
11966
|
-
const isMounted =
|
|
11967
|
-
|
|
12044
|
+
const isMounted = React18.useRef(false);
|
|
12045
|
+
React18.useInsertionEffect(() => {
|
|
11968
12046
|
if (visualElement && isMounted.current) {
|
|
11969
12047
|
visualElement.update(props, presenceContext);
|
|
11970
12048
|
}
|
|
11971
12049
|
});
|
|
11972
12050
|
const optimisedAppearId = props[optimizedAppearDataAttribute];
|
|
11973
|
-
const wantsHandoff =
|
|
12051
|
+
const wantsHandoff = React18.useRef(Boolean(optimisedAppearId) && !window.MotionHandoffIsComplete?.(optimisedAppearId) && window.MotionHasOptimisedAnimation?.(optimisedAppearId));
|
|
11974
12052
|
useIsomorphicLayoutEffect(() => {
|
|
11975
12053
|
if (!visualElement)
|
|
11976
12054
|
return;
|
|
@@ -11982,7 +12060,7 @@ function useVisualElement(Component2, visualState, props, createVisualElement, P
|
|
|
11982
12060
|
visualElement.animationState.animateChanges();
|
|
11983
12061
|
}
|
|
11984
12062
|
});
|
|
11985
|
-
|
|
12063
|
+
React18.useEffect(() => {
|
|
11986
12064
|
if (!visualElement)
|
|
11987
12065
|
return;
|
|
11988
12066
|
if (!wantsHandoff.current && visualElement.animationState) {
|
|
@@ -12031,7 +12109,7 @@ function createRendererMotionComponent({ preloadedFeatures, createVisualElement,
|
|
|
12031
12109
|
function MotionComponent(props, externalRef) {
|
|
12032
12110
|
let MeasureLayout2;
|
|
12033
12111
|
const configAndProps = {
|
|
12034
|
-
...
|
|
12112
|
+
...React18.useContext(MotionConfigContext),
|
|
12035
12113
|
...props,
|
|
12036
12114
|
layoutId: useLayoutId(props)
|
|
12037
12115
|
};
|
|
@@ -12047,16 +12125,16 @@ function createRendererMotionComponent({ preloadedFeatures, createVisualElement,
|
|
|
12047
12125
|
return jsxRuntime.jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout2 && context.visualElement ? jsxRuntime.jsx(MeasureLayout2, { visualElement: context.visualElement, ...configAndProps }) : null, useRender(Component2, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] });
|
|
12048
12126
|
}
|
|
12049
12127
|
MotionComponent.displayName = `motion.${typeof Component2 === "string" ? Component2 : `create(${Component2.displayName ?? Component2.name ?? ""})`}`;
|
|
12050
|
-
const ForwardRefMotionComponent =
|
|
12128
|
+
const ForwardRefMotionComponent = React18.forwardRef(MotionComponent);
|
|
12051
12129
|
ForwardRefMotionComponent[motionComponentSymbol] = Component2;
|
|
12052
12130
|
return ForwardRefMotionComponent;
|
|
12053
12131
|
}
|
|
12054
12132
|
function useLayoutId({ layoutId }) {
|
|
12055
|
-
const layoutGroupId =
|
|
12133
|
+
const layoutGroupId = React18.useContext(LayoutGroupContext).id;
|
|
12056
12134
|
return layoutGroupId && layoutId !== void 0 ? layoutGroupId + "-" + layoutId : layoutId;
|
|
12057
12135
|
}
|
|
12058
12136
|
function useStrictMode(configAndProps, preloadedFeatures) {
|
|
12059
|
-
const isStrict =
|
|
12137
|
+
const isStrict = React18.useContext(LazyContext).strict;
|
|
12060
12138
|
if (process.env.NODE_ENV !== "production" && preloadedFeatures && isStrict) {
|
|
12061
12139
|
const strictMessage = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
12062
12140
|
configAndProps.ignoreStrict ? warning(false, strictMessage) : invariant(false, strictMessage);
|
|
@@ -12185,7 +12263,7 @@ function copyRawValuesOnly(target, source, props) {
|
|
|
12185
12263
|
}
|
|
12186
12264
|
}
|
|
12187
12265
|
function useInitialMotionValues({ transformTemplate }, visualState) {
|
|
12188
|
-
return
|
|
12266
|
+
return React18.useMemo(() => {
|
|
12189
12267
|
const state = createHtmlRenderState();
|
|
12190
12268
|
buildHTMLStyles(state, visualState, transformTemplate);
|
|
12191
12269
|
return Object.assign({}, state.vars, state.style);
|
|
@@ -12286,7 +12364,7 @@ var isSVGTag = (tag) => typeof tag === "string" && tag.toLowerCase() === "svg";
|
|
|
12286
12364
|
|
|
12287
12365
|
// node_modules/framer-motion/dist/es/render/svg/use-props.mjs
|
|
12288
12366
|
function useSVGProps(props, visualState, _isStatic, Component2) {
|
|
12289
|
-
const visualProps =
|
|
12367
|
+
const visualProps = React18.useMemo(() => {
|
|
12290
12368
|
const state = createSvgRenderState();
|
|
12291
12369
|
buildSVGAttrs(state, visualState, isSVGTag(Component2), props.transformTemplate, props.style);
|
|
12292
12370
|
return {
|
|
@@ -12364,10 +12442,10 @@ function createUseRender(forwardMotionProps = false) {
|
|
|
12364
12442
|
const useVisualProps = isSVGComponent(Component2) ? useSVGProps : useHTMLProps;
|
|
12365
12443
|
const visualProps = useVisualProps(props, latestValues, isStatic, Component2);
|
|
12366
12444
|
const filteredProps = filterProps(props, typeof Component2 === "string", forwardMotionProps);
|
|
12367
|
-
const elementProps = Component2 !==
|
|
12445
|
+
const elementProps = Component2 !== React18.Fragment ? { ...filteredProps, ...visualProps, ref } : {};
|
|
12368
12446
|
const { children } = props;
|
|
12369
|
-
const renderedChildren =
|
|
12370
|
-
return
|
|
12447
|
+
const renderedChildren = React18.useMemo(() => isMotionValue(children) ? children.get() : children, [children]);
|
|
12448
|
+
return React18.createElement(Component2, {
|
|
12371
12449
|
...elementProps,
|
|
12372
12450
|
children: renderedChildren
|
|
12373
12451
|
});
|
|
@@ -12413,8 +12491,8 @@ function makeState({ scrapeMotionValuesFromProps: scrapeMotionValuesFromProps3,
|
|
|
12413
12491
|
return state;
|
|
12414
12492
|
}
|
|
12415
12493
|
var makeUseVisualState = (config) => (props, isStatic) => {
|
|
12416
|
-
const context =
|
|
12417
|
-
const presenceContext =
|
|
12494
|
+
const context = React18.useContext(MotionContext);
|
|
12495
|
+
const presenceContext = React18.useContext(PresenceContext);
|
|
12418
12496
|
const make = () => makeState(config, props, context, presenceContext);
|
|
12419
12497
|
return isStatic ? make() : useConstant(make);
|
|
12420
12498
|
};
|
|
@@ -14022,7 +14100,7 @@ var correctBoxShadow = {
|
|
|
14022
14100
|
|
|
14023
14101
|
// node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs
|
|
14024
14102
|
var hasTakenAnySnapshot = false;
|
|
14025
|
-
var MeasureLayoutWithContext = class extends
|
|
14103
|
+
var MeasureLayoutWithContext = class extends React18.Component {
|
|
14026
14104
|
/**
|
|
14027
14105
|
* This only mounts projection nodes for components that
|
|
14028
14106
|
* need measuring, we might want to do it for all components
|
|
@@ -14109,8 +14187,8 @@ var MeasureLayoutWithContext = class extends React16.Component {
|
|
|
14109
14187
|
};
|
|
14110
14188
|
function MeasureLayout(props) {
|
|
14111
14189
|
const [isPresent, safeToRemove] = usePresence();
|
|
14112
|
-
const layoutGroup =
|
|
14113
|
-
return jsxRuntime.jsx(MeasureLayoutWithContext, { ...props, layoutGroup, switchLayoutGroup:
|
|
14190
|
+
const layoutGroup = React18.useContext(LayoutGroupContext);
|
|
14191
|
+
return jsxRuntime.jsx(MeasureLayoutWithContext, { ...props, layoutGroup, switchLayoutGroup: React18.useContext(SwitchLayoutGroupContext), isPresent, safeToRemove });
|
|
14114
14192
|
}
|
|
14115
14193
|
var defaultScaleCorrectors = {
|
|
14116
14194
|
borderRadius: {
|
|
@@ -16260,7 +16338,7 @@ var SVGVisualElement = class extends DOMVisualElement {
|
|
|
16260
16338
|
// node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs
|
|
16261
16339
|
var createDomVisualElement = (Component2, options) => {
|
|
16262
16340
|
return isSVGComponent(Component2) ? new SVGVisualElement(options) : new HTMLVisualElement(options, {
|
|
16263
|
-
allowProjection: Component2 !==
|
|
16341
|
+
allowProjection: Component2 !== React18.Fragment
|
|
16264
16342
|
});
|
|
16265
16343
|
};
|
|
16266
16344
|
|
|
@@ -16288,13 +16366,13 @@ function NavbarDivider({ className, ...props }) {
|
|
|
16288
16366
|
);
|
|
16289
16367
|
}
|
|
16290
16368
|
function NavbarSection({ className, ...props }) {
|
|
16291
|
-
const id3 =
|
|
16369
|
+
const id3 = React18.useId();
|
|
16292
16370
|
return /* @__PURE__ */ jsxRuntime.jsx(LayoutGroup, { id: id3, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, className: clsx21__default.default(className, "flex items-center gap-3") }) });
|
|
16293
16371
|
}
|
|
16294
16372
|
function NavbarSpacer({ className, ...props }) {
|
|
16295
16373
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", ...props, className: clsx21__default.default(className, "-ml-4 flex-1") });
|
|
16296
16374
|
}
|
|
16297
|
-
var NavbarItem =
|
|
16375
|
+
var NavbarItem = React18.forwardRef(function NavbarItem2({
|
|
16298
16376
|
current,
|
|
16299
16377
|
className,
|
|
16300
16378
|
children,
|
|
@@ -16907,7 +16985,7 @@ function SidebarLink({ link, pathname, onLinkClick, depth }) {
|
|
|
16907
16985
|
)) }) })
|
|
16908
16986
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(Link10__default.default, { href: link.href, onClick: onLinkClick, className: baseLinkClasses, children: link.title }) });
|
|
16909
16987
|
}
|
|
16910
|
-
var StepIndicator =
|
|
16988
|
+
var StepIndicator = React18__namespace.forwardRef(
|
|
16911
16989
|
({ className, array, onLinkClick, ...props }, ref) => {
|
|
16912
16990
|
const pathname = navigation.usePathname();
|
|
16913
16991
|
return /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "list", ref, className: cn("w-full", className), ...props, children: array.map((step, stepIdx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17149,7 +17227,7 @@ function StepNavigation({
|
|
|
17149
17227
|
getStatus = defaultGetStatus
|
|
17150
17228
|
}) {
|
|
17151
17229
|
const { formStatus } = useFormStore();
|
|
17152
|
-
const navigationWithStatus =
|
|
17230
|
+
const navigationWithStatus = React18.useMemo(
|
|
17153
17231
|
() => navigation.map((section) => ({
|
|
17154
17232
|
...section,
|
|
17155
17233
|
links: (section.links ?? []).map((link) => ({
|
|
@@ -17182,7 +17260,7 @@ function Slider({
|
|
|
17182
17260
|
max = 100,
|
|
17183
17261
|
...props
|
|
17184
17262
|
}) {
|
|
17185
|
-
const _values =
|
|
17263
|
+
const _values = React18__namespace.useMemo(
|
|
17186
17264
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
17187
17265
|
[value, defaultValue, min, max]
|
|
17188
17266
|
);
|
|
@@ -17508,8 +17586,8 @@ function useActiveSectionObserver(tableOfContents) {
|
|
|
17508
17586
|
const headerHeight = useSelectorHeight("#nsw-header");
|
|
17509
17587
|
const mastheadHeight = useSelectorHeight("#nsw-masthead");
|
|
17510
17588
|
const navigationHeight = useSelectorHeight("#nsw-main-navigation");
|
|
17511
|
-
const [currentSection, setCurrentSection] =
|
|
17512
|
-
|
|
17589
|
+
const [currentSection, setCurrentSection] = React18.useState(null);
|
|
17590
|
+
React18.useEffect(() => {
|
|
17513
17591
|
if (tableOfContents.length === 0) return;
|
|
17514
17592
|
if (!headerHeight) return;
|
|
17515
17593
|
const totalHeight = headerHeight + mastheadHeight + navigationHeight;
|
|
@@ -17550,7 +17628,7 @@ function useActiveSectionObserver(tableOfContents) {
|
|
|
17550
17628
|
cancelAnimationFrame(raf);
|
|
17551
17629
|
};
|
|
17552
17630
|
}, [tableOfContents, headerHeight, mastheadHeight, navigationHeight]);
|
|
17553
|
-
|
|
17631
|
+
React18.useEffect(() => {
|
|
17554
17632
|
const handleResize = () => {
|
|
17555
17633
|
setCurrentSection(null);
|
|
17556
17634
|
};
|
|
@@ -17613,70 +17691,96 @@ function TableOfContents({ tableOfContents }) {
|
|
|
17613
17691
|
)
|
|
17614
17692
|
] }) });
|
|
17615
17693
|
}
|
|
17616
|
-
|
|
17617
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17618
|
-
|
|
17619
|
-
|
|
17620
|
-
|
|
17621
|
-
|
|
17622
|
-
|
|
17623
|
-
|
|
17624
|
-
|
|
17625
|
-
|
|
17626
|
-
|
|
17627
|
-
|
|
17628
|
-
|
|
17629
|
-
|
|
17630
|
-
|
|
17631
|
-
|
|
17632
|
-
|
|
17633
|
-
|
|
17634
|
-
|
|
17635
|
-
|
|
17636
|
-
|
|
17637
|
-
|
|
17638
|
-
className
|
|
17639
|
-
),
|
|
17640
|
-
...props
|
|
17641
|
-
}
|
|
17642
|
-
) });
|
|
17643
|
-
}
|
|
17644
|
-
function TabsTrigger({ className, ...props }) {
|
|
17645
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17646
|
-
TabsPrimitive2__namespace.Trigger,
|
|
17694
|
+
var Tabs2 = (props) => {
|
|
17695
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitives__namespace.Root, { "tremor-id": "tremor-raw", ...props });
|
|
17696
|
+
};
|
|
17697
|
+
Tabs2.displayName = "Tabs";
|
|
17698
|
+
var TabsListVariantContext = React18__namespace.default.createContext("line");
|
|
17699
|
+
var variantStyles2 = {
|
|
17700
|
+
line: cn(
|
|
17701
|
+
// base
|
|
17702
|
+
"flex items-center justify-start border-b",
|
|
17703
|
+
// border color
|
|
17704
|
+
"border-grey-200 dark:border-grey-800"
|
|
17705
|
+
),
|
|
17706
|
+
solid: cn(
|
|
17707
|
+
// base
|
|
17708
|
+
"inline-flex items-center justify-center rounded-md p-1",
|
|
17709
|
+
// background color
|
|
17710
|
+
"bg-grey-100 dark:bg-grey-900"
|
|
17711
|
+
)
|
|
17712
|
+
};
|
|
17713
|
+
var TabsList = React18__namespace.default.forwardRef(
|
|
17714
|
+
({ className, variant = "line", children, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17715
|
+
TabsPrimitives__namespace.List,
|
|
17647
17716
|
{
|
|
17648
|
-
|
|
17649
|
-
className: cn(
|
|
17650
|
-
|
|
17651
|
-
|
|
17652
|
-
"text-grey-800 cursor-pointer border-b-1 border-transparent p-4 text-base font-medium whitespace-nowrap",
|
|
17653
|
-
// Focus
|
|
17654
|
-
"focus:z-10",
|
|
17655
|
-
// Active
|
|
17656
|
-
"data-[state=active]:border-accent-600",
|
|
17657
|
-
// Hover
|
|
17658
|
-
"hover:bg-grey-100 hover:text-grey-850",
|
|
17659
|
-
// Dark mode
|
|
17660
|
-
"dark:text-white",
|
|
17661
|
-
// Dark mode hover
|
|
17662
|
-
"dark:hover:bg-white/10 dark:hover:text-white"
|
|
17663
|
-
],
|
|
17664
|
-
className
|
|
17665
|
-
),
|
|
17666
|
-
...props
|
|
17717
|
+
ref: forwardedRef,
|
|
17718
|
+
className: cn(variantStyles2[variant], className),
|
|
17719
|
+
...props,
|
|
17720
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(TabsListVariantContext.Provider, { value: variant, children })
|
|
17667
17721
|
}
|
|
17668
|
-
)
|
|
17722
|
+
)
|
|
17723
|
+
);
|
|
17724
|
+
TabsList.displayName = "TabsList";
|
|
17725
|
+
function getVariantStyles(tabVariant) {
|
|
17726
|
+
switch (tabVariant) {
|
|
17727
|
+
case "line":
|
|
17728
|
+
return cn(
|
|
17729
|
+
// base
|
|
17730
|
+
"-mb-px items-center justify-center border-b-2 border-transparent px-3 py-2 text-sm font-medium whitespace-nowrap transition-all cursor-pointer",
|
|
17731
|
+
// text color
|
|
17732
|
+
"text-grey-500 dark:text-grey-500",
|
|
17733
|
+
// hover
|
|
17734
|
+
"hover:text-grey-700 dark:hover:text-grey-400 hover:bg-primary-800/10",
|
|
17735
|
+
// border hover
|
|
17736
|
+
"hover:border-grey-300 dark:hover:border-grey-400",
|
|
17737
|
+
// selected
|
|
17738
|
+
"data-[state=active]:border-accent-600 data-[state=active]:text-grey-800",
|
|
17739
|
+
"dark:data-[state=active]:border-accent-500 dark:data-[state=active]:text-grey-200",
|
|
17740
|
+
// disabled
|
|
17741
|
+
"data-disabled:pointer-events-none",
|
|
17742
|
+
"data-disabled:text-grey-300 dark:data-disabled:text-grey-700"
|
|
17743
|
+
);
|
|
17744
|
+
case "solid":
|
|
17745
|
+
return cn(
|
|
17746
|
+
// base
|
|
17747
|
+
"inline-flex items-center justify-center rounded-sm px-3 py-1 text-sm font-medium whitespace-nowrap ring-1 transition-all ring-inset cursor-pointer",
|
|
17748
|
+
// text color
|
|
17749
|
+
"text-grey-500 dark:text-grey-400",
|
|
17750
|
+
// hover
|
|
17751
|
+
"hover:text-grey-700 dark:hover:text-grey-200",
|
|
17752
|
+
// ring
|
|
17753
|
+
"ring-transparent",
|
|
17754
|
+
// selected
|
|
17755
|
+
"data-[state=active]:bg-white data-[state=active]:text-grey-900 data-[state=active]:shadow-sm",
|
|
17756
|
+
"dark:data-[state=active]:bg-grey-950 dark:data-[state=active]:text-grey-50",
|
|
17757
|
+
// disabled
|
|
17758
|
+
"data-disabled:pointer-events-none data-disabled:text-grey-400 data-disabled:opacity-50 dark:data-disabled:text-grey-600"
|
|
17759
|
+
);
|
|
17760
|
+
}
|
|
17669
17761
|
}
|
|
17670
|
-
|
|
17762
|
+
var TabsTrigger = React18__namespace.default.forwardRef(({ className, children, ...props }, forwardedRef) => {
|
|
17763
|
+
const variant = React18__namespace.default.useContext(TabsListVariantContext);
|
|
17671
17764
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17672
|
-
|
|
17765
|
+
TabsPrimitives__namespace.Trigger,
|
|
17673
17766
|
{
|
|
17674
|
-
|
|
17675
|
-
className: cn(
|
|
17676
|
-
...props
|
|
17767
|
+
ref: forwardedRef,
|
|
17768
|
+
className: cn(getVariantStyles(variant), focusRing, className),
|
|
17769
|
+
...props,
|
|
17770
|
+
children
|
|
17677
17771
|
}
|
|
17678
17772
|
);
|
|
17679
|
-
}
|
|
17773
|
+
});
|
|
17774
|
+
TabsTrigger.displayName = "TabsTrigger";
|
|
17775
|
+
var TabsContent = React18__namespace.default.forwardRef(({ className, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17776
|
+
TabsPrimitives__namespace.Content,
|
|
17777
|
+
{
|
|
17778
|
+
ref: forwardedRef,
|
|
17779
|
+
className: cn("outline-hidden", focusRing, className),
|
|
17780
|
+
...props
|
|
17781
|
+
}
|
|
17782
|
+
));
|
|
17783
|
+
TabsContent.displayName = "TabsContent";
|
|
17680
17784
|
function Text({ className, trim = "normal", size = 2, label = false, ...props }) {
|
|
17681
17785
|
const textSizeClasses = {
|
|
17682
17786
|
1: "text-[length:var(--font-size-1)] leading-[var(--line-height-28)] tracking-[var(--letter-spacing-0)]",
|
|
@@ -17805,15 +17909,15 @@ function ThemeColorPaletteContent() {
|
|
|
17805
17909
|
brand,
|
|
17806
17910
|
aboriginal
|
|
17807
17911
|
};
|
|
17808
|
-
const [format, setFormat] =
|
|
17809
|
-
const [viewMode, setViewMode] =
|
|
17810
|
-
const [themeCategory, setThemeCategory] =
|
|
17811
|
-
const [primaryColor, setPrimaryColor] =
|
|
17812
|
-
const [accentColor, setAccentColor] =
|
|
17813
|
-
const [greyColor, setGreyColor] =
|
|
17814
|
-
const [sheetOpen, setSheetOpen] =
|
|
17815
|
-
const [isInitialized, setIsInitialized] =
|
|
17816
|
-
|
|
17912
|
+
const [format, setFormat] = React18.useState("hex");
|
|
17913
|
+
const [viewMode, setViewMode] = React18.useState("grid");
|
|
17914
|
+
const [themeCategory, setThemeCategory] = React18.useState("brand");
|
|
17915
|
+
const [primaryColor, setPrimaryColor] = React18.useState("blue");
|
|
17916
|
+
const [accentColor, setAccentColor] = React18.useState("red");
|
|
17917
|
+
const [greyColor, setGreyColor] = React18.useState("grey");
|
|
17918
|
+
const [sheetOpen, setSheetOpen] = React18.useState(false);
|
|
17919
|
+
const [isInitialized, setIsInitialized] = React18.useState(false);
|
|
17920
|
+
React18.useEffect(() => {
|
|
17817
17921
|
const themeParam = searchParams.get("theme");
|
|
17818
17922
|
const primaryParam = searchParams.get("primary");
|
|
17819
17923
|
const accentParam = searchParams.get("accent");
|
|
@@ -17859,7 +17963,7 @@ function ThemeColorPaletteContent() {
|
|
|
17859
17963
|
}
|
|
17860
17964
|
setIsInitialized(true);
|
|
17861
17965
|
}, [searchParams, themeCategory, primaryColor, accentColor]);
|
|
17862
|
-
const filteredColorThemes =
|
|
17966
|
+
const filteredColorThemes = React18.useMemo(() => {
|
|
17863
17967
|
const filtered = {};
|
|
17864
17968
|
for (const category of Object.keys(colorThemes)) {
|
|
17865
17969
|
filtered[category] = Object.fromEntries(
|
|
@@ -17870,11 +17974,11 @@ function ThemeColorPaletteContent() {
|
|
|
17870
17974
|
}
|
|
17871
17975
|
return filtered;
|
|
17872
17976
|
}, []);
|
|
17873
|
-
const availableAccentColors =
|
|
17977
|
+
const availableAccentColors = React18.useMemo(() => {
|
|
17874
17978
|
const allColors = Object.keys(filteredColorThemes[themeCategory]);
|
|
17875
17979
|
return allColors.filter((color2) => color2 !== primaryColor);
|
|
17876
17980
|
}, [filteredColorThemes, themeCategory, primaryColor]);
|
|
17877
|
-
|
|
17981
|
+
React18.useEffect(() => {
|
|
17878
17982
|
if (!isInitialized) return;
|
|
17879
17983
|
const neutralKey = Object.keys(colorThemes[themeCategory]).find((k) => k.toLowerCase().includes("grey")) ?? "";
|
|
17880
17984
|
if (neutralKey && neutralKey !== greyColor) {
|
|
@@ -17895,7 +17999,7 @@ function ThemeColorPaletteContent() {
|
|
|
17895
17999
|
}
|
|
17896
18000
|
}
|
|
17897
18001
|
}, [themeCategory, primaryColor, accentColor, greyColor, isInitialized]);
|
|
17898
|
-
const currentColorPalette =
|
|
18002
|
+
const currentColorPalette = React18.useMemo(() => {
|
|
17899
18003
|
if (!colorThemes[themeCategory] || !colorThemes[themeCategory][primaryColor] || !colorThemes[themeCategory][accentColor]) {
|
|
17900
18004
|
return [
|
|
17901
18005
|
{
|
|
@@ -17988,22 +18092,22 @@ function ThemeColorPaletteContent() {
|
|
|
17988
18092
|
] });
|
|
17989
18093
|
}
|
|
17990
18094
|
function ThemeColorPalette() {
|
|
17991
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18095
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React18.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(ThemeColorPaletteLoading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(ThemeColorPaletteContent, {}) });
|
|
17992
18096
|
}
|
|
17993
18097
|
function ThemeProvider({ children, ...props }) {
|
|
17994
18098
|
return /* @__PURE__ */ jsxRuntime.jsx(nextThemes.ThemeProvider, { ...props, children });
|
|
17995
18099
|
}
|
|
17996
|
-
var TocContext =
|
|
18100
|
+
var TocContext = React18.createContext({
|
|
17997
18101
|
toc: true,
|
|
17998
18102
|
setToc: () => {
|
|
17999
18103
|
}
|
|
18000
18104
|
});
|
|
18001
18105
|
function TocProvider({ children }) {
|
|
18002
|
-
const [toc, setToc] =
|
|
18106
|
+
const [toc, setToc] = React18.useState(true);
|
|
18003
18107
|
const pathname = navigation.usePathname();
|
|
18004
|
-
const isInitialMount =
|
|
18005
|
-
const tocExplicitlySet =
|
|
18006
|
-
|
|
18108
|
+
const isInitialMount = React18.useRef(true);
|
|
18109
|
+
const tocExplicitlySet = React18.useRef(false);
|
|
18110
|
+
React18.useEffect(() => {
|
|
18007
18111
|
if (isInitialMount.current) {
|
|
18008
18112
|
isInitialMount.current = false;
|
|
18009
18113
|
return;
|
|
@@ -18018,12 +18122,12 @@ function TocProvider({ children }) {
|
|
|
18018
18122
|
return /* @__PURE__ */ jsxRuntime.jsx(TocContext.Provider, { value: { toc, setToc: handleSetToc }, children });
|
|
18019
18123
|
}
|
|
18020
18124
|
function useToc() {
|
|
18021
|
-
return
|
|
18125
|
+
return React18.useContext(TocContext);
|
|
18022
18126
|
}
|
|
18023
18127
|
var THEMES = { light: "", dark: ".dark" };
|
|
18024
|
-
var ChartContext =
|
|
18128
|
+
var ChartContext = React18__namespace.createContext(null);
|
|
18025
18129
|
function useChart() {
|
|
18026
|
-
const context =
|
|
18130
|
+
const context = React18__namespace.useContext(ChartContext);
|
|
18027
18131
|
if (!context) {
|
|
18028
18132
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
18029
18133
|
}
|
|
@@ -18036,7 +18140,7 @@ function ChartContainer({
|
|
|
18036
18140
|
config,
|
|
18037
18141
|
...props
|
|
18038
18142
|
}) {
|
|
18039
|
-
const uniqueId =
|
|
18143
|
+
const uniqueId = React18__namespace.useId();
|
|
18040
18144
|
const chartId = `chart-${id3 || uniqueId.replace(/:/g, "")}`;
|
|
18041
18145
|
return /* @__PURE__ */ jsxRuntime.jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18042
18146
|
"div",
|
|
@@ -18095,7 +18199,7 @@ function ChartTooltipContent({
|
|
|
18095
18199
|
labelKey
|
|
18096
18200
|
}) {
|
|
18097
18201
|
const { config } = useChart();
|
|
18098
|
-
const tooltipLabel =
|
|
18202
|
+
const tooltipLabel = React18__namespace.useMemo(() => {
|
|
18099
18203
|
if (hideLabel || !payload?.length) {
|
|
18100
18204
|
return null;
|
|
18101
18205
|
}
|
|
@@ -18335,7 +18439,7 @@ function hasOnlyOneValueForKey(array, keyToCheck) {
|
|
|
18335
18439
|
return true;
|
|
18336
18440
|
}
|
|
18337
18441
|
var useOnWindowResize = (handler) => {
|
|
18338
|
-
|
|
18442
|
+
React18__namespace.useEffect(() => {
|
|
18339
18443
|
const handleResize = () => {
|
|
18340
18444
|
handler();
|
|
18341
18445
|
};
|
|
@@ -18390,9 +18494,9 @@ var LegendItem = ({ name, color: color2, onClick, activeLegend }) => {
|
|
|
18390
18494
|
};
|
|
18391
18495
|
var ScrollButton = ({ icon, onClick, disabled }) => {
|
|
18392
18496
|
const Icon2 = icon;
|
|
18393
|
-
const [isPressed, setIsPressed] =
|
|
18394
|
-
const intervalRef =
|
|
18395
|
-
|
|
18497
|
+
const [isPressed, setIsPressed] = React18__namespace.default.useState(false);
|
|
18498
|
+
const intervalRef = React18__namespace.default.useRef(null);
|
|
18499
|
+
React18__namespace.default.useEffect(() => {
|
|
18396
18500
|
if (isPressed) {
|
|
18397
18501
|
intervalRef.current = setInterval(() => {
|
|
18398
18502
|
onClick?.();
|
|
@@ -18402,7 +18506,7 @@ var ScrollButton = ({ icon, onClick, disabled }) => {
|
|
|
18402
18506
|
}
|
|
18403
18507
|
return () => clearInterval(intervalRef.current);
|
|
18404
18508
|
}, [isPressed, onClick]);
|
|
18405
|
-
|
|
18509
|
+
React18__namespace.default.useEffect(() => {
|
|
18406
18510
|
if (disabled) {
|
|
18407
18511
|
clearInterval(intervalRef.current);
|
|
18408
18512
|
setIsPressed(false);
|
|
@@ -18434,7 +18538,7 @@ var ScrollButton = ({ icon, onClick, disabled }) => {
|
|
|
18434
18538
|
}
|
|
18435
18539
|
);
|
|
18436
18540
|
};
|
|
18437
|
-
var Legend4 =
|
|
18541
|
+
var Legend4 = React18__namespace.default.forwardRef((props, ref) => {
|
|
18438
18542
|
const {
|
|
18439
18543
|
categories,
|
|
18440
18544
|
colors: colors3 = AvailableChartColors,
|
|
@@ -18444,19 +18548,19 @@ var Legend4 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
18444
18548
|
enableLegendSlider = false,
|
|
18445
18549
|
...other
|
|
18446
18550
|
} = props;
|
|
18447
|
-
const scrollableRef =
|
|
18448
|
-
const scrollButtonsRef =
|
|
18449
|
-
const [hasScroll, setHasScroll] =
|
|
18450
|
-
const [isKeyDowned, setIsKeyDowned] =
|
|
18451
|
-
const intervalRef =
|
|
18452
|
-
const checkScroll =
|
|
18551
|
+
const scrollableRef = React18__namespace.default.useRef(null);
|
|
18552
|
+
const scrollButtonsRef = React18__namespace.default.useRef(null);
|
|
18553
|
+
const [hasScroll, setHasScroll] = React18__namespace.default.useState(null);
|
|
18554
|
+
const [isKeyDowned, setIsKeyDowned] = React18__namespace.default.useState(null);
|
|
18555
|
+
const intervalRef = React18__namespace.default.useRef(null);
|
|
18556
|
+
const checkScroll = React18__namespace.default.useCallback(() => {
|
|
18453
18557
|
const scrollable = scrollableRef?.current;
|
|
18454
18558
|
if (!scrollable) return;
|
|
18455
18559
|
const hasLeftScroll = scrollable.scrollLeft > 0;
|
|
18456
18560
|
const hasRightScroll = scrollable.scrollWidth - scrollable.clientWidth > scrollable.scrollLeft;
|
|
18457
18561
|
setHasScroll({ left: hasLeftScroll, right: hasRightScroll });
|
|
18458
18562
|
}, [setHasScroll]);
|
|
18459
|
-
const scrollToTest =
|
|
18563
|
+
const scrollToTest = React18__namespace.default.useCallback(
|
|
18460
18564
|
(direction) => {
|
|
18461
18565
|
const element = scrollableRef?.current;
|
|
18462
18566
|
const scrollButtons = scrollButtonsRef?.current;
|
|
@@ -18474,7 +18578,7 @@ var Legend4 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
18474
18578
|
},
|
|
18475
18579
|
[enableLegendSlider, checkScroll]
|
|
18476
18580
|
);
|
|
18477
|
-
|
|
18581
|
+
React18__namespace.default.useEffect(() => {
|
|
18478
18582
|
const keyDownHandler = (key) => {
|
|
18479
18583
|
if (key === "ArrowLeft") {
|
|
18480
18584
|
scrollToTest("left");
|
|
@@ -18503,7 +18607,7 @@ var Legend4 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
18503
18607
|
e.stopPropagation();
|
|
18504
18608
|
setIsKeyDowned(null);
|
|
18505
18609
|
};
|
|
18506
|
-
|
|
18610
|
+
React18__namespace.default.useEffect(() => {
|
|
18507
18611
|
const scrollable = scrollableRef?.current;
|
|
18508
18612
|
if (enableLegendSlider) {
|
|
18509
18613
|
checkScroll();
|
|
@@ -18576,7 +18680,7 @@ var Legend4 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
18576
18680
|
});
|
|
18577
18681
|
Legend4.displayName = "Legend";
|
|
18578
18682
|
var ChartLegend2 = ({ payload }, categoryColors, setLegendHeight, activeLegend, onClick, enableLegendSlider, legendPosition, yAxisWidth) => {
|
|
18579
|
-
const legendRef =
|
|
18683
|
+
const legendRef = React18__namespace.default.useRef(null);
|
|
18580
18684
|
useOnWindowResize(() => {
|
|
18581
18685
|
const calculateHeight = (height) => height ? Number(height) + 15 : 60;
|
|
18582
18686
|
setLegendHeight(calculateHeight(legendRef.current?.clientHeight));
|
|
@@ -18677,7 +18781,7 @@ var ChartTooltip2 = ({ active, payload, label, valueFormatter }) => {
|
|
|
18677
18781
|
}
|
|
18678
18782
|
return null;
|
|
18679
18783
|
};
|
|
18680
|
-
var AreaChart =
|
|
18784
|
+
var AreaChart = React18__namespace.default.forwardRef((props, ref) => {
|
|
18681
18785
|
const {
|
|
18682
18786
|
data = [],
|
|
18683
18787
|
categories = [],
|
|
@@ -18712,16 +18816,16 @@ var AreaChart = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
18712
18816
|
} = props;
|
|
18713
18817
|
const CustomTooltip = customTooltip;
|
|
18714
18818
|
const paddingValue = !showXAxis && !showYAxis || startEndOnly && !showYAxis ? 0 : 20;
|
|
18715
|
-
const [legendHeight, setLegendHeight] =
|
|
18716
|
-
const [activeDot, setActiveDot] =
|
|
18717
|
-
const [activeLegend, setActiveLegend] =
|
|
18819
|
+
const [legendHeight, setLegendHeight] = React18__namespace.default.useState(60);
|
|
18820
|
+
const [activeDot, setActiveDot] = React18__namespace.default.useState(void 0);
|
|
18821
|
+
const [activeLegend, setActiveLegend] = React18__namespace.default.useState(void 0);
|
|
18718
18822
|
const categoryColors = constructCategoryColors(categories, colors3);
|
|
18719
18823
|
const yAxisDomain = getYAxisDomain(autoMinValue, minValue, maxValue);
|
|
18720
18824
|
const hasOnValueChange = !!onValueChange;
|
|
18721
18825
|
const stacked = type === "stacked" || type === "percent";
|
|
18722
|
-
const areaId =
|
|
18723
|
-
const prevActiveRef =
|
|
18724
|
-
const prevLabelRef =
|
|
18826
|
+
const areaId = React18__namespace.default.useId();
|
|
18827
|
+
const prevActiveRef = React18__namespace.default.useRef(void 0);
|
|
18828
|
+
const prevLabelRef = React18__namespace.default.useRef(void 0);
|
|
18725
18829
|
const getFillContent = ({
|
|
18726
18830
|
fillType,
|
|
18727
18831
|
activeDot: activeDot2,
|
|
@@ -18922,7 +19026,7 @@ var AreaChart = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
18922
19026
|
) : null,
|
|
18923
19027
|
categories.map((category) => {
|
|
18924
19028
|
const categoryId = `${areaId}-${category.replace(/[^a-zA-Z0-9]/g, "")}`;
|
|
18925
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19029
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React18__namespace.default.Fragment, { children: [
|
|
18926
19030
|
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18927
19031
|
"linearGradient",
|
|
18928
19032
|
{
|
|
@@ -19024,7 +19128,7 @@ var AreaChart = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
19024
19128
|
index2
|
|
19025
19129
|
);
|
|
19026
19130
|
}
|
|
19027
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
19131
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React18__namespace.default.Fragment, {}, index2);
|
|
19028
19132
|
},
|
|
19029
19133
|
name: category,
|
|
19030
19134
|
type: "linear",
|
|
@@ -19149,9 +19253,9 @@ var LegendItem2 = ({ name, color: color2, onClick, activeLegend }) => {
|
|
|
19149
19253
|
};
|
|
19150
19254
|
var ScrollButton2 = ({ icon, onClick, disabled }) => {
|
|
19151
19255
|
const Icon2 = icon;
|
|
19152
|
-
const [isPressed, setIsPressed] =
|
|
19153
|
-
const intervalRef =
|
|
19154
|
-
|
|
19256
|
+
const [isPressed, setIsPressed] = React18__namespace.default.useState(false);
|
|
19257
|
+
const intervalRef = React18__namespace.default.useRef(null);
|
|
19258
|
+
React18__namespace.default.useEffect(() => {
|
|
19155
19259
|
if (isPressed) {
|
|
19156
19260
|
intervalRef.current = setInterval(() => {
|
|
19157
19261
|
onClick?.();
|
|
@@ -19161,7 +19265,7 @@ var ScrollButton2 = ({ icon, onClick, disabled }) => {
|
|
|
19161
19265
|
}
|
|
19162
19266
|
return () => clearInterval(intervalRef.current);
|
|
19163
19267
|
}, [isPressed, onClick]);
|
|
19164
|
-
|
|
19268
|
+
React18__namespace.default.useEffect(() => {
|
|
19165
19269
|
if (disabled) {
|
|
19166
19270
|
clearInterval(intervalRef.current);
|
|
19167
19271
|
setIsPressed(false);
|
|
@@ -19193,7 +19297,7 @@ var ScrollButton2 = ({ icon, onClick, disabled }) => {
|
|
|
19193
19297
|
}
|
|
19194
19298
|
);
|
|
19195
19299
|
};
|
|
19196
|
-
var Legend5 =
|
|
19300
|
+
var Legend5 = React18__namespace.default.forwardRef((props, ref) => {
|
|
19197
19301
|
const {
|
|
19198
19302
|
categories,
|
|
19199
19303
|
colors: colors3 = AvailableChartColors,
|
|
@@ -19203,19 +19307,19 @@ var Legend5 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
19203
19307
|
enableLegendSlider = false,
|
|
19204
19308
|
...other
|
|
19205
19309
|
} = props;
|
|
19206
|
-
const scrollableRef =
|
|
19207
|
-
const scrollButtonsRef =
|
|
19208
|
-
const [hasScroll, setHasScroll] =
|
|
19209
|
-
const [isKeyDowned, setIsKeyDowned] =
|
|
19210
|
-
const intervalRef =
|
|
19211
|
-
const checkScroll =
|
|
19310
|
+
const scrollableRef = React18__namespace.default.useRef(null);
|
|
19311
|
+
const scrollButtonsRef = React18__namespace.default.useRef(null);
|
|
19312
|
+
const [hasScroll, setHasScroll] = React18__namespace.default.useState(null);
|
|
19313
|
+
const [isKeyDowned, setIsKeyDowned] = React18__namespace.default.useState(null);
|
|
19314
|
+
const intervalRef = React18__namespace.default.useRef(null);
|
|
19315
|
+
const checkScroll = React18__namespace.default.useCallback(() => {
|
|
19212
19316
|
const scrollable = scrollableRef?.current;
|
|
19213
19317
|
if (!scrollable) return;
|
|
19214
19318
|
const hasLeftScroll = scrollable.scrollLeft > 0;
|
|
19215
19319
|
const hasRightScroll = scrollable.scrollWidth - scrollable.clientWidth > scrollable.scrollLeft;
|
|
19216
19320
|
setHasScroll({ left: hasLeftScroll, right: hasRightScroll });
|
|
19217
19321
|
}, [setHasScroll]);
|
|
19218
|
-
const scrollToTest =
|
|
19322
|
+
const scrollToTest = React18__namespace.default.useCallback(
|
|
19219
19323
|
(direction) => {
|
|
19220
19324
|
const element = scrollableRef?.current;
|
|
19221
19325
|
const scrollButtons = scrollButtonsRef?.current;
|
|
@@ -19233,7 +19337,7 @@ var Legend5 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
19233
19337
|
},
|
|
19234
19338
|
[enableLegendSlider, checkScroll]
|
|
19235
19339
|
);
|
|
19236
|
-
|
|
19340
|
+
React18__namespace.default.useEffect(() => {
|
|
19237
19341
|
const keyDownHandler = (key) => {
|
|
19238
19342
|
if (key === "ArrowLeft") {
|
|
19239
19343
|
scrollToTest("left");
|
|
@@ -19262,7 +19366,7 @@ var Legend5 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
19262
19366
|
e.stopPropagation();
|
|
19263
19367
|
setIsKeyDowned(null);
|
|
19264
19368
|
};
|
|
19265
|
-
|
|
19369
|
+
React18__namespace.default.useEffect(() => {
|
|
19266
19370
|
const scrollable = scrollableRef?.current;
|
|
19267
19371
|
if (enableLegendSlider) {
|
|
19268
19372
|
checkScroll();
|
|
@@ -19335,7 +19439,7 @@ var Legend5 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
19335
19439
|
});
|
|
19336
19440
|
Legend5.displayName = "Legend";
|
|
19337
19441
|
var ChartLegend3 = ({ payload }, categoryColors, setLegendHeight, activeLegend, onClick, enableLegendSlider, legendPosition, yAxisWidth) => {
|
|
19338
|
-
const legendRef =
|
|
19442
|
+
const legendRef = React18__namespace.default.useRef(null);
|
|
19339
19443
|
useOnWindowResize(() => {
|
|
19340
19444
|
const calculateHeight = (height) => height ? Number(height) + 15 : 60;
|
|
19341
19445
|
setLegendHeight(calculateHeight(legendRef.current?.clientHeight));
|
|
@@ -19435,7 +19539,7 @@ var ChartTooltip3 = ({ active, payload, label, valueFormatter }) => {
|
|
|
19435
19539
|
}
|
|
19436
19540
|
return null;
|
|
19437
19541
|
};
|
|
19438
|
-
var BarChart =
|
|
19542
|
+
var BarChart = React18__namespace.default.forwardRef((props, forwardedRef) => {
|
|
19439
19543
|
const {
|
|
19440
19544
|
data = [],
|
|
19441
19545
|
categories = [],
|
|
@@ -19470,15 +19574,15 @@ var BarChart = React16__namespace.default.forwardRef((props, forwardedRef) => {
|
|
|
19470
19574
|
} = props;
|
|
19471
19575
|
const CustomTooltip = customTooltip;
|
|
19472
19576
|
const paddingValue = !showXAxis && !showYAxis || startEndOnly && !showYAxis ? 0 : 20;
|
|
19473
|
-
const [legendHeight, setLegendHeight] =
|
|
19474
|
-
const [activeLegend, setActiveLegend] =
|
|
19577
|
+
const [legendHeight, setLegendHeight] = React18__namespace.default.useState(60);
|
|
19578
|
+
const [activeLegend, setActiveLegend] = React18__namespace.default.useState(void 0);
|
|
19475
19579
|
const categoryColors = constructCategoryColors(categories, colors3);
|
|
19476
|
-
const [activeBar, setActiveBar] =
|
|
19580
|
+
const [activeBar, setActiveBar] = React18__namespace.default.useState(void 0);
|
|
19477
19581
|
const yAxisDomain = getYAxisDomain(autoMinValue, minValue, maxValue);
|
|
19478
19582
|
const hasOnValueChange = !!onValueChange;
|
|
19479
19583
|
const stacked = type === "stacked" || type === "percent";
|
|
19480
|
-
const prevActiveRef =
|
|
19481
|
-
const prevLabelRef =
|
|
19584
|
+
const prevActiveRef = React18__namespace.default.useRef(void 0);
|
|
19585
|
+
const prevLabelRef = React18__namespace.default.useRef(void 0);
|
|
19482
19586
|
function valueToPercent(value) {
|
|
19483
19587
|
return `${(value * 100).toFixed(0)}%`;
|
|
19484
19588
|
}
|
|
@@ -19726,7 +19830,7 @@ function BarListInner({
|
|
|
19726
19830
|
...props
|
|
19727
19831
|
}, forwardedRef) {
|
|
19728
19832
|
const Component2 = onValueChange ? "button" : "div";
|
|
19729
|
-
const sortedData =
|
|
19833
|
+
const sortedData = React18__namespace.default.useMemo(() => {
|
|
19730
19834
|
if (sortOrder === "none") {
|
|
19731
19835
|
return data;
|
|
19732
19836
|
}
|
|
@@ -19734,7 +19838,7 @@ function BarListInner({
|
|
|
19734
19838
|
return sortOrder === "ascending" ? a.value - b.value : b.value - a.value;
|
|
19735
19839
|
});
|
|
19736
19840
|
}, [data, sortOrder]);
|
|
19737
|
-
const widths =
|
|
19841
|
+
const widths = React18__namespace.default.useMemo(() => {
|
|
19738
19842
|
const maxValue = Math.max(...sortedData.map((item) => item.value), 0);
|
|
19739
19843
|
return sortedData.map(
|
|
19740
19844
|
(item) => item.value === 0 ? 0 : Math.max(item.value / maxValue * 100, 2)
|
|
@@ -19848,8 +19952,8 @@ function BarListInner({
|
|
|
19848
19952
|
);
|
|
19849
19953
|
}
|
|
19850
19954
|
BarListInner.displayName = "BarList";
|
|
19851
|
-
var BarList =
|
|
19852
|
-
var Tooltip5 =
|
|
19955
|
+
var BarList = React18__namespace.default.forwardRef(BarListInner);
|
|
19956
|
+
var Tooltip5 = React18__namespace.default.forwardRef(
|
|
19853
19957
|
({
|
|
19854
19958
|
children,
|
|
19855
19959
|
className,
|
|
@@ -19942,7 +20046,7 @@ var formatNumber = (num) => {
|
|
|
19942
20046
|
return num.toFixed(1);
|
|
19943
20047
|
};
|
|
19944
20048
|
var BarLabels = ({ values }) => {
|
|
19945
|
-
const sumValues =
|
|
20049
|
+
const sumValues = React18__namespace.default.useMemo(() => sumNumericArray(values), [values]);
|
|
19946
20050
|
let prefixSum = 0;
|
|
19947
20051
|
let sumConsecutiveHiddenLabels = 0;
|
|
19948
20052
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -19976,20 +20080,20 @@ var BarLabels = ({ values }) => {
|
|
|
19976
20080
|
}
|
|
19977
20081
|
);
|
|
19978
20082
|
};
|
|
19979
|
-
var CategoryBar =
|
|
20083
|
+
var CategoryBar = React18__namespace.default.forwardRef(
|
|
19980
20084
|
({ values = [], colors: colors3 = AvailableChartColors, marker, showLabels = true, className, ...props }, forwardedRef) => {
|
|
19981
|
-
const markerBgColor =
|
|
20085
|
+
const markerBgColor = React18__namespace.default.useMemo(
|
|
19982
20086
|
() => getMarkerBgColor(marker?.value, values, colors3),
|
|
19983
20087
|
[marker, values, colors3]
|
|
19984
20088
|
);
|
|
19985
|
-
const maxValue =
|
|
19986
|
-
const adjustedMarkerValue =
|
|
20089
|
+
const maxValue = React18__namespace.default.useMemo(() => sumNumericArray(values), [values]);
|
|
20090
|
+
const adjustedMarkerValue = React18__namespace.default.useMemo(() => {
|
|
19987
20091
|
if (marker === void 0) return void 0;
|
|
19988
20092
|
if (marker.value < 0) return 0;
|
|
19989
20093
|
if (marker.value > maxValue) return maxValue;
|
|
19990
20094
|
return marker.value;
|
|
19991
20095
|
}, [marker, maxValue]);
|
|
19992
|
-
const markerPositionLeft =
|
|
20096
|
+
const markerPositionLeft = React18__namespace.default.useMemo(
|
|
19993
20097
|
() => getPositionLeft(adjustedMarkerValue, maxValue),
|
|
19994
20098
|
[adjustedMarkerValue, maxValue]
|
|
19995
20099
|
);
|
|
@@ -20149,9 +20253,9 @@ var LegendItem3 = ({ name, color: color2, onClick, activeLegend, chartType }) =>
|
|
|
20149
20253
|
};
|
|
20150
20254
|
var ScrollButton3 = ({ icon, onClick, disabled }) => {
|
|
20151
20255
|
const Icon2 = icon;
|
|
20152
|
-
const [isPressed, setIsPressed] =
|
|
20153
|
-
const intervalRef =
|
|
20154
|
-
|
|
20256
|
+
const [isPressed, setIsPressed] = React18__namespace.default.useState(false);
|
|
20257
|
+
const intervalRef = React18__namespace.default.useRef(null);
|
|
20258
|
+
React18__namespace.default.useEffect(() => {
|
|
20155
20259
|
if (isPressed) {
|
|
20156
20260
|
intervalRef.current = setInterval(() => {
|
|
20157
20261
|
onClick?.();
|
|
@@ -20161,7 +20265,7 @@ var ScrollButton3 = ({ icon, onClick, disabled }) => {
|
|
|
20161
20265
|
}
|
|
20162
20266
|
return () => clearInterval(intervalRef.current);
|
|
20163
20267
|
}, [isPressed, onClick]);
|
|
20164
|
-
|
|
20268
|
+
React18__namespace.default.useEffect(() => {
|
|
20165
20269
|
if (disabled) {
|
|
20166
20270
|
clearInterval(intervalRef.current);
|
|
20167
20271
|
setIsPressed(false);
|
|
@@ -20193,7 +20297,7 @@ var ScrollButton3 = ({ icon, onClick, disabled }) => {
|
|
|
20193
20297
|
}
|
|
20194
20298
|
);
|
|
20195
20299
|
};
|
|
20196
|
-
var Legend6 =
|
|
20300
|
+
var Legend6 = React18__namespace.default.forwardRef((props, ref) => {
|
|
20197
20301
|
const {
|
|
20198
20302
|
categories,
|
|
20199
20303
|
barCategoryColors,
|
|
@@ -20204,18 +20308,18 @@ var Legend6 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
20204
20308
|
className,
|
|
20205
20309
|
...other
|
|
20206
20310
|
} = props;
|
|
20207
|
-
const scrollableRef =
|
|
20208
|
-
const [hasScroll, setHasScroll] =
|
|
20209
|
-
const [isKeyDowned, setIsKeyDowned] =
|
|
20210
|
-
const intervalRef =
|
|
20211
|
-
const checkScroll =
|
|
20311
|
+
const scrollableRef = React18__namespace.default.useRef(null);
|
|
20312
|
+
const [hasScroll, setHasScroll] = React18__namespace.default.useState(null);
|
|
20313
|
+
const [isKeyDowned, setIsKeyDowned] = React18__namespace.default.useState(null);
|
|
20314
|
+
const intervalRef = React18__namespace.default.useRef(null);
|
|
20315
|
+
const checkScroll = React18__namespace.default.useCallback(() => {
|
|
20212
20316
|
const scrollable = scrollableRef?.current;
|
|
20213
20317
|
if (!scrollable) return;
|
|
20214
20318
|
const hasLeftScroll = scrollable.scrollLeft > 0;
|
|
20215
20319
|
const hasRightScroll = scrollable.scrollWidth - scrollable.clientWidth > scrollable.scrollLeft;
|
|
20216
20320
|
setHasScroll({ left: hasLeftScroll, right: hasRightScroll });
|
|
20217
20321
|
}, [setHasScroll]);
|
|
20218
|
-
const scrollToTest =
|
|
20322
|
+
const scrollToTest = React18__namespace.default.useCallback(
|
|
20219
20323
|
(direction) => {
|
|
20220
20324
|
const element = scrollableRef?.current;
|
|
20221
20325
|
const width = element?.clientWidth ?? 0;
|
|
@@ -20231,7 +20335,7 @@ var Legend6 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
20231
20335
|
},
|
|
20232
20336
|
[enableLegendSlider, checkScroll]
|
|
20233
20337
|
);
|
|
20234
|
-
|
|
20338
|
+
React18__namespace.default.useEffect(() => {
|
|
20235
20339
|
const keyDownHandler = (key) => {
|
|
20236
20340
|
if (key === "ArrowLeft") {
|
|
20237
20341
|
scrollToTest("left");
|
|
@@ -20260,7 +20364,7 @@ var Legend6 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
20260
20364
|
e.stopPropagation();
|
|
20261
20365
|
setIsKeyDowned(null);
|
|
20262
20366
|
};
|
|
20263
|
-
|
|
20367
|
+
React18__namespace.default.useEffect(() => {
|
|
20264
20368
|
const scrollable = scrollableRef?.current;
|
|
20265
20369
|
if (enableLegendSlider) {
|
|
20266
20370
|
checkScroll();
|
|
@@ -20337,7 +20441,7 @@ var Legend6 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
20337
20441
|
});
|
|
20338
20442
|
Legend6.displayName = "Legend";
|
|
20339
20443
|
var ChartLegend4 = ({ payload }, barCategoryColors, lineCategoryColors, setLegendHeight, activeLegend, onClick, enableLegendSlider, legendPosition, barYAxisWidth, lineYAxisWidth) => {
|
|
20340
|
-
const legendRef =
|
|
20444
|
+
const legendRef = React18__namespace.default.useRef(null);
|
|
20341
20445
|
useOnWindowResize(() => {
|
|
20342
20446
|
const calculateHeight = (height) => height ? Number(height) + 15 : 60;
|
|
20343
20447
|
setLegendHeight(calculateHeight(legendRef.current?.clientHeight));
|
|
@@ -20456,7 +20560,7 @@ var ChartTooltip4 = ({
|
|
|
20456
20560
|
}
|
|
20457
20561
|
return null;
|
|
20458
20562
|
};
|
|
20459
|
-
var ComboChart =
|
|
20563
|
+
var ComboChart = React18__namespace.default.forwardRef((props, forwardedRef) => {
|
|
20460
20564
|
const defaultSeries = {
|
|
20461
20565
|
categories: [],
|
|
20462
20566
|
colors: AvailableChartColors,
|
|
@@ -20501,11 +20605,11 @@ var ComboChart = React16__namespace.default.forwardRef((props, forwardedRef) =>
|
|
|
20501
20605
|
const mergedLineSeries = { ...defaultLineSeries, ...lineSeries };
|
|
20502
20606
|
const CustomTooltip = customTooltip;
|
|
20503
20607
|
const paddingValue = !showXAxis && !mergedBarSeries.showYAxis && enableBiaxial && !mergedLineSeries.showYAxis || startEndOnly && !mergedBarSeries.showYAxis && enableBiaxial && !mergedLineSeries.showYAxis ? 0 : 20;
|
|
20504
|
-
const [legendHeight, setLegendHeight] =
|
|
20505
|
-
const [activeDot, setActiveDot] =
|
|
20506
|
-
const [activeLegend, setActiveLegend] =
|
|
20507
|
-
const prevActiveRef =
|
|
20508
|
-
const prevLabelRef =
|
|
20608
|
+
const [legendHeight, setLegendHeight] = React18__namespace.default.useState(60);
|
|
20609
|
+
const [activeDot, setActiveDot] = React18__namespace.default.useState(void 0);
|
|
20610
|
+
const [activeLegend, setActiveLegend] = React18__namespace.default.useState(void 0);
|
|
20611
|
+
const prevActiveRef = React18__namespace.default.useRef(void 0);
|
|
20612
|
+
const prevLabelRef = React18__namespace.default.useRef(void 0);
|
|
20509
20613
|
const barCategoryColors = constructCategoryColors(
|
|
20510
20614
|
mergedBarSeries.categories,
|
|
20511
20615
|
mergedBarSeries.colors ?? AvailableChartColors
|
|
@@ -20514,7 +20618,7 @@ var ComboChart = React16__namespace.default.forwardRef((props, forwardedRef) =>
|
|
|
20514
20618
|
mergedLineSeries.categories,
|
|
20515
20619
|
mergedLineSeries.colors ?? AvailableChartColors
|
|
20516
20620
|
);
|
|
20517
|
-
const [activeBar, setActiveBar] =
|
|
20621
|
+
const [activeBar, setActiveBar] = React18__namespace.default.useState(void 0);
|
|
20518
20622
|
const barYAxisDomain = getYAxisDomain(
|
|
20519
20623
|
mergedBarSeries.autoMinValue ?? false,
|
|
20520
20624
|
mergedBarSeries.minValue,
|
|
@@ -20914,7 +21018,7 @@ var ComboChart = React16__namespace.default.forwardRef((props, forwardedRef) =>
|
|
|
20914
21018
|
index2
|
|
20915
21019
|
);
|
|
20916
21020
|
}
|
|
20917
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21021
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React18__namespace.default.Fragment, {}, index2);
|
|
20918
21022
|
},
|
|
20919
21023
|
name: category,
|
|
20920
21024
|
type: "linear",
|
|
@@ -21022,7 +21126,7 @@ var renderInactiveShape = (props) => {
|
|
|
21022
21126
|
}
|
|
21023
21127
|
);
|
|
21024
21128
|
};
|
|
21025
|
-
var DonutChart =
|
|
21129
|
+
var DonutChart = React18__namespace.default.forwardRef(
|
|
21026
21130
|
({
|
|
21027
21131
|
data = [],
|
|
21028
21132
|
value,
|
|
@@ -21040,13 +21144,13 @@ var DonutChart = React16__namespace.default.forwardRef(
|
|
|
21040
21144
|
...other
|
|
21041
21145
|
}, forwardedRef) => {
|
|
21042
21146
|
const CustomTooltip = customTooltip;
|
|
21043
|
-
const [activeIndex, setActiveIndex] =
|
|
21147
|
+
const [activeIndex, setActiveIndex] = React18__namespace.default.useState(void 0);
|
|
21044
21148
|
const isDonut = variant === "donut";
|
|
21045
21149
|
const parsedLabelInput = parseLabelInput(label, valueFormatter, data, value);
|
|
21046
21150
|
const categories = Array.from(new Set(data.map((item) => item[category])));
|
|
21047
21151
|
const categoryColors = constructCategoryColors(categories, colors3);
|
|
21048
|
-
const prevActiveRef =
|
|
21049
|
-
const prevCategoryRef =
|
|
21152
|
+
const prevActiveRef = React18__namespace.default.useRef(void 0);
|
|
21153
|
+
const prevCategoryRef = React18__namespace.default.useRef(void 0);
|
|
21050
21154
|
const handleShapeClick = (data2, index, event) => {
|
|
21051
21155
|
event.stopPropagation();
|
|
21052
21156
|
if (!onValueChange) return;
|
|
@@ -21201,9 +21305,9 @@ var LegendItem4 = ({ name, color: color2, onClick, activeLegend }) => {
|
|
|
21201
21305
|
};
|
|
21202
21306
|
var ScrollButton4 = ({ icon, onClick, disabled }) => {
|
|
21203
21307
|
const Icon2 = icon;
|
|
21204
|
-
const [isPressed, setIsPressed] =
|
|
21205
|
-
const intervalRef =
|
|
21206
|
-
|
|
21308
|
+
const [isPressed, setIsPressed] = React18__namespace.default.useState(false);
|
|
21309
|
+
const intervalRef = React18__namespace.default.useRef(null);
|
|
21310
|
+
React18__namespace.default.useEffect(() => {
|
|
21207
21311
|
if (isPressed) {
|
|
21208
21312
|
intervalRef.current = setInterval(() => {
|
|
21209
21313
|
onClick?.();
|
|
@@ -21213,7 +21317,7 @@ var ScrollButton4 = ({ icon, onClick, disabled }) => {
|
|
|
21213
21317
|
}
|
|
21214
21318
|
return () => clearInterval(intervalRef.current);
|
|
21215
21319
|
}, [isPressed, onClick]);
|
|
21216
|
-
|
|
21320
|
+
React18__namespace.default.useEffect(() => {
|
|
21217
21321
|
if (disabled) {
|
|
21218
21322
|
clearInterval(intervalRef.current);
|
|
21219
21323
|
setIsPressed(false);
|
|
@@ -21245,7 +21349,7 @@ var ScrollButton4 = ({ icon, onClick, disabled }) => {
|
|
|
21245
21349
|
}
|
|
21246
21350
|
);
|
|
21247
21351
|
};
|
|
21248
|
-
var Legend7 =
|
|
21352
|
+
var Legend7 = React18__namespace.default.forwardRef((props, ref) => {
|
|
21249
21353
|
const {
|
|
21250
21354
|
categories,
|
|
21251
21355
|
colors: colors3 = AvailableChartColors,
|
|
@@ -21255,19 +21359,19 @@ var Legend7 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
21255
21359
|
enableLegendSlider = false,
|
|
21256
21360
|
...other
|
|
21257
21361
|
} = props;
|
|
21258
|
-
const scrollableRef =
|
|
21259
|
-
const scrollButtonsRef =
|
|
21260
|
-
const [hasScroll, setHasScroll] =
|
|
21261
|
-
const [isKeyDowned, setIsKeyDowned] =
|
|
21262
|
-
const intervalRef =
|
|
21263
|
-
const checkScroll =
|
|
21362
|
+
const scrollableRef = React18__namespace.default.useRef(null);
|
|
21363
|
+
const scrollButtonsRef = React18__namespace.default.useRef(null);
|
|
21364
|
+
const [hasScroll, setHasScroll] = React18__namespace.default.useState(null);
|
|
21365
|
+
const [isKeyDowned, setIsKeyDowned] = React18__namespace.default.useState(null);
|
|
21366
|
+
const intervalRef = React18__namespace.default.useRef(null);
|
|
21367
|
+
const checkScroll = React18__namespace.default.useCallback(() => {
|
|
21264
21368
|
const scrollable = scrollableRef?.current;
|
|
21265
21369
|
if (!scrollable) return;
|
|
21266
21370
|
const hasLeftScroll = scrollable.scrollLeft > 0;
|
|
21267
21371
|
const hasRightScroll = scrollable.scrollWidth - scrollable.clientWidth > scrollable.scrollLeft;
|
|
21268
21372
|
setHasScroll({ left: hasLeftScroll, right: hasRightScroll });
|
|
21269
21373
|
}, [setHasScroll]);
|
|
21270
|
-
const scrollToTest =
|
|
21374
|
+
const scrollToTest = React18__namespace.default.useCallback(
|
|
21271
21375
|
(direction) => {
|
|
21272
21376
|
const element = scrollableRef?.current;
|
|
21273
21377
|
const scrollButtons = scrollButtonsRef?.current;
|
|
@@ -21285,7 +21389,7 @@ var Legend7 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
21285
21389
|
},
|
|
21286
21390
|
[enableLegendSlider, checkScroll]
|
|
21287
21391
|
);
|
|
21288
|
-
|
|
21392
|
+
React18__namespace.default.useEffect(() => {
|
|
21289
21393
|
const keyDownHandler = (key) => {
|
|
21290
21394
|
if (key === "ArrowLeft") {
|
|
21291
21395
|
scrollToTest("left");
|
|
@@ -21314,7 +21418,7 @@ var Legend7 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
21314
21418
|
e.stopPropagation();
|
|
21315
21419
|
setIsKeyDowned(null);
|
|
21316
21420
|
};
|
|
21317
|
-
|
|
21421
|
+
React18__namespace.default.useEffect(() => {
|
|
21318
21422
|
const scrollable = scrollableRef?.current;
|
|
21319
21423
|
if (enableLegendSlider) {
|
|
21320
21424
|
checkScroll();
|
|
@@ -21387,7 +21491,7 @@ var Legend7 = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
21387
21491
|
});
|
|
21388
21492
|
Legend7.displayName = "Legend";
|
|
21389
21493
|
var ChartLegend5 = ({ payload }, categoryColors, setLegendHeight, activeLegend, onClick, enableLegendSlider, legendPosition, yAxisWidth) => {
|
|
21390
|
-
const legendRef =
|
|
21494
|
+
const legendRef = React18__namespace.default.useRef(null);
|
|
21391
21495
|
useOnWindowResize(() => {
|
|
21392
21496
|
const calculateHeight = (height) => height ? Number(height) + 15 : 60;
|
|
21393
21497
|
setLegendHeight(calculateHeight(legendRef.current?.clientHeight));
|
|
@@ -21489,7 +21593,7 @@ var ChartTooltip6 = ({ active, payload, label, valueFormatter }) => {
|
|
|
21489
21593
|
}
|
|
21490
21594
|
return null;
|
|
21491
21595
|
};
|
|
21492
|
-
var LineChart =
|
|
21596
|
+
var LineChart = React18__namespace.default.forwardRef((props, ref) => {
|
|
21493
21597
|
const {
|
|
21494
21598
|
data = [],
|
|
21495
21599
|
categories = [],
|
|
@@ -21522,14 +21626,14 @@ var LineChart = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
21522
21626
|
} = props;
|
|
21523
21627
|
const CustomTooltip = customTooltip;
|
|
21524
21628
|
const paddingValue = !showXAxis && !showYAxis || startEndOnly && !showYAxis ? 0 : 20;
|
|
21525
|
-
const [legendHeight, setLegendHeight] =
|
|
21526
|
-
const [activeDot, setActiveDot] =
|
|
21527
|
-
const [activeLegend, setActiveLegend] =
|
|
21629
|
+
const [legendHeight, setLegendHeight] = React18__namespace.default.useState(60);
|
|
21630
|
+
const [activeDot, setActiveDot] = React18__namespace.default.useState(void 0);
|
|
21631
|
+
const [activeLegend, setActiveLegend] = React18__namespace.default.useState(void 0);
|
|
21528
21632
|
const categoryColors = constructCategoryColors(categories, colors3);
|
|
21529
21633
|
const yAxisDomain = getYAxisDomain(autoMinValue, minValue, maxValue);
|
|
21530
21634
|
const hasOnValueChange = !!onValueChange;
|
|
21531
|
-
const prevActiveRef =
|
|
21532
|
-
const prevLabelRef =
|
|
21635
|
+
const prevActiveRef = React18__namespace.default.useRef(void 0);
|
|
21636
|
+
const prevLabelRef = React18__namespace.default.useRef(void 0);
|
|
21533
21637
|
function onDotClick(itemData, event) {
|
|
21534
21638
|
event.stopPropagation();
|
|
21535
21639
|
if (!hasOnValueChange) return;
|
|
@@ -21782,7 +21886,7 @@ var LineChart = React16__namespace.default.forwardRef((props, ref) => {
|
|
|
21782
21886
|
index2
|
|
21783
21887
|
);
|
|
21784
21888
|
}
|
|
21785
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21889
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React18__namespace.default.Fragment, {}, index2);
|
|
21786
21890
|
},
|
|
21787
21891
|
name: category,
|
|
21788
21892
|
type: "linear",
|
|
@@ -21856,7 +21960,7 @@ var progressBarVariants = tailwindVariants.tv({
|
|
|
21856
21960
|
variant: "default"
|
|
21857
21961
|
}
|
|
21858
21962
|
});
|
|
21859
|
-
var ProgressBar =
|
|
21963
|
+
var ProgressBar = React18__namespace.default.forwardRef(
|
|
21860
21964
|
({
|
|
21861
21965
|
value = 0,
|
|
21862
21966
|
max = 100,
|
|
@@ -21944,7 +22048,7 @@ var progressCircleVariants = tailwindVariants.tv({
|
|
|
21944
22048
|
variant: "default"
|
|
21945
22049
|
}
|
|
21946
22050
|
});
|
|
21947
|
-
var ProgressCircle =
|
|
22051
|
+
var ProgressCircle = React18__namespace.default.forwardRef(
|
|
21948
22052
|
({
|
|
21949
22053
|
value = 0,
|
|
21950
22054
|
max = 100,
|
|
@@ -22026,7 +22130,7 @@ var ProgressCircle = React16__namespace.default.forwardRef(
|
|
|
22026
22130
|
}
|
|
22027
22131
|
);
|
|
22028
22132
|
ProgressCircle.displayName = "ProgressCircle";
|
|
22029
|
-
var SparkAreaChart =
|
|
22133
|
+
var SparkAreaChart = React18__namespace.default.forwardRef(
|
|
22030
22134
|
(props, forwardedRef) => {
|
|
22031
22135
|
const {
|
|
22032
22136
|
data = [],
|
|
@@ -22045,7 +22149,7 @@ var SparkAreaChart = React16__namespace.default.forwardRef(
|
|
|
22045
22149
|
const categoryColors = constructCategoryColors(categories, colors3);
|
|
22046
22150
|
const yAxisDomain = getYAxisDomain(autoMinValue, minValue, maxValue);
|
|
22047
22151
|
const stacked = type === "stacked" || type === "percent";
|
|
22048
|
-
const areaId =
|
|
22152
|
+
const areaId = React18__namespace.default.useId();
|
|
22049
22153
|
const getFillContent = (fillType) => {
|
|
22050
22154
|
switch (fillType) {
|
|
22051
22155
|
case "none":
|
|
@@ -22084,7 +22188,7 @@ var SparkAreaChart = React16__namespace.default.forwardRef(
|
|
|
22084
22188
|
/* @__PURE__ */ jsxRuntime.jsx(RechartsPrimitive.YAxis, { hide: true, domain: yAxisDomain }),
|
|
22085
22189
|
categories.map((category) => {
|
|
22086
22190
|
const categoryId = `${areaId}-${category.replace(/[^a-zA-Z0-9]/g, "")}`;
|
|
22087
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
22191
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React18__namespace.default.Fragment, { children: [
|
|
22088
22192
|
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
22089
22193
|
"linearGradient",
|
|
22090
22194
|
{
|
|
@@ -22137,7 +22241,7 @@ var SparkAreaChart = React16__namespace.default.forwardRef(
|
|
|
22137
22241
|
}
|
|
22138
22242
|
);
|
|
22139
22243
|
SparkAreaChart.displayName = "SparkAreaChart";
|
|
22140
|
-
var SparkLineChart =
|
|
22244
|
+
var SparkLineChart = React18__namespace.default.forwardRef(
|
|
22141
22245
|
(props, forwardedRef) => {
|
|
22142
22246
|
const {
|
|
22143
22247
|
data = [],
|
|
@@ -22204,7 +22308,7 @@ var SparkLineChart = React16__namespace.default.forwardRef(
|
|
|
22204
22308
|
}
|
|
22205
22309
|
);
|
|
22206
22310
|
SparkLineChart.displayName = "SparkLineChart";
|
|
22207
|
-
var SparkBarChart =
|
|
22311
|
+
var SparkBarChart = React18__namespace.default.forwardRef((props, forwardedRef) => {
|
|
22208
22312
|
const {
|
|
22209
22313
|
data = [],
|
|
22210
22314
|
categories = [],
|
|
@@ -22266,7 +22370,7 @@ var SparkBarChart = React16__namespace.default.forwardRef((props, forwardedRef)
|
|
|
22266
22370
|
});
|
|
22267
22371
|
SparkBarChart.displayName = "SparkBarChart";
|
|
22268
22372
|
var Block = ({ color: color2, tooltip, defaultBackgroundColor, hoverEffect }) => {
|
|
22269
|
-
const [open, setOpen] =
|
|
22373
|
+
const [open, setOpen] = React18__namespace.default.useState(false);
|
|
22270
22374
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
22271
22375
|
HoverCardPrimitives__namespace.Root,
|
|
22272
22376
|
{
|
|
@@ -22309,7 +22413,7 @@ var Block = ({ color: color2, tooltip, defaultBackgroundColor, hoverEffect }) =>
|
|
|
22309
22413
|
);
|
|
22310
22414
|
};
|
|
22311
22415
|
Block.displayName = "Block";
|
|
22312
|
-
var Tracker =
|
|
22416
|
+
var Tracker = React18__namespace.default.forwardRef(
|
|
22313
22417
|
({
|
|
22314
22418
|
data = [],
|
|
22315
22419
|
defaultBackgroundColor = "bg-gray-400 dark:bg-gray-400",
|
|
@@ -22612,8 +22716,8 @@ function CalendarDayButton({
|
|
|
22612
22716
|
...props
|
|
22613
22717
|
}) {
|
|
22614
22718
|
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
22615
|
-
const ref =
|
|
22616
|
-
|
|
22719
|
+
const ref = React18__namespace.useRef(null);
|
|
22720
|
+
React18__namespace.useEffect(() => {
|
|
22617
22721
|
if (modifiers.focused) ref.current?.focus();
|
|
22618
22722
|
}, [modifiers.focused]);
|
|
22619
22723
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -22636,9 +22740,9 @@ function CalendarDayButton({
|
|
|
22636
22740
|
}
|
|
22637
22741
|
);
|
|
22638
22742
|
}
|
|
22639
|
-
var CarouselContext =
|
|
22743
|
+
var CarouselContext = React18__namespace.createContext(null);
|
|
22640
22744
|
function useCarousel() {
|
|
22641
|
-
const context =
|
|
22745
|
+
const context = React18__namespace.useContext(CarouselContext);
|
|
22642
22746
|
if (!context) {
|
|
22643
22747
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
22644
22748
|
}
|
|
@@ -22660,20 +22764,20 @@ function Carousel({
|
|
|
22660
22764
|
},
|
|
22661
22765
|
plugins
|
|
22662
22766
|
);
|
|
22663
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
22664
|
-
const [canScrollNext, setCanScrollNext] =
|
|
22665
|
-
const onSelect =
|
|
22767
|
+
const [canScrollPrev, setCanScrollPrev] = React18__namespace.useState(false);
|
|
22768
|
+
const [canScrollNext, setCanScrollNext] = React18__namespace.useState(false);
|
|
22769
|
+
const onSelect = React18__namespace.useCallback((api2) => {
|
|
22666
22770
|
if (!api2) return;
|
|
22667
22771
|
setCanScrollPrev(api2.canScrollPrev());
|
|
22668
22772
|
setCanScrollNext(api2.canScrollNext());
|
|
22669
22773
|
}, []);
|
|
22670
|
-
const scrollPrev =
|
|
22774
|
+
const scrollPrev = React18__namespace.useCallback(() => {
|
|
22671
22775
|
api?.scrollPrev();
|
|
22672
22776
|
}, [api]);
|
|
22673
|
-
const scrollNext =
|
|
22777
|
+
const scrollNext = React18__namespace.useCallback(() => {
|
|
22674
22778
|
api?.scrollNext();
|
|
22675
22779
|
}, [api]);
|
|
22676
|
-
const handleKeyDown =
|
|
22780
|
+
const handleKeyDown = React18__namespace.useCallback(
|
|
22677
22781
|
(event) => {
|
|
22678
22782
|
if (event.key === "ArrowLeft") {
|
|
22679
22783
|
event.preventDefault();
|
|
@@ -22685,11 +22789,11 @@ function Carousel({
|
|
|
22685
22789
|
},
|
|
22686
22790
|
[scrollPrev, scrollNext]
|
|
22687
22791
|
);
|
|
22688
|
-
|
|
22792
|
+
React18__namespace.useEffect(() => {
|
|
22689
22793
|
if (!api || !setApi) return;
|
|
22690
22794
|
setApi(api);
|
|
22691
22795
|
}, [api, setApi]);
|
|
22692
|
-
|
|
22796
|
+
React18__namespace.useEffect(() => {
|
|
22693
22797
|
if (!api) return;
|
|
22694
22798
|
onSelect(api);
|
|
22695
22799
|
api.on("reInit", onSelect);
|
|
@@ -22858,7 +22962,7 @@ function InputOTPSlot({
|
|
|
22858
22962
|
className,
|
|
22859
22963
|
...props
|
|
22860
22964
|
}) {
|
|
22861
|
-
const inputOTPContext =
|
|
22965
|
+
const inputOTPContext = React18__namespace.useContext(inputOtp.OTPInputContext);
|
|
22862
22966
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
22863
22967
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
22864
22968
|
"div",
|
|
@@ -23014,7 +23118,7 @@ function ListboxOption2({
|
|
|
23014
23118
|
// Avatars
|
|
23015
23119
|
"*:data-[slot=avatar]:-mx-0.5 *:data-[slot=avatar]:size-6 sm:*:data-[slot=avatar]:size-5"
|
|
23016
23120
|
);
|
|
23017
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Headless4__namespace.ListboxOption, { as:
|
|
23121
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Headless4__namespace.ListboxOption, { as: React18.Fragment, ...props, children: ({ selectedOption }) => {
|
|
23018
23122
|
if (selectedOption) {
|
|
23019
23123
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx21__default.default(className, sharedClasses), children });
|
|
23020
23124
|
}
|
|
@@ -23151,17 +23255,17 @@ function MultiLevelPushMenu({
|
|
|
23151
23255
|
initialTitle = "Menu"
|
|
23152
23256
|
}) {
|
|
23153
23257
|
const pathname = navigation.usePathname();
|
|
23154
|
-
const [navigationHistory, setNavigationHistory] =
|
|
23258
|
+
const [navigationHistory, setNavigationHistory] = React18.useState([
|
|
23155
23259
|
{ items: navigation$1 || [], title: initialTitle, depth: 1, id: generateLevelId() }
|
|
23156
23260
|
]);
|
|
23157
|
-
const [animationState, setAnimationState] =
|
|
23158
|
-
const [isAnimationStarted, setIsAnimationStarted] =
|
|
23159
|
-
const containerRef =
|
|
23160
|
-
const breadcrumb =
|
|
23261
|
+
const [animationState, setAnimationState] = React18.useState("idle");
|
|
23262
|
+
const [isAnimationStarted, setIsAnimationStarted] = React18.useState(false);
|
|
23263
|
+
const containerRef = React18.useRef(null);
|
|
23264
|
+
const breadcrumb = React18.useMemo(() => {
|
|
23161
23265
|
const levels = navigationHistory.map((level) => ({ title: level.title, depth: level.depth }));
|
|
23162
23266
|
return generateBreadcrumb(levels);
|
|
23163
23267
|
}, [navigationHistory]);
|
|
23164
|
-
const navigateToSubmenu =
|
|
23268
|
+
const navigateToSubmenu = React18.useCallback(
|
|
23165
23269
|
(item) => {
|
|
23166
23270
|
if (item.links && item.links.length > 0 && animationState === "idle") {
|
|
23167
23271
|
const newLevel = {
|
|
@@ -23187,7 +23291,7 @@ function MultiLevelPushMenu({
|
|
|
23187
23291
|
},
|
|
23188
23292
|
[navigationHistory, animationState, onNavigate]
|
|
23189
23293
|
);
|
|
23190
|
-
const navigateBack =
|
|
23294
|
+
const navigateBack = React18.useCallback(() => {
|
|
23191
23295
|
if (navigationHistory.length > 1 && animationState === "idle") {
|
|
23192
23296
|
setAnimationState("sliding-backward");
|
|
23193
23297
|
setTimeout(() => {
|
|
@@ -23198,7 +23302,7 @@ function MultiLevelPushMenu({
|
|
|
23198
23302
|
}, 300);
|
|
23199
23303
|
}
|
|
23200
23304
|
}, [navigationHistory, animationState, onNavigate]);
|
|
23201
|
-
const handleItemClick =
|
|
23305
|
+
const handleItemClick = React18.useCallback(
|
|
23202
23306
|
(item, event) => {
|
|
23203
23307
|
if (item.links && item.links.length > 0) {
|
|
23204
23308
|
event?.preventDefault();
|
|
@@ -23333,9 +23437,9 @@ function MultiLevelPushMenu({
|
|
|
23333
23437
|
}) }) });
|
|
23334
23438
|
}
|
|
23335
23439
|
function MobileSearch({ navigation: navigation$1 }) {
|
|
23336
|
-
const [open, setOpen] =
|
|
23440
|
+
const [open, setOpen] = React18__namespace.useState(false);
|
|
23337
23441
|
const router = navigation.useRouter();
|
|
23338
|
-
|
|
23442
|
+
React18__namespace.useEffect(() => {
|
|
23339
23443
|
const down = (e) => {
|
|
23340
23444
|
if (e.key === "k" && (e.metaKey || e.ctrlKey)) {
|
|
23341
23445
|
e.preventDefault();
|
|
@@ -23345,7 +23449,7 @@ function MobileSearch({ navigation: navigation$1 }) {
|
|
|
23345
23449
|
document.addEventListener("keydown", down);
|
|
23346
23450
|
return () => document.removeEventListener("keydown", down);
|
|
23347
23451
|
}, []);
|
|
23348
|
-
const runCommand =
|
|
23452
|
+
const runCommand = React18__namespace.useCallback((command) => {
|
|
23349
23453
|
setOpen(false);
|
|
23350
23454
|
command();
|
|
23351
23455
|
}, []);
|
|
@@ -23383,7 +23487,7 @@ function MobileHeader({
|
|
|
23383
23487
|
version = false,
|
|
23384
23488
|
hide = {}
|
|
23385
23489
|
}) {
|
|
23386
|
-
const [open, setOpen] =
|
|
23490
|
+
const [open, setOpen] = React18.useState(false);
|
|
23387
23491
|
const { search = true, menu = true } = hide;
|
|
23388
23492
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:hidden", children: [
|
|
23389
23493
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -23459,8 +23563,8 @@ function MobileHeader({
|
|
|
23459
23563
|
}
|
|
23460
23564
|
var MOBILE_BREAKPOINT = 768;
|
|
23461
23565
|
function useIsMobile() {
|
|
23462
|
-
const [isMobile, setIsMobile] =
|
|
23463
|
-
|
|
23566
|
+
const [isMobile, setIsMobile] = React18__namespace.useState(void 0);
|
|
23567
|
+
React18__namespace.useEffect(() => {
|
|
23464
23568
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
23465
23569
|
const onChange = () => {
|
|
23466
23570
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -23477,9 +23581,9 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
23477
23581
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
23478
23582
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
23479
23583
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
23480
|
-
var SidebarContext =
|
|
23584
|
+
var SidebarContext = React18__namespace.createContext(null);
|
|
23481
23585
|
function useSidebar() {
|
|
23482
|
-
const context =
|
|
23586
|
+
const context = React18__namespace.useContext(SidebarContext);
|
|
23483
23587
|
if (!context) {
|
|
23484
23588
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
23485
23589
|
}
|
|
@@ -23495,10 +23599,10 @@ function SidebarProvider({
|
|
|
23495
23599
|
...props
|
|
23496
23600
|
}) {
|
|
23497
23601
|
const isMobile = useIsMobile();
|
|
23498
|
-
const [openMobile, setOpenMobile] =
|
|
23499
|
-
const [_open, _setOpen] =
|
|
23602
|
+
const [openMobile, setOpenMobile] = React18__namespace.useState(false);
|
|
23603
|
+
const [_open, _setOpen] = React18__namespace.useState(defaultOpen);
|
|
23500
23604
|
const open = openProp ?? _open;
|
|
23501
|
-
const setOpen =
|
|
23605
|
+
const setOpen = React18__namespace.useCallback(
|
|
23502
23606
|
(value) => {
|
|
23503
23607
|
const openState = typeof value === "function" ? value(open) : value;
|
|
23504
23608
|
if (setOpenProp) {
|
|
@@ -23510,10 +23614,10 @@ function SidebarProvider({
|
|
|
23510
23614
|
},
|
|
23511
23615
|
[setOpenProp, open]
|
|
23512
23616
|
);
|
|
23513
|
-
const toggleSidebar =
|
|
23617
|
+
const toggleSidebar = React18__namespace.useCallback(() => {
|
|
23514
23618
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
23515
23619
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
23516
|
-
|
|
23620
|
+
React18__namespace.useEffect(() => {
|
|
23517
23621
|
const handleKeyDown = (event) => {
|
|
23518
23622
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
23519
23623
|
event.preventDefault();
|
|
@@ -23524,7 +23628,7 @@ function SidebarProvider({
|
|
|
23524
23628
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
23525
23629
|
}, [toggleSidebar]);
|
|
23526
23630
|
const state = open ? "expanded" : "collapsed";
|
|
23527
|
-
const contextValue =
|
|
23631
|
+
const contextValue = React18__namespace.useMemo(
|
|
23528
23632
|
() => ({
|
|
23529
23633
|
state,
|
|
23530
23634
|
open,
|
|
@@ -23967,7 +24071,7 @@ function SidebarMenuSkeleton({
|
|
|
23967
24071
|
showIcon = false,
|
|
23968
24072
|
...props
|
|
23969
24073
|
}) {
|
|
23970
|
-
const width =
|
|
24074
|
+
const width = React18__namespace.useMemo(() => {
|
|
23971
24075
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
23972
24076
|
}, []);
|
|
23973
24077
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -24046,13 +24150,326 @@ function SidebarMenuSubButton({
|
|
|
24046
24150
|
}
|
|
24047
24151
|
);
|
|
24048
24152
|
}
|
|
24049
|
-
|
|
24153
|
+
function DataTablePagination({ table }) {
|
|
24154
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-2", children: [
|
|
24155
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-muted-foreground flex-1 text-sm", children: [
|
|
24156
|
+
table.getFilteredSelectedRowModel().rows.length,
|
|
24157
|
+
" of",
|
|
24158
|
+
" ",
|
|
24159
|
+
table.getFilteredRowModel().rows.length,
|
|
24160
|
+
" row(s) selected."
|
|
24161
|
+
] }),
|
|
24162
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
|
|
24163
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
24164
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "flex-1 text-sm font-medium", children: "Rows per page" }),
|
|
24165
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
24166
|
+
Select,
|
|
24167
|
+
{
|
|
24168
|
+
value: `${table.getState().pagination.pageSize}`,
|
|
24169
|
+
onValueChange: (value) => {
|
|
24170
|
+
table.setPageSize(Number(value));
|
|
24171
|
+
},
|
|
24172
|
+
children: [
|
|
24173
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "w-[80px]", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }),
|
|
24174
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize)) })
|
|
24175
|
+
]
|
|
24176
|
+
}
|
|
24177
|
+
)
|
|
24178
|
+
] }),
|
|
24179
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
|
|
24180
|
+
"Page ",
|
|
24181
|
+
table.getState().pagination.pageIndex + 1,
|
|
24182
|
+
" of ",
|
|
24183
|
+
table.getPageCount()
|
|
24184
|
+
] }),
|
|
24185
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
24186
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
24187
|
+
Button2,
|
|
24188
|
+
{
|
|
24189
|
+
variant: "outline",
|
|
24190
|
+
size: "icon",
|
|
24191
|
+
className: "hidden p-0 lg:flex",
|
|
24192
|
+
onClick: () => table.setPageIndex(0),
|
|
24193
|
+
disabled: !table.getCanPreviousPage(),
|
|
24194
|
+
children: [
|
|
24195
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Go to first page" }),
|
|
24196
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.chevron_left, {})
|
|
24197
|
+
]
|
|
24198
|
+
}
|
|
24199
|
+
),
|
|
24200
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
24201
|
+
Button2,
|
|
24202
|
+
{
|
|
24203
|
+
variant: "outline",
|
|
24204
|
+
size: "icon",
|
|
24205
|
+
className: "p-0",
|
|
24206
|
+
onClick: () => table.previousPage(),
|
|
24207
|
+
disabled: !table.getCanPreviousPage(),
|
|
24208
|
+
children: [
|
|
24209
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Go to previous page" }),
|
|
24210
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.chevron_left, {})
|
|
24211
|
+
]
|
|
24212
|
+
}
|
|
24213
|
+
),
|
|
24214
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
24215
|
+
Button2,
|
|
24216
|
+
{
|
|
24217
|
+
variant: "outline",
|
|
24218
|
+
size: "icon",
|
|
24219
|
+
className: "p-0",
|
|
24220
|
+
onClick: () => table.nextPage(),
|
|
24221
|
+
disabled: !table.getCanNextPage(),
|
|
24222
|
+
children: [
|
|
24223
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Go to next page" }),
|
|
24224
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.chevron_right, {})
|
|
24225
|
+
]
|
|
24226
|
+
}
|
|
24227
|
+
),
|
|
24228
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
24229
|
+
Button2,
|
|
24230
|
+
{
|
|
24231
|
+
variant: "outline",
|
|
24232
|
+
size: "icon",
|
|
24233
|
+
className: "hidden p-0 lg:flex",
|
|
24234
|
+
onClick: () => table.setPageIndex(table.getPageCount() - 1),
|
|
24235
|
+
disabled: !table.getCanNextPage(),
|
|
24236
|
+
children: [
|
|
24237
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Go to last page" }),
|
|
24238
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.chevron_right, {})
|
|
24239
|
+
]
|
|
24240
|
+
}
|
|
24241
|
+
)
|
|
24242
|
+
] })
|
|
24243
|
+
] })
|
|
24244
|
+
] });
|
|
24245
|
+
}
|
|
24246
|
+
function DataTableFacetedFilter({
|
|
24247
|
+
column,
|
|
24248
|
+
title,
|
|
24249
|
+
options
|
|
24250
|
+
}) {
|
|
24251
|
+
const facets = column?.getFacetedUniqueValues();
|
|
24252
|
+
const selectedValues = new Set(column?.getFilterValue());
|
|
24253
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
24254
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button2, { variant: "outline", size: "sm", className: "border-dashed", children: [
|
|
24255
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.add, {}),
|
|
24256
|
+
title,
|
|
24257
|
+
selectedValues?.size > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
24258
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator4, { orientation: "vertical", className: "mx-2 h-4" }),
|
|
24259
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "soft", className: "hidden lg:block", children: selectedValues.size }),
|
|
24260
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden space-x-1 lg:flex", children: selectedValues.size > 2 ? /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "soft", className: "rounded-sm px-1 font-normal", children: [
|
|
24261
|
+
selectedValues.size,
|
|
24262
|
+
" selected"
|
|
24263
|
+
] }) : options.filter((option) => selectedValues.has(option.value)).map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24264
|
+
Badge,
|
|
24265
|
+
{
|
|
24266
|
+
variant: "soft",
|
|
24267
|
+
className: "rounded-sm px-1 font-normal",
|
|
24268
|
+
children: option.label
|
|
24269
|
+
},
|
|
24270
|
+
option.value
|
|
24271
|
+
)) })
|
|
24272
|
+
] })
|
|
24273
|
+
] }) }),
|
|
24274
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { children: [
|
|
24275
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandInput, { placeholder: title }),
|
|
24276
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CommandList, { children: [
|
|
24277
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: "No results found." }),
|
|
24278
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: options.map((option) => {
|
|
24279
|
+
const isSelected = selectedValues.has(option.value);
|
|
24280
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24281
|
+
CommandItem,
|
|
24282
|
+
{
|
|
24283
|
+
onSelect: () => {
|
|
24284
|
+
if (isSelected) {
|
|
24285
|
+
selectedValues.delete(option.value);
|
|
24286
|
+
} else {
|
|
24287
|
+
selectedValues.add(option.value);
|
|
24288
|
+
}
|
|
24289
|
+
const filterValues = Array.from(selectedValues);
|
|
24290
|
+
column?.setFilterValue(filterValues.length ? filterValues : void 0);
|
|
24291
|
+
},
|
|
24292
|
+
children: [
|
|
24293
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24294
|
+
"div",
|
|
24295
|
+
{
|
|
24296
|
+
className: cn(
|
|
24297
|
+
"border-grey-600 mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
|
|
24298
|
+
isSelected ? "bg-primary-600 border-primary-600 text-primary-foreground" : "opacity-50 [&_svg]:invisible"
|
|
24299
|
+
),
|
|
24300
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icons.check, { className: "text-white" })
|
|
24301
|
+
}
|
|
24302
|
+
),
|
|
24303
|
+
option.icon && /* @__PURE__ */ jsxRuntime.jsx(option.icon, { className: "text-muted-foreground mr-2 h-4 w-4" }),
|
|
24304
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: option.label }),
|
|
24305
|
+
facets?.get(option.value) && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs", children: facets.get(option.value) })
|
|
24306
|
+
]
|
|
24307
|
+
},
|
|
24308
|
+
option.value
|
|
24309
|
+
);
|
|
24310
|
+
}) }),
|
|
24311
|
+
selectedValues.size > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
24312
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandSeparator, {}),
|
|
24313
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
24314
|
+
CommandItem,
|
|
24315
|
+
{
|
|
24316
|
+
onSelect: () => column?.setFilterValue(void 0),
|
|
24317
|
+
className: "justify-center text-center",
|
|
24318
|
+
children: "Clear filters"
|
|
24319
|
+
}
|
|
24320
|
+
) })
|
|
24321
|
+
] })
|
|
24322
|
+
] })
|
|
24323
|
+
] }) })
|
|
24324
|
+
] });
|
|
24325
|
+
}
|
|
24326
|
+
function DataTableViewOptions({ table }) {
|
|
24327
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
24328
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button2, { variant: "outline", size: "sm", className: "nsw:ml-auto nsw:hidden nsw:lg:flex", children: [
|
|
24329
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.tune, {}),
|
|
24330
|
+
"View"
|
|
24331
|
+
] }) }),
|
|
24332
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "end", className: "nsw:w-[150px]", children: [
|
|
24333
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: "Toggle columns" }),
|
|
24334
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
24335
|
+
table.getAllColumns().filter((column) => typeof column.accessorFn !== "undefined" && column.getCanHide()).map((column) => {
|
|
24336
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
24337
|
+
DropdownMenuCheckboxItem,
|
|
24338
|
+
{
|
|
24339
|
+
className: "nsw:capitalize",
|
|
24340
|
+
checked: column.getIsVisible(),
|
|
24341
|
+
onCheckedChange: (value) => column.toggleVisibility(!!value),
|
|
24342
|
+
children: column.id
|
|
24343
|
+
},
|
|
24344
|
+
column.id
|
|
24345
|
+
);
|
|
24346
|
+
})
|
|
24347
|
+
] })
|
|
24348
|
+
] });
|
|
24349
|
+
}
|
|
24350
|
+
function DataTableToolbar({ search, toolbar, table }) {
|
|
24351
|
+
const isFiltered = table.getState().columnFilters.length > 0;
|
|
24352
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
24353
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 items-center space-x-2", children: [
|
|
24354
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24355
|
+
Input,
|
|
24356
|
+
{
|
|
24357
|
+
type: "search",
|
|
24358
|
+
name: "global-filter",
|
|
24359
|
+
placeholder: search?.placeholder ?? `Filter...`,
|
|
24360
|
+
value: table.getState().globalFilter ?? "",
|
|
24361
|
+
onChange: (event) => table.setGlobalFilter(event.target.value),
|
|
24362
|
+
className: "h-10 w-[184px] lg:w-[280px]"
|
|
24363
|
+
}
|
|
24364
|
+
),
|
|
24365
|
+
toolbar && toolbar.map((group) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24366
|
+
DataTableFacetedFilter,
|
|
24367
|
+
{
|
|
24368
|
+
column: table.getColumn(group.id),
|
|
24369
|
+
title: group.title,
|
|
24370
|
+
options: group.values
|
|
24371
|
+
},
|
|
24372
|
+
group.id
|
|
24373
|
+
)),
|
|
24374
|
+
isFiltered && /* @__PURE__ */ jsxRuntime.jsxs(Button2, { variant: "ghost", onClick: () => table.resetColumnFilters(), children: [
|
|
24375
|
+
"Reset",
|
|
24376
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.close, {})
|
|
24377
|
+
] })
|
|
24378
|
+
] }),
|
|
24379
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataTableViewOptions, { table })
|
|
24380
|
+
] });
|
|
24381
|
+
}
|
|
24382
|
+
function DataTable({
|
|
24383
|
+
search,
|
|
24384
|
+
toolbar,
|
|
24385
|
+
columns,
|
|
24386
|
+
data
|
|
24387
|
+
}) {
|
|
24388
|
+
const [rowSelection, setRowSelection] = React18__namespace.useState({});
|
|
24389
|
+
const [columnVisibility, setColumnVisibility] = React18__namespace.useState({});
|
|
24390
|
+
const [columnFilters, setColumnFilters] = React18__namespace.useState([]);
|
|
24391
|
+
const [sorting, setSorting] = React18__namespace.useState([]);
|
|
24392
|
+
const [globalFilter, setGlobalFilter] = React18__namespace.useState("");
|
|
24393
|
+
const table = reactTable.useReactTable({
|
|
24394
|
+
data,
|
|
24395
|
+
columns,
|
|
24396
|
+
state: {
|
|
24397
|
+
globalFilter,
|
|
24398
|
+
sorting,
|
|
24399
|
+
columnVisibility,
|
|
24400
|
+
rowSelection,
|
|
24401
|
+
columnFilters
|
|
24402
|
+
},
|
|
24403
|
+
enableRowSelection: true,
|
|
24404
|
+
onRowSelectionChange: setRowSelection,
|
|
24405
|
+
onSortingChange: setSorting,
|
|
24406
|
+
onColumnFiltersChange: setColumnFilters,
|
|
24407
|
+
onColumnVisibilityChange: setColumnVisibility,
|
|
24408
|
+
onGlobalFilterChange: setGlobalFilter,
|
|
24409
|
+
globalFilterFn: "includesString",
|
|
24410
|
+
getCoreRowModel: reactTable.getCoreRowModel(),
|
|
24411
|
+
getFilteredRowModel: reactTable.getFilteredRowModel(),
|
|
24412
|
+
getPaginationRowModel: reactTable.getPaginationRowModel(),
|
|
24413
|
+
getSortedRowModel: reactTable.getSortedRowModel(),
|
|
24414
|
+
getFacetedRowModel: reactTable.getFacetedRowModel(),
|
|
24415
|
+
getFacetedUniqueValues: reactTable.getFacetedUniqueValues()
|
|
24416
|
+
});
|
|
24417
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-1", children: [
|
|
24418
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataTableToolbar, { table, search, toolbar }),
|
|
24419
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
|
|
24420
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: headerGroup.headers.map((header) => {
|
|
24421
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableHead, { colSpan: header.colSpan, children: header.isPlaceholder ? null : reactTable.flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
|
|
24422
|
+
}) }, headerGroup.id)) }),
|
|
24423
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24424
|
+
TableRow,
|
|
24425
|
+
{
|
|
24426
|
+
"data-state": row.getIsSelected() && "selected",
|
|
24427
|
+
className: "relative",
|
|
24428
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(TableCell, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
|
|
24429
|
+
},
|
|
24430
|
+
row.id
|
|
24431
|
+
)) : /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) })
|
|
24432
|
+
] }) }),
|
|
24433
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataTablePagination, { table })
|
|
24434
|
+
] });
|
|
24435
|
+
}
|
|
24436
|
+
function DataTableColumnHeader({
|
|
24437
|
+
column,
|
|
24438
|
+
title,
|
|
24439
|
+
className
|
|
24440
|
+
}) {
|
|
24441
|
+
if (!column.getCanSort()) {
|
|
24442
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(className), children: title });
|
|
24443
|
+
}
|
|
24444
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center space-x-2", className), children: /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
24445
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button2, { variant: "ghost", size: "sm", className: "data-[state=open]:bg-accent -ml-3", children: [
|
|
24446
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: title }),
|
|
24447
|
+
column.getIsSorted() === "desc" ? /* @__PURE__ */ jsxRuntime.jsx(Icons.south, {}) : column.getIsSorted() === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(Icons.north, {}) : /* @__PURE__ */ jsxRuntime.jsx(Icons.unfold_more, {})
|
|
24448
|
+
] }) }),
|
|
24449
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "start", children: [
|
|
24450
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => column.toggleSorting(false), children: [
|
|
24451
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.south, { className: "text-muted-foreground/70 h-3.5 w-3.5" }),
|
|
24452
|
+
"Asc"
|
|
24453
|
+
] }),
|
|
24454
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => column.toggleSorting(true), children: [
|
|
24455
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.north, { className: "text-muted-foreground/70 h-3.5 w-3.5" }),
|
|
24456
|
+
"Desc"
|
|
24457
|
+
] }),
|
|
24458
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
24459
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => column.toggleVisibility(false), children: [
|
|
24460
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.eye_off, { className: "text-muted-foreground/70 h-3.5 w-3.5" }),
|
|
24461
|
+
"Hide"
|
|
24462
|
+
] })
|
|
24463
|
+
] })
|
|
24464
|
+
] }) });
|
|
24465
|
+
}
|
|
24466
|
+
var useIsomorphicLayoutEffect2 = typeof window !== "undefined" ? React18.useLayoutEffect : React18.useEffect;
|
|
24050
24467
|
function useDisableToc() {
|
|
24051
24468
|
const { setToc } = useToc();
|
|
24052
24469
|
useIsomorphicLayoutEffect2(() => {
|
|
24053
24470
|
setToc(false);
|
|
24054
24471
|
}, [setToc]);
|
|
24055
|
-
|
|
24472
|
+
React18.useEffect(() => {
|
|
24056
24473
|
const raf = requestAnimationFrame(() => {
|
|
24057
24474
|
setToc(false);
|
|
24058
24475
|
});
|
|
@@ -24131,9 +24548,9 @@ function getHeadings(slugify$1 = slugify.slugifyWithCounter()) {
|
|
|
24131
24548
|
|
|
24132
24549
|
// src/hooks/usePageHeadings.ts
|
|
24133
24550
|
function usePageHeadings() {
|
|
24134
|
-
const [headings, setHeadings] =
|
|
24551
|
+
const [headings, setHeadings] = React18.useState([]);
|
|
24135
24552
|
const pathname = navigation.usePathname();
|
|
24136
|
-
|
|
24553
|
+
React18.useEffect(() => {
|
|
24137
24554
|
const timer = setTimeout(() => {
|
|
24138
24555
|
const result = getHeadings();
|
|
24139
24556
|
setHeadings(result);
|
|
@@ -24248,6 +24665,7 @@ exports.ChartStyle = ChartStyle;
|
|
|
24248
24665
|
exports.ChartTooltip = ChartTooltip;
|
|
24249
24666
|
exports.ChartTooltipContent = ChartTooltipContent;
|
|
24250
24667
|
exports.Checkbox = Checkbox;
|
|
24668
|
+
exports.CheckboxSmall = CheckboxSmall;
|
|
24251
24669
|
exports.Code = Code;
|
|
24252
24670
|
exports.CodeDemo = CodeDemo;
|
|
24253
24671
|
exports.CodeHighlight = CodeHighlight;
|
|
@@ -24282,6 +24700,12 @@ exports.ContextMenuSub = ContextMenuSub;
|
|
|
24282
24700
|
exports.ContextMenuSubContent = ContextMenuSubContent;
|
|
24283
24701
|
exports.ContextMenuSubTrigger = ContextMenuSubTrigger;
|
|
24284
24702
|
exports.ContextMenuTrigger = ContextMenuTrigger;
|
|
24703
|
+
exports.DataTable = DataTable;
|
|
24704
|
+
exports.DataTableColumnHeader = DataTableColumnHeader;
|
|
24705
|
+
exports.DataTableFacetedFilter = DataTableFacetedFilter;
|
|
24706
|
+
exports.DataTablePagination = DataTablePagination;
|
|
24707
|
+
exports.DataTableToolbar = DataTableToolbar;
|
|
24708
|
+
exports.DataTableViewOptions = DataTableViewOptions;
|
|
24285
24709
|
exports.Description = Description3;
|
|
24286
24710
|
exports.DescriptionDetails = DescriptionDetails;
|
|
24287
24711
|
exports.DescriptionList = DescriptionList;
|