@nswds/app 1.59.0 → 1.60.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 +44 -0
- package/dist/index.cjs +414 -426
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -13
- package/dist/index.d.ts +31 -13
- package/dist/index.js +278 -290
- package/dist/index.js.map +1 -1
- package/dist/styles.css +44 -0
- package/dist/styles.css.map +1 -1
- package/dist/styles.d.cts +1 -2
- package/dist/styles.d.ts +1 -2
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -4,10 +4,10 @@ import clsx12, { clsx } from 'clsx';
|
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
7
|
+
import * as React5 from 'react';
|
|
8
|
+
import React5__default, { forwardRef, useEffect, createContext, useState, useContext, useRef, Suspense, Fragment as Fragment$1, useMemo, useCallback, useId, useLayoutEffect, useInsertionEffect, createElement, Component } from 'react';
|
|
7
9
|
import * as Headless4 from '@headlessui/react';
|
|
8
10
|
import { PopoverGroup, Popover as Popover$1, PopoverButton, PopoverPanel, Dialog as Dialog$1, DialogPanel } from '@headlessui/react';
|
|
9
|
-
import * as React4 from 'react';
|
|
10
|
-
import React4__default, { forwardRef, useEffect, createContext, useState, useContext, useRef, Suspense, Fragment as Fragment$1, useMemo, useCallback, useId, useLayoutEffect, useInsertionEffect, createElement, Component } from 'react';
|
|
11
11
|
import Link12 from 'next/link';
|
|
12
12
|
import { RiArrowLeftSLine, RiArrowRightSLine } from '@remixicon/react';
|
|
13
13
|
import * as RechartsPrimitive from 'recharts';
|
|
@@ -108,6 +108,7 @@ var Icons = {
|
|
|
108
108
|
east: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M727-440H120q-17 0-28.5-11.5T80-480q0-17 11.5-28.5T120-520h607L572-676q-11-11-11.5-27.5T572-732q11-11 28-11t28 11l224 224q6 6 8.5 13t2.5 15q0 8-2.5 15t-8.5 13L628-228q-11 11-27.5 11T572-228q-12-12-12-28.5t12-28.5l155-155Z" }) }),
|
|
109
109
|
edit_square: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h261q20 0 30 12.5t10 27.5q0 15-10.5 27.5T460-760H200v560h560v-261q0-20 12.5-30t27.5-10q15 0 27.5 10t12.5 30v261q0 33-23.5 56.5T760-120H200Zm280-360Zm-120 80v-97q0-16 6-30.5t17-25.5l344-344q12-12 27-18t30-6q16 0 30.5 6t26.5 18l56 57q11 12 17 26.5t6 29.5q0 15-5.5 29.5T897-728L553-384q-11 11-25.5 17.5T497-360h-97q-17 0-28.5-11.5T360-400Zm481-384-56-56 56 56ZM440-440h56l232-232-28-28-29-28-231 231v57Zm260-260-29-28 29 28 28 28-28-28Z" }) }),
|
|
110
110
|
edit: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M200-200h57l391-391-57-57-391 391v57Zm-40 80q-17 0-28.5-11.5T120-160v-97q0-16 6-30.5t17-25.5l505-504q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L313-143q-11 11-25.5 17t-30.5 6h-97Zm600-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z" }) }),
|
|
111
|
+
encrypted: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M444-360h72q9 0 15.5-7.5T536-384l-19-105q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-19 105q-2 9 4.5 16.5T444-360Zm36 276q-7 0-13-1t-12-3q-135-45-215-166.5T160-516v-189q0-25 14.5-45t37.5-29l240-90q14-5 28-5t28 5l240 90q23 9 37.5 29t14.5 45v189q0 140-80 261.5T505-88q-6 2-12 3t-13 1Zm0-80q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z" }) }),
|
|
111
112
|
error: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ 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" }) }),
|
|
112
113
|
exclamation: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ 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" }) }),
|
|
113
114
|
eye: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ 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" }) }),
|
|
@@ -141,6 +142,8 @@ var Icons = {
|
|
|
141
142
|
light_mode: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M480-360q50 0 85-35t35-85q0-50-35-85t-85-35q-50 0-85 35t-35 85q0 50 35 85t85 35Zm0 80q-83 0-141.5-58.5T280-480q0-83 58.5-141.5T480-680q83 0 141.5 58.5T680-480q0 83-58.5 141.5T480-280ZM80-440q-17 0-28.5-11.5T40-480q0-17 11.5-28.5T80-520h80q17 0 28.5 11.5T200-480q0 17-11.5 28.5T160-440H80Zm720 0q-17 0-28.5-11.5T760-480q0-17 11.5-28.5T800-520h80q17 0 28.5 11.5T920-480q0 17-11.5 28.5T880-440h-80ZM480-760q-17 0-28.5-11.5T440-800v-80q0-17 11.5-28.5T480-920q17 0 28.5 11.5T520-880v80q0 17-11.5 28.5T480-760Zm0 720q-17 0-28.5-11.5T440-80v-80q0-17 11.5-28.5T480-200q17 0 28.5 11.5T520-160v80q0 17-11.5 28.5T480-40ZM226-678l-43-42q-12-11-11.5-28t11.5-29q12-12 29-12t28 12l42 43q11 12 11 28t-11 28q-11 12-27.5 11.5T226-678Zm494 495-42-43q-11-12-11-28.5t11-27.5q11-12 27.5-11.5T734-282l43 42q12 11 11.5 28T777-183q-12 12-29 12t-28-12Zm-42-495q-12-11-11.5-27.5T678-734l42-43q11-12 28-11.5t29 11.5q12 12 12 29t-12 28l-43 42q-12 11-28 11t-28-11ZM183-183q-12-12-12-29t12-28l43-42q12-11 28.5-11t27.5 11q12 11 11.5 27.5T282-226l-42 43q-11 12-28 11.5T183-183Zm297-297Z" }) }),
|
|
142
143
|
link: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M280-280q-83 0-141.5-58.5T80-480q0-83 58.5-141.5T280-680h120q17 0 28.5 11.5T440-640q0 17-11.5 28.5T400-600H280q-50 0-85 35t-35 85q0 50 35 85t85 35h120q17 0 28.5 11.5T440-320q0 17-11.5 28.5T400-280H280Zm80-160q-17 0-28.5-11.5T320-480q0-17 11.5-28.5T360-520h240q17 0 28.5 11.5T640-480q0 17-11.5 28.5T600-440H360Zm200 160q-17 0-28.5-11.5T520-320q0-17 11.5-28.5T560-360h120q50 0 85-35t35-85q0-50-35-85t-85-35H560q-17 0-28.5-11.5T520-640q0-17 11.5-28.5T560-680h120q83 0 141.5 58.5T880-480q0 83-58.5 141.5T680-280H560Z" }) }),
|
|
143
144
|
list: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M320-600q-17 0-28.5-11.5T280-640q0-17 11.5-28.5T320-680h480q17 0 28.5 11.5T840-640q0 17-11.5 28.5T800-600H320Zm0 160q-17 0-28.5-11.5T280-480q0-17 11.5-28.5T320-520h480q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H320Zm0 160q-17 0-28.5-11.5T280-320q0-17 11.5-28.5T320-360h480q17 0 28.5 11.5T840-320q0 17-11.5 28.5T800-280H320ZM160-600q-17 0-28.5-11.5T120-640q0-17 11.5-28.5T160-680q17 0 28.5 11.5T200-640q0 17-11.5 28.5T160-600Zm0 160q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520q17 0 28.5 11.5T200-480q0 17-11.5 28.5T160-440Zm0 160q-17 0-28.5-11.5T120-320q0-17 11.5-28.5T160-360q17 0 28.5 11.5T200-320q0 17-11.5 28.5T160-280Z" }) }),
|
|
145
|
+
lock: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M240-80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h40v-80q0-83 58.5-141.5T480-920q83 0 141.5 58.5T680-720v80h40q33 0 56.5 23.5T800-560v400q0 33-23.5 56.5T720-80H240Zm0-80h480v-400H240v400Zm240-120q33 0 56.5-23.5T560-360q0-33-23.5-56.5T480-440q-33 0-56.5 23.5T400-360q0 33 23.5 56.5T480-280ZM360-640h240v-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80ZM240-160v-400 400Z" }) }),
|
|
146
|
+
lock_person: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M360-640h240v-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80ZM240-80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h40v-80q0-83 58.5-141.5T480-920q83 0 141.5 58.5T680-720v80h40q33 0 56.5 23.5T800-560q0 20-12.5 30T760-520q-15 0-27.5-10T720-560H240v400h200q17 0 28.5 11.5T480-120q0 17-11.5 28.5T440-80H240Zm0-480v400-400Zm480 320q25 0 42.5-17.5T780-300q0-25-17.5-42.5T720-360q-25 0-42.5 17.5T660-300q0 25 17.5 42.5T720-240Zm0 120q30 0 56-14t43-39q-23-14-48-20.5t-51-6.5q-26 0-51 6.5T621-173q17 25 43 39t56 14Zm0 80q-83 0-141.5-58.5T520-240q0-83 58.5-141.5T720-440q83 0 141.5 58.5T920-240q0 83-58.5 141.5T720-40Z" }) }),
|
|
144
147
|
login: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M520-120q-17 0-28.5-11.5T480-160q0-17 11.5-28.5T520-200h240v-560H520q-17 0-28.5-11.5T480-800q0-17 11.5-28.5T520-840h240q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H520Zm-73-320H160q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h287l-75-75q-11-11-11-27t11-28q11-12 28-12.5t29 11.5l143 143q12 12 12 28t-12 28L429-309q-12 12-28.5 11.5T372-310q-11-12-10.5-28.5T373-366l74-74Z" }) }),
|
|
145
148
|
logout: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h240q17 0 28.5 11.5T480-800q0 17-11.5 28.5T440-760H200v560h240q17 0 28.5 11.5T480-160q0 17-11.5 28.5T440-120H200Zm487-320H400q-17 0-28.5-11.5T360-480q0-17 11.5-28.5T400-520h287l-75-75q-11-11-11-27t11-28q11-12 28-12.5t29 11.5l143 143q12 12 12 28t-12 28L669-309q-12 12-28.5 11.5T612-310q-11-12-10.5-28.5T613-366l74-74Z" }) }),
|
|
146
149
|
mail: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm640-480L501-453q-5 3-10.5 4.5T480-447q-5 0-10.5-1.5T459-453L160-640v400h640v-400ZM480-520l320-200H160l320 200ZM160-640v10-59 1-32 32-.5 58.5-10 400-400Z" }) }),
|
|
@@ -183,6 +186,7 @@ var Icons = {
|
|
|
183
186
|
view_column: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M121-280v-400q0-33 23.5-56.5T201-760h559q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H201q-33 0-56.5-23.5T121-280Zm79 0h133v-400H200v400Zm213 0h133v-400H413v400Zm213 0h133v-400H626v400Z" }) }),
|
|
184
187
|
view_list: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M120-280v-400q0-33 23.5-56.5T200-760h560q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H200q-33 0-56.5-23.5T120-280Zm80-320h80v-80h-80v80Zm160 0h400v-80H360v80Zm0 160h400v-80H360v80Zm0 160h400v-80H360v80Zm-160 0h80v-80h-80v80Zm0-160h80v-80h-80v80Z" }) }),
|
|
185
188
|
view_module: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M627-520h133v-160H627v160Zm-214 0h133v-160H413v160Zm-213 0h133v-160H200v160Zm0 240h133v-160H200v160Zm213 0h133v-160H413v160Zm214 0h133v-160H627v160Zm-507 0v-400q0-33 23.5-56.5T200-760h560q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H200q-33 0-56.5-23.5T120-280Z" }) }),
|
|
189
|
+
visibility_lock: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M480-392q-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-250.5-72T56-466q-4-8-6-16.5T48-500q0-9 2-17.5t6-16.5q57-122 173.5-194T480-800q119 0 221.5 54.5T870-595q10 14 5.5 30.5T856-540q-15 8-31 3.5T799-555q-55-78-138.5-121.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280q10 0 20-.5t20-1.5q16-2 28 8.5t12 26.5q0 17-11.5 30T520-202q-10 1-20 1.5t-20 .5Zm0-120q22 0 42.5-5t38.5-14q5-50 31.5-90t67.5-64v-7q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm-5-180Zm205 380q-17 0-28.5-11.5T640-160v-120q0-17 11.5-28.5T680-320v-40q0-33 23.5-56.5T760-440q33 0 56.5 23.5T840-360v40q17 0 28.5 11.5T880-280v120q0 17-11.5 28.5T840-120H680Zm40-200h80v-40q0-17-11.5-28.5T760-400q-17 0-28.5 11.5T720-360v40Z" }) }),
|
|
186
190
|
warning: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M109-120q-11 0-20-5.5T75-140q-5-9-5.5-19.5T75-180l370-640q6-10 15.5-15t19.5-5q10 0 19.5 5t15.5 15l370 640q6 10 5.5 20.5T885-140q-5 9-14 14.5t-20 5.5H109Zm69-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm0-120q17 0 28.5-11.5T520-400v-120q0-17-11.5-28.5T480-560q-17 0-28.5 11.5T440-520v120q0 17 11.5 28.5T480-360Zm0-100Z" }) }),
|
|
187
191
|
west: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M233-440h607q17 0 28.5-11.5T880-480q0-17-11.5-28.5T840-520H233l155-156q11-11 11.5-27.5T388-732q-11-11-28-11t-28 11L108-508q-6 6-8.5 13T97-480q0 8 2.5 15t8.5 13l224 224q11 11 27.5 11t28.5-11q12-12 12-28.5T388-285L233-440Z" }) }),
|
|
188
192
|
work: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsx("path", { d: "M160-120q-33 0-56.5-23.5T80-200v-440q0-33 23.5-56.5T160-720h160v-80q0-33 23.5-56.5T400-880h160q33 0 56.5 23.5T640-800v80h160q33 0 56.5 23.5T880-640v440q0 33-23.5 56.5T800-120H160Zm0-80h640v-440H160v440Zm240-520h160v-80H400v80ZM160-200v-440 440Z" }) })
|
|
@@ -690,118 +694,91 @@ function TouchTarget({ children }) {
|
|
|
690
694
|
children
|
|
691
695
|
] });
|
|
692
696
|
}
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
697
|
+
var AlertDialog = AlertDialogPrimitive.Root;
|
|
698
|
+
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
699
|
+
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
700
|
+
var AlertDialogOverlay = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
701
|
+
AlertDialogPrimitive.Overlay,
|
|
702
|
+
{
|
|
703
|
+
className: cn(
|
|
704
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
705
|
+
className
|
|
706
|
+
),
|
|
707
|
+
...props,
|
|
708
|
+
ref
|
|
709
|
+
}
|
|
710
|
+
));
|
|
711
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
712
|
+
var AlertDialogContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
713
|
+
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
714
|
+
/* @__PURE__ */ jsx(
|
|
715
|
+
AlertDialogPrimitive.Content,
|
|
710
716
|
{
|
|
711
|
-
|
|
717
|
+
ref,
|
|
712
718
|
className: cn(
|
|
713
|
-
"fixed
|
|
719
|
+
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] data-[state=open]:zoom-in-95 sm:rounded-lg",
|
|
714
720
|
className
|
|
715
721
|
),
|
|
716
722
|
...props
|
|
717
723
|
}
|
|
718
|
-
)
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
})
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
function AlertDialogFooter({ className, ...props }) {
|
|
750
|
-
return /* @__PURE__ */ jsx(
|
|
751
|
-
"div",
|
|
752
|
-
{
|
|
753
|
-
"data-slot": "alert-dialog-footer",
|
|
754
|
-
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
755
|
-
...props
|
|
756
|
-
}
|
|
757
|
-
);
|
|
758
|
-
}
|
|
759
|
-
function AlertDialogTitle({
|
|
760
|
-
className,
|
|
761
|
-
...props
|
|
762
|
-
}) {
|
|
763
|
-
return /* @__PURE__ */ jsx(
|
|
764
|
-
AlertDialogPrimitive.Title,
|
|
765
|
-
{
|
|
766
|
-
"data-slot": "alert-dialog-title",
|
|
767
|
-
className: cn("text-lg font-semibold", className),
|
|
768
|
-
...props
|
|
769
|
-
}
|
|
770
|
-
);
|
|
771
|
-
}
|
|
772
|
-
function AlertDialogDescription({
|
|
773
|
-
className,
|
|
774
|
-
...props
|
|
775
|
-
}) {
|
|
776
|
-
return /* @__PURE__ */ jsx(
|
|
777
|
-
AlertDialogPrimitive.Description,
|
|
778
|
-
{
|
|
779
|
-
"data-slot": "alert-dialog-description",
|
|
780
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
781
|
-
...props
|
|
782
|
-
}
|
|
783
|
-
);
|
|
784
|
-
}
|
|
724
|
+
)
|
|
725
|
+
] }));
|
|
726
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
727
|
+
var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
728
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
729
|
+
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
730
|
+
"div",
|
|
731
|
+
{
|
|
732
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
733
|
+
...props
|
|
734
|
+
}
|
|
735
|
+
);
|
|
736
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
737
|
+
var AlertDialogTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
738
|
+
AlertDialogPrimitive.Title,
|
|
739
|
+
{
|
|
740
|
+
ref,
|
|
741
|
+
className: cn("text-lg font-semibold", className),
|
|
742
|
+
...props
|
|
743
|
+
}
|
|
744
|
+
));
|
|
745
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
746
|
+
var AlertDialogDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
747
|
+
AlertDialogPrimitive.Description,
|
|
748
|
+
{
|
|
749
|
+
ref,
|
|
750
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
751
|
+
...props
|
|
752
|
+
}
|
|
753
|
+
));
|
|
754
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
785
755
|
function AlertDialogAction({
|
|
786
756
|
className,
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
}
|
|
791
|
-
function AlertDialogCancel({
|
|
792
|
-
className,
|
|
757
|
+
variant,
|
|
758
|
+
color: color2,
|
|
759
|
+
size,
|
|
793
760
|
...props
|
|
794
761
|
}) {
|
|
795
762
|
return /* @__PURE__ */ jsx(
|
|
796
|
-
AlertDialogPrimitive.
|
|
763
|
+
AlertDialogPrimitive.Action,
|
|
797
764
|
{
|
|
798
|
-
className: cn(buttonVariants({ variant:
|
|
765
|
+
className: cn(buttonVariants({ variant, color: color2, size }), className),
|
|
799
766
|
...props
|
|
800
767
|
}
|
|
801
768
|
);
|
|
802
769
|
}
|
|
770
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
771
|
+
var AlertDialogCancel = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
772
|
+
AlertDialogPrimitive.Cancel,
|
|
773
|
+
{
|
|
774
|
+
ref,
|
|
775
|
+
className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className),
|
|
776
|
+
...props
|
|
777
|
+
}
|
|
778
|
+
));
|
|
779
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
803
780
|
var useOnWindowResize = (handler) => {
|
|
804
|
-
|
|
781
|
+
React5.useEffect(() => {
|
|
805
782
|
const handleResize = () => {
|
|
806
783
|
handler();
|
|
807
784
|
};
|
|
@@ -950,9 +927,9 @@ var LegendItem = ({ name, color: color2, onClick, activeLegend }) => {
|
|
|
950
927
|
};
|
|
951
928
|
var ScrollButton = ({ icon, onClick, disabled }) => {
|
|
952
929
|
const Icon2 = icon;
|
|
953
|
-
const [isPressed, setIsPressed] =
|
|
954
|
-
const intervalRef =
|
|
955
|
-
|
|
930
|
+
const [isPressed, setIsPressed] = React5__default.useState(false);
|
|
931
|
+
const intervalRef = React5__default.useRef(null);
|
|
932
|
+
React5__default.useEffect(() => {
|
|
956
933
|
if (isPressed) {
|
|
957
934
|
intervalRef.current = setInterval(() => {
|
|
958
935
|
onClick?.();
|
|
@@ -962,7 +939,7 @@ var ScrollButton = ({ icon, onClick, disabled }) => {
|
|
|
962
939
|
}
|
|
963
940
|
return () => clearInterval(intervalRef.current);
|
|
964
941
|
}, [isPressed, onClick]);
|
|
965
|
-
|
|
942
|
+
React5__default.useEffect(() => {
|
|
966
943
|
if (disabled) {
|
|
967
944
|
clearInterval(intervalRef.current);
|
|
968
945
|
setIsPressed(false);
|
|
@@ -994,7 +971,7 @@ var ScrollButton = ({ icon, onClick, disabled }) => {
|
|
|
994
971
|
}
|
|
995
972
|
);
|
|
996
973
|
};
|
|
997
|
-
var Legend =
|
|
974
|
+
var Legend = React5__default.forwardRef((props, ref) => {
|
|
998
975
|
const {
|
|
999
976
|
categories,
|
|
1000
977
|
colors: colors3 = AvailableChartColors,
|
|
@@ -1004,19 +981,19 @@ var Legend = React4__default.forwardRef((props, ref) => {
|
|
|
1004
981
|
enableLegendSlider = false,
|
|
1005
982
|
...other
|
|
1006
983
|
} = props;
|
|
1007
|
-
const scrollableRef =
|
|
1008
|
-
const scrollButtonsRef =
|
|
1009
|
-
const [hasScroll, setHasScroll] =
|
|
1010
|
-
const [isKeyDowned, setIsKeyDowned] =
|
|
1011
|
-
const intervalRef =
|
|
1012
|
-
const checkScroll =
|
|
984
|
+
const scrollableRef = React5__default.useRef(null);
|
|
985
|
+
const scrollButtonsRef = React5__default.useRef(null);
|
|
986
|
+
const [hasScroll, setHasScroll] = React5__default.useState(null);
|
|
987
|
+
const [isKeyDowned, setIsKeyDowned] = React5__default.useState(null);
|
|
988
|
+
const intervalRef = React5__default.useRef(null);
|
|
989
|
+
const checkScroll = React5__default.useCallback(() => {
|
|
1013
990
|
const scrollable = scrollableRef?.current;
|
|
1014
991
|
if (!scrollable) return;
|
|
1015
992
|
const hasLeftScroll = scrollable.scrollLeft > 0;
|
|
1016
993
|
const hasRightScroll = scrollable.scrollWidth - scrollable.clientWidth > scrollable.scrollLeft;
|
|
1017
994
|
setHasScroll({ left: hasLeftScroll, right: hasRightScroll });
|
|
1018
995
|
}, [setHasScroll]);
|
|
1019
|
-
const scrollToTest =
|
|
996
|
+
const scrollToTest = React5__default.useCallback(
|
|
1020
997
|
(direction) => {
|
|
1021
998
|
const element = scrollableRef?.current;
|
|
1022
999
|
const scrollButtons = scrollButtonsRef?.current;
|
|
@@ -1034,7 +1011,7 @@ var Legend = React4__default.forwardRef((props, ref) => {
|
|
|
1034
1011
|
},
|
|
1035
1012
|
[enableLegendSlider, checkScroll]
|
|
1036
1013
|
);
|
|
1037
|
-
|
|
1014
|
+
React5__default.useEffect(() => {
|
|
1038
1015
|
const keyDownHandler = (key) => {
|
|
1039
1016
|
if (key === "ArrowLeft") {
|
|
1040
1017
|
scrollToTest("left");
|
|
@@ -1063,7 +1040,7 @@ var Legend = React4__default.forwardRef((props, ref) => {
|
|
|
1063
1040
|
e.stopPropagation();
|
|
1064
1041
|
setIsKeyDowned(null);
|
|
1065
1042
|
};
|
|
1066
|
-
|
|
1043
|
+
React5__default.useEffect(() => {
|
|
1067
1044
|
const scrollable = scrollableRef?.current;
|
|
1068
1045
|
if (enableLegendSlider) {
|
|
1069
1046
|
checkScroll();
|
|
@@ -1136,7 +1113,7 @@ var Legend = React4__default.forwardRef((props, ref) => {
|
|
|
1136
1113
|
});
|
|
1137
1114
|
Legend.displayName = "Legend";
|
|
1138
1115
|
var ChartLegend = ({ payload }, categoryColors, setLegendHeight, activeLegend, onClick, enableLegendSlider, legendPosition, yAxisWidth) => {
|
|
1139
|
-
const legendRef =
|
|
1116
|
+
const legendRef = React5__default.useRef(null);
|
|
1140
1117
|
useOnWindowResize(() => {
|
|
1141
1118
|
const calculateHeight = (height) => height ? Number(height) + 15 : 60;
|
|
1142
1119
|
setLegendHeight(calculateHeight(legendRef.current?.clientHeight));
|
|
@@ -1237,7 +1214,7 @@ var ChartTooltip = ({ active, payload, label, valueFormatter }) => {
|
|
|
1237
1214
|
}
|
|
1238
1215
|
return null;
|
|
1239
1216
|
};
|
|
1240
|
-
var AreaChart =
|
|
1217
|
+
var AreaChart = React5__default.forwardRef((props, ref) => {
|
|
1241
1218
|
const {
|
|
1242
1219
|
data = [],
|
|
1243
1220
|
categories = [],
|
|
@@ -1272,16 +1249,16 @@ var AreaChart = React4__default.forwardRef((props, ref) => {
|
|
|
1272
1249
|
} = props;
|
|
1273
1250
|
const CustomTooltip = customTooltip;
|
|
1274
1251
|
const paddingValue = !showXAxis && !showYAxis || startEndOnly && !showYAxis ? 0 : 20;
|
|
1275
|
-
const [legendHeight, setLegendHeight] =
|
|
1276
|
-
const [activeDot, setActiveDot] =
|
|
1277
|
-
const [activeLegend, setActiveLegend] =
|
|
1252
|
+
const [legendHeight, setLegendHeight] = React5__default.useState(60);
|
|
1253
|
+
const [activeDot, setActiveDot] = React5__default.useState(void 0);
|
|
1254
|
+
const [activeLegend, setActiveLegend] = React5__default.useState(void 0);
|
|
1278
1255
|
const categoryColors = constructCategoryColors(categories, colors3);
|
|
1279
1256
|
const yAxisDomain = getYAxisDomain(autoMinValue, minValue, maxValue);
|
|
1280
1257
|
const hasOnValueChange = !!onValueChange;
|
|
1281
1258
|
const stacked = type === "stacked" || type === "percent";
|
|
1282
|
-
const areaId =
|
|
1283
|
-
const prevActiveRef =
|
|
1284
|
-
const prevLabelRef =
|
|
1259
|
+
const areaId = React5__default.useId();
|
|
1260
|
+
const prevActiveRef = React5__default.useRef(void 0);
|
|
1261
|
+
const prevLabelRef = React5__default.useRef(void 0);
|
|
1285
1262
|
const getFillContent = ({
|
|
1286
1263
|
fillType,
|
|
1287
1264
|
activeDot: activeDot2,
|
|
@@ -1482,7 +1459,7 @@ var AreaChart = React4__default.forwardRef((props, ref) => {
|
|
|
1482
1459
|
) : null,
|
|
1483
1460
|
categories.map((category) => {
|
|
1484
1461
|
const categoryId = `${areaId}-${category.replace(/[^a-zA-Z0-9]/g, "")}`;
|
|
1485
|
-
return /* @__PURE__ */ jsxs(
|
|
1462
|
+
return /* @__PURE__ */ jsxs(React5__default.Fragment, { children: [
|
|
1486
1463
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
1487
1464
|
"linearGradient",
|
|
1488
1465
|
{
|
|
@@ -1584,7 +1561,7 @@ var AreaChart = React4__default.forwardRef((props, ref) => {
|
|
|
1584
1561
|
index2
|
|
1585
1562
|
);
|
|
1586
1563
|
}
|
|
1587
|
-
return /* @__PURE__ */ jsx(
|
|
1564
|
+
return /* @__PURE__ */ jsx(React5__default.Fragment, {}, index2);
|
|
1588
1565
|
},
|
|
1589
1566
|
name: category,
|
|
1590
1567
|
type: "linear",
|
|
@@ -2223,9 +2200,9 @@ var LegendItem2 = ({ name, color: color2, onClick, activeLegend }) => {
|
|
|
2223
2200
|
};
|
|
2224
2201
|
var ScrollButton2 = ({ icon, onClick, disabled }) => {
|
|
2225
2202
|
const Icon2 = icon;
|
|
2226
|
-
const [isPressed, setIsPressed] =
|
|
2227
|
-
const intervalRef =
|
|
2228
|
-
|
|
2203
|
+
const [isPressed, setIsPressed] = React5__default.useState(false);
|
|
2204
|
+
const intervalRef = React5__default.useRef(null);
|
|
2205
|
+
React5__default.useEffect(() => {
|
|
2229
2206
|
if (isPressed) {
|
|
2230
2207
|
intervalRef.current = setInterval(() => {
|
|
2231
2208
|
onClick?.();
|
|
@@ -2235,7 +2212,7 @@ var ScrollButton2 = ({ icon, onClick, disabled }) => {
|
|
|
2235
2212
|
}
|
|
2236
2213
|
return () => clearInterval(intervalRef.current);
|
|
2237
2214
|
}, [isPressed, onClick]);
|
|
2238
|
-
|
|
2215
|
+
React5__default.useEffect(() => {
|
|
2239
2216
|
if (disabled) {
|
|
2240
2217
|
clearInterval(intervalRef.current);
|
|
2241
2218
|
setIsPressed(false);
|
|
@@ -2267,7 +2244,7 @@ var ScrollButton2 = ({ icon, onClick, disabled }) => {
|
|
|
2267
2244
|
}
|
|
2268
2245
|
);
|
|
2269
2246
|
};
|
|
2270
|
-
var Legend2 =
|
|
2247
|
+
var Legend2 = React5__default.forwardRef((props, ref) => {
|
|
2271
2248
|
const {
|
|
2272
2249
|
categories,
|
|
2273
2250
|
colors: colors3 = AvailableChartColors,
|
|
@@ -2277,19 +2254,19 @@ var Legend2 = React4__default.forwardRef((props, ref) => {
|
|
|
2277
2254
|
enableLegendSlider = false,
|
|
2278
2255
|
...other
|
|
2279
2256
|
} = props;
|
|
2280
|
-
const scrollableRef =
|
|
2281
|
-
const scrollButtonsRef =
|
|
2282
|
-
const [hasScroll, setHasScroll] =
|
|
2283
|
-
const [isKeyDowned, setIsKeyDowned] =
|
|
2284
|
-
const intervalRef =
|
|
2285
|
-
const checkScroll =
|
|
2257
|
+
const scrollableRef = React5__default.useRef(null);
|
|
2258
|
+
const scrollButtonsRef = React5__default.useRef(null);
|
|
2259
|
+
const [hasScroll, setHasScroll] = React5__default.useState(null);
|
|
2260
|
+
const [isKeyDowned, setIsKeyDowned] = React5__default.useState(null);
|
|
2261
|
+
const intervalRef = React5__default.useRef(null);
|
|
2262
|
+
const checkScroll = React5__default.useCallback(() => {
|
|
2286
2263
|
const scrollable = scrollableRef?.current;
|
|
2287
2264
|
if (!scrollable) return;
|
|
2288
2265
|
const hasLeftScroll = scrollable.scrollLeft > 0;
|
|
2289
2266
|
const hasRightScroll = scrollable.scrollWidth - scrollable.clientWidth > scrollable.scrollLeft;
|
|
2290
2267
|
setHasScroll({ left: hasLeftScroll, right: hasRightScroll });
|
|
2291
2268
|
}, [setHasScroll]);
|
|
2292
|
-
const scrollToTest =
|
|
2269
|
+
const scrollToTest = React5__default.useCallback(
|
|
2293
2270
|
(direction) => {
|
|
2294
2271
|
const element = scrollableRef?.current;
|
|
2295
2272
|
const scrollButtons = scrollButtonsRef?.current;
|
|
@@ -2307,7 +2284,7 @@ var Legend2 = React4__default.forwardRef((props, ref) => {
|
|
|
2307
2284
|
},
|
|
2308
2285
|
[enableLegendSlider, checkScroll]
|
|
2309
2286
|
);
|
|
2310
|
-
|
|
2287
|
+
React5__default.useEffect(() => {
|
|
2311
2288
|
const keyDownHandler = (key) => {
|
|
2312
2289
|
if (key === "ArrowLeft") {
|
|
2313
2290
|
scrollToTest("left");
|
|
@@ -2336,7 +2313,7 @@ var Legend2 = React4__default.forwardRef((props, ref) => {
|
|
|
2336
2313
|
e.stopPropagation();
|
|
2337
2314
|
setIsKeyDowned(null);
|
|
2338
2315
|
};
|
|
2339
|
-
|
|
2316
|
+
React5__default.useEffect(() => {
|
|
2340
2317
|
const scrollable = scrollableRef?.current;
|
|
2341
2318
|
if (enableLegendSlider) {
|
|
2342
2319
|
checkScroll();
|
|
@@ -2409,7 +2386,7 @@ var Legend2 = React4__default.forwardRef((props, ref) => {
|
|
|
2409
2386
|
});
|
|
2410
2387
|
Legend2.displayName = "Legend";
|
|
2411
2388
|
var ChartLegend2 = ({ payload }, categoryColors, setLegendHeight, activeLegend, onClick, enableLegendSlider, legendPosition, yAxisWidth) => {
|
|
2412
|
-
const legendRef =
|
|
2389
|
+
const legendRef = React5__default.useRef(null);
|
|
2413
2390
|
useOnWindowResize(() => {
|
|
2414
2391
|
const calculateHeight = (height) => height ? Number(height) + 15 : 60;
|
|
2415
2392
|
setLegendHeight(calculateHeight(legendRef.current?.clientHeight));
|
|
@@ -2509,7 +2486,7 @@ var ChartTooltip2 = ({ active, payload, label, valueFormatter }) => {
|
|
|
2509
2486
|
}
|
|
2510
2487
|
return null;
|
|
2511
2488
|
};
|
|
2512
|
-
var BarChart =
|
|
2489
|
+
var BarChart = React5__default.forwardRef((props, forwardedRef) => {
|
|
2513
2490
|
const {
|
|
2514
2491
|
data = [],
|
|
2515
2492
|
categories = [],
|
|
@@ -2544,15 +2521,15 @@ var BarChart = React4__default.forwardRef((props, forwardedRef) => {
|
|
|
2544
2521
|
} = props;
|
|
2545
2522
|
const CustomTooltip = customTooltip;
|
|
2546
2523
|
const paddingValue = !showXAxis && !showYAxis || startEndOnly && !showYAxis ? 0 : 20;
|
|
2547
|
-
const [legendHeight, setLegendHeight] =
|
|
2548
|
-
const [activeLegend, setActiveLegend] =
|
|
2524
|
+
const [legendHeight, setLegendHeight] = React5__default.useState(60);
|
|
2525
|
+
const [activeLegend, setActiveLegend] = React5__default.useState(void 0);
|
|
2549
2526
|
const categoryColors = constructCategoryColors(categories, colors3);
|
|
2550
|
-
const [activeBar, setActiveBar] =
|
|
2527
|
+
const [activeBar, setActiveBar] = React5__default.useState(void 0);
|
|
2551
2528
|
const yAxisDomain = getYAxisDomain(autoMinValue, minValue, maxValue);
|
|
2552
2529
|
const hasOnValueChange = !!onValueChange;
|
|
2553
2530
|
const stacked = type === "stacked" || type === "percent";
|
|
2554
|
-
const prevActiveRef =
|
|
2555
|
-
const prevLabelRef =
|
|
2531
|
+
const prevActiveRef = React5__default.useRef(void 0);
|
|
2532
|
+
const prevLabelRef = React5__default.useRef(void 0);
|
|
2556
2533
|
function valueToPercent(value) {
|
|
2557
2534
|
return `${(value * 100).toFixed(0)}%`;
|
|
2558
2535
|
}
|
|
@@ -2800,7 +2777,7 @@ function BarListInner({
|
|
|
2800
2777
|
...props
|
|
2801
2778
|
}, forwardedRef) {
|
|
2802
2779
|
const Component2 = onValueChange ? "button" : "div";
|
|
2803
|
-
const sortedData =
|
|
2780
|
+
const sortedData = React5__default.useMemo(() => {
|
|
2804
2781
|
if (sortOrder === "none") {
|
|
2805
2782
|
return data;
|
|
2806
2783
|
}
|
|
@@ -2808,7 +2785,7 @@ function BarListInner({
|
|
|
2808
2785
|
return sortOrder === "ascending" ? a.value - b.value : b.value - a.value;
|
|
2809
2786
|
});
|
|
2810
2787
|
}, [data, sortOrder]);
|
|
2811
|
-
const widths =
|
|
2788
|
+
const widths = React5__default.useMemo(() => {
|
|
2812
2789
|
const maxValue = Math.max(...sortedData.map((item) => item.value), 0);
|
|
2813
2790
|
return sortedData.map(
|
|
2814
2791
|
(item) => item.value === 0 ? 0 : Math.max(item.value / maxValue * 100, 2)
|
|
@@ -2922,7 +2899,7 @@ function BarListInner({
|
|
|
2922
2899
|
);
|
|
2923
2900
|
}
|
|
2924
2901
|
BarListInner.displayName = "BarList";
|
|
2925
|
-
var BarList =
|
|
2902
|
+
var BarList = React5__default.forwardRef(BarListInner);
|
|
2926
2903
|
void culori.rgb("tomato");
|
|
2927
2904
|
var shades = ["lightest", "lighter", "light", "DEFAULT", "dark", "darker", "darkest"];
|
|
2928
2905
|
var darkenColor = (color2, factor = 0.3) => {
|
|
@@ -3596,7 +3573,7 @@ function Breadcrumbs({
|
|
|
3596
3573
|
});
|
|
3597
3574
|
const shouldCollapse = breadcrumbItems.length > maxItems;
|
|
3598
3575
|
if (!shouldCollapse) {
|
|
3599
|
-
return /* @__PURE__ */ jsx(Breadcrumb, { className: "-ml-1", children: /* @__PURE__ */ jsx(BreadcrumbList, { children: breadcrumbItems.map((item, index) => /* @__PURE__ */ jsxs(
|
|
3576
|
+
return /* @__PURE__ */ jsx(Breadcrumb, { className: "-ml-1", children: /* @__PURE__ */ jsx(BreadcrumbList, { children: breadcrumbItems.map((item, index) => /* @__PURE__ */ jsxs(React5.Fragment, { children: [
|
|
3600
3577
|
/* @__PURE__ */ jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(Link12, { href: item.path, children: item.label }) }) }),
|
|
3601
3578
|
index < breadcrumbItems.length - 1 && /* @__PURE__ */ jsx(BreadcrumbSeparator, {})
|
|
3602
3579
|
] }, item.path)) }) });
|
|
@@ -3607,7 +3584,7 @@ function Breadcrumbs({
|
|
|
3607
3584
|
const itemsAtEnd = breadcrumbItems.slice(-endItems);
|
|
3608
3585
|
const collapsedItems = breadcrumbItems.slice(startItems, breadcrumbItems.length - endItems);
|
|
3609
3586
|
return /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, { children: [
|
|
3610
|
-
itemsAtStart.map((item, index) => /* @__PURE__ */ jsxs(
|
|
3587
|
+
itemsAtStart.map((item, index) => /* @__PURE__ */ jsxs(React5.Fragment, { children: [
|
|
3611
3588
|
/* @__PURE__ */ jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(Link12, { href: item.path, children: item.label }) }) }),
|
|
3612
3589
|
index < itemsAtStart.length - 1 && /* @__PURE__ */ jsx(BreadcrumbSeparator, {})
|
|
3613
3590
|
] }, item.path)),
|
|
@@ -3620,7 +3597,7 @@ function Breadcrumbs({
|
|
|
3620
3597
|
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "start", children: collapsedItems.map((item) => /* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsx(Link12, { href: item.path, children: item.label }) }, item.path)) })
|
|
3621
3598
|
] }) }),
|
|
3622
3599
|
itemsAtEnd.length > 0 && /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
|
|
3623
|
-
itemsAtEnd.map((item, index) => /* @__PURE__ */ jsxs(
|
|
3600
|
+
itemsAtEnd.map((item, index) => /* @__PURE__ */ jsxs(React5.Fragment, { children: [
|
|
3624
3601
|
/* @__PURE__ */ jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(Link12, { href: item.path, children: item.label }) }) }),
|
|
3625
3602
|
index < itemsAtEnd.length - 1 && /* @__PURE__ */ jsx(BreadcrumbSeparator, {})
|
|
3626
3603
|
] }, item.path))
|
|
@@ -3791,8 +3768,8 @@ function CalendarDayButton({
|
|
|
3791
3768
|
...props
|
|
3792
3769
|
}) {
|
|
3793
3770
|
const defaultClassNames = getDefaultClassNames();
|
|
3794
|
-
const ref =
|
|
3795
|
-
|
|
3771
|
+
const ref = React5.useRef(null);
|
|
3772
|
+
React5.useEffect(() => {
|
|
3796
3773
|
if (modifiers.focused) ref.current?.focus();
|
|
3797
3774
|
}, [modifiers.focused]);
|
|
3798
3775
|
return /* @__PURE__ */ jsx(
|
|
@@ -3884,9 +3861,9 @@ function CardFooter({ className, ...props }) {
|
|
|
3884
3861
|
}
|
|
3885
3862
|
);
|
|
3886
3863
|
}
|
|
3887
|
-
var CarouselContext =
|
|
3864
|
+
var CarouselContext = React5.createContext(null);
|
|
3888
3865
|
function useCarousel() {
|
|
3889
|
-
const context =
|
|
3866
|
+
const context = React5.useContext(CarouselContext);
|
|
3890
3867
|
if (!context) {
|
|
3891
3868
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
3892
3869
|
}
|
|
@@ -3908,20 +3885,20 @@ function Carousel({
|
|
|
3908
3885
|
},
|
|
3909
3886
|
plugins
|
|
3910
3887
|
);
|
|
3911
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
3912
|
-
const [canScrollNext, setCanScrollNext] =
|
|
3913
|
-
const onSelect =
|
|
3888
|
+
const [canScrollPrev, setCanScrollPrev] = React5.useState(false);
|
|
3889
|
+
const [canScrollNext, setCanScrollNext] = React5.useState(false);
|
|
3890
|
+
const onSelect = React5.useCallback((api2) => {
|
|
3914
3891
|
if (!api2) return;
|
|
3915
3892
|
setCanScrollPrev(api2.canScrollPrev());
|
|
3916
3893
|
setCanScrollNext(api2.canScrollNext());
|
|
3917
3894
|
}, []);
|
|
3918
|
-
const scrollPrev =
|
|
3895
|
+
const scrollPrev = React5.useCallback(() => {
|
|
3919
3896
|
api?.scrollPrev();
|
|
3920
3897
|
}, [api]);
|
|
3921
|
-
const scrollNext =
|
|
3898
|
+
const scrollNext = React5.useCallback(() => {
|
|
3922
3899
|
api?.scrollNext();
|
|
3923
3900
|
}, [api]);
|
|
3924
|
-
const handleKeyDown =
|
|
3901
|
+
const handleKeyDown = React5.useCallback(
|
|
3925
3902
|
(event) => {
|
|
3926
3903
|
if (event.key === "ArrowLeft") {
|
|
3927
3904
|
event.preventDefault();
|
|
@@ -3933,11 +3910,11 @@ function Carousel({
|
|
|
3933
3910
|
},
|
|
3934
3911
|
[scrollPrev, scrollNext]
|
|
3935
3912
|
);
|
|
3936
|
-
|
|
3913
|
+
React5.useEffect(() => {
|
|
3937
3914
|
if (!api || !setApi) return;
|
|
3938
3915
|
setApi(api);
|
|
3939
3916
|
}, [api, setApi]);
|
|
3940
|
-
|
|
3917
|
+
React5.useEffect(() => {
|
|
3941
3918
|
if (!api) return;
|
|
3942
3919
|
onSelect(api);
|
|
3943
3920
|
api.on("reInit", onSelect);
|
|
@@ -4057,7 +4034,7 @@ function CarouselNext({
|
|
|
4057
4034
|
}
|
|
4058
4035
|
);
|
|
4059
4036
|
}
|
|
4060
|
-
var Tooltip3 =
|
|
4037
|
+
var Tooltip3 = React5__default.forwardRef(
|
|
4061
4038
|
({
|
|
4062
4039
|
children,
|
|
4063
4040
|
className,
|
|
@@ -4150,7 +4127,7 @@ var formatNumber = (num) => {
|
|
|
4150
4127
|
return num.toFixed(1);
|
|
4151
4128
|
};
|
|
4152
4129
|
var BarLabels = ({ values }) => {
|
|
4153
|
-
const sumValues =
|
|
4130
|
+
const sumValues = React5__default.useMemo(() => sumNumericArray(values), [values]);
|
|
4154
4131
|
let prefixSum = 0;
|
|
4155
4132
|
let sumConsecutiveHiddenLabels = 0;
|
|
4156
4133
|
return /* @__PURE__ */ jsxs(
|
|
@@ -4184,20 +4161,20 @@ var BarLabels = ({ values }) => {
|
|
|
4184
4161
|
}
|
|
4185
4162
|
);
|
|
4186
4163
|
};
|
|
4187
|
-
var CategoryBar =
|
|
4164
|
+
var CategoryBar = React5__default.forwardRef(
|
|
4188
4165
|
({ values = [], colors: colors3 = AvailableChartColors, marker, showLabels = true, className, ...props }, forwardedRef) => {
|
|
4189
|
-
const markerBgColor =
|
|
4166
|
+
const markerBgColor = React5__default.useMemo(
|
|
4190
4167
|
() => getMarkerBgColor(marker?.value, values, colors3),
|
|
4191
4168
|
[marker, values, colors3]
|
|
4192
4169
|
);
|
|
4193
|
-
const maxValue =
|
|
4194
|
-
const adjustedMarkerValue =
|
|
4170
|
+
const maxValue = React5__default.useMemo(() => sumNumericArray(values), [values]);
|
|
4171
|
+
const adjustedMarkerValue = React5__default.useMemo(() => {
|
|
4195
4172
|
if (marker === void 0) return void 0;
|
|
4196
4173
|
if (marker.value < 0) return 0;
|
|
4197
4174
|
if (marker.value > maxValue) return maxValue;
|
|
4198
4175
|
return marker.value;
|
|
4199
4176
|
}, [marker, maxValue]);
|
|
4200
|
-
const markerPositionLeft =
|
|
4177
|
+
const markerPositionLeft = React5__default.useMemo(
|
|
4201
4178
|
() => getPositionLeft(adjustedMarkerValue, maxValue),
|
|
4202
4179
|
[adjustedMarkerValue, maxValue]
|
|
4203
4180
|
);
|
|
@@ -4276,9 +4253,9 @@ var CategoryBar = React4__default.forwardRef(
|
|
|
4276
4253
|
);
|
|
4277
4254
|
CategoryBar.displayName = "CategoryBar";
|
|
4278
4255
|
var THEMES = { light: "", dark: ".dark" };
|
|
4279
|
-
var ChartContext =
|
|
4256
|
+
var ChartContext = React5.createContext(null);
|
|
4280
4257
|
function useChart() {
|
|
4281
|
-
const context =
|
|
4258
|
+
const context = React5.useContext(ChartContext);
|
|
4282
4259
|
if (!context) {
|
|
4283
4260
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
4284
4261
|
}
|
|
@@ -4291,7 +4268,7 @@ function ChartContainer({
|
|
|
4291
4268
|
config,
|
|
4292
4269
|
...props
|
|
4293
4270
|
}) {
|
|
4294
|
-
const uniqueId =
|
|
4271
|
+
const uniqueId = React5.useId();
|
|
4295
4272
|
const chartId = `chart-${id3 || uniqueId.replace(/:/g, "")}`;
|
|
4296
4273
|
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
4297
4274
|
"div",
|
|
@@ -4350,7 +4327,7 @@ function ChartTooltipContent({
|
|
|
4350
4327
|
labelKey
|
|
4351
4328
|
}) {
|
|
4352
4329
|
const { config } = useChart();
|
|
4353
|
-
const tooltipLabel =
|
|
4330
|
+
const tooltipLabel = React5.useMemo(() => {
|
|
4354
4331
|
if (hideLabel || !payload?.length) {
|
|
4355
4332
|
return null;
|
|
4356
4333
|
}
|
|
@@ -4527,7 +4504,7 @@ function Checkbox({ className, ...props }) {
|
|
|
4527
4504
|
}
|
|
4528
4505
|
);
|
|
4529
4506
|
}
|
|
4530
|
-
var CheckboxSmall =
|
|
4507
|
+
var CheckboxSmall = React5__default.forwardRef(({ className, checked, ...props }, forwardedRef) => {
|
|
4531
4508
|
return /* @__PURE__ */ jsx(
|
|
4532
4509
|
CheckboxPrimitive.Root,
|
|
4533
4510
|
{
|
|
@@ -8791,7 +8768,7 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
8791
8768
|
acc[`${prefix}${suffix}`] = shade.hex;
|
|
8792
8769
|
return acc;
|
|
8793
8770
|
}, {});
|
|
8794
|
-
const themeValues =
|
|
8771
|
+
const themeValues = React5__default.useMemo(
|
|
8795
8772
|
() => ({
|
|
8796
8773
|
...getShades("primary", primaryColor, themeCategory),
|
|
8797
8774
|
...getShades("accent", accentColor, themeCategory),
|
|
@@ -8799,7 +8776,7 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
8799
8776
|
}),
|
|
8800
8777
|
[themeCategory, primaryColor, accentColor, greyColor]
|
|
8801
8778
|
);
|
|
8802
|
-
|
|
8779
|
+
React5__default.useEffect(() => {
|
|
8803
8780
|
const frame2 = iframeRef.current;
|
|
8804
8781
|
if (!frame2) return;
|
|
8805
8782
|
const send = () => {
|
|
@@ -8866,7 +8843,7 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
8866
8843
|
const codeItems = getCodeItems(code);
|
|
8867
8844
|
const current = getCurrent(codeItems, tabIndex);
|
|
8868
8845
|
const shouldExpand = getShouldExpand(current.code.trim());
|
|
8869
|
-
const variantLabels =
|
|
8846
|
+
const variantLabels = React5__default.useMemo(() => {
|
|
8870
8847
|
const explicit = data.labels ?? {};
|
|
8871
8848
|
return Object.fromEntries(variants.map((v) => [v, explicit[v] ?? humaniseVariant(v)]));
|
|
8872
8849
|
}, [variants, data]);
|
|
@@ -8986,7 +8963,7 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
8986
8963
|
function CodeDemo(props) {
|
|
8987
8964
|
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(CodeDemoLoading, {}), children: /* @__PURE__ */ jsx(CodeDemoContent, { ...props }) });
|
|
8988
8965
|
}
|
|
8989
|
-
var IFrame =
|
|
8966
|
+
var IFrame = React5__default.forwardRef(
|
|
8990
8967
|
({ iframe, isRTL, isDarkMode }, ref) => {
|
|
8991
8968
|
useEffect(() => {
|
|
8992
8969
|
const document2 = ref?.current?.contentDocument;
|
|
@@ -9033,7 +9010,7 @@ function CodePreview({
|
|
|
9033
9010
|
themeValues,
|
|
9034
9011
|
children
|
|
9035
9012
|
}) {
|
|
9036
|
-
const cssVars =
|
|
9013
|
+
const cssVars = React5__default.useMemo(() => {
|
|
9037
9014
|
const withCssVarNames = Object.entries(themeValues).map(([key, value]) => {
|
|
9038
9015
|
const kebab = key.replace(/(\D+)(\d+)/, "$1-$2");
|
|
9039
9016
|
return [`--color-${kebab}`, value];
|
|
@@ -9467,9 +9444,9 @@ var LegendItem3 = ({ name, color: color2, onClick, activeLegend, chartType }) =>
|
|
|
9467
9444
|
};
|
|
9468
9445
|
var ScrollButton3 = ({ icon, onClick, disabled }) => {
|
|
9469
9446
|
const Icon2 = icon;
|
|
9470
|
-
const [isPressed, setIsPressed] =
|
|
9471
|
-
const intervalRef =
|
|
9472
|
-
|
|
9447
|
+
const [isPressed, setIsPressed] = React5__default.useState(false);
|
|
9448
|
+
const intervalRef = React5__default.useRef(null);
|
|
9449
|
+
React5__default.useEffect(() => {
|
|
9473
9450
|
if (isPressed) {
|
|
9474
9451
|
intervalRef.current = setInterval(() => {
|
|
9475
9452
|
onClick?.();
|
|
@@ -9479,7 +9456,7 @@ var ScrollButton3 = ({ icon, onClick, disabled }) => {
|
|
|
9479
9456
|
}
|
|
9480
9457
|
return () => clearInterval(intervalRef.current);
|
|
9481
9458
|
}, [isPressed, onClick]);
|
|
9482
|
-
|
|
9459
|
+
React5__default.useEffect(() => {
|
|
9483
9460
|
if (disabled) {
|
|
9484
9461
|
clearInterval(intervalRef.current);
|
|
9485
9462
|
setIsPressed(false);
|
|
@@ -9511,7 +9488,7 @@ var ScrollButton3 = ({ icon, onClick, disabled }) => {
|
|
|
9511
9488
|
}
|
|
9512
9489
|
);
|
|
9513
9490
|
};
|
|
9514
|
-
var Legend4 =
|
|
9491
|
+
var Legend4 = React5__default.forwardRef((props, ref) => {
|
|
9515
9492
|
const {
|
|
9516
9493
|
categories,
|
|
9517
9494
|
barCategoryColors,
|
|
@@ -9522,18 +9499,18 @@ var Legend4 = React4__default.forwardRef((props, ref) => {
|
|
|
9522
9499
|
className,
|
|
9523
9500
|
...other
|
|
9524
9501
|
} = props;
|
|
9525
|
-
const scrollableRef =
|
|
9526
|
-
const [hasScroll, setHasScroll] =
|
|
9527
|
-
const [isKeyDowned, setIsKeyDowned] =
|
|
9528
|
-
const intervalRef =
|
|
9529
|
-
const checkScroll =
|
|
9502
|
+
const scrollableRef = React5__default.useRef(null);
|
|
9503
|
+
const [hasScroll, setHasScroll] = React5__default.useState(null);
|
|
9504
|
+
const [isKeyDowned, setIsKeyDowned] = React5__default.useState(null);
|
|
9505
|
+
const intervalRef = React5__default.useRef(null);
|
|
9506
|
+
const checkScroll = React5__default.useCallback(() => {
|
|
9530
9507
|
const scrollable = scrollableRef?.current;
|
|
9531
9508
|
if (!scrollable) return;
|
|
9532
9509
|
const hasLeftScroll = scrollable.scrollLeft > 0;
|
|
9533
9510
|
const hasRightScroll = scrollable.scrollWidth - scrollable.clientWidth > scrollable.scrollLeft;
|
|
9534
9511
|
setHasScroll({ left: hasLeftScroll, right: hasRightScroll });
|
|
9535
9512
|
}, [setHasScroll]);
|
|
9536
|
-
const scrollToTest =
|
|
9513
|
+
const scrollToTest = React5__default.useCallback(
|
|
9537
9514
|
(direction) => {
|
|
9538
9515
|
const element = scrollableRef?.current;
|
|
9539
9516
|
const width = element?.clientWidth ?? 0;
|
|
@@ -9549,7 +9526,7 @@ var Legend4 = React4__default.forwardRef((props, ref) => {
|
|
|
9549
9526
|
},
|
|
9550
9527
|
[enableLegendSlider, checkScroll]
|
|
9551
9528
|
);
|
|
9552
|
-
|
|
9529
|
+
React5__default.useEffect(() => {
|
|
9553
9530
|
const keyDownHandler = (key) => {
|
|
9554
9531
|
if (key === "ArrowLeft") {
|
|
9555
9532
|
scrollToTest("left");
|
|
@@ -9578,7 +9555,7 @@ var Legend4 = React4__default.forwardRef((props, ref) => {
|
|
|
9578
9555
|
e.stopPropagation();
|
|
9579
9556
|
setIsKeyDowned(null);
|
|
9580
9557
|
};
|
|
9581
|
-
|
|
9558
|
+
React5__default.useEffect(() => {
|
|
9582
9559
|
const scrollable = scrollableRef?.current;
|
|
9583
9560
|
if (enableLegendSlider) {
|
|
9584
9561
|
checkScroll();
|
|
@@ -9655,7 +9632,7 @@ var Legend4 = React4__default.forwardRef((props, ref) => {
|
|
|
9655
9632
|
});
|
|
9656
9633
|
Legend4.displayName = "Legend";
|
|
9657
9634
|
var ChartLegend4 = ({ payload }, barCategoryColors, lineCategoryColors, setLegendHeight, activeLegend, onClick, enableLegendSlider, legendPosition, barYAxisWidth, lineYAxisWidth) => {
|
|
9658
|
-
const legendRef =
|
|
9635
|
+
const legendRef = React5__default.useRef(null);
|
|
9659
9636
|
useOnWindowResize(() => {
|
|
9660
9637
|
const calculateHeight = (height) => height ? Number(height) + 15 : 60;
|
|
9661
9638
|
setLegendHeight(calculateHeight(legendRef.current?.clientHeight));
|
|
@@ -9774,7 +9751,7 @@ var ChartTooltip4 = ({
|
|
|
9774
9751
|
}
|
|
9775
9752
|
return null;
|
|
9776
9753
|
};
|
|
9777
|
-
var ComboChart =
|
|
9754
|
+
var ComboChart = React5__default.forwardRef((props, forwardedRef) => {
|
|
9778
9755
|
const defaultSeries = {
|
|
9779
9756
|
categories: [],
|
|
9780
9757
|
colors: AvailableChartColors,
|
|
@@ -9819,11 +9796,11 @@ var ComboChart = React4__default.forwardRef((props, forwardedRef) => {
|
|
|
9819
9796
|
const mergedLineSeries = { ...defaultLineSeries, ...lineSeries };
|
|
9820
9797
|
const CustomTooltip = customTooltip;
|
|
9821
9798
|
const paddingValue = !showXAxis && !mergedBarSeries.showYAxis && enableBiaxial && !mergedLineSeries.showYAxis || startEndOnly && !mergedBarSeries.showYAxis && enableBiaxial && !mergedLineSeries.showYAxis ? 0 : 20;
|
|
9822
|
-
const [legendHeight, setLegendHeight] =
|
|
9823
|
-
const [activeDot, setActiveDot] =
|
|
9824
|
-
const [activeLegend, setActiveLegend] =
|
|
9825
|
-
const prevActiveRef =
|
|
9826
|
-
const prevLabelRef =
|
|
9799
|
+
const [legendHeight, setLegendHeight] = React5__default.useState(60);
|
|
9800
|
+
const [activeDot, setActiveDot] = React5__default.useState(void 0);
|
|
9801
|
+
const [activeLegend, setActiveLegend] = React5__default.useState(void 0);
|
|
9802
|
+
const prevActiveRef = React5__default.useRef(void 0);
|
|
9803
|
+
const prevLabelRef = React5__default.useRef(void 0);
|
|
9827
9804
|
const barCategoryColors = constructCategoryColors(
|
|
9828
9805
|
mergedBarSeries.categories,
|
|
9829
9806
|
mergedBarSeries.colors ?? AvailableChartColors
|
|
@@ -9832,7 +9809,7 @@ var ComboChart = React4__default.forwardRef((props, forwardedRef) => {
|
|
|
9832
9809
|
mergedLineSeries.categories,
|
|
9833
9810
|
mergedLineSeries.colors ?? AvailableChartColors
|
|
9834
9811
|
);
|
|
9835
|
-
const [activeBar, setActiveBar] =
|
|
9812
|
+
const [activeBar, setActiveBar] = React5__default.useState(void 0);
|
|
9836
9813
|
const barYAxisDomain = getYAxisDomain(
|
|
9837
9814
|
mergedBarSeries.autoMinValue ?? false,
|
|
9838
9815
|
mergedBarSeries.minValue,
|
|
@@ -10232,7 +10209,7 @@ var ComboChart = React4__default.forwardRef((props, forwardedRef) => {
|
|
|
10232
10209
|
index2
|
|
10233
10210
|
);
|
|
10234
10211
|
}
|
|
10235
|
-
return /* @__PURE__ */ jsx(
|
|
10212
|
+
return /* @__PURE__ */ jsx(React5__default.Fragment, {}, index2);
|
|
10236
10213
|
},
|
|
10237
10214
|
name: category,
|
|
10238
10215
|
type: "linear",
|
|
@@ -11019,11 +10996,11 @@ function DataTable({
|
|
|
11019
10996
|
columns,
|
|
11020
10997
|
data
|
|
11021
10998
|
}) {
|
|
11022
|
-
const [rowSelection, setRowSelection] =
|
|
11023
|
-
const [columnVisibility, setColumnVisibility] =
|
|
11024
|
-
const [columnFilters, setColumnFilters] =
|
|
11025
|
-
const [sorting, setSorting] =
|
|
11026
|
-
const [globalFilter, setGlobalFilter] =
|
|
10999
|
+
const [rowSelection, setRowSelection] = React5.useState({});
|
|
11000
|
+
const [columnVisibility, setColumnVisibility] = React5.useState({});
|
|
11001
|
+
const [columnFilters, setColumnFilters] = React5.useState([]);
|
|
11002
|
+
const [sorting, setSorting] = React5.useState([]);
|
|
11003
|
+
const [globalFilter, setGlobalFilter] = React5.useState("");
|
|
11027
11004
|
const table = useReactTable({
|
|
11028
11005
|
data,
|
|
11029
11006
|
columns,
|
|
@@ -11215,7 +11192,7 @@ var renderInactiveShape = (props) => {
|
|
|
11215
11192
|
}
|
|
11216
11193
|
);
|
|
11217
11194
|
};
|
|
11218
|
-
var DonutChart =
|
|
11195
|
+
var DonutChart = React5__default.forwardRef(
|
|
11219
11196
|
({
|
|
11220
11197
|
data = [],
|
|
11221
11198
|
value,
|
|
@@ -11233,13 +11210,13 @@ var DonutChart = React4__default.forwardRef(
|
|
|
11233
11210
|
...other
|
|
11234
11211
|
}, forwardedRef) => {
|
|
11235
11212
|
const CustomTooltip = customTooltip;
|
|
11236
|
-
const [activeIndex, setActiveIndex] =
|
|
11213
|
+
const [activeIndex, setActiveIndex] = React5__default.useState(void 0);
|
|
11237
11214
|
const isDonut = variant === "donut";
|
|
11238
11215
|
const parsedLabelInput = parseLabelInput(label, valueFormatter, data, value);
|
|
11239
11216
|
const categories = Array.from(new Set(data.map((item) => item[category])));
|
|
11240
11217
|
const categoryColors = constructCategoryColors(categories, colors3);
|
|
11241
|
-
const prevActiveRef =
|
|
11242
|
-
const prevCategoryRef =
|
|
11218
|
+
const prevActiveRef = React5__default.useRef(void 0);
|
|
11219
|
+
const prevCategoryRef = React5__default.useRef(void 0);
|
|
11243
11220
|
const handleShapeClick = (data2, index, event) => {
|
|
11244
11221
|
event.stopPropagation();
|
|
11245
11222
|
if (!onValueChange) return;
|
|
@@ -11468,10 +11445,10 @@ function DynamicFavicon({ lightModeFavicon, darkModeFavicon }) {
|
|
|
11468
11445
|
}, [lightModeFavicon, darkModeFavicon]);
|
|
11469
11446
|
return null;
|
|
11470
11447
|
}
|
|
11471
|
-
var ExpandableSearchContext =
|
|
11472
|
-
var ExpandableSearch =
|
|
11473
|
-
const [value, setValue] =
|
|
11474
|
-
const formRef =
|
|
11448
|
+
var ExpandableSearchContext = React5.createContext(null);
|
|
11449
|
+
var ExpandableSearch = React5.forwardRef(({ className, onAction, defaultValue = "", ...props }, ref) => {
|
|
11450
|
+
const [value, setValue] = React5.useState(defaultValue);
|
|
11451
|
+
const formRef = React5.useRef(null);
|
|
11475
11452
|
const handleAction = (e) => {
|
|
11476
11453
|
e.preventDefault();
|
|
11477
11454
|
if (onAction) {
|
|
@@ -11489,10 +11466,10 @@ var ExpandableSearch = React4.forwardRef(({ className, onAction, defaultValue =
|
|
|
11489
11466
|
) });
|
|
11490
11467
|
});
|
|
11491
11468
|
ExpandableSearch.displayName = "ExpandableSearch";
|
|
11492
|
-
var ExpandableSearchField =
|
|
11493
|
-
const context =
|
|
11469
|
+
var ExpandableSearchField = React5.forwardRef(({ className, ...props }, ref) => {
|
|
11470
|
+
const context = React5.useContext(ExpandableSearchContext);
|
|
11494
11471
|
if (!context) throw new Error("ExpandableSearchField must be used within ExpandableSearch");
|
|
11495
|
-
const [isFocused, setIsFocused] =
|
|
11472
|
+
const [isFocused, setIsFocused] = React5.useState(false);
|
|
11496
11473
|
const isActive = context.value.length > 0 || isFocused;
|
|
11497
11474
|
return /* @__PURE__ */ jsxs("div", { className: "relative flex-1", children: [
|
|
11498
11475
|
/* @__PURE__ */ jsx("label", { className: "sr-only", htmlFor: "expandable-search", children: "Search" }),
|
|
@@ -11721,15 +11698,15 @@ function Footer({
|
|
|
11721
11698
|
);
|
|
11722
11699
|
}
|
|
11723
11700
|
var Form = FormProvider;
|
|
11724
|
-
var FormFieldContext =
|
|
11701
|
+
var FormFieldContext = React5.createContext({});
|
|
11725
11702
|
var FormField = ({
|
|
11726
11703
|
...props
|
|
11727
11704
|
}) => {
|
|
11728
11705
|
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
11729
11706
|
};
|
|
11730
11707
|
var useFormField = () => {
|
|
11731
|
-
const fieldContext =
|
|
11732
|
-
const itemContext =
|
|
11708
|
+
const fieldContext = React5.useContext(FormFieldContext);
|
|
11709
|
+
const itemContext = React5.useContext(FormItemContext);
|
|
11733
11710
|
const { getFieldState } = useFormContext();
|
|
11734
11711
|
const formState = useFormState({ name: fieldContext.name });
|
|
11735
11712
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
@@ -11746,9 +11723,9 @@ var useFormField = () => {
|
|
|
11746
11723
|
...fieldState
|
|
11747
11724
|
};
|
|
11748
11725
|
};
|
|
11749
|
-
var FormItemContext =
|
|
11726
|
+
var FormItemContext = React5.createContext({});
|
|
11750
11727
|
function FormItem({ className, ...props }) {
|
|
11751
|
-
const id3 =
|
|
11728
|
+
const id3 = React5.useId();
|
|
11752
11729
|
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id: id3 }, children: /* @__PURE__ */ jsx("div", { "data-slot": "form-item", className: cn("grid gap-2", className), ...props }) });
|
|
11753
11730
|
}
|
|
11754
11731
|
function FormLabel({ className, ...props }) {
|
|
@@ -11876,7 +11853,7 @@ function Toggle({
|
|
|
11876
11853
|
}
|
|
11877
11854
|
);
|
|
11878
11855
|
}
|
|
11879
|
-
var ToggleGroupContext =
|
|
11856
|
+
var ToggleGroupContext = React5.createContext({
|
|
11880
11857
|
size: "default",
|
|
11881
11858
|
variant: "ghost"
|
|
11882
11859
|
});
|
|
@@ -11909,7 +11886,7 @@ function ToggleGroupItem({
|
|
|
11909
11886
|
size,
|
|
11910
11887
|
...props
|
|
11911
11888
|
}) {
|
|
11912
|
-
const context =
|
|
11889
|
+
const context = React5.useContext(ToggleGroupContext);
|
|
11913
11890
|
return /* @__PURE__ */ jsx(
|
|
11914
11891
|
ToggleGroupPrimitive.Item,
|
|
11915
11892
|
{
|
|
@@ -11951,7 +11928,7 @@ function FormatToggle({ format, setFormat }) {
|
|
|
11951
11928
|
|
|
11952
11929
|
// package.json
|
|
11953
11930
|
var package_default = {
|
|
11954
|
-
version: "1.
|
|
11931
|
+
version: "1.59.0"};
|
|
11955
11932
|
function Heading({
|
|
11956
11933
|
className,
|
|
11957
11934
|
trim = "normal",
|
|
@@ -12048,9 +12025,9 @@ function Logo(props) {
|
|
|
12048
12025
|
] });
|
|
12049
12026
|
}
|
|
12050
12027
|
function SiteSearch({ navigation }) {
|
|
12051
|
-
const [open, setOpen] =
|
|
12028
|
+
const [open, setOpen] = React5.useState(false);
|
|
12052
12029
|
const router = useRouter();
|
|
12053
|
-
|
|
12030
|
+
React5.useEffect(() => {
|
|
12054
12031
|
const down = (e) => {
|
|
12055
12032
|
if (e.key === "k" && (e.metaKey || e.ctrlKey)) {
|
|
12056
12033
|
e.preventDefault();
|
|
@@ -12060,7 +12037,7 @@ function SiteSearch({ navigation }) {
|
|
|
12060
12037
|
document.addEventListener("keydown", down);
|
|
12061
12038
|
return () => document.removeEventListener("keydown", down);
|
|
12062
12039
|
}, []);
|
|
12063
|
-
const runCommand =
|
|
12040
|
+
const runCommand = React5.useCallback((command) => {
|
|
12064
12041
|
setOpen(false);
|
|
12065
12042
|
command();
|
|
12066
12043
|
}, []);
|
|
@@ -12233,7 +12210,7 @@ function InputOTPSlot({
|
|
|
12233
12210
|
className,
|
|
12234
12211
|
...props
|
|
12235
12212
|
}) {
|
|
12236
|
-
const inputOTPContext =
|
|
12213
|
+
const inputOTPContext = React5.useContext(OTPInputContext);
|
|
12237
12214
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
12238
12215
|
return /* @__PURE__ */ jsxs(
|
|
12239
12216
|
"div",
|
|
@@ -12301,9 +12278,9 @@ var LegendItem4 = ({ name, color: color2, onClick, activeLegend }) => {
|
|
|
12301
12278
|
};
|
|
12302
12279
|
var ScrollButton4 = ({ icon, onClick, disabled }) => {
|
|
12303
12280
|
const Icon2 = icon;
|
|
12304
|
-
const [isPressed, setIsPressed] =
|
|
12305
|
-
const intervalRef =
|
|
12306
|
-
|
|
12281
|
+
const [isPressed, setIsPressed] = React5__default.useState(false);
|
|
12282
|
+
const intervalRef = React5__default.useRef(null);
|
|
12283
|
+
React5__default.useEffect(() => {
|
|
12307
12284
|
if (isPressed) {
|
|
12308
12285
|
intervalRef.current = setInterval(() => {
|
|
12309
12286
|
onClick?.();
|
|
@@ -12313,7 +12290,7 @@ var ScrollButton4 = ({ icon, onClick, disabled }) => {
|
|
|
12313
12290
|
}
|
|
12314
12291
|
return () => clearInterval(intervalRef.current);
|
|
12315
12292
|
}, [isPressed, onClick]);
|
|
12316
|
-
|
|
12293
|
+
React5__default.useEffect(() => {
|
|
12317
12294
|
if (disabled) {
|
|
12318
12295
|
clearInterval(intervalRef.current);
|
|
12319
12296
|
setIsPressed(false);
|
|
@@ -12345,7 +12322,7 @@ var ScrollButton4 = ({ icon, onClick, disabled }) => {
|
|
|
12345
12322
|
}
|
|
12346
12323
|
);
|
|
12347
12324
|
};
|
|
12348
|
-
var Legend7 =
|
|
12325
|
+
var Legend7 = React5__default.forwardRef((props, ref) => {
|
|
12349
12326
|
const {
|
|
12350
12327
|
categories,
|
|
12351
12328
|
colors: colors3 = AvailableChartColors,
|
|
@@ -12355,19 +12332,19 @@ var Legend7 = React4__default.forwardRef((props, ref) => {
|
|
|
12355
12332
|
enableLegendSlider = false,
|
|
12356
12333
|
...other
|
|
12357
12334
|
} = props;
|
|
12358
|
-
const scrollableRef =
|
|
12359
|
-
const scrollButtonsRef =
|
|
12360
|
-
const [hasScroll, setHasScroll] =
|
|
12361
|
-
const [isKeyDowned, setIsKeyDowned] =
|
|
12362
|
-
const intervalRef =
|
|
12363
|
-
const checkScroll =
|
|
12335
|
+
const scrollableRef = React5__default.useRef(null);
|
|
12336
|
+
const scrollButtonsRef = React5__default.useRef(null);
|
|
12337
|
+
const [hasScroll, setHasScroll] = React5__default.useState(null);
|
|
12338
|
+
const [isKeyDowned, setIsKeyDowned] = React5__default.useState(null);
|
|
12339
|
+
const intervalRef = React5__default.useRef(null);
|
|
12340
|
+
const checkScroll = React5__default.useCallback(() => {
|
|
12364
12341
|
const scrollable = scrollableRef?.current;
|
|
12365
12342
|
if (!scrollable) return;
|
|
12366
12343
|
const hasLeftScroll = scrollable.scrollLeft > 0;
|
|
12367
12344
|
const hasRightScroll = scrollable.scrollWidth - scrollable.clientWidth > scrollable.scrollLeft;
|
|
12368
12345
|
setHasScroll({ left: hasLeftScroll, right: hasRightScroll });
|
|
12369
12346
|
}, [setHasScroll]);
|
|
12370
|
-
const scrollToTest =
|
|
12347
|
+
const scrollToTest = React5__default.useCallback(
|
|
12371
12348
|
(direction) => {
|
|
12372
12349
|
const element = scrollableRef?.current;
|
|
12373
12350
|
const scrollButtons = scrollButtonsRef?.current;
|
|
@@ -12385,7 +12362,7 @@ var Legend7 = React4__default.forwardRef((props, ref) => {
|
|
|
12385
12362
|
},
|
|
12386
12363
|
[enableLegendSlider, checkScroll]
|
|
12387
12364
|
);
|
|
12388
|
-
|
|
12365
|
+
React5__default.useEffect(() => {
|
|
12389
12366
|
const keyDownHandler = (key) => {
|
|
12390
12367
|
if (key === "ArrowLeft") {
|
|
12391
12368
|
scrollToTest("left");
|
|
@@ -12414,7 +12391,7 @@ var Legend7 = React4__default.forwardRef((props, ref) => {
|
|
|
12414
12391
|
e.stopPropagation();
|
|
12415
12392
|
setIsKeyDowned(null);
|
|
12416
12393
|
};
|
|
12417
|
-
|
|
12394
|
+
React5__default.useEffect(() => {
|
|
12418
12395
|
const scrollable = scrollableRef?.current;
|
|
12419
12396
|
if (enableLegendSlider) {
|
|
12420
12397
|
checkScroll();
|
|
@@ -12487,7 +12464,7 @@ var Legend7 = React4__default.forwardRef((props, ref) => {
|
|
|
12487
12464
|
});
|
|
12488
12465
|
Legend7.displayName = "Legend";
|
|
12489
12466
|
var ChartLegend5 = ({ payload }, categoryColors, setLegendHeight, activeLegend, onClick, enableLegendSlider, legendPosition, yAxisWidth) => {
|
|
12490
|
-
const legendRef =
|
|
12467
|
+
const legendRef = React5__default.useRef(null);
|
|
12491
12468
|
useOnWindowResize(() => {
|
|
12492
12469
|
const calculateHeight = (height) => height ? Number(height) + 15 : 60;
|
|
12493
12470
|
setLegendHeight(calculateHeight(legendRef.current?.clientHeight));
|
|
@@ -12589,7 +12566,7 @@ var ChartTooltip6 = ({ active, payload, label, valueFormatter }) => {
|
|
|
12589
12566
|
}
|
|
12590
12567
|
return null;
|
|
12591
12568
|
};
|
|
12592
|
-
var LineChart =
|
|
12569
|
+
var LineChart = React5__default.forwardRef((props, ref) => {
|
|
12593
12570
|
const {
|
|
12594
12571
|
data = [],
|
|
12595
12572
|
categories = [],
|
|
@@ -12622,14 +12599,14 @@ var LineChart = React4__default.forwardRef((props, ref) => {
|
|
|
12622
12599
|
} = props;
|
|
12623
12600
|
const CustomTooltip = customTooltip;
|
|
12624
12601
|
const paddingValue = !showXAxis && !showYAxis || startEndOnly && !showYAxis ? 0 : 20;
|
|
12625
|
-
const [legendHeight, setLegendHeight] =
|
|
12626
|
-
const [activeDot, setActiveDot] =
|
|
12627
|
-
const [activeLegend, setActiveLegend] =
|
|
12602
|
+
const [legendHeight, setLegendHeight] = React5__default.useState(60);
|
|
12603
|
+
const [activeDot, setActiveDot] = React5__default.useState(void 0);
|
|
12604
|
+
const [activeLegend, setActiveLegend] = React5__default.useState(void 0);
|
|
12628
12605
|
const categoryColors = constructCategoryColors(categories, colors3);
|
|
12629
12606
|
const yAxisDomain = getYAxisDomain(autoMinValue, minValue, maxValue);
|
|
12630
12607
|
const hasOnValueChange = !!onValueChange;
|
|
12631
|
-
const prevActiveRef =
|
|
12632
|
-
const prevLabelRef =
|
|
12608
|
+
const prevActiveRef = React5__default.useRef(void 0);
|
|
12609
|
+
const prevLabelRef = React5__default.useRef(void 0);
|
|
12633
12610
|
function onDotClick(itemData, event) {
|
|
12634
12611
|
event.stopPropagation();
|
|
12635
12612
|
if (!hasOnValueChange) return;
|
|
@@ -12882,7 +12859,7 @@ var LineChart = React4__default.forwardRef((props, ref) => {
|
|
|
12882
12859
|
index2
|
|
12883
12860
|
);
|
|
12884
12861
|
}
|
|
12885
|
-
return /* @__PURE__ */ jsx(
|
|
12862
|
+
return /* @__PURE__ */ jsx(React5__default.Fragment, {}, index2);
|
|
12886
12863
|
},
|
|
12887
12864
|
name: category,
|
|
12888
12865
|
type: "linear",
|
|
@@ -12942,7 +12919,7 @@ var gapStyles = {
|
|
|
12942
12919
|
md: "space-y-2",
|
|
12943
12920
|
lg: "space-y-3"
|
|
12944
12921
|
};
|
|
12945
|
-
var List2 =
|
|
12922
|
+
var List2 = React5.forwardRef(
|
|
12946
12923
|
({ asChild, variant = "disc", size = "md", gap = "md", className, ...props }, ref) => {
|
|
12947
12924
|
const Comp = asChild ? Slot : "ul";
|
|
12948
12925
|
return /* @__PURE__ */ jsx(
|
|
@@ -12957,7 +12934,7 @@ var List2 = React4.forwardRef(
|
|
|
12957
12934
|
}
|
|
12958
12935
|
);
|
|
12959
12936
|
List2.displayName = "List";
|
|
12960
|
-
var ListItem =
|
|
12937
|
+
var ListItem = React5.forwardRef(
|
|
12961
12938
|
({ icon, className, children, ...props }, ref) => {
|
|
12962
12939
|
if (icon) {
|
|
12963
12940
|
return /* @__PURE__ */ jsxs("li", { ref, "data-slot": "list-item", className: cn2("flex gap-2", className), ...props, children: [
|
|
@@ -13516,9 +13493,9 @@ function MenubarSubContent({
|
|
|
13516
13493
|
);
|
|
13517
13494
|
}
|
|
13518
13495
|
function MobileSearch({ navigation }) {
|
|
13519
|
-
const [open, setOpen] =
|
|
13496
|
+
const [open, setOpen] = React5.useState(false);
|
|
13520
13497
|
const router = useRouter();
|
|
13521
|
-
|
|
13498
|
+
React5.useEffect(() => {
|
|
13522
13499
|
const down = (e) => {
|
|
13523
13500
|
if (e.key === "k" && (e.metaKey || e.ctrlKey)) {
|
|
13524
13501
|
e.preventDefault();
|
|
@@ -13528,7 +13505,7 @@ function MobileSearch({ navigation }) {
|
|
|
13528
13505
|
document.addEventListener("keydown", down);
|
|
13529
13506
|
return () => document.removeEventListener("keydown", down);
|
|
13530
13507
|
}, []);
|
|
13531
|
-
const runCommand =
|
|
13508
|
+
const runCommand = React5.useCallback((command) => {
|
|
13532
13509
|
setOpen(false);
|
|
13533
13510
|
command();
|
|
13534
13511
|
}, []);
|
|
@@ -21902,8 +21879,19 @@ function NavigationMenuIndicator({
|
|
|
21902
21879
|
}
|
|
21903
21880
|
);
|
|
21904
21881
|
}
|
|
21905
|
-
function Wrapper({
|
|
21906
|
-
|
|
21882
|
+
function Wrapper({
|
|
21883
|
+
children,
|
|
21884
|
+
className,
|
|
21885
|
+
...props
|
|
21886
|
+
}) {
|
|
21887
|
+
return /* @__PURE__ */ jsx(
|
|
21888
|
+
"div",
|
|
21889
|
+
{
|
|
21890
|
+
className: `max-w-8xl mx-auto space-y-8 px-4 py-6 sm:px-6 lg:px-12 ${className}`,
|
|
21891
|
+
...props,
|
|
21892
|
+
children
|
|
21893
|
+
}
|
|
21894
|
+
);
|
|
21907
21895
|
}
|
|
21908
21896
|
function PageHeading({
|
|
21909
21897
|
heading,
|
|
@@ -22136,7 +22124,7 @@ var progressBarVariants = tv({
|
|
|
22136
22124
|
variant: "default"
|
|
22137
22125
|
}
|
|
22138
22126
|
});
|
|
22139
|
-
var ProgressBar =
|
|
22127
|
+
var ProgressBar = React5__default.forwardRef(
|
|
22140
22128
|
({
|
|
22141
22129
|
value = 0,
|
|
22142
22130
|
max = 100,
|
|
@@ -22224,7 +22212,7 @@ var progressCircleVariants = tv({
|
|
|
22224
22212
|
variant: "default"
|
|
22225
22213
|
}
|
|
22226
22214
|
});
|
|
22227
|
-
var ProgressCircle =
|
|
22215
|
+
var ProgressCircle = React5__default.forwardRef(
|
|
22228
22216
|
({
|
|
22229
22217
|
value = 0,
|
|
22230
22218
|
max = 100,
|
|
@@ -22485,8 +22473,8 @@ function Skeleton({ className, ...props }) {
|
|
|
22485
22473
|
}
|
|
22486
22474
|
var MOBILE_BREAKPOINT = 768;
|
|
22487
22475
|
function useIsMobile() {
|
|
22488
|
-
const [isMobile, setIsMobile] =
|
|
22489
|
-
|
|
22476
|
+
const [isMobile, setIsMobile] = React5.useState(void 0);
|
|
22477
|
+
React5.useEffect(() => {
|
|
22490
22478
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
22491
22479
|
const onChange = () => {
|
|
22492
22480
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -22503,9 +22491,9 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
22503
22491
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
22504
22492
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
22505
22493
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
22506
|
-
var SidebarContext =
|
|
22494
|
+
var SidebarContext = React5.createContext(null);
|
|
22507
22495
|
function useSidebar() {
|
|
22508
|
-
const context =
|
|
22496
|
+
const context = React5.useContext(SidebarContext);
|
|
22509
22497
|
if (!context) {
|
|
22510
22498
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
22511
22499
|
}
|
|
@@ -22521,10 +22509,10 @@ function SidebarProvider({
|
|
|
22521
22509
|
...props
|
|
22522
22510
|
}) {
|
|
22523
22511
|
const isMobile = useIsMobile();
|
|
22524
|
-
const [openMobile, setOpenMobile] =
|
|
22525
|
-
const [_open, _setOpen] =
|
|
22512
|
+
const [openMobile, setOpenMobile] = React5.useState(false);
|
|
22513
|
+
const [_open, _setOpen] = React5.useState(defaultOpen);
|
|
22526
22514
|
const open = openProp ?? _open;
|
|
22527
|
-
const setOpen =
|
|
22515
|
+
const setOpen = React5.useCallback(
|
|
22528
22516
|
(value) => {
|
|
22529
22517
|
const openState = typeof value === "function" ? value(open) : value;
|
|
22530
22518
|
if (setOpenProp) {
|
|
@@ -22536,10 +22524,10 @@ function SidebarProvider({
|
|
|
22536
22524
|
},
|
|
22537
22525
|
[setOpenProp, open]
|
|
22538
22526
|
);
|
|
22539
|
-
const toggleSidebar =
|
|
22527
|
+
const toggleSidebar = React5.useCallback(() => {
|
|
22540
22528
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
22541
22529
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
22542
|
-
|
|
22530
|
+
React5.useEffect(() => {
|
|
22543
22531
|
const handleKeyDown = (event) => {
|
|
22544
22532
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
22545
22533
|
event.preventDefault();
|
|
@@ -22550,7 +22538,7 @@ function SidebarProvider({
|
|
|
22550
22538
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
22551
22539
|
}, [toggleSidebar]);
|
|
22552
22540
|
const state = open ? "expanded" : "collapsed";
|
|
22553
|
-
const contextValue =
|
|
22541
|
+
const contextValue = React5.useMemo(
|
|
22554
22542
|
() => ({
|
|
22555
22543
|
state,
|
|
22556
22544
|
open,
|
|
@@ -22993,7 +22981,7 @@ function SidebarMenuSkeleton({
|
|
|
22993
22981
|
showIcon = false,
|
|
22994
22982
|
...props
|
|
22995
22983
|
}) {
|
|
22996
|
-
const width =
|
|
22984
|
+
const width = React5.useMemo(() => {
|
|
22997
22985
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
22998
22986
|
}, []);
|
|
22999
22987
|
return /* @__PURE__ */ jsxs(
|
|
@@ -23167,7 +23155,7 @@ function Slider({
|
|
|
23167
23155
|
max = 100,
|
|
23168
23156
|
...props
|
|
23169
23157
|
}) {
|
|
23170
|
-
const _values =
|
|
23158
|
+
const _values = React5.useMemo(
|
|
23171
23159
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
23172
23160
|
[value, defaultValue, min, max]
|
|
23173
23161
|
);
|
|
@@ -23231,7 +23219,7 @@ var Toaster = ({ ...props }) => {
|
|
|
23231
23219
|
}
|
|
23232
23220
|
);
|
|
23233
23221
|
};
|
|
23234
|
-
var SparkAreaChart =
|
|
23222
|
+
var SparkAreaChart = React5__default.forwardRef(
|
|
23235
23223
|
(props, forwardedRef) => {
|
|
23236
23224
|
const {
|
|
23237
23225
|
data = [],
|
|
@@ -23250,7 +23238,7 @@ var SparkAreaChart = React4__default.forwardRef(
|
|
|
23250
23238
|
const categoryColors = constructCategoryColors(categories, colors3);
|
|
23251
23239
|
const yAxisDomain = getYAxisDomain(autoMinValue, minValue, maxValue);
|
|
23252
23240
|
const stacked = type === "stacked" || type === "percent";
|
|
23253
|
-
const areaId =
|
|
23241
|
+
const areaId = React5__default.useId();
|
|
23254
23242
|
const getFillContent = (fillType) => {
|
|
23255
23243
|
switch (fillType) {
|
|
23256
23244
|
case "none":
|
|
@@ -23289,7 +23277,7 @@ var SparkAreaChart = React4__default.forwardRef(
|
|
|
23289
23277
|
/* @__PURE__ */ jsx(YAxis, { hide: true, domain: yAxisDomain }),
|
|
23290
23278
|
categories.map((category) => {
|
|
23291
23279
|
const categoryId = `${areaId}-${category.replace(/[^a-zA-Z0-9]/g, "")}`;
|
|
23292
|
-
return /* @__PURE__ */ jsxs(
|
|
23280
|
+
return /* @__PURE__ */ jsxs(React5__default.Fragment, { children: [
|
|
23293
23281
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
23294
23282
|
"linearGradient",
|
|
23295
23283
|
{
|
|
@@ -23342,7 +23330,7 @@ var SparkAreaChart = React4__default.forwardRef(
|
|
|
23342
23330
|
}
|
|
23343
23331
|
);
|
|
23344
23332
|
SparkAreaChart.displayName = "SparkAreaChart";
|
|
23345
|
-
var SparkLineChart =
|
|
23333
|
+
var SparkLineChart = React5__default.forwardRef(
|
|
23346
23334
|
(props, forwardedRef) => {
|
|
23347
23335
|
const {
|
|
23348
23336
|
data = [],
|
|
@@ -23409,7 +23397,7 @@ var SparkLineChart = React4__default.forwardRef(
|
|
|
23409
23397
|
}
|
|
23410
23398
|
);
|
|
23411
23399
|
SparkLineChart.displayName = "SparkLineChart";
|
|
23412
|
-
var SparkBarChart =
|
|
23400
|
+
var SparkBarChart = React5__default.forwardRef((props, forwardedRef) => {
|
|
23413
23401
|
const {
|
|
23414
23402
|
data = [],
|
|
23415
23403
|
categories = [],
|
|
@@ -23510,7 +23498,7 @@ function Spinner({ className, size = "md", ...props }) {
|
|
|
23510
23498
|
}
|
|
23511
23499
|
) });
|
|
23512
23500
|
}
|
|
23513
|
-
var StepIndicator =
|
|
23501
|
+
var StepIndicator = React5.forwardRef(
|
|
23514
23502
|
({ className, array, onLinkClick, ...props }, ref) => {
|
|
23515
23503
|
const pathname = usePathname();
|
|
23516
23504
|
return /* @__PURE__ */ jsx("ul", { role: "list", ref, className: cn("w-full", className), ...props, children: array.map((step, stepIdx) => /* @__PURE__ */ jsx(
|
|
@@ -24015,8 +24003,8 @@ function TableOfContents({ tableOfContents }) {
|
|
|
24015
24003
|
function getSubtree(options, content) {
|
|
24016
24004
|
const { asChild, children } = options;
|
|
24017
24005
|
if (!asChild) return typeof content === "function" ? content(children) : content;
|
|
24018
|
-
const firstChild =
|
|
24019
|
-
return
|
|
24006
|
+
const firstChild = React5__default.Children.only(children);
|
|
24007
|
+
return React5__default.cloneElement(firstChild, {
|
|
24020
24008
|
...firstChild.props,
|
|
24021
24009
|
children: typeof content === "function" ? content(firstChild.props.children) : content
|
|
24022
24010
|
});
|
|
@@ -24032,7 +24020,7 @@ var TabNavigationContext = createContext({
|
|
|
24032
24020
|
registerTab: () => {
|
|
24033
24021
|
}
|
|
24034
24022
|
});
|
|
24035
|
-
var TabNavigation =
|
|
24023
|
+
var TabNavigation = React5__default.forwardRef(({ className, children, ...props }, forwardedRef) => {
|
|
24036
24024
|
const [hoveredTab, setHoveredTab] = useState(null);
|
|
24037
24025
|
const [activeTab, setActiveTab] = useState(null);
|
|
24038
24026
|
const [tabRefs] = useState(/* @__PURE__ */ new Map());
|
|
@@ -24085,11 +24073,11 @@ var TabNavigation = React4__default.forwardRef(({ className, children, ...props
|
|
|
24085
24073
|
);
|
|
24086
24074
|
});
|
|
24087
24075
|
TabNavigation.displayName = "TabNavigation";
|
|
24088
|
-
var TabNavigationLink =
|
|
24076
|
+
var TabNavigationLink = React5__default.forwardRef(({ asChild, disabled, className, children, tabId, ...props }, forwardedRef) => {
|
|
24089
24077
|
const { setHoveredTab, activeTab, setActiveTab, registerTab } = useContext(TabNavigationContext);
|
|
24090
|
-
const linkRef =
|
|
24078
|
+
const linkRef = React5__default.useRef(null);
|
|
24091
24079
|
const id3 = tabId || "unique-id";
|
|
24092
|
-
|
|
24080
|
+
React5__default.useEffect(() => {
|
|
24093
24081
|
if (linkRef.current) {
|
|
24094
24082
|
registerTab(id3, linkRef.current);
|
|
24095
24083
|
}
|
|
@@ -24111,7 +24099,7 @@ var TabNavigationLink = React4__default.forwardRef(({ asChild, disabled, classNa
|
|
|
24111
24099
|
return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Item, { className: "flex", "aria-disabled": disabled, children: /* @__PURE__ */ jsx(
|
|
24112
24100
|
NavigationMenuPrimitive.Link,
|
|
24113
24101
|
{
|
|
24114
|
-
ref:
|
|
24102
|
+
ref: React5__default.useMemo(() => {
|
|
24115
24103
|
return (node) => {
|
|
24116
24104
|
linkRef.current = node;
|
|
24117
24105
|
if (typeof forwardedRef === "function") {
|
|
@@ -24161,7 +24149,7 @@ var Tabs2 = (props) => {
|
|
|
24161
24149
|
return /* @__PURE__ */ jsx(TabsPrimitives.Root, { "tremor-id": "tremor-raw", ...props });
|
|
24162
24150
|
};
|
|
24163
24151
|
Tabs2.displayName = "Tabs";
|
|
24164
|
-
var TabsListVariantContext =
|
|
24152
|
+
var TabsListVariantContext = React5__default.createContext("line");
|
|
24165
24153
|
var variantStyles2 = {
|
|
24166
24154
|
line: cn(
|
|
24167
24155
|
// base
|
|
@@ -24176,7 +24164,7 @@ var variantStyles2 = {
|
|
|
24176
24164
|
"bg-grey-100 dark:bg-grey-900"
|
|
24177
24165
|
)
|
|
24178
24166
|
};
|
|
24179
|
-
var TabsList =
|
|
24167
|
+
var TabsList = React5__default.forwardRef(
|
|
24180
24168
|
({ className, variant = "line", children, ...props }, forwardedRef) => /* @__PURE__ */ jsx(
|
|
24181
24169
|
TabsPrimitives.List,
|
|
24182
24170
|
{
|
|
@@ -24225,8 +24213,8 @@ function getVariantStyles(tabVariant) {
|
|
|
24225
24213
|
);
|
|
24226
24214
|
}
|
|
24227
24215
|
}
|
|
24228
|
-
var TabsTrigger =
|
|
24229
|
-
const variant =
|
|
24216
|
+
var TabsTrigger = React5__default.forwardRef(({ className, children, ...props }, forwardedRef) => {
|
|
24217
|
+
const variant = React5__default.useContext(TabsListVariantContext);
|
|
24230
24218
|
return /* @__PURE__ */ jsx(
|
|
24231
24219
|
TabsPrimitives.Trigger,
|
|
24232
24220
|
{
|
|
@@ -24238,7 +24226,7 @@ var TabsTrigger = React4__default.forwardRef(({ className, children, ...props },
|
|
|
24238
24226
|
);
|
|
24239
24227
|
});
|
|
24240
24228
|
TabsTrigger.displayName = "TabsTrigger";
|
|
24241
|
-
var TabsContent =
|
|
24229
|
+
var TabsContent = React5__default.forwardRef(({ className, ...props }, forwardedRef) => /* @__PURE__ */ jsx(
|
|
24242
24230
|
TabsPrimitives.Content,
|
|
24243
24231
|
{
|
|
24244
24232
|
ref: forwardedRef,
|
|
@@ -24525,7 +24513,7 @@ function useToc() {
|
|
|
24525
24513
|
return useContext(TocContext);
|
|
24526
24514
|
}
|
|
24527
24515
|
var Block = ({ color: color2, tooltip, defaultBackgroundColor, hoverEffect }) => {
|
|
24528
|
-
const [open, setOpen] =
|
|
24516
|
+
const [open, setOpen] = React5__default.useState(false);
|
|
24529
24517
|
return /* @__PURE__ */ jsxs(
|
|
24530
24518
|
HoverCardPrimitive.Root,
|
|
24531
24519
|
{
|
|
@@ -24568,7 +24556,7 @@ var Block = ({ color: color2, tooltip, defaultBackgroundColor, hoverEffect }) =>
|
|
|
24568
24556
|
);
|
|
24569
24557
|
};
|
|
24570
24558
|
Block.displayName = "Block";
|
|
24571
|
-
var Tracker =
|
|
24559
|
+
var Tracker = React5__default.forwardRef(
|
|
24572
24560
|
({
|
|
24573
24561
|
data = [],
|
|
24574
24562
|
defaultBackgroundColor = "bg-gray-400 dark:bg-gray-400",
|