@veevarts/design-system 2.0.0-beta.7 → 2.0.0-csm.1
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 +36 -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 +10 -9
- package/dist/index.d.ts +4 -0
- package/dist/index.js +11290 -5926
- 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 +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/ArtifactCard/ArtifactCard.d.ts +19 -0
- package/dist/patterns/ArtifactCard/index.d.ts +2 -0
- package/dist/patterns/ArtifactCard/styles.d.ts +31 -0
- package/dist/patterns/ArtifactCard/types.d.ts +34 -0
- package/dist/patterns/AssistantActivity/AssistantActivity.d.ts +15 -0
- package/dist/patterns/AssistantActivity/formatAssistantDuration.d.ts +10 -0
- package/dist/patterns/AssistantActivity/index.d.ts +3 -0
- package/dist/patterns/AssistantActivity/styles.d.ts +31 -0
- package/dist/patterns/AssistantActivity/types.d.ts +37 -0
- package/dist/patterns/AssistantComposer/AssistantComposer.d.ts +15 -0
- package/dist/patterns/AssistantComposer/index.d.ts +2 -0
- package/dist/patterns/AssistantComposer/styles.d.ts +27 -0
- package/dist/patterns/AssistantComposer/types.d.ts +48 -0
- package/dist/patterns/AssistantMarkdown/AssistantMarkdown.d.ts +17 -0
- package/dist/patterns/AssistantMarkdown/index.d.ts +3 -0
- package/dist/patterns/AssistantMarkdown/parser.d.ts +37 -0
- package/dist/patterns/AssistantMarkdown/styles.d.ts +35 -0
- package/dist/patterns/AssistantMarkdown/types.d.ts +37 -0
- package/dist/patterns/AssistantMessage/AssistantMessage.d.ts +17 -0
- package/dist/patterns/AssistantMessage/index.d.ts +2 -0
- package/dist/patterns/AssistantMessage/styles.d.ts +45 -0
- package/dist/patterns/AssistantMessage/types.d.ts +73 -0
- package/dist/patterns/AssistantNotice/AssistantNotice.d.ts +17 -0
- package/dist/patterns/AssistantNotice/index.d.ts +2 -0
- package/dist/patterns/AssistantNotice/styles.d.ts +36 -0
- package/dist/patterns/AssistantNotice/types.d.ts +46 -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/CitationMarker/CitationMarker.d.ts +16 -0
- package/dist/patterns/CitationMarker/index.d.ts +2 -0
- package/dist/patterns/CitationMarker/styles.d.ts +19 -0
- package/dist/patterns/CitationMarker/types.d.ts +12 -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 +59 -0
- package/dist/patterns/EntityRow/types.d.ts +118 -0
- 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/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/types.d.ts +46 -3
- package/dist/patterns/InstallmentSchedule/utils.d.ts +21 -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/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/ScrollToLatest/ScrollToLatest.d.ts +16 -0
- package/dist/patterns/ScrollToLatest/index.d.ts +2 -0
- package/dist/patterns/ScrollToLatest/styles.d.ts +11 -0
- package/dist/patterns/ScrollToLatest/types.d.ts +27 -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/SourceList/SourceList.d.ts +12 -0
- package/dist/patterns/SourceList/index.d.ts +2 -0
- package/dist/patterns/SourceList/styles.d.ts +20 -0
- package/dist/patterns/SourceList/types.d.ts +28 -0
- package/dist/patterns/SourcePill/SourcePill.d.ts +13 -0
- package/dist/patterns/SourcePill/index.d.ts +2 -0
- package/dist/patterns/SourcePill/styles.d.ts +19 -0
- package/dist/patterns/SourcePill/types.d.ts +19 -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 +80 -2
- package/dist/patterns/TileSelect/index.d.ts +1 -1
- package/dist/patterns/TileSelect/styles.d.ts +14 -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/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 +87 -17
- 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 +14 -1
- package/dist/providers/close-label-context.d.ts +18 -0
- package/dist/providers/density.d.ts +17 -0
- package/dist/providers/index.d.ts +4 -0
- package/dist/tailwind/index.cjs +107 -5
- package/dist/tailwind/index.d.ts +61 -0
- package/dist/tailwind/index.mjs +104 -5
- package/dist/test/ReducedMotion.d.ts +4 -0
- package/dist/test/RootFontSize.d.ts +5 -0
- package/dist/test/backdrop.d.ts +12 -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/assistant-surface.d.ts +66 -0
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/pos-surface.d.ts +23 -4
- package/package.json +5 -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,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every slot class of `SourcePill`. HeroUI semantic colours plus the `ai-*`
|
|
3
|
+
* marker badge. Secondary text is `default-600`, because the pill's hover fill
|
|
4
|
+
* is `default-100` and `default-500` falls under 4.5:1 there.
|
|
5
|
+
*/
|
|
6
|
+
export declare const sourcePillClass: {
|
|
7
|
+
readonly base: "inline-flex h-auto min-h-8 min-w-0 max-w-full items-center justify-start gap-1.5 rounded-full border border-default-200 bg-content1 px-2.5 py-1 text-xs text-foreground";
|
|
8
|
+
readonly interactive: "data-[hover=true]:bg-default-100 data-[focus-visible=true]:outline-none data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-ai-focus";
|
|
9
|
+
readonly disabled: "border-dashed";
|
|
10
|
+
/** The same badge as `CitationMarker`, so `[n]` in the text and on the pill match. */
|
|
11
|
+
readonly marker: "flex-none inline-flex items-center rounded border border-ai-border bg-ai-fill px-1 text-[0.6875rem] font-semibold leading-4 tabular-nums text-ai-accent";
|
|
12
|
+
readonly srOnly: "sr-only";
|
|
13
|
+
readonly icon: "flex-none text-default-600";
|
|
14
|
+
readonly kind: "flex-none font-semibold";
|
|
15
|
+
readonly title: "min-w-0 truncate";
|
|
16
|
+
readonly date: "flex-none tabular-nums text-default-600";
|
|
17
|
+
readonly reason: "flex flex-none items-center gap-1 text-default-600";
|
|
18
|
+
readonly separator: "flex-none text-default-600";
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface SourcePillProps {
|
|
2
|
+
/** What kind of source it is, e.g. "Email", "Call", "Case". */
|
|
3
|
+
kindLabel: string;
|
|
4
|
+
/** The source's short title. Long titles are cut with an ellipsis; the full text stays in the accessible name. */
|
|
5
|
+
title: string;
|
|
6
|
+
/** A preformatted date, e.g. "12 Oct". */
|
|
7
|
+
date?: string;
|
|
8
|
+
/** Iconify name for the kind. */
|
|
9
|
+
icon?: string;
|
|
10
|
+
/** The `[n]` this source answers to in the text, shown first so the two can be matched by eye. */
|
|
11
|
+
marker?: number | string;
|
|
12
|
+
/** Opens the source. Omitted, the pill is plain text. */
|
|
13
|
+
onOpen?: () => void;
|
|
14
|
+
/** The source can't be opened (deleted, no longer linked). Shown with `disabledReason`, never as a dead button. */
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
/** Why it can't be opened, shown next to it, e.g. "No longer available". */
|
|
17
|
+
disabledReason?: string;
|
|
18
|
+
'data-testid'?: string;
|
|
19
|
+
}
|
|
@@ -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"`. */
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slot classes for `StepProgress`, measured off `veevart-2-pos-latest`
|
|
3
|
+
* (`.stepbar` and `.exprog`, read with `getComputedStyle` on 2026-10-21).
|
|
4
|
+
*
|
|
5
|
+
* Segment colours are the screen's own: done is `pos-ok` (#3B6D11), active the
|
|
6
|
+
* brand, upcoming the `pos-line` hairline. Names are 12px/600 on an 18px line:
|
|
7
|
+
* upcoming in `pos-muted`, active in `pos-ink`, done in `pos-ok` behind a 13px
|
|
8
|
+
* filled check with a 5px gap. DS tokens only, no stock HeroUI colours.
|
|
9
|
+
*
|
|
10
|
+
* Every size is rem (the 4px segment is `h-1`), so the POS "Text size"
|
|
11
|
+
* setting, which scales the root font size, scales the bar with the screen.
|
|
12
|
+
* Nothing here animates, so reduced motion has nothing to turn off.
|
|
13
|
+
*/
|
|
14
|
+
export declare const stepProgressClass: {
|
|
15
|
+
/** `.stepbar`: bare segments, 6px apart. */
|
|
16
|
+
readonly bare: "flex gap-1.5";
|
|
17
|
+
/** `.exprog`: labelled steps, 16px apart. */
|
|
18
|
+
readonly list: "m-0 flex list-none gap-4 p-0";
|
|
19
|
+
readonly item: "flex min-w-0 flex-1 flex-col";
|
|
20
|
+
readonly step: "flex min-w-0 flex-1 flex-col items-stretch gap-1.5 text-left";
|
|
21
|
+
readonly button: "cursor-pointer rounded-md border-none bg-transparent p-0 font-[inherit] outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[0.1875rem] focus-visible:outline-primary disabled:cursor-default";
|
|
22
|
+
readonly segment: "block h-1 rounded-full";
|
|
23
|
+
readonly name: "flex min-w-0 items-center gap-[0.3125rem] truncate text-xs font-semibold leading-[1.125rem]";
|
|
24
|
+
/** The 13px filled check in front of a finished step's name. */
|
|
25
|
+
readonly check: "flex h-[0.8125rem] w-[0.8125rem] shrink-0";
|
|
26
|
+
};
|
|
27
|
+
export type StepTone = 'done' | 'active' | 'upcoming';
|
|
28
|
+
export declare const segmentToneClass: Record<StepTone, string>;
|
|
29
|
+
export declare const nameToneClass: Record<StepTone, string>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { WizardStepState } from '../WizardShell/types';
|
|
2
|
+
export interface StepProgressStep {
|
|
3
|
+
id: string;
|
|
4
|
+
/** Step name, printed under its segment when `showLabels` is on. */
|
|
5
|
+
label: string;
|
|
6
|
+
/**
|
|
7
|
+
* Only `'skipped'` is read: a skipped step gets no segment. Every other
|
|
8
|
+
* state is derived from the step's position against `activeStepId`, so a
|
|
9
|
+
* `WizardStep[]` can be passed as is.
|
|
10
|
+
*/
|
|
11
|
+
state?: WizardStepState;
|
|
12
|
+
}
|
|
13
|
+
export interface StepProgressLabels {
|
|
14
|
+
/** Accessible name of the step list. Default `'Progress'`. */
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
/** Screen-reader suffix on a finished step. Default `'completed'`. */
|
|
17
|
+
completed?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface StepProgressProps {
|
|
20
|
+
steps: readonly StepProgressStep[];
|
|
21
|
+
/** The step the host is on. Steps before it read as done, steps after it as upcoming. */
|
|
22
|
+
activeStepId: string;
|
|
23
|
+
/**
|
|
24
|
+
* `true` (default) prints each step's name under its segment, with a check
|
|
25
|
+
* on finished steps: the POS "Sell a membership" bar (`.exprog`).
|
|
26
|
+
* `false` draws the bare segments only, as `WizardShell` does (`.stepbar`).
|
|
27
|
+
*/
|
|
28
|
+
showLabels?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Makes the labelled steps buttons. Fires with the step's `id` when a
|
|
31
|
+
* reachable step is pressed. Without it the bar is display-only.
|
|
32
|
+
*/
|
|
33
|
+
onStepPress?: (stepId: string) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Which steps `onStepPress` may go to. Default: the finished ones (before
|
|
36
|
+
* the active step). Unreachable steps render as disabled buttons.
|
|
37
|
+
*/
|
|
38
|
+
isStepReachable?: (stepId: string, index: number) => boolean;
|
|
39
|
+
labels?: StepProgressLabels;
|
|
40
|
+
/** Padding and placement belong to the host: the bar draws none of its own. */
|
|
41
|
+
className?: string;
|
|
42
|
+
'data-testid'?: string;
|
|
43
|
+
}
|
|
@@ -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>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Money } from '../../utils/money';
|
|
3
|
+
import { RecordTone } from '../shared/recordTone';
|
|
3
4
|
export type { Money } from '../../utils/money';
|
|
4
5
|
/**
|
|
5
6
|
* A generic, parametrizable detail row rendered under a line item — an icon +
|
|
@@ -56,6 +57,21 @@ export interface SummaryLineItem {
|
|
|
56
57
|
* show an auto-renewal note and a pay-by-installments line.
|
|
57
58
|
*/
|
|
58
59
|
details?: SummaryItemDetail[];
|
|
60
|
+
/** Pre-formatted list price, rendered struck through before `amount`. */
|
|
61
|
+
originalAmount?: string;
|
|
62
|
+
/** Node rendered under the amount, right-aligned (e.g. a `StatusChip`). */
|
|
63
|
+
trailing?: ReactNode;
|
|
64
|
+
/** Tints the whole row with the tone's fill. */
|
|
65
|
+
tone?: RecordTone;
|
|
66
|
+
/** Dims the price while it is being recalculated (e.g. a quantity change not yet confirmed). */
|
|
67
|
+
pending?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* `false` hides this row's remove (trash) control even when `onRemoveItem`
|
|
70
|
+
* is wired and `showRemoveButton` is on — for a line the host changes
|
|
71
|
+
* through another flow (the register's own membership line goes through
|
|
72
|
+
* "Change membership"). Applies to nested rows one by one. Default `true`.
|
|
73
|
+
*/
|
|
74
|
+
removable?: boolean;
|
|
59
75
|
}
|
|
60
76
|
/** The "Pay Service fee" radio-toggle row. */
|
|
61
77
|
export interface SummaryServiceFee {
|
|
@@ -66,18 +82,20 @@ export interface SummaryServiceFee {
|
|
|
66
82
|
/** Fires when the row/radio is toggled. */
|
|
67
83
|
onToggle?: () => void;
|
|
68
84
|
}
|
|
69
|
-
/** A plain totals row (Subtotal, Taxes). */
|
|
85
|
+
/** A plain totals row (Subtotal, Discounts, Taxes). */
|
|
70
86
|
export interface SummaryTotalRow {
|
|
71
87
|
/** Stable key for `data-testid` (e.g. 'subtotal', 'taxes'). */
|
|
72
88
|
key: string;
|
|
73
89
|
label: ReactNode;
|
|
74
90
|
amount: Money;
|
|
91
|
+
/** Stable id; when set and `onRemoveTotalRow` exists, the row shows the remove control (e.g. one row per removable discount). */
|
|
92
|
+
id?: string;
|
|
93
|
+
/** Tone of the amount: `'success'` paints it in the success color (e.g. a discount); default inherits the row tone. */
|
|
94
|
+
amountTone?: 'default' | 'success';
|
|
75
95
|
}
|
|
76
96
|
/**
|
|
77
|
-
* A post-total row — the same flat shape as {@link SummaryTotalRow}
|
|
78
|
-
*
|
|
79
|
-
* trash remove control the line items use. Kept as its own interface so the
|
|
80
|
-
* pre-total `rows` — where an id/remove has no meaning — stay untouched.
|
|
97
|
+
* A post-total row — the same flat shape as {@link SummaryTotalRow}; rows with
|
|
98
|
+
* an `id` show the trash remove control when `onRemovePostTotalRow` exists.
|
|
81
99
|
*/
|
|
82
100
|
export interface SummaryPostTotalRow extends SummaryTotalRow {
|
|
83
101
|
/** Stable id; when set and `onRemovePostTotalRow` exists, the row shows the remove control. */
|
|
@@ -94,6 +112,8 @@ export interface SummaryPrimaryAction {
|
|
|
94
112
|
export interface SummaryLabels {
|
|
95
113
|
/** Aria label for the per-item remove control. Default "Remove item". */
|
|
96
114
|
removeAriaLabel?: string;
|
|
115
|
+
/** Aria label for the per-totals-row remove control. Default "Remove discount". */
|
|
116
|
+
removeTotalRowAriaLabel?: string;
|
|
97
117
|
/** Aria label for the per-post-total-row remove control. Default "Remove applied code". */
|
|
98
118
|
removePostTotalRowAriaLabel?: string;
|
|
99
119
|
/** Aria label for the collapse/expand press target. Default "Toggle summary". */
|
|
@@ -132,6 +152,8 @@ export interface SummaryClassNames {
|
|
|
132
152
|
cta?: string;
|
|
133
153
|
/** The caption rendered under the CTA. */
|
|
134
154
|
ctaCaption?: string;
|
|
155
|
+
/** The error rendered next to the CTA. */
|
|
156
|
+
ctaError?: string;
|
|
135
157
|
/** Mobile compact bottom-bar. */
|
|
136
158
|
mobileBar?: string;
|
|
137
159
|
/** Mobile cart button. */
|
|
@@ -150,7 +172,11 @@ export interface SummaryProps {
|
|
|
150
172
|
items?: SummaryLineItem[];
|
|
151
173
|
/** Optional "Pay Service fee" radio-toggle row. */
|
|
152
174
|
serviceFee?: SummaryServiceFee;
|
|
153
|
-
/**
|
|
175
|
+
/**
|
|
176
|
+
* Plain totals rows rendered above the Total (Subtotal, Discounts, Taxes).
|
|
177
|
+
* Rows with an `id` show the trash remove control when `onRemoveTotalRow`
|
|
178
|
+
* is provided (same gating as the item remove, incl. `showRemoveButton`).
|
|
179
|
+
*/
|
|
154
180
|
rows?: SummaryTotalRow[];
|
|
155
181
|
/** The emphasized Total row (label default "Total"). */
|
|
156
182
|
total: {
|
|
@@ -182,9 +208,16 @@ export interface SummaryProps {
|
|
|
182
208
|
*/
|
|
183
209
|
ctaCaption?: ReactNode;
|
|
184
210
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
211
|
+
* An optional error (e.g. a rejected request) shown in danger text next to
|
|
212
|
+
* the CTA: under it in the card layout, ABOVE it in the mobile bottom bar,
|
|
213
|
+
* where the sticky CTA sits at the screen edge and a message under it would
|
|
214
|
+
* hug the edge and sit beneath the thumb. Rendered as `role="alert"`.
|
|
215
|
+
*/
|
|
216
|
+
ctaError?: ReactNode;
|
|
217
|
+
/**
|
|
218
|
+
* Whether the remove (trash) controls are shown — per-item, per-totals-row
|
|
219
|
+
* and per-post-total-row alike. Defaults to `true`; pass `false` to hide them
|
|
220
|
+
* even when `onRemoveItem` / `onRemoveTotalRow` / `onRemovePostTotalRow` are wired. Independent
|
|
188
221
|
* of the handlers so a host can keep them but suppress the controls.
|
|
189
222
|
*/
|
|
190
223
|
showRemoveButton?: boolean;
|
|
@@ -213,6 +246,8 @@ export interface SummaryProps {
|
|
|
213
246
|
primaryAction?: SummaryPrimaryAction;
|
|
214
247
|
/** When provided, item rows show a red trash remove control. */
|
|
215
248
|
onRemoveItem?: (id: string) => void;
|
|
249
|
+
/** When provided, totals rows (above the Total) with an `id` show the same red trash remove control. */
|
|
250
|
+
onRemoveTotalRow?: (id: string) => void;
|
|
216
251
|
/** When provided, post-total rows with an `id` show the same red trash remove control. */
|
|
217
252
|
onRemovePostTotalRow?: (id: string) => void;
|
|
218
253
|
/**
|
|
@@ -231,6 +266,13 @@ export interface SummaryProps {
|
|
|
231
266
|
/** Rendered when there are no items. */
|
|
232
267
|
emptyState?: ReactNode;
|
|
233
268
|
labels?: SummaryLabels;
|
|
269
|
+
/**
|
|
270
|
+
* Visual density. `'compact'` drops the card's title and the prices row, removes the
|
|
271
|
+
* `{qty} x` prefix, separates items with dividers, renders the totals rows
|
|
272
|
+
* small and muted and a smaller Total without a divider above it (e.g. a POS
|
|
273
|
+
* cart panel). Defaults to `'default'`.
|
|
274
|
+
*/
|
|
275
|
+
density?: 'default' | 'compact';
|
|
234
276
|
'data-testid'?: string;
|
|
235
277
|
className?: string;
|
|
236
278
|
/** Per-slot class overrides (Design-System `classNames` convention). */
|
|
@@ -25,6 +25,7 @@ export interface TableSkeletonProps {
|
|
|
25
25
|
barHeight?: number;
|
|
26
26
|
/** Right-aligns the last column's bar, for a trailing numeric or actions column. */
|
|
27
27
|
alignLastRight?: boolean;
|
|
28
|
+
appearance?: 'pulse' | 'shimmer';
|
|
28
29
|
className?: string;
|
|
29
30
|
classNames?: TableSkeletonClassNames;
|
|
30
31
|
'data-testid'?: string;
|
|
@@ -11,9 +11,58 @@ export interface TileSelectOption {
|
|
|
11
11
|
icon: string | React.ReactNode;
|
|
12
12
|
/** Disable the tile (greyed out, no click). */
|
|
13
13
|
isDisabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* One line of supporting copy. Rendered only by `variant="compact"`,
|
|
16
|
+
* for an option that ended up in the "More" menu, where the label
|
|
17
|
+
* alone ("Other") rarely says enough.
|
|
18
|
+
*/
|
|
19
|
+
description?: string;
|
|
20
|
+
/**
|
|
21
|
+
* `variant="compact"` only: keep this option in the "More" menu at
|
|
22
|
+
* every width, however much room the track has. For an action that is
|
|
23
|
+
* secondary by decision rather than by measurement — a payments picker
|
|
24
|
+
* that wants "Other" one click away so the methods people actually
|
|
25
|
+
* reach for own the row.
|
|
26
|
+
*
|
|
27
|
+
* The menu is rendered whenever an option asks for it, so this also
|
|
28
|
+
* overrides the rule that suppresses a menu holding a single option.
|
|
29
|
+
*/
|
|
30
|
+
alwaysInMenu?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* `variant="compact"` only: what this option is worth keeping on the
|
|
33
|
+
* track. When the pill runs out of room the LOWEST priority folds into
|
|
34
|
+
* the menu first; equal priorities fold from the end of the list.
|
|
35
|
+
* Default `0`.
|
|
36
|
+
*
|
|
37
|
+
* Display order is untouched — this decides what survives a squeeze,
|
|
38
|
+
* not where anything sits. A payments picker can list "Other" before
|
|
39
|
+
* "Split payment" and still lose "Other" first, because splitting a
|
|
40
|
+
* payment is the rarer, weightier thing to reach for.
|
|
41
|
+
*/
|
|
42
|
+
priority?: number;
|
|
14
43
|
/** Override per-tile test id; defaults to `${dataTestId}-${key}`. */
|
|
15
44
|
'data-testid'?: string;
|
|
16
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* `'tiles'` — the icon-over-label grid, with a `<Select>` dropdown under
|
|
48
|
+
* `md`. The picker is the subject of the step.
|
|
49
|
+
*
|
|
50
|
+
* `'compact'` — a segmented pill of label-only toggles at every width,
|
|
51
|
+
* keeping every option the track can hold and folding the rest into a
|
|
52
|
+
* "More" menu rather than scrolling. The picker is a control among others.
|
|
53
|
+
*/
|
|
54
|
+
export type TileSelectVariant = 'tiles' | 'compact';
|
|
55
|
+
/**
|
|
56
|
+
* Tile size for `variant="tiles"`.
|
|
57
|
+
*
|
|
58
|
+
* `'md'` (default) — the 80px icon-over-label tile of the payments drop-in.
|
|
59
|
+
*
|
|
60
|
+
* `'sm'` — the 58px tender tile of the Quick Donation / Quick Membership
|
|
61
|
+
* mockups (`.tender-tile`): 17px icon over an 11.5px label, 10px/4px padding,
|
|
62
|
+
* 12px radius, 8px between tiles; the picked tile takes a brand border, a 9%
|
|
63
|
+
* brand tint and brand text. DS tokens only, rem only.
|
|
64
|
+
*/
|
|
65
|
+
export type TileSelectSize = 'md' | 'sm';
|
|
17
66
|
export interface TileSelectProps {
|
|
18
67
|
/** Options to render in order. */
|
|
19
68
|
options: readonly TileSelectOption[];
|
|
@@ -30,9 +79,38 @@ export interface TileSelectProps {
|
|
|
30
79
|
* heading element.
|
|
31
80
|
*/
|
|
32
81
|
ariaLabel?: string;
|
|
33
|
-
/**
|
|
34
|
-
|
|
82
|
+
/**
|
|
83
|
+
* How the options render. Default `'tiles'`.
|
|
84
|
+
* See {@link TileSelectVariant}.
|
|
85
|
+
*/
|
|
86
|
+
variant?: TileSelectVariant;
|
|
87
|
+
/**
|
|
88
|
+
* `variant="compact"` only: a CAP on how many options stay on the pill.
|
|
89
|
+
* Unset by default, and normally best left that way — the pill already
|
|
90
|
+
* measures the track and keeps every option that fits, folding only
|
|
91
|
+
* what is left over. Set it when a surface wants a shorter row than
|
|
92
|
+
* its width allows.
|
|
93
|
+
*
|
|
94
|
+
* The cap gives way in one case: when honouring it would leave a single
|
|
95
|
+
* option in the menu that the track had room for. A "More" button is
|
|
96
|
+
* wider than most labels, so that fold costs space and buys a click.
|
|
97
|
+
*/
|
|
98
|
+
maxVisible?: number;
|
|
99
|
+
/**
|
|
100
|
+
* `variant="compact"` only: label for the overflow trigger. Shown
|
|
101
|
+
* until an option inside the menu is selected, after which the
|
|
102
|
+
* trigger carries that option's label. Translatable. Default `'More'`.
|
|
103
|
+
*/
|
|
104
|
+
moreLabel?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Grid columns on >= sm. Default `3`. Mobile collapses to 2.
|
|
107
|
+
* `5` and `6` keep a full method set on one row on a wide surface.
|
|
108
|
+
* Ignored by `variant="compact"`, which is a single strip.
|
|
109
|
+
*/
|
|
110
|
+
columnsDesktop?: 2 | 3 | 4 | 5 | 6;
|
|
35
111
|
columnsMobile?: 1 | 2;
|
|
112
|
+
/** `variant="tiles"` only. See {@link TileSelectSize}. Default `'md'`. */
|
|
113
|
+
size?: TileSelectSize;
|
|
36
114
|
className?: string;
|
|
37
115
|
'data-testid'?: string;
|
|
38
116
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { TileSelect } from './TileSelect';
|
|
2
|
-
export type { TileSelectProps, TileSelectOption } from './TileSelect';
|
|
2
|
+
export type { TileSelectProps, TileSelectOption, TileSelectVariant, TileSelectSize } from './TileSelect';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `size="sm"` tile classes (`.tender-tile`). rem only: 1px border + `py-2.5` +
|
|
3
|
+
* 17px icon + 5px gap + 14px label line + `py-2.5` + 1px border = the
|
|
4
|
+
* mockup's 58px. Reduced motion (OS or the POS override on `<html>`) drops
|
|
5
|
+
* the colour easing and the press scale.
|
|
6
|
+
*/
|
|
7
|
+
export declare const smallTileClass: {
|
|
8
|
+
readonly grid: "gap-2";
|
|
9
|
+
readonly tile: "flex flex-col items-center justify-center gap-[0.3125rem] h-auto min-h-0 min-w-0 rounded-xl border px-1 py-2.5 transition-colors motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none motion-reduce:data-[pressed=true]:scale-100 [html[data-pos-reduce-motion=true]_&]:data-[pressed=true]:scale-100";
|
|
10
|
+
readonly idle: "border-pos-field bg-white text-pos-ink data-[hover=true]:border-pos-line-strong data-[hover=true]:bg-white";
|
|
11
|
+
readonly active: "border-primary bg-primary/[.09] text-primary data-[hover=true]:bg-primary/[.09]";
|
|
12
|
+
readonly icon: "flex h-[1.0625rem] w-[1.0625rem] items-center justify-center";
|
|
13
|
+
readonly label: "text-[0.71875rem] font-medium leading-[0.875rem]";
|
|
14
|
+
};
|
|
@@ -10,6 +10,7 @@ export type ToolbarButtonProps = Omit<ComponentPropsWithoutRef<typeof Button>, '
|
|
|
10
10
|
* count straight through without guarding it.
|
|
11
11
|
*/
|
|
12
12
|
count?: number;
|
|
13
|
+
appearance?: 'pill' | 'outline';
|
|
13
14
|
/** Forwarded as `data-testid`. */
|
|
14
15
|
testId?: string;
|
|
15
16
|
};
|
|
@@ -23,6 +24,7 @@ export declare const ToolbarButton: React.ForwardRefExoticComponent<Omit<Omit<Om
|
|
|
23
24
|
* count straight through without guarding it.
|
|
24
25
|
*/
|
|
25
26
|
count?: number;
|
|
27
|
+
appearance?: "pill" | "outline";
|
|
26
28
|
/** Forwarded as `data-testid`. */
|
|
27
29
|
testId?: string;
|
|
28
30
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
export type UnderlineTabsSize = 'md' | 'sm';
|
|
3
|
+
/**
|
|
4
|
+
* `primary`: the page's own tabs; the selected label turns ink.
|
|
5
|
+
* `secondary`: tabs nested inside a section; flush, padded, semibold, the
|
|
6
|
+
* selected label turns brand. Read by `size="sm"` only.
|
|
7
|
+
*/
|
|
8
|
+
export type UnderlineTabsLevel = 'primary' | 'secondary';
|
|
2
9
|
export interface UnderlineTabItem<K extends string = string> {
|
|
3
10
|
key: K;
|
|
4
11
|
label: React.ReactNode;
|
|
@@ -15,6 +22,14 @@ export interface UnderlineTabItem<K extends string = string> {
|
|
|
15
22
|
* the DOM does not contain; passing `content` is the fix.
|
|
16
23
|
*/
|
|
17
24
|
content?: React.ReactNode;
|
|
25
|
+
/** Not selectable: drawn at 40% and skipped by the arrow keys. */
|
|
26
|
+
isDisabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The browser tooltip on the tab (its `title`), read out as its
|
|
29
|
+
* description: why a disabled tab is out of reach ("Corporate memberships
|
|
30
|
+
* cannot be gifted").
|
|
31
|
+
*/
|
|
32
|
+
hint?: string;
|
|
18
33
|
}
|
|
19
34
|
export interface UnderlineTabsProps<K extends string = string> {
|
|
20
35
|
items: UnderlineTabItem<K>[];
|
|
@@ -22,10 +37,14 @@ export interface UnderlineTabsProps<K extends string = string> {
|
|
|
22
37
|
onChange: (key: K) => void;
|
|
23
38
|
/** Names the tablist. Required — an unnamed tablist gives no context. */
|
|
24
39
|
ariaLabel: string;
|
|
40
|
+
/** `md` (default): the back-office strip. `sm`: the Quick Donation / Quick Membership strip. */
|
|
41
|
+
size?: UnderlineTabsSize;
|
|
42
|
+
/** See {@link UnderlineTabsLevel}. Default `primary`. Read by `size="sm"` only. */
|
|
43
|
+
level?: UnderlineTabsLevel;
|
|
25
44
|
className?: string;
|
|
26
45
|
'data-testid'?: string;
|
|
27
46
|
}
|
|
28
|
-
export declare function UnderlineTabs<K extends string = string>({ items, value, onChange, ariaLabel, className, 'data-testid': dataTestId, }: UnderlineTabsProps<K>): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function UnderlineTabs<K extends string = string>({ items, value, onChange, ariaLabel, size, level, className, 'data-testid': dataTestId, }: UnderlineTabsProps<K>): import("react/jsx-runtime").JSX.Element;
|
|
29
48
|
export declare namespace UnderlineTabs {
|
|
30
49
|
var displayName: string;
|
|
31
50
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { UnderlineTabs } from './UnderlineTabs';
|
|
2
|
-
export type { UnderlineTabsProps, UnderlineTabItem } from './UnderlineTabs';
|
|
2
|
+
export type { UnderlineTabsProps, UnderlineTabItem, UnderlineTabsSize, UnderlineTabsLevel } from './UnderlineTabs';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface UnderlineTabsSlots {
|
|
2
|
+
base: string;
|
|
3
|
+
tabList: string;
|
|
4
|
+
cursor: string;
|
|
5
|
+
tab: string;
|
|
6
|
+
tabContent: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const underlineTabsSlots: Record<'md' | 'sm-primary' | 'sm-secondary', UnderlineTabsSlots>;
|
|
9
|
+
/** Added to the `md` cursor under reduced motion: it jumps instead of sliding. */
|
|
10
|
+
export declare const stillCursorClass = "data-[animated=true]:transition-none";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { WizardShell } from './WizardShell';
|
|
2
|
-
export type { WizardShellProps, WizardStep, WizardStepState, WizardShellPrimaryAction, WizardShellSecondaryAction, WizardShellTotalRow, WizardShellLabels, } from './types';
|
|
2
|
+
export type { WizardShellProps, WizardStep, WizardStepState, WizardShellPrimaryAction, WizardShellSecondaryAction, WizardShellTotalRow, WizardShellTotalBadge, WizardShellLabels, } from './types';
|