@northslopetech/altitude-ui 2.1.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -16
- package/dist/index.d.mts +4 -28
- package/dist/index.d.ts +4 -28
- package/dist/index.js +223 -329
- package/dist/index.mjs +229 -334
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1654,7 +1654,7 @@ var Logout = ({
|
|
|
1654
1654
|
// src/components/ui/select.tsx
|
|
1655
1655
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1656
1656
|
var selectTriggerVariants = cva4(
|
|
1657
|
-
"flex items-center justify-between border bg-light text-dark focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 transition-colors rounded-md px-3",
|
|
1657
|
+
"flex items-center justify-between border bg-light text-dark focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 transition-colors rounded-md px-3 border-secondary focus-visible:border-2 focus-visible:border-strong aria-invalid:border-error aria-invalid:focus-visible:border-error",
|
|
1658
1658
|
{
|
|
1659
1659
|
variants: {
|
|
1660
1660
|
width: {
|
|
@@ -1699,7 +1699,7 @@ var SelectTrigger = React3.forwardRef(({ className, children, style, width, ...p
|
|
|
1699
1699
|
ref,
|
|
1700
1700
|
className: cn(
|
|
1701
1701
|
selectTriggerVariants({ width }),
|
|
1702
|
-
"
|
|
1702
|
+
"data-[state=open]:[&_svg]:rotate-180 data-[placeholder]:text-secondary h-10 py-2",
|
|
1703
1703
|
className
|
|
1704
1704
|
),
|
|
1705
1705
|
style: tokenStyles,
|
|
@@ -1810,121 +1810,18 @@ var SelectSeparator = React3.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
1810
1810
|
));
|
|
1811
1811
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
1812
1812
|
|
|
1813
|
-
// src/components/ui/form-field.tsx
|
|
1814
|
-
import * as React4 from "react";
|
|
1815
|
-
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1816
|
-
var FormField = React4.forwardRef(
|
|
1817
|
-
({
|
|
1818
|
-
label,
|
|
1819
|
-
helperText,
|
|
1820
|
-
error = false,
|
|
1821
|
-
required = false,
|
|
1822
|
-
children,
|
|
1823
|
-
className,
|
|
1824
|
-
id,
|
|
1825
|
-
compact = false,
|
|
1826
|
-
...props
|
|
1827
|
-
}, ref) => {
|
|
1828
|
-
const generatedId = React4.useId();
|
|
1829
|
-
const fieldId = id || generatedId;
|
|
1830
|
-
const helperTextId = `${fieldId}-helper`;
|
|
1831
|
-
const labelId = `${fieldId}-label`;
|
|
1832
|
-
if (compact) {
|
|
1833
|
-
return /* @__PURE__ */ jsxs4("div", { ref, className: cn("w-full space-y-2", className), ...props, children: [
|
|
1834
|
-
/* @__PURE__ */ jsxs4("div", { className: "relative", children: [
|
|
1835
|
-
React4.cloneElement(
|
|
1836
|
-
children,
|
|
1837
|
-
{
|
|
1838
|
-
id: fieldId,
|
|
1839
|
-
"aria-labelledby": label ? labelId : void 0,
|
|
1840
|
-
"aria-describedby": helperText ? helperTextId : void 0,
|
|
1841
|
-
"aria-required": required,
|
|
1842
|
-
"aria-invalid": error,
|
|
1843
|
-
className: cn(
|
|
1844
|
-
"pt-7 pb-2 h-14 items-end",
|
|
1845
|
-
error ? "border-2 border-error-500 focus:border-error-500" : "",
|
|
1846
|
-
children.props.className
|
|
1847
|
-
)
|
|
1848
|
-
}
|
|
1849
|
-
),
|
|
1850
|
-
label && /* @__PURE__ */ jsx4(
|
|
1851
|
-
"label",
|
|
1852
|
-
{
|
|
1853
|
-
id: labelId,
|
|
1854
|
-
htmlFor: fieldId,
|
|
1855
|
-
className: "absolute left-3 top-2 text-xs text-semantic-text-info [font:var(--typography-label-xs-bold)] pointer-events-none",
|
|
1856
|
-
children: label
|
|
1857
|
-
}
|
|
1858
|
-
)
|
|
1859
|
-
] }),
|
|
1860
|
-
helperText && /* @__PURE__ */ jsx4(
|
|
1861
|
-
Typography,
|
|
1862
|
-
{
|
|
1863
|
-
variant: "body-xs",
|
|
1864
|
-
id: helperTextId,
|
|
1865
|
-
className: cn(
|
|
1866
|
-
error ? "text-semantic-text-error" : "text-semantic-text-secondary"
|
|
1867
|
-
),
|
|
1868
|
-
children: helperText
|
|
1869
|
-
}
|
|
1870
|
-
)
|
|
1871
|
-
] });
|
|
1872
|
-
}
|
|
1873
|
-
return /* @__PURE__ */ jsxs4("div", { ref, className: cn("w-full space-y-3", className), ...props, children: [
|
|
1874
|
-
(label || required) && /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between", children: [
|
|
1875
|
-
label && /* @__PURE__ */ jsx4(
|
|
1876
|
-
"label",
|
|
1877
|
-
{
|
|
1878
|
-
id: labelId,
|
|
1879
|
-
htmlFor: fieldId,
|
|
1880
|
-
className: "text-semantic-text-primary [font:var(--typography-label-sm-regular)]",
|
|
1881
|
-
children: label
|
|
1882
|
-
}
|
|
1883
|
-
),
|
|
1884
|
-
required && /* @__PURE__ */ jsx4("span", { className: "text-semantic-text-secondary [font:var(--typography-label-xs-regular)]", children: "*required" })
|
|
1885
|
-
] }),
|
|
1886
|
-
React4.cloneElement(
|
|
1887
|
-
children,
|
|
1888
|
-
{
|
|
1889
|
-
id: fieldId,
|
|
1890
|
-
"aria-labelledby": label ? labelId : void 0,
|
|
1891
|
-
"aria-describedby": helperText ? helperTextId : void 0,
|
|
1892
|
-
"aria-required": required,
|
|
1893
|
-
"aria-invalid": error,
|
|
1894
|
-
className: cn(
|
|
1895
|
-
error ? "border-2 border-error-500 focus:border-error-500" : "",
|
|
1896
|
-
children.props.className
|
|
1897
|
-
)
|
|
1898
|
-
}
|
|
1899
|
-
),
|
|
1900
|
-
helperText && /* @__PURE__ */ jsx4(
|
|
1901
|
-
Typography,
|
|
1902
|
-
{
|
|
1903
|
-
variant: "body-xs",
|
|
1904
|
-
id: helperTextId,
|
|
1905
|
-
className: cn(
|
|
1906
|
-
error ? "text-semantic-text-error" : "text-semantic-text-secondary"
|
|
1907
|
-
),
|
|
1908
|
-
children: helperText
|
|
1909
|
-
}
|
|
1910
|
-
)
|
|
1911
|
-
] });
|
|
1912
|
-
}
|
|
1913
|
-
);
|
|
1914
|
-
FormField.displayName = "FormField";
|
|
1915
|
-
|
|
1916
1813
|
// src/components/ui/field.tsx
|
|
1917
1814
|
import { useMemo } from "react";
|
|
1918
1815
|
import { cva as cva5 } from "class-variance-authority";
|
|
1919
1816
|
|
|
1920
1817
|
// src/components/ui/label.tsx
|
|
1921
1818
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
1922
|
-
import { jsx as
|
|
1819
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1923
1820
|
function Label2({
|
|
1924
1821
|
className,
|
|
1925
1822
|
...props
|
|
1926
1823
|
}) {
|
|
1927
|
-
return /* @__PURE__ */
|
|
1824
|
+
return /* @__PURE__ */ jsx4(
|
|
1928
1825
|
LabelPrimitive.Root,
|
|
1929
1826
|
{
|
|
1930
1827
|
"data-slot": "label",
|
|
@@ -1939,14 +1836,14 @@ function Label2({
|
|
|
1939
1836
|
|
|
1940
1837
|
// src/components/ui/separator.tsx
|
|
1941
1838
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
1942
|
-
import { jsx as
|
|
1839
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
1943
1840
|
function Separator2({
|
|
1944
1841
|
className,
|
|
1945
1842
|
orientation = "horizontal",
|
|
1946
1843
|
decorative = true,
|
|
1947
1844
|
...props
|
|
1948
1845
|
}) {
|
|
1949
|
-
return /* @__PURE__ */
|
|
1846
|
+
return /* @__PURE__ */ jsx5(
|
|
1950
1847
|
SeparatorPrimitive.Root,
|
|
1951
1848
|
{
|
|
1952
1849
|
"data-slot": "separator",
|
|
@@ -1962,9 +1859,9 @@ function Separator2({
|
|
|
1962
1859
|
}
|
|
1963
1860
|
|
|
1964
1861
|
// src/components/ui/field.tsx
|
|
1965
|
-
import { jsx as
|
|
1862
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1966
1863
|
function FieldSet({ className, ...props }) {
|
|
1967
|
-
return /* @__PURE__ */
|
|
1864
|
+
return /* @__PURE__ */ jsx6(
|
|
1968
1865
|
"fieldset",
|
|
1969
1866
|
{
|
|
1970
1867
|
"data-slot": "field-set",
|
|
@@ -1982,7 +1879,7 @@ function FieldLegend({
|
|
|
1982
1879
|
variant = "legend",
|
|
1983
1880
|
...props
|
|
1984
1881
|
}) {
|
|
1985
|
-
return /* @__PURE__ */
|
|
1882
|
+
return /* @__PURE__ */ jsx6(
|
|
1986
1883
|
"legend",
|
|
1987
1884
|
{
|
|
1988
1885
|
"data-slot": "field-legend",
|
|
@@ -1998,7 +1895,7 @@ function FieldLegend({
|
|
|
1998
1895
|
);
|
|
1999
1896
|
}
|
|
2000
1897
|
function FieldGroup({ className, ...props }) {
|
|
2001
|
-
return /* @__PURE__ */
|
|
1898
|
+
return /* @__PURE__ */ jsx6(
|
|
2002
1899
|
"div",
|
|
2003
1900
|
{
|
|
2004
1901
|
"data-slot": "field-group",
|
|
@@ -2038,7 +1935,7 @@ function Field({
|
|
|
2038
1935
|
orientation = "vertical",
|
|
2039
1936
|
...props
|
|
2040
1937
|
}) {
|
|
2041
|
-
return /* @__PURE__ */
|
|
1938
|
+
return /* @__PURE__ */ jsx6(
|
|
2042
1939
|
"div",
|
|
2043
1940
|
{
|
|
2044
1941
|
role: "group",
|
|
@@ -2050,7 +1947,7 @@ function Field({
|
|
|
2050
1947
|
);
|
|
2051
1948
|
}
|
|
2052
1949
|
function FieldContent({ className, ...props }) {
|
|
2053
|
-
return /* @__PURE__ */
|
|
1950
|
+
return /* @__PURE__ */ jsx6(
|
|
2054
1951
|
"div",
|
|
2055
1952
|
{
|
|
2056
1953
|
"data-slot": "field-content",
|
|
@@ -2066,7 +1963,7 @@ function FieldLabel({
|
|
|
2066
1963
|
className,
|
|
2067
1964
|
...props
|
|
2068
1965
|
}) {
|
|
2069
|
-
return /* @__PURE__ */
|
|
1966
|
+
return /* @__PURE__ */ jsx6(
|
|
2070
1967
|
Label2,
|
|
2071
1968
|
{
|
|
2072
1969
|
"data-slot": "field-label",
|
|
@@ -2081,7 +1978,7 @@ function FieldLabel({
|
|
|
2081
1978
|
);
|
|
2082
1979
|
}
|
|
2083
1980
|
function FieldTitle({ className, ...props }) {
|
|
2084
|
-
return /* @__PURE__ */
|
|
1981
|
+
return /* @__PURE__ */ jsx6(
|
|
2085
1982
|
"div",
|
|
2086
1983
|
{
|
|
2087
1984
|
"data-slot": "field-label",
|
|
@@ -2094,7 +1991,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
2094
1991
|
);
|
|
2095
1992
|
}
|
|
2096
1993
|
function FieldDescription({ className, ...props }) {
|
|
2097
|
-
return /* @__PURE__ */
|
|
1994
|
+
return /* @__PURE__ */ jsx6(
|
|
2098
1995
|
"p",
|
|
2099
1996
|
{
|
|
2100
1997
|
"data-slot": "field-description",
|
|
@@ -2113,7 +2010,7 @@ function FieldSeparator({
|
|
|
2113
2010
|
className,
|
|
2114
2011
|
...props
|
|
2115
2012
|
}) {
|
|
2116
|
-
return /* @__PURE__ */
|
|
2013
|
+
return /* @__PURE__ */ jsxs4(
|
|
2117
2014
|
"div",
|
|
2118
2015
|
{
|
|
2119
2016
|
"data-slot": "field-separator",
|
|
@@ -2124,8 +2021,8 @@ function FieldSeparator({
|
|
|
2124
2021
|
),
|
|
2125
2022
|
...props,
|
|
2126
2023
|
children: [
|
|
2127
|
-
/* @__PURE__ */
|
|
2128
|
-
children && /* @__PURE__ */
|
|
2024
|
+
/* @__PURE__ */ jsx6(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
2025
|
+
children && /* @__PURE__ */ jsx6(
|
|
2129
2026
|
"span",
|
|
2130
2027
|
{
|
|
2131
2028
|
className: "bg-light text-secondary relative mx-auto block w-fit px-2",
|
|
@@ -2153,14 +2050,14 @@ function FieldError({
|
|
|
2153
2050
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
2154
2051
|
return errors[0].message;
|
|
2155
2052
|
}
|
|
2156
|
-
return /* @__PURE__ */
|
|
2157
|
-
(error, index) => error?.message && /* @__PURE__ */
|
|
2053
|
+
return /* @__PURE__ */ jsx6("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
2054
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx6("li", { children: error.message }, index)
|
|
2158
2055
|
) });
|
|
2159
2056
|
}, [children, errors]);
|
|
2160
2057
|
if (!content) {
|
|
2161
2058
|
return null;
|
|
2162
2059
|
}
|
|
2163
|
-
return /* @__PURE__ */
|
|
2060
|
+
return /* @__PURE__ */ jsx6(
|
|
2164
2061
|
"div",
|
|
2165
2062
|
{
|
|
2166
2063
|
role: "alert",
|
|
@@ -2173,14 +2070,14 @@ function FieldError({
|
|
|
2173
2070
|
}
|
|
2174
2071
|
|
|
2175
2072
|
// src/components/ui/date-picker.tsx
|
|
2176
|
-
import * as
|
|
2073
|
+
import * as React5 from "react";
|
|
2177
2074
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2178
2075
|
|
|
2179
2076
|
// src/components/ui/input.tsx
|
|
2180
|
-
import * as
|
|
2181
|
-
import { jsx as
|
|
2182
|
-
var inputBaseStyles = "flex h-10 py-2 w-full border bg-light text-dark focus:outline-none disabled:cursor-not-allowed disabled:opacity-50
|
|
2183
|
-
var Input =
|
|
2077
|
+
import * as React4 from "react";
|
|
2078
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2079
|
+
var inputBaseStyles = "flex h-10 py-2 w-full border bg-light text-dark focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 transition-colors rounded-md px-3 min-w-80 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 border-secondary focus-visible:border-2 focus-visible:border-strong disabled:border-secondary aria-invalid:border-error aria-invalid:focus-visible:border-error";
|
|
2080
|
+
var Input = React4.forwardRef(
|
|
2184
2081
|
({
|
|
2185
2082
|
className,
|
|
2186
2083
|
style,
|
|
@@ -2191,7 +2088,7 @@ var Input = React5.forwardRef(
|
|
|
2191
2088
|
readOnly,
|
|
2192
2089
|
...props
|
|
2193
2090
|
}, ref) => {
|
|
2194
|
-
const [internalValue, setInternalValue] =
|
|
2091
|
+
const [internalValue, setInternalValue] = React4.useState(value || "");
|
|
2195
2092
|
const isControlled = value !== void 0;
|
|
2196
2093
|
const currentValue = isControlled ? value : internalValue;
|
|
2197
2094
|
const showClear = showClearProp !== false && currentValue && currentValue.toString().length > 0 && !readOnly;
|
|
@@ -2221,8 +2118,8 @@ var Input = React5.forwardRef(
|
|
|
2221
2118
|
}
|
|
2222
2119
|
onClear?.();
|
|
2223
2120
|
};
|
|
2224
|
-
return /* @__PURE__ */
|
|
2225
|
-
/* @__PURE__ */
|
|
2121
|
+
return /* @__PURE__ */ jsxs5("div", { className: "relative", children: [
|
|
2122
|
+
/* @__PURE__ */ jsx7(
|
|
2226
2123
|
"input",
|
|
2227
2124
|
{
|
|
2228
2125
|
className: cn(
|
|
@@ -2238,23 +2135,23 @@ var Input = React5.forwardRef(
|
|
|
2238
2135
|
...props
|
|
2239
2136
|
}
|
|
2240
2137
|
),
|
|
2241
|
-
showClear && /* @__PURE__ */
|
|
2138
|
+
showClear && /* @__PURE__ */ jsx7(
|
|
2242
2139
|
"button",
|
|
2243
2140
|
{
|
|
2244
2141
|
type: "button",
|
|
2245
2142
|
onClick: handleClear,
|
|
2246
2143
|
className: "absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-secondary hover:text-dark transition-colors",
|
|
2247
|
-
children: /* @__PURE__ */
|
|
2144
|
+
children: /* @__PURE__ */ jsx7(X, { className: "h-4 w-4" })
|
|
2248
2145
|
}
|
|
2249
2146
|
),
|
|
2250
|
-
showLock && /* @__PURE__ */
|
|
2147
|
+
showLock && /* @__PURE__ */ jsx7(Lock, { className: "absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-secondary" })
|
|
2251
2148
|
] });
|
|
2252
2149
|
}
|
|
2253
2150
|
);
|
|
2254
2151
|
Input.displayName = "Input";
|
|
2255
2152
|
|
|
2256
2153
|
// src/components/ui/date-picker.tsx
|
|
2257
|
-
import { jsx as
|
|
2154
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2258
2155
|
var getDayNames = () => {
|
|
2259
2156
|
const days = [];
|
|
2260
2157
|
for (let i = 0; i < 7; i++) {
|
|
@@ -2290,7 +2187,7 @@ var formatDateInput = (date) => {
|
|
|
2290
2187
|
day: "2-digit"
|
|
2291
2188
|
});
|
|
2292
2189
|
};
|
|
2293
|
-
var DatePicker =
|
|
2190
|
+
var DatePicker = React5.forwardRef(
|
|
2294
2191
|
({
|
|
2295
2192
|
value,
|
|
2296
2193
|
onValueChange,
|
|
@@ -2309,19 +2206,19 @@ var DatePicker = React6.forwardRef(
|
|
|
2309
2206
|
if (isNaN(parsed.getTime())) return void 0;
|
|
2310
2207
|
return parsed;
|
|
2311
2208
|
};
|
|
2312
|
-
const [selectedDate, setSelectedDate] =
|
|
2209
|
+
const [selectedDate, setSelectedDate] = React5.useState(
|
|
2313
2210
|
value || parseDate(defaultValue)
|
|
2314
2211
|
);
|
|
2315
|
-
const [currentMonth, setCurrentMonth] =
|
|
2212
|
+
const [currentMonth, setCurrentMonth] = React5.useState(() => {
|
|
2316
2213
|
const date = value || parseDate(defaultValue) || /* @__PURE__ */ new Date();
|
|
2317
2214
|
return new Date(date.getFullYear(), date.getMonth());
|
|
2318
2215
|
});
|
|
2319
|
-
const [open, setOpen] =
|
|
2320
|
-
const [inputValue, setInputValue] =
|
|
2216
|
+
const [open, setOpen] = React5.useState(false);
|
|
2217
|
+
const [inputValue, setInputValue] = React5.useState(() => {
|
|
2321
2218
|
const initialDate = value || parseDate(defaultValue);
|
|
2322
2219
|
return initialDate ? formatDateInput(initialDate) : "";
|
|
2323
2220
|
});
|
|
2324
|
-
|
|
2221
|
+
React5.useEffect(() => {
|
|
2325
2222
|
setSelectedDate(value);
|
|
2326
2223
|
if (value) {
|
|
2327
2224
|
setCurrentMonth(new Date(value.getFullYear(), value.getMonth()));
|
|
@@ -2332,7 +2229,7 @@ var DatePicker = React6.forwardRef(
|
|
|
2332
2229
|
setInputValue("");
|
|
2333
2230
|
}
|
|
2334
2231
|
}, [value]);
|
|
2335
|
-
|
|
2232
|
+
React5.useEffect(() => {
|
|
2336
2233
|
if (value) return;
|
|
2337
2234
|
const parsedDefault = parseDate(defaultValue);
|
|
2338
2235
|
if (!parsedDefault) return;
|
|
@@ -2455,14 +2352,14 @@ var DatePicker = React6.forwardRef(
|
|
|
2455
2352
|
const months = getMonthNames();
|
|
2456
2353
|
const dayNames = getDayNames();
|
|
2457
2354
|
const years = generateYears();
|
|
2458
|
-
return /* @__PURE__ */
|
|
2355
|
+
return /* @__PURE__ */ jsxs6(
|
|
2459
2356
|
PopoverPrimitive.Root,
|
|
2460
2357
|
{
|
|
2461
2358
|
open: disabled ? false : open,
|
|
2462
2359
|
onOpenChange: disabled ? void 0 : setOpen,
|
|
2463
2360
|
children: [
|
|
2464
|
-
/* @__PURE__ */
|
|
2465
|
-
/* @__PURE__ */
|
|
2361
|
+
/* @__PURE__ */ jsxs6("div", { className: "relative", children: [
|
|
2362
|
+
/* @__PURE__ */ jsx8(
|
|
2466
2363
|
Input,
|
|
2467
2364
|
{
|
|
2468
2365
|
ref,
|
|
@@ -2475,7 +2372,7 @@ var DatePicker = React6.forwardRef(
|
|
|
2475
2372
|
...props
|
|
2476
2373
|
}
|
|
2477
2374
|
),
|
|
2478
|
-
/* @__PURE__ */
|
|
2375
|
+
/* @__PURE__ */ jsx8(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx8("button", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 hover:bg-gray rounded p-0.5 transition-colors", children: /* @__PURE__ */ jsx8(
|
|
2479
2376
|
Calendar,
|
|
2480
2377
|
{
|
|
2481
2378
|
className: cn(
|
|
@@ -2485,7 +2382,7 @@ var DatePicker = React6.forwardRef(
|
|
|
2485
2382
|
}
|
|
2486
2383
|
) }) })
|
|
2487
2384
|
] }),
|
|
2488
|
-
/* @__PURE__ */
|
|
2385
|
+
/* @__PURE__ */ jsx8(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx8(
|
|
2489
2386
|
PopoverPrimitive.Content,
|
|
2490
2387
|
{
|
|
2491
2388
|
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",
|
|
@@ -2494,51 +2391,51 @@ var DatePicker = React6.forwardRef(
|
|
|
2494
2391
|
alignOffset: -12,
|
|
2495
2392
|
side: "bottom",
|
|
2496
2393
|
sticky: "always",
|
|
2497
|
-
children: /* @__PURE__ */
|
|
2498
|
-
/* @__PURE__ */
|
|
2499
|
-
/* @__PURE__ */
|
|
2394
|
+
children: /* @__PURE__ */ jsxs6("div", { className: "p-4", children: [
|
|
2395
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between mb-4 gap-1", children: [
|
|
2396
|
+
/* @__PURE__ */ jsx8(
|
|
2500
2397
|
"button",
|
|
2501
2398
|
{
|
|
2502
2399
|
onClick: () => handleMonthChange("prev"),
|
|
2503
2400
|
className: "p-1 hover:bg-gray rounded transition-colors flex-shrink-0",
|
|
2504
|
-
children: /* @__PURE__ */
|
|
2401
|
+
children: /* @__PURE__ */ jsx8(ChevronLeft, { className: "h-4 w-4" })
|
|
2505
2402
|
}
|
|
2506
2403
|
),
|
|
2507
|
-
/* @__PURE__ */
|
|
2508
|
-
/* @__PURE__ */
|
|
2404
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex gap-1 flex-1 min-w-0", children: [
|
|
2405
|
+
/* @__PURE__ */ jsxs6(
|
|
2509
2406
|
Select,
|
|
2510
2407
|
{
|
|
2511
2408
|
value: currentMonth.getMonth().toString(),
|
|
2512
2409
|
onValueChange: handleMonthSelect,
|
|
2513
2410
|
children: [
|
|
2514
|
-
/* @__PURE__ */
|
|
2515
|
-
/* @__PURE__ */
|
|
2411
|
+
/* @__PURE__ */ jsx8(SelectTrigger, { className: "min-w-fit h-8 text-sm", children: /* @__PURE__ */ jsx8(SelectValue, {}) }),
|
|
2412
|
+
/* @__PURE__ */ jsx8(SelectContent, { children: months.map((month, index) => /* @__PURE__ */ jsx8(SelectItem, { value: index.toString(), children: month }, month)) })
|
|
2516
2413
|
]
|
|
2517
2414
|
}
|
|
2518
2415
|
),
|
|
2519
|
-
/* @__PURE__ */
|
|
2416
|
+
/* @__PURE__ */ jsxs6(
|
|
2520
2417
|
Select,
|
|
2521
2418
|
{
|
|
2522
2419
|
value: currentMonth.getFullYear().toString(),
|
|
2523
2420
|
onValueChange: handleYearSelect,
|
|
2524
2421
|
children: [
|
|
2525
|
-
/* @__PURE__ */
|
|
2526
|
-
/* @__PURE__ */
|
|
2422
|
+
/* @__PURE__ */ jsx8(SelectTrigger, { className: "min-w-fit h-8 text-sm", children: /* @__PURE__ */ jsx8(SelectValue, {}) }),
|
|
2423
|
+
/* @__PURE__ */ jsx8(SelectContent, { children: years.map((year) => /* @__PURE__ */ jsx8(SelectItem, { value: year.toString(), children: year }, year)) })
|
|
2527
2424
|
]
|
|
2528
2425
|
}
|
|
2529
2426
|
)
|
|
2530
2427
|
] }),
|
|
2531
|
-
/* @__PURE__ */
|
|
2428
|
+
/* @__PURE__ */ jsx8(
|
|
2532
2429
|
"button",
|
|
2533
2430
|
{
|
|
2534
2431
|
onClick: () => handleMonthChange("next"),
|
|
2535
2432
|
className: "p-1 hover:bg-gray rounded transition-colors flex-shrink-0",
|
|
2536
|
-
children: /* @__PURE__ */
|
|
2433
|
+
children: /* @__PURE__ */ jsx8(ChevronRight, { className: "h-4 w-4" })
|
|
2537
2434
|
}
|
|
2538
2435
|
)
|
|
2539
2436
|
] }),
|
|
2540
|
-
/* @__PURE__ */
|
|
2541
|
-
/* @__PURE__ */
|
|
2437
|
+
/* @__PURE__ */ jsxs6("div", { className: "space-y-1", children: [
|
|
2438
|
+
/* @__PURE__ */ jsx8("div", { className: "grid grid-cols-7 gap-1 mb-2", children: dayNames.map((day) => /* @__PURE__ */ jsx8(
|
|
2542
2439
|
Typography,
|
|
2543
2440
|
{
|
|
2544
2441
|
variant: "label-xs-bold",
|
|
@@ -2548,11 +2445,11 @@ var DatePicker = React6.forwardRef(
|
|
|
2548
2445
|
},
|
|
2549
2446
|
day
|
|
2550
2447
|
)) }),
|
|
2551
|
-
/* @__PURE__ */
|
|
2448
|
+
/* @__PURE__ */ jsx8("div", { className: "grid grid-cols-7 gap-1", children: days.map((date, index) => /* @__PURE__ */ jsx8(
|
|
2552
2449
|
"div",
|
|
2553
2450
|
{
|
|
2554
2451
|
className: "h-8 w-8 flex items-center justify-center",
|
|
2555
|
-
children: date && /* @__PURE__ */
|
|
2452
|
+
children: date && /* @__PURE__ */ jsx8(
|
|
2556
2453
|
"button",
|
|
2557
2454
|
{
|
|
2558
2455
|
onClick: () => handleDateSelect(date),
|
|
@@ -2566,7 +2463,7 @@ var DatePicker = React6.forwardRef(
|
|
|
2566
2463
|
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",
|
|
2567
2464
|
isDateDisabled(date) && "text-secondary/40 cursor-not-allowed opacity-50"
|
|
2568
2465
|
),
|
|
2569
|
-
children: /* @__PURE__ */
|
|
2466
|
+
children: /* @__PURE__ */ jsx8(Typography, { variant: "label-sm", as: "span", children: date.getDate() })
|
|
2570
2467
|
}
|
|
2571
2468
|
)
|
|
2572
2469
|
},
|
|
@@ -2584,9 +2481,9 @@ var DatePicker = React6.forwardRef(
|
|
|
2584
2481
|
DatePicker.displayName = "DatePicker";
|
|
2585
2482
|
|
|
2586
2483
|
// src/components/ui/upload.tsx
|
|
2587
|
-
import * as
|
|
2484
|
+
import * as React6 from "react";
|
|
2588
2485
|
import { cva as cva6 } from "class-variance-authority";
|
|
2589
|
-
import { jsx as
|
|
2486
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2590
2487
|
var DEFAULT_MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
2591
2488
|
var uploadVariants = cva6(
|
|
2592
2489
|
"relative flex flex-col items-center justify-center rounded-lg transition-all duration-200 ease-in-out overflow-hidden",
|
|
@@ -2610,7 +2507,7 @@ var uploadVariants = cva6(
|
|
|
2610
2507
|
}
|
|
2611
2508
|
}
|
|
2612
2509
|
);
|
|
2613
|
-
var Upload =
|
|
2510
|
+
var Upload = React6.forwardRef(
|
|
2614
2511
|
({
|
|
2615
2512
|
className,
|
|
2616
2513
|
onFileSelect,
|
|
@@ -2623,8 +2520,8 @@ var Upload = React7.forwardRef(
|
|
|
2623
2520
|
selectedFiles = [],
|
|
2624
2521
|
...props
|
|
2625
2522
|
}, ref) => {
|
|
2626
|
-
const fileInputRef =
|
|
2627
|
-
const [isDragOver, setIsDragOver] =
|
|
2523
|
+
const fileInputRef = React6.useRef(null);
|
|
2524
|
+
const [isDragOver, setIsDragOver] = React6.useState(false);
|
|
2628
2525
|
const getFileTypeDisplay = () => {
|
|
2629
2526
|
const typeMap = {
|
|
2630
2527
|
"application/pdf": "PDF",
|
|
@@ -2688,17 +2585,17 @@ var Upload = React7.forwardRef(
|
|
|
2688
2585
|
const renderContent = () => {
|
|
2689
2586
|
switch (effectiveState) {
|
|
2690
2587
|
case "error":
|
|
2691
|
-
return /* @__PURE__ */
|
|
2588
|
+
return /* @__PURE__ */ jsxs7(
|
|
2692
2589
|
"div",
|
|
2693
2590
|
{
|
|
2694
2591
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
2695
2592
|
style: { gap: "32px" },
|
|
2696
2593
|
children: [
|
|
2697
|
-
/* @__PURE__ */
|
|
2698
|
-
/* @__PURE__ */
|
|
2699
|
-
/* @__PURE__ */
|
|
2594
|
+
/* @__PURE__ */ jsxs7("div", { className: "space-y-4", children: [
|
|
2595
|
+
/* @__PURE__ */ jsx9(Typography, { variant: "heading-sm", children: "Upload fail" }),
|
|
2596
|
+
/* @__PURE__ */ jsx9(Typography, { variant: "body-md", className: "text-error", children: errorMessage })
|
|
2700
2597
|
] }),
|
|
2701
|
-
/* @__PURE__ */
|
|
2598
|
+
/* @__PURE__ */ jsx9(
|
|
2702
2599
|
Button,
|
|
2703
2600
|
{
|
|
2704
2601
|
variant: "destructive",
|
|
@@ -2712,22 +2609,22 @@ var Upload = React7.forwardRef(
|
|
|
2712
2609
|
}
|
|
2713
2610
|
);
|
|
2714
2611
|
case "uploading":
|
|
2715
|
-
return /* @__PURE__ */
|
|
2612
|
+
return /* @__PURE__ */ jsxs7(
|
|
2716
2613
|
"div",
|
|
2717
2614
|
{
|
|
2718
2615
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
2719
2616
|
style: { gap: "32px" },
|
|
2720
2617
|
children: [
|
|
2721
|
-
/* @__PURE__ */
|
|
2722
|
-
/* @__PURE__ */
|
|
2723
|
-
/* @__PURE__ */
|
|
2618
|
+
/* @__PURE__ */ jsx9(Typography, { variant: "heading-sm", className: "text-dark", children: "Uploading files" }),
|
|
2619
|
+
/* @__PURE__ */ jsxs7("div", { className: "w-full max-w-[720px] space-y-2", children: [
|
|
2620
|
+
/* @__PURE__ */ jsx9("div", { className: "w-full bg-gray rounded-full h-2", children: /* @__PURE__ */ jsx9(
|
|
2724
2621
|
"div",
|
|
2725
2622
|
{
|
|
2726
2623
|
className: "bg-canvas-primary h-2 rounded-full transition-all duration-300 ease-in-out",
|
|
2727
2624
|
style: { width: `${progress}%` }
|
|
2728
2625
|
}
|
|
2729
2626
|
) }),
|
|
2730
|
-
/* @__PURE__ */
|
|
2627
|
+
/* @__PURE__ */ jsxs7(
|
|
2731
2628
|
Typography,
|
|
2732
2629
|
{
|
|
2733
2630
|
variant: "body-sm",
|
|
@@ -2743,29 +2640,29 @@ var Upload = React7.forwardRef(
|
|
|
2743
2640
|
}
|
|
2744
2641
|
);
|
|
2745
2642
|
case "success":
|
|
2746
|
-
return /* @__PURE__ */
|
|
2643
|
+
return /* @__PURE__ */ jsx9(
|
|
2747
2644
|
"div",
|
|
2748
2645
|
{
|
|
2749
2646
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
2750
2647
|
style: { gap: "32px" },
|
|
2751
|
-
children: /* @__PURE__ */
|
|
2752
|
-
/* @__PURE__ */
|
|
2753
|
-
selectedFiles.length > 0 && /* @__PURE__ */
|
|
2648
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "space-y-4", children: [
|
|
2649
|
+
/* @__PURE__ */ jsx9(Typography, { variant: "heading-sm", className: "text-success", children: "Upload successful!" }),
|
|
2650
|
+
selectedFiles.length > 0 && /* @__PURE__ */ jsx9("div", { className: "text-center", children: selectedFiles.map((file, index) => /* @__PURE__ */ jsx9(Typography, { variant: "body-sm", children: file.name }, index)) })
|
|
2754
2651
|
] })
|
|
2755
2652
|
}
|
|
2756
2653
|
);
|
|
2757
2654
|
default:
|
|
2758
|
-
return /* @__PURE__ */
|
|
2655
|
+
return /* @__PURE__ */ jsxs7(
|
|
2759
2656
|
"div",
|
|
2760
2657
|
{
|
|
2761
2658
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
2762
2659
|
style: { gap: "32px" },
|
|
2763
2660
|
children: [
|
|
2764
|
-
/* @__PURE__ */
|
|
2765
|
-
/* @__PURE__ */
|
|
2766
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ jsxs7("div", { className: "space-y-4", children: [
|
|
2662
|
+
/* @__PURE__ */ jsx9(Typography, { variant: "heading-sm", className: "text-dark", children: "Drag & drop files here" }),
|
|
2663
|
+
/* @__PURE__ */ jsx9(Typography, { variant: "body-md", className: "text-secondary", children: "or click to browse from your computer" })
|
|
2767
2664
|
] }),
|
|
2768
|
-
/* @__PURE__ */
|
|
2665
|
+
/* @__PURE__ */ jsx9(
|
|
2769
2666
|
Button,
|
|
2770
2667
|
{
|
|
2771
2668
|
variant: "default",
|
|
@@ -2779,10 +2676,10 @@ var Upload = React7.forwardRef(
|
|
|
2779
2676
|
children: "Choose files"
|
|
2780
2677
|
}
|
|
2781
2678
|
),
|
|
2782
|
-
/* @__PURE__ */
|
|
2679
|
+
/* @__PURE__ */ jsxs7(Typography, { variant: "body-sm", className: "text-secondary", children: [
|
|
2783
2680
|
"Supported file: ",
|
|
2784
2681
|
getFileTypeDisplay(),
|
|
2785
|
-
/* @__PURE__ */
|
|
2682
|
+
/* @__PURE__ */ jsx9("br", {}),
|
|
2786
2683
|
"Max: ",
|
|
2787
2684
|
Math.round(maxFileSize / 1024 / 1024),
|
|
2788
2685
|
" MB each"
|
|
@@ -2792,7 +2689,7 @@ var Upload = React7.forwardRef(
|
|
|
2792
2689
|
);
|
|
2793
2690
|
}
|
|
2794
2691
|
};
|
|
2795
|
-
return /* @__PURE__ */
|
|
2692
|
+
return /* @__PURE__ */ jsxs7(
|
|
2796
2693
|
"div",
|
|
2797
2694
|
{
|
|
2798
2695
|
ref,
|
|
@@ -2816,7 +2713,7 @@ var Upload = React7.forwardRef(
|
|
|
2816
2713
|
"aria-disabled": disabled,
|
|
2817
2714
|
...props,
|
|
2818
2715
|
children: [
|
|
2819
|
-
/* @__PURE__ */
|
|
2716
|
+
/* @__PURE__ */ jsx9(
|
|
2820
2717
|
"input",
|
|
2821
2718
|
{
|
|
2822
2719
|
ref: fileInputRef,
|
|
@@ -2836,39 +2733,38 @@ var Upload = React7.forwardRef(
|
|
|
2836
2733
|
Upload.displayName = "Upload";
|
|
2837
2734
|
|
|
2838
2735
|
// src/components/ui/checkbox.tsx
|
|
2839
|
-
import * as
|
|
2736
|
+
import * as React7 from "react";
|
|
2840
2737
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
2841
2738
|
import { cva as cva7 } from "class-variance-authority";
|
|
2842
|
-
import { jsx as
|
|
2739
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
2843
2740
|
var checkboxVariants = cva7(
|
|
2844
|
-
"peer size-4 shrink-0 rounded-[4px] border
|
|
2741
|
+
"peer size-4 shrink-0 rounded-[4px] border bg-light hover:bg-info-subtle transition-colors focus-visible:outline-none focus-visible:border-2 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 border-strong focus-visible:border-interactive aria-invalid:border-error aria-invalid:focus-visible:border-error"
|
|
2845
2742
|
);
|
|
2846
|
-
var Checkbox =
|
|
2743
|
+
var Checkbox = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
2847
2744
|
CheckboxPrimitive.Root,
|
|
2848
2745
|
{
|
|
2849
2746
|
ref,
|
|
2850
2747
|
className: cn(checkboxVariants(), className),
|
|
2851
2748
|
...props,
|
|
2852
|
-
children: /* @__PURE__ */
|
|
2749
|
+
children: /* @__PURE__ */ jsx10(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: /* @__PURE__ */ jsx10(CheckIcon, { variant: "light", className: "size-3" }) })
|
|
2853
2750
|
}
|
|
2854
2751
|
));
|
|
2855
2752
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
2856
2753
|
|
|
2857
2754
|
// src/components/ui/textarea.tsx
|
|
2858
|
-
import * as
|
|
2859
|
-
import { jsx as
|
|
2860
|
-
var Textarea =
|
|
2861
|
-
({ className, style,
|
|
2755
|
+
import * as React8 from "react";
|
|
2756
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
2757
|
+
var Textarea = React8.forwardRef(
|
|
2758
|
+
({ className, style, ...props }, ref) => {
|
|
2862
2759
|
const tokenStyles = {
|
|
2863
2760
|
font: "var(--typography-label-md-regular)",
|
|
2864
2761
|
...style
|
|
2865
2762
|
};
|
|
2866
|
-
return /* @__PURE__ */
|
|
2763
|
+
return /* @__PURE__ */ jsx11(
|
|
2867
2764
|
"textarea",
|
|
2868
2765
|
{
|
|
2869
2766
|
className: cn(
|
|
2870
|
-
"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",
|
|
2871
|
-
error ? "border-error focus-visible:border-2 focus-visible:border-error" : "border-secondary focus-visible:border-2 focus-visible:border-strong disabled:border-secondary",
|
|
2767
|
+
"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 border-secondary focus-visible:border-2 focus-visible:border-strong disabled:border-secondary aria-invalid:border-error aria-invalid:focus-visible:border-error",
|
|
2872
2768
|
className
|
|
2873
2769
|
),
|
|
2874
2770
|
style: tokenStyles,
|
|
@@ -2881,9 +2777,9 @@ var Textarea = React9.forwardRef(
|
|
|
2881
2777
|
Textarea.displayName = "Textarea";
|
|
2882
2778
|
|
|
2883
2779
|
// src/components/ui/badge.tsx
|
|
2884
|
-
import * as
|
|
2780
|
+
import * as React9 from "react";
|
|
2885
2781
|
import { cva as cva8 } from "class-variance-authority";
|
|
2886
|
-
import { jsx as
|
|
2782
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
2887
2783
|
var badgeVariants = cva8(
|
|
2888
2784
|
"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",
|
|
2889
2785
|
{
|
|
@@ -2906,7 +2802,7 @@ var badgeVariants = cva8(
|
|
|
2906
2802
|
function getBadgeTypographyStyles() {
|
|
2907
2803
|
return { font: "var(--typography-label-sm-bold)" };
|
|
2908
2804
|
}
|
|
2909
|
-
var Badge =
|
|
2805
|
+
var Badge = React9.forwardRef(
|
|
2910
2806
|
({ className, variant, style, ...props }, ref) => {
|
|
2911
2807
|
if (!variant) {
|
|
2912
2808
|
return null;
|
|
@@ -2916,7 +2812,7 @@ var Badge = React10.forwardRef(
|
|
|
2916
2812
|
...typographyStyles,
|
|
2917
2813
|
...style
|
|
2918
2814
|
};
|
|
2919
|
-
return /* @__PURE__ */
|
|
2815
|
+
return /* @__PURE__ */ jsx12(
|
|
2920
2816
|
"span",
|
|
2921
2817
|
{
|
|
2922
2818
|
className: cn(
|
|
@@ -2934,9 +2830,9 @@ var Badge = React10.forwardRef(
|
|
|
2934
2830
|
Badge.displayName = "Badge";
|
|
2935
2831
|
|
|
2936
2832
|
// src/components/ui/tabs.tsx
|
|
2937
|
-
import * as
|
|
2833
|
+
import * as React10 from "react";
|
|
2938
2834
|
import { cva as cva9 } from "class-variance-authority";
|
|
2939
|
-
import { jsx as
|
|
2835
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
2940
2836
|
var tabsVariants = cva9(
|
|
2941
2837
|
"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",
|
|
2942
2838
|
{
|
|
@@ -2950,17 +2846,17 @@ var tabsVariants = cva9(
|
|
|
2950
2846
|
}
|
|
2951
2847
|
}
|
|
2952
2848
|
);
|
|
2953
|
-
var TabsContext =
|
|
2849
|
+
var TabsContext = React10.createContext(
|
|
2954
2850
|
void 0
|
|
2955
2851
|
);
|
|
2956
2852
|
function useTabsContext() {
|
|
2957
|
-
const context =
|
|
2853
|
+
const context = React10.useContext(TabsContext);
|
|
2958
2854
|
if (!context) {
|
|
2959
2855
|
throw new Error("Tabs components must be used within a Tabs provider");
|
|
2960
2856
|
}
|
|
2961
2857
|
return context;
|
|
2962
2858
|
}
|
|
2963
|
-
var Tabs =
|
|
2859
|
+
var Tabs = React10.forwardRef((props, ref) => {
|
|
2964
2860
|
const {
|
|
2965
2861
|
className,
|
|
2966
2862
|
value,
|
|
@@ -2969,7 +2865,7 @@ var Tabs = React11.forwardRef((props, ref) => {
|
|
|
2969
2865
|
children,
|
|
2970
2866
|
...restProps
|
|
2971
2867
|
} = props;
|
|
2972
|
-
const contextValue =
|
|
2868
|
+
const contextValue = React10.useMemo(
|
|
2973
2869
|
() => ({
|
|
2974
2870
|
activeTab: value,
|
|
2975
2871
|
setActiveTab: onValueChange,
|
|
@@ -2977,13 +2873,13 @@ var Tabs = React11.forwardRef((props, ref) => {
|
|
|
2977
2873
|
}),
|
|
2978
2874
|
[value, onValueChange, variant]
|
|
2979
2875
|
);
|
|
2980
|
-
return /* @__PURE__ */
|
|
2876
|
+
return /* @__PURE__ */ jsx13(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx13("div", { ref, className: cn("w-full", className), ...restProps, children }) });
|
|
2981
2877
|
});
|
|
2982
2878
|
Tabs.displayName = "Tabs";
|
|
2983
|
-
var TabsList =
|
|
2879
|
+
var TabsList = React10.forwardRef(
|
|
2984
2880
|
(props, ref) => {
|
|
2985
2881
|
const { className, children, ...restProps } = props;
|
|
2986
|
-
return /* @__PURE__ */
|
|
2882
|
+
return /* @__PURE__ */ jsx13(
|
|
2987
2883
|
"div",
|
|
2988
2884
|
{
|
|
2989
2885
|
ref,
|
|
@@ -2999,7 +2895,7 @@ TabsList.displayName = "TabsList";
|
|
|
2999
2895
|
var getTabTypographyStyles = (isActive) => ({
|
|
3000
2896
|
font: isActive ? "var(--typography-label-sm-bold)" : "var(--typography-label-sm-regular)"
|
|
3001
2897
|
});
|
|
3002
|
-
var TabsTrigger =
|
|
2898
|
+
var TabsTrigger = React10.forwardRef(
|
|
3003
2899
|
(props, ref) => {
|
|
3004
2900
|
const { className, value, disabled, style, children, ...restProps } = props;
|
|
3005
2901
|
const { activeTab, setActiveTab, variant } = useTabsContext();
|
|
@@ -3007,22 +2903,22 @@ var TabsTrigger = React11.forwardRef(
|
|
|
3007
2903
|
throw new Error("TabsTrigger must have a value prop");
|
|
3008
2904
|
}
|
|
3009
2905
|
const isActive = activeTab === value;
|
|
3010
|
-
const tokenStyles =
|
|
2906
|
+
const tokenStyles = React10.useMemo(
|
|
3011
2907
|
() => ({
|
|
3012
2908
|
...getTabTypographyStyles(isActive),
|
|
3013
2909
|
...style
|
|
3014
2910
|
}),
|
|
3015
2911
|
[isActive, style]
|
|
3016
2912
|
);
|
|
3017
|
-
const triggerClassName =
|
|
2913
|
+
const triggerClassName = React10.useMemo(
|
|
3018
2914
|
() => cn(tabsVariants({ variant }), className),
|
|
3019
2915
|
[variant, className]
|
|
3020
2916
|
);
|
|
3021
|
-
const handleClick =
|
|
2917
|
+
const handleClick = React10.useCallback(() => {
|
|
3022
2918
|
if (disabled) return;
|
|
3023
2919
|
setActiveTab(value);
|
|
3024
2920
|
}, [disabled, setActiveTab, value]);
|
|
3025
|
-
return /* @__PURE__ */
|
|
2921
|
+
return /* @__PURE__ */ jsx13(
|
|
3026
2922
|
"button",
|
|
3027
2923
|
{
|
|
3028
2924
|
ref,
|
|
@@ -3036,13 +2932,13 @@ var TabsTrigger = React11.forwardRef(
|
|
|
3036
2932
|
disabled,
|
|
3037
2933
|
onClick: handleClick,
|
|
3038
2934
|
...restProps,
|
|
3039
|
-
children: /* @__PURE__ */
|
|
2935
|
+
children: /* @__PURE__ */ jsx13("span", { className: "pl-3 pr-6 py-2", children })
|
|
3040
2936
|
}
|
|
3041
2937
|
);
|
|
3042
2938
|
}
|
|
3043
2939
|
);
|
|
3044
2940
|
TabsTrigger.displayName = "TabsTrigger";
|
|
3045
|
-
var TabsContent =
|
|
2941
|
+
var TabsContent = React10.forwardRef(
|
|
3046
2942
|
(props, ref) => {
|
|
3047
2943
|
const { className, value, children, ...restProps } = props;
|
|
3048
2944
|
const { activeTab } = useTabsContext();
|
|
@@ -3053,7 +2949,7 @@ var TabsContent = React11.forwardRef(
|
|
|
3053
2949
|
if (!isActive) {
|
|
3054
2950
|
return null;
|
|
3055
2951
|
}
|
|
3056
|
-
return /* @__PURE__ */
|
|
2952
|
+
return /* @__PURE__ */ jsx13(
|
|
3057
2953
|
"div",
|
|
3058
2954
|
{
|
|
3059
2955
|
ref,
|
|
@@ -3071,11 +2967,11 @@ var TabsContent = React11.forwardRef(
|
|
|
3071
2967
|
TabsContent.displayName = "TabsContent";
|
|
3072
2968
|
|
|
3073
2969
|
// src/components/ui/dropdown-menu.tsx
|
|
3074
|
-
import * as
|
|
2970
|
+
import * as React11 from "react";
|
|
3075
2971
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3076
|
-
import { jsx as
|
|
2972
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3077
2973
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
3078
|
-
var DropdownMenuTrigger =
|
|
2974
|
+
var DropdownMenuTrigger = React11.forwardRef(({ className, icon, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
3079
2975
|
DropdownMenuPrimitive.Trigger,
|
|
3080
2976
|
{
|
|
3081
2977
|
ref,
|
|
@@ -3085,7 +2981,7 @@ var DropdownMenuTrigger = React12.forwardRef(({ className, icon, children, ...pr
|
|
|
3085
2981
|
),
|
|
3086
2982
|
...props,
|
|
3087
2983
|
children: [
|
|
3088
|
-
icon || /* @__PURE__ */
|
|
2984
|
+
icon || /* @__PURE__ */ jsx14(MoreMenu, { className: "size-4" }),
|
|
3089
2985
|
children
|
|
3090
2986
|
]
|
|
3091
2987
|
}
|
|
@@ -3095,7 +2991,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
|
3095
2991
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
3096
2992
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
3097
2993
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
3098
|
-
var DropdownMenuSubTrigger =
|
|
2994
|
+
var DropdownMenuSubTrigger = React11.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
3099
2995
|
DropdownMenuPrimitive.SubTrigger,
|
|
3100
2996
|
{
|
|
3101
2997
|
ref,
|
|
@@ -3108,12 +3004,12 @@ var DropdownMenuSubTrigger = React12.forwardRef(({ className, inset, children, .
|
|
|
3108
3004
|
...props,
|
|
3109
3005
|
children: [
|
|
3110
3006
|
children,
|
|
3111
|
-
/* @__PURE__ */
|
|
3007
|
+
/* @__PURE__ */ jsx14(ChevronRight, { className: "ml-auto" })
|
|
3112
3008
|
]
|
|
3113
3009
|
}
|
|
3114
3010
|
));
|
|
3115
3011
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
3116
|
-
var DropdownMenuSubContent =
|
|
3012
|
+
var DropdownMenuSubContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
3117
3013
|
DropdownMenuPrimitive.SubContent,
|
|
3118
3014
|
{
|
|
3119
3015
|
ref,
|
|
@@ -3125,7 +3021,7 @@ var DropdownMenuSubContent = React12.forwardRef(({ className, ...props }, ref) =
|
|
|
3125
3021
|
}
|
|
3126
3022
|
));
|
|
3127
3023
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
3128
|
-
var DropdownMenuContent =
|
|
3024
|
+
var DropdownMenuContent = React11.forwardRef(({ className, sideOffset = 4, align = "end", ...props }, ref) => /* @__PURE__ */ jsx14(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx14(
|
|
3129
3025
|
DropdownMenuPrimitive.Content,
|
|
3130
3026
|
{
|
|
3131
3027
|
ref,
|
|
@@ -3139,7 +3035,7 @@ var DropdownMenuContent = React12.forwardRef(({ className, sideOffset = 4, align
|
|
|
3139
3035
|
}
|
|
3140
3036
|
) }));
|
|
3141
3037
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
3142
|
-
var DropdownMenuItem =
|
|
3038
|
+
var DropdownMenuItem = React11.forwardRef(({ className, inset, style, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
3143
3039
|
DropdownMenuPrimitive.Item,
|
|
3144
3040
|
{
|
|
3145
3041
|
ref,
|
|
@@ -3156,7 +3052,7 @@ var DropdownMenuItem = React12.forwardRef(({ className, inset, style, ...props }
|
|
|
3156
3052
|
}
|
|
3157
3053
|
));
|
|
3158
3054
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
3159
|
-
var DropdownMenuCheckboxItem =
|
|
3055
|
+
var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, style, checked, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
3160
3056
|
DropdownMenuPrimitive.CheckboxItem,
|
|
3161
3057
|
{
|
|
3162
3058
|
ref,
|
|
@@ -3171,7 +3067,7 @@ var DropdownMenuCheckboxItem = React12.forwardRef(({ className, children, style,
|
|
|
3171
3067
|
},
|
|
3172
3068
|
...props,
|
|
3173
3069
|
children: [
|
|
3174
|
-
/* @__PURE__ */
|
|
3070
|
+
/* @__PURE__ */ jsx14(
|
|
3175
3071
|
Checkbox,
|
|
3176
3072
|
{
|
|
3177
3073
|
checked: checked === true,
|
|
@@ -3179,12 +3075,12 @@ var DropdownMenuCheckboxItem = React12.forwardRef(({ className, children, style,
|
|
|
3179
3075
|
"aria-hidden": "true"
|
|
3180
3076
|
}
|
|
3181
3077
|
),
|
|
3182
|
-
/* @__PURE__ */
|
|
3078
|
+
/* @__PURE__ */ jsx14("span", { className: "flex-1", children })
|
|
3183
3079
|
]
|
|
3184
3080
|
}
|
|
3185
3081
|
));
|
|
3186
3082
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
3187
|
-
var DropdownMenuRadioItem =
|
|
3083
|
+
var DropdownMenuRadioItem = React11.forwardRef(({ className, children, style, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
3188
3084
|
DropdownMenuPrimitive.RadioItem,
|
|
3189
3085
|
{
|
|
3190
3086
|
ref,
|
|
@@ -3198,13 +3094,13 @@ var DropdownMenuRadioItem = React12.forwardRef(({ className, children, style, ..
|
|
|
3198
3094
|
},
|
|
3199
3095
|
...props,
|
|
3200
3096
|
children: [
|
|
3201
|
-
/* @__PURE__ */
|
|
3097
|
+
/* @__PURE__ */ jsx14("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx14(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx14("span", { className: "h-2 w-2 rounded-full bg-current" }) }) }),
|
|
3202
3098
|
children
|
|
3203
3099
|
]
|
|
3204
3100
|
}
|
|
3205
3101
|
));
|
|
3206
3102
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
3207
|
-
var DropdownMenuLabel =
|
|
3103
|
+
var DropdownMenuLabel = React11.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
3208
3104
|
DropdownMenuPrimitive.Label,
|
|
3209
3105
|
{
|
|
3210
3106
|
ref,
|
|
@@ -3217,7 +3113,7 @@ var DropdownMenuLabel = React12.forwardRef(({ className, inset, ...props }, ref)
|
|
|
3217
3113
|
}
|
|
3218
3114
|
));
|
|
3219
3115
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
3220
|
-
var DropdownMenuSeparator =
|
|
3116
|
+
var DropdownMenuSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
3221
3117
|
DropdownMenuPrimitive.Separator,
|
|
3222
3118
|
{
|
|
3223
3119
|
ref,
|
|
@@ -3230,7 +3126,7 @@ var DropdownMenuShortcut = ({
|
|
|
3230
3126
|
className,
|
|
3231
3127
|
...props
|
|
3232
3128
|
}) => {
|
|
3233
|
-
return /* @__PURE__ */
|
|
3129
|
+
return /* @__PURE__ */ jsx14(
|
|
3234
3130
|
"span",
|
|
3235
3131
|
{
|
|
3236
3132
|
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
@@ -3241,21 +3137,21 @@ var DropdownMenuShortcut = ({
|
|
|
3241
3137
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
3242
3138
|
|
|
3243
3139
|
// src/components/ui/charts/chart-legend.tsx
|
|
3244
|
-
import { jsx as
|
|
3140
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3245
3141
|
function ChartLegend({
|
|
3246
3142
|
items,
|
|
3247
3143
|
x = 0,
|
|
3248
3144
|
y = 550,
|
|
3249
3145
|
className = ""
|
|
3250
3146
|
}) {
|
|
3251
|
-
return /* @__PURE__ */
|
|
3147
|
+
return /* @__PURE__ */ jsx15("foreignObject", { x, y, width: "100%", height: "40", children: /* @__PURE__ */ jsx15(
|
|
3252
3148
|
"div",
|
|
3253
3149
|
{
|
|
3254
3150
|
className: `flex justify-center items-center gap-6 ${className}`,
|
|
3255
3151
|
style: { height: "100%" },
|
|
3256
|
-
children: items.map(({ key, color, label }) => /* @__PURE__ */
|
|
3257
|
-
/* @__PURE__ */
|
|
3258
|
-
/* @__PURE__ */
|
|
3152
|
+
children: items.map(({ key, color, label }) => /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
|
|
3153
|
+
/* @__PURE__ */ jsx15("div", { className: "w-3 h-3", style: { backgroundColor: color } }),
|
|
3154
|
+
/* @__PURE__ */ jsx15(Typography, { variant: "body-xs", children: label || key })
|
|
3259
3155
|
] }, key))
|
|
3260
3156
|
}
|
|
3261
3157
|
) });
|
|
@@ -3373,12 +3269,12 @@ var formatLargeNumber = (value) => {
|
|
|
3373
3269
|
};
|
|
3374
3270
|
|
|
3375
3271
|
// src/components/ui/charts/chart-labels.tsx
|
|
3376
|
-
import { jsx as
|
|
3272
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
3377
3273
|
var createCustomXAxisLabel = (text, yOffset = 40) => {
|
|
3378
3274
|
const CustomXAxisLabel = ({ viewBox }) => {
|
|
3379
3275
|
if (!viewBox) return null;
|
|
3380
3276
|
const { x, y, width } = viewBox;
|
|
3381
|
-
return /* @__PURE__ */
|
|
3277
|
+
return /* @__PURE__ */ jsx16("g", { children: /* @__PURE__ */ jsx16("foreignObject", { x, y: y + yOffset, width, height: 20, children: /* @__PURE__ */ jsx16("div", { className: "flex justify-center w-full", children: /* @__PURE__ */ jsx16(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
|
|
3382
3278
|
};
|
|
3383
3279
|
CustomXAxisLabel.displayName = "CustomXAxisLabel";
|
|
3384
3280
|
return CustomXAxisLabel;
|
|
@@ -3388,7 +3284,7 @@ var createCustomYAxisLabel = (text, leftMargin) => {
|
|
|
3388
3284
|
if (!viewBox) return null;
|
|
3389
3285
|
const { x, y, height } = viewBox;
|
|
3390
3286
|
const offset = leftMargin ? leftMargin + 10 : 110;
|
|
3391
|
-
return /* @__PURE__ */
|
|
3287
|
+
return /* @__PURE__ */ jsx16("g", { children: /* @__PURE__ */ jsx16("foreignObject", { x: x - offset, y, width: 100, height, children: /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center h-full transform -rotate-90 whitespace-nowrap", children: /* @__PURE__ */ jsx16(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
|
|
3392
3288
|
};
|
|
3393
3289
|
CustomYAxisLabel.displayName = "CustomYAxisLabel";
|
|
3394
3290
|
return CustomYAxisLabel;
|
|
@@ -3397,14 +3293,14 @@ var createCustomYAxisRightLabel = (text) => {
|
|
|
3397
3293
|
const CustomYAxisRightLabel = ({ viewBox }) => {
|
|
3398
3294
|
if (!viewBox) return null;
|
|
3399
3295
|
const { x, y, width, height } = viewBox;
|
|
3400
|
-
return /* @__PURE__ */
|
|
3296
|
+
return /* @__PURE__ */ jsx16("g", { children: /* @__PURE__ */ jsx16("foreignObject", { x: x + width - 70, y, width: 120, height, children: /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center h-full transform rotate-90 whitespace-nowrap", children: /* @__PURE__ */ jsx16(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
|
|
3401
3297
|
};
|
|
3402
3298
|
CustomYAxisRightLabel.displayName = "CustomYAxisRightLabel";
|
|
3403
3299
|
return CustomYAxisRightLabel;
|
|
3404
3300
|
};
|
|
3405
3301
|
var customXAxisTick = (props) => {
|
|
3406
3302
|
const { x, y, payload } = props;
|
|
3407
|
-
return /* @__PURE__ */
|
|
3303
|
+
return /* @__PURE__ */ jsx16("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx16(
|
|
3408
3304
|
"foreignObject",
|
|
3409
3305
|
{
|
|
3410
3306
|
x: -20,
|
|
@@ -3412,12 +3308,12 @@ var customXAxisTick = (props) => {
|
|
|
3412
3308
|
width: 40,
|
|
3413
3309
|
height: 20,
|
|
3414
3310
|
style: { overflow: "visible" },
|
|
3415
|
-
children: /* @__PURE__ */
|
|
3311
|
+
children: /* @__PURE__ */ jsx16(
|
|
3416
3312
|
"div",
|
|
3417
3313
|
{
|
|
3418
3314
|
className: "flex items-start justify-center h-full",
|
|
3419
3315
|
style: { overflow: "visible" },
|
|
3420
|
-
children: /* @__PURE__ */
|
|
3316
|
+
children: /* @__PURE__ */ jsx16(
|
|
3421
3317
|
Typography,
|
|
3422
3318
|
{
|
|
3423
3319
|
variant: "body-xs",
|
|
@@ -3432,7 +3328,7 @@ var customXAxisTick = (props) => {
|
|
|
3432
3328
|
};
|
|
3433
3329
|
var customXAxisTickRotated = (props) => {
|
|
3434
3330
|
const { x, y, payload } = props;
|
|
3435
|
-
return /* @__PURE__ */
|
|
3331
|
+
return /* @__PURE__ */ jsx16("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx16(
|
|
3436
3332
|
"text",
|
|
3437
3333
|
{
|
|
3438
3334
|
x: 0,
|
|
@@ -3451,25 +3347,25 @@ var customYAxisTick = (props) => {
|
|
|
3451
3347
|
const { x, y, payload } = props;
|
|
3452
3348
|
const text = String(payload.value);
|
|
3453
3349
|
const estimatedWidth = Math.max(text.length * 8, 80);
|
|
3454
|
-
return /* @__PURE__ */
|
|
3350
|
+
return /* @__PURE__ */ jsx16(
|
|
3455
3351
|
"foreignObject",
|
|
3456
3352
|
{
|
|
3457
3353
|
x: x - estimatedWidth + 5,
|
|
3458
3354
|
y: y - 6,
|
|
3459
3355
|
width: estimatedWidth,
|
|
3460
3356
|
height: 15,
|
|
3461
|
-
children: /* @__PURE__ */
|
|
3357
|
+
children: /* @__PURE__ */ jsx16("div", { className: "flex justify-end w-full", children: /* @__PURE__ */ jsx16(Typography, { variant: "body-xs", className: "text-secondary", children: payload.value }) })
|
|
3462
3358
|
}
|
|
3463
3359
|
);
|
|
3464
3360
|
};
|
|
3465
3361
|
|
|
3466
3362
|
// src/components/ui/charts/chart-tooltip.tsx
|
|
3467
|
-
import { Fragment, jsx as
|
|
3363
|
+
import { Fragment, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3468
3364
|
function TooltipContainer({
|
|
3469
3365
|
children,
|
|
3470
3366
|
className = ""
|
|
3471
3367
|
}) {
|
|
3472
|
-
return /* @__PURE__ */
|
|
3368
|
+
return /* @__PURE__ */ jsx17(
|
|
3473
3369
|
"div",
|
|
3474
3370
|
{
|
|
3475
3371
|
className: `bg-light border border-subtle rounded p-2.5 text-dark ${className}`,
|
|
@@ -3483,10 +3379,10 @@ function TooltipItem({
|
|
|
3483
3379
|
value,
|
|
3484
3380
|
className = ""
|
|
3485
3381
|
}) {
|
|
3486
|
-
return /* @__PURE__ */
|
|
3487
|
-
/* @__PURE__ */
|
|
3488
|
-
/* @__PURE__ */
|
|
3489
|
-
/* @__PURE__ */
|
|
3382
|
+
return /* @__PURE__ */ jsxs10(Fragment, { children: [
|
|
3383
|
+
/* @__PURE__ */ jsx17("br", {}),
|
|
3384
|
+
/* @__PURE__ */ jsxs10(Typography, { variant: "label-sm", className, children: [
|
|
3385
|
+
/* @__PURE__ */ jsx17(
|
|
3490
3386
|
"span",
|
|
3491
3387
|
{
|
|
3492
3388
|
className: "inline-block w-3 h-3 mr-1.5",
|
|
@@ -3504,9 +3400,9 @@ function GenericTooltip({
|
|
|
3504
3400
|
items,
|
|
3505
3401
|
className = ""
|
|
3506
3402
|
}) {
|
|
3507
|
-
return /* @__PURE__ */
|
|
3508
|
-
title && /* @__PURE__ */
|
|
3509
|
-
items.map((item, index) => /* @__PURE__ */
|
|
3403
|
+
return /* @__PURE__ */ jsxs10(TooltipContainer, { className, children: [
|
|
3404
|
+
title && /* @__PURE__ */ jsx17(Typography, { variant: "label-sm-bold", children: title }),
|
|
3405
|
+
items.map((item, index) => /* @__PURE__ */ jsx17(
|
|
3510
3406
|
TooltipItem,
|
|
3511
3407
|
{
|
|
3512
3408
|
color: item.color,
|
|
@@ -3519,7 +3415,7 @@ function GenericTooltip({
|
|
|
3519
3415
|
}
|
|
3520
3416
|
|
|
3521
3417
|
// src/components/ui/charts/bar-chart.tsx
|
|
3522
|
-
import { forwardRef as
|
|
3418
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
3523
3419
|
import {
|
|
3524
3420
|
BarChart as RechartsBarChart,
|
|
3525
3421
|
Bar,
|
|
@@ -3528,8 +3424,8 @@ import {
|
|
|
3528
3424
|
Tooltip,
|
|
3529
3425
|
ResponsiveContainer
|
|
3530
3426
|
} from "recharts";
|
|
3531
|
-
import { jsx as
|
|
3532
|
-
var BarChart =
|
|
3427
|
+
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3428
|
+
var BarChart = forwardRef12(
|
|
3533
3429
|
({
|
|
3534
3430
|
data,
|
|
3535
3431
|
xAxisKey,
|
|
@@ -3555,19 +3451,19 @@ var BarChart = forwardRef13(
|
|
|
3555
3451
|
};
|
|
3556
3452
|
const defaultLegendItems = showLegend && legendItems.length === 0 ? [{ key: yAxisKey, color: barColor, label: yAxisKey }] : legendItems;
|
|
3557
3453
|
const hasData = data && data.length > 0;
|
|
3558
|
-
return /* @__PURE__ */
|
|
3454
|
+
return /* @__PURE__ */ jsxs11(
|
|
3559
3455
|
"div",
|
|
3560
3456
|
{
|
|
3561
3457
|
ref,
|
|
3562
3458
|
className: `bg-light border border-subtle mx-6 ${className}`,
|
|
3563
3459
|
children: [
|
|
3564
|
-
/* @__PURE__ */
|
|
3565
|
-
/* @__PURE__ */
|
|
3460
|
+
/* @__PURE__ */ jsx18("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx18(Typography, { variant: "label-sm-bold", children: title }) }),
|
|
3461
|
+
/* @__PURE__ */ jsx18("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx18(
|
|
3566
3462
|
ResponsiveContainer,
|
|
3567
3463
|
{
|
|
3568
3464
|
width: "100%",
|
|
3569
3465
|
height: CHART_CONSTANTS.STANDARD_HEIGHT,
|
|
3570
|
-
children: /* @__PURE__ */
|
|
3466
|
+
children: /* @__PURE__ */ jsxs11(
|
|
3571
3467
|
RechartsBarChart,
|
|
3572
3468
|
{
|
|
3573
3469
|
data,
|
|
@@ -3579,7 +3475,7 @@ var BarChart = forwardRef13(
|
|
|
3579
3475
|
onClick: handleClick,
|
|
3580
3476
|
layout,
|
|
3581
3477
|
children: [
|
|
3582
|
-
/* @__PURE__ */
|
|
3478
|
+
/* @__PURE__ */ jsx18(
|
|
3583
3479
|
XAxis,
|
|
3584
3480
|
{
|
|
3585
3481
|
dataKey: xAxisKey,
|
|
@@ -3593,7 +3489,7 @@ var BarChart = forwardRef13(
|
|
|
3593
3489
|
label: xAxisLabel ? createCustomXAxisLabel(xAxisLabel, 80) : void 0
|
|
3594
3490
|
}
|
|
3595
3491
|
),
|
|
3596
|
-
/* @__PURE__ */
|
|
3492
|
+
/* @__PURE__ */ jsx18(
|
|
3597
3493
|
YAxis,
|
|
3598
3494
|
{
|
|
3599
3495
|
axisLine: false,
|
|
@@ -3604,7 +3500,7 @@ var BarChart = forwardRef13(
|
|
|
3604
3500
|
type: yAxisType
|
|
3605
3501
|
}
|
|
3606
3502
|
),
|
|
3607
|
-
/* @__PURE__ */
|
|
3503
|
+
/* @__PURE__ */ jsx18(
|
|
3608
3504
|
Tooltip,
|
|
3609
3505
|
{
|
|
3610
3506
|
content: ({
|
|
@@ -3613,7 +3509,7 @@ var BarChart = forwardRef13(
|
|
|
3613
3509
|
label
|
|
3614
3510
|
}) => {
|
|
3615
3511
|
if (active && payload && payload.length) {
|
|
3616
|
-
return /* @__PURE__ */
|
|
3512
|
+
return /* @__PURE__ */ jsx18(
|
|
3617
3513
|
GenericTooltip,
|
|
3618
3514
|
{
|
|
3619
3515
|
title: label?.toString(),
|
|
@@ -3629,7 +3525,7 @@ var BarChart = forwardRef13(
|
|
|
3629
3525
|
}
|
|
3630
3526
|
}
|
|
3631
3527
|
),
|
|
3632
|
-
/* @__PURE__ */
|
|
3528
|
+
/* @__PURE__ */ jsx18(
|
|
3633
3529
|
Bar,
|
|
3634
3530
|
{
|
|
3635
3531
|
dataKey: barDataKey || yAxisKey,
|
|
@@ -3637,12 +3533,12 @@ var BarChart = forwardRef13(
|
|
|
3637
3533
|
name: barDataKey || yAxisKey
|
|
3638
3534
|
}
|
|
3639
3535
|
),
|
|
3640
|
-
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */
|
|
3536
|
+
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx18(ChartLegend, { items: defaultLegendItems })
|
|
3641
3537
|
]
|
|
3642
3538
|
}
|
|
3643
3539
|
)
|
|
3644
3540
|
}
|
|
3645
|
-
) : /* @__PURE__ */
|
|
3541
|
+
) : /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx18(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
|
|
3646
3542
|
]
|
|
3647
3543
|
}
|
|
3648
3544
|
);
|
|
@@ -3651,7 +3547,7 @@ var BarChart = forwardRef13(
|
|
|
3651
3547
|
BarChart.displayName = "BarChart";
|
|
3652
3548
|
|
|
3653
3549
|
// src/components/ui/charts/line-chart.tsx
|
|
3654
|
-
import { forwardRef as
|
|
3550
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
3655
3551
|
import {
|
|
3656
3552
|
LineChart as RechartsLineChart,
|
|
3657
3553
|
Line,
|
|
@@ -3660,8 +3556,8 @@ import {
|
|
|
3660
3556
|
Tooltip as Tooltip2,
|
|
3661
3557
|
ResponsiveContainer as ResponsiveContainer2
|
|
3662
3558
|
} from "recharts";
|
|
3663
|
-
import { jsx as
|
|
3664
|
-
var LineChart =
|
|
3559
|
+
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3560
|
+
var LineChart = forwardRef13(
|
|
3665
3561
|
({
|
|
3666
3562
|
data,
|
|
3667
3563
|
xAxisKey,
|
|
@@ -3689,19 +3585,19 @@ var LineChart = forwardRef14(
|
|
|
3689
3585
|
)
|
|
3690
3586
|
);
|
|
3691
3587
|
const hasData = data && data.length > 0;
|
|
3692
|
-
return /* @__PURE__ */
|
|
3588
|
+
return /* @__PURE__ */ jsxs12(
|
|
3693
3589
|
"div",
|
|
3694
3590
|
{
|
|
3695
3591
|
ref,
|
|
3696
3592
|
className: `bg-light border border-subtle mx-6 ${className}`,
|
|
3697
3593
|
children: [
|
|
3698
|
-
/* @__PURE__ */
|
|
3699
|
-
/* @__PURE__ */
|
|
3594
|
+
/* @__PURE__ */ jsx19("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx19(Typography, { variant: "label-sm-bold", children: title }) }),
|
|
3595
|
+
/* @__PURE__ */ jsx19("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx19(
|
|
3700
3596
|
ResponsiveContainer2,
|
|
3701
3597
|
{
|
|
3702
3598
|
width: "100%",
|
|
3703
3599
|
height: CHART_CONSTANTS.STANDARD_HEIGHT,
|
|
3704
|
-
children: /* @__PURE__ */
|
|
3600
|
+
children: /* @__PURE__ */ jsxs12(
|
|
3705
3601
|
RechartsLineChart,
|
|
3706
3602
|
{
|
|
3707
3603
|
data,
|
|
@@ -3712,7 +3608,7 @@ var LineChart = forwardRef14(
|
|
|
3712
3608
|
},
|
|
3713
3609
|
onClick: handleClick,
|
|
3714
3610
|
children: [
|
|
3715
|
-
/* @__PURE__ */
|
|
3611
|
+
/* @__PURE__ */ jsx19(
|
|
3716
3612
|
XAxis2,
|
|
3717
3613
|
{
|
|
3718
3614
|
dataKey: xAxisKey,
|
|
@@ -3724,7 +3620,7 @@ var LineChart = forwardRef14(
|
|
|
3724
3620
|
label: xAxisLabel ? createCustomXAxisLabel(xAxisLabel) : void 0
|
|
3725
3621
|
}
|
|
3726
3622
|
),
|
|
3727
|
-
/* @__PURE__ */
|
|
3623
|
+
/* @__PURE__ */ jsx19(
|
|
3728
3624
|
YAxis2,
|
|
3729
3625
|
{
|
|
3730
3626
|
axisLine: false,
|
|
@@ -3733,7 +3629,7 @@ var LineChart = forwardRef14(
|
|
|
3733
3629
|
label: yAxisLabel ? createCustomYAxisLabel(yAxisLabel, 40) : void 0
|
|
3734
3630
|
}
|
|
3735
3631
|
),
|
|
3736
|
-
/* @__PURE__ */
|
|
3632
|
+
/* @__PURE__ */ jsx19(
|
|
3737
3633
|
Tooltip2,
|
|
3738
3634
|
{
|
|
3739
3635
|
content: ({
|
|
@@ -3742,7 +3638,7 @@ var LineChart = forwardRef14(
|
|
|
3742
3638
|
label
|
|
3743
3639
|
}) => {
|
|
3744
3640
|
if (active && payload && payload.length) {
|
|
3745
|
-
return /* @__PURE__ */
|
|
3641
|
+
return /* @__PURE__ */ jsx19(
|
|
3746
3642
|
GenericTooltip,
|
|
3747
3643
|
{
|
|
3748
3644
|
title: label?.toString(),
|
|
@@ -3758,7 +3654,7 @@ var LineChart = forwardRef14(
|
|
|
3758
3654
|
}
|
|
3759
3655
|
}
|
|
3760
3656
|
),
|
|
3761
|
-
series.map((s, index) => /* @__PURE__ */
|
|
3657
|
+
series.map((s, index) => /* @__PURE__ */ jsx19(
|
|
3762
3658
|
Line,
|
|
3763
3659
|
{
|
|
3764
3660
|
type: "monotone",
|
|
@@ -3770,12 +3666,12 @@ var LineChart = forwardRef14(
|
|
|
3770
3666
|
},
|
|
3771
3667
|
s.dataKey
|
|
3772
3668
|
)),
|
|
3773
|
-
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */
|
|
3669
|
+
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx19(ChartLegend, { items: defaultLegendItems })
|
|
3774
3670
|
]
|
|
3775
3671
|
}
|
|
3776
3672
|
)
|
|
3777
3673
|
}
|
|
3778
|
-
) : /* @__PURE__ */
|
|
3674
|
+
) : /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx19(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
|
|
3779
3675
|
]
|
|
3780
3676
|
}
|
|
3781
3677
|
);
|
|
@@ -3784,10 +3680,10 @@ var LineChart = forwardRef14(
|
|
|
3784
3680
|
LineChart.displayName = "LineChart";
|
|
3785
3681
|
|
|
3786
3682
|
// src/components/ui/charts/pie-chart.tsx
|
|
3787
|
-
import { forwardRef as
|
|
3683
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
3788
3684
|
import { PieChart as RechartsPieChart, Pie, Cell, Tooltip as Tooltip3 } from "recharts";
|
|
3789
|
-
import { jsx as
|
|
3790
|
-
var PieChart =
|
|
3685
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3686
|
+
var PieChart = forwardRef14(
|
|
3791
3687
|
({
|
|
3792
3688
|
data,
|
|
3793
3689
|
title,
|
|
@@ -3814,20 +3710,20 @@ var PieChart = forwardRef15(
|
|
|
3814
3710
|
)
|
|
3815
3711
|
);
|
|
3816
3712
|
const hasData = data && data.length > 0;
|
|
3817
|
-
return /* @__PURE__ */
|
|
3713
|
+
return /* @__PURE__ */ jsxs13(
|
|
3818
3714
|
"div",
|
|
3819
3715
|
{
|
|
3820
3716
|
ref,
|
|
3821
3717
|
className: `bg-light border border-subtle mx-6 ${className}`,
|
|
3822
3718
|
children: [
|
|
3823
|
-
/* @__PURE__ */
|
|
3824
|
-
/* @__PURE__ */
|
|
3719
|
+
/* @__PURE__ */ jsx20("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx20(Typography, { variant: "label-sm-bold", children: title }) }),
|
|
3720
|
+
/* @__PURE__ */ jsx20("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx20("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs13(
|
|
3825
3721
|
RechartsPieChart,
|
|
3826
3722
|
{
|
|
3827
3723
|
width: 600,
|
|
3828
3724
|
height: CHART_CONSTANTS.LARGE_HEIGHT,
|
|
3829
3725
|
children: [
|
|
3830
|
-
/* @__PURE__ */
|
|
3726
|
+
/* @__PURE__ */ jsx20(
|
|
3831
3727
|
Pie,
|
|
3832
3728
|
{
|
|
3833
3729
|
data,
|
|
@@ -3839,7 +3735,7 @@ var PieChart = forwardRef15(
|
|
|
3839
3735
|
label: showLabels,
|
|
3840
3736
|
labelLine: false,
|
|
3841
3737
|
onClick: handleClick,
|
|
3842
|
-
children: data.map((entry, index) => /* @__PURE__ */
|
|
3738
|
+
children: data.map((entry, index) => /* @__PURE__ */ jsx20(
|
|
3843
3739
|
Cell,
|
|
3844
3740
|
{
|
|
3845
3741
|
fill: entry.color || getSeriesColor(index)
|
|
@@ -3848,7 +3744,7 @@ var PieChart = forwardRef15(
|
|
|
3848
3744
|
))
|
|
3849
3745
|
}
|
|
3850
3746
|
),
|
|
3851
|
-
/* @__PURE__ */
|
|
3747
|
+
/* @__PURE__ */ jsx20(
|
|
3852
3748
|
Tooltip3,
|
|
3853
3749
|
{
|
|
3854
3750
|
content: ({
|
|
@@ -3857,7 +3753,7 @@ var PieChart = forwardRef15(
|
|
|
3857
3753
|
}) => {
|
|
3858
3754
|
if (active && payload && payload.length && payload[0]) {
|
|
3859
3755
|
const data2 = payload[0].payload;
|
|
3860
|
-
return /* @__PURE__ */
|
|
3756
|
+
return /* @__PURE__ */ jsx20(
|
|
3861
3757
|
GenericTooltip,
|
|
3862
3758
|
{
|
|
3863
3759
|
title: data2.name,
|
|
@@ -3875,10 +3771,10 @@ var PieChart = forwardRef15(
|
|
|
3875
3771
|
}
|
|
3876
3772
|
}
|
|
3877
3773
|
),
|
|
3878
|
-
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */
|
|
3774
|
+
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx20(ChartLegend, { items: defaultLegendItems, y: 400 })
|
|
3879
3775
|
]
|
|
3880
3776
|
}
|
|
3881
|
-
) }) : /* @__PURE__ */
|
|
3777
|
+
) }) : /* @__PURE__ */ jsx20("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx20(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
|
|
3882
3778
|
]
|
|
3883
3779
|
}
|
|
3884
3780
|
);
|
|
@@ -3891,7 +3787,7 @@ import { useCallback as useCallback2 } from "react";
|
|
|
3891
3787
|
import {
|
|
3892
3788
|
flexRender
|
|
3893
3789
|
} from "@tanstack/react-table";
|
|
3894
|
-
import { Fragment as Fragment2, jsx as
|
|
3790
|
+
import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3895
3791
|
function Table({
|
|
3896
3792
|
table,
|
|
3897
3793
|
className,
|
|
@@ -3921,15 +3817,15 @@ function Table({
|
|
|
3921
3817
|
},
|
|
3922
3818
|
[table]
|
|
3923
3819
|
);
|
|
3924
|
-
return /* @__PURE__ */
|
|
3925
|
-
/* @__PURE__ */
|
|
3926
|
-
/* @__PURE__ */
|
|
3820
|
+
return /* @__PURE__ */ jsxs14("div", { children: [
|
|
3821
|
+
/* @__PURE__ */ jsx21("div", { className: cn("overflow-x-auto", className), children: /* @__PURE__ */ jsxs14("table", { className: "min-w-full divide-y divide-border", children: [
|
|
3822
|
+
/* @__PURE__ */ jsx21("thead", { className: "bg-dark text-light", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx21("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx21("th", { className: "px-6 py-3 text-left", children: /* @__PURE__ */ jsxs14(
|
|
3927
3823
|
"div",
|
|
3928
3824
|
{
|
|
3929
3825
|
className: `flex items-center space-x-1 ${header.column.getCanSort() ? "cursor-pointer select-none" : ""}`,
|
|
3930
3826
|
onClick: header.column.getToggleSortingHandler(),
|
|
3931
3827
|
children: [
|
|
3932
|
-
/* @__PURE__ */
|
|
3828
|
+
/* @__PURE__ */ jsx21(
|
|
3933
3829
|
Typography,
|
|
3934
3830
|
{
|
|
3935
3831
|
variant: "label-xs",
|
|
@@ -3940,19 +3836,19 @@ function Table({
|
|
|
3940
3836
|
)
|
|
3941
3837
|
}
|
|
3942
3838
|
),
|
|
3943
|
-
header.column.getCanSort() && /* @__PURE__ */
|
|
3944
|
-
header.column.getIsSorted() === "asc" && /* @__PURE__ */
|
|
3945
|
-
header.column.getIsSorted() === "desc" && /* @__PURE__ */
|
|
3839
|
+
header.column.getCanSort() && /* @__PURE__ */ jsxs14("span", { className: "ml-1", children: [
|
|
3840
|
+
header.column.getIsSorted() === "asc" && /* @__PURE__ */ jsx21(ChevronUp, { className: "w-4 h-4 text-light" }),
|
|
3841
|
+
header.column.getIsSorted() === "desc" && /* @__PURE__ */ jsx21(ChevronDown, { className: "w-4 h-4 text-light" })
|
|
3946
3842
|
] })
|
|
3947
3843
|
]
|
|
3948
3844
|
}
|
|
3949
3845
|
) }, header.id)) }, headerGroup.id)) }),
|
|
3950
|
-
/* @__PURE__ */
|
|
3846
|
+
/* @__PURE__ */ jsx21("tbody", { className: "bg-light divide-y divide-border", children: table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx21("tr", { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx21("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsx21(Typography, { variant: "body-sm", children: flexRender(
|
|
3951
3847
|
cell.column.columnDef.cell,
|
|
3952
3848
|
cell.getContext()
|
|
3953
3849
|
) }) }, cell.id)) }, row.id)) })
|
|
3954
3850
|
] }) }),
|
|
3955
|
-
showPagination && /* @__PURE__ */
|
|
3851
|
+
showPagination && /* @__PURE__ */ jsxs14(
|
|
3956
3852
|
"div",
|
|
3957
3853
|
{
|
|
3958
3854
|
className: cn(
|
|
@@ -3960,9 +3856,9 @@ function Table({
|
|
|
3960
3856
|
paginationClassName
|
|
3961
3857
|
),
|
|
3962
3858
|
children: [
|
|
3963
|
-
/* @__PURE__ */
|
|
3964
|
-
/* @__PURE__ */
|
|
3965
|
-
/* @__PURE__ */
|
|
3859
|
+
/* @__PURE__ */ jsx21("div", { className: "flex items-center", children: /* @__PURE__ */ jsx21(Typography, { variant: "body-sm", className: "text-secondary", children: showingText }) }),
|
|
3860
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center space-x-1", children: [
|
|
3861
|
+
/* @__PURE__ */ jsx21(
|
|
3966
3862
|
Button,
|
|
3967
3863
|
{
|
|
3968
3864
|
variant: "ghost",
|
|
@@ -3970,7 +3866,7 @@ function Table({
|
|
|
3970
3866
|
onClick: handlePreviousPage,
|
|
3971
3867
|
disabled: !table.getCanPreviousPage(),
|
|
3972
3868
|
className: "p-2",
|
|
3973
|
-
children: /* @__PURE__ */
|
|
3869
|
+
children: /* @__PURE__ */ jsx21(ChevronLeft, { className: "w-4 h-4" })
|
|
3974
3870
|
}
|
|
3975
3871
|
),
|
|
3976
3872
|
Array.from(
|
|
@@ -3987,7 +3883,7 @@ function Table({
|
|
|
3987
3883
|
pageNumber = currentPage - 2 + i;
|
|
3988
3884
|
}
|
|
3989
3885
|
const isActive = pageNumber === currentPage;
|
|
3990
|
-
return /* @__PURE__ */
|
|
3886
|
+
return /* @__PURE__ */ jsx21(
|
|
3991
3887
|
Button,
|
|
3992
3888
|
{
|
|
3993
3889
|
variant: isActive ? "default" : "ghost",
|
|
@@ -4000,11 +3896,11 @@ function Table({
|
|
|
4000
3896
|
);
|
|
4001
3897
|
}
|
|
4002
3898
|
),
|
|
4003
|
-
table.getPageCount() > 5 && currentPage < totalPages - 3 && /* @__PURE__ */
|
|
4004
|
-
/* @__PURE__ */
|
|
4005
|
-
/* @__PURE__ */
|
|
3899
|
+
table.getPageCount() > 5 && currentPage < totalPages - 3 && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
3900
|
+
/* @__PURE__ */ jsx21("span", { className: "px-1 text-secondary", children: "..." }),
|
|
3901
|
+
/* @__PURE__ */ jsx21(Typography, { variant: "body-sm", className: "text-secondary", children: totalPages })
|
|
4006
3902
|
] }),
|
|
4007
|
-
/* @__PURE__ */
|
|
3903
|
+
/* @__PURE__ */ jsx21(
|
|
4008
3904
|
Button,
|
|
4009
3905
|
{
|
|
4010
3906
|
variant: "ghost",
|
|
@@ -4012,12 +3908,12 @@ function Table({
|
|
|
4012
3908
|
onClick: handleNextPage,
|
|
4013
3909
|
disabled: !table.getCanNextPage(),
|
|
4014
3910
|
className: "p-2",
|
|
4015
|
-
children: /* @__PURE__ */
|
|
3911
|
+
children: /* @__PURE__ */ jsx21(ChevronRight, { className: "w-4 h-4" })
|
|
4016
3912
|
}
|
|
4017
3913
|
)
|
|
4018
3914
|
] }),
|
|
4019
|
-
/* @__PURE__ */
|
|
4020
|
-
/* @__PURE__ */
|
|
3915
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-3 w-48", children: [
|
|
3916
|
+
/* @__PURE__ */ jsx21(
|
|
4021
3917
|
Typography,
|
|
4022
3918
|
{
|
|
4023
3919
|
variant: "body-sm",
|
|
@@ -4025,14 +3921,14 @@ function Table({
|
|
|
4025
3921
|
children: "Rows per page:"
|
|
4026
3922
|
}
|
|
4027
3923
|
),
|
|
4028
|
-
/* @__PURE__ */
|
|
3924
|
+
/* @__PURE__ */ jsxs14(
|
|
4029
3925
|
Select,
|
|
4030
3926
|
{
|
|
4031
3927
|
value: table.getState().pagination.pageSize.toString(),
|
|
4032
3928
|
onValueChange: handlePageSizeChange,
|
|
4033
3929
|
children: [
|
|
4034
|
-
/* @__PURE__ */
|
|
4035
|
-
/* @__PURE__ */
|
|
3930
|
+
/* @__PURE__ */ jsx21(SelectTrigger, { className: "min-w-0 h-8", children: /* @__PURE__ */ jsx21(SelectValue, {}) }),
|
|
3931
|
+
/* @__PURE__ */ jsx21(SelectContent, { children: [10, 20, 50, 100].map((size) => /* @__PURE__ */ jsx21(SelectItem, { value: size.toString(), children: size }, size)) })
|
|
4036
3932
|
]
|
|
4037
3933
|
}
|
|
4038
3934
|
)
|
|
@@ -4110,7 +4006,6 @@ export {
|
|
|
4110
4006
|
FieldTitle,
|
|
4111
4007
|
Filter,
|
|
4112
4008
|
FilterDescending,
|
|
4113
|
-
FormField,
|
|
4114
4009
|
GenericTooltip,
|
|
4115
4010
|
GraphBar,
|
|
4116
4011
|
GraphDonut,
|