@ship-it-ui/ui 0.0.9 → 0.0.11
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.cjs +1086 -468
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +298 -16
- package/dist/index.d.ts +298 -16
- package/dist/index.js +1060 -443
- package/dist/index.js.map +1 -1
- package/package.json +26 -26
package/dist/index.cjs
CHANGED
|
@@ -105,6 +105,7 @@ __export(index_exports, {
|
|
|
105
105
|
LargeTitle: () => LargeTitle,
|
|
106
106
|
Lightbox: () => Lightbox,
|
|
107
107
|
ListingCard: () => ListingCard,
|
|
108
|
+
ListingDetail: () => ListingDetail,
|
|
108
109
|
MenuCheckboxItem: () => MenuCheckboxItem,
|
|
109
110
|
MenuItem: () => MenuItem,
|
|
110
111
|
MenuSeparator: () => MenuSeparator,
|
|
@@ -3250,27 +3251,36 @@ var Carousel = (0, import_react52.forwardRef)(function Carousel2({
|
|
|
3250
3251
|
aspectRatio = 16 / 10,
|
|
3251
3252
|
showDots = true,
|
|
3252
3253
|
showArrows = true,
|
|
3254
|
+
loop = false,
|
|
3253
3255
|
className,
|
|
3254
3256
|
"aria-label": ariaLabel = "Carousel",
|
|
3255
3257
|
...props
|
|
3256
3258
|
}, ref) {
|
|
3259
|
+
const N = items.length;
|
|
3260
|
+
const isLooping = loop && N > 1;
|
|
3257
3261
|
const [active, setActive] = useControllableState({
|
|
3258
3262
|
value: indexProp,
|
|
3259
3263
|
defaultValue: defaultIndex ?? 0,
|
|
3260
3264
|
onChange: onIndexChange
|
|
3261
3265
|
});
|
|
3262
3266
|
const viewportRef = (0, import_react52.useRef)(null);
|
|
3267
|
+
const internalScrollRef = (0, import_react52.useRef)(false);
|
|
3268
|
+
const activeIdx = active ?? 0;
|
|
3269
|
+
const domIndexFor = (0, import_react52.useCallback)((real) => isLooping ? real + 1 : real, [isLooping]);
|
|
3263
3270
|
const goTo = (0, import_react52.useCallback)(
|
|
3264
3271
|
(i) => {
|
|
3265
|
-
const
|
|
3266
|
-
setActive(
|
|
3272
|
+
const next = isLooping ? (i % N + N) % N : Math.max(0, Math.min(N - 1, i));
|
|
3273
|
+
setActive(next);
|
|
3267
3274
|
const node = viewportRef.current;
|
|
3268
3275
|
if (node) {
|
|
3269
|
-
const slide = node.children[
|
|
3270
|
-
slide
|
|
3276
|
+
const slide = node.children[domIndexFor(next)];
|
|
3277
|
+
if (slide) {
|
|
3278
|
+
internalScrollRef.current = true;
|
|
3279
|
+
slide.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" });
|
|
3280
|
+
}
|
|
3271
3281
|
}
|
|
3272
3282
|
},
|
|
3273
|
-
[
|
|
3283
|
+
[N, isLooping, domIndexFor, setActive]
|
|
3274
3284
|
);
|
|
3275
3285
|
(0, import_react52.useEffect)(() => {
|
|
3276
3286
|
const node = viewportRef.current;
|
|
@@ -3278,13 +3288,59 @@ var Carousel = (0, import_react52.forwardRef)(function Carousel2({
|
|
|
3278
3288
|
const onScroll = () => {
|
|
3279
3289
|
const width = node.clientWidth;
|
|
3280
3290
|
if (width === 0) return;
|
|
3281
|
-
const
|
|
3282
|
-
if (
|
|
3291
|
+
const domIdx = Math.round(node.scrollLeft / width);
|
|
3292
|
+
if (!isLooping) {
|
|
3293
|
+
if (domIdx !== activeIdx) setActive(domIdx);
|
|
3294
|
+
return;
|
|
3295
|
+
}
|
|
3296
|
+
if (domIdx === 0) {
|
|
3297
|
+
const realTwin = node.children[N];
|
|
3298
|
+
if (realTwin) {
|
|
3299
|
+
internalScrollRef.current = true;
|
|
3300
|
+
realTwin.scrollIntoView({ behavior: "instant", block: "nearest", inline: "start" });
|
|
3301
|
+
}
|
|
3302
|
+
if (activeIdx !== N - 1) setActive(N - 1);
|
|
3303
|
+
return;
|
|
3304
|
+
}
|
|
3305
|
+
if (domIdx === N + 1) {
|
|
3306
|
+
const realTwin = node.children[1];
|
|
3307
|
+
if (realTwin) {
|
|
3308
|
+
internalScrollRef.current = true;
|
|
3309
|
+
realTwin.scrollIntoView({ behavior: "instant", block: "nearest", inline: "start" });
|
|
3310
|
+
}
|
|
3311
|
+
if (activeIdx !== 0) setActive(0);
|
|
3312
|
+
return;
|
|
3313
|
+
}
|
|
3314
|
+
const realIdx = domIdx - 1;
|
|
3315
|
+
if (realIdx !== activeIdx) setActive(realIdx);
|
|
3283
3316
|
};
|
|
3284
3317
|
node.addEventListener("scroll", onScroll, { passive: true });
|
|
3285
3318
|
return () => node.removeEventListener("scroll", onScroll);
|
|
3286
|
-
}, [
|
|
3287
|
-
|
|
3319
|
+
}, [activeIdx, isLooping, N, setActive]);
|
|
3320
|
+
(0, import_react52.useEffect)(() => {
|
|
3321
|
+
if (internalScrollRef.current) {
|
|
3322
|
+
internalScrollRef.current = false;
|
|
3323
|
+
return;
|
|
3324
|
+
}
|
|
3325
|
+
const node = viewportRef.current;
|
|
3326
|
+
if (!node) return;
|
|
3327
|
+
const width = node.clientWidth;
|
|
3328
|
+
if (width === 0) return;
|
|
3329
|
+
const targetDom = domIndexFor(activeIdx);
|
|
3330
|
+
const currentDom = Math.round(node.scrollLeft / width);
|
|
3331
|
+
if (currentDom === targetDom) return;
|
|
3332
|
+
const slide = node.children[targetDom];
|
|
3333
|
+
slide?.scrollIntoView({ behavior: "instant", block: "nearest", inline: "start" });
|
|
3334
|
+
}, [activeIdx, domIndexFor]);
|
|
3335
|
+
(0, import_react52.useLayoutEffect)(() => {
|
|
3336
|
+
if (!isLooping) return;
|
|
3337
|
+
const node = viewportRef.current;
|
|
3338
|
+
if (!node) return;
|
|
3339
|
+
const slide = node.children[domIndexFor(activeIdx)];
|
|
3340
|
+
if (!slide) return;
|
|
3341
|
+
internalScrollRef.current = true;
|
|
3342
|
+
slide.scrollIntoView({ behavior: "instant", block: "nearest", inline: "start" });
|
|
3343
|
+
}, [isLooping]);
|
|
3288
3344
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3289
3345
|
"div",
|
|
3290
3346
|
{
|
|
@@ -3296,34 +3352,58 @@ var Carousel = (0, import_react52.forwardRef)(function Carousel2({
|
|
|
3296
3352
|
...props,
|
|
3297
3353
|
children: [
|
|
3298
3354
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative overflow-hidden rounded-md", children: [
|
|
3299
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.
|
|
3355
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3300
3356
|
"div",
|
|
3301
3357
|
{
|
|
3302
3358
|
ref: viewportRef,
|
|
3303
3359
|
className: "flex w-full snap-x snap-mandatory overflow-x-auto scroll-smooth [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
3304
3360
|
"aria-live": "polite",
|
|
3305
|
-
children:
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3361
|
+
children: [
|
|
3362
|
+
isLooping && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3363
|
+
"div",
|
|
3364
|
+
{
|
|
3365
|
+
"aria-hidden": "true",
|
|
3366
|
+
tabIndex: -1,
|
|
3367
|
+
className: "w-full shrink-0 snap-start",
|
|
3368
|
+
style: { aspectRatio: String(aspectRatio) },
|
|
3369
|
+
children: renderItem(items[N - 1], N - 1)
|
|
3370
|
+
},
|
|
3371
|
+
"clone-start"
|
|
3372
|
+
),
|
|
3373
|
+
items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3374
|
+
"div",
|
|
3375
|
+
{
|
|
3376
|
+
className: "w-full shrink-0 snap-start",
|
|
3377
|
+
style: { aspectRatio: String(aspectRatio) },
|
|
3378
|
+
role: "group",
|
|
3379
|
+
"aria-roledescription": "slide",
|
|
3380
|
+
"aria-label": `${i + 1} of ${N}`,
|
|
3381
|
+
children: renderItem(item, i)
|
|
3382
|
+
},
|
|
3383
|
+
i
|
|
3384
|
+
)),
|
|
3385
|
+
isLooping && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3386
|
+
"div",
|
|
3387
|
+
{
|
|
3388
|
+
"aria-hidden": "true",
|
|
3389
|
+
tabIndex: -1,
|
|
3390
|
+
className: "w-full shrink-0 snap-start",
|
|
3391
|
+
style: { aspectRatio: String(aspectRatio) },
|
|
3392
|
+
children: renderItem(items[0], 0)
|
|
3393
|
+
},
|
|
3394
|
+
"clone-end"
|
|
3395
|
+
)
|
|
3396
|
+
]
|
|
3317
3397
|
}
|
|
3318
3398
|
),
|
|
3319
|
-
showArrows &&
|
|
3399
|
+
showArrows && N > 1 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
|
3320
3400
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3321
3401
|
"button",
|
|
3322
3402
|
{
|
|
3323
3403
|
type: "button",
|
|
3324
3404
|
"aria-label": "Previous slide",
|
|
3325
3405
|
onClick: () => goTo(activeIdx - 1),
|
|
3326
|
-
disabled: activeIdx === 0,
|
|
3406
|
+
disabled: !isLooping && activeIdx === 0,
|
|
3327
3407
|
className: "bg-panel/85 border-border text-text hover:bg-panel absolute top-1/2 left-2 inline-grid h-9 w-9 -translate-y-1/2 cursor-pointer place-items-center rounded-full border shadow-md backdrop-blur disabled:cursor-not-allowed disabled:opacity-40",
|
|
3328
3408
|
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_icons5.IconGlyph, { name: "caretLeft", size: 16 })
|
|
3329
3409
|
}
|
|
@@ -3334,13 +3414,13 @@ var Carousel = (0, import_react52.forwardRef)(function Carousel2({
|
|
|
3334
3414
|
type: "button",
|
|
3335
3415
|
"aria-label": "Next slide",
|
|
3336
3416
|
onClick: () => goTo(activeIdx + 1),
|
|
3337
|
-
disabled: activeIdx ===
|
|
3417
|
+
disabled: !isLooping && activeIdx === N - 1,
|
|
3338
3418
|
className: "bg-panel/85 border-border text-text hover:bg-panel absolute top-1/2 right-2 inline-grid h-9 w-9 -translate-y-1/2 cursor-pointer place-items-center rounded-full border shadow-md backdrop-blur disabled:cursor-not-allowed disabled:opacity-40",
|
|
3339
3419
|
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_icons5.IconGlyph, { name: "caretRight", size: 16 })
|
|
3340
3420
|
}
|
|
3341
3421
|
)
|
|
3342
3422
|
] }),
|
|
3343
|
-
showDots &&
|
|
3423
|
+
showDots && N > 1 && /*
|
|
3344
3424
|
* Plain `<button>` + `aria-current` rather than the tabs pattern
|
|
3345
3425
|
* (`role="tablist" / "tab"`). The APG carousel pattern recommends
|
|
3346
3426
|
* this lighter semantic; the viewport's `aria-live="polite"`
|
|
@@ -4400,19 +4480,28 @@ var Lightbox = (0, import_react59.forwardRef)(function Lightbox2({
|
|
|
4400
4480
|
index,
|
|
4401
4481
|
defaultIndex,
|
|
4402
4482
|
onIndexChange,
|
|
4483
|
+
loop = false,
|
|
4403
4484
|
title = "Photo viewer"
|
|
4404
4485
|
}, ref) {
|
|
4486
|
+
const N = items.length;
|
|
4487
|
+
const isLooping = loop && N > 1;
|
|
4405
4488
|
const [active, setActive] = useControllableState({
|
|
4406
4489
|
value: index,
|
|
4407
4490
|
defaultValue: defaultIndex ?? 0,
|
|
4408
4491
|
onChange: onIndexChange
|
|
4409
4492
|
});
|
|
4410
4493
|
const goPrev = (0, import_react59.useCallback)(() => {
|
|
4411
|
-
setActive((prev) =>
|
|
4412
|
-
|
|
4494
|
+
setActive((prev) => {
|
|
4495
|
+
const p = prev ?? 0;
|
|
4496
|
+
return isLooping ? (p - 1 + N) % N : Math.max(0, p - 1);
|
|
4497
|
+
});
|
|
4498
|
+
}, [setActive, isLooping, N]);
|
|
4413
4499
|
const goNext = (0, import_react59.useCallback)(() => {
|
|
4414
|
-
setActive((prev) =>
|
|
4415
|
-
|
|
4500
|
+
setActive((prev) => {
|
|
4501
|
+
const p = prev ?? 0;
|
|
4502
|
+
return isLooping ? (p + 1) % N : Math.min(N - 1, p + 1);
|
|
4503
|
+
});
|
|
4504
|
+
}, [setActive, isLooping, N]);
|
|
4416
4505
|
const onKey = (0, import_react59.useCallback)(
|
|
4417
4506
|
(e) => {
|
|
4418
4507
|
if (e.key === "ArrowLeft") {
|
|
@@ -4452,7 +4541,7 @@ var Lightbox = (0, import_react59.forwardRef)(function Lightbox2({
|
|
|
4452
4541
|
type: "button",
|
|
4453
4542
|
"aria-label": "Previous photo",
|
|
4454
4543
|
onClick: goPrev,
|
|
4455
|
-
disabled: activeIdx === 0,
|
|
4544
|
+
disabled: !isLooping && activeIdx === 0,
|
|
4456
4545
|
className: "absolute top-1/2 left-4 inline-grid h-11 w-11 -translate-y-1/2 cursor-pointer place-items-center rounded-full bg-white/10 text-white hover:bg-white/20 disabled:cursor-not-allowed disabled:opacity-40",
|
|
4457
4546
|
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons7.IconGlyph, { name: "caretLeft", size: 20 })
|
|
4458
4547
|
}
|
|
@@ -4463,7 +4552,7 @@ var Lightbox = (0, import_react59.forwardRef)(function Lightbox2({
|
|
|
4463
4552
|
type: "button",
|
|
4464
4553
|
"aria-label": "Next photo",
|
|
4465
4554
|
onClick: goNext,
|
|
4466
|
-
disabled: activeIdx ===
|
|
4555
|
+
disabled: !isLooping && activeIdx === N - 1,
|
|
4467
4556
|
className: "absolute top-1/2 right-4 inline-grid h-11 w-11 -translate-y-1/2 cursor-pointer place-items-center rounded-full bg-white/10 text-white hover:bg-white/20 disabled:cursor-not-allowed disabled:opacity-40",
|
|
4468
4557
|
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons7.IconGlyph, { name: "caretRight", size: 20 })
|
|
4469
4558
|
}
|
|
@@ -4493,10 +4582,32 @@ Lightbox.displayName = "Lightbox";
|
|
|
4493
4582
|
|
|
4494
4583
|
// src/patterns/ListingCard/ListingCard.tsx
|
|
4495
4584
|
var import_icons8 = require("@ship-it-ui/icons");
|
|
4585
|
+
var import_class_variance_authority11 = require("class-variance-authority");
|
|
4496
4586
|
var import_react60 = require("react");
|
|
4497
4587
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4588
|
+
var hoverVariants = (0, import_class_variance_authority11.cva)("", {
|
|
4589
|
+
variants: {
|
|
4590
|
+
hoverEffect: {
|
|
4591
|
+
lift: "transition-[transform,box-shadow,border-color] duration-(--duration-micro) hover:-translate-y-px hover:shadow hover:border-border-strong",
|
|
4592
|
+
glow: "transition-[box-shadow,border-color] duration-(--duration-micro) hover:ring-[3px] hover:ring-accent-dim hover:border-accent",
|
|
4593
|
+
none: ""
|
|
4594
|
+
}
|
|
4595
|
+
}
|
|
4596
|
+
});
|
|
4597
|
+
var flagToneClass = {
|
|
4598
|
+
accent: "bg-accent-dim text-accent",
|
|
4599
|
+
purple: "bg-[color-mix(in_oklab,var(--color-purple),transparent_75%)] text-purple",
|
|
4600
|
+
pink: "bg-[color-mix(in_oklab,var(--color-pink),transparent_75%)] text-pink",
|
|
4601
|
+
ok: "bg-[color-mix(in_oklab,var(--color-ok),transparent_75%)] text-ok",
|
|
4602
|
+
warn: "bg-[color-mix(in_oklab,var(--color-warn),transparent_75%)] text-warn"
|
|
4603
|
+
};
|
|
4498
4604
|
var ListingCard = (0, import_react60.forwardRef)(function ListingCard2({
|
|
4605
|
+
variant = "default",
|
|
4499
4606
|
photos,
|
|
4607
|
+
renderPhoto,
|
|
4608
|
+
loop = true,
|
|
4609
|
+
onClick,
|
|
4610
|
+
hoverEffect,
|
|
4500
4611
|
title,
|
|
4501
4612
|
eyebrow,
|
|
4502
4613
|
rating,
|
|
@@ -4504,31 +4615,51 @@ var ListingCard = (0, import_react60.forwardRef)(function ListingCard2({
|
|
|
4504
4615
|
price,
|
|
4505
4616
|
priceUnit = "/day",
|
|
4506
4617
|
originalPrice,
|
|
4618
|
+
pricePrefix,
|
|
4507
4619
|
host,
|
|
4508
4620
|
distance,
|
|
4509
4621
|
verified,
|
|
4510
4622
|
href,
|
|
4511
4623
|
onFavorite,
|
|
4512
4624
|
favorited,
|
|
4513
|
-
width = 280,
|
|
4625
|
+
width = variant === "spec" ? 320 : 280,
|
|
4626
|
+
flag,
|
|
4627
|
+
category,
|
|
4628
|
+
meta,
|
|
4629
|
+
specs,
|
|
4630
|
+
cta,
|
|
4631
|
+
hidePhotoCounter,
|
|
4632
|
+
classNames: cls = {},
|
|
4514
4633
|
className,
|
|
4515
4634
|
...props
|
|
4516
4635
|
}, ref) {
|
|
4636
|
+
const [photoIndex, setPhotoIndex] = (0, import_react60.useState)(0);
|
|
4637
|
+
const isSpec = variant === "spec";
|
|
4638
|
+
const stretchedLinkSupported = !isSpec || !cta && !!href;
|
|
4639
|
+
const isInteractive = Boolean(onClick) || Boolean(href);
|
|
4640
|
+
const effectiveHover = hoverEffect ?? (isInteractive ? "lift" : "none");
|
|
4641
|
+
const hoverClass = hoverVariants({ hoverEffect: effectiveHover });
|
|
4517
4642
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
4518
4643
|
Card,
|
|
4519
4644
|
{
|
|
4520
4645
|
ref,
|
|
4521
|
-
className: cn("relative overflow-hidden !p-0", className),
|
|
4646
|
+
className: cn("relative isolate overflow-hidden !p-0", hoverClass, cls.root, className),
|
|
4522
4647
|
style: { width },
|
|
4523
4648
|
...props,
|
|
4524
4649
|
children: [
|
|
4525
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "relative", children: [
|
|
4650
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("relative", cls.photos), children: [
|
|
4526
4651
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4527
4652
|
Carousel,
|
|
4528
4653
|
{
|
|
4529
4654
|
items: photos,
|
|
4655
|
+
loop,
|
|
4656
|
+
...isSpec ? {
|
|
4657
|
+
index: photoIndex,
|
|
4658
|
+
onIndexChange: setPhotoIndex,
|
|
4659
|
+
showDots: false
|
|
4660
|
+
} : {},
|
|
4530
4661
|
"aria-label": typeof title === "string" ? `${title} photos` : "Listing photos",
|
|
4531
|
-
renderItem: (src) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4662
|
+
renderItem: (src, i) => renderPhoto ? renderPhoto(src, i) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4532
4663
|
"img",
|
|
4533
4664
|
{
|
|
4534
4665
|
src,
|
|
@@ -4539,15 +4670,133 @@ var ListingCard = (0, import_react60.forwardRef)(function ListingCard2({
|
|
|
4539
4670
|
)
|
|
4540
4671
|
}
|
|
4541
4672
|
),
|
|
4542
|
-
verified && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "pointer-events-none absolute top-3 left-3 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Badge, { variant: "ok", size: "sm", children: [
|
|
4673
|
+
!isSpec && verified && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "pointer-events-none absolute top-3 left-3 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Badge, { variant: "ok", size: "sm", children: [
|
|
4543
4674
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons8.IconGlyph, { name: "verified", size: 11 }),
|
|
4544
4675
|
" Verified host"
|
|
4545
|
-
] }) })
|
|
4676
|
+
] }) }),
|
|
4677
|
+
isSpec && flag && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "pointer-events-none absolute top-3 left-3 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
4678
|
+
"span",
|
|
4679
|
+
{
|
|
4680
|
+
className: cn(
|
|
4681
|
+
"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-medium backdrop-blur",
|
|
4682
|
+
flagToneClass[flag.tone ?? "accent"],
|
|
4683
|
+
cls.flag
|
|
4684
|
+
),
|
|
4685
|
+
children: [
|
|
4686
|
+
flag.icon && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons8.IconGlyph, { name: flag.icon, size: 11 }),
|
|
4687
|
+
flag.label
|
|
4688
|
+
]
|
|
4689
|
+
}
|
|
4690
|
+
) }),
|
|
4691
|
+
isSpec && !hidePhotoCounter && photos.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
4692
|
+
"div",
|
|
4693
|
+
{
|
|
4694
|
+
"aria-hidden": true,
|
|
4695
|
+
className: cn(
|
|
4696
|
+
"pointer-events-none absolute top-3 right-3 z-10 rounded-full bg-black/55 px-2.5 py-1 font-mono text-[11px] text-white backdrop-blur",
|
|
4697
|
+
cls.photoCounter
|
|
4698
|
+
),
|
|
4699
|
+
children: [
|
|
4700
|
+
photoIndex + 1,
|
|
4701
|
+
" / ",
|
|
4702
|
+
photos.length
|
|
4703
|
+
]
|
|
4704
|
+
}
|
|
4705
|
+
)
|
|
4546
4706
|
] }),
|
|
4547
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4707
|
+
isSpec ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("flex flex-col", cls.body), children: [
|
|
4708
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("flex flex-col gap-2 p-4 pb-3", cls.header), children: [
|
|
4709
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
|
|
4710
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: cn("text-text text-[15px] leading-snug font-semibold", cls.title), children: title }),
|
|
4711
|
+
category && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4712
|
+
"span",
|
|
4713
|
+
{
|
|
4714
|
+
className: cn(
|
|
4715
|
+
"border-border bg-panel-2 text-text-muted shrink-0 rounded-full border px-2 py-0.5 text-[10px] tracking-wide uppercase",
|
|
4716
|
+
cls.category
|
|
4717
|
+
),
|
|
4718
|
+
children: category
|
|
4719
|
+
}
|
|
4720
|
+
)
|
|
4721
|
+
] }),
|
|
4722
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: cn("text-text-dim font-mono text-[11px] tracking-wide", cls.meta), children: meta }),
|
|
4723
|
+
specs && specs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4724
|
+
"dl",
|
|
4725
|
+
{
|
|
4726
|
+
className: cn(
|
|
4727
|
+
"border-border mt-1 grid gap-2 border-t pt-3",
|
|
4728
|
+
specs.length === 2 && "grid-cols-2",
|
|
4729
|
+
specs.length === 3 && "grid-cols-3",
|
|
4730
|
+
specs.length >= 4 && "grid-cols-4",
|
|
4731
|
+
cls.specs
|
|
4732
|
+
),
|
|
4733
|
+
children: specs.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("flex flex-col gap-0.5", cls.specCell), children: [
|
|
4734
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4735
|
+
"dt",
|
|
4736
|
+
{
|
|
4737
|
+
className: cn(
|
|
4738
|
+
"text-text-dim text-[10px] tracking-wider uppercase",
|
|
4739
|
+
cls.specLabel
|
|
4740
|
+
),
|
|
4741
|
+
children: s.label
|
|
4742
|
+
}
|
|
4743
|
+
),
|
|
4744
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("dd", { className: cn("text-text text-[13px] font-medium", cls.specValue), children: s.value })
|
|
4745
|
+
] }, i))
|
|
4746
|
+
}
|
|
4747
|
+
)
|
|
4748
|
+
] }),
|
|
4749
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
4750
|
+
"div",
|
|
4751
|
+
{
|
|
4752
|
+
className: cn(
|
|
4753
|
+
"border-border bg-panel-2 relative z-10 flex items-center justify-between gap-2 border-t px-4 py-3",
|
|
4754
|
+
cls.footer
|
|
4755
|
+
),
|
|
4756
|
+
children: [
|
|
4757
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex flex-col leading-tight", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-baseline gap-1.5", children: [
|
|
4758
|
+
pricePrefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-text-dim text-[11px]", children: pricePrefix }),
|
|
4759
|
+
originalPrice && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-text-dim decoration-sale text-[11px] line-through", children: originalPrice }),
|
|
4760
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: cn("text-text text-[15px] font-semibold", cls.price), children: price }),
|
|
4761
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: cn("text-text-dim text-[11px]", cls.priceUnit), children: priceUnit })
|
|
4762
|
+
] }) }),
|
|
4763
|
+
cta && (cta.href ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4764
|
+
Button,
|
|
4765
|
+
{
|
|
4766
|
+
asChild: true,
|
|
4767
|
+
variant: "primary",
|
|
4768
|
+
size: "sm",
|
|
4769
|
+
disabled: cta.disabled,
|
|
4770
|
+
className: cls.cta,
|
|
4771
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("a", { href: cta.href, onClick: cta.onClick, children: cta.label })
|
|
4772
|
+
}
|
|
4773
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4774
|
+
Button,
|
|
4775
|
+
{
|
|
4776
|
+
variant: "primary",
|
|
4777
|
+
size: "sm",
|
|
4778
|
+
onClick: cta.onClick,
|
|
4779
|
+
disabled: cta.disabled,
|
|
4780
|
+
className: cls.cta,
|
|
4781
|
+
children: cta.label
|
|
4782
|
+
}
|
|
4783
|
+
))
|
|
4784
|
+
]
|
|
4785
|
+
}
|
|
4786
|
+
)
|
|
4787
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("flex flex-col gap-1 p-3", cls.body), children: [
|
|
4788
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4789
|
+
"span",
|
|
4790
|
+
{
|
|
4791
|
+
className: cn(
|
|
4792
|
+
"text-text-dim font-mono text-[10px] tracking-wide uppercase",
|
|
4793
|
+
cls.eyebrow
|
|
4794
|
+
),
|
|
4795
|
+
children: eyebrow
|
|
4796
|
+
}
|
|
4797
|
+
),
|
|
4798
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("flex items-start justify-between gap-2", cls.header), children: [
|
|
4799
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: cn("text-text text-[14px] leading-snug font-semibold", cls.title), children: title }),
|
|
4551
4800
|
rating !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: "inline-flex shrink-0 items-center gap-1 text-[12px]", children: [
|
|
4552
4801
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons8.IconGlyph, { name: "star", size: 12, className: "text-rating" }),
|
|
4553
4802
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-text font-medium", children: rating.toFixed(1) }),
|
|
@@ -4558,19 +4807,29 @@ var ListingCard = (0, import_react60.forwardRef)(function ListingCard2({
|
|
|
4558
4807
|
] })
|
|
4559
4808
|
] })
|
|
4560
4809
|
] }),
|
|
4561
|
-
(host || distance) && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "text-text-dim flex items-center gap-2 text-[12px]", children: [
|
|
4810
|
+
(host || distance) && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("text-text-dim flex items-center gap-2 text-[12px]", cls.meta), children: [
|
|
4562
4811
|
host && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: host }),
|
|
4563
4812
|
host && distance && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { "aria-hidden": true, children: "\xB7" }),
|
|
4564
4813
|
distance && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: distance })
|
|
4565
4814
|
] }),
|
|
4566
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "mt-2 flex items-baseline gap-2", children: [
|
|
4815
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("mt-2 flex items-baseline gap-2", cls.footer), children: [
|
|
4567
4816
|
originalPrice && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-text-dim decoration-sale text-[12px] line-through", children: originalPrice }),
|
|
4568
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-text text-[15px] font-semibold", children: price }),
|
|
4569
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-text-dim text-[12px]", children: priceUnit })
|
|
4817
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: cn("text-text text-[15px] font-semibold", cls.price), children: price }),
|
|
4818
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: cn("text-text-dim text-[12px]", cls.priceUnit), children: priceUnit })
|
|
4570
4819
|
] }),
|
|
4571
|
-
rating !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4820
|
+
rating !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4821
|
+
Rating,
|
|
4822
|
+
{
|
|
4823
|
+
value: rating,
|
|
4824
|
+
max: 5,
|
|
4825
|
+
precision: "half",
|
|
4826
|
+
size: "sm",
|
|
4827
|
+
readOnly: true,
|
|
4828
|
+
className: "sr-only"
|
|
4829
|
+
}
|
|
4830
|
+
)
|
|
4572
4831
|
] }),
|
|
4573
|
-
href && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4832
|
+
href && stretchedLinkSupported && !onClick && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4574
4833
|
"a",
|
|
4575
4834
|
{
|
|
4576
4835
|
href,
|
|
@@ -4578,7 +4837,16 @@ var ListingCard = (0, import_react60.forwardRef)(function ListingCard2({
|
|
|
4578
4837
|
className: "absolute inset-0 z-0 no-underline"
|
|
4579
4838
|
}
|
|
4580
4839
|
),
|
|
4581
|
-
|
|
4840
|
+
onClick && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4841
|
+
"button",
|
|
4842
|
+
{
|
|
4843
|
+
type: "button",
|
|
4844
|
+
onClick,
|
|
4845
|
+
"aria-label": typeof title === "string" ? `View ${title}` : "View listing",
|
|
4846
|
+
className: "focus-visible:ring-accent-dim absolute inset-0 z-0 cursor-pointer bg-transparent outline-none focus-visible:ring-[3px]"
|
|
4847
|
+
}
|
|
4848
|
+
),
|
|
4849
|
+
!isSpec && onFavorite && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4582
4850
|
"button",
|
|
4583
4851
|
{
|
|
4584
4852
|
type: "button",
|
|
@@ -4588,7 +4856,8 @@ var ListingCard = (0, import_react60.forwardRef)(function ListingCard2({
|
|
|
4588
4856
|
className: cn(
|
|
4589
4857
|
"absolute top-3 right-3 z-20 inline-grid h-8 w-8 cursor-pointer place-items-center rounded-full",
|
|
4590
4858
|
"bg-panel/85 hover:bg-panel border-border border shadow-sm backdrop-blur",
|
|
4591
|
-
favorited ? "text-err" : "text-text-dim hover:text-text"
|
|
4859
|
+
favorited ? "text-err" : "text-text-dim hover:text-text",
|
|
4860
|
+
cls.favorite
|
|
4592
4861
|
),
|
|
4593
4862
|
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons8.IconGlyph, { name: "heart", size: 16 })
|
|
4594
4863
|
}
|
|
@@ -4599,8 +4868,358 @@ var ListingCard = (0, import_react60.forwardRef)(function ListingCard2({
|
|
|
4599
4868
|
});
|
|
4600
4869
|
ListingCard.displayName = "ListingCard";
|
|
4601
4870
|
|
|
4602
|
-
// src/patterns/
|
|
4871
|
+
// src/patterns/ListingDetail/ListingDetail.tsx
|
|
4872
|
+
var RadixDialog6 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
4873
|
+
var import_icons9 = require("@ship-it-ui/icons");
|
|
4603
4874
|
var import_react61 = require("react");
|
|
4875
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4876
|
+
function renderAction(action, variant) {
|
|
4877
|
+
if (action.href) {
|
|
4878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Button, { asChild: true, variant, disabled: action.disabled, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("a", { href: action.href, onClick: action.onClick, children: action.label }) });
|
|
4879
|
+
}
|
|
4880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Button, { variant, onClick: action.onClick, disabled: action.disabled, children: action.label });
|
|
4881
|
+
}
|
|
4882
|
+
var flagToneClass2 = {
|
|
4883
|
+
accent: "bg-accent-dim text-accent",
|
|
4884
|
+
purple: "bg-[color-mix(in_oklab,var(--color-purple),transparent_75%)] text-purple",
|
|
4885
|
+
pink: "bg-[color-mix(in_oklab,var(--color-pink),transparent_75%)] text-pink",
|
|
4886
|
+
ok: "bg-[color-mix(in_oklab,var(--color-ok),transparent_75%)] text-ok",
|
|
4887
|
+
warn: "bg-[color-mix(in_oklab,var(--color-warn),transparent_75%)] text-warn"
|
|
4888
|
+
};
|
|
4889
|
+
var ListingDetail = (0, import_react61.forwardRef)(function ListingDetail2({
|
|
4890
|
+
variant = "default",
|
|
4891
|
+
open,
|
|
4892
|
+
defaultOpen,
|
|
4893
|
+
onOpenChange,
|
|
4894
|
+
photos,
|
|
4895
|
+
renderPhoto,
|
|
4896
|
+
loop = true,
|
|
4897
|
+
title,
|
|
4898
|
+
eyebrow,
|
|
4899
|
+
description,
|
|
4900
|
+
rating,
|
|
4901
|
+
reviewCount,
|
|
4902
|
+
price,
|
|
4903
|
+
priceUnit = "/day",
|
|
4904
|
+
originalPrice,
|
|
4905
|
+
pricePrefix,
|
|
4906
|
+
host,
|
|
4907
|
+
features,
|
|
4908
|
+
primaryAction,
|
|
4909
|
+
secondaryAction,
|
|
4910
|
+
flag,
|
|
4911
|
+
category,
|
|
4912
|
+
meta,
|
|
4913
|
+
specs,
|
|
4914
|
+
cta,
|
|
4915
|
+
hidePhotoCounter,
|
|
4916
|
+
classNames: cls = {}
|
|
4917
|
+
}, ref) {
|
|
4918
|
+
const [galleryIndex, setGalleryIndex] = (0, import_react61.useState)(0);
|
|
4919
|
+
const [lightboxOpen, setLightboxOpen] = (0, import_react61.useState)(false);
|
|
4920
|
+
const isSpec = variant === "spec";
|
|
4921
|
+
const lightboxTitle = typeof title === "string" ? `${title} photos` : "Listing photos";
|
|
4922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(RadixDialog6.Root, { open, defaultOpen, onOpenChange, children: [
|
|
4923
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(RadixDialog6.Portal, { children: [
|
|
4924
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4925
|
+
RadixDialog6.Overlay,
|
|
4926
|
+
{
|
|
4927
|
+
className: cn(
|
|
4928
|
+
"z-overlay fixed inset-0 bg-black/55 backdrop-blur-[4px]",
|
|
4929
|
+
"data-[state=open]:animate-[ship-fade-in_150ms_ease]",
|
|
4930
|
+
cls.overlay
|
|
4931
|
+
)
|
|
4932
|
+
}
|
|
4933
|
+
),
|
|
4934
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
4935
|
+
RadixDialog6.Content,
|
|
4936
|
+
{
|
|
4937
|
+
ref,
|
|
4938
|
+
...description ? {} : { "aria-describedby": void 0 },
|
|
4939
|
+
className: cn(
|
|
4940
|
+
"z-modal fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
4941
|
+
"w-[calc(100%-32px)] max-w-[960px]",
|
|
4942
|
+
"max-h-[min(92vh,820px)] overflow-hidden",
|
|
4943
|
+
"bg-panel border-border-strong rounded-lg border shadow-lg outline-none",
|
|
4944
|
+
"data-[state=open]:animate-[ship-dialog-in_180ms_var(--easing-out)]",
|
|
4945
|
+
"flex flex-col",
|
|
4946
|
+
cls.content
|
|
4947
|
+
),
|
|
4948
|
+
children: [
|
|
4949
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
4950
|
+
"div",
|
|
4951
|
+
{
|
|
4952
|
+
className: cn(
|
|
4953
|
+
"grid grid-cols-1 gap-6 overflow-y-auto p-6 md:grid-cols-[1.1fr_1fr]",
|
|
4954
|
+
isSpec && cta && "pb-4",
|
|
4955
|
+
cls.grid
|
|
4956
|
+
),
|
|
4957
|
+
children: [
|
|
4958
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn("flex flex-col gap-3", cls.photos), children: [
|
|
4959
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "relative overflow-hidden rounded-md", children: [
|
|
4960
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4961
|
+
Carousel,
|
|
4962
|
+
{
|
|
4963
|
+
items: photos,
|
|
4964
|
+
index: galleryIndex,
|
|
4965
|
+
onIndexChange: setGalleryIndex,
|
|
4966
|
+
loop,
|
|
4967
|
+
...isSpec ? { showDots: false } : {},
|
|
4968
|
+
"aria-label": typeof title === "string" ? `${title} photos` : "Listing photos",
|
|
4969
|
+
renderItem: (src, i) => renderPhoto ? renderPhoto(src, i, "gallery") : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4970
|
+
"img",
|
|
4971
|
+
{
|
|
4972
|
+
src,
|
|
4973
|
+
alt: "",
|
|
4974
|
+
className: "block h-full w-full object-cover",
|
|
4975
|
+
loading: "lazy"
|
|
4976
|
+
}
|
|
4977
|
+
)
|
|
4978
|
+
}
|
|
4979
|
+
),
|
|
4980
|
+
isSpec && flag ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "pointer-events-none absolute top-3 left-3 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
4981
|
+
"span",
|
|
4982
|
+
{
|
|
4983
|
+
className: cn(
|
|
4984
|
+
"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-medium backdrop-blur",
|
|
4985
|
+
flagToneClass2[flag.tone ?? "accent"],
|
|
4986
|
+
cls.flag
|
|
4987
|
+
),
|
|
4988
|
+
children: [
|
|
4989
|
+
flag.icon && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_icons9.IconGlyph, { name: flag.icon, size: 11 }),
|
|
4990
|
+
flag.label
|
|
4991
|
+
]
|
|
4992
|
+
}
|
|
4993
|
+
) }) : null,
|
|
4994
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4995
|
+
"button",
|
|
4996
|
+
{
|
|
4997
|
+
type: "button",
|
|
4998
|
+
onClick: () => setLightboxOpen(true),
|
|
4999
|
+
"aria-label": "Open photo viewer",
|
|
5000
|
+
className: cn(
|
|
5001
|
+
"bg-panel/85 hover:bg-panel border-border text-text-muted hover:text-text focus-visible:ring-accent-dim absolute z-10 inline-grid h-8 w-8 cursor-pointer place-items-center rounded-full border shadow-sm backdrop-blur outline-none focus-visible:ring-[3px]",
|
|
5002
|
+
isSpec ? "right-3 bottom-3" : "top-3 left-3"
|
|
5003
|
+
),
|
|
5004
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_icons9.IconGlyph, { name: "maximize", size: 14 })
|
|
5005
|
+
}
|
|
5006
|
+
),
|
|
5007
|
+
isSpec && !hidePhotoCounter && photos.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
5008
|
+
"div",
|
|
5009
|
+
{
|
|
5010
|
+
"aria-hidden": true,
|
|
5011
|
+
className: cn(
|
|
5012
|
+
"pointer-events-none absolute top-3 right-3 z-10 rounded-full bg-black/55 px-2.5 py-1 font-mono text-[11px] text-white backdrop-blur",
|
|
5013
|
+
cls.photoCounter
|
|
5014
|
+
),
|
|
5015
|
+
children: [
|
|
5016
|
+
galleryIndex + 1,
|
|
5017
|
+
" / ",
|
|
5018
|
+
photos.length
|
|
5019
|
+
]
|
|
5020
|
+
}
|
|
5021
|
+
)
|
|
5022
|
+
] }),
|
|
5023
|
+
!isSpec && features && features.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("ul", { className: cn("flex flex-wrap gap-2", cls.features), children: features.map((f, i) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
5024
|
+
"li",
|
|
5025
|
+
{
|
|
5026
|
+
className: "border-border bg-panel-2 text-text-muted inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[12px]",
|
|
5027
|
+
children: [
|
|
5028
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_icons9.IconGlyph, { name: f.icon, size: 12 }),
|
|
5029
|
+
f.label
|
|
5030
|
+
]
|
|
5031
|
+
},
|
|
5032
|
+
i
|
|
5033
|
+
)) })
|
|
5034
|
+
] }),
|
|
5035
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn("flex flex-col gap-4", cls.info), children: [
|
|
5036
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("header", { className: cn("flex flex-col gap-1.5", cls.header), children: [
|
|
5037
|
+
eyebrow && !isSpec && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-text-dim font-mono text-[10px] tracking-wide uppercase", children: eyebrow }),
|
|
5038
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
5039
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixDialog6.Title, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5040
|
+
"h2",
|
|
5041
|
+
{
|
|
5042
|
+
className: cn("text-text text-[22px] leading-tight font-semibold", cls.title),
|
|
5043
|
+
children: title
|
|
5044
|
+
}
|
|
5045
|
+
) }),
|
|
5046
|
+
isSpec && category && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5047
|
+
"span",
|
|
5048
|
+
{
|
|
5049
|
+
className: cn(
|
|
5050
|
+
"border-border bg-panel-2 text-text-muted mt-1 shrink-0 rounded-full border px-2 py-0.5 text-[10px] tracking-wide uppercase",
|
|
5051
|
+
cls.category
|
|
5052
|
+
),
|
|
5053
|
+
children: category
|
|
5054
|
+
}
|
|
5055
|
+
)
|
|
5056
|
+
] }),
|
|
5057
|
+
isSpec && meta && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5058
|
+
"span",
|
|
5059
|
+
{
|
|
5060
|
+
className: cn("text-text-dim font-mono text-[12px] tracking-wide", cls.meta),
|
|
5061
|
+
children: meta
|
|
5062
|
+
}
|
|
5063
|
+
),
|
|
5064
|
+
rating !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "text-text-muted mt-1 flex items-center gap-2 text-[13px]", children: [
|
|
5065
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_icons9.IconGlyph, { name: "star", size: 13, className: "text-rating" }),
|
|
5066
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-text font-medium", children: rating.toFixed(2) }),
|
|
5067
|
+
reviewCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { children: [
|
|
5068
|
+
"(",
|
|
5069
|
+
reviewCount,
|
|
5070
|
+
" reviews)"
|
|
5071
|
+
] }),
|
|
5072
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5073
|
+
Rating,
|
|
5074
|
+
{
|
|
5075
|
+
value: rating,
|
|
5076
|
+
max: 5,
|
|
5077
|
+
precision: "half",
|
|
5078
|
+
size: "sm",
|
|
5079
|
+
readOnly: true,
|
|
5080
|
+
className: "sr-only"
|
|
5081
|
+
}
|
|
5082
|
+
)
|
|
5083
|
+
] })
|
|
5084
|
+
] }),
|
|
5085
|
+
isSpec && specs && specs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5086
|
+
"dl",
|
|
5087
|
+
{
|
|
5088
|
+
className: cn(
|
|
5089
|
+
"border-border grid grid-cols-2 gap-3 border-t pt-4 sm:grid-cols-3",
|
|
5090
|
+
cls.specs
|
|
5091
|
+
),
|
|
5092
|
+
children: specs.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn("flex flex-col gap-0.5", cls.specCell), children: [
|
|
5093
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5094
|
+
"dt",
|
|
5095
|
+
{
|
|
5096
|
+
className: cn(
|
|
5097
|
+
"text-text-dim text-[10px] tracking-wider uppercase",
|
|
5098
|
+
cls.specLabel
|
|
5099
|
+
),
|
|
5100
|
+
children: s.label
|
|
5101
|
+
}
|
|
5102
|
+
),
|
|
5103
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("dd", { className: cn("text-text text-[15px] font-semibold", cls.specValue), children: s.value })
|
|
5104
|
+
] }, i))
|
|
5105
|
+
}
|
|
5106
|
+
),
|
|
5107
|
+
host && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
5108
|
+
"div",
|
|
5109
|
+
{
|
|
5110
|
+
className: cn("border-border flex items-center gap-3 border-t pt-4", cls.host),
|
|
5111
|
+
children: [
|
|
5112
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5113
|
+
Avatar,
|
|
5114
|
+
{
|
|
5115
|
+
size: "md",
|
|
5116
|
+
name: typeof host.name === "string" ? host.name : "Host",
|
|
5117
|
+
src: host.avatarUrl
|
|
5118
|
+
}
|
|
5119
|
+
),
|
|
5120
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-col", children: [
|
|
5121
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "text-text inline-flex items-center gap-1.5 text-[13px] font-medium", children: [
|
|
5122
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { children: [
|
|
5123
|
+
"Hosted by ",
|
|
5124
|
+
host.name
|
|
5125
|
+
] }),
|
|
5126
|
+
host.verified && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Badge, { variant: "ok", size: "sm", children: [
|
|
5127
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_icons9.IconGlyph, { name: "verified", size: 11 }),
|
|
5128
|
+
" Verified"
|
|
5129
|
+
] })
|
|
5130
|
+
] }),
|
|
5131
|
+
host.meta && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-text-dim text-[12px]", children: host.meta })
|
|
5132
|
+
] })
|
|
5133
|
+
]
|
|
5134
|
+
}
|
|
5135
|
+
),
|
|
5136
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixDialog6.Description, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: cn("text-text-muted text-[13px] leading-[1.6]", cls.description), children: description }) }),
|
|
5137
|
+
!isSpec && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
5138
|
+
"div",
|
|
5139
|
+
{
|
|
5140
|
+
className: cn(
|
|
5141
|
+
"border-border mt-auto flex flex-col gap-3 border-t pt-4",
|
|
5142
|
+
cls.footer
|
|
5143
|
+
),
|
|
5144
|
+
children: [
|
|
5145
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-baseline gap-2", children: [
|
|
5146
|
+
originalPrice && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-text-dim decoration-sale text-[13px] line-through", children: originalPrice }),
|
|
5147
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: cn("text-text text-[22px] font-semibold", cls.price), children: price }),
|
|
5148
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: cn("text-text-dim text-[13px]", cls.priceUnit), children: priceUnit })
|
|
5149
|
+
] }),
|
|
5150
|
+
(primaryAction || secondaryAction) && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-end", children: [
|
|
5151
|
+
secondaryAction && renderAction(secondaryAction, "ghost"),
|
|
5152
|
+
primaryAction && renderAction(primaryAction, "primary")
|
|
5153
|
+
] })
|
|
5154
|
+
]
|
|
5155
|
+
}
|
|
5156
|
+
)
|
|
5157
|
+
] })
|
|
5158
|
+
]
|
|
5159
|
+
}
|
|
5160
|
+
),
|
|
5161
|
+
isSpec && (cta || price) && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
5162
|
+
"div",
|
|
5163
|
+
{
|
|
5164
|
+
className: cn(
|
|
5165
|
+
"border-border bg-panel-2 flex items-center justify-between gap-3 border-t px-6 py-4",
|
|
5166
|
+
cls.footer
|
|
5167
|
+
),
|
|
5168
|
+
children: [
|
|
5169
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-baseline gap-2", children: [
|
|
5170
|
+
pricePrefix && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-text-dim text-[12px]", children: pricePrefix }),
|
|
5171
|
+
originalPrice && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-text-dim decoration-sale text-[13px] line-through", children: originalPrice }),
|
|
5172
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: cn("text-text text-[20px] font-semibold", cls.price), children: price }),
|
|
5173
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: cn("text-text-dim text-[13px]", cls.priceUnit), children: priceUnit })
|
|
5174
|
+
] }),
|
|
5175
|
+
cta && (cta.href ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Button, { asChild: true, variant: "primary", disabled: cta.disabled, className: cls.cta, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("a", { href: cta.href, onClick: cta.onClick, children: cta.label }) }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5176
|
+
Button,
|
|
5177
|
+
{
|
|
5178
|
+
variant: "primary",
|
|
5179
|
+
onClick: cta.onClick,
|
|
5180
|
+
disabled: cta.disabled,
|
|
5181
|
+
className: cls.cta,
|
|
5182
|
+
children: cta.label
|
|
5183
|
+
}
|
|
5184
|
+
))
|
|
5185
|
+
]
|
|
5186
|
+
}
|
|
5187
|
+
),
|
|
5188
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixDialog6.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5189
|
+
"button",
|
|
5190
|
+
{
|
|
5191
|
+
type: "button",
|
|
5192
|
+
"aria-label": "Close listing details",
|
|
5193
|
+
className: cn(
|
|
5194
|
+
"bg-panel-2 hover:bg-panel-2/80 text-text-muted hover:text-text border-border focus-visible:ring-accent-dim absolute top-3 right-3 inline-grid h-9 w-9 cursor-pointer place-items-center rounded-full border outline-none focus-visible:ring-[3px]",
|
|
5195
|
+
cls.close
|
|
5196
|
+
),
|
|
5197
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_icons9.IconGlyph, { name: "close", size: 16 })
|
|
5198
|
+
}
|
|
5199
|
+
) })
|
|
5200
|
+
]
|
|
5201
|
+
}
|
|
5202
|
+
)
|
|
5203
|
+
] }),
|
|
5204
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5205
|
+
Lightbox,
|
|
5206
|
+
{
|
|
5207
|
+
open: lightboxOpen,
|
|
5208
|
+
onOpenChange: setLightboxOpen,
|
|
5209
|
+
items: photos,
|
|
5210
|
+
index: galleryIndex,
|
|
5211
|
+
onIndexChange: setGalleryIndex,
|
|
5212
|
+
loop,
|
|
5213
|
+
title: lightboxTitle,
|
|
5214
|
+
renderItem: (src, i) => renderPhoto ? renderPhoto(src, i, "lightbox") : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("img", { src, alt: "", className: "max-h-[88vh] max-w-[92vw] object-contain" })
|
|
5215
|
+
}
|
|
5216
|
+
)
|
|
5217
|
+
] });
|
|
5218
|
+
});
|
|
5219
|
+
ListingDetail.displayName = "ListingDetail";
|
|
5220
|
+
|
|
5221
|
+
// src/patterns/PhoneInput/PhoneInput.tsx
|
|
5222
|
+
var import_react62 = require("react");
|
|
4604
5223
|
|
|
4605
5224
|
// src/patterns/PhoneInput/countries.ts
|
|
4606
5225
|
var phoneCountries = [
|
|
@@ -4644,7 +5263,7 @@ var phoneCountries = [
|
|
|
4644
5263
|
];
|
|
4645
5264
|
|
|
4646
5265
|
// src/patterns/PhoneInput/PhoneInput.tsx
|
|
4647
|
-
var
|
|
5266
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4648
5267
|
function parseE164(value, list) {
|
|
4649
5268
|
if (!value.startsWith("+")) return null;
|
|
4650
5269
|
const digits = value.slice(1);
|
|
@@ -4658,7 +5277,7 @@ function toE164(country, national) {
|
|
|
4658
5277
|
if (cleaned.length === 0) return "";
|
|
4659
5278
|
return `+${country.dialCode}${cleaned}`;
|
|
4660
5279
|
}
|
|
4661
|
-
var PhoneInput = (0,
|
|
5280
|
+
var PhoneInput = (0, import_react62.forwardRef)(function PhoneInput2({
|
|
4662
5281
|
value,
|
|
4663
5282
|
defaultValue,
|
|
4664
5283
|
onValueChange,
|
|
@@ -4673,13 +5292,13 @@ var PhoneInput = (0, import_react61.forwardRef)(function PhoneInput2({
|
|
|
4673
5292
|
defaultValue: defaultValue ?? "",
|
|
4674
5293
|
onChange: onValueChange
|
|
4675
5294
|
});
|
|
4676
|
-
const parsed = (0,
|
|
4677
|
-
const [country, setCountry] = (0,
|
|
5295
|
+
const parsed = (0, import_react62.useMemo)(() => parseE164(committed ?? "", countries), [committed, countries]);
|
|
5296
|
+
const [country, setCountry] = (0, import_react62.useState)(
|
|
4678
5297
|
parsed?.country ?? countries.find((c) => c.code === defaultCountry) ?? countries[0]
|
|
4679
5298
|
);
|
|
4680
|
-
const [national, setNational] = (0,
|
|
4681
|
-
const lastEmittedRef = (0,
|
|
4682
|
-
(0,
|
|
5299
|
+
const [national, setNational] = (0, import_react62.useState)(parsed?.national ?? "");
|
|
5300
|
+
const lastEmittedRef = (0, import_react62.useRef)(committed ?? "");
|
|
5301
|
+
(0, import_react62.useEffect)(() => {
|
|
4683
5302
|
const current = committed ?? "";
|
|
4684
5303
|
if (current === lastEmittedRef.current) return;
|
|
4685
5304
|
lastEmittedRef.current = current;
|
|
@@ -4704,14 +5323,14 @@ var PhoneInput = (0, import_react61.forwardRef)(function PhoneInput2({
|
|
|
4704
5323
|
lastEmittedRef.current = emitted;
|
|
4705
5324
|
setCommitted(emitted);
|
|
4706
5325
|
};
|
|
4707
|
-
const selectOptions = (0,
|
|
5326
|
+
const selectOptions = (0, import_react62.useMemo)(
|
|
4708
5327
|
() => countries.map((c) => ({
|
|
4709
5328
|
value: c.code,
|
|
4710
5329
|
label: `${c.flag} +${c.dialCode}`
|
|
4711
5330
|
})),
|
|
4712
5331
|
[countries]
|
|
4713
5332
|
);
|
|
4714
|
-
return /* @__PURE__ */ (0,
|
|
5333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
4715
5334
|
"div",
|
|
4716
5335
|
{
|
|
4717
5336
|
className: cn(
|
|
@@ -4720,7 +5339,7 @@ var PhoneInput = (0, import_react61.forwardRef)(function PhoneInput2({
|
|
|
4720
5339
|
disabled && "opacity-50"
|
|
4721
5340
|
),
|
|
4722
5341
|
children: [
|
|
4723
|
-
/* @__PURE__ */ (0,
|
|
5342
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4724
5343
|
Select,
|
|
4725
5344
|
{
|
|
4726
5345
|
options: selectOptions,
|
|
@@ -4730,7 +5349,7 @@ var PhoneInput = (0, import_react61.forwardRef)(function PhoneInput2({
|
|
|
4730
5349
|
"aria-label": "Country"
|
|
4731
5350
|
}
|
|
4732
5351
|
),
|
|
4733
|
-
/* @__PURE__ */ (0,
|
|
5352
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4734
5353
|
"input",
|
|
4735
5354
|
{
|
|
4736
5355
|
ref,
|
|
@@ -4752,8 +5371,8 @@ var PhoneInput = (0, import_react61.forwardRef)(function PhoneInput2({
|
|
|
4752
5371
|
PhoneInput.displayName = "PhoneInput";
|
|
4753
5372
|
|
|
4754
5373
|
// src/patterns/PriceBreakdown/PriceBreakdown.tsx
|
|
4755
|
-
var
|
|
4756
|
-
var
|
|
5374
|
+
var import_react63 = require("react");
|
|
5375
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4757
5376
|
function PriceBreakdownRoot({
|
|
4758
5377
|
items,
|
|
4759
5378
|
total,
|
|
@@ -4763,30 +5382,30 @@ function PriceBreakdownRoot({
|
|
|
4763
5382
|
children,
|
|
4764
5383
|
...props
|
|
4765
5384
|
}, ref) {
|
|
4766
|
-
return /* @__PURE__ */ (0,
|
|
4767
|
-
items?.map((item, i) => /* @__PURE__ */ (0,
|
|
5385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { ref, className: cn("flex flex-col gap-2", className), ...props, children: [
|
|
5386
|
+
items?.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(PriceBreakdownLine, { ...item }, i)),
|
|
4768
5387
|
children,
|
|
4769
|
-
total !== void 0 && /* @__PURE__ */ (0,
|
|
4770
|
-
/* @__PURE__ */ (0,
|
|
4771
|
-
/* @__PURE__ */ (0,
|
|
5388
|
+
total !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "border-border mt-2 flex items-baseline justify-between border-t pt-3", children: [
|
|
5389
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-text text-[14px] font-semibold", children: totalLabel }),
|
|
5390
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "text-text text-[16px] font-semibold", children: [
|
|
4772
5391
|
total,
|
|
4773
|
-
currency && /* @__PURE__ */ (0,
|
|
5392
|
+
currency && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-text-dim ml-1 text-[12px] font-normal", children: currency })
|
|
4774
5393
|
] })
|
|
4775
5394
|
] })
|
|
4776
5395
|
] });
|
|
4777
5396
|
}
|
|
4778
|
-
var PriceBreakdown = (0,
|
|
5397
|
+
var PriceBreakdown = (0, import_react63.forwardRef)(PriceBreakdownRoot);
|
|
4779
5398
|
PriceBreakdown.displayName = "PriceBreakdown";
|
|
4780
|
-
var PriceBreakdownLine = (0,
|
|
5399
|
+
var PriceBreakdownLine = (0, import_react63.forwardRef)(
|
|
4781
5400
|
function PriceBreakdownLine2({ label, subLabel, amount, originalAmount, discount, className }, ref) {
|
|
4782
|
-
return /* @__PURE__ */ (0,
|
|
4783
|
-
/* @__PURE__ */ (0,
|
|
4784
|
-
/* @__PURE__ */ (0,
|
|
4785
|
-
subLabel && /* @__PURE__ */ (0,
|
|
5401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { ref, className: cn("flex items-baseline justify-between gap-3", className), children: [
|
|
5402
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
|
|
5403
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-text text-[13px]", children: label }),
|
|
5404
|
+
subLabel && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-text-dim text-[11px]", children: subLabel })
|
|
4786
5405
|
] }),
|
|
4787
|
-
/* @__PURE__ */ (0,
|
|
4788
|
-
originalAmount && /* @__PURE__ */ (0,
|
|
4789
|
-
/* @__PURE__ */ (0,
|
|
5406
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "inline-flex shrink-0 items-baseline gap-2", children: [
|
|
5407
|
+
originalAmount && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-text-dim decoration-sale text-[12px] line-through", children: originalAmount }),
|
|
5408
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4790
5409
|
"span",
|
|
4791
5410
|
{
|
|
4792
5411
|
className: cn("text-[13px] font-medium", discount ? "text-sale-text" : "text-text"),
|
|
@@ -4801,19 +5420,19 @@ PriceBreakdownLine.displayName = "PriceBreakdownLine";
|
|
|
4801
5420
|
PriceBreakdown.Line = PriceBreakdownLine;
|
|
4802
5421
|
|
|
4803
5422
|
// src/patterns/ReviewCard/ReviewCard.tsx
|
|
4804
|
-
var
|
|
4805
|
-
var
|
|
4806
|
-
var
|
|
4807
|
-
var ReviewCard = (0,
|
|
4808
|
-
return /* @__PURE__ */ (0,
|
|
5423
|
+
var import_icons10 = require("@ship-it-ui/icons");
|
|
5424
|
+
var import_react64 = require("react");
|
|
5425
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5426
|
+
var ReviewCard = (0, import_react64.forwardRef)(function ReviewCard2({ author, authorAvatar, rating, date, body, photos, verified, subtitle, className, ...props }, ref) {
|
|
5427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
4809
5428
|
"article",
|
|
4810
5429
|
{
|
|
4811
5430
|
ref,
|
|
4812
5431
|
className: cn("border-border bg-panel flex flex-col gap-3 rounded-md border p-4", className),
|
|
4813
5432
|
...props,
|
|
4814
5433
|
children: [
|
|
4815
|
-
/* @__PURE__ */ (0,
|
|
4816
|
-
/* @__PURE__ */ (0,
|
|
5434
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("header", { className: "flex items-start gap-3", children: [
|
|
5435
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4817
5436
|
Avatar,
|
|
4818
5437
|
{
|
|
4819
5438
|
src: authorAvatar,
|
|
@@ -4821,24 +5440,24 @@ var ReviewCard = (0, import_react63.forwardRef)(function ReviewCard2({ author, a
|
|
|
4821
5440
|
size: "md"
|
|
4822
5441
|
}
|
|
4823
5442
|
),
|
|
4824
|
-
/* @__PURE__ */ (0,
|
|
4825
|
-
/* @__PURE__ */ (0,
|
|
4826
|
-
/* @__PURE__ */ (0,
|
|
4827
|
-
verified && /* @__PURE__ */ (0,
|
|
4828
|
-
/* @__PURE__ */ (0,
|
|
5443
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
5444
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5445
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-text text-[14px] leading-tight font-semibold", children: author }),
|
|
5446
|
+
verified && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Badge, { variant: "ok", size: "sm", children: [
|
|
5447
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons10.IconGlyph, { name: "verified", size: 11 }),
|
|
4829
5448
|
" Verified trip"
|
|
4830
5449
|
] })
|
|
4831
5450
|
] }),
|
|
4832
|
-
subtitle && /* @__PURE__ */ (0,
|
|
4833
|
-
/* @__PURE__ */ (0,
|
|
4834
|
-
/* @__PURE__ */ (0,
|
|
4835
|
-
/* @__PURE__ */ (0,
|
|
4836
|
-
/* @__PURE__ */ (0,
|
|
5451
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-text-dim text-[11px]", children: subtitle }),
|
|
5452
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "mt-1 flex items-center gap-2", children: [
|
|
5453
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Rating, { value: rating, max: 5, precision: "half", size: "sm", readOnly: true }),
|
|
5454
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-text-dim text-[11px]", children: "\xB7" }),
|
|
5455
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("time", { className: "text-text-dim text-[11px]", children: date })
|
|
4837
5456
|
] })
|
|
4838
5457
|
] })
|
|
4839
5458
|
] }),
|
|
4840
|
-
/* @__PURE__ */ (0,
|
|
4841
|
-
photos && photos.length > 0 && /* @__PURE__ */ (0,
|
|
5459
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-text text-[13px] leading-relaxed", children: body }),
|
|
5460
|
+
photos && photos.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex gap-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: photos.map((src, i) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4842
5461
|
"img",
|
|
4843
5462
|
{
|
|
4844
5463
|
src,
|
|
@@ -4855,11 +5474,11 @@ var ReviewCard = (0, import_react63.forwardRef)(function ReviewCard2({ author, a
|
|
|
4855
5474
|
ReviewCard.displayName = "ReviewCard";
|
|
4856
5475
|
|
|
4857
5476
|
// src/patterns/Dots/Dots.tsx
|
|
4858
|
-
var
|
|
4859
|
-
var
|
|
4860
|
-
var Dots = (0,
|
|
5477
|
+
var import_react65 = require("react");
|
|
5478
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5479
|
+
var Dots = (0, import_react65.forwardRef)(function Dots2({ total, current, onChange, className, "aria-label": ariaLabel = "Progress", ...props }, ref) {
|
|
4861
5480
|
const interactive = typeof onChange === "function";
|
|
4862
|
-
return /* @__PURE__ */ (0,
|
|
5481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4863
5482
|
"nav",
|
|
4864
5483
|
{
|
|
4865
5484
|
ref,
|
|
@@ -4873,7 +5492,7 @@ var Dots = (0, import_react64.forwardRef)(function Dots2({ total, current, onCha
|
|
|
4873
5492
|
isActive ? "w-[18px] bg-accent" : "w-[6px] bg-panel-2"
|
|
4874
5493
|
);
|
|
4875
5494
|
if (interactive) {
|
|
4876
|
-
return /* @__PURE__ */ (0,
|
|
5495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4877
5496
|
"button",
|
|
4878
5497
|
{
|
|
4879
5498
|
type: "button",
|
|
@@ -4890,7 +5509,7 @@ var Dots = (0, import_react64.forwardRef)(function Dots2({ total, current, onCha
|
|
|
4890
5509
|
i
|
|
4891
5510
|
);
|
|
4892
5511
|
}
|
|
4893
|
-
return /* @__PURE__ */ (0,
|
|
5512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { "aria-hidden": true, className: sharedClass }, i);
|
|
4894
5513
|
})
|
|
4895
5514
|
}
|
|
4896
5515
|
);
|
|
@@ -4898,13 +5517,13 @@ var Dots = (0, import_react64.forwardRef)(function Dots2({ total, current, onCha
|
|
|
4898
5517
|
Dots.displayName = "Dots";
|
|
4899
5518
|
|
|
4900
5519
|
// src/patterns/Dropzone/Dropzone.tsx
|
|
4901
|
-
var
|
|
4902
|
-
var
|
|
5520
|
+
var import_react66 = require("react");
|
|
5521
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4903
5522
|
function listToArray(list) {
|
|
4904
5523
|
if (!list) return [];
|
|
4905
5524
|
return Array.from(list);
|
|
4906
5525
|
}
|
|
4907
|
-
var Dropzone = (0,
|
|
5526
|
+
var Dropzone = (0, import_react66.forwardRef)(function Dropzone2({
|
|
4908
5527
|
onFiles,
|
|
4909
5528
|
accept,
|
|
4910
5529
|
multiple = true,
|
|
@@ -4915,7 +5534,7 @@ var Dropzone = (0, import_react65.forwardRef)(function Dropzone2({
|
|
|
4915
5534
|
className,
|
|
4916
5535
|
...props
|
|
4917
5536
|
}, ref) {
|
|
4918
|
-
const [isDragging, setIsDragging] = (0,
|
|
5537
|
+
const [isDragging, setIsDragging] = (0, import_react66.useState)(false);
|
|
4919
5538
|
const onDragOver = (e) => {
|
|
4920
5539
|
if (disabled) return;
|
|
4921
5540
|
e.preventDefault();
|
|
@@ -4929,7 +5548,7 @@ var Dropzone = (0, import_react65.forwardRef)(function Dropzone2({
|
|
|
4929
5548
|
const files = listToArray(e.dataTransfer.files);
|
|
4930
5549
|
if (files.length) onFiles?.(files);
|
|
4931
5550
|
};
|
|
4932
|
-
return /* @__PURE__ */ (0,
|
|
5551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
4933
5552
|
"label",
|
|
4934
5553
|
{
|
|
4935
5554
|
ref,
|
|
@@ -4946,7 +5565,7 @@ var Dropzone = (0, import_react65.forwardRef)(function Dropzone2({
|
|
|
4946
5565
|
),
|
|
4947
5566
|
...props,
|
|
4948
5567
|
children: [
|
|
4949
|
-
/* @__PURE__ */ (0,
|
|
5568
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4950
5569
|
"input",
|
|
4951
5570
|
{
|
|
4952
5571
|
type: "file",
|
|
@@ -4962,7 +5581,7 @@ var Dropzone = (0, import_react65.forwardRef)(function Dropzone2({
|
|
|
4962
5581
|
}
|
|
4963
5582
|
}
|
|
4964
5583
|
),
|
|
4965
|
-
/* @__PURE__ */ (0,
|
|
5584
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4966
5585
|
"div",
|
|
4967
5586
|
{
|
|
4968
5587
|
"aria-hidden": true,
|
|
@@ -4970,8 +5589,8 @@ var Dropzone = (0, import_react65.forwardRef)(function Dropzone2({
|
|
|
4970
5589
|
children: icon
|
|
4971
5590
|
}
|
|
4972
5591
|
),
|
|
4973
|
-
/* @__PURE__ */ (0,
|
|
4974
|
-
description && /* @__PURE__ */ (0,
|
|
5592
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-1 text-[13px] font-medium", children: title }),
|
|
5593
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "text-text-dim text-[11px]", children: description })
|
|
4975
5594
|
]
|
|
4976
5595
|
}
|
|
4977
5596
|
);
|
|
@@ -4979,10 +5598,10 @@ var Dropzone = (0, import_react65.forwardRef)(function Dropzone2({
|
|
|
4979
5598
|
Dropzone.displayName = "Dropzone";
|
|
4980
5599
|
|
|
4981
5600
|
// src/patterns/EmptyState/EmptyState.tsx
|
|
4982
|
-
var
|
|
4983
|
-
var
|
|
4984
|
-
var
|
|
4985
|
-
var plateStyles = (0,
|
|
5601
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
5602
|
+
var import_react67 = require("react");
|
|
5603
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5604
|
+
var plateStyles = (0, import_class_variance_authority12.cva)("grid h-12 w-12 place-items-center rounded-base text-[22px]", {
|
|
4986
5605
|
variants: {
|
|
4987
5606
|
tone: {
|
|
4988
5607
|
neutral: "bg-panel-2 text-text-muted",
|
|
@@ -4994,8 +5613,8 @@ var plateStyles = (0, import_class_variance_authority11.cva)("grid h-12 w-12 pla
|
|
|
4994
5613
|
},
|
|
4995
5614
|
defaultVariants: { tone: "neutral" }
|
|
4996
5615
|
});
|
|
4997
|
-
var EmptyState = (0,
|
|
4998
|
-
return /* @__PURE__ */ (0,
|
|
5616
|
+
var EmptyState = (0, import_react67.forwardRef)(function EmptyState2({ icon, title, description, action, chips, tone, className, ...props }, ref) {
|
|
5617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
4999
5618
|
"div",
|
|
5000
5619
|
{
|
|
5001
5620
|
ref,
|
|
@@ -5005,10 +5624,10 @@ var EmptyState = (0, import_react66.forwardRef)(function EmptyState2({ icon, tit
|
|
|
5005
5624
|
),
|
|
5006
5625
|
...props,
|
|
5007
5626
|
children: [
|
|
5008
|
-
icon != null && /* @__PURE__ */ (0,
|
|
5009
|
-
/* @__PURE__ */ (0,
|
|
5010
|
-
description && /* @__PURE__ */ (0,
|
|
5011
|
-
chips && chips.length > 0 && /* @__PURE__ */ (0,
|
|
5627
|
+
icon != null && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { "aria-hidden": true, className: plateStyles({ tone: tone ?? "neutral" }), children: icon }),
|
|
5628
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "text-[14px] font-medium", children: title }),
|
|
5629
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "text-text-muted max-w-[260px] text-[12px] leading-[1.5]", children: description }),
|
|
5630
|
+
chips && chips.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex w-full flex-col gap-1", children: chips.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
5012
5631
|
"button",
|
|
5013
5632
|
{
|
|
5014
5633
|
type: "button",
|
|
@@ -5030,18 +5649,18 @@ var EmptyState = (0, import_react66.forwardRef)(function EmptyState2({ icon, tit
|
|
|
5030
5649
|
EmptyState.displayName = "EmptyState";
|
|
5031
5650
|
|
|
5032
5651
|
// src/patterns/FileChip/FileChip.tsx
|
|
5033
|
-
var
|
|
5034
|
-
var
|
|
5652
|
+
var import_react68 = require("react");
|
|
5653
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5035
5654
|
function deriveExt(name) {
|
|
5036
5655
|
const dot = name.lastIndexOf(".");
|
|
5037
5656
|
if (dot < 0) return "FILE";
|
|
5038
5657
|
return name.slice(dot + 1).slice(0, 4).toUpperCase();
|
|
5039
5658
|
}
|
|
5040
|
-
var FileChip = (0,
|
|
5659
|
+
var FileChip = (0, import_react68.forwardRef)(function FileChip2({ name, size, progress, icon, onRemove, failed, className, ...props }, ref) {
|
|
5041
5660
|
const ext = deriveExt(name);
|
|
5042
5661
|
const showProgress = typeof progress === "number";
|
|
5043
5662
|
const isComplete = showProgress && progress >= 100;
|
|
5044
|
-
return /* @__PURE__ */ (0,
|
|
5663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
5045
5664
|
"div",
|
|
5046
5665
|
{
|
|
5047
5666
|
ref,
|
|
@@ -5051,7 +5670,7 @@ var FileChip = (0, import_react67.forwardRef)(function FileChip2({ name, size, p
|
|
|
5051
5670
|
),
|
|
5052
5671
|
...props,
|
|
5053
5672
|
children: [
|
|
5054
|
-
/* @__PURE__ */ (0,
|
|
5673
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5055
5674
|
"span",
|
|
5056
5675
|
{
|
|
5057
5676
|
"aria-hidden": true,
|
|
@@ -5059,17 +5678,17 @@ var FileChip = (0, import_react67.forwardRef)(function FileChip2({ name, size, p
|
|
|
5059
5678
|
children: icon ?? ext
|
|
5060
5679
|
}
|
|
5061
5680
|
),
|
|
5062
|
-
/* @__PURE__ */ (0,
|
|
5063
|
-
/* @__PURE__ */ (0,
|
|
5064
|
-
/* @__PURE__ */ (0,
|
|
5681
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
5682
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "truncate text-[12px] font-medium", children: name }),
|
|
5683
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: cn("font-mono text-[10px]", failed ? "text-err" : "text-text-dim"), children: [
|
|
5065
5684
|
size,
|
|
5066
|
-
showProgress && !isComplete && /* @__PURE__ */ (0,
|
|
5685
|
+
showProgress && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { children: [
|
|
5067
5686
|
" \xB7 ",
|
|
5068
5687
|
Math.round(progress),
|
|
5069
5688
|
"%"
|
|
5070
5689
|
] })
|
|
5071
5690
|
] }),
|
|
5072
|
-
showProgress && !isComplete && /* @__PURE__ */ (0,
|
|
5691
|
+
showProgress && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-panel mt-1 h-[2px] overflow-hidden rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5073
5692
|
"div",
|
|
5074
5693
|
{
|
|
5075
5694
|
className: cn(
|
|
@@ -5080,7 +5699,7 @@ var FileChip = (0, import_react67.forwardRef)(function FileChip2({ name, size, p
|
|
|
5080
5699
|
}
|
|
5081
5700
|
) })
|
|
5082
5701
|
] }),
|
|
5083
|
-
onRemove && /* @__PURE__ */ (0,
|
|
5702
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5084
5703
|
"button",
|
|
5085
5704
|
{
|
|
5086
5705
|
type: "button",
|
|
@@ -5100,10 +5719,10 @@ var FileChip = (0, import_react67.forwardRef)(function FileChip2({ name, size, p
|
|
|
5100
5719
|
FileChip.displayName = "FileChip";
|
|
5101
5720
|
|
|
5102
5721
|
// src/patterns/FilterPanel/FilterPanel.tsx
|
|
5103
|
-
var
|
|
5104
|
-
var
|
|
5722
|
+
var import_react69 = require("react");
|
|
5723
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5105
5724
|
var EMPTY = Object.freeze({});
|
|
5106
|
-
var FilterPanel = (0,
|
|
5725
|
+
var FilterPanel = (0, import_react69.forwardRef)(function FilterPanel2({
|
|
5107
5726
|
facets,
|
|
5108
5727
|
value,
|
|
5109
5728
|
defaultValue,
|
|
@@ -5121,7 +5740,7 @@ var FilterPanel = (0, import_react68.forwardRef)(function FilterPanel2({
|
|
|
5121
5740
|
onChange: onValueChange
|
|
5122
5741
|
});
|
|
5123
5742
|
const total = facets.reduce((sum, facet) => sum + (selection[facet.id]?.length ?? 0), 0);
|
|
5124
|
-
const toggle = (0,
|
|
5743
|
+
const toggle = (0, import_react69.useCallback)(
|
|
5125
5744
|
(facetId, optionValue, next) => {
|
|
5126
5745
|
setSelection((prev) => {
|
|
5127
5746
|
const current = prev?.[facetId] ?? [];
|
|
@@ -5132,11 +5751,11 @@ var FilterPanel = (0, import_react68.forwardRef)(function FilterPanel2({
|
|
|
5132
5751
|
},
|
|
5133
5752
|
[setSelection]
|
|
5134
5753
|
);
|
|
5135
|
-
const handleReset = (0,
|
|
5754
|
+
const handleReset = (0, import_react69.useCallback)(() => {
|
|
5136
5755
|
setSelection(EMPTY);
|
|
5137
5756
|
onReset?.();
|
|
5138
5757
|
}, [setSelection, onReset]);
|
|
5139
|
-
return /* @__PURE__ */ (0,
|
|
5758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
5140
5759
|
"div",
|
|
5141
5760
|
{
|
|
5142
5761
|
ref,
|
|
@@ -5148,10 +5767,10 @@ var FilterPanel = (0, import_react68.forwardRef)(function FilterPanel2({
|
|
|
5148
5767
|
),
|
|
5149
5768
|
...props,
|
|
5150
5769
|
children: [
|
|
5151
|
-
/* @__PURE__ */ (0,
|
|
5152
|
-
/* @__PURE__ */ (0,
|
|
5153
|
-
total > 0 && /* @__PURE__ */ (0,
|
|
5154
|
-
/* @__PURE__ */ (0,
|
|
5770
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5771
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-text-dim font-mono text-[10px] tracking-[1.4px] uppercase", children: title }),
|
|
5772
|
+
total > 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Badge, { size: "sm", variant: "accent", children: total }),
|
|
5773
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5155
5774
|
Button,
|
|
5156
5775
|
{
|
|
5157
5776
|
type: "button",
|
|
@@ -5164,7 +5783,7 @@ var FilterPanel = (0, import_react68.forwardRef)(function FilterPanel2({
|
|
|
5164
5783
|
}
|
|
5165
5784
|
)
|
|
5166
5785
|
] }),
|
|
5167
|
-
facets.map((facet) => /* @__PURE__ */ (0,
|
|
5786
|
+
facets.map((facet) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5168
5787
|
FilterFacetGroup,
|
|
5169
5788
|
{
|
|
5170
5789
|
facet,
|
|
@@ -5181,12 +5800,12 @@ var FilterPanel = (0, import_react68.forwardRef)(function FilterPanel2({
|
|
|
5181
5800
|
FilterPanel.displayName = "FilterPanel";
|
|
5182
5801
|
function FilterFacetGroup({ facet, selected, counts, onToggle }) {
|
|
5183
5802
|
const collapsible = facet.collapsible ?? true;
|
|
5184
|
-
const [open, setOpen] = (0,
|
|
5803
|
+
const [open, setOpen] = (0, import_react69.useState)(facet.defaultOpen ?? true);
|
|
5185
5804
|
const isOpen = !collapsible || open;
|
|
5186
5805
|
const selectedCount = selected.length;
|
|
5187
5806
|
const headingClass = "text-text-muted flex items-center gap-[6px] font-mono text-[10px] tracking-[1.4px] uppercase";
|
|
5188
|
-
return /* @__PURE__ */ (0,
|
|
5189
|
-
collapsible ? /* @__PURE__ */ (0,
|
|
5807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("section", { className: "flex flex-col gap-1", children: [
|
|
5808
|
+
collapsible ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
5190
5809
|
"button",
|
|
5191
5810
|
{
|
|
5192
5811
|
type: "button",
|
|
@@ -5199,20 +5818,20 @@ function FilterFacetGroup({ facet, selected, counts, onToggle }) {
|
|
|
5199
5818
|
"hover:text-text"
|
|
5200
5819
|
),
|
|
5201
5820
|
children: [
|
|
5202
|
-
/* @__PURE__ */ (0,
|
|
5203
|
-
selectedCount > 0 && /* @__PURE__ */ (0,
|
|
5204
|
-
/* @__PURE__ */ (0,
|
|
5821
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "flex-1 text-left", children: facet.label }),
|
|
5822
|
+
selectedCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Badge, { size: "sm", variant: "neutral", children: selectedCount }),
|
|
5823
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { "aria-hidden": true, className: "text-[10px] opacity-70", children: isOpen ? "\u25BE" : "\u25B8" })
|
|
5205
5824
|
]
|
|
5206
5825
|
}
|
|
5207
|
-
) : /* @__PURE__ */ (0,
|
|
5208
|
-
/* @__PURE__ */ (0,
|
|
5209
|
-
selectedCount > 0 && /* @__PURE__ */ (0,
|
|
5826
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: cn(headingClass, "px-1 py-[2px]"), children: [
|
|
5827
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "flex-1", children: facet.label }),
|
|
5828
|
+
selectedCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Badge, { size: "sm", variant: "neutral", children: selectedCount })
|
|
5210
5829
|
] }),
|
|
5211
|
-
isOpen && /* @__PURE__ */ (0,
|
|
5830
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("ul", { className: "m-0 flex list-none flex-col gap-[2px] p-0", children: facet.options.map((option) => {
|
|
5212
5831
|
const isSelected = selected.includes(option.value);
|
|
5213
5832
|
const count = counts?.[option.value];
|
|
5214
|
-
return /* @__PURE__ */ (0,
|
|
5215
|
-
/* @__PURE__ */ (0,
|
|
5833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("li", { className: "flex items-center gap-2 px-1 py-[3px]", children: [
|
|
5834
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5216
5835
|
Checkbox,
|
|
5217
5836
|
{
|
|
5218
5837
|
checked: isSelected,
|
|
@@ -5220,25 +5839,25 @@ function FilterFacetGroup({ facet, selected, counts, onToggle }) {
|
|
|
5220
5839
|
label: option.label
|
|
5221
5840
|
}
|
|
5222
5841
|
),
|
|
5223
|
-
typeof count === "number" && /* @__PURE__ */ (0,
|
|
5842
|
+
typeof count === "number" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-text-dim ml-auto font-mono text-[10px] tabular-nums", children: count })
|
|
5224
5843
|
] }, option.value);
|
|
5225
5844
|
}) })
|
|
5226
5845
|
] });
|
|
5227
5846
|
}
|
|
5228
5847
|
|
|
5229
5848
|
// src/patterns/HealthScore/HealthScore.tsx
|
|
5230
|
-
var
|
|
5849
|
+
var import_react71 = require("react");
|
|
5231
5850
|
|
|
5232
5851
|
// src/patterns/RadialProgress/RadialProgress.tsx
|
|
5233
|
-
var
|
|
5234
|
-
var
|
|
5852
|
+
var import_react70 = require("react");
|
|
5853
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5235
5854
|
var toneStrokeClass = {
|
|
5236
5855
|
accent: "stroke-accent",
|
|
5237
5856
|
ok: "stroke-ok",
|
|
5238
5857
|
warn: "stroke-warn",
|
|
5239
5858
|
err: "stroke-err"
|
|
5240
5859
|
};
|
|
5241
|
-
var RadialProgress = (0,
|
|
5860
|
+
var RadialProgress = (0, import_react70.forwardRef)(
|
|
5242
5861
|
function RadialProgress2({
|
|
5243
5862
|
value,
|
|
5244
5863
|
max = 100,
|
|
@@ -5256,7 +5875,7 @@ var RadialProgress = (0, import_react69.forwardRef)(
|
|
|
5256
5875
|
const c = 2 * Math.PI * r;
|
|
5257
5876
|
const dash = pct / 100 * c;
|
|
5258
5877
|
const resolvedTone = tone ?? (clamped >= max ? "ok" : "accent");
|
|
5259
|
-
return /* @__PURE__ */ (0,
|
|
5878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
5260
5879
|
"div",
|
|
5261
5880
|
{
|
|
5262
5881
|
ref,
|
|
@@ -5269,8 +5888,8 @@ var RadialProgress = (0, import_react69.forwardRef)(
|
|
|
5269
5888
|
style: { width: size, height: size },
|
|
5270
5889
|
...props,
|
|
5271
5890
|
children: [
|
|
5272
|
-
/* @__PURE__ */ (0,
|
|
5273
|
-
/* @__PURE__ */ (0,
|
|
5891
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
|
|
5892
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5274
5893
|
"circle",
|
|
5275
5894
|
{
|
|
5276
5895
|
cx: size / 2,
|
|
@@ -5281,7 +5900,7 @@ var RadialProgress = (0, import_react69.forwardRef)(
|
|
|
5281
5900
|
className: "stroke-panel-2"
|
|
5282
5901
|
}
|
|
5283
5902
|
),
|
|
5284
|
-
/* @__PURE__ */ (0,
|
|
5903
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5285
5904
|
"circle",
|
|
5286
5905
|
{
|
|
5287
5906
|
cx: size / 2,
|
|
@@ -5299,7 +5918,7 @@ var RadialProgress = (0, import_react69.forwardRef)(
|
|
|
5299
5918
|
}
|
|
5300
5919
|
)
|
|
5301
5920
|
] }),
|
|
5302
|
-
/* @__PURE__ */ (0,
|
|
5921
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "absolute inset-0 grid place-items-center font-mono text-[11px] font-medium tabular-nums", children: children ?? `${Math.round(pct)}%` })
|
|
5303
5922
|
]
|
|
5304
5923
|
}
|
|
5305
5924
|
);
|
|
@@ -5308,7 +5927,7 @@ var RadialProgress = (0, import_react69.forwardRef)(
|
|
|
5308
5927
|
RadialProgress.displayName = "RadialProgress";
|
|
5309
5928
|
|
|
5310
5929
|
// src/patterns/HealthScore/HealthScore.tsx
|
|
5311
|
-
var
|
|
5930
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5312
5931
|
function deltaTone(delta) {
|
|
5313
5932
|
if (delta > 0) return "ok";
|
|
5314
5933
|
if (delta < 0) return "err";
|
|
@@ -5325,7 +5944,7 @@ var toneTextClass = {
|
|
|
5325
5944
|
warn: "text-warn",
|
|
5326
5945
|
err: "text-err"
|
|
5327
5946
|
};
|
|
5328
|
-
var HealthScore = (0,
|
|
5947
|
+
var HealthScore = (0, import_react71.forwardRef)(function HealthScore2({
|
|
5329
5948
|
value,
|
|
5330
5949
|
max = 100,
|
|
5331
5950
|
delta,
|
|
@@ -5340,7 +5959,7 @@ var HealthScore = (0, import_react70.forwardRef)(function HealthScore2({
|
|
|
5340
5959
|
const pct = max > 0 ? Math.round(Math.min(max, Math.max(0, value)) / max * 100) : 0;
|
|
5341
5960
|
const resolvedTone = tone ?? (pct >= 80 ? "ok" : pct >= 50 ? "accent" : "warn");
|
|
5342
5961
|
const indicatorTone = typeof delta === "number" ? deltaTone(delta) : "accent";
|
|
5343
|
-
const core = /* @__PURE__ */ (0,
|
|
5962
|
+
const core = /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
5344
5963
|
"div",
|
|
5345
5964
|
{
|
|
5346
5965
|
ref,
|
|
@@ -5348,10 +5967,10 @@ var HealthScore = (0, import_react70.forwardRef)(function HealthScore2({
|
|
|
5348
5967
|
"aria-label": ariaLabel ?? `${pct}% health`,
|
|
5349
5968
|
...props,
|
|
5350
5969
|
children: [
|
|
5351
|
-
/* @__PURE__ */ (0,
|
|
5352
|
-
label && /* @__PURE__ */ (0,
|
|
5353
|
-
typeof delta === "number" && /* @__PURE__ */ (0,
|
|
5354
|
-
/* @__PURE__ */ (0,
|
|
5970
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(RadialProgress, { value, max, size, tone: resolvedTone }),
|
|
5971
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "text-text-muted mt-1 text-[12px] leading-tight", children: label }),
|
|
5972
|
+
typeof delta === "number" && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: cn("font-mono text-[11px] tabular-nums", toneTextClass[indicatorTone]), children: [
|
|
5973
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { "aria-hidden": true, children: deltaGlyph(delta) }),
|
|
5355
5974
|
" ",
|
|
5356
5975
|
Math.abs(delta)
|
|
5357
5976
|
] })
|
|
@@ -5361,15 +5980,15 @@ var HealthScore = (0, import_react70.forwardRef)(function HealthScore2({
|
|
|
5361
5980
|
if (!breakdown || breakdown.length === 0) {
|
|
5362
5981
|
return core;
|
|
5363
5982
|
}
|
|
5364
|
-
return /* @__PURE__ */ (0,
|
|
5983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5365
5984
|
HoverCard,
|
|
5366
5985
|
{
|
|
5367
|
-
trigger: /* @__PURE__ */ (0,
|
|
5368
|
-
content: /* @__PURE__ */ (0,
|
|
5369
|
-
/* @__PURE__ */ (0,
|
|
5370
|
-
/* @__PURE__ */ (0,
|
|
5371
|
-
/* @__PURE__ */ (0,
|
|
5372
|
-
/* @__PURE__ */ (0,
|
|
5986
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "inline-flex", children: core }),
|
|
5987
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex min-w-[180px] flex-col gap-2", children: [
|
|
5988
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "text-text-dim font-mono text-[9px] tracking-[1.4px] uppercase", children: "Breakdown" }),
|
|
5989
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("ul", { className: "m-0 flex list-none flex-col gap-1 p-0 text-[12px]", children: breakdown.map((entry, i) => /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("li", { className: "flex items-center gap-2", children: [
|
|
5990
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "text-text-muted flex-1 truncate", children: entry.label }),
|
|
5991
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5373
5992
|
"span",
|
|
5374
5993
|
{
|
|
5375
5994
|
className: cn(
|
|
@@ -5387,21 +6006,21 @@ var HealthScore = (0, import_react70.forwardRef)(function HealthScore2({
|
|
|
5387
6006
|
HealthScore.displayName = "HealthScore";
|
|
5388
6007
|
|
|
5389
6008
|
// src/patterns/LargeTitle/LargeTitle.tsx
|
|
5390
|
-
var
|
|
5391
|
-
var
|
|
5392
|
-
var LargeTitle = (0,
|
|
5393
|
-
return /* @__PURE__ */ (0,
|
|
6009
|
+
var import_react72 = require("react");
|
|
6010
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6011
|
+
var LargeTitle = (0, import_react72.forwardRef)(function LargeTitle2({ title, eyebrow, trailing, className, ...props }, ref) {
|
|
6012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
5394
6013
|
"header",
|
|
5395
6014
|
{
|
|
5396
6015
|
ref,
|
|
5397
6016
|
className: cn("px-screen flex items-end justify-between gap-3 py-3 pb-4", className),
|
|
5398
6017
|
...props,
|
|
5399
6018
|
children: [
|
|
5400
|
-
/* @__PURE__ */ (0,
|
|
5401
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
5402
|
-
/* @__PURE__ */ (0,
|
|
6019
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
6020
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "text-m-eyebrow text-accent mb-[6px] font-mono tracking-wide uppercase", children: eyebrow }),
|
|
6021
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("h1", { className: "text-m-h1 m-0 truncate leading-tight font-medium tracking-tight", children: title })
|
|
5403
6022
|
] }),
|
|
5404
|
-
trailing && /* @__PURE__ */ (0,
|
|
6023
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "shrink-0", children: trailing })
|
|
5405
6024
|
]
|
|
5406
6025
|
}
|
|
5407
6026
|
);
|
|
@@ -5410,10 +6029,10 @@ LargeTitle.displayName = "LargeTitle";
|
|
|
5410
6029
|
|
|
5411
6030
|
// src/patterns/Menubar/Menubar.tsx
|
|
5412
6031
|
var RadixMenubar = __toESM(require("@radix-ui/react-menubar"), 1);
|
|
5413
|
-
var
|
|
5414
|
-
var
|
|
5415
|
-
var Menubar = (0,
|
|
5416
|
-
return /* @__PURE__ */ (0,
|
|
6032
|
+
var import_react73 = require("react");
|
|
6033
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
6034
|
+
var Menubar = (0, import_react73.forwardRef)(function Menubar2({ className, ...props }, ref) {
|
|
6035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5417
6036
|
RadixMenubar.Root,
|
|
5418
6037
|
{
|
|
5419
6038
|
ref,
|
|
@@ -5427,9 +6046,9 @@ var Menubar = (0, import_react72.forwardRef)(function Menubar2({ className, ...p
|
|
|
5427
6046
|
});
|
|
5428
6047
|
Menubar.displayName = "Menubar";
|
|
5429
6048
|
var MenubarMenu = RadixMenubar.Menu;
|
|
5430
|
-
var MenubarTrigger = (0,
|
|
6049
|
+
var MenubarTrigger = (0, import_react73.forwardRef)(
|
|
5431
6050
|
function MenubarTrigger2({ className, ...props }, ref) {
|
|
5432
|
-
return /* @__PURE__ */ (0,
|
|
6051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5433
6052
|
RadixMenubar.Trigger,
|
|
5434
6053
|
{
|
|
5435
6054
|
ref,
|
|
@@ -5446,9 +6065,9 @@ var MenubarTrigger = (0, import_react72.forwardRef)(
|
|
|
5446
6065
|
}
|
|
5447
6066
|
);
|
|
5448
6067
|
MenubarTrigger.displayName = "MenubarTrigger";
|
|
5449
|
-
var MenubarContent = (0,
|
|
6068
|
+
var MenubarContent = (0, import_react73.forwardRef)(
|
|
5450
6069
|
function MenubarContent2({ className, sideOffset = 6, align = "start", ...props }, ref) {
|
|
5451
|
-
return /* @__PURE__ */ (0,
|
|
6070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(RadixMenubar.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5452
6071
|
RadixMenubar.Content,
|
|
5453
6072
|
{
|
|
5454
6073
|
ref,
|
|
@@ -5470,24 +6089,24 @@ var itemBase3 = cn(
|
|
|
5470
6089
|
"data-[highlighted]:bg-panel-2",
|
|
5471
6090
|
"data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed"
|
|
5472
6091
|
);
|
|
5473
|
-
var MenubarItem = (0,
|
|
5474
|
-
return /* @__PURE__ */ (0,
|
|
6092
|
+
var MenubarItem = (0, import_react73.forwardRef)(function MenubarItem2({ trailing, destructive, className, children, ...props }, ref) {
|
|
6093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
5475
6094
|
RadixMenubar.Item,
|
|
5476
6095
|
{
|
|
5477
6096
|
ref,
|
|
5478
6097
|
className: cn(itemBase3, destructive ? "text-err" : "text-text", className),
|
|
5479
6098
|
...props,
|
|
5480
6099
|
children: [
|
|
5481
|
-
/* @__PURE__ */ (0,
|
|
5482
|
-
trailing && /* @__PURE__ */ (0,
|
|
6100
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "flex-1", children }),
|
|
6101
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: trailing })
|
|
5483
6102
|
]
|
|
5484
6103
|
}
|
|
5485
6104
|
);
|
|
5486
6105
|
});
|
|
5487
6106
|
MenubarItem.displayName = "MenubarItem";
|
|
5488
|
-
var MenubarSeparator = (0,
|
|
6107
|
+
var MenubarSeparator = (0, import_react73.forwardRef)(
|
|
5489
6108
|
function MenubarSeparator2({ className, ...props }, ref) {
|
|
5490
|
-
return /* @__PURE__ */ (0,
|
|
6109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5491
6110
|
RadixMenubar.Separator,
|
|
5492
6111
|
{
|
|
5493
6112
|
ref,
|
|
@@ -5501,13 +6120,13 @@ MenubarSeparator.displayName = "MenubarSeparator";
|
|
|
5501
6120
|
|
|
5502
6121
|
// src/patterns/NavBar/NavBar.tsx
|
|
5503
6122
|
var RadixNav = __toESM(require("@radix-ui/react-navigation-menu"), 1);
|
|
5504
|
-
var
|
|
6123
|
+
var import_react75 = require("react");
|
|
5505
6124
|
|
|
5506
6125
|
// src/patterns/Sidebar/Sidebar.tsx
|
|
5507
|
-
var
|
|
5508
|
-
var
|
|
5509
|
-
var Sidebar = (0,
|
|
5510
|
-
return /* @__PURE__ */ (0,
|
|
6126
|
+
var import_react74 = require("react");
|
|
6127
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
6128
|
+
var Sidebar = (0, import_react74.forwardRef)(function Sidebar2({ width = 240, className, style, ...props }, ref) {
|
|
6129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5511
6130
|
"aside",
|
|
5512
6131
|
{
|
|
5513
6132
|
ref,
|
|
@@ -5521,12 +6140,12 @@ var Sidebar = (0, import_react73.forwardRef)(function Sidebar2({ width = 240, cl
|
|
|
5521
6140
|
);
|
|
5522
6141
|
});
|
|
5523
6142
|
Sidebar.displayName = "Sidebar";
|
|
5524
|
-
var NavItem = (0,
|
|
6143
|
+
var NavItem = (0, import_react74.forwardRef)(
|
|
5525
6144
|
function NavItem2({ icon, label, active, badge, href, disabled, className, ...props }, ref) {
|
|
5526
|
-
const inner = /* @__PURE__ */ (0,
|
|
5527
|
-
icon && /* @__PURE__ */ (0,
|
|
5528
|
-
/* @__PURE__ */ (0,
|
|
5529
|
-
badge != null && /* @__PURE__ */ (0,
|
|
6145
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
6146
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { "aria-hidden": true, className: "w-[14px] text-center opacity-80", children: icon }),
|
|
6147
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "flex-1 truncate", children: label }),
|
|
6148
|
+
badge != null && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5530
6149
|
"span",
|
|
5531
6150
|
{
|
|
5532
6151
|
className: cn(
|
|
@@ -5547,7 +6166,7 @@ var NavItem = (0, import_react73.forwardRef)(
|
|
|
5547
6166
|
);
|
|
5548
6167
|
if (href) {
|
|
5549
6168
|
const anchorProps = props;
|
|
5550
|
-
return /* @__PURE__ */ (0,
|
|
6169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5551
6170
|
"a",
|
|
5552
6171
|
{
|
|
5553
6172
|
ref,
|
|
@@ -5561,7 +6180,7 @@ var NavItem = (0, import_react73.forwardRef)(
|
|
|
5561
6180
|
);
|
|
5562
6181
|
}
|
|
5563
6182
|
const buttonProps = props;
|
|
5564
|
-
return /* @__PURE__ */ (0,
|
|
6183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5565
6184
|
"button",
|
|
5566
6185
|
{
|
|
5567
6186
|
ref,
|
|
@@ -5576,7 +6195,7 @@ var NavItem = (0, import_react73.forwardRef)(
|
|
|
5576
6195
|
}
|
|
5577
6196
|
);
|
|
5578
6197
|
NavItem.displayName = "NavItem";
|
|
5579
|
-
var NavSection = (0,
|
|
6198
|
+
var NavSection = (0, import_react74.forwardRef)(function NavSection2({
|
|
5580
6199
|
label,
|
|
5581
6200
|
icon,
|
|
5582
6201
|
action,
|
|
@@ -5590,16 +6209,16 @@ var NavSection = (0, import_react73.forwardRef)(function NavSection2({
|
|
|
5590
6209
|
...props
|
|
5591
6210
|
}, ref) {
|
|
5592
6211
|
const isControlled = open !== void 0;
|
|
5593
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
6212
|
+
const [internalOpen, setInternalOpen] = (0, import_react74.useState)(defaultOpen);
|
|
5594
6213
|
const isOpen = !collapsible || (isControlled ? open : internalOpen);
|
|
5595
|
-
const toggle = (0,
|
|
6214
|
+
const toggle = (0, import_react74.useCallback)(() => {
|
|
5596
6215
|
const next = !isOpen;
|
|
5597
6216
|
if (!isControlled) setInternalOpen(next);
|
|
5598
6217
|
onOpenChange?.(next);
|
|
5599
6218
|
}, [isOpen, isControlled, onOpenChange]);
|
|
5600
6219
|
const eyebrowClass = "text-text-dim flex items-center gap-[6px] px-2 pt-2 font-mono text-[9px] tracking-[1.4px] uppercase";
|
|
5601
|
-
return /* @__PURE__ */ (0,
|
|
5602
|
-
collapsible ? /* @__PURE__ */ (0,
|
|
6220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { ref, className: cn("flex flex-col gap-1", className), ...props, children: [
|
|
6221
|
+
collapsible ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
5603
6222
|
"button",
|
|
5604
6223
|
{
|
|
5605
6224
|
type: "button",
|
|
@@ -5612,18 +6231,18 @@ var NavSection = (0, import_react73.forwardRef)(function NavSection2({
|
|
|
5612
6231
|
"hover:text-text-muted"
|
|
5613
6232
|
),
|
|
5614
6233
|
children: [
|
|
5615
|
-
icon != null && /* @__PURE__ */ (0,
|
|
5616
|
-
/* @__PURE__ */ (0,
|
|
6234
|
+
icon != null && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: icon }),
|
|
6235
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "flex-1 text-left", children: label }),
|
|
5617
6236
|
action,
|
|
5618
|
-
/* @__PURE__ */ (0,
|
|
6237
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { "aria-hidden": true, className: "text-[10px] opacity-70", children: isOpen ? "\u25BE" : "\u25B8" })
|
|
5619
6238
|
]
|
|
5620
6239
|
}
|
|
5621
|
-
) : /* @__PURE__ */ (0,
|
|
5622
|
-
icon != null && /* @__PURE__ */ (0,
|
|
5623
|
-
/* @__PURE__ */ (0,
|
|
6240
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: eyebrowClass, children: [
|
|
6241
|
+
icon != null && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: icon }),
|
|
6242
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "flex-1", children: label }),
|
|
5624
6243
|
action
|
|
5625
6244
|
] }),
|
|
5626
|
-
isOpen && /* @__PURE__ */ (0,
|
|
6245
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5627
6246
|
"div",
|
|
5628
6247
|
{
|
|
5629
6248
|
className: cn("flex flex-col gap-[2px]", indent > 0 && "border-border ml-2 border-l"),
|
|
@@ -5636,12 +6255,12 @@ var NavSection = (0, import_react73.forwardRef)(function NavSection2({
|
|
|
5636
6255
|
NavSection.displayName = "NavSection";
|
|
5637
6256
|
|
|
5638
6257
|
// src/patterns/NavBar/NavBar.tsx
|
|
5639
|
-
var
|
|
6258
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5640
6259
|
function isActiveTree(item, activeId) {
|
|
5641
6260
|
if (item.id === activeId) return true;
|
|
5642
6261
|
return item.children?.some((c) => isActiveTree(c, activeId)) ?? false;
|
|
5643
6262
|
}
|
|
5644
|
-
var NavBar = (0,
|
|
6263
|
+
var NavBar = (0, import_react75.forwardRef)(function NavBar2({
|
|
5645
6264
|
orientation = "horizontal",
|
|
5646
6265
|
items,
|
|
5647
6266
|
brand,
|
|
@@ -5655,17 +6274,17 @@ var NavBar = (0, import_react74.forwardRef)(function NavBar2({
|
|
|
5655
6274
|
...props
|
|
5656
6275
|
}, ref) {
|
|
5657
6276
|
const isControlled = value !== void 0;
|
|
5658
|
-
const [internalValue, setInternalValue] = (0,
|
|
6277
|
+
const [internalValue, setInternalValue] = (0, import_react75.useState)(defaultValue);
|
|
5659
6278
|
const activeId = isControlled ? value : internalValue;
|
|
5660
|
-
const [drawerOpen, setDrawerOpen] = (0,
|
|
5661
|
-
const select = (0,
|
|
6279
|
+
const [drawerOpen, setDrawerOpen] = (0, import_react75.useState)(false);
|
|
6280
|
+
const select = (0, import_react75.useCallback)(
|
|
5662
6281
|
(id) => {
|
|
5663
6282
|
if (!isControlled) setInternalValue(id);
|
|
5664
6283
|
onValueChange?.(id);
|
|
5665
6284
|
},
|
|
5666
6285
|
[isControlled, onValueChange]
|
|
5667
6286
|
);
|
|
5668
|
-
const handleItemActivate = (0,
|
|
6287
|
+
const handleItemActivate = (0, import_react75.useCallback)(
|
|
5669
6288
|
(id) => {
|
|
5670
6289
|
select(id);
|
|
5671
6290
|
setDrawerOpen(false);
|
|
@@ -5677,7 +6296,7 @@ var NavBar = (0, import_react74.forwardRef)(function NavBar2({
|
|
|
5677
6296
|
// drawer is open on a viewport that's resizing past `md`, both navs can
|
|
5678
6297
|
// sit in the DOM together. Identical accessible names would trip axe's
|
|
5679
6298
|
// `landmark-unique` rule.
|
|
5680
|
-
/* @__PURE__ */ (0,
|
|
6299
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("nav", { "aria-label": "Mobile navigation", className: "flex flex-col gap-1", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5681
6300
|
VerticalItem,
|
|
5682
6301
|
{
|
|
5683
6302
|
item,
|
|
@@ -5687,14 +6306,14 @@ var NavBar = (0, import_react74.forwardRef)(function NavBar2({
|
|
|
5687
6306
|
item.id
|
|
5688
6307
|
)) })
|
|
5689
6308
|
);
|
|
5690
|
-
const mobileBar = responsive ? /* @__PURE__ */ (0,
|
|
6309
|
+
const mobileBar = responsive ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5691
6310
|
"div",
|
|
5692
6311
|
{
|
|
5693
6312
|
className: cn(
|
|
5694
6313
|
"border-border bg-panel z-overlay sticky top-0 flex h-[52px] items-center gap-4 border-b px-5 md:hidden"
|
|
5695
6314
|
),
|
|
5696
6315
|
children: [
|
|
5697
|
-
/* @__PURE__ */ (0,
|
|
6316
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5698
6317
|
"button",
|
|
5699
6318
|
{
|
|
5700
6319
|
type: "button",
|
|
@@ -5704,15 +6323,15 @@ var NavBar = (0, import_react74.forwardRef)(function NavBar2({
|
|
|
5704
6323
|
children: "\u2630"
|
|
5705
6324
|
}
|
|
5706
6325
|
),
|
|
5707
|
-
brand && /* @__PURE__ */ (0,
|
|
5708
|
-
actions && /* @__PURE__ */ (0,
|
|
6326
|
+
brand && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex flex-1 items-center text-[13px] font-medium whitespace-nowrap", children: brand }),
|
|
6327
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex items-center gap-3", children: actions })
|
|
5709
6328
|
]
|
|
5710
6329
|
}
|
|
5711
6330
|
) : null;
|
|
5712
6331
|
if (orientation === "horizontal") {
|
|
5713
|
-
return /* @__PURE__ */ (0,
|
|
6332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
5714
6333
|
mobileBar,
|
|
5715
|
-
/* @__PURE__ */ (0,
|
|
6334
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5716
6335
|
"header",
|
|
5717
6336
|
{
|
|
5718
6337
|
ref,
|
|
@@ -5723,10 +6342,10 @@ var NavBar = (0, import_react74.forwardRef)(function NavBar2({
|
|
|
5723
6342
|
),
|
|
5724
6343
|
...props,
|
|
5725
6344
|
children: [
|
|
5726
|
-
brand && /* @__PURE__ */ (0,
|
|
5727
|
-
/* @__PURE__ */ (0,
|
|
5728
|
-
/* @__PURE__ */ (0,
|
|
5729
|
-
(item) => item.children?.length ? /* @__PURE__ */ (0,
|
|
6345
|
+
brand && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "shrink-0 text-[13px] font-medium whitespace-nowrap", children: brand }),
|
|
6346
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(RadixNav.Root, { className: "relative flex-1", delayDuration: 120, children: [
|
|
6347
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(RadixNav.List, { className: "m-0! flex list-none! items-center gap-1 p-0! [&_li]:m-0!", children: items.map(
|
|
6348
|
+
(item) => item.children?.length ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5730
6349
|
HorizontalDropdown,
|
|
5731
6350
|
{
|
|
5732
6351
|
item,
|
|
@@ -5735,7 +6354,7 @@ var NavBar = (0, import_react74.forwardRef)(function NavBar2({
|
|
|
5735
6354
|
onActivate: handleItemActivate
|
|
5736
6355
|
},
|
|
5737
6356
|
item.id
|
|
5738
|
-
) : /* @__PURE__ */ (0,
|
|
6357
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(RadixNav.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5739
6358
|
HorizontalLink,
|
|
5740
6359
|
{
|
|
5741
6360
|
item,
|
|
@@ -5744,13 +6363,13 @@ var NavBar = (0, import_react74.forwardRef)(function NavBar2({
|
|
|
5744
6363
|
}
|
|
5745
6364
|
) }, item.id)
|
|
5746
6365
|
) }),
|
|
5747
|
-
/* @__PURE__ */ (0,
|
|
6366
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "z-popover absolute top-full left-0 flex justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(RadixNav.Viewport, { className: "origin-top-left data-[state=open]:animate-[ship-fade-in_120ms_var(--easing-out)]" }) })
|
|
5748
6367
|
] }),
|
|
5749
|
-
actions && /* @__PURE__ */ (0,
|
|
6368
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex items-center gap-3", children: actions })
|
|
5750
6369
|
]
|
|
5751
6370
|
}
|
|
5752
6371
|
),
|
|
5753
|
-
responsive && /* @__PURE__ */ (0,
|
|
6372
|
+
responsive && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5754
6373
|
Drawer,
|
|
5755
6374
|
{
|
|
5756
6375
|
open: drawerOpen,
|
|
@@ -5763,9 +6382,9 @@ var NavBar = (0, import_react74.forwardRef)(function NavBar2({
|
|
|
5763
6382
|
)
|
|
5764
6383
|
] });
|
|
5765
6384
|
}
|
|
5766
|
-
return /* @__PURE__ */ (0,
|
|
6385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
5767
6386
|
mobileBar,
|
|
5768
|
-
/* @__PURE__ */ (0,
|
|
6387
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5769
6388
|
"aside",
|
|
5770
6389
|
{
|
|
5771
6390
|
ref,
|
|
@@ -5778,8 +6397,8 @@ var NavBar = (0, import_react74.forwardRef)(function NavBar2({
|
|
|
5778
6397
|
),
|
|
5779
6398
|
...props,
|
|
5780
6399
|
children: [
|
|
5781
|
-
brand && /* @__PURE__ */ (0,
|
|
5782
|
-
/* @__PURE__ */ (0,
|
|
6400
|
+
brand && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "px-2 py-1 text-[13px] font-medium", children: brand }),
|
|
6401
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("nav", { "aria-label": "Sidebar navigation", className: "flex flex-1 flex-col gap-1 overflow-y-auto", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5783
6402
|
VerticalItem,
|
|
5784
6403
|
{
|
|
5785
6404
|
item,
|
|
@@ -5788,11 +6407,11 @@ var NavBar = (0, import_react74.forwardRef)(function NavBar2({
|
|
|
5788
6407
|
},
|
|
5789
6408
|
item.id
|
|
5790
6409
|
)) }),
|
|
5791
|
-
actions && /* @__PURE__ */ (0,
|
|
6410
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "border-border mt-auto flex flex-col gap-2 border-t pt-3", children: actions })
|
|
5792
6411
|
]
|
|
5793
6412
|
}
|
|
5794
6413
|
),
|
|
5795
|
-
responsive && /* @__PURE__ */ (0,
|
|
6414
|
+
responsive && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5796
6415
|
Drawer,
|
|
5797
6416
|
{
|
|
5798
6417
|
open: drawerOpen,
|
|
@@ -5821,13 +6440,13 @@ function HorizontalLink({ item, active, onActivate }) {
|
|
|
5821
6440
|
}
|
|
5822
6441
|
onActivate(item.id);
|
|
5823
6442
|
};
|
|
5824
|
-
const inner = /* @__PURE__ */ (0,
|
|
5825
|
-
item.icon != null && /* @__PURE__ */ (0,
|
|
5826
|
-
/* @__PURE__ */ (0,
|
|
5827
|
-
item.badge != null && /* @__PURE__ */ (0,
|
|
6443
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
6444
|
+
item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: item.icon }),
|
|
6445
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: item.label }),
|
|
6446
|
+
item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ItemBadge, { active, children: item.badge })
|
|
5828
6447
|
] });
|
|
5829
6448
|
if (item.href) {
|
|
5830
|
-
return /* @__PURE__ */ (0,
|
|
6449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(RadixNav.Link, { asChild: true, active, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5831
6450
|
"a",
|
|
5832
6451
|
{
|
|
5833
6452
|
href: item.href,
|
|
@@ -5839,7 +6458,7 @@ function HorizontalLink({ item, active, onActivate }) {
|
|
|
5839
6458
|
}
|
|
5840
6459
|
) });
|
|
5841
6460
|
}
|
|
5842
|
-
return /* @__PURE__ */ (0,
|
|
6461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(RadixNav.Link, { asChild: true, active, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5843
6462
|
"button",
|
|
5844
6463
|
{
|
|
5845
6464
|
type: "button",
|
|
@@ -5852,8 +6471,8 @@ function HorizontalLink({ item, active, onActivate }) {
|
|
|
5852
6471
|
) });
|
|
5853
6472
|
}
|
|
5854
6473
|
function HorizontalDropdown({ item, active, activeId, onActivate }) {
|
|
5855
|
-
return /* @__PURE__ */ (0,
|
|
5856
|
-
/* @__PURE__ */ (0,
|
|
6474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(RadixNav.Item, { children: [
|
|
6475
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5857
6476
|
RadixNav.Trigger,
|
|
5858
6477
|
{
|
|
5859
6478
|
className: cn(
|
|
@@ -5865,9 +6484,9 @@ function HorizontalDropdown({ item, active, activeId, onActivate }) {
|
|
|
5865
6484
|
),
|
|
5866
6485
|
disabled: item.disabled,
|
|
5867
6486
|
children: [
|
|
5868
|
-
item.icon != null && /* @__PURE__ */ (0,
|
|
5869
|
-
/* @__PURE__ */ (0,
|
|
5870
|
-
/* @__PURE__ */ (0,
|
|
6487
|
+
item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: item.icon }),
|
|
6488
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: item.label }),
|
|
6489
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5871
6490
|
"span",
|
|
5872
6491
|
{
|
|
5873
6492
|
"aria-hidden": true,
|
|
@@ -5878,7 +6497,7 @@ function HorizontalDropdown({ item, active, activeId, onActivate }) {
|
|
|
5878
6497
|
]
|
|
5879
6498
|
}
|
|
5880
6499
|
),
|
|
5881
|
-
/* @__PURE__ */ (0,
|
|
6500
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(RadixNav.Content, { className: "border-border bg-panel min-w-[220px] rounded-xs border p-2 shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("ul", { className: "m-0! flex list-none! flex-col gap-[2px] p-0! [&_li]:m-0!", children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(DropdownLink, { item: child, active: child.id === activeId, onActivate }) }, child.id)) }) })
|
|
5882
6501
|
] });
|
|
5883
6502
|
}
|
|
5884
6503
|
function DropdownLink({ item, active, onActivate }) {
|
|
@@ -5895,13 +6514,13 @@ function DropdownLink({ item, active, onActivate }) {
|
|
|
5895
6514
|
}
|
|
5896
6515
|
onActivate(item.id);
|
|
5897
6516
|
};
|
|
5898
|
-
const inner = /* @__PURE__ */ (0,
|
|
5899
|
-
item.icon != null && /* @__PURE__ */ (0,
|
|
5900
|
-
/* @__PURE__ */ (0,
|
|
5901
|
-
item.badge != null && /* @__PURE__ */ (0,
|
|
6517
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
6518
|
+
item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: item.icon }),
|
|
6519
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "flex-1", children: item.label }),
|
|
6520
|
+
item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ItemBadge, { active, children: item.badge })
|
|
5902
6521
|
] });
|
|
5903
6522
|
if (item.href) {
|
|
5904
|
-
return /* @__PURE__ */ (0,
|
|
6523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(RadixNav.Link, { asChild: true, active, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5905
6524
|
"a",
|
|
5906
6525
|
{
|
|
5907
6526
|
href: item.href,
|
|
@@ -5913,7 +6532,7 @@ function DropdownLink({ item, active, onActivate }) {
|
|
|
5913
6532
|
}
|
|
5914
6533
|
) });
|
|
5915
6534
|
}
|
|
5916
|
-
return /* @__PURE__ */ (0,
|
|
6535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(RadixNav.Link, { asChild: true, active, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5917
6536
|
"button",
|
|
5918
6537
|
{
|
|
5919
6538
|
type: "button",
|
|
@@ -5928,9 +6547,9 @@ function DropdownLink({ item, active, onActivate }) {
|
|
|
5928
6547
|
function VerticalItem({ item, activeId, onActivate }) {
|
|
5929
6548
|
const hasChildren = (item.children?.length ?? 0) > 0;
|
|
5930
6549
|
const treeActive = isActiveTree(item, activeId);
|
|
5931
|
-
const [open, setOpen] = (0,
|
|
5932
|
-
const prevTreeActive = (0,
|
|
5933
|
-
(0,
|
|
6550
|
+
const [open, setOpen] = (0, import_react75.useState)(treeActive);
|
|
6551
|
+
const prevTreeActive = (0, import_react75.useRef)(treeActive);
|
|
6552
|
+
(0, import_react75.useEffect)(() => {
|
|
5934
6553
|
if (treeActive && !prevTreeActive.current) setOpen(true);
|
|
5935
6554
|
prevTreeActive.current = treeActive;
|
|
5936
6555
|
}, [treeActive]);
|
|
@@ -5942,7 +6561,7 @@ function VerticalItem({ item, activeId, onActivate }) {
|
|
|
5942
6561
|
}
|
|
5943
6562
|
onActivate(item.id);
|
|
5944
6563
|
};
|
|
5945
|
-
return /* @__PURE__ */ (0,
|
|
6564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5946
6565
|
NavItem,
|
|
5947
6566
|
{
|
|
5948
6567
|
icon: item.icon,
|
|
@@ -5955,8 +6574,8 @@ function VerticalItem({ item, activeId, onActivate }) {
|
|
|
5955
6574
|
}
|
|
5956
6575
|
);
|
|
5957
6576
|
}
|
|
5958
|
-
return /* @__PURE__ */ (0,
|
|
5959
|
-
/* @__PURE__ */ (0,
|
|
6577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex flex-col", children: [
|
|
6578
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5960
6579
|
"button",
|
|
5961
6580
|
{
|
|
5962
6581
|
type: "button",
|
|
@@ -5972,18 +6591,18 @@ function VerticalItem({ item, activeId, onActivate }) {
|
|
|
5972
6591
|
item.disabled && "pointer-events-none opacity-50"
|
|
5973
6592
|
),
|
|
5974
6593
|
children: [
|
|
5975
|
-
item.icon != null && /* @__PURE__ */ (0,
|
|
5976
|
-
/* @__PURE__ */ (0,
|
|
5977
|
-
item.badge != null && /* @__PURE__ */ (0,
|
|
5978
|
-
/* @__PURE__ */ (0,
|
|
6594
|
+
item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { "aria-hidden": true, className: "w-[14px] text-center opacity-80", children: item.icon }),
|
|
6595
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "flex-1 truncate", children: item.label }),
|
|
6596
|
+
item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ItemBadge, { active: treeActive, children: item.badge }),
|
|
6597
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { "aria-hidden": true, className: "text-[10px] opacity-60", children: open ? "\u25BE" : "\u25B8" })
|
|
5979
6598
|
]
|
|
5980
6599
|
}
|
|
5981
6600
|
),
|
|
5982
|
-
open && /* @__PURE__ */ (0,
|
|
6601
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "border-border mt-1 ml-[18px] flex flex-col gap-[2px] border-l pl-3", children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(VerticalItem, { item: child, activeId, onActivate }, child.id)) })
|
|
5983
6602
|
] });
|
|
5984
6603
|
}
|
|
5985
6604
|
function ItemBadge({ active, children }) {
|
|
5986
|
-
return /* @__PURE__ */ (0,
|
|
6605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5987
6606
|
"span",
|
|
5988
6607
|
{
|
|
5989
6608
|
className: cn(
|
|
@@ -5996,8 +6615,8 @@ function ItemBadge({ active, children }) {
|
|
|
5996
6615
|
}
|
|
5997
6616
|
|
|
5998
6617
|
// src/patterns/OnboardingChecklist/OnboardingChecklist.tsx
|
|
5999
|
-
var
|
|
6000
|
-
var
|
|
6618
|
+
var import_react76 = require("react");
|
|
6619
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
6001
6620
|
var statusDot = {
|
|
6002
6621
|
pending: "off",
|
|
6003
6622
|
"in-progress": "sync",
|
|
@@ -6008,11 +6627,11 @@ var labelStateClass = {
|
|
|
6008
6627
|
"in-progress": "text-text",
|
|
6009
6628
|
done: "text-text-dim line-through"
|
|
6010
6629
|
};
|
|
6011
|
-
var OnboardingChecklist = (0,
|
|
6630
|
+
var OnboardingChecklist = (0, import_react76.forwardRef)(
|
|
6012
6631
|
function OnboardingChecklist2({ items, onItemClick, title = "Get started", progressLabel, hideProgress, className, ...props }, ref) {
|
|
6013
6632
|
const total = items.length;
|
|
6014
6633
|
const done = items.filter((i) => i.status === "done").length;
|
|
6015
|
-
return /* @__PURE__ */ (0,
|
|
6634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6016
6635
|
"section",
|
|
6017
6636
|
{
|
|
6018
6637
|
ref,
|
|
@@ -6023,11 +6642,11 @@ var OnboardingChecklist = (0, import_react75.forwardRef)(
|
|
|
6023
6642
|
),
|
|
6024
6643
|
...props,
|
|
6025
6644
|
children: [
|
|
6026
|
-
/* @__PURE__ */ (0,
|
|
6027
|
-
/* @__PURE__ */ (0,
|
|
6028
|
-
/* @__PURE__ */ (0,
|
|
6645
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("header", { className: "flex items-center gap-2", children: [
|
|
6646
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-[14px] font-medium", children: title }),
|
|
6647
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-text-dim ml-auto font-mono text-[11px] tabular-nums", children: progressLabel ?? `${done} of ${total} complete` })
|
|
6029
6648
|
] }),
|
|
6030
|
-
!hideProgress && total > 0 && /* @__PURE__ */ (0,
|
|
6649
|
+
!hideProgress && total > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6031
6650
|
"div",
|
|
6032
6651
|
{
|
|
6033
6652
|
role: "progressbar",
|
|
@@ -6036,7 +6655,7 @@ var OnboardingChecklist = (0, import_react75.forwardRef)(
|
|
|
6036
6655
|
"aria-valuenow": done,
|
|
6037
6656
|
"aria-label": typeof title === "string" ? `${title} progress` : "Setup progress",
|
|
6038
6657
|
className: "bg-panel-2 h-[3px] w-full overflow-hidden rounded-full",
|
|
6039
|
-
children: /* @__PURE__ */ (0,
|
|
6658
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6040
6659
|
"span",
|
|
6041
6660
|
{
|
|
6042
6661
|
"aria-hidden": true,
|
|
@@ -6049,10 +6668,10 @@ var OnboardingChecklist = (0, import_react75.forwardRef)(
|
|
|
6049
6668
|
)
|
|
6050
6669
|
}
|
|
6051
6670
|
),
|
|
6052
|
-
/* @__PURE__ */ (0,
|
|
6671
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("ul", { className: "m-0 flex list-none flex-col gap-1 p-0", children: items.map((item) => {
|
|
6053
6672
|
const interactive = typeof onItemClick === "function";
|
|
6054
|
-
const labelBlock = /* @__PURE__ */ (0,
|
|
6055
|
-
/* @__PURE__ */ (0,
|
|
6673
|
+
const labelBlock = /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
|
|
6674
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6056
6675
|
StatusDot,
|
|
6057
6676
|
{
|
|
6058
6677
|
state: statusDot[item.status],
|
|
@@ -6061,17 +6680,17 @@ var OnboardingChecklist = (0, import_react75.forwardRef)(
|
|
|
6061
6680
|
className: "mt-[3px]"
|
|
6062
6681
|
}
|
|
6063
6682
|
),
|
|
6064
|
-
/* @__PURE__ */ (0,
|
|
6065
|
-
/* @__PURE__ */ (0,
|
|
6066
|
-
item.description && /* @__PURE__ */ (0,
|
|
6683
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
|
|
6684
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: cn("text-[13px]", labelStateClass[item.status]), children: item.label }),
|
|
6685
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-text-muted text-[12px] leading-[1.45]", children: item.description })
|
|
6067
6686
|
] })
|
|
6068
6687
|
] });
|
|
6069
6688
|
const labelRegionClass = cn(
|
|
6070
6689
|
"flex flex-1 items-start gap-3 rounded-md px-2 py-2 text-left transition-colors duration-(--duration-micro)",
|
|
6071
6690
|
interactive && "cursor-pointer outline-none hover:bg-panel-2 focus-visible:ring-[3px] focus-visible:ring-accent-dim"
|
|
6072
6691
|
);
|
|
6073
|
-
return /* @__PURE__ */ (0,
|
|
6074
|
-
interactive ? /* @__PURE__ */ (0,
|
|
6692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("li", { className: "flex items-start gap-2", children: [
|
|
6693
|
+
interactive ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6075
6694
|
"button",
|
|
6076
6695
|
{
|
|
6077
6696
|
type: "button",
|
|
@@ -6080,8 +6699,8 @@ var OnboardingChecklist = (0, import_react75.forwardRef)(
|
|
|
6080
6699
|
className: labelRegionClass,
|
|
6081
6700
|
children: labelBlock
|
|
6082
6701
|
}
|
|
6083
|
-
) : /* @__PURE__ */ (0,
|
|
6084
|
-
item.action && /* @__PURE__ */ (0,
|
|
6702
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: labelRegionClass, children: labelBlock }),
|
|
6703
|
+
item.action && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "shrink-0 self-center", children: item.action })
|
|
6085
6704
|
] }, item.id);
|
|
6086
6705
|
}) })
|
|
6087
6706
|
]
|
|
@@ -6092,8 +6711,8 @@ var OnboardingChecklist = (0, import_react75.forwardRef)(
|
|
|
6092
6711
|
OnboardingChecklist.displayName = "OnboardingChecklist";
|
|
6093
6712
|
|
|
6094
6713
|
// src/patterns/Pagination/Pagination.tsx
|
|
6095
|
-
var
|
|
6096
|
-
var
|
|
6714
|
+
var import_react77 = require("react");
|
|
6715
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
6097
6716
|
function buildRange(page, total, siblings) {
|
|
6098
6717
|
if (total <= 0) return [];
|
|
6099
6718
|
const items = [];
|
|
@@ -6106,9 +6725,9 @@ function buildRange(page, total, siblings) {
|
|
|
6106
6725
|
if (total > 1) items.push(total);
|
|
6107
6726
|
return items;
|
|
6108
6727
|
}
|
|
6109
|
-
var Pagination = (0,
|
|
6728
|
+
var Pagination = (0, import_react77.forwardRef)(function Pagination2({ page, total, onPageChange, siblings = 1, className, ...props }, ref) {
|
|
6110
6729
|
const items = buildRange(page, total, siblings);
|
|
6111
|
-
return /* @__PURE__ */ (0,
|
|
6730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
6112
6731
|
"nav",
|
|
6113
6732
|
{
|
|
6114
6733
|
ref,
|
|
@@ -6116,7 +6735,7 @@ var Pagination = (0, import_react76.forwardRef)(function Pagination2({ page, tot
|
|
|
6116
6735
|
className: cn("inline-flex items-center gap-1", className),
|
|
6117
6736
|
...props,
|
|
6118
6737
|
children: [
|
|
6119
|
-
/* @__PURE__ */ (0,
|
|
6738
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6120
6739
|
IconButton,
|
|
6121
6740
|
{
|
|
6122
6741
|
size: "sm",
|
|
@@ -6129,7 +6748,7 @@ var Pagination = (0, import_react76.forwardRef)(function Pagination2({ page, tot
|
|
|
6129
6748
|
),
|
|
6130
6749
|
items.map((item, i) => {
|
|
6131
6750
|
if (item === "start-ellipsis" || item === "end-ellipsis") {
|
|
6132
|
-
return /* @__PURE__ */ (0,
|
|
6751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6133
6752
|
"span",
|
|
6134
6753
|
{
|
|
6135
6754
|
"aria-hidden": true,
|
|
@@ -6140,7 +6759,7 @@ var Pagination = (0, import_react76.forwardRef)(function Pagination2({ page, tot
|
|
|
6140
6759
|
);
|
|
6141
6760
|
}
|
|
6142
6761
|
const isActive = item === page;
|
|
6143
|
-
return /* @__PURE__ */ (0,
|
|
6762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6144
6763
|
"button",
|
|
6145
6764
|
{
|
|
6146
6765
|
type: "button",
|
|
@@ -6158,7 +6777,7 @@ var Pagination = (0, import_react76.forwardRef)(function Pagination2({ page, tot
|
|
|
6158
6777
|
item
|
|
6159
6778
|
);
|
|
6160
6779
|
}),
|
|
6161
|
-
/* @__PURE__ */ (0,
|
|
6780
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6162
6781
|
IconButton,
|
|
6163
6782
|
{
|
|
6164
6783
|
size: "sm",
|
|
@@ -6176,10 +6795,10 @@ var Pagination = (0, import_react76.forwardRef)(function Pagination2({ page, tot
|
|
|
6176
6795
|
Pagination.displayName = "Pagination";
|
|
6177
6796
|
|
|
6178
6797
|
// src/patterns/Progress/Progress.tsx
|
|
6179
|
-
var
|
|
6180
|
-
var
|
|
6181
|
-
var
|
|
6182
|
-
var trackStyles = (0,
|
|
6798
|
+
var import_class_variance_authority13 = require("class-variance-authority");
|
|
6799
|
+
var import_react78 = require("react");
|
|
6800
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
6801
|
+
var trackStyles = (0, import_class_variance_authority13.cva)("w-full rounded-full bg-panel-2 overflow-hidden", {
|
|
6183
6802
|
variants: {
|
|
6184
6803
|
size: {
|
|
6185
6804
|
sm: "h-[3px]",
|
|
@@ -6189,7 +6808,7 @@ var trackStyles = (0, import_class_variance_authority12.cva)("w-full rounded-ful
|
|
|
6189
6808
|
},
|
|
6190
6809
|
defaultVariants: { size: "md" }
|
|
6191
6810
|
});
|
|
6192
|
-
var fillStyles = (0,
|
|
6811
|
+
var fillStyles = (0, import_class_variance_authority13.cva)("h-full rounded-full transition-[width] duration-(--duration-step)", {
|
|
6193
6812
|
variants: {
|
|
6194
6813
|
tone: {
|
|
6195
6814
|
accent: "bg-accent",
|
|
@@ -6200,7 +6819,7 @@ var fillStyles = (0, import_class_variance_authority12.cva)("h-full rounded-full
|
|
|
6200
6819
|
},
|
|
6201
6820
|
defaultVariants: { tone: "accent" }
|
|
6202
6821
|
});
|
|
6203
|
-
var Progress = (0,
|
|
6822
|
+
var Progress = (0, import_react78.forwardRef)(function Progress2({
|
|
6204
6823
|
value = 0,
|
|
6205
6824
|
max = 100,
|
|
6206
6825
|
indeterminate = false,
|
|
@@ -6214,15 +6833,15 @@ var Progress = (0, import_react77.forwardRef)(function Progress2({
|
|
|
6214
6833
|
const clamped = Math.min(max, Math.max(0, value));
|
|
6215
6834
|
const pct = max > 0 ? clamped / max * 100 : 0;
|
|
6216
6835
|
const display = Math.round(pct);
|
|
6217
|
-
return /* @__PURE__ */ (0,
|
|
6218
|
-
label != null && /* @__PURE__ */ (0,
|
|
6219
|
-
/* @__PURE__ */ (0,
|
|
6220
|
-
showValue && !indeterminate && /* @__PURE__ */ (0,
|
|
6836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { ref, className: cn("flex w-full flex-col gap-2", className), ...props, children: [
|
|
6837
|
+
label != null && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex text-[12px]", children: [
|
|
6838
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-text-muted", children: label }),
|
|
6839
|
+
showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "text-text ml-auto font-mono tabular-nums", children: [
|
|
6221
6840
|
display,
|
|
6222
6841
|
"%"
|
|
6223
6842
|
] })
|
|
6224
6843
|
] }),
|
|
6225
|
-
/* @__PURE__ */ (0,
|
|
6844
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6226
6845
|
"div",
|
|
6227
6846
|
{
|
|
6228
6847
|
role: "progressbar",
|
|
@@ -6231,7 +6850,7 @@ var Progress = (0, import_react77.forwardRef)(function Progress2({
|
|
|
6231
6850
|
"aria-valuenow": indeterminate ? void 0 : display,
|
|
6232
6851
|
"aria-label": typeof label === "string" ? label : void 0,
|
|
6233
6852
|
className: trackStyles({ size }),
|
|
6234
|
-
children: indeterminate ? /* @__PURE__ */ (0,
|
|
6853
|
+
children: indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6235
6854
|
"span",
|
|
6236
6855
|
{
|
|
6237
6856
|
"aria-hidden": true,
|
|
@@ -6241,7 +6860,7 @@ var Progress = (0, import_react77.forwardRef)(function Progress2({
|
|
|
6241
6860
|
"animate-[ship-indeterminate_1.4s_linear_infinite]"
|
|
6242
6861
|
)
|
|
6243
6862
|
}
|
|
6244
|
-
) : /* @__PURE__ */ (0,
|
|
6863
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { "aria-hidden": true, className: fillStyles({ tone }), style: { width: `${pct}%` } })
|
|
6245
6864
|
}
|
|
6246
6865
|
)
|
|
6247
6866
|
] });
|
|
@@ -6249,18 +6868,18 @@ var Progress = (0, import_react77.forwardRef)(function Progress2({
|
|
|
6249
6868
|
Progress.displayName = "Progress";
|
|
6250
6869
|
|
|
6251
6870
|
// src/patterns/PullToRefresh/PullToRefresh.tsx
|
|
6252
|
-
var
|
|
6253
|
-
var
|
|
6871
|
+
var import_react79 = require("react");
|
|
6872
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6254
6873
|
var labels = {
|
|
6255
6874
|
idle: "Pull to refresh",
|
|
6256
6875
|
pulling: "Pull to refresh",
|
|
6257
6876
|
ready: "Release to refresh",
|
|
6258
6877
|
loading: "Refreshing\u2026"
|
|
6259
6878
|
};
|
|
6260
|
-
var PullToRefresh = (0,
|
|
6879
|
+
var PullToRefresh = (0, import_react79.forwardRef)(function PullToRefresh2({ state = "idle", label, className, ...props }, ref) {
|
|
6261
6880
|
const isLoading = state === "loading";
|
|
6262
6881
|
const transform = state === "ready" ? "rotate(180deg)" : state === "pulling" ? "rotate(90deg)" : "rotate(0deg)";
|
|
6263
|
-
return /* @__PURE__ */ (0,
|
|
6882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
6264
6883
|
"div",
|
|
6265
6884
|
{
|
|
6266
6885
|
ref,
|
|
@@ -6270,7 +6889,7 @@ var PullToRefresh = (0, import_react78.forwardRef)(function PullToRefresh2({ sta
|
|
|
6270
6889
|
className: cn("text-text-muted flex flex-col items-center gap-[6px] py-3", className),
|
|
6271
6890
|
...props,
|
|
6272
6891
|
children: [
|
|
6273
|
-
/* @__PURE__ */ (0,
|
|
6892
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6274
6893
|
"div",
|
|
6275
6894
|
{
|
|
6276
6895
|
"aria-hidden": true,
|
|
@@ -6286,7 +6905,7 @@ var PullToRefresh = (0, import_react78.forwardRef)(function PullToRefresh2({ sta
|
|
|
6286
6905
|
}
|
|
6287
6906
|
}
|
|
6288
6907
|
),
|
|
6289
|
-
/* @__PURE__ */ (0,
|
|
6908
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-m-eyebrow font-mono tracking-wide uppercase", children: label ?? labels[state] })
|
|
6290
6909
|
]
|
|
6291
6910
|
}
|
|
6292
6911
|
);
|
|
@@ -6294,8 +6913,8 @@ var PullToRefresh = (0, import_react78.forwardRef)(function PullToRefresh2({ sta
|
|
|
6294
6913
|
PullToRefresh.displayName = "PullToRefresh";
|
|
6295
6914
|
|
|
6296
6915
|
// src/patterns/Sparkline/Sparkline.tsx
|
|
6297
|
-
var
|
|
6298
|
-
var
|
|
6916
|
+
var import_react80 = require("react");
|
|
6917
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6299
6918
|
function buildPath(values, w, h) {
|
|
6300
6919
|
if (values.length === 0) return { line: "", area: "" };
|
|
6301
6920
|
const pad = 2;
|
|
@@ -6314,7 +6933,7 @@ function buildPath(values, w, h) {
|
|
|
6314
6933
|
)} L${pad.toFixed(2)},${(h - pad).toFixed(2)} Z`;
|
|
6315
6934
|
return { line, area };
|
|
6316
6935
|
}
|
|
6317
|
-
var Sparkline = (0,
|
|
6936
|
+
var Sparkline = (0, import_react80.forwardRef)(function Sparkline2({
|
|
6318
6937
|
values,
|
|
6319
6938
|
width = 160,
|
|
6320
6939
|
height = 32,
|
|
@@ -6325,8 +6944,8 @@ var Sparkline = (0, import_react79.forwardRef)(function Sparkline2({
|
|
|
6325
6944
|
"aria-label": ariaLabel = "Trend",
|
|
6326
6945
|
...props
|
|
6327
6946
|
}, ref) {
|
|
6328
|
-
const { line, area } = (0,
|
|
6329
|
-
return /* @__PURE__ */ (0,
|
|
6947
|
+
const { line, area } = (0, import_react80.useMemo)(() => buildPath(values, width, height), [values, width, height]);
|
|
6948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
6330
6949
|
"svg",
|
|
6331
6950
|
{
|
|
6332
6951
|
ref,
|
|
@@ -6338,8 +6957,8 @@ var Sparkline = (0, import_react79.forwardRef)(function Sparkline2({
|
|
|
6338
6957
|
className: cn("inline-block", className),
|
|
6339
6958
|
...props,
|
|
6340
6959
|
children: [
|
|
6341
|
-
fill && /* @__PURE__ */ (0,
|
|
6342
|
-
/* @__PURE__ */ (0,
|
|
6960
|
+
fill && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("path", { d: area, fill: stroke, fillOpacity: 0.16, stroke: "none" }),
|
|
6961
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6343
6962
|
"path",
|
|
6344
6963
|
{
|
|
6345
6964
|
d: line,
|
|
@@ -6357,16 +6976,16 @@ var Sparkline = (0, import_react79.forwardRef)(function Sparkline2({
|
|
|
6357
6976
|
Sparkline.displayName = "Sparkline";
|
|
6358
6977
|
|
|
6359
6978
|
// src/patterns/Spinner/Spinner.tsx
|
|
6360
|
-
var
|
|
6361
|
-
var
|
|
6979
|
+
var import_react81 = require("react");
|
|
6980
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6362
6981
|
var sizes = {
|
|
6363
6982
|
sm: { box: "h-3 w-3", border: "border-[2px]" },
|
|
6364
6983
|
md: { box: "h-4 w-4", border: "border-[2px]" },
|
|
6365
6984
|
lg: { box: "h-5 w-5", border: "border-[2px]" }
|
|
6366
6985
|
};
|
|
6367
|
-
var Spinner2 = (0,
|
|
6986
|
+
var Spinner2 = (0, import_react81.forwardRef)(function Spinner3({ size = "md", label = "Loading", className, ...props }, ref) {
|
|
6368
6987
|
const s = sizes[size];
|
|
6369
|
-
return /* @__PURE__ */ (0,
|
|
6988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6370
6989
|
"span",
|
|
6371
6990
|
{
|
|
6372
6991
|
ref,
|
|
@@ -6374,7 +6993,7 @@ var Spinner2 = (0, import_react80.forwardRef)(function Spinner3({ size = "md", l
|
|
|
6374
6993
|
"aria-label": label,
|
|
6375
6994
|
className: cn("inline-block", className),
|
|
6376
6995
|
...props,
|
|
6377
|
-
children: /* @__PURE__ */ (0,
|
|
6996
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6378
6997
|
"span",
|
|
6379
6998
|
{
|
|
6380
6999
|
"aria-hidden": true,
|
|
@@ -6391,8 +7010,8 @@ var Spinner2 = (0, import_react80.forwardRef)(function Spinner3({ size = "md", l
|
|
|
6391
7010
|
Spinner2.displayName = "Spinner";
|
|
6392
7011
|
|
|
6393
7012
|
// src/patterns/Stepper/Stepper.tsx
|
|
6394
|
-
var
|
|
6395
|
-
var
|
|
7013
|
+
var import_react82 = require("react");
|
|
7014
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6396
7015
|
var dotBase = "h-6 w-6 rounded-full grid place-items-center text-[11px] font-mono font-semibold border";
|
|
6397
7016
|
var dotStateClass = {
|
|
6398
7017
|
done: "bg-accent text-on-accent border-accent",
|
|
@@ -6409,8 +7028,8 @@ function stateFor(index, current) {
|
|
|
6409
7028
|
if (index === current) return "current";
|
|
6410
7029
|
return "upcoming";
|
|
6411
7030
|
}
|
|
6412
|
-
var Stepper = (0,
|
|
6413
|
-
return /* @__PURE__ */ (0,
|
|
7031
|
+
var Stepper = (0, import_react82.forwardRef)(function Stepper2({ steps, current, className, ...props }, ref) {
|
|
7032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6414
7033
|
"ol",
|
|
6415
7034
|
{
|
|
6416
7035
|
ref,
|
|
@@ -6422,19 +7041,19 @@ var Stepper = (0, import_react81.forwardRef)(function Stepper2({ steps, current,
|
|
|
6422
7041
|
const id = typeof step === "string" ? void 0 : step.id;
|
|
6423
7042
|
const state = stateFor(i, current);
|
|
6424
7043
|
const connectorActive = i < current;
|
|
6425
|
-
return /* @__PURE__ */ (0,
|
|
6426
|
-
/* @__PURE__ */ (0,
|
|
7044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_react82.Fragment, { children: [
|
|
7045
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
6427
7046
|
"li",
|
|
6428
7047
|
{
|
|
6429
7048
|
"aria-current": state === "current" ? "step" : void 0,
|
|
6430
7049
|
className: "flex items-center gap-2",
|
|
6431
7050
|
children: [
|
|
6432
|
-
/* @__PURE__ */ (0,
|
|
6433
|
-
/* @__PURE__ */ (0,
|
|
7051
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { "aria-hidden": true, className: cn(dotBase, dotStateClass[state]), children: state === "done" ? "\u2713" : i + 1 }),
|
|
7052
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: cn("text-[12px]", labelStateClass2[state]), children: label })
|
|
6434
7053
|
]
|
|
6435
7054
|
}
|
|
6436
7055
|
),
|
|
6437
|
-
i < steps.length - 1 && /* @__PURE__ */ (0,
|
|
7056
|
+
i < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6438
7057
|
"span",
|
|
6439
7058
|
{
|
|
6440
7059
|
"aria-hidden": true,
|
|
@@ -6449,13 +7068,13 @@ var Stepper = (0, import_react81.forwardRef)(function Stepper2({ steps, current,
|
|
|
6449
7068
|
Stepper.displayName = "Stepper";
|
|
6450
7069
|
|
|
6451
7070
|
// src/patterns/TabBar/TabBar.tsx
|
|
6452
|
-
var
|
|
6453
|
-
var
|
|
6454
|
-
var TabBar = (0,
|
|
7071
|
+
var import_react83 = require("react");
|
|
7072
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
7073
|
+
var TabBar = (0, import_react83.forwardRef)(function TabBar2({ items, value, defaultValue, onValueChange, className, ...props }, ref) {
|
|
6455
7074
|
const isControlled = value !== void 0;
|
|
6456
|
-
const [internalValue, setInternalValue] = (0,
|
|
7075
|
+
const [internalValue, setInternalValue] = (0, import_react83.useState)(defaultValue);
|
|
6457
7076
|
const activeId = isControlled ? value : internalValue;
|
|
6458
|
-
const handleSelect = (0,
|
|
7077
|
+
const handleSelect = (0, import_react83.useCallback)(
|
|
6459
7078
|
(id, e) => {
|
|
6460
7079
|
if (!isControlled) setInternalValue(id);
|
|
6461
7080
|
onValueChange?.(id);
|
|
@@ -6463,7 +7082,7 @@ var TabBar = (0, import_react82.forwardRef)(function TabBar2({ items, value, def
|
|
|
6463
7082
|
},
|
|
6464
7083
|
[isControlled, onValueChange]
|
|
6465
7084
|
);
|
|
6466
|
-
return /* @__PURE__ */ (0,
|
|
7085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6467
7086
|
"nav",
|
|
6468
7087
|
{
|
|
6469
7088
|
ref,
|
|
@@ -6478,7 +7097,7 @@ var TabBar = (0, import_react82.forwardRef)(function TabBar2({ items, value, def
|
|
|
6478
7097
|
children: items.map((item) => {
|
|
6479
7098
|
const isActive = item.id === activeId;
|
|
6480
7099
|
if (item.elevated) {
|
|
6481
|
-
return /* @__PURE__ */ (0,
|
|
7100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "grid place-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6482
7101
|
"button",
|
|
6483
7102
|
{
|
|
6484
7103
|
type: "button",
|
|
@@ -6494,13 +7113,13 @@ var TabBar = (0, import_react82.forwardRef)(function TabBar2({ items, value, def
|
|
|
6494
7113
|
"disabled:cursor-not-allowed disabled:opacity-40"
|
|
6495
7114
|
),
|
|
6496
7115
|
children: [
|
|
6497
|
-
/* @__PURE__ */ (0,
|
|
6498
|
-
/* @__PURE__ */ (0,
|
|
7116
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { "aria-hidden": true, children: item.icon }),
|
|
7117
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "sr-only", children: item.label })
|
|
6499
7118
|
]
|
|
6500
7119
|
}
|
|
6501
7120
|
) }, item.id);
|
|
6502
7121
|
}
|
|
6503
|
-
return /* @__PURE__ */ (0,
|
|
7122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6504
7123
|
"button",
|
|
6505
7124
|
{
|
|
6506
7125
|
type: "button",
|
|
@@ -6515,9 +7134,9 @@ var TabBar = (0, import_react82.forwardRef)(function TabBar2({ items, value, def
|
|
|
6515
7134
|
isActive ? "text-accent-text" : "text-text-muted hover:text-text"
|
|
6516
7135
|
),
|
|
6517
7136
|
children: [
|
|
6518
|
-
/* @__PURE__ */ (0,
|
|
7137
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "relative inline-flex", "aria-hidden": true, children: [
|
|
6519
7138
|
item.icon,
|
|
6520
|
-
item.badge != null && /* @__PURE__ */ (0,
|
|
7139
|
+
item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6521
7140
|
"span",
|
|
6522
7141
|
{
|
|
6523
7142
|
className: cn(
|
|
@@ -6528,9 +7147,9 @@ var TabBar = (0, import_react82.forwardRef)(function TabBar2({ items, value, def
|
|
|
6528
7147
|
}
|
|
6529
7148
|
)
|
|
6530
7149
|
] }),
|
|
6531
|
-
/* @__PURE__ */ (0,
|
|
7150
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "text-[10px] font-medium tracking-tight", children: [
|
|
6532
7151
|
item.label,
|
|
6533
|
-
item.badge != null && /* @__PURE__ */ (0,
|
|
7152
|
+
item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "sr-only", children: [
|
|
6534
7153
|
", ",
|
|
6535
7154
|
item.badge,
|
|
6536
7155
|
" unread"
|
|
@@ -6548,11 +7167,11 @@ TabBar.displayName = "TabBar";
|
|
|
6548
7167
|
|
|
6549
7168
|
// src/patterns/Tabs/Tabs.tsx
|
|
6550
7169
|
var RadixTabs = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
6551
|
-
var
|
|
6552
|
-
var
|
|
6553
|
-
var
|
|
6554
|
-
var TabsVariantContext = (0,
|
|
6555
|
-
var tabsListStyles = (0,
|
|
7170
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
7171
|
+
var import_react84 = require("react");
|
|
7172
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
7173
|
+
var TabsVariantContext = (0, import_react84.createContext)("underline");
|
|
7174
|
+
var tabsListStyles = (0, import_class_variance_authority14.cva)("", {
|
|
6556
7175
|
variants: {
|
|
6557
7176
|
variant: {
|
|
6558
7177
|
underline: "flex gap-6 border-b border-border",
|
|
@@ -6560,7 +7179,7 @@ var tabsListStyles = (0, import_class_variance_authority13.cva)("", {
|
|
|
6560
7179
|
}
|
|
6561
7180
|
}
|
|
6562
7181
|
});
|
|
6563
|
-
var tabsTriggerStyles = (0,
|
|
7182
|
+
var tabsTriggerStyles = (0, import_class_variance_authority14.cva)(
|
|
6564
7183
|
"cursor-pointer outline-none transition-colors duration-(--duration-micro) focus-visible:ring-[3px] focus-visible:ring-accent-dim",
|
|
6565
7184
|
{
|
|
6566
7185
|
variants: {
|
|
@@ -6581,8 +7200,8 @@ var tabsTriggerStyles = (0, import_class_variance_authority13.cva)(
|
|
|
6581
7200
|
}
|
|
6582
7201
|
}
|
|
6583
7202
|
);
|
|
6584
|
-
var Tabs = (0,
|
|
6585
|
-
return /* @__PURE__ */ (0,
|
|
7203
|
+
var Tabs = (0, import_react84.forwardRef)(function Tabs2({ variant = "underline", className, ...props }, ref) {
|
|
7204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TabsVariantContext.Provider, { value: variant, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6586
7205
|
RadixTabs.Root,
|
|
6587
7206
|
{
|
|
6588
7207
|
ref,
|
|
@@ -6592,14 +7211,14 @@ var Tabs = (0, import_react83.forwardRef)(function Tabs2({ variant = "underline"
|
|
|
6592
7211
|
) });
|
|
6593
7212
|
});
|
|
6594
7213
|
Tabs.displayName = "Tabs";
|
|
6595
|
-
var TabsList = (0,
|
|
6596
|
-
const variant = (0,
|
|
6597
|
-
return /* @__PURE__ */ (0,
|
|
7214
|
+
var TabsList = (0, import_react84.forwardRef)(function TabsList2({ className, ...props }, ref) {
|
|
7215
|
+
const variant = (0, import_react84.useContext)(TabsVariantContext);
|
|
7216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(RadixTabs.List, { ref, className: cn(tabsListStyles({ variant }), className), ...props });
|
|
6598
7217
|
});
|
|
6599
7218
|
TabsList.displayName = "TabsList";
|
|
6600
|
-
var Tab = (0,
|
|
6601
|
-
const variant = (0,
|
|
6602
|
-
return /* @__PURE__ */ (0,
|
|
7219
|
+
var Tab = (0, import_react84.forwardRef)(function Tab2({ className, ...props }, ref) {
|
|
7220
|
+
const variant = (0, import_react84.useContext)(TabsVariantContext);
|
|
7221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6603
7222
|
RadixTabs.Trigger,
|
|
6604
7223
|
{
|
|
6605
7224
|
ref,
|
|
@@ -6609,9 +7228,9 @@ var Tab = (0, import_react83.forwardRef)(function Tab2({ className, ...props },
|
|
|
6609
7228
|
);
|
|
6610
7229
|
});
|
|
6611
7230
|
Tab.displayName = "Tab";
|
|
6612
|
-
var TabsContent = (0,
|
|
7231
|
+
var TabsContent = (0, import_react84.forwardRef)(
|
|
6613
7232
|
function TabsContent2({ className, ...props }, ref) {
|
|
6614
|
-
return /* @__PURE__ */ (0,
|
|
7233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6615
7234
|
RadixTabs.Content,
|
|
6616
7235
|
{
|
|
6617
7236
|
ref,
|
|
@@ -6627,8 +7246,8 @@ var TabsContent = (0, import_react83.forwardRef)(
|
|
|
6627
7246
|
TabsContent.displayName = "TabsContent";
|
|
6628
7247
|
|
|
6629
7248
|
// src/patterns/Timeline/Timeline.tsx
|
|
6630
|
-
var
|
|
6631
|
-
var
|
|
7249
|
+
var import_react85 = require("react");
|
|
7250
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
6632
7251
|
var ringClass = {
|
|
6633
7252
|
accent: "border-accent",
|
|
6634
7253
|
ok: "border-ok",
|
|
@@ -6636,8 +7255,8 @@ var ringClass = {
|
|
|
6636
7255
|
err: "border-err",
|
|
6637
7256
|
muted: "border-text-dim"
|
|
6638
7257
|
};
|
|
6639
|
-
var Timeline = (0,
|
|
6640
|
-
return /* @__PURE__ */ (0,
|
|
7258
|
+
var Timeline = (0, import_react85.forwardRef)(function Timeline2({ events, className, children, ...props }, ref) {
|
|
7259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6641
7260
|
"ol",
|
|
6642
7261
|
{
|
|
6643
7262
|
ref,
|
|
@@ -6647,14 +7266,14 @@ var Timeline = (0, import_react84.forwardRef)(function Timeline2({ events, class
|
|
|
6647
7266
|
className
|
|
6648
7267
|
),
|
|
6649
7268
|
...props,
|
|
6650
|
-
children: events ? events.map((e, i) => /* @__PURE__ */ (0,
|
|
7269
|
+
children: events ? events.map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(TimelineItem, { tone: e.tone, time: e.time, description: e.description, children: e.title }, i)) : children
|
|
6651
7270
|
}
|
|
6652
7271
|
);
|
|
6653
7272
|
});
|
|
6654
7273
|
Timeline.displayName = "Timeline";
|
|
6655
|
-
var TimelineItem = (0,
|
|
6656
|
-
return /* @__PURE__ */ (0,
|
|
6657
|
-
/* @__PURE__ */ (0,
|
|
7274
|
+
var TimelineItem = (0, import_react85.forwardRef)(function TimelineItem2({ tone = "accent", description, time, className, children, ...props }, ref) {
|
|
7275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("li", { ref, className: cn("relative mb-[18px] last:mb-0", className), ...props, children: [
|
|
7276
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6658
7277
|
"span",
|
|
6659
7278
|
{
|
|
6660
7279
|
"aria-hidden": true,
|
|
@@ -6664,15 +7283,15 @@ var TimelineItem = (0, import_react84.forwardRef)(function TimelineItem2({ tone
|
|
|
6664
7283
|
)
|
|
6665
7284
|
}
|
|
6666
7285
|
),
|
|
6667
|
-
/* @__PURE__ */ (0,
|
|
6668
|
-
description && /* @__PURE__ */ (0,
|
|
6669
|
-
time && /* @__PURE__ */ (0,
|
|
7286
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "text-[13px] font-medium", children }),
|
|
7287
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "text-text-muted text-[12px]", children: description }),
|
|
7288
|
+
time && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "text-text-dim mt-[2px] font-mono text-[10px]", children: time })
|
|
6670
7289
|
] });
|
|
6671
7290
|
});
|
|
6672
7291
|
TimelineItem.displayName = "TimelineItem";
|
|
6673
7292
|
|
|
6674
7293
|
// src/patterns/Timeline/ActivityTimeline.tsx
|
|
6675
|
-
var
|
|
7294
|
+
var import_react86 = require("react");
|
|
6676
7295
|
|
|
6677
7296
|
// src/patterns/Timeline/formatRelative.ts
|
|
6678
7297
|
var SECOND = 1e3;
|
|
@@ -6707,7 +7326,7 @@ function formatRelative(input, now = /* @__PURE__ */ new Date()) {
|
|
|
6707
7326
|
}
|
|
6708
7327
|
|
|
6709
7328
|
// src/patterns/Timeline/ActivityTimeline.tsx
|
|
6710
|
-
var
|
|
7329
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
6711
7330
|
var ringClass2 = {
|
|
6712
7331
|
accent: "border-accent",
|
|
6713
7332
|
ok: "border-ok",
|
|
@@ -6715,10 +7334,10 @@ var ringClass2 = {
|
|
|
6715
7334
|
err: "border-err",
|
|
6716
7335
|
muted: "border-text-dim"
|
|
6717
7336
|
};
|
|
6718
|
-
var ActivityTimeline = (0,
|
|
7337
|
+
var ActivityTimeline = (0, import_react86.forwardRef)(
|
|
6719
7338
|
function ActivityTimeline2({ events, relativeNow, className, ...props }, ref) {
|
|
6720
7339
|
const now = relativeNow ?? /* @__PURE__ */ new Date();
|
|
6721
|
-
return /* @__PURE__ */ (0,
|
|
7340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
6722
7341
|
"ol",
|
|
6723
7342
|
{
|
|
6724
7343
|
ref,
|
|
@@ -6731,8 +7350,8 @@ var ActivityTimeline = (0, import_react85.forwardRef)(
|
|
|
6731
7350
|
children: events.map((event) => {
|
|
6732
7351
|
const tone = event.tone ?? "accent";
|
|
6733
7352
|
const time = formatRelative(event.at, now);
|
|
6734
|
-
return /* @__PURE__ */ (0,
|
|
6735
|
-
/* @__PURE__ */ (0,
|
|
7353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("li", { className: "relative mb-4 last:mb-0", children: [
|
|
7354
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
6736
7355
|
"span",
|
|
6737
7356
|
{
|
|
6738
7357
|
"aria-hidden": true,
|
|
@@ -6742,16 +7361,16 @@ var ActivityTimeline = (0, import_react85.forwardRef)(
|
|
|
6742
7361
|
)
|
|
6743
7362
|
}
|
|
6744
7363
|
),
|
|
6745
|
-
/* @__PURE__ */ (0,
|
|
6746
|
-
event.icon && /* @__PURE__ */ (0,
|
|
6747
|
-
/* @__PURE__ */ (0,
|
|
6748
|
-
time && /* @__PURE__ */ (0,
|
|
7364
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex items-baseline gap-2", children: [
|
|
7365
|
+
event.icon && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { "aria-hidden": true, className: "text-text-muted font-mono text-[12px]", children: event.icon }),
|
|
7366
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "text-[13px] font-medium", children: event.title }),
|
|
7367
|
+
time && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("time", { className: "text-text-dim ml-auto font-mono text-[10px]", children: time })
|
|
6749
7368
|
] }),
|
|
6750
|
-
event.actor && /* @__PURE__ */ (0,
|
|
6751
|
-
event.actor.avatar && /* @__PURE__ */ (0,
|
|
6752
|
-
/* @__PURE__ */ (0,
|
|
7369
|
+
event.actor && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "text-text-muted mt-[2px] flex items-center gap-[6px] text-[12px]", children: [
|
|
7370
|
+
event.actor.avatar && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { "aria-hidden": true, className: "inline-flex", children: event.actor.avatar }),
|
|
7371
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { children: event.actor.name })
|
|
6753
7372
|
] }),
|
|
6754
|
-
event.payload && /* @__PURE__ */ (0,
|
|
7373
|
+
event.payload && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "border-border bg-panel-2 mt-2 rounded-md border px-3 py-2 font-mono text-[11px] leading-[1.5]", children: event.payload })
|
|
6755
7374
|
] }, event.id);
|
|
6756
7375
|
})
|
|
6757
7376
|
}
|
|
@@ -6761,9 +7380,9 @@ var ActivityTimeline = (0, import_react85.forwardRef)(
|
|
|
6761
7380
|
ActivityTimeline.displayName = "ActivityTimeline";
|
|
6762
7381
|
|
|
6763
7382
|
// src/patterns/Topbar/Topbar.tsx
|
|
6764
|
-
var
|
|
6765
|
-
var
|
|
6766
|
-
var Topbar = (0,
|
|
7383
|
+
var import_react87 = require("react");
|
|
7384
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7385
|
+
var Topbar = (0, import_react87.forwardRef)(function Topbar2({
|
|
6767
7386
|
title,
|
|
6768
7387
|
eyebrow,
|
|
6769
7388
|
leading,
|
|
@@ -6777,7 +7396,7 @@ var Topbar = (0, import_react86.forwardRef)(function Topbar2({
|
|
|
6777
7396
|
}, ref) {
|
|
6778
7397
|
const isTouch = density === "touch";
|
|
6779
7398
|
const backHandler = typeof back === "function" ? back : back ? onBack : void 0;
|
|
6780
|
-
return /* @__PURE__ */ (0,
|
|
7399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
6781
7400
|
"header",
|
|
6782
7401
|
{
|
|
6783
7402
|
ref,
|
|
@@ -6788,7 +7407,7 @@ var Topbar = (0, import_react86.forwardRef)(function Topbar2({
|
|
|
6788
7407
|
),
|
|
6789
7408
|
...props,
|
|
6790
7409
|
children: [
|
|
6791
|
-
isTouch && back && /* @__PURE__ */ (0,
|
|
7410
|
+
isTouch && back && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
6792
7411
|
"button",
|
|
6793
7412
|
{
|
|
6794
7413
|
type: "button",
|
|
@@ -6802,7 +7421,7 @@ var Topbar = (0, import_react86.forwardRef)(function Topbar2({
|
|
|
6802
7421
|
"hover:bg-panel-2 h-touch w-touch",
|
|
6803
7422
|
"focus-visible:ring-accent-dim outline-none focus-visible:ring-[3px]"
|
|
6804
7423
|
),
|
|
6805
|
-
children: /* @__PURE__ */ (0,
|
|
7424
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
6806
7425
|
"svg",
|
|
6807
7426
|
{
|
|
6808
7427
|
width: "20",
|
|
@@ -6812,15 +7431,15 @@ var Topbar = (0, import_react86.forwardRef)(function Topbar2({
|
|
|
6812
7431
|
stroke: "currentColor",
|
|
6813
7432
|
strokeWidth: "2",
|
|
6814
7433
|
"aria-hidden": true,
|
|
6815
|
-
children: /* @__PURE__ */ (0,
|
|
7434
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("path", { d: "m15 18-6-6 6-6" })
|
|
6816
7435
|
}
|
|
6817
7436
|
)
|
|
6818
7437
|
}
|
|
6819
7438
|
),
|
|
6820
7439
|
leading,
|
|
6821
|
-
(title || isTouch && eyebrow) && /* @__PURE__ */ (0,
|
|
6822
|
-
isTouch && eyebrow && /* @__PURE__ */ (0,
|
|
6823
|
-
title && /* @__PURE__ */ (0,
|
|
7440
|
+
(title || isTouch && eyebrow) && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: cn("min-w-0", isTouch && "flex-1"), children: [
|
|
7441
|
+
isTouch && eyebrow && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "text-m-eyebrow text-accent font-mono tracking-wide uppercase", children: eyebrow }),
|
|
7442
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
6824
7443
|
"div",
|
|
6825
7444
|
{
|
|
6826
7445
|
className: cn(
|
|
@@ -6830,8 +7449,8 @@ var Topbar = (0, import_react86.forwardRef)(function Topbar2({
|
|
|
6830
7449
|
}
|
|
6831
7450
|
)
|
|
6832
7451
|
] }),
|
|
6833
|
-
!isTouch && /* @__PURE__ */ (0,
|
|
6834
|
-
actions && /* @__PURE__ */ (0,
|
|
7452
|
+
!isTouch && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "flex flex-1 items-center" }),
|
|
7453
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: cn("flex items-center", isTouch ? "gap-1" : "gap-3"), children: actions }),
|
|
6835
7454
|
children
|
|
6836
7455
|
]
|
|
6837
7456
|
}
|
|
@@ -6840,9 +7459,9 @@ var Topbar = (0, import_react86.forwardRef)(function Topbar2({
|
|
|
6840
7459
|
Topbar.displayName = "Topbar";
|
|
6841
7460
|
|
|
6842
7461
|
// src/patterns/Tree/Tree.tsx
|
|
6843
|
-
var
|
|
7462
|
+
var import_react88 = require("react");
|
|
6844
7463
|
var import_react_dom = require("react-dom");
|
|
6845
|
-
var
|
|
7464
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
6846
7465
|
var EMPTY_SET2 = /* @__PURE__ */ new Set();
|
|
6847
7466
|
function flattenVisible(items, expanded, level, parentId, out) {
|
|
6848
7467
|
for (const item of items) {
|
|
@@ -6853,7 +7472,7 @@ function flattenVisible(items, expanded, level, parentId, out) {
|
|
|
6853
7472
|
}
|
|
6854
7473
|
}
|
|
6855
7474
|
}
|
|
6856
|
-
var Tree = (0,
|
|
7475
|
+
var Tree = (0, import_react88.forwardRef)(function Tree2({
|
|
6857
7476
|
items,
|
|
6858
7477
|
expanded: expandedProp,
|
|
6859
7478
|
defaultExpanded,
|
|
@@ -6876,24 +7495,22 @@ var Tree = (0, import_react87.forwardRef)(function Tree2({
|
|
|
6876
7495
|
onChange: onValueChange
|
|
6877
7496
|
});
|
|
6878
7497
|
const expandedSet = expanded ?? EMPTY_SET2;
|
|
6879
|
-
const flatVisible = (0,
|
|
7498
|
+
const flatVisible = (0, import_react88.useMemo)(() => {
|
|
6880
7499
|
const out = [];
|
|
6881
7500
|
flattenVisible(items, expandedSet, 1, null, out);
|
|
6882
7501
|
return out;
|
|
6883
7502
|
}, [items, expandedSet]);
|
|
6884
|
-
const [activeId, setActiveId] = (0,
|
|
6885
|
-
(
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
}, [activeId, flatVisible]);
|
|
6890
|
-
const tabStopId = (0, import_react87.useMemo)(() => {
|
|
7503
|
+
const [activeId, setActiveId] = (0, import_react88.useState)(null);
|
|
7504
|
+
if (activeId && !flatVisible.some((f) => f.id === activeId)) {
|
|
7505
|
+
setActiveId(null);
|
|
7506
|
+
}
|
|
7507
|
+
const tabStopId = (0, import_react88.useMemo)(() => {
|
|
6891
7508
|
if (activeId && flatVisible.some((f) => f.id === activeId)) return activeId;
|
|
6892
7509
|
if (value && flatVisible.some((f) => f.id === value)) return value;
|
|
6893
7510
|
return flatVisible[0]?.id ?? null;
|
|
6894
7511
|
}, [activeId, flatVisible, value]);
|
|
6895
|
-
const listRef = (0,
|
|
6896
|
-
const setRefs = (0,
|
|
7512
|
+
const listRef = (0, import_react88.useRef)(null);
|
|
7513
|
+
const setRefs = (0, import_react88.useCallback)(
|
|
6897
7514
|
(node) => {
|
|
6898
7515
|
listRef.current = node;
|
|
6899
7516
|
if (typeof ref === "function") ref(node);
|
|
@@ -6901,20 +7518,20 @@ var Tree = (0, import_react87.forwardRef)(function Tree2({
|
|
|
6901
7518
|
},
|
|
6902
7519
|
[ref]
|
|
6903
7520
|
);
|
|
6904
|
-
const focusItem = (0,
|
|
7521
|
+
const focusItem = (0, import_react88.useCallback)((id) => {
|
|
6905
7522
|
const root = listRef.current;
|
|
6906
7523
|
if (!root) return;
|
|
6907
7524
|
const el = root.querySelector(`[data-treeitem-id="${CSS.escape(id)}"]`);
|
|
6908
7525
|
el?.focus();
|
|
6909
7526
|
}, []);
|
|
6910
|
-
const moveActive = (0,
|
|
7527
|
+
const moveActive = (0, import_react88.useCallback)(
|
|
6911
7528
|
(id) => {
|
|
6912
7529
|
(0, import_react_dom.flushSync)(() => setActiveId(id));
|
|
6913
7530
|
focusItem(id);
|
|
6914
7531
|
},
|
|
6915
7532
|
[focusItem]
|
|
6916
7533
|
);
|
|
6917
|
-
const toggle = (0,
|
|
7534
|
+
const toggle = (0, import_react88.useCallback)(
|
|
6918
7535
|
(id) => {
|
|
6919
7536
|
setExpanded((prev) => {
|
|
6920
7537
|
const next = new Set(prev ?? EMPTY_SET2);
|
|
@@ -6925,7 +7542,7 @@ var Tree = (0, import_react87.forwardRef)(function Tree2({
|
|
|
6925
7542
|
},
|
|
6926
7543
|
[setExpanded]
|
|
6927
7544
|
);
|
|
6928
|
-
const expand = (0,
|
|
7545
|
+
const expand = (0, import_react88.useCallback)(
|
|
6929
7546
|
(id) => {
|
|
6930
7547
|
setExpanded((prev) => {
|
|
6931
7548
|
const base = prev ?? EMPTY_SET2;
|
|
@@ -6937,7 +7554,7 @@ var Tree = (0, import_react87.forwardRef)(function Tree2({
|
|
|
6937
7554
|
},
|
|
6938
7555
|
[setExpanded]
|
|
6939
7556
|
);
|
|
6940
|
-
const collapse = (0,
|
|
7557
|
+
const collapse = (0, import_react88.useCallback)(
|
|
6941
7558
|
(id) => {
|
|
6942
7559
|
setExpanded((prev) => {
|
|
6943
7560
|
const base = prev ?? EMPTY_SET2;
|
|
@@ -6949,13 +7566,13 @@ var Tree = (0, import_react87.forwardRef)(function Tree2({
|
|
|
6949
7566
|
},
|
|
6950
7567
|
[setExpanded]
|
|
6951
7568
|
);
|
|
6952
|
-
const selectItem = (0,
|
|
7569
|
+
const selectItem = (0, import_react88.useCallback)(
|
|
6953
7570
|
(id) => {
|
|
6954
7571
|
setValue(id);
|
|
6955
7572
|
},
|
|
6956
7573
|
[setValue]
|
|
6957
7574
|
);
|
|
6958
|
-
const handleKeyDown = (0,
|
|
7575
|
+
const handleKeyDown = (0, import_react88.useCallback)(
|
|
6959
7576
|
(e) => {
|
|
6960
7577
|
onKeyDown?.(e);
|
|
6961
7578
|
if (e.defaultPrevented) return;
|
|
@@ -7035,7 +7652,7 @@ var Tree = (0, import_react87.forwardRef)(function Tree2({
|
|
|
7035
7652
|
toggle
|
|
7036
7653
|
]
|
|
7037
7654
|
);
|
|
7038
|
-
return /* @__PURE__ */ (0,
|
|
7655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7039
7656
|
"ul",
|
|
7040
7657
|
{
|
|
7041
7658
|
ref: setRefs,
|
|
@@ -7043,7 +7660,7 @@ var Tree = (0, import_react87.forwardRef)(function Tree2({
|
|
|
7043
7660
|
className: cn("flex flex-col gap-px text-[12px]", className),
|
|
7044
7661
|
onKeyDown: handleKeyDown,
|
|
7045
7662
|
...props,
|
|
7046
|
-
children: items.map((item) => /* @__PURE__ */ (0,
|
|
7663
|
+
children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7047
7664
|
TreeItemRow,
|
|
7048
7665
|
{
|
|
7049
7666
|
item,
|
|
@@ -7078,8 +7695,8 @@ function TreeItemRow({
|
|
|
7078
7695
|
const isExpanded = hasChildren && expanded.has(item.id);
|
|
7079
7696
|
const isSelected = selected === item.id;
|
|
7080
7697
|
const isTabStop = tabStopId === item.id;
|
|
7081
|
-
return /* @__PURE__ */ (0,
|
|
7082
|
-
/* @__PURE__ */ (0,
|
|
7698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("li", { role: "none", children: [
|
|
7699
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
7083
7700
|
"div",
|
|
7084
7701
|
{
|
|
7085
7702
|
role: "treeitem",
|
|
@@ -7102,14 +7719,14 @@ function TreeItemRow({
|
|
|
7102
7719
|
isSelected ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2"
|
|
7103
7720
|
),
|
|
7104
7721
|
children: [
|
|
7105
|
-
/* @__PURE__ */ (0,
|
|
7106
|
-
item.icon && /* @__PURE__ */ (0,
|
|
7107
|
-
/* @__PURE__ */ (0,
|
|
7722
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { "aria-hidden": true, className: "text-text-dim grid w-3 place-items-center text-[10px]", children: hasChildren ? isExpanded ? "\u25BE" : "\u25B8" : "" }),
|
|
7723
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { "aria-hidden": true, className: "text-[12px] opacity-80", children: item.icon }),
|
|
7724
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "flex-1 truncate", children: item.label }),
|
|
7108
7725
|
item.trailing
|
|
7109
7726
|
]
|
|
7110
7727
|
}
|
|
7111
7728
|
),
|
|
7112
|
-
hasChildren && isExpanded && /* @__PURE__ */ (0,
|
|
7729
|
+
hasChildren && isExpanded && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("ul", { role: "group", className: "flex flex-col gap-px", children: (item.children ?? []).map((child) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7113
7730
|
TreeItemRow,
|
|
7114
7731
|
{
|
|
7115
7732
|
item: child,
|
|
@@ -7127,10 +7744,10 @@ function TreeItemRow({
|
|
|
7127
7744
|
}
|
|
7128
7745
|
|
|
7129
7746
|
// src/patterns/WizardDialog/WizardDialog.tsx
|
|
7130
|
-
var
|
|
7131
|
-
var
|
|
7132
|
-
var
|
|
7133
|
-
var WizardDialog = (0,
|
|
7747
|
+
var RadixDialog7 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
7748
|
+
var import_react89 = require("react");
|
|
7749
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
7750
|
+
var WizardDialog = (0, import_react89.forwardRef)(function WizardDialog2({
|
|
7134
7751
|
open,
|
|
7135
7752
|
defaultOpen,
|
|
7136
7753
|
onOpenChange,
|
|
@@ -7146,19 +7763,19 @@ var WizardDialog = (0, import_react88.forwardRef)(function WizardDialog2({
|
|
|
7146
7763
|
cancelLabel,
|
|
7147
7764
|
onCancel
|
|
7148
7765
|
}, ref) {
|
|
7149
|
-
const [current, setCurrent] = (0,
|
|
7766
|
+
const [current, setCurrent] = (0, import_react89.useState)(initialStep);
|
|
7150
7767
|
const total = steps.length;
|
|
7151
7768
|
const safeCurrent = Math.min(current, Math.max(0, total - 1));
|
|
7152
7769
|
const step = steps[safeCurrent];
|
|
7153
|
-
const goTo = (0,
|
|
7770
|
+
const goTo = (0, import_react89.useCallback)(
|
|
7154
7771
|
(index) => {
|
|
7155
7772
|
setCurrent(Math.min(Math.max(0, index), Math.max(0, total - 1)));
|
|
7156
7773
|
},
|
|
7157
7774
|
[total]
|
|
7158
7775
|
);
|
|
7159
|
-
const goNext = (0,
|
|
7160
|
-
const goBack = (0,
|
|
7161
|
-
const ctx = (0,
|
|
7776
|
+
const goNext = (0, import_react89.useCallback)(() => setCurrent((c) => Math.min(c + 1, total - 1)), [total]);
|
|
7777
|
+
const goBack = (0, import_react89.useCallback)(() => setCurrent((c) => Math.max(c - 1, 0)), []);
|
|
7778
|
+
const ctx = (0, import_react89.useMemo)(
|
|
7162
7779
|
() => ({
|
|
7163
7780
|
current: safeCurrent,
|
|
7164
7781
|
total,
|
|
@@ -7170,7 +7787,7 @@ var WizardDialog = (0, import_react88.forwardRef)(function WizardDialog2({
|
|
|
7170
7787
|
}),
|
|
7171
7788
|
[safeCurrent, total, goNext, goBack, goTo]
|
|
7172
7789
|
);
|
|
7173
|
-
const stepperSteps = (0,
|
|
7790
|
+
const stepperSteps = (0, import_react89.useMemo)(() => steps.map((s) => ({ id: s.id, label: s.label })), [steps]);
|
|
7174
7791
|
if (!step) return null;
|
|
7175
7792
|
const canAdvance = step.canAdvance ? step.canAdvance(ctx) : true;
|
|
7176
7793
|
const body = typeof step.content === "function" ? step.content(ctx) : step.content;
|
|
@@ -7181,36 +7798,36 @@ var WizardDialog = (0, import_react88.forwardRef)(function WizardDialog2({
|
|
|
7181
7798
|
goNext();
|
|
7182
7799
|
}
|
|
7183
7800
|
};
|
|
7184
|
-
return /* @__PURE__ */ (0,
|
|
7801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(DialogRoot, { open, defaultOpen, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
7185
7802
|
DialogContent,
|
|
7186
7803
|
{
|
|
7187
7804
|
ref,
|
|
7188
7805
|
width,
|
|
7189
7806
|
...description ? {} : { "aria-describedby": void 0 },
|
|
7190
7807
|
children: [
|
|
7191
|
-
title ? /* @__PURE__ */ (0,
|
|
7808
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(WizardTitle, { children: title }) : (
|
|
7192
7809
|
// Radix Dialog requires a Title for assistive tech and warns in dev
|
|
7193
7810
|
// mode without one. Fall back to a visually-hidden generic title so
|
|
7194
7811
|
// the contract is met even when no title prop is supplied.
|
|
7195
|
-
/* @__PURE__ */ (0,
|
|
7812
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(RadixDialog7.Title, { className: "sr-only", children: "Wizard" })
|
|
7196
7813
|
),
|
|
7197
|
-
description && /* @__PURE__ */ (0,
|
|
7198
|
-
/* @__PURE__ */ (0,
|
|
7199
|
-
/* @__PURE__ */ (0,
|
|
7200
|
-
/* @__PURE__ */ (0,
|
|
7201
|
-
cancelLabel && /* @__PURE__ */ (0,
|
|
7202
|
-
/* @__PURE__ */ (0,
|
|
7203
|
-
/* @__PURE__ */ (0,
|
|
7814
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(WizardDescription, { children: description }),
|
|
7815
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Stepper, { steps: stepperSteps, current: safeCurrent }) }),
|
|
7816
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "mb-5", children: body }),
|
|
7817
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex justify-end gap-2", children: [
|
|
7818
|
+
cancelLabel && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Button, { type: "button", variant: "ghost", onClick: onCancel, children: cancelLabel }),
|
|
7819
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Button, { type: "button", variant: "secondary", onClick: goBack, disabled: ctx.isFirst, children: backLabel }),
|
|
7820
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Button, { type: "button", variant: "primary", onClick: handlePrimary, disabled: !canAdvance, children: ctx.isLast ? completeLabel : nextLabel })
|
|
7204
7821
|
] })
|
|
7205
7822
|
]
|
|
7206
7823
|
}
|
|
7207
7824
|
) });
|
|
7208
7825
|
});
|
|
7209
7826
|
function WizardTitle({ children }) {
|
|
7210
|
-
return /* @__PURE__ */ (0,
|
|
7827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(RadixDialog7.Title, { className: "mb-2 text-[16px] font-medium", children });
|
|
7211
7828
|
}
|
|
7212
7829
|
function WizardDescription({ children }) {
|
|
7213
|
-
return /* @__PURE__ */ (0,
|
|
7830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(RadixDialog7.Description, { className: "text-text-muted mb-4 text-[13px] leading-[1.55]", children });
|
|
7214
7831
|
}
|
|
7215
7832
|
WizardDialog.displayName = "WizardDialog";
|
|
7216
7833
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -7288,6 +7905,7 @@ WizardDialog.displayName = "WizardDialog";
|
|
|
7288
7905
|
LargeTitle,
|
|
7289
7906
|
Lightbox,
|
|
7290
7907
|
ListingCard,
|
|
7908
|
+
ListingDetail,
|
|
7291
7909
|
MenuCheckboxItem,
|
|
7292
7910
|
MenuItem,
|
|
7293
7911
|
MenuSeparator,
|