@veevarts/design-system 2.0.0 → 2.1.0-beta.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 +8 -8
- package/dist/index.js +7040 -5277
- package/dist/patterns/ActivityTimeline/ActivityTimeline.d.ts +3 -0
- package/dist/patterns/ActivityTimeline/index.d.ts +2 -0
- package/dist/patterns/ActivityTimeline/styles.d.ts +15 -0
- package/dist/patterns/ActivityTimeline/types.d.ts +15 -0
- package/dist/patterns/AdminTable/AdminTable.d.ts +1 -0
- package/dist/patterns/AdminTable/styles.d.ts +6 -0
- package/dist/patterns/AdminToolbar/AdminToolbar.d.ts +1 -0
- package/dist/patterns/AmountList/AmountList.d.ts +3 -0
- package/dist/patterns/AmountList/index.d.ts +2 -0
- package/dist/patterns/AmountList/styles.d.ts +23 -0
- package/dist/patterns/AmountList/types.d.ts +26 -0
- package/dist/patterns/CardList/CardList.d.ts +3 -0
- package/dist/patterns/CardList/index.d.ts +2 -0
- package/dist/patterns/CardList/styles.d.ts +16 -0
- package/dist/patterns/CardList/types.d.ts +19 -0
- package/dist/patterns/CardStack/CardStack.d.ts +7 -0
- package/dist/patterns/CardStack/index.d.ts +2 -0
- package/dist/patterns/CardStack/styles.d.ts +2 -0
- package/dist/patterns/CellText/CellText.d.ts +16 -0
- package/dist/patterns/CellText/index.d.ts +2 -0
- package/dist/patterns/CellText/styles.d.ts +7 -0
- package/dist/patterns/FilterSelect/FilterSelect.d.ts +3 -0
- package/dist/patterns/FilterSelect/index.d.ts +2 -0
- package/dist/patterns/FilterSelect/styles.d.ts +14 -0
- package/dist/patterns/FilterSelect/types.d.ts +13 -0
- package/dist/patterns/InstallmentFundAssignment/InstallmentFundAssignment.d.ts +1 -1
- package/dist/patterns/InstallmentFundAssignment/types.d.ts +3 -0
- package/dist/patterns/InstallmentSchedule/InstallmentSchedule.d.ts +1 -1
- package/dist/patterns/InstallmentSchedule/InstallmentTable.d.ts +1 -1
- package/dist/patterns/InstallmentSchedule/index.d.ts +1 -1
- package/dist/patterns/InstallmentSchedule/types.d.ts +62 -3
- package/dist/patterns/InstallmentSchedule/utils.d.ts +33 -0
- package/dist/patterns/KeyValueChip/KeyValueChip.d.ts +1 -0
- package/dist/patterns/KeyValueRows/KeyValueRows.d.ts +13 -0
- package/dist/patterns/KeyValueRows/index.d.ts +2 -0
- package/dist/patterns/KeyValueRows/styles.d.ts +8 -0
- package/dist/patterns/LineItemRows/LineItemRows.d.ts +17 -0
- package/dist/patterns/LineItemRows/index.d.ts +2 -0
- package/dist/patterns/LineItemRows/styles.d.ts +13 -0
- package/dist/patterns/ListPanel/ListPanel.d.ts +2 -0
- package/dist/patterns/LoadMoreFooter/LoadMoreFooter.d.ts +3 -0
- package/dist/patterns/LoadMoreFooter/index.d.ts +2 -0
- package/dist/patterns/LoadMoreFooter/styles.d.ts +7 -0
- package/dist/patterns/LoadMoreFooter/types.d.ts +10 -0
- package/dist/patterns/PageHeader/PageHeader.d.ts +1 -0
- package/dist/patterns/PaymentSubAmountInput/PaymentSubAmountInput.d.ts +2 -0
- package/dist/patterns/PillTabs/PillTabs.d.ts +3 -0
- package/dist/patterns/PillTabs/ids.d.ts +9 -0
- package/dist/patterns/PillTabs/index.d.ts +3 -0
- package/dist/patterns/PillTabs/styles.d.ts +10 -0
- package/dist/patterns/PillTabs/types.d.ts +13 -0
- package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/type.d.ts +1 -1
- package/dist/patterns/{EventDetails → Programs/EventDetails}/EventDetails.d.ts +3 -1
- package/dist/patterns/{OfferCard → Programs/OfferCard}/OfferCard.d.ts +1 -1
- package/dist/patterns/{OfferCard → Programs/OfferCard}/types.d.ts +7 -0
- package/dist/patterns/Programs/ProgramListItem/ProgramListItem.d.ts +17 -0
- package/dist/patterns/Programs/ProgramListItem/index.d.ts +2 -0
- package/dist/patterns/Programs/index.d.ts +5 -0
- package/dist/patterns/RecordCard/RecordCard.d.ts +3 -0
- package/dist/patterns/RecordCard/index.d.ts +2 -0
- package/dist/patterns/RecordCard/styles.d.ts +15 -0
- package/dist/patterns/RecordCard/types.d.ts +17 -0
- package/dist/patterns/RecordHeader/RecordHeader.d.ts +3 -0
- package/dist/patterns/RecordHeader/index.d.ts +2 -0
- package/dist/patterns/RecordHeader/styles.d.ts +43 -0
- package/dist/patterns/RecordHeader/types.d.ts +30 -0
- package/dist/patterns/RecordLayout/RecordLayout.d.ts +3 -0
- package/dist/patterns/RecordLayout/index.d.ts +2 -0
- package/dist/patterns/RecordLayout/styles.d.ts +8 -0
- package/dist/patterns/RecordLayout/types.d.ts +6 -0
- package/dist/patterns/RecordTotals/RecordTotals.d.ts +19 -0
- package/dist/patterns/RecordTotals/index.d.ts +2 -0
- package/dist/patterns/RecordTotals/styles.d.ts +19 -0
- package/dist/patterns/RelatedRecordList/RelatedRecordList.d.ts +3 -0
- package/dist/patterns/RelatedRecordList/index.d.ts +2 -0
- package/dist/patterns/RelatedRecordList/styles.d.ts +19 -0
- package/dist/patterns/RelatedRecordList/types.d.ts +17 -0
- package/dist/patterns/SplitPaymentSummary/index.d.ts +1 -1
- package/dist/patterns/SplitPaymentSummary/types.d.ts +18 -0
- package/dist/patterns/StatTiles/StatTiles.d.ts +3 -0
- package/dist/patterns/StatTiles/index.d.ts +2 -0
- package/dist/patterns/StatTiles/styles.d.ts +8 -0
- package/dist/patterns/StatTiles/types.d.ts +12 -0
- package/dist/patterns/StatusChip/StatusChip.d.ts +3 -3
- package/dist/patterns/Summary/components/ActionBar.d.ts +2 -0
- package/dist/patterns/Summary/components/GrandTotalRow.d.ts +1 -0
- package/dist/patterns/Summary/components/ItemRow.d.ts +1 -0
- package/dist/patterns/Summary/components/SummaryBody.d.ts +4 -1
- package/dist/patterns/Summary/components/TotalsLineRow.d.ts +3 -2
- package/dist/patterns/Summary/types.d.ts +40 -9
- package/dist/patterns/TableSkeleton/TableSkeleton.d.ts +1 -0
- package/dist/patterns/TileSelect/TileSelect.d.ts +65 -1
- package/dist/patterns/TileSelect/index.d.ts +1 -1
- package/dist/patterns/ToolbarButton/ToolbarButton.d.ts +2 -0
- package/dist/patterns/index.d.ts +45 -11
- package/dist/patterns/shared/hasContent.d.ts +2 -0
- package/dist/patterns/shared/index.d.ts +1 -0
- package/dist/patterns/shared/motion.d.ts +6 -0
- package/dist/patterns/shared/recordTone.d.ts +9 -0
- package/dist/patterns/shared/rem.d.ts +4 -0
- package/dist/patterns/shared/useContainerWidth.d.ts +6 -0
- package/dist/patterns/shared/useDecimalDraft.d.ts +33 -0
- package/dist/tailwind/index.cjs +17 -1
- package/dist/tailwind/index.d.ts +39 -0
- package/dist/tailwind/index.mjs +17 -1
- package/dist/test/ReducedMotion.d.ts +4 -0
- package/dist/test/RootFontSize.d.ts +5 -0
- package/dist/test/container-width.d.ts +14 -0
- package/dist/test/contrast.d.ts +1 -0
- package/dist/test/px-classes.d.ts +2 -0
- package/dist/test/root-font-size.d.ts +8 -0
- package/dist/tokens/pos-surface.d.ts +7 -0
- package/package.json +1 -1
- /package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/CatalogItemCard.d.ts +0 -0
- /package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/index.d.ts +0 -0
- /package/dist/patterns/{EventDetails → Programs/EventDetails}/index.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/CustomQuantitySelectorExample.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/ListWithEurosCurrencyExample.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/ListWithoutAnimationExample.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/index.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/index.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/animations.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/currency.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/index.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/offers.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardEmpty.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardError.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardList.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardSkeleton.d.ts +0 -0
- /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/index.d.ts +0 -0
- /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/SessionTimeline.d.ts +0 -0
- /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/index.d.ts +0 -0
- /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/type.d.ts +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const DEFAULT_PILL_TABS_ID = "pill-tabs";
|
|
2
|
+
export declare const pillTabId: (key: string, idPrefix?: string) => string;
|
|
3
|
+
export declare const pillTabPanelId: (key: string, idPrefix?: string) => string;
|
|
4
|
+
export declare const pillTabPanelProps: (key: string, idPrefix?: string) => {
|
|
5
|
+
role: "tabpanel";
|
|
6
|
+
id: string;
|
|
7
|
+
'aria-labelledby': string;
|
|
8
|
+
tabIndex: number;
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const pillTabsClass: {
|
|
2
|
+
readonly base: "mb-3.5 w-full";
|
|
3
|
+
readonly tabList: "w-full gap-1 rounded-full border border-pos-line bg-default-100 p-1";
|
|
4
|
+
readonly cursor: "rounded-full bg-white shadow-[0_1px_3px_rgba(0,0,0,.10)]";
|
|
5
|
+
readonly tab: "h-auto flex-1 px-[0.875rem] py-[0.5625rem] data-[hover-unselected=true]:opacity-100";
|
|
6
|
+
readonly tabStill: "rounded-full data-[selected=true]:bg-white data-[selected=true]:shadow-[0_1px_3px_rgba(0,0,0,.10)]";
|
|
7
|
+
readonly tabContent: "text-[0.84375rem] leading-[1.5] font-normal text-default-600 group-data-[selected=true]:font-semibold group-data-[selected=true]:text-default-900";
|
|
8
|
+
readonly title: "inline-flex items-center gap-[0.4375rem] whitespace-nowrap";
|
|
9
|
+
readonly count: "rounded-full bg-default-200 px-[0.4375rem] py-px text-[0.71875rem] leading-[1.5] font-semibold text-default-600 group-data-[selected=true]:bg-acct-rust-fill group-data-[selected=true]:text-primary-600";
|
|
10
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PillTabItem {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
count?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface PillTabsProps {
|
|
7
|
+
items: PillTabItem[];
|
|
8
|
+
value: string;
|
|
9
|
+
onChange: (key: string) => void;
|
|
10
|
+
ariaLabel: string;
|
|
11
|
+
idPrefix?: string;
|
|
12
|
+
'data-testid'?: string;
|
|
13
|
+
}
|
|
@@ -20,6 +20,8 @@ export interface EventDetailsProps {
|
|
|
20
20
|
classes?: string;
|
|
21
21
|
/** @property {boolean} [compact] - Dense spacing mode for compact side layouts. */
|
|
22
22
|
compact?: boolean;
|
|
23
|
+
/** @property {'stacked' | 'horizontal'} [layout] - Places the image beside content on desktop when horizontal. */
|
|
24
|
+
layout?: 'stacked' | 'horizontal';
|
|
23
25
|
/** @property {boolean} [showImage] - Optional flag to show or hide the event image. Defaults to true. */
|
|
24
26
|
showImage?: boolean;
|
|
25
27
|
/** @property {'lazy' | 'eager'} [imageLoading] - Optional loading strategy for the event image. Use `'lazy'` for off-screen placements (long lists, below-the-fold). Defaults to `'eager'` since the banner is typically above-the-fold. */
|
|
@@ -37,5 +39,5 @@ export interface EventDetailsProps {
|
|
|
37
39
|
* @function EventDetails
|
|
38
40
|
* @description Displays a card with event information such as name, image, date, time, location, and description.
|
|
39
41
|
*/
|
|
40
|
-
export declare const EventDetails: ({ classes, name, imageUrl, eventDate, eventTime, location, description, showImage, compact, imageLoading, showMoreButtonClassName, labels, }: EventDetailsProps) => JSX.Element;
|
|
42
|
+
export declare const EventDetails: ({ classes, name, imageUrl, eventDate, eventTime, location, description, showImage, compact, layout, imageLoading, showMoreButtonClassName, labels, }: EventDetailsProps) => JSX.Element;
|
|
41
43
|
export default EventDetails;
|
|
@@ -6,7 +6,7 @@ import { OfferCardProps } from './types';
|
|
|
6
6
|
* Supports slot-based customization for all rendered elements.
|
|
7
7
|
*/
|
|
8
8
|
export declare const OfferCard: {
|
|
9
|
-
({ offer, quantity: quantityProp, defaultQuantity, onQuantityChange, currency, locale, labels: customLabels, slots, isDisabled, buttonVariant, buttonColor, showCard, showDescription, showPeopleCount, showPrice, priceDisplay, classNames, "data-testid": dataTestId, selectedColor, compact, isSoldOut: isSoldOutProp, isMaxReached: isMaxReachedProp, isRuleBlocked: isRuleBlockedProp, statusTone: statusToneProp, statusLabel, disabledReason, disabled, }: OfferCardProps): JSX.Element;
|
|
9
|
+
({ offer, quantity: quantityProp, defaultQuantity, onQuantityChange, currency, locale, labels: customLabels, slots, isDisabled, buttonVariant, buttonColor, showCard, showDescription, showPeopleCount, showPrice, priceDisplay, classNames, "data-testid": dataTestId, selectedColor, selectionMode, compact, isSoldOut: isSoldOutProp, isMaxReached: isMaxReachedProp, isRuleBlocked: isRuleBlockedProp, statusTone: statusToneProp, statusLabel, disabledReason, disabled, }: OfferCardProps): JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
export default OfferCard;
|
|
@@ -350,6 +350,13 @@ export interface OfferCardProps {
|
|
|
350
350
|
* @default 'primary'
|
|
351
351
|
*/
|
|
352
352
|
selectedColor?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
353
|
+
/**
|
|
354
|
+
* How an available offer is added to the selection.
|
|
355
|
+
* `press-to-add` makes the whole card add one item and omits the inline
|
|
356
|
+
* stepper. It is useful when a separate order summary owns removal.
|
|
357
|
+
* @default 'stepper'
|
|
358
|
+
*/
|
|
359
|
+
selectionMode?: 'stepper' | 'press-to-add';
|
|
353
360
|
/**
|
|
354
361
|
* Whether to show the component inside a Card
|
|
355
362
|
* @default true
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
export type ProgramListItemStatus = 'open' | 'selling-fast' | 'sold-out';
|
|
3
|
+
export interface ProgramListItemProps {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle: string;
|
|
6
|
+
price?: string;
|
|
7
|
+
imageUrl?: string;
|
|
8
|
+
status?: ProgramListItemStatus;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
onPress?(): void;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Pressable Programs catalog row for POS list mode. */
|
|
14
|
+
export declare function ProgramListItem({ title, subtitle, price, imageUrl, status, isDisabled, onPress, className }: ProgramListItemProps): JSX.Element;
|
|
15
|
+
export declare namespace ProgramListItem {
|
|
16
|
+
var displayName: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RecordCardBody, RecordCardVariant } from './types';
|
|
2
|
+
export declare const recordCardShadow = "shadow-[0_1px_4px_rgba(0,0,0,.06),0_4px_12px_rgba(0,0,0,.06)]";
|
|
3
|
+
export declare const recordCardClass: {
|
|
4
|
+
readonly base: "overflow-hidden rounded-2xl border border-pos-line bg-white shadow-[0_1px_4px_rgba(0,0,0,.06),0_4px_12px_rgba(0,0,0,.06)]";
|
|
5
|
+
readonly title: "m-0 min-w-0 text-[0.90625rem] font-semibold text-default-900 [overflow-wrap:anywhere]";
|
|
6
|
+
readonly count: "rounded-full bg-default-100 px-2 py-px text-[0.75rem] font-semibold text-default-600";
|
|
7
|
+
readonly icon: "flex shrink-0 text-default-500 [&_svg]:size-[1.125rem]";
|
|
8
|
+
readonly action: "ml-auto";
|
|
9
|
+
readonly description: "m-0 text-[0.84375rem] leading-[1.55] text-default-500 [&_b]:font-bold [&_b]:tabular-nums [&_b]:text-default-900";
|
|
10
|
+
readonly footer: "flex flex-wrap gap-2";
|
|
11
|
+
readonly footerAfterContent: "mt-[0.875rem]";
|
|
12
|
+
readonly footerAfterDescription: "mt-3";
|
|
13
|
+
};
|
|
14
|
+
export declare const recordCardHeaderClass: Record<RecordCardVariant, string>;
|
|
15
|
+
export declare const recordCardBodyClass: Record<RecordCardVariant, Record<RecordCardBody, string>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type RecordCardVariant = 'section' | 'aside';
|
|
3
|
+
export type RecordCardBody = 'padded' | 'rows' | 'flush' | 'none';
|
|
4
|
+
export interface RecordCardProps {
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
titleAs?: 'h2' | 'h3' | 'h4';
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
count?: ReactNode;
|
|
9
|
+
badge?: ReactNode;
|
|
10
|
+
action?: ReactNode;
|
|
11
|
+
description?: ReactNode;
|
|
12
|
+
footer?: ReactNode;
|
|
13
|
+
variant?: RecordCardVariant;
|
|
14
|
+
body?: RecordCardBody;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
'data-testid'?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const RECORD_HEADER_WIDE_REM = 48;
|
|
2
|
+
export declare const recordHeaderClass: {
|
|
3
|
+
readonly base: "mb-4 overflow-hidden rounded-2xl border border-pos-line bg-white shadow-[0_1px_4px_rgba(0,0,0,.06),0_4px_12px_rgba(0,0,0,.06)]";
|
|
4
|
+
readonly band: "flex items-center gap-2.5 border-b border-pos-hair bg-pos-page px-4 py-2.5";
|
|
5
|
+
readonly back: "inline-flex size-[1.625rem] shrink-0 items-center justify-center rounded-[0.625rem] text-default-500 outline-none transition-colors hover:bg-default-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none";
|
|
6
|
+
readonly backIcon: "size-[0.875rem]";
|
|
7
|
+
readonly breadcrumb: "min-w-0 flex-1";
|
|
8
|
+
readonly breadcrumbList: "flex-nowrap gap-[0.375rem]";
|
|
9
|
+
readonly crumbBase: "min-w-0";
|
|
10
|
+
readonly crumb: "whitespace-nowrap text-[0.875rem] text-default-500 data-[disabled=true]:opacity-100 data-[current=true]:overflow-hidden data-[current=true]:font-normal data-[current=true]:text-default-900";
|
|
11
|
+
readonly crumbSeparator: "ms-[0.375rem] px-0 text-default-400 data-[disabled=true]:opacity-100";
|
|
12
|
+
readonly body: "flex flex-wrap gap-5";
|
|
13
|
+
readonly bodyWide: "px-5 pb-5 pt-[1.125rem]";
|
|
14
|
+
readonly bodyNarrow: "p-4";
|
|
15
|
+
readonly identity: "min-w-0 flex-[1_1_18.75rem]";
|
|
16
|
+
readonly title: "m-0 font-semibold tracking-[-.02em] text-default-900 [overflow-wrap:anywhere]";
|
|
17
|
+
readonly titleWide: "text-[1.5rem]";
|
|
18
|
+
readonly titleNarrow: "text-[1.3125rem]";
|
|
19
|
+
readonly meta: "m-0 mt-[0.6875rem] flex list-none flex-col gap-[0.4375rem] p-0";
|
|
20
|
+
readonly metaLine: "flex min-w-0 items-center gap-[0.5625rem] text-[0.84375rem] text-default-700";
|
|
21
|
+
readonly metaIcon: "flex shrink-0 text-default-400 [&_svg]:size-[0.9375rem]";
|
|
22
|
+
readonly metaText: "min-w-0 truncate";
|
|
23
|
+
readonly money: "flex flex-col gap-[0.3125rem]";
|
|
24
|
+
readonly moneyWide: "ml-auto min-w-[12.5rem] flex-none items-end text-right";
|
|
25
|
+
readonly moneyNarrow: "w-full items-start text-left";
|
|
26
|
+
readonly amountLabel: "text-[0.8125rem] text-default-500";
|
|
27
|
+
readonly amount: "whitespace-nowrap font-bold tracking-[-.03em] tabular-nums text-default-900";
|
|
28
|
+
readonly amountWide: "text-[1.9375rem] leading-[1.1]";
|
|
29
|
+
readonly amountNarrow: "text-[1.6875rem] leading-[1.1]";
|
|
30
|
+
readonly amountCaption: "text-[0.8125rem] text-default-500";
|
|
31
|
+
readonly recordId: "text-[0.8125rem] text-default-500";
|
|
32
|
+
readonly chips: "mt-[0.1875rem] flex flex-wrap gap-1.5";
|
|
33
|
+
readonly chipsWide: "justify-end";
|
|
34
|
+
readonly chipsNarrow: "justify-start";
|
|
35
|
+
readonly statItems: "m-0 mt-2.5 flex flex-wrap gap-[1.375rem]";
|
|
36
|
+
readonly stat: "flex flex-col-reverse";
|
|
37
|
+
readonly statWide: "text-right";
|
|
38
|
+
readonly statNarrow: "text-left";
|
|
39
|
+
readonly statValue: "m-0 text-[0.9375rem] font-bold tabular-nums text-default-900";
|
|
40
|
+
readonly statLabel: "mt-0.5 text-[0.75rem] text-default-500";
|
|
41
|
+
readonly statsWide: "px-5 pb-5";
|
|
42
|
+
readonly statsNarrow: "px-4 pb-4";
|
|
43
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RecordTone } from '../shared/recordTone';
|
|
3
|
+
export interface RecordHeaderStat {
|
|
4
|
+
id?: string;
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
value: ReactNode;
|
|
7
|
+
tone?: RecordTone;
|
|
8
|
+
}
|
|
9
|
+
export interface RecordHeaderProps {
|
|
10
|
+
breadcrumb: Array<{
|
|
11
|
+
label: string;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
}>;
|
|
14
|
+
onBack?: () => void;
|
|
15
|
+
backLabel: string;
|
|
16
|
+
title: ReactNode;
|
|
17
|
+
meta?: Array<{
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
text: ReactNode;
|
|
20
|
+
}>;
|
|
21
|
+
amountLabel?: string;
|
|
22
|
+
amount?: ReactNode;
|
|
23
|
+
amountCaption?: ReactNode;
|
|
24
|
+
recordId?: ReactNode;
|
|
25
|
+
chips?: ReactNode;
|
|
26
|
+
statItems?: RecordHeaderStat[];
|
|
27
|
+
stats?: ReactNode;
|
|
28
|
+
banner?: ReactNode;
|
|
29
|
+
'data-testid'?: string;
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const RECORD_LAYOUT_SPLIT_REM = 50;
|
|
2
|
+
export declare const recordLayoutClass: {
|
|
3
|
+
readonly base: "grid items-start gap-4";
|
|
4
|
+
readonly split: "grid-cols-[minmax(0,1fr)_23.25rem]";
|
|
5
|
+
readonly stacked: "grid-cols-[minmax(0,1fr)]";
|
|
6
|
+
readonly column: "min-w-0";
|
|
7
|
+
readonly aside: "flex min-w-0 flex-col gap-[0.875rem]";
|
|
8
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SignedAmountTone } from '../shared/recordTone';
|
|
3
|
+
export interface RecordTotalsRow {
|
|
4
|
+
id: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
note?: React.ReactNode;
|
|
7
|
+
value: React.ReactNode;
|
|
8
|
+
tone?: SignedAmountTone;
|
|
9
|
+
}
|
|
10
|
+
export interface RecordTotalsProps {
|
|
11
|
+
rows: RecordTotalsRow[];
|
|
12
|
+
total: {
|
|
13
|
+
label: React.ReactNode;
|
|
14
|
+
value: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
memo?: React.ReactNode;
|
|
17
|
+
'data-testid'?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const RecordTotals: React.FC<RecordTotalsProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const RECORD_TOTALS_WIDE_REM = 37.5;
|
|
2
|
+
export declare const recordTotalsClass: {
|
|
3
|
+
readonly base: "mx-5 border-t border-pos-hair pb-[1.125rem] pt-2.5";
|
|
4
|
+
readonly rowWide: "flex items-baseline gap-4";
|
|
5
|
+
readonly rowNarrow: "flex flex-wrap items-baseline gap-x-3";
|
|
6
|
+
readonly labelWide: "shrink-0 grow-0 basis-[11.875rem]";
|
|
7
|
+
readonly labelNarrow: "flex-auto";
|
|
8
|
+
readonly noteWide: "min-w-0 flex-1";
|
|
9
|
+
readonly noteNarrow: "order-3 mt-px basis-full";
|
|
10
|
+
readonly row: "py-2";
|
|
11
|
+
readonly label: "text-[0.875rem] text-default-900";
|
|
12
|
+
readonly note: "text-[0.8125rem] text-default-500";
|
|
13
|
+
readonly value: "ml-auto shrink-0 whitespace-nowrap text-right text-[0.875rem] tabular-nums text-default-900";
|
|
14
|
+
readonly totalRule: "mt-1.5 border-t border-pos-line";
|
|
15
|
+
readonly totalRow: "pt-3";
|
|
16
|
+
readonly totalLabel: "text-[0.9375rem] font-bold text-default-900";
|
|
17
|
+
readonly totalValue: "ml-auto shrink-0 whitespace-nowrap text-right text-[1.0625rem] font-bold tabular-nums text-default-900";
|
|
18
|
+
readonly memo: "mt-2 text-[0.78125rem] leading-[1.6] text-default-500";
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const relatedRecordListClass: {
|
|
2
|
+
readonly base: "overflow-hidden rounded-2xl border border-pos-line bg-white shadow-[0_1px_4px_rgba(0,0,0,.06),0_4px_12px_rgba(0,0,0,.06)]";
|
|
3
|
+
readonly header: "flex flex-wrap items-center gap-2 px-5 pt-4";
|
|
4
|
+
readonly title: "m-0 min-w-0 text-[0.90625rem] font-semibold text-default-900 [overflow-wrap:anywhere]";
|
|
5
|
+
readonly count: "rounded-full bg-default-100 px-2 py-px text-[0.75rem] font-semibold text-default-600";
|
|
6
|
+
readonly list: "m-0 list-none p-0";
|
|
7
|
+
readonly item: "border-t border-pos-hair";
|
|
8
|
+
readonly itemFirstHeadless: "border-t-0";
|
|
9
|
+
readonly row: "flex w-full items-center gap-2.5 px-5 py-3 text-left";
|
|
10
|
+
readonly rowInteractive: "cursor-pointer outline-none transition-colors hover:bg-default-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none";
|
|
11
|
+
readonly rowBody: "flex min-w-0 flex-1 flex-col";
|
|
12
|
+
readonly rowHead: "flex min-w-0 flex-wrap items-center gap-2";
|
|
13
|
+
readonly primaryLinked: "min-w-0 text-[0.875rem] font-normal text-primary [overflow-wrap:anywhere]";
|
|
14
|
+
readonly primaryPlain: "min-w-0 text-[0.875rem] font-normal text-default-900 [overflow-wrap:anywhere]";
|
|
15
|
+
readonly secondary: "mt-[0.1875rem] block min-w-0 truncate text-[0.8125rem] text-default-500";
|
|
16
|
+
readonly amount: "max-w-[45%] shrink-0 text-right text-[0.875rem] font-semibold tabular-nums text-default-900 [overflow-wrap:anywhere]";
|
|
17
|
+
readonly empty: "min-w-0 px-5 pb-5 pt-[0.875rem] text-[0.875rem] text-default-500 [overflow-wrap:anywhere]";
|
|
18
|
+
readonly emptyHeadless: "pt-5";
|
|
19
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface RelatedRecordRow {
|
|
3
|
+
id: string;
|
|
4
|
+
primary: ReactNode;
|
|
5
|
+
chip?: ReactNode;
|
|
6
|
+
secondary?: ReactNode;
|
|
7
|
+
amount?: ReactNode;
|
|
8
|
+
amountTone?: 'positive' | 'negative' | 'neutral';
|
|
9
|
+
onSelect?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface RelatedRecordListProps {
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
count?: number;
|
|
14
|
+
rows: RelatedRecordRow[];
|
|
15
|
+
emptyContent: ReactNode;
|
|
16
|
+
'data-testid'?: string;
|
|
17
|
+
}
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* `<PaymentsDropIn>` orchestrator.
|
|
7
7
|
*/
|
|
8
8
|
export { SplitPaymentSummary } from './SplitPaymentSummary';
|
|
9
|
-
export type { SplitPaymentSummaryProps, SplitPaymentSummaryLabels, TenderRow, TenderRowStatus, TenderRowType, Money, } from './types';
|
|
9
|
+
export type { SplitPaymentSummaryProps, SplitPaymentSummaryLabels, SplitPaymentSummaryVariant, TenderRow, TenderRowStatus, TenderRowType, Money, } from './types';
|
|
@@ -38,6 +38,13 @@ export interface SplitPaymentSummaryLabels {
|
|
|
38
38
|
statusRecorded?: string;
|
|
39
39
|
statusFailed?: string;
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* How the remaining balance is presented.
|
|
43
|
+
*
|
|
44
|
+
* `banner` is the original: a padded card with the label over a 4xl amount,
|
|
45
|
+
* ~104px tall. `compact` says the same thing on one ~24px row.
|
|
46
|
+
*/
|
|
47
|
+
export type SplitPaymentSummaryVariant = 'banner' | 'compact';
|
|
41
48
|
export interface SplitPaymentSummaryProps {
|
|
42
49
|
/** Total amount the host is collecting (sum target). */
|
|
43
50
|
total: Money;
|
|
@@ -56,6 +63,17 @@ export interface SplitPaymentSummaryProps {
|
|
|
56
63
|
labels?: SplitPaymentSummaryLabels;
|
|
57
64
|
/** Hide the collected list (just the remaining banner). */
|
|
58
65
|
hideCollectedList?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Default `'banner'`. `'compact'` trades the padded card for a single
|
|
68
|
+
* label-and-amount row — the same information in ~24px instead of ~104px.
|
|
69
|
+
*
|
|
70
|
+
* For surfaces where the split summary shares a modal with a tender form:
|
|
71
|
+
* measured in the payments drop-in, the banner alone was two thirds of
|
|
72
|
+
* that modal's overflow, and the card form could not be seen whole.
|
|
73
|
+
* The collected list is unaffected — it is the part that cannot be said
|
|
74
|
+
* in one line.
|
|
75
|
+
*/
|
|
76
|
+
variant?: SplitPaymentSummaryVariant;
|
|
59
77
|
'data-testid'?: string;
|
|
60
78
|
className?: string;
|
|
61
79
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const STAT_TILES_PAIR_MIN = 560;
|
|
2
|
+
export declare const statTilesClass: {
|
|
3
|
+
readonly base: "grid gap-3";
|
|
4
|
+
readonly tile: "min-w-0 rounded-[14px] border border-pos-line bg-white px-[18px] py-4 shadow-[0_1px_4px_rgba(0,0,0,.06),0_4px_12px_rgba(0,0,0,.06)]";
|
|
5
|
+
readonly value: "text-[23px] font-bold leading-[1.2] tracking-[-.02em] tabular-nums text-default-900 [overflow-wrap:anywhere]";
|
|
6
|
+
readonly label: "mt-[5px] text-[13.5px] text-default-500";
|
|
7
|
+
readonly caption: "mt-0.5 text-[12.5px] text-default-500";
|
|
8
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RecordTone } from '../shared/recordTone';
|
|
3
|
+
export interface StatTileItem {
|
|
4
|
+
label: string;
|
|
5
|
+
value: ReactNode;
|
|
6
|
+
tone?: RecordTone;
|
|
7
|
+
caption?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface StatTilesProps {
|
|
10
|
+
items: StatTileItem[];
|
|
11
|
+
'data-testid'?: string;
|
|
12
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ChipProps } from '../../components';
|
|
3
3
|
/** Domain-agnostic lifecycle states an admin row can be in. */
|
|
4
|
-
export type StatusChipStatus = 'active' | 'archived' | 'inactive' | 'draft' | 'pending' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
4
|
+
export type StatusChipStatus = 'active' | 'archived' | 'inactive' | 'draft' | 'pending' | 'success' | 'warning' | 'danger' | 'neutral' | 'info' | 'violet';
|
|
5
5
|
export interface StatusChipProps {
|
|
6
6
|
/** Lifecycle state — selects the colour/tone only, never the text. */
|
|
7
7
|
status: StatusChipStatus;
|
|
@@ -12,12 +12,12 @@ export interface StatusChipProps {
|
|
|
12
12
|
* `'dot'` variant: a soft, radius-full pill with a leading tone dot,
|
|
13
13
|
* 12px / weight-600 text, tuned for dense admin lifecycle tables.
|
|
14
14
|
*/
|
|
15
|
-
variant?: ChipProps['variant'] | 'dot';
|
|
15
|
+
variant?: ChipProps['variant'] | 'dot' | 'plain';
|
|
16
16
|
/** Chip size. Default `'sm'`. Ignored by `variant="dot"`. */
|
|
17
17
|
size?: ChipProps['size'];
|
|
18
18
|
/**
|
|
19
19
|
* Override the colour derived from `status`. Escape hatch for the
|
|
20
|
-
* rare state not covered by `StatusChipStatus`. Ignored by `variant="dot"`.
|
|
20
|
+
* rare state not covered by `StatusChipStatus`. Ignored by `variant="dot"` and `variant="plain"`.
|
|
21
21
|
*/
|
|
22
22
|
color?: ChipProps['color'];
|
|
23
23
|
/** Optional leading element (dot, icon). Ignored by `variant="dot"`. */
|
|
@@ -12,6 +12,8 @@ export interface ActionBarProps {
|
|
|
12
12
|
cartAriaLabel: string;
|
|
13
13
|
/** Optional caption rendered under the open-layer CTA (e.g. installment breakdown). */
|
|
14
14
|
ctaCaption?: React.ReactNode;
|
|
15
|
+
/** Optional error rendered ABOVE the CTA, so it clears the screen edge and the thumb. */
|
|
16
|
+
ctaError?: React.ReactNode;
|
|
15
17
|
/** Expand the summary — the closed-bar cart button opens it on click. */
|
|
16
18
|
onToggleOpen?: () => void;
|
|
17
19
|
classNames: SummaryClassNames;
|
|
@@ -9,9 +9,12 @@ export interface SummaryBodyProps {
|
|
|
9
9
|
locale: string;
|
|
10
10
|
onRemoveItem?: (id: string) => void;
|
|
11
11
|
removeAriaLabel: string;
|
|
12
|
-
|
|
12
|
+
onRemoveTotalRow?: (id: string) => void;
|
|
13
|
+
removeTotalRowAriaLabel: string;
|
|
14
|
+
/** Show the per-item and per-totals-row remove controls. Defaults to `true`. */
|
|
13
15
|
showRemoveButton?: boolean;
|
|
14
16
|
emptyState?: React.ReactNode;
|
|
17
|
+
compact?: boolean;
|
|
15
18
|
classNames: SummaryClassNames;
|
|
16
19
|
}
|
|
17
20
|
export declare const SummaryBody: React.FC<SummaryBodyProps>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SummaryTotalRow } from '../types';
|
|
3
3
|
export interface TotalsLineRowProps {
|
|
4
|
-
row:
|
|
4
|
+
row: SummaryTotalRow;
|
|
5
5
|
locale: string;
|
|
6
6
|
emphasized: boolean;
|
|
7
7
|
onRemove?: (id: string) => void;
|
|
8
8
|
removeAriaLabel?: string;
|
|
9
9
|
/** Show the per-row remove control. Defaults to `true`. */
|
|
10
10
|
showRemoveButton?: boolean;
|
|
11
|
+
compact?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export declare const TotalsLineRow: React.FC<TotalsLineRowProps>;
|