@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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface LineItemRow {
|
|
3
|
+
id: string;
|
|
4
|
+
name: React.ReactNode;
|
|
5
|
+
details?: React.ReactNode[];
|
|
6
|
+
amount: React.ReactNode;
|
|
7
|
+
originalAmount?: React.ReactNode;
|
|
8
|
+
chip?: React.ReactNode;
|
|
9
|
+
tone?: 'violet';
|
|
10
|
+
}
|
|
11
|
+
export interface LineItemRowsProps {
|
|
12
|
+
items: LineItemRow[];
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
originalAmountLabel?: string;
|
|
15
|
+
'data-testid'?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const LineItemRows: React.FC<LineItemRowsProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const lineItemRowsClass: {
|
|
2
|
+
readonly list: "m-0 list-none p-0";
|
|
3
|
+
readonly row: "flex items-start gap-[0.875rem] border-t border-pos-hair px-5 py-3";
|
|
4
|
+
readonly body: "min-w-0 flex-1";
|
|
5
|
+
readonly name: "text-[0.90625rem] font-semibold text-default-900 [overflow-wrap:anywhere] [text-wrap:pretty]";
|
|
6
|
+
readonly details: "mt-[0.3125rem] flex flex-wrap items-center gap-[0.4375rem] text-[0.8125rem] text-default-500";
|
|
7
|
+
readonly separator: "text-default-400";
|
|
8
|
+
readonly detail: "tabular-nums";
|
|
9
|
+
readonly trailing: "flex shrink-0 flex-col items-end gap-1.5 text-right";
|
|
10
|
+
readonly amounts: "inline-flex items-baseline gap-2";
|
|
11
|
+
readonly original: "text-[0.8125rem] tabular-nums text-default-500 line-through";
|
|
12
|
+
readonly amount: "whitespace-nowrap text-[0.9375rem] font-bold tabular-nums text-default-900";
|
|
13
|
+
};
|
|
@@ -38,6 +38,8 @@ export interface ListPanelProps {
|
|
|
38
38
|
emptyContent?: React.ReactNode;
|
|
39
39
|
/** The table/list rendered when none of the async states apply. */
|
|
40
40
|
children?: React.ReactNode;
|
|
41
|
+
toolbar?: React.ReactNode;
|
|
42
|
+
variant?: 'default' | 'framed';
|
|
41
43
|
className?: string;
|
|
42
44
|
classNames?: ListPanelClassNames;
|
|
43
45
|
'data-testid'?: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const loadMoreFooterClass: {
|
|
2
|
+
readonly base: "flex flex-wrap items-center justify-center gap-2.5 border-t border-pos-hair px-5 py-[0.875rem] text-[0.84375rem] text-default-500";
|
|
3
|
+
readonly idle: "w-full";
|
|
4
|
+
readonly sentinel: "h-px w-full";
|
|
5
|
+
readonly spinner: "inline-flex";
|
|
6
|
+
readonly error: "text-pos-danger";
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type LoadMoreStatus = 'idle' | 'loading' | 'error' | 'end';
|
|
2
|
+
export interface LoadMoreFooterProps {
|
|
3
|
+
status: LoadMoreStatus;
|
|
4
|
+
onLoadMore: () => void;
|
|
5
|
+
loadingLabel: string;
|
|
6
|
+
errorLabel: string;
|
|
7
|
+
retryLabel: string;
|
|
8
|
+
endLabel?: string;
|
|
9
|
+
'data-testid'?: string;
|
|
10
|
+
}
|
|
@@ -9,6 +9,8 @@ export interface MetaCardRowProps {
|
|
|
9
9
|
label: string;
|
|
10
10
|
/** Associates the caption with the control it labels. */
|
|
11
11
|
htmlFor?: string;
|
|
12
|
+
/** Marks the caption with a red asterisk; pair it with the control's own required state. */
|
|
13
|
+
required?: boolean;
|
|
12
14
|
children: ReactNode;
|
|
13
15
|
className?: string;
|
|
14
16
|
'data-testid'?: string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ModalPanelEntry, ModalPanelsController } from './useModalPanels';
|
|
3
|
+
export interface ModalPanelsProps<TPanel> {
|
|
4
|
+
/** The stack from `useModalPanels()`. */
|
|
5
|
+
panels: ModalPanelsController<TPanel>;
|
|
6
|
+
/** Renders one panel. Called for every entry on the stack; only the top one is shown. */
|
|
7
|
+
children: (panel: TPanel, entry: ModalPanelEntry<TPanel>) => React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function ModalPanels<TPanel>({ panels, children }: ModalPanelsProps<TPanel>): React.ReactElement;
|
|
10
|
+
export interface ModalPanelHeaderProps {
|
|
11
|
+
/** Panel title, rendered as an `h2`. */
|
|
12
|
+
title: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Where Back goes. Default: the panel beneath, from the stack. Either way
|
|
15
|
+
* it goes through the discard guard, scoped to this panel.
|
|
16
|
+
*/
|
|
17
|
+
onBack?: () => void;
|
|
18
|
+
/** Back's accessible name. Default `'Back'`. */
|
|
19
|
+
backLabel?: string;
|
|
20
|
+
isBackDisabled?: boolean;
|
|
21
|
+
/** Back button size: `'md'` 40px, `'lg'` 48px (touch registers). Default `'md'`. */
|
|
22
|
+
size?: 'md' | 'lg';
|
|
23
|
+
/** Content at the end of the header, before the modal's close button. */
|
|
24
|
+
actions?: React.ReactNode;
|
|
25
|
+
className?: string;
|
|
26
|
+
/** Root test id; derives `-back` and `-title`. Default `'modal-panel-header'`. */
|
|
27
|
+
'data-testid'?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Back + title for a panel pushed over the first one. Back is navigation, not
|
|
31
|
+
* one of the footer's decisions, so it lives top-left where it never moves.
|
|
32
|
+
* It is shown when there is somewhere to go back to (or `onBack` is given),
|
|
33
|
+
* and it is the element focus lands on when the panel opens.
|
|
34
|
+
*/
|
|
35
|
+
export declare const ModalPanelHeader: React.FC<ModalPanelHeaderProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ModalPanelContextValue {
|
|
2
|
+
isActive: boolean;
|
|
3
|
+
canGoBack: boolean;
|
|
4
|
+
back: () => void;
|
|
5
|
+
setEntryFocus: (node: HTMLElement | null) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ModalPanelContext: import('react').Context<ModalPanelContextValue | null>;
|
|
8
|
+
export interface ModalPanelState {
|
|
9
|
+
/** True for the panel on screen. */
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
/** True when a panel lies beneath this one. */
|
|
12
|
+
canGoBack: boolean;
|
|
13
|
+
/** Returns to the panel beneath — asking first if this panel holds unsaved input. */
|
|
14
|
+
back: () => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The enclosing panel, for controls other than the header's Back — a footer
|
|
18
|
+
* Cancel, say. Outside `ModalPanels` it reports a lone, active panel.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useModalPanel(): ModalPanelState;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** First element in `container` a Tab press would reach, skipping anything inside a hidden or inert subtree. */
|
|
2
|
+
export declare function firstTabbable(container: HTMLElement): HTMLElement | null;
|
|
3
|
+
/** Still in `container` and still able to take focus — not removed, disabled or hidden since it was recorded. */
|
|
4
|
+
export declare function canStillFocus(element: HTMLElement | null, container: HTMLElement): element is HTMLElement;
|
|
5
|
+
/**
|
|
6
|
+
* A popup (menu, listbox) currently open from a trigger inside `container`,
|
|
7
|
+
* found through the trigger's own ARIA wiring: `aria-expanded="true"` plus
|
|
8
|
+
* `aria-controls` naming the popup.
|
|
9
|
+
*
|
|
10
|
+
* Only POPUPS: the trigger declares `aria-haspopup`, or the element it
|
|
11
|
+
* controls has a popup role. An expanded accordion or disclosure carries the
|
|
12
|
+
* same `aria-expanded` + `aria-controls` pair, but its region is page content
|
|
13
|
+
* that cannot take focus; treating it as a popup sent focus nowhere.
|
|
14
|
+
*/
|
|
15
|
+
export declare function openPopupFrom(container: HTMLElement): HTMLElement | null;
|
|
16
|
+
/**
|
|
17
|
+
* Fired by react-aria's `FocusScope` on the element it is about to restore
|
|
18
|
+
* focus to when an overlay (a menu, a select, a dialog) unmounts; cancelable,
|
|
19
|
+
* and bubbles from that element. It is react-aria's own seam for redirecting a
|
|
20
|
+
* restore, and the reason no timer is needed here (see the file header).
|
|
21
|
+
*/
|
|
22
|
+
export declare const FOCUS_RESTORE_EVENT = "react-aria-focus-scope-restore";
|
|
23
|
+
/** DOM handles per panel key, and which panel is on screen. Plain bookkeeping; never read during render. */
|
|
24
|
+
export declare class PanelFocusMemory {
|
|
25
|
+
private readonly panels;
|
|
26
|
+
private active;
|
|
27
|
+
setContainer(key: string, node: HTMLElement | null): void;
|
|
28
|
+
setEntry(key: string, node: HTMLElement | null): void;
|
|
29
|
+
remember(key: string, node: HTMLElement): void;
|
|
30
|
+
/** The panel now on screen, and whether the operator came back to it (vs. opened it). */
|
|
31
|
+
setActive(key: string, isReturn: boolean): void;
|
|
32
|
+
/**
|
|
33
|
+
* Puts focus in the panel on screen, unless it is already there. Returning:
|
|
34
|
+
* the element that last had focus in it — the opener of the panel just left.
|
|
35
|
+
* Entering, or when that element is gone: Back, then the first tabbable element.
|
|
36
|
+
*/
|
|
37
|
+
focusActive(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Focus was dropped by an overlay closing over a hidden panel. If the
|
|
40
|
+
* operator has since opened a menu or select in the panel on screen, that
|
|
41
|
+
* is where they are; otherwise it is the panel's own target.
|
|
42
|
+
*/
|
|
43
|
+
recoverFocus(): void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ModalPanels, ModalPanelHeader } from './ModalPanels';
|
|
2
|
+
export type { ModalPanelsProps, ModalPanelHeaderProps } from './ModalPanels';
|
|
3
|
+
export { useModalPanel } from './context';
|
|
4
|
+
export type { ModalPanelState } from './context';
|
|
5
|
+
export { useModalPanels } from './useModalPanels';
|
|
6
|
+
export type { ModalPanelsController, ModalPanelEntry } from './useModalPanels';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ModalPanelHeader slots. The header mirrors HeroUI's `ModalHeader` slot
|
|
3
|
+
* (`flex py-4 px-6 flex-initial text-large font-semibold`) so a panel header
|
|
4
|
+
* and the first panel's `ModalHeader` line up when they swap.
|
|
5
|
+
*
|
|
6
|
+
* `pl-4`, not `px-6`: the Back button's hit area is wider than its 20px glyph,
|
|
7
|
+
* so starting it 16px in puts the arrow on the 24px content edge. `pr-12`
|
|
8
|
+
* leaves the corner to HeroUI's absolutely-positioned close button.
|
|
9
|
+
*/
|
|
10
|
+
export declare const modalPanelHeaderClass = "flex flex-initial items-center gap-2 py-4 pl-4 pr-12 text-large font-semibold";
|
|
11
|
+
export declare const modalPanelTitleClass = "min-w-0 flex-1 truncate text-large font-semibold";
|
|
12
|
+
export declare const modalPanelActionsClass = "flex shrink-0 items-center gap-2";
|
|
13
|
+
export declare const modalPanelBackIconClass = "size-5";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** One panel on the stack. `key` is unique per visit, so pushing the same panel twice mounts it twice. */
|
|
2
|
+
export interface ModalPanelEntry<TPanel> {
|
|
3
|
+
readonly key: string;
|
|
4
|
+
readonly panel: TPanel;
|
|
5
|
+
}
|
|
6
|
+
export interface ModalPanelsController<TPanel> {
|
|
7
|
+
/** The panel on top — the one on screen. */
|
|
8
|
+
readonly current: TPanel;
|
|
9
|
+
/** Bottom to top. Every entry stays mounted; only the last one is shown. */
|
|
10
|
+
readonly entries: readonly ModalPanelEntry<TPanel>[];
|
|
11
|
+
/** True when there is a panel beneath the current one. */
|
|
12
|
+
readonly canGoBack: boolean;
|
|
13
|
+
/** Opens `panel` on top; Back returns to the one showing now. */
|
|
14
|
+
push: (panel: TPanel) => void;
|
|
15
|
+
/** Returns to the panel beneath. No-op on the first panel. */
|
|
16
|
+
back: () => void;
|
|
17
|
+
/** Swaps the top panel for `panel` (e.g. a saved form for its detail); Back skips the old one. */
|
|
18
|
+
replace: (panel: TPanel) => void;
|
|
19
|
+
/** Starts over with a single fresh panel — `initial` unless another is given. */
|
|
20
|
+
reset: (panel?: TPanel) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The back-stack behind `ModalPanels`: which panel is on screen, and where Back
|
|
24
|
+
* goes from it. Back goes where the operator came from because the stack
|
|
25
|
+
* remembers it — no per-panel "return to" flags to keep in step.
|
|
26
|
+
*
|
|
27
|
+
* Owned by the component that owns the modal, so it outlives the modal's
|
|
28
|
+
* content; call `reset()` when the modal closes to start the next visit fresh.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useModalPanels<TPanel>(initial: TPanel): ModalPanelsController<TPanel>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { NoticeProps } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* An inline message with a severity: the DS answer to HeroUI's
|
|
5
|
+
* `Alert variant="flat" isClosable={false}` repeated per call, and to the
|
|
6
|
+
* hand-rolled red lines and boxes of the POS.
|
|
7
|
+
*
|
|
8
|
+
* Danger and warning are `role="alert"` (assertive), info and success
|
|
9
|
+
* `role="status"` (polite). Copy comes in as props; the caller owns i18n.
|
|
10
|
+
* The only motion is the dismiss button's press feedback, which is dropped
|
|
11
|
+
* when the OS or the POS asks for reduced motion.
|
|
12
|
+
*/
|
|
13
|
+
export declare function Notice({ tone, variant, title, description, actions, onDismiss, dismissLabel, role, className, 'data-testid': dataTestId, }: NoticeProps): JSX.Element;
|
|
14
|
+
export declare namespace Notice {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { NoticeTone, NoticeVariant } from './type';
|
|
2
|
+
/**
|
|
3
|
+
* One glyph per tone, on every variant. Solar `bold` so the shape reads at
|
|
4
|
+
* callout size; the danger tone had four different glyphs across the apps
|
|
5
|
+
* before this (HeroUI's own, two Solar outlines and a gravity-ui fill).
|
|
6
|
+
*/
|
|
7
|
+
export declare const NOTICE_ICON: Record<NoticeTone, string>;
|
|
8
|
+
export declare const NOTICE_DISMISS_ICON = "solar:close-circle-linear";
|
|
9
|
+
/**
|
|
10
|
+
* Every size is rem (or em off a rem font size), so the POS "Text size"
|
|
11
|
+
* setting, which scales the root font size, scales the notice with it. The
|
|
12
|
+
* values are the design hub's px at a 16px root.
|
|
13
|
+
*/
|
|
14
|
+
export declare const noticeClass: Record<NoticeVariant, {
|
|
15
|
+
root: string;
|
|
16
|
+
iconWrapper: string;
|
|
17
|
+
iconSize: string;
|
|
18
|
+
text: string;
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
actions: string;
|
|
22
|
+
dismiss: string;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Tints. All `pos-*` tokens, the palette the Quick and POS surfaces style
|
|
26
|
+
* with; each text tone clears 4.5:1 on its fill (`pos-surface.test.ts`). The
|
|
27
|
+
* banner discs for danger and warning are the mockup's own tints; info and
|
|
28
|
+
* success have none in the mockup, so their disc is the tone at 15%.
|
|
29
|
+
*/
|
|
30
|
+
export declare const noticeTone: Record<NoticeTone, {
|
|
31
|
+
callout: string;
|
|
32
|
+
banner: string;
|
|
33
|
+
disc: string;
|
|
34
|
+
title: string;
|
|
35
|
+
}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** Severity. Picks the tint, the glyph and the default live-region role. */
|
|
3
|
+
export type NoticeTone = 'info' | 'success' | 'warning' | 'danger';
|
|
4
|
+
/**
|
|
5
|
+
* Which of the design hub's two notice shapes to draw.
|
|
6
|
+
*
|
|
7
|
+
* `callout` is the inline note of the Quick Donation and Quick Membership
|
|
8
|
+
* mockups (`.callout-info`, `.callout-warn`): a small tinted block, the glyph
|
|
9
|
+
* on the first line, the title run in bold ahead of the text.
|
|
10
|
+
*
|
|
11
|
+
* `banner` is the POS `.banner`: the glyph in a filled disc, the title in the
|
|
12
|
+
* tone on its own line, muted body copy and an action row under it.
|
|
13
|
+
*/
|
|
14
|
+
export type NoticeVariant = 'callout' | 'banner';
|
|
15
|
+
export interface NoticeProps {
|
|
16
|
+
/** Severity. Defaults to `info`. */
|
|
17
|
+
tone?: NoticeTone;
|
|
18
|
+
/** `callout` (default) or `banner`. */
|
|
19
|
+
variant?: NoticeVariant;
|
|
20
|
+
/** Short lead: run in bold before the description on a callout, its own line on a banner. */
|
|
21
|
+
title?: ReactNode;
|
|
22
|
+
/** The message. Phrasing content (text, links, `strong`): it shares a line with a callout's title. */
|
|
23
|
+
description?: ReactNode;
|
|
24
|
+
/** Buttons or links, rendered under the text. */
|
|
25
|
+
actions?: ReactNode;
|
|
26
|
+
/** Shows a dismiss button that calls this. The notice does not hide itself: the caller stops rendering it. */
|
|
27
|
+
onDismiss?: () => void;
|
|
28
|
+
/** Accessible name of the dismiss button. Defaults to `"Dismiss"`. */
|
|
29
|
+
dismissLabel?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Live-region role. Defaults to `alert` for `danger` and `warning`, `status`
|
|
32
|
+
* for `info` and `success`; the matching `aria-live` follows it.
|
|
33
|
+
*/
|
|
34
|
+
role?: 'alert' | 'status';
|
|
35
|
+
/** Root className, for layout (margins, width). */
|
|
36
|
+
className?: string;
|
|
37
|
+
/** Root test id; the parts are suffixed (`-icon`, `-title`, `-description`, `-actions`, `-dismiss`). */
|
|
38
|
+
'data-testid'?: string;
|
|
39
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { OutcomeView } from './OutcomeView';
|
|
2
|
-
export type { OutcomeViewProps, OutcomeViewLabels, ReceiptChannel } from './types';
|
|
2
|
+
export type { OutcomeViewProps, OutcomeViewLabels, ReceiptChannel, OutcomeViewKind, OutcomePaidWithLine, OutcomeGroup, OutcomeReceiptAction, OutcomeEmailReceipt, OutcomeChangeDue, } from './types';
|
|
@@ -3,6 +3,77 @@ import { Money } from '../../utils/money';
|
|
|
3
3
|
export type { DestinationLine, DestinationStatus } from '..';
|
|
4
4
|
export type { Money } from '../../utils/money';
|
|
5
5
|
export type ReceiptChannel = 'email' | 'print';
|
|
6
|
+
/**
|
|
7
|
+
* Which settled screen this is. Both are the POS `ex` screen's done stage
|
|
8
|
+
* (`.excard .exdone`); they differ in their default copy and in the top
|
|
9
|
+
* block's spacing.
|
|
10
|
+
*
|
|
11
|
+
* - `refund` (default): "Refund complete", `Reason · …`, "Done". Keeps the
|
|
12
|
+
* refund wizard's `4px 0 2px` top block.
|
|
13
|
+
* - `payment`: "Payment complete", "New sale", "Handled by …". Top block
|
|
14
|
+
* flush with the card padding, as `veevart-2-pos-latest` draws it.
|
|
15
|
+
*/
|
|
16
|
+
export type OutcomeViewKind = 'refund' | 'payment';
|
|
17
|
+
/** One tender in "Paid with": icon box, method, amount, status pill. */
|
|
18
|
+
export interface OutcomePaidWithLine {
|
|
19
|
+
/** Method name ("Card", "Cash", "Visa •••4242"). */
|
|
20
|
+
label: string;
|
|
21
|
+
amount: Money;
|
|
22
|
+
/** Iconify name for the 34px icon box (`'solar:card-outline'`). Omit for no box. */
|
|
23
|
+
icon?: string;
|
|
24
|
+
/** Pill at the row's end ("Paid", "Pending"). Omit for none. */
|
|
25
|
+
status?: string;
|
|
26
|
+
}
|
|
27
|
+
/** One "Outcome" group: an eyebrow over the things the sale produced. */
|
|
28
|
+
export interface OutcomeGroup {
|
|
29
|
+
/** Eyebrow ("Purchased", "Returned"). */
|
|
30
|
+
label: string;
|
|
31
|
+
/** One chip each ("Observer", "Donation"). */
|
|
32
|
+
items: string[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A receipt button in the `.rc-row` (Email receipt / Print receipt / Send
|
|
36
|
+
* digital card). The host decides which ones a sale offers.
|
|
37
|
+
*/
|
|
38
|
+
export interface OutcomeReceiptAction {
|
|
39
|
+
/** Stable key; also the testid suffix (`-receipt-action-<key>`). */
|
|
40
|
+
key: string;
|
|
41
|
+
label: string;
|
|
42
|
+
/** Iconify name, 16px, before the label. */
|
|
43
|
+
icon?: string;
|
|
44
|
+
onPress: () => void;
|
|
45
|
+
/**
|
|
46
|
+
* The action opens a panel under the row (the email box). `true` draws it
|
|
47
|
+
* pressed and sets `aria-expanded`. Leave `undefined` for a plain action.
|
|
48
|
+
*/
|
|
49
|
+
expanded?: boolean;
|
|
50
|
+
isDisabled?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The email box under the receipt row (`.rc-emailbox`): recipients as
|
|
54
|
+
* removable chips, a free-text field, and the send button. Controlled: the
|
|
55
|
+
* host owns the list, the draft and the validation.
|
|
56
|
+
*/
|
|
57
|
+
export interface OutcomeEmailReceipt {
|
|
58
|
+
emails: string[];
|
|
59
|
+
draft: string;
|
|
60
|
+
onDraftChange: (draft: string) => void;
|
|
61
|
+
/** Enter in the field. The host validates and adds (or flags `isInvalid`). */
|
|
62
|
+
onAddEmail: (draft: string) => void;
|
|
63
|
+
onRemoveEmail: (email: string) => void;
|
|
64
|
+
onSend: () => void;
|
|
65
|
+
/** Danger border on the recipients box. */
|
|
66
|
+
isInvalid?: boolean;
|
|
67
|
+
isSending?: boolean;
|
|
68
|
+
/** Default: disabled while there is no recipient. */
|
|
69
|
+
isSendDisabled?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/** Cash paid over the total: the screen leads with the change instead of the total. */
|
|
72
|
+
export interface OutcomeChangeDue {
|
|
73
|
+
amount: Money;
|
|
74
|
+
/** Muted line under the amount ("Total $19.44 · Cash tendered $20.00"). */
|
|
75
|
+
caption?: string;
|
|
76
|
+
}
|
|
6
77
|
export interface OutcomeViewLabels {
|
|
7
78
|
processing?: string;
|
|
8
79
|
title?: string;
|
|
@@ -17,19 +88,55 @@ export interface OutcomeViewLabels {
|
|
|
17
88
|
reason?: string;
|
|
18
89
|
/** `{name}` is replaced with the `authorizedBy` prop. */
|
|
19
90
|
authorizedBy?: string;
|
|
91
|
+
/** Eyebrow over `paidWith`. Default `'Paid with'`. */
|
|
92
|
+
paidWithTitle?: string;
|
|
93
|
+
/** Eyebrow over `outcomeGroups`. Default `'Outcome'`. */
|
|
94
|
+
outcomeTitle?: string;
|
|
95
|
+
/** Label over the change amount. Default `'Change due'`. */
|
|
96
|
+
changeDue?: string;
|
|
97
|
+
/** Placeholder of the email field. Default `'Add email…'`. */
|
|
98
|
+
emailPlaceholder?: string;
|
|
99
|
+
/** Accessible name of the email field. Default `'Add email address'`. */
|
|
100
|
+
emailAriaLabel?: string;
|
|
101
|
+
/** `{email}` is replaced with the address. Default `'Remove {email}'`. */
|
|
102
|
+
removeEmail?: string;
|
|
103
|
+
/** Send button of the email box. Default `'Send receipt'`. */
|
|
104
|
+
sendEmail?: string;
|
|
20
105
|
}
|
|
21
106
|
export interface OutcomeViewProps {
|
|
22
107
|
state: 'processing' | 'complete';
|
|
23
|
-
/**
|
|
108
|
+
/** See {@link OutcomeViewKind}. Default `'refund'`. */
|
|
109
|
+
kind?: OutcomeViewKind;
|
|
110
|
+
/** Amount refunded or paid — shown under the spinner, then as the receipt headline. */
|
|
24
111
|
total?: Money;
|
|
25
|
-
|
|
112
|
+
/**
|
|
113
|
+
* Where a refund went, with a per-line status chip. A payment omits it:
|
|
114
|
+
* the section is drawn only when the prop is given.
|
|
115
|
+
*/
|
|
116
|
+
destinations?: DestinationLine[];
|
|
117
|
+
/** Muted line under the total ("TXN-10483 · Marcus Chen"). */
|
|
118
|
+
subtitle?: string;
|
|
26
119
|
/** Refund reason, printed under the total as `Reason · …`. */
|
|
27
120
|
reason?: string;
|
|
28
|
-
/**
|
|
121
|
+
/** "Paid with" rows. */
|
|
122
|
+
paidWith?: OutcomePaidWithLine[];
|
|
123
|
+
/** "Outcome" groups: what the sale produced, as chips. */
|
|
124
|
+
outcomeGroups?: OutcomeGroup[];
|
|
125
|
+
/** Cash change to hand back. Replaces the title + total block. */
|
|
126
|
+
changeDue?: OutcomeChangeDue;
|
|
127
|
+
/** Who authorized the refund or handled the sale, printed as the footer line. */
|
|
29
128
|
authorizedBy?: string;
|
|
30
129
|
/** Receipt channels already chosen, reflected in the row checkboxes. */
|
|
31
130
|
selectedReceipts?: ReceiptChannel[];
|
|
131
|
+
/** The refund's receipt checkbox rows. Ignored when `receiptActions` is given. */
|
|
32
132
|
onSendReceipt?: (channel: ReceiptChannel) => void;
|
|
133
|
+
/**
|
|
134
|
+
* Receipt buttons in one row (`.rc-row`), the payment screen's
|
|
135
|
+
* Email / Print / Send digital card. Takes the place of the checkbox rows.
|
|
136
|
+
*/
|
|
137
|
+
receiptActions?: OutcomeReceiptAction[];
|
|
138
|
+
/** The email box under the receipt row. Pass it while the email action is expanded. */
|
|
139
|
+
emailReceipt?: OutcomeEmailReceipt;
|
|
33
140
|
onDone: () => void;
|
|
34
141
|
/**
|
|
35
142
|
* Drops the settled state's own `.excard` frame, for hosts that already
|
|
@@ -26,6 +26,7 @@ export interface PageHeaderProps {
|
|
|
26
26
|
actions?: React.ReactNode;
|
|
27
27
|
/** Heading level for the title element. Default `'h1'`. */
|
|
28
28
|
titleAs?: 'h1' | 'h2' | 'h3';
|
|
29
|
+
variant?: 'default' | 'list';
|
|
29
30
|
className?: string;
|
|
30
31
|
classNames?: PageHeaderClassNames;
|
|
31
32
|
'data-testid'?: string;
|
|
@@ -3,6 +3,12 @@ export interface PaginationSummaryClassNames {
|
|
|
3
3
|
base?: string;
|
|
4
4
|
emphasis?: string;
|
|
5
5
|
}
|
|
6
|
+
/** The range `format` receives; `from` and `to` are both 0 when there is nothing to show. */
|
|
7
|
+
export interface PaginationSummaryRange {
|
|
8
|
+
from: number;
|
|
9
|
+
to: number;
|
|
10
|
+
total: number;
|
|
11
|
+
}
|
|
6
12
|
export interface PaginationSummaryProps {
|
|
7
13
|
/** Current page, 1-based. */
|
|
8
14
|
page: number;
|
|
@@ -19,6 +25,12 @@ export interface PaginationSummaryProps {
|
|
|
19
25
|
* avoid reading the change twice.
|
|
20
26
|
*/
|
|
21
27
|
announce?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Writes the sentence instead of the built-in English "Showing {range} of
|
|
30
|
+
* {total} {unit}". Use it to translate; `unit` and `classNames.emphasis`
|
|
31
|
+
* do not apply, since the returned node is the whole sentence.
|
|
32
|
+
*/
|
|
33
|
+
format?: (range: PaginationSummaryRange) => React.ReactNode;
|
|
22
34
|
className?: string;
|
|
23
35
|
classNames?: PaginationSummaryClassNames;
|
|
24
36
|
'data-testid'?: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { PaginationSummary } from './PaginationSummary';
|
|
2
|
-
export type { PaginationSummaryProps, PaginationSummaryClassNames } from './PaginationSummary';
|
|
2
|
+
export type { PaginationSummaryProps, PaginationSummaryClassNames, PaginationSummaryRange } from './PaginationSummary';
|
|
3
3
|
export { pageRange } from './page-range';
|
|
@@ -10,6 +10,8 @@ export interface PaymentSubAmountInputProps {
|
|
|
10
10
|
defaultValue?: string;
|
|
11
11
|
/** Fires on every keystroke with the raw string. */
|
|
12
12
|
onChange?: (next: string) => void;
|
|
13
|
+
/** Fires when the amount field loses focus. */
|
|
14
|
+
onBlur?: () => void;
|
|
13
15
|
/** Placeholder shown when value is empty (e.g. "$150.00"). */
|
|
14
16
|
placeholder?: string;
|
|
15
17
|
isDisabled?: boolean;
|
|
@@ -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,20 @@
|
|
|
1
|
+
import { PillTabsSize } from './types';
|
|
2
|
+
export declare const pillTabsClass: {
|
|
3
|
+
readonly base: "mb-3.5 w-full";
|
|
4
|
+
readonly tabList: "w-full gap-1 rounded-full border border-pos-line bg-default-100 p-1";
|
|
5
|
+
readonly cursor: "rounded-full bg-white shadow-[0_1px_3px_rgba(0,0,0,.10)]";
|
|
6
|
+
readonly tab: "h-auto flex-1 data-[hover-unselected=true]:opacity-100";
|
|
7
|
+
readonly tabStill: "rounded-full data-[selected=true]:bg-white data-[selected=true]:shadow-[0_1px_3px_rgba(0,0,0,.10)]";
|
|
8
|
+
readonly tabContent: "leading-[1.5] font-normal text-default-600 group-data-[selected=true]:font-semibold group-data-[selected=true]:text-default-900";
|
|
9
|
+
readonly title: "flex items-center whitespace-nowrap";
|
|
10
|
+
readonly icon: "flex shrink-0";
|
|
11
|
+
readonly count: "rounded-full bg-default-200 py-px leading-[1.5] font-semibold text-default-600 group-data-[selected=true]:bg-acct-rust-fill group-data-[selected=true]:text-primary-600";
|
|
12
|
+
};
|
|
13
|
+
/** `lg`: 12px above and below a 24px line (16px text) is a 48px tab, in rem so it scales. */
|
|
14
|
+
export declare const pillTabsSizeClass: Record<PillTabsSize, {
|
|
15
|
+
tab: string;
|
|
16
|
+
tabContent: string;
|
|
17
|
+
title: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
count: string;
|
|
20
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type PillTabsSize = 'md' | 'lg';
|
|
3
|
+
export interface PillTabItem {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
count?: number;
|
|
7
|
+
/** Decorative glyph before the label; hidden from assistive tech, the label names the tab. */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
/** Replaces the derived `<data-testid>-<key>`; the count becomes `<this>-count`. */
|
|
10
|
+
'data-testid'?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface PillTabsProps {
|
|
13
|
+
items: PillTabItem[];
|
|
14
|
+
value: string;
|
|
15
|
+
onChange: (key: string) => void;
|
|
16
|
+
ariaLabel: string;
|
|
17
|
+
idPrefix?: string;
|
|
18
|
+
/** `md` (default) is the 38px record-page tab; `lg` is the 48px touch target, with larger text. */
|
|
19
|
+
size?: PillTabsSize;
|
|
20
|
+
'data-testid'?: string;
|
|
21
|
+
}
|
|
@@ -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;
|