@caqophony/ui 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +14 -3
- package/dist/index.js +484 -376
- package/package.json +1 -1
- package/styles.css +38 -0
package/dist/index.js
CHANGED
|
@@ -862,10 +862,12 @@ import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "luci
|
|
|
862
862
|
|
|
863
863
|
// src/nav-drawer.tsx
|
|
864
864
|
import * as React7 from "react";
|
|
865
|
+
import { createPortal } from "react-dom";
|
|
865
866
|
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
866
867
|
function NavDrawer({
|
|
867
868
|
label,
|
|
868
869
|
side,
|
|
870
|
+
closedFrom,
|
|
869
871
|
defaultOpen,
|
|
870
872
|
children
|
|
871
873
|
}) {
|
|
@@ -880,6 +882,65 @@ function NavDrawer({
|
|
|
880
882
|
return () => document.removeEventListener("keydown", onKey);
|
|
881
883
|
}, [open]);
|
|
882
884
|
const left = side === "left";
|
|
885
|
+
const drawer = open ? /* @__PURE__ */ jsxs7(
|
|
886
|
+
"div",
|
|
887
|
+
{
|
|
888
|
+
className: cn(
|
|
889
|
+
"z-overlay fixed inset-0",
|
|
890
|
+
closedFrom === "md" ? "md:hidden" : "lg:hidden"
|
|
891
|
+
),
|
|
892
|
+
children: [
|
|
893
|
+
/* @__PURE__ */ jsx11(
|
|
894
|
+
"div",
|
|
895
|
+
{
|
|
896
|
+
"aria-hidden": "true",
|
|
897
|
+
className: "absolute inset-0 bg-foreground/40",
|
|
898
|
+
onClick: () => setOpen(false)
|
|
899
|
+
}
|
|
900
|
+
),
|
|
901
|
+
/* @__PURE__ */ jsxs7(
|
|
902
|
+
"aside",
|
|
903
|
+
{
|
|
904
|
+
id,
|
|
905
|
+
"aria-label": label,
|
|
906
|
+
onClick: (e) => {
|
|
907
|
+
if (e.target instanceof Element && e.target.closest("a")) {
|
|
908
|
+
setOpen(false);
|
|
909
|
+
}
|
|
910
|
+
},
|
|
911
|
+
className: cn(
|
|
912
|
+
"absolute inset-y-0 flex w-72 max-w-[calc(100%-3rem)] flex-col overflow-y-auto bg-card shadow-lg",
|
|
913
|
+
left ? "left-0 border-r" : "right-0 border-l",
|
|
914
|
+
"border-border"
|
|
915
|
+
),
|
|
916
|
+
children: [
|
|
917
|
+
/* @__PURE__ */ jsx11(
|
|
918
|
+
"div",
|
|
919
|
+
{
|
|
920
|
+
className: cn(
|
|
921
|
+
"flex px-2 py-2",
|
|
922
|
+
left ? "justify-end" : "justify-start"
|
|
923
|
+
),
|
|
924
|
+
children: /* @__PURE__ */ jsx11(
|
|
925
|
+
Button,
|
|
926
|
+
{
|
|
927
|
+
variant: "ghost",
|
|
928
|
+
size: "icon",
|
|
929
|
+
"aria-label": "Close",
|
|
930
|
+
onClick: () => setOpen(false),
|
|
931
|
+
children: /* @__PURE__ */ jsx11(Icon, { name: "x", size: "sm" })
|
|
932
|
+
}
|
|
933
|
+
)
|
|
934
|
+
}
|
|
935
|
+
),
|
|
936
|
+
children
|
|
937
|
+
]
|
|
938
|
+
}
|
|
939
|
+
)
|
|
940
|
+
]
|
|
941
|
+
}
|
|
942
|
+
) : null;
|
|
943
|
+
const surface = drawer === null || typeof document === "undefined" ? drawer : createPortal(drawer, document.body);
|
|
883
944
|
return /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
884
945
|
/* @__PURE__ */ jsx11(
|
|
885
946
|
Button,
|
|
@@ -893,50 +954,7 @@ function NavDrawer({
|
|
|
893
954
|
children: /* @__PURE__ */ jsx11(Icon, { name: "menu", size: "sm" })
|
|
894
955
|
}
|
|
895
956
|
),
|
|
896
|
-
|
|
897
|
-
/* @__PURE__ */ jsx11(
|
|
898
|
-
"div",
|
|
899
|
-
{
|
|
900
|
-
"aria-hidden": "true",
|
|
901
|
-
className: "absolute inset-0 bg-foreground/40",
|
|
902
|
-
onClick: () => setOpen(false)
|
|
903
|
-
}
|
|
904
|
-
),
|
|
905
|
-
/* @__PURE__ */ jsxs7(
|
|
906
|
-
"aside",
|
|
907
|
-
{
|
|
908
|
-
id,
|
|
909
|
-
"aria-label": label,
|
|
910
|
-
className: cn(
|
|
911
|
-
"absolute inset-y-0 flex w-72 max-w-[calc(100%-3rem)] flex-col overflow-y-auto bg-card shadow-lg",
|
|
912
|
-
left ? "left-0 border-r" : "right-0 border-l",
|
|
913
|
-
"border-border"
|
|
914
|
-
),
|
|
915
|
-
children: [
|
|
916
|
-
/* @__PURE__ */ jsx11(
|
|
917
|
-
"div",
|
|
918
|
-
{
|
|
919
|
-
className: cn(
|
|
920
|
-
"flex px-2 py-2",
|
|
921
|
-
left ? "justify-end" : "justify-start"
|
|
922
|
-
),
|
|
923
|
-
children: /* @__PURE__ */ jsx11(
|
|
924
|
-
Button,
|
|
925
|
-
{
|
|
926
|
-
variant: "ghost",
|
|
927
|
-
size: "icon",
|
|
928
|
-
"aria-label": "Close",
|
|
929
|
-
onClick: () => setOpen(false),
|
|
930
|
-
children: /* @__PURE__ */ jsx11(Icon, { name: "x", size: "sm" })
|
|
931
|
-
}
|
|
932
|
-
)
|
|
933
|
-
}
|
|
934
|
-
),
|
|
935
|
-
children
|
|
936
|
-
]
|
|
937
|
-
}
|
|
938
|
-
)
|
|
939
|
-
] })
|
|
957
|
+
surface
|
|
940
958
|
] });
|
|
941
959
|
}
|
|
942
960
|
|
|
@@ -1038,11 +1056,20 @@ function CollapsibleSidebar({
|
|
|
1038
1056
|
"flex min-h-screen w-14 flex-shrink-0 flex-col items-center border-r border-border bg-card py-2 lg:hidden",
|
|
1039
1057
|
className
|
|
1040
1058
|
),
|
|
1041
|
-
children: /* @__PURE__ */ jsxs8(
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1059
|
+
children: /* @__PURE__ */ jsxs8(
|
|
1060
|
+
NavDrawer,
|
|
1061
|
+
{
|
|
1062
|
+
label: navLabel,
|
|
1063
|
+
side: "left",
|
|
1064
|
+
closedFrom: "lg",
|
|
1065
|
+
defaultOpen: defaultNavOpen,
|
|
1066
|
+
children: [
|
|
1067
|
+
header && /* @__PURE__ */ jsx12("div", { className: "border-b border-border px-4 pb-4", children: header }),
|
|
1068
|
+
/* @__PURE__ */ jsx12("div", { className: "flex-1 space-y-1 p-2", children: items.map((item) => renderItem(item, false)) }),
|
|
1069
|
+
footer && /* @__PURE__ */ jsx12("div", { className: "mt-auto border-t border-border p-2", children: footer })
|
|
1070
|
+
]
|
|
1071
|
+
}
|
|
1072
|
+
)
|
|
1046
1073
|
}
|
|
1047
1074
|
),
|
|
1048
1075
|
/* @__PURE__ */ jsxs8(
|
|
@@ -1626,7 +1653,7 @@ function SectionHeading({
|
|
|
1626
1653
|
"data-testid": "section-heading",
|
|
1627
1654
|
className: cn(
|
|
1628
1655
|
"flex max-w-[480px] flex-col gap-2",
|
|
1629
|
-
align === "center" && "items-center text-center",
|
|
1656
|
+
align === "center" && "mx-auto items-center text-center",
|
|
1630
1657
|
align === "left" && "items-start text-left"
|
|
1631
1658
|
),
|
|
1632
1659
|
children: [
|
|
@@ -2528,6 +2555,7 @@ var AppShell = React16.forwardRef(
|
|
|
2528
2555
|
{
|
|
2529
2556
|
label: navLabel,
|
|
2530
2557
|
side: left ? "left" : "right",
|
|
2558
|
+
closedFrom: "md",
|
|
2531
2559
|
defaultOpen: defaultNavOpen,
|
|
2532
2560
|
children: sidebar
|
|
2533
2561
|
}
|
|
@@ -3093,7 +3121,33 @@ DatePicker.displayName = "DatePicker";
|
|
|
3093
3121
|
|
|
3094
3122
|
// src/navbar.tsx
|
|
3095
3123
|
import * as React19 from "react";
|
|
3124
|
+
|
|
3125
|
+
// src/navbar-menu.tsx
|
|
3096
3126
|
import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3127
|
+
function NavbarMenu({
|
|
3128
|
+
search,
|
|
3129
|
+
links,
|
|
3130
|
+
actions,
|
|
3131
|
+
defaultOpen = false
|
|
3132
|
+
}) {
|
|
3133
|
+
return /* @__PURE__ */ jsx32("div", { className: "ml-auto md:hidden", children: /* @__PURE__ */ jsxs23(
|
|
3134
|
+
NavDrawer,
|
|
3135
|
+
{
|
|
3136
|
+
label: "Navigation",
|
|
3137
|
+
side: "right",
|
|
3138
|
+
closedFrom: "md",
|
|
3139
|
+
defaultOpen,
|
|
3140
|
+
children: [
|
|
3141
|
+
search && /* @__PURE__ */ jsx32("div", { className: "px-4 pb-3", children: search }),
|
|
3142
|
+
links && /* @__PURE__ */ jsx32("nav", { className: "flex flex-col px-4 pb-3 [&>a]:whitespace-normal [&>a]:py-2.5 [&>a]:text-base", children: links }),
|
|
3143
|
+
/* @__PURE__ */ jsx32("div", { className: "flex flex-col gap-2 border-t border-border p-4 [&>*]:w-full", children: actions })
|
|
3144
|
+
]
|
|
3145
|
+
}
|
|
3146
|
+
) });
|
|
3147
|
+
}
|
|
3148
|
+
|
|
3149
|
+
// src/navbar.tsx
|
|
3150
|
+
import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3097
3151
|
var Navbar = React19.forwardRef(
|
|
3098
3152
|
({
|
|
3099
3153
|
className,
|
|
@@ -3105,46 +3159,100 @@ var Navbar = React19.forwardRef(
|
|
|
3105
3159
|
secondaryNav,
|
|
3106
3160
|
children,
|
|
3107
3161
|
...props
|
|
3108
|
-
}, ref) =>
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3162
|
+
}, ref) => {
|
|
3163
|
+
const hasLinks = React19.Children.toArray(children).length > 0;
|
|
3164
|
+
const hasSearch = variant === "withSearch" && Boolean(search);
|
|
3165
|
+
const folds = Boolean(actions) && (hasLinks || hasSearch);
|
|
3166
|
+
const filled = hasSearch || variant === "centered" && hasLinks;
|
|
3167
|
+
return /* @__PURE__ */ jsxs24(
|
|
3168
|
+
"header",
|
|
3169
|
+
{
|
|
3170
|
+
ref,
|
|
3171
|
+
className: cn(
|
|
3172
|
+
"border-b border-border",
|
|
3173
|
+
transparent ? "bg-transparent" : "bg-card",
|
|
3174
|
+
className
|
|
3175
|
+
),
|
|
3176
|
+
...props,
|
|
3177
|
+
children: [
|
|
3178
|
+
/* @__PURE__ */ jsxs24(
|
|
3179
|
+
"div",
|
|
3123
3180
|
{
|
|
3124
3181
|
className: cn(
|
|
3125
|
-
|
|
3126
|
-
//
|
|
3127
|
-
|
|
3128
|
-
variant === "centered" && "flex-1 [&>:first-child]:ml-auto [&>:nth-last-child(2)]:mr-auto"
|
|
3182
|
+
"mx-auto flex min-h-14 max-w-content-xl items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-6 md:h-14 md:py-0",
|
|
3183
|
+
// nothing here can scroll or fold: the actions take their own row
|
|
3184
|
+
!hasLinks && !folds && "flex-wrap md:flex-nowrap"
|
|
3129
3185
|
),
|
|
3130
3186
|
children: [
|
|
3131
|
-
|
|
3132
|
-
|
|
3187
|
+
logo && /* @__PURE__ */ jsx33(
|
|
3188
|
+
"div",
|
|
3189
|
+
{
|
|
3190
|
+
className: cn(
|
|
3191
|
+
hasLinks && !folds ? "flex-shrink-0" : "min-w-0 md:flex-shrink-0"
|
|
3192
|
+
),
|
|
3193
|
+
children: logo
|
|
3194
|
+
}
|
|
3195
|
+
),
|
|
3196
|
+
hasLinks && /* @__PURE__ */ jsxs24(
|
|
3197
|
+
"nav",
|
|
3198
|
+
{
|
|
3199
|
+
className: cn(
|
|
3200
|
+
// W0 (#5823): the links scroll on a narrow screen, never push
|
|
3201
|
+
// the bar off the page
|
|
3202
|
+
folds ? "hidden md:flex" : "flex",
|
|
3203
|
+
"min-w-0 items-center gap-4 overflow-x-auto",
|
|
3204
|
+
variant === "centered" && "flex-1 [&>:first-child]:ml-auto [&>:nth-last-child(2)]:mr-auto"
|
|
3205
|
+
),
|
|
3206
|
+
children: [
|
|
3207
|
+
children,
|
|
3208
|
+
/* @__PURE__ */ jsx33(ScrollHintXMark, {})
|
|
3209
|
+
]
|
|
3210
|
+
}
|
|
3211
|
+
),
|
|
3212
|
+
hasSearch && /* @__PURE__ */ jsx33(
|
|
3213
|
+
"div",
|
|
3214
|
+
{
|
|
3215
|
+
className: cn(
|
|
3216
|
+
"min-w-0 flex-1 px-4 md:min-w-48",
|
|
3217
|
+
folds && "hidden md:block"
|
|
3218
|
+
),
|
|
3219
|
+
children: search
|
|
3220
|
+
}
|
|
3221
|
+
),
|
|
3222
|
+
!filled && hasLinks && /* @__PURE__ */ jsx33("div", { className: "flex-1" }),
|
|
3223
|
+
actions && /* @__PURE__ */ jsx33(
|
|
3224
|
+
"div",
|
|
3225
|
+
{
|
|
3226
|
+
className: cn(
|
|
3227
|
+
folds ? "hidden md:flex" : "flex",
|
|
3228
|
+
"ml-auto min-w-0 flex-wrap items-center justify-end gap-2 md:shrink-0 md:flex-nowrap"
|
|
3229
|
+
),
|
|
3230
|
+
children: actions
|
|
3231
|
+
}
|
|
3232
|
+
),
|
|
3233
|
+
folds && /* @__PURE__ */ jsx33(
|
|
3234
|
+
NavbarMenu,
|
|
3235
|
+
{
|
|
3236
|
+
search: hasSearch ? search : void 0,
|
|
3237
|
+
links: hasLinks ? children : void 0,
|
|
3238
|
+
actions
|
|
3239
|
+
}
|
|
3240
|
+
)
|
|
3133
3241
|
]
|
|
3134
3242
|
}
|
|
3135
3243
|
),
|
|
3136
|
-
variant === "
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3244
|
+
variant === "twoLevel" && secondaryNav && /* @__PURE__ */ jsx33("div", { className: "border-t border-border", children: /* @__PURE__ */ jsx33("div", { className: "mx-auto max-w-content-xl px-4 py-2 sm:px-6", children: /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 items-center gap-4 overflow-x-auto", children: [
|
|
3245
|
+
secondaryNav,
|
|
3246
|
+
/* @__PURE__ */ jsx33(ScrollHintXMark, {})
|
|
3247
|
+
] }) }) })
|
|
3248
|
+
]
|
|
3249
|
+
}
|
|
3250
|
+
);
|
|
3251
|
+
}
|
|
3144
3252
|
);
|
|
3145
3253
|
Navbar.displayName = "Navbar";
|
|
3146
3254
|
var NavbarLink = React19.forwardRef(
|
|
3147
|
-
({ className, active, ...props }, ref) => /* @__PURE__ */
|
|
3255
|
+
({ className, active, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
3148
3256
|
"a",
|
|
3149
3257
|
{
|
|
3150
3258
|
ref,
|
|
@@ -3163,22 +3271,22 @@ NavbarLink.displayName = "NavbarLink";
|
|
|
3163
3271
|
import * as React20 from "react";
|
|
3164
3272
|
|
|
3165
3273
|
// src/empty-value.tsx
|
|
3166
|
-
import { jsx as
|
|
3274
|
+
import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3167
3275
|
var EMPTY_VALUE_GLYPH = "\u2014";
|
|
3168
3276
|
function isEmptyValue(value) {
|
|
3169
3277
|
return value === null || value === void 0 || value === false || typeof value === "string" && value.trim() === "";
|
|
3170
3278
|
}
|
|
3171
3279
|
function EmptyValue({ className }) {
|
|
3172
|
-
return /* @__PURE__ */
|
|
3173
|
-
/* @__PURE__ */
|
|
3174
|
-
/* @__PURE__ */
|
|
3280
|
+
return /* @__PURE__ */ jsxs25("span", { "data-empty-value": true, className: cn("text-muted-foreground", className), children: [
|
|
3281
|
+
/* @__PURE__ */ jsx34("span", { "aria-hidden": "true", children: EMPTY_VALUE_GLYPH }),
|
|
3282
|
+
/* @__PURE__ */ jsx34("span", { className: "sr-only", children: "Not set" })
|
|
3175
3283
|
] });
|
|
3176
3284
|
}
|
|
3177
3285
|
|
|
3178
3286
|
// src/card-variants.tsx
|
|
3179
|
-
import { jsx as
|
|
3287
|
+
import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3180
3288
|
var HorizontalCard = React20.forwardRef(
|
|
3181
|
-
({ className, media, hoverable, children, ...props }, ref) => /* @__PURE__ */
|
|
3289
|
+
({ className, media, hoverable, children, ...props }, ref) => /* @__PURE__ */ jsxs26(
|
|
3182
3290
|
"div",
|
|
3183
3291
|
{
|
|
3184
3292
|
ref,
|
|
@@ -3189,15 +3297,15 @@ var HorizontalCard = React20.forwardRef(
|
|
|
3189
3297
|
),
|
|
3190
3298
|
...props,
|
|
3191
3299
|
children: [
|
|
3192
|
-
media && /* @__PURE__ */
|
|
3193
|
-
/* @__PURE__ */
|
|
3300
|
+
media && /* @__PURE__ */ jsx35("div", { className: "flex-shrink-0", children: media }),
|
|
3301
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 p-4", children })
|
|
3194
3302
|
]
|
|
3195
3303
|
}
|
|
3196
3304
|
)
|
|
3197
3305
|
);
|
|
3198
3306
|
HorizontalCard.displayName = "HorizontalCard";
|
|
3199
3307
|
var ImageCard = React20.forwardRef(
|
|
3200
|
-
({ className, imageSrc, imageAlt, hoverable, children, ...props }, ref) => /* @__PURE__ */
|
|
3308
|
+
({ className, imageSrc, imageAlt, hoverable, children, ...props }, ref) => /* @__PURE__ */ jsxs26(
|
|
3201
3309
|
"div",
|
|
3202
3310
|
{
|
|
3203
3311
|
ref,
|
|
@@ -3208,7 +3316,7 @@ var ImageCard = React20.forwardRef(
|
|
|
3208
3316
|
),
|
|
3209
3317
|
...props,
|
|
3210
3318
|
children: [
|
|
3211
|
-
imageSrc && /* @__PURE__ */
|
|
3319
|
+
imageSrc && /* @__PURE__ */ jsx35("div", { className: "aspect-video w-full bg-muted", children: /* @__PURE__ */ jsx35(
|
|
3212
3320
|
"img",
|
|
3213
3321
|
{
|
|
3214
3322
|
src: imageSrc,
|
|
@@ -3216,13 +3324,13 @@ var ImageCard = React20.forwardRef(
|
|
|
3216
3324
|
className: "h-full w-full object-cover"
|
|
3217
3325
|
}
|
|
3218
3326
|
) }),
|
|
3219
|
-
/* @__PURE__ */
|
|
3327
|
+
/* @__PURE__ */ jsx35("div", { className: "p-4", children })
|
|
3220
3328
|
]
|
|
3221
3329
|
}
|
|
3222
3330
|
)
|
|
3223
3331
|
);
|
|
3224
3332
|
ImageCard.displayName = "ImageCard";
|
|
3225
|
-
var StatCardExtended = React20.forwardRef(({ className, label, value, trend, icon, ...props }, ref) => /* @__PURE__ */
|
|
3333
|
+
var StatCardExtended = React20.forwardRef(({ className, label, value, trend, icon, ...props }, ref) => /* @__PURE__ */ jsxs26(
|
|
3226
3334
|
"div",
|
|
3227
3335
|
{
|
|
3228
3336
|
ref,
|
|
@@ -3232,12 +3340,12 @@ var StatCardExtended = React20.forwardRef(({ className, label, value, trend, ico
|
|
|
3232
3340
|
),
|
|
3233
3341
|
...props,
|
|
3234
3342
|
children: [
|
|
3235
|
-
/* @__PURE__ */
|
|
3236
|
-
/* @__PURE__ */
|
|
3237
|
-
icon && /* @__PURE__ */
|
|
3343
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between", children: [
|
|
3344
|
+
/* @__PURE__ */ jsx35("span", { className: "text-sm text-muted-foreground", children: label }),
|
|
3345
|
+
icon && /* @__PURE__ */ jsx35("div", { className: "text-muted-foreground", children: icon })
|
|
3238
3346
|
] }),
|
|
3239
|
-
/* @__PURE__ */
|
|
3240
|
-
trend && /* @__PURE__ */
|
|
3347
|
+
/* @__PURE__ */ jsx35("p", { className: "mt-2 text-3xl font-bold text-foreground", children: isEmptyValue(value) ? /* @__PURE__ */ jsx35(EmptyValue, {}) : value }),
|
|
3348
|
+
trend && /* @__PURE__ */ jsxs26(
|
|
3241
3349
|
"p",
|
|
3242
3350
|
{
|
|
3243
3351
|
className: cn(
|
|
@@ -3258,7 +3366,7 @@ var StatCardExtended = React20.forwardRef(({ className, label, value, trend, ico
|
|
|
3258
3366
|
));
|
|
3259
3367
|
StatCardExtended.displayName = "StatCardExtended";
|
|
3260
3368
|
var ActionCard = React20.forwardRef(
|
|
3261
|
-
({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */
|
|
3369
|
+
({ className, title, description, actions, children, ...props }, ref) => /* @__PURE__ */ jsxs26(
|
|
3262
3370
|
"div",
|
|
3263
3371
|
{
|
|
3264
3372
|
ref,
|
|
@@ -3268,12 +3376,12 @@ var ActionCard = React20.forwardRef(
|
|
|
3268
3376
|
),
|
|
3269
3377
|
...props,
|
|
3270
3378
|
children: [
|
|
3271
|
-
/* @__PURE__ */
|
|
3272
|
-
/* @__PURE__ */
|
|
3273
|
-
description && /* @__PURE__ */
|
|
3379
|
+
/* @__PURE__ */ jsxs26("div", { className: "p-6", children: [
|
|
3380
|
+
/* @__PURE__ */ jsx35("h3", { className: "font-semibold text-foreground", children: title }),
|
|
3381
|
+
description && /* @__PURE__ */ jsx35("p", { className: "mt-1 text-sm text-muted-foreground", children: description }),
|
|
3274
3382
|
children
|
|
3275
3383
|
] }),
|
|
3276
|
-
actions && /* @__PURE__ */
|
|
3384
|
+
actions && /* @__PURE__ */ jsx35("div", { className: "flex items-center gap-2 border-t border-border px-6 py-4", children: actions })
|
|
3277
3385
|
]
|
|
3278
3386
|
}
|
|
3279
3387
|
)
|
|
@@ -3282,8 +3390,8 @@ ActionCard.displayName = "ActionCard";
|
|
|
3282
3390
|
|
|
3283
3391
|
// src/modal-dialog.tsx
|
|
3284
3392
|
import * as React21 from "react";
|
|
3285
|
-
import { createPortal } from "react-dom";
|
|
3286
|
-
import { Fragment as Fragment7, jsx as
|
|
3393
|
+
import { createPortal as createPortal2 } from "react-dom";
|
|
3394
|
+
import { Fragment as Fragment7, jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3287
3395
|
var SIZE_CLASSES2 = {
|
|
3288
3396
|
sm: "max-w-sm",
|
|
3289
3397
|
md: "max-w-md",
|
|
@@ -3302,9 +3410,9 @@ var ModalDialog = React21.forwardRef(
|
|
|
3302
3410
|
return () => document.removeEventListener("keydown", handler);
|
|
3303
3411
|
}, [open, onClose]);
|
|
3304
3412
|
if (!open) return null;
|
|
3305
|
-
return
|
|
3306
|
-
/* @__PURE__ */
|
|
3307
|
-
/* @__PURE__ */
|
|
3413
|
+
return createPortal2(
|
|
3414
|
+
/* @__PURE__ */ jsxs27(Fragment7, { children: [
|
|
3415
|
+
/* @__PURE__ */ jsx36(
|
|
3308
3416
|
"div",
|
|
3309
3417
|
{
|
|
3310
3418
|
className: "z-overlay fixed inset-0 bg-foreground/60 transition-opacity",
|
|
@@ -3312,7 +3420,7 @@ var ModalDialog = React21.forwardRef(
|
|
|
3312
3420
|
"aria-hidden": "true"
|
|
3313
3421
|
}
|
|
3314
3422
|
),
|
|
3315
|
-
/* @__PURE__ */
|
|
3423
|
+
/* @__PURE__ */ jsx36("div", { className: "z-modal fixed inset-0 flex items-center justify-center p-4", children: /* @__PURE__ */ jsx36(
|
|
3316
3424
|
"div",
|
|
3317
3425
|
{
|
|
3318
3426
|
ref,
|
|
@@ -3334,7 +3442,7 @@ var ModalDialog = React21.forwardRef(
|
|
|
3334
3442
|
}
|
|
3335
3443
|
);
|
|
3336
3444
|
ModalDialog.displayName = "ModalDialog";
|
|
3337
|
-
var ModalHeader = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
3445
|
+
var ModalHeader = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
3338
3446
|
"div",
|
|
3339
3447
|
{
|
|
3340
3448
|
ref,
|
|
@@ -3343,9 +3451,9 @@ var ModalHeader = React21.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3343
3451
|
}
|
|
3344
3452
|
));
|
|
3345
3453
|
ModalHeader.displayName = "ModalHeader";
|
|
3346
|
-
var ModalBody = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
3454
|
+
var ModalBody = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36("div", { ref, className: cn("px-6 py-4", className), ...props }));
|
|
3347
3455
|
ModalBody.displayName = "ModalBody";
|
|
3348
|
-
var ModalFooter = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
3456
|
+
var ModalFooter = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
3349
3457
|
"div",
|
|
3350
3458
|
{
|
|
3351
3459
|
ref,
|
|
@@ -3360,8 +3468,8 @@ ModalFooter.displayName = "ModalFooter";
|
|
|
3360
3468
|
|
|
3361
3469
|
// src/drawer.tsx
|
|
3362
3470
|
import * as React22 from "react";
|
|
3363
|
-
import { createPortal as
|
|
3364
|
-
import { Fragment as Fragment8, jsx as
|
|
3471
|
+
import { createPortal as createPortal3 } from "react-dom";
|
|
3472
|
+
import { Fragment as Fragment8, jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3365
3473
|
var SIZE_CLASSES3 = {
|
|
3366
3474
|
left: { sm: "w-64", md: "w-80", lg: "w-96" },
|
|
3367
3475
|
right: { sm: "w-64", md: "w-80", lg: "w-96" },
|
|
@@ -3391,9 +3499,9 @@ var Drawer = React22.forwardRef(
|
|
|
3391
3499
|
return () => document.removeEventListener("keydown", handler);
|
|
3392
3500
|
}, [open, onClose]);
|
|
3393
3501
|
if (!open) return null;
|
|
3394
|
-
return
|
|
3395
|
-
/* @__PURE__ */
|
|
3396
|
-
/* @__PURE__ */
|
|
3502
|
+
return createPortal3(
|
|
3503
|
+
/* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
3504
|
+
/* @__PURE__ */ jsx37(
|
|
3397
3505
|
"div",
|
|
3398
3506
|
{
|
|
3399
3507
|
className: "z-overlay fixed inset-0 bg-foreground/60 transition-opacity",
|
|
@@ -3401,7 +3509,7 @@ var Drawer = React22.forwardRef(
|
|
|
3401
3509
|
"aria-hidden": "true"
|
|
3402
3510
|
}
|
|
3403
3511
|
),
|
|
3404
|
-
/* @__PURE__ */
|
|
3512
|
+
/* @__PURE__ */ jsx37(
|
|
3405
3513
|
"div",
|
|
3406
3514
|
{
|
|
3407
3515
|
ref,
|
|
@@ -3426,7 +3534,7 @@ var Drawer = React22.forwardRef(
|
|
|
3426
3534
|
}
|
|
3427
3535
|
);
|
|
3428
3536
|
Drawer.displayName = "Drawer";
|
|
3429
|
-
var DrawerHeader = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
3537
|
+
var DrawerHeader = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
3430
3538
|
"div",
|
|
3431
3539
|
{
|
|
3432
3540
|
ref,
|
|
@@ -3435,7 +3543,7 @@ var DrawerHeader = React22.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3435
3543
|
}
|
|
3436
3544
|
));
|
|
3437
3545
|
DrawerHeader.displayName = "DrawerHeader";
|
|
3438
|
-
var DrawerBody = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
3546
|
+
var DrawerBody = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
3439
3547
|
"div",
|
|
3440
3548
|
{
|
|
3441
3549
|
ref,
|
|
@@ -3444,7 +3552,7 @@ var DrawerBody = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3444
3552
|
}
|
|
3445
3553
|
));
|
|
3446
3554
|
DrawerBody.displayName = "DrawerBody";
|
|
3447
|
-
var DrawerFooter = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
3555
|
+
var DrawerFooter = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
3448
3556
|
"div",
|
|
3449
3557
|
{
|
|
3450
3558
|
ref,
|
|
@@ -3459,9 +3567,9 @@ DrawerFooter.displayName = "DrawerFooter";
|
|
|
3459
3567
|
|
|
3460
3568
|
// src/form-layout.tsx
|
|
3461
3569
|
import * as React23 from "react";
|
|
3462
|
-
import { jsx as
|
|
3570
|
+
import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3463
3571
|
var FormLayout = React23.forwardRef(
|
|
3464
|
-
({ className, layout = "stacked", ...props }, ref) => /* @__PURE__ */
|
|
3572
|
+
({ className, layout = "stacked", ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
3465
3573
|
"form",
|
|
3466
3574
|
{
|
|
3467
3575
|
ref,
|
|
@@ -3476,18 +3584,18 @@ var FormLayout = React23.forwardRef(
|
|
|
3476
3584
|
)
|
|
3477
3585
|
);
|
|
3478
3586
|
FormLayout.displayName = "FormLayout";
|
|
3479
|
-
var FormLayoutSection = React23.forwardRef(({ className, title, description, children, ...props }, ref) => /* @__PURE__ */
|
|
3587
|
+
var FormLayoutSection = React23.forwardRef(({ className, title, description, children, ...props }, ref) => /* @__PURE__ */ jsxs29(
|
|
3480
3588
|
"div",
|
|
3481
3589
|
{
|
|
3482
3590
|
ref,
|
|
3483
3591
|
className: cn("border-b border-border pb-6", className),
|
|
3484
3592
|
...props,
|
|
3485
3593
|
children: [
|
|
3486
|
-
(title || description) && /* @__PURE__ */
|
|
3487
|
-
title && /* @__PURE__ */
|
|
3488
|
-
description && /* @__PURE__ */
|
|
3594
|
+
(title || description) && /* @__PURE__ */ jsxs29("div", { className: "mb-4", children: [
|
|
3595
|
+
title && /* @__PURE__ */ jsx38("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
3596
|
+
description && /* @__PURE__ */ jsx38("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
|
|
3489
3597
|
] }),
|
|
3490
|
-
/* @__PURE__ */
|
|
3598
|
+
/* @__PURE__ */ jsx38("div", { className: "space-y-4", children })
|
|
3491
3599
|
]
|
|
3492
3600
|
}
|
|
3493
3601
|
));
|
|
@@ -3495,7 +3603,7 @@ FormLayoutSection.displayName = "FormLayoutSection";
|
|
|
3495
3603
|
|
|
3496
3604
|
// src/input-group.tsx
|
|
3497
3605
|
import * as React24 from "react";
|
|
3498
|
-
import { jsx as
|
|
3606
|
+
import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3499
3607
|
var InputGroup = React24.forwardRef(
|
|
3500
3608
|
({
|
|
3501
3609
|
className,
|
|
@@ -3504,15 +3612,15 @@ var InputGroup = React24.forwardRef(
|
|
|
3504
3612
|
suffixContent,
|
|
3505
3613
|
children,
|
|
3506
3614
|
...props
|
|
3507
|
-
}, ref) => /* @__PURE__ */
|
|
3615
|
+
}, ref) => /* @__PURE__ */ jsxs30(
|
|
3508
3616
|
"div",
|
|
3509
3617
|
{
|
|
3510
3618
|
ref,
|
|
3511
3619
|
className: cn("flex rounded-md shadow-sm", className),
|
|
3512
3620
|
...props,
|
|
3513
3621
|
children: [
|
|
3514
|
-
(addon === "prefix" || addon === "both") && addonContent && /* @__PURE__ */
|
|
3515
|
-
/* @__PURE__ */
|
|
3622
|
+
(addon === "prefix" || addon === "both") && addonContent && /* @__PURE__ */ jsx39("span", { className: "inline-flex items-center rounded-l-md border border-r-0 border-input bg-muted px-3 text-sm text-muted-foreground", children: addonContent }),
|
|
3623
|
+
/* @__PURE__ */ jsx39(
|
|
3516
3624
|
"div",
|
|
3517
3625
|
{
|
|
3518
3626
|
className: cn(
|
|
@@ -3522,7 +3630,7 @@ var InputGroup = React24.forwardRef(
|
|
|
3522
3630
|
children
|
|
3523
3631
|
}
|
|
3524
3632
|
),
|
|
3525
|
-
(addon === "suffix" || addon === "both") && (suffixContent || addonContent) && /* @__PURE__ */
|
|
3633
|
+
(addon === "suffix" || addon === "both") && (suffixContent || addonContent) && /* @__PURE__ */ jsx39("span", { className: "inline-flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground", children: suffixContent || addonContent })
|
|
3526
3634
|
]
|
|
3527
3635
|
}
|
|
3528
3636
|
)
|
|
@@ -3531,7 +3639,7 @@ InputGroup.displayName = "InputGroup";
|
|
|
3531
3639
|
|
|
3532
3640
|
// src/radio-group.tsx
|
|
3533
3641
|
import * as React25 from "react";
|
|
3534
|
-
import { jsx as
|
|
3642
|
+
import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3535
3643
|
var RadioGroup = React25.forwardRef(
|
|
3536
3644
|
({
|
|
3537
3645
|
className,
|
|
@@ -3542,9 +3650,9 @@ var RadioGroup = React25.forwardRef(
|
|
|
3542
3650
|
name,
|
|
3543
3651
|
label,
|
|
3544
3652
|
...props
|
|
3545
|
-
}, ref) => /* @__PURE__ */
|
|
3546
|
-
label && /* @__PURE__ */
|
|
3547
|
-
/* @__PURE__ */
|
|
3653
|
+
}, ref) => /* @__PURE__ */ jsxs31("fieldset", { ref, className: cn("space-y-2", className), ...props, children: [
|
|
3654
|
+
label && /* @__PURE__ */ jsx40("legend", { className: "mb-2 text-sm font-medium text-foreground", children: label }),
|
|
3655
|
+
/* @__PURE__ */ jsx40(
|
|
3548
3656
|
"div",
|
|
3549
3657
|
{
|
|
3550
3658
|
className: cn(
|
|
@@ -3555,7 +3663,7 @@ var RadioGroup = React25.forwardRef(
|
|
|
3555
3663
|
children: options.map((option) => {
|
|
3556
3664
|
const isSelected = value === option.value;
|
|
3557
3665
|
if (variant === "card") {
|
|
3558
|
-
return /* @__PURE__ */
|
|
3666
|
+
return /* @__PURE__ */ jsxs31(
|
|
3559
3667
|
"label",
|
|
3560
3668
|
{
|
|
3561
3669
|
className: cn(
|
|
@@ -3563,7 +3671,7 @@ var RadioGroup = React25.forwardRef(
|
|
|
3563
3671
|
isSelected ? "border-primary bg-primary/5" : "border-border bg-card hover:bg-muted/50"
|
|
3564
3672
|
),
|
|
3565
3673
|
children: [
|
|
3566
|
-
/* @__PURE__ */
|
|
3674
|
+
/* @__PURE__ */ jsx40(
|
|
3567
3675
|
"input",
|
|
3568
3676
|
{
|
|
3569
3677
|
type: "radio",
|
|
@@ -3574,16 +3682,16 @@ var RadioGroup = React25.forwardRef(
|
|
|
3574
3682
|
className: "mt-0.5 h-4 w-4 accent-primary"
|
|
3575
3683
|
}
|
|
3576
3684
|
),
|
|
3577
|
-
/* @__PURE__ */
|
|
3578
|
-
/* @__PURE__ */
|
|
3579
|
-
option.description && /* @__PURE__ */
|
|
3685
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
3686
|
+
/* @__PURE__ */ jsx40("span", { className: "text-sm font-medium text-foreground", children: option.label }),
|
|
3687
|
+
option.description && /* @__PURE__ */ jsx40("p", { className: "mt-0.5 text-xs text-muted-foreground", children: option.description })
|
|
3580
3688
|
] })
|
|
3581
3689
|
]
|
|
3582
3690
|
},
|
|
3583
3691
|
option.value
|
|
3584
3692
|
);
|
|
3585
3693
|
}
|
|
3586
|
-
return /* @__PURE__ */
|
|
3694
|
+
return /* @__PURE__ */ jsxs31(
|
|
3587
3695
|
"label",
|
|
3588
3696
|
{
|
|
3589
3697
|
className: cn(
|
|
@@ -3592,7 +3700,7 @@ var RadioGroup = React25.forwardRef(
|
|
|
3592
3700
|
variant === "stacked" && isSelected && "border-primary bg-primary/5"
|
|
3593
3701
|
),
|
|
3594
3702
|
children: [
|
|
3595
|
-
/* @__PURE__ */
|
|
3703
|
+
/* @__PURE__ */ jsx40(
|
|
3596
3704
|
"input",
|
|
3597
3705
|
{
|
|
3598
3706
|
type: "radio",
|
|
@@ -3603,8 +3711,8 @@ var RadioGroup = React25.forwardRef(
|
|
|
3603
3711
|
className: "h-4 w-4 accent-primary"
|
|
3604
3712
|
}
|
|
3605
3713
|
),
|
|
3606
|
-
/* @__PURE__ */
|
|
3607
|
-
option.description && variant === "stacked" && /* @__PURE__ */
|
|
3714
|
+
/* @__PURE__ */ jsx40("span", { className: "text-sm text-foreground", children: option.label }),
|
|
3715
|
+
option.description && variant === "stacked" && /* @__PURE__ */ jsx40("span", { className: "ml-auto text-xs text-muted-foreground", children: option.description })
|
|
3608
3716
|
]
|
|
3609
3717
|
},
|
|
3610
3718
|
option.value
|
|
@@ -3618,7 +3726,7 @@ RadioGroup.displayName = "RadioGroup";
|
|
|
3618
3726
|
|
|
3619
3727
|
// src/combobox.tsx
|
|
3620
3728
|
import * as React26 from "react";
|
|
3621
|
-
import { jsx as
|
|
3729
|
+
import { jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3622
3730
|
var Combobox = React26.forwardRef(
|
|
3623
3731
|
({
|
|
3624
3732
|
className,
|
|
@@ -3650,20 +3758,20 @@ var Combobox = React26.forwardRef(
|
|
|
3650
3758
|
}
|
|
3651
3759
|
};
|
|
3652
3760
|
const displayValue = multi ? null : options.find((o) => o.value === selected)?.label;
|
|
3653
|
-
return /* @__PURE__ */
|
|
3654
|
-
/* @__PURE__ */
|
|
3761
|
+
return /* @__PURE__ */ jsxs32("div", { ref, className: cn("relative", className), ...props, children: [
|
|
3762
|
+
/* @__PURE__ */ jsxs32(
|
|
3655
3763
|
"div",
|
|
3656
3764
|
{
|
|
3657
3765
|
className: "flex min-h-9 cursor-pointer items-center gap-1 rounded-md border border-input bg-background px-3 py-1.5",
|
|
3658
3766
|
onClick: () => setOpen(!open),
|
|
3659
3767
|
children: [
|
|
3660
|
-
multi && Array.isArray(selected) && selected.length > 0 ? /* @__PURE__ */
|
|
3768
|
+
multi && Array.isArray(selected) && selected.length > 0 ? /* @__PURE__ */ jsx41("div", { className: "flex flex-wrap gap-1", children: selected.map((v) => /* @__PURE__ */ jsxs32(
|
|
3661
3769
|
"span",
|
|
3662
3770
|
{
|
|
3663
3771
|
className: "text-primary-text inline-flex items-center gap-1 rounded bg-primary/10 px-2 py-0.5 text-xs font-medium",
|
|
3664
3772
|
children: [
|
|
3665
3773
|
options.find((o) => o.value === v)?.label,
|
|
3666
|
-
/* @__PURE__ */
|
|
3774
|
+
/* @__PURE__ */ jsx41(
|
|
3667
3775
|
"button",
|
|
3668
3776
|
{
|
|
3669
3777
|
type: "button",
|
|
@@ -3678,7 +3786,7 @@ var Combobox = React26.forwardRef(
|
|
|
3678
3786
|
]
|
|
3679
3787
|
},
|
|
3680
3788
|
v
|
|
3681
|
-
)) }) : /* @__PURE__ */
|
|
3789
|
+
)) }) : /* @__PURE__ */ jsx41(
|
|
3682
3790
|
"span",
|
|
3683
3791
|
{
|
|
3684
3792
|
className: cn(
|
|
@@ -3688,12 +3796,12 @@ var Combobox = React26.forwardRef(
|
|
|
3688
3796
|
children: displayValue || placeholder
|
|
3689
3797
|
}
|
|
3690
3798
|
),
|
|
3691
|
-
/* @__PURE__ */
|
|
3799
|
+
/* @__PURE__ */ jsx41("span", { className: "ml-auto text-muted-foreground", children: "\u25BE" })
|
|
3692
3800
|
]
|
|
3693
3801
|
}
|
|
3694
3802
|
),
|
|
3695
|
-
open && /* @__PURE__ */
|
|
3696
|
-
filterable && /* @__PURE__ */
|
|
3803
|
+
open && /* @__PURE__ */ jsxs32("div", { className: "z-dropdown absolute mt-1 w-full rounded-md border border-border bg-card shadow-lg", children: [
|
|
3804
|
+
filterable && /* @__PURE__ */ jsx41("div", { className: "border-b border-border p-2", children: /* @__PURE__ */ jsx41(
|
|
3697
3805
|
"input",
|
|
3698
3806
|
{
|
|
3699
3807
|
type: "text",
|
|
@@ -3704,9 +3812,9 @@ var Combobox = React26.forwardRef(
|
|
|
3704
3812
|
autoFocus: true
|
|
3705
3813
|
}
|
|
3706
3814
|
) }),
|
|
3707
|
-
/* @__PURE__ */
|
|
3815
|
+
/* @__PURE__ */ jsx41("div", { className: "max-h-60 overflow-y-auto p-1", children: filtered.length === 0 ? /* @__PURE__ */ jsx41("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: "No results" }) : filtered.map((option) => {
|
|
3708
3816
|
const isSelected = multi ? Array.isArray(selected) && selected.includes(option.value) : selected === option.value;
|
|
3709
|
-
return /* @__PURE__ */
|
|
3817
|
+
return /* @__PURE__ */ jsxs32(
|
|
3710
3818
|
"button",
|
|
3711
3819
|
{
|
|
3712
3820
|
type: "button",
|
|
@@ -3716,9 +3824,9 @@ var Combobox = React26.forwardRef(
|
|
|
3716
3824
|
),
|
|
3717
3825
|
onClick: () => handleSelect(option.value),
|
|
3718
3826
|
children: [
|
|
3719
|
-
multi && /* @__PURE__ */
|
|
3827
|
+
multi && /* @__PURE__ */ jsx41("span", { className: "mr-2", children: isSelected ? "\u2611" : "\u2610" }),
|
|
3720
3828
|
option.label,
|
|
3721
|
-
!multi && isSelected && /* @__PURE__ */
|
|
3829
|
+
!multi && isSelected && /* @__PURE__ */ jsx41("span", { className: "text-primary-text ml-auto", children: "\u2713" })
|
|
3722
3830
|
]
|
|
3723
3831
|
},
|
|
3724
3832
|
option.value
|
|
@@ -3732,7 +3840,7 @@ Combobox.displayName = "Combobox";
|
|
|
3732
3840
|
|
|
3733
3841
|
// src/notification-banner.tsx
|
|
3734
3842
|
import * as React27 from "react";
|
|
3735
|
-
import { jsx as
|
|
3843
|
+
import { jsx as jsx42, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3736
3844
|
var INTENT_STYLES = {
|
|
3737
3845
|
success: {
|
|
3738
3846
|
subtle: "bg-intent-success/10 text-intent-success-foreground border-intent-success/20",
|
|
@@ -3779,7 +3887,7 @@ var NotificationBanner = React27.forwardRef(
|
|
|
3779
3887
|
setDismissed(true);
|
|
3780
3888
|
onDismiss?.();
|
|
3781
3889
|
};
|
|
3782
|
-
return /* @__PURE__ */
|
|
3890
|
+
return /* @__PURE__ */ jsxs33(
|
|
3783
3891
|
"div",
|
|
3784
3892
|
{
|
|
3785
3893
|
ref,
|
|
@@ -3791,13 +3899,13 @@ var NotificationBanner = React27.forwardRef(
|
|
|
3791
3899
|
),
|
|
3792
3900
|
...props,
|
|
3793
3901
|
children: [
|
|
3794
|
-
/* @__PURE__ */
|
|
3795
|
-
/* @__PURE__ */
|
|
3796
|
-
title && /* @__PURE__ */
|
|
3797
|
-
children && /* @__PURE__ */
|
|
3902
|
+
/* @__PURE__ */ jsx42("span", { className: "flex-shrink-0 pt-0.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx42(Icon, { name: ICON_MAP[intent], size: "md" }) }),
|
|
3903
|
+
/* @__PURE__ */ jsxs33("div", { className: "min-w-0 flex-1", children: [
|
|
3904
|
+
title && /* @__PURE__ */ jsx42("p", { className: "font-semibold", children: title }),
|
|
3905
|
+
children && /* @__PURE__ */ jsx42("div", { className: cn(title && "mt-1", "text-sm"), children })
|
|
3798
3906
|
] }),
|
|
3799
|
-
action && /* @__PURE__ */
|
|
3800
|
-
dismissible && /* @__PURE__ */
|
|
3907
|
+
action && /* @__PURE__ */ jsx42("div", { className: "flex-shrink-0", children: action }),
|
|
3908
|
+
dismissible && /* @__PURE__ */ jsx42(
|
|
3801
3909
|
"button",
|
|
3802
3910
|
{
|
|
3803
3911
|
type: "button",
|
|
@@ -3816,8 +3924,8 @@ NotificationBanner.displayName = "NotificationBanner";
|
|
|
3816
3924
|
|
|
3817
3925
|
// src/notification-panel.tsx
|
|
3818
3926
|
import * as React28 from "react";
|
|
3819
|
-
import { jsx as
|
|
3820
|
-
var NotificationPanel = React28.forwardRef(({ className, unreadCount = 0, onMarkAllRead, children, ...props }, ref) => /* @__PURE__ */
|
|
3927
|
+
import { jsx as jsx43, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3928
|
+
var NotificationPanel = React28.forwardRef(({ className, unreadCount = 0, onMarkAllRead, children, ...props }, ref) => /* @__PURE__ */ jsxs34(
|
|
3821
3929
|
"div",
|
|
3822
3930
|
{
|
|
3823
3931
|
ref,
|
|
@@ -3827,12 +3935,12 @@ var NotificationPanel = React28.forwardRef(({ className, unreadCount = 0, onMark
|
|
|
3827
3935
|
),
|
|
3828
3936
|
...props,
|
|
3829
3937
|
children: [
|
|
3830
|
-
/* @__PURE__ */
|
|
3831
|
-
/* @__PURE__ */
|
|
3938
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between border-b border-border px-4 py-3", children: [
|
|
3939
|
+
/* @__PURE__ */ jsxs34("h3", { className: "text-sm font-semibold text-foreground", children: [
|
|
3832
3940
|
"Notifications",
|
|
3833
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
3941
|
+
unreadCount > 0 && /* @__PURE__ */ jsx43("span", { className: "bg-primary-solid ml-2 inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs text-primary-foreground", children: unreadCount })
|
|
3834
3942
|
] }),
|
|
3835
|
-
onMarkAllRead && unreadCount > 0 && /* @__PURE__ */
|
|
3943
|
+
onMarkAllRead && unreadCount > 0 && /* @__PURE__ */ jsx43(
|
|
3836
3944
|
"button",
|
|
3837
3945
|
{
|
|
3838
3946
|
type: "button",
|
|
@@ -3842,12 +3950,12 @@ var NotificationPanel = React28.forwardRef(({ className, unreadCount = 0, onMark
|
|
|
3842
3950
|
}
|
|
3843
3951
|
)
|
|
3844
3952
|
] }),
|
|
3845
|
-
/* @__PURE__ */
|
|
3953
|
+
/* @__PURE__ */ jsx43("div", { className: "max-h-80 divide-y divide-border overflow-y-auto", children })
|
|
3846
3954
|
]
|
|
3847
3955
|
}
|
|
3848
3956
|
));
|
|
3849
3957
|
NotificationPanel.displayName = "NotificationPanel";
|
|
3850
|
-
var NotificationPanelItem = React28.forwardRef(({ className, title, description, time, unread, icon, ...props }, ref) => /* @__PURE__ */
|
|
3958
|
+
var NotificationPanelItem = React28.forwardRef(({ className, title, description, time, unread, icon, ...props }, ref) => /* @__PURE__ */ jsxs34(
|
|
3851
3959
|
"div",
|
|
3852
3960
|
{
|
|
3853
3961
|
ref,
|
|
@@ -3858,9 +3966,9 @@ var NotificationPanelItem = React28.forwardRef(({ className, title, description,
|
|
|
3858
3966
|
),
|
|
3859
3967
|
...props,
|
|
3860
3968
|
children: [
|
|
3861
|
-
icon && /* @__PURE__ */
|
|
3862
|
-
/* @__PURE__ */
|
|
3863
|
-
/* @__PURE__ */
|
|
3969
|
+
icon && /* @__PURE__ */ jsx43("div", { className: "flex-shrink-0 pt-0.5", children: icon }),
|
|
3970
|
+
/* @__PURE__ */ jsxs34("div", { className: "min-w-0 flex-1", children: [
|
|
3971
|
+
/* @__PURE__ */ jsx43(
|
|
3864
3972
|
"p",
|
|
3865
3973
|
{
|
|
3866
3974
|
className: cn(
|
|
@@ -3870,22 +3978,22 @@ var NotificationPanelItem = React28.forwardRef(({ className, title, description,
|
|
|
3870
3978
|
children: title
|
|
3871
3979
|
}
|
|
3872
3980
|
),
|
|
3873
|
-
description && /* @__PURE__ */
|
|
3874
|
-
time && /* @__PURE__ */
|
|
3981
|
+
description && /* @__PURE__ */ jsx43("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description }),
|
|
3982
|
+
time && /* @__PURE__ */ jsx43("p", { className: "mt-1 text-xs text-muted-foreground", children: time })
|
|
3875
3983
|
] }),
|
|
3876
|
-
unread && /* @__PURE__ */
|
|
3984
|
+
unread && /* @__PURE__ */ jsx43("div", { className: "flex-shrink-0 pt-1.5", children: /* @__PURE__ */ jsx43("div", { className: "h-2 w-2 rounded-full bg-primary" }) })
|
|
3877
3985
|
]
|
|
3878
3986
|
}
|
|
3879
3987
|
));
|
|
3880
3988
|
NotificationPanelItem.displayName = "NotificationPanelItem";
|
|
3881
3989
|
|
|
3882
3990
|
// src/skeleton-patterns.tsx
|
|
3883
|
-
import { jsx as
|
|
3991
|
+
import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3884
3992
|
function SkeletonBar2({
|
|
3885
3993
|
className,
|
|
3886
3994
|
...props
|
|
3887
3995
|
}) {
|
|
3888
|
-
return /* @__PURE__ */
|
|
3996
|
+
return /* @__PURE__ */ jsx44(
|
|
3889
3997
|
"div",
|
|
3890
3998
|
{
|
|
3891
3999
|
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
@@ -3899,7 +4007,7 @@ function SkeletonTable({
|
|
|
3899
4007
|
columns = 4,
|
|
3900
4008
|
...props
|
|
3901
4009
|
}) {
|
|
3902
|
-
return /* @__PURE__ */
|
|
4010
|
+
return /* @__PURE__ */ jsxs35(
|
|
3903
4011
|
"div",
|
|
3904
4012
|
{
|
|
3905
4013
|
className: cn(
|
|
@@ -3908,15 +4016,15 @@ function SkeletonTable({
|
|
|
3908
4016
|
),
|
|
3909
4017
|
...props,
|
|
3910
4018
|
children: [
|
|
3911
|
-
/* @__PURE__ */
|
|
3912
|
-
Array.from({ length: rows }).map((_, row) => /* @__PURE__ */
|
|
4019
|
+
/* @__PURE__ */ jsx44("div", { className: "flex gap-4 border-b border-border bg-muted/50 px-4 py-3", children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-4 flex-1" }, `h-${i}`)) }),
|
|
4020
|
+
Array.from({ length: rows }).map((_, row) => /* @__PURE__ */ jsx44(
|
|
3913
4021
|
"div",
|
|
3914
4022
|
{
|
|
3915
4023
|
className: cn(
|
|
3916
4024
|
"flex gap-4 px-4 py-3",
|
|
3917
4025
|
row < rows - 1 && "border-b border-border"
|
|
3918
4026
|
),
|
|
3919
|
-
children: Array.from({ length: columns }).map((_2, col) => /* @__PURE__ */
|
|
4027
|
+
children: Array.from({ length: columns }).map((_2, col) => /* @__PURE__ */ jsx44(
|
|
3920
4028
|
SkeletonBar2,
|
|
3921
4029
|
{
|
|
3922
4030
|
className: cn("h-4 flex-1", col === 0 && "max-w-[140px]")
|
|
@@ -3938,17 +4046,17 @@ function SkeletonCardGrid({
|
|
|
3938
4046
|
...props
|
|
3939
4047
|
}) {
|
|
3940
4048
|
const colClass = columns === 2 ? "grid-cols-1 sm:grid-cols-2" : "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3";
|
|
3941
|
-
return /* @__PURE__ */
|
|
4049
|
+
return /* @__PURE__ */ jsx44("div", { className: cn("grid gap-4", colClass, className), ...props, children: Array.from({ length: cards }).map((_, i) => /* @__PURE__ */ jsxs35(
|
|
3942
4050
|
"div",
|
|
3943
4051
|
{
|
|
3944
4052
|
className: "space-y-3 rounded-lg border border-border p-4",
|
|
3945
4053
|
children: [
|
|
3946
|
-
/* @__PURE__ */
|
|
3947
|
-
/* @__PURE__ */
|
|
3948
|
-
/* @__PURE__ */
|
|
3949
|
-
/* @__PURE__ */
|
|
3950
|
-
/* @__PURE__ */
|
|
3951
|
-
/* @__PURE__ */
|
|
4054
|
+
/* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-4 w-3/4" }),
|
|
4055
|
+
/* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-3 w-full" }),
|
|
4056
|
+
/* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-3 w-5/6" }),
|
|
4057
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex gap-2 pt-2", children: [
|
|
4058
|
+
/* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-6 w-6 rounded-full" }),
|
|
4059
|
+
/* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-4 w-20" })
|
|
3952
4060
|
] })
|
|
3953
4061
|
]
|
|
3954
4062
|
},
|
|
@@ -3957,19 +4065,19 @@ function SkeletonCardGrid({
|
|
|
3957
4065
|
}
|
|
3958
4066
|
SkeletonCardGrid.displayName = "SkeletonCardGrid";
|
|
3959
4067
|
function SkeletonDetail({ className, ...props }) {
|
|
3960
|
-
return /* @__PURE__ */
|
|
3961
|
-
/* @__PURE__ */
|
|
3962
|
-
/* @__PURE__ */
|
|
3963
|
-
/* @__PURE__ */
|
|
4068
|
+
return /* @__PURE__ */ jsxs35("div", { className: cn("space-y-6", className), ...props, children: [
|
|
4069
|
+
/* @__PURE__ */ jsxs35("div", { className: "space-y-2", children: [
|
|
4070
|
+
/* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-8 w-1/3" }),
|
|
4071
|
+
/* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-4 w-2/3" })
|
|
3964
4072
|
] }),
|
|
3965
|
-
/* @__PURE__ */
|
|
3966
|
-
/* @__PURE__ */
|
|
3967
|
-
/* @__PURE__ */
|
|
4073
|
+
/* @__PURE__ */ jsx44("div", { className: "space-y-4", children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ jsxs35("div", { className: "flex justify-between", children: [
|
|
4074
|
+
/* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-4 w-24" }),
|
|
4075
|
+
/* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-4 w-40" })
|
|
3968
4076
|
] }, `dl-${i}`)) }),
|
|
3969
|
-
/* @__PURE__ */
|
|
3970
|
-
/* @__PURE__ */
|
|
3971
|
-
/* @__PURE__ */
|
|
3972
|
-
/* @__PURE__ */
|
|
4077
|
+
/* @__PURE__ */ jsxs35("div", { className: "space-y-2", children: [
|
|
4078
|
+
/* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-4 w-full" }),
|
|
4079
|
+
/* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-4 w-full" }),
|
|
4080
|
+
/* @__PURE__ */ jsx44(SkeletonBar2, { className: "h-4 w-3/4" })
|
|
3973
4081
|
] })
|
|
3974
4082
|
] });
|
|
3975
4083
|
}
|
|
@@ -3977,14 +4085,14 @@ SkeletonDetail.displayName = "SkeletonDetail";
|
|
|
3977
4085
|
|
|
3978
4086
|
// src/toggle.tsx
|
|
3979
4087
|
import * as React29 from "react";
|
|
3980
|
-
import { jsx as
|
|
4088
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
3981
4089
|
var SIZE_CLASSES4 = {
|
|
3982
4090
|
sm: "h-8 px-2 text-xs",
|
|
3983
4091
|
md: "h-9 px-3 text-sm",
|
|
3984
4092
|
lg: "h-10 px-4 text-base"
|
|
3985
4093
|
};
|
|
3986
4094
|
var Toggle = React29.forwardRef(
|
|
3987
|
-
({ className, pressed, variant = "default", size = "md", ...props }, ref) => /* @__PURE__ */
|
|
4095
|
+
({ className, pressed, variant = "default", size = "md", ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
3988
4096
|
"button",
|
|
3989
4097
|
{
|
|
3990
4098
|
ref,
|
|
@@ -4030,7 +4138,7 @@ var ToggleGroup = React29.forwardRef(
|
|
|
4030
4138
|
);
|
|
4031
4139
|
}
|
|
4032
4140
|
};
|
|
4033
|
-
return /* @__PURE__ */
|
|
4141
|
+
return /* @__PURE__ */ jsx45(
|
|
4034
4142
|
"div",
|
|
4035
4143
|
{
|
|
4036
4144
|
ref,
|
|
@@ -4059,7 +4167,7 @@ ToggleGroup.displayName = "ToggleGroup";
|
|
|
4059
4167
|
|
|
4060
4168
|
// src/avatar-group.tsx
|
|
4061
4169
|
import * as React30 from "react";
|
|
4062
|
-
import { jsx as
|
|
4170
|
+
import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4063
4171
|
var SIZE_MAP = {
|
|
4064
4172
|
xs: { avatar: "h-6 w-6", ring: "ring-1", text: "text-[10px]" },
|
|
4065
4173
|
sm: { avatar: "h-8 w-8", ring: "ring-2", text: "text-xs" },
|
|
@@ -4078,8 +4186,8 @@ var AvatarGroup = React30.forwardRef(
|
|
|
4078
4186
|
const visible = items.slice(0, max);
|
|
4079
4187
|
const overflow = items.length - max;
|
|
4080
4188
|
const sizeConfig3 = SIZE_MAP[size];
|
|
4081
|
-
return /* @__PURE__ */
|
|
4082
|
-
visible.map((child, i) => /* @__PURE__ */
|
|
4189
|
+
return /* @__PURE__ */ jsxs36("div", { ref, className: cn("flex items-center", className), ...props, children: [
|
|
4190
|
+
visible.map((child, i) => /* @__PURE__ */ jsx46(
|
|
4083
4191
|
"div",
|
|
4084
4192
|
{
|
|
4085
4193
|
className: cn(
|
|
@@ -4091,7 +4199,7 @@ var AvatarGroup = React30.forwardRef(
|
|
|
4091
4199
|
},
|
|
4092
4200
|
i
|
|
4093
4201
|
)),
|
|
4094
|
-
overflow > 0 && /* @__PURE__ */
|
|
4202
|
+
overflow > 0 && /* @__PURE__ */ jsx46(
|
|
4095
4203
|
"div",
|
|
4096
4204
|
{
|
|
4097
4205
|
className: cn(
|
|
@@ -4100,7 +4208,7 @@ var AvatarGroup = React30.forwardRef(
|
|
|
4100
4208
|
sizeConfig3.ring,
|
|
4101
4209
|
OVERLAP_MAP[size]
|
|
4102
4210
|
),
|
|
4103
|
-
children: /* @__PURE__ */
|
|
4211
|
+
children: /* @__PURE__ */ jsxs36(
|
|
4104
4212
|
"span",
|
|
4105
4213
|
{
|
|
4106
4214
|
className: cn(
|
|
@@ -4122,7 +4230,7 @@ AvatarGroup.displayName = "AvatarGroup";
|
|
|
4122
4230
|
var AvatarGroupItem = React30.forwardRef(({ className, fallback, size = "md", alt, src, ...props }, ref) => {
|
|
4123
4231
|
const sizeConfig3 = SIZE_MAP[size];
|
|
4124
4232
|
if (!src && fallback) {
|
|
4125
|
-
return /* @__PURE__ */
|
|
4233
|
+
return /* @__PURE__ */ jsx46(
|
|
4126
4234
|
"div",
|
|
4127
4235
|
{
|
|
4128
4236
|
className: cn(
|
|
@@ -4136,7 +4244,7 @@ var AvatarGroupItem = React30.forwardRef(({ className, fallback, size = "md", al
|
|
|
4136
4244
|
}
|
|
4137
4245
|
);
|
|
4138
4246
|
}
|
|
4139
|
-
return /* @__PURE__ */
|
|
4247
|
+
return /* @__PURE__ */ jsx46(
|
|
4140
4248
|
"img",
|
|
4141
4249
|
{
|
|
4142
4250
|
ref,
|
|
@@ -4151,9 +4259,9 @@ AvatarGroupItem.displayName = "AvatarGroupItem";
|
|
|
4151
4259
|
|
|
4152
4260
|
// src/tab-bar.tsx
|
|
4153
4261
|
import * as React31 from "react";
|
|
4154
|
-
import { jsx as
|
|
4262
|
+
import { jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4155
4263
|
var TabBar = React31.forwardRef(
|
|
4156
|
-
({ className, variant = "underline", children, ...props }, ref) => /* @__PURE__ */
|
|
4264
|
+
({ className, variant = "underline", children, ...props }, ref) => /* @__PURE__ */ jsxs37(
|
|
4157
4265
|
"div",
|
|
4158
4266
|
{
|
|
4159
4267
|
ref,
|
|
@@ -4180,14 +4288,14 @@ var TabBar = React31.forwardRef(
|
|
|
4180
4288
|
{ _variant: variant }
|
|
4181
4289
|
);
|
|
4182
4290
|
}),
|
|
4183
|
-
/* @__PURE__ */
|
|
4291
|
+
/* @__PURE__ */ jsx47(ScrollHintXMark, {})
|
|
4184
4292
|
]
|
|
4185
4293
|
}
|
|
4186
4294
|
)
|
|
4187
4295
|
);
|
|
4188
4296
|
TabBar.displayName = "TabBar";
|
|
4189
4297
|
var TabBarItem = React31.forwardRef(
|
|
4190
|
-
({ className, active, disabled, _variant: variant = "underline", ...props }, ref) => /* @__PURE__ */
|
|
4298
|
+
({ className, active, disabled, _variant: variant = "underline", ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
4191
4299
|
"button",
|
|
4192
4300
|
{
|
|
4193
4301
|
ref,
|
|
@@ -4223,7 +4331,7 @@ var TabBarItem = React31.forwardRef(
|
|
|
4223
4331
|
TabBarItem.displayName = "TabBarItem";
|
|
4224
4332
|
|
|
4225
4333
|
// src/sticky-action-bar.tsx
|
|
4226
|
-
import { jsx as
|
|
4334
|
+
import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4227
4335
|
function StickyActionBar({
|
|
4228
4336
|
context,
|
|
4229
4337
|
actions,
|
|
@@ -4231,7 +4339,7 @@ function StickyActionBar({
|
|
|
4231
4339
|
className,
|
|
4232
4340
|
testId = "sticky-action-bar"
|
|
4233
4341
|
}) {
|
|
4234
|
-
return /* @__PURE__ */
|
|
4342
|
+
return /* @__PURE__ */ jsx48(
|
|
4235
4343
|
"div",
|
|
4236
4344
|
{
|
|
4237
4345
|
"data-testid": testId,
|
|
@@ -4242,9 +4350,9 @@ function StickyActionBar({
|
|
|
4242
4350
|
topClassName,
|
|
4243
4351
|
className
|
|
4244
4352
|
),
|
|
4245
|
-
children: /* @__PURE__ */
|
|
4246
|
-
context != null ? /* @__PURE__ */
|
|
4247
|
-
/* @__PURE__ */
|
|
4353
|
+
children: /* @__PURE__ */ jsxs38("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
|
|
4354
|
+
context != null ? /* @__PURE__ */ jsx48("div", { className: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1.5", children: context }) : /* @__PURE__ */ jsx48("span", {}),
|
|
4355
|
+
/* @__PURE__ */ jsx48("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
4248
4356
|
] })
|
|
4249
4357
|
}
|
|
4250
4358
|
);
|
|
@@ -4252,14 +4360,14 @@ function StickyActionBar({
|
|
|
4252
4360
|
|
|
4253
4361
|
// src/button-group.tsx
|
|
4254
4362
|
import * as React32 from "react";
|
|
4255
|
-
import { jsx as
|
|
4363
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
4256
4364
|
var SIZE_CLASSES5 = {
|
|
4257
4365
|
sm: "h-8 px-3 text-xs",
|
|
4258
4366
|
md: "h-9 px-4 text-sm",
|
|
4259
4367
|
lg: "h-10 px-5 text-base"
|
|
4260
4368
|
};
|
|
4261
4369
|
var ButtonGroup = React32.forwardRef(
|
|
4262
|
-
({ className, variant = "default", size = "md", children, ...props }, ref) => /* @__PURE__ */
|
|
4370
|
+
({ className, variant = "default", size = "md", children, ...props }, ref) => /* @__PURE__ */ jsx49(
|
|
4263
4371
|
"div",
|
|
4264
4372
|
{
|
|
4265
4373
|
ref,
|
|
@@ -4290,7 +4398,7 @@ var ButtonGroupItem = React32.forwardRef(
|
|
|
4290
4398
|
_variant: variant = "default",
|
|
4291
4399
|
_size: size = "md",
|
|
4292
4400
|
...props
|
|
4293
|
-
}, ref) => /* @__PURE__ */
|
|
4401
|
+
}, ref) => /* @__PURE__ */ jsx49(
|
|
4294
4402
|
"button",
|
|
4295
4403
|
{
|
|
4296
4404
|
ref,
|
|
@@ -4332,7 +4440,7 @@ ButtonGroupItem.displayName = "ButtonGroupItem";
|
|
|
4332
4440
|
|
|
4333
4441
|
// src/data-table.tsx
|
|
4334
4442
|
import * as React33 from "react";
|
|
4335
|
-
import { jsx as
|
|
4443
|
+
import { jsx as jsx50, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4336
4444
|
var DataTable = React33.forwardRef(
|
|
4337
4445
|
({
|
|
4338
4446
|
className,
|
|
@@ -4343,8 +4451,8 @@ var DataTable = React33.forwardRef(
|
|
|
4343
4451
|
}, ref) => (
|
|
4344
4452
|
// W1.5 Batch 0 (#5823): a flex row, so the x mark (`ScrollHintXMark`,
|
|
4345
4453
|
// last child) sits beside the table, not under it
|
|
4346
|
-
/* @__PURE__ */
|
|
4347
|
-
/* @__PURE__ */
|
|
4454
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex w-full overflow-x-auto", children: [
|
|
4455
|
+
/* @__PURE__ */ jsx50(
|
|
4348
4456
|
"table",
|
|
4349
4457
|
{
|
|
4350
4458
|
ref,
|
|
@@ -4358,12 +4466,12 @@ var DataTable = React33.forwardRef(
|
|
|
4358
4466
|
...props
|
|
4359
4467
|
}
|
|
4360
4468
|
),
|
|
4361
|
-
/* @__PURE__ */
|
|
4469
|
+
/* @__PURE__ */ jsx50(ScrollHintXMark, {})
|
|
4362
4470
|
] })
|
|
4363
4471
|
)
|
|
4364
4472
|
);
|
|
4365
4473
|
DataTable.displayName = "DataTable";
|
|
4366
|
-
var TableHeader = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
4474
|
+
var TableHeader = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
4367
4475
|
"thead",
|
|
4368
4476
|
{
|
|
4369
4477
|
ref,
|
|
@@ -4372,7 +4480,7 @@ var TableHeader = React33.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4372
4480
|
}
|
|
4373
4481
|
));
|
|
4374
4482
|
TableHeader.displayName = "TableHeader";
|
|
4375
|
-
var TableBody = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
4483
|
+
var TableBody = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
4376
4484
|
"tbody",
|
|
4377
4485
|
{
|
|
4378
4486
|
ref,
|
|
@@ -4382,7 +4490,7 @@ var TableBody = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
4382
4490
|
));
|
|
4383
4491
|
TableBody.displayName = "TableBody";
|
|
4384
4492
|
var TableRow = React33.forwardRef(
|
|
4385
|
-
({ className, selected, ...props }, ref) => /* @__PURE__ */
|
|
4493
|
+
({ className, selected, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
4386
4494
|
"tr",
|
|
4387
4495
|
{
|
|
4388
4496
|
ref,
|
|
@@ -4409,7 +4517,7 @@ var TableCell = React33.forwardRef(
|
|
|
4409
4517
|
({ className, header, sortDirection, onSort, children, ...props }, ref) => {
|
|
4410
4518
|
const Tag2 = header ? "th" : "td";
|
|
4411
4519
|
const sortIndicator = sortDirection === "asc" ? " \u2191" : sortDirection === "desc" ? " \u2193" : "";
|
|
4412
|
-
return /* @__PURE__ */
|
|
4520
|
+
return /* @__PURE__ */ jsxs39(
|
|
4413
4521
|
Tag2,
|
|
4414
4522
|
{
|
|
4415
4523
|
ref,
|
|
@@ -4424,14 +4532,14 @@ var TableCell = React33.forwardRef(
|
|
|
4424
4532
|
...props,
|
|
4425
4533
|
children: [
|
|
4426
4534
|
children,
|
|
4427
|
-
header && sortIndicator && /* @__PURE__ */
|
|
4535
|
+
header && sortIndicator && /* @__PURE__ */ jsx50("span", { className: "text-primary-text ml-1", children: sortIndicator })
|
|
4428
4536
|
]
|
|
4429
4537
|
}
|
|
4430
4538
|
);
|
|
4431
4539
|
}
|
|
4432
4540
|
);
|
|
4433
4541
|
TableCell.displayName = "TableCell";
|
|
4434
|
-
var TableCaption = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
4542
|
+
var TableCaption = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
4435
4543
|
"caption",
|
|
4436
4544
|
{
|
|
4437
4545
|
ref,
|
|
@@ -4443,14 +4551,14 @@ TableCaption.displayName = "TableCaption";
|
|
|
4443
4551
|
|
|
4444
4552
|
// src/stat-group.tsx
|
|
4445
4553
|
import * as React34 from "react";
|
|
4446
|
-
import { jsx as
|
|
4554
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
4447
4555
|
var COL_CLASSES = {
|
|
4448
4556
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
4449
4557
|
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
4450
4558
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
4451
4559
|
};
|
|
4452
4560
|
var StatGroup = React34.forwardRef(
|
|
4453
|
-
({ className, columns = 3, variant = "card", children, ...props }, ref) => /* @__PURE__ */
|
|
4561
|
+
({ className, columns = 3, variant = "card", children, ...props }, ref) => /* @__PURE__ */ jsx51(
|
|
4454
4562
|
"div",
|
|
4455
4563
|
{
|
|
4456
4564
|
ref,
|
|
@@ -4469,9 +4577,9 @@ StatGroup.displayName = "StatGroup";
|
|
|
4469
4577
|
|
|
4470
4578
|
// src/description-list.tsx
|
|
4471
4579
|
import * as React35 from "react";
|
|
4472
|
-
import { jsx as
|
|
4580
|
+
import { jsx as jsx52, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
4473
4581
|
var DescriptionLayoutContext = React35.createContext("stacked");
|
|
4474
|
-
var DescriptionList = React35.forwardRef(({ className, layout = "stacked", ...props }, ref) => /* @__PURE__ */
|
|
4582
|
+
var DescriptionList = React35.forwardRef(({ className, layout = "stacked", ...props }, ref) => /* @__PURE__ */ jsx52(DescriptionLayoutContext.Provider, { value: layout, children: /* @__PURE__ */ jsx52(
|
|
4475
4583
|
"dl",
|
|
4476
4584
|
{
|
|
4477
4585
|
ref,
|
|
@@ -4488,7 +4596,7 @@ DescriptionList.displayName = "DescriptionList";
|
|
|
4488
4596
|
var DescriptionItem = React35.forwardRef(
|
|
4489
4597
|
({ className, label, value, ...props }, ref) => {
|
|
4490
4598
|
const layout = React35.useContext(DescriptionLayoutContext);
|
|
4491
|
-
return /* @__PURE__ */
|
|
4599
|
+
return /* @__PURE__ */ jsxs40(
|
|
4492
4600
|
"div",
|
|
4493
4601
|
{
|
|
4494
4602
|
ref,
|
|
@@ -4500,7 +4608,7 @@ var DescriptionItem = React35.forwardRef(
|
|
|
4500
4608
|
),
|
|
4501
4609
|
...props,
|
|
4502
4610
|
children: [
|
|
4503
|
-
/* @__PURE__ */
|
|
4611
|
+
/* @__PURE__ */ jsx52(
|
|
4504
4612
|
"dt",
|
|
4505
4613
|
{
|
|
4506
4614
|
className: cn(
|
|
@@ -4510,7 +4618,7 @@ var DescriptionItem = React35.forwardRef(
|
|
|
4510
4618
|
children: label
|
|
4511
4619
|
}
|
|
4512
4620
|
),
|
|
4513
|
-
/* @__PURE__ */
|
|
4621
|
+
/* @__PURE__ */ jsx52(
|
|
4514
4622
|
"dd",
|
|
4515
4623
|
{
|
|
4516
4624
|
className: cn(
|
|
@@ -4518,7 +4626,7 @@ var DescriptionItem = React35.forwardRef(
|
|
|
4518
4626
|
layout !== "side-by-side" && "mt-1",
|
|
4519
4627
|
layout === "side-by-side" && "text-right"
|
|
4520
4628
|
),
|
|
4521
|
-
children: isEmptyValue(value) ? /* @__PURE__ */
|
|
4629
|
+
children: isEmptyValue(value) ? /* @__PURE__ */ jsx52(EmptyValue, {}) : value
|
|
4522
4630
|
}
|
|
4523
4631
|
)
|
|
4524
4632
|
]
|
|
@@ -4530,9 +4638,9 @@ DescriptionItem.displayName = "DescriptionItem";
|
|
|
4530
4638
|
|
|
4531
4639
|
// src/activity-feed.tsx
|
|
4532
4640
|
import * as React36 from "react";
|
|
4533
|
-
import { jsx as
|
|
4641
|
+
import { jsx as jsx53, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4534
4642
|
var ActivityFeed = React36.forwardRef(
|
|
4535
|
-
({ className, variant = "simple", ...props }, ref) => /* @__PURE__ */
|
|
4643
|
+
({ className, variant = "simple", ...props }, ref) => /* @__PURE__ */ jsx53(
|
|
4536
4644
|
"div",
|
|
4537
4645
|
{
|
|
4538
4646
|
ref,
|
|
@@ -4544,18 +4652,18 @@ var ActivityFeed = React36.forwardRef(
|
|
|
4544
4652
|
);
|
|
4545
4653
|
ActivityFeed.displayName = "ActivityFeed";
|
|
4546
4654
|
var ActivityFeedItem = React36.forwardRef(
|
|
4547
|
-
({ className, avatar, eventDescription, timestamp, isLast, ...props }, ref) => /* @__PURE__ */
|
|
4655
|
+
({ className, avatar, eventDescription, timestamp, isLast, ...props }, ref) => /* @__PURE__ */ jsxs41(
|
|
4548
4656
|
"div",
|
|
4549
4657
|
{
|
|
4550
4658
|
ref,
|
|
4551
4659
|
className: cn("relative flex gap-3 pb-6", className),
|
|
4552
4660
|
...props,
|
|
4553
4661
|
children: [
|
|
4554
|
-
!isLast && /* @__PURE__ */
|
|
4555
|
-
/* @__PURE__ */
|
|
4556
|
-
/* @__PURE__ */
|
|
4557
|
-
/* @__PURE__ */
|
|
4558
|
-
timestamp && /* @__PURE__ */
|
|
4662
|
+
!isLast && /* @__PURE__ */ jsx53("div", { className: "absolute left-5 top-10 -ml-px h-full w-0.5 bg-muted" }),
|
|
4663
|
+
/* @__PURE__ */ jsx53("div", { className: "relative flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted", children: avatar }),
|
|
4664
|
+
/* @__PURE__ */ jsxs41("div", { className: "min-w-0 flex-1 pt-1", children: [
|
|
4665
|
+
/* @__PURE__ */ jsx53("div", { className: "text-sm text-foreground", children: eventDescription }),
|
|
4666
|
+
timestamp && /* @__PURE__ */ jsx53("p", { className: "mt-0.5 text-xs text-muted-foreground", children: timestamp })
|
|
4559
4667
|
] })
|
|
4560
4668
|
]
|
|
4561
4669
|
}
|
|
@@ -4565,7 +4673,7 @@ ActivityFeedItem.displayName = "ActivityFeedItem";
|
|
|
4565
4673
|
|
|
4566
4674
|
// src/alert.tsx
|
|
4567
4675
|
import * as React37 from "react";
|
|
4568
|
-
import { jsx as
|
|
4676
|
+
import { jsx as jsx54, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4569
4677
|
var INTENT_SUBTLE_STYLES = {
|
|
4570
4678
|
success: "bg-intent-success/10 text-intent-success-foreground border-intent-success/20",
|
|
4571
4679
|
warning: "bg-intent-warning/10 text-intent-warning-foreground border-intent-warning/20",
|
|
@@ -4602,7 +4710,7 @@ var Alert = React37.forwardRef(
|
|
|
4602
4710
|
...props
|
|
4603
4711
|
}, ref) => {
|
|
4604
4712
|
const styles = variant === "solid" ? SOLID_STYLES[intent] : variant === "outline" ? OUTLINE_STYLES[intent] : INTENT_SUBTLE_STYLES[intent];
|
|
4605
|
-
return /* @__PURE__ */
|
|
4713
|
+
return /* @__PURE__ */ jsxs42(
|
|
4606
4714
|
"div",
|
|
4607
4715
|
{
|
|
4608
4716
|
ref,
|
|
@@ -4610,12 +4718,12 @@ var Alert = React37.forwardRef(
|
|
|
4610
4718
|
className: cn("flex gap-3 rounded-lg border p-4", styles, className),
|
|
4611
4719
|
...props,
|
|
4612
4720
|
children: [
|
|
4613
|
-
/* @__PURE__ */
|
|
4614
|
-
/* @__PURE__ */
|
|
4615
|
-
title && /* @__PURE__ */
|
|
4616
|
-
children && /* @__PURE__ */
|
|
4721
|
+
/* @__PURE__ */ jsx54("span", { className: "flex-shrink-0 pt-0.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx54(Icon, { name: ICON_MAP2[intent], size: "md" }) }),
|
|
4722
|
+
/* @__PURE__ */ jsxs42("div", { className: "min-w-0 flex-1", children: [
|
|
4723
|
+
title && /* @__PURE__ */ jsx54("p", { className: "font-semibold", children: title }),
|
|
4724
|
+
children && /* @__PURE__ */ jsx54("div", { className: cn(title && "mt-1", "text-sm"), children })
|
|
4617
4725
|
] }),
|
|
4618
|
-
dismissible && /* @__PURE__ */
|
|
4726
|
+
dismissible && /* @__PURE__ */ jsx54(
|
|
4619
4727
|
"button",
|
|
4620
4728
|
{
|
|
4621
4729
|
type: "button",
|
|
@@ -4633,7 +4741,7 @@ var Alert = React37.forwardRef(
|
|
|
4633
4741
|
Alert.displayName = "Alert";
|
|
4634
4742
|
|
|
4635
4743
|
// src/empty-state.tsx
|
|
4636
|
-
import { jsx as
|
|
4744
|
+
import { jsx as jsx55, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
4637
4745
|
function EmptyState({
|
|
4638
4746
|
icon: Icon2,
|
|
4639
4747
|
title,
|
|
@@ -4644,7 +4752,7 @@ function EmptyState({
|
|
|
4644
4752
|
className
|
|
4645
4753
|
}) {
|
|
4646
4754
|
const compact = size === "compact";
|
|
4647
|
-
return /* @__PURE__ */
|
|
4755
|
+
return /* @__PURE__ */ jsxs43(
|
|
4648
4756
|
"div",
|
|
4649
4757
|
{
|
|
4650
4758
|
"data-testid": testId,
|
|
@@ -4654,7 +4762,7 @@ function EmptyState({
|
|
|
4654
4762
|
className
|
|
4655
4763
|
),
|
|
4656
4764
|
children: [
|
|
4657
|
-
Icon2 && /* @__PURE__ */
|
|
4765
|
+
Icon2 && /* @__PURE__ */ jsx55(
|
|
4658
4766
|
"div",
|
|
4659
4767
|
{
|
|
4660
4768
|
"aria-hidden": "true",
|
|
@@ -4662,10 +4770,10 @@ function EmptyState({
|
|
|
4662
4770
|
"flex items-center justify-center rounded-full bg-primary/10 text-primary",
|
|
4663
4771
|
compact ? "mb-3 size-12" : "mb-5 size-16"
|
|
4664
4772
|
),
|
|
4665
|
-
children: /* @__PURE__ */
|
|
4773
|
+
children: /* @__PURE__ */ jsx55(Icon2, { className: compact ? "size-6" : "size-8" })
|
|
4666
4774
|
}
|
|
4667
4775
|
),
|
|
4668
|
-
/* @__PURE__ */
|
|
4776
|
+
/* @__PURE__ */ jsx55(
|
|
4669
4777
|
"h2",
|
|
4670
4778
|
{
|
|
4671
4779
|
className: cn(
|
|
@@ -4675,7 +4783,7 @@ function EmptyState({
|
|
|
4675
4783
|
children: title
|
|
4676
4784
|
}
|
|
4677
4785
|
),
|
|
4678
|
-
description && /* @__PURE__ */
|
|
4786
|
+
description && /* @__PURE__ */ jsx55(
|
|
4679
4787
|
"p",
|
|
4680
4788
|
{
|
|
4681
4789
|
className: cn(
|
|
@@ -4685,7 +4793,7 @@ function EmptyState({
|
|
|
4685
4793
|
children: description
|
|
4686
4794
|
}
|
|
4687
4795
|
),
|
|
4688
|
-
action && /* @__PURE__ */
|
|
4796
|
+
action && /* @__PURE__ */ jsx55("div", { className: compact ? "mt-4" : "mt-6", children: action })
|
|
4689
4797
|
]
|
|
4690
4798
|
}
|
|
4691
4799
|
);
|
|
@@ -4693,7 +4801,7 @@ function EmptyState({
|
|
|
4693
4801
|
|
|
4694
4802
|
// src/action-panel.tsx
|
|
4695
4803
|
import * as React38 from "react";
|
|
4696
|
-
import { Fragment as Fragment9, jsx as
|
|
4804
|
+
import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
4697
4805
|
var BORDER_INTENT = {
|
|
4698
4806
|
default: "border-l-primary",
|
|
4699
4807
|
warning: "border-l-intent-warning",
|
|
@@ -4708,7 +4816,7 @@ var ActionPanel = React38.forwardRef(
|
|
|
4708
4816
|
variant = "simple",
|
|
4709
4817
|
intent = "default",
|
|
4710
4818
|
...props
|
|
4711
|
-
}, ref) => /* @__PURE__ */
|
|
4819
|
+
}, ref) => /* @__PURE__ */ jsx56(
|
|
4712
4820
|
"div",
|
|
4713
4821
|
{
|
|
4714
4822
|
ref,
|
|
@@ -4719,16 +4827,16 @@ var ActionPanel = React38.forwardRef(
|
|
|
4719
4827
|
className
|
|
4720
4828
|
),
|
|
4721
4829
|
...props,
|
|
4722
|
-
children: variant === "split" ? /* @__PURE__ */
|
|
4723
|
-
/* @__PURE__ */
|
|
4724
|
-
/* @__PURE__ */
|
|
4725
|
-
description && /* @__PURE__ */
|
|
4830
|
+
children: variant === "split" ? /* @__PURE__ */ jsxs44(Fragment9, { children: [
|
|
4831
|
+
/* @__PURE__ */ jsxs44("div", { className: "min-w-0", children: [
|
|
4832
|
+
/* @__PURE__ */ jsx56("h3", { className: "font-semibold text-foreground", children: title }),
|
|
4833
|
+
description && /* @__PURE__ */ jsx56("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
|
|
4726
4834
|
] }),
|
|
4727
|
-
action && /* @__PURE__ */
|
|
4728
|
-
] }) : /* @__PURE__ */
|
|
4729
|
-
/* @__PURE__ */
|
|
4730
|
-
description && /* @__PURE__ */
|
|
4731
|
-
action && /* @__PURE__ */
|
|
4835
|
+
action && /* @__PURE__ */ jsx56("div", { className: "flex-shrink-0", children: action })
|
|
4836
|
+
] }) : /* @__PURE__ */ jsxs44(Fragment9, { children: [
|
|
4837
|
+
/* @__PURE__ */ jsx56("h3", { className: "font-semibold text-foreground", children: title }),
|
|
4838
|
+
description && /* @__PURE__ */ jsx56("p", { className: "mt-1 text-sm text-muted-foreground", children: description }),
|
|
4839
|
+
action && /* @__PURE__ */ jsx56("div", { className: "mt-4", children: action })
|
|
4732
4840
|
] })
|
|
4733
4841
|
}
|
|
4734
4842
|
)
|
|
@@ -4737,7 +4845,7 @@ ActionPanel.displayName = "ActionPanel";
|
|
|
4737
4845
|
|
|
4738
4846
|
// src/divider.tsx
|
|
4739
4847
|
import * as React39 from "react";
|
|
4740
|
-
import { jsx as
|
|
4848
|
+
import { jsx as jsx57, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
4741
4849
|
var VARIANT_CLASSES = {
|
|
4742
4850
|
solid: "border-solid",
|
|
4743
4851
|
dashed: "border-dashed",
|
|
@@ -4753,7 +4861,7 @@ var Divider = React39.forwardRef(
|
|
|
4753
4861
|
...props
|
|
4754
4862
|
}, ref) => {
|
|
4755
4863
|
if (orientation === "vertical") {
|
|
4756
|
-
return /* @__PURE__ */
|
|
4864
|
+
return /* @__PURE__ */ jsx57(
|
|
4757
4865
|
"div",
|
|
4758
4866
|
{
|
|
4759
4867
|
ref,
|
|
@@ -4770,7 +4878,7 @@ var Divider = React39.forwardRef(
|
|
|
4770
4878
|
);
|
|
4771
4879
|
}
|
|
4772
4880
|
if (!label) {
|
|
4773
|
-
return /* @__PURE__ */
|
|
4881
|
+
return /* @__PURE__ */ jsx57(
|
|
4774
4882
|
"div",
|
|
4775
4883
|
{
|
|
4776
4884
|
ref,
|
|
@@ -4784,7 +4892,7 @@ var Divider = React39.forwardRef(
|
|
|
4784
4892
|
}
|
|
4785
4893
|
);
|
|
4786
4894
|
}
|
|
4787
|
-
return /* @__PURE__ */
|
|
4895
|
+
return /* @__PURE__ */ jsxs45(
|
|
4788
4896
|
"div",
|
|
4789
4897
|
{
|
|
4790
4898
|
ref,
|
|
@@ -4792,7 +4900,7 @@ var Divider = React39.forwardRef(
|
|
|
4792
4900
|
role: "separator",
|
|
4793
4901
|
...props,
|
|
4794
4902
|
children: [
|
|
4795
|
-
labelPosition !== "left" && /* @__PURE__ */
|
|
4903
|
+
labelPosition !== "left" && /* @__PURE__ */ jsx57(
|
|
4796
4904
|
"div",
|
|
4797
4905
|
{
|
|
4798
4906
|
className: cn(
|
|
@@ -4801,7 +4909,7 @@ var Divider = React39.forwardRef(
|
|
|
4801
4909
|
)
|
|
4802
4910
|
}
|
|
4803
4911
|
),
|
|
4804
|
-
/* @__PURE__ */
|
|
4912
|
+
/* @__PURE__ */ jsx57(
|
|
4805
4913
|
"span",
|
|
4806
4914
|
{
|
|
4807
4915
|
className: cn(
|
|
@@ -4811,7 +4919,7 @@ var Divider = React39.forwardRef(
|
|
|
4811
4919
|
children: label
|
|
4812
4920
|
}
|
|
4813
4921
|
),
|
|
4814
|
-
labelPosition !== "right" && /* @__PURE__ */
|
|
4922
|
+
labelPosition !== "right" && /* @__PURE__ */ jsx57(
|
|
4815
4923
|
"div",
|
|
4816
4924
|
{
|
|
4817
4925
|
className: cn(
|
|
@@ -4829,7 +4937,7 @@ Divider.displayName = "Divider";
|
|
|
4829
4937
|
|
|
4830
4938
|
// src/container.tsx
|
|
4831
4939
|
import * as React40 from "react";
|
|
4832
|
-
import { jsx as
|
|
4940
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
4833
4941
|
var SIZE_CLASSES6 = {
|
|
4834
4942
|
sm: "max-w-content-sm",
|
|
4835
4943
|
md: "max-w-content-md",
|
|
@@ -4838,7 +4946,7 @@ var SIZE_CLASSES6 = {
|
|
|
4838
4946
|
full: "max-w-full"
|
|
4839
4947
|
};
|
|
4840
4948
|
var Container = React40.forwardRef(
|
|
4841
|
-
({ className, size = "xl", padded = true, ...props }, ref) => /* @__PURE__ */
|
|
4949
|
+
({ className, size = "xl", padded = true, ...props }, ref) => /* @__PURE__ */ jsx58(
|
|
4842
4950
|
"div",
|
|
4843
4951
|
{
|
|
4844
4952
|
ref,
|
|
@@ -4856,7 +4964,7 @@ Container.displayName = "Container";
|
|
|
4856
4964
|
|
|
4857
4965
|
// src/page-content.tsx
|
|
4858
4966
|
import * as React41 from "react";
|
|
4859
|
-
import { jsx as
|
|
4967
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
4860
4968
|
var GAP_CLASSES2 = {
|
|
4861
4969
|
sm: "space-y-4",
|
|
4862
4970
|
md: "space-y-6",
|
|
@@ -4864,7 +4972,7 @@ var GAP_CLASSES2 = {
|
|
|
4864
4972
|
none: ""
|
|
4865
4973
|
};
|
|
4866
4974
|
var PageContent = React41.forwardRef(
|
|
4867
|
-
({ className, gap = "md", padded = true, children, ...props }, ref) => /* @__PURE__ */
|
|
4975
|
+
({ className, gap = "md", padded = true, children, ...props }, ref) => /* @__PURE__ */ jsx59(
|
|
4868
4976
|
"div",
|
|
4869
4977
|
{
|
|
4870
4978
|
ref,
|
|
@@ -4878,7 +4986,7 @@ PageContent.displayName = "PageContent";
|
|
|
4878
4986
|
|
|
4879
4987
|
// src/media-object.tsx
|
|
4880
4988
|
import * as React42 from "react";
|
|
4881
|
-
import { jsx as
|
|
4989
|
+
import { jsx as jsx60, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
4882
4990
|
var MEDIA_SIZE = {
|
|
4883
4991
|
sm: "h-8 w-8",
|
|
4884
4992
|
md: "h-10 w-10",
|
|
@@ -4897,7 +5005,7 @@ var MediaObject = React42.forwardRef(
|
|
|
4897
5005
|
...props
|
|
4898
5006
|
}, ref) => {
|
|
4899
5007
|
if (stacked) {
|
|
4900
|
-
return /* @__PURE__ */
|
|
5008
|
+
return /* @__PURE__ */ jsxs46(
|
|
4901
5009
|
"div",
|
|
4902
5010
|
{
|
|
4903
5011
|
ref,
|
|
@@ -4907,17 +5015,17 @@ var MediaObject = React42.forwardRef(
|
|
|
4907
5015
|
),
|
|
4908
5016
|
...props,
|
|
4909
5017
|
children: [
|
|
4910
|
-
/* @__PURE__ */
|
|
4911
|
-
/* @__PURE__ */
|
|
4912
|
-
title && /* @__PURE__ */
|
|
4913
|
-
description && /* @__PURE__ */
|
|
5018
|
+
/* @__PURE__ */ jsx60("div", { className: cn("flex-shrink-0", MEDIA_SIZE[mediaSize]), children: media }),
|
|
5019
|
+
/* @__PURE__ */ jsxs46("div", { className: "min-w-0", children: [
|
|
5020
|
+
title && /* @__PURE__ */ jsx60("p", { className: "font-medium text-foreground", children: title }),
|
|
5021
|
+
description && /* @__PURE__ */ jsx60("p", { className: "text-sm text-muted-foreground", children: description })
|
|
4914
5022
|
] }),
|
|
4915
|
-
action && /* @__PURE__ */
|
|
5023
|
+
action && /* @__PURE__ */ jsx60("div", { children: action })
|
|
4916
5024
|
]
|
|
4917
5025
|
}
|
|
4918
5026
|
);
|
|
4919
5027
|
}
|
|
4920
|
-
return /* @__PURE__ */
|
|
5028
|
+
return /* @__PURE__ */ jsxs46(
|
|
4921
5029
|
"div",
|
|
4922
5030
|
{
|
|
4923
5031
|
ref,
|
|
@@ -4928,12 +5036,12 @@ var MediaObject = React42.forwardRef(
|
|
|
4928
5036
|
),
|
|
4929
5037
|
...props,
|
|
4930
5038
|
children: [
|
|
4931
|
-
/* @__PURE__ */
|
|
4932
|
-
/* @__PURE__ */
|
|
4933
|
-
title && /* @__PURE__ */
|
|
4934
|
-
description && /* @__PURE__ */
|
|
5039
|
+
/* @__PURE__ */ jsx60("div", { className: cn("flex-shrink-0", MEDIA_SIZE[mediaSize]), children: media }),
|
|
5040
|
+
/* @__PURE__ */ jsxs46("div", { className: "min-w-0 flex-1", children: [
|
|
5041
|
+
title && /* @__PURE__ */ jsx60("p", { className: "font-medium text-foreground", children: title }),
|
|
5042
|
+
description && /* @__PURE__ */ jsx60("p", { className: "text-sm text-muted-foreground", children: description })
|
|
4935
5043
|
] }),
|
|
4936
|
-
action && /* @__PURE__ */
|
|
5044
|
+
action && /* @__PURE__ */ jsx60("div", { className: "flex-shrink-0", children: action })
|
|
4937
5045
|
]
|
|
4938
5046
|
}
|
|
4939
5047
|
);
|
|
@@ -4943,7 +5051,7 @@ MediaObject.displayName = "MediaObject";
|
|
|
4943
5051
|
|
|
4944
5052
|
// src/page-patterns.tsx
|
|
4945
5053
|
import * as React43 from "react";
|
|
4946
|
-
import { jsx as
|
|
5054
|
+
import { jsx as jsx61, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
4947
5055
|
var GUTTER_WIDTHS = {
|
|
4948
5056
|
/** A single column of reading or a short list. */
|
|
4949
5057
|
narrow: "max-w-content-md",
|
|
@@ -4951,7 +5059,7 @@ var GUTTER_WIDTHS = {
|
|
|
4951
5059
|
default: "max-w-content-xl"
|
|
4952
5060
|
};
|
|
4953
5061
|
var PageGutter = React43.forwardRef(
|
|
4954
|
-
({ className, width = "default", ...props }, ref) => /* @__PURE__ */
|
|
5062
|
+
({ className, width = "default", ...props }, ref) => /* @__PURE__ */ jsx61(
|
|
4955
5063
|
"div",
|
|
4956
5064
|
{
|
|
4957
5065
|
ref,
|
|
@@ -4966,22 +5074,22 @@ var PageGutter = React43.forwardRef(
|
|
|
4966
5074
|
);
|
|
4967
5075
|
PageGutter.displayName = "PageGutter";
|
|
4968
5076
|
var PageHeading = React43.forwardRef(
|
|
4969
|
-
({ className, title, description, meta, actions, ...props }, ref) => /* @__PURE__ */
|
|
5077
|
+
({ className, title, description, meta, actions, ...props }, ref) => /* @__PURE__ */ jsxs47(
|
|
4970
5078
|
"header",
|
|
4971
5079
|
{
|
|
4972
5080
|
ref,
|
|
4973
5081
|
className: cn(
|
|
4974
|
-
"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
5082
|
+
"flex flex-col gap-4 sm:flex-row sm:flex-wrap sm:items-start sm:justify-between",
|
|
4975
5083
|
className
|
|
4976
5084
|
),
|
|
4977
5085
|
...props,
|
|
4978
5086
|
children: [
|
|
4979
|
-
/* @__PURE__ */
|
|
4980
|
-
/* @__PURE__ */
|
|
4981
|
-
description && /* @__PURE__ */
|
|
4982
|
-
meta && /* @__PURE__ */
|
|
5087
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex min-w-0 flex-1 flex-col gap-1 sm:basis-80", children: [
|
|
5088
|
+
/* @__PURE__ */ jsx61("h1", { className: "break-words text-2xl font-semibold tracking-tight text-foreground sm:text-3xl", children: title }),
|
|
5089
|
+
description && /* @__PURE__ */ jsx61("p", { className: "break-words text-sm text-muted-foreground sm:text-base", children: description }),
|
|
5090
|
+
meta && /* @__PURE__ */ jsx61("div", { className: "mt-2 flex flex-wrap gap-2", children: meta })
|
|
4983
5091
|
] }),
|
|
4984
|
-
actions && /* @__PURE__ */
|
|
5092
|
+
actions && /* @__PURE__ */ jsx61("div", { className: "flex max-w-full shrink-0 flex-wrap items-center gap-2", children: actions })
|
|
4985
5093
|
]
|
|
4986
5094
|
}
|
|
4987
5095
|
)
|
|
@@ -5000,14 +5108,14 @@ var SectionCard = React43.forwardRef(
|
|
|
5000
5108
|
}, ref) => {
|
|
5001
5109
|
const pad = size === "compact" ? "p-4" : "p-4 sm:p-6";
|
|
5002
5110
|
const hasHead = Boolean(title || description || actions);
|
|
5003
|
-
return /* @__PURE__ */
|
|
5111
|
+
return /* @__PURE__ */ jsxs47(
|
|
5004
5112
|
Card,
|
|
5005
5113
|
{
|
|
5006
5114
|
ref,
|
|
5007
5115
|
className: cn("min-w-0 overflow-hidden", className),
|
|
5008
5116
|
...props,
|
|
5009
5117
|
children: [
|
|
5010
|
-
hasHead && /* @__PURE__ */
|
|
5118
|
+
hasHead && /* @__PURE__ */ jsxs47(
|
|
5011
5119
|
"div",
|
|
5012
5120
|
{
|
|
5013
5121
|
className: cn(
|
|
@@ -5017,8 +5125,8 @@ var SectionCard = React43.forwardRef(
|
|
|
5017
5125
|
flush && children ? "border-b border-border" : ""
|
|
5018
5126
|
),
|
|
5019
5127
|
children: [
|
|
5020
|
-
/* @__PURE__ */
|
|
5021
|
-
title && /* @__PURE__ */
|
|
5128
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
5129
|
+
title && /* @__PURE__ */ jsx61(
|
|
5022
5130
|
"h2",
|
|
5023
5131
|
{
|
|
5024
5132
|
className: cn(
|
|
@@ -5028,13 +5136,13 @@ var SectionCard = React43.forwardRef(
|
|
|
5028
5136
|
children: title
|
|
5029
5137
|
}
|
|
5030
5138
|
),
|
|
5031
|
-
description && /* @__PURE__ */
|
|
5139
|
+
description && /* @__PURE__ */ jsx61("p", { className: "text-sm text-muted-foreground", children: description })
|
|
5032
5140
|
] }),
|
|
5033
|
-
actions && /* @__PURE__ */
|
|
5141
|
+
actions && /* @__PURE__ */ jsx61("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: actions })
|
|
5034
5142
|
]
|
|
5035
5143
|
}
|
|
5036
5144
|
),
|
|
5037
|
-
children !== void 0 && children !== null && /* @__PURE__ */
|
|
5145
|
+
children !== void 0 && children !== null && /* @__PURE__ */ jsx61("div", { className: cn("min-w-0", !flush && pad), children })
|
|
5038
5146
|
]
|
|
5039
5147
|
}
|
|
5040
5148
|
);
|
|
@@ -5042,22 +5150,22 @@ var SectionCard = React43.forwardRef(
|
|
|
5042
5150
|
);
|
|
5043
5151
|
SectionCard.displayName = "SectionCard";
|
|
5044
5152
|
var TabbedCard = React43.forwardRef(
|
|
5045
|
-
({ className, tabs, tabsLabel, children, ...props }, ref) => /* @__PURE__ */
|
|
5153
|
+
({ className, tabs, tabsLabel, children, ...props }, ref) => /* @__PURE__ */ jsxs47(
|
|
5046
5154
|
Card,
|
|
5047
5155
|
{
|
|
5048
5156
|
ref,
|
|
5049
5157
|
className: cn("min-w-0 overflow-hidden", className),
|
|
5050
5158
|
...props,
|
|
5051
5159
|
children: [
|
|
5052
|
-
/* @__PURE__ */
|
|
5053
|
-
/* @__PURE__ */
|
|
5160
|
+
/* @__PURE__ */ jsx61("div", { className: "px-4 pt-3 sm:px-6", children: /* @__PURE__ */ jsx61(TabBar, { variant: "underline", "aria-label": tabsLabel, children: tabs }) }),
|
|
5161
|
+
/* @__PURE__ */ jsx61("div", { className: "min-w-0 p-4 sm:p-6", children })
|
|
5054
5162
|
]
|
|
5055
5163
|
}
|
|
5056
5164
|
)
|
|
5057
5165
|
);
|
|
5058
5166
|
TabbedCard.displayName = "TabbedCard";
|
|
5059
5167
|
var SidePanelLayout = React43.forwardRef(
|
|
5060
|
-
({ className, aside, asideLabel, children, ...props }, ref) => /* @__PURE__ */
|
|
5168
|
+
({ className, aside, asideLabel, children, ...props }, ref) => /* @__PURE__ */ jsxs47(
|
|
5061
5169
|
"div",
|
|
5062
5170
|
{
|
|
5063
5171
|
ref,
|
|
@@ -5067,8 +5175,8 @@ var SidePanelLayout = React43.forwardRef(
|
|
|
5067
5175
|
),
|
|
5068
5176
|
...props,
|
|
5069
5177
|
children: [
|
|
5070
|
-
/* @__PURE__ */
|
|
5071
|
-
/* @__PURE__ */
|
|
5178
|
+
/* @__PURE__ */ jsx61("div", { className: "flex min-w-0 flex-col gap-6 lg:col-span-2", children }),
|
|
5179
|
+
/* @__PURE__ */ jsx61(
|
|
5072
5180
|
"aside",
|
|
5073
5181
|
{
|
|
5074
5182
|
"aria-label": asideLabel,
|
|
@@ -5084,7 +5192,7 @@ SidePanelLayout.displayName = "SidePanelLayout";
|
|
|
5084
5192
|
|
|
5085
5193
|
// src/intent-badge.tsx
|
|
5086
5194
|
import * as React44 from "react";
|
|
5087
|
-
import { jsx as
|
|
5195
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
5088
5196
|
var INTENT_CLASSES = {
|
|
5089
5197
|
neutral: "bg-muted text-muted-foreground border-border",
|
|
5090
5198
|
// the primary tint is lighter than the intents': `primary-text` on a 10%
|
|
@@ -5093,7 +5201,7 @@ var INTENT_CLASSES = {
|
|
|
5093
5201
|
...INTENT_SUBTLE_STYLES
|
|
5094
5202
|
};
|
|
5095
5203
|
var IntentBadge = React44.forwardRef(
|
|
5096
|
-
({ className, intent = "neutral", children, ...props }, ref) => /* @__PURE__ */
|
|
5204
|
+
({ className, intent = "neutral", children, ...props }, ref) => /* @__PURE__ */ jsx62(
|
|
5097
5205
|
"span",
|
|
5098
5206
|
{
|
|
5099
5207
|
ref,
|
|
@@ -5104,7 +5212,7 @@ var IntentBadge = React44.forwardRef(
|
|
|
5104
5212
|
className
|
|
5105
5213
|
),
|
|
5106
5214
|
...props,
|
|
5107
|
-
children: /* @__PURE__ */
|
|
5215
|
+
children: /* @__PURE__ */ jsx62("span", { className: "truncate", children: isEmptyValue(children) ? /* @__PURE__ */ jsx62(EmptyValue, {}) : children })
|
|
5108
5216
|
}
|
|
5109
5217
|
)
|
|
5110
5218
|
);
|
|
@@ -5112,7 +5220,7 @@ IntentBadge.displayName = "IntentBadge";
|
|
|
5112
5220
|
|
|
5113
5221
|
// src/overflow-menu.tsx
|
|
5114
5222
|
import * as React45 from "react";
|
|
5115
|
-
import { Fragment as Fragment10, jsx as
|
|
5223
|
+
import { Fragment as Fragment10, jsx as jsx63, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
5116
5224
|
function OverflowMenu({
|
|
5117
5225
|
label,
|
|
5118
5226
|
items,
|
|
@@ -5129,8 +5237,8 @@ function OverflowMenu({
|
|
|
5129
5237
|
document.addEventListener("keydown", onKey);
|
|
5130
5238
|
return () => document.removeEventListener("keydown", onKey);
|
|
5131
5239
|
}, [open]);
|
|
5132
|
-
return /* @__PURE__ */
|
|
5133
|
-
/* @__PURE__ */
|
|
5240
|
+
return /* @__PURE__ */ jsxs48("div", { className: cn("relative inline-block", className), children: [
|
|
5241
|
+
/* @__PURE__ */ jsx63(
|
|
5134
5242
|
Button,
|
|
5135
5243
|
{
|
|
5136
5244
|
variant: "outline",
|
|
@@ -5140,11 +5248,11 @@ function OverflowMenu({
|
|
|
5140
5248
|
"aria-expanded": open,
|
|
5141
5249
|
"aria-controls": open ? menuId : void 0,
|
|
5142
5250
|
onClick: () => setOpen(!open),
|
|
5143
|
-
children: /* @__PURE__ */
|
|
5251
|
+
children: /* @__PURE__ */ jsx63(Icon, { name: "ellipsis", size: "sm" })
|
|
5144
5252
|
}
|
|
5145
5253
|
),
|
|
5146
|
-
open && /* @__PURE__ */
|
|
5147
|
-
/* @__PURE__ */
|
|
5254
|
+
open && /* @__PURE__ */ jsxs48(Fragment10, { children: [
|
|
5255
|
+
/* @__PURE__ */ jsx63(
|
|
5148
5256
|
"div",
|
|
5149
5257
|
{
|
|
5150
5258
|
"aria-hidden": "true",
|
|
@@ -5152,14 +5260,14 @@ function OverflowMenu({
|
|
|
5152
5260
|
onClick: () => setOpen(false)
|
|
5153
5261
|
}
|
|
5154
5262
|
),
|
|
5155
|
-
/* @__PURE__ */
|
|
5263
|
+
/* @__PURE__ */ jsx63(
|
|
5156
5264
|
"div",
|
|
5157
5265
|
{
|
|
5158
5266
|
id: menuId,
|
|
5159
5267
|
role: "menu",
|
|
5160
5268
|
"aria-label": label,
|
|
5161
5269
|
className: "z-dropdown absolute right-0 top-full mt-2 flex w-56 max-w-[calc(100vw-2rem)] flex-col rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg",
|
|
5162
|
-
children: items.map((item) => /* @__PURE__ */
|
|
5270
|
+
children: items.map((item) => /* @__PURE__ */ jsxs48(
|
|
5163
5271
|
"button",
|
|
5164
5272
|
{
|
|
5165
5273
|
type: "button",
|
|
@@ -5174,8 +5282,8 @@ function OverflowMenu({
|
|
|
5174
5282
|
item.destructive ? "text-intent-error-foreground" : "text-popover-foreground"
|
|
5175
5283
|
),
|
|
5176
5284
|
children: [
|
|
5177
|
-
item.icon && /* @__PURE__ */
|
|
5178
|
-
/* @__PURE__ */
|
|
5285
|
+
item.icon && /* @__PURE__ */ jsx63(Icon, { name: item.icon, size: "sm" }),
|
|
5286
|
+
/* @__PURE__ */ jsx63("span", { className: "min-w-0 truncate", children: item.label })
|
|
5179
5287
|
]
|
|
5180
5288
|
},
|
|
5181
5289
|
item.label
|
|
@@ -5188,7 +5296,7 @@ function OverflowMenu({
|
|
|
5188
5296
|
|
|
5189
5297
|
// src/stage-list.tsx
|
|
5190
5298
|
import * as React46 from "react";
|
|
5191
|
-
import { jsx as
|
|
5299
|
+
import { jsx as jsx64, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
5192
5300
|
var StageList = React46.forwardRef(
|
|
5193
5301
|
({ stages, outcomes = [], current, ...props }, ref) => {
|
|
5194
5302
|
const at = stages.findIndex((s) => s.value === current);
|
|
@@ -5197,7 +5305,7 @@ var StageList = React46.forwardRef(
|
|
|
5197
5305
|
throw new Error(
|
|
5198
5306
|
`StageList: current "${current}" is not one of the stages (${stages.map((s) => s.value).join(", ")}) or outcomes (${outcomes.map((s) => s.value).join(", ") || "none"})`
|
|
5199
5307
|
);
|
|
5200
|
-
return /* @__PURE__ */
|
|
5308
|
+
return /* @__PURE__ */ jsxs49(
|
|
5201
5309
|
Stepper,
|
|
5202
5310
|
{
|
|
5203
5311
|
ref,
|
|
@@ -5206,7 +5314,7 @@ var StageList = React46.forwardRef(
|
|
|
5206
5314
|
activeStep: outcome ? stages.length : at,
|
|
5207
5315
|
...props,
|
|
5208
5316
|
children: [
|
|
5209
|
-
stages.map((s) => /* @__PURE__ */
|
|
5317
|
+
stages.map((s) => /* @__PURE__ */ jsx64(
|
|
5210
5318
|
StepperStep,
|
|
5211
5319
|
{
|
|
5212
5320
|
label: s.label,
|
|
@@ -5214,7 +5322,7 @@ var StageList = React46.forwardRef(
|
|
|
5214
5322
|
},
|
|
5215
5323
|
s.value
|
|
5216
5324
|
)),
|
|
5217
|
-
outcome && /* @__PURE__ */
|
|
5325
|
+
outcome && /* @__PURE__ */ jsx64(StepperStep, { label: outcome.label, error: true }, outcome.value)
|
|
5218
5326
|
]
|
|
5219
5327
|
}
|
|
5220
5328
|
);
|
|
@@ -5224,14 +5332,14 @@ StageList.displayName = "StageList";
|
|
|
5224
5332
|
|
|
5225
5333
|
// src/clamped-list.tsx
|
|
5226
5334
|
import * as React47 from "react";
|
|
5227
|
-
import { jsx as
|
|
5335
|
+
import { jsx as jsx65, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
5228
5336
|
var MAX_HEIGHTS = {
|
|
5229
5337
|
sm: "max-h-48",
|
|
5230
5338
|
md: "max-h-72",
|
|
5231
5339
|
lg: "max-h-96"
|
|
5232
5340
|
};
|
|
5233
5341
|
var ClampedList = React47.forwardRef(
|
|
5234
|
-
({ className, label, maxHeight = "md", children, ...props }, ref) => /* @__PURE__ */
|
|
5342
|
+
({ className, label, maxHeight = "md", children, ...props }, ref) => /* @__PURE__ */ jsxs50(
|
|
5235
5343
|
"div",
|
|
5236
5344
|
{
|
|
5237
5345
|
ref,
|
|
@@ -5247,13 +5355,13 @@ var ClampedList = React47.forwardRef(
|
|
|
5247
5355
|
...props,
|
|
5248
5356
|
children: [
|
|
5249
5357
|
children,
|
|
5250
|
-
/* @__PURE__ */
|
|
5358
|
+
/* @__PURE__ */ jsx65(
|
|
5251
5359
|
"div",
|
|
5252
5360
|
{
|
|
5253
5361
|
"aria-hidden": "true",
|
|
5254
5362
|
"data-scroll-hint": "y",
|
|
5255
5363
|
className: SCROLL_HINT_Y_MARK,
|
|
5256
|
-
children: /* @__PURE__ */
|
|
5364
|
+
children: /* @__PURE__ */ jsx65("span", { className: "flex items-center rounded-full border border-border bg-card px-2 text-muted-foreground shadow-sm", children: /* @__PURE__ */ jsx65(Icon, { name: "chevron-down", size: "sm" }) })
|
|
5257
5365
|
}
|
|
5258
5366
|
)
|
|
5259
5367
|
]
|
|
@@ -5264,7 +5372,7 @@ ClampedList.displayName = "ClampedList";
|
|
|
5264
5372
|
|
|
5265
5373
|
// src/textarea.tsx
|
|
5266
5374
|
import * as React48 from "react";
|
|
5267
|
-
import { jsx as
|
|
5375
|
+
import { jsx as jsx66, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
5268
5376
|
var lengthOf = (v) => v === void 0 ? 0 : Array.isArray(v) ? v.join(",").length : String(v).length;
|
|
5269
5377
|
var Textarea = React48.forwardRef(
|
|
5270
5378
|
({
|
|
@@ -5285,7 +5393,7 @@ var Textarea = React48.forwardRef(
|
|
|
5285
5393
|
const [typed, setTyped] = React48.useState(() => lengthOf(defaultValue));
|
|
5286
5394
|
const count = value === void 0 ? typed : lengthOf(value);
|
|
5287
5395
|
const aria = fieldAria(error, errorMessageId);
|
|
5288
|
-
const field = /* @__PURE__ */
|
|
5396
|
+
const field = /* @__PURE__ */ jsx66(
|
|
5289
5397
|
"textarea",
|
|
5290
5398
|
{
|
|
5291
5399
|
ref,
|
|
@@ -5310,9 +5418,9 @@ var Textarea = React48.forwardRef(
|
|
|
5310
5418
|
);
|
|
5311
5419
|
if (!showCount) return field;
|
|
5312
5420
|
const atLimit = maxLength !== void 0 && count >= maxLength;
|
|
5313
|
-
return /* @__PURE__ */
|
|
5421
|
+
return /* @__PURE__ */ jsxs51("div", { className: "w-full min-w-0 space-y-1", children: [
|
|
5314
5422
|
field,
|
|
5315
|
-
/* @__PURE__ */
|
|
5423
|
+
/* @__PURE__ */ jsx66(
|
|
5316
5424
|
"p",
|
|
5317
5425
|
{
|
|
5318
5426
|
id: countId,
|
|
@@ -5330,7 +5438,7 @@ Textarea.displayName = "Textarea";
|
|
|
5330
5438
|
|
|
5331
5439
|
// src/select.tsx
|
|
5332
5440
|
import * as React49 from "react";
|
|
5333
|
-
import { jsx as
|
|
5441
|
+
import { jsx as jsx67, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
5334
5442
|
var CHEVRON_END = {
|
|
5335
5443
|
sm: "right-2.5",
|
|
5336
5444
|
md: "right-3",
|
|
@@ -5359,8 +5467,8 @@ var Select = React49.forwardRef(
|
|
|
5359
5467
|
"Select: pass `options` or `<option>` children, not both"
|
|
5360
5468
|
);
|
|
5361
5469
|
const showsPlaceholder = placeholder !== void 0 && value === void 0 && defaultValue === void 0;
|
|
5362
|
-
return /* @__PURE__ */
|
|
5363
|
-
/* @__PURE__ */
|
|
5470
|
+
return /* @__PURE__ */ jsxs52("div", { className: "relative w-full min-w-0", children: [
|
|
5471
|
+
/* @__PURE__ */ jsxs52(
|
|
5364
5472
|
"select",
|
|
5365
5473
|
{
|
|
5366
5474
|
ref,
|
|
@@ -5377,13 +5485,13 @@ var Select = React49.forwardRef(
|
|
|
5377
5485
|
),
|
|
5378
5486
|
...props,
|
|
5379
5487
|
children: [
|
|
5380
|
-
placeholder !== void 0 && /* @__PURE__ */
|
|
5381
|
-
options?.map((o) => /* @__PURE__ */
|
|
5488
|
+
placeholder !== void 0 && /* @__PURE__ */ jsx67("option", { value: "", disabled: true, hidden: true, children: placeholder }),
|
|
5489
|
+
options?.map((o) => /* @__PURE__ */ jsx67("option", { value: o.value, disabled: o.disabled, children: o.label }, o.value)),
|
|
5382
5490
|
children
|
|
5383
5491
|
]
|
|
5384
5492
|
}
|
|
5385
5493
|
),
|
|
5386
|
-
/* @__PURE__ */
|
|
5494
|
+
/* @__PURE__ */ jsx67(
|
|
5387
5495
|
Icon,
|
|
5388
5496
|
{
|
|
5389
5497
|
name: "chevron-down",
|
|
@@ -5401,7 +5509,7 @@ Select.displayName = "Select";
|
|
|
5401
5509
|
|
|
5402
5510
|
// src/checkbox.tsx
|
|
5403
5511
|
import * as React50 from "react";
|
|
5404
|
-
import { jsx as
|
|
5512
|
+
import { jsx as jsx68, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
5405
5513
|
var BOX = {
|
|
5406
5514
|
sm: "size-4",
|
|
5407
5515
|
md: "size-5"
|
|
@@ -5435,8 +5543,8 @@ var Checkbox = React50.forwardRef(
|
|
|
5435
5543
|
const hasError = Boolean(error);
|
|
5436
5544
|
const message = typeof error === "string" ? error : void 0;
|
|
5437
5545
|
const describedBy = [description ? descId : void 0, message ? errorId : void 0].filter(Boolean).join(" ") || void 0;
|
|
5438
|
-
return /* @__PURE__ */
|
|
5439
|
-
/* @__PURE__ */
|
|
5546
|
+
return /* @__PURE__ */ jsxs53("div", { className: cn("flex items-start gap-2", className), children: [
|
|
5547
|
+
/* @__PURE__ */ jsxs53(
|
|
5440
5548
|
"span",
|
|
5441
5549
|
{
|
|
5442
5550
|
className: cn(
|
|
@@ -5444,7 +5552,7 @@ var Checkbox = React50.forwardRef(
|
|
|
5444
5552
|
size === "sm" ? "mt-0.5" : "mt-px"
|
|
5445
5553
|
),
|
|
5446
5554
|
children: [
|
|
5447
|
-
/* @__PURE__ */
|
|
5555
|
+
/* @__PURE__ */ jsx68(
|
|
5448
5556
|
"input",
|
|
5449
5557
|
{
|
|
5450
5558
|
ref: inner,
|
|
@@ -5471,13 +5579,13 @@ var Checkbox = React50.forwardRef(
|
|
|
5471
5579
|
...props
|
|
5472
5580
|
}
|
|
5473
5581
|
),
|
|
5474
|
-
indeterminate ? /* @__PURE__ */
|
|
5582
|
+
indeterminate ? /* @__PURE__ */ jsx68(
|
|
5475
5583
|
"span",
|
|
5476
5584
|
{
|
|
5477
5585
|
"aria-hidden": "true",
|
|
5478
5586
|
className: "pointer-events-none absolute h-0.5 w-1/2 rounded-full bg-primary-foreground"
|
|
5479
5587
|
}
|
|
5480
|
-
) : /* @__PURE__ */
|
|
5588
|
+
) : /* @__PURE__ */ jsx68(
|
|
5481
5589
|
Icon,
|
|
5482
5590
|
{
|
|
5483
5591
|
name: "check",
|
|
@@ -5488,8 +5596,8 @@ var Checkbox = React50.forwardRef(
|
|
|
5488
5596
|
]
|
|
5489
5597
|
}
|
|
5490
5598
|
),
|
|
5491
|
-
(label || description || message) && /* @__PURE__ */
|
|
5492
|
-
label && /* @__PURE__ */
|
|
5599
|
+
(label || description || message) && /* @__PURE__ */ jsxs53("div", { className: "min-w-0 space-y-0.5", children: [
|
|
5600
|
+
label && /* @__PURE__ */ jsx68(
|
|
5493
5601
|
Label,
|
|
5494
5602
|
{
|
|
5495
5603
|
htmlFor: inputId,
|
|
@@ -5502,8 +5610,8 @@ var Checkbox = React50.forwardRef(
|
|
|
5502
5610
|
children: label
|
|
5503
5611
|
}
|
|
5504
5612
|
),
|
|
5505
|
-
description && /* @__PURE__ */
|
|
5506
|
-
message && /* @__PURE__ */
|
|
5613
|
+
description && /* @__PURE__ */ jsx68("p", { id: descId, className: "text-xs text-muted-foreground", children: description }),
|
|
5614
|
+
message && /* @__PURE__ */ jsx68("p", { id: errorId, className: "text-intent-error-foreground text-xs", children: message })
|
|
5507
5615
|
] })
|
|
5508
5616
|
] });
|
|
5509
5617
|
}
|
|
@@ -5523,7 +5631,7 @@ var CheckboxGroup = React50.forwardRef(
|
|
|
5523
5631
|
...props
|
|
5524
5632
|
}, ref) => {
|
|
5525
5633
|
const errorId = React50.useId();
|
|
5526
|
-
return /* @__PURE__ */
|
|
5634
|
+
return /* @__PURE__ */ jsxs53(
|
|
5527
5635
|
"fieldset",
|
|
5528
5636
|
{
|
|
5529
5637
|
ref,
|
|
@@ -5532,14 +5640,14 @@ var CheckboxGroup = React50.forwardRef(
|
|
|
5532
5640
|
className: cn("min-w-0 space-y-2", className),
|
|
5533
5641
|
...props,
|
|
5534
5642
|
children: [
|
|
5535
|
-
/* @__PURE__ */
|
|
5536
|
-
/* @__PURE__ */
|
|
5643
|
+
/* @__PURE__ */ jsx68("legend", { className: "mb-2 text-sm font-medium text-foreground", children: legend }),
|
|
5644
|
+
/* @__PURE__ */ jsx68(
|
|
5537
5645
|
"div",
|
|
5538
5646
|
{
|
|
5539
5647
|
className: cn(
|
|
5540
5648
|
orientation === "horizontal" ? "flex flex-wrap gap-x-6 gap-y-2" : "space-y-2"
|
|
5541
5649
|
),
|
|
5542
|
-
children: options.map((o) => /* @__PURE__ */
|
|
5650
|
+
children: options.map((o) => /* @__PURE__ */ jsx68(
|
|
5543
5651
|
Checkbox,
|
|
5544
5652
|
{
|
|
5545
5653
|
name,
|
|
@@ -5559,7 +5667,7 @@ var CheckboxGroup = React50.forwardRef(
|
|
|
5559
5667
|
))
|
|
5560
5668
|
}
|
|
5561
5669
|
),
|
|
5562
|
-
error && /* @__PURE__ */
|
|
5670
|
+
error && /* @__PURE__ */ jsx68("p", { id: errorId, className: "text-intent-error-foreground text-sm", children: error })
|
|
5563
5671
|
]
|
|
5564
5672
|
}
|
|
5565
5673
|
);
|
|
@@ -5569,7 +5677,7 @@ CheckboxGroup.displayName = "CheckboxGroup";
|
|
|
5569
5677
|
|
|
5570
5678
|
// src/progress.tsx
|
|
5571
5679
|
import * as React51 from "react";
|
|
5572
|
-
import { jsx as
|
|
5680
|
+
import { jsx as jsx69, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
5573
5681
|
var FILL = {
|
|
5574
5682
|
primary: "bg-primary-solid dark:bg-primary",
|
|
5575
5683
|
success: "bg-intent-success-solid dark:bg-intent-success",
|
|
@@ -5590,9 +5698,9 @@ var Progress = React51.forwardRef(
|
|
|
5590
5698
|
throw new Error(`Progress: value must be within 0\u2013100, got ${value}`);
|
|
5591
5699
|
const labelId = React51.useId();
|
|
5592
5700
|
const shown = Math.round(value ?? 0);
|
|
5593
|
-
return /* @__PURE__ */
|
|
5594
|
-
(label || showValue && value !== void 0) && /* @__PURE__ */
|
|
5595
|
-
label && /* @__PURE__ */
|
|
5701
|
+
return /* @__PURE__ */ jsxs54("div", { ref, className: cn("w-full min-w-0 space-y-1.5", className), children: [
|
|
5702
|
+
(label || showValue && value !== void 0) && /* @__PURE__ */ jsxs54("div", { className: "flex items-baseline justify-between gap-3 text-sm", children: [
|
|
5703
|
+
label && /* @__PURE__ */ jsx69(
|
|
5596
5704
|
"span",
|
|
5597
5705
|
{
|
|
5598
5706
|
id: labelId,
|
|
@@ -5600,12 +5708,12 @@ var Progress = React51.forwardRef(
|
|
|
5600
5708
|
children: label
|
|
5601
5709
|
}
|
|
5602
5710
|
),
|
|
5603
|
-
showValue && value !== void 0 && /* @__PURE__ */
|
|
5711
|
+
showValue && value !== void 0 && /* @__PURE__ */ jsxs54("span", { className: "ml-auto shrink-0 tabular-nums text-muted-foreground", children: [
|
|
5604
5712
|
shown,
|
|
5605
5713
|
"%"
|
|
5606
5714
|
] })
|
|
5607
5715
|
] }),
|
|
5608
|
-
/* @__PURE__ */
|
|
5716
|
+
/* @__PURE__ */ jsx69(
|
|
5609
5717
|
"div",
|
|
5610
5718
|
{
|
|
5611
5719
|
role: "progressbar",
|
|
@@ -5619,7 +5727,7 @@ var Progress = React51.forwardRef(
|
|
|
5619
5727
|
size === "sm" ? "h-1.5" : "h-2.5"
|
|
5620
5728
|
),
|
|
5621
5729
|
...props,
|
|
5622
|
-
children: /* @__PURE__ */
|
|
5730
|
+
children: /* @__PURE__ */ jsx69(
|
|
5623
5731
|
"div",
|
|
5624
5732
|
{
|
|
5625
5733
|
"data-ui-boundary": "",
|