@cytario/design 9.6.1 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.d.ts +25 -3
- package/dist/index.js +234 -163
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1930,10 +1930,78 @@ function RadioButton({ children, className, ...props }) {
|
|
|
1930
1930
|
);
|
|
1931
1931
|
}
|
|
1932
1932
|
|
|
1933
|
+
// src/components/Form/Slider/Slider.tsx
|
|
1934
|
+
import {
|
|
1935
|
+
Slider as AriaSlider,
|
|
1936
|
+
SliderTrack,
|
|
1937
|
+
SliderFill,
|
|
1938
|
+
SliderThumb
|
|
1939
|
+
} from "react-aria-components";
|
|
1940
|
+
import { twMerge as twMerge14 } from "tailwind-merge";
|
|
1941
|
+
import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1942
|
+
function Slider({
|
|
1943
|
+
label,
|
|
1944
|
+
output,
|
|
1945
|
+
description,
|
|
1946
|
+
errorMessage,
|
|
1947
|
+
children,
|
|
1948
|
+
className,
|
|
1949
|
+
isDisabled,
|
|
1950
|
+
...props
|
|
1951
|
+
}) {
|
|
1952
|
+
return /* @__PURE__ */ jsx25(
|
|
1953
|
+
AriaSlider,
|
|
1954
|
+
{
|
|
1955
|
+
...props,
|
|
1956
|
+
isDisabled,
|
|
1957
|
+
className: twMerge14(
|
|
1958
|
+
// data-disabled lands on the root (tailwindcss-react-aria-components
|
|
1959
|
+
// maps the disabled: variant onto it).
|
|
1960
|
+
"w-full flex flex-col gap-2 disabled:opacity-50 disabled:cursor-default",
|
|
1961
|
+
className
|
|
1962
|
+
),
|
|
1963
|
+
children: ({ state }) => /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
1964
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between", children: [
|
|
1965
|
+
label && /* @__PURE__ */ jsx25(Label, { children: label }),
|
|
1966
|
+
output && /* @__PURE__ */ jsx25("span", { className: "text-sm font-medium text-foreground tabular-nums", children: output(state.values[0]) })
|
|
1967
|
+
] }),
|
|
1968
|
+
/* @__PURE__ */ jsxs16(SliderTrack, { className: "flex h-6 w-full cursor-pointer items-center", children: [
|
|
1969
|
+
/* @__PURE__ */ jsx25("div", { className: "relative h-1.5 w-full overflow-hidden rounded-full bg-border", children: /* @__PURE__ */ jsx25(SliderFill, { className: "h-full rounded-full bg-primary" }) }),
|
|
1970
|
+
/* @__PURE__ */ jsx25(
|
|
1971
|
+
SliderThumb,
|
|
1972
|
+
{
|
|
1973
|
+
className: twMerge14(
|
|
1974
|
+
"top-1/2 h-4 w-4 rounded-full bg-background",
|
|
1975
|
+
"border-2 border-primary",
|
|
1976
|
+
"shadow-sm",
|
|
1977
|
+
"transition-[box-shadow,border-color]",
|
|
1978
|
+
"hovered:border-primary-hover",
|
|
1979
|
+
"dragging:cursor-grabbing",
|
|
1980
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
|
1981
|
+
)
|
|
1982
|
+
}
|
|
1983
|
+
)
|
|
1984
|
+
] }),
|
|
1985
|
+
(description || errorMessage) && /* @__PURE__ */ jsx25(
|
|
1986
|
+
"p",
|
|
1987
|
+
{
|
|
1988
|
+
className: twMerge14(
|
|
1989
|
+
"text-xs text-muted-foreground",
|
|
1990
|
+
errorMessage && "text-destructive"
|
|
1991
|
+
),
|
|
1992
|
+
children: errorMessage ?? description
|
|
1993
|
+
}
|
|
1994
|
+
),
|
|
1995
|
+
children
|
|
1996
|
+
] })
|
|
1997
|
+
}
|
|
1998
|
+
);
|
|
1999
|
+
}
|
|
2000
|
+
|
|
1933
2001
|
// src/components/Form/Fieldset/Fieldset.tsx
|
|
1934
|
-
import { jsx as
|
|
2002
|
+
import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1935
2003
|
function Fieldset({ legend, children, className }) {
|
|
1936
|
-
return /* @__PURE__ */
|
|
2004
|
+
return /* @__PURE__ */ jsxs17(
|
|
1937
2005
|
"fieldset",
|
|
1938
2006
|
{
|
|
1939
2007
|
className: [
|
|
@@ -1942,7 +2010,7 @@ function Fieldset({ legend, children, className }) {
|
|
|
1942
2010
|
className
|
|
1943
2011
|
].filter(Boolean).join(" "),
|
|
1944
2012
|
children: [
|
|
1945
|
-
legend && /* @__PURE__ */
|
|
2013
|
+
legend && /* @__PURE__ */ jsx26(
|
|
1946
2014
|
"legend",
|
|
1947
2015
|
{
|
|
1948
2016
|
className: [
|
|
@@ -1964,7 +2032,7 @@ function Fieldset({ legend, children, className }) {
|
|
|
1964
2032
|
import {
|
|
1965
2033
|
Link as AriaLink3
|
|
1966
2034
|
} from "react-aria-components";
|
|
1967
|
-
import { jsx as
|
|
2035
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1968
2036
|
var variantStyles2 = {
|
|
1969
2037
|
default: [
|
|
1970
2038
|
"text-teal-700 underline",
|
|
@@ -1980,7 +2048,7 @@ function Link({
|
|
|
1980
2048
|
className,
|
|
1981
2049
|
...props
|
|
1982
2050
|
}) {
|
|
1983
|
-
return /* @__PURE__ */
|
|
2051
|
+
return /* @__PURE__ */ jsx27(
|
|
1984
2052
|
AriaLink3,
|
|
1985
2053
|
{
|
|
1986
2054
|
...props,
|
|
@@ -2001,20 +2069,20 @@ import {
|
|
|
2001
2069
|
Link as Link2
|
|
2002
2070
|
} from "react-aria-components";
|
|
2003
2071
|
import { ChevronRight as ChevronRight2 } from "lucide-react";
|
|
2004
|
-
import { Fragment as
|
|
2072
|
+
import { Fragment as Fragment7, jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2005
2073
|
function Breadcrumbs({ items, className }) {
|
|
2006
|
-
return /* @__PURE__ */
|
|
2074
|
+
return /* @__PURE__ */ jsx28(
|
|
2007
2075
|
"nav",
|
|
2008
2076
|
{
|
|
2009
2077
|
"aria-label": "Breadcrumb",
|
|
2010
2078
|
className,
|
|
2011
|
-
children: /* @__PURE__ */
|
|
2079
|
+
children: /* @__PURE__ */ jsx28(
|
|
2012
2080
|
AriaBreadcrumbs,
|
|
2013
2081
|
{
|
|
2014
2082
|
className: "flex items-center gap-1 text-sm min-w-0",
|
|
2015
2083
|
children: items.map((item, index) => {
|
|
2016
2084
|
const isLast = index === items.length - 1;
|
|
2017
|
-
return /* @__PURE__ */
|
|
2085
|
+
return /* @__PURE__ */ jsx28(
|
|
2018
2086
|
AriaBreadcrumb,
|
|
2019
2087
|
{
|
|
2020
2088
|
id: item.id,
|
|
@@ -2022,8 +2090,8 @@ function Breadcrumbs({ items, className }) {
|
|
|
2022
2090
|
"flex items-center gap-1",
|
|
2023
2091
|
isLast ? "min-w-0" : "shrink-0"
|
|
2024
2092
|
].join(" "),
|
|
2025
|
-
children: isLast ? /* @__PURE__ */
|
|
2026
|
-
/* @__PURE__ */
|
|
2093
|
+
children: isLast ? /* @__PURE__ */ jsx28("span", { className: "font-medium text-foreground truncate", children: item.label }) : /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
2094
|
+
/* @__PURE__ */ jsx28(
|
|
2027
2095
|
Link2,
|
|
2028
2096
|
{
|
|
2029
2097
|
href: item.href,
|
|
@@ -2031,7 +2099,7 @@ function Breadcrumbs({ items, className }) {
|
|
|
2031
2099
|
children: item.label
|
|
2032
2100
|
}
|
|
2033
2101
|
),
|
|
2034
|
-
/* @__PURE__ */
|
|
2102
|
+
/* @__PURE__ */ jsx28(
|
|
2035
2103
|
ChevronRight2,
|
|
2036
2104
|
{
|
|
2037
2105
|
className: "shrink-0 text-slate-400",
|
|
@@ -2054,8 +2122,8 @@ function Breadcrumbs({ items, className }) {
|
|
|
2054
2122
|
import {
|
|
2055
2123
|
ToggleButton as AriaToggleButton2
|
|
2056
2124
|
} from "react-aria-components";
|
|
2057
|
-
import { twMerge as
|
|
2058
|
-
import { jsx as
|
|
2125
|
+
import { twMerge as twMerge15 } from "tailwind-merge";
|
|
2126
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2059
2127
|
var squareSizeStyles2 = {
|
|
2060
2128
|
xs: "h-6 w-6 text-xs",
|
|
2061
2129
|
sm: "h-7 w-7 text-sm",
|
|
@@ -2100,11 +2168,11 @@ function ToggleButton({
|
|
|
2100
2168
|
...props
|
|
2101
2169
|
}) {
|
|
2102
2170
|
const styles = variantStyles3[variant];
|
|
2103
|
-
return /* @__PURE__ */
|
|
2171
|
+
return /* @__PURE__ */ jsx29(
|
|
2104
2172
|
AriaToggleButton2,
|
|
2105
2173
|
{
|
|
2106
2174
|
...props,
|
|
2107
|
-
className: ({ isSelected }) =>
|
|
2175
|
+
className: ({ isSelected }) => twMerge15(
|
|
2108
2176
|
"inline-flex items-center justify-center gap-2 cursor-pointer",
|
|
2109
2177
|
isSquare ? "rounded-none" : "rounded-md",
|
|
2110
2178
|
"font-medium",
|
|
@@ -2127,7 +2195,7 @@ import {
|
|
|
2127
2195
|
MenuItem as AriaMenuItem,
|
|
2128
2196
|
Popover as Popover2
|
|
2129
2197
|
} from "react-aria-components";
|
|
2130
|
-
import { twMerge as
|
|
2198
|
+
import { twMerge as twMerge16 } from "tailwind-merge";
|
|
2131
2199
|
|
|
2132
2200
|
// src/components/Menu/menuStyles.ts
|
|
2133
2201
|
var popoverStyles = `
|
|
@@ -2139,7 +2207,7 @@ var popoverStyles = `
|
|
|
2139
2207
|
`;
|
|
2140
2208
|
|
|
2141
2209
|
// src/components/Menu/Menu.tsx
|
|
2142
|
-
import { jsx as
|
|
2210
|
+
import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2143
2211
|
function Menu2({
|
|
2144
2212
|
items,
|
|
2145
2213
|
content,
|
|
@@ -2152,9 +2220,9 @@ function Menu2({
|
|
|
2152
2220
|
className
|
|
2153
2221
|
}) {
|
|
2154
2222
|
const selectionProps = selectionMode && selectionMode !== "none" ? { selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange } : {};
|
|
2155
|
-
return /* @__PURE__ */
|
|
2223
|
+
return /* @__PURE__ */ jsxs19(MenuTrigger, { children: [
|
|
2156
2224
|
children,
|
|
2157
|
-
/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ jsx30(Popover2, { className: twMerge16(popoverStyles, className), children: items ? /* @__PURE__ */ jsx30(
|
|
2158
2226
|
AriaMenu,
|
|
2159
2227
|
{
|
|
2160
2228
|
items,
|
|
@@ -2165,7 +2233,7 @@ function Menu2({
|
|
|
2165
2233
|
},
|
|
2166
2234
|
...selectionProps,
|
|
2167
2235
|
className: "outline-none",
|
|
2168
|
-
children: (item) => /* @__PURE__ */
|
|
2236
|
+
children: (item) => /* @__PURE__ */ jsxs19(
|
|
2169
2237
|
AriaMenuItem,
|
|
2170
2238
|
{
|
|
2171
2239
|
id: item.id,
|
|
@@ -2181,14 +2249,14 @@ function Menu2({
|
|
|
2181
2249
|
item.isDanger ? "text-destructive" : "text-foreground"
|
|
2182
2250
|
].filter(Boolean).join(" "),
|
|
2183
2251
|
children: [
|
|
2184
|
-
item.icon && /* @__PURE__ */
|
|
2185
|
-
/* @__PURE__ */
|
|
2186
|
-
item.endContent && /* @__PURE__ */
|
|
2252
|
+
item.icon && /* @__PURE__ */ jsx30(Icon, { icon: item.icon, size: "sm" }),
|
|
2253
|
+
/* @__PURE__ */ jsx30("span", { className: "flex-1", children: item.label }),
|
|
2254
|
+
item.endContent && /* @__PURE__ */ jsx30("span", { className: "ml-auto flex items-center", children: item.endContent })
|
|
2187
2255
|
]
|
|
2188
2256
|
}
|
|
2189
2257
|
)
|
|
2190
2258
|
}
|
|
2191
|
-
) : /* @__PURE__ */
|
|
2259
|
+
) : /* @__PURE__ */ jsx30(
|
|
2192
2260
|
AriaMenu,
|
|
2193
2261
|
{
|
|
2194
2262
|
onAction: (key) => onAction?.(key),
|
|
@@ -2213,10 +2281,11 @@ import {
|
|
|
2213
2281
|
MenuTrigger as MenuTrigger2,
|
|
2214
2282
|
Popover as Popover3
|
|
2215
2283
|
} from "react-aria-components";
|
|
2216
|
-
import { twMerge as
|
|
2217
|
-
import { jsx as
|
|
2284
|
+
import { twMerge as twMerge17 } from "tailwind-merge";
|
|
2285
|
+
import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2218
2286
|
function useContextMenu({
|
|
2219
2287
|
content,
|
|
2288
|
+
label,
|
|
2220
2289
|
onAction,
|
|
2221
2290
|
className
|
|
2222
2291
|
}) {
|
|
@@ -2257,7 +2326,7 @@ function useContextMenu({
|
|
|
2257
2326
|
document.removeEventListener("keydown", onKeyDown, true);
|
|
2258
2327
|
};
|
|
2259
2328
|
}, [isOpen, close]);
|
|
2260
|
-
const menu = /* @__PURE__ */
|
|
2329
|
+
const menu = /* @__PURE__ */ jsxs20(
|
|
2261
2330
|
MenuTrigger2,
|
|
2262
2331
|
{
|
|
2263
2332
|
isOpen,
|
|
@@ -2265,7 +2334,7 @@ function useContextMenu({
|
|
|
2265
2334
|
if (!open) close();
|
|
2266
2335
|
},
|
|
2267
2336
|
children: [
|
|
2268
|
-
/* @__PURE__ */
|
|
2337
|
+
/* @__PURE__ */ jsx31(
|
|
2269
2338
|
"span",
|
|
2270
2339
|
{
|
|
2271
2340
|
ref: anchorRef,
|
|
@@ -2275,18 +2344,19 @@ function useContextMenu({
|
|
|
2275
2344
|
style: { left: anchor?.x ?? 0, top: anchor?.y ?? 0 }
|
|
2276
2345
|
}
|
|
2277
2346
|
),
|
|
2278
|
-
/* @__PURE__ */
|
|
2347
|
+
/* @__PURE__ */ jsx31(
|
|
2279
2348
|
Popover3,
|
|
2280
2349
|
{
|
|
2281
2350
|
isNonModal: true,
|
|
2282
2351
|
triggerRef: anchorRef,
|
|
2283
2352
|
placement: "bottom start",
|
|
2284
2353
|
ref: popoverRef,
|
|
2285
|
-
className:
|
|
2286
|
-
children: /* @__PURE__ */
|
|
2354
|
+
className: twMerge17(popoverStyles, className),
|
|
2355
|
+
children: /* @__PURE__ */ jsx31(
|
|
2287
2356
|
AriaMenu2,
|
|
2288
2357
|
{
|
|
2289
2358
|
id: popoverId,
|
|
2359
|
+
"aria-label": label,
|
|
2290
2360
|
autoFocus: "first",
|
|
2291
2361
|
onAction: (key) => {
|
|
2292
2362
|
onAction?.(String(key));
|
|
@@ -2320,7 +2390,7 @@ function useContextMenu({
|
|
|
2320
2390
|
|
|
2321
2391
|
// src/components/Menu/MenuItem.tsx
|
|
2322
2392
|
import { MenuItem as AriaMenuItem2 } from "react-aria-components";
|
|
2323
|
-
import { jsx as
|
|
2393
|
+
import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2324
2394
|
function MenuItem({
|
|
2325
2395
|
id,
|
|
2326
2396
|
children,
|
|
@@ -2334,7 +2404,7 @@ function MenuItem({
|
|
|
2334
2404
|
textValue,
|
|
2335
2405
|
className
|
|
2336
2406
|
}) {
|
|
2337
|
-
return /* @__PURE__ */
|
|
2407
|
+
return /* @__PURE__ */ jsxs21(
|
|
2338
2408
|
AriaMenuItem2,
|
|
2339
2409
|
{
|
|
2340
2410
|
id,
|
|
@@ -2353,9 +2423,9 @@ function MenuItem({
|
|
|
2353
2423
|
className
|
|
2354
2424
|
].filter(Boolean).join(" "),
|
|
2355
2425
|
children: [
|
|
2356
|
-
icon && /* @__PURE__ */
|
|
2357
|
-
/* @__PURE__ */
|
|
2358
|
-
endContent && /* @__PURE__ */
|
|
2426
|
+
icon && /* @__PURE__ */ jsx32(Icon, { icon, size: "sm" }),
|
|
2427
|
+
/* @__PURE__ */ jsx32("span", { className: "flex-1", children }),
|
|
2428
|
+
endContent && /* @__PURE__ */ jsx32("span", { className: "ml-auto flex items-center", children: endContent })
|
|
2359
2429
|
]
|
|
2360
2430
|
}
|
|
2361
2431
|
);
|
|
@@ -2364,7 +2434,7 @@ function MenuItem({
|
|
|
2364
2434
|
// src/components/Menu/MenuCheckboxItem.tsx
|
|
2365
2435
|
import { MenuItem as AriaMenuItem3 } from "react-aria-components";
|
|
2366
2436
|
import { Check as Check4 } from "lucide-react";
|
|
2367
|
-
import { Fragment as
|
|
2437
|
+
import { Fragment as Fragment8, jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2368
2438
|
function MenuCheckboxItem({
|
|
2369
2439
|
id,
|
|
2370
2440
|
children,
|
|
@@ -2372,7 +2442,7 @@ function MenuCheckboxItem({
|
|
|
2372
2442
|
isDisabled,
|
|
2373
2443
|
className
|
|
2374
2444
|
}) {
|
|
2375
|
-
return /* @__PURE__ */
|
|
2445
|
+
return /* @__PURE__ */ jsx33(
|
|
2376
2446
|
AriaMenuItem3,
|
|
2377
2447
|
{
|
|
2378
2448
|
id,
|
|
@@ -2388,9 +2458,9 @@ function MenuCheckboxItem({
|
|
|
2388
2458
|
isSelected ? "font-medium" : "",
|
|
2389
2459
|
className
|
|
2390
2460
|
].filter(Boolean).join(" "),
|
|
2391
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
2392
|
-
/* @__PURE__ */
|
|
2393
|
-
/* @__PURE__ */
|
|
2461
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs22(Fragment8, { children: [
|
|
2462
|
+
/* @__PURE__ */ jsx33("span", { className: "flex items-center justify-center w-4 h-4 shrink-0", children: isSelected && /* @__PURE__ */ jsx33(Check4, { size: 14, className: "text-primary", "aria-hidden": "true" }) }),
|
|
2463
|
+
/* @__PURE__ */ jsx33("span", { className: "flex-1", children })
|
|
2394
2464
|
] })
|
|
2395
2465
|
}
|
|
2396
2466
|
);
|
|
@@ -2401,15 +2471,15 @@ import {
|
|
|
2401
2471
|
MenuSection as AriaMenuSection,
|
|
2402
2472
|
Header
|
|
2403
2473
|
} from "react-aria-components";
|
|
2404
|
-
import { jsx as
|
|
2474
|
+
import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2405
2475
|
function MenuSection({
|
|
2406
2476
|
header,
|
|
2407
2477
|
children,
|
|
2408
2478
|
"aria-label": ariaLabel,
|
|
2409
2479
|
className
|
|
2410
2480
|
}) {
|
|
2411
|
-
return /* @__PURE__ */
|
|
2412
|
-
header && /* @__PURE__ */
|
|
2481
|
+
return /* @__PURE__ */ jsxs23(AriaMenuSection, { className, "aria-label": ariaLabel, children: [
|
|
2482
|
+
header && /* @__PURE__ */ jsx34(
|
|
2413
2483
|
Header,
|
|
2414
2484
|
{
|
|
2415
2485
|
className: [
|
|
@@ -2428,16 +2498,16 @@ function MenuSection({
|
|
|
2428
2498
|
|
|
2429
2499
|
// src/components/Menu/MenuHeader.tsx
|
|
2430
2500
|
import { Header as Header2 } from "react-aria-components";
|
|
2431
|
-
import { jsx as
|
|
2501
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2432
2502
|
function MenuHeader({ children, className }) {
|
|
2433
|
-
return /* @__PURE__ */
|
|
2503
|
+
return /* @__PURE__ */ jsx35(Header2, { className, children });
|
|
2434
2504
|
}
|
|
2435
2505
|
|
|
2436
2506
|
// src/components/Menu/MenuSeparator.tsx
|
|
2437
2507
|
import { Separator } from "react-aria-components";
|
|
2438
|
-
import { jsx as
|
|
2508
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2439
2509
|
function MenuSeparator({ className }) {
|
|
2440
|
-
return /* @__PURE__ */
|
|
2510
|
+
return /* @__PURE__ */ jsx36(
|
|
2441
2511
|
Separator,
|
|
2442
2512
|
{
|
|
2443
2513
|
className: [
|
|
@@ -2454,17 +2524,17 @@ import {
|
|
|
2454
2524
|
Popover as AriaPopover,
|
|
2455
2525
|
Button as AriaButton3
|
|
2456
2526
|
} from "react-aria-components";
|
|
2457
|
-
import { twMerge as
|
|
2458
|
-
import { jsx as
|
|
2527
|
+
import { twMerge as twMerge18 } from "tailwind-merge";
|
|
2528
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2459
2529
|
function Popover4({ children, isOpen, onOpenChange }) {
|
|
2460
|
-
return /* @__PURE__ */
|
|
2530
|
+
return /* @__PURE__ */ jsx37(DialogTrigger, { isOpen, onOpenChange, children });
|
|
2461
2531
|
}
|
|
2462
2532
|
function PopoverTrigger({ children, className }) {
|
|
2463
2533
|
const cx = `
|
|
2464
2534
|
inline-flex items-center bg-transparent border-none p-0 outline-none cursor-pointer
|
|
2465
2535
|
focus-visible:ring-2 focus-visible:ring-ring focus-visible:rounded-sm
|
|
2466
2536
|
`;
|
|
2467
|
-
return /* @__PURE__ */
|
|
2537
|
+
return /* @__PURE__ */ jsx37(AriaButton3, { className: twMerge18(cx, className), children });
|
|
2468
2538
|
}
|
|
2469
2539
|
function PopoverContent({
|
|
2470
2540
|
placement = "bottom",
|
|
@@ -2485,13 +2555,13 @@ function PopoverContent({
|
|
|
2485
2555
|
entering:placement-left:slide-in-from-right-1
|
|
2486
2556
|
entering:placement-right:slide-in-from-left-1
|
|
2487
2557
|
`;
|
|
2488
|
-
return /* @__PURE__ */
|
|
2558
|
+
return /* @__PURE__ */ jsx37(
|
|
2489
2559
|
AriaPopover,
|
|
2490
2560
|
{
|
|
2491
2561
|
...rest,
|
|
2492
2562
|
placement,
|
|
2493
2563
|
offset: offsetPx,
|
|
2494
|
-
className:
|
|
2564
|
+
className: twMerge18(cx, className),
|
|
2495
2565
|
children
|
|
2496
2566
|
}
|
|
2497
2567
|
);
|
|
@@ -2499,14 +2569,14 @@ function PopoverContent({
|
|
|
2499
2569
|
|
|
2500
2570
|
// src/components/Tabs/Tabs.tsx
|
|
2501
2571
|
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
2502
|
-
import { twMerge as
|
|
2572
|
+
import { twMerge as twMerge19 } from "tailwind-merge";
|
|
2503
2573
|
import {
|
|
2504
2574
|
Tabs as AriaTabs,
|
|
2505
2575
|
TabList as AriaTabList,
|
|
2506
2576
|
Tab as AriaTab,
|
|
2507
2577
|
TabPanel as AriaTabPanel
|
|
2508
2578
|
} from "react-aria-components";
|
|
2509
|
-
import { jsx as
|
|
2579
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2510
2580
|
var TabsContext = createContext2({
|
|
2511
2581
|
variant: "underline",
|
|
2512
2582
|
size: "md"
|
|
@@ -2524,12 +2594,12 @@ function Tabs({
|
|
|
2524
2594
|
children,
|
|
2525
2595
|
...props
|
|
2526
2596
|
}) {
|
|
2527
|
-
return /* @__PURE__ */
|
|
2597
|
+
return /* @__PURE__ */ jsx38(TabsContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx38(
|
|
2528
2598
|
AriaTabs,
|
|
2529
2599
|
{
|
|
2530
2600
|
...props,
|
|
2531
2601
|
orientation,
|
|
2532
|
-
className:
|
|
2602
|
+
className: twMerge19(
|
|
2533
2603
|
orientation === "vertical" ? "flex" : "",
|
|
2534
2604
|
className
|
|
2535
2605
|
),
|
|
@@ -2544,11 +2614,11 @@ function TabList({
|
|
|
2544
2614
|
const { variant } = useContext2(TabsContext);
|
|
2545
2615
|
const baseStyles = variant === "unstyled" ? "flex items-center" : variant === "underline" ? "flex items-center border-b border-border" : "inline-flex items-center bg-muted rounded-lg p-1 gap-1";
|
|
2546
2616
|
const verticalStyles = variant === "unstyled" ? "flex-col" : variant === "underline" ? "flex-col border-b-0 border-r border-border" : "flex-col";
|
|
2547
|
-
return /* @__PURE__ */
|
|
2617
|
+
return /* @__PURE__ */ jsx38(
|
|
2548
2618
|
AriaTabList,
|
|
2549
2619
|
{
|
|
2550
2620
|
...props,
|
|
2551
|
-
className: ({ orientation }) =>
|
|
2621
|
+
className: ({ orientation }) => twMerge19(
|
|
2552
2622
|
baseStyles,
|
|
2553
2623
|
orientation === "vertical" ? verticalStyles : "",
|
|
2554
2624
|
className
|
|
@@ -2558,20 +2628,20 @@ function TabList({
|
|
|
2558
2628
|
}
|
|
2559
2629
|
function Tab({ className, ...props }) {
|
|
2560
2630
|
const { variant, size } = useContext2(TabsContext);
|
|
2561
|
-
return /* @__PURE__ */
|
|
2631
|
+
return /* @__PURE__ */ jsx38(
|
|
2562
2632
|
AriaTab,
|
|
2563
2633
|
{
|
|
2564
2634
|
...props,
|
|
2565
2635
|
className: ({ isSelected, isDisabled, isHovered, isPressed }) => {
|
|
2566
2636
|
if (variant === "unstyled") {
|
|
2567
|
-
return
|
|
2637
|
+
return twMerge19(
|
|
2568
2638
|
"cursor-pointer outline-none",
|
|
2569
2639
|
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2570
2640
|
isDisabled ? "opacity-50 pointer-events-none" : "",
|
|
2571
2641
|
className
|
|
2572
2642
|
);
|
|
2573
2643
|
}
|
|
2574
|
-
return
|
|
2644
|
+
return twMerge19(
|
|
2575
2645
|
// Base
|
|
2576
2646
|
"cursor-pointer outline-none transition-colors",
|
|
2577
2647
|
"font-medium",
|
|
@@ -2615,11 +2685,11 @@ function getTabVariantStyles(variant, state) {
|
|
|
2615
2685
|
}
|
|
2616
2686
|
function TabPanel({ className, ...props }) {
|
|
2617
2687
|
const { variant } = useContext2(TabsContext);
|
|
2618
|
-
return /* @__PURE__ */
|
|
2688
|
+
return /* @__PURE__ */ jsx38(
|
|
2619
2689
|
AriaTabPanel,
|
|
2620
2690
|
{
|
|
2621
2691
|
...props,
|
|
2622
|
-
className:
|
|
2692
|
+
className: twMerge19(
|
|
2623
2693
|
variant === "unstyled" ? "outline-none" : "mt-4 outline-none",
|
|
2624
2694
|
className
|
|
2625
2695
|
)
|
|
@@ -2637,12 +2707,12 @@ import {
|
|
|
2637
2707
|
|
|
2638
2708
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
2639
2709
|
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
2640
|
-
import { twMerge as
|
|
2710
|
+
import { twMerge as twMerge20 } from "tailwind-merge";
|
|
2641
2711
|
import {
|
|
2642
2712
|
ToggleButtonGroup as AriaToggleButtonGroup,
|
|
2643
2713
|
ToggleButton as AriaToggleButton3
|
|
2644
2714
|
} from "react-aria-components";
|
|
2645
|
-
import { jsx as
|
|
2715
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2646
2716
|
var SegmentedControlContext = createContext3({
|
|
2647
2717
|
size: "md"
|
|
2648
2718
|
});
|
|
@@ -2662,7 +2732,7 @@ function SegmentedControl({
|
|
|
2662
2732
|
...props
|
|
2663
2733
|
}) {
|
|
2664
2734
|
const isNoneMode = selectionMode === "none";
|
|
2665
|
-
return /* @__PURE__ */
|
|
2735
|
+
return /* @__PURE__ */ jsx39(SegmentedControlContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx39(
|
|
2666
2736
|
AriaToggleButtonGroup,
|
|
2667
2737
|
{
|
|
2668
2738
|
...props,
|
|
@@ -2670,7 +2740,7 @@ function SegmentedControl({
|
|
|
2670
2740
|
selectedKeys: isNoneMode ? /* @__PURE__ */ new Set() : selectedKeys,
|
|
2671
2741
|
defaultSelectedKeys: isNoneMode ? void 0 : defaultSelectedKeys,
|
|
2672
2742
|
onSelectionChange: isNoneMode ? void 0 : onSelectionChange,
|
|
2673
|
-
className:
|
|
2743
|
+
className: twMerge20(
|
|
2674
2744
|
"inline-flex items-center rounded-lg border border-border bg-muted p-0.5 gap-0.5",
|
|
2675
2745
|
className
|
|
2676
2746
|
),
|
|
@@ -2683,11 +2753,11 @@ function SegmentedControlItem({
|
|
|
2683
2753
|
...props
|
|
2684
2754
|
}) {
|
|
2685
2755
|
const { size } = useContext3(SegmentedControlContext);
|
|
2686
|
-
return /* @__PURE__ */
|
|
2756
|
+
return /* @__PURE__ */ jsx39(
|
|
2687
2757
|
AriaToggleButton3,
|
|
2688
2758
|
{
|
|
2689
2759
|
...props,
|
|
2690
|
-
className: ({ isSelected, isHovered, isPressed, isDisabled }) =>
|
|
2760
|
+
className: ({ isSelected, isHovered, isPressed, isDisabled }) => twMerge20(
|
|
2691
2761
|
// Base layout
|
|
2692
2762
|
"inline-flex items-center justify-center",
|
|
2693
2763
|
"rounded-md",
|
|
@@ -2708,21 +2778,21 @@ function SegmentedControlItem({
|
|
|
2708
2778
|
}
|
|
2709
2779
|
|
|
2710
2780
|
// src/components/Badge/Badge.tsx
|
|
2711
|
-
import { twMerge as
|
|
2781
|
+
import { twMerge as twMerge22 } from "tailwind-merge";
|
|
2712
2782
|
|
|
2713
2783
|
// src/components/MetricText/MetricText.tsx
|
|
2714
|
-
import { twMerge as
|
|
2715
|
-
import { jsx as
|
|
2784
|
+
import { twMerge as twMerge21 } from "tailwind-merge";
|
|
2785
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2716
2786
|
function MetricText({ className, ...rest }) {
|
|
2717
|
-
const cx =
|
|
2787
|
+
const cx = twMerge21(
|
|
2718
2788
|
"text-xs font-medium leading-none tracking-wider tabular-nums",
|
|
2719
2789
|
className
|
|
2720
2790
|
);
|
|
2721
|
-
return /* @__PURE__ */
|
|
2791
|
+
return /* @__PURE__ */ jsx40("span", { className: cx, ...rest });
|
|
2722
2792
|
}
|
|
2723
2793
|
|
|
2724
2794
|
// src/components/Badge/Badge.tsx
|
|
2725
|
-
import { jsx as
|
|
2795
|
+
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2726
2796
|
var colorStyles = {
|
|
2727
2797
|
purple: "bg-badge-purple-bg text-badge-purple-text border-badge-purple-text/20",
|
|
2728
2798
|
teal: "bg-badge-teal-bg text-badge-teal-text border-badge-teal-text/20",
|
|
@@ -2745,10 +2815,10 @@ function Badge({
|
|
|
2745
2815
|
className,
|
|
2746
2816
|
...rest
|
|
2747
2817
|
}) {
|
|
2748
|
-
return /* @__PURE__ */
|
|
2818
|
+
return /* @__PURE__ */ jsxs24(
|
|
2749
2819
|
MetricText,
|
|
2750
2820
|
{
|
|
2751
|
-
className:
|
|
2821
|
+
className: twMerge22(
|
|
2752
2822
|
"inline-flex items-center gap-1 rounded-full border",
|
|
2753
2823
|
colorStyles[color],
|
|
2754
2824
|
sizeStyles6[size],
|
|
@@ -2756,7 +2826,7 @@ function Badge({
|
|
|
2756
2826
|
),
|
|
2757
2827
|
...rest,
|
|
2758
2828
|
children: [
|
|
2759
|
-
icon && /* @__PURE__ */
|
|
2829
|
+
icon && /* @__PURE__ */ jsx41(Icon, { icon, size: "xs" }),
|
|
2760
2830
|
children
|
|
2761
2831
|
]
|
|
2762
2832
|
}
|
|
@@ -2764,10 +2834,10 @@ function Badge({
|
|
|
2764
2834
|
}
|
|
2765
2835
|
|
|
2766
2836
|
// src/components/Card/Card.tsx
|
|
2767
|
-
import { twMerge as
|
|
2768
|
-
import { jsx as
|
|
2837
|
+
import { twMerge as twMerge23 } from "tailwind-merge";
|
|
2838
|
+
import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2769
2839
|
function Card({ children, header, footer, className }) {
|
|
2770
|
-
const cx =
|
|
2840
|
+
const cx = twMerge23(
|
|
2771
2841
|
`
|
|
2772
2842
|
bg-card p-8
|
|
2773
2843
|
border border-border
|
|
@@ -2776,17 +2846,17 @@ function Card({ children, header, footer, className }) {
|
|
|
2776
2846
|
`,
|
|
2777
2847
|
className
|
|
2778
2848
|
);
|
|
2779
|
-
return /* @__PURE__ */
|
|
2780
|
-
header && /* @__PURE__ */
|
|
2849
|
+
return /* @__PURE__ */ jsxs25("div", { className: cx, children: [
|
|
2850
|
+
header && /* @__PURE__ */ jsx42("div", { className: "border-b border-border", children: header }),
|
|
2781
2851
|
children,
|
|
2782
|
-
footer && /* @__PURE__ */
|
|
2852
|
+
footer && /* @__PURE__ */ jsx42("div", { className: "border-t border-border", children: footer })
|
|
2783
2853
|
] });
|
|
2784
2854
|
}
|
|
2785
2855
|
|
|
2786
2856
|
// src/components/DeltaIndicator/DeltaIndicator.tsx
|
|
2787
2857
|
import { ArrowUp as ArrowUp2, ArrowDown as ArrowDown2, Minus as Minus2 } from "lucide-react";
|
|
2788
|
-
import { twMerge as
|
|
2789
|
-
import { jsx as
|
|
2858
|
+
import { twMerge as twMerge24 } from "tailwind-merge";
|
|
2859
|
+
import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2790
2860
|
function getDirection(current, previous) {
|
|
2791
2861
|
const diff = current - previous;
|
|
2792
2862
|
if (diff > 0) return "increase";
|
|
@@ -2839,16 +2909,16 @@ function DeltaIndicator({
|
|
|
2839
2909
|
className
|
|
2840
2910
|
}) {
|
|
2841
2911
|
if (unavailable) {
|
|
2842
|
-
return /* @__PURE__ */
|
|
2912
|
+
return /* @__PURE__ */ jsxs26(
|
|
2843
2913
|
"span",
|
|
2844
2914
|
{
|
|
2845
|
-
className:
|
|
2915
|
+
className: twMerge24(
|
|
2846
2916
|
"inline-flex items-center gap-1 font-medium",
|
|
2847
2917
|
"text-muted-foreground",
|
|
2848
2918
|
className
|
|
2849
2919
|
),
|
|
2850
2920
|
children: [
|
|
2851
|
-
label && /* @__PURE__ */
|
|
2921
|
+
label && /* @__PURE__ */ jsx43("span", { className: "text-sm text-muted-foreground mr-1", children: label }),
|
|
2852
2922
|
unavailableText
|
|
2853
2923
|
]
|
|
2854
2924
|
}
|
|
@@ -2878,10 +2948,10 @@ function DeltaIndicator({
|
|
|
2878
2948
|
}
|
|
2879
2949
|
}
|
|
2880
2950
|
const isPill = mode === "pill";
|
|
2881
|
-
return /* @__PURE__ */
|
|
2951
|
+
return /* @__PURE__ */ jsxs26(
|
|
2882
2952
|
"span",
|
|
2883
2953
|
{
|
|
2884
|
-
className:
|
|
2954
|
+
className: twMerge24(
|
|
2885
2955
|
"inline-flex items-center gap-1 font-medium",
|
|
2886
2956
|
colorStyles2,
|
|
2887
2957
|
isPill && [
|
|
@@ -2892,8 +2962,8 @@ function DeltaIndicator({
|
|
|
2892
2962
|
className
|
|
2893
2963
|
),
|
|
2894
2964
|
children: [
|
|
2895
|
-
label && /* @__PURE__ */
|
|
2896
|
-
/* @__PURE__ */
|
|
2965
|
+
label && /* @__PURE__ */ jsx43("span", { className: "text-sm text-muted-foreground mr-1", children: label }),
|
|
2966
|
+
/* @__PURE__ */ jsx43(IconComponent, { size: 14, "aria-hidden": true }),
|
|
2897
2967
|
valueText
|
|
2898
2968
|
]
|
|
2899
2969
|
}
|
|
@@ -2901,8 +2971,8 @@ function DeltaIndicator({
|
|
|
2901
2971
|
}
|
|
2902
2972
|
|
|
2903
2973
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2904
|
-
import { twMerge as
|
|
2905
|
-
import { jsx as
|
|
2974
|
+
import { twMerge as twMerge25 } from "tailwind-merge";
|
|
2975
|
+
import { jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2906
2976
|
var fillStyles = {
|
|
2907
2977
|
brand: "bg-progress-fill",
|
|
2908
2978
|
success: "bg-progress-fill-success",
|
|
@@ -2925,12 +2995,12 @@ function ProgressBar({
|
|
|
2925
2995
|
className
|
|
2926
2996
|
}) {
|
|
2927
2997
|
const clampedValue = Math.min(100, Math.max(0, value));
|
|
2928
|
-
return /* @__PURE__ */
|
|
2929
|
-
(label || description || showValue) && /* @__PURE__ */
|
|
2930
|
-
/* @__PURE__ */
|
|
2931
|
-
/* @__PURE__ */
|
|
2998
|
+
return /* @__PURE__ */ jsxs27("div", { className: twMerge25("w-full", className), children: [
|
|
2999
|
+
(label || description || showValue) && /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between mb-2", children: [
|
|
3000
|
+
/* @__PURE__ */ jsx44("span", { className: "text-sm font-medium text-foreground", children: label }),
|
|
3001
|
+
/* @__PURE__ */ jsx44("span", { className: "text-sm text-muted-foreground", children: description ?? (showValue ? `${clampedValue}%` : null) })
|
|
2932
3002
|
] }),
|
|
2933
|
-
/* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ jsx44(
|
|
2934
3004
|
"div",
|
|
2935
3005
|
{
|
|
2936
3006
|
role: "progressbar",
|
|
@@ -2938,14 +3008,14 @@ function ProgressBar({
|
|
|
2938
3008
|
"aria-valuemin": 0,
|
|
2939
3009
|
"aria-valuemax": 100,
|
|
2940
3010
|
"aria-label": label ?? "Progress",
|
|
2941
|
-
className:
|
|
3011
|
+
className: twMerge25(
|
|
2942
3012
|
"w-full rounded-full bg-progress-track",
|
|
2943
3013
|
sizeStyles7[size]
|
|
2944
3014
|
),
|
|
2945
|
-
children: /* @__PURE__ */
|
|
3015
|
+
children: /* @__PURE__ */ jsx44(
|
|
2946
3016
|
"div",
|
|
2947
3017
|
{
|
|
2948
|
-
className:
|
|
3018
|
+
className: twMerge25(
|
|
2949
3019
|
"h-full rounded-full transition-all duration-300",
|
|
2950
3020
|
fillStyles[variant]
|
|
2951
3021
|
),
|
|
@@ -2965,8 +3035,8 @@ import {
|
|
|
2965
3035
|
AlertCircle as AlertCircle2,
|
|
2966
3036
|
CheckCircle2 as CheckCircle22
|
|
2967
3037
|
} from "lucide-react";
|
|
2968
|
-
import { twMerge as
|
|
2969
|
-
import { jsx as
|
|
3038
|
+
import { twMerge as twMerge26 } from "tailwind-merge";
|
|
3039
|
+
import { jsx as jsx45, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2970
3040
|
var variantConfig2 = {
|
|
2971
3041
|
info: {
|
|
2972
3042
|
icon: Info3,
|
|
@@ -3010,40 +3080,40 @@ function Banner({
|
|
|
3010
3080
|
setDismissed(true);
|
|
3011
3081
|
onDismiss?.();
|
|
3012
3082
|
};
|
|
3013
|
-
return /* @__PURE__ */
|
|
3083
|
+
return /* @__PURE__ */ jsxs28(
|
|
3014
3084
|
"div",
|
|
3015
3085
|
{
|
|
3016
3086
|
role: config.role,
|
|
3017
|
-
className:
|
|
3087
|
+
className: twMerge26(
|
|
3018
3088
|
"flex items-start gap-3 rounded-lg border px-4 py-3",
|
|
3019
3089
|
"text-sm",
|
|
3020
3090
|
config.containerClass,
|
|
3021
3091
|
className
|
|
3022
3092
|
),
|
|
3023
3093
|
children: [
|
|
3024
|
-
/* @__PURE__ */
|
|
3094
|
+
/* @__PURE__ */ jsx45(
|
|
3025
3095
|
Icon,
|
|
3026
3096
|
{
|
|
3027
3097
|
icon: resolvedIcon,
|
|
3028
3098
|
size: "md",
|
|
3029
|
-
className:
|
|
3099
|
+
className: twMerge26("mt-0.5", config.iconClass)
|
|
3030
3100
|
}
|
|
3031
3101
|
),
|
|
3032
|
-
/* @__PURE__ */
|
|
3033
|
-
title && /* @__PURE__ */
|
|
3102
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex-1", children: [
|
|
3103
|
+
title && /* @__PURE__ */ jsxs28("span", { className: "font-medium", children: [
|
|
3034
3104
|
title,
|
|
3035
3105
|
" \u2014 "
|
|
3036
3106
|
] }),
|
|
3037
3107
|
children
|
|
3038
3108
|
] }),
|
|
3039
|
-
dismissible && /* @__PURE__ */
|
|
3109
|
+
dismissible && /* @__PURE__ */ jsx45(
|
|
3040
3110
|
"button",
|
|
3041
3111
|
{
|
|
3042
3112
|
type: "button",
|
|
3043
3113
|
onClick: handleDismiss,
|
|
3044
3114
|
className: "shrink-0 rounded-sm p-0.5 opacity-70 hover:opacity-100 transition-opacity outline-none focus-visible:ring-2 focus-visible:ring-current",
|
|
3045
3115
|
"aria-label": "Dismiss",
|
|
3046
|
-
children: /* @__PURE__ */
|
|
3116
|
+
children: /* @__PURE__ */ jsx45(Icon, { icon: "X", size: "sm" })
|
|
3047
3117
|
}
|
|
3048
3118
|
)
|
|
3049
3119
|
]
|
|
@@ -3052,8 +3122,8 @@ function Banner({
|
|
|
3052
3122
|
}
|
|
3053
3123
|
|
|
3054
3124
|
// src/components/MetricCard/MetricCard.tsx
|
|
3055
|
-
import { twMerge as
|
|
3056
|
-
import { Fragment as
|
|
3125
|
+
import { twMerge as twMerge27 } from "tailwind-merge";
|
|
3126
|
+
import { Fragment as Fragment9, jsx as jsx46, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3057
3127
|
var sizeConfig = {
|
|
3058
3128
|
sm: {
|
|
3059
3129
|
padding: "p-3",
|
|
@@ -3075,50 +3145,50 @@ function MetricCard({
|
|
|
3075
3145
|
className
|
|
3076
3146
|
}) {
|
|
3077
3147
|
const config = sizeConfig[size];
|
|
3078
|
-
const containerClass =
|
|
3148
|
+
const containerClass = twMerge27(
|
|
3079
3149
|
"bg-background border border-border rounded-lg shadow-sm",
|
|
3080
3150
|
config.padding,
|
|
3081
3151
|
href && "block transition-shadow hover:shadow-md hover:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 outline-none",
|
|
3082
3152
|
className
|
|
3083
3153
|
);
|
|
3084
|
-
const content = /* @__PURE__ */
|
|
3085
|
-
/* @__PURE__ */
|
|
3086
|
-
/* @__PURE__ */
|
|
3154
|
+
const content = /* @__PURE__ */ jsxs29(Fragment9, { children: [
|
|
3155
|
+
/* @__PURE__ */ jsx46("div", { className: twMerge27(config.labelClass, "text-muted-foreground"), children: label }),
|
|
3156
|
+
/* @__PURE__ */ jsx46(
|
|
3087
3157
|
"div",
|
|
3088
3158
|
{
|
|
3089
|
-
className:
|
|
3159
|
+
className: twMerge27(
|
|
3090
3160
|
config.valueClass,
|
|
3091
3161
|
"font-semibold text-foreground mt-1 tabular-nums"
|
|
3092
3162
|
),
|
|
3093
3163
|
children: value
|
|
3094
3164
|
}
|
|
3095
3165
|
),
|
|
3096
|
-
secondary && /* @__PURE__ */
|
|
3166
|
+
secondary && /* @__PURE__ */ jsx46("div", { className: "mt-1 text-sm", children: secondary })
|
|
3097
3167
|
] });
|
|
3098
3168
|
if (href) {
|
|
3099
|
-
return /* @__PURE__ */
|
|
3169
|
+
return /* @__PURE__ */ jsx46("a", { href, className: containerClass, children: content });
|
|
3100
3170
|
}
|
|
3101
|
-
return /* @__PURE__ */
|
|
3171
|
+
return /* @__PURE__ */ jsx46("div", { className: containerClass, children: content });
|
|
3102
3172
|
}
|
|
3103
3173
|
|
|
3104
3174
|
// src/components/SectionHeader/SectionHeader.tsx
|
|
3105
3175
|
import { forwardRef as forwardRef7 } from "react";
|
|
3106
|
-
import { twMerge as
|
|
3107
|
-
import { jsx as
|
|
3176
|
+
import { twMerge as twMerge28 } from "tailwind-merge";
|
|
3177
|
+
import { jsx as jsx47, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3108
3178
|
var SectionHeader = forwardRef7(
|
|
3109
3179
|
function SectionHeader2({ title, as = "h2", children, className, ...rest }, ref) {
|
|
3110
|
-
return /* @__PURE__ */
|
|
3180
|
+
return /* @__PURE__ */ jsxs30(
|
|
3111
3181
|
"div",
|
|
3112
3182
|
{
|
|
3113
3183
|
ref,
|
|
3114
|
-
className:
|
|
3184
|
+
className: twMerge28(
|
|
3115
3185
|
"flex flex-wrap items-center gap-3 pt-0 pb-4",
|
|
3116
3186
|
className
|
|
3117
3187
|
),
|
|
3118
3188
|
...rest,
|
|
3119
3189
|
children: [
|
|
3120
|
-
/* @__PURE__ */
|
|
3121
|
-
children && /* @__PURE__ */
|
|
3190
|
+
/* @__PURE__ */ jsx47(Heading, { as, children: title }),
|
|
3191
|
+
children && /* @__PURE__ */ jsx47("div", { className: "ml-auto flex flex-wrap items-center gap-2", children })
|
|
3122
3192
|
]
|
|
3123
3193
|
}
|
|
3124
3194
|
);
|
|
@@ -3128,7 +3198,7 @@ var SectionHeader = forwardRef7(
|
|
|
3128
3198
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
3129
3199
|
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
3130
3200
|
import { Button as AriaButton4 } from "react-aria-components";
|
|
3131
|
-
import { jsx as
|
|
3201
|
+
import { jsx as jsx48, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3132
3202
|
var LayoutContext = createContext4("stacked");
|
|
3133
3203
|
var listGapStyles = {
|
|
3134
3204
|
stacked: "gap-4",
|
|
@@ -3139,7 +3209,7 @@ function DescriptionList({
|
|
|
3139
3209
|
layout = "stacked",
|
|
3140
3210
|
className
|
|
3141
3211
|
}) {
|
|
3142
|
-
return /* @__PURE__ */
|
|
3212
|
+
return /* @__PURE__ */ jsx48(LayoutContext.Provider, { value: layout, children: /* @__PURE__ */ jsx48(
|
|
3143
3213
|
"dl",
|
|
3144
3214
|
{
|
|
3145
3215
|
className: ["flex flex-col", listGapStyles[layout], className].filter(Boolean).join(" "),
|
|
@@ -3163,17 +3233,17 @@ function DescriptionListItem({
|
|
|
3163
3233
|
"text-sm m-0",
|
|
3164
3234
|
muted ? "text-muted-foreground" : "text-foreground"
|
|
3165
3235
|
].join(" ");
|
|
3166
|
-
const valueContent = /* @__PURE__ */
|
|
3167
|
-
return /* @__PURE__ */
|
|
3168
|
-
/* @__PURE__ */
|
|
3169
|
-
fullValue ? /* @__PURE__ */
|
|
3236
|
+
const valueContent = /* @__PURE__ */ jsx48("dd", { className: valueClasses, children });
|
|
3237
|
+
return /* @__PURE__ */ jsxs31("div", { className: itemLayoutStyles[layout], children: [
|
|
3238
|
+
/* @__PURE__ */ jsx48("dt", { className: labelClasses, children: label }),
|
|
3239
|
+
fullValue ? /* @__PURE__ */ jsx48(Tooltip, { content: fullValue, children: /* @__PURE__ */ jsx48(AriaButton4, { className: "text-left outline-none cursor-default", children: valueContent }) }) : valueContent
|
|
3170
3240
|
] });
|
|
3171
3241
|
}
|
|
3172
3242
|
DescriptionList.Item = DescriptionListItem;
|
|
3173
3243
|
|
|
3174
3244
|
// src/components/PathPill/PathPill.tsx
|
|
3175
|
-
import { twMerge as
|
|
3176
|
-
import { jsx as
|
|
3245
|
+
import { twMerge as twMerge29 } from "tailwind-merge";
|
|
3246
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
3177
3247
|
var hashColors = [
|
|
3178
3248
|
"purple",
|
|
3179
3249
|
"teal",
|
|
@@ -3199,17 +3269,17 @@ function PathPill({
|
|
|
3199
3269
|
const effectiveVisible = visibleCount ?? segments.length;
|
|
3200
3270
|
const dotCount = Math.max(0, segments.length - effectiveVisible);
|
|
3201
3271
|
const fullPath = segments.join(" / ");
|
|
3202
|
-
return /* @__PURE__ */
|
|
3272
|
+
return /* @__PURE__ */ jsx49(
|
|
3203
3273
|
"div",
|
|
3204
3274
|
{
|
|
3205
|
-
className:
|
|
3275
|
+
className: twMerge29("relative flex", className),
|
|
3206
3276
|
"aria-label": `Path: ${fullPath}`,
|
|
3207
3277
|
children: segments.map((segment, i) => {
|
|
3208
3278
|
const isCollapsed = i < dotCount;
|
|
3209
3279
|
const isLast = i === segments.length - 1;
|
|
3210
|
-
const cx =
|
|
3280
|
+
const cx = twMerge29(!isLast && "pr-5 -mr-4", isCollapsed && "pr-3");
|
|
3211
3281
|
const color = colorFn ? colorFn(segment, i) : pillColorFromName(segment);
|
|
3212
|
-
return /* @__PURE__ */
|
|
3282
|
+
return /* @__PURE__ */ jsx49(
|
|
3213
3283
|
Badge,
|
|
3214
3284
|
{
|
|
3215
3285
|
className: cx,
|
|
@@ -3226,7 +3296,7 @@ function PathPill({
|
|
|
3226
3296
|
|
|
3227
3297
|
// src/components/FormWizard/FormWizard.tsx
|
|
3228
3298
|
import { createContext as createContext5, useContext as useContext5, useCallback as useCallback4, useMemo } from "react";
|
|
3229
|
-
import { jsx as
|
|
3299
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
3230
3300
|
var FormWizardContext = createContext5({
|
|
3231
3301
|
currentStep: 0,
|
|
3232
3302
|
totalSteps: 1,
|
|
@@ -3261,13 +3331,13 @@ function FormWizard({
|
|
|
3261
3331
|
}),
|
|
3262
3332
|
[currentStep, totalSteps, canGoBack, goBack, isLastStep]
|
|
3263
3333
|
);
|
|
3264
|
-
return /* @__PURE__ */
|
|
3334
|
+
return /* @__PURE__ */ jsx50(FormWizardContext.Provider, { value, children });
|
|
3265
3335
|
}
|
|
3266
3336
|
|
|
3267
3337
|
// src/components/FormWizard/FormWizardProgress.tsx
|
|
3268
|
-
import { jsx as
|
|
3338
|
+
import { jsx as jsx51, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3269
3339
|
function CheckIcon() {
|
|
3270
|
-
return /* @__PURE__ */
|
|
3340
|
+
return /* @__PURE__ */ jsx51(
|
|
3271
3341
|
"svg",
|
|
3272
3342
|
{
|
|
3273
3343
|
"aria-hidden": "true",
|
|
@@ -3278,24 +3348,24 @@ function CheckIcon() {
|
|
|
3278
3348
|
strokeWidth: "2",
|
|
3279
3349
|
strokeLinecap: "round",
|
|
3280
3350
|
strokeLinejoin: "round",
|
|
3281
|
-
children: /* @__PURE__ */
|
|
3351
|
+
children: /* @__PURE__ */ jsx51("path", { d: "M3 8.5l3.5 3.5 6.5-7" })
|
|
3282
3352
|
}
|
|
3283
3353
|
);
|
|
3284
3354
|
}
|
|
3285
3355
|
function FormWizardProgress({ labels }) {
|
|
3286
3356
|
const { currentStep, totalSteps } = useFormWizard();
|
|
3287
|
-
return /* @__PURE__ */
|
|
3357
|
+
return /* @__PURE__ */ jsx51("nav", { "aria-label": "Form progress", children: /* @__PURE__ */ jsx51("ol", { className: "flex items-start", role: "list", children: labels.map((label, index) => {
|
|
3288
3358
|
const isCompleted = index < currentStep;
|
|
3289
3359
|
const isCurrent = index === currentStep;
|
|
3290
3360
|
const isFuture = index > currentStep;
|
|
3291
|
-
return /* @__PURE__ */
|
|
3361
|
+
return /* @__PURE__ */ jsxs32(
|
|
3292
3362
|
"li",
|
|
3293
3363
|
{
|
|
3294
3364
|
className: "flex flex-1 flex-col items-center",
|
|
3295
3365
|
"aria-current": isCurrent ? "step" : void 0,
|
|
3296
3366
|
children: [
|
|
3297
|
-
/* @__PURE__ */
|
|
3298
|
-
index > 0 ? /* @__PURE__ */
|
|
3367
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex w-full items-center", children: [
|
|
3368
|
+
index > 0 ? /* @__PURE__ */ jsx51(
|
|
3299
3369
|
"div",
|
|
3300
3370
|
{
|
|
3301
3371
|
"aria-hidden": "true",
|
|
@@ -3304,8 +3374,8 @@ function FormWizardProgress({ labels }) {
|
|
|
3304
3374
|
index <= currentStep ? "bg-primary" : "bg-border"
|
|
3305
3375
|
].join(" ")
|
|
3306
3376
|
}
|
|
3307
|
-
) : /* @__PURE__ */
|
|
3308
|
-
/* @__PURE__ */
|
|
3377
|
+
) : /* @__PURE__ */ jsx51("div", { className: "flex-1", "aria-hidden": "true" }),
|
|
3378
|
+
/* @__PURE__ */ jsx51(
|
|
3309
3379
|
"div",
|
|
3310
3380
|
{
|
|
3311
3381
|
className: [
|
|
@@ -3317,10 +3387,10 @@ function FormWizardProgress({ labels }) {
|
|
|
3317
3387
|
isFuture ? "border-2 border-border bg-background text-muted-foreground" : ""
|
|
3318
3388
|
].join(" "),
|
|
3319
3389
|
"aria-hidden": "true",
|
|
3320
|
-
children: isCompleted ? /* @__PURE__ */
|
|
3390
|
+
children: isCompleted ? /* @__PURE__ */ jsx51(CheckIcon, {}) : index + 1
|
|
3321
3391
|
}
|
|
3322
3392
|
),
|
|
3323
|
-
index < totalSteps - 1 ? /* @__PURE__ */
|
|
3393
|
+
index < totalSteps - 1 ? /* @__PURE__ */ jsx51(
|
|
3324
3394
|
"div",
|
|
3325
3395
|
{
|
|
3326
3396
|
"aria-hidden": "true",
|
|
@@ -3329,9 +3399,9 @@ function FormWizardProgress({ labels }) {
|
|
|
3329
3399
|
index < currentStep ? "bg-primary" : "bg-border"
|
|
3330
3400
|
].join(" ")
|
|
3331
3401
|
}
|
|
3332
|
-
) : /* @__PURE__ */
|
|
3402
|
+
) : /* @__PURE__ */ jsx51("div", { className: "flex-1", "aria-hidden": "true" })
|
|
3333
3403
|
] }),
|
|
3334
|
-
/* @__PURE__ */
|
|
3404
|
+
/* @__PURE__ */ jsx51(
|
|
3335
3405
|
"span",
|
|
3336
3406
|
{
|
|
3337
3407
|
className: [
|
|
@@ -3349,15 +3419,15 @@ function FormWizardProgress({ labels }) {
|
|
|
3349
3419
|
}
|
|
3350
3420
|
|
|
3351
3421
|
// src/components/FormWizard/FormWizardNav.tsx
|
|
3352
|
-
import { jsx as
|
|
3422
|
+
import { jsx as jsx52, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3353
3423
|
function FormWizardNav({
|
|
3354
3424
|
onNext,
|
|
3355
3425
|
isSubmitting = false,
|
|
3356
3426
|
submitLabel = "Submit"
|
|
3357
3427
|
}) {
|
|
3358
3428
|
const { canGoBack, goBack, isLastStep } = useFormWizard();
|
|
3359
|
-
return /* @__PURE__ */
|
|
3360
|
-
canGoBack && /* @__PURE__ */
|
|
3429
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-end gap-3", children: [
|
|
3430
|
+
canGoBack && /* @__PURE__ */ jsx52(
|
|
3361
3431
|
Button,
|
|
3362
3432
|
{
|
|
3363
3433
|
variant: "secondary",
|
|
@@ -3367,7 +3437,7 @@ function FormWizardNav({
|
|
|
3367
3437
|
children: "Back"
|
|
3368
3438
|
}
|
|
3369
3439
|
),
|
|
3370
|
-
/* @__PURE__ */
|
|
3440
|
+
/* @__PURE__ */ jsx52(
|
|
3371
3441
|
Button,
|
|
3372
3442
|
{
|
|
3373
3443
|
variant: "primary",
|
|
@@ -3437,6 +3507,7 @@ export {
|
|
|
3437
3507
|
SegmentedControl,
|
|
3438
3508
|
SegmentedControlItem,
|
|
3439
3509
|
Select,
|
|
3510
|
+
Slider,
|
|
3440
3511
|
Spinner,
|
|
3441
3512
|
Switch,
|
|
3442
3513
|
Tab,
|