@ship-it-ui/ui 0.0.8 → 0.0.10
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 +1162 -485
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +305 -26
- package/dist/index.d.ts +305 -26
- package/dist/index.js +1159 -483
- package/dist/index.js.map +1 -1
- package/package.json +27 -27
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
export { ClassValue } from 'clsx';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
-
import { useEffect, KeyboardEvent, RefObject, ButtonHTMLAttributes, ReactNode, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, AnchorHTMLAttributes, Ref, forwardRef, LabelHTMLAttributes, FC, SVGAttributes, MouseEventHandler } from 'react';
|
|
4
|
+
import { useEffect, KeyboardEvent, RefObject, ButtonHTMLAttributes, ReactNode, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, AnchorHTMLAttributes, Ref, MouseEvent, forwardRef, LabelHTMLAttributes, FC, SVGAttributes, MouseEventHandler } from 'react';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
import * as RadixCheckbox from '@radix-ui/react-checkbox';
|
|
@@ -18,6 +18,7 @@ import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
|
18
18
|
import * as RadixHoverCard from '@radix-ui/react-hover-card';
|
|
19
19
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
20
20
|
import * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
21
|
+
import { GlyphName } from '@ship-it-ui/icons';
|
|
21
22
|
import * as RadixMenubar from '@radix-ui/react-menubar';
|
|
22
23
|
import * as RadixTabs from '@radix-ui/react-tabs';
|
|
23
24
|
|
|
@@ -585,7 +586,7 @@ declare const AccordionContent: react.ForwardRefExoticComponent<RadixAccordion.A
|
|
|
585
586
|
|
|
586
587
|
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
587
588
|
type AvatarStatus = 'ok' | 'warn' | 'err' | 'off';
|
|
588
|
-
interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
589
|
+
interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
589
590
|
/** Display name. Used to derive initials and a deterministic background color. */
|
|
590
591
|
name?: string;
|
|
591
592
|
/** Image source. Falls back to initials if loading fails. */
|
|
@@ -596,6 +597,11 @@ interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
596
597
|
status?: AvatarStatus;
|
|
597
598
|
/** Override the auto-generated initials (e.g., for non-Latin scripts). */
|
|
598
599
|
initials?: string;
|
|
600
|
+
/**
|
|
601
|
+
* Override the hash-derived fallback background with a literal CSS color value.
|
|
602
|
+
* Only applies when the initials fallback is shown; image avatars are unaffected.
|
|
603
|
+
*/
|
|
604
|
+
color?: string;
|
|
599
605
|
}
|
|
600
606
|
/**
|
|
601
607
|
* Person/entity avatar. Auto-generates initials and a stable background color from
|
|
@@ -622,11 +628,21 @@ declare const badgeStyles: (props?: ({
|
|
|
622
628
|
variant?: "outline" | "err" | "pink" | "purple" | "solid" | "warn" | "ok" | "accent" | "neutral" | null | undefined;
|
|
623
629
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
624
630
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
625
|
-
|
|
631
|
+
/**
|
|
632
|
+
* Variant path: use one of the DS semantic variants.
|
|
633
|
+
* <Badge variant="ok">Done</Badge>
|
|
634
|
+
*
|
|
635
|
+
* Color path (escape hatch): pass an arbitrary CSS color. When both are set,
|
|
636
|
+
* `color` wins at runtime.
|
|
637
|
+
* <Badge color="#7c3aed">VIP</Badge>
|
|
638
|
+
*/
|
|
639
|
+
interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'>, VariantProps<typeof badgeStyles> {
|
|
626
640
|
/** Show a colored leading dot. */
|
|
627
641
|
dot?: boolean;
|
|
628
642
|
/** Optional leading icon (defers to children). */
|
|
629
643
|
icon?: ReactNode;
|
|
644
|
+
/** Arbitrary CSS color override. When set, replaces the `variant` tint. */
|
|
645
|
+
color?: string;
|
|
630
646
|
}
|
|
631
647
|
declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
|
|
632
648
|
|
|
@@ -709,7 +725,7 @@ interface StatCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
709
725
|
*/
|
|
710
726
|
declare const StatCard: react.ForwardRefExoticComponent<StatCardProps & react.RefAttributes<HTMLDivElement>>;
|
|
711
727
|
|
|
712
|
-
interface ChipProps extends HTMLAttributes<HTMLSpanElement> {
|
|
728
|
+
interface ChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
713
729
|
/** Pill-style leading icon (typically a glyph or `@`/`#`). */
|
|
714
730
|
icon?: ReactNode;
|
|
715
731
|
/**
|
|
@@ -722,13 +738,10 @@ interface ChipProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
722
738
|
* `'touch'` swaps to a roomier 32px chip with larger text for mobile filter strips.
|
|
723
739
|
*/
|
|
724
740
|
density?: 'comfortable' | 'touch';
|
|
741
|
+
/** Arbitrary CSS color. When set, the default neutral tint is replaced with this color. */
|
|
742
|
+
color?: string;
|
|
725
743
|
children: ReactNode;
|
|
726
744
|
}
|
|
727
|
-
/**
|
|
728
|
-
* Pill-shaped filter chip. Used in command palette tag rows, search filter strips,
|
|
729
|
-
* and AI suggestion lists. Differs from `Tag` by being pill-shaped (full radius)
|
|
730
|
-
* and slightly more decorative.
|
|
731
|
-
*/
|
|
732
745
|
declare const Chip: react.ForwardRefExoticComponent<ChipProps & react.RefAttributes<HTMLSpanElement>>;
|
|
733
746
|
|
|
734
747
|
type KbdProps = HTMLAttributes<HTMLElement>;
|
|
@@ -746,7 +759,7 @@ declare const Kbd: react.ForwardRefExoticComponent<KbdProps & react.RefAttribute
|
|
|
746
759
|
* ratings step in whole units only — half-step input is uncommon UX and the
|
|
747
760
|
* keyboard model (radiogroup) doesn't map cleanly to it.
|
|
748
761
|
*/
|
|
749
|
-
interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'role'> {
|
|
762
|
+
interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'onChange' | 'defaultValue' | 'role'> {
|
|
750
763
|
/** Current rating (controlled). Range `0` … `max`. */
|
|
751
764
|
value?: number;
|
|
752
765
|
/** Default rating (uncontrolled). */
|
|
@@ -766,6 +779,8 @@ interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' |
|
|
|
766
779
|
readOnly?: boolean;
|
|
767
780
|
/** Accessible label. For read-only this overrides the auto-generated "X out of Y stars" label. */
|
|
768
781
|
'aria-label'?: string;
|
|
782
|
+
/** Override the filled-star color. Accepts any CSS color. */
|
|
783
|
+
color?: string;
|
|
769
784
|
}
|
|
770
785
|
declare const Rating: react.ForwardRefExoticComponent<RatingProps & react.RefAttributes<HTMLDivElement>>;
|
|
771
786
|
|
|
@@ -848,9 +863,19 @@ interface SkeletonGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
848
863
|
declare const SkeletonGroup: react.ForwardRefExoticComponent<SkeletonGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
849
864
|
|
|
850
865
|
type StatusState = 'ok' | 'warn' | 'err' | 'off' | 'sync' | 'accent';
|
|
851
|
-
|
|
852
|
-
|
|
866
|
+
/**
|
|
867
|
+
* State path: use a semantic state.
|
|
868
|
+
* <StatusDot state="ok" />
|
|
869
|
+
*
|
|
870
|
+
* Color path (escape hatch): pass an arbitrary CSS color. When both are set,
|
|
871
|
+
* `color` wins at runtime.
|
|
872
|
+
* <StatusDot color="#7c3aed" />
|
|
873
|
+
*/
|
|
874
|
+
interface StatusDotProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
875
|
+
/** Semantic state. Default `'ok'`. */
|
|
853
876
|
state?: StatusState;
|
|
877
|
+
/** Arbitrary CSS color override. When set, replaces the state-derived color. */
|
|
878
|
+
color?: string;
|
|
854
879
|
/** Optional label rendered next to the dot. */
|
|
855
880
|
label?: ReactNode;
|
|
856
881
|
/** Pulse the dot — used for `sync` state to indicate live activity. */
|
|
@@ -860,13 +885,15 @@ interface StatusDotProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
860
885
|
}
|
|
861
886
|
declare const StatusDot: react.ForwardRefExoticComponent<StatusDotProps & react.RefAttributes<HTMLSpanElement>>;
|
|
862
887
|
|
|
863
|
-
interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
888
|
+
interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
864
889
|
/** Optional close button. When provided, a `×` rendered on the right calls it. */
|
|
865
890
|
onRemove?: () => void;
|
|
866
891
|
/** Optional leading icon. */
|
|
867
892
|
icon?: ReactNode;
|
|
868
893
|
/** Pixel height. Defaults to 22px. */
|
|
869
894
|
size?: number;
|
|
895
|
+
/** Arbitrary CSS color. When set, the default neutral tint is replaced with this color. */
|
|
896
|
+
color?: string;
|
|
870
897
|
children: ReactNode;
|
|
871
898
|
}
|
|
872
899
|
/**
|
|
@@ -1490,44 +1517,296 @@ interface LightboxProps {
|
|
|
1490
1517
|
declare const Lightbox: react.ForwardRefExoticComponent<LightboxProps & react.RefAttributes<HTMLDivElement>>;
|
|
1491
1518
|
|
|
1492
1519
|
/**
|
|
1493
|
-
* ListingCard — a
|
|
1494
|
-
*
|
|
1495
|
-
*
|
|
1520
|
+
* ListingCard — a marketplace card for a single listing.
|
|
1521
|
+
*
|
|
1522
|
+
* Two visual variants share the same photo + price + title spine:
|
|
1523
|
+
*
|
|
1524
|
+
* - `default` — consumer-stay style: rating, host, distance, favorite
|
|
1525
|
+
* heart. Built for marketplace grids (Airbnb / Turo search-result row).
|
|
1526
|
+
* - `spec` — product-spec style: a flag pill, photo counter, a
|
|
1527
|
+
* spec grid (e.g. 0-60 / power / drive), and an inline CTA. Better
|
|
1528
|
+
* for premium / spec-driven inventory (sports cars, electronics).
|
|
1529
|
+
*
|
|
1530
|
+
* Distinct from `EntityCard`, which is dev-tool entity chrome.
|
|
1496
1531
|
*/
|
|
1497
|
-
|
|
1532
|
+
type ListingCardVariant = 'default' | 'spec';
|
|
1533
|
+
interface ListingCardFlag {
|
|
1534
|
+
/** Glyph rendered to the left of the label. */
|
|
1535
|
+
icon?: GlyphName;
|
|
1536
|
+
/** Pill label, e.g. "Flagship", "New", "Editor's pick". */
|
|
1537
|
+
label: ReactNode;
|
|
1538
|
+
/** Badge tone. Default `accent`. */
|
|
1539
|
+
tone?: 'accent' | 'purple' | 'pink' | 'ok' | 'warn';
|
|
1540
|
+
}
|
|
1541
|
+
interface ListingCardSpec {
|
|
1542
|
+
/** Small label (typographically rendered as uppercase). */
|
|
1543
|
+
label: ReactNode;
|
|
1544
|
+
/** Headline value below the label. */
|
|
1545
|
+
value: ReactNode;
|
|
1546
|
+
}
|
|
1547
|
+
interface ListingCardCta {
|
|
1548
|
+
label: ReactNode;
|
|
1549
|
+
onClick?: () => void;
|
|
1550
|
+
href?: string;
|
|
1551
|
+
disabled?: boolean;
|
|
1552
|
+
}
|
|
1553
|
+
interface ListingCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'title' | 'onClick'> {
|
|
1554
|
+
/** Visual variant. Default `default`. */
|
|
1555
|
+
variant?: ListingCardVariant;
|
|
1498
1556
|
/** Photo URLs (or anything `Carousel` can render). At least one. */
|
|
1499
1557
|
photos: ReadonlyArray<string>;
|
|
1558
|
+
/**
|
|
1559
|
+
* Override the photo renderer. Defaults to a decorative `<img src>`.
|
|
1560
|
+
* Use this when consumers need theme-aware photos (e.g. inline SVG
|
|
1561
|
+
* placeholders that follow `currentColor`) or non-image slides.
|
|
1562
|
+
*/
|
|
1563
|
+
renderPhoto?: (src: string, index: number) => ReactNode;
|
|
1500
1564
|
/** Listing title — e.g. "2023 Tesla Model 3". */
|
|
1501
1565
|
title: ReactNode;
|
|
1502
1566
|
/** Optional eyebrow text above the title (location, vehicle type). */
|
|
1503
1567
|
eyebrow?: ReactNode;
|
|
1504
|
-
/** Average rating (0–5). When undefined, the rating row is hidden. */
|
|
1505
|
-
rating?: number;
|
|
1506
|
-
/** Number of reviews — shown next to the rating. */
|
|
1507
|
-
reviewCount?: number;
|
|
1508
1568
|
/** Headline price (e.g. `89`). */
|
|
1509
1569
|
price: ReactNode;
|
|
1510
1570
|
/** Price unit suffix (e.g. `/day`). */
|
|
1511
1571
|
priceUnit?: ReactNode;
|
|
1512
1572
|
/** Original price for sale strike-through. */
|
|
1513
1573
|
originalPrice?: ReactNode;
|
|
1574
|
+
/** Prefix shown before the price — e.g. "from". `spec` variant only. */
|
|
1575
|
+
pricePrefix?: ReactNode;
|
|
1576
|
+
/** Card width override. */
|
|
1577
|
+
width?: number | string;
|
|
1578
|
+
/** Link target for the whole card (default) or the title (spec). */
|
|
1579
|
+
href?: string;
|
|
1580
|
+
/**
|
|
1581
|
+
* Whole-card click handler. Renders an invisible stretched `<button>`
|
|
1582
|
+
* underneath the inner actions (favorite, CTA, links) so clicks on
|
|
1583
|
+
* those take precedence. Use this for "click card → open detail"
|
|
1584
|
+
* without leaving the page.
|
|
1585
|
+
*/
|
|
1586
|
+
onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
1587
|
+
/**
|
|
1588
|
+
* Visual treatment on hover. Default `lift` when the card is
|
|
1589
|
+
* interactive (has `onClick` / `href`), otherwise `none`.
|
|
1590
|
+
*/
|
|
1591
|
+
hoverEffect?: 'lift' | 'glow' | 'none';
|
|
1592
|
+
/** Average rating (0–5). When undefined, the rating row is hidden. */
|
|
1593
|
+
rating?: number;
|
|
1594
|
+
/** Number of reviews — shown next to the rating. */
|
|
1595
|
+
reviewCount?: number;
|
|
1514
1596
|
/** Host / owner name. */
|
|
1515
1597
|
host?: ReactNode;
|
|
1516
1598
|
/** Distance label (e.g. `0.4 mi away`). */
|
|
1517
1599
|
distance?: ReactNode;
|
|
1518
1600
|
/** When true, shows a `verified` badge on the photo. */
|
|
1519
1601
|
verified?: boolean;
|
|
1520
|
-
/** Link target for the whole card. */
|
|
1521
|
-
href?: string;
|
|
1522
1602
|
/** Heart-icon favorite toggle handler. */
|
|
1523
1603
|
onFavorite?: (next: boolean) => void;
|
|
1524
1604
|
/** Current favorite state. */
|
|
1525
1605
|
favorited?: boolean;
|
|
1526
|
-
/**
|
|
1527
|
-
|
|
1606
|
+
/** Pill rendered top-left of the photo. */
|
|
1607
|
+
flag?: ListingCardFlag;
|
|
1608
|
+
/** Small category tag right-aligned in the title row. */
|
|
1609
|
+
category?: ReactNode;
|
|
1610
|
+
/** Dim secondary line under the title (e.g. listing ID · year). */
|
|
1611
|
+
meta?: ReactNode;
|
|
1612
|
+
/** Spec cells rendered as a grid below the title block. */
|
|
1613
|
+
specs?: ReadonlyArray<ListingCardSpec>;
|
|
1614
|
+
/** Bottom CTA button. When set, no whole-card stretched link is rendered. */
|
|
1615
|
+
cta?: ListingCardCta;
|
|
1616
|
+
/** Hide the photo counter overlay in `spec` variant. Default `false`. */
|
|
1617
|
+
hidePhotoCounter?: boolean;
|
|
1618
|
+
/**
|
|
1619
|
+
* Per-section className overrides. Each key targets a specific element in
|
|
1620
|
+
* the rendered tree; values are merged with the component's own utilities
|
|
1621
|
+
* via `cn()` so consumers can override, extend, or replace any styling
|
|
1622
|
+
* without forking the component.
|
|
1623
|
+
*
|
|
1624
|
+
* The `className` prop still controls the outer Card element — `classNames.root`
|
|
1625
|
+
* is an alias that's also merged onto it.
|
|
1626
|
+
*/
|
|
1627
|
+
classNames?: Partial<{
|
|
1628
|
+
/** Outer Card element. Merged with `className`. */
|
|
1629
|
+
root: string;
|
|
1630
|
+
/** Wrapper around the photo Carousel (includes overlays). */
|
|
1631
|
+
photos: string;
|
|
1632
|
+
/** Top-left flag pill (spec variant). */
|
|
1633
|
+
flag: string;
|
|
1634
|
+
/** Top-right photo counter (spec variant). */
|
|
1635
|
+
photoCounter: string;
|
|
1636
|
+
/** Top-right favorite heart button (default variant). */
|
|
1637
|
+
favorite: string;
|
|
1638
|
+
/** Body content wrapper below the photos. */
|
|
1639
|
+
body: string;
|
|
1640
|
+
/** Header row containing title + (rating | category). */
|
|
1641
|
+
header: string;
|
|
1642
|
+
/** Title text. */
|
|
1643
|
+
title: string;
|
|
1644
|
+
/** Eyebrow text above the title (default variant). */
|
|
1645
|
+
eyebrow: string;
|
|
1646
|
+
/** Category tag in the title row (spec variant). */
|
|
1647
|
+
category: string;
|
|
1648
|
+
/** Meta line under the title (spec variant) or host/distance row (default). */
|
|
1649
|
+
meta: string;
|
|
1650
|
+
/** Spec grid container (spec variant). */
|
|
1651
|
+
specs: string;
|
|
1652
|
+
/** Each spec cell wrapper (spec variant). */
|
|
1653
|
+
specCell: string;
|
|
1654
|
+
/** Each spec cell's small uppercase label. */
|
|
1655
|
+
specLabel: string;
|
|
1656
|
+
/** Each spec cell's headline value. */
|
|
1657
|
+
specValue: string;
|
|
1658
|
+
/** Footer strip (price + CTA, spec variant) or price row (default). */
|
|
1659
|
+
footer: string;
|
|
1660
|
+
/** Price text. */
|
|
1661
|
+
price: string;
|
|
1662
|
+
/** Price unit (e.g. `/day`). */
|
|
1663
|
+
priceUnit: string;
|
|
1664
|
+
/** CTA button (spec variant). */
|
|
1665
|
+
cta: string;
|
|
1666
|
+
}>;
|
|
1528
1667
|
}
|
|
1529
1668
|
declare const ListingCard: react.ForwardRefExoticComponent<ListingCardProps & react.RefAttributes<HTMLDivElement>>;
|
|
1530
1669
|
|
|
1670
|
+
/**
|
|
1671
|
+
* ListingDetail — full marketplace listing popup. Photos on the left
|
|
1672
|
+
* (Carousel, click to open Lightbox for fullscreen), info on the right.
|
|
1673
|
+
* Stacks on narrow viewports. Built on Radix Dialog so focus trap,
|
|
1674
|
+
* Escape, and ARIA are inherited.
|
|
1675
|
+
*
|
|
1676
|
+
* Two visual variants mirror `ListingCard`:
|
|
1677
|
+
*
|
|
1678
|
+
* - `default` — consumer-stay style: rating, host, features, primary /
|
|
1679
|
+
* secondary CTAs.
|
|
1680
|
+
* - `spec` — product-spec style: a flag pill on the photo, photo
|
|
1681
|
+
* counter, spec grid, and a dark CTA bar with a single primary action.
|
|
1682
|
+
*/
|
|
1683
|
+
type ListingDetailVariant = 'default' | 'spec';
|
|
1684
|
+
interface ListingDetailHost {
|
|
1685
|
+
name: ReactNode;
|
|
1686
|
+
avatarUrl?: string;
|
|
1687
|
+
/** Renders a small `verified` badge next to the name. */
|
|
1688
|
+
verified?: boolean;
|
|
1689
|
+
/** Free-text meta line under the name, e.g. "Host since 2022 · 312 trips". */
|
|
1690
|
+
meta?: ReactNode;
|
|
1691
|
+
}
|
|
1692
|
+
interface ListingDetailFeature {
|
|
1693
|
+
icon: GlyphName;
|
|
1694
|
+
label: ReactNode;
|
|
1695
|
+
}
|
|
1696
|
+
interface ListingDetailAction {
|
|
1697
|
+
label: ReactNode;
|
|
1698
|
+
onClick?: () => void;
|
|
1699
|
+
href?: string;
|
|
1700
|
+
/** Disables the button while keeping it focusable for tooltips. */
|
|
1701
|
+
disabled?: boolean;
|
|
1702
|
+
}
|
|
1703
|
+
interface ListingDetailProps {
|
|
1704
|
+
/** Visual variant. Default `default`. */
|
|
1705
|
+
variant?: ListingDetailVariant;
|
|
1706
|
+
open?: boolean;
|
|
1707
|
+
defaultOpen?: boolean;
|
|
1708
|
+
onOpenChange?: (open: boolean) => void;
|
|
1709
|
+
/** Photo URLs. At least one. */
|
|
1710
|
+
photos: ReadonlyArray<string>;
|
|
1711
|
+
/**
|
|
1712
|
+
* Override the photo renderer for the gallery and the fullscreen
|
|
1713
|
+
* `Lightbox`. Defaults to decorative `<img src>` (object-cover in the
|
|
1714
|
+
* gallery, object-contain in the lightbox). Use this for theme-aware
|
|
1715
|
+
* placeholders or non-image slides.
|
|
1716
|
+
*/
|
|
1717
|
+
renderPhoto?: (src: string, index: number, mode: 'gallery' | 'lightbox') => ReactNode;
|
|
1718
|
+
/** Listing title — e.g. "2023 Tesla Model 3". */
|
|
1719
|
+
title: ReactNode;
|
|
1720
|
+
/** Optional eyebrow above the title — vehicle type, location. */
|
|
1721
|
+
eyebrow?: ReactNode;
|
|
1722
|
+
/** Long-form description body. */
|
|
1723
|
+
description?: ReactNode;
|
|
1724
|
+
/** Average rating (0–5). When undefined, the rating row is hidden. */
|
|
1725
|
+
rating?: number;
|
|
1726
|
+
/** Total review count, shown next to the rating. */
|
|
1727
|
+
reviewCount?: number;
|
|
1728
|
+
/** Headline price (e.g. `$89`). */
|
|
1729
|
+
price: ReactNode;
|
|
1730
|
+
/** Suffix after the price (e.g. `/day`). */
|
|
1731
|
+
priceUnit?: ReactNode;
|
|
1732
|
+
/** Original price for a strike-through; renders only when set. */
|
|
1733
|
+
originalPrice?: ReactNode;
|
|
1734
|
+
/** Prefix shown before the price — e.g. "from". `spec` variant only. */
|
|
1735
|
+
pricePrefix?: ReactNode;
|
|
1736
|
+
/** Host card data — name + avatar + optional verified / meta line. */
|
|
1737
|
+
host?: ListingDetailHost;
|
|
1738
|
+
/** Feature chips (e.g. seats, fuel, A/C). */
|
|
1739
|
+
features?: ReadonlyArray<ListingDetailFeature>;
|
|
1740
|
+
/** Primary CTA — typically "Book now". Default variant. */
|
|
1741
|
+
primaryAction?: ListingDetailAction;
|
|
1742
|
+
/** Secondary CTA — typically "Message host". Default variant. */
|
|
1743
|
+
secondaryAction?: ListingDetailAction;
|
|
1744
|
+
/** Pill rendered top-left of the photo. */
|
|
1745
|
+
flag?: ListingCardFlag;
|
|
1746
|
+
/** Small category tag right-aligned in the title row. */
|
|
1747
|
+
category?: ReactNode;
|
|
1748
|
+
/** Dim secondary line under the title (e.g. listing ID · year). */
|
|
1749
|
+
meta?: ReactNode;
|
|
1750
|
+
/** Spec cells rendered as a grid in the info column. */
|
|
1751
|
+
specs?: ReadonlyArray<ListingCardSpec>;
|
|
1752
|
+
/** Primary CTA rendered in the dark bottom bar. `spec` variant. */
|
|
1753
|
+
cta?: ListingCardCta;
|
|
1754
|
+
/** Hide the photo counter overlay in `spec` variant. Default `false`. */
|
|
1755
|
+
hidePhotoCounter?: boolean;
|
|
1756
|
+
/**
|
|
1757
|
+
* Per-section className overrides. Each key targets a specific element
|
|
1758
|
+
* in the rendered tree; values are merged with the component's own
|
|
1759
|
+
* utilities via `cn()`.
|
|
1760
|
+
*/
|
|
1761
|
+
classNames?: Partial<{
|
|
1762
|
+
/** RadixDialog.Overlay (the darkened backdrop). */
|
|
1763
|
+
overlay: string;
|
|
1764
|
+
/** RadixDialog.Content (the modal panel). */
|
|
1765
|
+
content: string;
|
|
1766
|
+
/** Two-column grid inside the panel. */
|
|
1767
|
+
grid: string;
|
|
1768
|
+
/** Photos column wrapper. */
|
|
1769
|
+
photos: string;
|
|
1770
|
+
/** Info column wrapper. */
|
|
1771
|
+
info: string;
|
|
1772
|
+
/** Header (title + category + meta + rating). */
|
|
1773
|
+
header: string;
|
|
1774
|
+
/** Title text. */
|
|
1775
|
+
title: string;
|
|
1776
|
+
/** Category tag (spec variant). */
|
|
1777
|
+
category: string;
|
|
1778
|
+
/** Meta line (spec variant). */
|
|
1779
|
+
meta: string;
|
|
1780
|
+
/** Spec grid container (spec variant). */
|
|
1781
|
+
specs: string;
|
|
1782
|
+
/** Each spec cell wrapper. */
|
|
1783
|
+
specCell: string;
|
|
1784
|
+
specLabel: string;
|
|
1785
|
+
specValue: string;
|
|
1786
|
+
/** Host row (default variant). */
|
|
1787
|
+
host: string;
|
|
1788
|
+
/** Feature chips list (default variant). */
|
|
1789
|
+
features: string;
|
|
1790
|
+
/** Description paragraph. */
|
|
1791
|
+
description: string;
|
|
1792
|
+
/** Footer / bottom CTA bar. */
|
|
1793
|
+
footer: string;
|
|
1794
|
+
/** Price text inside the footer. */
|
|
1795
|
+
price: string;
|
|
1796
|
+
/** Price unit text inside the footer. */
|
|
1797
|
+
priceUnit: string;
|
|
1798
|
+
/** CTA button (spec variant) or primary action button (default). */
|
|
1799
|
+
cta: string;
|
|
1800
|
+
/** Top-left flag pill on the photos (spec variant). */
|
|
1801
|
+
flag: string;
|
|
1802
|
+
/** Top-right photo counter (spec variant). */
|
|
1803
|
+
photoCounter: string;
|
|
1804
|
+
/** Close button (top-right corner). */
|
|
1805
|
+
close: string;
|
|
1806
|
+
}>;
|
|
1807
|
+
}
|
|
1808
|
+
declare const ListingDetail: react.ForwardRefExoticComponent<ListingDetailProps & react.RefAttributes<HTMLDivElement>>;
|
|
1809
|
+
|
|
1531
1810
|
/**
|
|
1532
1811
|
* Country data for `PhoneInput`. Subset of common origins — extend as the
|
|
1533
1812
|
* product grows or replace with a full ISO 3166-1 list (e.g. `libphonenumber-js`
|
|
@@ -2422,4 +2701,4 @@ interface WizardDialogProps {
|
|
|
2422
2701
|
}
|
|
2423
2702
|
declare const WizardDialog: react.ForwardRefExoticComponent<WizardDialogProps & react.RefAttributes<HTMLDivElement>>;
|
|
2424
2703
|
|
|
2425
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type ActivityActor, type ActivityEvent, ActivityTimeline, type ActivityTimelineProps, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, type AlertDialogProps, AlertDialogRoot, AlertDialogTrigger, type AlertProps, type AlertTone, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, type CalendarProps, Card, CardLink, type CardLinkProps, type CardProps, Carousel, type CarouselProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Combobox, type ComboboxOption, type ComboboxProps, CommandPalette, type CommandPaletteGroup, type CommandPaletteItem, type CommandPaletteProps, ContextMenu, ContextMenuContent, ContextMenuItem, type ContextMenuItemProps, ContextMenuPortal, ContextMenuRoot, ContextMenuSeparator, ContextMenuTrigger, Crumb, type CrumbProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogOverlay, DialogPortal, type DialogProps, DialogRoot, DialogTrigger, Dots, type DotsProps, Drawer, type DrawerProps, type DrawerSide, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRoot, DropdownMenuTrigger, Dropzone, type DropzoneProps, EmptyState, type EmptyStateProps, FAB, type FABProps, Field, type FieldProps, FileChip, type FileChipProps, type FilterFacet, type FilterFacetOption, FilterPanel, type FilterPanelProps, type FilterPanelValue, HealthScore, type HealthScoreBreakdownEntry, type HealthScoreProps, HoverCard, HoverCardContent, HoverCardPortal, type HoverCardProps, HoverCardRoot, HoverCardTrigger, IconButton, type IconButtonProps, InlineEdit, type InlineEditHandle, type InlineEditProps, Input, type InputProps, Kbd, type KbdProps, LargeTitle, type LargeTitleProps, Lightbox, type LightboxProps, ListingCard, type ListingCardProps, MenuCheckboxItem, MenuItem, type MenuItemProps, MenuSeparator, Menubar, MenubarContent, MenubarItem, type MenubarItemProps, MenubarMenu, MenubarSeparator, MenubarTrigger, NavBar, type NavBarItem, type NavBarOrientation, type NavBarProps, NavItem, type NavItemProps, NavSection, type NavSectionProps, type NormalizedOption, NumberInput, type NumberInputProps, OTP, type OTPHandle, type OTPProps, OnboardingChecklist, type OnboardingChecklistProps, type OnboardingItem, type OnboardingItemStatus, Pagination, type PaginationProps, type PhoneCountry, PhoneInput, type PhoneInputProps, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, PriceBreakdown, type PriceBreakdownItem, PriceBreakdownLine, type PriceBreakdownLineProps, type PriceBreakdownProps, Progress, type ProgressProps, PullToRefresh, type PullToRefreshProps, type PullToRefreshState, RadialProgress, type RadialProgressProps, type RadialTone, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, ReviewCard, type ReviewCardProps, ScrollArea, type ScrollAreaProps, type ScrollAreaType, SearchInput, type SearchInputProps, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, type SelectProps, SelectRoot, SelectTrigger, SelectValue, Sheet, type SheetProps, Sidebar, type SidebarProps, SimpleTooltip, type SimpleTooltipProps, Skeleton, SkeletonGroup, type SkeletonGroupProps, type SkeletonProps, Slider, type SliderProps, Sparkline, type SparklineProps, Spinner, type SpinnerProps, SplitButton, type SplitButtonProps, StatCard, type StatCardProps, type StatTrend, StatusDot, type StatusDotProps, type StatusState, type StepState, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Tab, TabBar, type TabBarItem, type TabBarProps, type TabProps, Tabs, TabsContent, TabsList, type TabsProps, type TabsVariantProps, Tag, type TagProps, Textarea, type TextareaProps, type Theme, Timeline, type TimelineEvent, type TimelineEventTone, TimelineItem, type TimelineItemProps, type TimelineProps, ToastCard, type ToastInput, ToastProvider, type ToastVariant, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Topbar, type TopbarProps, Tree, type TreeItem, type TreeProps, type UseControllableStateProps, type UseKeyboardListOptions, type UseKeyboardListResult, type WizardContext, WizardDialog, type WizardDialogProps, type WizardStep, badgeStyles, buttonStyles, cardStyles, cn, filterCommandItems, formatRelative, iconButtonStyles, phoneCountries, useControllableState, useDisclosure, useEscape, useIsomorphicLayoutEffect, useKeyboardList, useOutsideClick, useTheme, useToast };
|
|
2704
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type ActivityActor, type ActivityEvent, ActivityTimeline, type ActivityTimelineProps, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, type AlertDialogProps, AlertDialogRoot, AlertDialogTrigger, type AlertProps, type AlertTone, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, type CalendarProps, Card, CardLink, type CardLinkProps, type CardProps, Carousel, type CarouselProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Combobox, type ComboboxOption, type ComboboxProps, CommandPalette, type CommandPaletteGroup, type CommandPaletteItem, type CommandPaletteProps, ContextMenu, ContextMenuContent, ContextMenuItem, type ContextMenuItemProps, ContextMenuPortal, ContextMenuRoot, ContextMenuSeparator, ContextMenuTrigger, Crumb, type CrumbProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogOverlay, DialogPortal, type DialogProps, DialogRoot, DialogTrigger, Dots, type DotsProps, Drawer, type DrawerProps, type DrawerSide, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRoot, DropdownMenuTrigger, Dropzone, type DropzoneProps, EmptyState, type EmptyStateProps, FAB, type FABProps, Field, type FieldProps, FileChip, type FileChipProps, type FilterFacet, type FilterFacetOption, FilterPanel, type FilterPanelProps, type FilterPanelValue, HealthScore, type HealthScoreBreakdownEntry, type HealthScoreProps, HoverCard, HoverCardContent, HoverCardPortal, type HoverCardProps, HoverCardRoot, HoverCardTrigger, IconButton, type IconButtonProps, InlineEdit, type InlineEditHandle, type InlineEditProps, Input, type InputProps, Kbd, type KbdProps, LargeTitle, type LargeTitleProps, Lightbox, type LightboxProps, ListingCard, type ListingCardCta, type ListingCardFlag, type ListingCardProps, type ListingCardSpec, type ListingCardVariant, ListingDetail, type ListingDetailAction, type ListingDetailFeature, type ListingDetailHost, type ListingDetailProps, type ListingDetailVariant, MenuCheckboxItem, MenuItem, type MenuItemProps, MenuSeparator, Menubar, MenubarContent, MenubarItem, type MenubarItemProps, MenubarMenu, MenubarSeparator, MenubarTrigger, NavBar, type NavBarItem, type NavBarOrientation, type NavBarProps, NavItem, type NavItemProps, NavSection, type NavSectionProps, type NormalizedOption, NumberInput, type NumberInputProps, OTP, type OTPHandle, type OTPProps, OnboardingChecklist, type OnboardingChecklistProps, type OnboardingItem, type OnboardingItemStatus, Pagination, type PaginationProps, type PhoneCountry, PhoneInput, type PhoneInputProps, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, PriceBreakdown, type PriceBreakdownItem, PriceBreakdownLine, type PriceBreakdownLineProps, type PriceBreakdownProps, Progress, type ProgressProps, PullToRefresh, type PullToRefreshProps, type PullToRefreshState, RadialProgress, type RadialProgressProps, type RadialTone, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, ReviewCard, type ReviewCardProps, ScrollArea, type ScrollAreaProps, type ScrollAreaType, SearchInput, type SearchInputProps, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, type SelectProps, SelectRoot, SelectTrigger, SelectValue, Sheet, type SheetProps, Sidebar, type SidebarProps, SimpleTooltip, type SimpleTooltipProps, Skeleton, SkeletonGroup, type SkeletonGroupProps, type SkeletonProps, Slider, type SliderProps, Sparkline, type SparklineProps, Spinner, type SpinnerProps, SplitButton, type SplitButtonProps, StatCard, type StatCardProps, type StatTrend, StatusDot, type StatusDotProps, type StatusState, type StepState, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Tab, TabBar, type TabBarItem, type TabBarProps, type TabProps, Tabs, TabsContent, TabsList, type TabsProps, type TabsVariantProps, Tag, type TagProps, Textarea, type TextareaProps, type Theme, Timeline, type TimelineEvent, type TimelineEventTone, TimelineItem, type TimelineItemProps, type TimelineProps, ToastCard, type ToastInput, ToastProvider, type ToastVariant, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Topbar, type TopbarProps, Tree, type TreeItem, type TreeProps, type UseControllableStateProps, type UseKeyboardListOptions, type UseKeyboardListResult, type WizardContext, WizardDialog, type WizardDialogProps, type WizardStep, badgeStyles, buttonStyles, cardStyles, cn, filterCommandItems, formatRelative, iconButtonStyles, phoneCountries, useControllableState, useDisclosure, useEscape, useIsomorphicLayoutEffect, useKeyboardList, useOutsideClick, useTheme, useToast };
|