@veevarts/design-system 2.1.0-beta.2 → 2.1.0-beta.22
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/README.md +39 -0
- package/dist/components/Drawer/Drawer.d.ts +17 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Modal/CloseButton.d.ts +18 -0
- package/dist/components/Modal/Modal.d.ts +15 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/useLabelledCloseButton.d.ts +13 -0
- package/dist/components/Select/Select.d.ts +10 -0
- package/dist/components/Table/Table.d.ts +7 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.ts +4 -0
- package/dist/index.js +10705 -6282
- 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/AdminTextField/AdminTextField.d.ts +4 -44
- package/dist/patterns/AdminTextField/index.d.ts +2 -2
- package/dist/patterns/AdminTextField/styles.d.ts +29 -0
- package/dist/patterns/AdminTextField/types.d.ts +78 -0
- package/dist/patterns/AdminToolbar/AdminToolbar.d.ts +13 -2
- package/dist/patterns/AdminToolbar/index.d.ts +1 -0
- package/dist/patterns/AdminToolbar/styles.d.ts +49 -0
- package/dist/patterns/AdminToolbar/types.d.ts +2 -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 +20 -0
- package/dist/patterns/CardList/types.d.ts +20 -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/CashTenderForm/types.d.ts +6 -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/DiscardGuard/DiscardGuard.d.ts +23 -0
- package/dist/patterns/DiscardGuard/context.d.ts +25 -0
- package/dist/patterns/DiscardGuard/index.d.ts +6 -0
- package/dist/patterns/DiscardGuard/useDiscardGuard.d.ts +38 -0
- package/dist/patterns/DonationAmounts/index.d.ts +1 -1
- package/dist/patterns/DonationAmounts/styles.d.ts +32 -0
- package/dist/patterns/DonationAmounts/types.d.ts +55 -1
- package/dist/patterns/DonationAmounts/utils/currency.d.ts +7 -3
- package/dist/patterns/EntityRow/EntityList.d.ts +9 -0
- package/dist/patterns/EntityRow/EntityRow.d.ts +3 -0
- package/dist/patterns/EntityRow/context.d.ts +2 -0
- package/dist/patterns/EntityRow/icons.d.ts +3 -0
- package/dist/patterns/EntityRow/index.d.ts +3 -0
- package/dist/patterns/EntityRow/initials.d.ts +6 -0
- package/dist/patterns/EntityRow/styles.d.ts +74 -0
- package/dist/patterns/EntityRow/types.d.ts +125 -0
- package/dist/patterns/FeedbackState/FeedbackState.d.ts +1 -1
- package/dist/patterns/FeedbackState/type.d.ts +11 -1
- package/dist/patterns/FilterSelect/FilterSelect.d.ts +3 -0
- package/dist/patterns/FilterSelect/FilterSelectGroup.d.ts +3 -0
- package/dist/patterns/FilterSelect/index.d.ts +3 -0
- package/dist/patterns/FilterSelect/styles.d.ts +17 -0
- package/dist/patterns/FilterSelect/types.d.ts +19 -0
- package/dist/patterns/InlineConfirm/InlineConfirm.d.ts +38 -0
- package/dist/patterns/InlineConfirm/index.d.ts +2 -0
- package/dist/patterns/InlineConfirm/styles.d.ts +16 -0
- package/dist/patterns/InstallmentSchedule/types.d.ts +29 -5
- package/dist/patterns/InstallmentSchedule/utils.d.ts +6 -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/MetaCard/types.d.ts +2 -0
- package/dist/patterns/ModalPanels/ModalPanels.d.ts +35 -0
- package/dist/patterns/ModalPanels/context.d.ts +20 -0
- package/dist/patterns/ModalPanels/focus.d.ts +44 -0
- package/dist/patterns/ModalPanels/index.d.ts +6 -0
- package/dist/patterns/ModalPanels/styles.d.ts +13 -0
- package/dist/patterns/ModalPanels/useModalPanels.d.ts +30 -0
- package/dist/patterns/Notice/Notice.d.ts +16 -0
- package/dist/patterns/Notice/index.d.ts +2 -0
- package/dist/patterns/Notice/styles.d.ts +35 -0
- package/dist/patterns/Notice/type.d.ts +39 -0
- package/dist/patterns/OutcomeView/index.d.ts +1 -1
- package/dist/patterns/OutcomeView/types.d.ts +110 -3
- package/dist/patterns/PageHeader/PageHeader.d.ts +1 -0
- package/dist/patterns/PaginationSummary/PaginationSummary.d.ts +12 -0
- package/dist/patterns/PaginationSummary/index.d.ts +1 -1
- 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 +20 -0
- package/dist/patterns/PillTabs/types.d.ts +21 -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/ReasonSelect/types.d.ts +1 -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 +16 -0
- package/dist/patterns/RecordCard/types.d.ts +22 -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/RefundMethodCards/RefundMethodCards.d.ts +4 -0
- package/dist/patterns/RefundMethodCards/index.d.ts +2 -0
- package/dist/patterns/RefundMethodCards/styles.d.ts +59 -0
- package/dist/patterns/RefundMethodCards/types.d.ts +72 -0
- package/dist/patterns/RefundProgressList/RefundProgressList.d.ts +4 -0
- package/dist/patterns/RefundProgressList/index.d.ts +2 -0
- package/dist/patterns/RefundProgressList/styles.d.ts +44 -0
- package/dist/patterns/RefundProgressList/types.d.ts +37 -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/SessionExpiredCard/SessionExpiredCard.d.ts +14 -0
- package/dist/patterns/SessionExpiredCard/index.d.ts +2 -0
- package/dist/patterns/SessionExpiredCard/type.d.ts +6 -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/StepProgress/StepProgress.d.ts +4 -0
- package/dist/patterns/StepProgress/index.d.ts +2 -0
- package/dist/patterns/StepProgress/styles.d.ts +29 -0
- package/dist/patterns/StepProgress/types.d.ts +43 -0
- 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 +51 -9
- package/dist/patterns/TableSkeleton/TableSkeleton.d.ts +1 -0
- package/dist/patterns/TileSelect/TileSelect.d.ts +2 -37
- package/dist/patterns/TileSelect/index.d.ts +1 -1
- package/dist/patterns/TileSelect/styles.d.ts +56 -0
- package/dist/patterns/TileSelect/types.d.ts +140 -0
- package/dist/patterns/ToolbarButton/ToolbarButton.d.ts +2 -0
- package/dist/patterns/UnderlineTabs/UnderlineTabs.d.ts +20 -1
- package/dist/patterns/UnderlineTabs/index.d.ts +1 -1
- package/dist/patterns/UnderlineTabs/styles.d.ts +10 -0
- package/dist/patterns/VerticalSteps/StepPager.d.ts +6 -0
- package/dist/patterns/VerticalSteps/StepsReadiness.d.ts +15 -0
- package/dist/patterns/VerticalSteps/VerticalSteps.d.ts +6 -0
- package/dist/patterns/VerticalSteps/index.d.ts +4 -0
- package/dist/patterns/VerticalSteps/styles.d.ts +54 -0
- package/dist/patterns/VerticalSteps/types.d.ts +100 -0
- package/dist/patterns/WizardShell/index.d.ts +1 -1
- package/dist/patterns/WizardShell/types.d.ts +9 -1
- package/dist/patterns/grid-columns.d.ts +1 -1
- package/dist/patterns/index.d.ts +73 -19
- 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/patterns/shared/usePrefillEdits.d.ts +7 -0
- package/dist/providers/DensityProvider.d.ts +7 -0
- package/dist/providers/HeroUIProvider.d.ts +20 -1
- package/dist/providers/ToastProvider.d.ts +16 -0
- package/dist/providers/close-label-context.d.ts +18 -0
- package/dist/providers/density.d.ts +17 -0
- package/dist/providers/index.d.ts +6 -0
- package/dist/tailwind/index.cjs +25 -1
- package/dist/tailwind/index.d.ts +39 -0
- package/dist/tailwind/index.mjs +25 -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-class-names.d.ts +1 -0
- package/dist/test/px-classes.d.ts +3 -0
- package/dist/test/root-font-size.d.ts +8 -0
- package/dist/tokens/pos-surface.d.ts +23 -4
- package/package.json +2 -2
- /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
|
@@ -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,16 @@
|
|
|
1
|
+
import { RecordCardBody, RecordCardSurface, 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";
|
|
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 recordCardSurfaceClass: Record<RecordCardSurface, string>;
|
|
15
|
+
export declare const recordCardHeaderClass: Record<RecordCardVariant, string>;
|
|
16
|
+
export declare const recordCardBodyClass: Record<RecordCardVariant, Record<RecordCardBody, string>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type RecordCardVariant = 'section' | 'aside';
|
|
3
|
+
export type RecordCardBody = 'padded' | 'rows' | 'flush' | 'none';
|
|
4
|
+
/** `card` sits on a grey page with the layered shadow; `flat` keeps the border and drops the shadow, for a card inside a modal. */
|
|
5
|
+
export type RecordCardSurface = 'card' | 'flat';
|
|
6
|
+
export interface RecordCardProps {
|
|
7
|
+
title?: ReactNode;
|
|
8
|
+
titleAs?: 'h2' | 'h3' | 'h4';
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
count?: ReactNode;
|
|
11
|
+
badge?: ReactNode;
|
|
12
|
+
action?: ReactNode;
|
|
13
|
+
description?: ReactNode;
|
|
14
|
+
footer?: ReactNode;
|
|
15
|
+
variant?: RecordCardVariant;
|
|
16
|
+
body?: RecordCardBody;
|
|
17
|
+
surface?: RecordCardSurface;
|
|
18
|
+
/** Merged onto the root, after the chrome (e.g. `break-inside-avoid` in a multi-column host). */
|
|
19
|
+
className?: string;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
'data-testid'?: string;
|
|
22
|
+
}
|
|
@@ -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,2 @@
|
|
|
1
|
+
export { RefundMethodCards } from './RefundMethodCards';
|
|
2
|
+
export type { RefundMethodCardsProps, RefundMethodCardsLabels, RefundMethodCardsError, RefundMethodView, RefundMethodKind, RefundMethodStatus, RefundMethodOption, RefundMethodAnotherMethod, RefundMethodPaidWith, } from './types';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { RefundMethodKind } from './types';
|
|
3
|
+
export declare const PRIMARY = "hsl(var(--heroui-primary))";
|
|
4
|
+
export declare const refundMethodKindIcon: Record<RefundMethodKind, string>;
|
|
5
|
+
export declare const refundMethodCardsClass: {
|
|
6
|
+
readonly root: "flex flex-col text-default-900";
|
|
7
|
+
readonly banner: "mb-[18px]";
|
|
8
|
+
readonly eyebrowRow: "mb-3 flex min-h-6 items-center justify-between gap-3";
|
|
9
|
+
readonly eyebrow: "text-[11px] font-semibold uppercase tracking-[.08em] text-default-500";
|
|
10
|
+
readonly grid: "grid grid-cols-3 gap-2.5";
|
|
11
|
+
readonly card: "relative flex min-h-[132px] flex-col rounded-[14px] border-[1.5px] bg-white transition-colors";
|
|
12
|
+
readonly focusRing: "outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary";
|
|
13
|
+
readonly toggle: "flex w-full items-center gap-[11px] rounded-[12px] px-[15px] pt-[13px] text-left disabled:cursor-not-allowed";
|
|
14
|
+
readonly toggleUnselected: "flex-1 flex-col items-stretch gap-3 pb-[13px]";
|
|
15
|
+
readonly toggleHeader: "flex w-full items-center gap-[11px]";
|
|
16
|
+
readonly toggleRemovable: "pr-12";
|
|
17
|
+
readonly iconBox: "flex h-[38px] w-[38px] shrink-0 items-center justify-center rounded-[10px]";
|
|
18
|
+
readonly text: "min-w-0 flex-1";
|
|
19
|
+
readonly label: "block truncate text-[15px] font-semibold leading-5";
|
|
20
|
+
readonly subtitle: "block truncate text-xs text-default-500";
|
|
21
|
+
readonly status: "block truncate text-xs font-semibold";
|
|
22
|
+
readonly lowerSlot: "mt-auto flex h-11 w-full items-center rounded-[10px] px-3 text-[13px] font-medium tabular-nums";
|
|
23
|
+
readonly amountSlot: "mt-auto px-[15px] pb-[13px] pt-3";
|
|
24
|
+
readonly amountWrapper: "h-11 min-h-11 rounded-[10px] bg-white shadow-none";
|
|
25
|
+
readonly amountInput: "text-[15px] font-semibold tabular-nums";
|
|
26
|
+
readonly remove: "absolute right-1 top-1 flex h-11 w-11 items-center justify-center rounded-[10px] text-default-500 hover:text-default-900 disabled:cursor-not-allowed";
|
|
27
|
+
readonly badge: "inline-flex h-[22px] shrink-0 items-center whitespace-nowrap rounded-full px-[9px] text-xs font-medium leading-none";
|
|
28
|
+
readonly another: "flex min-h-[132px] w-full flex-col items-start justify-center gap-3 rounded-[14px] border-[1.5px] border-dashed bg-white px-[15px] py-[13px] text-left transition-colors disabled:cursor-not-allowed";
|
|
29
|
+
readonly anotherOpen: "aria-expanded:scale-100";
|
|
30
|
+
readonly menuItem: "py-2";
|
|
31
|
+
};
|
|
32
|
+
type CardTone = 'idle' | 'selected' | 'declined';
|
|
33
|
+
export declare const refundMethodCardStyle: Record<CardTone, CSSProperties>;
|
|
34
|
+
export declare const refundMethodIconStyle: {
|
|
35
|
+
readonly idle: {
|
|
36
|
+
readonly backgroundColor: "hsl(var(--heroui-default-100))";
|
|
37
|
+
readonly color: "hsl(var(--heroui-default-600))";
|
|
38
|
+
};
|
|
39
|
+
readonly selected: {
|
|
40
|
+
readonly backgroundColor: "hsl(var(--heroui-primary))";
|
|
41
|
+
readonly color: "#fff";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export declare const refundMethodLowerSlotStyle: CSSProperties;
|
|
45
|
+
export declare const refundMethodAnotherStyle: CSSProperties;
|
|
46
|
+
export declare const refundMethodStatusStyle: {
|
|
47
|
+
readonly declined: {
|
|
48
|
+
readonly color: "#B62214";
|
|
49
|
+
};
|
|
50
|
+
readonly pending: {
|
|
51
|
+
readonly color: "#854F0B";
|
|
52
|
+
readonly backgroundColor: "#FAEEDA";
|
|
53
|
+
};
|
|
54
|
+
readonly done: {
|
|
55
|
+
readonly color: "#3B6D11";
|
|
56
|
+
readonly backgroundColor: "#EAF3DE";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { CurrencyCode, Money } from '../../utils/money';
|
|
2
|
+
export type RefundMethodKind = 'card' | 'cash' | 'check' | 'store_credit' | 'reader' | 'other';
|
|
3
|
+
export type RefundMethodStatus = 'idle' | 'declined' | 'pending' | 'done';
|
|
4
|
+
export interface RefundMethodView {
|
|
5
|
+
id: string;
|
|
6
|
+
kind: RefundMethodKind;
|
|
7
|
+
label: string;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
/** Most this method can take back; shown as "Up to …" and enforced on the amount input. */
|
|
10
|
+
cap?: Money;
|
|
11
|
+
selected: boolean;
|
|
12
|
+
/** The text the cashier typed, owned by the host. */
|
|
13
|
+
amount?: string;
|
|
14
|
+
status?: RefundMethodStatus;
|
|
15
|
+
statusLabel?: string;
|
|
16
|
+
removable?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface RefundMethodOption {
|
|
19
|
+
id: string;
|
|
20
|
+
kind: RefundMethodKind;
|
|
21
|
+
label: string;
|
|
22
|
+
description: string;
|
|
23
|
+
}
|
|
24
|
+
export interface RefundMethodAnotherMethod {
|
|
25
|
+
label: string;
|
|
26
|
+
subtitle: string;
|
|
27
|
+
options: RefundMethodOption[];
|
|
28
|
+
onPick: (optionId: string) => void;
|
|
29
|
+
}
|
|
30
|
+
export interface RefundMethodPaidWith {
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
}
|
|
34
|
+
export interface RefundMethodCardsError {
|
|
35
|
+
tone: 'danger' | 'warning';
|
|
36
|
+
title?: string;
|
|
37
|
+
body: string;
|
|
38
|
+
onRetry?: () => void;
|
|
39
|
+
onChooseDifferent: () => void;
|
|
40
|
+
}
|
|
41
|
+
export interface RefundMethodCardsLabels {
|
|
42
|
+
heading?: string;
|
|
43
|
+
/** `{amount}` is replaced with the formatted cap. */
|
|
44
|
+
upTo?: string;
|
|
45
|
+
/** Shown in the lower slot of an unselected method that has no cap. */
|
|
46
|
+
noCap?: string;
|
|
47
|
+
/** Accessible name of the amount input; `{method}` is replaced with the method label. */
|
|
48
|
+
amountFor?: string;
|
|
49
|
+
/** Accessible name of the remove button; `{method}` is replaced with the method label. */
|
|
50
|
+
remove?: string;
|
|
51
|
+
declined?: string;
|
|
52
|
+
pending?: string;
|
|
53
|
+
done?: string;
|
|
54
|
+
retry?: string;
|
|
55
|
+
chooseDifferent?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface RefundMethodCardsProps {
|
|
58
|
+
methods: RefundMethodView[];
|
|
59
|
+
onToggle: (id: string) => void;
|
|
60
|
+
onAmountChange: (id: string, draft: string) => void;
|
|
61
|
+
onAmountBlur?: (id: string) => void;
|
|
62
|
+
onRemove?: (id: string) => void;
|
|
63
|
+
/** Currency of the typed amounts when a method has no cap. Default `'USD'`. */
|
|
64
|
+
currency?: CurrencyCode;
|
|
65
|
+
paidWith?: RefundMethodPaidWith;
|
|
66
|
+
anotherMethod?: RefundMethodAnotherMethod;
|
|
67
|
+
error?: RefundMethodCardsError;
|
|
68
|
+
busy?: boolean;
|
|
69
|
+
labels?: RefundMethodCardsLabels;
|
|
70
|
+
className?: string;
|
|
71
|
+
'data-testid'?: string;
|
|
72
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { RefundProgressStatus } from './types';
|
|
3
|
+
export declare const refundProgressListClass: {
|
|
4
|
+
readonly root: "flex flex-col text-default-900";
|
|
5
|
+
readonly eyebrow: "mb-3 text-[11px] font-semibold uppercase tracking-[.08em] text-default-500";
|
|
6
|
+
readonly list: "flex flex-col gap-2.5";
|
|
7
|
+
readonly row: "flex flex-col gap-3 rounded-[14px] border-[1.5px] px-[15px] py-[13px] transition-colors";
|
|
8
|
+
readonly main: "flex items-center gap-[11px]";
|
|
9
|
+
readonly iconBox: "flex h-[38px] w-[38px] shrink-0 items-center justify-center rounded-[10px]";
|
|
10
|
+
readonly text: "min-w-0 flex-1";
|
|
11
|
+
readonly label: "block truncate text-[15px] font-semibold leading-5";
|
|
12
|
+
readonly note: "block truncate text-xs text-default-500";
|
|
13
|
+
readonly amount: "shrink-0 text-[15px] font-semibold tabular-nums";
|
|
14
|
+
readonly badge: "inline-flex h-[22px] shrink-0 items-center gap-[5px] whitespace-nowrap rounded-full px-[9px] text-xs font-medium leading-none";
|
|
15
|
+
readonly prompt: "flex flex-wrap items-center gap-3 rounded-[10px] px-3 py-2";
|
|
16
|
+
readonly promptText: "min-w-0 flex-1 text-[13px] font-medium";
|
|
17
|
+
readonly action: "h-11 min-w-0 rounded-[12px] px-4 text-[14px] font-semibold";
|
|
18
|
+
};
|
|
19
|
+
export declare const refundProgressRowStyle: {
|
|
20
|
+
readonly idle: {
|
|
21
|
+
readonly borderColor: "#E7E7E9";
|
|
22
|
+
readonly backgroundColor: "#fff";
|
|
23
|
+
};
|
|
24
|
+
readonly active: {
|
|
25
|
+
readonly borderColor: "hsl(var(--heroui-primary))";
|
|
26
|
+
readonly backgroundColor: "hsl(var(--heroui-primary) / 0.05)";
|
|
27
|
+
};
|
|
28
|
+
readonly failed: {
|
|
29
|
+
readonly borderColor: "#B62214";
|
|
30
|
+
readonly backgroundColor: "#FCEBEB";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export declare const refundProgressIconStyle: {
|
|
34
|
+
readonly idle: {
|
|
35
|
+
readonly backgroundColor: "hsl(var(--heroui-default-100))";
|
|
36
|
+
readonly color: "hsl(var(--heroui-default-600))";
|
|
37
|
+
};
|
|
38
|
+
readonly active: {
|
|
39
|
+
readonly backgroundColor: "hsl(var(--heroui-primary))";
|
|
40
|
+
readonly color: "#fff";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const refundProgressPromptStyle: CSSProperties;
|
|
44
|
+
export declare const refundProgressStatusStyle: Record<RefundProgressStatus, CSSProperties>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Money } from '../../utils/money';
|
|
2
|
+
import { RefundMethodKind } from '../RefundMethodCards/types';
|
|
3
|
+
export type RefundProgressStatus = 'queued' | 'processing' | 'waiting_reader' | 'waiting_cash' | 'done' | 'failed';
|
|
4
|
+
export interface RefundProgressAction {
|
|
5
|
+
label: string;
|
|
6
|
+
onPress: () => void;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface RefundProgressPart {
|
|
11
|
+
id: string;
|
|
12
|
+
kind: RefundMethodKind;
|
|
13
|
+
label: string;
|
|
14
|
+
amount: Money;
|
|
15
|
+
status: RefundProgressStatus;
|
|
16
|
+
note?: string;
|
|
17
|
+
/** Instruction for the cashier under the row, e.g. "Give $30.00 from the drawer". */
|
|
18
|
+
prompt?: string;
|
|
19
|
+
action?: RefundProgressAction;
|
|
20
|
+
}
|
|
21
|
+
export interface RefundProgressListLabels {
|
|
22
|
+
heading?: string;
|
|
23
|
+
queued?: string;
|
|
24
|
+
processing?: string;
|
|
25
|
+
waitingReader?: string;
|
|
26
|
+
waitingCash?: string;
|
|
27
|
+
done?: string;
|
|
28
|
+
failed?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface RefundProgressListProps {
|
|
31
|
+
parts: RefundProgressPart[];
|
|
32
|
+
/** Highlighted row. Defaults to the first part that is processing or waiting. */
|
|
33
|
+
activeId?: string;
|
|
34
|
+
labels?: RefundProgressListLabels;
|
|
35
|
+
className?: string;
|
|
36
|
+
'data-testid'?: string;
|
|
37
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { SessionExpiredCardProps } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* What a Salesforce Canvas widget shows once its session is gone. There is no
|
|
5
|
+
* reload button: the Canvas frame is loaded by a POST, so the reload has to
|
|
6
|
+
* come from the Salesforce tab, not from inside the frame.
|
|
7
|
+
* The card is `role="alert"` so the change is announced, and `min-h-52` (208px)
|
|
8
|
+
* keeps it tall enough to be the first height the Salesforce wrapper reveals
|
|
9
|
+
* (its threshold is 200px). Copy comes in as props; the caller owns i18n.
|
|
10
|
+
*/
|
|
11
|
+
export declare function SessionExpiredCard({ testId, title, description }: Readonly<SessionExpiredCardProps>): JSX.Element;
|
|
12
|
+
export declare namespace SessionExpiredCard {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
@@ -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
|
+
};
|