@ship-it-ui/ui 0.0.14 → 0.0.15
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 +1694 -1133
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +333 -9
- package/dist/index.d.ts +333 -9
- package/dist/index.js +1464 -909
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/styles/globals.css +6 -0
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,
|
|
4
|
+
import { ReactElement, ReactNode, ComponentPropsWithoutRef, TimeHTMLAttributes, useEffect, KeyboardEvent, RefObject, ButtonHTMLAttributes, 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';
|
|
@@ -30,6 +30,103 @@ import * as RadixTabs from '@radix-ui/react-tabs';
|
|
|
30
30
|
*/
|
|
31
31
|
declare function cn(...inputs: ClassValue[]): string;
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Emits a `<script type="application/ld+json">` tag carrying schema.org (or
|
|
35
|
+
* any JSON-serializable) structured data. The payload is escaped so a
|
|
36
|
+
* user-supplied string containing `</script>` can't break out of the script
|
|
37
|
+
* tag — that's the standard Next.js JSON-LD recipe.
|
|
38
|
+
*
|
|
39
|
+
* Returns `null` for `null`/`undefined` data so call sites can pass the
|
|
40
|
+
* payload directly without an outer guard.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* <JsonLd data={{
|
|
44
|
+
* '@context': 'https://schema.org',
|
|
45
|
+
* '@type': 'BreadcrumbList',
|
|
46
|
+
* itemListElement: items,
|
|
47
|
+
* }} />
|
|
48
|
+
*/
|
|
49
|
+
interface JsonLdProps {
|
|
50
|
+
/** The structured-data payload. JSON-stringified into the script body. */
|
|
51
|
+
data: unknown;
|
|
52
|
+
}
|
|
53
|
+
declare function JsonLd({ data }: JsonLdProps): ReactElement | null;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Helpers used by components that emit schema.org JSON-LD.
|
|
57
|
+
*
|
|
58
|
+
* Centralised here so the seven structured-data components
|
|
59
|
+
* (ComparisonTable, Breadcrumbs, ReviewCard, Testimonial, PricingCard,
|
|
60
|
+
* ListingCard/Detail, ConnectorCard) don't each carry their own copy.
|
|
61
|
+
* If the behavior ever needs to change (e.g. handle `bigint`,
|
|
62
|
+
* normalise whitespace), there's one place to do it.
|
|
63
|
+
*/
|
|
64
|
+
/**
|
|
65
|
+
* Returns the string form of a `ReactNode` when it's a plain string or
|
|
66
|
+
* number, otherwise `null`. Components emitting JSON-LD use this to
|
|
67
|
+
* decide whether a JSX-typed prop can populate a string-only schema
|
|
68
|
+
* field — when it returns `null`, the field (or the whole entity) is
|
|
69
|
+
* skipped rather than coerced to `"[object Object]"` or similar.
|
|
70
|
+
*/
|
|
71
|
+
declare function nodeToString(node: ReactNode): string | null;
|
|
72
|
+
/**
|
|
73
|
+
* Returns the ISO 8601 string for a `Date`, `string`, or epoch-number
|
|
74
|
+
* input, or `null` when the value is `undefined`/`null` or the
|
|
75
|
+
* resulting `Date` is not a valid timestamp. Used by the
|
|
76
|
+
* `datePublished` / `dateModified` JSON-LD fields and the
|
|
77
|
+
* `<time dateTime>` attribute on review and activity components.
|
|
78
|
+
*
|
|
79
|
+
* Strings are passed through as-is (no validation) so consumers who
|
|
80
|
+
* already have an ISO 8601 string don't pay for a parse + re-format
|
|
81
|
+
* round trip and so non-ISO machine-readable strings supported by
|
|
82
|
+
* `<time dateTime>` (e.g. `"2026-W19"`) survive.
|
|
83
|
+
*/
|
|
84
|
+
declare function toIsoString(value: Date | string | number | undefined | null): string | null;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Six valid HTML heading levels. Components in the design system expose this
|
|
88
|
+
* type through a `titleAs?: HeadingLevel` prop so consumers can compose the
|
|
89
|
+
* page's H1/H2/H3 hierarchy correctly.
|
|
90
|
+
*/
|
|
91
|
+
type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
92
|
+
interface HeadingProps extends ComponentPropsWithoutRef<'h2'> {
|
|
93
|
+
/** Heading level to render. Default `'h2'`. */
|
|
94
|
+
as?: HeadingLevel;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Renders an `<h1>`–`<h6>` element based on the `as` prop, defaulting to
|
|
98
|
+
* `<h2>`. Use this in design-system components that surface a `titleAs`
|
|
99
|
+
* configurable heading prop so the visual style stays consistent while the
|
|
100
|
+
* underlying element changes.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* <Heading as={titleAs} className="text-[18px] font-semibold">
|
|
104
|
+
* {title}
|
|
105
|
+
* </Heading>
|
|
106
|
+
*/
|
|
107
|
+
declare const Heading: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
108
|
+
|
|
109
|
+
interface DateTimeProps extends Omit<TimeHTMLAttributes<HTMLTimeElement>, 'dateTime' | 'children'> {
|
|
110
|
+
/** Machine-readable ISO 8601 string or `Date` object. Rendered into `<time dateTime="…">`. */
|
|
111
|
+
iso: string | Date;
|
|
112
|
+
/**
|
|
113
|
+
* Visible label. When omitted the component falls back to the ISO string,
|
|
114
|
+
* so consumers can pass just `<DateTime iso={...} />` and get a sane render.
|
|
115
|
+
*/
|
|
116
|
+
children?: ReactNode;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Wraps a date label in a `<time dateTime="…">` element with a machine-readable
|
|
120
|
+
* ISO 8601 attribute. Search crawlers and AI agents read `dateTime` for
|
|
121
|
+
* timestamps even when the visible label is a relative phrase like
|
|
122
|
+
* "2 days ago" or a localized format like "May 3, 2026".
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* <DateTime iso="2026-05-03">May 3, 2026</DateTime>
|
|
126
|
+
* <DateTime iso={lastSyncedAt}>{formatRelative(lastSyncedAt)}</DateTime>
|
|
127
|
+
*/
|
|
128
|
+
declare const DateTime: react.ForwardRefExoticComponent<DateTimeProps & react.RefAttributes<HTMLTimeElement>>;
|
|
129
|
+
|
|
33
130
|
/**
|
|
34
131
|
* Standard controlled/uncontrolled state hook. Mirrors Radix's
|
|
35
132
|
* `useControllableState` — when `value` is provided, the hook stays in sync
|
|
@@ -153,9 +250,9 @@ declare function useTheme(): {
|
|
|
153
250
|
* else defers. Variants and sizes match `design-handoff/project/components/Button.jsx`.
|
|
154
251
|
*/
|
|
155
252
|
declare const buttonStyles: (props?: ({
|
|
156
|
-
variant?: "primary" | "secondary" | "ghost" | "outline" | "destructive" | "success" |
|
|
253
|
+
variant?: "link" | "primary" | "secondary" | "ghost" | "outline" | "destructive" | "success" | null | undefined;
|
|
157
254
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
158
|
-
density?: "
|
|
255
|
+
density?: "touch" | "comfortable" | null | undefined;
|
|
159
256
|
fullWidth?: boolean | null | undefined;
|
|
160
257
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
161
258
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonStyles> {
|
|
@@ -176,7 +273,7 @@ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAtt
|
|
|
176
273
|
declare const iconButtonStyles: (props?: ({
|
|
177
274
|
variant?: "primary" | "secondary" | "ghost" | "outline" | "destructive" | "success" | null | undefined;
|
|
178
275
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
179
|
-
density?: "
|
|
276
|
+
density?: "touch" | "comfortable" | null | undefined;
|
|
180
277
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
181
278
|
interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>, VariantProps<typeof iconButtonStyles> {
|
|
182
279
|
/** The glyph or icon node to render. Pure decoration — set `aria-label` for screen readers. */
|
|
@@ -344,7 +441,7 @@ declare const InlineEdit: react.ForwardRefExoticComponent<InlineEditProps & reac
|
|
|
344
441
|
declare const inputWrapperStyles: (props?: ({
|
|
345
442
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
346
443
|
tone?: "default" | "err" | null | undefined;
|
|
347
|
-
density?: "
|
|
444
|
+
density?: "touch" | "comfortable" | null | undefined;
|
|
348
445
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
349
446
|
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputWrapperStyles> {
|
|
350
447
|
/** Element rendered to the left of the input (an `IconGlyph`, `@`, etc.). */
|
|
@@ -646,9 +743,9 @@ interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'>, Var
|
|
|
646
743
|
declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
|
|
647
744
|
|
|
648
745
|
declare const cardStyles: (props?: ({
|
|
649
|
-
variant?: "
|
|
746
|
+
variant?: "default" | "ghost" | "elevated" | null | undefined;
|
|
650
747
|
interactive?: boolean | null | undefined;
|
|
651
|
-
density?: "
|
|
748
|
+
density?: "touch" | "comfortable" | null | undefined;
|
|
652
749
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
653
750
|
interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, VariantProps<typeof cardStyles> {
|
|
654
751
|
/** Render a header row with this title (and optional `actions`). */
|
|
@@ -1199,10 +1296,19 @@ declare const Banner: react.ForwardRefExoticComponent<BannerProps & react.RefAtt
|
|
|
1199
1296
|
* the current page (rendered as plain text with `aria-current="page"`); earlier
|
|
1200
1297
|
* crumbs render as links if `href` is provided. Pass `separator` to swap the
|
|
1201
1298
|
* default `/` divider.
|
|
1299
|
+
*
|
|
1300
|
+
* Emits a schema.org `BreadcrumbList` JSON-LD script next to the `<nav>` so
|
|
1301
|
+
* crawlers and AI agents understand the trail without parsing the DOM. The
|
|
1302
|
+
* script auto-derives `position`/`name`/`item` from each `<Crumb>`'s `href`
|
|
1303
|
+
* and visible children; crumbs without a string label are skipped. Pass
|
|
1304
|
+
* `noStructuredData` to suppress emission entirely (consumers emitting their
|
|
1305
|
+
* own page-level structured data).
|
|
1202
1306
|
*/
|
|
1203
1307
|
interface BreadcrumbsProps extends HTMLAttributes<HTMLElement> {
|
|
1204
1308
|
/** Element to render between crumbs. Defaults to a dim `/`. */
|
|
1205
1309
|
separator?: ReactNode;
|
|
1310
|
+
/** Opt out of emitting the `BreadcrumbList` JSON-LD script. */
|
|
1311
|
+
noStructuredData?: boolean;
|
|
1206
1312
|
}
|
|
1207
1313
|
declare const Breadcrumbs: react.ForwardRefExoticComponent<BreadcrumbsProps & react.RefAttributes<HTMLElement>>;
|
|
1208
1314
|
interface CrumbProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
@@ -1370,6 +1476,113 @@ declare const CommandPalette: react.ForwardRefExoticComponent<CommandPaletteProp
|
|
|
1370
1476
|
*/
|
|
1371
1477
|
declare function filterCommandItems(query: string, groups: ReadonlyArray<CommandPaletteGroup>): CommandPaletteGroup[];
|
|
1372
1478
|
|
|
1479
|
+
/**
|
|
1480
|
+
* ComparisonTable — option-vs-option matrix. Rows are features, columns are
|
|
1481
|
+
* options (products, plan tiers, spec sheets), cells are booleans (rendered as
|
|
1482
|
+
* check/cross with sr-only "Yes"/"No"), strings, numbers, or `{ value, note }`
|
|
1483
|
+
* objects for a primary value with a small footnote.
|
|
1484
|
+
*
|
|
1485
|
+
* Designed for AI/SEO consumption: emits a `<script type="application/ld+json">`
|
|
1486
|
+
* next to the table by default — one schema.org entity per option, with each
|
|
1487
|
+
* row contributing an `additionalProperty` `PropertyValue`. Pass `schema` to
|
|
1488
|
+
* change the `@type` (default `Product`), or `noStructuredData` to suppress
|
|
1489
|
+
* the script entirely.
|
|
1490
|
+
*
|
|
1491
|
+
* Semantic HTML: `<caption>` (sr-only), `<th scope="col">` for option headers,
|
|
1492
|
+
* `<th scope="row">` for feature names, optional `<tfoot>` for CTA actions.
|
|
1493
|
+
* Featured columns carry `data-featured="true"`; every cell carries
|
|
1494
|
+
* `data-cell-type` and (when meaningful) `data-cell-value` for crawlers and
|
|
1495
|
+
* scrapers that don't execute JS.
|
|
1496
|
+
*/
|
|
1497
|
+
type ComparisonCellValue = boolean | string | number | {
|
|
1498
|
+
value: ReactNode;
|
|
1499
|
+
note?: ReactNode;
|
|
1500
|
+
};
|
|
1501
|
+
interface ComparisonOption {
|
|
1502
|
+
/** Stable key — must match the keys used in each `ComparisonRow.values`. */
|
|
1503
|
+
id: string;
|
|
1504
|
+
/** Visible column header. */
|
|
1505
|
+
name: ReactNode;
|
|
1506
|
+
/** Used as the JSON-LD `name` when `name` is JSX. Falls back to `name` if it's a string. */
|
|
1507
|
+
schemaName?: string;
|
|
1508
|
+
/**
|
|
1509
|
+
* Short description, rendered as a muted line under the name AND used as the
|
|
1510
|
+
* JSON-LD `description`.
|
|
1511
|
+
*/
|
|
1512
|
+
description?: ReactNode;
|
|
1513
|
+
/** JSON-LD `url`. */
|
|
1514
|
+
url?: string;
|
|
1515
|
+
/**
|
|
1516
|
+
* Short eyebrow line rendered above the name (uppercase mono). Use for labels
|
|
1517
|
+
* like `STARTER` or `MOST POPULAR` that should live above the tier name
|
|
1518
|
+
* itself.
|
|
1519
|
+
*/
|
|
1520
|
+
tagline?: ReactNode;
|
|
1521
|
+
/**
|
|
1522
|
+
* Inline glyph rendered before the name. Pass a `GlyphName` string for a
|
|
1523
|
+
* type-checked icon from the design-system manifest, or any `ReactNode` for
|
|
1524
|
+
* custom imagery (brand logos, avatars).
|
|
1525
|
+
*/
|
|
1526
|
+
icon?: GlyphName | ReactNode;
|
|
1527
|
+
/** Highlight as the recommended option — accent-tinted column + auto badge. */
|
|
1528
|
+
featured?: boolean;
|
|
1529
|
+
/** Override the auto "recommended" badge. Set to `null` to suppress entirely. */
|
|
1530
|
+
badge?: ReactNode;
|
|
1531
|
+
/** Optional CTA rendered in a `<tfoot>` row when any option provides one. */
|
|
1532
|
+
action?: ReactNode;
|
|
1533
|
+
}
|
|
1534
|
+
interface ComparisonRow {
|
|
1535
|
+
/** Visible row header (`<th scope="row">`). */
|
|
1536
|
+
feature: ReactNode;
|
|
1537
|
+
/** Used as the JSON-LD `PropertyValue.name` when `feature` is JSX. */
|
|
1538
|
+
schemaName?: string;
|
|
1539
|
+
/** Small muted line rendered under the feature name. */
|
|
1540
|
+
description?: ReactNode;
|
|
1541
|
+
/** Optional grouping label — sibling rows with the same `group` cluster together. */
|
|
1542
|
+
group?: string;
|
|
1543
|
+
/** Cell values keyed by `ComparisonOption.id`. */
|
|
1544
|
+
values: Record<string, ComparisonCellValue | undefined>;
|
|
1545
|
+
}
|
|
1546
|
+
type ComparisonSchemaType = 'Product' | 'Service' | 'SoftwareApplication' | (string & {});
|
|
1547
|
+
interface ComparisonTableProps {
|
|
1548
|
+
/** Columns. */
|
|
1549
|
+
options: ReadonlyArray<ComparisonOption>;
|
|
1550
|
+
/** Rows. */
|
|
1551
|
+
rows: ReadonlyArray<ComparisonRow>;
|
|
1552
|
+
/** Visible-to-AT caption. Also used as the JSON-LD comparison `name`. */
|
|
1553
|
+
caption: ReactNode;
|
|
1554
|
+
/** schema.org `@type` per option in JSON-LD. Default `'Product'`. */
|
|
1555
|
+
schema?: ComparisonSchemaType;
|
|
1556
|
+
/** Opt out of emitting the JSON-LD `<script>`. */
|
|
1557
|
+
noStructuredData?: boolean;
|
|
1558
|
+
/** Visual density. Default `'comfortable'`. */
|
|
1559
|
+
density?: 'comfortable' | 'compact';
|
|
1560
|
+
/** Sticky table header (requires the table to live in a scroll container). */
|
|
1561
|
+
stickyHeader?: boolean;
|
|
1562
|
+
/**
|
|
1563
|
+
* Option-name text scale in the header. `'sm'` for dense spec sheets,
|
|
1564
|
+
* `'lg'` for marketing pricing-tier tables. Default `'md'`.
|
|
1565
|
+
*/
|
|
1566
|
+
headerSize?: 'sm' | 'md' | 'lg';
|
|
1567
|
+
/**
|
|
1568
|
+
* Horizontal alignment for option columns — affects both the header cell
|
|
1569
|
+
* and data cells in option columns. The row-header (feature-name) column
|
|
1570
|
+
* always stays left-aligned. Default `'left'`.
|
|
1571
|
+
*/
|
|
1572
|
+
headerAlign?: 'left' | 'center';
|
|
1573
|
+
/**
|
|
1574
|
+
* Lift the featured column visually: stronger header background, top + side
|
|
1575
|
+
* accent borders, larger padding, and a soft shadow. Pair with
|
|
1576
|
+
* `headerAlign="center"` and `headerSize="lg"` for a PricingCard-style tier
|
|
1577
|
+
* comparison.
|
|
1578
|
+
*/
|
|
1579
|
+
prominentFeatured?: boolean;
|
|
1580
|
+
className?: string;
|
|
1581
|
+
}
|
|
1582
|
+
declare function ComparisonTable(props: ComparisonTableProps & {
|
|
1583
|
+
ref?: Ref<HTMLTableElement>;
|
|
1584
|
+
}): react.JSX.Element;
|
|
1585
|
+
|
|
1373
1586
|
/**
|
|
1374
1587
|
* DataTable — generic, sortable, selectable table. The component is a
|
|
1375
1588
|
* "headless-with-defaults": you bring your data and column definitions, the
|
|
@@ -1647,6 +1860,32 @@ interface ListingCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'childre
|
|
|
1647
1860
|
cta?: ListingCardCta;
|
|
1648
1861
|
/** Hide the photo counter overlay in `spec` variant. Default `false`. */
|
|
1649
1862
|
hidePhotoCounter?: boolean;
|
|
1863
|
+
/**
|
|
1864
|
+
* schema.org `@type` for the JSON-LD entity. Defaults to `'Accommodation'`
|
|
1865
|
+
* for the default variant and `'Product'` for the spec variant. Pass
|
|
1866
|
+
* `'Place'`, `'LodgingBusiness'`, or any string to override.
|
|
1867
|
+
*/
|
|
1868
|
+
schema?: 'Accommodation' | 'Product' | 'Place' | 'LodgingBusiness' | (string & {});
|
|
1869
|
+
/**
|
|
1870
|
+
* ISO 4217 currency code (e.g. `'USD'`). REQUIRED to emit the `offers`
|
|
1871
|
+
* block — without it the offer is skipped (the rest of the entity still
|
|
1872
|
+
* emits if `title` resolves to a string).
|
|
1873
|
+
*/
|
|
1874
|
+
priceCurrency?: string;
|
|
1875
|
+
/**
|
|
1876
|
+
* Explicit numeric price for JSON-LD. When omitted, parsed from the
|
|
1877
|
+
* visible `price` prop by stripping non-numeric characters. Pass this
|
|
1878
|
+
* when `price` is JSX or not cleanly parseable.
|
|
1879
|
+
*/
|
|
1880
|
+
priceAmount?: number;
|
|
1881
|
+
/** Optional URL of the listing detail page — also emitted as the entity `url`. */
|
|
1882
|
+
url?: string;
|
|
1883
|
+
/** String version of `title` for the JSON-LD `name`. Required if `title` is JSX. */
|
|
1884
|
+
titleText?: string;
|
|
1885
|
+
/** String version of `eyebrow` for the JSON-LD `description`. */
|
|
1886
|
+
descriptionText?: string;
|
|
1887
|
+
/** Opt out of emitting the JSON-LD script. */
|
|
1888
|
+
noStructuredData?: boolean;
|
|
1650
1889
|
/**
|
|
1651
1890
|
* Per-section className overrides. Each key targets a specific element in
|
|
1652
1891
|
* the rendered tree; values are merged with the component's own utilities
|
|
@@ -1794,6 +2033,35 @@ interface ListingDetailProps {
|
|
|
1794
2033
|
cta?: ListingCardCta;
|
|
1795
2034
|
/** Hide the photo counter overlay in `spec` variant. Default `false`. */
|
|
1796
2035
|
hidePhotoCounter?: boolean;
|
|
2036
|
+
/**
|
|
2037
|
+
* schema.org `@type` for the JSON-LD entity. Defaults to `'Accommodation'`
|
|
2038
|
+
* for the default variant and `'Product'` for the spec variant. Pass
|
|
2039
|
+
* `'Place'`, `'LodgingBusiness'`, or any custom string to override.
|
|
2040
|
+
*/
|
|
2041
|
+
schema?: 'Accommodation' | 'Product' | 'Place' | 'LodgingBusiness' | (string & {});
|
|
2042
|
+
/**
|
|
2043
|
+
* ISO 4217 currency code (e.g. `'USD'`). REQUIRED to emit the `offers`
|
|
2044
|
+
* block — without it the offer is skipped (the rest of the entity still
|
|
2045
|
+
* emits if `title` resolves to a string).
|
|
2046
|
+
*/
|
|
2047
|
+
priceCurrency?: string;
|
|
2048
|
+
/**
|
|
2049
|
+
* Explicit numeric price for JSON-LD. When omitted, parsed from the
|
|
2050
|
+
* visible `price` prop by stripping non-numeric characters.
|
|
2051
|
+
*/
|
|
2052
|
+
priceAmount?: number;
|
|
2053
|
+
/** Listing detail URL, also emitted as the entity `url`. */
|
|
2054
|
+
url?: string;
|
|
2055
|
+
/** String version of `title` for the JSON-LD `name`. Required if `title` is JSX. */
|
|
2056
|
+
titleText?: string;
|
|
2057
|
+
/** String version of `description` for the JSON-LD `description`. */
|
|
2058
|
+
descriptionText?: string;
|
|
2059
|
+
/**
|
|
2060
|
+
* Opt out of emitting the JSON-LD `<script>`. The script renders as a
|
|
2061
|
+
* sibling of the Radix Dialog root (outside the Portal) so it appears in
|
|
2062
|
+
* the SSR'd HTML regardless of `open` state — crawlers see it always.
|
|
2063
|
+
*/
|
|
2064
|
+
noStructuredData?: boolean;
|
|
1797
2065
|
/**
|
|
1798
2066
|
* Per-section className overrides. Each key targets a specific element
|
|
1799
2067
|
* in the rendered tree; values are merged with the component's own
|
|
@@ -1934,6 +2202,14 @@ declare const PriceBreakdownLine: react.ForwardRefExoticComponent<PriceBreakdown
|
|
|
1934
2202
|
* body, optional photos strip, and a `verified-trip` badge.
|
|
1935
2203
|
*
|
|
1936
2204
|
* Distinct from `Testimonial`, which is curated marketing chrome.
|
|
2205
|
+
*
|
|
2206
|
+
* Emits a schema.org `Review` JSON-LD entity by default. Pass `dateTime`
|
|
2207
|
+
* (ISO 8601 string or Date) to populate `datePublished` and emit a
|
|
2208
|
+
* machine-readable `<time dateTime>`; without it the visible `date` is
|
|
2209
|
+
* still rendered but `datePublished` is omitted. The review must point
|
|
2210
|
+
* at *something* — pass `itemReviewedName` (and optionally `url` of the
|
|
2211
|
+
* reviewed item) so Google's Rich Results Test accepts it as a valid
|
|
2212
|
+
* `Review`. Pass `noStructuredData` to suppress the JSON-LD script.
|
|
1937
2213
|
*/
|
|
1938
2214
|
interface ReviewCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
1939
2215
|
/** Reviewer display name. */
|
|
@@ -1944,6 +2220,13 @@ interface ReviewCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children
|
|
|
1944
2220
|
rating: number;
|
|
1945
2221
|
/** When set, renders as a Date — otherwise as a string. */
|
|
1946
2222
|
date: ReactNode;
|
|
2223
|
+
/**
|
|
2224
|
+
* Machine-readable ISO 8601 string (or Date) for the review date. Emitted
|
|
2225
|
+
* as `<time dateTime="…">{date}</time>` and threaded into the JSON-LD
|
|
2226
|
+
* `datePublished` field. Backwards-compatible: when omitted the visible
|
|
2227
|
+
* `date` is rendered without a `dateTime` attribute.
|
|
2228
|
+
*/
|
|
2229
|
+
dateTime?: string | Date;
|
|
1947
2230
|
/** Review body. */
|
|
1948
2231
|
body: ReactNode;
|
|
1949
2232
|
/** Optional photo URLs (rendered as a horizontal strip). */
|
|
@@ -1952,6 +2235,19 @@ interface ReviewCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children
|
|
|
1952
2235
|
verified?: boolean;
|
|
1953
2236
|
/** Optional reviewer subtitle (location, member-since date). */
|
|
1954
2237
|
subtitle?: ReactNode;
|
|
2238
|
+
/**
|
|
2239
|
+
* String version of `author` for the JSON-LD `author.name` field. Required
|
|
2240
|
+
* when `author` is JSX — without it the JSON-LD script is suppressed.
|
|
2241
|
+
*/
|
|
2242
|
+
authorName?: string;
|
|
2243
|
+
/** String version of `body` for the JSON-LD `reviewBody`. */
|
|
2244
|
+
bodyText?: string;
|
|
2245
|
+
/** Name of the thing being reviewed (product, place, service). */
|
|
2246
|
+
itemReviewedName?: string;
|
|
2247
|
+
/** Optional URL of the reviewed item. */
|
|
2248
|
+
url?: string;
|
|
2249
|
+
/** Opt out of emitting the schema.org `Review` JSON-LD script. */
|
|
2250
|
+
noStructuredData?: boolean;
|
|
1955
2251
|
}
|
|
1956
2252
|
declare const ReviewCard: react.ForwardRefExoticComponent<ReviewCardProps & react.RefAttributes<HTMLDivElement>>;
|
|
1957
2253
|
|
|
@@ -2011,6 +2307,12 @@ interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>
|
|
|
2011
2307
|
icon?: ReactNode;
|
|
2012
2308
|
/** Title heading. */
|
|
2013
2309
|
title: ReactNode;
|
|
2310
|
+
/**
|
|
2311
|
+
* Heading level for the title. Default `'h3'` — EmptyState typically lives
|
|
2312
|
+
* inside a section that already has an `h2`. Bump to `h2` for top-of-screen
|
|
2313
|
+
* "nothing here" states.
|
|
2314
|
+
*/
|
|
2315
|
+
titleAs?: HeadingLevel;
|
|
2014
2316
|
/** Body description. */
|
|
2015
2317
|
description?: ReactNode;
|
|
2016
2318
|
/** Optional primary action (e.g., a Button) below the description. */
|
|
@@ -2169,6 +2471,11 @@ declare const HealthScore: react.ForwardRefExoticComponent<HealthScoreProps & re
|
|
|
2169
2471
|
interface LargeTitleProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
2170
2472
|
/** Headline text. */
|
|
2171
2473
|
title: ReactNode;
|
|
2474
|
+
/**
|
|
2475
|
+
* Heading level for the title. Default `'h1'` — this component is intended
|
|
2476
|
+
* as a screen-level header. Lower to `h2`/`h3` for nested usage.
|
|
2477
|
+
*/
|
|
2478
|
+
titleAs?: HeadingLevel;
|
|
2172
2479
|
/** Optional eyebrow label rendered above the title. Small, uppercase, mono. */
|
|
2173
2480
|
eyebrow?: ReactNode;
|
|
2174
2481
|
/** Optional right-aligned slot (avatar, settings button, etc.). */
|
|
@@ -2373,7 +2680,7 @@ type NavItemProps = NavItemBaseProps & (({
|
|
|
2373
2680
|
} & Omit<HTMLAttributes<HTMLAnchorElement>, keyof NavItemBaseProps>) | ({
|
|
2374
2681
|
href?: undefined;
|
|
2375
2682
|
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof NavItemBaseProps>));
|
|
2376
|
-
declare const NavItem: react.ForwardRefExoticComponent<NavItemProps & react.RefAttributes<
|
|
2683
|
+
declare const NavItem: react.ForwardRefExoticComponent<NavItemProps & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
2377
2684
|
interface NavSectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
2378
2685
|
/** Eyebrow heading. Rendered uppercase, mono, dim. */
|
|
2379
2686
|
label: ReactNode;
|
|
@@ -2545,6 +2852,12 @@ interface TimelineEvent {
|
|
|
2545
2852
|
description?: ReactNode;
|
|
2546
2853
|
/** Time label rendered in mono. */
|
|
2547
2854
|
time?: ReactNode;
|
|
2855
|
+
/**
|
|
2856
|
+
* Machine-readable ISO 8601 string or `Date` for the event. When set, the
|
|
2857
|
+
* visible `time` is wrapped in `<time dateTime="…">` so crawlers and AI
|
|
2858
|
+
* agents get a timestamp without parsing the label.
|
|
2859
|
+
*/
|
|
2860
|
+
dateTime?: string | Date;
|
|
2548
2861
|
/** Marker color tone. Defaults to `accent`. */
|
|
2549
2862
|
tone?: TimelineEventTone;
|
|
2550
2863
|
}
|
|
@@ -2557,6 +2870,11 @@ interface TimelineItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
|
2557
2870
|
tone?: TimelineEventTone;
|
|
2558
2871
|
description?: ReactNode;
|
|
2559
2872
|
time?: ReactNode;
|
|
2873
|
+
/**
|
|
2874
|
+
* Machine-readable ISO 8601 string or `Date`. When set, the visible `time`
|
|
2875
|
+
* is wrapped in `<time dateTime="…">`.
|
|
2876
|
+
*/
|
|
2877
|
+
dateTime?: string | Date;
|
|
2560
2878
|
}
|
|
2561
2879
|
declare const TimelineItem: react.ForwardRefExoticComponent<TimelineItemProps & react.RefAttributes<HTMLLIElement>>;
|
|
2562
2880
|
|
|
@@ -2619,6 +2937,12 @@ declare const ActivityTimeline: react.ForwardRefExoticComponent<ActivityTimeline
|
|
|
2619
2937
|
interface TopbarProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
2620
2938
|
/** Title rendered on the left. */
|
|
2621
2939
|
title?: ReactNode;
|
|
2940
|
+
/**
|
|
2941
|
+
* Heading level for the page title. Default `'h1'` on touch density (mobile
|
|
2942
|
+
* page header) and `'h2'` on desktop density (in-app chrome where the page
|
|
2943
|
+
* `h1` typically lives in a separate hero/content area).
|
|
2944
|
+
*/
|
|
2945
|
+
titleAs?: HeadingLevel;
|
|
2622
2946
|
/**
|
|
2623
2947
|
* Eyebrow label rendered above the title (small uppercase mono). Touch density
|
|
2624
2948
|
* only — silently ignored on desktop density to avoid two header tiers stacking.
|
|
@@ -2742,4 +3066,4 @@ interface WizardDialogProps {
|
|
|
2742
3066
|
}
|
|
2743
3067
|
declare const WizardDialog: react.ForwardRefExoticComponent<WizardDialogProps & react.RefAttributes<HTMLDivElement>>;
|
|
2744
3068
|
|
|
2745
|
-
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 };
|
|
3069
|
+
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, type ComparisonCellValue, type ComparisonOption, type ComparisonRow, type ComparisonSchemaType, ComparisonTable, type ComparisonTableProps, 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, DateTime, type DateTimeProps, 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, Heading, type HeadingLevel, type HeadingProps, HealthScore, type HealthScoreBreakdownEntry, type HealthScoreProps, HoverCard, HoverCardContent, HoverCardPortal, type HoverCardProps, HoverCardRoot, HoverCardTrigger, IconButton, type IconButtonProps, InlineEdit, type InlineEditHandle, type InlineEditProps, Input, type InputProps, JsonLd, type JsonLdProps, 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, nodeToString, phoneCountries, toIsoString, useControllableState, useDisclosure, useEscape, useIsomorphicLayoutEffect, useKeyboardList, useOutsideClick, useTheme, useToast };
|