@veevarts/design-system 2.1.0-beta.2 → 2.1.0-beta.20
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 +5 -5
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9332 -5319
- 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/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 +59 -0
- package/dist/patterns/EntityRow/types.d.ts +118 -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 +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 +69 -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 +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
|
@@ -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';
|
|
@@ -28,10 +28,16 @@ export interface WizardShellSecondaryAction {
|
|
|
28
28
|
* the return covers less than the order, `owes` reads "Customer owes" when the
|
|
29
29
|
* balance runs the other way.
|
|
30
30
|
*/
|
|
31
|
+
export interface WizardShellTotalBadge {
|
|
32
|
+
label: string;
|
|
33
|
+
tone: 'warn' | 'neutral' | 'ok';
|
|
34
|
+
}
|
|
31
35
|
export interface WizardShellTotalRow {
|
|
32
36
|
label: string;
|
|
33
37
|
amount?: Money;
|
|
34
|
-
|
|
38
|
+
/** Renders the amount as a counter against this total: "Assigned $40.00 of $46.00". */
|
|
39
|
+
of?: Money;
|
|
40
|
+
badge?: 'partial' | 'owes' | WizardShellTotalBadge;
|
|
35
41
|
}
|
|
36
42
|
export interface WizardShellLabels {
|
|
37
43
|
back?: string;
|
|
@@ -40,6 +46,8 @@ export interface WizardShellLabels {
|
|
|
40
46
|
cancel?: string;
|
|
41
47
|
partialBadge?: string;
|
|
42
48
|
owesBadge?: string;
|
|
49
|
+
/** The word between `totalRow.amount` and `totalRow.of`. */
|
|
50
|
+
ofSeparator?: string;
|
|
43
51
|
}
|
|
44
52
|
export interface WizardShellProps {
|
|
45
53
|
onClose?: () => void;
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* The literal Tailwind classes must stay spelled out (not interpolated) so
|
|
7
7
|
* the JIT scanner keeps generating them.
|
|
8
8
|
*/
|
|
9
|
-
export declare const GRID_DESKTOP_COLS: Record<2 | 3 | 4, string>;
|
|
9
|
+
export declare const GRID_DESKTOP_COLS: Record<2 | 3 | 4 | 5 | 6, string>;
|
|
10
10
|
export declare const GRID_MOBILE_COLS: Record<1 | 2, string>;
|
package/dist/patterns/index.d.ts
CHANGED
|
@@ -10,13 +10,13 @@ export type { MultiselectProps } from './Multiselect';
|
|
|
10
10
|
export { RichTextArea, RICH_TEXT_PRESETS } from './RichText';
|
|
11
11
|
export type { RichTextAreaProps } from './RichText';
|
|
12
12
|
export { DonationAmounts } from './DonationAmounts';
|
|
13
|
-
export type { DonationAmountsProps, DonationAmount, SelectedDonation, DonationLabels } from './DonationAmounts';
|
|
13
|
+
export type { DonationAmountsProps, DonationAmount, SelectedDonation, DonationLabels, DonationAmountsVariant, } from './DonationAmounts';
|
|
14
14
|
export { ExpireCartTimer } from './ExpireCartTimer';
|
|
15
15
|
export type { ExpireCartTimerProps } from './ExpireCartTimer';
|
|
16
|
-
export { EventDetails } from './EventDetails';
|
|
17
|
-
export type { EventDetailsProps } from './EventDetails';
|
|
18
|
-
export { OfferCard, OfferCardList, OfferCardSkeleton, OfferCardError, OfferCardEmpty, offerListVariants, offerCardVariants, formatCurrency as formatOfferCurrency, parseCurrency as parseOfferCurrency, } from './OfferCard';
|
|
19
|
-
export type { Offer, OfferSelection, OfferCardLabels, OfferCardErrorLabels, OfferCardClassNames, OfferCardListClassNames, OfferCardSkeletonClassNames, OfferCardErrorClassNames, OfferCardEmptyClassNames, OfferCardSlots, OfferCardProps, OfferCardListProps, OfferCardSkeletonProps, OfferCardErrorProps, OfferCardEmptyProps, } from './OfferCard';
|
|
16
|
+
export { EventDetails } from './Programs/EventDetails';
|
|
17
|
+
export type { EventDetailsProps } from './Programs/EventDetails';
|
|
18
|
+
export { OfferCard, OfferCardList, OfferCardSkeleton, OfferCardError, OfferCardEmpty, offerListVariants, offerCardVariants, formatCurrency as formatOfferCurrency, parseCurrency as parseOfferCurrency, } from './Programs/OfferCard';
|
|
19
|
+
export type { Offer, OfferSelection, OfferCardLabels, OfferCardErrorLabels, OfferCardClassNames, OfferCardListClassNames, OfferCardSkeletonClassNames, OfferCardErrorClassNames, OfferCardEmptyClassNames, OfferCardSlots, OfferCardProps, OfferCardListProps, OfferCardSkeletonProps, OfferCardErrorProps, OfferCardEmptyProps, } from './Programs/OfferCard';
|
|
20
20
|
export { RevenueDistributionCard, RevenueDistributionSkeleton, RevenueDistributionError, RevenueDistributionEmpty, formatAmount as formatRevenueAmount, formatCurrency as formatRevenueCurrency, getCurrencySymbol, parseCurrency as parseRevenueCurrency, calculateAllocationDifference, generateDistributionId, } from './RevenueDistribution';
|
|
21
21
|
export type { GlAccount, Distribution, RevenueDistributionLabels, RevenueDistributionErrorLabels, RevenueDistributionEmptyLabels, RevenueDistributionCardClassNames, RevenueDistributionSkeletonClassNames, RevenueDistributionErrorClassNames, RevenueDistributionEmptyClassNames, RevenueDistributionCardProps, RevenueDistributionSkeletonProps, RevenueDistributionErrorProps, RevenueDistributionEmptyProps, } from './RevenueDistribution';
|
|
22
22
|
export { InstallmentFundAssignment, InstallmentFundAssignmentSkeleton } from './InstallmentFundAssignment';
|
|
@@ -31,8 +31,10 @@ export { MembershipSelectCards } from './MembershipSelectCards';
|
|
|
31
31
|
export type * from './MembershipSelectCards';
|
|
32
32
|
export { ItemCard } from './ItemCard';
|
|
33
33
|
export type * from './ItemCard';
|
|
34
|
-
export { CatalogItemCard } from './CatalogItemCard';
|
|
35
|
-
export type * from './CatalogItemCard';
|
|
34
|
+
export { CatalogItemCard } from './Programs/CatalogItemCard';
|
|
35
|
+
export type * from './Programs/CatalogItemCard';
|
|
36
|
+
export { ProgramListItem } from './Programs/ProgramListItem';
|
|
37
|
+
export type * from './Programs/ProgramListItem';
|
|
36
38
|
export { FeedbackState, EmptyState, ErrorState, LoadingState, SuccessState } from './FeedbackState';
|
|
37
39
|
export type * from './FeedbackState';
|
|
38
40
|
export { Toggle } from './Toggle';
|
|
@@ -41,8 +43,8 @@ export { TicketSelection } from './TicketSelection';
|
|
|
41
43
|
export type * from './TicketSelection';
|
|
42
44
|
export { FilterPopover } from './FilterPopover';
|
|
43
45
|
export type * from './FilterPopover';
|
|
44
|
-
export { SessionTimeline } from './SessionTimeline';
|
|
45
|
-
export type * from './SessionTimeline';
|
|
46
|
+
export { SessionTimeline } from './Programs/SessionTimeline';
|
|
47
|
+
export type * from './Programs/SessionTimeline';
|
|
46
48
|
export { PageHeader } from './PageHeader';
|
|
47
49
|
export type { PageHeaderProps, PageHeaderClassNames } from './PageHeader';
|
|
48
50
|
export { StatusChip } from './StatusChip';
|
|
@@ -56,19 +58,21 @@ export type { TableSkeletonProps, TableSkeletonClassNames } from './TableSkeleto
|
|
|
56
58
|
export { AdminTable, adminRowClass, adminTableClass, adminTableFooterClass, adminTdClass, adminThClass, } from './AdminTable';
|
|
57
59
|
export type { AdminTableProps, AdminTableColumn, AdminTableClassNames } from './AdminTable';
|
|
58
60
|
export { AdminToolbar } from './AdminToolbar';
|
|
59
|
-
export type { AdminToolbarProps } from './AdminToolbar';
|
|
61
|
+
export type { AdminToolbarProps, AdminToolbarSearchWidth, AdminToolbarSize } from './AdminToolbar';
|
|
60
62
|
export { ToolbarButton } from './ToolbarButton';
|
|
61
63
|
export type { ToolbarButtonProps } from './ToolbarButton';
|
|
62
64
|
export { UnderlineTabs } from './UnderlineTabs';
|
|
63
|
-
export type { UnderlineTabsProps, UnderlineTabItem } from './UnderlineTabs';
|
|
65
|
+
export type { UnderlineTabsProps, UnderlineTabItem, UnderlineTabsSize, UnderlineTabsLevel } from './UnderlineTabs';
|
|
64
66
|
export { AdminFieldLabel, AdminTextField, adminFieldErrorClass, adminFieldHintClass, adminFieldLabelClass, adminFieldLabelSuffixClass, adminInputClass, adminInputReadOnlyClass, adminInputWrapperClass, } from './AdminTextField';
|
|
65
67
|
export type { AdminTextFieldProps } from './AdminTextField';
|
|
66
68
|
export { RowActions } from './RowActions';
|
|
67
69
|
export type { RowActionsProps, RowAction } from './RowActions';
|
|
68
70
|
export { PickerRow } from './PickerRow';
|
|
69
71
|
export type { PickerRowProps } from './PickerRow';
|
|
72
|
+
export { EntityRow, EntityList, EntityListSkeleton } from './EntityRow';
|
|
73
|
+
export type { EntityRowProps, EntityRowSize, EntityRowVariant, EntityRowTag, EntityRowTagTone, EntityRowLeading, EntityRowAction, EntityListProps, EntityListSkeletonProps, } from './EntityRow';
|
|
70
74
|
export { PaginationSummary, pageRange } from './PaginationSummary';
|
|
71
|
-
export type { PaginationSummaryProps, PaginationSummaryClassNames } from './PaginationSummary';
|
|
75
|
+
export type { PaginationSummaryProps, PaginationSummaryClassNames, PaginationSummaryRange } from './PaginationSummary';
|
|
72
76
|
export { ListPanel } from './ListPanel';
|
|
73
77
|
export type { ListPanelProps, ListPanelClassNames } from './ListPanel';
|
|
74
78
|
export { CashTenderForm } from './CashTenderForm';
|
|
@@ -78,11 +82,11 @@ export type { CheckTenderFormProps, CheckTenderValue, CheckTenderLabels } from '
|
|
|
78
82
|
export { OtherTenderForm } from './OtherTenderForm';
|
|
79
83
|
export type { OtherTenderFormProps, OtherTenderValue, OtherTenderLabels, OtherTenderMethodOption, } from './OtherTenderForm';
|
|
80
84
|
export { SplitPaymentSummary } from './SplitPaymentSummary';
|
|
81
|
-
export type { SplitPaymentSummaryProps, SplitPaymentSummaryLabels, TenderRow, TenderRowStatus, TenderRowType, } from './SplitPaymentSummary';
|
|
85
|
+
export type { SplitPaymentSummaryProps, SplitPaymentSummaryLabels, SplitPaymentSummaryVariant, TenderRow, TenderRowStatus, TenderRowType, } from './SplitPaymentSummary';
|
|
82
86
|
export { ModalShell, ModalShellHeader, ModalShellFooter } from './ModalShell';
|
|
83
87
|
export type { ModalShellProps, ModalShellHeaderProps, ModalShellFooterProps } from './ModalShell';
|
|
84
88
|
export { TileSelect } from './TileSelect';
|
|
85
|
-
export type { TileSelectProps, TileSelectOption } from './TileSelect';
|
|
89
|
+
export type { TileSelectProps, TileSelectOption, TileSelectVariant, TileSelectSize } from './TileSelect';
|
|
86
90
|
export { PaymentTotalBanner } from './PaymentTotalBanner';
|
|
87
91
|
export type { PaymentTotalBannerProps } from './PaymentTotalBanner';
|
|
88
92
|
export { LoadingOverlay } from './LoadingOverlay';
|
|
@@ -95,11 +99,19 @@ export { PaymentSubAmountInput } from './PaymentSubAmountInput';
|
|
|
95
99
|
export type { PaymentSubAmountInputProps } from './PaymentSubAmountInput';
|
|
96
100
|
export { ConfirmDialog } from './ConfirmDialog';
|
|
97
101
|
export type { ConfirmDialogProps, ConfirmDialogVariant } from './ConfirmDialog';
|
|
102
|
+
export { InlineConfirm } from './InlineConfirm';
|
|
103
|
+
export type { InlineConfirmProps, InlineConfirmVariant, InlineConfirmSize } from './InlineConfirm';
|
|
104
|
+
export { ModalPanels, ModalPanelHeader, useModalPanel, useModalPanels } from './ModalPanels';
|
|
105
|
+
export type { ModalPanelsProps, ModalPanelHeaderProps, ModalPanelState, ModalPanelsController, ModalPanelEntry, } from './ModalPanels';
|
|
106
|
+
export { DiscardGuard, useDiscardGuard, useDiscardGuardActions, useReportUnsavedChanges } from './DiscardGuard';
|
|
107
|
+
export type { DiscardGuardProps, DiscardGuardController, DiscardGuardActions } from './DiscardGuard';
|
|
98
108
|
export { Summary } from './Summary';
|
|
99
109
|
export type { SummaryProps, SummaryLineItem, SummaryItemDetail, SummaryServiceFee, SummaryTotalRow, SummaryPostTotalRow, SummaryPrimaryAction, SummaryLabels, } from './Summary';
|
|
110
|
+
export { StepProgress } from './StepProgress';
|
|
111
|
+
export type { StepProgressProps, StepProgressStep, StepProgressLabels } from './StepProgress';
|
|
100
112
|
export { WizardShell } from './WizardShell';
|
|
101
|
-
export type { WizardShellProps, WizardStep, WizardStepState, WizardShellPrimaryAction, WizardShellSecondaryAction, WizardShellTotalRow, WizardShellLabels, } from './WizardShell';
|
|
102
|
-
export type { TenderError, DestinationLine, DestinationStatus } from './shared';
|
|
113
|
+
export type { WizardShellProps, WizardStep, WizardStepState, WizardShellPrimaryAction, WizardShellSecondaryAction, WizardShellTotalRow, WizardShellTotalBadge, WizardShellLabels, } from './WizardShell';
|
|
114
|
+
export type { TenderError, DestinationLine, DestinationStatus, RecordTone } from './shared';
|
|
103
115
|
export { LineItemList } from './LineItemList';
|
|
104
116
|
export type { LineItemListProps, LineItemView, ItemSelection, LineItemState, LineItemRestockView, ItemDisposition, AmountOnlyView, LineItemListLabels, } from './LineItemList';
|
|
105
117
|
export { MetaCard } from './MetaCard';
|
|
@@ -116,7 +128,47 @@ export { TenderMethods } from './TenderMethods';
|
|
|
116
128
|
export type { TenderMethodsProps, TenderView, TenderKind, TenderMethodsLabels } from './TenderMethods';
|
|
117
129
|
export { SplitTenderPanel } from './SplitTenderPanel';
|
|
118
130
|
export type { SplitTenderPanelProps, SplitPartView, SplitMethodOption, SplitTenderPanelLabels, } from './SplitTenderPanel';
|
|
131
|
+
export { RefundMethodCards } from './RefundMethodCards';
|
|
132
|
+
export type { RefundMethodCardsProps, RefundMethodCardsLabels, RefundMethodCardsError, RefundMethodView, RefundMethodKind, RefundMethodStatus, RefundMethodOption, RefundMethodAnotherMethod, RefundMethodPaidWith, } from './RefundMethodCards';
|
|
133
|
+
export { RefundProgressList } from './RefundProgressList';
|
|
134
|
+
export type { RefundProgressListProps, RefundProgressListLabels, RefundProgressPart, RefundProgressStatus, RefundProgressAction, } from './RefundProgressList';
|
|
119
135
|
export { PinField } from './PinField';
|
|
120
136
|
export type { PinFieldProps, PinFieldLabels } from './PinField';
|
|
121
137
|
export { OutcomeView } from './OutcomeView';
|
|
122
|
-
export type { OutcomeViewProps, OutcomeViewLabels, ReceiptChannel } from './OutcomeView';
|
|
138
|
+
export type { OutcomeViewProps, OutcomeViewLabels, ReceiptChannel, OutcomeViewKind, OutcomePaidWithLine, OutcomeGroup, OutcomeReceiptAction, OutcomeEmailReceipt, OutcomeChangeDue, } from './OutcomeView';
|
|
139
|
+
export { FilterSelect, FilterSelectGroup } from './FilterSelect';
|
|
140
|
+
export type { FilterSelectProps, FilterSelectOption, FilterSelectGroupProps } from './FilterSelect';
|
|
141
|
+
export { LoadMoreFooter } from './LoadMoreFooter';
|
|
142
|
+
export type { LoadMoreFooterProps, LoadMoreStatus } from './LoadMoreFooter';
|
|
143
|
+
export { CardList } from './CardList';
|
|
144
|
+
export type { CardListProps, CardListItem } from './CardList';
|
|
145
|
+
export { RecordHeader } from './RecordHeader';
|
|
146
|
+
export type { RecordHeaderProps, RecordHeaderStat } from './RecordHeader';
|
|
147
|
+
export { RecordLayout } from './RecordLayout';
|
|
148
|
+
export type { RecordLayoutProps } from './RecordLayout';
|
|
149
|
+
export { StatTiles } from './StatTiles';
|
|
150
|
+
export type { StatTilesProps, StatTileItem } from './StatTiles';
|
|
151
|
+
export { PillTabs, pillTabId, pillTabPanelId, pillTabPanelProps } from './PillTabs';
|
|
152
|
+
export type { PillTabsProps, PillTabItem, PillTabsSize } from './PillTabs';
|
|
153
|
+
export { AmountList } from './AmountList';
|
|
154
|
+
export type { AmountListProps, AmountListRow } from './AmountList';
|
|
155
|
+
export { ActivityTimeline } from './ActivityTimeline';
|
|
156
|
+
export type { ActivityTimelineProps, ActivityTimelineEvent } from './ActivityTimeline';
|
|
157
|
+
export { RelatedRecordList } from './RelatedRecordList';
|
|
158
|
+
export type { RelatedRecordListProps, RelatedRecordRow } from './RelatedRecordList';
|
|
159
|
+
export { RecordCard } from './RecordCard';
|
|
160
|
+
export type { RecordCardProps, RecordCardVariant, RecordCardBody, RecordCardSurface } from './RecordCard';
|
|
161
|
+
export { CardStack } from './CardStack';
|
|
162
|
+
export type { CardStackProps, CardStackLayout } from './CardStack';
|
|
163
|
+
export { KeyValueRows } from './KeyValueRows';
|
|
164
|
+
export type { KeyValueRowsProps, KeyValueRow, KeyValueRowsDensity } from './KeyValueRows';
|
|
165
|
+
export { LineItemRows } from './LineItemRows';
|
|
166
|
+
export type { LineItemRowsProps, LineItemRow } from './LineItemRows';
|
|
167
|
+
export { RecordTotals } from './RecordTotals';
|
|
168
|
+
export type { RecordTotalsProps, RecordTotalsRow } from './RecordTotals';
|
|
169
|
+
export { CellText, ChipStack } from './CellText';
|
|
170
|
+
export type { CellTextProps, CellTextVariant, ChipStackProps } from './CellText';
|
|
171
|
+
export { SessionExpiredCard } from './SessionExpiredCard';
|
|
172
|
+
export type { SessionExpiredCardProps } from './SessionExpiredCard';
|
|
173
|
+
export { Notice } from './Notice';
|
|
174
|
+
export type { NoticeProps, NoticeTone, NoticeVariant } from './Notice';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const POS_REDUCE_MOTION_ATTRIBUTE = "data-pos-reduce-motion";
|
|
2
|
+
export declare const stillTransitionClass = "motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none";
|
|
3
|
+
export declare const stillAnimationClass = "motion-reduce:animate-none [html[data-pos-reduce-motion=true]_&]:animate-none";
|
|
4
|
+
export declare const shimmerClass = "rounded-[0.375rem] bg-[linear-gradient(90deg,#F0F0F1_0,#F9F9FA_12.5rem,#F0F0F1_25rem)] bg-[length:50rem_100%] animate-record-shimmer motion-reduce:animate-none [html[data-pos-reduce-motion=true]_&]:animate-none";
|
|
5
|
+
export declare function prefersReducedMotion(): boolean;
|
|
6
|
+
export declare function useReducedMotion(): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export type RecordTone = 'ok' | 'warn' | 'danger' | 'info' | 'violet' | 'neutral';
|
|
3
|
+
export interface RecordTonePair {
|
|
4
|
+
fg: string;
|
|
5
|
+
bg: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const RECORD_TONE: Record<RecordTone, RecordTonePair>;
|
|
8
|
+
export type SignedAmountTone = 'positive' | 'negative' | 'neutral';
|
|
9
|
+
export declare function amountToneStyle(tone: SignedAmountTone | undefined): CSSProperties | undefined;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keeps the text a cashier typed into a money input separate from the number
|
|
3
|
+
* the host holds.
|
|
4
|
+
*
|
|
5
|
+
* A money input whose display is `String(value)` loses what the cashier is
|
|
6
|
+
* mid-way through typing: `'40.'` parses to `40` and is re-rendered as `'40'`,
|
|
7
|
+
* so the next `0` produces `'400'` and `'40.00'` ends up read as 4000. The hook
|
|
8
|
+
* keeps the typed string and shows it while it still parses to `value` (the
|
|
9
|
+
* echo of the cashier's own keystroke). When the host holds a number the draft
|
|
10
|
+
* does not represent (a reset, a prefill, a host that ignores the keystroke),
|
|
11
|
+
* the input shows `format(value)` instead, so the host stays in control.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Whether `text` is one amount, possibly partial, in a currency with
|
|
15
|
+
* `fractionDigits` minor digits: digits, then at most one `.` or `,` followed
|
|
16
|
+
* by at most `fractionDigits` digits (`''`, `'40'`, `'40.'`, `'40,5'`, `'.5'`).
|
|
17
|
+
* Anything else would show one amount while emitting another, because
|
|
18
|
+
* `parseFloat` reads only a prefix and `,` is the decimal separator: `'40.5.9'`
|
|
19
|
+
* and `'4a'` would emit 40.5 and 4, and `'1,000'` would emit 1. Callers reject
|
|
20
|
+
* such a keystroke instead of storing it, so the input keeps what it showed.
|
|
21
|
+
*/
|
|
22
|
+
export declare const isDecimalDraft: (text: string, fractionDigits: number) => boolean;
|
|
23
|
+
/** Parses a typed amount (`'40.5'`, `'40,5'`, `'40.'`); `null` when there is no number yet (`''`, `'.'`, `','`). */
|
|
24
|
+
export declare const parseDecimalDraft: (draft: string) => number | null;
|
|
25
|
+
export interface DecimalDraft {
|
|
26
|
+
/** The text to show in the input. */
|
|
27
|
+
draft: string;
|
|
28
|
+
/** Stores the text the cashier typed. */
|
|
29
|
+
setDraft: (next: string) => void;
|
|
30
|
+
/** Rewrites the draft in its canonical form (`'40.'` → `'40'`) without changing its value. */
|
|
31
|
+
normalize: () => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const useDecimalDraft: (value: number | null | undefined, format: (value: number | null | undefined) => string) => DecimalDraft;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface PrefillEdits<T> {
|
|
2
|
+
isUntouched: () => boolean;
|
|
3
|
+
markEdited: (emitted: T) => void;
|
|
4
|
+
markUntouched: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const usePrefillEdits: <T>(source: T, isSame?: (a: T, b: T) => boolean) => PrefillEdits<T>;
|
|
7
|
+
export declare const useReplaceWhileUntouched: (isUntouched: () => boolean, replace: (text: string) => void) => import('react').RefObject<HTMLInputElement | null>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Density } from './density';
|
|
3
|
+
export interface DensityProviderProps {
|
|
4
|
+
density: Density;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function DensityProvider({ density, children }: DensityProviderProps): import("react/jsx-runtime").JSX.Element;
|