@polastack/design-system 0.1.22 → 0.1.24
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 +4 -3
- package/dist/index.d.ts +38 -1
- package/dist/index.js +688 -309
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/styles/base.css +6 -0
- package/src/styles/tokens.css +1 -0
package/dist/index.js
CHANGED
|
@@ -1799,14 +1799,389 @@ var FormActions = React26.forwardRef(
|
|
|
1799
1799
|
);
|
|
1800
1800
|
FormActions.displayName = "FormActions";
|
|
1801
1801
|
|
|
1802
|
-
// src/components/
|
|
1802
|
+
// src/components/progress/progress.tsx
|
|
1803
1803
|
import * as React27 from "react";
|
|
1804
|
-
import * as
|
|
1804
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
1805
1805
|
import { cva as cva11 } from "class-variance-authority";
|
|
1806
|
-
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1806
|
+
import { jsx as jsx26, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1807
|
+
var progressVariants = cva11(
|
|
1808
|
+
"relative w-full overflow-hidden rounded-full bg-[var(--color-surface-muted)]",
|
|
1809
|
+
{
|
|
1810
|
+
variants: {
|
|
1811
|
+
variant: {
|
|
1812
|
+
default: "",
|
|
1813
|
+
success: "",
|
|
1814
|
+
warning: "",
|
|
1815
|
+
error: "",
|
|
1816
|
+
info: ""
|
|
1817
|
+
},
|
|
1818
|
+
size: {
|
|
1819
|
+
sm: "h-1.5",
|
|
1820
|
+
md: "h-2.5",
|
|
1821
|
+
lg: "h-4"
|
|
1822
|
+
}
|
|
1823
|
+
},
|
|
1824
|
+
defaultVariants: {
|
|
1825
|
+
variant: "default",
|
|
1826
|
+
size: "md"
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
);
|
|
1830
|
+
var progressIndicatorVariants = cva11(
|
|
1831
|
+
"h-full rounded-full transition-[width] duration-normal ease-default",
|
|
1832
|
+
{
|
|
1833
|
+
variants: {
|
|
1834
|
+
variant: {
|
|
1835
|
+
default: "bg-primary-500",
|
|
1836
|
+
success: "bg-success-500",
|
|
1837
|
+
warning: "bg-warning-500",
|
|
1838
|
+
error: "bg-error-500",
|
|
1839
|
+
info: "bg-info-500"
|
|
1840
|
+
},
|
|
1841
|
+
indeterminate: {
|
|
1842
|
+
true: "w-1/3 animate-[progress-indeterminate_2s_ease-in-out_infinite]",
|
|
1843
|
+
false: ""
|
|
1844
|
+
}
|
|
1845
|
+
},
|
|
1846
|
+
defaultVariants: {
|
|
1847
|
+
variant: "default",
|
|
1848
|
+
indeterminate: false
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
);
|
|
1852
|
+
var floatingBubbleVariants = {
|
|
1853
|
+
default: "bg-primary-600 dark:bg-primary-400",
|
|
1854
|
+
success: "bg-success-600 dark:bg-success-400",
|
|
1855
|
+
warning: "bg-warning-600 dark:bg-warning-400",
|
|
1856
|
+
error: "bg-error-600 dark:bg-error-400",
|
|
1857
|
+
info: "bg-info-600 dark:bg-info-400"
|
|
1858
|
+
};
|
|
1859
|
+
var floatingArrowVariants = {
|
|
1860
|
+
default: "border-t-primary-600 dark:border-t-primary-400",
|
|
1861
|
+
success: "border-t-success-600 dark:border-t-success-400",
|
|
1862
|
+
warning: "border-t-warning-600 dark:border-t-warning-400",
|
|
1863
|
+
error: "border-t-error-600 dark:border-t-error-400",
|
|
1864
|
+
info: "border-t-info-600 dark:border-t-info-400"
|
|
1865
|
+
};
|
|
1866
|
+
var markerVariants = {
|
|
1867
|
+
default: "border-primary-500",
|
|
1868
|
+
success: "border-success-500",
|
|
1869
|
+
warning: "border-warning-500",
|
|
1870
|
+
error: "border-error-500",
|
|
1871
|
+
info: "border-info-500"
|
|
1872
|
+
};
|
|
1873
|
+
var Progress = React27.forwardRef(
|
|
1874
|
+
({
|
|
1875
|
+
className,
|
|
1876
|
+
variant,
|
|
1877
|
+
size,
|
|
1878
|
+
value,
|
|
1879
|
+
max = 100,
|
|
1880
|
+
showLabel,
|
|
1881
|
+
labelPosition = "right",
|
|
1882
|
+
showMarker,
|
|
1883
|
+
...props
|
|
1884
|
+
}, ref) => {
|
|
1885
|
+
const isIndeterminate = value === null || value === void 0;
|
|
1886
|
+
const clampedValue = isIndeterminate ? null : Math.min(max, Math.max(0, value));
|
|
1887
|
+
const percent = isIndeterminate ? 0 : clampedValue / max * 100;
|
|
1888
|
+
const resolvedVariant = variant ?? "default";
|
|
1889
|
+
const labelContent = showLabel ? typeof showLabel === "function" ? showLabel(clampedValue) : isIndeterminate ? null : `${Math.round(clampedValue)}%` : null;
|
|
1890
|
+
const isFloating = labelPosition === "floating" && labelContent && !isIndeterminate;
|
|
1891
|
+
const hasMarker = showMarker && !isIndeterminate;
|
|
1892
|
+
const bar = /* @__PURE__ */ jsx26(
|
|
1893
|
+
ProgressPrimitive.Root,
|
|
1894
|
+
{
|
|
1895
|
+
ref,
|
|
1896
|
+
value: clampedValue,
|
|
1897
|
+
max,
|
|
1898
|
+
className: cn(progressVariants({ variant, size }), className),
|
|
1899
|
+
...props,
|
|
1900
|
+
children: /* @__PURE__ */ jsx26(
|
|
1901
|
+
ProgressPrimitive.Indicator,
|
|
1902
|
+
{
|
|
1903
|
+
className: cn(
|
|
1904
|
+
progressIndicatorVariants({
|
|
1905
|
+
variant,
|
|
1906
|
+
indeterminate: isIndeterminate
|
|
1907
|
+
})
|
|
1908
|
+
),
|
|
1909
|
+
style: isIndeterminate ? void 0 : { width: `${percent}%` }
|
|
1910
|
+
}
|
|
1911
|
+
)
|
|
1912
|
+
}
|
|
1913
|
+
);
|
|
1914
|
+
if (isFloating || hasMarker) {
|
|
1915
|
+
return /* @__PURE__ */ jsxs10("div", { className: "relative", children: [
|
|
1916
|
+
isFloating && /* @__PURE__ */ jsx26(
|
|
1917
|
+
"div",
|
|
1918
|
+
{
|
|
1919
|
+
className: "absolute bottom-full mb-2 transition-[left] duration-normal ease-default",
|
|
1920
|
+
style: { left: `${percent}%` },
|
|
1921
|
+
"aria-hidden": "true",
|
|
1922
|
+
children: /* @__PURE__ */ jsxs10("div", { className: "relative -translate-x-1/2", children: [
|
|
1923
|
+
/* @__PURE__ */ jsx26(
|
|
1924
|
+
"span",
|
|
1925
|
+
{
|
|
1926
|
+
className: cn(
|
|
1927
|
+
"block rounded-md px-2 py-0.5 text-xs font-semibold tabular-nums text-white whitespace-nowrap shadow-sm",
|
|
1928
|
+
floatingBubbleVariants[resolvedVariant]
|
|
1929
|
+
),
|
|
1930
|
+
children: labelContent
|
|
1931
|
+
}
|
|
1932
|
+
),
|
|
1933
|
+
/* @__PURE__ */ jsx26(
|
|
1934
|
+
"div",
|
|
1935
|
+
{
|
|
1936
|
+
className: cn(
|
|
1937
|
+
"mx-auto h-0 w-0 border-x-4 border-t-4 border-x-transparent",
|
|
1938
|
+
floatingArrowVariants[resolvedVariant]
|
|
1939
|
+
)
|
|
1940
|
+
}
|
|
1941
|
+
)
|
|
1942
|
+
] })
|
|
1943
|
+
}
|
|
1944
|
+
),
|
|
1945
|
+
bar,
|
|
1946
|
+
hasMarker && /* @__PURE__ */ jsx26(
|
|
1947
|
+
"div",
|
|
1948
|
+
{
|
|
1949
|
+
className: "absolute top-1/2 -translate-y-1/2 transition-[left] duration-normal ease-default pointer-events-none",
|
|
1950
|
+
style: { left: `${percent}%` },
|
|
1951
|
+
"aria-hidden": "true",
|
|
1952
|
+
children: /* @__PURE__ */ jsx26(
|
|
1953
|
+
"div",
|
|
1954
|
+
{
|
|
1955
|
+
className: cn(
|
|
1956
|
+
"h-3.5 w-3.5 -translate-x-1/2 rounded-full border-2 bg-white shadow-sm dark:bg-[var(--color-surface-raised)]",
|
|
1957
|
+
markerVariants[resolvedVariant]
|
|
1958
|
+
)
|
|
1959
|
+
}
|
|
1960
|
+
)
|
|
1961
|
+
}
|
|
1962
|
+
)
|
|
1963
|
+
] });
|
|
1964
|
+
}
|
|
1965
|
+
if (!labelContent) return bar;
|
|
1966
|
+
if (labelPosition === "top") {
|
|
1967
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-1.5", children: [
|
|
1968
|
+
/* @__PURE__ */ jsx26("span", { className: "text-sm font-medium text-[var(--color-on-surface-secondary)]", children: labelContent }),
|
|
1969
|
+
bar
|
|
1970
|
+
] });
|
|
1971
|
+
}
|
|
1972
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-3", children: [
|
|
1973
|
+
/* @__PURE__ */ jsx26("div", { className: "flex-1", children: bar }),
|
|
1974
|
+
/* @__PURE__ */ jsx26("span", { className: "shrink-0 text-sm font-medium tabular-nums text-[var(--color-on-surface-secondary)]", children: labelContent })
|
|
1975
|
+
] });
|
|
1976
|
+
}
|
|
1977
|
+
);
|
|
1978
|
+
Progress.displayName = "Progress";
|
|
1979
|
+
|
|
1980
|
+
// src/components/stepper/stepper.tsx
|
|
1981
|
+
import * as React28 from "react";
|
|
1982
|
+
import { cva as cva12 } from "class-variance-authority";
|
|
1983
|
+
import { Check as Check4 } from "lucide-react";
|
|
1984
|
+
import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1985
|
+
var stepIndicatorVariants = cva12(
|
|
1986
|
+
"flex items-center justify-center rounded-full font-medium shrink-0 transition-colors duration-normal border-2",
|
|
1987
|
+
{
|
|
1988
|
+
variants: {
|
|
1989
|
+
status: {
|
|
1990
|
+
pending: "border-[var(--color-border)] bg-[var(--color-surface)] text-[var(--color-on-surface-muted)]",
|
|
1991
|
+
active: "border-primary-500 bg-primary-500 text-white",
|
|
1992
|
+
completed: "border-primary-500 bg-primary-500 text-white",
|
|
1993
|
+
error: "border-error-500 bg-error-500 text-white",
|
|
1994
|
+
loading: "border-primary-500 bg-primary-500 text-white"
|
|
1995
|
+
},
|
|
1996
|
+
size: {
|
|
1997
|
+
sm: "h-6 w-6 text-xs",
|
|
1998
|
+
md: "h-8 w-8 text-sm",
|
|
1999
|
+
lg: "h-10 w-10 text-base"
|
|
2000
|
+
}
|
|
2001
|
+
},
|
|
2002
|
+
defaultVariants: {
|
|
2003
|
+
status: "pending",
|
|
2004
|
+
size: "md"
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
);
|
|
2008
|
+
var connectorVariants = cva12("transition-colors duration-normal", {
|
|
2009
|
+
variants: {
|
|
2010
|
+
completed: {
|
|
2011
|
+
true: "bg-primary-500",
|
|
2012
|
+
false: "bg-[var(--color-border)]"
|
|
2013
|
+
},
|
|
2014
|
+
orientation: {
|
|
2015
|
+
horizontal: "h-0.5 flex-1 mx-2",
|
|
2016
|
+
vertical: "w-0.5 min-h-6"
|
|
2017
|
+
}
|
|
2018
|
+
},
|
|
2019
|
+
defaultVariants: {
|
|
2020
|
+
completed: false,
|
|
2021
|
+
orientation: "horizontal"
|
|
2022
|
+
}
|
|
2023
|
+
});
|
|
2024
|
+
var spinnerSizeMap = {
|
|
2025
|
+
sm: "sm",
|
|
2026
|
+
md: "sm",
|
|
2027
|
+
lg: "sm"
|
|
2028
|
+
};
|
|
2029
|
+
var checkSizeMap = {
|
|
2030
|
+
sm: 12,
|
|
2031
|
+
md: 16,
|
|
2032
|
+
lg: 20
|
|
2033
|
+
};
|
|
2034
|
+
function StepIndicatorContent({
|
|
2035
|
+
step,
|
|
2036
|
+
index,
|
|
2037
|
+
status,
|
|
2038
|
+
size
|
|
2039
|
+
}) {
|
|
2040
|
+
if (step.icon && status !== "completed" && status !== "loading") {
|
|
2041
|
+
return /* @__PURE__ */ jsx27(Fragment2, { children: step.icon });
|
|
2042
|
+
}
|
|
2043
|
+
if (status === "loading") {
|
|
2044
|
+
return /* @__PURE__ */ jsx27(Spinner, { size: spinnerSizeMap[size], className: "text-current" });
|
|
2045
|
+
}
|
|
2046
|
+
if (status === "completed") {
|
|
2047
|
+
const s = checkSizeMap[size];
|
|
2048
|
+
return /* @__PURE__ */ jsx27(Check4, { size: s, strokeWidth: 3 });
|
|
2049
|
+
}
|
|
2050
|
+
return /* @__PURE__ */ jsx27(Fragment2, { children: index + 1 });
|
|
2051
|
+
}
|
|
2052
|
+
var Stepper = React28.forwardRef(
|
|
2053
|
+
({
|
|
2054
|
+
className,
|
|
2055
|
+
steps,
|
|
2056
|
+
activeStep,
|
|
2057
|
+
orientation = "horizontal",
|
|
2058
|
+
size = "md",
|
|
2059
|
+
clickable = false,
|
|
2060
|
+
onStepClick,
|
|
2061
|
+
...props
|
|
2062
|
+
}, ref) => {
|
|
2063
|
+
return /* @__PURE__ */ jsx27(
|
|
2064
|
+
"ol",
|
|
2065
|
+
{
|
|
2066
|
+
ref,
|
|
2067
|
+
role: "list",
|
|
2068
|
+
"aria-label": "Progress",
|
|
2069
|
+
className: cn(
|
|
2070
|
+
orientation === "horizontal" ? "flex items-start" : "flex flex-col",
|
|
2071
|
+
className
|
|
2072
|
+
),
|
|
2073
|
+
...props,
|
|
2074
|
+
children: steps.map((step, index) => {
|
|
2075
|
+
const derivedStatus = step.status ?? (index < activeStep ? "completed" : index === activeStep ? "active" : "pending");
|
|
2076
|
+
const isLast = index === steps.length - 1;
|
|
2077
|
+
const isClickable = clickable && (derivedStatus === "completed" || derivedStatus === "active");
|
|
2078
|
+
const handleClick = () => {
|
|
2079
|
+
if (isClickable && onStepClick) onStepClick(index);
|
|
2080
|
+
};
|
|
2081
|
+
const connector = !isLast ? /* @__PURE__ */ jsx27(
|
|
2082
|
+
"div",
|
|
2083
|
+
{
|
|
2084
|
+
className: cn(
|
|
2085
|
+
connectorVariants({
|
|
2086
|
+
completed: index < activeStep,
|
|
2087
|
+
orientation
|
|
2088
|
+
})
|
|
2089
|
+
),
|
|
2090
|
+
"aria-hidden": "true"
|
|
2091
|
+
}
|
|
2092
|
+
) : null;
|
|
2093
|
+
const indicatorButton = /* @__PURE__ */ jsx27(
|
|
2094
|
+
"button",
|
|
2095
|
+
{
|
|
2096
|
+
type: "button",
|
|
2097
|
+
className: cn(
|
|
2098
|
+
stepIndicatorVariants({ status: derivedStatus, size }),
|
|
2099
|
+
isClickable && "cursor-pointer hover:ring-2 hover:ring-primary-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring)] focus-visible:ring-offset-2",
|
|
2100
|
+
!isClickable && "cursor-default",
|
|
2101
|
+
"touch:min-h-[--touch-target-min] touch:min-w-[--touch-target-min]"
|
|
2102
|
+
),
|
|
2103
|
+
onClick: handleClick,
|
|
2104
|
+
disabled: !isClickable,
|
|
2105
|
+
tabIndex: isClickable ? 0 : -1,
|
|
2106
|
+
"aria-label": `Step ${index + 1}: ${step.label}${derivedStatus === "completed" ? " (completed)" : derivedStatus === "error" ? " (error)" : derivedStatus === "loading" ? " (loading)" : ""}`,
|
|
2107
|
+
children: /* @__PURE__ */ jsx27(
|
|
2108
|
+
StepIndicatorContent,
|
|
2109
|
+
{
|
|
2110
|
+
step,
|
|
2111
|
+
index,
|
|
2112
|
+
status: derivedStatus,
|
|
2113
|
+
size
|
|
2114
|
+
}
|
|
2115
|
+
)
|
|
2116
|
+
}
|
|
2117
|
+
);
|
|
2118
|
+
const labelEl = /* @__PURE__ */ jsx27(
|
|
2119
|
+
"span",
|
|
2120
|
+
{
|
|
2121
|
+
className: cn(
|
|
2122
|
+
"text-sm font-medium",
|
|
2123
|
+
derivedStatus === "active" && "text-[var(--color-on-surface)]",
|
|
2124
|
+
derivedStatus === "pending" && "text-[var(--color-on-surface-secondary)]",
|
|
2125
|
+
derivedStatus === "completed" && "text-[var(--color-on-surface-secondary)]",
|
|
2126
|
+
derivedStatus === "loading" && "text-[var(--color-on-surface)]",
|
|
2127
|
+
derivedStatus === "error" && "text-error-600 dark:text-error-400"
|
|
2128
|
+
),
|
|
2129
|
+
children: step.label
|
|
2130
|
+
}
|
|
2131
|
+
);
|
|
2132
|
+
const descEl = step.description ? /* @__PURE__ */ jsx27("span", { className: "text-xs text-[var(--color-on-surface-muted)] max-w-[140px]", children: step.description }) : null;
|
|
2133
|
+
if (orientation === "horizontal") {
|
|
2134
|
+
return /* @__PURE__ */ jsxs11(React28.Fragment, { children: [
|
|
2135
|
+
/* @__PURE__ */ jsxs11(
|
|
2136
|
+
"li",
|
|
2137
|
+
{
|
|
2138
|
+
role: "listitem",
|
|
2139
|
+
"aria-current": derivedStatus === "active" ? "step" : void 0,
|
|
2140
|
+
className: "flex flex-col items-center gap-1.5 text-center",
|
|
2141
|
+
children: [
|
|
2142
|
+
indicatorButton,
|
|
2143
|
+
labelEl,
|
|
2144
|
+
descEl
|
|
2145
|
+
]
|
|
2146
|
+
}
|
|
2147
|
+
),
|
|
2148
|
+
connector
|
|
2149
|
+
] }, index);
|
|
2150
|
+
}
|
|
2151
|
+
return /* @__PURE__ */ jsxs11(
|
|
2152
|
+
"li",
|
|
2153
|
+
{
|
|
2154
|
+
role: "listitem",
|
|
2155
|
+
"aria-current": derivedStatus === "active" ? "step" : void 0,
|
|
2156
|
+
className: "flex gap-3",
|
|
2157
|
+
children: [
|
|
2158
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex flex-col items-center", children: [
|
|
2159
|
+
indicatorButton,
|
|
2160
|
+
connector
|
|
2161
|
+
] }),
|
|
2162
|
+
/* @__PURE__ */ jsxs11("div", { className: cn("flex flex-col gap-0.5", !isLast && "pb-6"), children: [
|
|
2163
|
+
labelEl,
|
|
2164
|
+
descEl
|
|
2165
|
+
] })
|
|
2166
|
+
]
|
|
2167
|
+
},
|
|
2168
|
+
index
|
|
2169
|
+
);
|
|
2170
|
+
})
|
|
2171
|
+
}
|
|
2172
|
+
);
|
|
2173
|
+
}
|
|
2174
|
+
);
|
|
2175
|
+
Stepper.displayName = "Stepper";
|
|
2176
|
+
|
|
2177
|
+
// src/components/tabs/tabs.tsx
|
|
2178
|
+
import * as React29 from "react";
|
|
2179
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2180
|
+
import { cva as cva13 } from "class-variance-authority";
|
|
2181
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1807
2182
|
var [TabsVariantProvider, useTabsVariant] = createContext2("TabsVariant");
|
|
1808
2183
|
var Tabs = TabsPrimitive.Root;
|
|
1809
|
-
var tabsListVariants =
|
|
2184
|
+
var tabsListVariants = cva13(
|
|
1810
2185
|
"inline-flex items-center justify-center overflow-x-auto max-w-full",
|
|
1811
2186
|
{
|
|
1812
2187
|
variants: {
|
|
@@ -1818,7 +2193,7 @@ var tabsListVariants = cva11(
|
|
|
1818
2193
|
defaultVariants: { variant: "default" }
|
|
1819
2194
|
}
|
|
1820
2195
|
);
|
|
1821
|
-
var TabsList =
|
|
2196
|
+
var TabsList = React29.forwardRef(({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx28(TabsVariantProvider, { value: { variant }, children: /* @__PURE__ */ jsx28(
|
|
1822
2197
|
TabsPrimitive.List,
|
|
1823
2198
|
{
|
|
1824
2199
|
ref,
|
|
@@ -1832,9 +2207,9 @@ var tabsTriggerVariantStyles = {
|
|
|
1832
2207
|
default: "rounded-md data-[state=active]:bg-[var(--color-surface-raised)] data-[state=active]:shadow-sm data-[state=active]:text-[var(--color-on-surface)] text-[var(--color-on-surface-secondary)]",
|
|
1833
2208
|
underline: "border-b-2 border-transparent rounded-none data-[state=active]:border-primary-400 data-[state=active]:text-[var(--color-on-surface)] text-[var(--color-on-surface-secondary)]"
|
|
1834
2209
|
};
|
|
1835
|
-
var TabsTrigger =
|
|
2210
|
+
var TabsTrigger = React29.forwardRef(({ className, ...props }, ref) => {
|
|
1836
2211
|
const { variant } = useTabsVariant();
|
|
1837
|
-
return /* @__PURE__ */
|
|
2212
|
+
return /* @__PURE__ */ jsx28(
|
|
1838
2213
|
TabsPrimitive.Trigger,
|
|
1839
2214
|
{
|
|
1840
2215
|
ref,
|
|
@@ -1848,7 +2223,7 @@ var TabsTrigger = React27.forwardRef(({ className, ...props }, ref) => {
|
|
|
1848
2223
|
);
|
|
1849
2224
|
});
|
|
1850
2225
|
TabsTrigger.displayName = "TabsTrigger";
|
|
1851
|
-
var TabsContent =
|
|
2226
|
+
var TabsContent = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1852
2227
|
TabsPrimitive.Content,
|
|
1853
2228
|
{
|
|
1854
2229
|
ref,
|
|
@@ -1862,10 +2237,10 @@ var TabsContent = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1862
2237
|
TabsContent.displayName = "TabsContent";
|
|
1863
2238
|
|
|
1864
2239
|
// src/components/empty-state/empty-state.tsx
|
|
1865
|
-
import * as
|
|
1866
|
-
import { cva as
|
|
1867
|
-
import { jsx as
|
|
1868
|
-
var emptyStateVariants =
|
|
2240
|
+
import * as React30 from "react";
|
|
2241
|
+
import { cva as cva14 } from "class-variance-authority";
|
|
2242
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2243
|
+
var emptyStateVariants = cva14(
|
|
1869
2244
|
"flex flex-col items-center justify-center text-center",
|
|
1870
2245
|
{
|
|
1871
2246
|
variants: {
|
|
@@ -1878,8 +2253,8 @@ var emptyStateVariants = cva12(
|
|
|
1878
2253
|
defaultVariants: { size: "md" }
|
|
1879
2254
|
}
|
|
1880
2255
|
);
|
|
1881
|
-
var EmptyState =
|
|
1882
|
-
({ className, size, ...props }, ref) => /* @__PURE__ */
|
|
2256
|
+
var EmptyState = React30.forwardRef(
|
|
2257
|
+
({ className, size, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1883
2258
|
"div",
|
|
1884
2259
|
{
|
|
1885
2260
|
ref,
|
|
@@ -1889,7 +2264,7 @@ var EmptyState = React28.forwardRef(
|
|
|
1889
2264
|
)
|
|
1890
2265
|
);
|
|
1891
2266
|
EmptyState.displayName = "EmptyState";
|
|
1892
|
-
var EmptyStateIcon =
|
|
2267
|
+
var EmptyStateIcon = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1893
2268
|
"div",
|
|
1894
2269
|
{
|
|
1895
2270
|
ref,
|
|
@@ -1898,7 +2273,7 @@ var EmptyStateIcon = React28.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
1898
2273
|
}
|
|
1899
2274
|
));
|
|
1900
2275
|
EmptyStateIcon.displayName = "EmptyStateIcon";
|
|
1901
|
-
var EmptyStateTitle =
|
|
2276
|
+
var EmptyStateTitle = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1902
2277
|
"h3",
|
|
1903
2278
|
{
|
|
1904
2279
|
ref,
|
|
@@ -1907,7 +2282,7 @@ var EmptyStateTitle = React28.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
1907
2282
|
}
|
|
1908
2283
|
));
|
|
1909
2284
|
EmptyStateTitle.displayName = "EmptyStateTitle";
|
|
1910
|
-
var EmptyStateDescription =
|
|
2285
|
+
var EmptyStateDescription = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1911
2286
|
"p",
|
|
1912
2287
|
{
|
|
1913
2288
|
ref,
|
|
@@ -1916,7 +2291,7 @@ var EmptyStateDescription = React28.forwardRef(({ className, ...props }, ref) =>
|
|
|
1916
2291
|
}
|
|
1917
2292
|
));
|
|
1918
2293
|
EmptyStateDescription.displayName = "EmptyStateDescription";
|
|
1919
|
-
var EmptyStateActions =
|
|
2294
|
+
var EmptyStateActions = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1920
2295
|
"div",
|
|
1921
2296
|
{
|
|
1922
2297
|
ref,
|
|
@@ -1927,9 +2302,9 @@ var EmptyStateActions = React28.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1927
2302
|
EmptyStateActions.displayName = "EmptyStateActions";
|
|
1928
2303
|
|
|
1929
2304
|
// src/components/table/table.tsx
|
|
1930
|
-
import * as
|
|
1931
|
-
import { jsx as
|
|
1932
|
-
var Table =
|
|
2305
|
+
import * as React31 from "react";
|
|
2306
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2307
|
+
var Table = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx30(
|
|
1933
2308
|
"table",
|
|
1934
2309
|
{
|
|
1935
2310
|
ref,
|
|
@@ -1938,9 +2313,9 @@ var Table = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
1938
2313
|
}
|
|
1939
2314
|
) }));
|
|
1940
2315
|
Table.displayName = "Table";
|
|
1941
|
-
var TableHeader =
|
|
2316
|
+
var TableHeader = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
1942
2317
|
TableHeader.displayName = "TableHeader";
|
|
1943
|
-
var TableBody =
|
|
2318
|
+
var TableBody = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1944
2319
|
"tbody",
|
|
1945
2320
|
{
|
|
1946
2321
|
ref,
|
|
@@ -1949,7 +2324,7 @@ var TableBody = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
1949
2324
|
}
|
|
1950
2325
|
));
|
|
1951
2326
|
TableBody.displayName = "TableBody";
|
|
1952
|
-
var TableFooter =
|
|
2327
|
+
var TableFooter = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1953
2328
|
"tfoot",
|
|
1954
2329
|
{
|
|
1955
2330
|
ref,
|
|
@@ -1961,7 +2336,7 @@ var TableFooter = React29.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1961
2336
|
}
|
|
1962
2337
|
));
|
|
1963
2338
|
TableFooter.displayName = "TableFooter";
|
|
1964
|
-
var TableRow =
|
|
2339
|
+
var TableRow = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1965
2340
|
"tr",
|
|
1966
2341
|
{
|
|
1967
2342
|
ref,
|
|
@@ -1973,7 +2348,7 @@ var TableRow = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1973
2348
|
}
|
|
1974
2349
|
));
|
|
1975
2350
|
TableRow.displayName = "TableRow";
|
|
1976
|
-
var TableHead =
|
|
2351
|
+
var TableHead = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1977
2352
|
"th",
|
|
1978
2353
|
{
|
|
1979
2354
|
ref,
|
|
@@ -1985,7 +2360,7 @@ var TableHead = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
1985
2360
|
}
|
|
1986
2361
|
));
|
|
1987
2362
|
TableHead.displayName = "TableHead";
|
|
1988
|
-
var TableCell =
|
|
2363
|
+
var TableCell = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1989
2364
|
"td",
|
|
1990
2365
|
{
|
|
1991
2366
|
ref,
|
|
@@ -1997,7 +2372,7 @@ var TableCell = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
1997
2372
|
}
|
|
1998
2373
|
));
|
|
1999
2374
|
TableCell.displayName = "TableCell";
|
|
2000
|
-
var TableCaption =
|
|
2375
|
+
var TableCaption = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
2001
2376
|
"caption",
|
|
2002
2377
|
{
|
|
2003
2378
|
ref,
|
|
@@ -2008,7 +2383,7 @@ var TableCaption = React29.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2008
2383
|
TableCaption.displayName = "TableCaption";
|
|
2009
2384
|
|
|
2010
2385
|
// src/components/data-table/data-table.tsx
|
|
2011
|
-
import * as
|
|
2386
|
+
import * as React33 from "react";
|
|
2012
2387
|
import {
|
|
2013
2388
|
useReactTable,
|
|
2014
2389
|
getCoreRowModel,
|
|
@@ -2020,7 +2395,7 @@ import { ChevronsUpDown as ChevronsUpDown2 } from "lucide-react";
|
|
|
2020
2395
|
|
|
2021
2396
|
// src/components/data-table/data-table-pagination.tsx
|
|
2022
2397
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
2023
|
-
import { jsx as
|
|
2398
|
+
import { jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2024
2399
|
function DataTablePagination({
|
|
2025
2400
|
table,
|
|
2026
2401
|
pageSizeOptions = [10, 20, 30, 50],
|
|
@@ -2030,7 +2405,7 @@ function DataTablePagination({
|
|
|
2030
2405
|
const totalRows = table.getFilteredRowModel().rows.length;
|
|
2031
2406
|
const from = pageIndex * pageSize + 1;
|
|
2032
2407
|
const to = Math.min((pageIndex + 1) * pageSize, totalRows);
|
|
2033
|
-
return /* @__PURE__ */
|
|
2408
|
+
return /* @__PURE__ */ jsxs12(
|
|
2034
2409
|
"div",
|
|
2035
2410
|
{
|
|
2036
2411
|
className: cn(
|
|
@@ -2038,40 +2413,40 @@ function DataTablePagination({
|
|
|
2038
2413
|
className
|
|
2039
2414
|
),
|
|
2040
2415
|
children: [
|
|
2041
|
-
/* @__PURE__ */
|
|
2042
|
-
/* @__PURE__ */
|
|
2043
|
-
/* @__PURE__ */
|
|
2416
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2", children: [
|
|
2417
|
+
/* @__PURE__ */ jsx31("span", { className: "hidden sm:inline", children: "Rows per page" }),
|
|
2418
|
+
/* @__PURE__ */ jsx31(
|
|
2044
2419
|
"select",
|
|
2045
2420
|
{
|
|
2046
2421
|
value: pageSize,
|
|
2047
2422
|
onChange: (e) => table.setPageSize(Number(e.target.value)),
|
|
2048
2423
|
className: "h-8 rounded-md border border-[var(--color-border-input)] bg-[var(--color-surface-raised)] px-2 text-sm",
|
|
2049
2424
|
"aria-label": "Rows per page",
|
|
2050
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */
|
|
2425
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx31("option", { value: size, children: size }, size))
|
|
2051
2426
|
}
|
|
2052
2427
|
)
|
|
2053
2428
|
] }),
|
|
2054
|
-
/* @__PURE__ */
|
|
2055
|
-
/* @__PURE__ */
|
|
2056
|
-
/* @__PURE__ */
|
|
2057
|
-
/* @__PURE__ */
|
|
2429
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-4", children: [
|
|
2430
|
+
/* @__PURE__ */ jsx31("span", { children: totalRows > 0 ? `${from}-${to} of ${totalRows}` : "0 results" }),
|
|
2431
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-1", children: [
|
|
2432
|
+
/* @__PURE__ */ jsx31(
|
|
2058
2433
|
"button",
|
|
2059
2434
|
{
|
|
2060
2435
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-md border border-[var(--color-border-input)] bg-[var(--color-surface-raised)] transition-colors hover:bg-[var(--color-surface-sunken)] disabled:opacity-50 disabled:pointer-events-none",
|
|
2061
2436
|
onClick: () => table.previousPage(),
|
|
2062
2437
|
disabled: !table.getCanPreviousPage(),
|
|
2063
2438
|
"aria-label": "Previous page",
|
|
2064
|
-
children: /* @__PURE__ */
|
|
2439
|
+
children: /* @__PURE__ */ jsx31(ChevronLeft, { className: "h-4 w-4" })
|
|
2065
2440
|
}
|
|
2066
2441
|
),
|
|
2067
|
-
/* @__PURE__ */
|
|
2442
|
+
/* @__PURE__ */ jsx31(
|
|
2068
2443
|
"button",
|
|
2069
2444
|
{
|
|
2070
2445
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-md border border-[var(--color-border-input)] bg-[var(--color-surface-raised)] transition-colors hover:bg-[var(--color-surface-sunken)] disabled:opacity-50 disabled:pointer-events-none",
|
|
2071
2446
|
onClick: () => table.nextPage(),
|
|
2072
2447
|
disabled: !table.getCanNextPage(),
|
|
2073
2448
|
"aria-label": "Next page",
|
|
2074
|
-
children: /* @__PURE__ */
|
|
2449
|
+
children: /* @__PURE__ */ jsx31(ChevronRight, { className: "h-4 w-4" })
|
|
2075
2450
|
}
|
|
2076
2451
|
)
|
|
2077
2452
|
] })
|
|
@@ -2083,19 +2458,19 @@ function DataTablePagination({
|
|
|
2083
2458
|
DataTablePagination.displayName = "DataTablePagination";
|
|
2084
2459
|
|
|
2085
2460
|
// src/components/data-table/data-table-toolbar.tsx
|
|
2086
|
-
import * as
|
|
2461
|
+
import * as React32 from "react";
|
|
2087
2462
|
import { Columns3 } from "lucide-react";
|
|
2088
|
-
import { jsx as
|
|
2463
|
+
import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2089
2464
|
function DataTableToolbar({
|
|
2090
2465
|
table,
|
|
2091
2466
|
enableColumnVisibility = false,
|
|
2092
2467
|
className,
|
|
2093
2468
|
children
|
|
2094
2469
|
}) {
|
|
2095
|
-
const [showColumnMenu, setShowColumnMenu] =
|
|
2096
|
-
const menuRef =
|
|
2470
|
+
const [showColumnMenu, setShowColumnMenu] = React32.useState(false);
|
|
2471
|
+
const menuRef = React32.useRef(null);
|
|
2097
2472
|
const selectedCount = table.getFilteredSelectedRowModel().rows.length;
|
|
2098
|
-
|
|
2473
|
+
React32.useEffect(() => {
|
|
2099
2474
|
function handleClickOutside(event) {
|
|
2100
2475
|
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
2101
2476
|
setShowColumnMenu(false);
|
|
@@ -2106,7 +2481,7 @@ function DataTableToolbar({
|
|
|
2106
2481
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
2107
2482
|
}
|
|
2108
2483
|
}, [showColumnMenu]);
|
|
2109
|
-
return /* @__PURE__ */
|
|
2484
|
+
return /* @__PURE__ */ jsxs13(
|
|
2110
2485
|
"div",
|
|
2111
2486
|
{
|
|
2112
2487
|
className: cn(
|
|
@@ -2114,15 +2489,15 @@ function DataTableToolbar({
|
|
|
2114
2489
|
className
|
|
2115
2490
|
),
|
|
2116
2491
|
children: [
|
|
2117
|
-
/* @__PURE__ */
|
|
2118
|
-
selectedCount > 0 && /* @__PURE__ */
|
|
2492
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2", children: [
|
|
2493
|
+
selectedCount > 0 && /* @__PURE__ */ jsxs13("span", { className: "text-sm text-[var(--color-on-surface-secondary)]", children: [
|
|
2119
2494
|
selectedCount,
|
|
2120
2495
|
" selected"
|
|
2121
2496
|
] }),
|
|
2122
2497
|
children
|
|
2123
2498
|
] }),
|
|
2124
|
-
enableColumnVisibility && /* @__PURE__ */
|
|
2125
|
-
/* @__PURE__ */
|
|
2499
|
+
enableColumnVisibility && /* @__PURE__ */ jsxs13("div", { className: "relative", ref: menuRef, children: [
|
|
2500
|
+
/* @__PURE__ */ jsxs13(
|
|
2126
2501
|
"button",
|
|
2127
2502
|
{
|
|
2128
2503
|
className: "inline-flex items-center gap-1 rounded-md border border-[var(--color-border-input)] bg-[var(--color-surface-raised)] px-3 py-1.5 text-sm transition-colors hover:bg-[var(--color-surface-sunken)]",
|
|
@@ -2130,17 +2505,17 @@ function DataTableToolbar({
|
|
|
2130
2505
|
"aria-label": "Toggle columns",
|
|
2131
2506
|
"aria-expanded": showColumnMenu,
|
|
2132
2507
|
children: [
|
|
2133
|
-
/* @__PURE__ */
|
|
2508
|
+
/* @__PURE__ */ jsx32(Columns3, { className: "h-3.5 w-3.5" }),
|
|
2134
2509
|
"Columns"
|
|
2135
2510
|
]
|
|
2136
2511
|
}
|
|
2137
2512
|
),
|
|
2138
|
-
showColumnMenu && /* @__PURE__ */
|
|
2513
|
+
showColumnMenu && /* @__PURE__ */ jsx32("div", { className: "absolute right-0 top-full z-popover mt-1 min-w-[10rem] rounded-md border border-[var(--color-border)] bg-[var(--color-surface-raised)] p-2 shadow-md", children: table.getAllColumns().filter((col) => col.getCanHide()).map((col) => /* @__PURE__ */ jsxs13(
|
|
2139
2514
|
"label",
|
|
2140
2515
|
{
|
|
2141
2516
|
className: "flex items-center gap-2 rounded px-2 py-1 text-sm hover:bg-[var(--color-surface-sunken)] cursor-pointer capitalize",
|
|
2142
2517
|
children: [
|
|
2143
|
-
/* @__PURE__ */
|
|
2518
|
+
/* @__PURE__ */ jsx32(
|
|
2144
2519
|
"input",
|
|
2145
2520
|
{
|
|
2146
2521
|
type: "checkbox",
|
|
@@ -2162,7 +2537,7 @@ function DataTableToolbar({
|
|
|
2162
2537
|
DataTableToolbar.displayName = "DataTableToolbar";
|
|
2163
2538
|
|
|
2164
2539
|
// src/components/data-table/data-table.tsx
|
|
2165
|
-
import { jsx as
|
|
2540
|
+
import { jsx as jsx33, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2166
2541
|
function DataTable({
|
|
2167
2542
|
columns,
|
|
2168
2543
|
data,
|
|
@@ -2177,14 +2552,14 @@ function DataTable({
|
|
|
2177
2552
|
className,
|
|
2178
2553
|
"aria-label": ariaLabel
|
|
2179
2554
|
}) {
|
|
2180
|
-
const [sorting, setSorting] =
|
|
2181
|
-
const [rowSelection, setRowSelection] =
|
|
2182
|
-
const [columnVisibility, setColumnVisibility] =
|
|
2183
|
-
const allColumns =
|
|
2555
|
+
const [sorting, setSorting] = React33.useState([]);
|
|
2556
|
+
const [rowSelection, setRowSelection] = React33.useState({});
|
|
2557
|
+
const [columnVisibility, setColumnVisibility] = React33.useState({});
|
|
2558
|
+
const allColumns = React33.useMemo(() => {
|
|
2184
2559
|
if (!enableRowSelection) return columns;
|
|
2185
2560
|
const selectColumn = {
|
|
2186
2561
|
id: "select",
|
|
2187
|
-
header: ({ table: table2 }) => /* @__PURE__ */
|
|
2562
|
+
header: ({ table: table2 }) => /* @__PURE__ */ jsx33(
|
|
2188
2563
|
Checkbox,
|
|
2189
2564
|
{
|
|
2190
2565
|
checked: table2.getIsAllPageRowsSelected() ? true : table2.getIsSomePageRowsSelected() ? "indeterminate" : false,
|
|
@@ -2192,7 +2567,7 @@ function DataTable({
|
|
|
2192
2567
|
"aria-label": "Select all"
|
|
2193
2568
|
}
|
|
2194
2569
|
),
|
|
2195
|
-
cell: ({ row }) => /* @__PURE__ */
|
|
2570
|
+
cell: ({ row }) => /* @__PURE__ */ jsx33(
|
|
2196
2571
|
Checkbox,
|
|
2197
2572
|
{
|
|
2198
2573
|
checked: row.getIsSelected(),
|
|
@@ -2220,23 +2595,23 @@ function DataTable({
|
|
|
2220
2595
|
enableRowSelection,
|
|
2221
2596
|
initialState: { pagination: { pageSize } }
|
|
2222
2597
|
});
|
|
2223
|
-
|
|
2598
|
+
React33.useEffect(() => {
|
|
2224
2599
|
if (onRowSelectionChange) {
|
|
2225
2600
|
const selectedRows = table.getFilteredSelectedRowModel().rows.map((row) => row.original);
|
|
2226
2601
|
onRowSelectionChange(selectedRows);
|
|
2227
2602
|
}
|
|
2228
2603
|
}, [rowSelection, table, onRowSelectionChange]);
|
|
2229
2604
|
const showToolbar = enableRowSelection || enableColumnVisibility;
|
|
2230
|
-
return /* @__PURE__ */
|
|
2231
|
-
showToolbar && /* @__PURE__ */
|
|
2605
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn("rounded-md border border-[var(--color-border)]", className), children: [
|
|
2606
|
+
showToolbar && /* @__PURE__ */ jsx33(
|
|
2232
2607
|
DataTableToolbar,
|
|
2233
2608
|
{
|
|
2234
2609
|
table,
|
|
2235
2610
|
enableColumnVisibility
|
|
2236
2611
|
}
|
|
2237
2612
|
),
|
|
2238
|
-
/* @__PURE__ */
|
|
2239
|
-
/* @__PURE__ */
|
|
2613
|
+
/* @__PURE__ */ jsxs14(Table, { "aria-label": ariaLabel, children: [
|
|
2614
|
+
/* @__PURE__ */ jsx33(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx33(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx33(TableHead, { children: header.isPlaceholder ? null : header.column.getCanSort() ? /* @__PURE__ */ jsxs14(
|
|
2240
2615
|
"button",
|
|
2241
2616
|
{
|
|
2242
2617
|
className: "flex items-center gap-1 -ml-2 px-2 py-1 rounded-md hover:bg-[var(--color-surface-muted)] transition-colors duration-fast",
|
|
@@ -2247,7 +2622,7 @@ function DataTable({
|
|
|
2247
2622
|
header.column.columnDef.header,
|
|
2248
2623
|
header.getContext()
|
|
2249
2624
|
),
|
|
2250
|
-
/* @__PURE__ */
|
|
2625
|
+
/* @__PURE__ */ jsx33(
|
|
2251
2626
|
ChevronsUpDown2,
|
|
2252
2627
|
{
|
|
2253
2628
|
className: cn(
|
|
@@ -2262,14 +2637,14 @@ function DataTable({
|
|
|
2262
2637
|
header.column.columnDef.header,
|
|
2263
2638
|
header.getContext()
|
|
2264
2639
|
) }, header.id)) }, headerGroup.id)) }),
|
|
2265
|
-
/* @__PURE__ */
|
|
2640
|
+
/* @__PURE__ */ jsx33(TableBody, { children: table.getRowModel().rows.length > 0 ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx33(
|
|
2266
2641
|
TableRow,
|
|
2267
2642
|
{
|
|
2268
2643
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
2269
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */
|
|
2644
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx33(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
|
|
2270
2645
|
},
|
|
2271
2646
|
row.id
|
|
2272
|
-
)) : /* @__PURE__ */
|
|
2647
|
+
)) : /* @__PURE__ */ jsx33(TableRow, { children: /* @__PURE__ */ jsx33(
|
|
2273
2648
|
TableCell,
|
|
2274
2649
|
{
|
|
2275
2650
|
colSpan: allColumns.length,
|
|
@@ -2278,7 +2653,7 @@ function DataTable({
|
|
|
2278
2653
|
}
|
|
2279
2654
|
) }) })
|
|
2280
2655
|
] }),
|
|
2281
|
-
enablePagination && /* @__PURE__ */
|
|
2656
|
+
enablePagination && /* @__PURE__ */ jsx33(
|
|
2282
2657
|
DataTablePagination,
|
|
2283
2658
|
{
|
|
2284
2659
|
table,
|
|
@@ -2291,17 +2666,17 @@ DataTable.displayName = "DataTable";
|
|
|
2291
2666
|
|
|
2292
2667
|
// src/components/data-table/data-table-column-header.tsx
|
|
2293
2668
|
import { ChevronsUpDown as ChevronsUpDown3 } from "lucide-react";
|
|
2294
|
-
import { jsx as
|
|
2669
|
+
import { jsx as jsx34, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2295
2670
|
function DataTableColumnHeader({
|
|
2296
2671
|
column,
|
|
2297
2672
|
title,
|
|
2298
2673
|
className
|
|
2299
2674
|
}) {
|
|
2300
2675
|
if (!column.getCanSort()) {
|
|
2301
|
-
return /* @__PURE__ */
|
|
2676
|
+
return /* @__PURE__ */ jsx34("div", { className: cn(className), children: title });
|
|
2302
2677
|
}
|
|
2303
2678
|
const sorted = column.getIsSorted();
|
|
2304
|
-
return /* @__PURE__ */
|
|
2679
|
+
return /* @__PURE__ */ jsxs15(
|
|
2305
2680
|
"button",
|
|
2306
2681
|
{
|
|
2307
2682
|
className: cn(
|
|
@@ -2312,7 +2687,7 @@ function DataTableColumnHeader({
|
|
|
2312
2687
|
"aria-label": `Sort by ${title}`,
|
|
2313
2688
|
children: [
|
|
2314
2689
|
title,
|
|
2315
|
-
/* @__PURE__ */
|
|
2690
|
+
/* @__PURE__ */ jsx34(
|
|
2316
2691
|
ChevronsUpDown3,
|
|
2317
2692
|
{
|
|
2318
2693
|
className: cn(
|
|
@@ -2321,8 +2696,8 @@ function DataTableColumnHeader({
|
|
|
2321
2696
|
)
|
|
2322
2697
|
}
|
|
2323
2698
|
),
|
|
2324
|
-
sorted === "asc" && /* @__PURE__ */
|
|
2325
|
-
sorted === "desc" && /* @__PURE__ */
|
|
2699
|
+
sorted === "asc" && /* @__PURE__ */ jsx34("span", { className: "sr-only", children: "sorted ascending" }),
|
|
2700
|
+
sorted === "desc" && /* @__PURE__ */ jsx34("span", { className: "sr-only", children: "sorted descending" })
|
|
2326
2701
|
]
|
|
2327
2702
|
}
|
|
2328
2703
|
);
|
|
@@ -2330,11 +2705,11 @@ function DataTableColumnHeader({
|
|
|
2330
2705
|
DataTableColumnHeader.displayName = "DataTableColumnHeader";
|
|
2331
2706
|
|
|
2332
2707
|
// src/components/filter-bar/filter-bar.tsx
|
|
2333
|
-
import * as
|
|
2334
|
-
import { cva as
|
|
2708
|
+
import * as React34 from "react";
|
|
2709
|
+
import { cva as cva15 } from "class-variance-authority";
|
|
2335
2710
|
import { X as X2 } from "lucide-react";
|
|
2336
|
-
import { jsx as
|
|
2337
|
-
var FilterBar =
|
|
2711
|
+
import { jsx as jsx35, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2712
|
+
var FilterBar = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
2338
2713
|
"div",
|
|
2339
2714
|
{
|
|
2340
2715
|
ref,
|
|
@@ -2348,7 +2723,7 @@ var FilterBar = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2348
2723
|
}
|
|
2349
2724
|
));
|
|
2350
2725
|
FilterBar.displayName = "FilterBar";
|
|
2351
|
-
var FilterBarGroup =
|
|
2726
|
+
var FilterBarGroup = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
2352
2727
|
"div",
|
|
2353
2728
|
{
|
|
2354
2729
|
ref,
|
|
@@ -2358,7 +2733,7 @@ var FilterBarGroup = React32.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
2358
2733
|
}
|
|
2359
2734
|
));
|
|
2360
2735
|
FilterBarGroup.displayName = "FilterBarGroup";
|
|
2361
|
-
var filterChipVariants =
|
|
2736
|
+
var filterChipVariants = cva15(
|
|
2362
2737
|
"inline-flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium transition-colors duration-fast",
|
|
2363
2738
|
{
|
|
2364
2739
|
variants: {
|
|
@@ -2370,27 +2745,27 @@ var filterChipVariants = cva13(
|
|
|
2370
2745
|
defaultVariants: { variant: "default" }
|
|
2371
2746
|
}
|
|
2372
2747
|
);
|
|
2373
|
-
var FilterChip =
|
|
2374
|
-
({ className, variant, label, value, onRemove, ...props }, ref) => /* @__PURE__ */
|
|
2748
|
+
var FilterChip = React34.forwardRef(
|
|
2749
|
+
({ className, variant, label, value, onRemove, ...props }, ref) => /* @__PURE__ */ jsxs16(
|
|
2375
2750
|
"span",
|
|
2376
2751
|
{
|
|
2377
2752
|
ref,
|
|
2378
2753
|
className: cn(filterChipVariants({ variant }), className),
|
|
2379
2754
|
...props,
|
|
2380
2755
|
children: [
|
|
2381
|
-
/* @__PURE__ */
|
|
2756
|
+
/* @__PURE__ */ jsxs16("span", { className: "text-xs opacity-70", children: [
|
|
2382
2757
|
label,
|
|
2383
2758
|
":"
|
|
2384
2759
|
] }),
|
|
2385
|
-
/* @__PURE__ */
|
|
2386
|
-
onRemove && /* @__PURE__ */
|
|
2760
|
+
/* @__PURE__ */ jsx35("span", { children: value }),
|
|
2761
|
+
onRemove && /* @__PURE__ */ jsx35(
|
|
2387
2762
|
"button",
|
|
2388
2763
|
{
|
|
2389
2764
|
type: "button",
|
|
2390
2765
|
onClick: onRemove,
|
|
2391
2766
|
className: "ml-0.5 rounded-full p-0.5 hover:bg-black/10 transition-colors",
|
|
2392
2767
|
"aria-label": `Remove ${label} filter`,
|
|
2393
|
-
children: /* @__PURE__ */
|
|
2768
|
+
children: /* @__PURE__ */ jsx35(X2, { className: "h-3 w-3" })
|
|
2394
2769
|
}
|
|
2395
2770
|
)
|
|
2396
2771
|
]
|
|
@@ -2398,7 +2773,7 @@ var FilterChip = React32.forwardRef(
|
|
|
2398
2773
|
)
|
|
2399
2774
|
);
|
|
2400
2775
|
FilterChip.displayName = "FilterChip";
|
|
2401
|
-
var ActiveFilters =
|
|
2776
|
+
var ActiveFilters = React34.forwardRef(({ className, onClearAll, clearAllLabel = "Clear all", children, ...props }, ref) => /* @__PURE__ */ jsxs16(
|
|
2402
2777
|
"div",
|
|
2403
2778
|
{
|
|
2404
2779
|
ref,
|
|
@@ -2406,7 +2781,7 @@ var ActiveFilters = React32.forwardRef(({ className, onClearAll, clearAllLabel =
|
|
|
2406
2781
|
...props,
|
|
2407
2782
|
children: [
|
|
2408
2783
|
children,
|
|
2409
|
-
onClearAll && /* @__PURE__ */
|
|
2784
|
+
onClearAll && /* @__PURE__ */ jsx35(
|
|
2410
2785
|
"button",
|
|
2411
2786
|
{
|
|
2412
2787
|
type: "button",
|
|
@@ -2419,7 +2794,7 @@ var ActiveFilters = React32.forwardRef(({ className, onClearAll, clearAllLabel =
|
|
|
2419
2794
|
}
|
|
2420
2795
|
));
|
|
2421
2796
|
ActiveFilters.displayName = "ActiveFilters";
|
|
2422
|
-
var FilterBarActions =
|
|
2797
|
+
var FilterBarActions = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
2423
2798
|
"div",
|
|
2424
2799
|
{
|
|
2425
2800
|
ref,
|
|
@@ -2430,13 +2805,13 @@ var FilterBarActions = React32.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
2430
2805
|
FilterBarActions.displayName = "FilterBarActions";
|
|
2431
2806
|
|
|
2432
2807
|
// src/components/popover/popover.tsx
|
|
2433
|
-
import * as
|
|
2808
|
+
import * as React35 from "react";
|
|
2434
2809
|
import * as PopoverPrimitive2 from "@radix-ui/react-popover";
|
|
2435
|
-
import { jsx as
|
|
2810
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2436
2811
|
var Popover = PopoverPrimitive2.Root;
|
|
2437
2812
|
var PopoverTrigger = PopoverPrimitive2.Trigger;
|
|
2438
2813
|
var PopoverAnchor = PopoverPrimitive2.Anchor;
|
|
2439
|
-
var PopoverContent =
|
|
2814
|
+
var PopoverContent = React35.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx36(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx36(
|
|
2440
2815
|
PopoverPrimitive2.Content,
|
|
2441
2816
|
{
|
|
2442
2817
|
ref,
|
|
@@ -2456,17 +2831,17 @@ var PopoverContent = React33.forwardRef(({ className, align = "center", sideOffs
|
|
|
2456
2831
|
PopoverContent.displayName = "PopoverContent";
|
|
2457
2832
|
|
|
2458
2833
|
// src/components/dropdown-menu/dropdown-menu.tsx
|
|
2459
|
-
import * as
|
|
2834
|
+
import * as React36 from "react";
|
|
2460
2835
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2461
|
-
import { Check as
|
|
2462
|
-
import { jsx as
|
|
2836
|
+
import { Check as Check5, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
2837
|
+
import { jsx as jsx37, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2463
2838
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
2464
2839
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
2465
2840
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
2466
2841
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
2467
2842
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
2468
2843
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
2469
|
-
var DropdownMenuContent =
|
|
2844
|
+
var DropdownMenuContent = React36.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx37(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx37(
|
|
2470
2845
|
DropdownMenuPrimitive.Content,
|
|
2471
2846
|
{
|
|
2472
2847
|
ref,
|
|
@@ -2483,7 +2858,7 @@ var DropdownMenuContent = React34.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
2483
2858
|
}
|
|
2484
2859
|
) }));
|
|
2485
2860
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
2486
|
-
var DropdownMenuSubTrigger =
|
|
2861
|
+
var DropdownMenuSubTrigger = React36.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs17(
|
|
2487
2862
|
DropdownMenuPrimitive.SubTrigger,
|
|
2488
2863
|
{
|
|
2489
2864
|
ref,
|
|
@@ -2498,12 +2873,12 @@ var DropdownMenuSubTrigger = React34.forwardRef(({ className, inset, children, .
|
|
|
2498
2873
|
...props,
|
|
2499
2874
|
children: [
|
|
2500
2875
|
children,
|
|
2501
|
-
/* @__PURE__ */
|
|
2876
|
+
/* @__PURE__ */ jsx37(ChevronRight2, { className: "ml-auto h-3.5 w-3.5" })
|
|
2502
2877
|
]
|
|
2503
2878
|
}
|
|
2504
2879
|
));
|
|
2505
2880
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
2506
|
-
var DropdownMenuSubContent =
|
|
2881
|
+
var DropdownMenuSubContent = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
2507
2882
|
DropdownMenuPrimitive.SubContent,
|
|
2508
2883
|
{
|
|
2509
2884
|
ref,
|
|
@@ -2518,7 +2893,7 @@ var DropdownMenuSubContent = React34.forwardRef(({ className, ...props }, ref) =
|
|
|
2518
2893
|
}
|
|
2519
2894
|
));
|
|
2520
2895
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
2521
|
-
var DropdownMenuItem =
|
|
2896
|
+
var DropdownMenuItem = React36.forwardRef(({ className, inset, destructive, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
2522
2897
|
DropdownMenuPrimitive.Item,
|
|
2523
2898
|
{
|
|
2524
2899
|
ref,
|
|
@@ -2535,7 +2910,7 @@ var DropdownMenuItem = React34.forwardRef(({ className, inset, destructive, ...p
|
|
|
2535
2910
|
}
|
|
2536
2911
|
));
|
|
2537
2912
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
2538
|
-
var DropdownMenuCheckboxItem =
|
|
2913
|
+
var DropdownMenuCheckboxItem = React36.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs17(
|
|
2539
2914
|
DropdownMenuPrimitive.CheckboxItem,
|
|
2540
2915
|
{
|
|
2541
2916
|
ref,
|
|
@@ -2549,13 +2924,13 @@ var DropdownMenuCheckboxItem = React34.forwardRef(({ className, children, checke
|
|
|
2549
2924
|
checked,
|
|
2550
2925
|
...props,
|
|
2551
2926
|
children: [
|
|
2552
|
-
/* @__PURE__ */
|
|
2927
|
+
/* @__PURE__ */ jsx37("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx37(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx37(Check5, { className: "h-3.5 w-3.5" }) }) }),
|
|
2553
2928
|
children
|
|
2554
2929
|
]
|
|
2555
2930
|
}
|
|
2556
2931
|
));
|
|
2557
2932
|
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
2558
|
-
var DropdownMenuRadioItem =
|
|
2933
|
+
var DropdownMenuRadioItem = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs17(
|
|
2559
2934
|
DropdownMenuPrimitive.RadioItem,
|
|
2560
2935
|
{
|
|
2561
2936
|
ref,
|
|
@@ -2568,13 +2943,13 @@ var DropdownMenuRadioItem = React34.forwardRef(({ className, children, ...props
|
|
|
2568
2943
|
),
|
|
2569
2944
|
...props,
|
|
2570
2945
|
children: [
|
|
2571
|
-
/* @__PURE__ */
|
|
2946
|
+
/* @__PURE__ */ jsx37("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx37(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx37("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "currentColor", children: /* @__PURE__ */ jsx37("circle", { cx: "4", cy: "4", r: "4" }) }) }) }),
|
|
2572
2947
|
children
|
|
2573
2948
|
]
|
|
2574
2949
|
}
|
|
2575
2950
|
));
|
|
2576
2951
|
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
2577
|
-
var DropdownMenuLabel =
|
|
2952
|
+
var DropdownMenuLabel = React36.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
2578
2953
|
DropdownMenuPrimitive.Label,
|
|
2579
2954
|
{
|
|
2580
2955
|
ref,
|
|
@@ -2587,7 +2962,7 @@ var DropdownMenuLabel = React34.forwardRef(({ className, inset, ...props }, ref)
|
|
|
2587
2962
|
}
|
|
2588
2963
|
));
|
|
2589
2964
|
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
2590
|
-
var DropdownMenuSeparator =
|
|
2965
|
+
var DropdownMenuSeparator = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
2591
2966
|
DropdownMenuPrimitive.Separator,
|
|
2592
2967
|
{
|
|
2593
2968
|
ref,
|
|
@@ -2599,7 +2974,7 @@ DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
|
2599
2974
|
var DropdownMenuShortcut = ({
|
|
2600
2975
|
className,
|
|
2601
2976
|
...props
|
|
2602
|
-
}) => /* @__PURE__ */
|
|
2977
|
+
}) => /* @__PURE__ */ jsx37(
|
|
2603
2978
|
"span",
|
|
2604
2979
|
{
|
|
2605
2980
|
className: cn(
|
|
@@ -2612,14 +2987,14 @@ var DropdownMenuShortcut = ({
|
|
|
2612
2987
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
2613
2988
|
|
|
2614
2989
|
// src/components/dialog/dialog.tsx
|
|
2615
|
-
import * as
|
|
2990
|
+
import * as React37 from "react";
|
|
2616
2991
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2617
2992
|
import { X as X3 } from "lucide-react";
|
|
2618
|
-
import { jsx as
|
|
2993
|
+
import { jsx as jsx38, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2619
2994
|
var Dialog = DialogPrimitive.Root;
|
|
2620
2995
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
2621
2996
|
var DialogClose = DialogPrimitive.Close;
|
|
2622
|
-
var DialogOverlay =
|
|
2997
|
+
var DialogOverlay = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
2623
2998
|
DialogPrimitive.Overlay,
|
|
2624
2999
|
{
|
|
2625
3000
|
ref,
|
|
@@ -2633,9 +3008,9 @@ var DialogOverlay = React35.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
2633
3008
|
}
|
|
2634
3009
|
));
|
|
2635
3010
|
DialogOverlay.displayName = "DialogOverlay";
|
|
2636
|
-
var DialogContent =
|
|
2637
|
-
/* @__PURE__ */
|
|
2638
|
-
/* @__PURE__ */
|
|
3011
|
+
var DialogContent = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs18(DialogPrimitive.Portal, { children: [
|
|
3012
|
+
/* @__PURE__ */ jsx38(DialogOverlay, {}),
|
|
3013
|
+
/* @__PURE__ */ jsxs18(
|
|
2639
3014
|
DialogPrimitive.Content,
|
|
2640
3015
|
{
|
|
2641
3016
|
ref,
|
|
@@ -2657,9 +3032,9 @@ var DialogContent = React35.forwardRef(({ className, children, ...props }, ref)
|
|
|
2657
3032
|
...props,
|
|
2658
3033
|
children: [
|
|
2659
3034
|
children,
|
|
2660
|
-
/* @__PURE__ */
|
|
2661
|
-
/* @__PURE__ */
|
|
2662
|
-
/* @__PURE__ */
|
|
3035
|
+
/* @__PURE__ */ jsxs18(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:pointer-events-none", children: [
|
|
3036
|
+
/* @__PURE__ */ jsx38(X3, { className: "h-4 w-4" }),
|
|
3037
|
+
/* @__PURE__ */ jsx38("span", { className: "sr-only", children: "Close" })
|
|
2663
3038
|
] })
|
|
2664
3039
|
]
|
|
2665
3040
|
}
|
|
@@ -2669,7 +3044,7 @@ DialogContent.displayName = "DialogContent";
|
|
|
2669
3044
|
var DialogHeader = ({
|
|
2670
3045
|
className,
|
|
2671
3046
|
...props
|
|
2672
|
-
}) => /* @__PURE__ */
|
|
3047
|
+
}) => /* @__PURE__ */ jsx38(
|
|
2673
3048
|
"div",
|
|
2674
3049
|
{
|
|
2675
3050
|
className: cn("flex flex-col gap-1.5 text-center sm:text-left", className),
|
|
@@ -2680,7 +3055,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
2680
3055
|
var DialogFooter = ({
|
|
2681
3056
|
className,
|
|
2682
3057
|
...props
|
|
2683
|
-
}) => /* @__PURE__ */
|
|
3058
|
+
}) => /* @__PURE__ */ jsx38(
|
|
2684
3059
|
"div",
|
|
2685
3060
|
{
|
|
2686
3061
|
className: cn(
|
|
@@ -2691,7 +3066,7 @@ var DialogFooter = ({
|
|
|
2691
3066
|
}
|
|
2692
3067
|
);
|
|
2693
3068
|
DialogFooter.displayName = "DialogFooter";
|
|
2694
|
-
var DialogTitle =
|
|
3069
|
+
var DialogTitle = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
2695
3070
|
DialogPrimitive.Title,
|
|
2696
3071
|
{
|
|
2697
3072
|
ref,
|
|
@@ -2700,7 +3075,7 @@ var DialogTitle = React35.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2700
3075
|
}
|
|
2701
3076
|
));
|
|
2702
3077
|
DialogTitle.displayName = "DialogTitle";
|
|
2703
|
-
var DialogDescription =
|
|
3078
|
+
var DialogDescription = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
2704
3079
|
DialogPrimitive.Description,
|
|
2705
3080
|
{
|
|
2706
3081
|
ref,
|
|
@@ -2714,7 +3089,7 @@ DialogDescription.displayName = "DialogDescription";
|
|
|
2714
3089
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
2715
3090
|
import { Command as Command2 } from "cmdk";
|
|
2716
3091
|
import { Search } from "lucide-react";
|
|
2717
|
-
import { jsx as
|
|
3092
|
+
import { jsx as jsx39, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2718
3093
|
function CommandPalette({
|
|
2719
3094
|
open,
|
|
2720
3095
|
onOpenChange,
|
|
@@ -2722,9 +3097,9 @@ function CommandPalette({
|
|
|
2722
3097
|
className,
|
|
2723
3098
|
children
|
|
2724
3099
|
}) {
|
|
2725
|
-
return /* @__PURE__ */
|
|
2726
|
-
/* @__PURE__ */
|
|
2727
|
-
/* @__PURE__ */
|
|
3100
|
+
return /* @__PURE__ */ jsx39(DialogPrimitive2.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs19(DialogPrimitive2.Portal, { children: [
|
|
3101
|
+
/* @__PURE__ */ jsx39(DialogPrimitive2.Overlay, { className: "fixed inset-0 z-modal bg-[var(--color-surface-overlay)] animate-in fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0" }),
|
|
3102
|
+
/* @__PURE__ */ jsx39(
|
|
2728
3103
|
DialogPrimitive2.Content,
|
|
2729
3104
|
{
|
|
2730
3105
|
className: cn(
|
|
@@ -2733,10 +3108,10 @@ function CommandPalette({
|
|
|
2733
3108
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
2734
3109
|
className
|
|
2735
3110
|
),
|
|
2736
|
-
children: /* @__PURE__ */
|
|
2737
|
-
/* @__PURE__ */
|
|
2738
|
-
/* @__PURE__ */
|
|
2739
|
-
/* @__PURE__ */
|
|
3111
|
+
children: /* @__PURE__ */ jsxs19(Command2, { shouldFilter: true, className: "flex flex-col", children: [
|
|
3112
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center border-b border-[var(--color-border)] px-4", children: [
|
|
3113
|
+
/* @__PURE__ */ jsx39(Search, { className: "h-[18px] w-[18px] shrink-0 text-[var(--color-on-surface-muted)]" }),
|
|
3114
|
+
/* @__PURE__ */ jsx39(
|
|
2740
3115
|
Command2.Input,
|
|
2741
3116
|
{
|
|
2742
3117
|
placeholder,
|
|
@@ -2744,7 +3119,7 @@ function CommandPalette({
|
|
|
2744
3119
|
}
|
|
2745
3120
|
)
|
|
2746
3121
|
] }),
|
|
2747
|
-
/* @__PURE__ */
|
|
3122
|
+
/* @__PURE__ */ jsx39(Command2.List, { className: "max-h-80 overflow-auto p-2", children })
|
|
2748
3123
|
] })
|
|
2749
3124
|
}
|
|
2750
3125
|
)
|
|
@@ -2755,7 +3130,7 @@ function CommandPaletteGroup({
|
|
|
2755
3130
|
heading,
|
|
2756
3131
|
children
|
|
2757
3132
|
}) {
|
|
2758
|
-
return /* @__PURE__ */
|
|
3133
|
+
return /* @__PURE__ */ jsx39(
|
|
2759
3134
|
Command2.Group,
|
|
2760
3135
|
{
|
|
2761
3136
|
heading,
|
|
@@ -2773,7 +3148,7 @@ function CommandPaletteItem({
|
|
|
2773
3148
|
className,
|
|
2774
3149
|
children
|
|
2775
3150
|
}) {
|
|
2776
|
-
return /* @__PURE__ */
|
|
3151
|
+
return /* @__PURE__ */ jsxs19(
|
|
2777
3152
|
Command2.Item,
|
|
2778
3153
|
{
|
|
2779
3154
|
onSelect,
|
|
@@ -2785,9 +3160,9 @@ function CommandPaletteItem({
|
|
|
2785
3160
|
className
|
|
2786
3161
|
),
|
|
2787
3162
|
children: [
|
|
2788
|
-
icon && /* @__PURE__ */
|
|
2789
|
-
/* @__PURE__ */
|
|
2790
|
-
shortcut && /* @__PURE__ */
|
|
3163
|
+
icon && /* @__PURE__ */ jsx39("span", { className: "mr-2 flex h-4 w-4 items-center justify-center text-[var(--color-on-surface-muted)]", children: icon }),
|
|
3164
|
+
/* @__PURE__ */ jsx39("span", { className: "flex-1", children }),
|
|
3165
|
+
shortcut && /* @__PURE__ */ jsx39(CommandPaletteShortcut, { children: shortcut })
|
|
2791
3166
|
]
|
|
2792
3167
|
}
|
|
2793
3168
|
);
|
|
@@ -2797,7 +3172,7 @@ function CommandPaletteSeparator({
|
|
|
2797
3172
|
className,
|
|
2798
3173
|
...props
|
|
2799
3174
|
}) {
|
|
2800
|
-
return /* @__PURE__ */
|
|
3175
|
+
return /* @__PURE__ */ jsx39(
|
|
2801
3176
|
Command2.Separator,
|
|
2802
3177
|
{
|
|
2803
3178
|
className: cn("-mx-1 my-1 h-px bg-[var(--color-border)]", className),
|
|
@@ -2811,7 +3186,7 @@ function CommandPaletteEmpty({
|
|
|
2811
3186
|
children = "No results found.",
|
|
2812
3187
|
...props
|
|
2813
3188
|
}) {
|
|
2814
|
-
return /* @__PURE__ */
|
|
3189
|
+
return /* @__PURE__ */ jsx39(
|
|
2815
3190
|
Command2.Empty,
|
|
2816
3191
|
{
|
|
2817
3192
|
className: cn("px-2 py-6 text-center text-sm text-[var(--color-on-surface-muted)]", className),
|
|
@@ -2825,7 +3200,7 @@ function CommandPaletteShortcut({
|
|
|
2825
3200
|
className,
|
|
2826
3201
|
...props
|
|
2827
3202
|
}) {
|
|
2828
|
-
return /* @__PURE__ */
|
|
3203
|
+
return /* @__PURE__ */ jsx39(
|
|
2829
3204
|
"span",
|
|
2830
3205
|
{
|
|
2831
3206
|
className: cn(
|
|
@@ -2839,33 +3214,33 @@ function CommandPaletteShortcut({
|
|
|
2839
3214
|
CommandPaletteShortcut.displayName = "CommandPaletteShortcut";
|
|
2840
3215
|
|
|
2841
3216
|
// src/components/drawer/drawer.tsx
|
|
2842
|
-
import * as
|
|
3217
|
+
import * as React38 from "react";
|
|
2843
3218
|
import * as DialogPrimitive3 from "@radix-ui/react-dialog";
|
|
2844
|
-
import { cva as
|
|
3219
|
+
import { cva as cva16 } from "class-variance-authority";
|
|
2845
3220
|
import { Pin, X as X4 } from "lucide-react";
|
|
2846
|
-
import { jsx as
|
|
3221
|
+
import { jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2847
3222
|
var [DrawerContextProvider, useDrawerContext] = createContext2("Drawer");
|
|
2848
|
-
var DrawerStackContext =
|
|
3223
|
+
var DrawerStackContext = React38.createContext(
|
|
2849
3224
|
null
|
|
2850
3225
|
);
|
|
2851
3226
|
function DrawerProvider({ children }) {
|
|
2852
|
-
const stackRef =
|
|
2853
|
-
const [, forceUpdate] =
|
|
2854
|
-
const register =
|
|
3227
|
+
const stackRef = React38.useRef([]);
|
|
3228
|
+
const [, forceUpdate] = React38.useState(0);
|
|
3229
|
+
const register = React38.useCallback((id) => {
|
|
2855
3230
|
const level = stackRef.current.length;
|
|
2856
3231
|
stackRef.current = [...stackRef.current, { id, level }];
|
|
2857
3232
|
forceUpdate((n) => n + 1);
|
|
2858
3233
|
return level;
|
|
2859
3234
|
}, []);
|
|
2860
|
-
const unregister =
|
|
3235
|
+
const unregister = React38.useCallback((id) => {
|
|
2861
3236
|
stackRef.current = stackRef.current.filter((e) => e.id !== id);
|
|
2862
3237
|
forceUpdate((n) => n + 1);
|
|
2863
3238
|
}, []);
|
|
2864
|
-
const ctx =
|
|
3239
|
+
const ctx = React38.useMemo(
|
|
2865
3240
|
() => ({ stack: stackRef.current, register, unregister }),
|
|
2866
3241
|
[register, unregister]
|
|
2867
3242
|
);
|
|
2868
|
-
return /* @__PURE__ */
|
|
3243
|
+
return /* @__PURE__ */ jsx40(DrawerStackContext.Provider, { value: ctx, children });
|
|
2869
3244
|
}
|
|
2870
3245
|
DrawerProvider.displayName = "DrawerProvider";
|
|
2871
3246
|
function Drawer({
|
|
@@ -2877,12 +3252,12 @@ function Drawer({
|
|
|
2877
3252
|
onPinnedChange,
|
|
2878
3253
|
children
|
|
2879
3254
|
}) {
|
|
2880
|
-
return /* @__PURE__ */
|
|
3255
|
+
return /* @__PURE__ */ jsx40(DrawerContextProvider, { value: { side, pinnable, pinned, onPinnedChange }, children: /* @__PURE__ */ jsx40(DialogPrimitive3.Root, { open, onOpenChange, children }) });
|
|
2881
3256
|
}
|
|
2882
3257
|
Drawer.displayName = "Drawer";
|
|
2883
3258
|
var DrawerTrigger = DialogPrimitive3.Trigger;
|
|
2884
3259
|
var DrawerClose = DialogPrimitive3.Close;
|
|
2885
|
-
var drawerSizeVariants =
|
|
3260
|
+
var drawerSizeVariants = cva16("", {
|
|
2886
3261
|
variants: {
|
|
2887
3262
|
size: {
|
|
2888
3263
|
sm: "w-80",
|
|
@@ -2894,12 +3269,12 @@ var drawerSizeVariants = cva14("", {
|
|
|
2894
3269
|
},
|
|
2895
3270
|
defaultVariants: { size: "md" }
|
|
2896
3271
|
});
|
|
2897
|
-
var DrawerContent =
|
|
3272
|
+
var DrawerContent = React38.forwardRef(({ className, size, children, ...props }, ref) => {
|
|
2898
3273
|
const { side, pinned } = useDrawerContext();
|
|
2899
|
-
const stackCtx =
|
|
2900
|
-
const drawerId =
|
|
2901
|
-
const [level, setLevel] =
|
|
2902
|
-
|
|
3274
|
+
const stackCtx = React38.useContext(DrawerStackContext);
|
|
3275
|
+
const drawerId = React38.useId();
|
|
3276
|
+
const [level, setLevel] = React38.useState(0);
|
|
3277
|
+
React38.useEffect(() => {
|
|
2903
3278
|
if (stackCtx) {
|
|
2904
3279
|
const l = stackCtx.register(drawerId);
|
|
2905
3280
|
setLevel(l);
|
|
@@ -2908,7 +3283,7 @@ var DrawerContent = React36.forwardRef(({ className, size, children, ...props },
|
|
|
2908
3283
|
}, [stackCtx, drawerId]);
|
|
2909
3284
|
const stackOffset = stackCtx ? level * 2 : 0;
|
|
2910
3285
|
if (pinned) {
|
|
2911
|
-
return /* @__PURE__ */
|
|
3286
|
+
return /* @__PURE__ */ jsx40(
|
|
2912
3287
|
"div",
|
|
2913
3288
|
{
|
|
2914
3289
|
className: cn(
|
|
@@ -2921,8 +3296,8 @@ var DrawerContent = React36.forwardRef(({ className, size, children, ...props },
|
|
|
2921
3296
|
}
|
|
2922
3297
|
);
|
|
2923
3298
|
}
|
|
2924
|
-
return /* @__PURE__ */
|
|
2925
|
-
/* @__PURE__ */
|
|
3299
|
+
return /* @__PURE__ */ jsxs20(DialogPrimitive3.Portal, { children: [
|
|
3300
|
+
/* @__PURE__ */ jsx40(
|
|
2926
3301
|
DialogPrimitive3.Overlay,
|
|
2927
3302
|
{
|
|
2928
3303
|
className: cn(
|
|
@@ -2933,7 +3308,7 @@ var DrawerContent = React36.forwardRef(({ className, size, children, ...props },
|
|
|
2933
3308
|
style: { zIndex: 200 + stackOffset }
|
|
2934
3309
|
}
|
|
2935
3310
|
),
|
|
2936
|
-
/* @__PURE__ */
|
|
3311
|
+
/* @__PURE__ */ jsx40(
|
|
2937
3312
|
DialogPrimitive3.Content,
|
|
2938
3313
|
{
|
|
2939
3314
|
ref,
|
|
@@ -2947,15 +3322,15 @@ var DrawerContent = React36.forwardRef(({ className, size, children, ...props },
|
|
|
2947
3322
|
),
|
|
2948
3323
|
style: { zIndex: 201 + stackOffset },
|
|
2949
3324
|
...props,
|
|
2950
|
-
children: /* @__PURE__ */
|
|
3325
|
+
children: /* @__PURE__ */ jsx40("div", { className: "flex h-full flex-col", children })
|
|
2951
3326
|
}
|
|
2952
3327
|
)
|
|
2953
3328
|
] });
|
|
2954
3329
|
});
|
|
2955
3330
|
DrawerContent.displayName = "DrawerContent";
|
|
2956
|
-
var DrawerHeader =
|
|
3331
|
+
var DrawerHeader = React38.forwardRef(({ className, ...props }, ref) => {
|
|
2957
3332
|
const { pinnable, pinned, onPinnedChange } = useDrawerContext();
|
|
2958
|
-
return /* @__PURE__ */
|
|
3333
|
+
return /* @__PURE__ */ jsxs20(
|
|
2959
3334
|
"div",
|
|
2960
3335
|
{
|
|
2961
3336
|
ref,
|
|
@@ -2965,9 +3340,9 @@ var DrawerHeader = React36.forwardRef(({ className, ...props }, ref) => {
|
|
|
2965
3340
|
),
|
|
2966
3341
|
...props,
|
|
2967
3342
|
children: [
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
/* @__PURE__ */
|
|
2970
|
-
pinnable && /* @__PURE__ */
|
|
3343
|
+
/* @__PURE__ */ jsx40("div", { className: "flex-1", children: props.children }),
|
|
3344
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-1", children: [
|
|
3345
|
+
pinnable && /* @__PURE__ */ jsx40(
|
|
2971
3346
|
"button",
|
|
2972
3347
|
{
|
|
2973
3348
|
type: "button",
|
|
@@ -2977,12 +3352,12 @@ var DrawerHeader = React36.forwardRef(({ className, ...props }, ref) => {
|
|
|
2977
3352
|
pinned ? "opacity-100 text-primary-500" : "opacity-50"
|
|
2978
3353
|
),
|
|
2979
3354
|
"aria-label": pinned ? "Unpin drawer" : "Pin drawer",
|
|
2980
|
-
children: /* @__PURE__ */
|
|
3355
|
+
children: /* @__PURE__ */ jsx40(Pin, { className: "h-4 w-4", fill: pinned ? "currentColor" : "none" })
|
|
2981
3356
|
}
|
|
2982
3357
|
),
|
|
2983
|
-
/* @__PURE__ */
|
|
2984
|
-
/* @__PURE__ */
|
|
2985
|
-
/* @__PURE__ */
|
|
3358
|
+
/* @__PURE__ */ jsxs20(DialogPrimitive3.Close, { className: "rounded-sm p-1 opacity-50 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500", children: [
|
|
3359
|
+
/* @__PURE__ */ jsx40(X4, { className: "h-4 w-4" }),
|
|
3360
|
+
/* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Close" })
|
|
2986
3361
|
] })
|
|
2987
3362
|
] })
|
|
2988
3363
|
]
|
|
@@ -2990,7 +3365,7 @@ var DrawerHeader = React36.forwardRef(({ className, ...props }, ref) => {
|
|
|
2990
3365
|
);
|
|
2991
3366
|
});
|
|
2992
3367
|
DrawerHeader.displayName = "DrawerHeader";
|
|
2993
|
-
var DrawerTitle =
|
|
3368
|
+
var DrawerTitle = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
2994
3369
|
DialogPrimitive3.Title,
|
|
2995
3370
|
{
|
|
2996
3371
|
ref,
|
|
@@ -2999,7 +3374,7 @@ var DrawerTitle = React36.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2999
3374
|
}
|
|
3000
3375
|
));
|
|
3001
3376
|
DrawerTitle.displayName = "DrawerTitle";
|
|
3002
|
-
var DrawerDescription =
|
|
3377
|
+
var DrawerDescription = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
3003
3378
|
DialogPrimitive3.Description,
|
|
3004
3379
|
{
|
|
3005
3380
|
ref,
|
|
@@ -3008,7 +3383,7 @@ var DrawerDescription = React36.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3008
3383
|
}
|
|
3009
3384
|
));
|
|
3010
3385
|
DrawerDescription.displayName = "DrawerDescription";
|
|
3011
|
-
var DrawerFooter =
|
|
3386
|
+
var DrawerFooter = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
3012
3387
|
"div",
|
|
3013
3388
|
{
|
|
3014
3389
|
ref,
|
|
@@ -3022,11 +3397,11 @@ var DrawerFooter = React36.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3022
3397
|
DrawerFooter.displayName = "DrawerFooter";
|
|
3023
3398
|
|
|
3024
3399
|
// src/components/app-shell/app-shell.tsx
|
|
3025
|
-
import * as
|
|
3400
|
+
import * as React39 from "react";
|
|
3026
3401
|
import { Menu } from "lucide-react";
|
|
3027
|
-
import { jsx as
|
|
3402
|
+
import { jsx as jsx41, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3028
3403
|
var [AppShellProvider, useAppShell] = createContext2("AppShell");
|
|
3029
|
-
var AppShell =
|
|
3404
|
+
var AppShell = React39.forwardRef(
|
|
3030
3405
|
({
|
|
3031
3406
|
className,
|
|
3032
3407
|
sidebarCollapsed: controlledCollapsed,
|
|
@@ -3038,11 +3413,11 @@ var AppShell = React37.forwardRef(
|
|
|
3038
3413
|
...props
|
|
3039
3414
|
}, ref) => {
|
|
3040
3415
|
const { isMobile } = useBreakpoint();
|
|
3041
|
-
const [internalCollapsed, setInternalCollapsed] =
|
|
3042
|
-
const [mobileSidebarOpen, setMobileSidebarOpen] =
|
|
3416
|
+
const [internalCollapsed, setInternalCollapsed] = React39.useState(false);
|
|
3417
|
+
const [mobileSidebarOpen, setMobileSidebarOpen] = React39.useState(false);
|
|
3043
3418
|
const collapsed = controlledCollapsed ?? internalCollapsed;
|
|
3044
3419
|
const setCollapsed = onSidebarCollapsedChange ?? setInternalCollapsed;
|
|
3045
|
-
return /* @__PURE__ */
|
|
3420
|
+
return /* @__PURE__ */ jsx41(
|
|
3046
3421
|
AppShellProvider,
|
|
3047
3422
|
{
|
|
3048
3423
|
value: {
|
|
@@ -3053,7 +3428,7 @@ var AppShell = React37.forwardRef(
|
|
|
3053
3428
|
mobileSidebarOpen,
|
|
3054
3429
|
setMobileSidebarOpen
|
|
3055
3430
|
},
|
|
3056
|
-
children: /* @__PURE__ */
|
|
3431
|
+
children: /* @__PURE__ */ jsx41(
|
|
3057
3432
|
"div",
|
|
3058
3433
|
{
|
|
3059
3434
|
ref,
|
|
@@ -3071,20 +3446,20 @@ var AppShell = React37.forwardRef(
|
|
|
3071
3446
|
}
|
|
3072
3447
|
);
|
|
3073
3448
|
AppShell.displayName = "AppShell";
|
|
3074
|
-
var AppShellSidebar =
|
|
3449
|
+
var AppShellSidebar = React39.forwardRef(({ className, children, ...props }, ref) => {
|
|
3075
3450
|
const { sidebarCollapsed, isMobile, mobileSidebarOpen, setMobileSidebarOpen } = useAppShell();
|
|
3076
3451
|
if (isMobile) {
|
|
3077
|
-
return /* @__PURE__ */
|
|
3452
|
+
return /* @__PURE__ */ jsx41(
|
|
3078
3453
|
Drawer,
|
|
3079
3454
|
{
|
|
3080
3455
|
open: mobileSidebarOpen,
|
|
3081
3456
|
onOpenChange: setMobileSidebarOpen,
|
|
3082
3457
|
side: "left",
|
|
3083
|
-
children: /* @__PURE__ */
|
|
3458
|
+
children: /* @__PURE__ */ jsx41(DrawerContent, { size: "sm", className, children })
|
|
3084
3459
|
}
|
|
3085
3460
|
);
|
|
3086
3461
|
}
|
|
3087
|
-
return /* @__PURE__ */
|
|
3462
|
+
return /* @__PURE__ */ jsx41(
|
|
3088
3463
|
"aside",
|
|
3089
3464
|
{
|
|
3090
3465
|
ref,
|
|
@@ -3101,9 +3476,9 @@ var AppShellSidebar = React37.forwardRef(({ className, children, ...props }, ref
|
|
|
3101
3476
|
);
|
|
3102
3477
|
});
|
|
3103
3478
|
AppShellSidebar.displayName = "AppShellSidebar";
|
|
3104
|
-
var AppShellHeader =
|
|
3479
|
+
var AppShellHeader = React39.forwardRef(({ className, children, ...props }, ref) => {
|
|
3105
3480
|
const { isMobile, setMobileSidebarOpen } = useAppShell();
|
|
3106
|
-
return /* @__PURE__ */
|
|
3481
|
+
return /* @__PURE__ */ jsxs21(
|
|
3107
3482
|
"header",
|
|
3108
3483
|
{
|
|
3109
3484
|
ref,
|
|
@@ -3113,14 +3488,14 @@ var AppShellHeader = React37.forwardRef(({ className, children, ...props }, ref)
|
|
|
3113
3488
|
),
|
|
3114
3489
|
...props,
|
|
3115
3490
|
children: [
|
|
3116
|
-
isMobile && /* @__PURE__ */
|
|
3491
|
+
isMobile && /* @__PURE__ */ jsx41(
|
|
3117
3492
|
"button",
|
|
3118
3493
|
{
|
|
3119
3494
|
type: "button",
|
|
3120
3495
|
onClick: () => setMobileSidebarOpen(true),
|
|
3121
3496
|
className: "rounded-md p-1.5 hover:bg-[var(--color-surface-muted)] transition-colors touch:min-h-[--touch-target-min] touch:min-w-[--touch-target-min] flex items-center justify-center",
|
|
3122
3497
|
"aria-label": "Open menu",
|
|
3123
|
-
children: /* @__PURE__ */
|
|
3498
|
+
children: /* @__PURE__ */ jsx41(Menu, { className: "h-5 w-5" })
|
|
3124
3499
|
}
|
|
3125
3500
|
),
|
|
3126
3501
|
children
|
|
@@ -3129,9 +3504,9 @@ var AppShellHeader = React37.forwardRef(({ className, children, ...props }, ref)
|
|
|
3129
3504
|
);
|
|
3130
3505
|
});
|
|
3131
3506
|
AppShellHeader.displayName = "AppShellHeader";
|
|
3132
|
-
var AppShellContent =
|
|
3507
|
+
var AppShellContent = React39.forwardRef(({ className, ...props }, ref) => {
|
|
3133
3508
|
const { withBottomNav } = useAppShell();
|
|
3134
|
-
return /* @__PURE__ */
|
|
3509
|
+
return /* @__PURE__ */ jsx41(
|
|
3135
3510
|
"main",
|
|
3136
3511
|
{
|
|
3137
3512
|
ref,
|
|
@@ -3145,7 +3520,7 @@ var AppShellContent = React37.forwardRef(({ className, ...props }, ref) => {
|
|
|
3145
3520
|
);
|
|
3146
3521
|
});
|
|
3147
3522
|
AppShellContent.displayName = "AppShellContent";
|
|
3148
|
-
var AppShellFooter =
|
|
3523
|
+
var AppShellFooter = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
|
|
3149
3524
|
"footer",
|
|
3150
3525
|
{
|
|
3151
3526
|
ref,
|
|
@@ -3159,9 +3534,9 @@ var AppShellFooter = React37.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
3159
3534
|
AppShellFooter.displayName = "AppShellFooter";
|
|
3160
3535
|
|
|
3161
3536
|
// src/components/bottom-navigation/bottom-navigation.tsx
|
|
3162
|
-
import * as
|
|
3163
|
-
import { jsx as
|
|
3164
|
-
var BottomNavigation =
|
|
3537
|
+
import * as React40 from "react";
|
|
3538
|
+
import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3539
|
+
var BottomNavigation = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx42(
|
|
3165
3540
|
"nav",
|
|
3166
3541
|
{
|
|
3167
3542
|
ref,
|
|
@@ -3174,7 +3549,7 @@ var BottomNavigation = React38.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
3174
3549
|
}
|
|
3175
3550
|
));
|
|
3176
3551
|
BottomNavigation.displayName = "BottomNavigation";
|
|
3177
|
-
var BottomNavigationItem =
|
|
3552
|
+
var BottomNavigationItem = React40.forwardRef(({ className, icon, label, active = false, ...props }, ref) => /* @__PURE__ */ jsxs22(
|
|
3178
3553
|
"button",
|
|
3179
3554
|
{
|
|
3180
3555
|
ref,
|
|
@@ -3186,18 +3561,18 @@ var BottomNavigationItem = React38.forwardRef(({ className, icon, label, active
|
|
|
3186
3561
|
"aria-current": active ? "page" : void 0,
|
|
3187
3562
|
...props,
|
|
3188
3563
|
children: [
|
|
3189
|
-
/* @__PURE__ */
|
|
3190
|
-
/* @__PURE__ */
|
|
3564
|
+
/* @__PURE__ */ jsx42("span", { className: "flex h-6 w-6 items-center justify-center", children: icon }),
|
|
3565
|
+
/* @__PURE__ */ jsx42("span", { children: label })
|
|
3191
3566
|
]
|
|
3192
3567
|
}
|
|
3193
3568
|
));
|
|
3194
3569
|
BottomNavigationItem.displayName = "BottomNavigationItem";
|
|
3195
3570
|
|
|
3196
3571
|
// src/components/offline-indicator/offline-indicator.tsx
|
|
3197
|
-
import * as
|
|
3572
|
+
import * as React41 from "react";
|
|
3198
3573
|
import { WifiOff } from "lucide-react";
|
|
3199
|
-
import { jsx as
|
|
3200
|
-
var OfflineIndicator =
|
|
3574
|
+
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3575
|
+
var OfflineIndicator = React41.forwardRef(
|
|
3201
3576
|
({
|
|
3202
3577
|
className,
|
|
3203
3578
|
isOffline,
|
|
@@ -3205,7 +3580,7 @@ var OfflineIndicator = React39.forwardRef(
|
|
|
3205
3580
|
...props
|
|
3206
3581
|
}, ref) => {
|
|
3207
3582
|
if (!isOffline) return null;
|
|
3208
|
-
return /* @__PURE__ */
|
|
3583
|
+
return /* @__PURE__ */ jsxs23(
|
|
3209
3584
|
"div",
|
|
3210
3585
|
{
|
|
3211
3586
|
ref,
|
|
@@ -3216,7 +3591,7 @@ var OfflineIndicator = React39.forwardRef(
|
|
|
3216
3591
|
),
|
|
3217
3592
|
...props,
|
|
3218
3593
|
children: [
|
|
3219
|
-
/* @__PURE__ */
|
|
3594
|
+
/* @__PURE__ */ jsx43(WifiOff, { className: "mr-2 h-3.5 w-3.5 shrink-0", "aria-hidden": "true" }),
|
|
3220
3595
|
message
|
|
3221
3596
|
]
|
|
3222
3597
|
}
|
|
@@ -3226,9 +3601,9 @@ var OfflineIndicator = React39.forwardRef(
|
|
|
3226
3601
|
OfflineIndicator.displayName = "OfflineIndicator";
|
|
3227
3602
|
|
|
3228
3603
|
// src/components/install-prompt/install-prompt.tsx
|
|
3229
|
-
import * as
|
|
3230
|
-
import { jsx as
|
|
3231
|
-
var InstallPrompt =
|
|
3604
|
+
import * as React42 from "react";
|
|
3605
|
+
import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3606
|
+
var InstallPrompt = React42.forwardRef(
|
|
3232
3607
|
({
|
|
3233
3608
|
className,
|
|
3234
3609
|
canInstall,
|
|
@@ -3241,7 +3616,7 @@ var InstallPrompt = React40.forwardRef(
|
|
|
3241
3616
|
...props
|
|
3242
3617
|
}, ref) => {
|
|
3243
3618
|
if (!canInstall) return null;
|
|
3244
|
-
return /* @__PURE__ */
|
|
3619
|
+
return /* @__PURE__ */ jsx44(
|
|
3245
3620
|
"div",
|
|
3246
3621
|
{
|
|
3247
3622
|
ref,
|
|
@@ -3252,12 +3627,12 @@ var InstallPrompt = React40.forwardRef(
|
|
|
3252
3627
|
className
|
|
3253
3628
|
),
|
|
3254
3629
|
...props,
|
|
3255
|
-
children: /* @__PURE__ */
|
|
3256
|
-
/* @__PURE__ */
|
|
3257
|
-
/* @__PURE__ */
|
|
3258
|
-
/* @__PURE__ */
|
|
3259
|
-
/* @__PURE__ */
|
|
3260
|
-
/* @__PURE__ */
|
|
3630
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "mx-auto max-w-md", children: [
|
|
3631
|
+
/* @__PURE__ */ jsx44("p", { className: "text-sm font-semibold text-[var(--color-on-surface)]", children: title }),
|
|
3632
|
+
/* @__PURE__ */ jsx44("p", { className: "mt-1 text-xs text-[var(--color-on-surface-muted)]", children: description }),
|
|
3633
|
+
/* @__PURE__ */ jsxs24("div", { className: "mt-3 flex gap-2", children: [
|
|
3634
|
+
/* @__PURE__ */ jsx44(Button, { size: "sm", onClick: onInstall, className: "flex-1", children: installLabel }),
|
|
3635
|
+
/* @__PURE__ */ jsx44(
|
|
3261
3636
|
Button,
|
|
3262
3637
|
{
|
|
3263
3638
|
size: "sm",
|
|
@@ -3276,17 +3651,17 @@ var InstallPrompt = React40.forwardRef(
|
|
|
3276
3651
|
InstallPrompt.displayName = "InstallPrompt";
|
|
3277
3652
|
|
|
3278
3653
|
// src/components/pull-to-refresh/pull-to-refresh.tsx
|
|
3279
|
-
import * as
|
|
3654
|
+
import * as React43 from "react";
|
|
3280
3655
|
import { ArrowDown } from "lucide-react";
|
|
3281
|
-
import { jsx as
|
|
3282
|
-
var PullToRefresh =
|
|
3656
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3657
|
+
var PullToRefresh = React43.forwardRef(
|
|
3283
3658
|
({ className, onRefresh, threshold = 80, disabled = false, children, ...props }, ref) => {
|
|
3284
|
-
const [pullDistance, setPullDistance] =
|
|
3285
|
-
const [isRefreshing, setIsRefreshing] =
|
|
3286
|
-
const startYRef =
|
|
3287
|
-
const containerRef =
|
|
3288
|
-
|
|
3289
|
-
const handleTouchStart =
|
|
3659
|
+
const [pullDistance, setPullDistance] = React43.useState(0);
|
|
3660
|
+
const [isRefreshing, setIsRefreshing] = React43.useState(false);
|
|
3661
|
+
const startYRef = React43.useRef(0);
|
|
3662
|
+
const containerRef = React43.useRef(null);
|
|
3663
|
+
React43.useImperativeHandle(ref, () => containerRef.current);
|
|
3664
|
+
const handleTouchStart = React43.useCallback(
|
|
3290
3665
|
(e) => {
|
|
3291
3666
|
if (disabled || isRefreshing) return;
|
|
3292
3667
|
const container = containerRef.current;
|
|
@@ -3296,7 +3671,7 @@ var PullToRefresh = React41.forwardRef(
|
|
|
3296
3671
|
},
|
|
3297
3672
|
[disabled, isRefreshing]
|
|
3298
3673
|
);
|
|
3299
|
-
const handleTouchMove =
|
|
3674
|
+
const handleTouchMove = React43.useCallback(
|
|
3300
3675
|
(e) => {
|
|
3301
3676
|
if (disabled || isRefreshing || startYRef.current === 0) return;
|
|
3302
3677
|
const distance = Math.max(
|
|
@@ -3309,7 +3684,7 @@ var PullToRefresh = React41.forwardRef(
|
|
|
3309
3684
|
},
|
|
3310
3685
|
[disabled, isRefreshing, threshold]
|
|
3311
3686
|
);
|
|
3312
|
-
const handleTouchEnd =
|
|
3687
|
+
const handleTouchEnd = React43.useCallback(async () => {
|
|
3313
3688
|
if (disabled || isRefreshing) return;
|
|
3314
3689
|
if (pullDistance >= threshold) {
|
|
3315
3690
|
setIsRefreshing(true);
|
|
@@ -3324,7 +3699,7 @@ var PullToRefresh = React41.forwardRef(
|
|
|
3324
3699
|
}, [disabled, isRefreshing, pullDistance, threshold, onRefresh]);
|
|
3325
3700
|
const indicatorOpacity = Math.min(pullDistance / threshold, 1);
|
|
3326
3701
|
const shouldTrigger = pullDistance >= threshold;
|
|
3327
|
-
return /* @__PURE__ */
|
|
3702
|
+
return /* @__PURE__ */ jsxs25(
|
|
3328
3703
|
"div",
|
|
3329
3704
|
{
|
|
3330
3705
|
ref: containerRef,
|
|
@@ -3334,18 +3709,18 @@ var PullToRefresh = React41.forwardRef(
|
|
|
3334
3709
|
onTouchEnd: handleTouchEnd,
|
|
3335
3710
|
...props,
|
|
3336
3711
|
children: [
|
|
3337
|
-
/* @__PURE__ */
|
|
3712
|
+
/* @__PURE__ */ jsx45(
|
|
3338
3713
|
"div",
|
|
3339
3714
|
{
|
|
3340
3715
|
className: "flex items-center justify-center overflow-hidden transition-[height] duration-normal",
|
|
3341
3716
|
style: { height: isRefreshing ? threshold * 0.6 : pullDistance },
|
|
3342
3717
|
"aria-hidden": "true",
|
|
3343
|
-
children: /* @__PURE__ */
|
|
3718
|
+
children: /* @__PURE__ */ jsx45(
|
|
3344
3719
|
"div",
|
|
3345
3720
|
{
|
|
3346
3721
|
className: "transition-opacity",
|
|
3347
3722
|
style: { opacity: isRefreshing ? 1 : indicatorOpacity },
|
|
3348
|
-
children: isRefreshing ? /* @__PURE__ */
|
|
3723
|
+
children: isRefreshing ? /* @__PURE__ */ jsx45(Spinner, { size: "sm" }) : /* @__PURE__ */ jsx45(
|
|
3349
3724
|
ArrowDown,
|
|
3350
3725
|
{
|
|
3351
3726
|
className: cn(
|
|
@@ -3367,10 +3742,10 @@ var PullToRefresh = React41.forwardRef(
|
|
|
3367
3742
|
PullToRefresh.displayName = "PullToRefresh";
|
|
3368
3743
|
|
|
3369
3744
|
// src/components/print/print-document.tsx
|
|
3370
|
-
import * as
|
|
3371
|
-
import { cva as
|
|
3372
|
-
import { jsx as
|
|
3373
|
-
var printDocumentVariants =
|
|
3745
|
+
import * as React44 from "react";
|
|
3746
|
+
import { cva as cva17 } from "class-variance-authority";
|
|
3747
|
+
import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3748
|
+
var printDocumentVariants = cva17(
|
|
3374
3749
|
[
|
|
3375
3750
|
"bg-white text-neutral-900",
|
|
3376
3751
|
"flex flex-col",
|
|
@@ -3398,8 +3773,8 @@ var printDocumentVariants = cva15(
|
|
|
3398
3773
|
}
|
|
3399
3774
|
}
|
|
3400
3775
|
);
|
|
3401
|
-
var PrintDocument =
|
|
3402
|
-
({ className, size, orientation, padding = "20mm", style, children, ...props }, ref) => /* @__PURE__ */
|
|
3776
|
+
var PrintDocument = React44.forwardRef(
|
|
3777
|
+
({ className, size, orientation, padding = "20mm", style, children, ...props }, ref) => /* @__PURE__ */ jsx46(
|
|
3403
3778
|
"div",
|
|
3404
3779
|
{
|
|
3405
3780
|
ref,
|
|
@@ -3418,25 +3793,25 @@ var PrintDocument = React42.forwardRef(
|
|
|
3418
3793
|
)
|
|
3419
3794
|
);
|
|
3420
3795
|
PrintDocument.displayName = "PrintDocument";
|
|
3421
|
-
var PrintHeader =
|
|
3422
|
-
({ className, logo, title, subtitle, meta, children, ...props }, ref) => /* @__PURE__ */
|
|
3423
|
-
/* @__PURE__ */
|
|
3424
|
-
/* @__PURE__ */
|
|
3425
|
-
/* @__PURE__ */
|
|
3426
|
-
logo && /* @__PURE__ */
|
|
3427
|
-
/* @__PURE__ */
|
|
3428
|
-
title && /* @__PURE__ */
|
|
3429
|
-
subtitle && /* @__PURE__ */
|
|
3796
|
+
var PrintHeader = React44.forwardRef(
|
|
3797
|
+
({ className, logo, title, subtitle, meta, children, ...props }, ref) => /* @__PURE__ */ jsxs26("div", { ref, className: cn("mb-6", className), ...props, children: [
|
|
3798
|
+
/* @__PURE__ */ jsx46("div", { className: "h-1 bg-primary-400 rounded-full mb-5" }),
|
|
3799
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-start justify-between pb-4 border-b border-neutral-200", children: [
|
|
3800
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-3", children: [
|
|
3801
|
+
logo && /* @__PURE__ */ jsx46("div", { className: "shrink-0", children: logo }),
|
|
3802
|
+
/* @__PURE__ */ jsxs26("div", { children: [
|
|
3803
|
+
title && /* @__PURE__ */ jsx46("h1", { className: "text-2xl font-bold text-neutral-900 leading-tight", children: title }),
|
|
3804
|
+
subtitle && /* @__PURE__ */ jsx46("p", { className: "text-[8pt] font-medium tracking-widest uppercase text-neutral-400 mt-0.5", children: subtitle })
|
|
3430
3805
|
] })
|
|
3431
3806
|
] }),
|
|
3432
|
-
meta && /* @__PURE__ */
|
|
3807
|
+
meta && /* @__PURE__ */ jsx46("div", { className: "text-right text-[9pt] text-neutral-600 leading-relaxed", children: meta }),
|
|
3433
3808
|
children
|
|
3434
3809
|
] })
|
|
3435
3810
|
] })
|
|
3436
3811
|
);
|
|
3437
3812
|
PrintHeader.displayName = "PrintHeader";
|
|
3438
|
-
var PrintFooter =
|
|
3439
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
3813
|
+
var PrintFooter = React44.forwardRef(
|
|
3814
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx46(
|
|
3440
3815
|
"div",
|
|
3441
3816
|
{
|
|
3442
3817
|
ref,
|
|
@@ -3449,10 +3824,10 @@ var PrintFooter = React42.forwardRef(
|
|
|
3449
3824
|
PrintFooter.displayName = "PrintFooter";
|
|
3450
3825
|
|
|
3451
3826
|
// src/components/print/print-table.tsx
|
|
3452
|
-
import * as
|
|
3453
|
-
import { jsx as
|
|
3454
|
-
var PrintTable =
|
|
3455
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3827
|
+
import * as React45 from "react";
|
|
3828
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
3829
|
+
var PrintTable = React45.forwardRef(
|
|
3830
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
3456
3831
|
"table",
|
|
3457
3832
|
{
|
|
3458
3833
|
ref,
|
|
@@ -3462,20 +3837,20 @@ var PrintTable = React43.forwardRef(
|
|
|
3462
3837
|
)
|
|
3463
3838
|
);
|
|
3464
3839
|
PrintTable.displayName = "PrintTable";
|
|
3465
|
-
var PrintTableHeader =
|
|
3466
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3840
|
+
var PrintTableHeader = React45.forwardRef(
|
|
3841
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx47("thead", { ref, className: cn("", className), ...props })
|
|
3467
3842
|
);
|
|
3468
3843
|
PrintTableHeader.displayName = "PrintTableHeader";
|
|
3469
|
-
var PrintTableBody =
|
|
3470
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3844
|
+
var PrintTableBody = React45.forwardRef(
|
|
3845
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx47("tbody", { ref, className: cn("", className), ...props })
|
|
3471
3846
|
);
|
|
3472
3847
|
PrintTableBody.displayName = "PrintTableBody";
|
|
3473
|
-
var PrintTableFooter =
|
|
3474
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3848
|
+
var PrintTableFooter = React45.forwardRef(
|
|
3849
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx47("tfoot", { ref, className: cn("", className), ...props })
|
|
3475
3850
|
);
|
|
3476
3851
|
PrintTableFooter.displayName = "PrintTableFooter";
|
|
3477
|
-
var PrintTableRow =
|
|
3478
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3852
|
+
var PrintTableRow = React45.forwardRef(
|
|
3853
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
3479
3854
|
"tr",
|
|
3480
3855
|
{
|
|
3481
3856
|
ref,
|
|
@@ -3485,8 +3860,8 @@ var PrintTableRow = React43.forwardRef(
|
|
|
3485
3860
|
)
|
|
3486
3861
|
);
|
|
3487
3862
|
PrintTableRow.displayName = "PrintTableRow";
|
|
3488
|
-
var PrintTableHead =
|
|
3489
|
-
({ className, align = "left", ...props }, ref) => /* @__PURE__ */
|
|
3863
|
+
var PrintTableHead = React45.forwardRef(
|
|
3864
|
+
({ className, align = "left", ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
3490
3865
|
"th",
|
|
3491
3866
|
{
|
|
3492
3867
|
ref,
|
|
@@ -3502,8 +3877,8 @@ var PrintTableHead = React43.forwardRef(
|
|
|
3502
3877
|
)
|
|
3503
3878
|
);
|
|
3504
3879
|
PrintTableHead.displayName = "PrintTableHead";
|
|
3505
|
-
var PrintTableCell =
|
|
3506
|
-
({ className, align = "left", ...props }, ref) => /* @__PURE__ */
|
|
3880
|
+
var PrintTableCell = React45.forwardRef(
|
|
3881
|
+
({ className, align = "left", ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
3507
3882
|
"td",
|
|
3508
3883
|
{
|
|
3509
3884
|
ref,
|
|
@@ -3521,17 +3896,17 @@ var PrintTableCell = React43.forwardRef(
|
|
|
3521
3896
|
PrintTableCell.displayName = "PrintTableCell";
|
|
3522
3897
|
|
|
3523
3898
|
// src/components/print/print-field.tsx
|
|
3524
|
-
import * as
|
|
3525
|
-
import { cva as
|
|
3526
|
-
import { jsx as
|
|
3527
|
-
var PrintField =
|
|
3528
|
-
({ className, label, value, children, ...props }, ref) => /* @__PURE__ */
|
|
3529
|
-
/* @__PURE__ */
|
|
3530
|
-
/* @__PURE__ */
|
|
3899
|
+
import * as React46 from "react";
|
|
3900
|
+
import { cva as cva18 } from "class-variance-authority";
|
|
3901
|
+
import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3902
|
+
var PrintField = React46.forwardRef(
|
|
3903
|
+
({ className, label, value, children, ...props }, ref) => /* @__PURE__ */ jsxs27("div", { ref, className: cn("", className), ...props, children: [
|
|
3904
|
+
/* @__PURE__ */ jsx48("dt", { className: "text-[8pt] font-medium text-neutral-500 mb-0.5", children: label }),
|
|
3905
|
+
/* @__PURE__ */ jsx48("dd", { className: "text-[9pt] text-neutral-900", children: value ?? children })
|
|
3531
3906
|
] })
|
|
3532
3907
|
);
|
|
3533
3908
|
PrintField.displayName = "PrintField";
|
|
3534
|
-
var printFieldGroupVariants =
|
|
3909
|
+
var printFieldGroupVariants = cva18("grid gap-x-6 gap-y-2", {
|
|
3535
3910
|
variants: {
|
|
3536
3911
|
columns: {
|
|
3537
3912
|
1: "grid-cols-1",
|
|
@@ -3544,8 +3919,8 @@ var printFieldGroupVariants = cva16("grid gap-x-6 gap-y-2", {
|
|
|
3544
3919
|
columns: 2
|
|
3545
3920
|
}
|
|
3546
3921
|
});
|
|
3547
|
-
var PrintFieldGroup =
|
|
3548
|
-
({ className, columns, ...props }, ref) => /* @__PURE__ */
|
|
3922
|
+
var PrintFieldGroup = React46.forwardRef(
|
|
3923
|
+
({ className, columns, ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
3549
3924
|
"dl",
|
|
3550
3925
|
{
|
|
3551
3926
|
ref,
|
|
@@ -3557,10 +3932,10 @@ var PrintFieldGroup = React44.forwardRef(
|
|
|
3557
3932
|
PrintFieldGroup.displayName = "PrintFieldGroup";
|
|
3558
3933
|
|
|
3559
3934
|
// src/components/print/print-divider.tsx
|
|
3560
|
-
import * as
|
|
3561
|
-
import { jsx as
|
|
3562
|
-
var PrintDivider =
|
|
3563
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3935
|
+
import * as React47 from "react";
|
|
3936
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
3937
|
+
var PrintDivider = React47.forwardRef(
|
|
3938
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx49(
|
|
3564
3939
|
"hr",
|
|
3565
3940
|
{
|
|
3566
3941
|
ref,
|
|
@@ -3572,9 +3947,9 @@ var PrintDivider = React45.forwardRef(
|
|
|
3572
3947
|
PrintDivider.displayName = "PrintDivider";
|
|
3573
3948
|
|
|
3574
3949
|
// src/components/stat-card/stat-card.tsx
|
|
3575
|
-
import * as
|
|
3950
|
+
import * as React48 from "react";
|
|
3576
3951
|
import { ChevronUp as ChevronUp2, ChevronDown as ChevronDown3 } from "lucide-react";
|
|
3577
|
-
import { jsx as
|
|
3952
|
+
import { jsx as jsx50, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3578
3953
|
function inferDirection(trend) {
|
|
3579
3954
|
if (!trend) return "neutral";
|
|
3580
3955
|
if (trend.startsWith("+")) return "up";
|
|
@@ -3591,10 +3966,10 @@ var TREND_ICON_COMPONENTS = {
|
|
|
3591
3966
|
down: ChevronDown3,
|
|
3592
3967
|
neutral: null
|
|
3593
3968
|
};
|
|
3594
|
-
var StatCard =
|
|
3969
|
+
var StatCard = React48.forwardRef(
|
|
3595
3970
|
({ className, label, value, trend, trendDirection, icon, ...props }, ref) => {
|
|
3596
3971
|
const direction = trendDirection ?? inferDirection(trend);
|
|
3597
|
-
return /* @__PURE__ */
|
|
3972
|
+
return /* @__PURE__ */ jsxs28(
|
|
3598
3973
|
"div",
|
|
3599
3974
|
{
|
|
3600
3975
|
ref,
|
|
@@ -3604,16 +3979,16 @@ var StatCard = React46.forwardRef(
|
|
|
3604
3979
|
),
|
|
3605
3980
|
...props,
|
|
3606
3981
|
children: [
|
|
3607
|
-
/* @__PURE__ */
|
|
3608
|
-
/* @__PURE__ */
|
|
3609
|
-
icon && /* @__PURE__ */
|
|
3982
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
|
|
3983
|
+
/* @__PURE__ */ jsx50("p", { className: "text-xs font-medium text-[var(--color-on-surface-muted)] uppercase tracking-wider", children: label }),
|
|
3984
|
+
icon && /* @__PURE__ */ jsx50("span", { className: "text-[var(--color-on-surface-muted)]", children: icon })
|
|
3610
3985
|
] }),
|
|
3611
|
-
/* @__PURE__ */
|
|
3612
|
-
/* @__PURE__ */
|
|
3613
|
-
trend && /* @__PURE__ */
|
|
3986
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-baseline gap-2 mt-2", children: [
|
|
3987
|
+
/* @__PURE__ */ jsx50("span", { className: "text-xl sm:text-2xl font-bold tabular-nums", children: value }),
|
|
3988
|
+
trend && /* @__PURE__ */ jsxs28("span", { className: cn("inline-flex items-center gap-0.5 text-xs font-medium", TREND_STYLES[direction]), children: [
|
|
3614
3989
|
(() => {
|
|
3615
3990
|
const TrendIcon = TREND_ICON_COMPONENTS[direction];
|
|
3616
|
-
return TrendIcon ? /* @__PURE__ */
|
|
3991
|
+
return TrendIcon ? /* @__PURE__ */ jsx50(TrendIcon, { className: "h-3 w-3", strokeWidth: 2.5 }) : null;
|
|
3617
3992
|
})(),
|
|
3618
3993
|
trend
|
|
3619
3994
|
] })
|
|
@@ -3626,10 +4001,10 @@ var StatCard = React46.forwardRef(
|
|
|
3626
4001
|
StatCard.displayName = "StatCard";
|
|
3627
4002
|
|
|
3628
4003
|
// src/components/chart-container/chart-container.tsx
|
|
3629
|
-
import * as
|
|
3630
|
-
import { jsx as
|
|
3631
|
-
var ChartContainer =
|
|
3632
|
-
({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */
|
|
4004
|
+
import * as React49 from "react";
|
|
4005
|
+
import { jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4006
|
+
var ChartContainer = React49.forwardRef(
|
|
4007
|
+
({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */ jsxs29(
|
|
3633
4008
|
"div",
|
|
3634
4009
|
{
|
|
3635
4010
|
ref,
|
|
@@ -3639,14 +4014,14 @@ var ChartContainer = React47.forwardRef(
|
|
|
3639
4014
|
),
|
|
3640
4015
|
...props,
|
|
3641
4016
|
children: [
|
|
3642
|
-
/* @__PURE__ */
|
|
3643
|
-
/* @__PURE__ */
|
|
3644
|
-
/* @__PURE__ */
|
|
3645
|
-
description && /* @__PURE__ */
|
|
4017
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-2 sm:gap-4 p-4 sm:p-5 pb-0", children: [
|
|
4018
|
+
/* @__PURE__ */ jsxs29("div", { children: [
|
|
4019
|
+
/* @__PURE__ */ jsx51("h3", { className: "text-sm font-semibold leading-none tracking-tight", children: title }),
|
|
4020
|
+
description && /* @__PURE__ */ jsx51("p", { className: "mt-1 text-xs text-[var(--color-on-surface-muted)]", children: description })
|
|
3646
4021
|
] }),
|
|
3647
|
-
actions && /* @__PURE__ */
|
|
4022
|
+
actions && /* @__PURE__ */ jsx51("div", { className: "flex items-center gap-2 shrink-0", children: actions })
|
|
3648
4023
|
] }),
|
|
3649
|
-
/* @__PURE__ */
|
|
4024
|
+
/* @__PURE__ */ jsx51("div", { className: "p-4 sm:p-5", children })
|
|
3650
4025
|
]
|
|
3651
4026
|
}
|
|
3652
4027
|
)
|
|
@@ -3759,7 +4134,7 @@ function getChartTheme() {
|
|
|
3759
4134
|
}
|
|
3760
4135
|
|
|
3761
4136
|
// src/components/chart/chart-tooltip.tsx
|
|
3762
|
-
import { jsx as
|
|
4137
|
+
import { jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3763
4138
|
var ChartTooltip = ({
|
|
3764
4139
|
active,
|
|
3765
4140
|
payload,
|
|
@@ -3770,7 +4145,7 @@ var ChartTooltip = ({
|
|
|
3770
4145
|
}) => {
|
|
3771
4146
|
if (!active || !payload?.length) return null;
|
|
3772
4147
|
const displayLabel = labelFormatter ? labelFormatter(String(label)) : label;
|
|
3773
|
-
return /* @__PURE__ */
|
|
4148
|
+
return /* @__PURE__ */ jsxs30(
|
|
3774
4149
|
"div",
|
|
3775
4150
|
{
|
|
3776
4151
|
className: cn(
|
|
@@ -3779,17 +4154,17 @@ var ChartTooltip = ({
|
|
|
3779
4154
|
className
|
|
3780
4155
|
),
|
|
3781
4156
|
children: [
|
|
3782
|
-
displayLabel && /* @__PURE__ */
|
|
3783
|
-
/* @__PURE__ */
|
|
3784
|
-
/* @__PURE__ */
|
|
4157
|
+
displayLabel && /* @__PURE__ */ jsx52("p", { className: "font-medium text-[var(--color-on-surface)] mb-1", children: displayLabel }),
|
|
4158
|
+
/* @__PURE__ */ jsx52("div", { className: "flex flex-col gap-0.5", children: payload.map((entry, i) => /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2", children: [
|
|
4159
|
+
/* @__PURE__ */ jsx52(
|
|
3785
4160
|
"span",
|
|
3786
4161
|
{
|
|
3787
4162
|
className: "inline-block h-2.5 w-2.5 shrink-0 rounded-full",
|
|
3788
4163
|
style: { backgroundColor: entry.color }
|
|
3789
4164
|
}
|
|
3790
4165
|
),
|
|
3791
|
-
/* @__PURE__ */
|
|
3792
|
-
/* @__PURE__ */
|
|
4166
|
+
/* @__PURE__ */ jsx52("span", { className: "text-[var(--color-on-surface-muted)]", children: entry.name }),
|
|
4167
|
+
/* @__PURE__ */ jsx52("span", { className: "ml-auto font-medium tabular-nums text-[var(--color-on-surface)]", children: formatter ? formatter(entry.value, entry.name) : entry.value.toLocaleString() })
|
|
3793
4168
|
] }, i)) })
|
|
3794
4169
|
]
|
|
3795
4170
|
}
|
|
@@ -3798,21 +4173,21 @@ var ChartTooltip = ({
|
|
|
3798
4173
|
ChartTooltip.displayName = "ChartTooltip";
|
|
3799
4174
|
|
|
3800
4175
|
// src/components/chart/chart-legend.tsx
|
|
3801
|
-
import { jsx as
|
|
4176
|
+
import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3802
4177
|
var ChartLegend = ({
|
|
3803
4178
|
payload,
|
|
3804
4179
|
className
|
|
3805
4180
|
}) => {
|
|
3806
4181
|
if (!payload?.length) return null;
|
|
3807
|
-
return /* @__PURE__ */
|
|
3808
|
-
/* @__PURE__ */
|
|
4182
|
+
return /* @__PURE__ */ jsx53("div", { className: cn("flex flex-wrap items-center justify-center gap-x-4 gap-y-1 pt-3", className), children: payload.map((entry, i) => /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-1.5 text-xs text-[var(--color-on-surface-muted)]", children: [
|
|
4183
|
+
/* @__PURE__ */ jsx53(
|
|
3809
4184
|
"span",
|
|
3810
4185
|
{
|
|
3811
4186
|
className: "inline-block h-2.5 w-2.5 shrink-0 rounded-full",
|
|
3812
4187
|
style: { backgroundColor: entry.color }
|
|
3813
4188
|
}
|
|
3814
4189
|
),
|
|
3815
|
-
/* @__PURE__ */
|
|
4190
|
+
/* @__PURE__ */ jsx53("span", { children: entry.value })
|
|
3816
4191
|
] }, i)) });
|
|
3817
4192
|
};
|
|
3818
4193
|
ChartLegend.displayName = "ChartLegend";
|
|
@@ -3928,6 +4303,7 @@ export {
|
|
|
3928
4303
|
PrintTableHead,
|
|
3929
4304
|
PrintTableHeader,
|
|
3930
4305
|
PrintTableRow,
|
|
4306
|
+
Progress,
|
|
3931
4307
|
PullToRefresh,
|
|
3932
4308
|
RadioGroup,
|
|
3933
4309
|
RadioGroupItem,
|
|
@@ -3943,6 +4319,7 @@ export {
|
|
|
3943
4319
|
Skeleton,
|
|
3944
4320
|
Spinner,
|
|
3945
4321
|
StatCard,
|
|
4322
|
+
Stepper,
|
|
3946
4323
|
Switch,
|
|
3947
4324
|
Table,
|
|
3948
4325
|
TableBody,
|
|
@@ -3984,7 +4361,9 @@ export {
|
|
|
3984
4361
|
inputVariants,
|
|
3985
4362
|
printDocumentVariants,
|
|
3986
4363
|
printFieldGroupVariants,
|
|
4364
|
+
progressVariants,
|
|
3987
4365
|
spinnerVariants,
|
|
4366
|
+
stepIndicatorVariants,
|
|
3988
4367
|
switchVariants,
|
|
3989
4368
|
textareaVariants,
|
|
3990
4369
|
toast,
|