@northslopetech/altitude-ui 2.0.14 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +809 -142
- package/dist/index.d.ts +809 -142
- package/dist/index.js +1248 -168
- package/dist/index.mjs +1228 -168
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -35,14 +35,19 @@ __export(index_exports, {
|
|
|
35
35
|
ArrowRight: () => ArrowRight,
|
|
36
36
|
ArrowUp: () => ArrowUp,
|
|
37
37
|
Badge: () => Badge,
|
|
38
|
+
BarChart: () => BarChart,
|
|
38
39
|
Bell: () => Bell,
|
|
39
40
|
Bookmark: () => Bookmark,
|
|
40
41
|
Button: () => Button,
|
|
42
|
+
CHART_COLORS: () => CHART_COLORS,
|
|
43
|
+
CHART_CONSTANTS: () => CHART_CONSTANTS,
|
|
44
|
+
COLOR_SCHEMES: () => COLOR_SCHEMES,
|
|
41
45
|
Calendar: () => Calendar,
|
|
42
46
|
CaretDown: () => CaretDown,
|
|
43
47
|
CaretLeft: () => CaretLeft,
|
|
44
48
|
CaretRight: () => CaretRight,
|
|
45
49
|
CaretUp: () => CaretUp,
|
|
50
|
+
ChartLegend: () => ChartLegend,
|
|
46
51
|
Chat: () => Chat,
|
|
47
52
|
Check: () => Check,
|
|
48
53
|
CheckIcon: () => CheckIcon,
|
|
@@ -80,9 +85,20 @@ __export(index_exports, {
|
|
|
80
85
|
Exclamation: () => Exclamation,
|
|
81
86
|
EyeClosed: () => EyeClosed,
|
|
82
87
|
EyeOpen: () => EyeOpen,
|
|
88
|
+
Field: () => Field,
|
|
89
|
+
FieldContent: () => FieldContent,
|
|
90
|
+
FieldDescription: () => FieldDescription,
|
|
91
|
+
FieldError: () => FieldError,
|
|
92
|
+
FieldGroup: () => FieldGroup,
|
|
93
|
+
FieldLabel: () => FieldLabel,
|
|
94
|
+
FieldLegend: () => FieldLegend,
|
|
95
|
+
FieldSeparator: () => FieldSeparator,
|
|
96
|
+
FieldSet: () => FieldSet,
|
|
97
|
+
FieldTitle: () => FieldTitle,
|
|
83
98
|
Filter: () => Filter,
|
|
84
99
|
FilterDescending: () => FilterDescending,
|
|
85
100
|
FormField: () => FormField,
|
|
101
|
+
GenericTooltip: () => GenericTooltip,
|
|
86
102
|
GraphBar: () => GraphBar,
|
|
87
103
|
GraphDonut: () => GraphDonut,
|
|
88
104
|
GraphLine: () => GraphLine,
|
|
@@ -90,7 +106,9 @@ __export(index_exports, {
|
|
|
90
106
|
HamburgerMenu: () => HamburgerMenu,
|
|
91
107
|
Home: () => Home,
|
|
92
108
|
Information: () => Information,
|
|
93
|
-
Input: () =>
|
|
109
|
+
Input: () => Input,
|
|
110
|
+
Label: () => Label2,
|
|
111
|
+
LineChart: () => LineChart,
|
|
94
112
|
Location: () => Location,
|
|
95
113
|
Lock: () => Lock,
|
|
96
114
|
Logout: () => Logout,
|
|
@@ -98,6 +116,7 @@ __export(index_exports, {
|
|
|
98
116
|
Minus: () => Minus,
|
|
99
117
|
MoreMenu: () => MoreMenu,
|
|
100
118
|
Phone: () => Phone,
|
|
119
|
+
PieChart: () => PieChart,
|
|
101
120
|
Plus: () => Plus,
|
|
102
121
|
QuestionCircle: () => QuestionCircle,
|
|
103
122
|
Select: () => Select,
|
|
@@ -110,14 +129,19 @@ __export(index_exports, {
|
|
|
110
129
|
SelectSeparator: () => SelectSeparator,
|
|
111
130
|
SelectTrigger: () => SelectTrigger,
|
|
112
131
|
SelectValue: () => SelectValue,
|
|
132
|
+
Separator: () => Separator2,
|
|
113
133
|
Share: () => Share,
|
|
114
134
|
Star: () => Star,
|
|
115
135
|
Statement: () => Statement,
|
|
116
136
|
Table: () => Table,
|
|
137
|
+
TableIcon: () => TableIcon,
|
|
117
138
|
Tabs: () => Tabs,
|
|
118
139
|
TabsContent: () => TabsContent,
|
|
119
140
|
TabsList: () => TabsList,
|
|
120
141
|
TabsTrigger: () => TabsTrigger,
|
|
142
|
+
Textarea: () => Textarea,
|
|
143
|
+
TooltipContainer: () => TooltipContainer,
|
|
144
|
+
TooltipItem: () => TooltipItem,
|
|
121
145
|
Trash: () => Trash,
|
|
122
146
|
Typography: () => Typography,
|
|
123
147
|
Upload: () => Upload,
|
|
@@ -128,8 +152,20 @@ __export(index_exports, {
|
|
|
128
152
|
X: () => X,
|
|
129
153
|
badgeVariants: () => badgeVariants,
|
|
130
154
|
buttonVariants: () => buttonVariants,
|
|
155
|
+
calculateYAxisWidth: () => calculateYAxisWidth,
|
|
131
156
|
checkboxVariants: () => checkboxVariants,
|
|
132
|
-
|
|
157
|
+
createCustomXAxisLabel: () => createCustomXAxisLabel,
|
|
158
|
+
createCustomYAxisLabel: () => createCustomYAxisLabel,
|
|
159
|
+
createCustomYAxisRightLabel: () => createCustomYAxisRightLabel,
|
|
160
|
+
createLegendItems: () => createLegendItems,
|
|
161
|
+
customXAxisTick: () => customXAxisTick,
|
|
162
|
+
customXAxisTickRotated: () => customXAxisTickRotated,
|
|
163
|
+
customYAxisTick: () => customYAxisTick,
|
|
164
|
+
formatLargeNumber: () => formatLargeNumber,
|
|
165
|
+
formatPercentage: () => formatPercentage,
|
|
166
|
+
getHeatmapColor: () => getHeatmapColor,
|
|
167
|
+
getPerformanceColor: () => getPerformanceColor,
|
|
168
|
+
getSeriesColor: () => getSeriesColor,
|
|
133
169
|
selectTriggerVariants: () => selectTriggerVariants,
|
|
134
170
|
tabsVariants: () => tabsVariants,
|
|
135
171
|
typographyVariants: () => typographyVariants,
|
|
@@ -1609,7 +1645,7 @@ var Statement = ({
|
|
|
1609
1645
|
)
|
|
1610
1646
|
}
|
|
1611
1647
|
);
|
|
1612
|
-
var
|
|
1648
|
+
var TableIcon = ({
|
|
1613
1649
|
className,
|
|
1614
1650
|
variant = "dark",
|
|
1615
1651
|
...props
|
|
@@ -2052,32 +2088,276 @@ var FormField = React4.forwardRef(
|
|
|
2052
2088
|
);
|
|
2053
2089
|
FormField.displayName = "FormField";
|
|
2054
2090
|
|
|
2055
|
-
// src/components/ui/
|
|
2056
|
-
var
|
|
2057
|
-
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
2058
|
-
|
|
2059
|
-
// src/components/ui/input.tsx
|
|
2060
|
-
var React5 = __toESM(require("react"));
|
|
2091
|
+
// src/components/ui/field.tsx
|
|
2092
|
+
var import_react = require("react");
|
|
2061
2093
|
var import_class_variance_authority5 = require("class-variance-authority");
|
|
2094
|
+
|
|
2095
|
+
// src/components/ui/label.tsx
|
|
2096
|
+
var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
|
|
2062
2097
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
2063
|
-
|
|
2064
|
-
|
|
2098
|
+
function Label2({
|
|
2099
|
+
className,
|
|
2100
|
+
...props
|
|
2101
|
+
}) {
|
|
2102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2103
|
+
LabelPrimitive.Root,
|
|
2104
|
+
{
|
|
2105
|
+
"data-slot": "label",
|
|
2106
|
+
className: cn(
|
|
2107
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
2108
|
+
className
|
|
2109
|
+
),
|
|
2110
|
+
...props
|
|
2111
|
+
}
|
|
2112
|
+
);
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
// src/components/ui/separator.tsx
|
|
2116
|
+
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"));
|
|
2117
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
2118
|
+
function Separator2({
|
|
2119
|
+
className,
|
|
2120
|
+
orientation = "horizontal",
|
|
2121
|
+
decorative = true,
|
|
2122
|
+
...props
|
|
2123
|
+
}) {
|
|
2124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2125
|
+
SeparatorPrimitive.Root,
|
|
2126
|
+
{
|
|
2127
|
+
"data-slot": "separator",
|
|
2128
|
+
decorative,
|
|
2129
|
+
orientation,
|
|
2130
|
+
className: cn(
|
|
2131
|
+
"bg-subtle shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
2132
|
+
className
|
|
2133
|
+
),
|
|
2134
|
+
...props
|
|
2135
|
+
}
|
|
2136
|
+
);
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
// src/components/ui/field.tsx
|
|
2140
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2141
|
+
function FieldSet({ className, ...props }) {
|
|
2142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2143
|
+
"fieldset",
|
|
2144
|
+
{
|
|
2145
|
+
"data-slot": "field-set",
|
|
2146
|
+
className: cn(
|
|
2147
|
+
"flex flex-col gap-6",
|
|
2148
|
+
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
2149
|
+
className
|
|
2150
|
+
),
|
|
2151
|
+
...props
|
|
2152
|
+
}
|
|
2153
|
+
);
|
|
2154
|
+
}
|
|
2155
|
+
function FieldLegend({
|
|
2156
|
+
className,
|
|
2157
|
+
variant = "legend",
|
|
2158
|
+
...props
|
|
2159
|
+
}) {
|
|
2160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2161
|
+
"legend",
|
|
2162
|
+
{
|
|
2163
|
+
"data-slot": "field-legend",
|
|
2164
|
+
"data-variant": variant,
|
|
2165
|
+
className: cn(
|
|
2166
|
+
"mb-3 font-medium",
|
|
2167
|
+
"data-[variant=legend]:text-base",
|
|
2168
|
+
"data-[variant=label]:text-sm",
|
|
2169
|
+
className
|
|
2170
|
+
),
|
|
2171
|
+
...props
|
|
2172
|
+
}
|
|
2173
|
+
);
|
|
2174
|
+
}
|
|
2175
|
+
function FieldGroup({ className, ...props }) {
|
|
2176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2177
|
+
"div",
|
|
2178
|
+
{
|
|
2179
|
+
"data-slot": "field-group",
|
|
2180
|
+
className: cn(
|
|
2181
|
+
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
2182
|
+
className
|
|
2183
|
+
),
|
|
2184
|
+
...props
|
|
2185
|
+
}
|
|
2186
|
+
);
|
|
2187
|
+
}
|
|
2188
|
+
var fieldVariants = (0, import_class_variance_authority5.cva)(
|
|
2189
|
+
"group/field data-[invalid=true]:text-error flex w-full gap-3",
|
|
2065
2190
|
{
|
|
2066
2191
|
variants: {
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2192
|
+
orientation: {
|
|
2193
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
2194
|
+
horizontal: [
|
|
2195
|
+
"flex-row items-center",
|
|
2196
|
+
"[&>[data-slot=field-label]]:flex-auto",
|
|
2197
|
+
"has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start"
|
|
2198
|
+
],
|
|
2199
|
+
responsive: [
|
|
2200
|
+
"@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
|
|
2201
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
2202
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
2203
|
+
]
|
|
2070
2204
|
}
|
|
2071
2205
|
},
|
|
2072
2206
|
defaultVariants: {
|
|
2073
|
-
|
|
2207
|
+
orientation: "vertical"
|
|
2074
2208
|
}
|
|
2075
2209
|
}
|
|
2076
2210
|
);
|
|
2211
|
+
function Field({
|
|
2212
|
+
className,
|
|
2213
|
+
orientation = "vertical",
|
|
2214
|
+
...props
|
|
2215
|
+
}) {
|
|
2216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2217
|
+
"div",
|
|
2218
|
+
{
|
|
2219
|
+
role: "group",
|
|
2220
|
+
"data-slot": "field",
|
|
2221
|
+
"data-orientation": orientation,
|
|
2222
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
2223
|
+
...props
|
|
2224
|
+
}
|
|
2225
|
+
);
|
|
2226
|
+
}
|
|
2227
|
+
function FieldContent({ className, ...props }) {
|
|
2228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2229
|
+
"div",
|
|
2230
|
+
{
|
|
2231
|
+
"data-slot": "field-content",
|
|
2232
|
+
className: cn(
|
|
2233
|
+
"group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
|
|
2234
|
+
className
|
|
2235
|
+
),
|
|
2236
|
+
...props
|
|
2237
|
+
}
|
|
2238
|
+
);
|
|
2239
|
+
}
|
|
2240
|
+
function FieldLabel({
|
|
2241
|
+
className,
|
|
2242
|
+
...props
|
|
2243
|
+
}) {
|
|
2244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2245
|
+
Label2,
|
|
2246
|
+
{
|
|
2247
|
+
"data-slot": "field-label",
|
|
2248
|
+
className: cn(
|
|
2249
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
2250
|
+
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4",
|
|
2251
|
+
"has-data-[state=checked]:bg-gray has-data-[state=checked]:border-dark",
|
|
2252
|
+
className
|
|
2253
|
+
),
|
|
2254
|
+
...props
|
|
2255
|
+
}
|
|
2256
|
+
);
|
|
2257
|
+
}
|
|
2258
|
+
function FieldTitle({ className, ...props }) {
|
|
2259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2260
|
+
"div",
|
|
2261
|
+
{
|
|
2262
|
+
"data-slot": "field-label",
|
|
2263
|
+
className: cn(
|
|
2264
|
+
"flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
2265
|
+
className
|
|
2266
|
+
),
|
|
2267
|
+
...props
|
|
2268
|
+
}
|
|
2269
|
+
);
|
|
2270
|
+
}
|
|
2271
|
+
function FieldDescription({ className, ...props }) {
|
|
2272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2273
|
+
"p",
|
|
2274
|
+
{
|
|
2275
|
+
"data-slot": "field-description",
|
|
2276
|
+
className: cn(
|
|
2277
|
+
"text-secondary text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
2278
|
+
"nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5",
|
|
2279
|
+
"[&>a:hover]:text-dark [&>a]:underline [&>a]:underline-offset-4",
|
|
2280
|
+
className
|
|
2281
|
+
),
|
|
2282
|
+
...props
|
|
2283
|
+
}
|
|
2284
|
+
);
|
|
2285
|
+
}
|
|
2286
|
+
function FieldSeparator({
|
|
2287
|
+
children,
|
|
2288
|
+
className,
|
|
2289
|
+
...props
|
|
2290
|
+
}) {
|
|
2291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2292
|
+
"div",
|
|
2293
|
+
{
|
|
2294
|
+
"data-slot": "field-separator",
|
|
2295
|
+
"data-content": !!children,
|
|
2296
|
+
className: cn(
|
|
2297
|
+
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
2298
|
+
className
|
|
2299
|
+
),
|
|
2300
|
+
...props,
|
|
2301
|
+
children: [
|
|
2302
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
2303
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2304
|
+
"span",
|
|
2305
|
+
{
|
|
2306
|
+
className: "bg-light text-secondary relative mx-auto block w-fit px-2",
|
|
2307
|
+
"data-slot": "field-separator-content",
|
|
2308
|
+
children
|
|
2309
|
+
}
|
|
2310
|
+
)
|
|
2311
|
+
]
|
|
2312
|
+
}
|
|
2313
|
+
);
|
|
2314
|
+
}
|
|
2315
|
+
function FieldError({
|
|
2316
|
+
className,
|
|
2317
|
+
children,
|
|
2318
|
+
errors,
|
|
2319
|
+
...props
|
|
2320
|
+
}) {
|
|
2321
|
+
const content = (0, import_react.useMemo)(() => {
|
|
2322
|
+
if (children) {
|
|
2323
|
+
return children;
|
|
2324
|
+
}
|
|
2325
|
+
if (!errors) {
|
|
2326
|
+
return null;
|
|
2327
|
+
}
|
|
2328
|
+
if (errors?.length === 1 && errors[0]?.message) {
|
|
2329
|
+
return errors[0].message;
|
|
2330
|
+
}
|
|
2331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
2332
|
+
(error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { children: error.message }, index)
|
|
2333
|
+
) });
|
|
2334
|
+
}, [children, errors]);
|
|
2335
|
+
if (!content) {
|
|
2336
|
+
return null;
|
|
2337
|
+
}
|
|
2338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2339
|
+
"div",
|
|
2340
|
+
{
|
|
2341
|
+
role: "alert",
|
|
2342
|
+
"data-slot": "field-error",
|
|
2343
|
+
className: cn("text-error text-sm font-normal", className),
|
|
2344
|
+
...props,
|
|
2345
|
+
children: content
|
|
2346
|
+
}
|
|
2347
|
+
);
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
// src/components/ui/date-picker.tsx
|
|
2351
|
+
var React6 = __toESM(require("react"));
|
|
2352
|
+
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
2353
|
+
|
|
2354
|
+
// src/components/ui/input.tsx
|
|
2355
|
+
var React5 = __toESM(require("react"));
|
|
2356
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2357
|
+
var inputBaseStyles = "flex h-10 py-2 w-full border bg-light text-dark focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:border-secondary transition-colors rounded-md px-3 min-w-80 border-secondary focus-visible:border-2 focus-visible:border-strong placeholder:text-secondary read-only:bg-gray read-only:cursor-default read-only:border-transparent read-only:text-secondary read-only:focus-visible:border-transparent";
|
|
2077
2358
|
var Input = React5.forwardRef(
|
|
2078
2359
|
({
|
|
2079
2360
|
className,
|
|
2080
|
-
variant = "input",
|
|
2081
2361
|
style,
|
|
2082
2362
|
value,
|
|
2083
2363
|
onChange,
|
|
@@ -2099,15 +2379,7 @@ var Input = React5.forwardRef(
|
|
|
2099
2379
|
if (!isControlled) {
|
|
2100
2380
|
setInternalValue(e.target.value);
|
|
2101
2381
|
}
|
|
2102
|
-
if (
|
|
2103
|
-
onChange(e);
|
|
2104
|
-
}
|
|
2105
|
-
};
|
|
2106
|
-
const handleTextareaChange = (e) => {
|
|
2107
|
-
if (!isControlled) {
|
|
2108
|
-
setInternalValue(e.target.value);
|
|
2109
|
-
}
|
|
2110
|
-
if (variant === "textarea" && onChange) {
|
|
2382
|
+
if (onChange) {
|
|
2111
2383
|
onChange(e);
|
|
2112
2384
|
}
|
|
2113
2385
|
};
|
|
@@ -2116,60 +2388,20 @@ var Input = React5.forwardRef(
|
|
|
2116
2388
|
setInternalValue("");
|
|
2117
2389
|
}
|
|
2118
2390
|
if (onChange) {
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
onChange(inputEvent);
|
|
2125
|
-
} else {
|
|
2126
|
-
const textareaEvent = {
|
|
2127
|
-
target: { value: "" },
|
|
2128
|
-
currentTarget: { value: "" }
|
|
2129
|
-
};
|
|
2130
|
-
onChange(
|
|
2131
|
-
textareaEvent
|
|
2132
|
-
);
|
|
2133
|
-
}
|
|
2391
|
+
const inputEvent = {
|
|
2392
|
+
target: { value: "" },
|
|
2393
|
+
currentTarget: { value: "" }
|
|
2394
|
+
};
|
|
2395
|
+
onChange(inputEvent);
|
|
2134
2396
|
}
|
|
2135
2397
|
onClear?.();
|
|
2136
2398
|
};
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2140
|
-
"textarea",
|
|
2141
|
-
{
|
|
2142
|
-
className: cn(
|
|
2143
|
-
inputVariants({ variant }),
|
|
2144
|
-
(showClear || showLock) && "pr-10",
|
|
2145
|
-
className
|
|
2146
|
-
),
|
|
2147
|
-
style: tokenStyles,
|
|
2148
|
-
ref,
|
|
2149
|
-
value: currentValue,
|
|
2150
|
-
onChange: handleTextareaChange,
|
|
2151
|
-
readOnly,
|
|
2152
|
-
...props
|
|
2153
|
-
}
|
|
2154
|
-
),
|
|
2155
|
-
showClear && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2156
|
-
"button",
|
|
2157
|
-
{
|
|
2158
|
-
type: "button",
|
|
2159
|
-
onClick: handleClear,
|
|
2160
|
-
className: "absolute right-3 top-3 h-4 w-4 text-secondary hover:text-dark transition-colors",
|
|
2161
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(X, { className: "h-4 w-4" })
|
|
2162
|
-
}
|
|
2163
|
-
),
|
|
2164
|
-
showLock && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Lock, { className: "absolute right-3 top-3 h-4 w-4 text-secondary" })
|
|
2165
|
-
] });
|
|
2166
|
-
}
|
|
2167
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "relative", children: [
|
|
2168
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative", children: [
|
|
2400
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2169
2401
|
"input",
|
|
2170
2402
|
{
|
|
2171
2403
|
className: cn(
|
|
2172
|
-
|
|
2404
|
+
inputBaseStyles,
|
|
2173
2405
|
(showClear || showLock) && "pr-10",
|
|
2174
2406
|
className
|
|
2175
2407
|
),
|
|
@@ -2181,24 +2413,23 @@ var Input = React5.forwardRef(
|
|
|
2181
2413
|
...props
|
|
2182
2414
|
}
|
|
2183
2415
|
),
|
|
2184
|
-
showClear && /* @__PURE__ */ (0,
|
|
2416
|
+
showClear && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2185
2417
|
"button",
|
|
2186
2418
|
{
|
|
2187
2419
|
type: "button",
|
|
2188
2420
|
onClick: handleClear,
|
|
2189
2421
|
className: "absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-secondary hover:text-dark transition-colors",
|
|
2190
|
-
children: /* @__PURE__ */ (0,
|
|
2422
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(X, { className: "h-4 w-4" })
|
|
2191
2423
|
}
|
|
2192
2424
|
),
|
|
2193
|
-
showLock && /* @__PURE__ */ (0,
|
|
2425
|
+
showLock && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Lock, { className: "absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-secondary" })
|
|
2194
2426
|
] });
|
|
2195
2427
|
}
|
|
2196
2428
|
);
|
|
2197
2429
|
Input.displayName = "Input";
|
|
2198
|
-
var TypedInput = Input;
|
|
2199
2430
|
|
|
2200
2431
|
// src/components/ui/date-picker.tsx
|
|
2201
|
-
var
|
|
2432
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2202
2433
|
var getDayNames = () => {
|
|
2203
2434
|
const days = [];
|
|
2204
2435
|
for (let i = 0; i < 7; i++) {
|
|
@@ -2399,15 +2630,15 @@ var DatePicker = React6.forwardRef(
|
|
|
2399
2630
|
const months = getMonthNames();
|
|
2400
2631
|
const dayNames = getDayNames();
|
|
2401
2632
|
const years = generateYears();
|
|
2402
|
-
return /* @__PURE__ */ (0,
|
|
2633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2403
2634
|
PopoverPrimitive.Root,
|
|
2404
2635
|
{
|
|
2405
2636
|
open: disabled ? false : open,
|
|
2406
2637
|
onOpenChange: disabled ? void 0 : setOpen,
|
|
2407
2638
|
children: [
|
|
2408
|
-
/* @__PURE__ */ (0,
|
|
2409
|
-
/* @__PURE__ */ (0,
|
|
2410
|
-
|
|
2639
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "relative", children: [
|
|
2640
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2641
|
+
Input,
|
|
2411
2642
|
{
|
|
2412
2643
|
ref,
|
|
2413
2644
|
value: inputValue,
|
|
@@ -2419,7 +2650,7 @@ var DatePicker = React6.forwardRef(
|
|
|
2419
2650
|
...props
|
|
2420
2651
|
}
|
|
2421
2652
|
),
|
|
2422
|
-
/* @__PURE__ */ (0,
|
|
2653
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 hover:bg-gray rounded p-0.5 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2423
2654
|
Calendar,
|
|
2424
2655
|
{
|
|
2425
2656
|
className: cn(
|
|
@@ -2429,7 +2660,7 @@ var DatePicker = React6.forwardRef(
|
|
|
2429
2660
|
}
|
|
2430
2661
|
) }) })
|
|
2431
2662
|
] }),
|
|
2432
|
-
/* @__PURE__ */ (0,
|
|
2663
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2433
2664
|
PopoverPrimitive.Content,
|
|
2434
2665
|
{
|
|
2435
2666
|
className: "z-50 w-80 rounded-lg border border-secondary bg-light text-dark shadow-lg animate-in fade-in-0 zoom-in-95 duration-200",
|
|
@@ -2438,51 +2669,51 @@ var DatePicker = React6.forwardRef(
|
|
|
2438
2669
|
alignOffset: -12,
|
|
2439
2670
|
side: "bottom",
|
|
2440
2671
|
sticky: "always",
|
|
2441
|
-
children: /* @__PURE__ */ (0,
|
|
2442
|
-
/* @__PURE__ */ (0,
|
|
2443
|
-
/* @__PURE__ */ (0,
|
|
2672
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "p-4", children: [
|
|
2673
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-between mb-4 gap-1", children: [
|
|
2674
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2444
2675
|
"button",
|
|
2445
2676
|
{
|
|
2446
2677
|
onClick: () => handleMonthChange("prev"),
|
|
2447
2678
|
className: "p-1 hover:bg-gray rounded transition-colors flex-shrink-0",
|
|
2448
|
-
children: /* @__PURE__ */ (0,
|
|
2679
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ChevronLeft, { className: "h-4 w-4" })
|
|
2449
2680
|
}
|
|
2450
2681
|
),
|
|
2451
|
-
/* @__PURE__ */ (0,
|
|
2452
|
-
/* @__PURE__ */ (0,
|
|
2682
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex gap-1 flex-1 min-w-0", children: [
|
|
2683
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2453
2684
|
Select,
|
|
2454
2685
|
{
|
|
2455
2686
|
value: currentMonth.getMonth().toString(),
|
|
2456
2687
|
onValueChange: handleMonthSelect,
|
|
2457
2688
|
children: [
|
|
2458
|
-
/* @__PURE__ */ (0,
|
|
2459
|
-
/* @__PURE__ */ (0,
|
|
2689
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectTrigger, { className: "min-w-fit h-8 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectValue, {}) }),
|
|
2690
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectContent, { children: months.map((month, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectItem, { value: index.toString(), children: month }, month)) })
|
|
2460
2691
|
]
|
|
2461
2692
|
}
|
|
2462
2693
|
),
|
|
2463
|
-
/* @__PURE__ */ (0,
|
|
2694
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2464
2695
|
Select,
|
|
2465
2696
|
{
|
|
2466
2697
|
value: currentMonth.getFullYear().toString(),
|
|
2467
2698
|
onValueChange: handleYearSelect,
|
|
2468
2699
|
children: [
|
|
2469
|
-
/* @__PURE__ */ (0,
|
|
2470
|
-
/* @__PURE__ */ (0,
|
|
2700
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectTrigger, { className: "min-w-fit h-8 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectValue, {}) }),
|
|
2701
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectContent, { children: years.map((year) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectItem, { value: year.toString(), children: year }, year)) })
|
|
2471
2702
|
]
|
|
2472
2703
|
}
|
|
2473
2704
|
)
|
|
2474
2705
|
] }),
|
|
2475
|
-
/* @__PURE__ */ (0,
|
|
2706
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2476
2707
|
"button",
|
|
2477
2708
|
{
|
|
2478
2709
|
onClick: () => handleMonthChange("next"),
|
|
2479
2710
|
className: "p-1 hover:bg-gray rounded transition-colors flex-shrink-0",
|
|
2480
|
-
children: /* @__PURE__ */ (0,
|
|
2711
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ChevronRight, { className: "h-4 w-4" })
|
|
2481
2712
|
}
|
|
2482
2713
|
)
|
|
2483
2714
|
] }),
|
|
2484
|
-
/* @__PURE__ */ (0,
|
|
2485
|
-
/* @__PURE__ */ (0,
|
|
2715
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "space-y-1", children: [
|
|
2716
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "grid grid-cols-7 gap-1 mb-2", children: dayNames.map((day) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2486
2717
|
Typography,
|
|
2487
2718
|
{
|
|
2488
2719
|
variant: "label-xs-bold",
|
|
@@ -2492,11 +2723,11 @@ var DatePicker = React6.forwardRef(
|
|
|
2492
2723
|
},
|
|
2493
2724
|
day
|
|
2494
2725
|
)) }),
|
|
2495
|
-
/* @__PURE__ */ (0,
|
|
2726
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "grid grid-cols-7 gap-1", children: days.map((date, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2496
2727
|
"div",
|
|
2497
2728
|
{
|
|
2498
2729
|
className: "h-8 w-8 flex items-center justify-center",
|
|
2499
|
-
children: date && /* @__PURE__ */ (0,
|
|
2730
|
+
children: date && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2500
2731
|
"button",
|
|
2501
2732
|
{
|
|
2502
2733
|
onClick: () => handleDateSelect(date),
|
|
@@ -2510,7 +2741,7 @@ var DatePicker = React6.forwardRef(
|
|
|
2510
2741
|
isToday(date) && !isDateSelected(date) && !isDateDisabled(date) && "text-blue-600 after:content-[''] after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:w-1 after:h-1 after:bg-blue-600 after:rounded-full",
|
|
2511
2742
|
isDateDisabled(date) && "text-secondary/40 cursor-not-allowed opacity-50"
|
|
2512
2743
|
),
|
|
2513
|
-
children: /* @__PURE__ */ (0,
|
|
2744
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Typography, { variant: "label-sm", as: "span", children: date.getDate() })
|
|
2514
2745
|
}
|
|
2515
2746
|
)
|
|
2516
2747
|
},
|
|
@@ -2530,7 +2761,7 @@ DatePicker.displayName = "DatePicker";
|
|
|
2530
2761
|
// src/components/ui/upload.tsx
|
|
2531
2762
|
var React7 = __toESM(require("react"));
|
|
2532
2763
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
2533
|
-
var
|
|
2764
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2534
2765
|
var DEFAULT_MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
2535
2766
|
var uploadVariants = (0, import_class_variance_authority6.cva)(
|
|
2536
2767
|
"relative flex flex-col items-center justify-center rounded-lg transition-all duration-200 ease-in-out overflow-hidden",
|
|
@@ -2632,17 +2863,17 @@ var Upload = React7.forwardRef(
|
|
|
2632
2863
|
const renderContent = () => {
|
|
2633
2864
|
switch (effectiveState) {
|
|
2634
2865
|
case "error":
|
|
2635
|
-
return /* @__PURE__ */ (0,
|
|
2866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2636
2867
|
"div",
|
|
2637
2868
|
{
|
|
2638
2869
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
2639
2870
|
style: { gap: "32px" },
|
|
2640
2871
|
children: [
|
|
2641
|
-
/* @__PURE__ */ (0,
|
|
2642
|
-
/* @__PURE__ */ (0,
|
|
2643
|
-
/* @__PURE__ */ (0,
|
|
2872
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "space-y-4", children: [
|
|
2873
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typography, { variant: "heading-sm", children: "Upload fail" }),
|
|
2874
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typography, { variant: "body-md", className: "text-error", children: errorMessage })
|
|
2644
2875
|
] }),
|
|
2645
|
-
/* @__PURE__ */ (0,
|
|
2876
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2646
2877
|
Button,
|
|
2647
2878
|
{
|
|
2648
2879
|
variant: "destructive",
|
|
@@ -2656,22 +2887,22 @@ var Upload = React7.forwardRef(
|
|
|
2656
2887
|
}
|
|
2657
2888
|
);
|
|
2658
2889
|
case "uploading":
|
|
2659
|
-
return /* @__PURE__ */ (0,
|
|
2890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2660
2891
|
"div",
|
|
2661
2892
|
{
|
|
2662
2893
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
2663
2894
|
style: { gap: "32px" },
|
|
2664
2895
|
children: [
|
|
2665
|
-
/* @__PURE__ */ (0,
|
|
2666
|
-
/* @__PURE__ */ (0,
|
|
2667
|
-
/* @__PURE__ */ (0,
|
|
2896
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typography, { variant: "heading-sm", className: "text-dark", children: "Uploading files" }),
|
|
2897
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w-full max-w-[720px] space-y-2", children: [
|
|
2898
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "w-full bg-gray rounded-full h-2", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2668
2899
|
"div",
|
|
2669
2900
|
{
|
|
2670
2901
|
className: "bg-canvas-primary h-2 rounded-full transition-all duration-300 ease-in-out",
|
|
2671
2902
|
style: { width: `${progress}%` }
|
|
2672
2903
|
}
|
|
2673
2904
|
) }),
|
|
2674
|
-
/* @__PURE__ */ (0,
|
|
2905
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2675
2906
|
Typography,
|
|
2676
2907
|
{
|
|
2677
2908
|
variant: "body-sm",
|
|
@@ -2687,29 +2918,29 @@ var Upload = React7.forwardRef(
|
|
|
2687
2918
|
}
|
|
2688
2919
|
);
|
|
2689
2920
|
case "success":
|
|
2690
|
-
return /* @__PURE__ */ (0,
|
|
2921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2691
2922
|
"div",
|
|
2692
2923
|
{
|
|
2693
2924
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
2694
2925
|
style: { gap: "32px" },
|
|
2695
|
-
children: /* @__PURE__ */ (0,
|
|
2696
|
-
/* @__PURE__ */ (0,
|
|
2697
|
-
selectedFiles.length > 0 && /* @__PURE__ */ (0,
|
|
2926
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "space-y-4", children: [
|
|
2927
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typography, { variant: "heading-sm", className: "text-success", children: "Upload successful!" }),
|
|
2928
|
+
selectedFiles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "text-center", children: selectedFiles.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typography, { variant: "body-sm", children: file.name }, index)) })
|
|
2698
2929
|
] })
|
|
2699
2930
|
}
|
|
2700
2931
|
);
|
|
2701
2932
|
default:
|
|
2702
|
-
return /* @__PURE__ */ (0,
|
|
2933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2703
2934
|
"div",
|
|
2704
2935
|
{
|
|
2705
2936
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
2706
2937
|
style: { gap: "32px" },
|
|
2707
2938
|
children: [
|
|
2708
|
-
/* @__PURE__ */ (0,
|
|
2709
|
-
/* @__PURE__ */ (0,
|
|
2710
|
-
/* @__PURE__ */ (0,
|
|
2939
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "space-y-4", children: [
|
|
2940
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typography, { variant: "heading-sm", className: "text-dark", children: "Drag & drop files here" }),
|
|
2941
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typography, { variant: "body-md", className: "text-secondary", children: "or click to browse from your computer" })
|
|
2711
2942
|
] }),
|
|
2712
|
-
/* @__PURE__ */ (0,
|
|
2943
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2713
2944
|
Button,
|
|
2714
2945
|
{
|
|
2715
2946
|
variant: "default",
|
|
@@ -2723,10 +2954,10 @@ var Upload = React7.forwardRef(
|
|
|
2723
2954
|
children: "Choose files"
|
|
2724
2955
|
}
|
|
2725
2956
|
),
|
|
2726
|
-
/* @__PURE__ */ (0,
|
|
2957
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Typography, { variant: "body-sm", className: "text-secondary", children: [
|
|
2727
2958
|
"Supported file: ",
|
|
2728
2959
|
getFileTypeDisplay(),
|
|
2729
|
-
/* @__PURE__ */ (0,
|
|
2960
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("br", {}),
|
|
2730
2961
|
"Max: ",
|
|
2731
2962
|
Math.round(maxFileSize / 1024 / 1024),
|
|
2732
2963
|
" MB each"
|
|
@@ -2736,7 +2967,7 @@ var Upload = React7.forwardRef(
|
|
|
2736
2967
|
);
|
|
2737
2968
|
}
|
|
2738
2969
|
};
|
|
2739
|
-
return /* @__PURE__ */ (0,
|
|
2970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2740
2971
|
"div",
|
|
2741
2972
|
{
|
|
2742
2973
|
ref,
|
|
@@ -2760,7 +2991,7 @@ var Upload = React7.forwardRef(
|
|
|
2760
2991
|
"aria-disabled": disabled,
|
|
2761
2992
|
...props,
|
|
2762
2993
|
children: [
|
|
2763
|
-
/* @__PURE__ */ (0,
|
|
2994
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2764
2995
|
"input",
|
|
2765
2996
|
{
|
|
2766
2997
|
ref: fileInputRef,
|
|
@@ -2783,25 +3014,51 @@ Upload.displayName = "Upload";
|
|
|
2783
3014
|
var React8 = __toESM(require("react"));
|
|
2784
3015
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
2785
3016
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
2786
|
-
var
|
|
3017
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2787
3018
|
var checkboxVariants = (0, import_class_variance_authority7.cva)(
|
|
2788
3019
|
"peer size-4 shrink-0 rounded-[4px] border border-strong bg-light hover:bg-info-subtle transition-colors focus-visible:outline-none focus-visible:border-2 focus-visible:border-interactive disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-light [&_svg]:pointer-events-none [&_svg]:size-3 [&_svg]:shrink-0"
|
|
2789
3020
|
);
|
|
2790
|
-
var Checkbox = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3021
|
+
var Checkbox = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2791
3022
|
CheckboxPrimitive.Root,
|
|
2792
3023
|
{
|
|
2793
3024
|
ref,
|
|
2794
3025
|
className: cn(checkboxVariants(), className),
|
|
2795
3026
|
...props,
|
|
2796
|
-
children: /* @__PURE__ */ (0,
|
|
3027
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CheckIcon, { variant: "light", className: "size-3" }) })
|
|
2797
3028
|
}
|
|
2798
3029
|
));
|
|
2799
3030
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
2800
3031
|
|
|
2801
|
-
// src/components/ui/
|
|
3032
|
+
// src/components/ui/textarea.tsx
|
|
2802
3033
|
var React9 = __toESM(require("react"));
|
|
3034
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
3035
|
+
var Textarea = React9.forwardRef(
|
|
3036
|
+
({ className, style, error, ...props }, ref) => {
|
|
3037
|
+
const tokenStyles = {
|
|
3038
|
+
font: "var(--typography-label-md-regular)",
|
|
3039
|
+
...style
|
|
3040
|
+
};
|
|
3041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3042
|
+
"textarea",
|
|
3043
|
+
{
|
|
3044
|
+
className: cn(
|
|
3045
|
+
"flex min-h-[80px] w-full rounded-md border bg-light text-dark px-3 pt-3 pb-2 placeholder:text-secondary focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 transition-colors resize-y",
|
|
3046
|
+
error ? "border-error focus-visible:border-2 focus-visible:border-error" : "border-secondary focus-visible:border-2 focus-visible:border-strong disabled:border-secondary",
|
|
3047
|
+
className
|
|
3048
|
+
),
|
|
3049
|
+
style: tokenStyles,
|
|
3050
|
+
ref,
|
|
3051
|
+
...props
|
|
3052
|
+
}
|
|
3053
|
+
);
|
|
3054
|
+
}
|
|
3055
|
+
);
|
|
3056
|
+
Textarea.displayName = "Textarea";
|
|
3057
|
+
|
|
3058
|
+
// src/components/ui/badge.tsx
|
|
3059
|
+
var React10 = __toESM(require("react"));
|
|
2803
3060
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
2804
|
-
var
|
|
3061
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2805
3062
|
var badgeVariants = (0, import_class_variance_authority8.cva)(
|
|
2806
3063
|
"inline-flex items-center justify-center gap-1 whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
2807
3064
|
{
|
|
@@ -2824,7 +3081,7 @@ var badgeVariants = (0, import_class_variance_authority8.cva)(
|
|
|
2824
3081
|
function getBadgeTypographyStyles() {
|
|
2825
3082
|
return { font: "var(--typography-label-sm-bold)" };
|
|
2826
3083
|
}
|
|
2827
|
-
var Badge =
|
|
3084
|
+
var Badge = React10.forwardRef(
|
|
2828
3085
|
({ className, variant, style, ...props }, ref) => {
|
|
2829
3086
|
if (!variant) {
|
|
2830
3087
|
return null;
|
|
@@ -2834,7 +3091,7 @@ var Badge = React9.forwardRef(
|
|
|
2834
3091
|
...typographyStyles,
|
|
2835
3092
|
...style
|
|
2836
3093
|
};
|
|
2837
|
-
return /* @__PURE__ */ (0,
|
|
3094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2838
3095
|
"span",
|
|
2839
3096
|
{
|
|
2840
3097
|
className: cn(
|
|
@@ -2852,9 +3109,9 @@ var Badge = React9.forwardRef(
|
|
|
2852
3109
|
Badge.displayName = "Badge";
|
|
2853
3110
|
|
|
2854
3111
|
// src/components/ui/tabs.tsx
|
|
2855
|
-
var
|
|
3112
|
+
var React11 = __toESM(require("react"));
|
|
2856
3113
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
2857
|
-
var
|
|
3114
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2858
3115
|
var tabsVariants = (0, import_class_variance_authority9.cva)(
|
|
2859
3116
|
"inline-flex items-center justify-start whitespace-nowrap transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-interactive focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 h-10",
|
|
2860
3117
|
{
|
|
@@ -2868,17 +3125,17 @@ var tabsVariants = (0, import_class_variance_authority9.cva)(
|
|
|
2868
3125
|
}
|
|
2869
3126
|
}
|
|
2870
3127
|
);
|
|
2871
|
-
var TabsContext =
|
|
3128
|
+
var TabsContext = React11.createContext(
|
|
2872
3129
|
void 0
|
|
2873
3130
|
);
|
|
2874
3131
|
function useTabsContext() {
|
|
2875
|
-
const context =
|
|
3132
|
+
const context = React11.useContext(TabsContext);
|
|
2876
3133
|
if (!context) {
|
|
2877
3134
|
throw new Error("Tabs components must be used within a Tabs provider");
|
|
2878
3135
|
}
|
|
2879
3136
|
return context;
|
|
2880
3137
|
}
|
|
2881
|
-
var Tabs =
|
|
3138
|
+
var Tabs = React11.forwardRef((props, ref) => {
|
|
2882
3139
|
const {
|
|
2883
3140
|
className,
|
|
2884
3141
|
value,
|
|
@@ -2887,7 +3144,7 @@ var Tabs = React10.forwardRef((props, ref) => {
|
|
|
2887
3144
|
children,
|
|
2888
3145
|
...restProps
|
|
2889
3146
|
} = props;
|
|
2890
|
-
const contextValue =
|
|
3147
|
+
const contextValue = React11.useMemo(
|
|
2891
3148
|
() => ({
|
|
2892
3149
|
activeTab: value,
|
|
2893
3150
|
setActiveTab: onValueChange,
|
|
@@ -2895,13 +3152,13 @@ var Tabs = React10.forwardRef((props, ref) => {
|
|
|
2895
3152
|
}),
|
|
2896
3153
|
[value, onValueChange, variant]
|
|
2897
3154
|
);
|
|
2898
|
-
return /* @__PURE__ */ (0,
|
|
3155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { ref, className: cn("w-full", className), ...restProps, children }) });
|
|
2899
3156
|
});
|
|
2900
3157
|
Tabs.displayName = "Tabs";
|
|
2901
|
-
var TabsList =
|
|
3158
|
+
var TabsList = React11.forwardRef(
|
|
2902
3159
|
(props, ref) => {
|
|
2903
3160
|
const { className, children, ...restProps } = props;
|
|
2904
|
-
return /* @__PURE__ */ (0,
|
|
3161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2905
3162
|
"div",
|
|
2906
3163
|
{
|
|
2907
3164
|
ref,
|
|
@@ -2917,7 +3174,7 @@ TabsList.displayName = "TabsList";
|
|
|
2917
3174
|
var getTabTypographyStyles = (isActive) => ({
|
|
2918
3175
|
font: isActive ? "var(--typography-label-sm-bold)" : "var(--typography-label-sm-regular)"
|
|
2919
3176
|
});
|
|
2920
|
-
var TabsTrigger =
|
|
3177
|
+
var TabsTrigger = React11.forwardRef(
|
|
2921
3178
|
(props, ref) => {
|
|
2922
3179
|
const { className, value, disabled, style, children, ...restProps } = props;
|
|
2923
3180
|
const { activeTab, setActiveTab, variant } = useTabsContext();
|
|
@@ -2925,22 +3182,22 @@ var TabsTrigger = React10.forwardRef(
|
|
|
2925
3182
|
throw new Error("TabsTrigger must have a value prop");
|
|
2926
3183
|
}
|
|
2927
3184
|
const isActive = activeTab === value;
|
|
2928
|
-
const tokenStyles =
|
|
3185
|
+
const tokenStyles = React11.useMemo(
|
|
2929
3186
|
() => ({
|
|
2930
3187
|
...getTabTypographyStyles(isActive),
|
|
2931
3188
|
...style
|
|
2932
3189
|
}),
|
|
2933
3190
|
[isActive, style]
|
|
2934
3191
|
);
|
|
2935
|
-
const triggerClassName =
|
|
3192
|
+
const triggerClassName = React11.useMemo(
|
|
2936
3193
|
() => cn(tabsVariants({ variant }), className),
|
|
2937
3194
|
[variant, className]
|
|
2938
3195
|
);
|
|
2939
|
-
const handleClick =
|
|
3196
|
+
const handleClick = React11.useCallback(() => {
|
|
2940
3197
|
if (disabled) return;
|
|
2941
3198
|
setActiveTab(value);
|
|
2942
3199
|
}, [disabled, setActiveTab, value]);
|
|
2943
|
-
return /* @__PURE__ */ (0,
|
|
3200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2944
3201
|
"button",
|
|
2945
3202
|
{
|
|
2946
3203
|
ref,
|
|
@@ -2954,13 +3211,13 @@ var TabsTrigger = React10.forwardRef(
|
|
|
2954
3211
|
disabled,
|
|
2955
3212
|
onClick: handleClick,
|
|
2956
3213
|
...restProps,
|
|
2957
|
-
children: /* @__PURE__ */ (0,
|
|
3214
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "pl-3 pr-6 py-2", children })
|
|
2958
3215
|
}
|
|
2959
3216
|
);
|
|
2960
3217
|
}
|
|
2961
3218
|
);
|
|
2962
3219
|
TabsTrigger.displayName = "TabsTrigger";
|
|
2963
|
-
var TabsContent =
|
|
3220
|
+
var TabsContent = React11.forwardRef(
|
|
2964
3221
|
(props, ref) => {
|
|
2965
3222
|
const { className, value, children, ...restProps } = props;
|
|
2966
3223
|
const { activeTab } = useTabsContext();
|
|
@@ -2971,7 +3228,7 @@ var TabsContent = React10.forwardRef(
|
|
|
2971
3228
|
if (!isActive) {
|
|
2972
3229
|
return null;
|
|
2973
3230
|
}
|
|
2974
|
-
return /* @__PURE__ */ (0,
|
|
3231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2975
3232
|
"div",
|
|
2976
3233
|
{
|
|
2977
3234
|
ref,
|
|
@@ -2989,11 +3246,11 @@ var TabsContent = React10.forwardRef(
|
|
|
2989
3246
|
TabsContent.displayName = "TabsContent";
|
|
2990
3247
|
|
|
2991
3248
|
// src/components/ui/dropdown-menu.tsx
|
|
2992
|
-
var
|
|
3249
|
+
var React12 = __toESM(require("react"));
|
|
2993
3250
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
2994
|
-
var
|
|
3251
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2995
3252
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
2996
|
-
var DropdownMenuTrigger =
|
|
3253
|
+
var DropdownMenuTrigger = React12.forwardRef(({ className, icon, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2997
3254
|
DropdownMenuPrimitive.Trigger,
|
|
2998
3255
|
{
|
|
2999
3256
|
ref,
|
|
@@ -3003,7 +3260,7 @@ var DropdownMenuTrigger = React11.forwardRef(({ className, icon, children, ...pr
|
|
|
3003
3260
|
),
|
|
3004
3261
|
...props,
|
|
3005
3262
|
children: [
|
|
3006
|
-
icon || /* @__PURE__ */ (0,
|
|
3263
|
+
icon || /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MoreMenu, { className: "size-4" }),
|
|
3007
3264
|
children
|
|
3008
3265
|
]
|
|
3009
3266
|
}
|
|
@@ -3013,7 +3270,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
|
3013
3270
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
3014
3271
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
3015
3272
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
3016
|
-
var DropdownMenuSubTrigger =
|
|
3273
|
+
var DropdownMenuSubTrigger = React12.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3017
3274
|
DropdownMenuPrimitive.SubTrigger,
|
|
3018
3275
|
{
|
|
3019
3276
|
ref,
|
|
@@ -3026,12 +3283,12 @@ var DropdownMenuSubTrigger = React11.forwardRef(({ className, inset, children, .
|
|
|
3026
3283
|
...props,
|
|
3027
3284
|
children: [
|
|
3028
3285
|
children,
|
|
3029
|
-
/* @__PURE__ */ (0,
|
|
3286
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronRight, { className: "ml-auto" })
|
|
3030
3287
|
]
|
|
3031
3288
|
}
|
|
3032
3289
|
));
|
|
3033
3290
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
3034
|
-
var DropdownMenuSubContent =
|
|
3291
|
+
var DropdownMenuSubContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3035
3292
|
DropdownMenuPrimitive.SubContent,
|
|
3036
3293
|
{
|
|
3037
3294
|
ref,
|
|
@@ -3043,7 +3300,7 @@ var DropdownMenuSubContent = React11.forwardRef(({ className, ...props }, ref) =
|
|
|
3043
3300
|
}
|
|
3044
3301
|
));
|
|
3045
3302
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
3046
|
-
var DropdownMenuContent =
|
|
3303
|
+
var DropdownMenuContent = React12.forwardRef(({ className, sideOffset = 4, align = "end", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3047
3304
|
DropdownMenuPrimitive.Content,
|
|
3048
3305
|
{
|
|
3049
3306
|
ref,
|
|
@@ -3057,7 +3314,7 @@ var DropdownMenuContent = React11.forwardRef(({ className, sideOffset = 4, align
|
|
|
3057
3314
|
}
|
|
3058
3315
|
) }));
|
|
3059
3316
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
3060
|
-
var DropdownMenuItem =
|
|
3317
|
+
var DropdownMenuItem = React12.forwardRef(({ className, inset, style, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3061
3318
|
DropdownMenuPrimitive.Item,
|
|
3062
3319
|
{
|
|
3063
3320
|
ref,
|
|
@@ -3074,7 +3331,7 @@ var DropdownMenuItem = React11.forwardRef(({ className, inset, style, ...props }
|
|
|
3074
3331
|
}
|
|
3075
3332
|
));
|
|
3076
3333
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
3077
|
-
var DropdownMenuCheckboxItem =
|
|
3334
|
+
var DropdownMenuCheckboxItem = React12.forwardRef(({ className, children, style, checked, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3078
3335
|
DropdownMenuPrimitive.CheckboxItem,
|
|
3079
3336
|
{
|
|
3080
3337
|
ref,
|
|
@@ -3089,7 +3346,7 @@ var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, style,
|
|
|
3089
3346
|
},
|
|
3090
3347
|
...props,
|
|
3091
3348
|
children: [
|
|
3092
|
-
/* @__PURE__ */ (0,
|
|
3349
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3093
3350
|
Checkbox,
|
|
3094
3351
|
{
|
|
3095
3352
|
checked: checked === true,
|
|
@@ -3097,12 +3354,12 @@ var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, style,
|
|
|
3097
3354
|
"aria-hidden": "true"
|
|
3098
3355
|
}
|
|
3099
3356
|
),
|
|
3100
|
-
/* @__PURE__ */ (0,
|
|
3357
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "flex-1", children })
|
|
3101
3358
|
]
|
|
3102
3359
|
}
|
|
3103
3360
|
));
|
|
3104
3361
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
3105
|
-
var DropdownMenuRadioItem =
|
|
3362
|
+
var DropdownMenuRadioItem = React12.forwardRef(({ className, children, style, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3106
3363
|
DropdownMenuPrimitive.RadioItem,
|
|
3107
3364
|
{
|
|
3108
3365
|
ref,
|
|
@@ -3116,13 +3373,13 @@ var DropdownMenuRadioItem = React11.forwardRef(({ className, children, style, ..
|
|
|
3116
3373
|
},
|
|
3117
3374
|
...props,
|
|
3118
3375
|
children: [
|
|
3119
|
-
/* @__PURE__ */ (0,
|
|
3376
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "h-2 w-2 rounded-full bg-current" }) }) }),
|
|
3120
3377
|
children
|
|
3121
3378
|
]
|
|
3122
3379
|
}
|
|
3123
3380
|
));
|
|
3124
3381
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
3125
|
-
var DropdownMenuLabel =
|
|
3382
|
+
var DropdownMenuLabel = React12.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3126
3383
|
DropdownMenuPrimitive.Label,
|
|
3127
3384
|
{
|
|
3128
3385
|
ref,
|
|
@@ -3135,7 +3392,7 @@ var DropdownMenuLabel = React11.forwardRef(({ className, inset, ...props }, ref)
|
|
|
3135
3392
|
}
|
|
3136
3393
|
));
|
|
3137
3394
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
3138
|
-
var DropdownMenuSeparator =
|
|
3395
|
+
var DropdownMenuSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3139
3396
|
DropdownMenuPrimitive.Separator,
|
|
3140
3397
|
{
|
|
3141
3398
|
ref,
|
|
@@ -3148,7 +3405,7 @@ var DropdownMenuShortcut = ({
|
|
|
3148
3405
|
className,
|
|
3149
3406
|
...props
|
|
3150
3407
|
}) => {
|
|
3151
|
-
return /* @__PURE__ */ (0,
|
|
3408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3152
3409
|
"span",
|
|
3153
3410
|
{
|
|
3154
3411
|
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
@@ -3157,6 +3414,793 @@ var DropdownMenuShortcut = ({
|
|
|
3157
3414
|
);
|
|
3158
3415
|
};
|
|
3159
3416
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
3417
|
+
|
|
3418
|
+
// src/components/ui/charts/chart-legend.tsx
|
|
3419
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3420
|
+
function ChartLegend({
|
|
3421
|
+
items,
|
|
3422
|
+
x = 0,
|
|
3423
|
+
y = 550,
|
|
3424
|
+
className = ""
|
|
3425
|
+
}) {
|
|
3426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("foreignObject", { x, y, width: "100%", height: "40", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3427
|
+
"div",
|
|
3428
|
+
{
|
|
3429
|
+
className: `flex justify-center items-center gap-6 ${className}`,
|
|
3430
|
+
style: { height: "100%" },
|
|
3431
|
+
children: items.map(({ key, color, label }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3432
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w-3 h-3", style: { backgroundColor: color } }),
|
|
3433
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Typography, { variant: "body-xs", children: label || key })
|
|
3434
|
+
] }, key))
|
|
3435
|
+
}
|
|
3436
|
+
) });
|
|
3437
|
+
}
|
|
3438
|
+
|
|
3439
|
+
// src/lib/chart-utils.ts
|
|
3440
|
+
var CHART_COLORS = {
|
|
3441
|
+
// Status colors
|
|
3442
|
+
SUCCESS: "var(--color-success)",
|
|
3443
|
+
ERROR: "var(--color-error)",
|
|
3444
|
+
WARNING: "var(--color-warning)",
|
|
3445
|
+
SECONDARY: "var(--color-secondary)",
|
|
3446
|
+
// Primary brand colors
|
|
3447
|
+
PRIMARY: "var(--color-primary)",
|
|
3448
|
+
// Categorical palette from altitude-tokens
|
|
3449
|
+
CATEGORICAL: [
|
|
3450
|
+
"var(--color-chart-color-palette-categorical-1)",
|
|
3451
|
+
"var(--color-chart-color-palette-categorical-2)",
|
|
3452
|
+
"var(--color-chart-color-palette-categorical-3)",
|
|
3453
|
+
"var(--color-chart-color-palette-categorical-4)",
|
|
3454
|
+
"var(--color-chart-color-palette-categorical-5)"
|
|
3455
|
+
],
|
|
3456
|
+
// Performance palette from altitude-tokens
|
|
3457
|
+
PERFORMANCE: [
|
|
3458
|
+
"var(--color-chart-color-palette-performance-1)",
|
|
3459
|
+
"var(--color-chart-color-palette-performance-2)",
|
|
3460
|
+
"var(--color-chart-color-palette-performance-3)",
|
|
3461
|
+
"var(--color-chart-color-palette-performance-4)",
|
|
3462
|
+
"var(--color-chart-color-palette-performance-5)"
|
|
3463
|
+
],
|
|
3464
|
+
// Heatmap palette from altitude-tokens
|
|
3465
|
+
HEATMAP: [
|
|
3466
|
+
"var(--color-chart-color-palette-heatmap-1)",
|
|
3467
|
+
"var(--color-chart-color-palette-heatmap-2)",
|
|
3468
|
+
"var(--color-chart-color-palette-heatmap-3)",
|
|
3469
|
+
"var(--color-chart-color-palette-heatmap-4)",
|
|
3470
|
+
"var(--color-chart-color-palette-heatmap-5)"
|
|
3471
|
+
]
|
|
3472
|
+
};
|
|
3473
|
+
var COLOR_SCHEMES = {
|
|
3474
|
+
passFail: {
|
|
3475
|
+
PASS: CHART_COLORS.SUCCESS,
|
|
3476
|
+
FAIL: CHART_COLORS.ERROR
|
|
3477
|
+
},
|
|
3478
|
+
targetVsAchieved: {
|
|
3479
|
+
TARGET: CHART_COLORS.SECONDARY,
|
|
3480
|
+
ACHIEVED: CHART_COLORS.SUCCESS
|
|
3481
|
+
},
|
|
3482
|
+
performance: {
|
|
3483
|
+
HIGH: CHART_COLORS.PERFORMANCE[0],
|
|
3484
|
+
MEDIUM_HIGH: CHART_COLORS.PERFORMANCE[1],
|
|
3485
|
+
MEDIUM: CHART_COLORS.PERFORMANCE[2],
|
|
3486
|
+
MEDIUM_LOW: CHART_COLORS.PERFORMANCE[3],
|
|
3487
|
+
LOW: CHART_COLORS.PERFORMANCE[4]
|
|
3488
|
+
}
|
|
3489
|
+
};
|
|
3490
|
+
var CHART_CONSTANTS = {
|
|
3491
|
+
// Standard chart dimensions
|
|
3492
|
+
STANDARD_HEIGHT: 400,
|
|
3493
|
+
LARGE_HEIGHT: 500,
|
|
3494
|
+
SMALL_HEIGHT: 300,
|
|
3495
|
+
// Chart margins
|
|
3496
|
+
MARGIN: {
|
|
3497
|
+
top: 20,
|
|
3498
|
+
right: 30,
|
|
3499
|
+
left: 20,
|
|
3500
|
+
bottom: 5
|
|
3501
|
+
},
|
|
3502
|
+
// Axis dimensions
|
|
3503
|
+
AXIS_HEIGHT_STANDARD: 30,
|
|
3504
|
+
AXIS_HEIGHT_ROTATED: 60,
|
|
3505
|
+
AXIS_WIDTH_STANDARD: 60,
|
|
3506
|
+
AXIS_WIDTH_YAXIS: 80,
|
|
3507
|
+
// Pie chart constants
|
|
3508
|
+
PIE_CHART_CENTER_X: 300,
|
|
3509
|
+
PIE_CHART_CENTER_Y: 200
|
|
3510
|
+
};
|
|
3511
|
+
var getSeriesColor = (index) => {
|
|
3512
|
+
return CHART_COLORS.CATEGORICAL[index % CHART_COLORS.CATEGORICAL.length] || CHART_COLORS.PRIMARY;
|
|
3513
|
+
};
|
|
3514
|
+
var getPerformanceColor = (index) => {
|
|
3515
|
+
return CHART_COLORS.PERFORMANCE[index % CHART_COLORS.PERFORMANCE.length] || CHART_COLORS.PRIMARY;
|
|
3516
|
+
};
|
|
3517
|
+
var getHeatmapColor = (index) => {
|
|
3518
|
+
return CHART_COLORS.HEATMAP[index % CHART_COLORS.HEATMAP.length] || CHART_COLORS.PRIMARY;
|
|
3519
|
+
};
|
|
3520
|
+
var createLegendItems = (colorScheme) => {
|
|
3521
|
+
return Object.entries(colorScheme).map(([key, color]) => ({
|
|
3522
|
+
key,
|
|
3523
|
+
color,
|
|
3524
|
+
label: key
|
|
3525
|
+
}));
|
|
3526
|
+
};
|
|
3527
|
+
var calculateYAxisWidth = (data, yAxisKey) => {
|
|
3528
|
+
if (!data || data.length === 0) return CHART_CONSTANTS.AXIS_WIDTH_YAXIS;
|
|
3529
|
+
const maxLength = Math.max(
|
|
3530
|
+
...data.map((item) => {
|
|
3531
|
+
const value = item[yAxisKey];
|
|
3532
|
+
return String(value || "").length;
|
|
3533
|
+
})
|
|
3534
|
+
);
|
|
3535
|
+
return Math.max(maxLength * 8 + 20, CHART_CONSTANTS.AXIS_WIDTH_YAXIS);
|
|
3536
|
+
};
|
|
3537
|
+
var formatPercentage = (value, decimals = 1) => {
|
|
3538
|
+
return `${(value * 100).toFixed(decimals)}%`;
|
|
3539
|
+
};
|
|
3540
|
+
var formatLargeNumber = (value) => {
|
|
3541
|
+
if (value >= 1e6) {
|
|
3542
|
+
return `${(value / 1e6).toFixed(1)}M`;
|
|
3543
|
+
}
|
|
3544
|
+
if (value >= 1e3) {
|
|
3545
|
+
return `${(value / 1e3).toFixed(1)}K`;
|
|
3546
|
+
}
|
|
3547
|
+
return value.toString();
|
|
3548
|
+
};
|
|
3549
|
+
|
|
3550
|
+
// src/components/ui/charts/chart-labels.tsx
|
|
3551
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3552
|
+
var createCustomXAxisLabel = (text, yOffset = 40) => {
|
|
3553
|
+
const CustomXAxisLabel = ({ viewBox }) => {
|
|
3554
|
+
if (!viewBox) return null;
|
|
3555
|
+
const { x, y, width } = viewBox;
|
|
3556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("foreignObject", { x, y: y + yOffset, width, height: 20, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex justify-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
|
|
3557
|
+
};
|
|
3558
|
+
CustomXAxisLabel.displayName = "CustomXAxisLabel";
|
|
3559
|
+
return CustomXAxisLabel;
|
|
3560
|
+
};
|
|
3561
|
+
var createCustomYAxisLabel = (text, leftMargin) => {
|
|
3562
|
+
const CustomYAxisLabel = ({ viewBox }) => {
|
|
3563
|
+
if (!viewBox) return null;
|
|
3564
|
+
const { x, y, height } = viewBox;
|
|
3565
|
+
const offset = leftMargin ? leftMargin + 10 : 110;
|
|
3566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("foreignObject", { x: x - offset, y, width: 100, height, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex items-center justify-center h-full transform -rotate-90 whitespace-nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
|
|
3567
|
+
};
|
|
3568
|
+
CustomYAxisLabel.displayName = "CustomYAxisLabel";
|
|
3569
|
+
return CustomYAxisLabel;
|
|
3570
|
+
};
|
|
3571
|
+
var createCustomYAxisRightLabel = (text) => {
|
|
3572
|
+
const CustomYAxisRightLabel = ({ viewBox }) => {
|
|
3573
|
+
if (!viewBox) return null;
|
|
3574
|
+
const { x, y, width, height } = viewBox;
|
|
3575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("foreignObject", { x: x + width - 70, y, width: 120, height, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex items-center justify-center h-full transform rotate-90 whitespace-nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
|
|
3576
|
+
};
|
|
3577
|
+
CustomYAxisRightLabel.displayName = "CustomYAxisRightLabel";
|
|
3578
|
+
return CustomYAxisRightLabel;
|
|
3579
|
+
};
|
|
3580
|
+
var customXAxisTick = (props) => {
|
|
3581
|
+
const { x, y, payload } = props;
|
|
3582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3583
|
+
"foreignObject",
|
|
3584
|
+
{
|
|
3585
|
+
x: -20,
|
|
3586
|
+
y: 5,
|
|
3587
|
+
width: 40,
|
|
3588
|
+
height: 20,
|
|
3589
|
+
style: { overflow: "visible" },
|
|
3590
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3591
|
+
"div",
|
|
3592
|
+
{
|
|
3593
|
+
className: "flex items-start justify-center h-full",
|
|
3594
|
+
style: { overflow: "visible" },
|
|
3595
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3596
|
+
Typography,
|
|
3597
|
+
{
|
|
3598
|
+
variant: "body-xs",
|
|
3599
|
+
className: "text-secondary whitespace-nowrap",
|
|
3600
|
+
children: payload.value
|
|
3601
|
+
}
|
|
3602
|
+
)
|
|
3603
|
+
}
|
|
3604
|
+
)
|
|
3605
|
+
}
|
|
3606
|
+
) });
|
|
3607
|
+
};
|
|
3608
|
+
var customXAxisTickRotated = (props) => {
|
|
3609
|
+
const { x, y, payload } = props;
|
|
3610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3611
|
+
"text",
|
|
3612
|
+
{
|
|
3613
|
+
x: 0,
|
|
3614
|
+
y: 0,
|
|
3615
|
+
dy: 10,
|
|
3616
|
+
textAnchor: "end",
|
|
3617
|
+
fill: "currentColor",
|
|
3618
|
+
transform: "rotate(-45)",
|
|
3619
|
+
className: "text-secondary",
|
|
3620
|
+
style: { fontSize: "12px" },
|
|
3621
|
+
children: payload.value
|
|
3622
|
+
}
|
|
3623
|
+
) });
|
|
3624
|
+
};
|
|
3625
|
+
var customYAxisTick = (props) => {
|
|
3626
|
+
const { x, y, payload } = props;
|
|
3627
|
+
const text = String(payload.value);
|
|
3628
|
+
const estimatedWidth = Math.max(text.length * 8, 80);
|
|
3629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3630
|
+
"foreignObject",
|
|
3631
|
+
{
|
|
3632
|
+
x: x - estimatedWidth + 5,
|
|
3633
|
+
y: y - 6,
|
|
3634
|
+
width: estimatedWidth,
|
|
3635
|
+
height: 15,
|
|
3636
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex justify-end w-full", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Typography, { variant: "body-xs", className: "text-secondary", children: payload.value }) })
|
|
3637
|
+
}
|
|
3638
|
+
);
|
|
3639
|
+
};
|
|
3640
|
+
|
|
3641
|
+
// src/components/ui/charts/chart-tooltip.tsx
|
|
3642
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3643
|
+
function TooltipContainer({
|
|
3644
|
+
children,
|
|
3645
|
+
className = ""
|
|
3646
|
+
}) {
|
|
3647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3648
|
+
"div",
|
|
3649
|
+
{
|
|
3650
|
+
className: `bg-light border border-subtle rounded p-2.5 text-dark ${className}`,
|
|
3651
|
+
children
|
|
3652
|
+
}
|
|
3653
|
+
);
|
|
3654
|
+
}
|
|
3655
|
+
function TooltipItem({
|
|
3656
|
+
color,
|
|
3657
|
+
label,
|
|
3658
|
+
value,
|
|
3659
|
+
className = ""
|
|
3660
|
+
}) {
|
|
3661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
3662
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("br", {}),
|
|
3663
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Typography, { variant: "label-sm", className, children: [
|
|
3664
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3665
|
+
"span",
|
|
3666
|
+
{
|
|
3667
|
+
className: "inline-block w-3 h-3 mr-1.5",
|
|
3668
|
+
style: { backgroundColor: color }
|
|
3669
|
+
}
|
|
3670
|
+
),
|
|
3671
|
+
label,
|
|
3672
|
+
": ",
|
|
3673
|
+
value
|
|
3674
|
+
] })
|
|
3675
|
+
] });
|
|
3676
|
+
}
|
|
3677
|
+
function GenericTooltip({
|
|
3678
|
+
title,
|
|
3679
|
+
items,
|
|
3680
|
+
className = ""
|
|
3681
|
+
}) {
|
|
3682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(TooltipContainer, { className, children: [
|
|
3683
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Typography, { variant: "label-sm-bold", children: title }),
|
|
3684
|
+
items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3685
|
+
TooltipItem,
|
|
3686
|
+
{
|
|
3687
|
+
color: item.color,
|
|
3688
|
+
label: item.label,
|
|
3689
|
+
value: item.value
|
|
3690
|
+
},
|
|
3691
|
+
index
|
|
3692
|
+
))
|
|
3693
|
+
] });
|
|
3694
|
+
}
|
|
3695
|
+
|
|
3696
|
+
// src/components/ui/charts/bar-chart.tsx
|
|
3697
|
+
var import_react2 = require("react");
|
|
3698
|
+
var import_recharts = require("recharts");
|
|
3699
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3700
|
+
var BarChart = (0, import_react2.forwardRef)(
|
|
3701
|
+
({
|
|
3702
|
+
data,
|
|
3703
|
+
xAxisKey,
|
|
3704
|
+
yAxisKey,
|
|
3705
|
+
title,
|
|
3706
|
+
xAxisLabel,
|
|
3707
|
+
yAxisLabel,
|
|
3708
|
+
barColor = CHART_COLORS.PRIMARY,
|
|
3709
|
+
className = "",
|
|
3710
|
+
rotateXAxisLabels = false,
|
|
3711
|
+
showLegend = false,
|
|
3712
|
+
legendItems = [],
|
|
3713
|
+
onDataPointClick,
|
|
3714
|
+
layout = "horizontal",
|
|
3715
|
+
xAxisType = "category",
|
|
3716
|
+
yAxisType = "number",
|
|
3717
|
+
barDataKey
|
|
3718
|
+
}, ref) => {
|
|
3719
|
+
const handleClick = (data2) => {
|
|
3720
|
+
if (onDataPointClick && data2 && typeof data2 === "object") {
|
|
3721
|
+
onDataPointClick(data2);
|
|
3722
|
+
}
|
|
3723
|
+
};
|
|
3724
|
+
const defaultLegendItems = showLegend && legendItems.length === 0 ? [{ key: yAxisKey, color: barColor, label: yAxisKey }] : legendItems;
|
|
3725
|
+
const hasData = data && data.length > 0;
|
|
3726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3727
|
+
"div",
|
|
3728
|
+
{
|
|
3729
|
+
ref,
|
|
3730
|
+
className: `bg-light border border-subtle mx-6 ${className}`,
|
|
3731
|
+
children: [
|
|
3732
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Typography, { variant: "label-sm-bold", children: title }) }),
|
|
3733
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3734
|
+
import_recharts.ResponsiveContainer,
|
|
3735
|
+
{
|
|
3736
|
+
width: "100%",
|
|
3737
|
+
height: CHART_CONSTANTS.STANDARD_HEIGHT,
|
|
3738
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3739
|
+
import_recharts.BarChart,
|
|
3740
|
+
{
|
|
3741
|
+
data,
|
|
3742
|
+
margin: {
|
|
3743
|
+
...CHART_CONSTANTS.MARGIN,
|
|
3744
|
+
left: 24,
|
|
3745
|
+
bottom: rotateXAxisLabels ? 60 : 50
|
|
3746
|
+
},
|
|
3747
|
+
onClick: handleClick,
|
|
3748
|
+
layout,
|
|
3749
|
+
children: [
|
|
3750
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3751
|
+
import_recharts.XAxis,
|
|
3752
|
+
{
|
|
3753
|
+
dataKey: xAxisKey,
|
|
3754
|
+
type: xAxisType,
|
|
3755
|
+
axisLine: false,
|
|
3756
|
+
tickLine: false,
|
|
3757
|
+
tick: rotateXAxisLabels ? customXAxisTickRotated : customXAxisTick,
|
|
3758
|
+
interval: 0,
|
|
3759
|
+
height: rotateXAxisLabels ? CHART_CONSTANTS.AXIS_HEIGHT_ROTATED : CHART_CONSTANTS.AXIS_HEIGHT_STANDARD,
|
|
3760
|
+
width: CHART_CONSTANTS.AXIS_WIDTH_STANDARD,
|
|
3761
|
+
label: xAxisLabel ? createCustomXAxisLabel(xAxisLabel, 80) : void 0
|
|
3762
|
+
}
|
|
3763
|
+
),
|
|
3764
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3765
|
+
import_recharts.YAxis,
|
|
3766
|
+
{
|
|
3767
|
+
axisLine: false,
|
|
3768
|
+
tickLine: false,
|
|
3769
|
+
tick: customYAxisTick,
|
|
3770
|
+
label: yAxisLabel ? createCustomYAxisLabel(yAxisLabel, 40) : void 0,
|
|
3771
|
+
dataKey: yAxisKey,
|
|
3772
|
+
type: yAxisType
|
|
3773
|
+
}
|
|
3774
|
+
),
|
|
3775
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3776
|
+
import_recharts.Tooltip,
|
|
3777
|
+
{
|
|
3778
|
+
content: ({
|
|
3779
|
+
active,
|
|
3780
|
+
payload,
|
|
3781
|
+
label
|
|
3782
|
+
}) => {
|
|
3783
|
+
if (active && payload && payload.length) {
|
|
3784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3785
|
+
GenericTooltip,
|
|
3786
|
+
{
|
|
3787
|
+
title: label?.toString(),
|
|
3788
|
+
items: payload.map((entry) => ({
|
|
3789
|
+
color: entry.color || barColor,
|
|
3790
|
+
label: entry.name || yAxisKey,
|
|
3791
|
+
value: entry.value || 0
|
|
3792
|
+
}))
|
|
3793
|
+
}
|
|
3794
|
+
);
|
|
3795
|
+
}
|
|
3796
|
+
return null;
|
|
3797
|
+
}
|
|
3798
|
+
}
|
|
3799
|
+
),
|
|
3800
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3801
|
+
import_recharts.Bar,
|
|
3802
|
+
{
|
|
3803
|
+
dataKey: barDataKey || yAxisKey,
|
|
3804
|
+
fill: barColor,
|
|
3805
|
+
name: barDataKey || yAxisKey
|
|
3806
|
+
}
|
|
3807
|
+
),
|
|
3808
|
+
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChartLegend, { items: defaultLegendItems })
|
|
3809
|
+
]
|
|
3810
|
+
}
|
|
3811
|
+
)
|
|
3812
|
+
}
|
|
3813
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
|
|
3814
|
+
]
|
|
3815
|
+
}
|
|
3816
|
+
);
|
|
3817
|
+
}
|
|
3818
|
+
);
|
|
3819
|
+
BarChart.displayName = "BarChart";
|
|
3820
|
+
|
|
3821
|
+
// src/components/ui/charts/line-chart.tsx
|
|
3822
|
+
var import_react3 = require("react");
|
|
3823
|
+
var import_recharts2 = require("recharts");
|
|
3824
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3825
|
+
var LineChart = (0, import_react3.forwardRef)(
|
|
3826
|
+
({
|
|
3827
|
+
data,
|
|
3828
|
+
xAxisKey,
|
|
3829
|
+
series,
|
|
3830
|
+
title,
|
|
3831
|
+
xAxisLabel,
|
|
3832
|
+
yAxisLabel,
|
|
3833
|
+
onDataPointClick,
|
|
3834
|
+
className = "",
|
|
3835
|
+
showLegend = true,
|
|
3836
|
+
legendItems = []
|
|
3837
|
+
}, ref) => {
|
|
3838
|
+
const handleClick = (data2) => {
|
|
3839
|
+
if (onDataPointClick && data2 && typeof data2 === "object") {
|
|
3840
|
+
onDataPointClick(data2);
|
|
3841
|
+
}
|
|
3842
|
+
};
|
|
3843
|
+
const defaultLegendItems = legendItems.length > 0 ? legendItems : createLegendItems(
|
|
3844
|
+
series.reduce(
|
|
3845
|
+
(acc, s, index) => ({
|
|
3846
|
+
...acc,
|
|
3847
|
+
[s.dataKey]: s.color || getSeriesColor(index)
|
|
3848
|
+
}),
|
|
3849
|
+
{}
|
|
3850
|
+
)
|
|
3851
|
+
);
|
|
3852
|
+
const hasData = data && data.length > 0;
|
|
3853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3854
|
+
"div",
|
|
3855
|
+
{
|
|
3856
|
+
ref,
|
|
3857
|
+
className: `bg-light border border-subtle mx-6 ${className}`,
|
|
3858
|
+
children: [
|
|
3859
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Typography, { variant: "label-sm-bold", children: title }) }),
|
|
3860
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3861
|
+
import_recharts2.ResponsiveContainer,
|
|
3862
|
+
{
|
|
3863
|
+
width: "100%",
|
|
3864
|
+
height: CHART_CONSTANTS.STANDARD_HEIGHT,
|
|
3865
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3866
|
+
import_recharts2.LineChart,
|
|
3867
|
+
{
|
|
3868
|
+
data,
|
|
3869
|
+
margin: {
|
|
3870
|
+
...CHART_CONSTANTS.MARGIN,
|
|
3871
|
+
left: 24,
|
|
3872
|
+
bottom: 50
|
|
3873
|
+
},
|
|
3874
|
+
onClick: handleClick,
|
|
3875
|
+
children: [
|
|
3876
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3877
|
+
import_recharts2.XAxis,
|
|
3878
|
+
{
|
|
3879
|
+
dataKey: xAxisKey,
|
|
3880
|
+
axisLine: false,
|
|
3881
|
+
tickLine: false,
|
|
3882
|
+
tick: customXAxisTick,
|
|
3883
|
+
interval: 0,
|
|
3884
|
+
height: CHART_CONSTANTS.AXIS_HEIGHT_STANDARD,
|
|
3885
|
+
label: xAxisLabel ? createCustomXAxisLabel(xAxisLabel) : void 0
|
|
3886
|
+
}
|
|
3887
|
+
),
|
|
3888
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3889
|
+
import_recharts2.YAxis,
|
|
3890
|
+
{
|
|
3891
|
+
axisLine: false,
|
|
3892
|
+
tickLine: false,
|
|
3893
|
+
tick: customYAxisTick,
|
|
3894
|
+
label: yAxisLabel ? createCustomYAxisLabel(yAxisLabel, 40) : void 0
|
|
3895
|
+
}
|
|
3896
|
+
),
|
|
3897
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3898
|
+
import_recharts2.Tooltip,
|
|
3899
|
+
{
|
|
3900
|
+
content: ({
|
|
3901
|
+
active,
|
|
3902
|
+
payload,
|
|
3903
|
+
label
|
|
3904
|
+
}) => {
|
|
3905
|
+
if (active && payload && payload.length) {
|
|
3906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3907
|
+
GenericTooltip,
|
|
3908
|
+
{
|
|
3909
|
+
title: label?.toString(),
|
|
3910
|
+
items: payload.map((entry) => ({
|
|
3911
|
+
color: entry.color || CHART_COLORS.PRIMARY,
|
|
3912
|
+
label: entry.name || entry.dataKey || "",
|
|
3913
|
+
value: entry.value || 0
|
|
3914
|
+
}))
|
|
3915
|
+
}
|
|
3916
|
+
);
|
|
3917
|
+
}
|
|
3918
|
+
return null;
|
|
3919
|
+
}
|
|
3920
|
+
}
|
|
3921
|
+
),
|
|
3922
|
+
series.map((s, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3923
|
+
import_recharts2.Line,
|
|
3924
|
+
{
|
|
3925
|
+
type: "monotone",
|
|
3926
|
+
dataKey: s.dataKey,
|
|
3927
|
+
stroke: s.color || getSeriesColor(index),
|
|
3928
|
+
strokeWidth: s.strokeWidth || 2,
|
|
3929
|
+
dot: s.dot !== false ? { r: 4 } : false,
|
|
3930
|
+
activeDot: s.activeDot !== false ? { r: 6 } : false
|
|
3931
|
+
},
|
|
3932
|
+
s.dataKey
|
|
3933
|
+
)),
|
|
3934
|
+
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChartLegend, { items: defaultLegendItems })
|
|
3935
|
+
]
|
|
3936
|
+
}
|
|
3937
|
+
)
|
|
3938
|
+
}
|
|
3939
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
|
|
3940
|
+
]
|
|
3941
|
+
}
|
|
3942
|
+
);
|
|
3943
|
+
}
|
|
3944
|
+
);
|
|
3945
|
+
LineChart.displayName = "LineChart";
|
|
3946
|
+
|
|
3947
|
+
// src/components/ui/charts/pie-chart.tsx
|
|
3948
|
+
var import_react4 = require("react");
|
|
3949
|
+
var import_recharts3 = require("recharts");
|
|
3950
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3951
|
+
var PieChart = (0, import_react4.forwardRef)(
|
|
3952
|
+
({
|
|
3953
|
+
data,
|
|
3954
|
+
title,
|
|
3955
|
+
onDataPointClick,
|
|
3956
|
+
className = "",
|
|
3957
|
+
showLegend = true,
|
|
3958
|
+
legendItems = [],
|
|
3959
|
+
innerRadius = "40%",
|
|
3960
|
+
outerRadius = "70%",
|
|
3961
|
+
showLabels = true
|
|
3962
|
+
}, ref) => {
|
|
3963
|
+
const handleClick = (data2) => {
|
|
3964
|
+
if (onDataPointClick && data2 && typeof data2 === "object") {
|
|
3965
|
+
onDataPointClick(data2);
|
|
3966
|
+
}
|
|
3967
|
+
};
|
|
3968
|
+
const defaultLegendItems = legendItems.length > 0 ? legendItems : createLegendItems(
|
|
3969
|
+
data.reduce(
|
|
3970
|
+
(acc, item, index) => ({
|
|
3971
|
+
...acc,
|
|
3972
|
+
[item.name]: item.color || getSeriesColor(index)
|
|
3973
|
+
}),
|
|
3974
|
+
{}
|
|
3975
|
+
)
|
|
3976
|
+
);
|
|
3977
|
+
const hasData = data && data.length > 0;
|
|
3978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
3979
|
+
"div",
|
|
3980
|
+
{
|
|
3981
|
+
ref,
|
|
3982
|
+
className: `bg-light border border-subtle mx-6 ${className}`,
|
|
3983
|
+
children: [
|
|
3984
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Typography, { variant: "label-sm-bold", children: title }) }),
|
|
3985
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
3986
|
+
import_recharts3.PieChart,
|
|
3987
|
+
{
|
|
3988
|
+
width: 600,
|
|
3989
|
+
height: CHART_CONSTANTS.LARGE_HEIGHT,
|
|
3990
|
+
children: [
|
|
3991
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3992
|
+
import_recharts3.Pie,
|
|
3993
|
+
{
|
|
3994
|
+
data,
|
|
3995
|
+
innerRadius,
|
|
3996
|
+
outerRadius,
|
|
3997
|
+
dataKey: "value",
|
|
3998
|
+
cy: CHART_CONSTANTS.PIE_CHART_CENTER_Y,
|
|
3999
|
+
cx: CHART_CONSTANTS.PIE_CHART_CENTER_X,
|
|
4000
|
+
label: showLabels,
|
|
4001
|
+
labelLine: false,
|
|
4002
|
+
onClick: handleClick,
|
|
4003
|
+
children: data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4004
|
+
import_recharts3.Cell,
|
|
4005
|
+
{
|
|
4006
|
+
fill: entry.color || getSeriesColor(index)
|
|
4007
|
+
},
|
|
4008
|
+
`cell-${index}`
|
|
4009
|
+
))
|
|
4010
|
+
}
|
|
4011
|
+
),
|
|
4012
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4013
|
+
import_recharts3.Tooltip,
|
|
4014
|
+
{
|
|
4015
|
+
content: ({
|
|
4016
|
+
active,
|
|
4017
|
+
payload
|
|
4018
|
+
}) => {
|
|
4019
|
+
if (active && payload && payload.length && payload[0]) {
|
|
4020
|
+
const data2 = payload[0].payload;
|
|
4021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4022
|
+
GenericTooltip,
|
|
4023
|
+
{
|
|
4024
|
+
title: data2.name,
|
|
4025
|
+
items: [
|
|
4026
|
+
{
|
|
4027
|
+
color: data2.color || CHART_COLORS.PRIMARY,
|
|
4028
|
+
label: "Value",
|
|
4029
|
+
value: data2.value
|
|
4030
|
+
}
|
|
4031
|
+
]
|
|
4032
|
+
}
|
|
4033
|
+
);
|
|
4034
|
+
}
|
|
4035
|
+
return null;
|
|
4036
|
+
}
|
|
4037
|
+
}
|
|
4038
|
+
),
|
|
4039
|
+
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChartLegend, { items: defaultLegendItems, y: 400 })
|
|
4040
|
+
]
|
|
4041
|
+
}
|
|
4042
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
|
|
4043
|
+
]
|
|
4044
|
+
}
|
|
4045
|
+
);
|
|
4046
|
+
}
|
|
4047
|
+
);
|
|
4048
|
+
PieChart.displayName = "PieChart";
|
|
4049
|
+
|
|
4050
|
+
// src/components/ui/table.tsx
|
|
4051
|
+
var import_react5 = require("react");
|
|
4052
|
+
var import_react_table = require("@tanstack/react-table");
|
|
4053
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4054
|
+
function Table({
|
|
4055
|
+
table,
|
|
4056
|
+
className,
|
|
4057
|
+
showPagination = false,
|
|
4058
|
+
paginationClassName
|
|
4059
|
+
}) {
|
|
4060
|
+
const currentPage = table.getState().pagination.pageIndex;
|
|
4061
|
+
const pageSize = table.getState().pagination.pageSize;
|
|
4062
|
+
const totalPages = table.getPageCount();
|
|
4063
|
+
const totalRows = table.getFilteredRowModel().rows.length;
|
|
4064
|
+
const showingText = totalRows > 0 ? "Showing " + (currentPage * pageSize + 1) + "-" + Math.min((currentPage + 1) * pageSize, totalRows) + " of " + totalRows + " results" : "No results found";
|
|
4065
|
+
const handlePreviousPage = (0, import_react5.useCallback)(() => {
|
|
4066
|
+
table.previousPage();
|
|
4067
|
+
}, [table]);
|
|
4068
|
+
const handleNextPage = (0, import_react5.useCallback)(() => {
|
|
4069
|
+
table.nextPage();
|
|
4070
|
+
}, [table]);
|
|
4071
|
+
const handlePageChange = (0, import_react5.useCallback)(
|
|
4072
|
+
(pageIndex) => {
|
|
4073
|
+
table.setPageIndex(pageIndex);
|
|
4074
|
+
},
|
|
4075
|
+
[table]
|
|
4076
|
+
);
|
|
4077
|
+
const handlePageSizeChange = (0, import_react5.useCallback)(
|
|
4078
|
+
(value) => {
|
|
4079
|
+
table.setPageSize(Number(value));
|
|
4080
|
+
},
|
|
4081
|
+
[table]
|
|
4082
|
+
);
|
|
4083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
|
4084
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("overflow-x-auto", className), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("table", { className: "min-w-full divide-y divide-border", children: [
|
|
4085
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("thead", { className: "bg-dark text-light", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("th", { className: "px-6 py-3 text-left", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4086
|
+
"div",
|
|
4087
|
+
{
|
|
4088
|
+
className: `flex items-center space-x-1 ${header.column.getCanSort() ? "cursor-pointer select-none" : ""}`,
|
|
4089
|
+
onClick: header.column.getToggleSortingHandler(),
|
|
4090
|
+
children: [
|
|
4091
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4092
|
+
Typography,
|
|
4093
|
+
{
|
|
4094
|
+
variant: "label-xs",
|
|
4095
|
+
className: "text-light uppercase tracking-wider",
|
|
4096
|
+
children: (0, import_react_table.flexRender)(
|
|
4097
|
+
header.column.columnDef.header,
|
|
4098
|
+
header.getContext()
|
|
4099
|
+
)
|
|
4100
|
+
}
|
|
4101
|
+
),
|
|
4102
|
+
header.column.getCanSort() && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "ml-1", children: [
|
|
4103
|
+
header.column.getIsSorted() === "asc" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronUp, { className: "w-4 h-4 text-light" }),
|
|
4104
|
+
header.column.getIsSorted() === "desc" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronDown, { className: "w-4 h-4 text-light" })
|
|
4105
|
+
] })
|
|
4106
|
+
]
|
|
4107
|
+
}
|
|
4108
|
+
) }, header.id)) }, headerGroup.id)) }),
|
|
4109
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("tbody", { className: "bg-light divide-y divide-border", children: table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("tr", { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typography, { variant: "body-sm", children: (0, import_react_table.flexRender)(
|
|
4110
|
+
cell.column.columnDef.cell,
|
|
4111
|
+
cell.getContext()
|
|
4112
|
+
) }) }, cell.id)) }, row.id)) })
|
|
4113
|
+
] }) }),
|
|
4114
|
+
showPagination && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4115
|
+
"div",
|
|
4116
|
+
{
|
|
4117
|
+
className: cn(
|
|
4118
|
+
"flex items-center justify-between px-6 py-3 bg-light border-t border-subtle",
|
|
4119
|
+
paginationClassName
|
|
4120
|
+
),
|
|
4121
|
+
children: [
|
|
4122
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typography, { variant: "body-sm", className: "text-secondary", children: showingText }) }),
|
|
4123
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
4124
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4125
|
+
Button,
|
|
4126
|
+
{
|
|
4127
|
+
variant: "ghost",
|
|
4128
|
+
size: "sm",
|
|
4129
|
+
onClick: handlePreviousPage,
|
|
4130
|
+
disabled: !table.getCanPreviousPage(),
|
|
4131
|
+
className: "p-2",
|
|
4132
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronLeft, { className: "w-4 h-4" })
|
|
4133
|
+
}
|
|
4134
|
+
),
|
|
4135
|
+
Array.from(
|
|
4136
|
+
{ length: Math.min(5, table.getPageCount()) },
|
|
4137
|
+
(_, i) => {
|
|
4138
|
+
let pageNumber;
|
|
4139
|
+
if (totalPages <= 5) {
|
|
4140
|
+
pageNumber = i;
|
|
4141
|
+
} else if (currentPage <= 2) {
|
|
4142
|
+
pageNumber = i;
|
|
4143
|
+
} else if (currentPage >= totalPages - 3) {
|
|
4144
|
+
pageNumber = totalPages - 5 + i;
|
|
4145
|
+
} else {
|
|
4146
|
+
pageNumber = currentPage - 2 + i;
|
|
4147
|
+
}
|
|
4148
|
+
const isActive = pageNumber === currentPage;
|
|
4149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4150
|
+
Button,
|
|
4151
|
+
{
|
|
4152
|
+
variant: isActive ? "default" : "ghost",
|
|
4153
|
+
size: "sm",
|
|
4154
|
+
onClick: () => handlePageChange(pageNumber),
|
|
4155
|
+
className: "min-w-8 h-8 p-0",
|
|
4156
|
+
children: pageNumber + 1
|
|
4157
|
+
},
|
|
4158
|
+
pageNumber
|
|
4159
|
+
);
|
|
4160
|
+
}
|
|
4161
|
+
),
|
|
4162
|
+
table.getPageCount() > 5 && currentPage < totalPages - 3 && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
4163
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "px-1 text-secondary", children: "..." }),
|
|
4164
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typography, { variant: "body-sm", className: "text-secondary", children: totalPages })
|
|
4165
|
+
] }),
|
|
4166
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4167
|
+
Button,
|
|
4168
|
+
{
|
|
4169
|
+
variant: "ghost",
|
|
4170
|
+
size: "sm",
|
|
4171
|
+
onClick: handleNextPage,
|
|
4172
|
+
disabled: !table.getCanNextPage(),
|
|
4173
|
+
className: "p-2",
|
|
4174
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronRight, { className: "w-4 h-4" })
|
|
4175
|
+
}
|
|
4176
|
+
)
|
|
4177
|
+
] }),
|
|
4178
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-3 w-48", children: [
|
|
4179
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4180
|
+
Typography,
|
|
4181
|
+
{
|
|
4182
|
+
variant: "body-sm",
|
|
4183
|
+
className: "text-secondary whitespace-nowrap",
|
|
4184
|
+
children: "Rows per page:"
|
|
4185
|
+
}
|
|
4186
|
+
),
|
|
4187
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4188
|
+
Select,
|
|
4189
|
+
{
|
|
4190
|
+
value: table.getState().pagination.pageSize.toString(),
|
|
4191
|
+
onValueChange: handlePageSizeChange,
|
|
4192
|
+
children: [
|
|
4193
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectTrigger, { className: "min-w-0 h-8", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectValue, {}) }),
|
|
4194
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectContent, { children: [10, 20, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectItem, { value: size.toString(), children: size }, size)) })
|
|
4195
|
+
]
|
|
4196
|
+
}
|
|
4197
|
+
)
|
|
4198
|
+
] })
|
|
4199
|
+
]
|
|
4200
|
+
}
|
|
4201
|
+
)
|
|
4202
|
+
] });
|
|
4203
|
+
}
|
|
3160
4204
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3161
4205
|
0 && (module.exports = {
|
|
3162
4206
|
ArrowDown,
|
|
@@ -3164,14 +4208,19 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
3164
4208
|
ArrowRight,
|
|
3165
4209
|
ArrowUp,
|
|
3166
4210
|
Badge,
|
|
4211
|
+
BarChart,
|
|
3167
4212
|
Bell,
|
|
3168
4213
|
Bookmark,
|
|
3169
4214
|
Button,
|
|
4215
|
+
CHART_COLORS,
|
|
4216
|
+
CHART_CONSTANTS,
|
|
4217
|
+
COLOR_SCHEMES,
|
|
3170
4218
|
Calendar,
|
|
3171
4219
|
CaretDown,
|
|
3172
4220
|
CaretLeft,
|
|
3173
4221
|
CaretRight,
|
|
3174
4222
|
CaretUp,
|
|
4223
|
+
ChartLegend,
|
|
3175
4224
|
Chat,
|
|
3176
4225
|
Check,
|
|
3177
4226
|
CheckIcon,
|
|
@@ -3209,9 +4258,20 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
3209
4258
|
Exclamation,
|
|
3210
4259
|
EyeClosed,
|
|
3211
4260
|
EyeOpen,
|
|
4261
|
+
Field,
|
|
4262
|
+
FieldContent,
|
|
4263
|
+
FieldDescription,
|
|
4264
|
+
FieldError,
|
|
4265
|
+
FieldGroup,
|
|
4266
|
+
FieldLabel,
|
|
4267
|
+
FieldLegend,
|
|
4268
|
+
FieldSeparator,
|
|
4269
|
+
FieldSet,
|
|
4270
|
+
FieldTitle,
|
|
3212
4271
|
Filter,
|
|
3213
4272
|
FilterDescending,
|
|
3214
4273
|
FormField,
|
|
4274
|
+
GenericTooltip,
|
|
3215
4275
|
GraphBar,
|
|
3216
4276
|
GraphDonut,
|
|
3217
4277
|
GraphLine,
|
|
@@ -3220,6 +4280,8 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
3220
4280
|
Home,
|
|
3221
4281
|
Information,
|
|
3222
4282
|
Input,
|
|
4283
|
+
Label,
|
|
4284
|
+
LineChart,
|
|
3223
4285
|
Location,
|
|
3224
4286
|
Lock,
|
|
3225
4287
|
Logout,
|
|
@@ -3227,6 +4289,7 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
3227
4289
|
Minus,
|
|
3228
4290
|
MoreMenu,
|
|
3229
4291
|
Phone,
|
|
4292
|
+
PieChart,
|
|
3230
4293
|
Plus,
|
|
3231
4294
|
QuestionCircle,
|
|
3232
4295
|
Select,
|
|
@@ -3239,14 +4302,19 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
3239
4302
|
SelectSeparator,
|
|
3240
4303
|
SelectTrigger,
|
|
3241
4304
|
SelectValue,
|
|
4305
|
+
Separator,
|
|
3242
4306
|
Share,
|
|
3243
4307
|
Star,
|
|
3244
4308
|
Statement,
|
|
3245
4309
|
Table,
|
|
4310
|
+
TableIcon,
|
|
3246
4311
|
Tabs,
|
|
3247
4312
|
TabsContent,
|
|
3248
4313
|
TabsList,
|
|
3249
4314
|
TabsTrigger,
|
|
4315
|
+
Textarea,
|
|
4316
|
+
TooltipContainer,
|
|
4317
|
+
TooltipItem,
|
|
3250
4318
|
Trash,
|
|
3251
4319
|
Typography,
|
|
3252
4320
|
Upload,
|
|
@@ -3257,8 +4325,20 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
3257
4325
|
X,
|
|
3258
4326
|
badgeVariants,
|
|
3259
4327
|
buttonVariants,
|
|
4328
|
+
calculateYAxisWidth,
|
|
3260
4329
|
checkboxVariants,
|
|
3261
|
-
|
|
4330
|
+
createCustomXAxisLabel,
|
|
4331
|
+
createCustomYAxisLabel,
|
|
4332
|
+
createCustomYAxisRightLabel,
|
|
4333
|
+
createLegendItems,
|
|
4334
|
+
customXAxisTick,
|
|
4335
|
+
customXAxisTickRotated,
|
|
4336
|
+
customYAxisTick,
|
|
4337
|
+
formatLargeNumber,
|
|
4338
|
+
formatPercentage,
|
|
4339
|
+
getHeatmapColor,
|
|
4340
|
+
getPerformanceColor,
|
|
4341
|
+
getSeriesColor,
|
|
3262
4342
|
selectTriggerVariants,
|
|
3263
4343
|
tabsVariants,
|
|
3264
4344
|
typographyVariants,
|