@cytario/design 9.6.2 → 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 +22 -2
- package/dist/index.js +232 -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,8 +2281,8 @@ 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,
|
|
2220
2288
|
label,
|
|
@@ -2258,7 +2326,7 @@ function useContextMenu({
|
|
|
2258
2326
|
document.removeEventListener("keydown", onKeyDown, true);
|
|
2259
2327
|
};
|
|
2260
2328
|
}, [isOpen, close]);
|
|
2261
|
-
const menu = /* @__PURE__ */
|
|
2329
|
+
const menu = /* @__PURE__ */ jsxs20(
|
|
2262
2330
|
MenuTrigger2,
|
|
2263
2331
|
{
|
|
2264
2332
|
isOpen,
|
|
@@ -2266,7 +2334,7 @@ function useContextMenu({
|
|
|
2266
2334
|
if (!open) close();
|
|
2267
2335
|
},
|
|
2268
2336
|
children: [
|
|
2269
|
-
/* @__PURE__ */
|
|
2337
|
+
/* @__PURE__ */ jsx31(
|
|
2270
2338
|
"span",
|
|
2271
2339
|
{
|
|
2272
2340
|
ref: anchorRef,
|
|
@@ -2276,15 +2344,15 @@ function useContextMenu({
|
|
|
2276
2344
|
style: { left: anchor?.x ?? 0, top: anchor?.y ?? 0 }
|
|
2277
2345
|
}
|
|
2278
2346
|
),
|
|
2279
|
-
/* @__PURE__ */
|
|
2347
|
+
/* @__PURE__ */ jsx31(
|
|
2280
2348
|
Popover3,
|
|
2281
2349
|
{
|
|
2282
2350
|
isNonModal: true,
|
|
2283
2351
|
triggerRef: anchorRef,
|
|
2284
2352
|
placement: "bottom start",
|
|
2285
2353
|
ref: popoverRef,
|
|
2286
|
-
className:
|
|
2287
|
-
children: /* @__PURE__ */
|
|
2354
|
+
className: twMerge17(popoverStyles, className),
|
|
2355
|
+
children: /* @__PURE__ */ jsx31(
|
|
2288
2356
|
AriaMenu2,
|
|
2289
2357
|
{
|
|
2290
2358
|
id: popoverId,
|
|
@@ -2322,7 +2390,7 @@ function useContextMenu({
|
|
|
2322
2390
|
|
|
2323
2391
|
// src/components/Menu/MenuItem.tsx
|
|
2324
2392
|
import { MenuItem as AriaMenuItem2 } from "react-aria-components";
|
|
2325
|
-
import { jsx as
|
|
2393
|
+
import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2326
2394
|
function MenuItem({
|
|
2327
2395
|
id,
|
|
2328
2396
|
children,
|
|
@@ -2336,7 +2404,7 @@ function MenuItem({
|
|
|
2336
2404
|
textValue,
|
|
2337
2405
|
className
|
|
2338
2406
|
}) {
|
|
2339
|
-
return /* @__PURE__ */
|
|
2407
|
+
return /* @__PURE__ */ jsxs21(
|
|
2340
2408
|
AriaMenuItem2,
|
|
2341
2409
|
{
|
|
2342
2410
|
id,
|
|
@@ -2355,9 +2423,9 @@ function MenuItem({
|
|
|
2355
2423
|
className
|
|
2356
2424
|
].filter(Boolean).join(" "),
|
|
2357
2425
|
children: [
|
|
2358
|
-
icon && /* @__PURE__ */
|
|
2359
|
-
/* @__PURE__ */
|
|
2360
|
-
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 })
|
|
2361
2429
|
]
|
|
2362
2430
|
}
|
|
2363
2431
|
);
|
|
@@ -2366,7 +2434,7 @@ function MenuItem({
|
|
|
2366
2434
|
// src/components/Menu/MenuCheckboxItem.tsx
|
|
2367
2435
|
import { MenuItem as AriaMenuItem3 } from "react-aria-components";
|
|
2368
2436
|
import { Check as Check4 } from "lucide-react";
|
|
2369
|
-
import { Fragment as
|
|
2437
|
+
import { Fragment as Fragment8, jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2370
2438
|
function MenuCheckboxItem({
|
|
2371
2439
|
id,
|
|
2372
2440
|
children,
|
|
@@ -2374,7 +2442,7 @@ function MenuCheckboxItem({
|
|
|
2374
2442
|
isDisabled,
|
|
2375
2443
|
className
|
|
2376
2444
|
}) {
|
|
2377
|
-
return /* @__PURE__ */
|
|
2445
|
+
return /* @__PURE__ */ jsx33(
|
|
2378
2446
|
AriaMenuItem3,
|
|
2379
2447
|
{
|
|
2380
2448
|
id,
|
|
@@ -2390,9 +2458,9 @@ function MenuCheckboxItem({
|
|
|
2390
2458
|
isSelected ? "font-medium" : "",
|
|
2391
2459
|
className
|
|
2392
2460
|
].filter(Boolean).join(" "),
|
|
2393
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
2394
|
-
/* @__PURE__ */
|
|
2395
|
-
/* @__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 })
|
|
2396
2464
|
] })
|
|
2397
2465
|
}
|
|
2398
2466
|
);
|
|
@@ -2403,15 +2471,15 @@ import {
|
|
|
2403
2471
|
MenuSection as AriaMenuSection,
|
|
2404
2472
|
Header
|
|
2405
2473
|
} from "react-aria-components";
|
|
2406
|
-
import { jsx as
|
|
2474
|
+
import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2407
2475
|
function MenuSection({
|
|
2408
2476
|
header,
|
|
2409
2477
|
children,
|
|
2410
2478
|
"aria-label": ariaLabel,
|
|
2411
2479
|
className
|
|
2412
2480
|
}) {
|
|
2413
|
-
return /* @__PURE__ */
|
|
2414
|
-
header && /* @__PURE__ */
|
|
2481
|
+
return /* @__PURE__ */ jsxs23(AriaMenuSection, { className, "aria-label": ariaLabel, children: [
|
|
2482
|
+
header && /* @__PURE__ */ jsx34(
|
|
2415
2483
|
Header,
|
|
2416
2484
|
{
|
|
2417
2485
|
className: [
|
|
@@ -2430,16 +2498,16 @@ function MenuSection({
|
|
|
2430
2498
|
|
|
2431
2499
|
// src/components/Menu/MenuHeader.tsx
|
|
2432
2500
|
import { Header as Header2 } from "react-aria-components";
|
|
2433
|
-
import { jsx as
|
|
2501
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2434
2502
|
function MenuHeader({ children, className }) {
|
|
2435
|
-
return /* @__PURE__ */
|
|
2503
|
+
return /* @__PURE__ */ jsx35(Header2, { className, children });
|
|
2436
2504
|
}
|
|
2437
2505
|
|
|
2438
2506
|
// src/components/Menu/MenuSeparator.tsx
|
|
2439
2507
|
import { Separator } from "react-aria-components";
|
|
2440
|
-
import { jsx as
|
|
2508
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2441
2509
|
function MenuSeparator({ className }) {
|
|
2442
|
-
return /* @__PURE__ */
|
|
2510
|
+
return /* @__PURE__ */ jsx36(
|
|
2443
2511
|
Separator,
|
|
2444
2512
|
{
|
|
2445
2513
|
className: [
|
|
@@ -2456,17 +2524,17 @@ import {
|
|
|
2456
2524
|
Popover as AriaPopover,
|
|
2457
2525
|
Button as AriaButton3
|
|
2458
2526
|
} from "react-aria-components";
|
|
2459
|
-
import { twMerge as
|
|
2460
|
-
import { jsx as
|
|
2527
|
+
import { twMerge as twMerge18 } from "tailwind-merge";
|
|
2528
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2461
2529
|
function Popover4({ children, isOpen, onOpenChange }) {
|
|
2462
|
-
return /* @__PURE__ */
|
|
2530
|
+
return /* @__PURE__ */ jsx37(DialogTrigger, { isOpen, onOpenChange, children });
|
|
2463
2531
|
}
|
|
2464
2532
|
function PopoverTrigger({ children, className }) {
|
|
2465
2533
|
const cx = `
|
|
2466
2534
|
inline-flex items-center bg-transparent border-none p-0 outline-none cursor-pointer
|
|
2467
2535
|
focus-visible:ring-2 focus-visible:ring-ring focus-visible:rounded-sm
|
|
2468
2536
|
`;
|
|
2469
|
-
return /* @__PURE__ */
|
|
2537
|
+
return /* @__PURE__ */ jsx37(AriaButton3, { className: twMerge18(cx, className), children });
|
|
2470
2538
|
}
|
|
2471
2539
|
function PopoverContent({
|
|
2472
2540
|
placement = "bottom",
|
|
@@ -2487,13 +2555,13 @@ function PopoverContent({
|
|
|
2487
2555
|
entering:placement-left:slide-in-from-right-1
|
|
2488
2556
|
entering:placement-right:slide-in-from-left-1
|
|
2489
2557
|
`;
|
|
2490
|
-
return /* @__PURE__ */
|
|
2558
|
+
return /* @__PURE__ */ jsx37(
|
|
2491
2559
|
AriaPopover,
|
|
2492
2560
|
{
|
|
2493
2561
|
...rest,
|
|
2494
2562
|
placement,
|
|
2495
2563
|
offset: offsetPx,
|
|
2496
|
-
className:
|
|
2564
|
+
className: twMerge18(cx, className),
|
|
2497
2565
|
children
|
|
2498
2566
|
}
|
|
2499
2567
|
);
|
|
@@ -2501,14 +2569,14 @@ function PopoverContent({
|
|
|
2501
2569
|
|
|
2502
2570
|
// src/components/Tabs/Tabs.tsx
|
|
2503
2571
|
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
2504
|
-
import { twMerge as
|
|
2572
|
+
import { twMerge as twMerge19 } from "tailwind-merge";
|
|
2505
2573
|
import {
|
|
2506
2574
|
Tabs as AriaTabs,
|
|
2507
2575
|
TabList as AriaTabList,
|
|
2508
2576
|
Tab as AriaTab,
|
|
2509
2577
|
TabPanel as AriaTabPanel
|
|
2510
2578
|
} from "react-aria-components";
|
|
2511
|
-
import { jsx as
|
|
2579
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2512
2580
|
var TabsContext = createContext2({
|
|
2513
2581
|
variant: "underline",
|
|
2514
2582
|
size: "md"
|
|
@@ -2526,12 +2594,12 @@ function Tabs({
|
|
|
2526
2594
|
children,
|
|
2527
2595
|
...props
|
|
2528
2596
|
}) {
|
|
2529
|
-
return /* @__PURE__ */
|
|
2597
|
+
return /* @__PURE__ */ jsx38(TabsContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx38(
|
|
2530
2598
|
AriaTabs,
|
|
2531
2599
|
{
|
|
2532
2600
|
...props,
|
|
2533
2601
|
orientation,
|
|
2534
|
-
className:
|
|
2602
|
+
className: twMerge19(
|
|
2535
2603
|
orientation === "vertical" ? "flex" : "",
|
|
2536
2604
|
className
|
|
2537
2605
|
),
|
|
@@ -2546,11 +2614,11 @@ function TabList({
|
|
|
2546
2614
|
const { variant } = useContext2(TabsContext);
|
|
2547
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";
|
|
2548
2616
|
const verticalStyles = variant === "unstyled" ? "flex-col" : variant === "underline" ? "flex-col border-b-0 border-r border-border" : "flex-col";
|
|
2549
|
-
return /* @__PURE__ */
|
|
2617
|
+
return /* @__PURE__ */ jsx38(
|
|
2550
2618
|
AriaTabList,
|
|
2551
2619
|
{
|
|
2552
2620
|
...props,
|
|
2553
|
-
className: ({ orientation }) =>
|
|
2621
|
+
className: ({ orientation }) => twMerge19(
|
|
2554
2622
|
baseStyles,
|
|
2555
2623
|
orientation === "vertical" ? verticalStyles : "",
|
|
2556
2624
|
className
|
|
@@ -2560,20 +2628,20 @@ function TabList({
|
|
|
2560
2628
|
}
|
|
2561
2629
|
function Tab({ className, ...props }) {
|
|
2562
2630
|
const { variant, size } = useContext2(TabsContext);
|
|
2563
|
-
return /* @__PURE__ */
|
|
2631
|
+
return /* @__PURE__ */ jsx38(
|
|
2564
2632
|
AriaTab,
|
|
2565
2633
|
{
|
|
2566
2634
|
...props,
|
|
2567
2635
|
className: ({ isSelected, isDisabled, isHovered, isPressed }) => {
|
|
2568
2636
|
if (variant === "unstyled") {
|
|
2569
|
-
return
|
|
2637
|
+
return twMerge19(
|
|
2570
2638
|
"cursor-pointer outline-none",
|
|
2571
2639
|
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2572
2640
|
isDisabled ? "opacity-50 pointer-events-none" : "",
|
|
2573
2641
|
className
|
|
2574
2642
|
);
|
|
2575
2643
|
}
|
|
2576
|
-
return
|
|
2644
|
+
return twMerge19(
|
|
2577
2645
|
// Base
|
|
2578
2646
|
"cursor-pointer outline-none transition-colors",
|
|
2579
2647
|
"font-medium",
|
|
@@ -2617,11 +2685,11 @@ function getTabVariantStyles(variant, state) {
|
|
|
2617
2685
|
}
|
|
2618
2686
|
function TabPanel({ className, ...props }) {
|
|
2619
2687
|
const { variant } = useContext2(TabsContext);
|
|
2620
|
-
return /* @__PURE__ */
|
|
2688
|
+
return /* @__PURE__ */ jsx38(
|
|
2621
2689
|
AriaTabPanel,
|
|
2622
2690
|
{
|
|
2623
2691
|
...props,
|
|
2624
|
-
className:
|
|
2692
|
+
className: twMerge19(
|
|
2625
2693
|
variant === "unstyled" ? "outline-none" : "mt-4 outline-none",
|
|
2626
2694
|
className
|
|
2627
2695
|
)
|
|
@@ -2639,12 +2707,12 @@ import {
|
|
|
2639
2707
|
|
|
2640
2708
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
2641
2709
|
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
2642
|
-
import { twMerge as
|
|
2710
|
+
import { twMerge as twMerge20 } from "tailwind-merge";
|
|
2643
2711
|
import {
|
|
2644
2712
|
ToggleButtonGroup as AriaToggleButtonGroup,
|
|
2645
2713
|
ToggleButton as AriaToggleButton3
|
|
2646
2714
|
} from "react-aria-components";
|
|
2647
|
-
import { jsx as
|
|
2715
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2648
2716
|
var SegmentedControlContext = createContext3({
|
|
2649
2717
|
size: "md"
|
|
2650
2718
|
});
|
|
@@ -2664,7 +2732,7 @@ function SegmentedControl({
|
|
|
2664
2732
|
...props
|
|
2665
2733
|
}) {
|
|
2666
2734
|
const isNoneMode = selectionMode === "none";
|
|
2667
|
-
return /* @__PURE__ */
|
|
2735
|
+
return /* @__PURE__ */ jsx39(SegmentedControlContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx39(
|
|
2668
2736
|
AriaToggleButtonGroup,
|
|
2669
2737
|
{
|
|
2670
2738
|
...props,
|
|
@@ -2672,7 +2740,7 @@ function SegmentedControl({
|
|
|
2672
2740
|
selectedKeys: isNoneMode ? /* @__PURE__ */ new Set() : selectedKeys,
|
|
2673
2741
|
defaultSelectedKeys: isNoneMode ? void 0 : defaultSelectedKeys,
|
|
2674
2742
|
onSelectionChange: isNoneMode ? void 0 : onSelectionChange,
|
|
2675
|
-
className:
|
|
2743
|
+
className: twMerge20(
|
|
2676
2744
|
"inline-flex items-center rounded-lg border border-border bg-muted p-0.5 gap-0.5",
|
|
2677
2745
|
className
|
|
2678
2746
|
),
|
|
@@ -2685,11 +2753,11 @@ function SegmentedControlItem({
|
|
|
2685
2753
|
...props
|
|
2686
2754
|
}) {
|
|
2687
2755
|
const { size } = useContext3(SegmentedControlContext);
|
|
2688
|
-
return /* @__PURE__ */
|
|
2756
|
+
return /* @__PURE__ */ jsx39(
|
|
2689
2757
|
AriaToggleButton3,
|
|
2690
2758
|
{
|
|
2691
2759
|
...props,
|
|
2692
|
-
className: ({ isSelected, isHovered, isPressed, isDisabled }) =>
|
|
2760
|
+
className: ({ isSelected, isHovered, isPressed, isDisabled }) => twMerge20(
|
|
2693
2761
|
// Base layout
|
|
2694
2762
|
"inline-flex items-center justify-center",
|
|
2695
2763
|
"rounded-md",
|
|
@@ -2710,21 +2778,21 @@ function SegmentedControlItem({
|
|
|
2710
2778
|
}
|
|
2711
2779
|
|
|
2712
2780
|
// src/components/Badge/Badge.tsx
|
|
2713
|
-
import { twMerge as
|
|
2781
|
+
import { twMerge as twMerge22 } from "tailwind-merge";
|
|
2714
2782
|
|
|
2715
2783
|
// src/components/MetricText/MetricText.tsx
|
|
2716
|
-
import { twMerge as
|
|
2717
|
-
import { jsx as
|
|
2784
|
+
import { twMerge as twMerge21 } from "tailwind-merge";
|
|
2785
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2718
2786
|
function MetricText({ className, ...rest }) {
|
|
2719
|
-
const cx =
|
|
2787
|
+
const cx = twMerge21(
|
|
2720
2788
|
"text-xs font-medium leading-none tracking-wider tabular-nums",
|
|
2721
2789
|
className
|
|
2722
2790
|
);
|
|
2723
|
-
return /* @__PURE__ */
|
|
2791
|
+
return /* @__PURE__ */ jsx40("span", { className: cx, ...rest });
|
|
2724
2792
|
}
|
|
2725
2793
|
|
|
2726
2794
|
// src/components/Badge/Badge.tsx
|
|
2727
|
-
import { jsx as
|
|
2795
|
+
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2728
2796
|
var colorStyles = {
|
|
2729
2797
|
purple: "bg-badge-purple-bg text-badge-purple-text border-badge-purple-text/20",
|
|
2730
2798
|
teal: "bg-badge-teal-bg text-badge-teal-text border-badge-teal-text/20",
|
|
@@ -2747,10 +2815,10 @@ function Badge({
|
|
|
2747
2815
|
className,
|
|
2748
2816
|
...rest
|
|
2749
2817
|
}) {
|
|
2750
|
-
return /* @__PURE__ */
|
|
2818
|
+
return /* @__PURE__ */ jsxs24(
|
|
2751
2819
|
MetricText,
|
|
2752
2820
|
{
|
|
2753
|
-
className:
|
|
2821
|
+
className: twMerge22(
|
|
2754
2822
|
"inline-flex items-center gap-1 rounded-full border",
|
|
2755
2823
|
colorStyles[color],
|
|
2756
2824
|
sizeStyles6[size],
|
|
@@ -2758,7 +2826,7 @@ function Badge({
|
|
|
2758
2826
|
),
|
|
2759
2827
|
...rest,
|
|
2760
2828
|
children: [
|
|
2761
|
-
icon && /* @__PURE__ */
|
|
2829
|
+
icon && /* @__PURE__ */ jsx41(Icon, { icon, size: "xs" }),
|
|
2762
2830
|
children
|
|
2763
2831
|
]
|
|
2764
2832
|
}
|
|
@@ -2766,10 +2834,10 @@ function Badge({
|
|
|
2766
2834
|
}
|
|
2767
2835
|
|
|
2768
2836
|
// src/components/Card/Card.tsx
|
|
2769
|
-
import { twMerge as
|
|
2770
|
-
import { jsx as
|
|
2837
|
+
import { twMerge as twMerge23 } from "tailwind-merge";
|
|
2838
|
+
import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2771
2839
|
function Card({ children, header, footer, className }) {
|
|
2772
|
-
const cx =
|
|
2840
|
+
const cx = twMerge23(
|
|
2773
2841
|
`
|
|
2774
2842
|
bg-card p-8
|
|
2775
2843
|
border border-border
|
|
@@ -2778,17 +2846,17 @@ function Card({ children, header, footer, className }) {
|
|
|
2778
2846
|
`,
|
|
2779
2847
|
className
|
|
2780
2848
|
);
|
|
2781
|
-
return /* @__PURE__ */
|
|
2782
|
-
header && /* @__PURE__ */
|
|
2849
|
+
return /* @__PURE__ */ jsxs25("div", { className: cx, children: [
|
|
2850
|
+
header && /* @__PURE__ */ jsx42("div", { className: "border-b border-border", children: header }),
|
|
2783
2851
|
children,
|
|
2784
|
-
footer && /* @__PURE__ */
|
|
2852
|
+
footer && /* @__PURE__ */ jsx42("div", { className: "border-t border-border", children: footer })
|
|
2785
2853
|
] });
|
|
2786
2854
|
}
|
|
2787
2855
|
|
|
2788
2856
|
// src/components/DeltaIndicator/DeltaIndicator.tsx
|
|
2789
2857
|
import { ArrowUp as ArrowUp2, ArrowDown as ArrowDown2, Minus as Minus2 } from "lucide-react";
|
|
2790
|
-
import { twMerge as
|
|
2791
|
-
import { jsx as
|
|
2858
|
+
import { twMerge as twMerge24 } from "tailwind-merge";
|
|
2859
|
+
import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2792
2860
|
function getDirection(current, previous) {
|
|
2793
2861
|
const diff = current - previous;
|
|
2794
2862
|
if (diff > 0) return "increase";
|
|
@@ -2841,16 +2909,16 @@ function DeltaIndicator({
|
|
|
2841
2909
|
className
|
|
2842
2910
|
}) {
|
|
2843
2911
|
if (unavailable) {
|
|
2844
|
-
return /* @__PURE__ */
|
|
2912
|
+
return /* @__PURE__ */ jsxs26(
|
|
2845
2913
|
"span",
|
|
2846
2914
|
{
|
|
2847
|
-
className:
|
|
2915
|
+
className: twMerge24(
|
|
2848
2916
|
"inline-flex items-center gap-1 font-medium",
|
|
2849
2917
|
"text-muted-foreground",
|
|
2850
2918
|
className
|
|
2851
2919
|
),
|
|
2852
2920
|
children: [
|
|
2853
|
-
label && /* @__PURE__ */
|
|
2921
|
+
label && /* @__PURE__ */ jsx43("span", { className: "text-sm text-muted-foreground mr-1", children: label }),
|
|
2854
2922
|
unavailableText
|
|
2855
2923
|
]
|
|
2856
2924
|
}
|
|
@@ -2880,10 +2948,10 @@ function DeltaIndicator({
|
|
|
2880
2948
|
}
|
|
2881
2949
|
}
|
|
2882
2950
|
const isPill = mode === "pill";
|
|
2883
|
-
return /* @__PURE__ */
|
|
2951
|
+
return /* @__PURE__ */ jsxs26(
|
|
2884
2952
|
"span",
|
|
2885
2953
|
{
|
|
2886
|
-
className:
|
|
2954
|
+
className: twMerge24(
|
|
2887
2955
|
"inline-flex items-center gap-1 font-medium",
|
|
2888
2956
|
colorStyles2,
|
|
2889
2957
|
isPill && [
|
|
@@ -2894,8 +2962,8 @@ function DeltaIndicator({
|
|
|
2894
2962
|
className
|
|
2895
2963
|
),
|
|
2896
2964
|
children: [
|
|
2897
|
-
label && /* @__PURE__ */
|
|
2898
|
-
/* @__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 }),
|
|
2899
2967
|
valueText
|
|
2900
2968
|
]
|
|
2901
2969
|
}
|
|
@@ -2903,8 +2971,8 @@ function DeltaIndicator({
|
|
|
2903
2971
|
}
|
|
2904
2972
|
|
|
2905
2973
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2906
|
-
import { twMerge as
|
|
2907
|
-
import { jsx as
|
|
2974
|
+
import { twMerge as twMerge25 } from "tailwind-merge";
|
|
2975
|
+
import { jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2908
2976
|
var fillStyles = {
|
|
2909
2977
|
brand: "bg-progress-fill",
|
|
2910
2978
|
success: "bg-progress-fill-success",
|
|
@@ -2927,12 +2995,12 @@ function ProgressBar({
|
|
|
2927
2995
|
className
|
|
2928
2996
|
}) {
|
|
2929
2997
|
const clampedValue = Math.min(100, Math.max(0, value));
|
|
2930
|
-
return /* @__PURE__ */
|
|
2931
|
-
(label || description || showValue) && /* @__PURE__ */
|
|
2932
|
-
/* @__PURE__ */
|
|
2933
|
-
/* @__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) })
|
|
2934
3002
|
] }),
|
|
2935
|
-
/* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ jsx44(
|
|
2936
3004
|
"div",
|
|
2937
3005
|
{
|
|
2938
3006
|
role: "progressbar",
|
|
@@ -2940,14 +3008,14 @@ function ProgressBar({
|
|
|
2940
3008
|
"aria-valuemin": 0,
|
|
2941
3009
|
"aria-valuemax": 100,
|
|
2942
3010
|
"aria-label": label ?? "Progress",
|
|
2943
|
-
className:
|
|
3011
|
+
className: twMerge25(
|
|
2944
3012
|
"w-full rounded-full bg-progress-track",
|
|
2945
3013
|
sizeStyles7[size]
|
|
2946
3014
|
),
|
|
2947
|
-
children: /* @__PURE__ */
|
|
3015
|
+
children: /* @__PURE__ */ jsx44(
|
|
2948
3016
|
"div",
|
|
2949
3017
|
{
|
|
2950
|
-
className:
|
|
3018
|
+
className: twMerge25(
|
|
2951
3019
|
"h-full rounded-full transition-all duration-300",
|
|
2952
3020
|
fillStyles[variant]
|
|
2953
3021
|
),
|
|
@@ -2967,8 +3035,8 @@ import {
|
|
|
2967
3035
|
AlertCircle as AlertCircle2,
|
|
2968
3036
|
CheckCircle2 as CheckCircle22
|
|
2969
3037
|
} from "lucide-react";
|
|
2970
|
-
import { twMerge as
|
|
2971
|
-
import { jsx as
|
|
3038
|
+
import { twMerge as twMerge26 } from "tailwind-merge";
|
|
3039
|
+
import { jsx as jsx45, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2972
3040
|
var variantConfig2 = {
|
|
2973
3041
|
info: {
|
|
2974
3042
|
icon: Info3,
|
|
@@ -3012,40 +3080,40 @@ function Banner({
|
|
|
3012
3080
|
setDismissed(true);
|
|
3013
3081
|
onDismiss?.();
|
|
3014
3082
|
};
|
|
3015
|
-
return /* @__PURE__ */
|
|
3083
|
+
return /* @__PURE__ */ jsxs28(
|
|
3016
3084
|
"div",
|
|
3017
3085
|
{
|
|
3018
3086
|
role: config.role,
|
|
3019
|
-
className:
|
|
3087
|
+
className: twMerge26(
|
|
3020
3088
|
"flex items-start gap-3 rounded-lg border px-4 py-3",
|
|
3021
3089
|
"text-sm",
|
|
3022
3090
|
config.containerClass,
|
|
3023
3091
|
className
|
|
3024
3092
|
),
|
|
3025
3093
|
children: [
|
|
3026
|
-
/* @__PURE__ */
|
|
3094
|
+
/* @__PURE__ */ jsx45(
|
|
3027
3095
|
Icon,
|
|
3028
3096
|
{
|
|
3029
3097
|
icon: resolvedIcon,
|
|
3030
3098
|
size: "md",
|
|
3031
|
-
className:
|
|
3099
|
+
className: twMerge26("mt-0.5", config.iconClass)
|
|
3032
3100
|
}
|
|
3033
3101
|
),
|
|
3034
|
-
/* @__PURE__ */
|
|
3035
|
-
title && /* @__PURE__ */
|
|
3102
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex-1", children: [
|
|
3103
|
+
title && /* @__PURE__ */ jsxs28("span", { className: "font-medium", children: [
|
|
3036
3104
|
title,
|
|
3037
3105
|
" \u2014 "
|
|
3038
3106
|
] }),
|
|
3039
3107
|
children
|
|
3040
3108
|
] }),
|
|
3041
|
-
dismissible && /* @__PURE__ */
|
|
3109
|
+
dismissible && /* @__PURE__ */ jsx45(
|
|
3042
3110
|
"button",
|
|
3043
3111
|
{
|
|
3044
3112
|
type: "button",
|
|
3045
3113
|
onClick: handleDismiss,
|
|
3046
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",
|
|
3047
3115
|
"aria-label": "Dismiss",
|
|
3048
|
-
children: /* @__PURE__ */
|
|
3116
|
+
children: /* @__PURE__ */ jsx45(Icon, { icon: "X", size: "sm" })
|
|
3049
3117
|
}
|
|
3050
3118
|
)
|
|
3051
3119
|
]
|
|
@@ -3054,8 +3122,8 @@ function Banner({
|
|
|
3054
3122
|
}
|
|
3055
3123
|
|
|
3056
3124
|
// src/components/MetricCard/MetricCard.tsx
|
|
3057
|
-
import { twMerge as
|
|
3058
|
-
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";
|
|
3059
3127
|
var sizeConfig = {
|
|
3060
3128
|
sm: {
|
|
3061
3129
|
padding: "p-3",
|
|
@@ -3077,50 +3145,50 @@ function MetricCard({
|
|
|
3077
3145
|
className
|
|
3078
3146
|
}) {
|
|
3079
3147
|
const config = sizeConfig[size];
|
|
3080
|
-
const containerClass =
|
|
3148
|
+
const containerClass = twMerge27(
|
|
3081
3149
|
"bg-background border border-border rounded-lg shadow-sm",
|
|
3082
3150
|
config.padding,
|
|
3083
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",
|
|
3084
3152
|
className
|
|
3085
3153
|
);
|
|
3086
|
-
const content = /* @__PURE__ */
|
|
3087
|
-
/* @__PURE__ */
|
|
3088
|
-
/* @__PURE__ */
|
|
3154
|
+
const content = /* @__PURE__ */ jsxs29(Fragment9, { children: [
|
|
3155
|
+
/* @__PURE__ */ jsx46("div", { className: twMerge27(config.labelClass, "text-muted-foreground"), children: label }),
|
|
3156
|
+
/* @__PURE__ */ jsx46(
|
|
3089
3157
|
"div",
|
|
3090
3158
|
{
|
|
3091
|
-
className:
|
|
3159
|
+
className: twMerge27(
|
|
3092
3160
|
config.valueClass,
|
|
3093
3161
|
"font-semibold text-foreground mt-1 tabular-nums"
|
|
3094
3162
|
),
|
|
3095
3163
|
children: value
|
|
3096
3164
|
}
|
|
3097
3165
|
),
|
|
3098
|
-
secondary && /* @__PURE__ */
|
|
3166
|
+
secondary && /* @__PURE__ */ jsx46("div", { className: "mt-1 text-sm", children: secondary })
|
|
3099
3167
|
] });
|
|
3100
3168
|
if (href) {
|
|
3101
|
-
return /* @__PURE__ */
|
|
3169
|
+
return /* @__PURE__ */ jsx46("a", { href, className: containerClass, children: content });
|
|
3102
3170
|
}
|
|
3103
|
-
return /* @__PURE__ */
|
|
3171
|
+
return /* @__PURE__ */ jsx46("div", { className: containerClass, children: content });
|
|
3104
3172
|
}
|
|
3105
3173
|
|
|
3106
3174
|
// src/components/SectionHeader/SectionHeader.tsx
|
|
3107
3175
|
import { forwardRef as forwardRef7 } from "react";
|
|
3108
|
-
import { twMerge as
|
|
3109
|
-
import { jsx as
|
|
3176
|
+
import { twMerge as twMerge28 } from "tailwind-merge";
|
|
3177
|
+
import { jsx as jsx47, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3110
3178
|
var SectionHeader = forwardRef7(
|
|
3111
3179
|
function SectionHeader2({ title, as = "h2", children, className, ...rest }, ref) {
|
|
3112
|
-
return /* @__PURE__ */
|
|
3180
|
+
return /* @__PURE__ */ jsxs30(
|
|
3113
3181
|
"div",
|
|
3114
3182
|
{
|
|
3115
3183
|
ref,
|
|
3116
|
-
className:
|
|
3184
|
+
className: twMerge28(
|
|
3117
3185
|
"flex flex-wrap items-center gap-3 pt-0 pb-4",
|
|
3118
3186
|
className
|
|
3119
3187
|
),
|
|
3120
3188
|
...rest,
|
|
3121
3189
|
children: [
|
|
3122
|
-
/* @__PURE__ */
|
|
3123
|
-
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 })
|
|
3124
3192
|
]
|
|
3125
3193
|
}
|
|
3126
3194
|
);
|
|
@@ -3130,7 +3198,7 @@ var SectionHeader = forwardRef7(
|
|
|
3130
3198
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
3131
3199
|
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
3132
3200
|
import { Button as AriaButton4 } from "react-aria-components";
|
|
3133
|
-
import { jsx as
|
|
3201
|
+
import { jsx as jsx48, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3134
3202
|
var LayoutContext = createContext4("stacked");
|
|
3135
3203
|
var listGapStyles = {
|
|
3136
3204
|
stacked: "gap-4",
|
|
@@ -3141,7 +3209,7 @@ function DescriptionList({
|
|
|
3141
3209
|
layout = "stacked",
|
|
3142
3210
|
className
|
|
3143
3211
|
}) {
|
|
3144
|
-
return /* @__PURE__ */
|
|
3212
|
+
return /* @__PURE__ */ jsx48(LayoutContext.Provider, { value: layout, children: /* @__PURE__ */ jsx48(
|
|
3145
3213
|
"dl",
|
|
3146
3214
|
{
|
|
3147
3215
|
className: ["flex flex-col", listGapStyles[layout], className].filter(Boolean).join(" "),
|
|
@@ -3165,17 +3233,17 @@ function DescriptionListItem({
|
|
|
3165
3233
|
"text-sm m-0",
|
|
3166
3234
|
muted ? "text-muted-foreground" : "text-foreground"
|
|
3167
3235
|
].join(" ");
|
|
3168
|
-
const valueContent = /* @__PURE__ */
|
|
3169
|
-
return /* @__PURE__ */
|
|
3170
|
-
/* @__PURE__ */
|
|
3171
|
-
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
|
|
3172
3240
|
] });
|
|
3173
3241
|
}
|
|
3174
3242
|
DescriptionList.Item = DescriptionListItem;
|
|
3175
3243
|
|
|
3176
3244
|
// src/components/PathPill/PathPill.tsx
|
|
3177
|
-
import { twMerge as
|
|
3178
|
-
import { jsx as
|
|
3245
|
+
import { twMerge as twMerge29 } from "tailwind-merge";
|
|
3246
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
3179
3247
|
var hashColors = [
|
|
3180
3248
|
"purple",
|
|
3181
3249
|
"teal",
|
|
@@ -3201,17 +3269,17 @@ function PathPill({
|
|
|
3201
3269
|
const effectiveVisible = visibleCount ?? segments.length;
|
|
3202
3270
|
const dotCount = Math.max(0, segments.length - effectiveVisible);
|
|
3203
3271
|
const fullPath = segments.join(" / ");
|
|
3204
|
-
return /* @__PURE__ */
|
|
3272
|
+
return /* @__PURE__ */ jsx49(
|
|
3205
3273
|
"div",
|
|
3206
3274
|
{
|
|
3207
|
-
className:
|
|
3275
|
+
className: twMerge29("relative flex", className),
|
|
3208
3276
|
"aria-label": `Path: ${fullPath}`,
|
|
3209
3277
|
children: segments.map((segment, i) => {
|
|
3210
3278
|
const isCollapsed = i < dotCount;
|
|
3211
3279
|
const isLast = i === segments.length - 1;
|
|
3212
|
-
const cx =
|
|
3280
|
+
const cx = twMerge29(!isLast && "pr-5 -mr-4", isCollapsed && "pr-3");
|
|
3213
3281
|
const color = colorFn ? colorFn(segment, i) : pillColorFromName(segment);
|
|
3214
|
-
return /* @__PURE__ */
|
|
3282
|
+
return /* @__PURE__ */ jsx49(
|
|
3215
3283
|
Badge,
|
|
3216
3284
|
{
|
|
3217
3285
|
className: cx,
|
|
@@ -3228,7 +3296,7 @@ function PathPill({
|
|
|
3228
3296
|
|
|
3229
3297
|
// src/components/FormWizard/FormWizard.tsx
|
|
3230
3298
|
import { createContext as createContext5, useContext as useContext5, useCallback as useCallback4, useMemo } from "react";
|
|
3231
|
-
import { jsx as
|
|
3299
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
3232
3300
|
var FormWizardContext = createContext5({
|
|
3233
3301
|
currentStep: 0,
|
|
3234
3302
|
totalSteps: 1,
|
|
@@ -3263,13 +3331,13 @@ function FormWizard({
|
|
|
3263
3331
|
}),
|
|
3264
3332
|
[currentStep, totalSteps, canGoBack, goBack, isLastStep]
|
|
3265
3333
|
);
|
|
3266
|
-
return /* @__PURE__ */
|
|
3334
|
+
return /* @__PURE__ */ jsx50(FormWizardContext.Provider, { value, children });
|
|
3267
3335
|
}
|
|
3268
3336
|
|
|
3269
3337
|
// src/components/FormWizard/FormWizardProgress.tsx
|
|
3270
|
-
import { jsx as
|
|
3338
|
+
import { jsx as jsx51, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3271
3339
|
function CheckIcon() {
|
|
3272
|
-
return /* @__PURE__ */
|
|
3340
|
+
return /* @__PURE__ */ jsx51(
|
|
3273
3341
|
"svg",
|
|
3274
3342
|
{
|
|
3275
3343
|
"aria-hidden": "true",
|
|
@@ -3280,24 +3348,24 @@ function CheckIcon() {
|
|
|
3280
3348
|
strokeWidth: "2",
|
|
3281
3349
|
strokeLinecap: "round",
|
|
3282
3350
|
strokeLinejoin: "round",
|
|
3283
|
-
children: /* @__PURE__ */
|
|
3351
|
+
children: /* @__PURE__ */ jsx51("path", { d: "M3 8.5l3.5 3.5 6.5-7" })
|
|
3284
3352
|
}
|
|
3285
3353
|
);
|
|
3286
3354
|
}
|
|
3287
3355
|
function FormWizardProgress({ labels }) {
|
|
3288
3356
|
const { currentStep, totalSteps } = useFormWizard();
|
|
3289
|
-
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) => {
|
|
3290
3358
|
const isCompleted = index < currentStep;
|
|
3291
3359
|
const isCurrent = index === currentStep;
|
|
3292
3360
|
const isFuture = index > currentStep;
|
|
3293
|
-
return /* @__PURE__ */
|
|
3361
|
+
return /* @__PURE__ */ jsxs32(
|
|
3294
3362
|
"li",
|
|
3295
3363
|
{
|
|
3296
3364
|
className: "flex flex-1 flex-col items-center",
|
|
3297
3365
|
"aria-current": isCurrent ? "step" : void 0,
|
|
3298
3366
|
children: [
|
|
3299
|
-
/* @__PURE__ */
|
|
3300
|
-
index > 0 ? /* @__PURE__ */
|
|
3367
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex w-full items-center", children: [
|
|
3368
|
+
index > 0 ? /* @__PURE__ */ jsx51(
|
|
3301
3369
|
"div",
|
|
3302
3370
|
{
|
|
3303
3371
|
"aria-hidden": "true",
|
|
@@ -3306,8 +3374,8 @@ function FormWizardProgress({ labels }) {
|
|
|
3306
3374
|
index <= currentStep ? "bg-primary" : "bg-border"
|
|
3307
3375
|
].join(" ")
|
|
3308
3376
|
}
|
|
3309
|
-
) : /* @__PURE__ */
|
|
3310
|
-
/* @__PURE__ */
|
|
3377
|
+
) : /* @__PURE__ */ jsx51("div", { className: "flex-1", "aria-hidden": "true" }),
|
|
3378
|
+
/* @__PURE__ */ jsx51(
|
|
3311
3379
|
"div",
|
|
3312
3380
|
{
|
|
3313
3381
|
className: [
|
|
@@ -3319,10 +3387,10 @@ function FormWizardProgress({ labels }) {
|
|
|
3319
3387
|
isFuture ? "border-2 border-border bg-background text-muted-foreground" : ""
|
|
3320
3388
|
].join(" "),
|
|
3321
3389
|
"aria-hidden": "true",
|
|
3322
|
-
children: isCompleted ? /* @__PURE__ */
|
|
3390
|
+
children: isCompleted ? /* @__PURE__ */ jsx51(CheckIcon, {}) : index + 1
|
|
3323
3391
|
}
|
|
3324
3392
|
),
|
|
3325
|
-
index < totalSteps - 1 ? /* @__PURE__ */
|
|
3393
|
+
index < totalSteps - 1 ? /* @__PURE__ */ jsx51(
|
|
3326
3394
|
"div",
|
|
3327
3395
|
{
|
|
3328
3396
|
"aria-hidden": "true",
|
|
@@ -3331,9 +3399,9 @@ function FormWizardProgress({ labels }) {
|
|
|
3331
3399
|
index < currentStep ? "bg-primary" : "bg-border"
|
|
3332
3400
|
].join(" ")
|
|
3333
3401
|
}
|
|
3334
|
-
) : /* @__PURE__ */
|
|
3402
|
+
) : /* @__PURE__ */ jsx51("div", { className: "flex-1", "aria-hidden": "true" })
|
|
3335
3403
|
] }),
|
|
3336
|
-
/* @__PURE__ */
|
|
3404
|
+
/* @__PURE__ */ jsx51(
|
|
3337
3405
|
"span",
|
|
3338
3406
|
{
|
|
3339
3407
|
className: [
|
|
@@ -3351,15 +3419,15 @@ function FormWizardProgress({ labels }) {
|
|
|
3351
3419
|
}
|
|
3352
3420
|
|
|
3353
3421
|
// src/components/FormWizard/FormWizardNav.tsx
|
|
3354
|
-
import { jsx as
|
|
3422
|
+
import { jsx as jsx52, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3355
3423
|
function FormWizardNav({
|
|
3356
3424
|
onNext,
|
|
3357
3425
|
isSubmitting = false,
|
|
3358
3426
|
submitLabel = "Submit"
|
|
3359
3427
|
}) {
|
|
3360
3428
|
const { canGoBack, goBack, isLastStep } = useFormWizard();
|
|
3361
|
-
return /* @__PURE__ */
|
|
3362
|
-
canGoBack && /* @__PURE__ */
|
|
3429
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-end gap-3", children: [
|
|
3430
|
+
canGoBack && /* @__PURE__ */ jsx52(
|
|
3363
3431
|
Button,
|
|
3364
3432
|
{
|
|
3365
3433
|
variant: "secondary",
|
|
@@ -3369,7 +3437,7 @@ function FormWizardNav({
|
|
|
3369
3437
|
children: "Back"
|
|
3370
3438
|
}
|
|
3371
3439
|
),
|
|
3372
|
-
/* @__PURE__ */
|
|
3440
|
+
/* @__PURE__ */ jsx52(
|
|
3373
3441
|
Button,
|
|
3374
3442
|
{
|
|
3375
3443
|
variant: "primary",
|
|
@@ -3439,6 +3507,7 @@ export {
|
|
|
3439
3507
|
SegmentedControl,
|
|
3440
3508
|
SegmentedControlItem,
|
|
3441
3509
|
Select,
|
|
3510
|
+
Slider,
|
|
3442
3511
|
Spinner,
|
|
3443
3512
|
Switch,
|
|
3444
3513
|
Tab,
|